@cloudflare/vite-plugin 1.53.0 → 1.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { a as __require$1, i as __name$3, n as __commonJS$1, o as __require$1$1,
3
3
  import * as nodeModule from "node:module";
4
4
  import { builtinModules, createRequire } from "node:module";
5
5
  import * as fs$1 from "node:fs";
6
- import fs2, { accessSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
6
+ import fs2, { accessSync, appendFileSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
7
7
  import os, { arch } from "node:os";
8
8
  import * as path2 from "node:path";
9
9
  import path2__default, { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
@@ -43,8 +43,8 @@ import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$
43
43
  import { fileURLToPath as fileURLToPath$1 } from "url";
44
44
  import { createRequire as createRequire$1 } from "module";
45
45
 
46
- //#region ../workers-utils/dist/chunk-IV7UMGT2.mjs
47
- var DEFAULT_COMPAT_DATE = "2026-08-15";
46
+ //#region ../workers-utils/dist/chunk-SUQD2A5M.mjs
47
+ var DEFAULT_COMPAT_DATE = "2026-08-25";
48
48
  function assertNever(_value) {}
49
49
  __name$5(assertNever, "assertNever");
50
50
  function mapWorkerMetadataBindings(bindings$1) {
@@ -499,43 +499,43 @@ function hasKnownExportType$2(entry) {
499
499
  return type === "durable-object" || type === "worker";
500
500
  }
501
501
  __name$5(hasKnownExportType$2, "hasKnownExportType");
502
- function partitionExports$2(exports$2) {
502
+ function partitionExports$2(exports$1$1) {
503
503
  const partitioned = {
504
504
  "durable-object": {},
505
505
  worker: {}
506
506
  };
507
- if (exports$2 === void 0) return partitioned;
508
- for (const [name, entry] of Object.entries(exports$2)) {
507
+ if (exports$1$1 === void 0) return partitioned;
508
+ for (const [name, entry] of Object.entries(exports$1$1)) {
509
509
  if (!hasKnownExportType$2(entry)) continue;
510
510
  partitioned[entry.type][name] = entry;
511
511
  }
512
512
  return partitioned;
513
513
  }
514
514
  __name$5(partitionExports$2, "partitionExports");
515
- function getDurableObjectExports$2(exports$2) {
516
- return partitionExports$2(exports$2)["durable-object"];
515
+ function getDurableObjectExports$2(exports$1$1) {
516
+ return partitionExports$2(exports$1$1)["durable-object"];
517
517
  }
518
518
  __name$5(getDurableObjectExports$2, "getDurableObjectExports");
519
- function hasDurableObjectExports$2(exports$2) {
520
- return Object.keys(getDurableObjectExports$2(exports$2)).length > 0;
519
+ function hasDurableObjectExports$2(exports$1$1) {
520
+ return Object.keys(getDurableObjectExports$2(exports$1$1)).length > 0;
521
521
  }
522
522
  __name$5(hasDurableObjectExports$2, "hasDurableObjectExports");
523
- function getContainerNameToClassNameMap$2(exports$2) {
523
+ function getContainerNameToClassNameMap$2(exports$1$1) {
524
524
  const containerNameToClassName = /* @__PURE__ */ new Map();
525
- for (const [className, entry] of Object.entries(getDurableObjectExports$2(exports$2))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
525
+ for (const [className, entry] of Object.entries(getDurableObjectExports$2(exports$1$1))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
526
526
  return containerNameToClassName;
527
527
  }
528
528
  __name$5(getContainerNameToClassNameMap$2, "getContainerNameToClassNameMap");
529
- function resolveContainerClassName(container, exports$2) {
529
+ function resolveContainerClassName(container, exports$1$1) {
530
530
  if (container.class_name !== void 0) return container.class_name;
531
531
  if (container.name === void 0) return;
532
- return getContainerNameToClassNameMap$2(exports$2).get(container.name);
532
+ return getContainerNameToClassNameMap$2(exports$1$1).get(container.name);
533
533
  }
534
534
  __name$5(resolveContainerClassName, "resolveContainerClassName");
535
- function getContainerDurableObjectClassNames$2(containers, exports$2) {
535
+ function getContainerDurableObjectClassNames$2(containers, exports$1$1) {
536
536
  const classNames = /* @__PURE__ */ new Set();
537
537
  for (const container of containers ?? []) {
538
- const className = resolveContainerClassName(container, exports$2);
538
+ const className = resolveContainerClassName(container, exports$1$1);
539
539
  if (className !== void 0) classNames.add(className);
540
540
  }
541
541
  return classNames;
@@ -25308,7 +25308,7 @@ var require_undici = /* @__PURE__ */ __commonJS$4({ "../../node_modules/.pnpm/un
25308
25308
  //#endregion
25309
25309
  //#region ../workers-utils/dist/index.mjs
25310
25310
  var import_undici$4 = require_undici();
25311
- var require_vendors$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$2, module$1) {
25311
+ var require_vendors$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/vendors.json"(exports$1$1, module$1) {
25312
25312
  module$1.exports = [
25313
25313
  {
25314
25314
  name: "Agola CI",
@@ -25634,26 +25634,26 @@ var require_vendors$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/n
25634
25634
  }
25635
25635
  ];
25636
25636
  } });
25637
- var require_ci_info$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/index.js"(exports$2) {
25637
+ var require_ci_info$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/node_modules/ci-info/index.js"(exports$1$1) {
25638
25638
  var vendors$1 = require_vendors$2();
25639
25639
  var env$3 = process.env;
25640
- Object.defineProperty(exports$2, "_vendors", { value: vendors$1.map(function(v) {
25640
+ Object.defineProperty(exports$1$1, "_vendors", { value: vendors$1.map(function(v) {
25641
25641
  return v.constant;
25642
25642
  }) });
25643
- exports$2.name = null;
25644
- exports$2.isPR = null;
25645
- exports$2.id = null;
25643
+ exports$1$1.name = null;
25644
+ exports$1$1.isPR = null;
25645
+ exports$1$1.id = null;
25646
25646
  if (env$3.CI !== "false") vendors$1.forEach(function(vendor) {
25647
25647
  const isCI2 = (Array.isArray(vendor.env) ? vendor.env : [vendor.env]).every(function(obj) {
25648
25648
  return checkEnv$1(obj);
25649
25649
  });
25650
- exports$2[vendor.constant] = isCI2;
25650
+ exports$1$1[vendor.constant] = isCI2;
25651
25651
  if (!isCI2) return;
25652
- exports$2.name = vendor.name;
25653
- exports$2.isPR = checkPR$1(vendor);
25654
- exports$2.id = vendor.constant;
25652
+ exports$1$1.name = vendor.name;
25653
+ exports$1$1.isPR = checkPR$1(vendor);
25654
+ exports$1$1.id = vendor.constant;
25655
25655
  });
25656
- exports$2.isCI = !!(env$3.CI !== "false" && (env$3.BUILD_ID || env$3.BUILD_NUMBER || env$3.CI || env$3.CI_APP_ID || env$3.CI_BUILD_ID || env$3.CI_BUILD_NUMBER || env$3.CI_NAME || env$3.CONTINUOUS_INTEGRATION || env$3.RUN_ID || exports$2.name || false));
25656
+ exports$1$1.isCI = !!(env$3.CI !== "false" && (env$3.BUILD_ID || env$3.BUILD_NUMBER || env$3.CI || env$3.CI_APP_ID || env$3.CI_BUILD_ID || env$3.CI_BUILD_NUMBER || env$3.CI_NAME || env$3.CONTINUOUS_INTEGRATION || env$3.RUN_ID || exports$1$1.name || false));
25657
25657
  function checkEnv$1(obj) {
25658
25658
  if (typeof obj === "string") return !!env$3[obj];
25659
25659
  if ("env" in obj) return env$3[obj.env] && env$3[obj.env].includes(obj.includes);
@@ -25681,7 +25681,7 @@ var require_ci_info$2 = __commonJS$3({ "../../node_modules/.pnpm/ci-info@4.4.0/n
25681
25681
  }
25682
25682
  __name$5(checkPR$1, "checkPR");
25683
25683
  } });
25684
- var require_command_exists$3 = __commonJS$3({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports$2, module$1) {
25684
+ var require_command_exists$3 = __commonJS$3({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports$1$1, module$1) {
25685
25685
  var exec$3 = __require$2("child_process").exec;
25686
25686
  var execSync$2 = __require$2("child_process").execSync;
25687
25687
  var fs3 = __require$2("fs");
@@ -25762,17 +25762,17 @@ var require_command_exists$3 = __commonJS$3({ "../../node_modules/.pnpm/command-
25762
25762
  }, "cleanInput");
25763
25763
  if (isUsingWindows$1) cleanInput$1 = /* @__PURE__ */ __name$5(function(s) {
25764
25764
  if (/[\\]/.test(s)) {
25765
- var dirname3 = "\"" + path6.dirname(s) + "\"";
25765
+ var dirname4 = "\"" + path6.dirname(s) + "\"";
25766
25766
  var basename2 = "\"" + path6.basename(s) + "\"";
25767
- return dirname3 + ":" + basename2;
25767
+ return dirname4 + ":" + basename2;
25768
25768
  }
25769
25769
  return "\"" + s + "\"";
25770
25770
  }, "cleanInput");
25771
25771
  module$1.exports = /* @__PURE__ */ __name$5(function commandExists(commandName, callback$1) {
25772
25772
  var cleanedCommandName = cleanInput$1(commandName);
25773
- if (!callback$1 && typeof Promise !== "undefined") return new Promise(function(resolve2, reject) {
25773
+ if (!callback$1 && typeof Promise !== "undefined") return new Promise(function(resolve3, reject) {
25774
25774
  commandExists(commandName, function(error51, output) {
25775
- if (output) resolve2(commandName);
25775
+ if (output) resolve3(commandName);
25776
25776
  else reject(error51);
25777
25777
  });
25778
25778
  });
@@ -25785,14 +25785,14 @@ var require_command_exists$3 = __commonJS$3({ "../../node_modules/.pnpm/command-
25785
25785
  else return commandExistsUnixSync$1(commandName, cleanedCommandName);
25786
25786
  };
25787
25787
  } });
25788
- var require_command_exists2$1 = __commonJS$3({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/index.js"(exports$2, module$1) {
25788
+ var require_command_exists2$1 = __commonJS$3({ "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/index.js"(exports$1$1, module$1) {
25789
25789
  module$1.exports = require_command_exists$3();
25790
25790
  } });
25791
- var require_ini$1 = __commonJS$3({ "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports$2) {
25792
- exports$2.parse = exports$2.decode = decode3;
25793
- exports$2.stringify = exports$2.encode = encode3;
25794
- exports$2.safe = safe;
25795
- exports$2.unsafe = unsafe;
25791
+ var require_ini$1 = __commonJS$3({ "../../node_modules/.pnpm/ini@1.3.8/node_modules/ini/ini.js"(exports$1$1) {
25792
+ exports$1$1.parse = exports$1$1.decode = decode3;
25793
+ exports$1$1.stringify = exports$1$1.encode = encode3;
25794
+ exports$1$1.safe = safe;
25795
+ exports$1$1.unsafe = unsafe;
25796
25796
  var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
25797
25797
  function encode3(obj, opt) {
25798
25798
  var children = [];
@@ -25924,7 +25924,7 @@ var require_ini$1 = __commonJS$3({ "../../node_modules/.pnpm/ini@1.3.8/node_modu
25924
25924
  }
25925
25925
  __name$5(unsafe, "unsafe");
25926
25926
  } });
25927
- var require_strip_json_comments$1 = __commonJS$3({ "../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js"(exports$2, module$1) {
25927
+ var require_strip_json_comments$1 = __commonJS$3({ "../../node_modules/.pnpm/strip-json-comments@2.0.1/node_modules/strip-json-comments/index.js"(exports$1$1, module$1) {
25928
25928
  var singleComment = 1;
25929
25929
  var multiComment = 2;
25930
25930
  function stripWithoutWhitespace() {
@@ -25983,16 +25983,16 @@ var require_strip_json_comments$1 = __commonJS$3({ "../../node_modules/.pnpm/str
25983
25983
  return ret + (insideComment ? strip(str.substr(offset)) : str.substr(offset));
25984
25984
  };
25985
25985
  } });
25986
- var require_utils$3 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports$2) {
25986
+ var require_utils$3 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports$1$1) {
25987
25987
  var fs3 = __require$2("fs");
25988
25988
  var ini = require_ini$1();
25989
25989
  var path6 = __require$2("path");
25990
25990
  var stripJsonComments = require_strip_json_comments$1();
25991
- var parse3$3 = exports$2.parse = function(content) {
25991
+ var parse3$3 = exports$1$1.parse = function(content) {
25992
25992
  if (/^\s*{/.test(content)) return JSON.parse(stripJsonComments(content));
25993
25993
  return ini.parse(content);
25994
25994
  };
25995
- var file2 = exports$2.file = function() {
25995
+ var file2 = exports$1$1.file = function() {
25996
25996
  var args = [].slice.call(arguments).filter(function(arg) {
25997
25997
  return arg != null;
25998
25998
  });
@@ -26004,11 +26004,11 @@ var require_utils$3 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_mod
26004
26004
  return;
26005
26005
  }
26006
26006
  };
26007
- exports$2.json = function() {
26007
+ exports$1$1.json = function() {
26008
26008
  var content = file2.apply(null, arguments);
26009
26009
  return content ? parse3$3(content) : null;
26010
26010
  };
26011
- exports$2.env = function(prefix, env2) {
26011
+ exports$1$1.env = function(prefix, env2) {
26012
26012
  env2 = env2 || process.env;
26013
26013
  var obj = {};
26014
26014
  var l = prefix.length;
@@ -26026,7 +26026,7 @@ var require_utils$3 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_mod
26026
26026
  }
26027
26027
  return obj;
26028
26028
  };
26029
- exports$2.find = function() {
26029
+ exports$1$1.find = function() {
26030
26030
  var rel = path6.join.apply(null, [].slice.call(arguments));
26031
26031
  function find2(start, rel2) {
26032
26032
  var file3 = path6.join(start, rel2);
@@ -26041,7 +26041,7 @@ var require_utils$3 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_mod
26041
26041
  return find2(process.cwd(), rel);
26042
26042
  };
26043
26043
  } });
26044
- var require_deep_extend$1 = __commonJS$3({ "../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js"(exports$2, module$1) {
26044
+ var require_deep_extend$1 = __commonJS$3({ "../../node_modules/.pnpm/deep-extend@0.6.0/node_modules/deep-extend/lib/deep-extend.js"(exports$1$1, module$1) {
26045
26045
  function isSpecificValue(val) {
26046
26046
  return val instanceof Buffer || val instanceof Date || val instanceof RegExp ? true : false;
26047
26047
  }
@@ -26104,7 +26104,7 @@ var require_deep_extend$1 = __commonJS$3({ "../../node_modules/.pnpm/deep-extend
26104
26104
  return target$1;
26105
26105
  };
26106
26106
  } });
26107
- var require_minimist$1 = __commonJS$3({ "../../node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js"(exports$2, module$1) {
26107
+ var require_minimist$1 = __commonJS$3({ "../../node_modules/.pnpm/minimist@1.2.6/node_modules/minimist/index.js"(exports$1$1, module$1) {
26108
26108
  module$1.exports = function(args, opts) {
26109
26109
  if (!opts) opts = {};
26110
26110
  var flags = {
@@ -26279,7 +26279,7 @@ var require_minimist$1 = __commonJS$3({ "../../node_modules/.pnpm/minimist@1.2.6
26279
26279
  }
26280
26280
  __name$5(isConstructorOrProto, "isConstructorOrProto");
26281
26281
  } });
26282
- var require_rc$1 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports$2, module$1) {
26282
+ var require_rc$1 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/index.js"(exports$1$1, module$1) {
26283
26283
  var cc = require_utils$3();
26284
26284
  var join3 = __require$2("path").join;
26285
26285
  var deepExtend = require_deep_extend$1();
@@ -26323,14 +26323,14 @@ var require_rc$1 = __commonJS$3({ "../../node_modules/.pnpm/rc@1.2.8/node_module
26323
26323
  ]));
26324
26324
  };
26325
26325
  } });
26326
- var require_registry_url$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-url@3.1.0/node_modules/registry-url/index.js"(exports$2, module$1) {
26326
+ var require_registry_url$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-url@3.1.0/node_modules/registry-url/index.js"(exports$1$1, module$1) {
26327
26327
  module$1.exports = function(scope) {
26328
26328
  var rc = require_rc$1()("npm", { registry: "https://registry.npmjs.org/" });
26329
26329
  var url2 = rc[scope + ":registry"] || rc.registry;
26330
26330
  return url2.slice(-1) === "/" ? url2 : url2 + "/";
26331
26331
  };
26332
26332
  } });
26333
- var require_safe_buffer$1 = __commonJS$3({ "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports$2, module$1) {
26333
+ var require_safe_buffer$1 = __commonJS$3({ "../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js"(exports$1$1, module$1) {
26334
26334
  var buffer$1 = __require$2("buffer");
26335
26335
  var Buffer2 = buffer$1.Buffer;
26336
26336
  function copyProps(src$1, dst) {
@@ -26339,8 +26339,8 @@ var require_safe_buffer$1 = __commonJS$3({ "../../node_modules/.pnpm/safe-buffer
26339
26339
  __name$5(copyProps, "copyProps");
26340
26340
  if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) module$1.exports = buffer$1;
26341
26341
  else {
26342
- copyProps(buffer$1, exports$2);
26343
- exports$2.Buffer = SafeBuffer;
26342
+ copyProps(buffer$1, exports$1$1);
26343
+ exports$1$1.Buffer = SafeBuffer;
26344
26344
  }
26345
26345
  function SafeBuffer(arg, encodingOrOffset, length) {
26346
26346
  return Buffer2(arg, encodingOrOffset, length);
@@ -26369,7 +26369,7 @@ var require_safe_buffer$1 = __commonJS$3({ "../../node_modules/.pnpm/safe-buffer
26369
26369
  return buffer$1.SlowBuffer(size);
26370
26370
  };
26371
26371
  } });
26372
- var require_base64$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/base64.js"(exports$2, module$1) {
26372
+ var require_base64$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/base64.js"(exports$1$1, module$1) {
26373
26373
  var safeBuffer = require_safe_buffer$1().Buffer;
26374
26374
  function decodeBase64(base643) {
26375
26375
  return safeBuffer.from(base643, "base64").toString("utf8");
@@ -26384,7 +26384,7 @@ var require_base64$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-auth-to
26384
26384
  encodeBase64
26385
26385
  };
26386
26386
  } });
26387
- var require_registry_auth_token$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/index.js"(exports$2, module$1) {
26387
+ var require_registry_auth_token$1 = __commonJS$3({ "../../node_modules/.pnpm/registry-auth-token@3.3.2/node_modules/registry-auth-token/index.js"(exports$1$1, module$1) {
26388
26388
  var url2 = __require$2("url");
26389
26389
  var base643 = require_base64$1();
26390
26390
  var decodeBase64 = base643.decodeBase64;
@@ -26459,7 +26459,7 @@ var require_registry_auth_token$1 = __commonJS$3({ "../../node_modules/.pnpm/reg
26459
26459
  }
26460
26460
  __name$5(getTokenForUsernameAndPassword, "getTokenForUsernameAndPassword");
26461
26461
  } });
26462
- var require_update_check$1 = __commonJS$3({ "../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports$2, module$1) {
26462
+ var require_update_check$1 = __commonJS$3({ "../../node_modules/.pnpm/update-check@1.5.4/node_modules/update-check/index.js"(exports$1$1, module$1) {
26463
26463
  var { URL: URL2 } = __require$2("url");
26464
26464
  var { join: join3 } = __require$2("path");
26465
26465
  var fs3 = __require$2("fs");
@@ -26498,7 +26498,7 @@ var require_update_check$1 = __commonJS$3({ "../../node_modules/.pnpm/update-che
26498
26498
  lastUpdate
26499
26499
  }), "utf8");
26500
26500
  }, "updateCache");
26501
- var loadPackage = /* @__PURE__ */ __name$5((url2, authInfo) => new Promise((resolve2, reject) => {
26501
+ var loadPackage = /* @__PURE__ */ __name$5((url2, authInfo) => new Promise((resolve3, reject) => {
26502
26502
  const options = {
26503
26503
  host: url2.hostname,
26504
26504
  path: url2.pathname,
@@ -26524,7 +26524,7 @@ var require_update_check$1 = __commonJS$3({ "../../node_modules/.pnpm/update-che
26524
26524
  });
26525
26525
  response.on("end", () => {
26526
26526
  try {
26527
- resolve2(JSON.parse(rawData));
26527
+ resolve3(JSON.parse(rawData));
26528
26528
  } catch (e2) {
26529
26529
  reject(e2);
26530
26530
  }
@@ -26625,6 +26625,7 @@ var defaultWranglerConfig$1 = {
26625
26625
  producers: [],
26626
26626
  consumers: []
26627
26627
  },
26628
+ connect: [],
26628
26629
  r2_buckets: [],
26629
26630
  d1_databases: [],
26630
26631
  vectorize: [],
@@ -40540,8 +40541,8 @@ var getSanitizeLogs = getBooleanEnvironmentVariableFactory({
40540
40541
  variableName: "WRANGLER_LOG_SANITIZE",
40541
40542
  defaultValue: true
40542
40543
  });
40543
- var getOutputFileDirectoryFromEnv = getEnvironmentVariableFactory({ variableName: "WRANGLER_OUTPUT_FILE_DIRECTORY" });
40544
- var getOutputFilePathFromEnv = getEnvironmentVariableFactory({ variableName: "WRANGLER_OUTPUT_FILE_PATH" });
40544
+ var getOutputFileDirectoryFromEnv$1 = getEnvironmentVariableFactory({ variableName: "WRANGLER_OUTPUT_FILE_DIRECTORY" });
40545
+ var getOutputFilePathFromEnv$1 = getEnvironmentVariableFactory({ variableName: "WRANGLER_OUTPUT_FILE_PATH" });
40545
40546
  var getCIMatchTag = getEnvironmentVariableFactory({ variableName: "WRANGLER_CI_MATCH_TAG" });
40546
40547
  var getCIOverrideName$1 = getEnvironmentVariableFactory({ variableName: "WRANGLER_CI_OVERRIDE_NAME" });
40547
40548
  var getCIOverrideNetworkModeHost = getEnvironmentVariableFactory({ variableName: "WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST" });
@@ -41419,6 +41420,7 @@ function normalizeAndValidateEnvironment$1(diagnostics, configPath, rawEnv, isDi
41419
41420
  producers: [],
41420
41421
  consumers: []
41421
41422
  }),
41423
+ connect: notInheritable$1(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "connect", validateConnectHandlers$1(envName), []),
41422
41424
  r2_buckets: notInheritable$1(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "r2_buckets", validateBindingArray$1(envName, validateR2Binding$1), []),
41423
41425
  d1_databases: notInheritable$1(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "d1_databases", validateBindingArray$1(envName, validateD1Binding$1), []),
41424
41426
  vectorize: notInheritable$1(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vectorize", validateBindingArray$1(envName, validateVectorizeBinding$1), []),
@@ -41461,7 +41463,7 @@ function normalizeAndValidateEnvironment$1(diagnostics, configPath, rawEnv, isDi
41461
41463
  cache: inheritable$1(diagnostics, topLevelEnv, rawEnv, "cache", validateCache$1, void 0),
41462
41464
  compliance_region: inheritable$1(diagnostics, topLevelEnv, rawEnv, "compliance_region", isOneOf$1("public", "fedramp_high"), void 0),
41463
41465
  python_modules: inheritable$1(diagnostics, topLevelEnv, rawEnv, "python_modules", validatePythonModules$1, { exclude: ["**/*.pyc"] }),
41464
- previews: inheritable$1(diagnostics, topLevelEnv, rawEnv, "previews", validatePreviewsConfig$1(envName), void 0)
41466
+ previews: inheritable$1(diagnostics, topLevelEnv, rawEnv, "previews", validatePreviewsConfig$1(envName, configPath), void 0)
41465
41467
  };
41466
41468
  warnIfDurableObjectsHaveNoLifecycleConfig$1(diagnostics, environment.durable_objects, environment.migrations, environment.exports, configPath);
41467
41469
  errorIfMigrationsAndExportsBothSet$1(diagnostics, environment.migrations, environment.exports);
@@ -41743,6 +41745,14 @@ var validateDurableObjectBinding$1 = /* @__PURE__ */ __name$5((diagnostics, fiel
41743
41745
  return isValid;
41744
41746
  }, "validateDurableObjectBinding");
41745
41747
  var workflowNameFormatMessage$1 = `Workflow names must be 1-64 characters long, start with a letter, number, or underscore, and may only contain letters, numbers, underscores, or hyphens.`;
41748
+ function validateWorkflowRetentionValue$1(diagnostics, field, key, value) {
41749
+ const isValidNumber = typeof value === "number" && Number.isInteger(value) && value > 0;
41750
+ const isValidString = typeof value === "string" && value.length > 0;
41751
+ if (isValidNumber || isValidString) return true;
41752
+ diagnostics.errors.push(`"${field}" bindings "default_retention.${key}" field must be a positive integer of milliseconds or a duration string such as "3 days", but got ${JSON.stringify(value)}.`);
41753
+ return false;
41754
+ }
41755
+ __name$5(validateWorkflowRetentionValue$1, "validateWorkflowRetentionValue");
41746
41756
  var validateWorkflowBinding$1 = /* @__PURE__ */ __name$5((diagnostics, field, value) => {
41747
41757
  if (typeof value !== "object" || value === null) {
41748
41758
  diagnostics.errors.push(`"workflows" bindings should be objects, but got ${JSON.stringify(value)}`);
@@ -41768,10 +41778,6 @@ var validateWorkflowBinding$1 = /* @__PURE__ */ __name$5((diagnostics, field, va
41768
41778
  diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "script_name" field but got ${JSON.stringify(value)}.`);
41769
41779
  isValid = false;
41770
41780
  }
41771
- if (!isOptionalProperty$1(value, "remote", "boolean")) {
41772
- diagnostics.errors.push(`"${field}" bindings should, optionally, have a boolean "remote" field but got ${JSON.stringify(value)}.`);
41773
- isValid = false;
41774
- }
41775
41781
  if (hasProperty$1(value, "schedules") && value.schedules !== void 0) if (typeof value.schedules === "string") {
41776
41782
  if (value.schedules.length === 0) {
41777
41783
  diagnostics.errors.push(`"${field}" bindings "schedules" field must not be an empty string.`);
@@ -41805,14 +41811,22 @@ var validateWorkflowBinding$1 = /* @__PURE__ */ __name$5((diagnostics, field, va
41805
41811
  }
41806
41812
  validateAdditionalProperties$1(diagnostics, `${field}.limits`, Object.keys(limits), ["steps"]);
41807
41813
  }
41814
+ if (hasProperty$1(value, "default_retention") && value.default_retention !== void 0) if (typeof value.default_retention !== "object" || value.default_retention === null || Array.isArray(value.default_retention)) {
41815
+ diagnostics.errors.push(`"${field}" bindings should, optionally, have an object "default_retention" field but got ${JSON.stringify(value)}.`);
41816
+ isValid = false;
41817
+ } else {
41818
+ const defaultRetention = value.default_retention;
41819
+ for (const key of ["success_retention", "error_retention"]) if (defaultRetention[key] !== void 0 && !validateWorkflowRetentionValue$1(diagnostics, field, key, defaultRetention[key])) isValid = false;
41820
+ validateAdditionalProperties$1(diagnostics, `${field}.default_retention`, Object.keys(defaultRetention), ["success_retention", "error_retention"]);
41821
+ }
41808
41822
  validateAdditionalProperties$1(diagnostics, field, Object.keys(value), [
41809
41823
  "binding",
41810
41824
  "name",
41811
41825
  "class_name",
41812
41826
  "script_name",
41813
- "remote",
41814
41827
  "limits",
41815
- "schedules"
41828
+ "schedules",
41829
+ "default_retention"
41816
41830
  ]);
41817
41831
  return isValid;
41818
41832
  }, "validateWorkflowBinding");
@@ -42005,7 +42019,36 @@ function validateSshPublicKeys$1(diagnostics, field, value, nameRequired) {
42005
42019
  }
42006
42020
  }
42007
42021
  __name$5(validateSshPublicKeys$1, "validateSshPublicKeys");
42008
- function validateContainerApp$1(envName, topLevelName, configPath) {
42022
+ function validatePreviewsContainers$1(envName, configPath) {
42023
+ const innerValidator = validateContainerApp$1(envName, void 0, configPath, { generateDefaultName: false });
42024
+ return (diagnostics, field, value, config2) => {
42025
+ if (Array.isArray(value)) {
42026
+ const nameFields = [...value.entries()].filter(([, entry]) => entry && typeof entry === "object" && "name" in entry).map(([index]) => `"${field}[${index}].name"`);
42027
+ if (nameFields.length > 0) {
42028
+ diagnostics.errors.push(`${nameFields.join(", ")} cannot be set. A preview container's application name is generated from the worker name, preview slug, and Durable Object class name, so that separate previews of the same Worker do not collide. Remove it and identify the container with "class_name".`);
42029
+ return false;
42030
+ }
42031
+ const seenClasses = /* @__PURE__ */ new Set();
42032
+ const duplicateClasses = /* @__PURE__ */ new Set();
42033
+ for (const entry of value) {
42034
+ if (!entry || typeof entry !== "object") continue;
42035
+ if (typeof entry.class_name === "string") {
42036
+ if (seenClasses.has(entry.class_name)) duplicateClasses.add(entry.class_name);
42037
+ seenClasses.add(entry.class_name);
42038
+ }
42039
+ }
42040
+ if (duplicateClasses.size > 0) {
42041
+ const classList = [...duplicateClasses].map((className) => `"${className}"`).join(", ");
42042
+ diagnostics.errors.push(`"${field}" declares more than one container for the Durable Object class ${classList}; each Durable Object class may appear at most once.`);
42043
+ return false;
42044
+ }
42045
+ }
42046
+ return innerValidator(diagnostics, field, value, config2);
42047
+ };
42048
+ }
42049
+ __name$5(validatePreviewsContainers$1, "validatePreviewsContainers");
42050
+ function validateContainerApp$1(envName, topLevelName, configPath, options = {}) {
42051
+ const { generateDefaultName = true } = options;
42009
42052
  return (diagnostics, field, value, config2) => {
42010
42053
  if (!value) return true;
42011
42054
  if (!Array.isArray(value)) {
@@ -42015,7 +42058,7 @@ function validateContainerApp$1(envName, topLevelName, configPath) {
42015
42058
  for (const containerAppOptional of value) {
42016
42059
  validateOptionalProperty$1(diagnostics, field, "class_name", containerAppOptional.class_name, "string");
42017
42060
  validateOptionalProperty$1(diagnostics, field, "name", containerAppOptional.name, "string");
42018
- if (!containerAppOptional.name) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
42061
+ if (generateDefaultName && !containerAppOptional.name) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
42019
42062
  else if (!topLevelName) diagnostics.errors.push(`Must have either a top level "name" and "containers.class_name" field defined, or have field "containers.name" defined.`);
42020
42063
  else {
42021
42064
  let name = `${topLevelName}-${containerAppOptional.class_name}`;
@@ -42830,6 +42873,63 @@ var validateConsumer$1 = /* @__PURE__ */ __name$5((diagnostics, field, value, _c
42830
42873
  }
42831
42874
  return isValid;
42832
42875
  }, "validateConsumer");
42876
+ function validateConnectHandlers$1(envName) {
42877
+ return (diagnostics, field, value, config2) => {
42878
+ if (value === void 0) return true;
42879
+ const fieldPath = config2 === void 0 ? `${field}` : `env.${envName}.${field}`;
42880
+ if (!Array.isArray(value)) {
42881
+ diagnostics.errors.push(`The field "${fieldPath}" should be an array but got ${JSON.stringify(value)}.`);
42882
+ return false;
42883
+ }
42884
+ let isValid = true;
42885
+ for (let i$1 = 0; i$1 < value.length; i$1++) if (!validateConnectHandler$1(diagnostics, `${fieldPath}[${i$1}]`, value[i$1], config2)) isValid = false;
42886
+ const firstIndexByKey = /* @__PURE__ */ new Map();
42887
+ for (let i$1 = 0; i$1 < value.length; i$1++) {
42888
+ const handler = value[i$1];
42889
+ if (typeof handler !== "object" || handler === null || typeof handler.port !== "number" || typeof handler.protocol !== "string") continue;
42890
+ const { protocol, port } = handler;
42891
+ const key = `${protocol}:${port}`;
42892
+ const firstIndex = firstIndexByKey.get(key);
42893
+ if (firstIndex !== void 0) {
42894
+ diagnostics.errors.push(`"${fieldPath}[${i$1}]" has the same "protocol" (${protocol}) and "port" (${port}) as "${fieldPath}[${firstIndex}]". Each entry in "connect" must use a unique protocol/port combination.`);
42895
+ isValid = false;
42896
+ } else firstIndexByKey.set(key, i$1);
42897
+ }
42898
+ return isValid;
42899
+ };
42900
+ }
42901
+ __name$5(validateConnectHandlers$1, "validateConnectHandlers");
42902
+ var validateConnectHandler$1 = /* @__PURE__ */ __name$5((diagnostics, field, value) => {
42903
+ if (typeof value !== "object" || value === null) {
42904
+ diagnostics.errors.push(`"${field}" should be an object, but got ${JSON.stringify(value)}`);
42905
+ return false;
42906
+ }
42907
+ let isValid = true;
42908
+ if (!validateAdditionalProperties$1(diagnostics, field, Object.keys(value), [
42909
+ "protocol",
42910
+ "port",
42911
+ "address"
42912
+ ])) isValid = false;
42913
+ if ("protocol" in value && value.protocol !== "tcp") {
42914
+ diagnostics.errors.push(`"${field}" should have a "protocol" field of "tcp" but got ${JSON.stringify(value.protocol)}.`);
42915
+ isValid = false;
42916
+ } else if (!("protocol" in value)) {
42917
+ diagnostics.errors.push(`"${field}" should have a "protocol" field of "tcp" but got ${JSON.stringify(value)}.`);
42918
+ isValid = false;
42919
+ }
42920
+ if (!isRequiredProperty$1(value, "port", "number")) {
42921
+ diagnostics.errors.push(`"${field}" should have a number "port" field but got ${JSON.stringify(value)}.`);
42922
+ isValid = false;
42923
+ } else if (!Number.isInteger(value.port) || value.port < 1 || value.port > 65535) {
42924
+ diagnostics.errors.push(`"${field}" should have an integer "port" field between 1 and 65535 but got ${JSON.stringify(value)}.`);
42925
+ isValid = false;
42926
+ }
42927
+ if (!isOptionalProperty$1(value, "address", "string")) {
42928
+ diagnostics.errors.push(`"${field}" should, optionally, have a string "address" field but got ${JSON.stringify(value)}.`);
42929
+ isValid = false;
42930
+ }
42931
+ return isValid;
42932
+ }, "validateConnectHandler");
42833
42933
  var validateCompatibilityDate$1 = /* @__PURE__ */ __name$5((diagnostics, field, value) => {
42834
42934
  if (value === void 0) return true;
42835
42935
  if (typeof value !== "string") {
@@ -43011,7 +43111,7 @@ function normalizeAndValidateLimits$1(diagnostics, topLevelEnv, rawEnv) {
43011
43111
  return inheritable$1(diagnostics, topLevelEnv, rawEnv, "limits", () => true, void 0);
43012
43112
  }
43013
43113
  __name$5(normalizeAndValidateLimits$1, "normalizeAndValidateLimits");
43014
- var validatePreviewsConfig$1 = /* @__PURE__ */ __name$5((envName) => (diagnostics, field, value) => {
43114
+ var validatePreviewsConfig$1 = /* @__PURE__ */ __name$5((envName, configPath) => (diagnostics, field, value) => {
43015
43115
  if (value === void 0) return true;
43016
43116
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
43017
43117
  diagnostics.errors.push(`The field "${field}" should be an object but got ${JSON.stringify(value)}.`);
@@ -43052,6 +43152,7 @@ var validatePreviewsConfig$1 = /* @__PURE__ */ __name$5((envName) => (diagnostic
43052
43152
  "ratelimits",
43053
43153
  "vpc_services",
43054
43154
  "version_metadata",
43155
+ "containers",
43055
43156
  "logpush",
43056
43157
  "observability",
43057
43158
  "limits",
@@ -43089,6 +43190,7 @@ var validatePreviewsConfig$1 = /* @__PURE__ */ __name$5((envName) => (diagnostic
43089
43190
  isValid = validateBindingArray$1(envName, validateRateLimitBinding$1)(diagnostics, `${field}.ratelimits`, previews.ratelimits, void 0) && isValid;
43090
43191
  isValid = validateBindingArray$1(envName, validateVpcServiceBinding$1)(diagnostics, `${field}.vpc_services`, previews.vpc_services, void 0) && isValid;
43091
43192
  if (previews.version_metadata !== void 0) isValid = validateVersionMetadataBinding$1(envName)(diagnostics, `${field}.version_metadata`, previews.version_metadata, void 0) && isValid;
43193
+ if (previews.containers !== void 0) isValid = validatePreviewsContainers$1(envName, configPath)(diagnostics, `${field}.containers`, previews.containers, void 0) && isValid;
43092
43194
  isValid = isBoolean$1(diagnostics, `${field}.logpush`, previews.logpush, void 0) && isValid;
43093
43195
  isValid = validateObservability$1(diagnostics, `${field}.observability`, previews.observability, void 0) && isValid;
43094
43196
  if (previews.limits) {
@@ -43381,11 +43483,11 @@ var validateCache$1 = /* @__PURE__ */ __name$5((diagnostics, field, value) => {
43381
43483
  isValid = validateAdditionalProperties$1(diagnostics, field, Object.keys(val), ["enabled", "cross_version_cache"]) && isValid;
43382
43484
  return isValid;
43383
43485
  }, "validateCache");
43384
- function warnIfDurableObjectsHaveNoLifecycleConfig$1(diagnostics, durableObjects, migrations, exports$2, configPath) {
43486
+ function warnIfDurableObjectsHaveNoLifecycleConfig$1(diagnostics, durableObjects, migrations, exports$1$1, configPath) {
43385
43487
  if (!Array.isArray(durableObjects.bindings) || durableObjects.bindings.length === 0) return;
43386
43488
  const exportedDurableObjects = durableObjects.bindings.filter((binding) => !binding.script_name);
43387
43489
  const exportsCovers = /* @__PURE__ */ __name$5((className) => {
43388
- const entry = exports$2?.[className];
43490
+ const entry = exports$1$1?.[className];
43389
43491
  if (entry === void 0 || entry.type !== "durable-object") return false;
43390
43492
  const state = entry.state ?? "created";
43391
43493
  return state === "created" || state === "expecting-transfer";
@@ -43407,11 +43509,11 @@ function warnIfDurableObjectsHaveNoLifecycleConfig$1(diagnostics, durableObjects
43407
43509
  \`\`\``);
43408
43510
  }
43409
43511
  __name$5(warnIfDurableObjectsHaveNoLifecycleConfig$1, "warnIfDurableObjectsHaveNoLifecycleConfig");
43410
- function errorIfMigrationsAndExportsBothSet$1(diagnostics, migrations, exports$2) {
43411
- if (migrations.length > 0 && exports$2 !== void 0 && Object.values(exports$2).some((entry) => entry.type === "durable-object")) diagnostics.errors.push(`\`migrations\` and \`exports\` are mutually exclusive. Choose one or the other to declare your Durable Object lifecycle, but not both.`);
43512
+ function errorIfMigrationsAndExportsBothSet$1(diagnostics, migrations, exports$1$1) {
43513
+ if (migrations.length > 0 && exports$1$1 !== void 0 && Object.values(exports$1$1).some((entry) => entry.type === "durable-object")) diagnostics.errors.push(`\`migrations\` and \`exports\` are mutually exclusive. Choose one or the other to declare your Durable Object lifecycle, but not both.`);
43412
43514
  }
43413
43515
  __name$5(errorIfMigrationsAndExportsBothSet$1, "errorIfMigrationsAndExportsBothSet");
43414
- function validateContainerExportLinks$1(diagnostics, containers, exports$2, containersDeclaredElsewhere) {
43516
+ function validateContainerExportLinks$1(diagnostics, containers, exports$1$1, containersDeclaredElsewhere) {
43415
43517
  if (containers !== void 0 && !Array.isArray(containers)) return;
43416
43518
  if (containers === void 0 && containersDeclaredElsewhere) return;
43417
43519
  const containersByName = /* @__PURE__ */ new Map();
@@ -43429,7 +43531,7 @@ function validateContainerExportLinks$1(diagnostics, containers, exports$2, cont
43429
43531
  }
43430
43532
  const overSubscribedClassNames = new Set([...containerCountByClassName].filter(([, count]) => count > 1).map(([className]) => className));
43431
43533
  for (const className of [...overSubscribedClassNames].sort()) diagnostics.errors.push(`More than one container is attached to the Durable Object "${className}". A Durable Object can only have one container attached to it.`);
43432
- const durableObjectExports = getDurableObjectExports$2(exports$2);
43534
+ const durableObjectExports = getDurableObjectExports$2(exports$1$1);
43433
43535
  const liveExportClassNames = /* @__PURE__ */ new Set();
43434
43536
  const classNamesByContainerName = /* @__PURE__ */ new Map();
43435
43537
  for (const [className, entry] of Object.entries(durableObjectExports)) {
@@ -43443,7 +43545,7 @@ function validateContainerExportLinks$1(diagnostics, containers, exports$2, cont
43443
43545
  classNamesByContainerName.set(entry.container, [...classNamesByContainerName.get(entry.container) ?? [], className]);
43444
43546
  }
43445
43547
  for (const [containerName, classNames] of classNamesByContainerName) if (classNames.length > 1) diagnostics.errors.push(`The container "${containerName}" is referenced by more than one Durable Object export (${classNames.join(", ")}). A container can only back a single Durable Object.`);
43446
- const containerNameToClassName = getContainerNameToClassNameMap$2(exports$2);
43548
+ const containerNameToClassName = getContainerNameToClassNameMap$2(exports$1$1);
43447
43549
  const usesDurableObjectExports = Object.keys(durableObjectExports).length > 0;
43448
43550
  for (const container of containers ?? []) {
43449
43551
  if (typeof container.name !== "string") continue;
@@ -43534,7 +43636,7 @@ var BINDING_LOCAL_SUPPORT$1 = {
43534
43636
  kv_namespace: "local-and-remote",
43535
43637
  r2_bucket: "local-and-remote",
43536
43638
  d1: "local-and-remote",
43537
- workflow: "local-and-remote",
43639
+ workflow: "local-only",
43538
43640
  browser: "local-and-remote",
43539
43641
  images: "local-and-remote",
43540
43642
  stream: "local-and-remote",
@@ -43649,6 +43751,10 @@ function getPackagePath$1(packageName, projectPath) {
43649
43751
  try {
43650
43752
  return path2__default.dirname(__require$2.resolve(packageName, { paths: [projectPath] }));
43651
43753
  } catch {}
43754
+ try {
43755
+ const candidate = path2__default.join(projectPath, "node_modules", packageName, "package.json");
43756
+ if (statSync(candidate).isFile()) return path2__default.dirname(candidate);
43757
+ } catch {}
43652
43758
  }
43653
43759
  __name$5(getPackagePath$1, "getPackagePath");
43654
43760
  function isPackageInstalled$1(packageName, projectPath) {
@@ -44544,7 +44650,7 @@ function terminateCloudflared$1(cloudflared) {
44544
44650
  }
44545
44651
  __name$5(terminateCloudflared$1, "terminateCloudflared");
44546
44652
  function waitForQuickTunnelReady$1(cloudflared, timeoutMs, options) {
44547
- return new Promise((resolve2, reject) => {
44653
+ return new Promise((resolve3, reject) => {
44548
44654
  let resolved = false;
44549
44655
  let stderrOutput = "";
44550
44656
  const logger$1 = options?.logger;
@@ -44565,7 +44671,7 @@ function waitForQuickTunnelReady$1(cloudflared, timeoutMs, options) {
44565
44671
  if (match && !resolved) {
44566
44672
  resolved = true;
44567
44673
  clearTimeout(timeoutId);
44568
- resolve2({
44674
+ resolve3({
44569
44675
  mode: "quick",
44570
44676
  publicUrl: new URL(match[0])
44571
44677
  });
@@ -44884,7 +44990,7 @@ async function fetchLatestNpmVersion(name, version2) {
44884
44990
  __name$5(fetchLatestNpmVersion, "fetchLatestNpmVersion");
44885
44991
  async function openInBrowser(url2, logger$1) {
44886
44992
  try {
44887
- const { default: open$1 } = await import("./open-PBXRGS4R-BtaaKU2N.mjs");
44993
+ const { default: open$1 } = await import("./open-PBXRGS4R-rCTko7Ic.mjs");
44888
44994
  (await open$1(url2)).on("error", (err) => {
44889
44995
  handleBrowserOpenError$1(url2, err, logger$1);
44890
44996
  });
@@ -44903,6 +45009,31 @@ ${url2}`);
44903
45009
  logger$1.debug(err instanceof Error ? err.stack ?? String(err) : String(err));
44904
45010
  }
44905
45011
  __name$5(handleBrowserOpenError$1, "handleBrowserOpenError");
45012
+ function writeOutput$1(entry) {
45013
+ if (outputFilePath$1 === void 0) outputFilePath$1 = getOutputFilePath$1();
45014
+ if (outputFilePath$1 !== null) {
45015
+ mkdirSync(dirname(outputFilePath$1), { recursive: true });
45016
+ const entryJSON = JSON.stringify({
45017
+ ...entry,
45018
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
45019
+ });
45020
+ appendFileSync(outputFilePath$1, entryJSON + "\n");
45021
+ }
45022
+ }
45023
+ __name$5(writeOutput$1, "writeOutput");
45024
+ function clearOutputFilePath$1() {
45025
+ outputFilePath$1 = void 0;
45026
+ }
45027
+ __name$5(clearOutputFilePath$1, "clearOutputFilePath");
45028
+ var outputFilePath$1 = void 0;
45029
+ function getOutputFilePath$1() {
45030
+ const outputFilePathFromEnv = getOutputFilePathFromEnv$1();
45031
+ if (outputFilePathFromEnv) return outputFilePathFromEnv;
45032
+ const outputFileDirectoryFromEnv = getOutputFileDirectoryFromEnv$1();
45033
+ if (outputFileDirectoryFromEnv) return resolve(outputFileDirectoryFromEnv, `wrangler-output-${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-").replace(".", "_").replace("T", "_").replace("Z", "")}-${randomBytes(3).toString("hex")}.json`);
45034
+ return null;
45035
+ }
45036
+ __name$5(getOutputFilePath$1, "getOutputFilePath");
44906
45037
  var MAX_ATTEMPTS$1 = 3;
44907
45038
  var MAX_RETRY_AFTER_MS$1 = 6e4;
44908
45039
  async function retryOnAPIFailure(action, logger$1, backoff = 0, attempts = MAX_ATTEMPTS$1, abortSignal) {
@@ -49262,7 +49393,7 @@ function assertIsPreview(ctx) {
49262
49393
  }
49263
49394
 
49264
49395
  //#endregion
49265
- //#region ../config/dist/public-CgtRnd2s.mjs
49396
+ //#region ../config/dist/public-BwQqexwo.mjs
49266
49397
  const DEFINITION = Symbol.for("@cloudflare/config:definition");
49267
49398
  /**
49268
49399
  * Unwrap an authored config from its value / promise / function shape, awaiting
@@ -53792,6 +53923,7 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
53792
53923
  var __commonJS$2 = (cb, mod$1) => function() {
53793
53924
  return mod$1 || (0, cb[__getOwnPropNames(cb)[0]])((mod$1 = { exports: {} }).exports, mod$1), mod$1.exports;
53794
53925
  };
53926
+ const RemoteBindingDevSchema = strictObject$1({ remote: boolean$1().optional() });
53795
53927
  const AssetsSchema = strictObject$1({
53796
53928
  htmlHandling: _enum$1([
53797
53929
  "auto-trailing-slash",
@@ -53808,76 +53940,80 @@ const AssetsSchema = strictObject$1({
53808
53940
  });
53809
53941
  const BrowserBindingSchema = strictObject$1({
53810
53942
  type: literal$2("browser"),
53811
- remote: boolean$1().optional()
53943
+ dev: RemoteBindingDevSchema.optional()
53812
53944
  });
53813
53945
  const WorkerBindingSchema = strictObject$1({
53814
53946
  type: literal$2("worker"),
53815
53947
  workerName: string$1(),
53816
53948
  exportName: string$1().optional(),
53817
53949
  props: record$1(string$1(), unknown$1()).optional(),
53818
- remote: boolean$1().optional()
53950
+ dev: RemoteBindingDevSchema.optional()
53819
53951
  });
53820
53952
  const D1BindingSchema = strictObject$1({
53821
53953
  type: literal$2("d1"),
53822
53954
  name: string$1().optional(),
53823
53955
  id: string$1().optional(),
53824
- remote: boolean$1().optional()
53956
+ dev: RemoteBindingDevSchema.optional()
53825
53957
  });
53826
53958
  const KVBindingSchema = strictObject$1({
53827
53959
  type: literal$2("kv"),
53828
53960
  id: string$1().optional(),
53829
- remote: boolean$1().optional()
53961
+ dev: RemoteBindingDevSchema.optional()
53830
53962
  });
53831
53963
  const QueueBindingSchema = strictObject$1({
53832
53964
  type: literal$2("queue"),
53833
53965
  name: string$1().optional(),
53834
53966
  deliveryDelay: number$1().optional(),
53835
- remote: boolean$1().optional()
53967
+ dev: RemoteBindingDevSchema.optional()
53836
53968
  });
53837
53969
  const R2BindingSchema = strictObject$1({
53838
53970
  type: literal$2("r2"),
53839
53971
  name: string$1().optional(),
53840
53972
  jurisdiction: string$1().optional(),
53841
- remote: boolean$1().optional()
53973
+ dev: RemoteBindingDevSchema.extend({ experimentalS3Credentials: object$1({
53974
+ accessKeyId: string$1(),
53975
+ secretAccessKey: string$1()
53976
+ }).optional() }).optional()
53977
+ });
53978
+ const AnalyticsEngineDatasetBindingSchema = strictObject$1({
53979
+ type: literal$2("analytics-engine-dataset"),
53980
+ name: string$1().optional()
53842
53981
  });
53843
53982
  const FlagshipBindingSchema = strictObject$1({
53844
53983
  type: literal$2("flagship"),
53845
53984
  id: string$1().optional(),
53846
- remote: boolean$1().optional()
53985
+ dev: RemoteBindingDevSchema.optional()
53847
53986
  });
53848
53987
  const HyperdriveBindingSchema = strictObject$1({
53849
53988
  type: literal$2("hyperdrive"),
53850
53989
  id: string$1(),
53851
- localConnectionString: string$1().optional()
53990
+ dev: strictObject$1({ connectionString: string$1().optional() }).optional()
53852
53991
  });
53853
53992
  const KnownBindingSchema = discriminatedUnion$1("type", [
53854
53993
  strictObject$1({
53855
53994
  type: literal$2("agent-memory"),
53856
53995
  namespace: string$1(),
53857
- remote: boolean$1().optional()
53996
+ dev: RemoteBindingDevSchema.optional()
53858
53997
  }),
53859
53998
  strictObject$1({
53860
53999
  type: literal$2("ai"),
53861
- remote: boolean$1().optional()
54000
+ dev: RemoteBindingDevSchema.optional()
53862
54001
  }),
53863
54002
  strictObject$1({
53864
54003
  type: literal$2("ai-search"),
53865
54004
  name: string$1(),
53866
- remote: boolean$1().optional()
54005
+ dev: RemoteBindingDevSchema.optional()
53867
54006
  }),
53868
54007
  strictObject$1({
53869
54008
  type: literal$2("ai-search-namespace"),
53870
54009
  namespace: string$1(),
53871
- remote: boolean$1().optional()
53872
- }),
53873
- strictObject$1({
53874
- type: literal$2("analytics-engine-dataset"),
53875
- name: string$1().optional()
54010
+ dev: RemoteBindingDevSchema.optional()
53876
54011
  }),
54012
+ AnalyticsEngineDatasetBindingSchema,
53877
54013
  strictObject$1({
53878
54014
  type: literal$2("artifacts"),
53879
54015
  namespace: string$1(),
53880
- remote: boolean$1().optional()
54016
+ dev: RemoteBindingDevSchema.optional()
53881
54017
  }),
53882
54018
  strictObject$1({ type: literal$2("assets") }),
53883
54019
  BrowserBindingSchema,
@@ -53889,7 +54025,7 @@ const KnownBindingSchema = discriminatedUnion$1("type", [
53889
54025
  workerName: string$1(),
53890
54026
  parameters: array$1(string$1()).optional()
53891
54027
  }).optional(),
53892
- remote: boolean$1().optional()
54028
+ dev: RemoteBindingDevSchema.optional()
53893
54029
  }),
53894
54030
  strictObject$1({
53895
54031
  type: literal$2("durable-object"),
@@ -53900,7 +54036,7 @@ const KnownBindingSchema = discriminatedUnion$1("type", [
53900
54036
  HyperdriveBindingSchema,
53901
54037
  strictObject$1({
53902
54038
  type: literal$2("images"),
53903
- remote: boolean$1().optional()
54039
+ dev: RemoteBindingDevSchema.optional()
53904
54040
  }),
53905
54041
  strictObject$1({
53906
54042
  type: literal$2("json"),
@@ -53913,17 +54049,17 @@ const KnownBindingSchema = discriminatedUnion$1("type", [
53913
54049
  }),
53914
54050
  strictObject$1({
53915
54051
  type: literal$2("media"),
53916
- remote: boolean$1().optional()
54052
+ dev: RemoteBindingDevSchema.optional()
53917
54053
  }),
53918
54054
  strictObject$1({
53919
54055
  type: literal$2("mtls-certificate"),
53920
54056
  id: string$1(),
53921
- remote: boolean$1().optional()
54057
+ dev: RemoteBindingDevSchema.optional()
53922
54058
  }),
53923
54059
  strictObject$1({
53924
54060
  type: literal$2("pipeline"),
53925
54061
  name: string$1(),
53926
- remote: boolean$1().optional()
54062
+ dev: RemoteBindingDevSchema.optional()
53927
54063
  }),
53928
54064
  QueueBindingSchema,
53929
54065
  strictObject$1({
@@ -53946,11 +54082,11 @@ const KnownBindingSchema = discriminatedUnion$1("type", [
53946
54082
  destinationAddress: string$1().optional(),
53947
54083
  allowedDestinationAddresses: array$1(string$1()).optional(),
53948
54084
  allowedSenderAddresses: array$1(string$1()).optional(),
53949
- remote: boolean$1().optional()
53950
- }),
54085
+ dev: RemoteBindingDevSchema.optional()
54086
+ }).refine((value) => value.destinationAddress === void 0 || value.allowedDestinationAddresses === void 0, { message: "\"send-email\" bindings cannot specify both \"destinationAddress\" and \"allowedDestinationAddresses\"" }),
53951
54087
  strictObject$1({
53952
54088
  type: literal$2("stream"),
53953
- remote: boolean$1().optional()
54089
+ dev: RemoteBindingDevSchema.optional()
53954
54090
  }),
53955
54091
  strictObject$1({
53956
54092
  type: literal$2("text"),
@@ -53959,29 +54095,26 @@ const KnownBindingSchema = discriminatedUnion$1("type", [
53959
54095
  strictObject$1({
53960
54096
  type: literal$2("vectorize"),
53961
54097
  name: string$1(),
53962
- remote: boolean$1().optional()
54098
+ dev: RemoteBindingDevSchema.optional()
53963
54099
  }),
53964
54100
  strictObject$1({ type: literal$2("version-metadata") }),
53965
54101
  strictObject$1({
53966
54102
  type: literal$2("vpc-service"),
53967
54103
  id: string$1(),
53968
- remote: boolean$1().optional()
54104
+ dev: RemoteBindingDevSchema.optional()
53969
54105
  }),
53970
54106
  strictObject$1({
53971
54107
  type: literal$2("vpc-network"),
53972
54108
  tunnelId: string$1().optional(),
53973
54109
  networkId: string$1().optional(),
53974
- remote: boolean$1().optional()
53975
- }).superRefine((value, ctx) => {
53976
- const hasTunnel = value.tunnelId !== void 0;
53977
- if (hasTunnel === (value.networkId !== void 0)) ctx.addIssue({
53978
- code: "custom",
53979
- message: hasTunnel ? `"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both` : `"vpc-network" bindings must specify either "tunnelId" or "networkId"`
53980
- });
53981
- }),
54110
+ dev: RemoteBindingDevSchema.optional()
54111
+ }).refine((value) => value.tunnelId !== void 0 !== (value.networkId !== void 0), { error: ({ input }) => {
54112
+ const value = input;
54113
+ return value.tunnelId !== void 0 && value.networkId !== void 0 ? `"vpc-network" bindings must specify exactly one of "tunnelId" or "networkId", not both` : `"vpc-network" bindings must specify either "tunnelId" or "networkId"`;
54114
+ } }),
53982
54115
  strictObject$1({
53983
54116
  type: literal$2("web-search"),
53984
- remote: boolean$1().optional()
54117
+ dev: RemoteBindingDevSchema.optional()
53985
54118
  }),
53986
54119
  WorkerBindingSchema,
53987
54120
  strictObject$1({ type: literal$2("worker-loader") })
@@ -54153,6 +54286,12 @@ const TriggerSchema = discriminatedUnion$1("type", [
54153
54286
  strictObject$1({
54154
54287
  type: literal$2("scheduled"),
54155
54288
  schedule: string$1()
54289
+ }),
54290
+ strictObject$1({
54291
+ type: literal$2("connect"),
54292
+ protocol: _enum$1(["tcp"]),
54293
+ port: number$1(),
54294
+ address: string$1().optional()
54156
54295
  })
54157
54296
  ]);
54158
54297
  const UnsafeSchema = strictObject$1({
@@ -54199,30 +54338,39 @@ const BaseWorkerSchema = strictObject$1({
54199
54338
  */
54200
54339
  const InputWorkerSchema = BaseWorkerSchema.extend({ entrypoint: union$1([string$1(), strictObject$1({ default: string$1() })]).transform((value) => typeof value === "string" ? value : value.default).optional() });
54201
54340
  /**
54202
- * Settings schema — validates the named `settings` export of a
54341
+ * Input settings schema — validates the named `settings` export of a
54203
54342
  * `cloudflare.config.ts`. Holds account/deployment settings shared by the other exports.
54204
54343
  */
54205
- const SettingsSchema = strictObject$1({
54344
+ const InputSettingsSchema = strictObject$1({
54206
54345
  type: literal$2("settings"),
54207
54346
  accountId: string$1().optional(),
54208
54347
  complianceRegion: _enum$1(["public", "fedramp-high"]).optional()
54209
54348
  });
54210
54349
  /**
54211
- * Discriminated union of the config kinds a single export may resolve to.
54350
+ * Output settings schema the shape of the top-level `config.json` in the
54351
+ * Build Output Specification. Adds the `mode` the build was produced in.
54212
54352
  */
54213
- const ConfigExportSchema = discriminatedUnion$1("type", [InputWorkerSchema, SettingsSchema]);
54353
+ const OutputSettingsSchema = InputSettingsSchema.extend({ mode: string$1().optional() });
54214
54354
  const SETTINGS_EXPORT_NAME = "settings";
54215
- /**
54216
- * Schema for the resolved config exports, keyed by export
54217
- * name. Each value is discriminated on its `type` field. Reserves the
54218
- * `settings` export name exclusively for settings configs: a `settings`
54219
- * config must live on the `settings` export, and the `settings` export
54220
- * may only hold a `settings` config.
54221
- */
54222
- const ConfigExportsSchema = record$1(string$1(), ConfigExportSchema).check((ctx) => {
54355
+ const SUPPORTED_EXPORT_TYPES = new Set(["worker", "settings"]);
54356
+ function invalidConfigExportMessage(exportName) {
54357
+ return `The \`${exportName}\` export is not a supported export type. Move constants, helper functions, and other unsupported exports to a separate module.`;
54358
+ }
54359
+ const ConfigExportsTypeSchema = record$1(string$1(), unknown$1()).check((ctx) => {
54223
54360
  for (const [key, value] of Object.entries(ctx.value)) {
54361
+ const isObject$5 = typeof value === "object" && value !== null;
54362
+ const type = isObject$5 && "type" in value ? value.type : void 0;
54363
+ if (typeof type !== "string" || !SUPPORTED_EXPORT_TYPES.has(type)) {
54364
+ ctx.issues.push({
54365
+ code: "custom",
54366
+ input: value,
54367
+ path: isObject$5 ? [key, "type"] : [key],
54368
+ message: invalidConfigExportMessage(key)
54369
+ });
54370
+ continue;
54371
+ }
54224
54372
  const isSettingsName = key === SETTINGS_EXPORT_NAME;
54225
- const isSettingsType = value.type === "settings";
54373
+ const isSettingsType = type === "settings";
54226
54374
  if (isSettingsType && !isSettingsName) ctx.issues.push({
54227
54375
  code: "custom",
54228
54376
  input: value,
@@ -54233,10 +54381,19 @@ const ConfigExportsSchema = record$1(string$1(), ConfigExportSchema).check((ctx)
54233
54381
  code: "custom",
54234
54382
  input: value,
54235
54383
  path: [key],
54236
- message: `The \`${SETTINGS_EXPORT_NAME}\` export is reserved for a \`settings\` config; found a \`${value.type}\` config.`
54384
+ message: `The \`${SETTINGS_EXPORT_NAME}\` export is reserved for a \`settings\` config; found a \`${type}\` config.`
54237
54385
  });
54238
54386
  }
54239
54387
  });
54388
+ const ConfigExportsObjectSchema = object$1({ settings: InputSettingsSchema.optional() }).catchall(InputWorkerSchema);
54389
+ /**
54390
+ * Schema for the resolved config exports, keyed by export
54391
+ * name. Each value is discriminated on its `type` field. Reserves the
54392
+ * `settings` export name exclusively for settings configs: a `settings`
54393
+ * config must live on the `settings` export, and the `settings` export
54394
+ * may only hold a `settings` config.
54395
+ */
54396
+ const ConfigExportsSchema = ConfigExportsTypeSchema.pipe(ConfigExportsObjectSchema);
54240
54397
  const ModuleTypeSchema = _enum$1([
54241
54398
  "esm",
54242
54399
  "cjs",
@@ -54338,43 +54495,43 @@ function hasKnownExportType$1(entry) {
54338
54495
  return type === "durable-object" || type === "worker";
54339
54496
  }
54340
54497
  __name$4(hasKnownExportType$1, "hasKnownExportType");
54341
- function partitionExports$1(exports$2) {
54498
+ function partitionExports$1(exports$1$1) {
54342
54499
  const partitioned = {
54343
54500
  "durable-object": {},
54344
54501
  worker: {}
54345
54502
  };
54346
- if (exports$2 === void 0) return partitioned;
54347
- for (const [name, entry] of Object.entries(exports$2)) {
54503
+ if (exports$1$1 === void 0) return partitioned;
54504
+ for (const [name, entry] of Object.entries(exports$1$1)) {
54348
54505
  if (!hasKnownExportType$1(entry)) continue;
54349
54506
  partitioned[entry.type][name] = entry;
54350
54507
  }
54351
54508
  return partitioned;
54352
54509
  }
54353
54510
  __name$4(partitionExports$1, "partitionExports");
54354
- function getDurableObjectExports$1(exports$2) {
54355
- return partitionExports$1(exports$2)["durable-object"];
54511
+ function getDurableObjectExports$1(exports$1$1) {
54512
+ return partitionExports$1(exports$1$1)["durable-object"];
54356
54513
  }
54357
54514
  __name$4(getDurableObjectExports$1, "getDurableObjectExports");
54358
- function hasDurableObjectExports$1(exports$2) {
54359
- return Object.keys(getDurableObjectExports$1(exports$2)).length > 0;
54515
+ function hasDurableObjectExports$1(exports$1$1) {
54516
+ return Object.keys(getDurableObjectExports$1(exports$1$1)).length > 0;
54360
54517
  }
54361
54518
  __name$4(hasDurableObjectExports$1, "hasDurableObjectExports");
54362
- function getContainerNameToClassNameMap$1(exports$2) {
54519
+ function getContainerNameToClassNameMap$1(exports$1$1) {
54363
54520
  const containerNameToClassName = /* @__PURE__ */ new Map();
54364
- for (const [className, entry] of Object.entries(getDurableObjectExports$1(exports$2))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
54521
+ for (const [className, entry] of Object.entries(getDurableObjectExports$1(exports$1$1))) if ("container" in entry && typeof entry.container === "string" && !containerNameToClassName.has(entry.container)) containerNameToClassName.set(entry.container, className);
54365
54522
  return containerNameToClassName;
54366
54523
  }
54367
54524
  __name$4(getContainerNameToClassNameMap$1, "getContainerNameToClassNameMap");
54368
- function resolveContainerClassName$2(container, exports$2) {
54525
+ function resolveContainerClassName$2(container, exports$1$1) {
54369
54526
  if (container.class_name !== void 0) return container.class_name;
54370
54527
  if (container.name === void 0) return;
54371
- return getContainerNameToClassNameMap$1(exports$2).get(container.name);
54528
+ return getContainerNameToClassNameMap$1(exports$1$1).get(container.name);
54372
54529
  }
54373
54530
  __name$4(resolveContainerClassName$2, "resolveContainerClassName");
54374
- function getContainerDurableObjectClassNames$1(containers, exports$2) {
54531
+ function getContainerDurableObjectClassNames$1(containers, exports$1$1) {
54375
54532
  const classNames = /* @__PURE__ */ new Set();
54376
54533
  for (const container of containers ?? []) {
54377
- const className = resolveContainerClassName$2(container, exports$2);
54534
+ const className = resolveContainerClassName$2(container, exports$1$1);
54378
54535
  if (className !== void 0) classNames.add(className);
54379
54536
  }
54380
54537
  return classNames;
@@ -56965,27 +57122,27 @@ function convertBindingsAndAssets(config$3, result) {
56965
57122
  agentMemory.push(omitUndefined({
56966
57123
  binding: name,
56967
57124
  namespace: binding.namespace,
56968
- remote: binding.remote
57125
+ remote: binding.dev?.remote
56969
57126
  }));
56970
57127
  break;
56971
57128
  case "ai":
56972
57129
  result.ai = omitUndefined({
56973
57130
  binding: name,
56974
- remote: binding.remote
57131
+ remote: binding.dev?.remote
56975
57132
  });
56976
57133
  break;
56977
57134
  case "ai-search":
56978
57135
  aiSearch.push(omitUndefined({
56979
57136
  binding: name,
56980
57137
  instance_name: binding.name,
56981
- remote: binding.remote
57138
+ remote: binding.dev?.remote
56982
57139
  }));
56983
57140
  break;
56984
57141
  case "ai-search-namespace":
56985
57142
  aiSearchNamespaces.push(omitUndefined({
56986
57143
  binding: name,
56987
57144
  namespace: binding.namespace,
56988
- remote: binding.remote
57145
+ remote: binding.dev?.remote
56989
57146
  }));
56990
57147
  break;
56991
57148
  case "analytics-engine-dataset":
@@ -56998,7 +57155,7 @@ function convertBindingsAndAssets(config$3, result) {
56998
57155
  artifacts.push(omitUndefined({
56999
57156
  binding: name,
57000
57157
  namespace: binding.namespace,
57001
- remote: binding.remote
57158
+ remote: binding.dev?.remote
57002
57159
  }));
57003
57160
  break;
57004
57161
  case "assets":
@@ -57007,7 +57164,7 @@ function convertBindingsAndAssets(config$3, result) {
57007
57164
  case "browser":
57008
57165
  result.browser = omitUndefined({
57009
57166
  binding: name,
57010
- remote: binding.remote
57167
+ remote: binding.dev?.remote
57011
57168
  });
57012
57169
  break;
57013
57170
  case "d1":
@@ -57015,7 +57172,7 @@ function convertBindingsAndAssets(config$3, result) {
57015
57172
  binding: name,
57016
57173
  database_id: binding.id,
57017
57174
  database_name: binding.name,
57018
- remote: binding.remote
57175
+ remote: binding.dev?.remote
57019
57176
  }));
57020
57177
  break;
57021
57178
  case "dispatch-namespace": {
@@ -57027,7 +57184,7 @@ function convertBindingsAndAssets(config$3, result) {
57027
57184
  service: binding.outbound.workerName,
57028
57185
  parameters: binding.outbound.parameters
57029
57186
  });
57030
- if (binding.remote !== void 0) entry.remote = binding.remote;
57187
+ if (binding.dev?.remote !== void 0) entry.remote = binding.dev.remote;
57031
57188
  dispatchNamespaces.push(entry);
57032
57189
  break;
57033
57190
  }
@@ -57042,20 +57199,20 @@ function convertBindingsAndAssets(config$3, result) {
57042
57199
  flagship.push(omitUndefined({
57043
57200
  binding: name,
57044
57201
  app_id: binding.id,
57045
- remote: binding.remote
57202
+ remote: binding.dev?.remote
57046
57203
  }));
57047
57204
  break;
57048
57205
  case "hyperdrive":
57049
57206
  hyperdrive.push(omitUndefined({
57050
57207
  binding: name,
57051
57208
  id: binding.id,
57052
- localConnectionString: binding.localConnectionString
57209
+ localConnectionString: binding.dev?.connectionString
57053
57210
  }));
57054
57211
  break;
57055
57212
  case "images":
57056
57213
  result.images = omitUndefined({
57057
57214
  binding: name,
57058
- remote: binding.remote
57215
+ remote: binding.dev?.remote
57059
57216
  });
57060
57217
  break;
57061
57218
  case "json":
@@ -57065,7 +57222,7 @@ function convertBindingsAndAssets(config$3, result) {
57065
57222
  kvNamespaces.push(omitUndefined({
57066
57223
  binding: name,
57067
57224
  id: binding.id,
57068
- remote: binding.remote
57225
+ remote: binding.dev?.remote
57069
57226
  }));
57070
57227
  break;
57071
57228
  case "logfwdr":
@@ -57077,21 +57234,21 @@ function convertBindingsAndAssets(config$3, result) {
57077
57234
  case "media":
57078
57235
  result.media = omitUndefined({
57079
57236
  binding: name,
57080
- remote: binding.remote
57237
+ remote: binding.dev?.remote
57081
57238
  });
57082
57239
  break;
57083
57240
  case "mtls-certificate":
57084
57241
  mtlsCertificates.push(omitUndefined({
57085
57242
  binding: name,
57086
57243
  certificate_id: binding.id,
57087
- remote: binding.remote
57244
+ remote: binding.dev?.remote
57088
57245
  }));
57089
57246
  break;
57090
57247
  case "pipeline":
57091
57248
  pipelines.push(omitUndefined({
57092
57249
  binding: name,
57093
57250
  stream: binding.name,
57094
- remote: binding.remote
57251
+ remote: binding.dev?.remote
57095
57252
  }));
57096
57253
  break;
57097
57254
  case "queue":
@@ -57099,7 +57256,7 @@ function convertBindingsAndAssets(config$3, result) {
57099
57256
  binding: name,
57100
57257
  queue: binding.name,
57101
57258
  delivery_delay: binding.deliveryDelay,
57102
- remote: binding.remote
57259
+ remote: binding.dev?.remote
57103
57260
  }));
57104
57261
  break;
57105
57262
  case "rate-limit":
@@ -57109,14 +57266,17 @@ function convertBindingsAndAssets(config$3, result) {
57109
57266
  simple: binding.simple
57110
57267
  });
57111
57268
  break;
57112
- case "r2":
57269
+ case "r2": {
57270
+ const experimentalS3Credentials = binding.dev?.experimentalS3Credentials;
57113
57271
  r2Buckets.push(omitUndefined({
57114
57272
  binding: name,
57115
57273
  bucket_name: binding.name,
57116
57274
  jurisdiction: binding.jurisdiction,
57117
- remote: binding.remote
57275
+ remote: binding.dev?.remote,
57276
+ local_dev: experimentalS3Credentials === void 0 ? void 0 : { experimental_s3_credentials: experimentalS3Credentials }
57118
57277
  }));
57119
57278
  break;
57279
+ }
57120
57280
  case "secret":
57121
57281
  secretsRequired.push(name);
57122
57282
  break;
@@ -57133,13 +57293,13 @@ function convertBindingsAndAssets(config$3, result) {
57133
57293
  destination_address: binding.destinationAddress,
57134
57294
  allowed_destination_addresses: binding.allowedDestinationAddresses,
57135
57295
  allowed_sender_addresses: binding.allowedSenderAddresses,
57136
- remote: binding.remote
57296
+ remote: binding.dev?.remote
57137
57297
  }));
57138
57298
  break;
57139
57299
  case "stream":
57140
57300
  result.stream = omitUndefined({
57141
57301
  binding: name,
57142
- remote: binding.remote
57302
+ remote: binding.dev?.remote
57143
57303
  });
57144
57304
  break;
57145
57305
  case "text":
@@ -57149,7 +57309,7 @@ function convertBindingsAndAssets(config$3, result) {
57149
57309
  vectorize.push(omitUndefined({
57150
57310
  binding: name,
57151
57311
  index_name: binding.name,
57152
- remote: binding.remote
57312
+ remote: binding.dev?.remote
57153
57313
  }));
57154
57314
  break;
57155
57315
  case "version-metadata":
@@ -57159,25 +57319,25 @@ function convertBindingsAndAssets(config$3, result) {
57159
57319
  vpcServices.push(omitUndefined({
57160
57320
  binding: name,
57161
57321
  service_id: binding.id,
57162
- remote: binding.remote
57322
+ remote: binding.dev?.remote
57163
57323
  }));
57164
57324
  break;
57165
57325
  case "vpc-network":
57166
57326
  if (binding.tunnelId !== void 0) vpcNetworks.push(omitUndefined({
57167
57327
  binding: name,
57168
57328
  tunnel_id: binding.tunnelId,
57169
- remote: binding.remote
57329
+ remote: binding.dev?.remote
57170
57330
  }));
57171
57331
  else if (binding.networkId !== void 0) vpcNetworks.push(omitUndefined({
57172
57332
  binding: name,
57173
57333
  network_id: binding.networkId,
57174
- remote: binding.remote
57334
+ remote: binding.dev?.remote
57175
57335
  }));
57176
57336
  break;
57177
57337
  case "web-search":
57178
57338
  result.websearch = omitUndefined({
57179
57339
  binding: name,
57180
- remote: binding.remote
57340
+ remote: binding.dev?.remote
57181
57341
  });
57182
57342
  break;
57183
57343
  case "worker":
@@ -57186,7 +57346,7 @@ function convertBindingsAndAssets(config$3, result) {
57186
57346
  service: binding.workerName,
57187
57347
  entrypoint: binding.exportName,
57188
57348
  props: binding.props,
57189
- remote: binding.remote
57349
+ remote: binding.dev?.remote
57190
57350
  }));
57191
57351
  break;
57192
57352
  case "worker-loader":
@@ -57300,6 +57460,7 @@ function convertTriggers(config$3, result) {
57300
57460
  const crons = [];
57301
57461
  const routes = result.routes ? [...result.routes] : [];
57302
57462
  const queueConsumers = result.queues?.consumers ? [...result.queues.consumers] : [];
57463
+ const connectHandlers = result.connect ? [...result.connect] : [];
57303
57464
  let addresses;
57304
57465
  for (const trigger of triggers$1) switch (trigger.type) {
57305
57466
  case "email":
@@ -57332,6 +57493,13 @@ function convertTriggers(config$3, result) {
57332
57493
  visibility_timeout_ms: trigger.visibilityTimeoutMs
57333
57494
  }));
57334
57495
  break;
57496
+ case "connect":
57497
+ connectHandlers.push(omitUndefined({
57498
+ protocol: trigger.protocol,
57499
+ port: trigger.port,
57500
+ address: trigger.address
57501
+ }));
57502
+ break;
57335
57503
  }
57336
57504
  if (crons.length) result.triggers = { crons };
57337
57505
  if (routes.length) result.routes = routes;
@@ -57339,6 +57507,7 @@ function convertTriggers(config$3, result) {
57339
57507
  ...result.queues ?? {},
57340
57508
  consumers: queueConsumers
57341
57509
  };
57510
+ if (connectHandlers.length) result.connect = connectHandlers;
57342
57511
  if (addresses !== void 0) result.addresses = addresses;
57343
57512
  }
57344
57513
  function convertDomains(config$3, result) {
@@ -82520,17 +82689,17 @@ var require_command_exists$2 = __commonJS({ "../../node_modules/.pnpm/command-ex
82520
82689
  }, "cleanInput");
82521
82690
  if (isUsingWindows$1) cleanInput$1 = /* @__PURE__ */ __name$3(function(s) {
82522
82691
  if (/[\\]/.test(s)) {
82523
- var dirname3 = "\"" + path6.dirname(s) + "\"";
82692
+ var dirname4 = "\"" + path6.dirname(s) + "\"";
82524
82693
  var basename2 = "\"" + path6.basename(s) + "\"";
82525
- return dirname3 + ":" + basename2;
82694
+ return dirname4 + ":" + basename2;
82526
82695
  }
82527
82696
  return "\"" + s + "\"";
82528
82697
  }, "cleanInput");
82529
82698
  module$1.exports = /* @__PURE__ */ __name$3(function commandExists(commandName, callback$1) {
82530
82699
  var cleanedCommandName = cleanInput$1(commandName);
82531
- if (!callback$1 && typeof Promise !== "undefined") return new Promise(function(resolve2, reject) {
82700
+ if (!callback$1 && typeof Promise !== "undefined") return new Promise(function(resolve3, reject) {
82532
82701
  commandExists(commandName, function(error51, output) {
82533
- if (output) resolve2(commandName);
82702
+ if (output) resolve3(commandName);
82534
82703
  else reject(error51);
82535
82704
  });
82536
82705
  });
@@ -83256,7 +83425,7 @@ var require_update_check = __commonJS({ "../../node_modules/.pnpm/update-check@1
83256
83425
  lastUpdate
83257
83426
  }), "utf8");
83258
83427
  }, "updateCache");
83259
- var loadPackage = /* @__PURE__ */ __name$3((url2, authInfo) => new Promise((resolve2, reject) => {
83428
+ var loadPackage = /* @__PURE__ */ __name$3((url2, authInfo) => new Promise((resolve3, reject) => {
83260
83429
  const options = {
83261
83430
  host: url2.hostname,
83262
83431
  path: url2.pathname,
@@ -83282,7 +83451,7 @@ var require_update_check = __commonJS({ "../../node_modules/.pnpm/update-check@1
83282
83451
  });
83283
83452
  response.on("end", () => {
83284
83453
  try {
83285
- resolve2(JSON.parse(rawData));
83454
+ resolve3(JSON.parse(rawData));
83286
83455
  } catch (e2) {
83287
83456
  reject(e2);
83288
83457
  }
@@ -83383,6 +83552,7 @@ var defaultWranglerConfig = {
83383
83552
  producers: [],
83384
83553
  consumers: []
83385
83554
  },
83555
+ connect: [],
83386
83556
  r2_buckets: [],
83387
83557
  d1_databases: [],
83388
83558
  vectorize: [],
@@ -97296,8 +97466,8 @@ getBooleanEnvironmentVariableFactory$1({
97296
97466
  variableName: "WRANGLER_LOG_SANITIZE",
97297
97467
  defaultValue: true
97298
97468
  });
97299
- getEnvironmentVariableFactory$1({ variableName: "WRANGLER_OUTPUT_FILE_DIRECTORY" });
97300
- getEnvironmentVariableFactory$1({ variableName: "WRANGLER_OUTPUT_FILE_PATH" });
97469
+ var getOutputFileDirectoryFromEnv = getEnvironmentVariableFactory$1({ variableName: "WRANGLER_OUTPUT_FILE_DIRECTORY" });
97470
+ var getOutputFilePathFromEnv = getEnvironmentVariableFactory$1({ variableName: "WRANGLER_OUTPUT_FILE_PATH" });
97301
97471
  getEnvironmentVariableFactory$1({ variableName: "WRANGLER_CI_MATCH_TAG" });
97302
97472
  var getCIOverrideName = getEnvironmentVariableFactory$1({ variableName: "WRANGLER_CI_OVERRIDE_NAME" });
97303
97473
  getEnvironmentVariableFactory$1({ variableName: "WRANGLER_CI_OVERRIDE_NETWORK_MODE_HOST" });
@@ -98175,6 +98345,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
98175
98345
  producers: [],
98176
98346
  consumers: []
98177
98347
  }),
98348
+ connect: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "connect", validateConnectHandlers(envName), []),
98178
98349
  r2_buckets: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "r2_buckets", validateBindingArray(envName, validateR2Binding), []),
98179
98350
  d1_databases: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "d1_databases", validateBindingArray(envName, validateD1Binding), []),
98180
98351
  vectorize: notInheritable(diagnostics, topLevelEnv, rawConfig, rawEnv, envName, "vectorize", validateBindingArray(envName, validateVectorizeBinding), []),
@@ -98217,7 +98388,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
98217
98388
  cache: inheritable(diagnostics, topLevelEnv, rawEnv, "cache", validateCache, void 0),
98218
98389
  compliance_region: inheritable(diagnostics, topLevelEnv, rawEnv, "compliance_region", isOneOf("public", "fedramp_high"), void 0),
98219
98390
  python_modules: inheritable(diagnostics, topLevelEnv, rawEnv, "python_modules", validatePythonModules, { exclude: ["**/*.pyc"] }),
98220
- previews: inheritable(diagnostics, topLevelEnv, rawEnv, "previews", validatePreviewsConfig(envName), void 0)
98391
+ previews: inheritable(diagnostics, topLevelEnv, rawEnv, "previews", validatePreviewsConfig(envName, configPath), void 0)
98221
98392
  };
98222
98393
  warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, environment.durable_objects, environment.migrations, environment.exports, configPath);
98223
98394
  errorIfMigrationsAndExportsBothSet(diagnostics, environment.migrations, environment.exports);
@@ -98499,6 +98670,14 @@ var validateDurableObjectBinding = /* @__PURE__ */ __name$3((diagnostics, field,
98499
98670
  return isValid;
98500
98671
  }, "validateDurableObjectBinding");
98501
98672
  var workflowNameFormatMessage = `Workflow names must be 1-64 characters long, start with a letter, number, or underscore, and may only contain letters, numbers, underscores, or hyphens.`;
98673
+ function validateWorkflowRetentionValue(diagnostics, field, key, value) {
98674
+ const isValidNumber = typeof value === "number" && Number.isInteger(value) && value > 0;
98675
+ const isValidString = typeof value === "string" && value.length > 0;
98676
+ if (isValidNumber || isValidString) return true;
98677
+ diagnostics.errors.push(`"${field}" bindings "default_retention.${key}" field must be a positive integer of milliseconds or a duration string such as "3 days", but got ${JSON.stringify(value)}.`);
98678
+ return false;
98679
+ }
98680
+ __name$3(validateWorkflowRetentionValue, "validateWorkflowRetentionValue");
98502
98681
  var validateWorkflowBinding = /* @__PURE__ */ __name$3((diagnostics, field, value) => {
98503
98682
  if (typeof value !== "object" || value === null) {
98504
98683
  diagnostics.errors.push(`"workflows" bindings should be objects, but got ${JSON.stringify(value)}`);
@@ -98524,10 +98703,6 @@ var validateWorkflowBinding = /* @__PURE__ */ __name$3((diagnostics, field, valu
98524
98703
  diagnostics.errors.push(`"${field}" bindings should, optionally, have a string "script_name" field but got ${JSON.stringify(value)}.`);
98525
98704
  isValid = false;
98526
98705
  }
98527
- if (!isOptionalProperty(value, "remote", "boolean")) {
98528
- diagnostics.errors.push(`"${field}" bindings should, optionally, have a boolean "remote" field but got ${JSON.stringify(value)}.`);
98529
- isValid = false;
98530
- }
98531
98706
  if (hasProperty(value, "schedules") && value.schedules !== void 0) if (typeof value.schedules === "string") {
98532
98707
  if (value.schedules.length === 0) {
98533
98708
  diagnostics.errors.push(`"${field}" bindings "schedules" field must not be an empty string.`);
@@ -98561,14 +98736,22 @@ var validateWorkflowBinding = /* @__PURE__ */ __name$3((diagnostics, field, valu
98561
98736
  }
98562
98737
  validateAdditionalProperties(diagnostics, `${field}.limits`, Object.keys(limits), ["steps"]);
98563
98738
  }
98739
+ if (hasProperty(value, "default_retention") && value.default_retention !== void 0) if (typeof value.default_retention !== "object" || value.default_retention === null || Array.isArray(value.default_retention)) {
98740
+ diagnostics.errors.push(`"${field}" bindings should, optionally, have an object "default_retention" field but got ${JSON.stringify(value)}.`);
98741
+ isValid = false;
98742
+ } else {
98743
+ const defaultRetention = value.default_retention;
98744
+ for (const key of ["success_retention", "error_retention"]) if (defaultRetention[key] !== void 0 && !validateWorkflowRetentionValue(diagnostics, field, key, defaultRetention[key])) isValid = false;
98745
+ validateAdditionalProperties(diagnostics, `${field}.default_retention`, Object.keys(defaultRetention), ["success_retention", "error_retention"]);
98746
+ }
98564
98747
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
98565
98748
  "binding",
98566
98749
  "name",
98567
98750
  "class_name",
98568
98751
  "script_name",
98569
- "remote",
98570
98752
  "limits",
98571
- "schedules"
98753
+ "schedules",
98754
+ "default_retention"
98572
98755
  ]);
98573
98756
  return isValid;
98574
98757
  }, "validateWorkflowBinding");
@@ -98761,7 +98944,36 @@ function validateSshPublicKeys(diagnostics, field, value, nameRequired) {
98761
98944
  }
98762
98945
  }
98763
98946
  __name$3(validateSshPublicKeys, "validateSshPublicKeys");
98764
- function validateContainerApp(envName, topLevelName, configPath) {
98947
+ function validatePreviewsContainers(envName, configPath) {
98948
+ const innerValidator = validateContainerApp(envName, void 0, configPath, { generateDefaultName: false });
98949
+ return (diagnostics, field, value, config2) => {
98950
+ if (Array.isArray(value)) {
98951
+ const nameFields = [...value.entries()].filter(([, entry]) => entry && typeof entry === "object" && "name" in entry).map(([index]) => `"${field}[${index}].name"`);
98952
+ if (nameFields.length > 0) {
98953
+ diagnostics.errors.push(`${nameFields.join(", ")} cannot be set. A preview container's application name is generated from the worker name, preview slug, and Durable Object class name, so that separate previews of the same Worker do not collide. Remove it and identify the container with "class_name".`);
98954
+ return false;
98955
+ }
98956
+ const seenClasses = /* @__PURE__ */ new Set();
98957
+ const duplicateClasses = /* @__PURE__ */ new Set();
98958
+ for (const entry of value) {
98959
+ if (!entry || typeof entry !== "object") continue;
98960
+ if (typeof entry.class_name === "string") {
98961
+ if (seenClasses.has(entry.class_name)) duplicateClasses.add(entry.class_name);
98962
+ seenClasses.add(entry.class_name);
98963
+ }
98964
+ }
98965
+ if (duplicateClasses.size > 0) {
98966
+ const classList = [...duplicateClasses].map((className) => `"${className}"`).join(", ");
98967
+ diagnostics.errors.push(`"${field}" declares more than one container for the Durable Object class ${classList}; each Durable Object class may appear at most once.`);
98968
+ return false;
98969
+ }
98970
+ }
98971
+ return innerValidator(diagnostics, field, value, config2);
98972
+ };
98973
+ }
98974
+ __name$3(validatePreviewsContainers, "validatePreviewsContainers");
98975
+ function validateContainerApp(envName, topLevelName, configPath, options = {}) {
98976
+ const { generateDefaultName = true } = options;
98765
98977
  return (diagnostics, field, value, config2) => {
98766
98978
  if (!value) return true;
98767
98979
  if (!Array.isArray(value)) {
@@ -98771,7 +98983,7 @@ function validateContainerApp(envName, topLevelName, configPath) {
98771
98983
  for (const containerAppOptional of value) {
98772
98984
  validateOptionalProperty(diagnostics, field, "class_name", containerAppOptional.class_name, "string");
98773
98985
  validateOptionalProperty(diagnostics, field, "name", containerAppOptional.name, "string");
98774
- if (!containerAppOptional.name) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
98986
+ if (generateDefaultName && !containerAppOptional.name) if (containerAppOptional.class_name === void 0) diagnostics.errors.push(`"containers.name" is required when "containers.class_name" is not defined, because there is no class name to derive a default name from. Either name this container and reference it from a Durable Object's \`exports\` entry, or set "containers.class_name".`);
98775
98987
  else if (!topLevelName) diagnostics.errors.push(`Must have either a top level "name" and "containers.class_name" field defined, or have field "containers.name" defined.`);
98776
98988
  else {
98777
98989
  let name = `${topLevelName}-${containerAppOptional.class_name}`;
@@ -99586,6 +99798,63 @@ var validateConsumer = /* @__PURE__ */ __name$3((diagnostics, field, value, _con
99586
99798
  }
99587
99799
  return isValid;
99588
99800
  }, "validateConsumer");
99801
+ function validateConnectHandlers(envName) {
99802
+ return (diagnostics, field, value, config2) => {
99803
+ if (value === void 0) return true;
99804
+ const fieldPath = config2 === void 0 ? `${field}` : `env.${envName}.${field}`;
99805
+ if (!Array.isArray(value)) {
99806
+ diagnostics.errors.push(`The field "${fieldPath}" should be an array but got ${JSON.stringify(value)}.`);
99807
+ return false;
99808
+ }
99809
+ let isValid = true;
99810
+ for (let i$1 = 0; i$1 < value.length; i$1++) if (!validateConnectHandler(diagnostics, `${fieldPath}[${i$1}]`, value[i$1], config2)) isValid = false;
99811
+ const firstIndexByKey = /* @__PURE__ */ new Map();
99812
+ for (let i$1 = 0; i$1 < value.length; i$1++) {
99813
+ const handler = value[i$1];
99814
+ if (typeof handler !== "object" || handler === null || typeof handler.port !== "number" || typeof handler.protocol !== "string") continue;
99815
+ const { protocol, port } = handler;
99816
+ const key = `${protocol}:${port}`;
99817
+ const firstIndex = firstIndexByKey.get(key);
99818
+ if (firstIndex !== void 0) {
99819
+ diagnostics.errors.push(`"${fieldPath}[${i$1}]" has the same "protocol" (${protocol}) and "port" (${port}) as "${fieldPath}[${firstIndex}]". Each entry in "connect" must use a unique protocol/port combination.`);
99820
+ isValid = false;
99821
+ } else firstIndexByKey.set(key, i$1);
99822
+ }
99823
+ return isValid;
99824
+ };
99825
+ }
99826
+ __name$3(validateConnectHandlers, "validateConnectHandlers");
99827
+ var validateConnectHandler = /* @__PURE__ */ __name$3((diagnostics, field, value) => {
99828
+ if (typeof value !== "object" || value === null) {
99829
+ diagnostics.errors.push(`"${field}" should be an object, but got ${JSON.stringify(value)}`);
99830
+ return false;
99831
+ }
99832
+ let isValid = true;
99833
+ if (!validateAdditionalProperties(diagnostics, field, Object.keys(value), [
99834
+ "protocol",
99835
+ "port",
99836
+ "address"
99837
+ ])) isValid = false;
99838
+ if ("protocol" in value && value.protocol !== "tcp") {
99839
+ diagnostics.errors.push(`"${field}" should have a "protocol" field of "tcp" but got ${JSON.stringify(value.protocol)}.`);
99840
+ isValid = false;
99841
+ } else if (!("protocol" in value)) {
99842
+ diagnostics.errors.push(`"${field}" should have a "protocol" field of "tcp" but got ${JSON.stringify(value)}.`);
99843
+ isValid = false;
99844
+ }
99845
+ if (!isRequiredProperty(value, "port", "number")) {
99846
+ diagnostics.errors.push(`"${field}" should have a number "port" field but got ${JSON.stringify(value)}.`);
99847
+ isValid = false;
99848
+ } else if (!Number.isInteger(value.port) || value.port < 1 || value.port > 65535) {
99849
+ diagnostics.errors.push(`"${field}" should have an integer "port" field between 1 and 65535 but got ${JSON.stringify(value)}.`);
99850
+ isValid = false;
99851
+ }
99852
+ if (!isOptionalProperty(value, "address", "string")) {
99853
+ diagnostics.errors.push(`"${field}" should, optionally, have a string "address" field but got ${JSON.stringify(value)}.`);
99854
+ isValid = false;
99855
+ }
99856
+ return isValid;
99857
+ }, "validateConnectHandler");
99589
99858
  var validateCompatibilityDate = /* @__PURE__ */ __name$3((diagnostics, field, value) => {
99590
99859
  if (value === void 0) return true;
99591
99860
  if (typeof value !== "string") {
@@ -99767,7 +100036,7 @@ function normalizeAndValidateLimits(diagnostics, topLevelEnv, rawEnv) {
99767
100036
  return inheritable(diagnostics, topLevelEnv, rawEnv, "limits", () => true, void 0);
99768
100037
  }
99769
100038
  __name$3(normalizeAndValidateLimits, "normalizeAndValidateLimits");
99770
- var validatePreviewsConfig = /* @__PURE__ */ __name$3((envName) => (diagnostics, field, value) => {
100039
+ var validatePreviewsConfig = /* @__PURE__ */ __name$3((envName, configPath) => (diagnostics, field, value) => {
99771
100040
  if (value === void 0) return true;
99772
100041
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
99773
100042
  diagnostics.errors.push(`The field "${field}" should be an object but got ${JSON.stringify(value)}.`);
@@ -99808,6 +100077,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$3((envName) => (diagnostics,
99808
100077
  "ratelimits",
99809
100078
  "vpc_services",
99810
100079
  "version_metadata",
100080
+ "containers",
99811
100081
  "logpush",
99812
100082
  "observability",
99813
100083
  "limits",
@@ -99845,6 +100115,7 @@ var validatePreviewsConfig = /* @__PURE__ */ __name$3((envName) => (diagnostics,
99845
100115
  isValid = validateBindingArray(envName, validateRateLimitBinding)(diagnostics, `${field}.ratelimits`, previews.ratelimits, void 0) && isValid;
99846
100116
  isValid = validateBindingArray(envName, validateVpcServiceBinding)(diagnostics, `${field}.vpc_services`, previews.vpc_services, void 0) && isValid;
99847
100117
  if (previews.version_metadata !== void 0) isValid = validateVersionMetadataBinding(envName)(diagnostics, `${field}.version_metadata`, previews.version_metadata, void 0) && isValid;
100118
+ if (previews.containers !== void 0) isValid = validatePreviewsContainers(envName, configPath)(diagnostics, `${field}.containers`, previews.containers, void 0) && isValid;
99848
100119
  isValid = isBoolean(diagnostics, `${field}.logpush`, previews.logpush, void 0) && isValid;
99849
100120
  isValid = validateObservability(diagnostics, `${field}.observability`, previews.observability, void 0) && isValid;
99850
100121
  if (previews.limits) {
@@ -100290,7 +100561,7 @@ var BINDING_LOCAL_SUPPORT = {
100290
100561
  kv_namespace: "local-and-remote",
100291
100562
  r2_bucket: "local-and-remote",
100292
100563
  d1: "local-and-remote",
100293
- workflow: "local-and-remote",
100564
+ workflow: "local-only",
100294
100565
  browser: "local-and-remote",
100295
100566
  images: "local-and-remote",
100296
100567
  stream: "local-and-remote",
@@ -100405,6 +100676,10 @@ function getPackagePath(packageName, projectPath) {
100405
100676
  try {
100406
100677
  return path2__default.dirname(__require$1.resolve(packageName, { paths: [projectPath] }));
100407
100678
  } catch {}
100679
+ try {
100680
+ const candidate = path2__default.join(projectPath, "node_modules", packageName, "package.json");
100681
+ if (statSync(candidate).isFile()) return path2__default.dirname(candidate);
100682
+ } catch {}
100408
100683
  }
100409
100684
  __name$3(getPackagePath, "getPackagePath");
100410
100685
  function isPackageInstalled(packageName, projectPath) {
@@ -101300,7 +101575,7 @@ function terminateCloudflared(cloudflared) {
101300
101575
  }
101301
101576
  __name$3(terminateCloudflared, "terminateCloudflared");
101302
101577
  function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
101303
- return new Promise((resolve2, reject) => {
101578
+ return new Promise((resolve3, reject) => {
101304
101579
  let resolved = false;
101305
101580
  let stderrOutput = "";
101306
101581
  const logger$1 = options?.logger;
@@ -101321,7 +101596,7 @@ function waitForQuickTunnelReady(cloudflared, timeoutMs, options) {
101321
101596
  if (match && !resolved) {
101322
101597
  resolved = true;
101323
101598
  clearTimeout(timeoutId);
101324
- resolve2({
101599
+ resolve3({
101325
101600
  mode: "quick",
101326
101601
  publicUrl: new URL(match[0])
101327
101602
  });
@@ -101640,7 +101915,7 @@ async function fetchLatestNpmVersion$1(name, version2) {
101640
101915
  __name$3(fetchLatestNpmVersion$1, "fetchLatestNpmVersion");
101641
101916
  async function openInBrowser$1(url2, logger$1) {
101642
101917
  try {
101643
- const { default: open$1 } = await import("./open-PBXRGS4R-qOWuyhJy-DF6hl_jp.mjs");
101918
+ const { default: open$1 } = await import("./open-PBXRGS4R-DmJH7r1k-rXrDiJei.mjs");
101644
101919
  (await open$1(url2)).on("error", (err) => {
101645
101920
  handleBrowserOpenError(url2, err, logger$1);
101646
101921
  });
@@ -101659,6 +101934,31 @@ ${url2}`);
101659
101934
  logger$1.debug(err instanceof Error ? err.stack ?? String(err) : String(err));
101660
101935
  }
101661
101936
  __name$3(handleBrowserOpenError, "handleBrowserOpenError");
101937
+ function writeOutput(entry) {
101938
+ if (outputFilePath === void 0) outputFilePath = getOutputFilePath();
101939
+ if (outputFilePath !== null) {
101940
+ mkdirSync(dirname(outputFilePath), { recursive: true });
101941
+ const entryJSON = JSON.stringify({
101942
+ ...entry,
101943
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
101944
+ });
101945
+ appendFileSync(outputFilePath, entryJSON + "\n");
101946
+ }
101947
+ }
101948
+ __name$3(writeOutput, "writeOutput");
101949
+ function clearOutputFilePath() {
101950
+ outputFilePath = void 0;
101951
+ }
101952
+ __name$3(clearOutputFilePath, "clearOutputFilePath");
101953
+ var outputFilePath = void 0;
101954
+ function getOutputFilePath() {
101955
+ const outputFilePathFromEnv = getOutputFilePathFromEnv();
101956
+ if (outputFilePathFromEnv) return outputFilePathFromEnv;
101957
+ const outputFileDirectoryFromEnv = getOutputFileDirectoryFromEnv();
101958
+ if (outputFileDirectoryFromEnv) return resolve(outputFileDirectoryFromEnv, `wrangler-output-${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-").replace(".", "_").replace("T", "_").replace("Z", "")}-${randomBytes(3).toString("hex")}.json`);
101959
+ return null;
101960
+ }
101961
+ __name$3(getOutputFilePath, "getOutputFilePath");
101662
101962
  var MAX_ATTEMPTS = 3;
101663
101963
  var MAX_RETRY_AFTER_MS = 6e4;
101664
101964
  async function retryOnAPIFailure$1(action, logger$1, backoff = 0, attempts = MAX_ATTEMPTS, abortSignal) {
@@ -102180,9 +102480,11 @@ function getBuildOutputDir(root) {
102180
102480
  /**
102181
102481
  * Absolute path to the top-level `config.json` for the current project.
102182
102482
  *
102183
- * This corresponds with the `settings` export in the input `cloudflare.config.ts`.
102483
+ * Holds the project-level settings shared by every Worker: those declared by
102484
+ * the `settings` export of the input `cloudflare.config.ts`, including the
102485
+ * mode the build was produced in.
102184
102486
  */
102185
- function getRootConfigPath(root) {
102487
+ function getSettingsConfigPath(root) {
102186
102488
  return path2.join(getBuildOutputDir(root), BUILD_OUTPUT_VERSION, CONFIG_FILENAME);
102187
102489
  }
102188
102490
  /**
@@ -102267,13 +102569,25 @@ async function writeWorkerConfig(root, parsedConfig, manifest) {
102267
102569
  await fsp.writeFile(getWorkerConfigPath(root), JSON.stringify(outputConfig));
102268
102570
  }
102269
102571
  /**
102270
- * Write the top-level `config.json` holding shared settings to the Build
102271
- * Output Specification tree.
102572
+ * Write the top-level `config.json` to the Build Output Specification tree.
102573
+ *
102574
+ * Holds the project-level settings shared by every Worker: those declared by
102575
+ * the `settings` export, including the `mode`, which is supplied at build time
102576
+ * rather than declared. Always written, even when there are no declared
102577
+ * settings and no mode: the result then degrades to `{ "type": "settings" }`.
102578
+ *
102579
+ * `mode` is omitted when undefined, which is the case for Wrangler builds that
102580
+ * selected no mode (Vite always resolves one).
102272
102581
  */
102273
- async function writeRootConfig(root, settings) {
102274
- const configPath = getRootConfigPath(root);
102582
+ async function writeSettingsConfig(root, settings, mode) {
102583
+ const outputConfig = {
102584
+ ...settings,
102585
+ type: "settings",
102586
+ ...mode !== void 0 ? { mode } : {}
102587
+ };
102588
+ const configPath = getSettingsConfigPath(root);
102275
102589
  await fsp.mkdir(path2.dirname(configPath), { recursive: true });
102276
- await fsp.writeFile(configPath, JSON.stringify(settings));
102590
+ await fsp.writeFile(configPath, JSON.stringify(outputConfig));
102277
102591
  }
102278
102592
  const BUILD_OUTPUT_ERROR_PREFIX = "Build Output Specification: ";
102279
102593
  /**
@@ -102290,7 +102604,7 @@ var BuildOutputError = class extends Error {
102290
102604
  * Read and validate the Build Output Specification tree at
102291
102605
  * `<root>/.cloudflare/output/v0/`.
102292
102606
  *
102293
- * Reads the optional top-level `config.json` settings, then reads and
102607
+ * Reads the optional top-level settings `config.json`, then reads and
102294
102608
  * schema-validates the Worker's `config.json` and resolves its
102295
102609
  * `bundle/` / `assets/` directories.
102296
102610
  *
@@ -102309,12 +102623,13 @@ async function readBuildOutput(root) {
102309
102623
  * Read and schema-validate the Worker's `config.json` and resolve its
102310
102624
  * `bundle/` / `assets/` directories.
102311
102625
  *
102626
+ * @returns the Worker, with whichever of its directories exist resolved.
102312
102627
  * @throws {BuildOutputError} if the config is missing, is not valid JSON, or
102313
102628
  * fails schema validation.
102314
102629
  */
102315
102630
  async function readWorker(root) {
102316
102631
  const configPath = getWorkerConfigPath(root);
102317
- if (!fs$1.existsSync(configPath)) throw new BuildOutputError(`No Worker config found at ${configPath}.`);
102632
+ if (!fs$1.existsSync(configPath)) throw new BuildOutputError(`no Worker config found at ${configPath}.`);
102318
102633
  const contents = await fsp.readFile(configPath, "utf-8");
102319
102634
  const result = OutputWorkerSchema.safeParse(parseJson(contents, configPath));
102320
102635
  if (!result.success) throw new BuildOutputError(`invalid Worker config at ${configPath}.\n${result.error.message}`);
@@ -102339,18 +102654,22 @@ async function readWorker(root) {
102339
102654
  }
102340
102655
  /**
102341
102656
  * Read and schema-validate the optional top-level `config.json` holding the
102342
- * project-level settings shared by every Worker.
102657
+ * project-level settings shared by every Worker, including the mode the build
102658
+ * was produced in.
102659
+ *
102660
+ * Returned whole: consumers that need only the settings the user declared
102661
+ * narrow it themselves.
102343
102662
  *
102344
102663
  * @returns the parsed settings, or `undefined` when the file is absent.
102345
102664
  * @throws {BuildOutputError} if the file is not valid JSON or fails schema
102346
102665
  * validation.
102347
102666
  */
102348
102667
  async function readSettings(root) {
102349
- const configPath = getRootConfigPath(root);
102668
+ const configPath = getSettingsConfigPath(root);
102350
102669
  if (!fs$1.existsSync(configPath)) return;
102351
102670
  const contents = await fsp.readFile(configPath, "utf-8");
102352
- const result = SettingsSchema.safeParse(parseJson(contents, configPath));
102353
- if (!result.success) throw new BuildOutputError(`invalid root config at ${configPath}.\n${result.error.message}`);
102671
+ const result = OutputSettingsSchema.safeParse(parseJson(contents, configPath));
102672
+ if (!result.success) throw new BuildOutputError(`invalid settings config at ${configPath}.\n${result.error.message}`);
102354
102673
  return result.data;
102355
102674
  }
102356
102675
  function parseJson(contents, configPath) {
@@ -111414,7 +111733,7 @@ const buildOutputPlugin = createPlugin("build-output", (ctx) => {
111414
111733
  const workerNewConfig$1 = defaultExport?.type === "worker" ? defaultExport : void 0;
111415
111734
  assert2(workerNewConfig$1, "Expected a default worker export on assets-only resolved config");
111416
111735
  await writeWorkerConfig(ctx.resolvedViteConfig.root, workerNewConfig$1);
111417
- await writeSettingsConfig();
111736
+ await writeSettings();
111418
111737
  return;
111419
111738
  }
111420
111739
  if (ctx.resolvedPluginConfig.type === "workers" && this.environment.name !== ctx.resolvedPluginConfig.entryWorkerEnvironmentName) return;
@@ -111434,14 +111753,20 @@ const buildOutputPlugin = createPlugin("build-output", (ctx) => {
111434
111753
  mainModule: entryChunk.fileName,
111435
111754
  modules
111436
111755
  });
111437
- await writeSettingsConfig();
111756
+ await writeSettings();
111438
111757
  } };
111439
- async function writeSettingsConfig() {
111758
+ /**
111759
+ * Write the top-level `config.json`, recording the settings shared by every
111760
+ * Worker, including the Vite mode the build ran in.
111761
+ *
111762
+ * Written even when there is no `settings` export, so the mode is always
111763
+ * captured.
111764
+ */
111765
+ async function writeSettings() {
111440
111766
  if (ctx.resolvedPluginConfig.type === "preview") return;
111441
111767
  const settingsExport = ctx.resolvedPluginConfig.parsedNewConfig?.settings;
111442
111768
  const settings = settingsExport?.type === "settings" ? settingsExport : void 0;
111443
- if (!settings) return;
111444
- await writeRootConfig(ctx.resolvedViteConfig.root, settings);
111769
+ await writeSettingsConfig(ctx.resolvedViteConfig.root, settings, ctx.resolvedViteConfig.mode);
111445
111770
  }
111446
111771
  });
111447
111772
  /**
@@ -118136,7 +118461,7 @@ var __name$1 = (target$1, value) => __defProp$1(target$1, "name", {
118136
118461
  });
118137
118462
 
118138
118463
  //#endregion
118139
- //#region ../workers-auth/dist/chunk-LXNXA7SZ.mjs
118464
+ //#region ../workers-auth/dist/chunk-LQW53VED.mjs
118140
118465
  var import_undici$2 = require_undici();
118141
118466
  var hasWarnedAboutDeprecatedV1ApiToken = false;
118142
118467
  function readStoredAuthState(options) {
@@ -120620,11 +120945,20 @@ function getInstalledBindingPath(installDir) {
120620
120945
  return path2__default.join(installDir, "node_modules", "@napi-rs", "keyring");
120621
120946
  }
120622
120947
  __name$1(getInstalledBindingPath, "getInstalledBindingPath");
120948
+ function canLoadKeyringBinding(candidate) {
120949
+ try {
120950
+ createRequire(candidate)(candidate);
120951
+ return true;
120952
+ } catch {
120953
+ return false;
120954
+ }
120955
+ }
120956
+ __name$1(canLoadKeyringBinding, "canLoadKeyringBinding");
120623
120957
  function findKeyringBinding(installDir) {
120624
120958
  const cached$3 = cachedBindingPathByDir.get(installDir);
120625
120959
  if (cached$3 !== void 0) return cached$3;
120626
120960
  const lazy$3 = getInstalledBindingPath(installDir);
120627
- if (existsSync(path2__default.join(lazy$3, "index.js"))) {
120961
+ if (existsSync(path2__default.join(lazy$3, "index.js")) && canLoadKeyringBinding(lazy$3)) {
120628
120962
  cachedBindingPathByDir.set(installDir, lazy$3);
120629
120963
  return lazy$3;
120630
120964
  }
@@ -120632,7 +120966,7 @@ function findKeyringBinding(installDir) {
120632
120966
  const r$1 = npmRunner(["root", "-g"]);
120633
120967
  if (r$1.status === 0) {
120634
120968
  const global$3 = path2__default.join(r$1.stdout.trim(), "@napi-rs", "keyring");
120635
- if (existsSync(path2__default.join(global$3, "index.js"))) {
120969
+ if (existsSync(path2__default.join(global$3, "index.js")) && canLoadKeyringBinding(global$3)) {
120636
120970
  cachedBindingPathByDir.set(installDir, global$3);
120637
120971
  return global$3;
120638
120972
  }
@@ -120675,6 +121009,12 @@ ${r$1.stderr?.trim() ?? "(no stderr)"}
120675
121009
  Retry once the underlying issue is fixed, or install the binding globally:
120676
121010
  npm install -g @napi-rs/keyring@${PINNED_KEYRING_VERSION}`, { telemetryMessage: "workers-auth keyring npm install failed" });
120677
121011
  cachedBindingPathByDir.delete(installDir);
121012
+ if (findKeyringBinding(installDir) === null) throw new UserError(`\`npm\` reported success but the \`@napi-rs/keyring\` native binding still cannot be loaded.
121013
+
121014
+ Its platform-specific binary ships as a separate optional package, so a download that was skipped or interrupted leaves the binding unusable.
121015
+
121016
+ Retry once the underlying issue is fixed, or install the binding globally:
121017
+ npm install -g @napi-rs/keyring@${PINNED_KEYRING_VERSION}`, { telemetryMessage: "workers-auth keyring install incomplete" });
120678
121018
  }
120679
121019
  __name$1(installKeyringBindingSync, "installKeyringBindingSync");
120680
121020
  var entryFactoryOverride;
@@ -120685,7 +121025,10 @@ __name$1(setKeyringEntryFactory, "setKeyringEntryFactory");
120685
121025
  function resolveKeyringEntryFactory(installDir) {
120686
121026
  if (entryFactoryOverride !== void 0) return entryFactoryOverride;
120687
121027
  const bindingPath = findKeyringBinding(installDir);
120688
- if (bindingPath === null) throw new Error("`@napi-rs/keyring` binding not found. Call `installKeyringBindingSync()` first.");
121028
+ if (bindingPath === null) throw new UserError(`The \`@napi-rs/keyring\` native binding is not available.
121029
+
121030
+ Retry the command, or install the binding globally:
121031
+ npm install -g @napi-rs/keyring@${PINNED_KEYRING_VERSION}`, { telemetryMessage: "workers-auth keyring binding not loadable" });
120689
121032
  const mod$1 = createRequire(bindingPath)(bindingPath);
120690
121033
  return (service, account) => new mod$1.Entry(service, account);
120691
121034
  }
@@ -120739,7 +121082,7 @@ function probeSecretTool() {
120739
121082
  if (cachedProbeResult !== void 0) return cachedProbeResult;
120740
121083
  let result;
120741
121084
  try {
120742
- result = runner(["--version"]).status === 0;
121085
+ result = runner(["--version"]).error === void 0;
120743
121086
  } catch {
120744
121087
  result = false;
120745
121088
  }
@@ -121074,7 +121417,7 @@ function scrubEncryptedCredentials(options) {
121074
121417
  __name$1(scrubEncryptedCredentials, "scrubEncryptedCredentials");
121075
121418
 
121076
121419
  //#endregion
121077
- //#region ../workers-auth/dist/chunk-5EWNHNLD.mjs
121420
+ //#region ../workers-auth/dist/chunk-YCVYA5LL.mjs
121078
121421
  function createPreferences(getConfigPath) {
121079
121422
  function getUserPreferencesPath() {
121080
121423
  return path2__default.resolve(getConfigPath(), "preferences.json");
@@ -121997,6 +122340,8 @@ ${accounts.map((account) => ` \`${redactAccountName ? "(redacted)" : account.na
121997
122340
  async function requireAuth(config$3) {
121998
122341
  if (oauthFlow.isTemporaryAllowed()) {
121999
122342
  if (getCloudflareComplianceRegion(config$3) !== "public") throw new UserError("Temporary accounts aren't available when the compliance region is not set to public.", { telemetryMessage: "user temporary account unavailable in compliance region" });
122343
+ const latchedTemporaryAccount = oauthFlow.getActiveTemporaryAccount();
122344
+ if (latchedTemporaryAccount) return latchedTemporaryAccount.account.id;
122000
122345
  if (getAPIToken$1()) throw new UserError("You're already authenticated with Cloudflare, so `--temporary` can't be used. Temporary preview accounts are only for unauthenticated use. Either remove `--temporary` to use your existing account, or log out (and unset CLOUDFLARE_API_TOKEN) first.", { telemetryMessage: "user temporary account already authenticated" });
122001
122346
  const { account: temporaryPreviewAccount, cached: cached$3 } = await oauthFlow.activateTemporaryAccount();
122002
122347
  logTemporaryPreviewAccount(logger$1, temporaryPreviewAccount, cached$3);
@@ -122635,7 +122980,7 @@ var require_command_exists = /* @__PURE__ */ __commonJS$4({ "../../node_modules/
122635
122980
  }) });
122636
122981
 
122637
122982
  //#endregion
122638
- //#region ../deploy-helpers/dist/chunk-LRKPOFWK.mjs
122983
+ //#region ../deploy-helpers/dist/chunk-ZV7SJ2MZ.mjs
122639
122984
  var import_undici$1 = require_undici();
122640
122985
  var import_command_exists = require_command_exists();
122641
122986
  function assertNever$1(_value) {}
@@ -122666,10 +123011,22 @@ function convertConfigToBindings(config$3, options) {
122666
123011
  break;
122667
123012
  case "send_email":
122668
123013
  if (pages) break;
122669
- for (const { name,...x } of info$1) output[name] = {
122670
- type: "send_email",
122671
- ...x
122672
- };
123014
+ for (const { name, destination_address, allowed_destination_addresses, allowed_sender_addresses, remote } of info$1) {
123015
+ const shared = {
123016
+ type: "send_email",
123017
+ allowed_sender_addresses,
123018
+ remote
123019
+ };
123020
+ if (destination_address !== void 0) output[name] = {
123021
+ ...shared,
123022
+ destination_address
123023
+ };
123024
+ else if (allowed_destination_addresses !== void 0) output[name] = {
123025
+ ...shared,
123026
+ allowed_destination_addresses
123027
+ };
123028
+ else output[name] = shared;
123029
+ }
122673
123030
  break;
122674
123031
  case "wasm_modules":
122675
123032
  if (pages) break;
@@ -123097,16 +123454,20 @@ function createWorkerUploadForm(worker, bindings$1, options) {
123097
123454
  });
123098
123455
  });
123099
123456
  send_email.forEach((emailBinding) => {
123100
- const destination_address = "destination_address" in emailBinding ? emailBinding.destination_address : void 0;
123101
- const allowed_destination_addresses = "allowed_destination_addresses" in emailBinding ? emailBinding.allowed_destination_addresses : void 0;
123102
- const allowed_sender_addresses = "allowed_sender_addresses" in emailBinding ? emailBinding.allowed_sender_addresses : void 0;
123103
- metadataBindings.push({
123457
+ const shared = {
123104
123458
  name: emailBinding.name,
123105
123459
  type: "send_email",
123106
- destination_address,
123107
- allowed_destination_addresses,
123108
- allowed_sender_addresses
123460
+ allowed_sender_addresses: emailBinding.allowed_sender_addresses
123461
+ };
123462
+ if (emailBinding.destination_address !== void 0) metadataBindings.push({
123463
+ ...shared,
123464
+ destination_address: emailBinding.destination_address
123465
+ });
123466
+ else if (emailBinding.allowed_destination_addresses !== void 0) metadataBindings.push({
123467
+ ...shared,
123468
+ allowed_destination_addresses: emailBinding.allowed_destination_addresses
123109
123469
  });
123470
+ else metadataBindings.push(shared);
123110
123471
  });
123111
123472
  durable_objects.forEach(({ name, class_name, script_name, environment }) => {
123112
123473
  metadataBindings.push({
@@ -123506,7 +123867,7 @@ __name(createWorkerUploadForm, "createWorkerUploadForm");
123506
123867
  //#endregion
123507
123868
  //#region ../remote-bindings/dist/index.mjs
123508
123869
  var import_undici = require_undici();
123509
- var version$2 = "0.0.13";
123870
+ var version$2 = "0.0.15";
123510
123871
  var NoDefaultValueProvided = class extends UserError {
123511
123872
  constructor() {
123512
123873
  super("This command cannot be run in a non-interactive context", { telemetryMessage: "remote bindings prompt default missing" });