@depup/cloudflare__vite-plugin 1.60.0-depup.0 → 1.60.2-depup.0

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-XNN5XXU4.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";
@@ -13880,6 +13911,11 @@ function partitionExports(exports$1) {
13880
13911
  return partitioned;
13881
13912
  }
13882
13913
  __name$6(partitionExports, "partitionExports");
13914
+ function isLiveDurableObjectExport(exportConfig) {
13915
+ const state = exportConfig.state ?? "created";
13916
+ return state === "created" || state === "expecting-transfer";
13917
+ }
13918
+ __name$6(isLiveDurableObjectExport, "isLiveDurableObjectExport");
13883
13919
  function getDurableObjectExports(exports$1) {
13884
13920
  return partitionExports(exports$1)["durable-object"];
13885
13921
  }
@@ -13954,7 +13990,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
13954
13990
  const durableObjectExports = getDurableObjectExports(exports$1 ?? {});
13955
13991
  for (const [className, entry] of Object.entries(durableObjectExports)) {
13956
13992
  if (entry.type !== "durable-object") continue;
13957
- if (entry.state === void 0 || entry.state === "created" || entry.state === "expecting-transfer") durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13993
+ if (isLiveDurableObjectExport(entry)) durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13958
13994
  }
13959
13995
  return durableObjectClassNameToUseSQLiteMap;
13960
13996
  }
@@ -16360,296 +16396,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
16360
16396
  __name$6(formatConfigSnippet, "formatConfigSnippet");
16361
16397
 
16362
16398
  //#endregion
