@cloudflare/vitest-plugin 1.2.6 → 1.2.8

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.
@@ -1,4 +1,4 @@
1
- import { a as __toESM, c as __toESM$1, i as __require, n as __export, o as __commonJS$2, r as __name$3, s as __require$1, t as __commonJS$1 } from "./chunk-Q72B4Q5Z-izl5Qmnx.mjs";
1
+ import { a as __toESM, i as __require, n as __export, r as __name$3, t as __commonJS$1 } from "./chunk-U6NEESU5-BzWFpRaS.mjs";
2
2
  import * as nodeModule from "node:module";
3
3
  import { createRequire } from "node:module";
4
4
  import assert from "node:assert";
@@ -27,7 +27,35 @@ import P from "node:readline";
27
27
  import * as z$1 from "zod";
28
28
  import { z } from "zod";
29
29
 
30
- //#region ../workers-utils/dist/chunk-OWXQB7GP.mjs
30
+ //#region rolldown:runtime
31
+ var __create = Object.create;
32
+ var __defProp$3 = Object.defineProperty;
33
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
34
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
35
+ var __getProtoOf = Object.getPrototypeOf;
36
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
37
+ var __commonJS$2 = (cb, mod) => function() {
38
+ return mod || (0, cb[__getOwnPropNames$1(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
39
+ };
40
+ var __copyProps = (to, from, except, desc) => {
41
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i = 0, n = keys.length, key; i < n; i++) {
42
+ key = keys[i];
43
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp$3(to, key, {
44
+ get: ((k) => from[k]).bind(null, key),
45
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
46
+ });
47
+ }
48
+ return to;
49
+ };
50
+ var __toESM$1 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$3(target, "default", {
51
+ value: mod,
52
+ enumerable: true
53
+ }) : target, mod));
54
+ var __require$1 = /* @__PURE__ */ createRequire(import.meta.url);
55
+
56
+ //#endregion
57
+ //#region ../workers-utils/dist/chunk-PWC7WAOU.mjs
58
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
31
59
  var external_exports = {};
