@cloudflare/vite-plugin 1.54.9 → 1.54.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/experimental-config.d.mts +3 -20
- package/dist/experimental-config.d.mts.map +1 -1
- package/dist/experimental-config.mjs +1 -5
- package/dist/experimental-config.mjs.map +1 -1
- package/dist/index.mjs +594 -82
- package/dist/index.mjs.map +1 -1
- package/dist/{package-Y06hp_Qw.mjs → package-DLD7aweR.mjs} +2 -2
- package/dist/package-DLD7aweR.mjs.map +1 -0
- package/dist/workers/runner-worker/module-runner.js +1 -1
- package/package.json +13 -13
- package/dist/package-Y06hp_Qw.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -137,7 +137,7 @@ function createFatalError$1(message, isJson, options) {
|
|
|
137
137
|
__name$6(createFatalError$1, "createFatalError");
|
|
138
138
|
|
|
139
139
|
//#endregion
|
|
140
|
-
//#region ../workers-utils/dist/chunk-
|
|
140
|
+
//#region ../workers-utils/dist/chunk-JGKSDUFK.mjs
|
|
141
141
|
function hasKnownExportType(entry) {
|
|
142
142
|
const type = entry?.type;
|
|
143
143
|
return type === "durable-object" || type === "worker";
|
|
@@ -173,6 +173,17 @@ function getDurableObjectContainerApps(containers) {
|
|
|
173
173
|
return Array.isArray(containers) ? containers.filter(isDurableObjectContainerApp) : [];
|
|
174
174
|
}
|
|
175
175
|
__name$6(getDurableObjectContainerApps, "getDurableObjectContainerApps");
|
|
176
|
+
function getResolvedDurableObjectContainerApps(containers, exports$1) {
|
|
177
|
+
return getDurableObjectContainerApps(containers).map((container) => {
|
|
178
|
+
const className = resolveContainerClassName(container, exports$1);
|
|
179
|
+
if (typeof className !== "string" || className.length === 0) throw new UserError(`The container "${container.name}" is not linked to a Durable Object. Either set "containers.class_name", or reference this container from a Durable Object's \`exports\` entry via its "container" field.`, { telemetryMessage: "durable object container class unresolved" });
|
|
180
|
+
return {
|
|
181
|
+
...container,
|
|
182
|
+
class_name: className
|
|
183
|
+
};
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
__name$6(getResolvedDurableObjectContainerApps, "getResolvedDurableObjectContainerApps");
|
|
176
187
|
function getContainerNameToClassNameMap(exports$1) {
|
|
177
188
|
const containerNameToClassName = /* @__PURE__ */ new Map();
|
|
178
189
|
for (const [className, entry] of Object.entries(getDurableObjectExports(exports$1))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
|
|
@@ -227,7 +238,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
|
|
|
227
238
|
__name$6(getDurableObjectClassNameToUseSQLiteMap, "getDurableObjectClassNameToUseSQLiteMap");
|
|
228
239
|
function validateDurableObjectContainerApplications(config$2, containers = getDurableObjectContainerApps(config$2.containers)) {
|
|
229
240
|
const allDOs = getDurableObjectClassNameToUseSQLiteMap(config$2.migrations, config$2.exports);
|
|
230
|
-
for (const container of containers) {
|
|
241
|
+
for (const container of getResolvedDurableObjectContainerApps(containers, config$2.exports)) {
|
|
231
242
|
const maybeBoundDO = config$2.durable_objects.bindings.find((durableObject) => durableObject.class_name === container.class_name);
|
|
232
243
|
const useSQLite = allDOs.get(container.class_name);
|
|
233
244
|
if (useSQLite === void 0 && maybeBoundDO === void 0) throw new UserError(`The container class_name ${container.class_name} does not match any durable object class_name defined in your Wrangler config file. Note that the durable object must be defined in the same script as the container.`, { telemetryMessage: "no DO defined that matches container class_name" });
|
|
@@ -2195,7 +2206,12 @@ var APIError = class extends ParseError {
|
|
|
2195
2206
|
return this.#status;
|
|
2196
2207
|
}
|
|
2197
2208
|
isGatewayError() {
|
|
2198
|
-
if (this.#status !== void 0) return [
|
|
2209
|
+
if (this.#status !== void 0) return [
|
|
2210
|
+
502,
|
|
2211
|
+
503,
|
|
2212
|
+
504,
|
|
2213
|
+
524
|
|
2214
|
+
].includes(this.#status);
|
|
2199
2215
|
return false;
|
|
2200
2216
|
}
|
|
2201
2217
|
isRetryable() {
|
|
@@ -2599,8 +2615,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
|
|
|
2599
2615
|
__name$6(formatConfigSnippet, "formatConfigSnippet");
|
|
2600
2616
|
|
|
2601
2617
|
//#endregion
|
|
2602
|
-
//#region ../workers-utils/dist/chunk-
|
|
2603
|
-
var DEFAULT_COMPAT_DATE = "2026-09-
|
|
2618
|
+
//#region ../workers-utils/dist/chunk-5H6GBNUC.mjs
|
|
2619
|
+
var DEFAULT_COMPAT_DATE = "2026-09-15";
|
|
2604
2620
|
function assertNever(_value) {}
|
|
2605
2621
|
__name$6(assertNever, "assertNever");
|
|
2606
2622
|
function mapWorkerMetadataBindings(bindings) {
|
|
@@ -2772,9 +2788,6 @@ function mapWorkerMetadataBindings(bindings) {
|
|
|
2772
2788
|
instance_name: binding.instance_name
|
|
2773
2789
|
}];
|
|
2774
2790
|
break;
|
|
2775
|
-
case "websearch":
|
|
2776
|
-
configObj.websearch = { binding: binding.name };
|
|
2777
|
-
break;
|
|
2778
2791
|
case "agent_memory":
|
|
2779
2792
|
configObj.agent_memory = [...configObj.agent_memory ?? [], {
|
|
2780
2793
|
binding: binding.name,
|
|
@@ -27263,7 +27276,6 @@ var defaultWranglerConfig = {
|
|
|
27263
27276
|
vectorize: [],
|
|
27264
27277
|
ai_search_namespaces: [],
|
|
27265
27278
|
ai_search: [],
|
|
27266
|
-
websearch: void 0,
|
|
27267
27279
|
agent_memory: [],
|
|
27268
27280
|
hyperdrive: [],
|
|
27269
27281
|
workflows: [],
|
|
@@ -41341,7 +41353,6 @@ var friendlyBindingNames = {
|
|
|
41341
41353
|
vectorize: "Vectorize Index",
|
|
41342
41354
|
ai_search_namespaces: "AI Search Namespace",
|
|
41343
41355
|
ai_search: "AI Search Instance",
|
|
41344
|
-
websearch: "Web Search",
|
|
41345
41356
|
agent_memory: "Agent Memory",
|
|
41346
41357
|
hyperdrive: "Hyperdrive Config",
|
|
41347
41358
|
r2_buckets: "R2 Bucket",
|
|
@@ -41394,7 +41405,6 @@ var bindingTypeFriendlyNames = {
|
|
|
41394
41405
|
vectorize: "Vectorize Index",
|
|
41395
41406
|
ai_search_namespace: "AI Search Namespace",
|
|
41396
41407
|
ai_search: "AI Search Instance",
|
|
41397
|
-
websearch: "Web Search",
|
|
41398
41408
|
agent_memory: "Agent Memory",
|
|
41399
41409
|
hyperdrive: "Hyperdrive Config",
|
|
41400
41410
|
service: "Worker",
|
|
@@ -41897,7 +41907,6 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
|
|
|
41897
41907
|
vectorize: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vectorize", validateBindingArray(envName, validateVectorizeBinding), []),
|
|
41898
41908
|
ai_search_namespaces: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "ai_search_namespaces", validateBindingArray(envName, validateAISearchNamespaceBinding), []),
|
|
41899
41909
|
ai_search: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "ai_search", validateBindingArray(envName, validateAISearchBinding), []),
|
|
41900
|
-
websearch: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "websearch", validateNamedSimpleBinding(envName), void 0),
|
|
41901
41910
|
agent_memory: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "agent_memory", validateBindingArray(envName, validateAgentMemoryBinding), []),
|
|
41902
41911
|
hyperdrive: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "hyperdrive", validateBindingArray(envName, validateHyperdriveBinding), []),
|
|
41903
41912
|
services: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "services", validateBindingArray(envName, validateServiceBinding), []),
|
|
@@ -42437,7 +42446,6 @@ var validateUnsafeBinding = /* @__PURE__ */ __name$6((diagnostics, field, value)
|
|
|
42437
42446
|
"ai",
|
|
42438
42447
|
"ai_search_namespace",
|
|
42439
42448
|
"ai_search",
|
|
42440
|
-
"websearch",
|
|
42441
42449
|
"agent_memory",
|
|
42442
42450
|
"kv_namespace",
|
|
42443
42451
|
"durable_object_namespace",
|
|
@@ -42583,7 +42591,18 @@ function validateDurableObjectContainerImages(diagnostics, field, images, compli
|
|
|
42583
42591
|
valid$2 = false;
|
|
42584
42592
|
}
|
|
42585
42593
|
}
|
|
42586
|
-
const
|
|
42594
|
+
const isDockerfileBuild = hasDockerfile && !hasImage;
|
|
42595
|
+
if (isDockerfileBuild) {
|
|
42596
|
+
if (image.build_context !== void 0 && (typeof image.build_context !== "string" || image.build_context.length === 0)) {
|
|
42597
|
+
diagnostics.errors.push(`"${imageField}.build_context" must be a non-empty string.`);
|
|
42598
|
+
valid$2 = false;
|
|
42599
|
+
}
|
|
42600
|
+
if (image.build_vars !== void 0 && (typeof image.build_vars !== "object" || image.build_vars === null || Array.isArray(image.build_vars) || Object.values(image.build_vars).some((value) => typeof value !== "string"))) {
|
|
42601
|
+
diagnostics.errors.push(`"${imageField}.build_vars" must be an object with string values.`);
|
|
42602
|
+
valid$2 = false;
|
|
42603
|
+
}
|
|
42604
|
+
}
|
|
42605
|
+
const unsupportedFields = Object.keys(image).filter((property) => property !== "dockerfile" && property !== "image" && !(isDockerfileBuild && (property === "build_context" || property === "build_vars")));
|
|
42587
42606
|
if (unsupportedFields.length > 0) {
|
|
42588
42607
|
diagnostics.errors.push(`Unexpected fields found in ${imageField} field: ${unsupportedFields.map((property) => `"${property}"`).join(", ")}`);
|
|
42589
42608
|
valid$2 = false;
|
|
@@ -42592,6 +42611,24 @@ function validateDurableObjectContainerImages(diagnostics, field, images, compli
|
|
|
42592
42611
|
return valid$2;
|
|
42593
42612
|
}
|
|
42594
42613
|
__name$6(validateDurableObjectContainerImages, "validateDurableObjectContainerImages");
|
|
42614
|
+
function validateDurableObjectContainerUnsafe(diagnostics, field, value) {
|
|
42615
|
+
if (value === void 0) return;
|
|
42616
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
42617
|
+
diagnostics.errors.push(`"${field}" should be an object.`);
|
|
42618
|
+
return;
|
|
42619
|
+
}
|
|
42620
|
+
const unsafe = value;
|
|
42621
|
+
const configuration = unsafe.configuration;
|
|
42622
|
+
if (Object.keys(unsafe).some((key) => key !== "configuration") || configuration !== void 0 && (typeof configuration !== "object" || configuration === null || Array.isArray(configuration) || Object.keys(configuration).some((key) => key !== "experimental_flags"))) {
|
|
42623
|
+
diagnostics.errors.push(`Only "${field}.configuration.experimental_flags" is supported for Durable Object-managed Containers.`);
|
|
42624
|
+
return;
|
|
42625
|
+
}
|
|
42626
|
+
if (configuration !== void 0) {
|
|
42627
|
+
const flags = configuration.experimental_flags;
|
|
42628
|
+
if (flags !== void 0 && (!Array.isArray(flags) || flags.some((flag) => typeof flag !== "string"))) diagnostics.errors.push(`"${field}.configuration.experimental_flags" should be an array of strings.`);
|
|
42629
|
+
}
|
|
42630
|
+
}
|
|
42631
|
+
__name$6(validateDurableObjectContainerUnsafe, "validateDurableObjectContainerUnsafe");
|
|
42595
42632
|
function validateContainerApp(envName, topLevelName, configPath, options = {}) {
|
|
42596
42633
|
const { generateDefaultName = true } = options;
|
|
42597
42634
|
return (diagnostics, field, value, config2) => {
|
|
@@ -42603,11 +42640,10 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
|
|
|
42603
42640
|
for (const containerAppOptional of value) {
|
|
42604
42641
|
const isDurableObjectManaged = containerAppOptional.scheduling_policy === "durable_object";
|
|
42605
42642
|
const hasValidDurableObjectClassName = typeof containerAppOptional.class_name === "string" && containerAppOptional.class_name.length > 0;
|
|
42606
|
-
|
|
42607
|
-
|
|
42608
|
-
} else validateOptionalProperty(diagnostics, field, "class_name", containerAppOptional.class_name, "string");
|
|
42643
|
+
validateOptionalProperty(diagnostics, field, "class_name", containerAppOptional.class_name, "string");
|
|
42644
|
+
if (isDurableObjectManaged && containerAppOptional.class_name === "") diagnostics.errors.push(`"containers.class_name" must be a non-empty string when specified for a Durable Object-managed Container.`);
|
|
42609
42645
|
validateOptionalProperty(diagnostics, field, "name", containerAppOptional.name, "string");
|
|
42610
|
-
if (generateDefaultName && !containerAppOptional.name && (!isDurableObjectManaged || hasValidDurableObjectClassName)) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
|
|
42646
|
+
if (generateDefaultName && !containerAppOptional.name && (!isDurableObjectManaged || containerAppOptional.class_name === void 0 || hasValidDurableObjectClassName)) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
|
|
42611
42647
|
else if (!topLevelName) diagnostics.errors.push(`Must have either a top level "name" and "containers.class_name" field defined, or have field "containers.name" defined.`);
|
|
42612
42648
|
else {
|
|
42613
42649
|
let name = `${topLevelName}-${containerAppOptional.class_name}`;
|
|
@@ -42616,13 +42652,18 @@ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
|
|
|
42616
42652
|
}
|
|
42617
42653
|
if (isDurableObjectManaged) {
|
|
42618
42654
|
validateDurableObjectContainerImages(diagnostics, `${field}.images`, containerAppOptional.images, options.complianceConfig);
|
|
42655
|
+
validateContainerObservability(diagnostics, `${field}.observability`, containerAppOptional.observability, config2);
|
|
42656
|
+
if (containerAppOptional.observability?.target_instance_count !== void 0 || containerAppOptional.observability?.target_instance_percentage !== void 0) diagnostics.errors.push(`"${field}.observability" only supports enabling or disabling logs for Durable Object-managed Containers; instance targeting is not supported.`);
|
|
42657
|
+
validateDurableObjectContainerUnsafe(diagnostics, `${field}.unsafe`, containerAppOptional.unsafe);
|
|
42619
42658
|
const unsupportedFields = Object.keys(containerAppOptional).filter((key) => ![
|
|
42620
42659
|
"name",
|
|
42621
42660
|
"class_name",
|
|
42622
42661
|
"scheduling_policy",
|
|
42623
|
-
"images"
|
|
42662
|
+
"images",
|
|
42663
|
+
"observability",
|
|
42664
|
+
"unsafe"
|
|
42624
42665
|
].includes(key));
|
|
42625
|
-
if (unsupportedFields.length > 0) diagnostics.errors.push(`Unsupported fields for Durable Object-managed Containers in ${field}: ${unsupportedFields.map((key) => `"${key}"`).join(",")}. Only "name", "class_name", "scheduling_policy", and "
|
|
42666
|
+
if (unsupportedFields.length > 0) diagnostics.errors.push(`Unsupported fields for Durable Object-managed Containers in ${field}: ${unsupportedFields.map((key) => `"${key}"`).join(",")}. Only "name", "class_name", "scheduling_policy", "images", "observability", and restricted "unsafe" settings are supported.`);
|
|
42626
42667
|
continue;
|
|
42627
42668
|
}
|
|
42628
42669
|
if (!containerAppOptional.configuration?.image && !containerAppOptional.image) diagnostics.errors.push(`"containers.image" field must be defined for each container app. This should be the path to your Dockerfile or an image URI pointing to the Cloudflare registry.`);
|
|
@@ -43693,6 +43734,8 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$6((envName, configPath) => (
|
|
|
43693
43734
|
"d1_databases",
|
|
43694
43735
|
"r2_buckets",
|
|
43695
43736
|
"vectorize",
|
|
43737
|
+
"ai_search_namespaces",
|
|
43738
|
+
"ai_search",
|
|
43696
43739
|
"hyperdrive",
|
|
43697
43740
|
"services",
|
|
43698
43741
|
"analytics_engine_datasets",
|
|
@@ -43731,6 +43774,8 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$6((envName, configPath) => (
|
|
|
43731
43774
|
isValid = validateBindingArray(envName, validateD1Binding)(diagnostics, `${field}.d1_databases`, previews.d1_databases, void 0) && isValid;
|
|
43732
43775
|
isValid = validateBindingArray(envName, validateR2Binding)(diagnostics, `${field}.r2_buckets`, previews.r2_buckets, void 0) && isValid;
|
|
43733
43776
|
isValid = validateBindingArray(envName, validateVectorizeBinding)(diagnostics, `${field}.vectorize`, previews.vectorize, void 0) && isValid;
|
|
43777
|
+
isValid = validateBindingArray(envName, validateAISearchNamespaceBinding)(diagnostics, `${field}.ai_search_namespaces`, previews.ai_search_namespaces, void 0) && isValid;
|
|
43778
|
+
isValid = validateBindingArray(envName, validateAISearchBinding)(diagnostics, `${field}.ai_search`, previews.ai_search, void 0) && isValid;
|
|
43734
43779
|
isValid = validateBindingArray(envName, validateHyperdriveBinding)(diagnostics, `${field}.hyperdrive`, previews.hyperdrive, void 0) && isValid;
|
|
43735
43780
|
isValid = validateBindingArray(envName, validateServiceBinding)(diagnostics, `${field}.services`, previews.services, void 0) && isValid;
|
|
43736
43781
|
isValid = validateBindingArray(envName, validateAnalyticsEngineBinding)(diagnostics, `${field}.analytics_engine_datasets`, previews.analytics_engine_datasets, void 0) && isValid;
|
|
@@ -44291,7 +44336,6 @@ var BINDING_LOCAL_SUPPORT = {
|
|
|
44291
44336
|
flagship: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
44292
44337
|
vpc_service: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
44293
44338
|
vpc_network: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
44294
|
-
websearch: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator",
|
|
44295
44339
|
agent_memory: "DO-NOT-USE-this-resource-will-never-have-a-local-simulator"
|
|
44296
44340
|
};
|
|
44297
44341
|
function getBindingLocalSupport(type) {
|
|
@@ -44649,14 +44693,6 @@ function convertConfigToBindings(config2, options) {
|
|
|
44649
44693
|
...x
|
|
44650
44694
|
};
|
|
44651
44695
|
break;
|
|
44652
|
-
case "websearch": {
|
|
44653
|
-
const { binding,...x } = info$1;
|
|
44654
|
-
output[binding] = {
|
|
44655
|
-
type: "websearch",
|
|
44656
|
-
...x
|
|
44657
|
-
};
|
|
44658
|
-
break;
|
|
44659
|
-
}
|
|
44660
44696
|
case "agent_memory":
|
|
44661
44697
|
for (const { binding,...x } of info$1) output[binding] = {
|
|
44662
44698
|
type: "agent_memory",
|
|
@@ -44802,7 +44838,6 @@ function printBindings(bindings, options) {
|
|
|
44802
44838
|
const vectorize = extractBindingsOfType("vectorize", bindings);
|
|
44803
44839
|
const ai_search_namespaces = extractBindingsOfType("ai_search_namespace", bindings);
|
|
44804
44840
|
const ai_search = extractBindingsOfType("ai_search", bindings);
|
|
44805
|
-
const websearch = extractBindingsOfType("websearch", bindings);
|
|
44806
44841
|
const agent_memory = extractBindingsOfType("agent_memory", bindings);
|
|
44807
44842
|
const hyperdrive = extractBindingsOfType("hyperdrive", bindings);
|
|
44808
44843
|
const r2_buckets = extractBindingsOfType("r2_bucket", bindings);
|
|
@@ -44942,12 +44977,6 @@ function printBindings(bindings, options) {
|
|
|
44942
44977
|
value: instance_name ? String(instance_name) : void 0,
|
|
44943
44978
|
mode: getMode({ isSimulatedLocally: false })
|
|
44944
44979
|
})));
|
|
44945
|
-
if (websearch.length > 0) output.push(...websearch.map(({ binding }) => ({
|
|
44946
|
-
name: binding,
|
|
44947
|
-
type: getBindingTypeFriendlyName("websearch"),
|
|
44948
|
-
value: void 0,
|
|
44949
|
-
mode: getMode({ isSimulatedLocally: false })
|
|
44950
|
-
})));
|
|
44951
44980
|
if (agent_memory.length > 0) output.push(...agent_memory.map(({ binding, namespace }) => ({
|
|
44952
44981
|
name: binding,
|
|
44953
44982
|
type: getBindingTypeFriendlyName("agent_memory"),
|
|
@@ -45236,7 +45265,7 @@ ${allTailConsumers.map(({ service, streaming }) => {
|
|
|
45236
45265
|
let containersTitle = "The following containers are available:";
|
|
45237
45266
|
if (context.name && isMultiWorker) containersTitle = `The following containers are available from ${source_default.blue(context.name)}:`;
|
|
45238
45267
|
log$2(`${containersTitle}
|
|
45239
|
-
${containers.map((container) => container.scheduling_policy === "durable_object" ? `- ${container.class_name} (durable_object)` : `- ${container.name} (${container.image})`).join("\n")}`);
|
|
45268
|
+
${containers.map((container) => container.scheduling_policy === "durable_object" ? `- ${container.class_name ?? container.name} (durable_object)` : `- ${container.name} (${container.image})`).join("\n")}`);
|
|
45240
45269
|
log$2("");
|
|
45241
45270
|
}
|
|
45242
45271
|
if (context.unsafeMetadata) {
|
|
@@ -55442,10 +55471,6 @@ const KnownBindingSchema = discriminatedUnion("type", [
|
|
|
55442
55471
|
const value = input;
|
|
55443
55472
|
return value.tunnelId !== void 0 && value.networkId !== void 0 ? `"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both` : `"vpc-network" bindings must specify either "tunnelId" or "networkId"`;
|
|
55444
55473
|
} }),
|
|
55445
|
-
strictObject({
|
|
55446
|
-
type: literal$1("web-search"),
|
|
55447
|
-
dev: RemoteBindingDevSchema.optional()
|
|
55448
|
-
}),
|
|
55449
55474
|
WorkerBindingSchema,
|
|
55450
55475
|
strictObject({ type: literal$1("worker-loader") })
|
|
55451
55476
|
]);
|
|
@@ -55484,8 +55509,7 @@ const SINGLETON_BINDING_TYPES = new Set([
|
|
|
55484
55509
|
"images",
|
|
55485
55510
|
"media",
|
|
55486
55511
|
"stream",
|
|
55487
|
-
"version-metadata"
|
|
55488
|
-
"web-search"
|
|
55512
|
+
"version-metadata"
|
|
55489
55513
|
]);
|
|
55490
55514
|
const listFormatter = new Intl.ListFormat("en-US");
|
|
55491
55515
|
function validateSingletonBindings(env$3, ctx) {
|
|
@@ -56424,12 +56448,6 @@ function convertBindingsAndAssets(config$2, result) {
|
|
|
56424
56448
|
remote: binding.dev?.remote
|
|
56425
56449
|
}));
|
|
56426
56450
|
break;
|
|
56427
|
-
case "web-search":
|
|
56428
|
-
result.websearch = omitUndefined({
|
|
56429
|
-
binding: name,
|
|
56430
|
-
remote: binding.dev?.remote
|
|
56431
|
-
});
|
|
56432
|
-
break;
|
|
56433
56451
|
case "worker":
|
|
56434
56452
|
services.push(omitUndefined({
|
|
56435
56453
|
binding: name,
|
|
@@ -57144,9 +57162,25 @@ const MAX_ROUTES_RULE_LENGTH = 100;
|
|
|
57144
57162
|
|
|
57145
57163
|
//#endregion
|
|
57146
57164
|
//#region ../workers-shared/utils/configuration/parseStaticRouting.ts
|
|
57165
|
+
const MAX_REPORTED_DUPLICATED_RULES = 5;
|
|
57147
57166
|
function parseStaticRouting(input) {
|
|
57148
57167
|
if (input.length === 0) throw new Error("No `run_worker_first` rules were provided; must provide at least 1 rule.");
|
|
57149
|
-
if (input.length > MAX_ROUTES_RULES)
|
|
57168
|
+
if (input.length > MAX_ROUTES_RULES) {
|
|
57169
|
+
const seenRules = /* @__PURE__ */ new Set();
|
|
57170
|
+
const duplicatedRules = /* @__PURE__ */ new Set();
|
|
57171
|
+
for (const rule of input) {
|
|
57172
|
+
if (seenRules.has(rule)) duplicatedRules.add(rule);
|
|
57173
|
+
seenRules.add(rule);
|
|
57174
|
+
}
|
|
57175
|
+
if (duplicatedRules.size > 0) {
|
|
57176
|
+
const duplicateEntryCount = input.length - seenRules.size;
|
|
57177
|
+
const reportedDuplicatedRules = [...seenRules].filter((rule) => duplicatedRules.has(rule)).slice(0, MAX_REPORTED_DUPLICATED_RULES);
|
|
57178
|
+
const unreportedDuplicatedRuleCount = duplicatedRules.size - reportedDuplicatedRules.length;
|
|
57179
|
+
const unreportedDuplicatedRulesMessage = unreportedDuplicatedRuleCount > 0 ? `\n...and ${unreportedDuplicatedRuleCount} more duplicated ${unreportedDuplicatedRuleCount === 1 ? "rule" : "rules"}.` : "";
|
|
57180
|
+
throw new Error(`Too many \`run_worker_first\` rules were provided; ${input.length} rules provided (${seenRules.size} distinct, ${duplicateEntryCount} duplicate ${duplicateEntryCount === 1 ? "entry" : "entries"}) exceeds max of ${MAX_ROUTES_RULES}. Note: duplicate entries count towards the route limit. Ensure that no duplicate rules are present in your \`run_worker_first\` configuration.\n\nThe duplicated rules found are:\n${reportedDuplicatedRules.map((rule) => `- ${JSON.stringify(rule)}`).join("\n")}${unreportedDuplicatedRulesMessage}`);
|
|
57181
|
+
}
|
|
57182
|
+
throw new Error(`Too many \`run_worker_first\` rules were provided; ${input.length} rules provided exceeds max of ${MAX_ROUTES_RULES}.`);
|
|
57183
|
+
}
|
|
57150
57184
|
const rawAssetWorkerRules = [];
|
|
57151
57185
|
const assetWorkerRules = [];
|
|
57152
57186
|
const userWorkerRules = [];
|
|
@@ -66349,8 +66383,9 @@ function maybeAddAgentHint(server, mode) {
|
|
|
66349
66383
|
* Prints the Local Explorer API URL and useful routes to stdout so that
|
|
66350
66384
|
* headless AI agents can discover and call them programmatically.
|
|
66351
66385
|
*
|
|
66352
|
-
* Keep the message in sync with
|
|
66353
|
-
* packages/wrangler/src/dev/start-dev.ts
|
|
66386
|
+
* Keep the message in sync with:
|
|
66387
|
+
* - packages/wrangler/src/dev/start-dev.ts (printLocalExplorerAgentHint)
|
|
66388
|
+
* - packages/create-cloudflare/src/agents-md.ts (Local Explorer section)
|
|
66354
66389
|
*
|
|
66355
66390
|
* @param server - The Vite dev or preview server (must have `resolvedUrls` populated)
|
|
66356
66391
|
* @param mode - Whether this is a "dev" or "preview" session
|
|
@@ -66372,6 +66407,7 @@ function printLocalExplorerAgentHint(server, mode) {
|
|
|
66372
66407
|
` GET ${explorerApiUrl}/workflows - Workflows`,
|
|
66373
66408
|
` POST ${explorerApiUrl}/local/observability/query - run a read-only SQL query (SELECT/WITH only) over captured request traces and console logs. Tables: spans, logs (read attributes via json(attributes)). Example:`,
|
|
66374
66409
|
` curl -X POST ${explorerApiUrl}/local/observability/query -H 'Content-Type: application/json' -d '{"sql":"SELECT service, name, outcome, duration_ms FROM spans WHERE parent_id IS NULL LIMIT 20"}'`,
|
|
66410
|
+
` POST ${explorerApiUrl}/local/observability/clear - clear all captured traces and logs`,
|
|
66375
66411
|
`If the routes above don't cover what you need, fetch the full OpenAPI schema (large - use only as a last resort):`,
|
|
66376
66412
|
` GET ${explorerApiUrl} - OpenAPI schema`,
|
|
66377
66413
|
""
|
|
@@ -74597,19 +74633,25 @@ async function pushBuiltContainerImage(builtImage, versionId, pathToDocker, acco
|
|
|
74597
74633
|
}
|
|
74598
74634
|
__name$2(pushBuiltContainerImage, "pushBuiltContainerImage");
|
|
74599
74635
|
async function cleanupBuiltImages(builtImages, pathToDocker) {
|
|
74636
|
+
const aliasesByTag = /* @__PURE__ */ new Map();
|
|
74600
74637
|
for (const builtImage of builtImages) {
|
|
74601
|
-
|
|
74602
|
-
|
|
74603
|
-
|
|
74638
|
+
const aliases = aliasesByTag.get(builtImage.localTag);
|
|
74639
|
+
if (aliases) aliases.push(builtImage);
|
|
74640
|
+
else aliasesByTag.set(builtImage.localTag, [builtImage]);
|
|
74641
|
+
}
|
|
74642
|
+
for (const [localTag, aliases] of aliasesByTag) {
|
|
74643
|
+
if (!aliases.some((alias) => alias.localTagCleaned)) try {
|
|
74644
|
+
logger$1.debug(`Untagging built image: ${localTag}.`);
|
|
74604
74645
|
await runDockerCmd(pathToDocker, [
|
|
74605
74646
|
"image",
|
|
74606
74647
|
"rm",
|
|
74607
|
-
|
|
74648
|
+
localTag
|
|
74608
74649
|
]);
|
|
74609
|
-
builtImage.localTagCleaned = true;
|
|
74610
74650
|
} catch (error$2) {
|
|
74611
|
-
if (error$2 instanceof Error) logger$1.debug(`Cleaning up built image ${
|
|
74651
|
+
if (error$2 instanceof Error) logger$1.debug(`Cleaning up built image ${localTag} failed with error: ${error$2.message}`);
|
|
74652
|
+
continue;
|
|
74612
74653
|
}
|
|
74654
|
+
for (const alias of aliases) alias.localTagCleaned = true;
|
|
74613
74655
|
}
|
|
74614
74656
|
}
|
|
74615
74657
|
__name$2(cleanupBuiltImages, "cleanupBuiltImages");
|
|
@@ -78402,7 +78444,7 @@ function scrubEncryptedCredentials(options) {
|
|
|
78402
78444
|
__name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
|
|
78403
78445
|
|
|
78404
78446
|
//#endregion
|
|
78405
|
-
//#region ../workers-auth/dist/chunk-
|
|
78447
|
+
//#region ../workers-auth/dist/chunk-T63LVVAX.mjs
|
|
78406
78448
|
function createPreferences(getConfigPath) {
|
|
78407
78449
|
function getUserPreferencesPath() {
|
|
78408
78450
|
return path__default.resolve(getConfigPath(), "preferences.json");
|
|
@@ -79181,7 +79223,7 @@ Run \`${descriptor.commands.whoami}\` to check your current authentication statu
|
|
|
79181
79223
|
return oauthFlow.requireApiToken();
|
|
79182
79224
|
}
|
|
79183
79225
|
__name$1(requireApiToken$1, "requireApiToken");
|
|
79184
|
-
function
|
|
79226
|
+
function withLoginDefaults(complianceConfig, props) {
|
|
79185
79227
|
return {
|
|
79186
79228
|
complianceConfig,
|
|
79187
79229
|
scopes: props?.scopes ?? descriptor.getDefaultScopeKeys(),
|
|
@@ -79189,12 +79231,12 @@ Run \`${descriptor.commands.whoami}\` to check your current authentication statu
|
|
|
79189
79231
|
callbackHost: props?.callbackHost,
|
|
79190
79232
|
callbackPort: props?.callbackPort,
|
|
79191
79233
|
profile: props?.profile,
|
|
79192
|
-
device: props?.device
|
|
79234
|
+
device: props?.device ?? descriptor.useDeviceFlowByDefault ?? false
|
|
79193
79235
|
};
|
|
79194
79236
|
}
|
|
79195
|
-
__name$1(
|
|
79237
|
+
__name$1(withLoginDefaults, "withLoginDefaults");
|
|
79196
79238
|
async function login(complianceConfig, props) {
|
|
79197
|
-
return oauthFlow.login(
|
|
79239
|
+
return oauthFlow.login(withLoginDefaults(complianceConfig, props));
|
|
79198
79240
|
}
|
|
79199
79241
|
__name$1(login, "login");
|
|
79200
79242
|
async function logout(profile) {
|
|
@@ -79203,7 +79245,7 @@ Run \`${descriptor.commands.whoami}\` to check your current authentication statu
|
|
|
79203
79245
|
__name$1(logout, "logout");
|
|
79204
79246
|
async function loginOrRefreshIfRequired(complianceConfig, props) {
|
|
79205
79247
|
if (oauthFlow.getActiveTemporaryAccount()) return { loggedIn: true };
|
|
79206
|
-
return oauthFlow.loginOrRefreshIfRequired(
|
|
79248
|
+
return oauthFlow.loginOrRefreshIfRequired(withLoginDefaults(complianceConfig, props));
|
|
79207
79249
|
}
|
|
79208
79250
|
__name$1(loginOrRefreshIfRequired, "loginOrRefreshIfRequired");
|
|
79209
79251
|
async function getOAuthTokenFromLocalState() {
|
|
@@ -79236,10 +79278,7 @@ Run \`${descriptor.commands.whoami}\` to check your current authentication statu
|
|
|
79236
79278
|
return configCache.getConfigCache(getAccountCacheFileName()).account;
|
|
79237
79279
|
}
|
|
79238
79280
|
__name$1(getAccountFromCache, "getAccountFromCache");
|
|
79239
|
-
async function fetchAccountsPaged(complianceConfig, resource) {
|
|
79240
|
-
const result = await loginOrRefreshIfRequired(complianceConfig);
|
|
79241
|
-
if (!result.loggedIn) throw new UserError(`Not logged in. ${NOT_LOGGED_IN_ERROR_BODIES[result.reason]}${NOT_LOGGED_IN_WHOAMI_TIP}`, { telemetryMessage: "cfetch auth login required" });
|
|
79242
|
-
const credentials = requireApiToken$1();
|
|
79281
|
+
async function fetchAccountsPaged(complianceConfig, resource, credentials) {
|
|
79243
79282
|
const results = [];
|
|
79244
79283
|
let getMoreResults = true;
|
|
79245
79284
|
let page = 1;
|
|
@@ -79259,7 +79298,10 @@ Run \`${descriptor.commands.whoami}\` to check your current authentication statu
|
|
|
79259
79298
|
__name$1(fetchAccountsPaged, "fetchAccountsPaged");
|
|
79260
79299
|
async function fetchAllAccounts(complianceConfig, options = {}) {
|
|
79261
79300
|
const { throwOnEmpty = true } = options;
|
|
79262
|
-
const
|
|
79301
|
+
const loginResult = await loginOrRefreshIfRequired(complianceConfig);
|
|
79302
|
+
if (!loginResult.loggedIn) throw new UserError(`Not logged in. ${NOT_LOGGED_IN_ERROR_BODIES[loginResult.reason]}${NOT_LOGGED_IN_WHOAMI_TIP}`, { telemetryMessage: "cfetch auth login required" });
|
|
79303
|
+
const credentials = requireApiToken$1();
|
|
79304
|
+
const [accountsRes, membershipsRes] = await Promise.allSettled([fetchAccountsPaged(complianceConfig, `/accounts`, credentials), fetchAccountsPaged(complianceConfig, `/memberships`, credentials)]);
|
|
79263
79305
|
if (accountsRes.status === "rejected") throw accountsRes.reason;
|
|
79264
79306
|
if (membershipsRes.status === "rejected") if (isMembershipsInaccessible(membershipsRes.reason)) {
|
|
79265
79307
|
if (accountsRes.status === "fulfilled" && accountsRes.value.length > 0) return accountsRes.value;
|
|
@@ -79556,7 +79598,483 @@ function getCfConfigPath() {
|
|
|
79556
79598
|
});
|
|
79557
79599
|
}
|
|
79558
79600
|
__name$1(getCfConfigPath, "getCfConfigPath");
|
|
79559
|
-
var
|
|
79601
|
+
var CF_REGISTERED_SCOPES = [
|
|
79602
|
+
"access:read",
|
|
79603
|
+
"access:write",
|
|
79604
|
+
"account:read",
|
|
79605
|
+
"agw:read",
|
|
79606
|
+
"agw:run",
|
|
79607
|
+
"agw:write",
|
|
79608
|
+
"ai:read",
|
|
79609
|
+
"ai:write",
|
|
79610
|
+
"ai-search:read",
|
|
79611
|
+
"ai-search:run",
|
|
79612
|
+
"ai-search:write",
|
|
79613
|
+
"aiaudit:read",
|
|
79614
|
+
"aiaudit:write",
|
|
79615
|
+
"aig:read",
|
|
79616
|
+
"aig:write",
|
|
79617
|
+
"auditlogs:read",
|
|
79618
|
+
"billing:read",
|
|
79619
|
+
"billing:write",
|
|
79620
|
+
"browser:read",
|
|
79621
|
+
"browser:write",
|
|
79622
|
+
"cfone:read",
|
|
79623
|
+
"cfone:write",
|
|
79624
|
+
"cloudchamber:write",
|
|
79625
|
+
"connectivity:admin",
|
|
79626
|
+
"connectivity:bind",
|
|
79627
|
+
"connectivity:read",
|
|
79628
|
+
"constellation:write",
|
|
79629
|
+
"containers:write",
|
|
79630
|
+
"d1:write",
|
|
79631
|
+
"dex:read",
|
|
79632
|
+
"dex:write",
|
|
79633
|
+
"dns_analytics:read",
|
|
79634
|
+
"dns_records:edit",
|
|
79635
|
+
"dns_records:read",
|
|
79636
|
+
"dns_settings:read",
|
|
79637
|
+
"email_routing:read",
|
|
79638
|
+
"email_routing:write",
|
|
79639
|
+
"email_sending:read",
|
|
79640
|
+
"email_sending:write",
|
|
79641
|
+
"firstpartytags:write",
|
|
79642
|
+
"images:read",
|
|
79643
|
+
"images:write",
|
|
79644
|
+
"lb:edit",
|
|
79645
|
+
"lb:read",
|
|
79646
|
+
"logpush:read",
|
|
79647
|
+
"logpush:write",
|
|
79648
|
+
"mcp_portals:read",
|
|
79649
|
+
"mcp_portals:write",
|
|
79650
|
+
"notebook-examples:read",
|
|
79651
|
+
"notebook-managed:read",
|
|
79652
|
+
"notification:read",
|
|
79653
|
+
"notification:write",
|
|
79654
|
+
"oauth_account_ssl_and_certificates_write",
|
|
79655
|
+
"offline",
|
|
79656
|
+
"openid",
|
|
79657
|
+
"pages:read",
|
|
79658
|
+
"pages:write",
|
|
79659
|
+
"pipelines:read",
|
|
79660
|
+
"pipelines:setup",
|
|
79661
|
+
"pipelines:write",
|
|
79662
|
+
"query_cache:write",
|
|
79663
|
+
"queues:write",
|
|
79664
|
+
"r2_catalog:write",
|
|
79665
|
+
"radar:read",
|
|
79666
|
+
"rag:read",
|
|
79667
|
+
"rag:write",
|
|
79668
|
+
"registrar:read",
|
|
79669
|
+
"registrar:write",
|
|
79670
|
+
"secrets_store:read",
|
|
79671
|
+
"secrets_store:write",
|
|
79672
|
+
"sso-connector:read",
|
|
79673
|
+
"sso-connector:write",
|
|
79674
|
+
"ssl_certs:write",
|
|
79675
|
+
"teams:pii",
|
|
79676
|
+
"teams:read",
|
|
79677
|
+
"teams:secure_location",
|
|
79678
|
+
"teams:write",
|
|
79679
|
+
"url_scanner:read",
|
|
79680
|
+
"url_scanner:write",
|
|
79681
|
+
"user:read",
|
|
79682
|
+
"vectorize:write",
|
|
79683
|
+
"workers:read",
|
|
79684
|
+
"workers:write",
|
|
79685
|
+
"workers_builds:read",
|
|
79686
|
+
"workers_builds:write",
|
|
79687
|
+
"workers_deployments:read",
|
|
79688
|
+
"workers_kv:write",
|
|
79689
|
+
"workers_observability:read",
|
|
79690
|
+
"workers_observability:write",
|
|
79691
|
+
"workers_observability_telemetry:write",
|
|
79692
|
+
"workers_routes:write",
|
|
79693
|
+
"workers_scripts:write",
|
|
79694
|
+
"workers_tail:read",
|
|
79695
|
+
"zone:read",
|
|
79696
|
+
"account-analytics.read",
|
|
79697
|
+
"account-ssl-and-certificates.write",
|
|
79698
|
+
"ssl-and-certificates.read",
|
|
79699
|
+
"ssl-and-certificates.write",
|
|
79700
|
+
"registrar-domains.read",
|
|
79701
|
+
"registrar-domains.admin",
|
|
79702
|
+
"logs.read",
|
|
79703
|
+
"logs.write",
|
|
79704
|
+
"websearch.run",
|
|
79705
|
+
"snippets.read",
|
|
79706
|
+
"snippets.write",
|
|
79707
|
+
"access-acct.read",
|
|
79708
|
+
"access-acct.revoke",
|
|
79709
|
+
"access-acct.write",
|
|
79710
|
+
"access-app.read",
|
|
79711
|
+
"access-app.revoke",
|
|
79712
|
+
"access-app.write",
|
|
79713
|
+
"access-audit-log.read",
|
|
79714
|
+
"access-certificate.read",
|
|
79715
|
+
"access-certificate.write",
|
|
79716
|
+
"access-custom-page.read",
|
|
79717
|
+
"access-custom-page.write",
|
|
79718
|
+
"access-device-posture.read",
|
|
79719
|
+
"access-device-posture.write",
|
|
79720
|
+
"access-group.read",
|
|
79721
|
+
"access-group.write",
|
|
79722
|
+
"access-idp.read",
|
|
79723
|
+
"access-idp.write",
|
|
79724
|
+
"access-key.read",
|
|
79725
|
+
"access-key.write",
|
|
79726
|
+
"access-org.read",
|
|
79727
|
+
"access-org.revoke",
|
|
79728
|
+
"access-org.write",
|
|
79729
|
+
"access-policy-test.read",
|
|
79730
|
+
"access-policy-test.write",
|
|
79731
|
+
"access-policy.read",
|
|
79732
|
+
"access-policy.write",
|
|
79733
|
+
"access-population.read",
|
|
79734
|
+
"access-population.write",
|
|
79735
|
+
"access-saml-certificate.read",
|
|
79736
|
+
"access-saml-certificate.write",
|
|
79737
|
+
"access-scim-log.read",
|
|
79738
|
+
"access-seats.write",
|
|
79739
|
+
"access-service-token.read",
|
|
79740
|
+
"access-service-token.write",
|
|
79741
|
+
"access-ssh-auditing.read",
|
|
79742
|
+
"access-ssh-auditing.write",
|
|
79743
|
+
"access-tag.read",
|
|
79744
|
+
"access-tag.write",
|
|
79745
|
+
"access-users.read",
|
|
79746
|
+
"access-users.write",
|
|
79747
|
+
"access.read",
|
|
79748
|
+
"access.revoke",
|
|
79749
|
+
"access.write",
|
|
79750
|
+
"account-api-gateway.read",
|
|
79751
|
+
"account-api-gateway.write",
|
|
79752
|
+
"account-custom-asset.read",
|
|
79753
|
+
"account-custom-asset.write",
|
|
79754
|
+
"account-custom-error-rules.read",
|
|
79755
|
+
"account-custom-error-rules.write",
|
|
79756
|
+
"account-custom-pages.read",
|
|
79757
|
+
"account-custom-pages.write",
|
|
79758
|
+
"account-disable-esc.read",
|
|
79759
|
+
"account-disable-esc.write",
|
|
79760
|
+
"account-dns-settings.read",
|
|
79761
|
+
"account-dns-settings.write",
|
|
79762
|
+
"account-firewall-access-rules.read",
|
|
79763
|
+
"account-firewall-access-rules.write",
|
|
79764
|
+
"account-logs.read",
|
|
79765
|
+
"account-logs.write",
|
|
79766
|
+
"account-rule-lists.read",
|
|
79767
|
+
"account-rule-lists.write",
|
|
79768
|
+
"account-rulesets.read",
|
|
79769
|
+
"account-rulesets.write",
|
|
79770
|
+
"account-security-center-insights.read",
|
|
79771
|
+
"account-security-center-insights.write",
|
|
79772
|
+
"account-settings.read",
|
|
79773
|
+
"account-settings.write",
|
|
79774
|
+
"account-ssl-and-certificates.read",
|
|
79775
|
+
"account-waf.read",
|
|
79776
|
+
"account-waf.write",
|
|
79777
|
+
"account-waiting-rooms.read",
|
|
79778
|
+
"address-maps.read",
|
|
79779
|
+
"address-maps.write",
|
|
79780
|
+
"agent-memory.write",
|
|
79781
|
+
"agw.read",
|
|
79782
|
+
"agw.run",
|
|
79783
|
+
"agw.write",
|
|
79784
|
+
"ai-search.index",
|
|
79785
|
+
"ai-search.metadata_read",
|
|
79786
|
+
"ai-search.read",
|
|
79787
|
+
"ai-search.run",
|
|
79788
|
+
"ai-search.write",
|
|
79789
|
+
"ai.read",
|
|
79790
|
+
"ai.write",
|
|
79791
|
+
"aiaudit.read",
|
|
79792
|
+
"aiaudit.write",
|
|
79793
|
+
"aig.metadata_read",
|
|
79794
|
+
"aig.read",
|
|
79795
|
+
"aig.run",
|
|
79796
|
+
"aig.write",
|
|
79797
|
+
"analytics.read",
|
|
79798
|
+
"api-gateway.read",
|
|
79799
|
+
"api-gateway.write",
|
|
79800
|
+
"apps.write",
|
|
79801
|
+
"argotunnel.read",
|
|
79802
|
+
"argotunnel.write",
|
|
79803
|
+
"artifacts.read",
|
|
79804
|
+
"artifacts.write",
|
|
79805
|
+
"bot-management-feedback.read",
|
|
79806
|
+
"bot-management-feedback.write",
|
|
79807
|
+
"bot-management.read",
|
|
79808
|
+
"bot-management.write",
|
|
79809
|
+
"browser-rendering.read",
|
|
79810
|
+
"browser-rendering.write",
|
|
79811
|
+
"cache-settings.read",
|
|
79812
|
+
"cache-settings.write",
|
|
79813
|
+
"cache.purge",
|
|
79814
|
+
"calls.read",
|
|
79815
|
+
"calls.write",
|
|
79816
|
+
"casb.read",
|
|
79817
|
+
"casb.write",
|
|
79818
|
+
"cf-agents.read",
|
|
79819
|
+
"cf-agents.write",
|
|
79820
|
+
"challenge-widgets.read",
|
|
79821
|
+
"challenge-widgets.write",
|
|
79822
|
+
"chinanetwork-steering.read",
|
|
79823
|
+
"chinanetwork-steering.write",
|
|
79824
|
+
"cloud-connector.read",
|
|
79825
|
+
"cloud-connector.write",
|
|
79826
|
+
"cloud-email-security.read",
|
|
79827
|
+
"cloud-email-security.write",
|
|
79828
|
+
"cloudchamber.read",
|
|
79829
|
+
"cloudchamber.write",
|
|
79830
|
+
"cloudforce-one.read",
|
|
79831
|
+
"cloudforce-one.write",
|
|
79832
|
+
"config-settings.read",
|
|
79833
|
+
"config-settings.write",
|
|
79834
|
+
"connectivity-directory.admin",
|
|
79835
|
+
"connectivity-directory.bind",
|
|
79836
|
+
"connectivity-directory.read",
|
|
79837
|
+
"constellation.read",
|
|
79838
|
+
"constellation.write",
|
|
79839
|
+
"containers.read",
|
|
79840
|
+
"containers.write",
|
|
79841
|
+
"custom-errors.read",
|
|
79842
|
+
"custom-errors.write",
|
|
79843
|
+
"custom-pages.read",
|
|
79844
|
+
"custom-pages.write",
|
|
79845
|
+
"d1.metadata_read",
|
|
79846
|
+
"d1.read",
|
|
79847
|
+
"d1.write",
|
|
79848
|
+
"ddos-botnet-feed.read",
|
|
79849
|
+
"ddos-botnet-feed.write",
|
|
79850
|
+
"ddos-protection.read",
|
|
79851
|
+
"ddos-protection.write",
|
|
79852
|
+
"dls.read",
|
|
79853
|
+
"dls.write",
|
|
79854
|
+
"dns-firewall.read",
|
|
79855
|
+
"dns-firewall.write",
|
|
79856
|
+
"dns-view.read",
|
|
79857
|
+
"dns-view.write",
|
|
79858
|
+
"dns.read",
|
|
79859
|
+
"dns.write",
|
|
79860
|
+
"domain-page-shield.read",
|
|
79861
|
+
"domain-page.shield",
|
|
79862
|
+
"dynamic-redirect.read",
|
|
79863
|
+
"dynamic-redirect.write",
|
|
79864
|
+
"email-routing-account-rule.read",
|
|
79865
|
+
"email-routing-address.read",
|
|
79866
|
+
"email-routing-address.write",
|
|
79867
|
+
"email-routing-rule.read",
|
|
79868
|
+
"email-routing-rule.write",
|
|
79869
|
+
"email-routing-suppression.read",
|
|
79870
|
+
"email-routing-suppression.write",
|
|
79871
|
+
"email-security-dmarcreports.read",
|
|
79872
|
+
"email-security-dmarcreports.write",
|
|
79873
|
+
"email-sending.read",
|
|
79874
|
+
"email-sending.write",
|
|
79875
|
+
"fbm.admin",
|
|
79876
|
+
"fbm.read",
|
|
79877
|
+
"fbm.write",
|
|
79878
|
+
"field-extractor.read",
|
|
79879
|
+
"field-extractor.write",
|
|
79880
|
+
"firewall-for-ai.read",
|
|
79881
|
+
"firewall-for-ai.write",
|
|
79882
|
+
"firewall-services.read",
|
|
79883
|
+
"firewall-services.write",
|
|
79884
|
+
"flagship.evaluate",
|
|
79885
|
+
"flagship.read",
|
|
79886
|
+
"flagship.write",
|
|
79887
|
+
"fraud-detection-pii.read",
|
|
79888
|
+
"fraud-detection.read",
|
|
79889
|
+
"fraud-detection.write",
|
|
79890
|
+
"fraud-events.write",
|
|
79891
|
+
"fraud-feedback.read",
|
|
79892
|
+
"fraud-feedback.write",
|
|
79893
|
+
"healthcheck.read",
|
|
79894
|
+
"healthcheck.write",
|
|
79895
|
+
"http-applications.read",
|
|
79896
|
+
"http-applications.write",
|
|
79897
|
+
"http-ddos-managed-ruleset.read",
|
|
79898
|
+
"http-ddos-managed-ruleset.write",
|
|
79899
|
+
"images.metadata_read",
|
|
79900
|
+
"images.read",
|
|
79901
|
+
"images.write",
|
|
79902
|
+
"integration.write",
|
|
79903
|
+
"intel.read",
|
|
79904
|
+
"intel.write",
|
|
79905
|
+
"iot.read",
|
|
79906
|
+
"iot.write",
|
|
79907
|
+
"ip-prefix-bgp-on-demand.read",
|
|
79908
|
+
"ip-prefix-bgp-on-demand.write",
|
|
79909
|
+
"ip-prefix.read",
|
|
79910
|
+
"ip-prefix.write",
|
|
79911
|
+
"l4-ddos-managed-ruleset.read",
|
|
79912
|
+
"l4-ddos-managed-ruleset.write",
|
|
79913
|
+
"load-balancers-account.read",
|
|
79914
|
+
"load-balancers-account.write",
|
|
79915
|
+
"load-balancers.read",
|
|
79916
|
+
"load-balancers.write",
|
|
79917
|
+
"load-balancing-monitors-and-pools.read",
|
|
79918
|
+
"load-balancing-monitors-and-pools.write",
|
|
79919
|
+
"magic-firewall.read",
|
|
79920
|
+
"magic-firewall.write",
|
|
79921
|
+
"magic-transit.read",
|
|
79922
|
+
"magic-transit.write",
|
|
79923
|
+
"magic-wan.read",
|
|
79924
|
+
"magic-wan.write",
|
|
79925
|
+
"managed-headers.read",
|
|
79926
|
+
"managed-headers.write",
|
|
79927
|
+
"mass-url-redirects.read",
|
|
79928
|
+
"mass-url-redirects.write",
|
|
79929
|
+
"mcp-portals.read",
|
|
79930
|
+
"mcp-portals.write",
|
|
79931
|
+
"memberships.read",
|
|
79932
|
+
"memberships.write",
|
|
79933
|
+
"messaging.edit",
|
|
79934
|
+
"messaging.metadata_read",
|
|
79935
|
+
"messaging.read",
|
|
79936
|
+
"moq.read",
|
|
79937
|
+
"moq.write",
|
|
79938
|
+
"notifications.read",
|
|
79939
|
+
"notifications.write",
|
|
79940
|
+
"origin.read",
|
|
79941
|
+
"origin.write",
|
|
79942
|
+
"page-rules.read",
|
|
79943
|
+
"page-rules.write",
|
|
79944
|
+
"page-shield.read",
|
|
79945
|
+
"page.read",
|
|
79946
|
+
"page.shield",
|
|
79947
|
+
"page.write",
|
|
79948
|
+
"pages.metadata_read",
|
|
79949
|
+
"payments-gateway.read",
|
|
79950
|
+
"payments-gateway.write",
|
|
79951
|
+
"pcaps-api.read",
|
|
79952
|
+
"pcaps-api.write",
|
|
79953
|
+
"pipelines.read",
|
|
79954
|
+
"pipelines.send",
|
|
79955
|
+
"pipelines.write",
|
|
79956
|
+
"precursor.read",
|
|
79957
|
+
"precursor.write",
|
|
79958
|
+
"pubsub.read",
|
|
79959
|
+
"pubsub.write",
|
|
79960
|
+
"query-cache.read",
|
|
79961
|
+
"query-cache.write",
|
|
79962
|
+
"queues.metadata_read",
|
|
79963
|
+
"queues.read",
|
|
79964
|
+
"queues.write",
|
|
79965
|
+
"r2-catalog-sql.read",
|
|
79966
|
+
"r2-catalog.read",
|
|
79967
|
+
"r2-catalog.write",
|
|
79968
|
+
"radar.read",
|
|
79969
|
+
"rag.read",
|
|
79970
|
+
"rag.run",
|
|
79971
|
+
"rag.write",
|
|
79972
|
+
"realtime.admin",
|
|
79973
|
+
"realtime.read",
|
|
79974
|
+
"realtime.write",
|
|
79975
|
+
"registrar-sandbox-domains.admin",
|
|
79976
|
+
"registrar-sandbox-domains.read",
|
|
79977
|
+
"reports-application-security-report.read",
|
|
79978
|
+
"request-tracer.read",
|
|
79979
|
+
"resource-library.read",
|
|
79980
|
+
"resource-library.write",
|
|
79981
|
+
"resource-sharing.read",
|
|
79982
|
+
"response-compression.read",
|
|
79983
|
+
"response-compression.write",
|
|
79984
|
+
"sanitize.read",
|
|
79985
|
+
"sanitize.write",
|
|
79986
|
+
"secrets-store.read",
|
|
79987
|
+
"secrets-store.write",
|
|
79988
|
+
"select-configuration.read",
|
|
79989
|
+
"select-configuration.write",
|
|
79990
|
+
"stream.metadata_read",
|
|
79991
|
+
"stream.read",
|
|
79992
|
+
"stream.write",
|
|
79993
|
+
"tag.read",
|
|
79994
|
+
"tag.write",
|
|
79995
|
+
"teams-cds-compute-account.read",
|
|
79996
|
+
"teams-cds-compute-account.write",
|
|
79997
|
+
"teams-connector-cloudflared.monitoring",
|
|
79998
|
+
"teams-connector-cloudflared.read",
|
|
79999
|
+
"teams-connector-cloudflared.write",
|
|
80000
|
+
"teams-connector-warp.read",
|
|
80001
|
+
"teams-connector-warp.write",
|
|
80002
|
+
"teams-connectors.read",
|
|
80003
|
+
"teams-connectors.write",
|
|
80004
|
+
"teams-dex.read",
|
|
80005
|
+
"teams-dex.write",
|
|
80006
|
+
"teams-networks.read",
|
|
80007
|
+
"teams-networks.write",
|
|
80008
|
+
"teams-pii.read",
|
|
80009
|
+
"teams-resilience.read",
|
|
80010
|
+
"teams-resilience.write",
|
|
80011
|
+
"teams-secure.location",
|
|
80012
|
+
"teams.read",
|
|
80013
|
+
"teams.report",
|
|
80014
|
+
"teams.write",
|
|
80015
|
+
"transform-rules.read",
|
|
80016
|
+
"transform-rules.write",
|
|
80017
|
+
"trust-and-safety.read",
|
|
80018
|
+
"trust-and-safety.write",
|
|
80019
|
+
"url-scanner.read",
|
|
80020
|
+
"url-scanner.write",
|
|
80021
|
+
"user-details.read",
|
|
80022
|
+
"user-details.write",
|
|
80023
|
+
"vectorize.read",
|
|
80024
|
+
"vectorize.write",
|
|
80025
|
+
"waiting-rooms.read",
|
|
80026
|
+
"waiting-rooms.write",
|
|
80027
|
+
"web3-hostnames.read",
|
|
80028
|
+
"web3-hostnames.write",
|
|
80029
|
+
"websearch.metadata_read",
|
|
80030
|
+
"websearch.read",
|
|
80031
|
+
"websearch.write",
|
|
80032
|
+
"workers-ci.read",
|
|
80033
|
+
"workers-ci.write",
|
|
80034
|
+
"workers-kv-storage.metadata_read",
|
|
80035
|
+
"workers-kv-storage.read",
|
|
80036
|
+
"workers-kv-storage.write",
|
|
80037
|
+
"workers-observability-telemetry.write",
|
|
80038
|
+
"workers-observability.read",
|
|
80039
|
+
"workers-observability.write",
|
|
80040
|
+
"workers-r2-bucket-item.read",
|
|
80041
|
+
"workers-r2-bucket-item.write",
|
|
80042
|
+
"workers-r2.metadata_read",
|
|
80043
|
+
"workers-r2.read",
|
|
80044
|
+
"workers-r2.write",
|
|
80045
|
+
"workers-routes.read",
|
|
80046
|
+
"workers-routes.write",
|
|
80047
|
+
"workers-scripts.bind",
|
|
80048
|
+
"workers-scripts.read",
|
|
80049
|
+
"workers-scripts.write",
|
|
80050
|
+
"workers-tail.read",
|
|
80051
|
+
"workers_ai.metadata_read",
|
|
80052
|
+
"zaraz.edit",
|
|
80053
|
+
"zaraz.read",
|
|
80054
|
+
"zaraz.write",
|
|
80055
|
+
"zone-access.read",
|
|
80056
|
+
"zone-access.revoke",
|
|
80057
|
+
"zone-access.write",
|
|
80058
|
+
"zone-custom-asset.read",
|
|
80059
|
+
"zone-custom-asset.write",
|
|
80060
|
+
"zone-disable-esc.read",
|
|
80061
|
+
"zone-disable-esc.write",
|
|
80062
|
+
"zone-dns-settings.read",
|
|
80063
|
+
"zone-dns-settings.write",
|
|
80064
|
+
"zone-security-center-insights.read",
|
|
80065
|
+
"zone-security-center-insights.write",
|
|
80066
|
+
"zone-settings.read",
|
|
80067
|
+
"zone-settings.write",
|
|
80068
|
+
"zone-transform-rules.read",
|
|
80069
|
+
"zone-transform-rules.write",
|
|
80070
|
+
"zone-versioning.read",
|
|
80071
|
+
"zone-versioning.write",
|
|
80072
|
+
"zone-waf.read",
|
|
80073
|
+
"zone-waf.write",
|
|
80074
|
+
"zone.read",
|
|
80075
|
+
"zone.write"
|
|
80076
|
+
];
|
|
80077
|
+
var DefaultScopeKeys$1 = [...[
|
|
79560
80078
|
"openid",
|
|
79561
80079
|
"offline",
|
|
79562
80080
|
"user:read",
|
|
@@ -79645,13 +80163,12 @@ var CF_SCOPES = [
|
|
|
79645
80163
|
"workers_scripts:write",
|
|
79646
80164
|
"workers_tail:read",
|
|
79647
80165
|
"zone:read"
|
|
79648
|
-
];
|
|
79649
|
-
var DefaultScopeKeys$1 = [...CF_SCOPES];
|
|
80166
|
+
]];
|
|
79650
80167
|
function setLoginScopeKeys$1(scopes) {
|
|
79651
80168
|
DefaultScopeKeys$1 = scopes;
|
|
79652
80169
|
}
|
|
79653
80170
|
__name$1(setLoginScopeKeys$1, "setLoginScopeKeys");
|
|
79654
|
-
var CF_SCOPE_SET = new Set(
|
|
80171
|
+
var CF_SCOPE_SET = new Set(CF_REGISTERED_SCOPES);
|
|
79655
80172
|
function validateScopeKeys$1(scopes) {
|
|
79656
80173
|
return scopes.every((scope) => CF_SCOPE_SET.has(scope));
|
|
79657
80174
|
}
|
|
@@ -79680,12 +80197,13 @@ var CF_CLI = {
|
|
|
79680
80197
|
login: "cf auth login",
|
|
79681
80198
|
whoami: "cf auth whoami",
|
|
79682
80199
|
createProfile: "cf auth create",
|
|
79683
|
-
deviceLogin: "cf auth login
|
|
80200
|
+
deviceLogin: "cf auth login"
|
|
79684
80201
|
},
|
|
79685
80202
|
keyringServiceName: CF_KEYRING_SERVICE_NAME,
|
|
79686
80203
|
clientId: getClientIdFromEnv$1,
|
|
79687
80204
|
consent: CF_CONSENT_PAGES,
|
|
79688
80205
|
redirectUri: CF_OAUTH_CALLBACK_URL,
|
|
80206
|
+
useDeviceFlowByDefault: true,
|
|
79689
80207
|
allowGlobalAuthKey: false,
|
|
79690
80208
|
getConfigPath: getCfConfigPath,
|
|
79691
80209
|
getTemporaryAccountConfigPath: getCfTemporaryAccountConfigPath,
|
|
@@ -79740,7 +80258,6 @@ var DefaultScopes = {
|
|
|
79740
80258
|
"ai:write": "See and change Workers AI catalog and assets",
|
|
79741
80259
|
"ai-search:write": "See and change AI Search data",
|
|
79742
80260
|
"ai-search:run": "Run search queries on your AI Search instances",
|
|
79743
|
-
"websearch.run": "Run search queries against Cloudflare Web Search",
|
|
79744
80261
|
"agent-memory:write": "See and change Agent Memory data such as keys and namespaces.",
|
|
79745
80262
|
"queues:write": "See and change Cloudflare Queues settings and data",
|
|
79746
80263
|
"pipelines:write": "See and change Cloudflare Pipelines configurations and data",
|
|
@@ -79967,7 +80484,7 @@ var require_command_exists = /* @__PURE__ */ __commonJS$2({ "../../node_modules/
|
|
|
79967
80484
|
}) });
|
|
79968
80485
|
|
|
79969
80486
|
//#endregion
|
|
79970
|
-
//#region ../deploy-helpers/dist/chunk-
|
|
80487
|
+
//#region ../deploy-helpers/dist/chunk-QBZBEHZB.mjs
|
|
79971
80488
|
var import_undici$1 = require_undici();
|
|
79972
80489
|
var import_command_exists = require_command_exists();
|
|
79973
80490
|
function handleUnsafeCapnp(capnp) {
|
|
@@ -80044,7 +80561,6 @@ function createWorkerUploadForm(worker, bindings, options) {
|
|
|
80044
80561
|
const vectorize = extractBindingsOfType("vectorize", bindings);
|
|
80045
80562
|
const ai_search_namespaces = extractBindingsOfType("ai_search_namespace", bindings);
|
|
80046
80563
|
const ai_search = extractBindingsOfType("ai_search", bindings);
|
|
80047
|
-
const websearch = extractBindingsOfType("websearch", bindings)[0];
|
|
80048
80564
|
const agent_memory = extractBindingsOfType("agent_memory", bindings);
|
|
80049
80565
|
const hyperdrive = extractBindingsOfType("hyperdrive", bindings);
|
|
80050
80566
|
const secrets_store_secrets = extractBindingsOfType("secrets_store_secret", bindings);
|
|
@@ -80220,10 +80736,6 @@ function createWorkerUploadForm(worker, bindings, options) {
|
|
|
80220
80736
|
instance_name
|
|
80221
80737
|
});
|
|
80222
80738
|
});
|
|
80223
|
-
if (websearch !== void 0) metadataBindings.push({
|
|
80224
|
-
name: websearch.binding,
|
|
80225
|
-
type: "websearch"
|
|
80226
|
-
});
|
|
80227
80739
|
agent_memory.forEach(({ binding, namespace }) => {
|
|
80228
80740
|
if (options?.dryRun) namespace ??= INHERIT_SYMBOL;
|
|
80229
80741
|
if (namespace === void 0) throw new UserError(`${binding} bindings must have a "namespace" field. Add a "namespace" field to the binding in your Worker configuration specifying the namespace to bind to.`, { telemetryMessage: false });
|
|
@@ -80527,7 +81039,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
|
|
|
80527
81039
|
//#endregion
|
|
80528
81040
|
//#region ../remote-bindings/dist/index.mjs
|
|
80529
81041
|
var import_undici = require_undici();
|
|
80530
|
-
var version$2 = "0.0.
|
|
81042
|
+
var version$2 = "0.0.25";
|
|
80531
81043
|
var NoDefaultValueProvided = class extends UserError {
|
|
80532
81044
|
constructor() {
|
|
80533
81045
|
super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
|