Files
SWebStatic/node_modules/wrangler/wrangler-dist/experimental-config.mjs.map
T
2026-07-08 18:29:36 +08:00

1 line
7.8 KiB
Plaintext

{"version":3,"file":"experimental-config.mjs","names":[],"sources":["../../config/dist/public-CFHebTo4.mjs","../src/experimental-config/wrangler-definition.ts"],"sourcesContent":["//#region src/bindings.ts\nconst bindings = {\n\tagentMemory: (options) => ({\n\t\ttype: \"agent-memory\",\n\t\t...options\n\t}),\n\tai: (options) => ({\n\t\ttype: \"ai\",\n\t\t...options\n\t}),\n\taiSearch: (options) => ({\n\t\ttype: \"ai-search\",\n\t\t...options\n\t}),\n\taiSearchNamespace: (options) => ({\n\t\ttype: \"ai-search-namespace\",\n\t\t...options\n\t}),\n\tanalyticsEngineDataset: (options) => ({\n\t\ttype: \"analytics-engine-dataset\",\n\t\t...options\n\t}),\n\tartifacts: (options) => ({\n\t\ttype: \"artifacts\",\n\t\t...options\n\t}),\n\tassets: () => ({ type: \"assets\" }),\n\tbrowser: (options) => ({\n\t\ttype: \"browser\",\n\t\t...options\n\t}),\n\td1: (options) => ({\n\t\ttype: \"d1\",\n\t\t...options\n\t}),\n\tdispatchNamespace: (options) => ({\n\t\ttype: \"dispatch-namespace\",\n\t\t...options\n\t}),\n\tdurableObject: (options) => ({\n\t\ttype: \"durable-object\",\n\t\t...options\n\t}),\n\tflagship: (options) => ({\n\t\ttype: \"flagship\",\n\t\t...options\n\t}),\n\thyperdrive: (options) => ({\n\t\ttype: \"hyperdrive\",\n\t\t...options\n\t}),\n\timages: (options) => ({\n\t\ttype: \"images\",\n\t\t...options\n\t}),\n\tjson: (value) => ({\n\t\ttype: \"json\",\n\t\tvalue\n\t}),\n\tkv: (options) => ({\n\t\ttype: \"kv\",\n\t\t...options\n\t}),\n\tlogfwdr: (options) => ({\n\t\ttype: \"logfwdr\",\n\t\t...options\n\t}),\n\tmedia: (options) => ({\n\t\ttype: \"media\",\n\t\t...options\n\t}),\n\tmtlsCertificate: (options) => ({\n\t\ttype: \"mtls-certificate\",\n\t\t...options\n\t}),\n\tpipeline: (options) => ({\n\t\ttype: \"pipeline\",\n\t\t...options\n\t}),\n\tqueue: (options) => ({\n\t\ttype: \"queue\",\n\t\t...options\n\t}),\n\trateLimit: (options) => ({\n\t\ttype: \"rate-limit\",\n\t\t...options\n\t}),\n\tr2: (options) => ({\n\t\ttype: \"r2\",\n\t\t...options\n\t}),\n\tsecret: () => ({ type: \"secret\" }),\n\tsecretsStoreSecret: (options) => ({\n\t\ttype: \"secrets-store-secret\",\n\t\t...options\n\t}),\n\tsendEmail: (options) => ({\n\t\ttype: \"send-email\",\n\t\t...options\n\t}),\n\tstream: (options) => ({\n\t\ttype: \"stream\",\n\t\t...options\n\t}),\n\ttext: (value) => ({\n\t\ttype: \"text\",\n\t\tvalue\n\t}),\n\tvectorize: (options) => ({\n\t\ttype: \"vectorize\",\n\t\t...options\n\t}),\n\tversionMetadata: () => ({ type: \"version-metadata\" }),\n\tvpcService: (options) => ({\n\t\ttype: \"vpc-service\",\n\t\t...options\n\t}),\n\tvpcNetwork: (options) => ({\n\t\ttype: \"vpc-network\",\n\t\t...options\n\t}),\n\twebSearch: (options) => ({\n\t\ttype: \"web-search\",\n\t\t...options\n\t}),\n\tworker: (options) => ({\n\t\ttype: \"worker\",\n\t\t...options\n\t}),\n\tworkerLoader: () => ({ type: \"worker-loader\" })\n};\n\n//#endregion\n//#region src/triggers.ts\n/**\n* Triggers builder for configuring event triggers.\n*\n* @example\n* ```typescript\n* import { defineWorker, triggers } from \"@cloudflare/config\";\n*\n* export default defineWorker({\n* triggers: [\n* triggers.fetch({ pattern: \"example.com/*\", zone: \"example.com\" }),\n* triggers.queue({ name: \"my-queue\" }),\n* triggers.scheduled({ schedule: \"0 * * * *\" }),\n* triggers.scheduled({ schedule: \"30 0 * * *\" }),\n* ],\n* });\n* ```\n*/\nconst triggers = {\n\tfetch: (options) => ({\n\t\ttype: \"fetch\",\n\t\t...options\n\t}),\n\tqueue: (options) => ({\n\t\ttype: \"queue\",\n\t\t...options\n\t}),\n\tscheduled: (options) => ({\n\t\ttype: \"scheduled\",\n\t\t...options\n\t})\n};\n\n//#endregion\n//#region src/exports.ts\nfunction durableObject(options) {\n\treturn {\n\t\ttype: \"durable-object\",\n\t\t...options\n\t};\n}\nfunction worker(options = {}) {\n\treturn {\n\t\ttype: \"worker\",\n\t\t...options\n\t};\n}\n/**\n* Exports builder for configuring Worker exports.\n*\n* @example\n* ```typescript\n* import { defineWorker, exports } from \"@cloudflare/config\";\n*\n* export default defineWorker({\n* exports: {\n* MyDurableObject: exports.durableObject({ storage: \"sqlite\" }),\n* OldClass: exports.durableObject({ state: \"deleted\" }),\n* OldName: exports.durableObject({ state: \"renamed\", renamedTo: \"NewName\" }),\n* Outgoing: exports.durableObject({ state: \"transferred\", transferredTo: \"target-worker\" }),\n* Incoming: exports.durableObject({ state: \"expecting-transfer\", storage: \"sqlite\", transferFrom: \"source-worker\" }),\n* },\n* });\n* ```\n*/\nconst exports = {\n\tdurableObject,\n\tworker\n};\n\n//#endregion\n//#region src/worker-definition.ts\nconst CONFIG = Symbol.for(\"@cloudflare/config:worker-config\");\nfunction defineWorker(config) {\n\treturn {\n\t\t[CONFIG]: config,\n\t\tdurableObject(options) {\n\t\t\treturn {\n\t\t\t\ttype: \"durable-object\",\n\t\t\t\t...options\n\t\t\t};\n\t\t},\n\t\tworker(options) {\n\t\t\treturn {\n\t\t\t\ttype: \"worker\",\n\t\t\t\t...options\n\t\t\t};\n\t\t}\n\t};\n}\nasync function resolveWorkerDefinition(def, ctx) {\n\tconst raw = typeof def === \"object\" && def !== null && CONFIG in def ? def[CONFIG] : def;\n\treturn await (typeof raw === \"function\" ? raw(ctx) : raw);\n}\n\n//#endregion\nexport { bindings as a, triggers as i, resolveWorkerDefinition as n, exports as r, defineWorker as t };","import type { WranglerConfig } from \"./types\";\nimport type { ConfigContext } from \"@cloudflare/config/public\";\n\nexport type WranglerConfigExport =\n\t| WranglerConfig\n\t| Promise<WranglerConfig>\n\t| ((ctx: ConfigContext) => WranglerConfig | Promise<WranglerConfig>);\n\nexport function defineWranglerConfig(\n\tconfig: WranglerConfigExport\n): WranglerConfigExport {\n\treturn config;\n}\n\nexport async function resolveWranglerConfig(\n\tdef: unknown,\n\tctx: ConfigContext\n): Promise<unknown> {\n\tlet raw = def;\n\tif (typeof raw === \"function\") {\n\t\traw = (raw as (ctx: ConfigContext) => unknown)(ctx);\n\t}\n\treturn await raw;\n}\n"],"mappings":";AACA,MAAM,WAAW;CAChB,cAAc,aAAa;EAC1B,MAAM;EACN,GAAG;EACH;CACD,KAAK,aAAa;EACjB,MAAM;EACN,GAAG;EACH;CACD,WAAW,aAAa;EACvB,MAAM;EACN,GAAG;EACH;CACD,oBAAoB,aAAa;EAChC,MAAM;EACN,GAAG;EACH;CACD,yBAAyB,aAAa;EACrC,MAAM;EACN,GAAG;EACH;CACD,YAAY,aAAa;EACxB,MAAM;EACN,GAAG;EACH;CACD,eAAe,EAAE,MAAM,UAAU;CACjC,UAAU,aAAa;EACtB,MAAM;EACN,GAAG;EACH;CACD,KAAK,aAAa;EACjB,MAAM;EACN,GAAG;EACH;CACD,oBAAoB,aAAa;EAChC,MAAM;EACN,GAAG;EACH;CACD,gBAAgB,aAAa;EAC5B,MAAM;EACN,GAAG;EACH;CACD,WAAW,aAAa;EACvB,MAAM;EACN,GAAG;EACH;CACD,aAAa,aAAa;EACzB,MAAM;EACN,GAAG;EACH;CACD,SAAS,aAAa;EACrB,MAAM;EACN,GAAG;EACH;CACD,OAAO,WAAW;EACjB,MAAM;EACN;EACA;CACD,KAAK,aAAa;EACjB,MAAM;EACN,GAAG;EACH;CACD,UAAU,aAAa;EACtB,MAAM;EACN,GAAG;EACH;CACD,QAAQ,aAAa;EACpB,MAAM;EACN,GAAG;EACH;CACD,kBAAkB,aAAa;EAC9B,MAAM;EACN,GAAG;EACH;CACD,WAAW,aAAa;EACvB,MAAM;EACN,GAAG;EACH;CACD,QAAQ,aAAa;EACpB,MAAM;EACN,GAAG;EAC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