16363
- //#region ../workers-utils/dist/chunk-DKSA7K25.mjs
16364
- var DEFAULT_COMPAT_DATE = "2026-09-23";
16365
- function assertNever(_value) {}
16366
- __name$6(assertNever, "assertNever");
16367
- function mapWorkerMetadataBindings(bindings) {
16368
- return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
16369
- switch (binding.type) {
16370
- case "plain_text":
16371
- configObj.vars = {
16372
- ...configObj.vars ?? {},
16373
- [binding.name]: binding.text
16374
- };
16375
- break;
16376
- case "json":
16377
- configObj.vars = {
16378
- ...configObj.vars ?? {},
16379
- [binding.name]: binding.json
16380
- };
16381
- break;
16382
- case "kv_namespace":
16383
- configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
16384
- id: binding.namespace_id,
16385
- binding: binding.name
16386
- }];
16387
- break;
16388
- case "durable_object_namespace":
16389
- configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
16390
- name: binding.name,
16391
- class_name: binding.class_name,
16392
- script_name: binding.script_name,
16393
- environment: binding.environment
16394
- }] };
16395
- break;
16396
- case "d1":
16397
- configObj.d1_databases = [...configObj.d1_databases ?? [], {
16398
- binding: binding.name,
16399
- database_id: binding.id
16400
- }];
16401
- break;
16402
- case "browser":
16403
- configObj.browser = { binding: binding.name };
16404
- break;
16405
- case "ai":
16406
- configObj.ai = { binding: binding.name };
16407
- break;
16408
- case "images":
16409
- configObj.images = { binding: binding.name };
16410
- break;
16411
- case "stream":
16412
- configObj.stream = { binding: binding.name };
16413
- break;
16414
- case "media":
16415
- configObj.media = { binding: binding.name };
16416
- break;
16417
- case "r2_bucket":
16418
- configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
16419
- binding: binding.name,
16420
- bucket_name: binding.bucket_name,
16421
- jurisdiction: binding.jurisdiction
16422
- }];
16423
- break;
16424
- case "secrets_store_secret":
16425
- configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
16426
- binding: binding.name,
16427
- store_id: binding.store_id,
16428
- secret_name: binding.secret_name
16429
- }];
16430
- break;
16431
- case "artifacts":
16432
- configObj.artifacts = [...configObj.artifacts ?? [], {
16433
- binding: binding.name,
16434
- namespace: binding.namespace
16435
- }];
16436
- break;
16437
- case "unsafe_hello_world":
16438
- configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
16439
- binding: binding.name,
16440
- enable_timer: binding.enable_timer
16441
- }];
16442
- break;
16443
- case "flagship":
16444
- configObj.flagship = [...configObj.flagship ?? [], {
16445
- binding: binding.name,
16446
- app_id: binding.app_id
16447
- }];
16448
- break;
16449
- case "service":
16450
- configObj.services = [...configObj.services ?? [], {
16451
- binding: binding.name,
16452
- service: binding.service,
16453
- environment: binding.environment,
16454
- entrypoint: binding.entrypoint
16455
- }];
16456
- break;
16457
- case "analytics_engine":
16458
- configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
16459
- binding: binding.name,
16460
- dataset: binding.dataset
16461
- }];
16462
- break;
16463
- case "dispatch_namespace":
16464
- configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
16465
- binding: binding.name,
16466
- namespace: binding.namespace,
16467
- ...binding.outbound && { outbound: {
16468
- service: binding.outbound.worker.service,
16469
- environment: binding.outbound.worker.environment,
16470
- parameters: binding.outbound.params?.map((p$2) => p$2.name) ?? []
16471
- } }
16472
- }];
16473
- break;
16474
- case "logfwdr":
16475
- configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
16476
- name: binding.name,
16477
- destination: binding.destination
16478
- }] };
16479
- break;
16480
- case "wasm_module":
16481
- configObj.wasm_modules = {
16482
- ...configObj.wasm_modules ?? {},
16483
- [binding.name]: binding.part
16484
- };
16485
- break;
16486
- case "text_blob":
16487
- configObj.text_blobs = {
16488
- ...configObj.text_blobs ?? {},
16489
- [binding.name]: binding.part
16490
- };
16491
- break;
16492
- case "data_blob":
16493
- configObj.data_blobs = {
16494
- ...configObj.data_blobs ?? {},
16495
- [binding.name]: binding.part
16496
- };
16497
- break;
16498
- case "secret_text": break;
16499
- case "version_metadata":
16500
- configObj.version_metadata = { binding: binding.name };
16501
- break;
16502
- case "send_email":
16503
- configObj.send_email = [...configObj.send_email ?? [], {
16504
- name: binding.name,
16505
- destination_address: binding.destination_address,
16506
- allowed_destination_addresses: binding.allowed_destination_addresses,
16507
- allowed_sender_addresses: binding.allowed_sender_addresses
16508
- }];
16509
- break;
16510
- case "queue":
16511
- configObj.queues ??= { producers: [] };
16512
- configObj.queues.producers = [...configObj.queues.producers ?? [], {
16513
- binding: binding.name,
16514
- queue: binding.queue_name,
16515
- delivery_delay: binding.delivery_delay
16516
- }];
16517
- break;
16518
- case "vectorize":
16519
- configObj.vectorize = [...configObj.vectorize ?? [], {
16520
- binding: binding.name,
16521
- index_name: binding.index_name
16522
- }];
16523
- break;
16524
- case "ai_search_namespace":
16525
- configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
16526
- binding: binding.name,
16527
- namespace: binding.namespace
16528
- }];
16529
- break;
16530
- case "ai_search":
16531
- configObj.ai_search = [...configObj.ai_search ?? [], {
16532
- binding: binding.name,
16533
- instance_name: binding.instance_name
16534
- }];
16535
- break;
16536
- case "agent_memory":
16537
- configObj.agent_memory = [...configObj.agent_memory ?? [], {
16538
- binding: binding.name,
16539
- namespace: binding.namespace
16540
- }];
16541
- break;
16542
- case "hyperdrive":
16543
- configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
16544
- binding: binding.name,
16545
- id: binding.id
16546
- }];
16547
- break;
16548
- case "mtls_certificate":
16549
- configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
16550
- binding: binding.name,
16551
- certificate_id: binding.certificate_id
16552
- }];
16553
- break;
16554
- case "pipelines":
16555
- configObj.pipelines = [...configObj.pipelines ?? [], {
16556
- binding: binding.name,
16557
- ...binding.stream && { stream: binding.stream },
16558
- ...binding.pipeline && { pipeline: binding.pipeline }
16559
- }];
16560
- break;
16561
- case "assets":
16562
- configObj.assets = { binding: binding.name };
16563
- break;
16564
- case "inherit":
16565
- configObj.unsafe = {
16566
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16567
- metadata: configObj.unsafe?.metadata ?? void 0
16568
- };
16569
- break;
16570
- case "workflow":
16571
- configObj.workflows = [...configObj.workflows ?? [], {
16572
- binding: binding.name,
16573
- name: binding.workflow_name,
16574
- class_name: binding.class_name,
16575
- script_name: binding.script_name
16576
- }];
16577
- break;
16578
- case "worker_loader":
16579
- configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
16580
- break;
16581
- case "ratelimit":
16582
- configObj.ratelimits = [...configObj.ratelimits ?? [], {
16583
- name: binding.name,
16584
- namespace_id: binding.namespace_id,
16585
- simple: {
16586
- limit: binding.simple.limit,
16587
- period: binding.simple.period
16588
- }
16589
- }];
16590
- break;
16591
- case "vpc_service":
16592
- configObj.vpc_services = [...configObj.vpc_services ?? [], {
16593
- binding: binding.name,
16594
- service_id: binding.service_id
16595
- }];
16596
- break;
16597
- case "vpc_network":
16598
- if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16599
- binding: binding.name,
16600
- tunnel_id: binding.tunnel_id
16601
- }];
16602
- else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16603
- binding: binding.name,
16604
- network_id: binding.network_id
16605
- }];
16606
- break;
16607
- default: configObj.unsafe = {
16608
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16609
- metadata: configObj.unsafe?.metadata ?? void 0
16610
- };
16611
- }
16612
- return configObj;
16613
- }, {});
16614
- }
16615
- __name$6(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
16616
- function constructWranglerConfig(config$2) {
16617
- const mappedBindings = mapWorkerMetadataBindings(config$2.bindings);
16618
- const durableObjectClassNames = config$2.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$2.name).map((durableObject) => durableObject.class_name);
16619
- const allRoutes = [...config$2.routes.map((r$1) => ({
16620
- pattern: r$1.pattern,
16621
- zone_name: r$1.zone_name
16622
- })), ...config$2.domains.map((c$1) => ({
16623
- pattern: c$1.hostname,
16624
- zone_name: c$1.zone_name,
16625
- custom_domain: true,
16626
- enabled: c$1.enabled,
16627
- previews_enabled: c$1.previews_enabled
16628
- }))];
16629
- return {
16630
- name: config$2.name,
16631
- main: config$2.entrypoint,
16632
- workers_dev: config$2.subdomain.enabled,
16633
- preview_urls: config$2.subdomain.previews_enabled,
16634
- compatibility_date: config$2.compatibility_date ?? DEFAULT_COMPAT_DATE,
16635
- compatibility_flags: config$2.compatibility_flags,
16636
- ...allRoutes.length ? { routes: allRoutes } : {},
16637
- placement: config$2.placement?.mode === "smart" ? { mode: "smart" } : void 0,
16638
- limits: config$2.limits,
16639
- ...durableObjectClassNames.length && config$2.migration_tag ? { migrations: [{
16640
- tag: config$2.migration_tag,
16641
- new_classes: durableObjectClassNames
16642
- }] } : {},
16643
- ...config$2.schedules.length ? { triggers: { crons: config$2.schedules.map((scheduled) => scheduled.cron) } } : {},
16644
- tail_consumers: config$2.tail_consumers ?? void 0,
16645
- observability: config$2.observability,
16646
- ...mappedBindings
16647
- };
16648
- }
16649
- __name$6(constructWranglerConfig, "constructWranglerConfig");
16650
-
16651
- //#endregion
16652
- //#region ../workers-utils/dist/chunk-3IYLA2JH.mjs
16399
+ //#region ../workers-utils/dist/chunk-QSRIB43D.mjs
16400
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16653
16401
  function getBooleanEnvironmentVariableFactory(options) {
16654
16402
  return () => {
16655
16403
  if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
@@ -16693,7 +16441,8 @@ var getDockerPath$1 = getEnvironmentVariableFactory({
16693
16441
  });
16694
16442
 
16695
16443
  //#endregion
16696
- //#region ../workers-utils/dist/chunk-53IMCORZ.mjs
16444
+ //#region ../workers-utils/dist/chunk-MIA26B4M.mjs
16445
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16697
16446
  function isDirectory(path$2) {
16698
16447
  return fs2.statSync(path$2, { throwIfNoEntry: false })?.isDirectory() ?? false;
16699
16448
  }
@@ -16720,7 +16469,8 @@ function removeDirSync$1(dirPath) {
16720
16469
  __name$6(removeDirSync$1, "removeDirSync");
16721
16470
 
16722
16471
  //#endregion
16723
- //#region ../workers-utils/dist/chunk-34VZWBGB.mjs
16472
+ //#region ../workers-utils/dist/chunk-MV2OJK3L.mjs
16473
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16724
16474
  function isWindows() {
16725
16475
  return /^win/i.test(process.platform);
16726
16476
  }
@@ -16851,7 +16601,8 @@ function getGlobalWranglerCachePath() {
16851
16601
  __name$6(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
16852
16602
 
16853
16603
  //#endregion
16854
- //#region ../workers-utils/dist/chunk-IYSONYTF.mjs
16604
+ //#region ../workers-utils/dist/chunk-FR75DWDU.mjs
16605
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16855
16606
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
16856
16607
  variableName: "WRANGLER_C3_COMMAND",
16857
16608
  defaultValue: /* @__PURE__ */ __name$6(() => "create cloudflare", "defaultValue")
@@ -39698,6 +39449,7 @@ var require_undici = /* @__PURE__ */ __commonJS$3({ "../../node_modules/.pnpm/un
39698
39449
  //#endregion
39699
39450
  //#region ../workers-utils/dist/index.mjs
39700
39451
  var import_undici$3 = require_undici();
39452
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
39701
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) {
39702
39454
  module$1.exports = [
39703
39455
  {
@@ -42627,7 +42379,13 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
42627
42379
  vars: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vars", validateVars(envName), {}),
42628
42380
  secrets: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "secrets", validateSecrets(envName), void 0),
42629
42381
  define: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "define", validateDefines(envName), {}),
42630
- 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
+ })(),
42631
42389
  workflows: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "workflows", all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty), []),
42632
42390
  migrations: inheritable(diagnostics, topLevelEnv, rawEnv, "migrations", validateMigrations, []),
42633
42391
  exports: inheritable(diagnostics, topLevelEnv, rawEnv, "exports", validateExports, {}),
@@ -42889,6 +42647,48 @@ Please add a binding for each to "${fieldPath}.bindings":
42889
42647
  }
42890
42648
  return isValid;
42891
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");
42892
42692
  var validateUnsafeSettings = /* @__PURE__ */ __name$6((envName) => (diagnostics, field, value, config$2) => {
42893
42693
  const fieldPath = config$2 === void 0 ? `${field}` : `env.${envName}.${field}`;
42894
42694
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -44552,7 +44352,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$6((envName, configPath) => (
44552
44352
  isValid = validateVars(envName)(diagnostics, `${field}.vars`, previews.vars, void 0) && isValid;
44553
44353
  isValid = validateDefines(envName)(diagnostics, `${field}.define`, previews.define, void 0) && isValid;
44554
44354
  normalizeAndValidatePlacement(diagnostics, void 0, previews, `${field}.placement`);
44555
- 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;
44556
44356
  isValid = all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty)(diagnostics, `${field}.workflows`, previews.workflows, void 0) && isValid;
44557
44357
  isValid = validateBindingArray(envName, validateKVBinding)(diagnostics, `${field}.kv_namespaces`, previews.kv_namespaces, void 0) && isValid;
44558
44358
  isValid = validateBindingArray(envName, validateSendEmailBinding)(diagnostics, `${field}.send_email`, previews.send_email, void 0) && isValid;
@@ -44995,8 +44795,7 @@ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects,
44995
44795
  const exportsCovers = /* @__PURE__ */ __name$6((className) => {
44996
44796
  const entry = exports$1?.[className];
44997
44797
  if (entry === void 0 || entry.type !== "durable-object") return false;
44998
- const state = entry.state ?? "created";
44999
- return state === "created" || state === "expecting-transfer";
44798
+ return isLiveDurableObjectExport(entry);
45000
44799
  }, "exportsCovers");
45001
44800
  const uncoveredByExports = exportedDurableObjects.filter((binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name));
45002
44801
  if (uncoveredByExports.length === 0 || migrations.length > 0) return;
@@ -45133,6 +44932,8 @@ function isDockerfile(imagePath, configPath) {
45133
44932
  return false;
45134
44933
  }
45135
44934
  __name$6(isDockerfile, "isDockerfile");
44935
+ function assertNever(_value) {}
44936
+ __name$6(assertNever, "assertNever");
45136
44937
  var BINDING_LOCAL_SUPPORT = {
45137
44938
  plain_text: "local-only",
45138
44939
  secret_text: "local-only",
@@ -45182,8 +44983,7 @@ function getBindingLocalSupport(type) {
45182
44983
  }
45183
44984
  __name$6(getBindingLocalSupport, "getBindingLocalSupport");
45184
44985
  function validateBindingRemoteSetting(type, remote, warn) {
45185
- const support = getBindingLocalSupport(type);
45186
- switch (support) {
44986
+ switch (getBindingLocalSupport(type)) {
45187
44987
  case "local-and-remote": return;
45188
44988
  case "local-only":
45189
44989
  if (remote === true) throw new UserError(`${getBindingTypeFriendlyName(type)} bindings do not support accessing remote resources.`, { telemetryMessage: "utils bindings unsupported remote resources" });
@@ -45196,7 +44996,6 @@ function validateBindingRemoteSetting(type, remote, warn) {
45196
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" });
45197
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.`);
45198
44998
  return;
45199
- default: assertNever(support);
45200
44999
  }
45201
45000
  }
45202
45001
  __name$6(validateBindingRemoteSetting, "validateBindingRemoteSetting");
@@ -45328,6 +45127,290 @@ function findFileUp(name, startDir, lastDir) {
45328
45127
  }
45329
45128
  }
45330
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");
45331
45414
  function assertNever2(_value) {}
45332
45415
  __name$6(assertNever2, "assertNever");
45333
45416
  function convertConfigToBindings(config$2, options) {
@@ -47375,7 +47458,7 @@ async function fetchLatestNpmVersion(name, version$6) {
47375
47458
  __name$6(fetchLatestNpmVersion, "fetchLatestNpmVersion");
47376
47459
  async function openInBrowser(url$2, logger$2) {
47377
47460
  try {
47378
- const { default: open$1 } = await import("./open-PBXRGS4R-CR0exOIH.mjs");
47461
+ const { default: open$1 } = await import("./open-PCXX3ZDZ-BXBWVkHI.mjs");
47379
47462
  (await open$1(url$2)).on("error", (err) => {
47380
47463
  handleBrowserOpenError(url$2, err, logger$2);
47381
47464
  });
@@ -56626,9 +56709,9 @@ const WorkflowExportSchema = strictObject({
56626
56709
  limits: strictObject({ steps: number().int().min(1).optional() }).optional(),
56627
56710
  concurrency: strictObject({ limit: number().int().min(1).optional() }).optional(),
56628
56711
  schedules: union([string().min(1), array(string().min(1)).min(1)]).optional(),
56629
- default_retention: strictObject({
56630
- success_retention: WorkflowRetentionSchema.optional(),
56631
- error_retention: WorkflowRetentionSchema.optional()
56712
+ defaultRetention: strictObject({
56713
+ successRetention: WorkflowRetentionSchema.optional(),
56714
+ errorRetention: WorkflowRetentionSchema.optional()
56632
56715
  }).optional()
56633
56716
  });
56634
56717
  const DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: literal$1("sqlite") });
@@ -56905,11 +56988,13 @@ function generateTypes({ configPath, packageName = "@cloudflare/config" }) {
56905
56988
 
56906
56989
  `;
56907
56990
  }
56991
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56908
56992
  var __defProp$5 = Object.defineProperty;
56909
56993
  var __name$5 = (target$1, value) => __defProp$5(target$1, "name", {
56910
56994
  value,
56911
56995
  configurable: true
56912
56996
  });
56997
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56913
56998
  var UserError$1 = class extends Error {
56914
56999
  static {
56915
57000
  __name$5(this, "UserError");
@@ -57437,10 +57522,21 @@ function convertExports(config$2, result) {
57437
57522
  const converted = {};
57438
57523
  const unknownExports = {};
57439
57524
  for (const [exportName, value] of Object.entries(exports$2)) {
57440
- if (value.type === "worker" || value.type === "workflow") {
57525
+ if (value.type === "worker") {
57441
57526
  converted[exportName] = value;
57442
57527
  continue;
57443
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
+ }
57444
57540
  if (value.type !== "durable-object") {
57445
57541
  unknownExports[exportName] = value;
57446
57542
  continue;
@@ -57906,11 +58002,13 @@ const RUNTIME_TYPES_MARKER = "// Begin runtime types";
57906
58002
  function getRuntimeHeader(workerdVersion, compatibilityDate, compatibilityFlags = []) {
57907
58003
  return `${RUNTIME_HEADER_COMMENT_PREFIX}${workerdVersion} ${compatibilityDate}${compatibilityFlags.length > 0 ? ` ${[...compatibilityFlags].sort().join(",")}` : ""}`;
57908
58004
  }
58005
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
57909
58006
  var __defProp$4 = Object.defineProperty;
57910
58007
  var __name$4 = (target$1, value) => __defProp$4(target$1, "name", {
57911
58008
  value,
57912
58009
  configurable: true
57913
58010
  });
58011
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
57914
58012
  function isCompatDate(str) {
57915
58013
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
57916
58014
  }
@@ -57946,7 +58044,7 @@ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags)
57946
58044
  return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
57947
58045
  }
57948
58046
  __name$4(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
57949
- const require$1$1 = createRequire(import.meta.url);
58047
+ const require$2 = createRequire(import.meta.url);
57950
58048
  /**
57951
58049
  * Generates runtime types for a Workers project based on the provided compatibility settings.
57952
58050
  *
@@ -58004,7 +58102,7 @@ async function generate({ compatibilityDate, compatibilityFlags = [] }) {
58004
58102
  compatibilityDate: "2024-01-01",
58005
58103
  compatibilityFlags: ["nodejs_compat", "rtti_api"],
58006
58104
  modules: true,
58007
- script: (await fsp.readFile(require$1$1.resolve("workerd/worker.mjs"))).toString()
58105
+ script: (await fsp.readFile(require$2.resolve("workerd/worker.mjs"))).toString()
58008
58106
  }));
58009
58107
  const path$2 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
58010
58108
  try {
@@ -58255,11 +58353,13 @@ function getWorkerBundleDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME)
58255
58353
  function getWorkerAssetsDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME) {
58256
58354
  return path.join(getWorkerDir(root, directoryName), "assets");
58257
58355
  }
58356
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
58258
58357
  var __defProp$3 = Object.defineProperty;
58259
58358
  var __name$3 = (target$1, value) => __defProp$3(target$1, "name", {
58260
58359
  value,
58261
58360
  configurable: true
58262
58361
  });
58362
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
58263
58363
  function isDirectory$1(path$1$1) {
58264
58364
  return fs2.statSync(path$1$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
58265
58365
  }
@@ -72394,7 +72494,7 @@ function isInteractive() {
72394
72494
 
72395
72495
  //#endregion
72396
72496
  //#region ../containers-shared/dist/index.mjs
72397
- const require$1 = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
72497
+ const require$1$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
72398
72498
  var __create = Object.create;
72399
72499
  var __defProp$2 = Object.defineProperty;
72400
72500
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -72405,8 +72505,8 @@ var __name$2 = (target$1, value) => __defProp$2(target$1, "name", {
72405
72505
  value,
72406
72506
  configurable: true
72407
72507
  });
72408
- 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) {
72409
- 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);
72410
72510
  throw Error("Dynamic require of \"" + x + "\" is not supported");
72411
72511
  });
72412
72512
  var __commonJS = (cb, mod$1) => function __require2() {
@@ -78180,12 +78280,14 @@ async function pushImageIfChanged({ pathToDocker, sourceTag, targetTag, containe
78180
78280
  ]);
78181
78281
  if (JSON.parse(remoteManifest).Descriptor.digest === hash$1) {
78182
78282
  logger$1.log("Image already exists remotely, skipping push");
78183
- logger$1.debug(`Untagging built image: ${sourceTag} since there was no change.`);
78184
- await runDockerCmd(pathToDocker, [
78185
- "image",
78186
- "rm",
78187
- sourceTag
78188
- ]);
78283
+ if (cleanupSourceTag !== false) {
78284
+ logger$1.debug(`Untagging built image: ${sourceTag} since there was no change.`);
78285
+ await runDockerCmd(pathToDocker, [
78286
+ "image",
78287
+ "rm",
78288
+ sourceTag
78289
+ ]);
78290
+ }
78189
78291
  return { remoteDigest: remoteDigest2 };
78190
78292
  }
78191
78293
  } catch (error$2) {
@@ -80288,7 +80390,8 @@ function getDockerPath() {
80288
80390
  }
80289
80391
 
80290
80392
  //#endregion
80291
- //#region ../workers-auth/dist/chunk-O6YSETKJ.mjs
80393
+ //#region ../workers-auth/dist/chunk-VAZEJK55.mjs
80394
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
80292
80395
  var __defProp$1 = Object.defineProperty;
80293
80396
  var __name$1 = (target$1, value) => __defProp$1(target$1, "name", {
80294
80397
  value,
@@ -80296,8 +80399,9 @@ var __name$1 = (target$1, value) => __defProp$1(target$1, "name", {
80296
80399
  });
80297
80400
 
80298
80401
  //#endregion
80299
- //#region ../workers-auth/dist/chunk-WMSASLDV.mjs
80402
+ //#region ../workers-auth/dist/chunk-RV27PEH3.mjs
80300
80403
  var import_undici$2 = require_undici();
80404
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
80301
80405
  var hasWarnedAboutDeprecatedV1ApiToken = false;
80302
80406
  function readStoredAuthState(options) {
80303
80407
  const { configOverride, warningLogger, storage } = options;
@@ -82742,7 +82846,8 @@ function scrubEncryptedCredentials(options) {
82742
82846
  __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
82743
82847
 
82744
82848
  //#endregion
82745
- //#region ../workers-auth/dist/chunk-V6MEAFHI.mjs
82849
+ //#region ../workers-auth/dist/chunk-2JQZNT7W.mjs
82850
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
82746
82851
  function createPreferences(getConfigPath) {
82747
82852
  function getUserPreferencesPath() {
82748
82853
  return path__default.resolve(getConfigPath(), "preferences.json");
@@ -83873,6 +83978,7 @@ __name$1(createAuthConfigFileHelpers, "createAuthConfigFileHelpers");
83873
83978
 
83874
83979
  //#endregion
83875
83980
  //#region ../workers-auth/dist/cf/index.mjs
83981
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
83876
83982
  var CF_KEYRING_SERVICE_NAME = "cloudflare";
83877
83983
  var CF_CLI_NAME = "cf";
83878
83984
  var CF_DISPLAY_NAME = "cf";
@@ -84461,6 +84567,7 @@ __name$1(setKeyringPreference$1, "setKeyringPreference");
84461
84567
 
84462
84568
  //#endregion
84463
84569
  //#region ../workers-auth/dist/wrangler/index.mjs
84570
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
84464
84571
  var DefaultScopes = {
84465
84572
  "account:read": "See your account info such as account details, analytics, and memberships.",
84466
84573
  "user:read": "See your user info such as name, email address, and account memberships.",
@@ -84581,7 +84688,8 @@ function setKeyringPreference(enabled, ctx) {
84581
84688
  __name$1(setKeyringPreference, "setKeyringPreference");
84582
84689
 
84583
84690
  //#endregion
84584
- //#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 : "/"));
84585
84693
  var __defProp = Object.defineProperty;
84586
84694
  var __name = (target$1, value) => __defProp(target$1, "name", {
84587
84695
  value,
@@ -84702,9 +84810,10 @@ var require_command_exists = /* @__PURE__ */ __commonJS$3({ "../../node_modules/
84702
84810
  }) });
84703
84811
 
84704
84812
  //#endregion
84705
- //#region ../deploy-helpers/dist/chunk-QBZBEHZB.mjs
84813
+ //#region ../deploy-helpers/dist/chunk-M77HNR46.mjs
84706
84814
  var import_undici$1 = require_undici();
84707
84815
  var import_command_exists = require_command_exists();
84816
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
84708
84817
  function handleUnsafeCapnp(capnp) {
84709
84818
  if (capnp.compiled_schema) return readFileSync(resolve(capnp.compiled_schema));
84710
84819
  const { base_path, source_schemas } = capnp;
@@ -84744,7 +84853,7 @@ function fromMimeType(mimeType) {
84744
84853
  __name(fromMimeType, "fromMimeType");
84745
84854
  function createWorkerUploadForm(worker, bindings, options) {
84746
84855
  const formData = new import_undici$1.FormData();
84747
- 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;
84748
84857
  const assetConfig = {
84749
84858
  html_handling: assets?.assetConfig?.html_handling,
84750
84859
  not_found_handling: assets?.assetConfig?.not_found_handling,
@@ -85227,6 +85336,7 @@ function createWorkerUploadForm(worker, bindings, options) {
85227
85336
  ...compatibility_date && { compatibility_date },
85228
85337
  ...compatibility_flags && { compatibility_flags },
85229
85338
  ...migrations && { migrations },
85339
+ ...code_update_strategy && { code_update_strategy },
85230
85340
  ...configuredExports && Object.keys(configuredExports).length > 0 && { exports: configuredExports },
85231
85341
  capnp_schema: capnpSchemaOutputFile,
85232
85342
  ...keep_bindings && { keep_bindings },
@@ -85257,7 +85367,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
85257
85367
  //#endregion
85258
85368
  //#region ../remote-bindings/dist/index.mjs
85259
85369
  var import_undici = require_undici();
85260
- var version$2 = "0.0.34";
85370
+ var version$2 = "0.0.36";
85261
85371
  var NoDefaultValueProvided = class extends UserError {
85262
85372
  constructor() {
85263
85373
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });