@cloudflare/vite-plugin 2.0.0-beta.sha-805ec1ff3 → 2.0.0-beta.sha-6d8b1ee0b

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,6 +1,6 @@
1
- import { a as __toESM$1, c as __toESM$2, i as __require$1, n as __export, o as __commonJS$2, r as __name$5, s as __require$2, t as __commonJS$1 } from "./chunk-6LYDFTTF-Kffb903d.mjs";
1
+ import { a as __toESM$1, i as __require$1, n as __export, r as __name$5, t as __commonJS$1 } from "./chunk-53YJWLG7-dSmyuxCA.mjs";
2
2
  import { builtinModules, createRequire } from "node:module";
3
- import * as fs$3 from "node:fs";
3
+ import * as fs$2 from "node:fs";
4
4
  import fs2, { accessSync, appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
5
5
  import * as path from "node:path";
6
6
  import path__default, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
@@ -8,7 +8,7 @@ import assert from "node:assert";
8
8
  import os, { arch, release } from "node:os";
9
9
  import * as util from "node:util";
10
10
  import { TextEncoder as TextEncoder$1, format, inspect, promisify, stripVTControlCharacters, styleText } from "node:util";
11
- import process$1, { exit, stdin, stdout } from "node:process";
11
+ import process5, { exit, stdin, stdout } from "node:process";
12
12
  import tty from "node:tty";
13
13
  import url, { URL as URL$1, URLSearchParams as URLSearchParams$1, fileURLToPath, pathToFileURL } from "node:url";
14
14
  import net, { createServer } from "node:net";
@@ -17,8 +17,8 @@ import events, { EventEmitter, once } from "node:events";
17
17
  import { Buffer as Buffer$1 } from "node:buffer";
18
18
  import crypto2, { createCipheriv, createDecipheriv, createHash, randomBytes, randomUUID, webcrypto } from "node:crypto";
19
19
  import { AsyncLocalStorage } from "node:async_hooks";
20
- import * as fs$1 from "node:fs/promises";
21
- import fs, { constants as constants$1 } from "node:fs/promises";
20
+ import * as fs from "node:fs/promises";
21
+ import fs4, { constants as constants$1 } from "node:fs/promises";
22
22
  import childProcess, { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
23
23
  import * as timersPromises from "node:timers/promises";
24
24
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
@@ -35,7 +35,35 @@ import { defineEnv } from "unenv";
35
35
  import { execSync } from "child_process";
36
36
  import { WebSocket, WebSocketServer } from "ws";
37
37
 
38
- //#region ../workers-utils/dist/chunk-CNOKBYMZ.mjs
38
+ //#region rolldown:runtime
39
+ var __create$1 = Object.create;
40
+ var __defProp$5 = Object.defineProperty;
41
+ var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
42
+ var __getOwnPropNames$1 = Object.getOwnPropertyNames;
43
+ var __getProtoOf$1 = Object.getPrototypeOf;
44
+ var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
45
+ var __commonJS$2 = (cb, mod$1) => function() {
46
+ return mod$1 || (0, cb[__getOwnPropNames$1(cb)[0]])((mod$1 = { exports: {} }).exports, mod$1), mod$1.exports;
47
+ };
48
+ var __copyProps$1 = (to, from, except, desc) => {
49
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames$1(from), i$1 = 0, n$1 = keys.length, key; i$1 < n$1; i$1++) {
50
+ key = keys[i$1];
51
+ if (!__hasOwnProp$1.call(to, key) && key !== except) __defProp$5(to, key, {
52
+ get: ((k) => from[k]).bind(null, key),
53
+ enumerable: !(desc = __getOwnPropDesc$1(from, key)) || desc.enumerable
54
+ });
55
+ }
56
+ return to;
57
+ };
58
+ 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$5(target$1, "default", {
59
+ value: mod$1,
60
+ enumerable: true
61
+ }) : target$1, mod$1));
62
+ var __require$2 = /* @__PURE__ */ createRequire(import.meta.url);
63
+
64
+ //#endregion
65
+ //#region ../workers-utils/dist/chunk-R4LWG6VN.mjs
66
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
39
67
  var external_exports$1 = {};
