@cloudflare/vite-plugin 1.60.1 → 1.60.2

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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as __toESM$1, c as __toESM$2, i as __require$2, n as __export, o as __commonJS$3, r as __name$6, s as __require$3, t as __commonJS$2 } from "./chunk-Q72B4Q5Z-izl5Qmnx.mjs";
1
+ import { a as __toESM$1, i as __require$2, n as __export, r as __name$6, t as __commonJS$2 } from "./chunk-U6NEESU5-BzWFpRaS.mjs";
2
2
  import * as nodeModule from "node:module";
3
3
  import { builtinModules, createRequire } from "node:module";
4
4
  import * as fs$1 from "node:fs";
@@ -41,7 +41,35 @@ import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$
41
41
  import { fileURLToPath as fileURLToPath$1 } from "url";
42
42
  import { createRequire as createRequire$1 } from "module";
43
43
 
44
- //#region ../workers-utils/dist/chunk-OWXQB7GP.mjs
44
+ //#region rolldown:runtime
45
+ var __create$1 = Object.create;
46
+ var __defProp$6 = Object.defineProperty;
47
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
48
+ var __getOwnPropNames$2 = Object.getOwnPropertyNames;
49
+ var __getProtoOf$1 = Object.getPrototypeOf;
50
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
51
+ var __commonJS$3 = (cb, mod$1) => function() {
52
+ return mod$1 || (0, cb[__getOwnPropNames$2(cb)[0]])((mod$1 = { exports: {} }).exports, mod$1), mod$1.exports;
53
+ };
54
+ var __copyProps$1 = (to, from, except, desc) => {
55
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$2(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
56
+ key = keys[i$1];
57
+ if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$6(to, key, {
58
+ get: ((k) => from[k]).bind(null, key),
59
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
60
+ });
61
+ }
62
+ return to;
63
+ };
64
+ var __toESM$2 = (mod$1, isNodeMode, target$1) => (target$1 = mod$1 != null ? __create$1(__getProtoOf$1(mod$1)) : {}, __copyProps$1(isNodeMode || !mod$1 || !mod$1.__esModule ? __defProp$6(target$1, "default", {
65
+ value: mod$1,
66
+ enumerable: true
67
+ }) : target$1, mod$1));
68
+ var __require$3 = /* @__PURE__ */ createRequire(import.meta.url);
69
+
70
+ //#endregion
71
+ //#region ../workers-utils/dist/chunk-PWC7WAOU.mjs
72
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
45
73
  var external_exports$1 = {};