32
60
  __export(external_exports, {
33
61
  $brand: () => $brand,
@@ -13751,7 +13779,8 @@ function formatZodError(error51) {
13751
13779
  __name$3(formatZodError, "formatZodError");
13752
13780
 
13753
13781
  //#endregion
13754
- //#region ../workers-utils/dist/chunk-MCNIGVAF.mjs
13782
+ //#region ../workers-utils/dist/chunk-M3RITKR3.mjs
13783
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13755
13784
  function dedent$1(templ) {
13756
13785
  var values = [];
13757
13786
  for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
@@ -13788,7 +13817,8 @@ __name$3(dedent$1, "dedent");
13788
13817
  var esm_default$1 = dedent$1;
13789
13818
 
13790
13819
  //#endregion
13791
- //#region ../workers-utils/dist/chunk-WO2IAW6M.mjs
13820
+ //#region ../workers-utils/dist/chunk-OWPFSLY6.mjs
13821
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13792
13822
  var UserError$1 = class extends Error {
13793
13823
  static {
13794
13824
  __name$3(this, "UserError");
@@ -13846,7 +13876,8 @@ function createFatalError$1(message, isJson, options) {
13846
13876
  __name$3(createFatalError$1, "createFatalError");
13847
13877
 
13848
13878
  //#endregion
13849
- //#region ../workers-utils/dist/chunk-XNN5XXU4.mjs
13879
+ //#region ../workers-utils/dist/chunk-AUSY7DKT.mjs
13880
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13850
13881
  function hasKnownExportType(entry) {
13851
13882
  const type = entry?.type;
13852
13883
  return type === "durable-object" || type === "worker" || type === "workflow";
@@ -13866,6 +13897,11 @@ function partitionExports(exports$1) {
13866
13897
  return partitioned;
13867
13898
  }
13868
13899
  __name$3(partitionExports, "partitionExports");
13900
+ function isLiveDurableObjectExport(exportConfig) {
13901
+ const state = exportConfig.state ?? "created";
13902
+ return state === "created" || state === "expecting-transfer";
13903
+ }
13904
+ __name$3(isLiveDurableObjectExport, "isLiveDurableObjectExport");
13869
13905
  function getDurableObjectExports(exports$1) {
13870
13906
  return partitionExports(exports$1)["durable-object"];
13871
13907
  }
@@ -13940,7 +13976,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
13940
13976
  const durableObjectExports = getDurableObjectExports(exports$1 ?? {});
13941
13977
  for (const [className, entry] of Object.entries(durableObjectExports)) {
13942
13978
  if (entry.type !== "durable-object") continue;
13943
- if (entry.state === void 0 || entry.state === "created" || entry.state === "expecting-transfer") durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13979
+ if (isLiveDurableObjectExport(entry)) durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13944
13980
  }
13945
13981
  return durableObjectClassNameToUseSQLiteMap;
13946
13982
  }
@@ -16346,296 +16382,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
16346
16382
  __name$3(formatConfigSnippet, "formatConfigSnippet");
16347
16383
 
16348
16384
  //#endregion
16349
- //#region ../workers-utils/dist/chunk-DKSA7K25.mjs
16350
- var DEFAULT_COMPAT_DATE = "2026-09-23";
16351
- function assertNever(_value) {}
16352
- __name$3(assertNever, "assertNever");
16353
- function mapWorkerMetadataBindings(bindings) {
16354
- return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
16355
- switch (binding.type) {
16356
- case "plain_text":
16357
- configObj.vars = {
16358
- ...configObj.vars ?? {},
16359
- [binding.name]: binding.text
16360
- };
16361
- break;
16362
- case "json":
16363
- configObj.vars = {
16364
- ...configObj.vars ?? {},
16365
- [binding.name]: binding.json
16366
- };
16367
- break;
16368
- case "kv_namespace":
16369
- configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
16370
- id: binding.namespace_id,
16371
- binding: binding.name
16372
- }];
16373
- break;
16374
- case "durable_object_namespace":
16375
- configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
16376
- name: binding.name,
16377
- class_name: binding.class_name,
16378
- script_name: binding.script_name,
16379
- environment: binding.environment
16380
- }] };
16381
- break;
16382
- case "d1":
16383
- configObj.d1_databases = [...configObj.d1_databases ?? [], {
16384
- binding: binding.name,
16385
- database_id: binding.id
16386
- }];
16387
- break;
16388
- case "browser":
16389
- configObj.browser = { binding: binding.name };
16390
- break;
16391
- case "ai":
16392
- configObj.ai = { binding: binding.name };
16393
- break;
16394
- case "images":
16395
- configObj.images = { binding: binding.name };
16396
- break;
16397
- case "stream":
16398
- configObj.stream = { binding: binding.name };
16399
- break;
16400
- case "media":
16401
- configObj.media = { binding: binding.name };
16402
- break;
16403
- case "r2_bucket":
16404
- configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
16405
- binding: binding.name,
16406
- bucket_name: binding.bucket_name,
16407
- jurisdiction: binding.jurisdiction
16408
- }];
16409
- break;
16410
- case "secrets_store_secret":
16411
- configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
16412
- binding: binding.name,
16413
- store_id: binding.store_id,
16414
- secret_name: binding.secret_name
16415
- }];
16416
- break;
16417
- case "artifacts":
16418
- configObj.artifacts = [...configObj.artifacts ?? [], {
16419
- binding: binding.name,
16420
- namespace: binding.namespace
16421
- }];
16422
- break;
16423
- case "unsafe_hello_world":
16424
- configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
16425
- binding: binding.name,
16426
- enable_timer: binding.enable_timer
16427
- }];
16428
- break;
16429
- case "flagship":
16430
- configObj.flagship = [...configObj.flagship ?? [], {
16431
- binding: binding.name,
16432
- app_id: binding.app_id
16433
- }];
16434
- break;
16435
- case "service":
16436
- configObj.services = [...configObj.services ?? [], {
16437
- binding: binding.name,
16438
- service: binding.service,
16439
- environment: binding.environment,
16440
- entrypoint: binding.entrypoint
16441
- }];
16442
- break;
16443
- case "analytics_engine":
16444
- configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
16445
- binding: binding.name,
16446
- dataset: binding.dataset
16447
- }];
16448
- break;
16449
- case "dispatch_namespace":
16450
- configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
16451
- binding: binding.name,
16452
- namespace: binding.namespace,
16453
- ...binding.outbound && { outbound: {
16454
- service: binding.outbound.worker.service,
16455
- environment: binding.outbound.worker.environment,
16456
- parameters: binding.outbound.params?.map((p$1) => p$1.name) ?? []
16457
- } }
16458
- }];
16459
- break;
16460
- case "logfwdr":
16461
- configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
16462
- name: binding.name,
16463
- destination: binding.destination
16464
- }] };
16465
- break;
16466
- case "wasm_module":
16467
- configObj.wasm_modules = {
16468
- ...configObj.wasm_modules ?? {},
16469
- [binding.name]: binding.part
16470
- };
16471
- break;
16472
- case "text_blob":
16473
- configObj.text_blobs = {
16474
- ...configObj.text_blobs ?? {},
16475
- [binding.name]: binding.part
16476
- };
16477
- break;
16478
- case "data_blob":
16479
- configObj.data_blobs = {
16480
- ...configObj.data_blobs ?? {},
16481
- [binding.name]: binding.part
16482
- };
16483
- break;
16484
- case "secret_text": break;
16485
- case "version_metadata":
16486
- configObj.version_metadata = { binding: binding.name };
16487
- break;
16488
- case "send_email":
16489
- configObj.send_email = [...configObj.send_email ?? [], {
16490
- name: binding.name,
16491
- destination_address: binding.destination_address,
16492
- allowed_destination_addresses: binding.allowed_destination_addresses,
16493
- allowed_sender_addresses: binding.allowed_sender_addresses
16494
- }];
16495
- break;
16496
- case "queue":
16497
- configObj.queues ??= { producers: [] };
16498
- configObj.queues.producers = [...configObj.queues.producers ?? [], {
16499
- binding: binding.name,
16500
- queue: binding.queue_name,
16501
- delivery_delay: binding.delivery_delay
16502
- }];
16503
- break;
16504
- case "vectorize":
16505
- configObj.vectorize = [...configObj.vectorize ?? [], {
16506
- binding: binding.name,
16507
- index_name: binding.index_name
16508
- }];
16509
- break;
16510
- case "ai_search_namespace":
16511
- configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
16512
- binding: binding.name,
16513
- namespace: binding.namespace
16514
- }];
16515
- break;
16516
- case "ai_search":
16517
- configObj.ai_search = [...configObj.ai_search ?? [], {
16518
- binding: binding.name,
16519
- instance_name: binding.instance_name
16520
- }];
16521
- break;
16522
- case "agent_memory":
16523
- configObj.agent_memory = [...configObj.agent_memory ?? [], {
16524
- binding: binding.name,
16525
- namespace: binding.namespace
16526
- }];
16527
- break;
16528
- case "hyperdrive":
16529
- configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
16530
- binding: binding.name,
16531
- id: binding.id
16532
- }];
16533
- break;
16534
- case "mtls_certificate":
16535
- configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
16536
- binding: binding.name,
16537
- certificate_id: binding.certificate_id
16538
- }];
16539
- break;
16540
- case "pipelines":
16541
- configObj.pipelines = [...configObj.pipelines ?? [], {
16542
- binding: binding.name,
16543
- ...binding.stream && { stream: binding.stream },
16544
- ...binding.pipeline && { pipeline: binding.pipeline }
16545
- }];
16546
- break;
16547
- case "assets":
16548
- configObj.assets = { binding: binding.name };
16549
- break;
16550
- case "inherit":
16551
- configObj.unsafe = {
16552
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16553
- metadata: configObj.unsafe?.metadata ?? void 0
16554
- };
16555
- break;
16556
- case "workflow":
16557
- configObj.workflows = [...configObj.workflows ?? [], {
16558
- binding: binding.name,
16559
- name: binding.workflow_name,
16560
- class_name: binding.class_name,
16561
- script_name: binding.script_name
16562
- }];
16563
- break;
16564
- case "worker_loader":
16565
- configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
16566
- break;
16567
- case "ratelimit":
16568
- configObj.ratelimits = [...configObj.ratelimits ?? [], {
16569
- name: binding.name,
16570
- namespace_id: binding.namespace_id,
16571
- simple: {
16572
- limit: binding.simple.limit,
16573
- period: binding.simple.period
16574
- }
16575
- }];
16576
- break;
16577
- case "vpc_service":
16578
- configObj.vpc_services = [...configObj.vpc_services ?? [], {
16579
- binding: binding.name,
16580
- service_id: binding.service_id
16581
- }];
16582
- break;
16583
- case "vpc_network":
16584
- if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16585
- binding: binding.name,
16586
- tunnel_id: binding.tunnel_id
16587
- }];
16588
- else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16589
- binding: binding.name,
16590
- network_id: binding.network_id
16591
- }];
16592
- break;
16593
- default: configObj.unsafe = {
16594
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16595
- metadata: configObj.unsafe?.metadata ?? void 0
16596
- };
16597
- }
16598
- return configObj;
16599
- }, {});
16600
- }
16601
- __name$3(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
16602
- function constructWranglerConfig(config$1) {
16603
- const mappedBindings = mapWorkerMetadataBindings(config$1.bindings);
16604
- const durableObjectClassNames = config$1.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$1.name).map((durableObject) => durableObject.class_name);
16605
- const allRoutes = [...config$1.routes.map((r) => ({
16606
- pattern: r.pattern,
16607
- zone_name: r.zone_name
16608
- })), ...config$1.domains.map((c$1) => ({
16609
- pattern: c$1.hostname,
16610
- zone_name: c$1.zone_name,
16611
- custom_domain: true,
16612
- enabled: c$1.enabled,
16613
- previews_enabled: c$1.previews_enabled
16614
- }))];
16615
- return {
16616
- name: config$1.name,
16617
- main: config$1.entrypoint,
16618
- workers_dev: config$1.subdomain.enabled,
16619
- preview_urls: config$1.subdomain.previews_enabled,
16620
- compatibility_date: config$1.compatibility_date ?? DEFAULT_COMPAT_DATE,
16621
- compatibility_flags: config$1.compatibility_flags,
16622
- ...allRoutes.length ? { routes: allRoutes } : {},
16623
- placement: config$1.placement?.mode === "smart" ? { mode: "smart" } : void 0,
16624
- limits: config$1.limits,
16625
- ...durableObjectClassNames.length && config$1.migration_tag ? { migrations: [{
16626
- tag: config$1.migration_tag,
16627
- new_classes: durableObjectClassNames
16628
- }] } : {},
16629
- ...config$1.schedules.length ? { triggers: { crons: config$1.schedules.map((scheduled) => scheduled.cron) } } : {},
16630
- tail_consumers: config$1.tail_consumers ?? void 0,
16631
- observability: config$1.observability,
16632
- ...mappedBindings
16633
- };
16634
- }
16635
- __name$3(constructWranglerConfig, "constructWranglerConfig");
16636
-
16637
- //#endregion
16638
- //#region ../workers-utils/dist/chunk-C6O4ION7.mjs
16385
+ //#region ../workers-utils/dist/chunk-2Q77CKVU.mjs
16386
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16639
16387
  function isCompatDate(str) {
16640
16388
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
16641
16389
  }