40
68
  __export(external_exports$1, {
41
69
  $brand: () => $brand,
@@ -539,7 +567,7 @@ __export(core_exports2, {
539
567
  parse: () => parse$5,
540
568
  parseAsync: () => parseAsync$2,
541
569
  prettifyError: () => prettifyError,
542
- process: () => process$4,
570
+ process: () => process$3,
543
571
  regexes: () => regexes_exports$1,
544
572
  registry: () => registry$1,
545
573
  safeDecode: () => safeDecode$2,
@@ -10925,7 +10953,7 @@ function initializeContext$1(params) {
10925
10953
  };
10926
10954
  }
10927
10955
  __name$5(initializeContext$1, "initializeContext");
10928
- function process$4(schema, ctx, _params = {
10956
+ function process$3(schema, ctx, _params = {
10929
10957
  path: [],
10930
10958
  schemaPath: []
10931
10959
  }) {
@@ -10962,7 +10990,7 @@ function process$4(schema, ctx, _params = {
10962
10990
  const parent = schema._zod.parent;
10963
10991
  if (parent) {
10964
10992
  if (!result.ref) result.ref = parent;
10965
- process$4(parent, ctx, params);
10993
+ process$3(parent, ctx, params);
10966
10994
  ctx.seen.get(parent).isParent = true;
10967
10995
  }
10968
10996
  }
@@ -10976,7 +11004,7 @@ function process$4(schema, ctx, _params = {
10976
11004
  delete result.schema._prefault;
10977
11005
  return ctx.seen.get(schema).schema;
10978
11006
  }
10979
- __name$5(process$4, "process");
11007
+ __name$5(process$3, "process");
10980
11008
  function extractDefs$1(ctx, schema) {
10981
11009
  const root = ctx.seen.get(schema);
10982
11010
  if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -11183,7 +11211,7 @@ var createToJSONSchemaMethod$1 = /* @__PURE__ */ __name$5((schema, processors =
11183
11211
  ...params,
11184
11212
  processors
11185
11213
  });
11186
- process$4(schema, ctx);
11214
+ process$3(schema, ctx);
11187
11215
  extractDefs$1(ctx, schema);
11188
11216
  return finalize$1(ctx, schema);
11189
11217
  }, "createToJSONSchemaMethod");
@@ -11195,7 +11223,7 @@ var createStandardJSONSchemaMethod$1 = /* @__PURE__ */ __name$5((schema, io, pro
11195
11223
  io,
11196
11224
  processors
11197
11225
  });
11198
- process$4(schema, ctx);
11226
+ process$3(schema, ctx);
11199
11227
  extractDefs$1(ctx, schema);
11200
11228
  return finalize$1(ctx, schema);
11201
11229
  }, "createStandardJSONSchemaMethod");
@@ -11360,7 +11388,7 @@ var arrayProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11360
11388
  if (typeof minimum === "number") json2.minItems = minimum;
11361
11389
  if (typeof maximum === "number") json2.maxItems = maximum;
11362
11390
  json2.type = "array";
11363
- json2.items = process$4(def.element, ctx, {
11391
+ json2.items = process$3(def.element, ctx, {
11364
11392
  ...params,
11365
11393
  path: [...params.path, "items"]
11366
11394
  });
@@ -11371,7 +11399,7 @@ var objectProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11371
11399
  json2.type = "object";
11372
11400
  json2.properties = {};
11373
11401
  const shape = def.shape;
11374
- for (const key in shape) json2.properties[key] = process$4(shape[key], ctx, {
11402
+ for (const key in shape) json2.properties[key] = process$3(shape[key], ctx, {
11375
11403
  ...params,
11376
11404
  path: [
11377
11405
  ...params.path,
@@ -11389,7 +11417,7 @@ var objectProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11389
11417
  if (def.catchall?._zod.def.type === "never") json2.additionalProperties = false;
11390
11418
  else if (!def.catchall) {
11391
11419
  if (ctx.io === "output") json2.additionalProperties = false;
11392
- } else if (def.catchall) json2.additionalProperties = process$4(def.catchall, ctx, {
11420
+ } else if (def.catchall) json2.additionalProperties = process$3(def.catchall, ctx, {
11393
11421
  ...params,
11394
11422
  path: [...params.path, "additionalProperties"]
11395
11423
  });
@@ -11397,7 +11425,7 @@ var objectProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11397
11425
  var unionProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11398
11426
  const def = schema._zod.def;
11399
11427
  const isExclusive = def.inclusive === false;
11400
- const options = def.options.map((x, i$1) => process$4(x, ctx, {
11428
+ const options = def.options.map((x, i$1) => process$3(x, ctx, {
11401
11429
  ...params,
11402
11430
  path: [
11403
11431
  ...params.path,
@@ -11410,7 +11438,7 @@ var unionProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) =>
11410
11438
  }, "unionProcessor");
11411
11439
  var intersectionProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11412
11440
  const def = schema._zod.def;
11413
- const a = process$4(def.left, ctx, {
11441
+ const a = process$3(def.left, ctx, {
11414
11442
  ...params,
11415
11443
  path: [
11416
11444
  ...params.path,
@@ -11418,7 +11446,7 @@ var intersectionProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, para
11418
11446
  0
11419
11447
  ]
11420
11448
  });
11421
- const b = process$4(def.right, ctx, {
11449
+ const b = process$3(def.right, ctx, {
11422
11450
  ...params,
11423
11451
  path: [
11424
11452
  ...params.path,
@@ -11435,7 +11463,7 @@ var tupleProcessor = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11435
11463
  json2.type = "array";
11436
11464
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
11437
11465
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
11438
- const prefixItems = def.items.map((x, i$1) => process$4(x, ctx, {
11466
+ const prefixItems = def.items.map((x, i$1) => process$3(x, ctx, {
11439
11467
  ...params,
11440
11468
  path: [
11441
11469
  ...params.path,
@@ -11443,7 +11471,7 @@ var tupleProcessor = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11443
11471
  i$1
11444
11472
  ]
11445
11473
  }));
11446
- const rest = def.rest ? process$4(def.rest, ctx, {
11474
+ const rest = def.rest ? process$3(def.rest, ctx, {
11447
11475
  ...params,
11448
11476
  path: [
11449
11477
  ...params.path,
@@ -11474,7 +11502,7 @@ var recordProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11474
11502
  const keyType = def.keyType;
11475
11503
  const patterns = keyType._zod.bag?.patterns;
11476
11504
  if (def.mode === "loose" && patterns && patterns.size > 0) {
11477
- const valueSchema = process$4(def.valueType, ctx, {
11505
+ const valueSchema = process$3(def.valueType, ctx, {
11478
11506
  ...params,
11479
11507
  path: [
11480
11508
  ...params.path,
@@ -11485,11 +11513,11 @@ var recordProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11485
11513
  json2.patternProperties = {};
11486
11514
  for (const pattern of patterns) json2.patternProperties[pattern.source] = valueSchema;
11487
11515
  } else {
11488
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json2.propertyNames = process$4(def.keyType, ctx, {
11516
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json2.propertyNames = process$3(def.keyType, ctx, {
11489
11517
  ...params,
11490
11518
  path: [...params.path, "propertyNames"]
11491
11519
  });
11492
- json2.additionalProperties = process$4(def.valueType, ctx, {
11520
+ json2.additionalProperties = process$3(def.valueType, ctx, {
11493
11521
  ...params,
11494
11522
  path: [...params.path, "additionalProperties"]
11495
11523
  });
@@ -11502,7 +11530,7 @@ var recordProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) =>
11502
11530
  }, "recordProcessor");
11503
11531
  var nullableProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11504
11532
  const def = schema._zod.def;
11505
- const inner = process$4(def.innerType, ctx, params);
11533
+ const inner = process$3(def.innerType, ctx, params);
11506
11534
  const seen = ctx.seen.get(schema);
11507
11535
  if (ctx.target === "openapi-3.0") {
11508
11536
  seen.ref = def.innerType;
@@ -11511,27 +11539,27 @@ var nullableProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params)
11511
11539
  }, "nullableProcessor");
11512
11540
  var nonoptionalProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11513
11541
  const def = schema._zod.def;
11514
- process$4(def.innerType, ctx, params);
11542
+ process$3(def.innerType, ctx, params);
11515
11543
  const seen = ctx.seen.get(schema);
11516
11544
  seen.ref = def.innerType;
11517
11545
  }, "nonoptionalProcessor");
11518
11546
  var defaultProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11519
11547
  const def = schema._zod.def;
11520
- process$4(def.innerType, ctx, params);
11548
+ process$3(def.innerType, ctx, params);
11521
11549
  const seen = ctx.seen.get(schema);
11522
11550
  seen.ref = def.innerType;
11523
11551
  json2.default = JSON.parse(JSON.stringify(def.defaultValue));
11524
11552
  }, "defaultProcessor");
11525
11553
  var prefaultProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11526
11554
  const def = schema._zod.def;
11527
- process$4(def.innerType, ctx, params);
11555
+ process$3(def.innerType, ctx, params);
11528
11556
  const seen = ctx.seen.get(schema);
11529
11557
  seen.ref = def.innerType;
11530
11558
  if (ctx.io === "input") json2._prefault = JSON.parse(JSON.stringify(def.defaultValue));
11531
11559
  }, "prefaultProcessor");
11532
11560
  var catchProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11533
11561
  const def = schema._zod.def;
11534
- process$4(def.innerType, ctx, params);
11562
+ process$3(def.innerType, ctx, params);
11535
11563
  const seen = ctx.seen.get(schema);
11536
11564
  seen.ref = def.innerType;
11537
11565
  let catchValue;
@@ -11546,32 +11574,32 @@ var pipeProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11546
11574
  const def = schema._zod.def;
11547
11575
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
11548
11576
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
11549
- process$4(innerType, ctx, params);
11577
+ process$3(innerType, ctx, params);
11550
11578
  const seen = ctx.seen.get(schema);
11551
11579
  seen.ref = innerType;
11552
11580
  }, "pipeProcessor");
11553
11581
  var readonlyProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, json2, params) => {
11554
11582
  const def = schema._zod.def;
11555
- process$4(def.innerType, ctx, params);
11583
+ process$3(def.innerType, ctx, params);
11556
11584
  const seen = ctx.seen.get(schema);
11557
11585
  seen.ref = def.innerType;
11558
11586
  json2.readOnly = true;
11559
11587
  }, "readonlyProcessor");
11560
11588
  var promiseProcessor = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11561
11589
  const def = schema._zod.def;
11562
- process$4(def.innerType, ctx, params);
11590
+ process$3(def.innerType, ctx, params);
11563
11591
  const seen = ctx.seen.get(schema);
11564
11592
  seen.ref = def.innerType;
11565
11593
  }, "promiseProcessor");
11566
11594
  var optionalProcessor$1 = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11567
11595
  const def = schema._zod.def;
11568
- process$4(def.innerType, ctx, params);
11596
+ process$3(def.innerType, ctx, params);
11569
11597
  const seen = ctx.seen.get(schema);
11570
11598
  seen.ref = def.innerType;
11571
11599
  }, "optionalProcessor");
11572
11600
  var lazyProcessor = /* @__PURE__ */ __name$5((schema, ctx, _json, params) => {
11573
11601
  const innerType = schema._zod.innerType;
11574
- process$4(innerType, ctx, params);
11602
+ process$3(innerType, ctx, params);
11575
11603
  const seen = ctx.seen.get(schema);
11576
11604
  seen.ref = innerType;
11577
11605
  }, "lazyProcessor");
@@ -11626,7 +11654,7 @@ function toJSONSchema(input, params) {
11626
11654
  const defs = {};
11627
11655
  for (const entry of registry2._idmap.entries()) {
11628
11656
  const [_, schema] = entry;
11629
- process$4(schema, ctx2);
11657
+ process$3(schema, ctx2);
11630
11658
  }
11631
11659
  const schemas = {};
11632
11660
  ctx2.external = {
@@ -11646,7 +11674,7 @@ function toJSONSchema(input, params) {
11646
11674
  ...params,
11647
11675
  processors: allProcessors
11648
11676
  });
11649
- process$4(input, ctx);
11677
+ process$3(input, ctx);
11650
11678
  extractDefs$1(ctx, input);
11651
11679
  return finalize$1(ctx, input);
11652
11680
  }
@@ -11707,7 +11735,7 @@ var JSONSchemaGenerator = class {
11707
11735
  path: [],
11708
11736
  schemaPath: []
11709
11737
  }) {
11710
- return process$4(schema, this.ctx, _params);
11738
+ return process$3(schema, this.ctx, _params);
11711
11739
  }
11712
11740
  /**
11713
11741
  * Emit the final JSON Schema after processing.
@@ -13759,7 +13787,8 @@ function formatZodError(error51) {
13759
13787
  __name$5(formatZodError, "formatZodError");
13760
13788
 
13761
13789
  //#endregion
13762
- //#region ../workers-utils/dist/chunk-G5FCNCLK.mjs
13790
+ //#region ../workers-utils/dist/chunk-ZTBZBPY2.mjs
13791
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13763
13792
  function dedent$1(templ) {
13764
13793
  var values = [];
13765
13794
  for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
@@ -13796,7 +13825,8 @@ __name$5(dedent$1, "dedent");
13796
13825
  var esm_default$1 = dedent$1;
13797
13826
 
13798
13827
  //#endregion
13799
- //#region ../workers-utils/dist/chunk-CPLEE7LH.mjs
13828
+ //#region ../workers-utils/dist/chunk-DAAH4XXB.mjs
13829
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13800
13830
  var UserError = class extends Error {
13801
13831
  static {
13802
13832
  __name$5(this, "UserError");
@@ -13854,7 +13884,8 @@ function createFatalError(message, isJson, options) {
13854
13884
  __name$5(createFatalError, "createFatalError");
13855
13885
 
13856
13886
  //#endregion
13857
- //#region ../workers-utils/dist/chunk-XUJHJVVY.mjs
13887
+ //#region ../workers-utils/dist/chunk-HCE2QBTG.mjs
13888
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
13858
13889
  function hasKnownExportType(entry) {
13859
13890
  const type = entry?.type;
13860
13891
  return type === "durable-object" || type === "worker" || type === "workflow";
@@ -13874,6 +13905,11 @@ function partitionExports(exports$1) {
13874
13905
  return partitioned;
13875
13906
  }
13876
13907
  __name$5(partitionExports, "partitionExports");
13908
+ function isLiveDurableObjectExport(exportConfig) {
13909
+ const state = exportConfig.state ?? "created";
13910
+ return state === "created" || state === "expecting-transfer";
13911
+ }
13912
+ __name$5(isLiveDurableObjectExport, "isLiveDurableObjectExport");
13877
13913
  function getDurableObjectExports(exports$1) {
13878
13914
  return partitionExports(exports$1)["durable-object"];
13879
13915
  }
@@ -13948,7 +13984,7 @@ function getDurableObjectClassNameToUseSQLiteMap(migrations, exports$1) {
13948
13984
  const durableObjectExports = getDurableObjectExports(exports$1 ?? {});
13949
13985
  for (const [className, entry] of Object.entries(durableObjectExports)) {
13950
13986
  if (entry.type !== "durable-object") continue;
13951
- if (entry.state === void 0 || entry.state === "created" || entry.state === "expecting-transfer") durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13987
+ if (isLiveDurableObjectExport(entry)) durableObjectClassNameToUseSQLiteMap.set(className, entry.storage === "sqlite");
13952
13988
  }
13953
13989
  return durableObjectClassNameToUseSQLiteMap;
13954
13990
  }
@@ -16354,296 +16390,8 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
16354
16390
  __name$5(formatConfigSnippet, "formatConfigSnippet");
16355
16391
 
16356
16392
  //#endregion
16357
- //#region ../workers-utils/dist/chunk-R5EE7CZR.mjs
16358
- var DEFAULT_COMPAT_DATE = "2026-09-23";
16359
- function assertNever(_value) {}
16360
- __name$5(assertNever, "assertNever");
16361
- function mapWorkerMetadataBindings(bindings) {
16362
- return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
16363
- switch (binding.type) {
16364
- case "plain_text":
16365
- configObj.vars = {
16366
- ...configObj.vars ?? {},
16367
- [binding.name]: binding.text
16368
- };
16369
- break;
16370
- case "json":
16371
- configObj.vars = {
16372
- ...configObj.vars ?? {},
16373
- [binding.name]: binding.json
16374
- };
16375
- break;
16376
- case "kv_namespace":
16377
- configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
16378
- id: binding.namespace_id,
16379
- binding: binding.name
16380
- }];
16381
- break;
16382
- case "durable_object_namespace":
16383
- configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
16384
- name: binding.name,
16385
- class_name: binding.class_name,
16386
- script_name: binding.script_name,
16387
- environment: binding.environment
16388
- }] };
16389
- break;
16390
- case "d1":
16391
- configObj.d1_databases = [...configObj.d1_databases ?? [], {
16392
- binding: binding.name,
16393
- database_id: binding.id
16394
- }];
16395
- break;
16396
- case "browser":
16397
- configObj.browser = { binding: binding.name };
16398
- break;
16399
- case "ai":
16400
- configObj.ai = { binding: binding.name };
16401
- break;
16402
- case "images":
16403
- configObj.images = { binding: binding.name };
16404
- break;
16405
- case "stream":
16406
- configObj.stream = { binding: binding.name };
16407
- break;
16408
- case "media":
16409
- configObj.media = { binding: binding.name };
16410
- break;
16411
- case "r2_bucket":
16412
- configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
16413
- binding: binding.name,
16414
- bucket_name: binding.bucket_name,
16415
- jurisdiction: binding.jurisdiction
16416
- }];
16417
- break;
16418
- case "secrets_store_secret":
16419
- configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
16420
- binding: binding.name,
16421
- store_id: binding.store_id,
16422
- secret_name: binding.secret_name
16423
- }];
16424
- break;
16425
- case "artifacts":
16426
- configObj.artifacts = [...configObj.artifacts ?? [], {
16427
- binding: binding.name,
16428
- namespace: binding.namespace
16429
- }];
16430
- break;
16431
- case "unsafe_hello_world":
16432
- configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
16433
- binding: binding.name,
16434
- enable_timer: binding.enable_timer
16435
- }];
16436
- break;
16437
- case "flagship":
16438
- configObj.flagship = [...configObj.flagship ?? [], {
16439
- binding: binding.name,
16440
- app_id: binding.app_id
16441
- }];
16442
- break;
16443
- case "service":
16444
- configObj.services = [...configObj.services ?? [], {
16445
- binding: binding.name,
16446
- service: binding.service,
16447
- environment: binding.environment,
16448
- entrypoint: binding.entrypoint
16449
- }];
16450
- break;
16451
- case "analytics_engine":
16452
- configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
16453
- binding: binding.name,
16454
- dataset: binding.dataset
16455
- }];
16456
- break;
16457
- case "dispatch_namespace":
16458
- configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
16459
- binding: binding.name,
16460
- namespace: binding.namespace,
16461
- ...binding.outbound && { outbound: {
16462
- service: binding.outbound.worker.service,
16463
- environment: binding.outbound.worker.environment,
16464
- parameters: binding.outbound.params?.map((p$2) => p$2.name) ?? []
16465
- } }
16466
- }];
16467
- break;
16468
- case "logfwdr":
16469
- configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
16470
- name: binding.name,
16471
- destination: binding.destination
16472
- }] };
16473
- break;
16474
- case "wasm_module":
16475
- configObj.wasm_modules = {
16476
- ...configObj.wasm_modules ?? {},
16477
- [binding.name]: binding.part
16478
- };
16479
- break;
16480
- case "text_blob":
16481
- configObj.text_blobs = {
16482
- ...configObj.text_blobs ?? {},
16483
- [binding.name]: binding.part
16484
- };
16485
- break;
16486
- case "data_blob":
16487
- configObj.data_blobs = {
16488
- ...configObj.data_blobs ?? {},
16489
- [binding.name]: binding.part
16490
- };
16491
- break;
16492
- case "secret_text": break;
16493
- case "version_metadata":
16494
- configObj.version_metadata = { binding: binding.name };
16495
- break;
16496
- case "send_email":
16497
- configObj.send_email = [...configObj.send_email ?? [], {
16498
- name: binding.name,
16499
- destination_address: binding.destination_address,
16500
- allowed_destination_addresses: binding.allowed_destination_addresses,
16501
- allowed_sender_addresses: binding.allowed_sender_addresses
16502
- }];
16503
- break;
16504
- case "queue":
16505
- configObj.queues ??= { producers: [] };
16506
- configObj.queues.producers = [...configObj.queues.producers ?? [], {
16507
- binding: binding.name,
16508
- queue: binding.queue_name,
16509
- delivery_delay: binding.delivery_delay
16510
- }];
16511
- break;
16512
- case "vectorize":
16513
- configObj.vectorize = [...configObj.vectorize ?? [], {
16514
- binding: binding.name,
16515
- index_name: binding.index_name
16516
- }];
16517
- break;
16518
- case "ai_search_namespace":
16519
- configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
16520
- binding: binding.name,
16521
- namespace: binding.namespace
16522
- }];
16523
- break;
16524
- case "ai_search":
16525
- configObj.ai_search = [...configObj.ai_search ?? [], {
16526
- binding: binding.name,
16527
- instance_name: binding.instance_name
16528
- }];
16529
- break;
16530
- case "agent_memory":
16531
- configObj.agent_memory = [...configObj.agent_memory ?? [], {
16532
- binding: binding.name,
16533
- namespace: binding.namespace
16534
- }];
16535
- break;
16536
- case "hyperdrive":
16537
- configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
16538
- binding: binding.name,
16539
- id: binding.id
16540
- }];
16541
- break;
16542
- case "mtls_certificate":
16543
- configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
16544
- binding: binding.name,
16545
- certificate_id: binding.certificate_id
16546
- }];
16547
- break;
16548
- case "pipelines":
16549
- configObj.pipelines = [...configObj.pipelines ?? [], {
16550
- binding: binding.name,
16551
- ...binding.stream && { stream: binding.stream },
16552
- ...binding.pipeline && { pipeline: binding.pipeline }
16553
- }];
16554
- break;
16555
- case "assets":
16556
- configObj.assets = { binding: binding.name };
16557
- break;
16558
- case "inherit":
16559
- configObj.unsafe = {
16560
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16561
- metadata: configObj.unsafe?.metadata ?? void 0
16562
- };
16563
- break;
16564
- case "workflow":
16565
- configObj.workflows = [...configObj.workflows ?? [], {
16566
- binding: binding.name,
16567
- name: binding.workflow_name,
16568
- class_name: binding.class_name,
16569
- script_name: binding.script_name
16570
- }];
16571
- break;
16572
- case "worker_loader":
16573
- configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
16574
- break;
16575
- case "ratelimit":
16576
- configObj.ratelimits = [...configObj.ratelimits ?? [], {
16577
- name: binding.name,
16578
- namespace_id: binding.namespace_id,
16579
- simple: {
16580
- limit: binding.simple.limit,
16581
- period: binding.simple.period
16582
- }
16583
- }];
16584
- break;
16585
- case "vpc_service":
16586
- configObj.vpc_services = [...configObj.vpc_services ?? [], {
16587
- binding: binding.name,
16588
- service_id: binding.service_id
16589
- }];
16590
- break;
16591
- case "vpc_network":
16592
- if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16593
- binding: binding.name,
16594
- tunnel_id: binding.tunnel_id
16595
- }];
16596
- else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
16597
- binding: binding.name,
16598
- network_id: binding.network_id
16599
- }];
16600
- break;
16601
- default: configObj.unsafe = {
16602
- bindings: [...configObj.unsafe?.bindings ?? [], binding],
16603
- metadata: configObj.unsafe?.metadata ?? void 0
16604
- };
16605
- }
16606
- return configObj;
16607
- }, {});
16608
- }
16609
- __name$5(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
16610
- function constructWranglerConfig(config$3) {
16611
- const mappedBindings = mapWorkerMetadataBindings(config$3.bindings);
16612
- const durableObjectClassNames = config$3.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$3.name).map((durableObject) => durableObject.class_name);
16613
- const allRoutes = [...config$3.routes.map((r$1) => ({
16614
- pattern: r$1.pattern,
16615
- zone_name: r$1.zone_name
16616
- })), ...config$3.domains.map((c$1) => ({
16617
- pattern: c$1.hostname,
16618
- zone_name: c$1.zone_name,
16619
- custom_domain: true,
16620
- enabled: c$1.enabled,
16621
- previews_enabled: c$1.previews_enabled
16622
- }))];
16623
- return {
16624
- name: config$3.name,
16625
- main: config$3.entrypoint,
16626
- workers_dev: config$3.subdomain.enabled,
16627
- preview_urls: config$3.subdomain.previews_enabled,
16628
- compatibility_date: config$3.compatibility_date ?? DEFAULT_COMPAT_DATE,
16629
- compatibility_flags: config$3.compatibility_flags,
16630
- ...allRoutes.length ? { routes: allRoutes } : {},
16631
- placement: config$3.placement?.mode === "smart" ? { mode: "smart" } : void 0,
16632
- limits: config$3.limits,
16633
- ...durableObjectClassNames.length && config$3.migration_tag ? { migrations: [{
16634
- tag: config$3.migration_tag,
16635
- new_classes: durableObjectClassNames
16636
- }] } : {},
16637
- ...config$3.schedules.length ? { triggers: { crons: config$3.schedules.map((scheduled) => scheduled.cron) } } : {},
16638
- tail_consumers: config$3.tail_consumers ?? void 0,
16639
- observability: config$3.observability,
16640
- ...mappedBindings
16641
- };
16642
- }
16643
- __name$5(constructWranglerConfig, "constructWranglerConfig");
16644
-
16645
- //#endregion
16646
- //#region ../workers-utils/dist/chunk-OPAKTV2K.mjs
16393
+ //#region ../workers-utils/dist/chunk-S2WV44R3.mjs
16394
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16647
16395
  function getBooleanEnvironmentVariableFactory(options) {
16648
16396
  return () => {
16649
16397
  if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) return typeof options.defaultValue === "function" ? options.defaultValue() : options.defaultValue;
@@ -16687,7 +16435,8 @@ var getDockerPath = getEnvironmentVariableFactory({
16687
16435
  });
16688
16436
 
16689
16437
  //#endregion
16690
- //#region ../workers-utils/dist/chunk-VKFVZ67V.mjs
16438
+ //#region ../workers-utils/dist/chunk-WFKY67B6.mjs
16439
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16691
16440
  function isDirectory(path$3) {
16692
16441
  return fs2.statSync(path$3, { throwIfNoEntry: false })?.isDirectory() ?? false;
16693
16442
  }
@@ -16714,7 +16463,8 @@ function removeDirSync$1(dirPath) {
16714
16463
  __name$5(removeDirSync$1, "removeDirSync");
16715
16464
 
16716
16465
  //#endregion
16717
- //#region ../workers-utils/dist/chunk-IGC3TZGH.mjs
16466
+ //#region ../workers-utils/dist/chunk-RCVSIVZ4.mjs
16467
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16718
16468
  function isWindows() {
16719
16469
  return /^win/i.test(process.platform);
16720
16470
  }
@@ -16845,7 +16595,8 @@ function getGlobalWranglerCachePath() {
16845
16595
  __name$5(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
16846
16596
 
16847
16597
  //#endregion
16848
- //#region ../workers-utils/dist/chunk-QHE74626.mjs
16598
+ //#region ../workers-utils/dist/chunk-NYDIZ27L.mjs
16599
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
16849
16600
  var getC3CommandFromEnv = getEnvironmentVariableFactory({
16850
16601
  variableName: "WRANGLER_C3_COMMAND",
16851
16602
  defaultValue: /* @__PURE__ */ __name$5(() => "create cloudflare", "defaultValue")
@@ -17140,13 +16891,13 @@ var ansi_styles_default$1 = ansiStyles$1;
17140
16891
 
17141
16892
  //#endregion
17142
16893
  //#region ../../node_modules/.pnpm/chalk@5.3.0/node_modules/chalk/source/vendor/supports-color/index.js
17143
- function hasFlag(flag, argv$1 = globalThis.Deno ? globalThis.Deno.args : process$1.argv) {
16894
+ function hasFlag(flag, argv$1 = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
17144
16895
  const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
17145
16896
  const position = argv$1.indexOf(prefix + flag);
17146
16897
  const terminatorPosition = argv$1.indexOf("--");
17147
16898
  return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
17148
16899
  }
17149
- const { env: env$2 } = process$1;
16900
+ const { env: env$2 } = process5;
17150
16901
  let flagForceColor;
17151
16902
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
17152
16903
  else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
@@ -17179,7 +16930,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
17179
16930
  if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
17180
16931
  const min = forceColor || 0;
17181
16932
  if (env$2.TERM === "dumb") return min;
17182
- if (process$1.platform === "win32") {
16933
+ if (process5.platform === "win32") {
17183
16934
  const osRelease = os.release().split(".");
17184
16935
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
17185
16936
  return 1;
@@ -39692,6 +39443,7 @@ var require_undici = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/un
39692
39443
  //#endregion
39693
39444
  //#region ../workers-utils/dist/index.mjs
39694
39445
  var import_undici$3 = require_undici();
39446
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
39695
39447
  var require_vendors$1 = __commonJS$1({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$1, module$1) {
39696
39448
  module$1.exports = [
39697
39449
  {
@@ -40068,11 +39820,11 @@ var require_ci_info$1 = __commonJS$1({ "../../node_modules/.pnpm/ci-info@4.4.0/n
40068
39820
  var require_command_exists$2 = __commonJS$1({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports$1, module$1) {
40069
39821
  var exec$3 = __require$1("child_process").exec;
40070
39822
  var execSync$2 = __require$1("child_process").execSync;
40071
- var fs4 = __require$1("fs");
39823
+ var fs4$1 = __require$1("fs");
40072
39824
  var path6 = __require$1("path");
40073
- var access$1 = fs4.access;
40074
- var accessSync2 = fs4.accessSync;
40075
- var constants2 = fs4.constants || fs4;
39825
+ var access$1 = fs4$1.access;
39826
+ var accessSync2 = fs4$1.accessSync;
39827
+ var constants2 = fs4$1.constants || fs4$1;
40076
39828
  var isUsingWindows$1 = process.platform == "win32";
40077
39829
  var fileNotExists$1 = /* @__PURE__ */ __name$5(function(commandName, callback) {
40078
39830
  access$1(commandName, constants2.F_OK, function(err) {
@@ -40368,7 +40120,7 @@ var require_strip_json_comments = __commonJS$1({ "../../node_modules/.pnpm/strip
40368
40120
  };
40369
40121
  } });
40370
40122
  var require_utils = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports$1) {
40371
- var fs4 = __require$1("fs");
40123
+ var fs4$1 = __require$1("fs");
40372
40124
  var ini = require_ini();
40373
40125
  var path6 = __require$1("path");
40374
40126
  var stripJsonComments = require_strip_json_comments();
@@ -40383,7 +40135,7 @@ var require_utils = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_modul
40383
40135
  for (var i$1 in args) if ("string" !== typeof args[i$1]) return;
40384
40136
  var file2 = path6.join.apply(null, args);
40385
40137
  try {
40386
- return fs4.readFileSync(file2, "utf-8");
40138
+ return fs4$1.readFileSync(file2, "utf-8");
40387
40139
  } catch (err) {
40388
40140
  return;
40389
40141
  }
@@ -40415,7 +40167,7 @@ var require_utils = __commonJS$1({ "../../node_modules/.pnpm/rc@1.2.8/node_modul
40415
40167
  function find2(start, rel2) {
40416
40168
  var file2 = path6.join(start, rel2);
40417
40169
  try {
40418
- fs4.statSync(file2);
40170
+ fs4$1.statSync(file2);
40419
40171
  return file2;
40420
40172
  } catch (err) {
40421
40173
  if (path6.dirname(start) !== start) return find2(path6.dirname(start), rel2);
@@ -40846,24 +40598,24 @@ var require_registry_auth_token = __commonJS$1({ "../../node_modules/.pnpm/regis
40846
40598
  var require_update_check = __commonJS$1({ "../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports$1, module$1) {
40847
40599
  var { URL: URL2 } = __require$1("url");
40848
40600
  var { join: join3 } = __require$1("path");
40849
- var fs4 = __require$1("fs");
40601
+ var fs4$1 = __require$1("fs");
40850
40602
  var { promisify: promisify$3 } = __require$1("util");
40851
40603
  var { tmpdir } = __require$1("os");
40852
40604
  var registryUrl = require_registry_url();
40853
- var writeFile$1 = promisify$3(fs4.writeFile);
40854
- var mkdir$1 = promisify$3(fs4.mkdir);
40855
- var readFile$1 = promisify$3(fs4.readFile);
40605
+ var writeFile$1 = promisify$3(fs4$1.writeFile);
40606
+ var mkdir$1 = promisify$3(fs4$1.mkdir);
40607
+ var readFile$1 = promisify$3(fs4$1.readFile);
40856
40608
  var compareVersions = /* @__PURE__ */ __name$5((a, b) => a.localeCompare(b, "en-US", { numeric: true }), "compareVersions");
40857
40609
  var encode$5 = /* @__PURE__ */ __name$5((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
40858
40610
  var getFile = /* @__PURE__ */ __name$5(async (details, distTag) => {
40859
40611
  const subDir = join3(tmpdir(), "update-check");
40860
- if (!fs4.existsSync(subDir)) await mkdir$1(subDir);
40612
+ if (!fs4$1.existsSync(subDir)) await mkdir$1(subDir);
40861
40613
  let name = `${details.name}-${distTag}.json`;
40862
40614
  if (details.scope) name = `${details.scope}-${name}`;
40863
40615
  return join3(subDir, name);
40864
40616
  }, "getFile");
40865
40617
  var evaluateCache = /* @__PURE__ */ __name$5(async (file$2, time$3, interval) => {
40866
- if (fs4.existsSync(file$2)) {
40618
+ if (fs4$1.existsSync(file$2)) {
40867
40619
  const content = await readFile$1(file$2, "utf8");
40868
40620
  const { lastUpdate, latest } = JSON.parse(content);
40869
40621
  if (lastUpdate + interval > time$3) return {
@@ -42621,7 +42373,13 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
42621
42373
  vars: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vars", validateVars(envName), {}),
42622
42374
  secrets: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "secrets", validateSecrets(envName), void 0),
42623
42375
  define: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "define", validateDefines(envName), {}),
42624
- durable_objects: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateBindingsProperty(envName, validateDurableObjectBinding), { bindings: [] }),
42376
+ durable_objects: (() => {
42377
+ const durableObjects = notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "durable_objects", validateDurableObjectsProperty(envName, true), { bindings: [] });
42378
+ return {
42379
+ ...durableObjects,
42380
+ bindings: durableObjects.bindings ?? []
42381
+ };
42382
+ })(),
42625
42383
  workflows: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "workflows", all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty), []),
42626
42384
  migrations: inheritable(diagnostics, topLevelEnv, rawEnv, "migrations", validateMigrations, []),
42627
42385
  exports: inheritable(diagnostics, topLevelEnv, rawEnv, "exports", validateExports, {}),
@@ -42883,6 +42641,48 @@ Please add a binding for each to "${fieldPath}.bindings":
42883
42641
  }
42884
42642
  return isValid;
42885
42643
  }, "validateBindingsProperty");
42644
+ var DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS = 1440 * 60;
42645
+ var MILLISECOND_PRECISION_TOLERANCE = 1e-6;
42646
+ var validateDurableObjectsProperty = /* @__PURE__ */ __name$5((envName, allowMissingBindings = false, allowCodeUpdateStrategy = true) => (diagnostics, field, value, config$3) => {
42647
+ const fieldPath = config$3 === void 0 ? `${field}` : `env.${envName}.${field}`;
42648
+ if (value === void 0) return true;
42649
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
42650
+ diagnostics.errors.push(`The field "${fieldPath}" should be an object but got ${JSON.stringify(value)}.`);
42651
+ return false;
42652
+ }
42653
+ validateAdditionalProperties(diagnostics, fieldPath, Object.keys(value), allowCodeUpdateStrategy ? ["bindings", "code_update_strategy"] : ["bindings"]);
42654
+ const bindingsContainer = allowMissingBindings && !hasProperty(value, "bindings") ? {
42655
+ ...value,
42656
+ bindings: []
42657
+ } : value;
42658
+ let isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, field, bindingsContainer, config$3);
42659
+ if (!allowCodeUpdateStrategy) return isValid;
42660
+ if (!hasProperty(value, "code_update_strategy") || value.code_update_strategy === void 0) return isValid;
42661
+ const strategy = value.code_update_strategy;
42662
+ const strategyPath = `${fieldPath}.code_update_strategy`;
42663
+ if (typeof strategy !== "object" || strategy === null || Array.isArray(strategy)) {
42664
+ diagnostics.errors.push(`The field "${strategyPath}" should be an object but got ${JSON.stringify(strategy)}.`);
42665
+ return false;
42666
+ }
42667
+ validateAdditionalProperties(diagnostics, strategyPath, Object.keys(strategy), ["mode", "max_delay"]);
42668
+ isValid = validateRequiredProperty(diagnostics, strategyPath, "mode", hasProperty(strategy, "mode") ? strategy.mode : void 0, "string", ["immediate", "deferred"]) && isValid;
42669
+ const maxDelay = hasProperty(strategy, "max_delay") ? strategy.max_delay : void 0;
42670
+ const maxDelayHasValidType = validateOptionalProperty(diagnostics, strategyPath, "max_delay", maxDelay, "number");
42671
+ isValid = maxDelayHasValidType && isValid;
42672
+ if (maxDelayHasValidType && typeof maxDelay === "number" && (!Number.isFinite(maxDelay) || maxDelay < 0 || maxDelay > DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS)) {
42673
+ 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)}.`);
42674
+ isValid = false;
42675
+ }
42676
+ if (maxDelayHasValidType && typeof maxDelay === "number" && Number.isFinite(maxDelay) && maxDelay >= 0 && maxDelay <= DURABLE_OBJECTS_CODE_UPDATE_MAX_DELAY_SECONDS) {
42677
+ const milliseconds = maxDelay * 1e3;
42678
+ const roundedMilliseconds = Math.round(milliseconds);
42679
+ if (maxDelay > 0 && roundedMilliseconds === 0 || Math.abs(milliseconds - roundedMilliseconds) > MILLISECOND_PRECISION_TOLERANCE) {
42680
+ diagnostics.errors.push(`Expected "${strategyPath}.max_delay" to use millisecond precision but got ${JSON.stringify(maxDelay)}.`);
42681
+ isValid = false;
42682
+ }
42683
+ }
42684
+ return isValid;
42685
+ }, "validateDurableObjectsProperty");
42886
42686
  var validateUnsafeSettings = /* @__PURE__ */ __name$5((envName) => (diagnostics, field, value, config$3) => {
42887
42687
  const fieldPath = config$3 === void 0 ? `${field}` : `env.${envName}.${field}`;
42888
42688
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -44546,7 +44346,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$5((envName, configPath) => (
44546
44346
  isValid = validateVars(envName)(diagnostics, `${field}.vars`, previews.vars, void 0) && isValid;
44547
44347
  isValid = validateDefines(envName)(diagnostics, `${field}.define`, previews.define, void 0) && isValid;
44548
44348
  normalizeAndValidatePlacement(diagnostics, void 0, previews, `${field}.placement`);
44549
- isValid = validateBindingsProperty(envName, validateDurableObjectBinding)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44349
+ isValid = validateDurableObjectsProperty(envName, false, false)(diagnostics, `${field}.durable_objects`, previews.durable_objects, void 0) && isValid;
44550
44350
  isValid = all(validateBindingArray(envName, validateWorkflowBinding), validateUniqueNameProperty)(diagnostics, `${field}.workflows`, previews.workflows, void 0) && isValid;
44551
44351
  isValid = validateBindingArray(envName, validateKVBinding)(diagnostics, `${field}.kv_namespaces`, previews.kv_namespaces, void 0) && isValid;
44552
44352
  isValid = validateBindingArray(envName, validateSendEmailBinding)(diagnostics, `${field}.send_email`, previews.send_email, void 0) && isValid;
@@ -44989,8 +44789,7 @@ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects,
44989
44789
  const exportsCovers = /* @__PURE__ */ __name$5((className) => {
44990
44790
  const entry = exports$1?.[className];
44991
44791
  if (entry === void 0 || entry.type !== "durable-object") return false;
44992
- const state = entry.state ?? "created";
44993
- return state === "created" || state === "expecting-transfer";
44792
+ return isLiveDurableObjectExport(entry);
44994
44793
  }, "exportsCovers");
44995
44794
  const uncoveredByExports = exportedDurableObjects.filter((binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name));
44996
44795
  if (uncoveredByExports.length === 0 || migrations.length > 0) return;
@@ -45127,6 +44926,8 @@ function isDockerfile(imagePath, configPath) {
45127
44926
  return false;
45128
44927
  }
45129
44928
  __name$5(isDockerfile, "isDockerfile");
44929
+ function assertNever(_value) {}
44930
+ __name$5(assertNever, "assertNever");
45130
44931
  var BINDING_LOCAL_SUPPORT = {
45131
44932
  plain_text: "local-only",
45132
44933
  secret_text: "local-only",
@@ -45176,8 +44977,7 @@ function getBindingLocalSupport(type) {
45176
44977
  }
45177
44978
  __name$5(getBindingLocalSupport, "getBindingLocalSupport");
45178
44979
  function validateBindingRemoteSetting(type, remote, warn) {
45179
- const support = getBindingLocalSupport(type);
45180
- switch (support) {
44980
+ switch (getBindingLocalSupport(type)) {
45181
44981
  case "local-and-remote": return;
45182
44982
  case "local-only":
45183
44983
  if (remote === true) throw new UserError(`${getBindingTypeFriendlyName(type)} bindings do not support accessing remote resources.`, { telemetryMessage: "utils bindings unsupported remote resources" });
@@ -45190,7 +44990,6 @@ function validateBindingRemoteSetting(type, remote, warn) {
45190
44990
  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" });
45191
44991
  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.`);
45192
44992
  return;
45193
- default: assertNever(support);
45194
44993
  }
45195
44994
  }
45196
44995
  __name$5(validateBindingRemoteSetting, "validateBindingRemoteSetting");
@@ -45322,6 +45121,290 @@ function findFileUp(name, startDir, lastDir) {
45322
45121
  }
45323
45122
  }
45324
45123
  __name$5(findFileUp, "findFileUp");
45124
+ function mapWorkerMetadataBindings(bindings) {
45125
+ return bindings.filter((binding) => binding.type !== "secret_text").reduce((configObj, binding) => {
45126
+ switch (binding.type) {
45127
+ case "plain_text":
45128
+ configObj.vars = {
45129
+ ...configObj.vars ?? {},
45130
+ [binding.name]: binding.text
45131
+ };
45132
+ break;
45133
+ case "json":
45134
+ configObj.vars = {
45135
+ ...configObj.vars ?? {},
45136
+ [binding.name]: binding.json
45137
+ };
45138
+ break;
45139
+ case "kv_namespace":
45140
+ configObj.kv_namespaces = [...configObj.kv_namespaces ?? [], {
45141
+ id: binding.namespace_id,
45142
+ binding: binding.name
45143
+ }];
45144
+ break;
45145
+ case "durable_object_namespace":
45146
+ configObj.durable_objects = { bindings: [...configObj.durable_objects?.bindings ?? [], {
45147
+ name: binding.name,
45148
+ class_name: binding.class_name,
45149
+ script_name: binding.script_name,
45150
+ environment: binding.environment
45151
+ }] };
45152
+ break;
45153
+ case "d1":
45154
+ configObj.d1_databases = [...configObj.d1_databases ?? [], {
45155
+ binding: binding.name,
45156
+ database_id: binding.id
45157
+ }];
45158
+ break;
45159
+ case "browser":
45160
+ configObj.browser = { binding: binding.name };
45161
+ break;
45162
+ case "ai":
45163
+ configObj.ai = { binding: binding.name };
45164
+ break;
45165
+ case "images":
45166
+ configObj.images = { binding: binding.name };
45167
+ break;
45168
+ case "stream":
45169
+ configObj.stream = { binding: binding.name };
45170
+ break;
45171
+ case "media":
45172
+ configObj.media = { binding: binding.name };
45173
+ break;
45174
+ case "r2_bucket":
45175
+ configObj.r2_buckets = [...configObj.r2_buckets ?? [], {
45176
+ binding: binding.name,
45177
+ bucket_name: binding.bucket_name,
45178
+ jurisdiction: binding.jurisdiction
45179
+ }];
45180
+ break;
45181
+ case "secrets_store_secret":
45182
+ configObj.secrets_store_secrets = [...configObj.secrets_store_secrets ?? [], {
45183
+ binding: binding.name,
45184
+ store_id: binding.store_id,
45185
+ secret_name: binding.secret_name
45186
+ }];
45187
+ break;
45188
+ case "artifacts":
45189
+ configObj.artifacts = [...configObj.artifacts ?? [], {
45190
+ binding: binding.name,
45191
+ namespace: binding.namespace
45192
+ }];
45193
+ break;
45194
+ case "unsafe_hello_world":
45195
+ configObj.unsafe_hello_world = [...configObj.unsafe_hello_world ?? [], {
45196
+ binding: binding.name,
45197
+ enable_timer: binding.enable_timer
45198
+ }];
45199
+ break;
45200
+ case "flagship":
45201
+ configObj.flagship = [...configObj.flagship ?? [], {
45202
+ binding: binding.name,
45203
+ app_id: binding.app_id
45204
+ }];
45205
+ break;
45206
+ case "service":
45207
+ configObj.services = [...configObj.services ?? [], {
45208
+ binding: binding.name,
45209
+ service: binding.service,
45210
+ environment: binding.environment,
45211
+ entrypoint: binding.entrypoint
45212
+ }];
45213
+ break;
45214
+ case "analytics_engine":
45215
+ configObj.analytics_engine_datasets = [...configObj.analytics_engine_datasets ?? [], {
45216
+ binding: binding.name,
45217
+ dataset: binding.dataset
45218
+ }];
45219
+ break;
45220
+ case "dispatch_namespace":
45221
+ configObj.dispatch_namespaces = [...configObj.dispatch_namespaces ?? [], {
45222
+ binding: binding.name,
45223
+ namespace: binding.namespace,
45224
+ ...binding.outbound && { outbound: {
45225
+ service: binding.outbound.worker.service,
45226
+ environment: binding.outbound.worker.environment,
45227
+ parameters: binding.outbound.params?.map((p$2) => p$2.name) ?? []
45228
+ } }
45229
+ }];
45230
+ break;
45231
+ case "logfwdr":
45232
+ configObj.logfwdr = { bindings: [...configObj.logfwdr?.bindings ?? [], {
45233
+ name: binding.name,
45234
+ destination: binding.destination
45235
+ }] };
45236
+ break;
45237
+ case "wasm_module":
45238
+ configObj.wasm_modules = {
45239
+ ...configObj.wasm_modules ?? {},
45240
+ [binding.name]: binding.part
45241
+ };
45242
+ break;
45243
+ case "text_blob":
45244
+ configObj.text_blobs = {
45245
+ ...configObj.text_blobs ?? {},
45246
+ [binding.name]: binding.part
45247
+ };
45248
+ break;
45249
+ case "data_blob":
45250
+ configObj.data_blobs = {
45251
+ ...configObj.data_blobs ?? {},
45252
+ [binding.name]: binding.part
45253
+ };
45254
+ break;
45255
+ case "secret_text": break;
45256
+ case "version_metadata":
45257
+ configObj.version_metadata = { binding: binding.name };
45258
+ break;
45259
+ case "send_email":
45260
+ configObj.send_email = [...configObj.send_email ?? [], {
45261
+ name: binding.name,
45262
+ destination_address: binding.destination_address,
45263
+ allowed_destination_addresses: binding.allowed_destination_addresses,
45264
+ allowed_sender_addresses: binding.allowed_sender_addresses
45265
+ }];
45266
+ break;
45267
+ case "queue":
45268
+ configObj.queues ??= { producers: [] };
45269
+ configObj.queues.producers = [...configObj.queues.producers ?? [], {
45270
+ binding: binding.name,
45271
+ queue: binding.queue_name,
45272
+ delivery_delay: binding.delivery_delay
45273
+ }];
45274
+ break;
45275
+ case "vectorize":
45276
+ configObj.vectorize = [...configObj.vectorize ?? [], {
45277
+ binding: binding.name,
45278
+ index_name: binding.index_name
45279
+ }];
45280
+ break;
45281
+ case "ai_search_namespace":
45282
+ configObj.ai_search_namespaces = [...configObj.ai_search_namespaces ?? [], {
45283
+ binding: binding.name,
45284
+ namespace: binding.namespace
45285
+ }];
45286
+ break;
45287
+ case "ai_search":
45288
+ configObj.ai_search = [...configObj.ai_search ?? [], {
45289
+ binding: binding.name,
45290
+ instance_name: binding.instance_name
45291
+ }];
45292
+ break;
45293
+ case "agent_memory":
45294
+ configObj.agent_memory = [...configObj.agent_memory ?? [], {
45295
+ binding: binding.name,
45296
+ namespace: binding.namespace
45297
+ }];
45298
+ break;
45299
+ case "hyperdrive":
45300
+ configObj.hyperdrive = [...configObj.hyperdrive ?? [], {
45301
+ binding: binding.name,
45302
+ id: binding.id
45303
+ }];
45304
+ break;
45305
+ case "mtls_certificate":
45306
+ configObj.mtls_certificates = [...configObj.mtls_certificates ?? [], {
45307
+ binding: binding.name,
45308
+ certificate_id: binding.certificate_id
45309
+ }];
45310
+ break;
45311
+ case "pipelines":
45312
+ configObj.pipelines = [...configObj.pipelines ?? [], {
45313
+ binding: binding.name,
45314
+ ...binding.stream && { stream: binding.stream },
45315
+ ...binding.pipeline && { pipeline: binding.pipeline }
45316
+ }];
45317
+ break;
45318
+ case "assets":
45319
+ configObj.assets = { binding: binding.name };
45320
+ break;
45321
+ case "inherit":
45322
+ configObj.unsafe = {
45323
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45324
+ metadata: configObj.unsafe?.metadata ?? void 0
45325
+ };
45326
+ break;
45327
+ case "workflow":
45328
+ configObj.workflows = [...configObj.workflows ?? [], {
45329
+ binding: binding.name,
45330
+ name: binding.workflow_name,
45331
+ class_name: binding.class_name,
45332
+ script_name: binding.script_name
45333
+ }];
45334
+ break;
45335
+ case "worker_loader":
45336
+ configObj.worker_loaders = [...configObj.worker_loaders ?? [], { binding: binding.name }];
45337
+ break;
45338
+ case "ratelimit":
45339
+ configObj.ratelimits = [...configObj.ratelimits ?? [], {
45340
+ name: binding.name,
45341
+ namespace_id: binding.namespace_id,
45342
+ simple: {
45343
+ limit: binding.simple.limit,
45344
+ period: binding.simple.period
45345
+ }
45346
+ }];
45347
+ break;
45348
+ case "vpc_service":
45349
+ configObj.vpc_services = [...configObj.vpc_services ?? [], {
45350
+ binding: binding.name,
45351
+ service_id: binding.service_id
45352
+ }];
45353
+ break;
45354
+ case "vpc_network":
45355
+ if (binding.tunnel_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45356
+ binding: binding.name,
45357
+ tunnel_id: binding.tunnel_id
45358
+ }];
45359
+ else if (binding.network_id !== void 0) configObj.vpc_networks = [...configObj.vpc_networks ?? [], {
45360
+ binding: binding.name,
45361
+ network_id: binding.network_id
45362
+ }];
45363
+ break;
45364
+ default: configObj.unsafe = {
45365
+ bindings: [...configObj.unsafe?.bindings ?? [], binding],
45366
+ metadata: configObj.unsafe?.metadata ?? void 0
45367
+ };
45368
+ }
45369
+ return configObj;
45370
+ }, {});
45371
+ }
45372
+ __name$5(mapWorkerMetadataBindings, "mapWorkerMetadataBindings");
45373
+ var DEFAULT_COMPAT_DATE = "2026-09-26";
45374
+ function constructWranglerConfig(config$3) {
45375
+ const mappedBindings = mapWorkerMetadataBindings(config$3.bindings);
45376
+ const durableObjectClassNames = config$3.bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.script_name === config$3.name).map((durableObject) => durableObject.class_name);
45377
+ const allRoutes = [...config$3.routes.map((r2) => ({
45378
+ pattern: r2.pattern,
45379
+ zone_name: r2.zone_name
45380
+ })), ...config$3.domains.map((c$1) => ({
45381
+ pattern: c$1.hostname,
45382
+ zone_name: c$1.zone_name,
45383
+ custom_domain: true,
45384
+ enabled: c$1.enabled,
45385
+ previews_enabled: c$1.previews_enabled
45386
+ }))];
45387
+ return {
45388
+ name: config$3.name,
45389
+ main: config$3.entrypoint,
45390
+ workers_dev: config$3.subdomain.enabled,
45391
+ preview_urls: config$3.subdomain.previews_enabled,
45392
+ compatibility_date: config$3.compatibility_date ?? DEFAULT_COMPAT_DATE,
45393
+ compatibility_flags: config$3.compatibility_flags,
45394
+ ...allRoutes.length ? { routes: allRoutes } : {},
45395
+ placement: config$3.placement?.mode === "smart" ? { mode: "smart" } : void 0,
45396
+ limits: config$3.limits,
45397
+ ...durableObjectClassNames.length && config$3.migration_tag ? { migrations: [{
45398
+ tag: config$3.migration_tag,
45399
+ new_classes: durableObjectClassNames
45400
+ }] } : {},
45401
+ ...config$3.schedules.length ? { triggers: { crons: config$3.schedules.map((scheduled) => scheduled.cron) } } : {},
45402
+ tail_consumers: config$3.tail_consumers ?? void 0,
45403
+ observability: config$3.observability,
45404
+ ...mappedBindings
45405
+ };
45406
+ }
45407
+ __name$5(constructWranglerConfig, "constructWranglerConfig");
45325
45408
  function assertNever2(_value) {}
45326
45409
  __name$5(assertNever2, "assertNever");
45327
45410
  function convertConfigToBindings(config$3, options) {
@@ -47369,7 +47452,7 @@ async function fetchLatestNpmVersion(name, version$7) {
47369
47452
  __name$5(fetchLatestNpmVersion, "fetchLatestNpmVersion");
47370
47453
  async function openInBrowser(url$2, logger$2) {
47371
47454
  try {
47372
- const { default: open$1 } = await import("./open-OYMIZX6T-8gCMYjmi.mjs");
47455
+ const { default: open$1 } = await import("./open-NPEHYJ5T-B2OFN0iQ.mjs");
47373
47456
  (await open$1(url$2)).on("error", (err) => {
47374
47457
  handleBrowserOpenError(url$2, err, logger$2);
47375
47458
  });
@@ -47672,7 +47755,7 @@ var require_package = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/d
47672
47755
  //#endregion
47673
47756
  //#region ../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js
47674
47757
  var require_main = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js": ((exports, module) => {
47675
- const fs$4 = __require$2("fs");
47758
+ const fs$3 = __require$2("fs");
47676
47759
  const path$2 = __require$2("path");
47677
47760
  const os$2 = __require$2("os");
47678
47761
  const crypto = __require$2("crypto");
@@ -47772,7 +47855,7 @@ var require_main = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/dote
47772
47855
  if (options.encoding != null) encoding = options.encoding;
47773
47856
  }
47774
47857
  try {
47775
- const parsed = DotenvModule.parse(fs$4.readFileSync(dotenvPath, { encoding }));
47858
+ const parsed = DotenvModule.parse(fs$3.readFileSync(dotenvPath, { encoding }));
47776
47859
  let processEnv = process.env;
47777
47860
  if (options && options.processEnv != null) processEnv = options.processEnv;
47778
47861
  DotenvModule.populate(processEnv, parsed, options);
@@ -47785,7 +47868,7 @@ var require_main = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/dote
47785
47868
  function config$1(options) {
47786
47869
  const vaultPath = _vaultPath(options);
47787
47870
  if (_dotenvKey(options).length === 0) return DotenvModule.configDotenv(options);
47788
- if (!fs$4.existsSync(vaultPath)) {
47871
+ if (!fs$3.existsSync(vaultPath)) {
47789
47872
  _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
47790
47873
  return DotenvModule.configDotenv(options);
47791
47874
  }
@@ -47846,6 +47929,7 @@ var require_main = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/dote
47846
47929
  //#endregion
47847
47930
  //#region ../workers-utils/dist/local-env.mjs
47848
47931
  var import_main = require_main();
47932
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
47849
47933
  var import_dotenv_expand = __toESM$1(__commonJS$1({ "../../node_modules/.pnpm/dotenv-expand@13.0.0/node_modules/dotenv-expand/lib/main.js"(exports$1, module$1) {
47850
47934
  function _resolveEscapeSequences(value) {
47851
47935
  return value.replace(/\\\$/g, "$");
@@ -47961,11 +48045,11 @@ async function loadDevVars(envDir, mode) {
47961
48045
  __name$5(loadDevVars, "loadDevVars");
47962
48046
  async function tryParseFile(filePath, parse$6) {
47963
48047
  try {
47964
- const stat2 = await fs$1.stat(filePath);
48048
+ const stat2 = await fs.stat(filePath);
47965
48049
  if (!stat2.isFile() && !stat2.isFIFO()) return;
47966
48050
  return {
47967
48051
  path: filePath,
47968
- values: parse$6(await fs$1.readFile(filePath, "utf8"))
48052
+ values: parse$6(await fs.readFile(filePath, "utf8"))
47969
48053
  };
47970
48054
  } catch (error$2) {
47971
48055
  if (isMissingFileError(error$2)) return;
@@ -52849,7 +52933,7 @@ function initializeContext(params) {
52849
52933
  external: params?.external ?? void 0
52850
52934
  };
52851
52935
  }
52852
- function process$3(schema, ctx, _params = {
52936
+ function process$2(schema, ctx, _params = {
52853
52937
  path: [],
52854
52938
  schemaPath: []
52855
52939
  }) {
@@ -52886,7 +52970,7 @@ function process$3(schema, ctx, _params = {
52886
52970
  const parent = schema._zod.parent;
52887
52971
  if (parent) {
52888
52972
  if (!result.ref) result.ref = parent;
52889
- process$3(parent, ctx, params);
52973
+ process$2(parent, ctx, params);
52890
52974
  ctx.seen.get(parent).isParent = true;
52891
52975
  }
52892
52976
  }
@@ -53106,7 +53190,7 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
53106
53190
  ...params,
53107
53191
  processors
53108
53192
  });
53109
- process$3(schema, ctx);
53193
+ process$2(schema, ctx);
53110
53194
  extractDefs(ctx, schema);
53111
53195
  return finalize(ctx, schema);
53112
53196
  };
@@ -53118,7 +53202,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
53118
53202
  io,
53119
53203
  processors
53120
53204
  });
53121
- process$3(schema, ctx);
53205
+ process$2(schema, ctx);
53122
53206
  extractDefs(ctx, schema);
53123
53207
  return finalize(ctx, schema);
53124
53208
  };
@@ -53228,7 +53312,7 @@ const arrayProcessor = (schema, ctx, _json, params) => {
53228
53312
  if (typeof minimum === "number") json$1.minItems = minimum;
53229
53313
  if (typeof maximum === "number") json$1.maxItems = maximum;
53230
53314
  json$1.type = "array";
53231
- json$1.items = process$3(def.element, ctx, {
53315
+ json$1.items = process$2(def.element, ctx, {
53232
53316
  ...params,
53233
53317
  path: [...params.path, "items"]
53234
53318
  });
@@ -53239,7 +53323,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
53239
53323
  json$1.type = "object";
53240
53324
  json$1.properties = {};
53241
53325
  const shape = def.shape;
53242
- for (const key in shape) json$1.properties[key] = process$3(shape[key], ctx, {
53326
+ for (const key in shape) json$1.properties[key] = process$2(shape[key], ctx, {
53243
53327
  ...params,
53244
53328
  path: [
53245
53329
  ...params.path,
@@ -53257,7 +53341,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
53257
53341
  if (def.catchall?._zod.def.type === "never") json$1.additionalProperties = false;
53258
53342
  else if (!def.catchall) {
53259
53343
  if (ctx.io === "output") json$1.additionalProperties = false;
53260
- } else if (def.catchall) json$1.additionalProperties = process$3(def.catchall, ctx, {
53344
+ } else if (def.catchall) json$1.additionalProperties = process$2(def.catchall, ctx, {
53261
53345
  ...params,
53262
53346
  path: [...params.path, "additionalProperties"]
53263
53347
  });
@@ -53265,7 +53349,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
53265
53349
  const unionProcessor = (schema, ctx, json$1, params) => {
53266
53350
  const def = schema._zod.def;
53267
53351
  const isExclusive = def.inclusive === false;
53268
- const options = def.options.map((x, i$1) => process$3(x, ctx, {
53352
+ const options = def.options.map((x, i$1) => process$2(x, ctx, {
53269
53353
  ...params,
53270
53354
  path: [
53271
53355
  ...params.path,
@@ -53278,7 +53362,7 @@ const unionProcessor = (schema, ctx, json$1, params) => {
53278
53362
  };
53279
53363
  const intersectionProcessor = (schema, ctx, json$1, params) => {
53280
53364
  const def = schema._zod.def;
53281
- const a = process$3(def.left, ctx, {
53365
+ const a = process$2(def.left, ctx, {
53282
53366
  ...params,
53283
53367
  path: [
53284
53368
  ...params.path,
@@ -53286,7 +53370,7 @@ const intersectionProcessor = (schema, ctx, json$1, params) => {
53286
53370
  0
53287
53371
  ]
53288
53372
  });
53289
- const b = process$3(def.right, ctx, {
53373
+ const b = process$2(def.right, ctx, {
53290
53374
  ...params,
53291
53375
  path: [
53292
53376
  ...params.path,
@@ -53304,7 +53388,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
53304
53388
  const keyType = def.keyType;
53305
53389
  const patterns = keyType._zod.bag?.patterns;
53306
53390
  if (def.mode === "loose" && patterns && patterns.size > 0) {
53307
- const valueSchema = process$3(def.valueType, ctx, {
53391
+ const valueSchema = process$2(def.valueType, ctx, {
53308
53392
  ...params,
53309
53393
  path: [
53310
53394
  ...params.path,
@@ -53315,11 +53399,11 @@ const recordProcessor = (schema, ctx, _json, params) => {
53315
53399
  json$1.patternProperties = {};
53316
53400
  for (const pattern of patterns) json$1.patternProperties[pattern.source] = valueSchema;
53317
53401
  } else {
53318
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json$1.propertyNames = process$3(def.keyType, ctx, {
53402
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json$1.propertyNames = process$2(def.keyType, ctx, {
53319
53403
  ...params,
53320
53404
  path: [...params.path, "propertyNames"]
53321
53405
  });
53322
- json$1.additionalProperties = process$3(def.valueType, ctx, {
53406
+ json$1.additionalProperties = process$2(def.valueType, ctx, {
53323
53407
  ...params,
53324
53408
  path: [...params.path, "additionalProperties"]
53325
53409
  });
@@ -53332,7 +53416,7 @@ const recordProcessor = (schema, ctx, _json, params) => {
53332
53416
  };
53333
53417
  const nullableProcessor = (schema, ctx, json$1, params) => {
53334
53418
  const def = schema._zod.def;
53335
- const inner = process$3(def.innerType, ctx, params);
53419
+ const inner = process$2(def.innerType, ctx, params);
53336
53420
  const seen = ctx.seen.get(schema);
53337
53421
  if (ctx.target === "openapi-3.0") {
53338
53422
  seen.ref = def.innerType;
@@ -53341,27 +53425,27 @@ const nullableProcessor = (schema, ctx, json$1, params) => {
53341
53425
  };
53342
53426
  const nonoptionalProcessor = (schema, ctx, _json, params) => {
53343
53427
  const def = schema._zod.def;
53344
- process$3(def.innerType, ctx, params);
53428
+ process$2(def.innerType, ctx, params);
53345
53429
  const seen = ctx.seen.get(schema);
53346
53430
  seen.ref = def.innerType;
53347
53431
  };
53348
53432
  const defaultProcessor = (schema, ctx, json$1, params) => {
53349
53433
  const def = schema._zod.def;
53350
- process$3(def.innerType, ctx, params);
53434
+ process$2(def.innerType, ctx, params);
53351
53435
  const seen = ctx.seen.get(schema);
53352
53436
  seen.ref = def.innerType;
53353
53437
  json$1.default = JSON.parse(JSON.stringify(def.defaultValue));
53354
53438
  };
53355
53439
  const prefaultProcessor = (schema, ctx, json$1, params) => {
53356
53440
  const def = schema._zod.def;
53357
- process$3(def.innerType, ctx, params);
53441
+ process$2(def.innerType, ctx, params);
53358
53442
  const seen = ctx.seen.get(schema);
53359
53443
  seen.ref = def.innerType;
53360
53444
  if (ctx.io === "input") json$1._prefault = JSON.parse(JSON.stringify(def.defaultValue));
53361
53445
  };
53362
53446
  const catchProcessor = (schema, ctx, json$1, params) => {
53363
53447
  const def = schema._zod.def;
53364
- process$3(def.innerType, ctx, params);
53448
+ process$2(def.innerType, ctx, params);
53365
53449
  const seen = ctx.seen.get(schema);
53366
53450
  seen.ref = def.innerType;
53367
53451
  let catchValue;
@@ -53376,20 +53460,20 @@ const pipeProcessor = (schema, ctx, _json, params) => {
53376
53460
  const def = schema._zod.def;
53377
53461
  const inIsTransform = def.in._zod.traits.has("$ZodTransform");
53378
53462
  const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
53379
- process$3(innerType, ctx, params);
53463
+ process$2(innerType, ctx, params);
53380
53464
  const seen = ctx.seen.get(schema);
53381
53465
  seen.ref = innerType;
53382
53466
  };
53383
53467
  const readonlyProcessor = (schema, ctx, json$1, params) => {
53384
53468
  const def = schema._zod.def;
53385
- process$3(def.innerType, ctx, params);
53469
+ process$2(def.innerType, ctx, params);
53386
53470
  const seen = ctx.seen.get(schema);
53387
53471
  seen.ref = def.innerType;
53388
53472
  json$1.readOnly = true;
53389
53473
  };
53390
53474
  const optionalProcessor = (schema, ctx, _json, params) => {
53391
53475
  const def = schema._zod.def;
53392
- process$3(def.innerType, ctx, params);
53476
+ process$2(def.innerType, ctx, params);
53393
53477
  const seen = ctx.seen.get(schema);
53394
53478
  seen.ref = def.innerType;
53395
53479
  };
@@ -57815,7 +57899,7 @@ var import_ci_info = /* @__PURE__ */ __toESM$2(require_ci_info(), 1);
57815
57899
 
57816
57900
  //#endregion
57817
57901
  //#region ../cli/dist/cursor.mjs
57818
- function showCursor(show, stream$2 = process$1.stderr) {
57902
+ function showCursor(show, stream$2 = process5.stderr) {
57819
57903
  if (!stream$2.isTTY) return;
57820
57904
  if (show) stream$2.write("\x1B[?25h");
57821
57905
  else stream$2.write("\x1B[?25l");
@@ -58081,25 +58165,25 @@ var require_signals = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/s
58081
58165
  //#endregion
58082
58166
  //#region ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
58083
58167
  var require_signal_exit = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js": ((exports, module) => {
58084
- var process$2 = global.process;
58085
- const processOk = function(process$5) {
58086
- return process$5 && typeof process$5 === "object" && typeof process$5.removeListener === "function" && typeof process$5.emit === "function" && typeof process$5.reallyExit === "function" && typeof process$5.listeners === "function" && typeof process$5.kill === "function" && typeof process$5.pid === "number" && typeof process$5.on === "function";
58168
+ var process$1 = global.process;
58169
+ const processOk = function(process$4) {
58170
+ return process$4 && typeof process$4 === "object" && typeof process$4.removeListener === "function" && typeof process$4.emit === "function" && typeof process$4.reallyExit === "function" && typeof process$4.listeners === "function" && typeof process$4.kill === "function" && typeof process$4.pid === "number" && typeof process$4.on === "function";
58087
58171
  };
58088
58172
  /* istanbul ignore if */
58089
- if (!processOk(process$2)) module.exports = function() {
58173
+ if (!processOk(process$1)) module.exports = function() {
58090
58174
  return function() {};
58091
58175
  };
58092
58176
  else {
58093
58177
  var assert$1 = __require$2("assert");
58094
58178
  var signals = require_signals();
58095
- var isWin = /^win/i.test(process$2.platform);
58179
+ var isWin = /^win/i.test(process$1.platform);
58096
58180
  var EE = __require$2("events");
58097
58181
  /* istanbul ignore if */
58098
58182
  if (typeof EE !== "function") EE = EE.EventEmitter;
58099
58183
  var emitter;
58100
- if (process$2.__signal_exit_emitter__) emitter = process$2.__signal_exit_emitter__;
58184
+ if (process$1.__signal_exit_emitter__) emitter = process$1.__signal_exit_emitter__;
58101
58185
  else {
58102
- emitter = process$2.__signal_exit_emitter__ = new EE();
58186
+ emitter = process$1.__signal_exit_emitter__ = new EE();
58103
58187
  emitter.count = 0;
58104
58188
  emitter.emitted = {};
58105
58189
  }
@@ -58126,11 +58210,11 @@ var require_signal_exit = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
58126
58210
  loaded = false;
58127
58211
  signals.forEach(function(sig) {
58128
58212
  try {
58129
- process$2.removeListener(sig, sigListeners[sig]);
58213
+ process$1.removeListener(sig, sigListeners[sig]);
58130
58214
  } catch (er) {}
58131
58215
  });
58132
- process$2.emit = originalProcessEmit;
58133
- process$2.reallyExit = originalProcessReallyExit;
58216
+ process$1.emit = originalProcessEmit;
58217
+ process$1.reallyExit = originalProcessReallyExit;
58134
58218
  emitter.count -= 1;
58135
58219
  };
58136
58220
  module.exports.unload = unload;
@@ -58145,7 +58229,7 @@ var require_signal_exit = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
58145
58229
  sigListeners[sig] = function listener() {
58146
58230
  /* istanbul ignore if */
58147
58231
  if (!processOk(global.process)) return;
58148
- if (process$2.listeners(sig).length === emitter.count) {
58232
+ if (process$1.listeners(sig).length === emitter.count) {
58149
58233
  unload();
58150
58234
  emit("exit", null, sig);
58151
58235
  /* istanbul ignore next */
@@ -58153,7 +58237,7 @@ var require_signal_exit = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
58153
58237
  /* istanbul ignore next */
58154
58238
  if (isWin && sig === "SIGHUP") sig = "SIGINT";
58155
58239
  /* istanbul ignore next */
58156
- process$2.kill(process$2.pid, sig);
58240
+ process$1.kill(process$1.pid, sig);
58157
58241
  }
58158
58242
  };
58159
58243
  });
@@ -58167,37 +58251,37 @@ var require_signal_exit = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pn
58167
58251
  emitter.count += 1;
58168
58252
  signals = signals.filter(function(sig) {
58169
58253
  try {
58170
- process$2.on(sig, sigListeners[sig]);
58254
+ process$1.on(sig, sigListeners[sig]);
58171
58255
  return true;
58172
58256
  } catch (er) {
58173
58257
  return false;
58174
58258
  }
58175
58259
  });
58176
- process$2.emit = processEmit;
58177
- process$2.reallyExit = processReallyExit;
58260
+ process$1.emit = processEmit;
58261
+ process$1.reallyExit = processReallyExit;
58178
58262
  };
58179
58263
  module.exports.load = load;
58180
- var originalProcessReallyExit = process$2.reallyExit;
58264
+ var originalProcessReallyExit = process$1.reallyExit;
58181
58265
  var processReallyExit = function processReallyExit$1(code) {
58182
58266
  /* istanbul ignore if */
58183
58267
  if (!processOk(global.process)) return;
58184
- process$2.exitCode = code || 0;
58185
- emit("exit", process$2.exitCode, null);
58268
+ process$1.exitCode = code || 0;
58269
+ emit("exit", process$1.exitCode, null);
58186
58270
  /* istanbul ignore next */
58187
- emit("afterexit", process$2.exitCode, null);
58271
+ emit("afterexit", process$1.exitCode, null);
58188
58272
  /* istanbul ignore next */
58189
- originalProcessReallyExit.call(process$2, process$2.exitCode);
58273
+ originalProcessReallyExit.call(process$1, process$1.exitCode);
58190
58274
  };
58191
- var originalProcessEmit = process$2.emit;
58275
+ var originalProcessEmit = process$1.emit;
58192
58276
  var processEmit = function processEmit$1(ev, arg) {
58193
58277
  if (ev === "exit" && processOk(global.process)) {
58194
58278
  /* istanbul ignore else */
58195
- if (arg !== void 0) process$2.exitCode = arg;
58279
+ if (arg !== void 0) process$1.exitCode = arg;
58196
58280
  var ret = originalProcessEmit.apply(this, arguments);
58197
58281
  /* istanbul ignore next */
58198
- emit("exit", process$2.exitCode, null);
58282
+ emit("exit", process$1.exitCode, null);
58199
58283
  /* istanbul ignore next */
58200
- emit("afterexit", process$2.exitCode, null);
58284
+ emit("afterexit", process$1.exitCode, null);
58201
58285
  /* istanbul ignore next */
58202
58286
  return ret;
58203
58287
  } else return originalProcessEmit.apply(this, arguments);
@@ -58211,7 +58295,7 @@ var import_onetime = /* @__PURE__ */ __toESM$2(require_onetime(), 1);
58211
58295
  var import_signal_exit = /* @__PURE__ */ __toESM$2(require_signal_exit(), 1);
58212
58296
  const restoreCursor = (0, import_onetime.default)(() => {
58213
58297
  (0, import_signal_exit.default)(() => {
58214
- process$1.stderr.write("\x1B[?25h");
58298
+ process5.stderr.write("\x1B[?25h");
58215
58299
  }, { alwaysLast: true });
58216
58300
  });
58217
58301
  var restore_cursor_default = restoreCursor;
@@ -58220,12 +58304,12 @@ var restore_cursor_default = restoreCursor;
58220
58304
  //#region ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
58221
58305
  let isHidden = false;
58222
58306
  const cliCursor = {};
58223
- cliCursor.show = (writableStream = process$1.stderr) => {
58307
+ cliCursor.show = (writableStream = process5.stderr) => {
58224
58308
  if (!writableStream.isTTY) return;
58225
58309
  isHidden = false;
58226
58310
  writableStream.write("\x1B[?25h");
58227
58311
  };
58228
- cliCursor.hide = (writableStream = process$1.stderr) => {
58312
+ cliCursor.hide = (writableStream = process5.stderr) => {
58229
58313
  if (!writableStream.isTTY) return;
58230
58314
  restore_cursor_default();
58231
58315
  isHidden = true;
@@ -58775,8 +58859,8 @@ function createLogUpdate(stream$2, { showCursor: showCursor$1 = false } = {}) {
58775
58859
  };
58776
58860
  return render;
58777
58861
  }
58778
- const logUpdate$1 = createLogUpdate(process$1.stdout);
58779
- const logUpdateStderr = createLogUpdate(process$1.stderr);
58862
+ const logUpdate$1 = createLogUpdate(process5.stdout);
58863
+ const logUpdateStderr = createLogUpdate(process5.stderr);
58780
58864
 
58781
58865
  //#endregion
58782
58866
  //#region ../cli/dist/interactive.mjs
@@ -59180,7 +59264,8 @@ function isInteractive() {
59180
59264
  }
59181
59265
 
59182
59266
  //#endregion
59183
- //#region ../workers-auth/dist/chunk-PAWJFY3S.mjs
59267
+ //#region ../workers-auth/dist/chunk-PATSIG4T.mjs
59268
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
59184
59269
  var __defProp$4 = Object.defineProperty;
59185
59270
  var __name$1 = (target$1, value) => __defProp$4(target$1, "name", {
59186
59271
  value,
@@ -59188,8 +59273,9 @@ var __name$1 = (target$1, value) => __defProp$4(target$1, "name", {
59188
59273
  });
59189
59274
 
59190
59275
  //#endregion
59191
- //#region ../workers-auth/dist/chunk-QPIWLEU2.mjs
59276
+ //#region ../workers-auth/dist/chunk-N623NX3B.mjs
59192
59277
  var import_undici$2 = require_undici();
59278
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
59193
59279
  var hasWarnedAboutDeprecatedV1ApiToken = false;
59194
59280
  function readStoredAuthState(options) {
59195
59281
  const { configOverride, warningLogger, storage } = options;
@@ -61634,7 +61720,8 @@ function scrubEncryptedCredentials(options) {
61634
61720
  __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
61635
61721
 
61636
61722
  //#endregion
61637
- //#region ../workers-auth/dist/chunk-ZOAVW34R.mjs
61723
+ //#region ../workers-auth/dist/chunk-R6LKJWBN.mjs
61724
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
61638
61725
  function createPreferences(getConfigPath) {
61639
61726
  function getUserPreferencesPath() {
61640
61727
  return path__default.resolve(getConfigPath(), "preferences.json");
@@ -62765,6 +62852,7 @@ __name$1(createAuthConfigFileHelpers, "createAuthConfigFileHelpers");
62765
62852
 
62766
62853
  //#endregion
62767
62854
  //#region ../workers-auth/dist/cf/index.mjs
62855
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
62768
62856
  var CF_KEYRING_SERVICE_NAME = "cloudflare";
62769
62857
  var CF_CLI_NAME = "cf";
62770
62858
  var CF_DISPLAY_NAME = "cf";
@@ -63997,7 +64085,12 @@ function getWorkerNameToDurableObjectExportsMap(workers) {
63997
64085
  return workerNameToDurableObjectExportsMap;
63998
64086
  }
63999
64087
  function getWorkerNameToWorkflowEntrypointExportsMap(workers) {
64000
- return new Map(workers.map((worker) => [worker.config.name, /* @__PURE__ */ new Set()]));
64088
+ const workerNameToWorkflowEntrypointExportsMap = new Map(workers.map((worker) => [worker.config.name, new Set(Object.entries(worker.config.exports ?? {}).filter(([, value]) => value.type === "workflow").map(([name]) => name))]));
64089
+ for (const worker of workers) for (const value of Object.values(worker.config.env ?? {})) {
64090
+ if (value.type !== "workflow") continue;
64091
+ workerNameToWorkflowEntrypointExportsMap.get(value.worker)?.add(value.exportName);
64092
+ }
64093
+ return workerNameToWorkflowEntrypointExportsMap;
64001
64094
  }
64002
64095
  /**
64003
64096
  * Derives initial export types for all Workers from the Worker config files and returns them in a Map
@@ -64370,11 +64463,13 @@ function getWorkerBundleDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME)
64370
64463
  function getWorkerAssetsDir(root, directoryName = DEFAULT_WORKER_DIRECTORY_NAME) {
64371
64464
  return path.join(getWorkerDir(root, directoryName), "assets");
64372
64465
  }
64466
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
64373
64467
  var __defProp$3 = Object.defineProperty;
64374
64468
  var __name$4 = (target$1, value) => __defProp$3(target$1, "name", {
64375
64469
  value,
64376
64470
  configurable: true
64377
64471
  });
64472
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
64378
64473
  function isDirectory$1(path$1$1) {
64379
64474
  return fs2.statSync(path$1$1, { throwIfNoEntry: false })?.isDirectory() ?? false;
64380
64475
  }
@@ -64418,8 +64513,8 @@ async function writeWorkerConfig({ root, config: config$3, manifest, directoryNa
64418
64513
  ...rest,
64419
64514
  manifest
64420
64515
  };
64421
- await fs$1.mkdir(getWorkerDir(root, directoryName), { recursive: true });
64422
- await fs$1.writeFile(getWorkerConfigPath(root, directoryName), JSON.stringify(outputConfig));
64516
+ await fs.mkdir(getWorkerDir(root, directoryName), { recursive: true });
64517
+ await fs.writeFile(getWorkerConfigPath(root, directoryName), JSON.stringify(outputConfig));
64423
64518
  }
64424
64519
  /**
64425
64520
  * Write an output Container `container.config.json` to the Build Output
@@ -64429,8 +64524,8 @@ async function writeWorkerConfig({ root, config: config$3, manifest, directoryNa
64429
64524
  * `localReference` in the output config.
64430
64525
  */
64431
64526
  async function writeContainerConfig({ root, config: config$3, directoryName }) {
64432
- await fs$1.mkdir(getContainerDir(root, directoryName), { recursive: true });
64433
- await fs$1.writeFile(getContainerConfigPath(root, directoryName), JSON.stringify(config$3));
64527
+ await fs.mkdir(getContainerDir(root, directoryName), { recursive: true });
64528
+ await fs.writeFile(getContainerConfigPath(root, directoryName), JSON.stringify(config$3));
64434
64529
  }
64435
64530
  /**
64436
64531
  * Write the root `config.json` to the Build Output Specification tree.
@@ -64444,8 +64539,8 @@ async function writeRootConfig(root, settings, buildContext) {
64444
64539
  buildContext
64445
64540
  };
64446
64541
  const configPath = getRootConfigPath(root);
64447
- await fs$1.mkdir(path.dirname(configPath), { recursive: true });
64448
- await fs$1.writeFile(configPath, JSON.stringify(outputConfig));
64542
+ await fs.mkdir(path.dirname(configPath), { recursive: true });
64543
+ await fs.writeFile(configPath, JSON.stringify(outputConfig));
64449
64544
  }
64450
64545
  const BUILD_OUTPUT_ERROR_PREFIX = "Build Output Specification: ";
64451
64546
  /**
@@ -64488,7 +64583,7 @@ async function readWorkers(root) {
64488
64583
  const workersDir = getWorkersDir(root);
64489
64584
  const defaultWorker = await readWorker(root, DEFAULT_WORKER_DIRECTORY_NAME);
64490
64585
  if (defaultWorker === void 0) throw new BuildOutputError(`Default Worker at ${getWorkerDir(root, DEFAULT_WORKER_DIRECTORY_NAME)} has neither a bundle directory (${getWorkerBundleDir(root, DEFAULT_WORKER_DIRECTORY_NAME)}) nor an assets directory (${getWorkerAssetsDir(root, DEFAULT_WORKER_DIRECTORY_NAME)}).`);
64491
- const additionalWorkerDirectoryNames = (await fs$1.readdir(workersDir, { withFileTypes: true })).filter((entry) => entry.isDirectory() && entry.name !== DEFAULT_WORKER_DIRECTORY_NAME).map((entry) => entry.name);
64586
+ const additionalWorkerDirectoryNames = (await fs.readdir(workersDir, { withFileTypes: true })).filter((entry) => entry.isDirectory() && entry.name !== DEFAULT_WORKER_DIRECTORY_NAME).map((entry) => entry.name);
64492
64587
  const additionalWorkers = await Promise.all(additionalWorkerDirectoryNames.map(async (workerDirectoryName) => {
64493
64588
  const worker = await readWorker(root, workerDirectoryName);
64494
64589
  return worker === void 0 ? void 0 : [workerDirectoryName, worker];
@@ -64501,15 +64596,15 @@ async function readWorkers(root) {
64501
64596
  /** Read and parse all Container configs, if any. */
64502
64597
  async function readContainers(root) {
64503
64598
  const containersDir = getContainersDir(root);
64504
- if (!fs$3.existsSync(containersDir)) return [];
64505
- const containerDirectoryNames = (await fs$1.readdir(containersDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
64599
+ if (!fs$2.existsSync(containersDir)) return [];
64600
+ const containerDirectoryNames = (await fs.readdir(containersDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
64506
64601
  return Promise.all(containerDirectoryNames.map((containerDirectoryName) => readContainer(root, containerDirectoryName)));
64507
64602
  }
64508
64603
  /** Read and parse one Container config. */
64509
64604
  async function readContainer(root, containerDirectoryName) {
64510
64605
  const configPath = getContainerConfigPath(root, containerDirectoryName);
64511
- if (!fs$3.existsSync(configPath)) throw new BuildOutputError(`no Container config found at ${configPath}.`);
64512
- const contents = await fs$1.readFile(configPath, "utf-8");
64606
+ if (!fs$2.existsSync(configPath)) throw new BuildOutputError(`no Container config found at ${configPath}.`);
64607
+ const contents = await fs.readFile(configPath, "utf-8");
64513
64608
  const result = OutputContainerSchema.safeParse(parseJson(contents, configPath));
64514
64609
  if (!result.success) throw new BuildOutputError(`invalid Container config at ${configPath}.\n${result.error.message}`);
64515
64610
  return {
@@ -64528,14 +64623,14 @@ async function readContainer(root, containerDirectoryName) {
64528
64623
  */
64529
64624
  async function readWorker(root, workerDirectoryName) {
64530
64625
  const configPath = getWorkerConfigPath(root, workerDirectoryName);
64531
- if (!fs$3.existsSync(configPath)) throw new BuildOutputError(`no Worker config found at ${configPath}.`);
64532
- const contents = await fs$1.readFile(configPath, "utf-8");
64626
+ if (!fs$2.existsSync(configPath)) throw new BuildOutputError(`no Worker config found at ${configPath}.`);
64627
+ const contents = await fs.readFile(configPath, "utf-8");
64533
64628
  const result = OutputWorkerSchema.safeParse(parseJson(contents, configPath));
64534
64629
  if (!result.success) throw new BuildOutputError(`invalid Worker config at ${configPath}.\n${result.error.message}`);
64535
64630
  const bundleDir = getWorkerBundleDir(root, workerDirectoryName);
64536
64631
  const assetsDir = getWorkerAssetsDir(root, workerDirectoryName);
64537
- const hasBundleDir = fs$3.existsSync(bundleDir);
64538
- const hasAssetsDir = fs$3.existsSync(assetsDir);
64632
+ const hasBundleDir = fs$2.existsSync(bundleDir);
64633
+ const hasAssetsDir = fs$2.existsSync(assetsDir);
64539
64634
  if (hasBundleDir) return {
64540
64635
  configPath,
64541
64636
  config: await resolveManifest(result.data, configPath, bundleDir),
@@ -64581,7 +64676,7 @@ async function resolveManifest(config$3, configPath, bundleDir) {
64581
64676
  /** Infer JavaScript modules and source maps from a bundle directory. */
64582
64677
  async function scanModules(bundleDir) {
64583
64678
  const modules = {};
64584
- const entries = await fs$1.readdir(bundleDir, {
64679
+ const entries = await fs.readdir(bundleDir, {
64585
64680
  recursive: true,
64586
64681
  withFileTypes: true
64587
64682
  });
@@ -64611,8 +64706,8 @@ function inferModuleType(modulePath) {
64611
64706
  */
64612
64707
  async function readRootConfig(root) {
64613
64708
  const configPath = getRootConfigPath(root);
64614
- if (!fs$3.existsSync(configPath)) throw new BuildOutputError(`no root config found at ${configPath}.`);
64615
- const contents = await fs$1.readFile(configPath, "utf-8");
64709
+ if (!fs$2.existsSync(configPath)) throw new BuildOutputError(`no root config found at ${configPath}.`);
64710
+ const contents = await fs.readFile(configPath, "utf-8");
64616
64711
  const result = OutputRootConfigSchema.safeParse(parseJson(contents, configPath));
64617
64712
  if (!result.success) throw new BuildOutputError(`invalid root config at ${configPath}.\n${result.error.message}`);
64618
64713
  return result.data;
@@ -64627,7 +64722,7 @@ function parseJson(contents, configPath) {
64627
64722
 
64628
64723
  //#endregion
64629
64724
  //#region ../containers-shared/dist/index.mjs
64630
- const require$1$1 = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
64725
+ const require$1$3 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
64631
64726
  var __create = Object.create;
64632
64727
  var __defProp$2 = Object.defineProperty;
64633
64728
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -64638,8 +64733,8 @@ var __name$3 = (target$1, value) => __defProp$2(target$1, "name", {
64638
64733
  value,
64639
64734
  configurable: true
64640
64735
  });
64641
- var __require = /* @__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) {
64642
- if (typeof require$1$1 !== "undefined") return require$1$1.apply(this, arguments);
64736
+ var __require = /* @__PURE__ */ ((x) => typeof require$1$3 !== "undefined" ? require$1$3 : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require$1$3 !== "undefined" ? require$1$3 : a)[b] }) : x)(function(x) {
64737
+ if (typeof require$1$3 !== "undefined") return require$1$3.apply(this, arguments);
64643
64738
  throw Error("Dynamic require of \"" + x + "\" is not supported");
64644
64739
  });
64645
64740
  var __commonJS = (cb, mod$1) => function __require2() {
@@ -70413,12 +70508,14 @@ async function pushImageIfChanged({ pathToDocker, sourceTag, targetTag, containe
70413
70508
  ]);
70414
70509
  if (JSON.parse(remoteManifest).Descriptor.digest === hash$1) {
70415
70510
  logger$1.log("Image already exists remotely, skipping push");
70416
- logger$1.debug(`Untagging built image: ${sourceTag} since there was no change.`);
70417
- await runDockerCmd(pathToDocker, [
70418
- "image",
70419
- "rm",
70420
- sourceTag
70421
- ]);
70511
+ if (cleanupSourceTag !== false) {
70512
+ logger$1.debug(`Untagging built image: ${sourceTag} since there was no change.`);
70513
+ await runDockerCmd(pathToDocker, [
70514
+ "image",
70515
+ "rm",
70516
+ sourceTag
70517
+ ]);
70518
+ }
70422
70519
  return { remoteDigest: remoteDigest2 };
70423
70520
  }
70424
70521
  } catch (error$2) {
@@ -72150,11 +72247,13 @@ const RUNTIME_TYPES_MARKER = "// Begin runtime types";
72150
72247
  function getRuntimeHeader(workerdVersion, compatibilityDate, compatibilityFlags = []) {
72151
72248
  return `${RUNTIME_HEADER_COMMENT_PREFIX}${workerdVersion} ${compatibilityDate}${compatibilityFlags.length > 0 ? ` ${[...compatibilityFlags].sort().join(",")}` : ""}`;
72152
72249
  }
72250
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
72153
72251
  var __defProp$1 = Object.defineProperty;
72154
72252
  var __name$2 = (target$1, value) => __defProp$1(target$1, "name", {
72155
72253
  value,
72156
72254
  configurable: true
72157
72255
  });
72256
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
72158
72257
  function isCompatDate(str) {
72159
72258
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
72160
72259
  }
@@ -72190,7 +72289,7 @@ function stripRedundantNodejsCompatFlags(compatibilityDate, compatibilityFlags)
72190
72289
  return compatibilityFlags.filter((flag) => !redundantFlags.includes(flag));
72191
72290
  }
72192
72291
  __name$2(stripRedundantNodejsCompatFlags, "stripRedundantNodejsCompatFlags");
72193
- const require$1 = createRequire(import.meta.url);
72292
+ const require$2 = createRequire(import.meta.url);
72194
72293
  /**
72195
72294
  * Generates runtime types for a Workers project based on the provided compatibility settings.
72196
72295
  *
@@ -72248,7 +72347,7 @@ async function generate({ compatibilityDate, compatibilityFlags = [] }) {
72248
72347
  compatibilityDate: "2024-01-01",
72249
72348
  compatibilityFlags: ["nodejs_compat", "rtti_api"],
72250
72349
  modules: true,
72251
- script: (await fs$1.readFile(require$1.resolve("workerd/worker.mjs"))).toString()
72350
+ script: (await fs.readFile(require$2.resolve("workerd/worker.mjs"))).toString()
72252
72351
  }));
72253
72352
  const path$3 = `http://dummy.com/${compatibilityDate}${compatibilityFlags.length ? `+${compatibilityFlags.join("+")}` : ""}`;
72254
72353
  try {
@@ -78079,10 +78178,10 @@ const doubleSlashRegEx = /[/\\]{2}/;
78079
78178
  * @param {boolean} isTarget
78080
78179
  */
78081
78180
  function emitInvalidSegmentDeprecation(target$1, request$2, match, packageJsonUrl, internal, base, isTarget) {
78082
- if (process$1.noDeprecation) return;
78181
+ if (process5.noDeprecation) return;
78083
78182
  const pjsonPath = fileURLToPath(packageJsonUrl);
78084
78183
  const double = doubleSlashRegEx.exec(isTarget ? target$1 : request$2) !== null;
78085
- process$1.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target$1}" for module request "${request$2}" ${request$2 === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
78184
+ process5.emitWarning(`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target$1}" for module request "${request$2}" ${request$2 === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}.`, "DeprecationWarning", "DEP0166");
78086
78185
  }
78087
78186
  /**
78088
78187
  * @param {URL} url
@@ -78092,13 +78191,13 @@ function emitInvalidSegmentDeprecation(target$1, request$2, match, packageJsonUr
78092
78191
  * @returns {void}
78093
78192
  */
78094
78193
  function emitLegacyIndexDeprecation(url$2, packageJsonUrl, base, main) {
78095
- if (process$1.noDeprecation) return;
78194
+ if (process5.noDeprecation) return;
78096
78195
  if (defaultGetFormatWithoutErrors(url$2, { parentURL: base.href }) !== "module") return;
78097
78196
  const urlPath = fileURLToPath(url$2.href);
78098
78197
  const packagePath = fileURLToPath(new URL$1(".", packageJsonUrl));
78099
78198
  const basePath = fileURLToPath(base);
78100
- if (!main) process$1.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
78101
- else if (path__default.resolve(packagePath, main) !== urlPath) process$1.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
78199
+ if (!main) process5.emitWarning(`No "main" or "exports" field defined in the package.json for ${packagePath} resolving the main entry point "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
78200
+ else if (path__default.resolve(packagePath, main) !== urlPath) process5.emitWarning(`Package ${packagePath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(packagePath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, "DeprecationWarning", "DEP0151");
78102
78201
  }
78103
78202
  /**
78104
78203
  * @param {string} path
@@ -78398,11 +78497,11 @@ function isConditionalExportsMainSugar(exports$1, packageJsonUrl, base) {
78398
78497
  * @param {URL} base
78399
78498
  */
78400
78499
  function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
78401
- if (process$1.noDeprecation) return;
78500
+ if (process5.noDeprecation) return;
78402
78501
  const pjsonPath = fileURLToPath(pjsonUrl);
78403
78502
  if (emittedPackageWarnings.has(pjsonPath + "|" + match)) return;
78404
78503
  emittedPackageWarnings.add(pjsonPath + "|" + match);
78405
- process$1.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
78504
+ process5.emitWarning(`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`, "DeprecationWarning", "DEP0155");
78406
78505
  }
78407
78506
  /**
78408
78507
  * @param {URL} packageJsonUrl
@@ -79284,7 +79383,7 @@ const EXPERIMENTAL_CONFIG_PKG = "@cloudflare/vite-plugin/experimental-config";
79284
79383
  */
79285
79384
  async function loadCloudflareConfig(options) {
79286
79385
  const configPath = path.resolve(options.root, CONFIG_FILENAME);
79287
- if (!fs$3.existsSync(configPath)) return;
79386
+ if (!fs$2.existsSync(configPath)) return;
79288
79387
  const { result, dependencies } = await loadAndParseConfig(configPath, {
79289
79388
  isPreview: isPreviewBuild(),
79290
79389
  mode: options.mode
@@ -79330,7 +79429,7 @@ async function writeCloudflareTypes(options) {
79330
79429
  const configImportPath = relativeConfigPath.startsWith(".") ? relativeConfigPath : `./${relativeConfigPath}`;
79331
79430
  let existingContent;
79332
79431
  try {
79333
- existingContent = await fs$1.readFile(outputPath, "utf8");
79432
+ existingContent = await fs.readFile(outputPath, "utf8");
79334
79433
  } catch {}
79335
79434
  let content = generateTypes({
79336
79435
  configPath: configImportPath,
@@ -79345,8 +79444,8 @@ async function writeCloudflareTypes(options) {
79345
79444
  content += `\n${runtimeHeader}\n${RUNTIME_TYPES_MARKER}\n${runtimeTypes}`;
79346
79445
  }
79347
79446
  if (existingContent !== content) {
79348
- await fs$1.mkdir(outputDir, { recursive: true });
79349
- await fs$1.writeFile(outputPath, content);
79447
+ await fs.mkdir(outputDir, { recursive: true });
79448
+ await fs.writeFile(outputPath, content);
79350
79449
  }
79351
79450
  }
79352
79451
 
@@ -80399,7 +80498,7 @@ const additionalModulesPlugin = createPlugin("additional-modules", (ctx) => {
80399
80498
  assert(modulePath, `Unexpected error: module path not found in reference ${full}.`);
80400
80499
  let source;
80401
80500
  try {
80402
- source = await fs$1.readFile(modulePath);
80501
+ source = await fs.readFile(modulePath);
80403
80502
  } catch {
80404
80503
  throw new Error(`Import "${modulePath}" not found. Does the file exist?`);
80405
80504
  }
@@ -80951,7 +81050,7 @@ function createBuildApp(resolvedPluginConfig) {
80951
81050
  const clientEnvironment = builder.environments.client;
80952
81051
  assert(clientEnvironment, `No "client" environment`);
80953
81052
  const defaultHtmlPath = path.resolve(builder.config.root, "index.html");
80954
- const hasClientEntry = clientEnvironment.config.build.rollupOptions.input || fs$3.existsSync(defaultHtmlPath);
81053
+ const hasClientEntry = clientEnvironment.config.build.rollupOptions.input || fs$2.existsSync(defaultHtmlPath);
80955
81054
  const workerEnvironments = [...resolvedPluginConfig.environmentNameToWorkerMap.entries()].filter(([_, worker]) => !resolveDevOnly(worker.devOnly)).map(([environmentName]) => {
80956
81055
  const environment = builder.environments[environmentName];
80957
81056
  assert(environment, `"${environmentName}" environment not found`);
@@ -80976,12 +81075,12 @@ function createBuildApp(resolvedPluginConfig) {
80976
81075
  for (const assetPath of importedAssetPaths) {
80977
81076
  const src$1 = path.join(entryWorkerBuildDirectory, assetPath);
80978
81077
  const dest = path.join(clientBuildDirectory, assetPath);
80979
- if (!fs$3.existsSync(src$1)) continue;
80980
- if (fs$3.existsSync(dest)) fs$3.unlinkSync(src$1);
81078
+ if (!fs$2.existsSync(src$1)) continue;
81079
+ if (fs$2.existsSync(dest)) fs$2.unlinkSync(src$1);
80981
81080
  else {
80982
81081
  const destDir = path.dirname(dest);
80983
- fs$3.mkdirSync(destDir, { recursive: true });
80984
- fs$3.renameSync(src$1, dest);
81082
+ fs$2.mkdirSync(destDir, { recursive: true });
81083
+ fs$2.renameSync(src$1, dest);
80985
81084
  movedAssetPaths.push(dest);
80986
81085
  }
80987
81086
  }
@@ -80991,7 +81090,7 @@ function createBuildApp(resolvedPluginConfig) {
80991
81090
  function getHasPublicAssets({ publicDir }) {
80992
81091
  let hasPublicAssets = false;
80993
81092
  if (publicDir) try {
80994
- if (fs$3.readdirSync(publicDir).length) hasPublicAssets = true;
81093
+ if (fs$2.readdirSync(publicDir).length) hasPublicAssets = true;
80995
81094
  } catch {}
80996
81095
  return hasPublicAssets;
80997
81096
  }
@@ -81003,11 +81102,11 @@ async function fallbackBuild(builder, environment) {
81003
81102
  };
81004
81103
  await builder.build(environment);
81005
81104
  const fallbackEntryPath = path.resolve(builder.config.root, environment.config.build.outDir, CLIENT_FALLBACK_ENTRY_NAME);
81006
- fs$3.unlinkSync(fallbackEntryPath);
81105
+ fs$2.unlinkSync(fallbackEntryPath);
81007
81106
  }
81008
81107
  /** Read the Vite manifest emitted for a completed environment build. */
81009
81108
  function loadViteManifest(directory) {
81010
- const contents = fs$3.readFileSync(path.resolve(directory, ".vite", "manifest.json"), "utf-8");
81109
+ const contents = fs$2.readFileSync(path.resolve(directory, ".vite", "manifest.json"), "utf-8");
81011
81110
  return JSON.parse(contents);
81012
81111
  }
81013
81112
  function getImportedAssetPaths(viteManifest) {
@@ -81697,6 +81796,7 @@ async function prepareContainerImagesForVite(options) {
81697
81796
 
81698
81797
  //#endregion
81699
81798
  //#region ../workers-auth/dist/wrangler/index.mjs
81799
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
81700
81800
  var DefaultScopes = {
81701
81801
  "account:read": "See your account info such as account details, analytics, and memberships.",
81702
81802
  "user:read": "See your user info such as name, email address, and account memberships.",
@@ -81817,7 +81917,8 @@ function setKeyringPreference(enabled, ctx) {
81817
81917
  __name$1(setKeyringPreference, "setKeyringPreference");
81818
81918
 
81819
81919
  //#endregion
81820
- //#region ../deploy-helpers/dist/chunk-6LYDFTTF.mjs
81920
+ //#region ../deploy-helpers/dist/chunk-53YJWLG7.mjs
81921
+ const require$1 = createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
81821
81922
  var __defProp = Object.defineProperty;
81822
81923
  var __name = (target$1, value) => __defProp(target$1, "name", {
81823
81924
  value,
@@ -81829,11 +81930,11 @@ var __name = (target$1, value) => __defProp(target$1, "name", {
81829
81930
  var require_command_exists$1 = /* @__PURE__ */ __commonJS$2({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js": ((exports, module) => {
81830
81931
  var exec = __require$2("child_process").exec;
81831
81932
  var execSync$1 = __require$2("child_process").execSync;
81832
- var fs$2 = __require$2("fs");
81933
+ var fs$1 = __require$2("fs");
81833
81934
  var path$1 = __require$2("path");
81834
- var access = fs$2.access;
81835
- var accessSync$1 = fs$2.accessSync;
81836
- var constants$2 = fs$2.constants || fs$2;
81935
+ var access = fs$1.access;
81936
+ var accessSync$1 = fs$1.accessSync;
81937
+ var constants$2 = fs$1.constants || fs$1;
81837
81938
  var isUsingWindows = process.platform == "win32";
81838
81939
  var fileNotExists = function(commandName, callback) {
81839
81940
  access(commandName, constants$2.F_OK, function(err) {
@@ -81938,9 +82039,10 @@ var require_command_exists = /* @__PURE__ */ __commonJS$2({ "../../node_modules/
81938
82039
  }) });
81939
82040
 
81940
82041
  //#endregion
81941
- //#region ../deploy-helpers/dist/chunk-UNRDGU54.mjs
82042
+ //#region ../deploy-helpers/dist/chunk-ZJL3Z6NE.mjs
81942
82043
  var import_undici$1 = require_undici();
81943
82044
  var import_command_exists = require_command_exists();
82045
+ createRequire(import.meta.url || (typeof __filename === "string" ? __filename : "/"));
81944
82046
  function handleUnsafeCapnp(capnp) {
81945
82047
  if (capnp.compiled_schema) return readFileSync(resolve(capnp.compiled_schema));
81946
82048
  const { base_path, source_schemas } = capnp;
@@ -81980,7 +82082,7 @@ function fromMimeType(mimeType) {
81980
82082
  __name(fromMimeType, "fromMimeType");
81981
82083
  function createWorkerUploadForm(worker, bindings, options) {
81982
82084
  const formData = new import_undici$1.FormData();
81983
- 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;
82085
+ 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;
81984
82086
  const assetConfig = {
81985
82087
  html_handling: assets?.assetConfig?.html_handling,
81986
82088
  not_found_handling: assets?.assetConfig?.not_found_handling,
@@ -82463,6 +82565,7 @@ function createWorkerUploadForm(worker, bindings, options) {
82463
82565
  ...compatibility_date && { compatibility_date },
82464
82566
  ...compatibility_flags && { compatibility_flags },
82465
82567
  ...migrations && { migrations },
82568
+ ...code_update_strategy && { code_update_strategy },
82466
82569
  ...configuredExports && Object.keys(configuredExports).length > 0 && { exports: configuredExports },
82467
82570
  capnp_schema: capnpSchemaOutputFile,
82468
82571
  ...keep_bindings && { keep_bindings },
@@ -82493,7 +82596,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
82493
82596
  //#endregion
82494
82597
  //#region ../remote-bindings/dist/index.mjs
82495
82598
  var import_undici = require_undici();
82496
- var version$2 = "0.0.33";
82599
+ var version$2 = "0.0.37";
82497
82600
  var NoDefaultValueProvided = class extends UserError {
82498
82601
  constructor() {
82499
82602
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });
@@ -83679,14 +83782,14 @@ async function getInternalWorkerManifest(workerPath) {
83679
83782
  modulesRoot: miniflareModulesRoot,
83680
83783
  modules: { [workerPath]: {
83681
83784
  type: "esm",
83682
- contents: await fs$1.readFile(fileURLToPath(new URL(workerPath, import.meta.url)), "utf8")
83785
+ contents: await fs.readFile(fileURLToPath(new URL(workerPath, import.meta.url)), "utf8")
83683
83786
  } }
83684
83787
  };
83685
83788
  }
83686
83789
  async function getUserWorkerManifest(wrapperContents) {
83687
83790
  const moduleRunner = "workers/runner-worker/vite/module-runner";
83688
83791
  const moduleRunnerSource = satisfiesMinimumViteVersion("7.2.0") ? MODULE_RUNNER_PATH : MODULE_RUNNER_LEGACY_PATH;
83689
- const [runnerContents, moduleRunnerContents] = await Promise.all([fs$1.readFile(fileURLToPath(new URL(RUNNER_PATH, import.meta.url)), "utf8"), fs$1.readFile(fileURLToPath(new URL(moduleRunnerSource, import.meta.url)), "utf8")]);
83792
+ const [runnerContents, moduleRunnerContents] = await Promise.all([fs.readFile(fileURLToPath(new URL(RUNNER_PATH, import.meta.url)), "utf8"), fs.readFile(fileURLToPath(new URL(moduleRunnerSource, import.meta.url)), "utf8")]);
83690
83793
  return {
83691
83794
  mainModule: WRAPPER_PATH,
83692
83795
  modulesRoot: miniflareModulesRoot,
@@ -83805,7 +83908,7 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
83805
83908
  const publicDirFilePath = path.join(publicDir, pathname);
83806
83909
  const rootDirFilePath = path.join(root, pathname);
83807
83910
  for (const resolvedPath of [publicDirFilePath, rootDirFilePath]) try {
83808
- if ((await fs$1.stat(resolvedPath)).isFile()) return Response$1.json(resolvedPath === publicDirFilePath ? `${PUBLIC_DIR_PREFIX}${pathname}` : pathname);
83911
+ if ((await fs.stat(resolvedPath)).isFile()) return Response$1.json(resolvedPath === publicDirFilePath ? `${PUBLIC_DIR_PREFIX}${pathname}` : pathname);
83809
83912
  } catch {}
83810
83913
  }
83811
83914
  return Response$1.json(null);
@@ -83819,7 +83922,7 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
83819
83922
  const { root, publicDir } = resolvedViteConfig;
83820
83923
  if (pathname.startsWith(PUBLIC_DIR_PREFIX)) {
83821
83924
  const resolvedPath$1 = path.join(publicDir, pathname.slice(20));
83822
- return new Response$1(await fs$1.readFile(resolvedPath$1, "utf-8"), { headers: { "Content-Type": "text/html" } });
83925
+ return new Response$1(await fs.readFile(resolvedPath$1, "utf-8"), { headers: { "Content-Type": "text/html" } });
83823
83926
  }
83824
83927
  const bundledDev = viteDevServer.environments.client.bundledDev;
83825
83928
  if (bundledDev) {
@@ -83835,7 +83938,7 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
83835
83938
  return new Response$1(typeof file$2.source === "string" ? file$2.source : Buffer.from(file$2.source), { headers: { "Content-Type": "text/html" } });
83836
83939
  }
83837
83940
  const resolvedPath = path.join(root, pathname);
83838
- let html = await fs$1.readFile(resolvedPath, "utf-8");
83941
+ let html = await fs.readFile(resolvedPath, "utf-8");
83839
83942
  html = await viteDevServer.transformIndexHtml(resolvedPath, html);
83840
83943
  return new Response$1(html, { headers: { "Content-Type": "text/html" } });
83841
83944
  } catch (error$2) {
@@ -83997,7 +84100,7 @@ async function getDevMiniflareOptions(ctx, viteDevServer) {
83997
84100
  assert(modulePath, `Unexpected error: module path not found in reference: ${full}.`);
83998
84101
  let contents;
83999
84102
  try {
84000
- contents = await fs$1.readFile(modulePath);
84103
+ contents = await fs.readFile(modulePath);
84001
84104
  } catch {
84002
84105
  throw new Error(`Import "${modulePath}" not found. Does the file exist?`);
84003
84106
  }
@@ -84022,7 +84125,7 @@ async function getMiniflareManifest(bundle) {
84022
84125
  assert(mainEntry !== void 0, `Build Output Specification: \`mainModule\` "${mainModule}" is missing from \`modules\`.`);
84023
84126
  const modules = {};
84024
84127
  await Promise.all(Object.entries(bundle.modules).map(async ([modulePath, { type }]) => {
84025
- const contents = await fs$1.readFile(path.join(bundle.rootPath, modulePath));
84128
+ const contents = await fs.readFile(path.join(bundle.rootPath, modulePath));
84026
84129
  modules[modulePath] = {
84027
84130
  type,
84028
84131
  contents: type === "wasm" || type === "data" ? new Uint8Array(contents) : contents.toString()
@@ -84599,7 +84702,7 @@ function isInsideContainer() {
84599
84702
  //#endregion
84600
84703
  //#region ../../node_modules/.pnpm/is-wsl@3.1.0/node_modules/is-wsl/index.js
84601
84704
  const isWsl = () => {
84602
- if (process$1.platform !== "linux") return false;
84705
+ if (process5.platform !== "linux") return false;
84603
84706
  if (os.release().toLowerCase().includes("microsoft")) {
84604
84707
  if (isInsideContainer()) return false;
84605
84708
  return true;
@@ -84610,12 +84713,12 @@ const isWsl = () => {
84610
84713
  return false;
84611
84714
  }
84612
84715
  };
84613
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
84716
+ var is_wsl_default = process5.env.__IS_WSL_TEST__ ? isWsl : isWsl();
84614
84717
 
84615
84718
  //#endregion
84616
84719
  //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
84617
84720
  const execFile$2 = promisify(childProcess.execFile);
84618
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
84721
+ const powerShellPath$1 = () => `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
84619
84722
  const executePowerShell = async (command, options = {}) => {
84620
84723
  const { powerShellPath: psPath,...execFileOptions } = options;
84621
84724
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -84656,11 +84759,11 @@ const wslDrivesMountPoint = (() => {
84656
84759
  const configFilePath = "/etc/wsl.conf";
84657
84760
  let isConfigFileExists = false;
84658
84761
  try {
84659
- await fs.access(configFilePath, constants$1.F_OK);
84762
+ await fs4.access(configFilePath, constants$1.F_OK);
84660
84763
  isConfigFileExists = true;
84661
84764
  } catch {}
84662
84765
  if (!isConfigFileExists) return defaultMountPoint;
84663
- const parsedMountPoint = parseMountPointFromConfig(await fs.readFile(configFilePath, { encoding: "utf8" }));
84766
+ const parsedMountPoint = parseMountPointFromConfig(await fs4.readFile(configFilePath, { encoding: "utf8" }));
84664
84767
  if (parsedMountPoint === void 0) return defaultMountPoint;
84665
84768
  mountPoint = parsedMountPoint;
84666
84769
  mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
@@ -84676,7 +84779,7 @@ const canAccessPowerShell = async () => {
84676
84779
  canAccessPowerShellPromise ??= (async () => {
84677
84780
  try {
84678
84781
  const psPath = await powerShellPath();
84679
- await fs.access(psPath, constants$1.X_OK);
84782
+ await fs4.access(psPath, constants$1.X_OK);
84680
84783
  return true;
84681
84784
  } catch {
84682
84785
  return false;
@@ -84726,7 +84829,7 @@ function defineLazyProperty(object$2, propertyName, valueGetter) {
84726
84829
  //#region ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
84727
84830
  const execFileAsync$3 = promisify(execFile);
84728
84831
  async function defaultBrowserId() {
84729
- if (process$1.platform !== "darwin") throw new Error("macOS only");
84832
+ if (process5.platform !== "darwin") throw new Error("macOS only");
84730
84833
  const { stdout: stdout$2 } = await execFileAsync$3("defaults", [
84731
84834
  "read",
84732
84835
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -84741,7 +84844,7 @@ async function defaultBrowserId() {
84741
84844
  //#region ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
84742
84845
  const execFileAsync$2 = promisify(execFile);
84743
84846
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
84744
- if (process$1.platform !== "darwin") throw new Error("macOS only");
84847
+ if (process5.platform !== "darwin") throw new Error("macOS only");
84745
84848
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
84746
84849
  const execOptions = {};
84747
84850
  if (signal) execOptions.signal = signal;
@@ -84850,14 +84953,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
84850
84953
  const execFileAsync = promisify(execFile);
84851
84954
  const titleize = (string$3) => string$3.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
84852
84955
  async function defaultBrowser() {
84853
- if (process$1.platform === "darwin") {
84956
+ if (process5.platform === "darwin") {
84854
84957
  const id = await defaultBrowserId();
84855
84958
  return {
84856
84959
  name: await bundleName(id),
84857
84960
  id
84858
84961
  };
84859
84962
  }
84860
- if (process$1.platform === "linux") {
84963
+ if (process5.platform === "linux") {
84861
84964
  const { stdout: stdout$2 } = await execFileAsync("xdg-mime", [
84862
84965
  "query",
84863
84966
  "default",
@@ -84869,13 +84972,13 @@ async function defaultBrowser() {
84869
84972
  id
84870
84973
  };
84871
84974
  }
84872
- if (process$1.platform === "win32") return defaultBrowser$1();
84975
+ if (process5.platform === "win32") return defaultBrowser$1();
84873
84976
  throw new Error("Only macOS, Linux, and Windows are supported");
84874
84977
  }
84875
84978
 
84876
84979
  //#endregion
84877
84980
  //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
84878
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
84981
+ const isInSsh = Boolean(process5.env.SSH_CONNECTION || process5.env.SSH_CLIENT || process5.env.SSH_TTY);
84879
84982
  var is_in_ssh_default = isInSsh;
84880
84983
 
84881
84984
  //#endregion
@@ -84883,7 +84986,7 @@ var is_in_ssh_default = isInSsh;
84883
84986
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
84884
84987
  const __dirname = import.meta.url ? path__default.dirname(fileURLToPath(import.meta.url)) : "";
84885
84988
  const localXdgOpenPath = path__default.join(__dirname, "xdg-open");
84886
- const { platform, arch: arch$1 } = process$1;
84989
+ const { platform, arch: arch$1 } = process5;
84887
84990
  const tryEachApp = async (apps$1, opener) => {
84888
84991
  if (apps$1.length === 0) return;
84889
84992
  const errors$1 = [];
@@ -84993,10 +85096,10 @@ const baseOpen = async (options) => {
84993
85096
  const isBundled = !__dirname || __dirname === "/";
84994
85097
  let exeLocalXdgOpen = false;
84995
85098
  try {
84996
- await fs.access(localXdgOpenPath, constants$1.X_OK);
85099
+ await fs4.access(localXdgOpenPath, constants$1.X_OK);
84997
85100
  exeLocalXdgOpen = true;
84998
85101
  } catch {}
84999
- command = process$1.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
85102
+ command = process5.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
85000
85103
  }
85001
85104
  if (appArguments.length > 0) cliArguments.push(...appArguments);
85002
85105
  if (!options.wait) {
@@ -85128,7 +85231,13 @@ function addShortcuts(server, ctx) {
85128
85231
  worker: workerConfig,
85129
85232
  containers: []
85130
85233
  });
85131
- printBindings(convertConfigToBindings(wranglerConfig, { usePreviewIds: true }), {
85234
+ printBindings(convertConfigToBindings({
85235
+ ...wranglerConfig,
85236
+ durable_objects: wranglerConfig.durable_objects === void 0 ? void 0 : {
85237
+ ...wranglerConfig.durable_objects,
85238
+ bindings: wranglerConfig.durable_objects.bindings ?? []
85239
+ }
85240
+ }, { usePreviewIds: true }), {
85132
85241
  tailConsumers: wranglerConfig.tail_consumers,
85133
85242
  streamingTailConsumers: wranglerConfig.streaming_tail_consumers,
85134
85243
  containers: getWorkerContainersForDisplay({