46
74
  __export(external_exports$1, {
47
75
  $brand: () => $brand,
@@ -13765,7 +13793,8 @@ function formatZodError(error51) {
13765
13793
  __name$6(formatZodError, "formatZodError");
13766
13794
 
13767
13795
  //#endregion
13768
- //#region ../workers-utils/dist/chunk-MCNIGVAF.mjs
13796
+ //#region ../workers-utils/dist/chunk-M3RITKR3.mjs
13797
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13769
13798
  function dedent$1(templ) {
13770
13799
  var values = [];
13771
13800
  for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
@@ -13802,7 +13831,8 @@ __name$6(dedent$1, "dedent");
13802
13831
  var esm_default$1 = dedent$1;
13803
13832
 
13804
13833
  //#endregion
13805
- //#region ../workers-utils/dist/chunk-WO2IAW6M.mjs
13834
+ //#region ../workers-utils/dist/chunk-OWPFSLY6.mjs
13835
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13806
13836
  var UserError = class extends Error {
13807
13837
  static {
13808
13838
  __name$6(this, "UserError");
@@ -13860,7 +13890,8 @@ function createFatalError$1(message, isJson, options) {
13860
13890
  __name$6(createFatalError$1, "createFatalError");
13861
13891
 
13862
13892
  //#endregion
13863
- //#region ../workers-utils/dist/chunk-FLRJ77A6.mjs
13893
+ //#region ../workers-utils/dist/chunk-AUSY7DKT.mjs
13894
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13864
13895
  function hasKnownExportType(entry) {
13865
13896
  const type = entry?.type;
13866
13897
  return type === "durable-object" || type === "worker" || type === "workflow";
@@ -16365,296 +16396,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
16365
16396
  __name$6(formatConfigSnippet, "formatConfigSnippet");
16366
16397
 
16367
16398
  //#endregion
16368
- //#region ../workers-utils/dist/chunk-DKSA7K25.mjs
16369
- var DEFAULT_COMPAT_DATE = "2026-09-23";
16370
- function assertNever(_value) {}
16371
- __name$6(assertNever, "assertNever");
16372
- function mapWorkerMetadataBindings(bindings) {
16373
- return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
16374
- switch (binding.type) {
16375
- case "plain_text":
16376
- configObj.vars = {
16377
- ...configObj.vars ?? {},
16378
- [binding.name]: binding.text
16379
- };
16380
- break;
16381
- case "json":
16382
- configObj.vars = {
16383
- ...configObj.vars ?? {},
16384
- [binding.name]: binding.json
16385
- };
16386
- break;
16387
- case "kv_namespace":
16388
- configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
16389
- id: binding.namespace_id,
16390
- binding: binding.name
16391
- }];
16392
- break;
16393
- case "durable_object_namespace":
16394
- configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
16395
- name: binding.name,
16396
- class_name: binding.class_name,
16397
- script_name: binding.script_name,
16398
- environment: binding.environment
16399
- }] };
16400
- break;
16401
- case "d1":
16402
- configObj.d1_databases = [...configObj.d1_databases ?? [], {
16403
- binding: binding.name,
16404
- database_id: binding.id
16405
- }];
16406
- break;
16407
- case "browser":
16408
- configObj.browser = { binding: binding.name };
16409
- break;
16410
- case "ai":
16411
- configObj.ai = { binding: binding.name };
16412
- break;
16413
- case "images":
16414
- configObj.images = { binding: binding.name };
16415
- break;
16416
- case "stream":
16417
- configObj.stream = { binding: binding.name };
16418
- break;
16419
- case "media":
16420
- configObj.media = { binding: binding.name };
16421
- break;
16422
- case "r2_bucket":
16423
- configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
16424
- binding: binding.name,
16425
- bucket_name: binding.bucket_name,
16426
- jurisdiction: binding.jurisdiction
16427
- }];
16428
- break;
16429
- case "secrets_store_secret":
16430
- configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
16431
- binding: binding.name,
16432
- store_id: binding.store_id,
16433
- secret_name: binding.secret_name
16434
- }];
16435
- break;
16436
- case "artifacts":
16437
- configObj.artifacts = [...configObj.artifacts ?? [], {
16438
- binding: binding.name,
16439
- namespace: binding.namespace
16440
- }];
16441
- break;
16442
- case "unsafe_hello_world":
16443
- configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
16444
- binding: binding.name,
16445
- enable_timer: binding.enable_timer
16446
- }];
16447
- break;
16448
- case "flagship":
16449
- configObj.flagship = [...configObj.flagship ?? [], {
16450
- binding: binding.name,
16451
- app_id: binding.app_id
16452
- }];
16453
- break;
16454
- case "service":
16455
- configObj.services = [...configObj.services ?? [], {
16456
- binding: binding.name,
16457
- service: binding.service,
16458
- environment: binding.environment,
16459
- entrypoint: binding.entrypoint
16460
- }];
16461
- break;
16462
- case "analytics_engine":
16463
- configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
16464
- binding: binding.name,
16465
- dataset: binding.dataset
16466
- }];
16467
- break;
16468
- case "dispatch_namespace":
16469
- configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
16470
- binding: binding.name,
16471
- namespace: binding.namespace,
16472
- ...binding.outbound && { outbound: {
16473
- service: binding.outbound.worker.service,
16474
- environment: binding.outbound.worker.environment,
16475
- parameters: binding.outbound.params?.map((p$2) => p$2.name) ?? []
16476
- } }
16477
- }];
16478
- break;
16479
- case "logfwdr":
16480
- configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
16481
- name: binding.name,
16482
- destination: binding.destination
16483
- }] };
16484
- break;
16485
- case "wasm_module":
16486
- configObj.wasm_modules = {
16487
- ...configObj.wasm_modules ?? {},
16488
- [binding.name]: binding.part
16489
- };
16490
- break;
16491
- case "text_blob":
16492
- configObj.text_blobs = {
16493
- ...configObj.text_blobs ?? {},
16494
- [binding.name]: binding.part
16495
- };
16496
- break;
16497
- case "data_blob":
16498
- configObj.data_blobs = {
16499
- ...configObj.data_blobs ?? {},
16500
- [binding.name]: binding.part
16501
- };
16502
- break;
16503
- case "secret_text": break;
16504
- case "version_metadata":
16505
- configObj.version_metadata = { binding: binding.name };
16506
- break;
16507
- case "send_email":
16508
- configObj.send_email = [...configObj.send_email ?? [], {
16509
- name: binding.name,
16510
- destination_address: binding.destination_address,
16511
- allowed_destination_addresses: binding.allowed_destination_addresses,
16512
- allowed_sender_addresses: binding.allowed_sender_addresses
16513
- }];
16514
- break;
16515
- case "queue":
16516
- configObj.queues ??= { producers: [] };
16517
- configObj.queues.producers = [...configObj.queues.producers ?? [], {
16518
- binding: binding.name,
16519
- queue: binding.queue_name,
16520
- delivery_delay: binding.delivery_delay
16521
- }];
16522
- break;
16523
- case "vectorize":
16524
- configObj.vectorize = [...configObj.vectorize ?? [], {
16525
- binding: binding.name,
16526
- index_name: binding.index_name
16527
- }];
16528
- break;
16529
- case "ai_search_namespace":
16530
- configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
16531
- binding: binding.name,
16532
- namespace: binding.namespace
16533
- }];
16534
- break;
16535
- case "ai_search":
16536
- configObj.ai_search = [...configObj.ai_search ?? [], {
16537
- binding: binding.name,
16538
- instance_name: binding.instance_name
16539
- }];
16540
- break;
16541
- case "agent_memory":
16542
- configObj.agent_memory = [...configObj.agent_memory ?? [], {
16543
- binding: binding.name,
16544
- namespace: binding.namespace
16545
- }];
16546
- break;
16547
- case "hyperdrive":
16548
- configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
16549
- binding: binding.name,
16550
- id: binding.id
16551
- }];
16552
- break;
16553
- case "mtls_certificate":
16554
- configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
16555
- binding: binding.name,
16556
- certificate_id: binding.certificate_id
16557
- }];
16558
- break;
16559
- case "pipelines":
16560
- configObj.pipelines = [...configObj.pipelines ?? [], {
16561
- binding: binding.name,
16562
- ...binding.stream && { stream: binding.stream },
16563
- ...binding.pipeline && { pipeline: binding.pipeline }
16564
- }];
16565
- break;
16566
- case "assets":
16567
- configObj.assets = { binding: binding.name };
16568
- break;
16569
- case "inherit":
16570
- configObj.unsafe = {
16571
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16572
- metadata: configObj.unsafe?.metadata ?? void 0
16573
- };
16574
- break;
16575
- case "workflow":
16576
- configObj.workflows = [...configObj.workflows ?? [], {
16577
- binding: binding.name,
16578
- name: binding.workflow_name,
16579
- class_name: binding.class_name,
16580
- script_name: binding.script_name
16581
- }];
16582
- break;
16583
- case "worker_loader":
16584
- configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
16585
- break;
16586
- case "ratelimit":
16587
- configObj.ratelimits = [...configObj.ratelimits ?? [], {
16588
- name: binding.name,
16589
- namespace_id: binding.namespace_id,
16590
- simple: {
16591
- limit: binding.simple.limit,
16592
- period: binding.simple.period
16593
- }
16594
- }];
16595
- break;
16596
- case "vpc_service":
16597
- configObj.vpc_services = [...configObj.vpc_services ?? [], {
16598
- binding: binding.name,
16599
- service_id: binding.service_id
16600
- }];
16601
- break;
16602
- case "vpc_network":
16603
- if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16604
- binding: binding.name,
16605
- tunnel_id: binding.tunnel_id
16606
- }];
16607
- else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16608
- binding: binding.name,
16609
- network_id: binding.network_id
16610
- }];
16611
- break;
16612
- default: configObj.unsafe = {
16613
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16614
- metadata: configObj.unsafe?.metadata ?? void 0
16615
- };
16616
- }
16617
- return configObj;
16618
- }, {});
16619
- }
16620
- __name$6(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
16621
- function constructWranglerConfig(config$2) {
16622
- const mappedBindings = mapWorkerMetadataBindings(config$2.bindings);
16623
- const durableObjectClassNames = config$2.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$2.name).map((durableObject) => durableObject.class_name);
16624
- const allRoutes = [...config$2.routes.map((r$1) => ({
16625
- pattern: r$1.pattern,
16626
- zone_name: r$1.zone_name
16627
- })), ...config$2.domains.map((c$1) => ({
16628
- pattern: c$1.hostname,
16629
- zone_name: c$1.zone_name,
16630
- custom_domain: true,
16631
- enabled: c$1.enabled,
16632
- previews_enabled: c$1.previews_enabled
16633
- }))];
16634
- return {
16635
- name: config$2.name,
16636
- main: config$2.entrypoint,
16637
- workers_dev: config$2.subdomain.enabled,
16638
- preview_urls: config$2.subdomain.previews_enabled,
16639
- compatibility_date: config$2.compatibility_date ?? DEFAULT_COMPAT_DATE,
16640
- compatibility_flags: config$2.compatibility_flags,
16641
- ...allRoutes.length ? { routes: allRoutes } : {},
16642
- placement: config$2.placement?.mode === "smart" ? { mode: "smart" } : void 0,
16643
- limits: config$2.limits,
16644
- ...durableObjectClassNames.length && config$2.migration_tag ? { migrations: [{
16645
- tag: config$2.migration_tag,
16646
- new_classes: durableObjectClassNames
16647
- }] } : {},
16648
- ...config$2.schedules.length ? { triggers: { crons: config$2.schedules.map((scheduled) => scheduled.cron) } } : {},
16649
- tail_consumers: config$2.tail_consumers ?? void 0,
16650
- observability: config$2.observability,
16651
- ...mappedBindings
16652
- };
16653
- }
16654
- __name$6(constructWranglerConfig, "constructWranglerConfig");
16655
-
16656
- //#endregion
16657
- //#region ../workers-utils/dist/chunk-3IYLA2JH.mjs
16399
+ //#region ../workers-utils/dist/chunk-QSRIB43D.mjs
16400
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16658
16401
  function getBooleanEnvironmentVariableFactory(options) {
16659
16402
  return () => {
16660
16403
  if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
@@ -16698,7 +16441,8 @@ var getDockerPath$1 = getEnvironmentVariableFactory({
16698
16441
  });
16699
16442
 
16700
16443
  //#endregion
16701
- //#region ../workers-utils/dist/chunk-53IMCORZ.mjs
16444
+ //#region ../workers-utils/dist/chunk-MIA26B4M.mjs
16445
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16702
16446
  function isDirectory(path$2) {
16703
16447
  return fs2.statSync(path$2, { throwIfNoEntry: false })?.isDirectory() ?? false;
16704
16448
  }
@@ -16725,7 +16469,8 @@ function removeDirSync$1(dirPath) {
16725
16469
  __name$6(removeDirSync$1, "removeDirSync");
16726
16470
 
16727
16471
  //#endregion
16728
- //#region ../workers-utils/dist/chunk-34VZWBGB.mjs
16472
+ //#region ../workers-utils/dist/chunk-MV2OJK3L.mjs
16473
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16729
16474
  function isWindows() {
16730
16475
  return /^win/i.test(process.platform);
16731
16476
  }
@@ -16856,7 +16601,8 @@ function getGlobalWranglerCachePath() {
16856
16601
  __name$6(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
16857
16602
 
16858
16603
  //#endregion
16859
- //#region ../workers-utils/dist/chunk-IYSONYTF.mjs
16604
+ //#region ../workers-utils/dist/chunk-FR75DWDU.mjs
16605
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16860
16606
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
16861
16607
  variableName: "WRANGLER_C3_COMMAND",
16862
16608
  defaultValue: /* @__PURE__ */ __name$6(() => "create cloudflare", "defaultValue")
@@ -39703,6 +39449,7 @@ var require_undici = /* @__PURE__ */ __commonJS$3({ "../../node_modules/.pnpm/un
39703
39449
  //#endregion
39704
39450
  //#region ../workers-utils/dist/index.mjs
39705
39451
  var import_undici$3 = require_undici();
39452
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
39706
39453
  var require_vendors$1 = __commonJS$2({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$1, module$1) {
39707
39454
  module$1.exports = [
39708
39455
  {
@@ -42632,7 +42379,13 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
42632
42379
  vars: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vars", validateVars(envName), {}),
42633
42380
  secrets: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "secrets", validateSecrets(envName), void 0),
42634
42381
  define: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "define", validateDefines(envName), {}),
42635
- durable_objects: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateBindingsProperty(envName, validateDurableObjectBinding), { bindings: [] }),
42382
+ durable_objects: (() => {
42383
+ const durableObjects = notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateDurableObjectsProperty(envName, true), { bindings: [] });
42384
+ return {
42385
+ ...durableObjects,
42386
+ bindings: durableObjects.bindings ?? []
42387
+ };
42388
+ })(),
42636
42389
  workflows: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "workflows", all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty), []),
42637
42390
  migrations: inheritable(diagnostics, topLevelEnv, rawEnv, "migrations", validateMigrations, []),
42638
42391
  exports: inheritable(diagnostics, topLevelEnv, rawEnv, "exports", validateExports, {}),
@@ -42894,6 +42647,48 @@ Please add a binding for each to "${fieldPath}.bindings":
42894
42647
  }
42895
42648
  return isValid;
42896
42649
  }, "validateBindingsProperty");
42650
+ var DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS = 1440 * 60;
42651
+ var MILLISECOND_PRECISION_TOLERANCE = 1e-6;
42652
+ var validateDurableObjectsProperty = /* @__PURE__ */ __name$6((envName, allowMissingBindings = false, allowCodeUpdateStrategy = true) => (diagnostics, field, value, config$2) => {
42653
+ const fieldPath = config$2 === void 0 ? `${field}` : `env.${envName}.${field}`;
42654
+ if (value === void 0) return true;
42655
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
42656
+ diagnostics.errors.push(`The field "${fieldPath}" should be an object but got ${JSON.stringify(value)}.`);
42657
+ return false;
42658
+ }
42659
+ validateAdditionalProperties(diagnostics, fieldPath, Object.keys(value), allowCodeUpdateStrategy ? ["bindings", "code_update_strategy"] : ["bindings"]);
42660
+ const bindingsContainer = allowMissingBindings && !hasProperty(value, "bindings") ? {
42661
+ ...value,
42662
+ bindings: []
42663
+ } : value;
42664
+ let isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, field, bindingsContainer, config$2);
42665
+ if (!allowCodeUpdateStrategy) return isValid;
42666
+ if (!hasProperty(value, "code_update_strategy") || value.code_update_strategy === void 0) return isValid;
42667
+ const strategy = value.code_update_strategy;
42668
+ const strategyPath = `${fieldPath}.code_update_strategy`;
42669
+ if (typeof strategy !== "object" || strategy === null || Array.isArray(strategy)) {
42670
+ diagnostics.errors.push(`The field "${strategyPath}" should be an object but got ${JSON.stringify(strategy)}.`);
42671
+ return false;
42672
+ }
42673
+ validateAdditionalProperties(diagnostics, strategyPath, Object.keys(strategy), ["mode", "max_delay"]);
42674
+ isValid = validateRequiredProperty(diagnostics, strategyPath, "mode", hasProperty(strategy, "mode") ? strategy.mode : void 0, "string", ["immediate", "deferred"]) && isValid;
42675
+ const maxDelay = hasProperty(strategy, "max_delay") ? strategy.max_delay : void 0;
42676
+ const maxDelayHasValidType = validateOptionalProperty(diagnostics, strategyPath, "max_delay", maxDelay, "number");
42677
+ isValid = maxDelayHasValidType && isValid;
42678
+ if (maxDelayHasValidType && typeof maxDelay === "number" && (!Number.isFinite(maxDelay) || maxDelay < 0 || maxDelay > DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS)) {
42679
+ diagnostics.errors.push(`Expected "${strategyPath}.max_delay" to be between 0 and ${DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS} seconds but got ${JSON.stringify(maxDelay)}.`);
42680
+ isValid = false;
42681
+ }
42682
+ if (maxDelayHasValidType && typeof maxDelay === "number" && Number.isFinite(maxDelay) && maxDelay >= 0 && maxDelay <= DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS) {
42683
+ const milliseconds = maxDelay * 1e3;
42684
+ const roundedMilliseconds = Math.round(milliseconds);
42685
+ if (maxDelay > 0 && roundedMilliseconds === 0 || Math.abs(milliseconds - roundedMilliseconds) > MILLISECOND_PRECISION_TOLERANCE) {
42686
+ diagnostics.errors.push(`Expected "${strategyPath}.max_delay" to use millisecond precision but got ${JSON.stringify(maxDelay)}.`);
42687
+ isValid = false;
42688
+ }
42689
+ }
42690
+ return isValid;
42691
+ }, "validateDurableObjectsProperty");
42897
42692
  var validateUnsafeSettings = /* @__PURE__ */ __name$6((envName) => (diagnostics, field, value, config$2) => {
42898
42693
  const fieldPath = config$2 === void 0 ? `${field}` : `env.${envName}.${field}`;
42899
42694
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -44557,7 +44352,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$6((envName, configPath) => (
44557
44352
  isValid = validateVars(envName)(diagnostics, `${field}.vars`, previews.vars, void 0) && isValid;
44558
44353
  isValid = validateDefines(envName)(diagnostics, `${field}.define`, previews.define, void 0) && isValid;
44559
44354
  normalizeAndValidatePlacement(diagnostics, void 0, previews, `${field}.placement`);
44560
- isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44355
+ isValid = validateDurableObjectsProperty(envName, false, false)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44561
44356
  isValid = all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty)(diagnostics, `${field}.workflows`, previews.workflows, void 0) && isValid;
44562
44357
  isValid = validateBindingArray(envName, validateKVBinding)(diagnostics, `${field}.kv_namespaces`, previews.kv_namespaces, void 0) && isValid;
44563
44358
  isValid = validateBindingArray(envName, validateSendEmailBinding)(diagnostics, `${field}.send_email`, previews.send_email, void 0) && isValid;
@@ -45137,6 +44932,8 @@ function isDockerfile(imagePath, configPath) {
45137
44932
  return false;
45138
44933
  }
45139
44934
  __name$6(isDockerfile, "isDockerfile");
44935
+ function assertNever(_value) {}
44936
+ __name$6(assertNever, "assertNever");
45140
44937
  var BINDING_LOCAL_SUPPORT = {
45141
44938
  plain_text: "local-only",
45142
44939
  secret_text: "local-only",
@@ -45186,8 +44983,7 @@ function getBindingLocalSupport(type) {
45186
44983
  }
45187
44984
  __name$6(getBindingLocalSupport, "getBindingLocalSupport");
45188
44985
  function validateBindingRemoteSetting(type, remote, warn) {
45189
- const support = getBindingLocalSupport(type);
45190
- switch (support) {
44986
+ switch (getBindingLocalSupport(type)) {
45191
44987
  case "local-and-remote": return;
45192
44988
  case "local-only":
45193
44989
  if (remote === true) throw new UserError(`${getBindingTypeFriendlyName(type)} bindings do not support accessing remote resources.`, { telemetryMessage: "utils bindings unsupported remote resources" });
@@ -45200,7 +44996,6 @@ function validateBindingRemoteSetting(type, remote, warn) {
45200
44996
  if (remote === false) throw new UserError(`${getBindingTypeFriendlyName(type)} bindings do not support local development. You can set \`remote: true\` for the binding definition in your configuration file to access a remote version of the resource.`, { telemetryMessage: "utils bindings unsupported local development always remote" });
45201
44997
  if (remote === void 0) warn(`${getBindingTypeFriendlyName(type)} bindings always access remote resources, and so may incur usage charges even in local dev. To suppress this warning, set \`remote: true\` for the binding definition in your configuration file.`);
45202
44998
  return;
45203
- default: assertNever(support);
45204
44999
  }
45205
45000
  }
45206
45001
  __name$6(validateBindingRemoteSetting, "validateBindingRemoteSetting");
@@ -45332,6 +45127,290 @@ function findFileUp(name, startDir, lastDir) {
45332
45127
  }
45333
45128
  }
45334
45129
  __name$6(findFileUp, "findFileUp");
45130
+ function mapWorkerMetadataBindings(bindings) {
45131
+ return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
45132
+ switch (binding.type) {
45133
+ case "plain_text":
45134
+ configObj.vars = {
45135
+ ...configObj.vars ?? {},
45136
+ [binding.name]: binding.text
45137
+ };
45138
+ break;
45139
+ case "json":
45140
+ configObj.vars = {
45141
+ ...configObj.vars ?? {},
45142
+ [binding.name]: binding.json
45143
+ };
45144
+ break;
45145
+ case "kv_namespace":
45146
+ configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
45147
+ id: binding.namespace_id,
45148
+ binding: binding.name
45149
+ }];
45150
+ break;
45151
+ case "durable_object_namespace":
45152
+ configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
45153
+ name: binding.name,
45154
+ class_name: binding.class_name,
45155
+ script_name: binding.script_name,
45156
+ environment: binding.environment
45157
+ }] };
45158
+ break;
45159
+ case "d1":
45160
+ configObj.d1_databases = [...configObj.d1_databases ?? [], {
45161
+ binding: binding.name,
45162
+ database_id: binding.id
45163
+ }];
45164
+ break;
45165
+ case "browser":
45166
+ configObj.browser = { binding: binding.name };
45167
+ break;
45168
+ case "ai":
45169
+ configObj.ai = { binding: binding.name };
45170
+ break;
45171
+ case "images":
45172
+ configObj.images = { binding: binding.name };
45173
+ break;
45174
+ case "stream":
45175
+ configObj.stream = { binding: binding.name };
45176
+ break;
45177
+ case "media":
45178
+ configObj.media = { binding: binding.name };
45179
+ break;
45180
+ case "r2_bucket":
45181
+ configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
45182
+ binding: binding.name,
45183
+ bucket_name: binding.bucket_name,
45184
+ jurisdiction: binding.jurisdiction
45185
+ }];
45186
+ break;
45187
+ case "secrets_store_secret":
45188
+ configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
45189
+ binding: binding.name,
45190
+ store_id: binding.store_id,
45191
+ secret_name: binding.secret_name
45192
+ }];
45193
+ break;
45194
+ case "artifacts":
45195
+ configObj.artifacts = [...configObj.artifacts ?? [], {
45196
+ binding: binding.name,
45197
+ namespace: binding.namespace
45198
+ }];
45199
+ break;
45200
+ case "unsafe_hello_world":
45201
+ configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
45202
+ binding: binding.name,
45203
+ enable_timer: binding.enable_timer
45204
+ }];
45205
+ break;
45206
+ case "flagship":
45207
+ configObj.flagship = [...configObj.flagship ?? [], {
45208
+ binding: binding.name,
45209
+ app_id: binding.app_id
45210
+ }];
45211
+ break;
45212
+ case "service":
45213
+ configObj.services = [...configObj.services ?? [], {
45214
+ binding: binding.name,
45215
+ service: binding.service,
45216
+ environment: binding.environment,
45217
+ entrypoint: binding.entrypoint
45218
+ }];
45219
+ break;
45220
+ case "analytics_engine":
45221
+ configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
45222
+ binding: binding.name,
45223
+ dataset: binding.dataset
45224
+ }];
45225
+ break;
45226
+ case "dispatch_namespace":
45227
+ configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
45228
+ binding: binding.name,
45229
+ namespace: binding.namespace,
45230
+ ...binding.outbound && { outbound: {
45231
+ service: binding.outbound.worker.service,
45232
+ environment: binding.outbound.worker.environment,
45233
+ parameters: binding.outbound.params?.map((p$2) => p$2.name) ?? []
45234
+ } }
45235
+ }];
45236
+ break;
45237
+ case "logfwdr":
45238
+ configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
45239
+ name: binding.name,
45240
+ destination: binding.destination
45241
+ }] };
45242
+ break;
45243
+ case "wasm_module":
45244
+ configObj.wasm_modules = {
45245
+ ...configObj.wasm_modules ?? {},
45246
+ [binding.name]: binding.part
45247
+ };
45248
+ break;
45249
+ case "text_blob":
45250
+ configObj.text_blobs = {
45251
+ ...configObj.text_blobs ?? {},
45252
+ [binding.name]: binding.part
45253
+ };
45254
+ break;
45255
+ case "data_blob":
45256
+ configObj.data_blobs = {
45257
+ ...configObj.data_blobs ?? {},
45258
+ [binding.name]: binding.part
45259
+ };
45260
+ break;
45261
+ case "secret_text": break;
45262
+ case "version_metadata":
45263
+ configObj.version_metadata = { binding: binding.name };
45264
+ break;
45265
+ case "send_email":
45266
+ configObj.send_email = [...configObj.send_email ?? [], {
45267
+ name: binding.name,
45268
+ destination_address: binding.destination_address,
45269
+ allowed_destination_addresses: binding.allowed_destination_addresses,
45270
+ allowed_sender_addresses: binding.allowed_sender_addresses
45271
+ }];
45272
+ break;
45273
+ case "queue":
45274
+ configObj.queues ??= { producers: [] };
45275
+ configObj.queues.producers = [...configObj.queues.producers ?? [], {
45276
+ binding: binding.name,
45277
+ queue: binding.queue_name,
45278
+ delivery_delay: binding.delivery_delay
45279
+ }];
45280
+ break;
45281
+ case "vectorize":
45282
+ configObj.vectorize = [...configObj.vectorize ?? [], {
45283
+ binding: binding.name,
45284
+ index_name: binding.index_name
45285
+ }];
45286
+ break;
45287
+ case "ai_search_namespace":
45288
+ configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
45289
+ binding: binding.name,
45290
+ namespace: binding.namespace
45291
+ }];
45292
+ break;
45293
+ case "ai_search":
45294
+ configObj.ai_search = [...configObj.ai_search ?? [], {
45295
+ binding: binding.name,
45296
+ instance_name: binding.instance_name
45297
+ }];
45298
+ break;
45299
+ case "agent_memory":
45300
+ configObj.agent_memory = [...configObj.agent_memory ?? [], {
45301
+ binding: binding.name,
45302
+ namespace: binding.namespace
45303
+ }];
45304
+ break;
45305
+ case "hyperdrive":
45306
+ configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
45307
+ binding: binding.name,
45308
+ id: binding.id
45309
+ }];
45310
+ break;
45311
+ case "mtls_certificate":
45312
+ configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
45313
+ binding: binding.name,
45314
+ certificate_id: binding.certificate_id
45315
+ }];
45316
+ break;
45317
+ case "pipelines":
45318
+ configObj.pipelines = [...configObj.pipelines ?? [], {
45319
+ binding: binding.name,
45320
+ ...binding.stream && { stream: binding.stream },
45321
+ ...binding.pipeline && { pipeline: binding.pipeline }
45322
+ }];
45323
+ break;
45324
+ case "assets":
45325
+ configObj.assets = { binding: binding.name };
45326
+ break;
45327
+ case "inherit":
45328
+ configObj.unsafe = {
45329
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45330
+ metadata: configObj.unsafe?.metadata ?? void 0
45331
+ };
45332
+ break;
45333
+ case "workflow":
45334
+ configObj.workflows = [...configObj.workflows ?? [], {
45335
+ binding: binding.name,
45336
+ name: binding.workflow_name,
45337
+ class_name: binding.class_name,
45338
+ script_name: binding.script_name
45339
+ }];
45340
+ break;
45341
+ case "worker_loader":
45342
+ configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
45343
+ break;
45344
+ case "ratelimit":
45345
+ configObj.ratelimits = [...configObj.ratelimits ?? [], {
45346
+ name: binding.name,
45347
+ namespace_id: binding.namespace_id,
45348
+ simple: {
45349
+ limit: binding.simple.limit,
45350
+ period: binding.simple.period
45351
+ }
45352
+ }];
45353
+ break;
45354
+ case "vpc_service":
45355
+ configObj.vpc_services = [...configObj.vpc_services ?? [], {
45356
+ binding: binding.name,
45357
+ service_id: binding.service_id
45358
+ }];
45359
+ break;
45360
+ case "vpc_network":
45361
+ if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45362
+ binding: binding.name,
45363
+ tunnel_id: binding.tunnel_id
45364
+ }];
45365
+ else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45366
+ binding: binding.name,
45367
+ network_id: binding.network_id
45368
+ }];
45369
+ break;
45370
+ default: configObj.unsafe = {
45371
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45372
+ metadata: configObj.unsafe?.metadata ?? void 0
45373
+ };
45374
+ }
45375
+ return configObj;
45376
+ }, {});
45377
+ }
45378
+ __name$6(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
45379
+ var DEFAULT_COMPAT_DATE = "2026-09-25";
45380
+ function constructWranglerConfig(config$2) {
45381
+ const mappedBindings = mapWorkerMetadataBindings(config$2.bindings);
45382
+ const durableObjectClassNames = config$2.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$2.name).map((durableObject) => durableObject.class_name);
45383
+ const allRoutes = [...config$2.routes.map((r2) => ({
45384
+ pattern: r2.pattern,
45385
+ zone_name: r2.zone_name
45386
+ })), ...config$2.domains.map((c$1) => ({
45387
+ pattern: c$1.hostname,
45388
+ zone_name: c$1.zone_name,
45389
+ custom_domain: true,
45390
+ enabled: c$1.enabled,
45391
+ previews_enabled: c$1.previews_enabled
45392
+ }))];
45393
+ return {
45394
+ name: config$2.name,
45395
+ main: config$2.entrypoint,
45396
+ workers_dev: config$2.subdomain.enabled,
45397
+ preview_urls: config$2.subdomain.previews_enabled,
45398
+ compatibility_date: config$2.compatibility_date ?? DEFAULT_COMPAT_DATE,
45399
+ compatibility_flags: config$2.compatibility_flags,
45400
+ ...allRoutes.length ? { routes: allRoutes } : {},
45401
+ placement: config$2.placement?.mode === "smart" ? { mode: "smart" } : void 0,
45402
+ limits: config$2.limits,
45403
+ ...durableObjectClassNames.length && config$2.migration_tag ? { migrations: [{
45404
+ tag: config$2.migration_tag,
45405
+ new_classes: durableObjectClassNames
45406
+ }] } : {},
45407
+ ...config$2.schedules.length ? { triggers: { crons: config$2.schedules.map((scheduled) => scheduled.cron) } } : {},
45408
+ tail_consumers: config$2.tail_consumers ?? void 0,
45409
+ observability: config$2.observability,
45410
+ ...mappedBindings
45411
+ };
45412
+ }
45413
+ __name$6(constructWranglerConfig, "constructWranglerConfig");
45335
45414
  function assertNever2(_value) {}