@@ -16673,7 +16421,8 @@ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags)
16673
16421
  __name$3(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
16674
16422
 
16675
16423
  //#endregion
16676
- //#region ../workers-utils/dist/chunk-3IYLA2JH.mjs
16424
+ //#region ../workers-utils/dist/chunk-QSRIB43D.mjs
16425
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16677
16426
  function getBooleanEnvironmentVariableFactory(options) {
16678
16427
  return () => {
16679
16428
  if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
@@ -16717,7 +16466,8 @@ var getDockerPath = getEnvironmentVariableFactory({
16717
16466
  });
16718
16467
 
16719
16468
  //#endregion
16720
- //#region ../workers-utils/dist/chunk-53IMCORZ.mjs
16469
+ //#region ../workers-utils/dist/chunk-MIA26B4M.mjs
16470
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16721
16471
  function isDirectory$1(path$3) {
16722
16472
  return fs.statSync(path$3, { throwIfNoEntry: false })?.isDirectory() ?? false;
16723
16473
  }
@@ -16744,7 +16494,8 @@ function removeDirSync(dirPath) {
16744
16494
  __name$3(removeDirSync, "removeDirSync");
16745
16495
 
16746
16496
  //#endregion
16747
- //#region ../workers-utils/dist/chunk-34VZWBGB.mjs
16497
+ //#region ../workers-utils/dist/chunk-MV2OJK3L.mjs
16498
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16748
16499
  function isWindows$1() {
16749
16500
  return /^win/i.test(process.platform);
16750
16501
  }
@@ -16875,7 +16626,8 @@ function getGlobalWranglerCachePath() {
16875
16626
  __name$3(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
16876
16627
 
16877
16628
  //#endregion
16878
- //#region ../workers-utils/dist/chunk-IYSONYTF.mjs
16629
+ //#region ../workers-utils/dist/chunk-FR75DWDU.mjs
16630
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16879
16631
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
16880
16632
  variableName: "WRANGLER_C3_COMMAND",
16881
16633
  defaultValue: /* @__PURE__ */ __name$3(() => "create cloudflare", "defaultValue")
@@ -39722,6 +39474,7 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
39722
39474
  //#endregion
39723
39475
  //#region ../workers-utils/dist/index.mjs
39724
39476
  var import_undici$3 = require_undici();
39477
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
39725
39478
  var require_vendors$1 = __commonJS$1({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$1, module$1) {
39726
39479
  module$1.exports = [
39727
39480
  {
@@ -42651,7 +42404,13 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
42651
42404
  vars: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vars", validateVars(envName), {}),
42652
42405
  secrets: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "secrets", validateSecrets(envName), void 0),
42653
42406
  define: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "define", validateDefines(envName), {}),
42654
- durable_objects: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateBindingsProperty(envName, validateDurableObjectBinding), { bindings: [] }),
42407
+ durable_objects: (() => {
42408
+ const durableObjects = notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateDurableObjectsProperty(envName, true), { bindings: [] });
42409
+ return {
42410
+ ...durableObjects,
42411
+ bindings: durableObjects.bindings ?? []
42412
+ };
42413
+ })(),
42655
42414
  workflows: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "workflows", all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty), []),
42656
42415
  migrations: inheritable(diagnostics, topLevelEnv, rawEnv, "migrations", validateMigrations, []),
42657
42416
  exports: inheritable(diagnostics, topLevelEnv, rawEnv, "exports", validateExports, {}),
@@ -42913,6 +42672,48 @@ Please add a binding for each to "${fieldPath}.bindings":
42913
42672
  }
42914
42673
  return isValid;
42915
42674
  }, "validateBindingsProperty");
42675
+ var DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS = 1440 * 60;
42676
+ var MILLISECOND_PRECISION_TOLERANCE = 1e-6;
42677
+ var validateDurableObjectsProperty = /* @__PURE__ */ __name$3((envName, allowMissingBindings = false, allowCodeUpdateStrategy = true) => (diagnostics, field, value, config$1) => {
42678
+ const fieldPath = config$1 === void 0 ? `${field}` : `env.${envName}.${field}`;
42679
+ if (value === void 0) return true;
42680
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
42681
+ diagnostics.errors.push(`The field "${fieldPath}" should be an object but got ${JSON.stringify(value)}.`);
42682
+ return false;
42683
+ }
42684
+ validateAdditionalProperties(diagnostics, fieldPath, Object.keys(value), allowCodeUpdateStrategy ? ["bindings", "code_update_strategy"] : ["bindings"]);
42685
+ const bindingsContainer = allowMissingBindings && !hasProperty(value, "bindings") ? {
42686
+ ...value,
42687
+ bindings: []
42688
+ } : value;
42689
+ let isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, field, bindingsContainer, config$1);
42690
+ if (!allowCodeUpdateStrategy) return isValid;
42691
+ if (!hasProperty(value, "code_update_strategy") || value.code_update_strategy === void 0) return isValid;
42692
+ const strategy = value.code_update_strategy;
42693
+ const strategyPath = `${fieldPath}.code_update_strategy`;
42694
+ if (typeof strategy !== "object" || strategy === null || Array.isArray(strategy)) {
42695
+ diagnostics.errors.push(`The field "${strategyPath}" should be an object but got ${JSON.stringify(strategy)}.`);
42696
+ return false;
42697
+ }
42698
+ validateAdditionalProperties(diagnostics, strategyPath, Object.keys(strategy), ["mode", "max_delay"]);
42699
+ isValid = validateRequiredProperty(diagnostics, strategyPath, "mode", hasProperty(strategy, "mode") ? strategy.mode : void 0, "string", ["immediate", "deferred"]) && isValid;
42700
+ const maxDelay = hasProperty(strategy, "max_delay") ? strategy.max_delay : void 0;
42701
+ const maxDelayHasValidType = validateOptionalProperty(diagnostics, strategyPath, "max_delay", maxDelay, "number");
42702
+ isValid = maxDelayHasValidType && isValid;
42703
+ if (maxDelayHasValidType && typeof maxDelay === "number" && (!Number.isFinite(maxDelay) || maxDelay < 0 || maxDelay > DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS)) {
42704
+ 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)}.`);
42705
+ isValid = false;
42706
+ }
42707
+ if (maxDelayHasValidType && typeof maxDelay === "number" && Number.isFinite(maxDelay) && maxDelay >= 0 && maxDelay <= DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS) {
42708
+ const milliseconds = maxDelay * 1e3;
42709
+ const roundedMilliseconds = Math.round(milliseconds);
42710
+ if (maxDelay > 0 && roundedMilliseconds === 0 || Math.abs(milliseconds - roundedMilliseconds) > MILLISECOND_PRECISION_TOLERANCE) {
42711
+ diagnostics.errors.push(`Expected "${strategyPath}.max_delay" to use millisecond precision but got ${JSON.stringify(maxDelay)}.`);
42712
+ isValid = false;
42713
+ }
42714
+ }
42715
+ return isValid;
42716
+ }, "validateDurableObjectsProperty");
42916
42717
  var validateUnsafeSettings = /* @__PURE__ */ __name$3((envName) => (diagnostics, field, value, config$1) => {
42917
42718
  const fieldPath = config$1 === void 0 ? `${field}` : `env.${envName}.${field}`;
42918
42719
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -44576,7 +44377,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$3((envName, configPath) => (
44576
44377
  isValid = validateVars(envName)(diagnostics, `${field}.vars`, previews.vars, void 0) && isValid;
44577
44378
  isValid = validateDefines(envName)(diagnostics, `${field}.define`, previews.define, void 0) && isValid;
44578
44379
  normalizeAndValidatePlacement(diagnostics, void 0, previews, `${field}.placement`);
44579
- isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44380
+ isValid = validateDurableObjectsProperty(envName, false, false)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44580
44381
  isValid = all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty)(diagnostics, `${field}.workflows`, previews.workflows, void 0) && isValid;
44581
44382
  isValid = validateBindingArray(envName, validateKVBinding)(diagnostics, `${field}.kv_namespaces`, previews.kv_namespaces, void 0) && isValid;
44582
44383
  isValid = validateBindingArray(envName, validateSendEmailBinding)(diagnostics, `${field}.send_email`, previews.send_email, void 0) && isValid;
@@ -45019,8 +44820,7 @@ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects,
45019
44820
  const exportsCovers = /* @__PURE__ */ __name$3((className) => {
45020
44821
  const entry = exports$1?.[className];
45021
44822
  if (entry === void 0 || entry.type !== "durable-object") return false;
45022
- const state = entry.state ?? "created";
45023
- return state === "created" || state === "expecting-transfer";
44823
+ return isLiveDurableObjectExport(entry);
45024
44824
  }, "exportsCovers");
45025
44825
  const uncoveredByExports = exportedDurableObjects.filter((binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name));
45026
44826
  if (uncoveredByExports.length === 0 || migrations.length > 0) return;
@@ -45157,6 +44957,8 @@ function isDockerfile(imagePath, configPath) {
45157
44957
  return false;
45158
44958
  }
45159
44959
  __name$3(isDockerfile, "isDockerfile");
44960
+ function assertNever(_value) {}
44961
+ __name$3(assertNever, "assertNever");
45160
44962
  var BINDING_LOCAL_SUPPORT = {
45161
44963
  plain_text: "local-only",
45162
44964
  secret_text: "local-only",
@@ -45206,8 +45008,7 @@ function getBindingLocalSupport(type) {
45206
45008
  }
45207
45009
  __name$3(getBindingLocalSupport, "getBindingLocalSupport");
45208
45010
  function validateBindingRemoteSetting(type, remote, warn) {
45209
- const support = getBindingLocalSupport(type);
45210
- switch (support) {
45011
+ switch (getBindingLocalSupport(type)) {
45211
45012
  case "local-and-remote": return;
45212
45013
  case "local-only":
45213
45014
  if (remote === true) throw new UserError$1(`${getBindingTypeFriendlyName(type)} bindings do not support accessing remote resources.`, { telemetryMessage: "utils bindings unsupported remote resources" });
@@ -45220,7 +45021,6 @@ function validateBindingRemoteSetting(type, remote, warn) {
45220
45021
  if (remote === false) throw new UserError$1(`${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" });
45221
45022
  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.`);
45222
45023
  return;
45223
- default: assertNever(support);
45224
45024
  }
45225
45025
  }
45226
45026
  __name$3(validateBindingRemoteSetting, "validateBindingRemoteSetting");
@@ -45352,6 +45152,290 @@ function findFileUp(name, startDir, lastDir) {
45352
45152
  }
45353
45153
  }
45354
45154
  __name$3(findFileUp, "findFileUp");
45155
+ function mapWorkerMetadataBindings(bindings) {
45156
+ return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
45157
+ switch (binding.type) {
45158
+ case "plain_text":
45159
+ configObj.vars = {
45160
+ ...configObj.vars ?? {},
45161
+ [binding.name]: binding.text
45162
+ };
45163
+ break;
45164
+ case "json":
45165
+ configObj.vars = {
45166
+ ...configObj.vars ?? {},
45167
+ [binding.name]: binding.json
45168
+ };
45169
+ break;
45170
+ case "kv_namespace":
45171
+ configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
45172
+ id: binding.namespace_id,
45173
+ binding: binding.name
45174
+ }];
45175
+ break;
45176
+ case "durable_object_namespace":
45177
+ configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
45178
+ name: binding.name,
45179
+ class_name: binding.class_name,
45180
+ script_name: binding.script_name,
45181
+ environment: binding.environment
45182
+ }] };
45183
+ break;
45184
+ case "d1":
45185
+ configObj.d1_databases = [...configObj.d1_databases ?? [], {
45186
+ binding: binding.name,
45187
+ database_id: binding.id
45188
+ }];
45189
+ break;
45190
+ case "browser":
45191
+ configObj.browser = { binding: binding.name };
45192
+ break;
45193
+ case "ai":
45194
+ configObj.ai = { binding: binding.name };
45195
+ break;
45196
+ case "images":
45197
+ configObj.images = { binding: binding.name };
45198
+ break;
45199
+ case "stream":
45200
+ configObj.stream = { binding: binding.name };
45201
+ break;
45202
+ case "media":
45203
+ configObj.media = { binding: binding.name };
45204
+ break;
45205
+ case "r2_bucket":
45206
+ configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
45207
+ binding: binding.name,
45208
+ bucket_name: binding.bucket_name,
45209
+ jurisdiction: binding.jurisdiction
45210
+ }];
45211
+ break;
45212
+ case "secrets_store_secret":
45213
+ configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
45214
+ binding: binding.name,
45215
+ store_id: binding.store_id,
45216
+ secret_name: binding.secret_name
45217
+ }];
45218
+ break;
45219
+ case "artifacts":
45220
+ configObj.artifacts = [...configObj.artifacts ?? [], {
45221
+ binding: binding.name,
45222
+ namespace: binding.namespace
45223
+ }];
45224
+ break;
45225
+ case "unsafe_hello_world":
45226
+ configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
45227
+ binding: binding.name,
45228
+ enable_timer: binding.enable_timer
45229
+ }];
45230
+ break;
45231
+ case "flagship":
45232
+ configObj.flagship = [...configObj.flagship ?? [], {
45233
+ binding: binding.name,
45234
+ app_id: binding.app_id
45235
+ }];
45236
+ break;
45237
+ case "service":
45238
+ configObj.services = [...configObj.services ?? [], {
45239
+ binding: binding.name,
45240
+ service: binding.service,
45241
+ environment: binding.environment,
45242
+ entrypoint: binding.entrypoint
45243
+ }];
45244
+ break;
45245
+ case "analytics_engine":
45246
+ configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
45247
+ binding: binding.name,
45248
+ dataset: binding.dataset
45249
+ }];
45250
+ break;
45251
+ case "dispatch_namespace":
45252
+ configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
45253
+ binding: binding.name,
45254
+ namespace: binding.namespace,
45255
+ ...binding.outbound && { outbound: {
45256
+ service: binding.outbound.worker.service,
45257
+ environment: binding.outbound.worker.environment,
45258
+ parameters: binding.outbound.params?.map((p$1) => p$1.name) ?? []
45259
+ } }
45260
+ }];
45261
+ break;
45262
+ case "logfwdr":
45263
+ configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
45264
+ name: binding.name,
45265
+ destination: binding.destination
45266
+ }] };
45267
+ break;
45268
+ case "wasm_module":
45269
+ configObj.wasm_modules = {
45270
+ ...configObj.wasm_modules ?? {},
45271
+ [binding.name]: binding.part
45272
+ };
45273
+ break;
45274
+ case "text_blob":
45275
+ configObj.text_blobs = {
45276
+ ...configObj.text_blobs ?? {},
45277
+ [binding.name]: binding.part
45278
+ };
45279
+ break;
45280
+ case "data_blob":
45281
+ configObj.data_blobs = {
45282
+ ...configObj.data_blobs ?? {},
45283
+ [binding.name]: binding.part
45284
+ };
45285
+ break;
45286
+ case "secret_text": break;
45287
+ case "version_metadata":
45288
+ configObj.version_metadata = { binding: binding.name };
45289
+ break;
45290
+ case "send_email":
45291
+ configObj.send_email = [...configObj.send_email ?? [], {
45292
+ name: binding.name,
45293
+ destination_address: binding.destination_address,
45294
+ allowed_destination_addresses: binding.allowed_destination_addresses,
45295
+ allowed_sender_addresses: binding.allowed_sender_addresses
45296
+ }];
45297
+ break;
45298
+ case "queue":
45299
+ configObj.queues ??= { producers: [] };
45300
+ configObj.queues.producers = [...configObj.queues.producers ?? [], {
45301
+ binding: binding.name,
45302
+ queue: binding.queue_name,
45303
+ delivery_delay: binding.delivery_delay
45304
+ }];
45305
+ break;
45306
+ case "vectorize":
45307
+ configObj.vectorize = [...configObj.vectorize ?? [], {
45308
+ binding: binding.name,
45309
+ index_name: binding.index_name
45310
+ }];
45311
+ break;
45312
+ case "ai_search_namespace":
45313
+ configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
45314
+ binding: binding.name,
45315
+ namespace: binding.namespace
45316
+ }];
45317
+ break;
45318
+ case "ai_search":
45319
+ configObj.ai_search = [...configObj.ai_search ?? [], {
45320
+ binding: binding.name,
45321
+ instance_name: binding.instance_name
45322
+ }];
45323
+ break;
45324
+ case "agent_memory":
45325
+ configObj.agent_memory = [...configObj.agent_memory ?? [], {
45326
+ binding: binding.name,
45327
+ namespace: binding.namespace
45328
+ }];
45329
+ break;
45330
+ case "hyperdrive":
45331
+ configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
45332
+ binding: binding.name,
45333
+ id: binding.id
45334
+ }];
45335
+ break;
45336
+ case "mtls_certificate":
45337
+ configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
45338
+ binding: binding.name,
45339
+ certificate_id: binding.certificate_id
45340
+ }];
45341
+ break;
45342
+ case "pipelines":
45343
+ configObj.pipelines = [...configObj.pipelines ?? [], {
45344
+ binding: binding.name,
45345
+ ...binding.stream && { stream: binding.stream },
45346
+ ...binding.pipeline && { pipeline: binding.pipeline }
45347
+ }];
45348
+ break;
45349
+ case "assets":
45350
+ configObj.assets = { binding: binding.name };
45351
+ break;
45352
+ case "inherit":
45353
+ configObj.unsafe = {
45354
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45355
+ metadata: configObj.unsafe?.metadata ?? void 0
45356
+ };
45357
+ break;
45358
+ case "workflow":
45359
+ configObj.workflows = [...configObj.workflows ?? [], {
45360
+ binding: binding.name,
45361
+ name: binding.workflow_name,
45362
+ class_name: binding.class_name,
45363
+ script_name: binding.script_name
45364
+ }];
45365
+ break;
45366
+ case "worker_loader":
45367
+ configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
45368
+ break;
45369
+ case "ratelimit":
45370
+ configObj.ratelimits = [...configObj.ratelimits ?? [], {
45371
+ name: binding.name,
45372
+ namespace_id: binding.namespace_id,
45373
+ simple: {
45374
+ limit: binding.simple.limit,
45375
+ period: binding.simple.period
45376
+ }
45377
+ }];
45378
+ break;
45379
+ case "vpc_service":
45380
+ configObj.vpc_services = [...configObj.vpc_services ?? [], {
45381
+ binding: binding.name,
45382
+ service_id: binding.service_id
45383
+ }];
45384
+ break;
45385
+ case "vpc_network":
45386
+ if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45387
+ binding: binding.name,
45388
+ tunnel_id: binding.tunnel_id
45389
+ }];
45390
+ else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45391
+ binding: binding.name,
45392
+ network_id: binding.network_id
45393
+ }];
45394
+ break;
45395
+ default: configObj.unsafe = {
45396
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45397
+ metadata: configObj.unsafe?.metadata ?? void 0
45398
+ };
45399
+ }
45400
+ return configObj;
45401
+ }, {});
45402
+ }
45403
+ __name$3(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
45404
+ var DEFAULT_COMPAT_DATE = "2026-09-25";
45405
+ function constructWranglerConfig(config$1) {
45406
+ const mappedBindings = mapWorkerMetadataBindings(config$1.bindings);
45407
+ const durableObjectClassNames = config$1.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$1.name).map((durableObject) => durableObject.class_name);
45408
+ const allRoutes = [...config$1.routes.map((r2) => ({
45409
+ pattern: r2.pattern,
45410
+ zone_name: r2.zone_name
45411
+ })), ...config$1.domains.map((c$1) => ({
45412
+ pattern: c$1.hostname,
45413
+ zone_name: c$1.zone_name,
45414
+ custom_domain: true,
45415
+ enabled: c$1.enabled,
45416
+ previews_enabled: c$1.previews_enabled
45417
+ }))];
45418
+ return {
45419
+ name: config$1.name,
45420
+ main: config$1.entrypoint,
45421
+ workers_dev: config$1.subdomain.enabled,
45422
+ preview_urls: config$1.subdomain.previews_enabled,
45423
+ compatibility_date: config$1.compatibility_date ?? DEFAULT_COMPAT_DATE,
45424
+ compatibility_flags: config$1.compatibility_flags,
45425
+ ...allRoutes.length ? { routes: allRoutes } : {},
45426
+ placement: config$1.placement?.mode === "smart" ? { mode: "smart" } : void 0,
45427
+ limits: config$1.limits,
45428
+ ...durableObjectClassNames.length && config$1.migration_tag ? { migrations: [{
45429
+ tag: config$1.migration_tag,
45430
+ new_classes: durableObjectClassNames
45431
+ }] } : {},
45432
+ ...config$1.schedules.length ? { triggers: { crons: config$1.schedules.map((scheduled) => scheduled.cron) } } : {},
45433
+ tail_consumers: config$1.tail_consumers ?? void 0,
45434
+ observability: config$1.observability,
45435
+ ...mappedBindings
45436
+ };
45437
+ }
45438
+ __name$3(constructWranglerConfig, "constructWranglerConfig");
45355
45439
  function assertNever2(_value) {}
45356
45440
  __name$3(assertNever2, "assertNever");
45357
45441
  function convertConfigToBindings(config$1, options) {
@@ -47399,7 +47483,7 @@ async function fetchLatestNpmVersion(name, version$2) {
47399
47483
  __name$3(fetchLatestNpmVersion, "fetchLatestNpmVersion");
47400
47484
  async function openInBrowser(url$2, logger$1) {
47401
47485
  try {
47402
- const { default: open } = await import("./open-PBXRGS4R-CzyP5HqI.mjs");
47486
+ const { default: open } = await import("./open-PCXX3ZDZ-DUIcTUjC.mjs");
47403
47487
  (await open(url$2)).on("error", (err) => {
47404
47488
  handleBrowserOpenError(url$2, err, logger$1);
47405
47489
  });
@@ -49625,7 +49709,7 @@ function ensurePosixLikePath(filePath) {
49625
49709
  }
49626
49710
  const __filename$2 = fileURLToPath(import.meta.url);
49627
49711
  const __dirname$1 = path.dirname(__filename$2);
49628
- const require$1 = createRequire(__filename$2);
49712
+ const require$2 = createRequire(__filename$2);
49629
49713
  const distPath = ensurePosixLikePath(path.resolve(__dirname$1, ".."));
49630
49714
  const libPath = posixPath.join(distPath, "worker", "lib");
49631
49715
  const emptyLibPath = posixPath.join(libPath, "cloudflare/empty-internal.cjs");
@@ -49771,7 +49855,7 @@ async function viteResolve(vite, specifier, referrer, isRequire) {
49771
49855
  custom: { "node-resolve": { isRequire } }
49772
49856
  });
49773
49857
  if (resolved === null) {
49774
- if (isRequire && specifier[0] === ".") return require$1.resolve(specifier, { paths: [referrer] });
49858
+ if (isRequire && specifier[0] === ".") return require$2.resolve(specifier, { paths: [referrer] });
49775
49859
  throw new Error("Not found");
49776
49860
  }
49777
49861
  if (resolved.id === "__vite-browser-external") return emptyLibPath;
@@ -52622,7 +52706,8 @@ const getConfirmRenderers = (config$1) => {
52622
52706
  };
52623
52707
 
52624
52708
  //#endregion
52625
- //#region ../workers-auth/dist/chunk-O6YSETKJ.mjs
52709
+ //#region ../workers-auth/dist/chunk-VAZEJK55.mjs
52710
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
52626
52711
  var __defProp$2 = Object.defineProperty;
52627
52712
  var __name$2 = (target, value) => __defProp$2(target, "name", {
52628
52713
  value,
@@ -52630,8 +52715,9 @@ var __name$2 = (target, value) => __defProp$2(target, "name", {
52630
52715
  });
52631
52716
 
52632
52717
  //#endregion
52633
- //#region ../workers-auth/dist/chunk-WMSASLDV.mjs
52718
+ //#region ../workers-auth/dist/chunk-RV27PEH3.mjs
52634
52719
  var import_undici$2 = require_undici();
52720
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
52635
52721
  var hasWarnedAboutDeprecatedV1ApiToken = false;
52636
52722
  function readStoredAuthState(options) {
52637
52723
  const { configOverride, warningLogger, storage } = options;
@@ -55076,7 +55162,8 @@ function scrubEncryptedCredentials(options) {
55076
55162
  __name$2(scrubEncryptedCredentials, "scrubEncryptedCredentials");
55077
55163
 
55078
55164
  //#endregion
55079
- //#region ../workers-auth/dist/chunk-V6MEAFHI.mjs
55165
+ //#region ../workers-auth/dist/chunk-2JQZNT7W.mjs
55166
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
55080
55167
  function createPreferences(getConfigPath) {
55081
55168
  function getUserPreferencesPath() {
55082
55169
  return path.resolve(getConfigPath(), "preferences.json");
@@ -56207,6 +56294,7 @@ __name$2(createAuthConfigFileHelpers, "createAuthConfigFileHelpers");
56207
56294
 
56208
56295
  //#endregion
56209
56296
  //#region ../workers-auth/dist/cf/index.mjs
56297
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56210
56298
  var CF_KEYRING_SERVICE_NAME = "cloudflare";
56211
56299
  var CF_CLI_NAME = "cf";
56212
56300
  var CF_DISPLAY_NAME = "cf";
@@ -56795,6 +56883,7 @@ __name$2(setKeyringPreference$1, "setKeyringPreference");
56795
56883
 
56796
56884
  //#endregion
56797
56885
  //#region ../workers-auth/dist/wrangler/index.mjs
56886
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
56798
56887
  var DefaultScopes = {
56799
56888
  "account:read": "See your account info such as account details, analytics, and memberships.",
56800
56889
  "user:read": "See your user info such as name, email address, and account memberships.",
@@ -60496,7 +60585,8 @@ var import_websocket = /* @__PURE__ */ __toESM$1(require_websocket(), 1);
60496
60585
  var import_websocket_server = /* @__PURE__ */ __toESM$1(require_websocket_server(), 1);
60497
60586
 
60498
60587
  //#endregion
60499
- //#region ../deploy-helpers/dist/chunk-Q72B4Q5Z.mjs
60588
+ //#region ../deploy-helpers/dist/chunk-U6NEESU5.mjs
60589
+ const require$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
60500
60590
  var __defProp$1 = Object.defineProperty;
60501
60591
  var __name$1 = (target, value) => __defProp$1(target, "name", {
60502
60592
  value,
@@ -60617,9 +60707,10 @@ var require_command_exists = /* @__PURE__ */ __commonJS$2({ "../../node_modules/
60617
60707
  }) });
60618
60708
 
60619
60709
  //#endregion
60620
- //#region ../deploy-helpers/dist/chunk-QBZBEHZB.mjs
60710
+ //#region ../deploy-helpers/dist/chunk-M77HNR46.mjs
60621
60711
  var import_undici$1 = require_undici();
60622
60712
  var import_command_exists = require_command_exists();
60713
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
60623
60714
  function handleUnsafeCapnp(capnp) {
60624
60715
  if (capnp.compiled_schema) return readFileSync(resolve(capnp.compiled_schema));
60625
60716
  const { base_path, source_schemas } = capnp;
@@ -60659,7 +60750,7 @@ function fromMimeType(mimeType) {
60659
60750
  __name$1(fromMimeType, "fromMimeType");
60660
60751
  function createWorkerUploadForm(worker, bindings, options) {
60661
60752
  const formData = new import_undici$1.FormData();
60662
- 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$1, package_dependencies } = worker;
60753
+ 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$1, package_dependencies } = worker;
60663
60754
  const assetConfig = {
60664
60755
  html_handling: assets?.assetConfig?.html_handling,
60665
60756
  not_found_handling: assets?.assetConfig?.not_found_handling,
@@ -61142,6 +61233,7 @@ function createWorkerUploadForm(worker, bindings, options) {
61142
61233
  ...compatibility_date && { compatibility_date },
61143
61234
  ...compatibility_flags && { compatibility_flags },
61144
61235
  ...migrations && { migrations },
61236
+ ...code_update_strategy && { code_update_strategy },
61145
61237
  ...configuredExports && Object.keys(configuredExports).length > 0 && { exports: configuredExports },
61146
61238
  capnp_schema: capnpSchemaOutputFile,
61147
61239
  ...keep_bindings && { keep_bindings },
@@ -61172,7 +61264,7 @@ __name$1(createWorkerUploadForm, "createWorkerUploadForm");
61172
61264
  //#endregion
61173
61265
  //#region ../remote-bindings/dist/index.mjs
61174
61266
  var import_undici = require_undici();
61175
- var version = "0.0.34";
61267
+ var version = "0.0.36";
61176
61268
  var NoDefaultValueProvided = class extends UserError$1 {
61177
61269
  constructor() {
61178
61270
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
@@ -62503,9 +62595,9 @@ const WorkflowExportSchema = z$1.strictObject({
62503
62595
  limits: z$1.strictObject({ steps: z$1.number().int().min(1).optional() }).optional(),
62504
62596
  concurrency: z$1.strictObject({ limit: z$1.number().int().min(1).optional() }).optional(),
62505
62597
  schedules: z$1.union([z$1.string().min(1), z$1.array(z$1.string().min(1)).min(1)]).optional(),
62506
- default_retention: z$1.strictObject({
62507
- success_retention: WorkflowRetentionSchema.optional(),
62508
- error_retention: WorkflowRetentionSchema.optional()
62598
+ defaultRetention: z$1.strictObject({
62599
+ successRetention: WorkflowRetentionSchema.optional(),
62600
+ errorRetention: WorkflowRetentionSchema.optional()
62509
62601
  }).optional()
62510
62602
  });
62511
62603
  const DurableObjectCreatedSqliteExportSchema = DurableObjectCreatedExportSchema.extend({ storage: z$1.literal("sqlite") });
@@ -62748,11 +62840,13 @@ var import_dist = (/* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ts-ded
62748
62840
  }
62749
62841
  exports$1.dedent = dedent$1$1;
62750
62842
  }) }))();
62843
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
62751
62844
  var __defProp = Object.defineProperty;
62752
62845
  var __name = (target, value) => __defProp(target, "name", {
62753
62846
  value,
62754
62847
  configurable: true
62755
62848
  });
62849
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
62756
62850
  var UserError = class extends Error {
62757
62851
  static {
62758
62852
  __name(this, "UserError");
@@ -63280,10 +63374,21 @@ function convertExports(config$1, result) {
63280
63374
  const converted = {};
63281
63375
  const unknownExports = {};
63282
63376
  for (const [exportName, value] of Object.entries(exports$2)) {
63283
- if (value.type === "worker" || value.type === "workflow") {
63377
+ if (value.type === "worker") {
63284
63378
  converted[exportName] = value;
63285
63379
  continue;
63286
63380
  }
63381
+ if (value.type === "workflow") {
63382
+ const { defaultRetention,...workflow } = value;
63383
+ converted[exportName] = {
63384
+ ...workflow,
63385
+ ...defaultRetention !== void 0 && { default_retention: {
63386
+ ...defaultRetention.successRetention !== void 0 && { success_retention: defaultRetention.successRetention },
63387
+ ...defaultRetention.errorRetention !== void 0 && { error_retention: defaultRetention.errorRetention }
63388
+ } }
63389
+ };
63390
+ continue;
63391
+ }
63287
63392
  if (value.type !== "durable-object") {
63288
63393
  unknownExports[exportName] = value;
63289
63394
  continue;