45336
45415
  __name$6(assertNever2, "assertNever");
45337
45416
  function convertConfigToBindings(config$2, options) {
@@ -47379,7 +47458,7 @@ async function fetchLatestNpmVersion(name, version$6) {
47379
47458
  __name$6(fetchLatestNpmVersion, "fetchLatestNpmVersion");
47380
47459
  async function openInBrowser(url$2, logger$2) {
47381
47460
  try {
47382
- const { default: open$1 } = await import("./open-PBXRGS4R-CR0exOIH.mjs");
47461
+ const { default: open$1 } = await import("./open-PCXX3ZDZ-BXBWVkHI.mjs");
47383
47462
  (await open$1(url$2)).on("error", (err) => {
47384
47463
  handleBrowserOpenError(url$2, err, logger$2);
47385
47464
  });
@@ -56630,9 +56709,9 @@ const WorkflowExportSchema = strictObject({
56630
56709
  limits: strictObject({ steps: number().int().min(1).optional() }).optional(),
56631
56710
  concurrency: strictObject({ limit: number().int().min(1).optional() }).optional(),
56632
56711
  schedules: union([string().min(1), array(string().min(1)).min(1)]).optional(),
56633
- default_retention: strictObject({
56634
- success_retention: WorkflowRetentionSchema.optional(),
56635
- error_retention: WorkflowRetentionSchema.optional()
56712
+ defaultRetention: strictObject({
56713
+ successRetention: WorkflowRetentionSchema.optional(),
56714
+ errorRetention: WorkflowRetentionSchema.optional()
56636
56715
  }).optional()
56637
56716
  });
56638
56717
  const DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: literal$1("sqlite") });
@@ -56909,11 +56988,13 @@ function generateTypes({ configPath, packageName = "@cloudflare/config" }) {
56909
56988
 
56910
56989
  `;
56911
56990
  }
56991
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56912
56992
  var __defProp$5 = Object.defineProperty;
56913
56993
  var __name$5 = (target$1, value) => __defProp$5(target$1, "name", {
56914
56994
  value,
56915
56995
  configurable: true
56916
56996
  });
56997
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56917
56998
  var UserError$1 = class extends Error {
56918
56999
  static {
56919
57000
  __name$5(this, "UserError");
@@ -57441,10 +57522,21 @@ function convertExports(config$2, result) {
57441
57522
  const converted = {};
57442
57523
  const unknownExports = {};
57443
57524
  for (const [exportName, value] of Object.entries(exports$2)) {
57444
- if (value.type === "worker" || value.type === "workflow") {
57525
+ if (value.type === "worker") {
57445
57526
  converted[exportName] = value;
57446
57527
  continue;
57447
57528
  }
57529
+ if (value.type === "workflow") {
57530
+ const { defaultRetention,...workflow } = value;
57531
+ converted[exportName] = {
57532
+ ...workflow,
57533
+ ...defaultRetention !== void 0 && { default_retention: {
57534
+ ...defaultRetention.successRetention !== void 0 && { success_retention: defaultRetention.successRetention },
57535
+ ...defaultRetention.errorRetention !== void 0 && { error_retention: defaultRetention.errorRetention }
57536
+ } }
57537
+ };
57538
+ continue;
57539
+ }
57448
57540
  if (value.type !== "durable-object") {
57449
57541
  unknownExports[exportName] = value;
57450
57542
  continue;
@@ -57910,11 +58002,13 @@ const RUNTIME_TYPES_MARKER = "// Begin runtime types";
57910
58002
  function getRuntimeHeader(workerdVersion, compatibilityDate, compatibilityFlags = []) {
57911
58003
  return `${RUNTIME_HEADER_COMMENT_PREFIX}${workerdVersion} ${compatibilityDate}${compatibilityFlags.length > 0 ? ` ${[...compatibilityFlags].sort().join(",")}` : ""}`;
57912
58004
  }
58005
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
57913
58006
  var __defProp$4 = Object.defineProperty;
57914
58007
  var __name$4 = (target$1, value) => __defProp$4(target$1, "name", {
57915
58008
  value,
57916
58009
  configurable: true
57917
58010
  });
58011
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
57918
58012
  function isCompatDate(str) {
57919
58013
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
57920
58014
  }
@@ -57950,7 +58044,7 @@ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags)
57950
58044
  return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
57951
58045
  }
57952
58046
  __name$4(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
57953
- const require$1$1 = createRequire(import.meta.url);
58047
+ const require$2 = createRequire(import.meta.url);
57954
58048
  /**
57955
58049
  * Generates runtime types for a Workers project based on the provided compatibility settings.
57956
58050
  *
@@ -58008,7 +58102,7 @@ async function generate({ compatibilityDate, compatibilityFlags = [] }) {
58008
58102
  compatibilityDate: "2024-01-01",
58009
58103
  compatibilityFlags: ["nodejs_compat", "rtti_api"],
58010
58104
  modules: true,
58011
- script: (await fsp.readFile(require$1$1.resolve("workerd/worker.mjs"))).toString()
58105
+ script: (await fsp.readFile(require$2.resolve("workerd/worker.mjs"))).toString()
58012
58106
  }));
58013
58107
  const path$2 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
58014
58108
  try {
@@ -58259,11 +58353,13 @@ function getWorkerBundleDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME)
58259
58353
  function getWorkerAssetsDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME) {
58260
58354
  return path.join(getWorkerDir(root, directoryName), "assets");
58261
58355
  }
58356
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
58262
58357
  var __defProp$3 = Object.defineProperty;
58263
58358
  var __name$3 = (target$1, value) => __defProp$3(target$1, "name", {
58264
58359
  value,
58265
58360
  configurable: true
58266
58361
  });
58362
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
58267
58363
  function isDirectory$1(path$1$1) {
58268
58364
  return fs2.statSync(path$1$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
58269
58365
  }
@@ -72398,7 +72494,7 @@ function isInteractive() {
72398
72494
 
72399
72495
  //#endregion
72400
72496
  //#region ../containers-shared/dist/index.mjs
72401
- const require$1 = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
72497
+ const require$1$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
72402
72498
  var __create = Object.create;
72403
72499
  var __defProp$2 = Object.defineProperty;
72404
72500
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -72409,8 +72505,8 @@ var __name$2 = (target$1, value) => __defProp$2(target$1, "name", {
72409
72505
  value,
72410
72506
  configurable: true
72411
72507
  });
72412
- var __require$1 = /* @__PURE__ */ ((x) => typeof require$1 !== "undefined" ? require$1 : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require$1 !== "undefined" ? require$1 : a)[b] }) : x)(function(x) {
72413
- if (typeof require$1 !== "undefined") return require$1.apply(this, arguments);
72508
+ var __require$1 = /* @__PURE__ */ ((x) => typeof require$1$1 !== "undefined" ? require$1$1 : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require$1$1 !== "undefined" ? require$1$1 : a)[b] }) : x)(function(x) {
72509
+ if (typeof require$1$1 !== "undefined") return require$1$1.apply(this, arguments);
72414
72510
  throw Error("Dynamic require of \"" + x + "\" is not supported");
72415
72511
  });
72416
72512
  var __commonJS = (cb, mod$1) => function __require2() {
@@ -80294,7 +80390,8 @@ function getDockerPath() {
80294
80390
  }
80295
80391
 
80296
80392
  //#endregion
80297
- //#region ../workers-auth/dist/chunk-O6YSETKJ.mjs
80393
+ //#region ../workers-auth/dist/chunk-VAZEJK55.mjs
80394
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
80298
80395
  var __defProp$1 = Object.defineProperty;
80299
80396
  var __name$1 = (target$1, value) => __defProp$1(target$1, "name", {
80300
80397
  value,
@@ -80302,8 +80399,9 @@ var __name$1 = (target$1, value) => __defProp$1(target$1, "name", {
80302
80399
  });
80303
80400
 
80304
80401
  //#endregion
80305
- //#region ../workers-auth/dist/chunk-WMSASLDV.mjs
80402
+ //#region ../workers-auth/dist/chunk-RV27PEH3.mjs
80306
80403
  var import_undici$2 = require_undici();
80404
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
80307
80405
  var hasWarnedAboutDeprecatedV1ApiToken = false;
80308
80406
  function readStoredAuthState(options) {
80309
80407
  const { configOverride, warningLogger, storage } = options;
@@ -82748,7 +82846,8 @@ function scrubEncryptedCredentials(options) {
82748
82846
  __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
82749
82847
 
82750
82848
  //#endregion
82751
- //#region ../workers-auth/dist/chunk-V6MEAFHI.mjs
82849
+ //#region ../workers-auth/dist/chunk-2JQZNT7W.mjs
82850
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
82752
82851
  function createPreferences(getConfigPath) {
82753
82852
  function getUserPreferencesPath() {
82754
82853
  return path__default.resolve(getConfigPath(), "preferences.json");
@@ -83879,6 +83978,7 @@ __name$1(createAuthConfigFileHelpers, "createAuthConfigFileHelpers");
83879
83978
 
83880
83979
  //#endregion
83881
83980
  //#region ../workers-auth/dist/cf/index.mjs
83981
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
83882
83982
  var CF_KEYRING_SERVICE_NAME = "cloudflare";
83883
83983
  var CF_CLI_NAME = "cf";
83884
83984
  var CF_DISPLAY_NAME = "cf";
@@ -84467,6 +84567,7 @@ __name$1(setKeyringPreference$1, "setKeyringPreference");
84467
84567
 
84468
84568
  //#endregion
84469
84569
  //#region ../workers-auth/dist/wrangler/index.mjs
84570
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
84470
84571
  var DefaultScopes = {
84471
84572
  "account:read": "See your account info such as account details, analytics, and memberships.",
84472
84573
  "user:read": "See your user info such as name, email address, and account memberships.",
@@ -84587,7 +84688,8 @@ function setKeyringPreference(enabled, ctx) {
84587
84688
  __name$1(setKeyringPreference, "setKeyringPreference");
84588
84689
 
84589
84690
  //#endregion
84590
- //#region ../deploy-helpers/dist/chunk-Q72B4Q5Z.mjs
84691
+ //#region ../deploy-helpers/dist/chunk-U6NEESU5.mjs
84692
+ const require$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
84591
84693
  var __defProp = Object.defineProperty;
84592
84694
  var __name = (target$1, value) => __defProp(target$1, "name", {
84593
84695
  value,
@@ -84708,9 +84810,10 @@ var require_command_exists = /* @__PURE__ */ __commonJS$3({ "../../node_modules/
84708
84810
  }) });
84709
84811
 
84710
84812
  //#endregion
84711
- //#region ../deploy-helpers/dist/chunk-QBZBEHZB.mjs
84813
+ //#region ../deploy-helpers/dist/chunk-M77HNR46.mjs
84712
84814
  var import_undici$1 = require_undici();
84713
84815
  var import_command_exists = require_command_exists();
84816
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
84714
84817
  function handleUnsafeCapnp(capnp) {
84715
84818
  if (capnp.compiled_schema) return readFileSync(resolve(capnp.compiled_schema));
84716
84819
  const { base_path, source_schemas } = capnp;
@@ -84750,7 +84853,7 @@ function fromMimeType(mimeType) {
84750
84853
  __name(fromMimeType, "fromMimeType");
84751
84854
  function createWorkerUploadForm(worker, bindings, options) {
84752
84855
  const formData = new import_undici$1.FormData();
84753
- const { main, sourceMaps, migrations, exports: configuredExports, compatibility_date, compatibility_flags, keepVars, keepSecrets, keepBindings, logpush, placement, tail_consumers, streaming_tail_consumers, limits, annotations, keep_assets, assets, observability, cache: cache$2, package_dependencies } = worker;
84856
+ const { main, sourceMaps, migrations, code_update_strategy, exports: configuredExports, compatibility_date, compatibility_flags, keepVars, keepSecrets, keepBindings, logpush, placement, tail_consumers, streaming_tail_consumers, limits, annotations, keep_assets, assets, observability, cache: cache$2, package_dependencies } = worker;
84754
84857
  const assetConfig = {
84755
84858
  html_handling: assets?.assetConfig?.html_handling,
84756
84859
  not_found_handling: assets?.assetConfig?.not_found_handling,
@@ -85233,6 +85336,7 @@ function createWorkerUploadForm(worker, bindings, options) {
85233
85336
  ...compatibility_date && { compatibility_date },
85234
85337
  ...compatibility_flags && { compatibility_flags },
85235
85338
  ...migrations && { migrations },
85339
+ ...code_update_strategy && { code_update_strategy },
85236
85340
  ...configuredExports && Object.keys(configuredExports).length > 0 && { exports: configuredExports },
85237
85341
  capnp_schema: capnpSchemaOutputFile,
85238
85342
  ...keep_bindings && { keep_bindings },
@@ -85263,7 +85367,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
85263
85367
  //#endregion
85264
85368
  //#region ../remote-bindings/dist/index.mjs
85265
85369
  var import_undici = require_undici();
85266
- var version$2 = "0.0.35";
85370
+ var version$2 = "0.0.36";
85267
85371
  var NoDefaultValueProvided = class extends UserError {
85268
85372
  constructor() {
85269
85373
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });