create-cloudflare 2.70.6 → 2.70.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -33,7 +33,6 @@ var __copyProps = (to, from, except, desc) => {
33
33
  }
34
34
  return to;
35
35
  };
36
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
37
36
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
37
  // If the importer is in node compatibility mode or this is not an ESM
39
38
  // file that has been converted to a CommonJS file using a Babel-
@@ -14538,7 +14537,7 @@ var require_redirect_handler = __commonJS({
14538
14537
  }
14539
14538
  this.dispatch = dispatch;
14540
14539
  this.location = null;
14541
- const { maxRedirections: _2, ...cleanOpts } = opts;
14540
+ const { maxRedirections: _, ...cleanOpts } = opts;
14542
14541
  this.opts = cleanOpts;
14543
14542
  this.maxRedirections = maxRedirections;
14544
14543
  this.handler = handler;
@@ -16671,7 +16670,7 @@ var require_cache_revalidation_handler = __commonJS({
16671
16670
  this.#handler = handler;
16672
16671
  this.#allowErrorStatusCodes = allowErrorStatusCodes;
16673
16672
  }
16674
- onRequestStart(_2, context) {
16673
+ onRequestStart(_, context) {
16675
16674
  this.#successful = false;
16676
16675
  this.#context = context;
16677
16676
  }
@@ -17208,7 +17207,7 @@ var require_decompress = __commonJS({
17208
17207
  return super.onResponseStart(controller, statusCode, headers, statusMessage);
17209
17208
  }
17210
17209
  this.#decompressors = decompressors;
17211
- const { "content-encoding": _2, "content-length": __, ...newHeaders } = headers;
17210
+ const { "content-encoding": _, "content-length": __, ...newHeaders } = headers;
17212
17211
  if (this.#decompressors.length === 1) {
17213
17212
  this.#setupSingleDecompressor(controller);
17214
17213
  } else {
@@ -21801,7 +21800,7 @@ var require_util4 = __commonJS({
21801
21800
  "Nov",
21802
21801
  "Dec"
21803
21802
  ];
21804
- var IMFPaddedNumbers = Array(61).fill(0).map((_2, i) => i.toString().padStart(2, "0"));
21803
+ var IMFPaddedNumbers = Array(61).fill(0).map((_, i) => i.toString().padStart(2, "0"));
21805
21804
  function toIMFDate(date) {
21806
21805
  if (typeof date === "number") {
21807
21806
  date = new Date(date);
@@ -23041,7 +23040,7 @@ var require_receiver = __commonJS({
23041
23040
  * @param {Buffer} chunk
23042
23041
  * @param {() => void} callback
23043
23042
  */
23044
- _write(chunk, _2, callback) {
23043
+ _write(chunk, _, callback) {
23045
23044
  this.#buffers.push(chunk);
23046
23045
  this.#byteOffset += chunk.length;
23047
23046
  this.#loop = true;
@@ -25637,7 +25636,7 @@ var require_onetime = __commonJS({
25637
25636
  });
25638
25637
 
25639
25638
  // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
25640
- var require_signals2 = __commonJS({
25639
+ var require_signals = __commonJS({
25641
25640
  "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
25642
25641
  module2.exports = [
25643
25642
  "SIGABRT",
@@ -25674,20 +25673,20 @@ var require_signals2 = __commonJS({
25674
25673
  });
25675
25674
 
25676
25675
  // ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
25677
- var require_signal_exit2 = __commonJS({
25676
+ var require_signal_exit = __commonJS({
25678
25677
  "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
25679
25678
  var process13 = global.process;
25680
- var processOk = function(process14) {
25679
+ var processOk2 = function(process14) {
25681
25680
  return process14 && typeof process14 === "object" && typeof process14.removeListener === "function" && typeof process14.emit === "function" && typeof process14.reallyExit === "function" && typeof process14.listeners === "function" && typeof process14.kill === "function" && typeof process14.pid === "number" && typeof process14.on === "function";
25682
25681
  };
25683
- if (!processOk(process13)) {
25682
+ if (!processOk2(process13)) {
25684
25683
  module2.exports = function() {
25685
25684
  return function() {
25686
25685
  };
25687
25686
  };
25688
25687
  } else {
25689
25688
  assert7 = require("assert");
25690
- signals = require_signals2();
25689
+ signals2 = require_signals();
25691
25690
  isWin = /^win/i.test(process13.platform);
25692
25691
  EE = require("events");
25693
25692
  if (typeof EE !== "function") {
@@ -25705,13 +25704,13 @@ var require_signal_exit2 = __commonJS({
25705
25704
  emitter.infinite = true;
25706
25705
  }
25707
25706
  module2.exports = function(cb, opts) {
25708
- if (!processOk(global.process)) {
25707
+ if (!processOk2(global.process)) {
25709
25708
  return function() {
25710
25709
  };
25711
25710
  }
25712
25711
  assert7.equal(typeof cb, "function", "a callback must be provided for exit handler");
25713
25712
  if (loaded === false) {
25714
- load();
25713
+ load2();
25715
25714
  }
25716
25715
  var ev = "exit";
25717
25716
  if (opts && opts.alwaysLast) {
@@ -25720,18 +25719,18 @@ var require_signal_exit2 = __commonJS({
25720
25719
  var remove = function() {
25721
25720
  emitter.removeListener(ev, cb);
25722
25721
  if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
25723
- unload();
25722
+ unload2();
25724
25723
  }
25725
25724
  };
25726
25725
  emitter.on(ev, cb);
25727
25726
  return remove;
25728
25727
  };
25729
- unload = function unload2() {
25730
- if (!loaded || !processOk(global.process)) {
25728
+ unload2 = function unload3() {
25729
+ if (!loaded || !processOk2(global.process)) {
25731
25730
  return;
25732
25731
  }
25733
25732
  loaded = false;
25734
- signals.forEach(function(sig) {
25733
+ signals2.forEach(function(sig) {
25735
25734
  try {
25736
25735
  process13.removeListener(sig, sigListeners[sig]);
25737
25736
  } catch (er) {
@@ -25741,7 +25740,7 @@ var require_signal_exit2 = __commonJS({
25741
25740
  process13.reallyExit = originalProcessReallyExit;
25742
25741
  emitter.count -= 1;
25743
25742
  };
25744
- module2.exports.unload = unload;
25743
+ module2.exports.unload = unload2;
25745
25744
  emit = function emit2(event, code, signal) {
25746
25745
  if (emitter.emitted[event]) {
25747
25746
  return;
@@ -25750,14 +25749,14 @@ var require_signal_exit2 = __commonJS({
25750
25749
  emitter.emit(event, code, signal);
25751
25750
  };
25752
25751
  sigListeners = {};
25753
- signals.forEach(function(sig) {
25752
+ signals2.forEach(function(sig) {
25754
25753
  sigListeners[sig] = function listener() {
25755
- if (!processOk(global.process)) {
25754
+ if (!processOk2(global.process)) {
25756
25755
  return;
25757
25756
  }
25758
25757
  var listeners = process13.listeners(sig);
25759
25758
  if (listeners.length === emitter.count) {
25760
- unload();
25759
+ unload2();
25761
25760
  emit("exit", null, sig);
25762
25761
  emit("afterexit", null, sig);
25763
25762
  if (isWin && sig === "SIGHUP") {
@@ -25768,16 +25767,16 @@ var require_signal_exit2 = __commonJS({
25768
25767
  };
25769
25768
  });
25770
25769
  module2.exports.signals = function() {
25771
- return signals;
25770
+ return signals2;
25772
25771
  };
25773
25772
  loaded = false;
25774
- load = function load2() {
25775
- if (loaded || !processOk(global.process)) {
25773
+ load2 = function load3() {
25774
+ if (loaded || !processOk2(global.process)) {
25776
25775
  return;
25777
25776
  }
25778
25777
  loaded = true;
25779
25778
  emitter.count += 1;
25780
- signals = signals.filter(function(sig) {
25779
+ signals2 = signals2.filter(function(sig) {
25781
25780
  try {
25782
25781
  process13.on(sig, sigListeners[sig]);
25783
25782
  return true;
@@ -25788,10 +25787,10 @@ var require_signal_exit2 = __commonJS({
25788
25787
  process13.emit = processEmit;
25789
25788
  process13.reallyExit = processReallyExit;
25790
25789
  };
25791
- module2.exports.load = load;
25790
+ module2.exports.load = load2;
25792
25791
  originalProcessReallyExit = process13.reallyExit;
25793
25792
  processReallyExit = function processReallyExit2(code) {
25794
- if (!processOk(global.process)) {
25793
+ if (!processOk2(global.process)) {
25795
25794
  return;
25796
25795
  }
25797
25796
  process13.exitCode = code || /* istanbul ignore next */
@@ -25802,7 +25801,7 @@ var require_signal_exit2 = __commonJS({
25802
25801
  };
25803
25802
  originalProcessEmit = process13.emit;
25804
25803
  processEmit = function processEmit2(ev, arg) {
25805
- if (ev === "exit" && processOk(global.process)) {
25804
+ if (ev === "exit" && processOk2(global.process)) {
25806
25805
  if (arg !== void 0) {
25807
25806
  process13.exitCode = arg;
25808
25807
  }
@@ -25816,15 +25815,15 @@ var require_signal_exit2 = __commonJS({
25816
25815
  };
25817
25816
  }
25818
25817
  var assert7;
25819
- var signals;
25818
+ var signals2;
25820
25819
  var isWin;
25821
25820
  var EE;
25822
25821
  var emitter;
25823
- var unload;
25822
+ var unload2;
25824
25823
  var emit;
25825
25824
  var sigListeners;
25826
25825
  var loaded;
25827
- var load;
25826
+ var load2;
25828
25827
  var originalProcessReallyExit;
25829
25828
  var processReallyExit;
25830
25829
  var originalProcessEmit;
@@ -25927,501 +25926,12 @@ var require_emoji_regex = __commonJS({
25927
25926
  }
25928
25927
  });
25929
25928
 
25930
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js
25931
- var require_XDGAppPaths2 = __commonJS({
25932
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
25933
- "use strict";
25934
- exports2.__esModule = true;
25935
- exports2.Adapt = void 0;
25936
- function isBoolean3(t2) {
25937
- return typeOf(t2) === "boolean";
25938
- }
25939
- function isObject(t2) {
25940
- return typeOf(t2) === "object";
25941
- }
25942
- function isString2(t2) {
25943
- return typeOf(t2) === "string";
25944
- }
25945
- function typeOf(t2) {
25946
- return typeof t2;
25947
- }
25948
- function Adapt(adapter_) {
25949
- var meta = adapter_.meta, path6 = adapter_.path, xdg = adapter_.xdg;
25950
- var XDGAppPaths_ = /* @__PURE__ */ (function() {
25951
- function XDGAppPaths_2(options_) {
25952
- if (options_ === void 0) {
25953
- options_ = {};
25954
- }
25955
- var _a2, _b2, _c2;
25956
- function XDGAppPaths(options2) {
25957
- if (options2 === void 0) {
25958
- options2 = {};
25959
- }
25960
- return new XDGAppPaths_2(options2);
25961
- }
25962
- var options = isObject(options_) ? options_ : { name: options_ };
25963
- var suffix = (_a2 = options.suffix) !== null && _a2 !== void 0 ? _a2 : "";
25964
- var isolated_ = (_b2 = options.isolated) !== null && _b2 !== void 0 ? _b2 : true;
25965
- var namePriorityList = [
25966
- options.name,
25967
- meta.pkgMainFilename(),
25968
- meta.mainFilename()
25969
- ];
25970
- var nameFallback = "$eval";
25971
- var name3 = path6.parse(((_c2 = namePriorityList.find(function(e) {
25972
- return isString2(e);
25973
- })) !== null && _c2 !== void 0 ? _c2 : nameFallback) + suffix).name;
25974
- XDGAppPaths.$name = function $name() {
25975
- return name3;
25976
- };
25977
- XDGAppPaths.$isolated = function $isolated() {
25978
- return isolated_;
25979
- };
25980
- function isIsolated(dirOptions) {
25981
- var _a3;
25982
- dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
25983
- var isolated = isBoolean3(dirOptions) ? dirOptions : (_a3 = dirOptions.isolated) !== null && _a3 !== void 0 ? _a3 : isolated_;
25984
- return isolated;
25985
- }
25986
- function finalPathSegment(dirOptions) {
25987
- return isIsolated(dirOptions) ? name3 : "";
25988
- }
25989
- XDGAppPaths.cache = function cache(dirOptions) {
25990
- return path6.join(xdg.cache(), finalPathSegment(dirOptions));
25991
- };
25992
- XDGAppPaths.config = function config49(dirOptions) {
25993
- return path6.join(xdg.config(), finalPathSegment(dirOptions));
25994
- };
25995
- XDGAppPaths.data = function data(dirOptions) {
25996
- return path6.join(xdg.data(), finalPathSegment(dirOptions));
25997
- };
25998
- XDGAppPaths.runtime = function runtime(dirOptions) {
25999
- return xdg.runtime() ? path6.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
26000
- };
26001
- XDGAppPaths.state = function state(dirOptions) {
26002
- return path6.join(xdg.state(), finalPathSegment(dirOptions));
26003
- };
26004
- XDGAppPaths.configDirs = function configDirs(dirOptions) {
26005
- return xdg.configDirs().map(function(s) {
26006
- return path6.join(s, finalPathSegment(dirOptions));
26007
- });
26008
- };
26009
- XDGAppPaths.dataDirs = function dataDirs(dirOptions) {
26010
- return xdg.dataDirs().map(function(s) {
26011
- return path6.join(s, finalPathSegment(dirOptions));
26012
- });
26013
- };
26014
- return XDGAppPaths;
26015
- }
26016
- return XDGAppPaths_2;
26017
- })();
26018
- return { XDGAppPaths: new XDGAppPaths_() };
26019
- }
26020
- exports2.Adapt = Adapt;
26021
- }
26022
- });
26023
-
26024
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js
26025
- var require_XDG2 = __commonJS({
26026
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports2) {
26027
- "use strict";
26028
- var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) {
26029
- for (var i = 0, il = from.length, j2 = to.length; i < il; i++, j2++)
26030
- to[j2] = from[i];
26031
- return to;
26032
- };
26033
- exports2.__esModule = true;
26034
- exports2.Adapt = void 0;
26035
- function Adapt(adapter_) {
26036
- var env3 = adapter_.env, osPaths = adapter_.osPaths, path6 = adapter_.path;
26037
- var isMacOS = /^darwin$/i.test(adapter_.process.platform);
26038
- var isWinOS = /^win/i.test(adapter_.process.platform);
26039
- function baseDir() {
26040
- return osPaths.home() || osPaths.temp();
26041
- }
26042
- function valOrPath(val, pathSegments) {
26043
- return val || path6.join.apply(path6, pathSegments);
26044
- }
26045
- var linux = function() {
26046
- var cache = function() {
26047
- return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
26048
- };
26049
- var config49 = function() {
26050
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
26051
- };
26052
- var data = function() {
26053
- return valOrPath(env3.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
26054
- };
26055
- var runtime = function() {
26056
- return env3.get("XDG_RUNTIME_DIR") || void 0;
26057
- };
26058
- var state = function() {
26059
- return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
26060
- };
26061
- return { cache, config: config49, data, runtime, state };
26062
- };
26063
- var macos = function() {
26064
- var cache = function() {
26065
- return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
26066
- };
26067
- var config49 = function() {
26068
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
26069
- };
26070
- var data = function() {
26071
- return valOrPath(env3.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
26072
- };
26073
- var runtime = function() {
26074
- return env3.get("XDG_RUNTIME_DIR") || void 0;
26075
- };
26076
- var state = function() {
26077
- return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
26078
- };
26079
- return { cache, config: config49, data, runtime, state };
26080
- };
26081
- var windows = function() {
26082
- function appData() {
26083
- return valOrPath(env3.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
26084
- }
26085
- function localAppData() {
26086
- return valOrPath(env3.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
26087
- }
26088
- var cache = function() {
26089
- return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
26090
- };
26091
- var config49 = function() {
26092
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
26093
- };
26094
- var data = function() {
26095
- return valOrPath(env3.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
26096
- };
26097
- var runtime = function() {
26098
- return env3.get("XDG_RUNTIME_DIR") || void 0;
26099
- };
26100
- var state = function() {
26101
- return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
26102
- };
26103
- return { cache, config: config49, data, runtime, state };
26104
- };
26105
- var XDG_ = /* @__PURE__ */ (function() {
26106
- function XDG_2() {
26107
- function XDG() {
26108
- return new XDG_2();
26109
- }
26110
- var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
26111
- XDG.cache = extension.cache;
26112
- XDG.config = extension.config;
26113
- XDG.data = extension.data;
26114
- XDG.runtime = extension.runtime;
26115
- XDG.state = extension.state;
26116
- XDG.configDirs = function configDirs() {
26117
- var pathList = env3.get("XDG_CONFIG_DIRS");
26118
- return __spreadArray2([extension.config()], pathList ? pathList.split(path6.delimiter) : []);
26119
- };
26120
- XDG.dataDirs = function dataDirs() {
26121
- var pathList = env3.get("XDG_DATA_DIRS");
26122
- return __spreadArray2([extension.data()], pathList ? pathList.split(path6.delimiter) : []);
26123
- };
26124
- return XDG;
26125
- }
26126
- return XDG_2;
26127
- })();
26128
- return { XDG: new XDG_() };
26129
- }
26130
- exports2.Adapt = Adapt;
26131
- }
26132
- });
26133
-
26134
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js
26135
- var require_OSPaths2 = __commonJS({
26136
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports2) {
26137
- "use strict";
26138
- var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) {
26139
- for (var i = 0, il = from.length, j2 = to.length; i < il; i++, j2++)
26140
- to[j2] = from[i];
26141
- return to;
26142
- };
26143
- exports2.__esModule = true;
26144
- exports2.Adapt = void 0;
26145
- function isEmpty(s) {
26146
- return !s;
26147
- }
26148
- function Adapt(adapter_) {
26149
- var env3 = adapter_.env, os6 = adapter_.os, path6 = adapter_.path;
26150
- var isWinOS = /^win/i.test(adapter_.process.platform);
26151
- function normalizePath(path_) {
26152
- return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
26153
- }
26154
- function home() {
26155
- var posix = function() {
26156
- return normalizePath((typeof os6.homedir === "function" ? os6.homedir() : void 0) || env3.get("HOME"));
26157
- };
26158
- var windows = function() {
26159
- var priorityList = [
26160
- typeof os6.homedir === "function" ? os6.homedir() : void 0,
26161
- env3.get("USERPROFILE"),
26162
- env3.get("HOME"),
26163
- env3.get("HOMEDRIVE") || env3.get("HOMEPATH") ? path6.join(env3.get("HOMEDRIVE") || "", env3.get("HOMEPATH") || "") : void 0
26164
- ];
26165
- return normalizePath(priorityList.find(function(v) {
26166
- return !isEmpty(v);
26167
- }));
26168
- };
26169
- return isWinOS ? windows() : posix();
26170
- }
26171
- function temp() {
26172
- function joinPathToBase(base, segments) {
26173
- return base ? path6.join.apply(path6, __spreadArray2([base], segments)) : void 0;
26174
- }
26175
- function posix() {
26176
- var fallback = "/tmp";
26177
- var priorityList = [
26178
- typeof os6.tmpdir === "function" ? os6.tmpdir() : void 0,
26179
- env3.get("TMPDIR"),
26180
- env3.get("TEMP"),
26181
- env3.get("TMP")
26182
- ];
26183
- return normalizePath(priorityList.find(function(v) {
26184
- return !isEmpty(v);
26185
- })) || fallback;
26186
- }
26187
- function windows() {
26188
- var fallback = "C:\\Temp";
26189
- var priorityListLazy = [
26190
- typeof os6.tmpdir === "function" ? os6.tmpdir : function() {
26191
- return void 0;
26192
- },
26193
- function() {
26194
- return env3.get("TEMP");
26195
- },
26196
- function() {
26197
- return env3.get("TMP");
26198
- },
26199
- function() {
26200
- return joinPathToBase(env3.get("LOCALAPPDATA"), ["Temp"]);
26201
- },
26202
- function() {
26203
- return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
26204
- },
26205
- function() {
26206
- return joinPathToBase(env3.get("ALLUSERSPROFILE"), ["Temp"]);
26207
- },
26208
- function() {
26209
- return joinPathToBase(env3.get("SystemRoot"), ["Temp"]);
26210
- },
26211
- function() {
26212
- return joinPathToBase(env3.get("windir"), ["Temp"]);
26213
- },
26214
- function() {
26215
- return joinPathToBase(env3.get("SystemDrive"), ["\\", "Temp"]);
26216
- }
26217
- ];
26218
- var v = priorityListLazy.find(function(v2) {
26219
- return v2 && !isEmpty(v2());
26220
- });
26221
- return v && normalizePath(v()) || fallback;
26222
- }
26223
- return isWinOS ? windows() : posix();
26224
- }
26225
- var OSPaths_ = /* @__PURE__ */ (function() {
26226
- function OSPaths_2() {
26227
- function OSPaths() {
26228
- return new OSPaths_2();
26229
- }
26230
- OSPaths.home = home;
26231
- OSPaths.temp = temp;
26232
- return OSPaths;
26233
- }
26234
- return OSPaths_2;
26235
- })();
26236
- return { OSPaths: new OSPaths_() };
26237
- }
26238
- exports2.Adapt = Adapt;
26239
- }
26240
- });
26241
-
26242
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js
26243
- var require_node4 = __commonJS({
26244
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports2) {
26245
- "use strict";
26246
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26247
- if (k2 === void 0) k2 = k;
26248
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
26249
- return m[k];
26250
- } });
26251
- }) : (function(o, m, k, k2) {
26252
- if (k2 === void 0) k2 = k;
26253
- o[k2] = m[k];
26254
- }));
26255
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26256
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26257
- }) : function(o, v) {
26258
- o["default"] = v;
26259
- });
26260
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26261
- if (mod && mod.__esModule) return mod;
26262
- var result = {};
26263
- if (mod != null) {
26264
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26265
- }
26266
- __setModuleDefault2(result, mod);
26267
- return result;
26268
- };
26269
- exports2.__esModule = true;
26270
- exports2.adapter = void 0;
26271
- var os6 = __importStar2(require("os"));
26272
- var path6 = __importStar2(require("path"));
26273
- exports2.adapter = {
26274
- atImportPermissions: { env: true },
26275
- env: {
26276
- get: function(s) {
26277
- return process.env[s];
26278
- }
26279
- },
26280
- os: os6,
26281
- path: path6,
26282
- process
26283
- };
26284
- }
26285
- });
26286
-
26287
- // ../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js
26288
- var require_mod_cjs4 = __commonJS({
26289
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
26290
- "use strict";
26291
- var OSPaths_js_1 = require_OSPaths2();
26292
- var node_js_1 = require_node4();
26293
- module2.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
26294
- }
26295
- });
26296
-
26297
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
26298
- var require_node5 = __commonJS({
26299
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
26300
- "use strict";
26301
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26302
- if (k2 === void 0) k2 = k;
26303
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
26304
- return m[k];
26305
- } });
26306
- }) : (function(o, m, k, k2) {
26307
- if (k2 === void 0) k2 = k;
26308
- o[k2] = m[k];
26309
- }));
26310
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26311
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26312
- }) : function(o, v) {
26313
- o["default"] = v;
26314
- });
26315
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26316
- if (mod && mod.__esModule) return mod;
26317
- var result = {};
26318
- if (mod != null) {
26319
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26320
- }
26321
- __setModuleDefault2(result, mod);
26322
- return result;
26323
- };
26324
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26325
- return mod && mod.__esModule ? mod : { "default": mod };
26326
- };
26327
- exports2.__esModule = true;
26328
- exports2.adapter = void 0;
26329
- var path6 = __importStar2(require("path"));
26330
- var os_paths_1 = __importDefault2(require_mod_cjs4());
26331
- exports2.adapter = {
26332
- atImportPermissions: { env: true },
26333
- env: {
26334
- get: function(s) {
26335
- return process.env[s];
26336
- }
26337
- },
26338
- osPaths: os_paths_1["default"],
26339
- path: path6,
26340
- process
26341
- };
26342
- }
26343
- });
26344
-
26345
- // ../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js
26346
- var require_mod_cjs5 = __commonJS({
26347
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports2, module2) {
26348
- "use strict";
26349
- var XDG_js_1 = require_XDG2();
26350
- var node_js_1 = require_node5();
26351
- module2.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
26352
- }
26353
- });
26354
-
26355
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
26356
- var require_node6 = __commonJS({
26357
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
26358
- "use strict";
26359
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) {
26360
- if (k2 === void 0) k2 = k;
26361
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
26362
- return m[k];
26363
- } });
26364
- }) : (function(o, m, k, k2) {
26365
- if (k2 === void 0) k2 = k;
26366
- o[k2] = m[k];
26367
- }));
26368
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) {
26369
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26370
- }) : function(o, v) {
26371
- o["default"] = v;
26372
- });
26373
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
26374
- if (mod && mod.__esModule) return mod;
26375
- var result = {};
26376
- if (mod != null) {
26377
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
26378
- }
26379
- __setModuleDefault2(result, mod);
26380
- return result;
26381
- };
26382
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
26383
- return mod && mod.__esModule ? mod : { "default": mod };
26384
- };
26385
- exports2.__esModule = true;
26386
- exports2.adapter = void 0;
26387
- var path6 = __importStar2(require("path"));
26388
- var xdg_portable_1 = __importDefault2(require_mod_cjs5());
26389
- exports2.adapter = {
26390
- atImportPermissions: { env: true, read: true },
26391
- meta: {
26392
- mainFilename: function() {
26393
- var requireMain = typeof require !== "undefined" && require !== null && require.main ? require.main : { filename: void 0 };
26394
- var requireMainFilename = requireMain.filename;
26395
- var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
26396
- return filename;
26397
- },
26398
- pkgMainFilename: function() {
26399
- return process.pkg ? process.execPath : void 0;
26400
- }
26401
- },
26402
- path: path6,
26403
- process,
26404
- xdg: xdg_portable_1["default"]
26405
- };
26406
- }
26407
- });
26408
-
26409
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
26410
- var require_mod_cjs6 = __commonJS({
26411
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
26412
- "use strict";
26413
- var XDGAppPaths_js_1 = require_XDGAppPaths2();
26414
- var node_js_1 = require_node6();
26415
- module2.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
26416
- }
26417
- });
26418
-
26419
25929
  // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
26420
25930
  var require_windows = __commonJS({
26421
25931
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports2, module2) {
26422
25932
  module2.exports = isexe;
26423
25933
  isexe.sync = sync;
26424
- var fs10 = require("fs");
25934
+ var fs9 = require("fs");
26425
25935
  function checkPathExt(path6, options) {
26426
25936
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
26427
25937
  if (!pathext) {
@@ -26446,12 +25956,12 @@ var require_windows = __commonJS({
26446
25956
  return checkPathExt(path6, options);
26447
25957
  }
26448
25958
  function isexe(path6, options, cb) {
26449
- fs10.stat(path6, function(er, stat) {
25959
+ fs9.stat(path6, function(er, stat) {
26450
25960
  cb(er, er ? false : checkStat(stat, path6, options));
26451
25961
  });
26452
25962
  }
26453
25963
  function sync(path6, options) {
26454
- return checkStat(fs10.statSync(path6), path6, options);
25964
+ return checkStat(fs9.statSync(path6), path6, options);
26455
25965
  }
26456
25966
  }
26457
25967
  });
@@ -26461,14 +25971,14 @@ var require_mode = __commonJS({
26461
25971
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports2, module2) {
26462
25972
  module2.exports = isexe;
26463
25973
  isexe.sync = sync;
26464
- var fs10 = require("fs");
25974
+ var fs9 = require("fs");
26465
25975
  function isexe(path6, options, cb) {
26466
- fs10.stat(path6, function(er, stat) {
25976
+ fs9.stat(path6, function(er, stat) {
26467
25977
  cb(er, er ? false : checkStat(stat, options));
26468
25978
  });
26469
25979
  }
26470
25980
  function sync(path6, options) {
26471
- return checkStat(fs10.statSync(path6), options);
25981
+ return checkStat(fs9.statSync(path6), options);
26472
25982
  }
26473
25983
  function checkStat(stat, options) {
26474
25984
  return stat.isFile() && checkMode(stat, options);
@@ -26492,7 +26002,7 @@ var require_mode = __commonJS({
26492
26002
  // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
26493
26003
  var require_isexe = __commonJS({
26494
26004
  "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports2, module2) {
26495
- var fs10 = require("fs");
26005
+ var fs9 = require("fs");
26496
26006
  var core;
26497
26007
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
26498
26008
  core = require_windows();
@@ -26547,22 +26057,22 @@ var require_isexe = __commonJS({
26547
26057
  // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
26548
26058
  var require_which = __commonJS({
26549
26059
  "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module2) {
26550
- var isWindows2 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
26060
+ var isWindows3 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
26551
26061
  var path6 = require("path");
26552
- var COLON = isWindows2 ? ";" : ":";
26062
+ var COLON = isWindows3 ? ";" : ":";
26553
26063
  var isexe = require_isexe();
26554
26064
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
26555
26065
  var getPathInfo = (cmd, opt) => {
26556
26066
  const colon = opt.colon || COLON;
26557
- const pathEnv = cmd.match(/\//) || isWindows2 && cmd.match(/\\/) ? [""] : [
26067
+ const pathEnv = cmd.match(/\//) || isWindows3 && cmd.match(/\\/) ? [""] : [
26558
26068
  // windows always checks the cwd first
26559
- ...isWindows2 ? [process.cwd()] : [],
26069
+ ...isWindows3 ? [process.cwd()] : [],
26560
26070
  ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
26561
26071
  "").split(colon)
26562
26072
  ];
26563
- const pathExtExe = isWindows2 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
26564
- const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
26565
- if (isWindows2) {
26073
+ const pathExtExe = isWindows3 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
26074
+ const pathExt = isWindows3 ? pathExtExe.split(colon) : [""];
26075
+ if (isWindows3) {
26566
26076
  if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
26567
26077
  pathExt.unshift("");
26568
26078
  }
@@ -26756,16 +26266,16 @@ var require_shebang_command = __commonJS({
26756
26266
  var require_readShebang = __commonJS({
26757
26267
  "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
26758
26268
  "use strict";
26759
- var fs10 = require("fs");
26269
+ var fs9 = require("fs");
26760
26270
  var shebangCommand = require_shebang_command();
26761
26271
  function readShebang(command2) {
26762
26272
  const size = 150;
26763
26273
  const buffer = Buffer.alloc(size);
26764
26274
  let fd;
26765
26275
  try {
26766
- fd = fs10.openSync(command2, "r");
26767
- fs10.readSync(fd, buffer, 0, size, 0);
26768
- fs10.closeSync(fd);
26276
+ fd = fs9.openSync(command2, "r");
26277
+ fs9.readSync(fd, buffer, 0, size, 0);
26278
+ fs9.closeSync(fd);
26769
26279
  } catch (e) {
26770
26280
  }
26771
26281
  return shebangCommand(buffer.toString());
@@ -27922,8 +27432,8 @@ var require_range = __commonJS({
27922
27432
  };
27923
27433
  var replaceTilde = (comp, options) => {
27924
27434
  const r = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
27925
- return comp.replace(r, (_2, M2, m, p2, pr) => {
27926
- debug("tilde", comp, _2, M2, m, p2, pr);
27435
+ return comp.replace(r, (_, M2, m, p2, pr) => {
27436
+ debug("tilde", comp, _, M2, m, p2, pr);
27927
27437
  let ret;
27928
27438
  if (isX(M2)) {
27929
27439
  ret = "";
@@ -27948,8 +27458,8 @@ var require_range = __commonJS({
27948
27458
  debug("caret", comp, options);
27949
27459
  const r = options.loose ? re[t2.CARETLOOSE] : re[t2.CARET];
27950
27460
  const z2 = options.includePrerelease ? "-0" : "";
27951
- return comp.replace(r, (_2, M2, m, p2, pr) => {
27952
- debug("caret", comp, _2, M2, m, p2, pr);
27461
+ return comp.replace(r, (_, M2, m, p2, pr) => {
27462
+ debug("caret", comp, _, M2, m, p2, pr);
27953
27463
  let ret;
27954
27464
  if (isX(M2)) {
27955
27465
  ret = "";
@@ -28847,7 +28357,7 @@ var require_cjs = __commonJS({
28847
28357
  function propertyIsOnObject(object, property) {
28848
28358
  try {
28849
28359
  return property in object;
28850
- } catch (_2) {
28360
+ } catch (_) {
28851
28361
  return false;
28852
28362
  }
28853
28363
  }
@@ -28916,7 +28426,7 @@ var require_index_688c5d50 = __commonJS({
28916
28426
  var realZlib = require("zlib");
28917
28427
  var util$1 = require("util");
28918
28428
  var crypto = require("crypto");
28919
- var os6 = require("os");
28429
+ var os5 = require("os");
28920
28430
  var tty2 = require("tty");
28921
28431
  var constants$1 = require("constants");
28922
28432
  var https = require("https");
@@ -28937,7 +28447,7 @@ var require_index_688c5d50 = __commonJS({
28937
28447
  var realZlib__default = /* @__PURE__ */ _interopDefaultLegacy(realZlib);
28938
28448
  var util__default = /* @__PURE__ */ _interopDefaultLegacy(util$1);
28939
28449
  var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
28940
- var os__default = /* @__PURE__ */ _interopDefaultLegacy(os6);
28450
+ var os__default = /* @__PURE__ */ _interopDefaultLegacy(os5);
28941
28451
  var tty__default = /* @__PURE__ */ _interopDefaultLegacy(tty2);
28942
28452
  var constants__default = /* @__PURE__ */ _interopDefaultLegacy(constants$1);
28943
28453
  var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
@@ -29582,7 +29092,7 @@ var require_index_688c5d50 = __commonJS({
29582
29092
  opts.end = false;
29583
29093
  else
29584
29094
  opts.end = opts.end !== false;
29585
- const p2 = { dest, opts, ondrain: (_2) => this[RESUME]() };
29095
+ const p2 = { dest, opts, ondrain: (_) => this[RESUME]() };
29586
29096
  this.pipes.push(p2);
29587
29097
  dest.on("drain", p2.ondrain);
29588
29098
  this[RESUME]();
@@ -30200,9 +29710,9 @@ var require_index_688c5d50 = __commonJS({
30200
29710
  return super.write(data);
30201
29711
  return super.write(data.slice(0, r));
30202
29712
  }
30203
- [SLURP$1](ex, global2) {
29713
+ [SLURP$1](ex, global3) {
30204
29714
  for (const k in ex) {
30205
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
29715
+ if (ex[k] !== null && ex[k] !== void 0 && !(global3 && k === "path"))
30206
29716
  this[k] = ex[k];
30207
29717
  }
30208
29718
  }
@@ -30403,9 +29913,9 @@ var require_index_688c5d50 = __commonJS({
30403
29913
  if (this.cksum === null && sum === 8 * 32)
30404
29914
  this.nullBlock = true;
30405
29915
  }
30406
- [SLURP](ex, global2) {
29916
+ [SLURP](ex, global3) {
30407
29917
  for (const k in ex) {
30408
- if (ex[k] !== null && ex[k] !== void 0 && !(global2 && k === "path"))
29918
+ if (ex[k] !== null && ex[k] !== void 0 && !(global3 && k === "path"))
30409
29919
  this[k] = ex[k];
30410
29920
  }
30411
29921
  }
@@ -30521,7 +30031,7 @@ var require_index_688c5d50 = __commonJS({
30521
30031
  var encString = (buf, off, size, string) => string === null ? false : (buf.write(string + NULLS, off, size, "utf8"), string.length !== Buffer.byteLength(string) || string.length > size);
30522
30032
  var header = Header;
30523
30033
  var Pax = class {
30524
- constructor(obj, global2) {
30034
+ constructor(obj, global3) {
30525
30035
  this.atime = obj.atime || null;
30526
30036
  this.charset = obj.charset || null;
30527
30037
  this.comment = obj.comment || null;
@@ -30537,7 +30047,7 @@ var require_index_688c5d50 = __commonJS({
30537
30047
  this.dev = obj.dev || null;
30538
30048
  this.ino = obj.ino || null;
30539
30049
  this.nlink = obj.nlink || null;
30540
- this.global = global2 || false;
30050
+ this.global = global3 || false;
30541
30051
  }
30542
30052
  encode() {
30543
30053
  const body = this.encodeBody();
@@ -31076,16 +30586,16 @@ var require_index_688c5d50 = __commonJS({
31076
30586
  opt.gzip.portable = true;
31077
30587
  this.zip = new minizlib.Gzip(opt.gzip);
31078
30588
  this.zip.on("data", (chunk) => super.write(chunk));
31079
- this.zip.on("end", (_2) => super.end());
31080
- this.zip.on("drain", (_2) => this[ONDRAIN]());
31081
- this.on("resume", (_2) => this.zip.resume());
30589
+ this.zip.on("end", (_) => super.end());
30590
+ this.zip.on("drain", (_) => this[ONDRAIN]());
30591
+ this.on("resume", (_) => this.zip.resume());
31082
30592
  } else
31083
30593
  this.on("drain", this[ONDRAIN]);
31084
30594
  this.noDirRecurse = !!opt.noDirRecurse;
31085
30595
  this.follow = !!opt.follow;
31086
30596
  this.noMtime = !!opt.noMtime;
31087
30597
  this.mtime = opt.mtime || null;
31088
- this.filter = typeof opt.filter === "function" ? opt.filter : (_2) => true;
30598
+ this.filter = typeof opt.filter === "function" ? opt.filter : (_) => true;
31089
30599
  this[QUEUE$1] = new yallist();
31090
30600
  this[JOBS] = 0;
31091
30601
  this.jobs = +opt.jobs || 4;
@@ -31124,7 +30634,7 @@ var require_index_688c5d50 = __commonJS({
31124
30634
  else {
31125
30635
  const job = new PackJob(p2.path, absolute2, false);
31126
30636
  job.entry = new WriteEntryTar(p2, this[ENTRYOPT](job));
31127
- job.entry.on("end", (_2) => this[JOBDONE](job));
30637
+ job.entry.on("end", (_) => this[JOBDONE](job));
31128
30638
  this[JOBS] += 1;
31129
30639
  this[QUEUE$1].push(job);
31130
30640
  }
@@ -31693,7 +31203,7 @@ var require_index_688c5d50 = __commonJS({
31693
31203
  if (threw)
31694
31204
  try {
31695
31205
  this[_close]();
31696
- } catch (_2) {
31206
+ } catch (_) {
31697
31207
  }
31698
31208
  }
31699
31209
  }
@@ -31739,14 +31249,14 @@ var require_index_688c5d50 = __commonJS({
31739
31249
  var SAW_VALID_ENTRY = /* @__PURE__ */ Symbol("sawValidEntry");
31740
31250
  var SAW_NULL_BLOCK = /* @__PURE__ */ Symbol("sawNullBlock");
31741
31251
  var SAW_EOF = /* @__PURE__ */ Symbol("sawEOF");
31742
- var noop = (_2) => true;
31252
+ var noop = (_) => true;
31743
31253
  var parse$4 = warnMixin(class Parser extends Events__default["default"] {
31744
31254
  constructor(opt) {
31745
31255
  opt = opt || {};
31746
31256
  super(opt);
31747
31257
  this.file = opt.file || "";
31748
31258
  this[SAW_VALID_ENTRY] = null;
31749
- this.on(DONE, (_2) => {
31259
+ this.on(DONE, (_) => {
31750
31260
  if (this[STATE] === "begin" || this[SAW_VALID_ENTRY] === false) {
31751
31261
  this.warn("TAR_BAD_ARCHIVE", "Unrecognized archive format");
31752
31262
  }
@@ -31754,7 +31264,7 @@ var require_index_688c5d50 = __commonJS({
31754
31264
  if (opt.ondone)
31755
31265
  this.on(DONE, opt.ondone);
31756
31266
  else {
31757
- this.on(DONE, (_2) => {
31267
+ this.on(DONE, (_) => {
31758
31268
  this.emit("prefinish");
31759
31269
  this.emit("finish");
31760
31270
  this.emit("end");
@@ -31874,7 +31384,7 @@ var require_index_688c5d50 = __commonJS({
31874
31384
  this[READENTRY] = entry;
31875
31385
  this.emit("entry", entry);
31876
31386
  if (!entry.emittedEnd) {
31877
- entry.on("end", (_2) => this[NEXTENTRY]());
31387
+ entry.on("end", (_) => this[NEXTENTRY]());
31878
31388
  go = false;
31879
31389
  }
31880
31390
  }
@@ -31890,7 +31400,7 @@ var require_index_688c5d50 = __commonJS({
31890
31400
  if (!this[WRITING])
31891
31401
  this.emit("drain");
31892
31402
  } else
31893
- re.once("drain", (_2) => this.emit("drain"));
31403
+ re.once("drain", (_) => this.emit("drain"));
31894
31404
  }
31895
31405
  }
31896
31406
  [CONSUMEBODY](chunk, position) {
@@ -31969,7 +31479,7 @@ var require_index_688c5d50 = __commonJS({
31969
31479
  this[UNZIP] = new minizlib.Unzip();
31970
31480
  this[UNZIP].on("data", (chunk2) => this[CONSUMECHUNK](chunk2));
31971
31481
  this[UNZIP].on("error", (er) => this.abort(er));
31972
- this[UNZIP].on("end", (_2) => {
31482
+ this[UNZIP].on("end", (_) => {
31973
31483
  this[ENDED$1] = true;
31974
31484
  this[CONSUMECHUNK]();
31975
31485
  });
@@ -31987,7 +31497,7 @@ var require_index_688c5d50 = __commonJS({
31987
31497
  this[WRITING] = false;
31988
31498
  const ret = this[QUEUE].length ? false : this[READENTRY] ? this[READENTRY].flowing : true;
31989
31499
  if (!ret && !this[QUEUE].length)
31990
- this[READENTRY].once("drain", (_2) => this.emit("drain"));
31500
+ this[READENTRY].once("drain", (_) => this.emit("drain"));
31991
31501
  return ret;
31992
31502
  }
31993
31503
  [BUFFERCONCAT](c2) {
@@ -32225,7 +31735,7 @@ var require_index_688c5d50 = __commonJS({
32225
31735
  file: path__default["default"].resolve(p2.cwd, file2.substr(1)),
32226
31736
  noResume: true,
32227
31737
  onentry: (entry) => p2.add(entry)
32228
- }).then((_2) => addFilesAsync$1(p2, files));
31738
+ }).then((_) => addFilesAsync$1(p2, files));
32229
31739
  } else
32230
31740
  p2.add(file2);
32231
31741
  }
@@ -32317,7 +31827,7 @@ var require_index_688c5d50 = __commonJS({
32317
31827
  const getPos = (fd, size, cb_) => {
32318
31828
  const cb2 = (er, pos2) => {
32319
31829
  if (er)
32320
- fs__default["default"].close(fd, (_2) => cb_(er));
31830
+ fs__default["default"].close(fd, (_) => cb_(er));
32321
31831
  else
32322
31832
  cb_(null, pos2);
32323
31833
  };
@@ -32413,7 +31923,7 @@ var require_index_688c5d50 = __commonJS({
32413
31923
  file: path__default["default"].resolve(p2.cwd, file2.substr(1)),
32414
31924
  noResume: true,
32415
31925
  onentry: (entry) => p2.add(entry)
32416
- }).then((_2) => addFilesAsync(p2, files));
31926
+ }).then((_) => addFilesAsync(p2, files));
32417
31927
  } else
32418
31928
  p2.add(file2);
32419
31929
  }
@@ -32553,7 +32063,7 @@ var require_index_688c5d50 = __commonJS({
32553
32063
  try {
32554
32064
  if (!opts.statSync(path7).isDirectory())
32555
32065
  throw er;
32556
- } catch (_2) {
32066
+ } catch (_) {
32557
32067
  throw er;
32558
32068
  }
32559
32069
  }
@@ -32640,7 +32150,7 @@ var require_index_688c5d50 = __commonJS({
32640
32150
  cb(er);
32641
32151
  else
32642
32152
  fs__default["default"].chown(path7, uid, gid, cb);
32643
- } : (_2, __, ___, cb) => cb;
32153
+ } : (_, __, ___, cb) => cb;
32644
32154
  var handleEISDirSync = needEISDIRHandled ? (path7, uid, gid) => {
32645
32155
  try {
32646
32156
  return lchownSync(path7, uid, gid);
@@ -32983,8 +32493,8 @@ var require_index_688c5d50 = __commonJS({
32983
32493
  };
32984
32494
  var platform$1 = process.env.__FAKE_PLATFORM__ || process.platform;
32985
32495
  var isWindows$2 = platform$1 === "win32";
32986
- var fs10 = commonjsGlobal.__FAKE_TESTING_FS__ || fs__default["default"];
32987
- var { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs10.constants;
32496
+ var fs9 = commonjsGlobal.__FAKE_TESTING_FS__ || fs__default["default"];
32497
+ var { O_CREAT, O_TRUNC, O_WRONLY, UV_FS_O_FILEMAP = 0 } = fs9.constants;
32988
32498
  var fMapEnabled = isWindows$2 && !!UV_FS_O_FILEMAP;
32989
32499
  var fMapLimit = 512 * 1024;
32990
32500
  var fMapFlag = UV_FS_O_FILEMAP | O_TRUNC | O_CREAT | O_WRONLY;
@@ -33037,7 +32547,7 @@ var require_index_688c5d50 = __commonJS({
33037
32547
  constructor(opt) {
33038
32548
  if (!opt)
33039
32549
  opt = {};
33040
- opt.ondone = (_2) => {
32550
+ opt.ondone = (_) => {
33041
32551
  this[ENDED] = true;
33042
32552
  this[MAYBECLOSE]();
33043
32553
  };
@@ -33217,7 +32727,7 @@ var require_index_688c5d50 = __commonJS({
33217
32727
  });
33218
32728
  }
33219
32729
  };
33220
- stream.on("finish", (_2) => {
32730
+ stream.on("finish", (_) => {
33221
32731
  const abs = entry.absolute;
33222
32732
  const fd = stream.fd;
33223
32733
  if (entry.mtime && !this.noMtime) {
@@ -33249,7 +32759,7 @@ var require_index_688c5d50 = __commonJS({
33249
32759
  return this[ONERROR](er, entry);
33250
32760
  }
33251
32761
  let actions = 1;
33252
- const done = (_2) => {
32762
+ const done = (_) => {
33253
32763
  if (--actions === 0) {
33254
32764
  fullyDone();
33255
32765
  this[UNPEND]();
@@ -33394,7 +32904,7 @@ var require_index_688c5d50 = __commonJS({
33394
32904
  return this[MAKEFS](null, entry, neverCalled);
33395
32905
  }
33396
32906
  }
33397
- [FILE](entry, _2) {
32907
+ [FILE](entry, _) {
33398
32908
  const mode = entry.mode & 4095 || this.fmode;
33399
32909
  const oner = (er) => {
33400
32910
  let closeError;
@@ -33424,7 +32934,7 @@ var require_index_688c5d50 = __commonJS({
33424
32934
  oner(er);
33425
32935
  }
33426
32936
  });
33427
- tx.on("end", (_3) => {
32937
+ tx.on("end", (_2) => {
33428
32938
  let er = null;
33429
32939
  if (entry.mtime && !this.noMtime) {
33430
32940
  const atime = entry.atime || /* @__PURE__ */ new Date();
@@ -33455,7 +32965,7 @@ var require_index_688c5d50 = __commonJS({
33455
32965
  oner(er);
33456
32966
  });
33457
32967
  }
33458
- [DIRECTORY](entry, _2) {
32968
+ [DIRECTORY](entry, _) {
33459
32969
  const mode = entry.mode & 4095 || this.dmode;
33460
32970
  const er = this[MKDIR](entry.absolute, mode);
33461
32971
  if (er)
@@ -33492,7 +33002,7 @@ var require_index_688c5d50 = __commonJS({
33492
33002
  return er;
33493
33003
  }
33494
33004
  }
33495
- [LINK](entry, linkpath, link2, _2) {
33005
+ [LINK](entry, linkpath, link2, _) {
33496
33006
  try {
33497
33007
  fs__default["default"][link2 + "Sync"](linkpath, entry.absolute);
33498
33008
  entry.resume();
@@ -35089,54 +34599,54 @@ var require_index_688c5d50 = __commonJS({
35089
34599
  chdir2.call(process, d3);
35090
34600
  };
35091
34601
  var polyfills = patch;
35092
- function patch(fs11) {
34602
+ function patch(fs10) {
35093
34603
  if (constants__default["default"].hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
35094
- patchLchmod(fs11);
35095
- }
35096
- if (!fs11.lutimes) {
35097
- patchLutimes(fs11);
35098
- }
35099
- fs11.chown = chownFix(fs11.chown);
35100
- fs11.fchown = chownFix(fs11.fchown);
35101
- fs11.lchown = chownFix(fs11.lchown);
35102
- fs11.chmod = chmodFix(fs11.chmod);
35103
- fs11.fchmod = chmodFix(fs11.fchmod);
35104
- fs11.lchmod = chmodFix(fs11.lchmod);
35105
- fs11.chownSync = chownFixSync(fs11.chownSync);
35106
- fs11.fchownSync = chownFixSync(fs11.fchownSync);
35107
- fs11.lchownSync = chownFixSync(fs11.lchownSync);
35108
- fs11.chmodSync = chmodFixSync(fs11.chmodSync);
35109
- fs11.fchmodSync = chmodFixSync(fs11.fchmodSync);
35110
- fs11.lchmodSync = chmodFixSync(fs11.lchmodSync);
35111
- fs11.stat = statFix(fs11.stat);
35112
- fs11.fstat = statFix(fs11.fstat);
35113
- fs11.lstat = statFix(fs11.lstat);
35114
- fs11.statSync = statFixSync(fs11.statSync);
35115
- fs11.fstatSync = statFixSync(fs11.fstatSync);
35116
- fs11.lstatSync = statFixSync(fs11.lstatSync);
35117
- if (!fs11.lchmod) {
35118
- fs11.lchmod = function(path7, mode, cb) {
34604
+ patchLchmod(fs10);
34605
+ }
34606
+ if (!fs10.lutimes) {
34607
+ patchLutimes(fs10);
34608
+ }
34609
+ fs10.chown = chownFix(fs10.chown);
34610
+ fs10.fchown = chownFix(fs10.fchown);
34611
+ fs10.lchown = chownFix(fs10.lchown);
34612
+ fs10.chmod = chmodFix(fs10.chmod);
34613
+ fs10.fchmod = chmodFix(fs10.fchmod);
34614
+ fs10.lchmod = chmodFix(fs10.lchmod);
34615
+ fs10.chownSync = chownFixSync(fs10.chownSync);
34616
+ fs10.fchownSync = chownFixSync(fs10.fchownSync);
34617
+ fs10.lchownSync = chownFixSync(fs10.lchownSync);
34618
+ fs10.chmodSync = chmodFixSync(fs10.chmodSync);
34619
+ fs10.fchmodSync = chmodFixSync(fs10.fchmodSync);
34620
+ fs10.lchmodSync = chmodFixSync(fs10.lchmodSync);
34621
+ fs10.stat = statFix(fs10.stat);
34622
+ fs10.fstat = statFix(fs10.fstat);
34623
+ fs10.lstat = statFix(fs10.lstat);
34624
+ fs10.statSync = statFixSync(fs10.statSync);
34625
+ fs10.fstatSync = statFixSync(fs10.fstatSync);
34626
+ fs10.lstatSync = statFixSync(fs10.lstatSync);
34627
+ if (!fs10.lchmod) {
34628
+ fs10.lchmod = function(path7, mode, cb) {
35119
34629
  if (cb) process.nextTick(cb);
35120
34630
  };
35121
- fs11.lchmodSync = function() {
34631
+ fs10.lchmodSync = function() {
35122
34632
  };
35123
34633
  }
35124
- if (!fs11.lchown) {
35125
- fs11.lchown = function(path7, uid, gid, cb) {
34634
+ if (!fs10.lchown) {
34635
+ fs10.lchown = function(path7, uid, gid, cb) {
35126
34636
  if (cb) process.nextTick(cb);
35127
34637
  };
35128
- fs11.lchownSync = function() {
34638
+ fs10.lchownSync = function() {
35129
34639
  };
35130
34640
  }
35131
34641
  if (platform2 === "win32") {
35132
- fs11.rename = /* @__PURE__ */ (function(fs$rename) {
34642
+ fs10.rename = /* @__PURE__ */ (function(fs$rename) {
35133
34643
  return function(from, to, cb) {
35134
34644
  var start = Date.now();
35135
34645
  var backoff = 0;
35136
34646
  fs$rename(from, to, function CB(er) {
35137
34647
  if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
35138
34648
  setTimeout(function() {
35139
- fs11.stat(to, function(stater, st) {
34649
+ fs10.stat(to, function(stater, st) {
35140
34650
  if (stater && stater.code === "ENOENT")
35141
34651
  fs$rename(from, to, CB);
35142
34652
  else
@@ -35150,30 +34660,30 @@ var require_index_688c5d50 = __commonJS({
35150
34660
  if (cb) cb(er);
35151
34661
  });
35152
34662
  };
35153
- })(fs11.rename);
34663
+ })(fs10.rename);
35154
34664
  }
35155
- fs11.read = /* @__PURE__ */ (function(fs$read) {
34665
+ fs10.read = /* @__PURE__ */ (function(fs$read) {
35156
34666
  return function(fd, buffer, offset, length, position, callback_) {
35157
34667
  var callback;
35158
34668
  if (callback_ && typeof callback_ === "function") {
35159
34669
  var eagCounter = 0;
35160
- callback = function(er, _2, __) {
34670
+ callback = function(er, _, __) {
35161
34671
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
35162
34672
  eagCounter++;
35163
- return fs$read.call(fs11, fd, buffer, offset, length, position, callback);
34673
+ return fs$read.call(fs10, fd, buffer, offset, length, position, callback);
35164
34674
  }
35165
34675
  callback_.apply(this, arguments);
35166
34676
  };
35167
34677
  }
35168
- return fs$read.call(fs11, fd, buffer, offset, length, position, callback);
34678
+ return fs$read.call(fs10, fd, buffer, offset, length, position, callback);
35169
34679
  };
35170
- })(fs11.read);
35171
- fs11.readSync = /* @__PURE__ */ (function(fs$readSync) {
34680
+ })(fs10.read);
34681
+ fs10.readSync = /* @__PURE__ */ (function(fs$readSync) {
35172
34682
  return function(fd, buffer, offset, length, position) {
35173
34683
  var eagCounter = 0;
35174
34684
  while (true) {
35175
34685
  try {
35176
- return fs$readSync.call(fs11, fd, buffer, offset, length, position);
34686
+ return fs$readSync.call(fs10, fd, buffer, offset, length, position);
35177
34687
  } catch (er) {
35178
34688
  if (er.code === "EAGAIN" && eagCounter < 10) {
35179
34689
  eagCounter++;
@@ -35183,11 +34693,11 @@ var require_index_688c5d50 = __commonJS({
35183
34693
  }
35184
34694
  }
35185
34695
  };
35186
- })(fs11.readSync);
34696
+ })(fs10.readSync);
35187
34697
  }
35188
- function patchLchmod(fs11) {
35189
- fs11.lchmod = function(path7, mode, callback) {
35190
- fs11.open(
34698
+ function patchLchmod(fs10) {
34699
+ fs10.lchmod = function(path7, mode, callback) {
34700
+ fs10.open(
35191
34701
  path7,
35192
34702
  constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK,
35193
34703
  mode,
@@ -35196,73 +34706,73 @@ var require_index_688c5d50 = __commonJS({
35196
34706
  if (callback) callback(err);
35197
34707
  return;
35198
34708
  }
35199
- fs11.fchmod(fd, mode, function(err2) {
35200
- fs11.close(fd, function(err22) {
34709
+ fs10.fchmod(fd, mode, function(err2) {
34710
+ fs10.close(fd, function(err22) {
35201
34711
  if (callback) callback(err2 || err22);
35202
34712
  });
35203
34713
  });
35204
34714
  }
35205
34715
  );
35206
34716
  };
35207
- fs11.lchmodSync = function(path7, mode) {
35208
- var fd = fs11.openSync(path7, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode);
34717
+ fs10.lchmodSync = function(path7, mode) {
34718
+ var fd = fs10.openSync(path7, constants__default["default"].O_WRONLY | constants__default["default"].O_SYMLINK, mode);
35209
34719
  var threw = true;
35210
34720
  var ret;
35211
34721
  try {
35212
- ret = fs11.fchmodSync(fd, mode);
34722
+ ret = fs10.fchmodSync(fd, mode);
35213
34723
  threw = false;
35214
34724
  } finally {
35215
34725
  if (threw) {
35216
34726
  try {
35217
- fs11.closeSync(fd);
34727
+ fs10.closeSync(fd);
35218
34728
  } catch (er) {
35219
34729
  }
35220
34730
  } else {
35221
- fs11.closeSync(fd);
34731
+ fs10.closeSync(fd);
35222
34732
  }
35223
34733
  }
35224
34734
  return ret;
35225
34735
  };
35226
34736
  }
35227
- function patchLutimes(fs11) {
34737
+ function patchLutimes(fs10) {
35228
34738
  if (constants__default["default"].hasOwnProperty("O_SYMLINK")) {
35229
- fs11.lutimes = function(path7, at2, mt, cb) {
35230
- fs11.open(path7, constants__default["default"].O_SYMLINK, function(er, fd) {
34739
+ fs10.lutimes = function(path7, at2, mt, cb) {
34740
+ fs10.open(path7, constants__default["default"].O_SYMLINK, function(er, fd) {
35231
34741
  if (er) {
35232
34742
  if (cb) cb(er);
35233
34743
  return;
35234
34744
  }
35235
- fs11.futimes(fd, at2, mt, function(er2) {
35236
- fs11.close(fd, function(er22) {
34745
+ fs10.futimes(fd, at2, mt, function(er2) {
34746
+ fs10.close(fd, function(er22) {
35237
34747
  if (cb) cb(er2 || er22);
35238
34748
  });
35239
34749
  });
35240
34750
  });
35241
34751
  };
35242
- fs11.lutimesSync = function(path7, at2, mt) {
35243
- var fd = fs11.openSync(path7, constants__default["default"].O_SYMLINK);
34752
+ fs10.lutimesSync = function(path7, at2, mt) {
34753
+ var fd = fs10.openSync(path7, constants__default["default"].O_SYMLINK);
35244
34754
  var ret;
35245
34755
  var threw = true;
35246
34756
  try {
35247
- ret = fs11.futimesSync(fd, at2, mt);
34757
+ ret = fs10.futimesSync(fd, at2, mt);
35248
34758
  threw = false;
35249
34759
  } finally {
35250
34760
  if (threw) {
35251
34761
  try {
35252
- fs11.closeSync(fd);
34762
+ fs10.closeSync(fd);
35253
34763
  } catch (er) {
35254
34764
  }
35255
34765
  } else {
35256
- fs11.closeSync(fd);
34766
+ fs10.closeSync(fd);
35257
34767
  }
35258
34768
  }
35259
34769
  return ret;
35260
34770
  };
35261
34771
  } else {
35262
- fs11.lutimes = function(_a2, _b2, _c2, cb) {
34772
+ fs10.lutimes = function(_a2, _b2, _c2, cb) {
35263
34773
  if (cb) process.nextTick(cb);
35264
34774
  };
35265
- fs11.lutimesSync = function() {
34775
+ fs10.lutimesSync = function() {
35266
34776
  };
35267
34777
  }
35268
34778
  }
@@ -35338,7 +34848,7 @@ var require_index_688c5d50 = __commonJS({
35338
34848
  }
35339
34849
  var Stream = Stream__default["default"].Stream;
35340
34850
  var legacyStreams = legacy;
35341
- function legacy(fs11) {
34851
+ function legacy(fs10) {
35342
34852
  return {
35343
34853
  ReadStream: ReadStream2,
35344
34854
  WriteStream: WriteStream2
@@ -35381,7 +34891,7 @@ var require_index_688c5d50 = __commonJS({
35381
34891
  });
35382
34892
  return;
35383
34893
  }
35384
- fs11.open(this.path, this.flags, this.mode, function(err, fd) {
34894
+ fs10.open(this.path, this.flags, this.mode, function(err, fd) {
35385
34895
  if (err) {
35386
34896
  self2.emit("error", err);
35387
34897
  self2.readable = false;
@@ -35420,7 +34930,7 @@ var require_index_688c5d50 = __commonJS({
35420
34930
  this.busy = false;
35421
34931
  this._queue = [];
35422
34932
  if (this.fd === null) {
35423
- this._open = fs11.open;
34933
+ this._open = fs10.open;
35424
34934
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
35425
34935
  this.flush();
35426
34936
  }
@@ -35466,15 +34976,15 @@ var require_index_688c5d50 = __commonJS({
35466
34976
  return rval;
35467
34977
  };
35468
34978
  })(fs__default["default"].closeSync);
35469
- function patch2(fs11) {
35470
- polyfills(fs11);
35471
- fs11.gracefulify = patch2;
35472
- fs11.FileReadStream = ReadStream2;
35473
- fs11.FileWriteStream = WriteStream2;
35474
- fs11.createReadStream = createReadStream;
35475
- fs11.createWriteStream = createWriteStream;
35476
- var fs$readFile = fs11.readFile;
35477
- fs11.readFile = readFile2;
34979
+ function patch2(fs10) {
34980
+ polyfills(fs10);
34981
+ fs10.gracefulify = patch2;
34982
+ fs10.FileReadStream = ReadStream2;
34983
+ fs10.FileWriteStream = WriteStream2;
34984
+ fs10.createReadStream = createReadStream;
34985
+ fs10.createWriteStream = createWriteStream;
34986
+ var fs$readFile = fs10.readFile;
34987
+ fs10.readFile = readFile2;
35478
34988
  function readFile2(path7, options, cb) {
35479
34989
  if (typeof options === "function")
35480
34990
  cb = options, options = null;
@@ -35491,8 +35001,8 @@ var require_index_688c5d50 = __commonJS({
35491
35001
  });
35492
35002
  }
35493
35003
  }
35494
- var fs$writeFile = fs11.writeFile;
35495
- fs11.writeFile = writeFile4;
35004
+ var fs$writeFile = fs10.writeFile;
35005
+ fs10.writeFile = writeFile4;
35496
35006
  function writeFile4(path7, data, options, cb) {
35497
35007
  if (typeof options === "function")
35498
35008
  cb = options, options = null;
@@ -35509,9 +35019,9 @@ var require_index_688c5d50 = __commonJS({
35509
35019
  });
35510
35020
  }
35511
35021
  }
35512
- var fs$appendFile = fs11.appendFile;
35022
+ var fs$appendFile = fs10.appendFile;
35513
35023
  if (fs$appendFile)
35514
- fs11.appendFile = appendFile;
35024
+ fs10.appendFile = appendFile;
35515
35025
  function appendFile(path7, data, options, cb) {
35516
35026
  if (typeof options === "function")
35517
35027
  cb = options, options = null;
@@ -35528,8 +35038,8 @@ var require_index_688c5d50 = __commonJS({
35528
35038
  });
35529
35039
  }
35530
35040
  }
35531
- var fs$readdir = fs11.readdir;
35532
- fs11.readdir = readdir2;
35041
+ var fs$readdir = fs10.readdir;
35042
+ fs10.readdir = readdir2;
35533
35043
  function readdir2(path7, options, cb) {
35534
35044
  var args = [path7];
35535
35045
  if (typeof options !== "function") {
@@ -35552,21 +35062,21 @@ var require_index_688c5d50 = __commonJS({
35552
35062
  }
35553
35063
  }
35554
35064
  function go$readdir(args) {
35555
- return fs$readdir.apply(fs11, args);
35065
+ return fs$readdir.apply(fs10, args);
35556
35066
  }
35557
35067
  if (process.version.substr(0, 4) === "v0.8") {
35558
- var legStreams = legacyStreams(fs11);
35068
+ var legStreams = legacyStreams(fs10);
35559
35069
  ReadStream2 = legStreams.ReadStream;
35560
35070
  WriteStream2 = legStreams.WriteStream;
35561
35071
  }
35562
- var fs$ReadStream = fs11.ReadStream;
35072
+ var fs$ReadStream = fs10.ReadStream;
35563
35073
  ReadStream2.prototype = Object.create(fs$ReadStream.prototype);
35564
35074
  ReadStream2.prototype.open = ReadStream$open;
35565
- var fs$WriteStream = fs11.WriteStream;
35075
+ var fs$WriteStream = fs10.WriteStream;
35566
35076
  WriteStream2.prototype = Object.create(fs$WriteStream.prototype);
35567
35077
  WriteStream2.prototype.open = WriteStream$open;
35568
- fs11.ReadStream = ReadStream2;
35569
- fs11.WriteStream = WriteStream2;
35078
+ fs10.ReadStream = ReadStream2;
35079
+ fs10.WriteStream = WriteStream2;
35570
35080
  function ReadStream2(path7, options) {
35571
35081
  if (this instanceof ReadStream2)
35572
35082
  return fs$ReadStream.apply(this, arguments), this;
@@ -35611,8 +35121,8 @@ var require_index_688c5d50 = __commonJS({
35611
35121
  function createWriteStream(path7, options) {
35612
35122
  return new WriteStream2(path7, options);
35613
35123
  }
35614
- var fs$open = fs11.open;
35615
- fs11.open = open2;
35124
+ var fs$open = fs10.open;
35125
+ fs10.open = open2;
35616
35126
  function open2(path7, flags, mode, cb) {
35617
35127
  if (typeof mode === "function")
35618
35128
  cb = mode, mode = null;
@@ -35629,7 +35139,7 @@ var require_index_688c5d50 = __commonJS({
35629
35139
  });
35630
35140
  }
35631
35141
  }
35632
- return fs11;
35142
+ return fs10;
35633
35143
  }
35634
35144
  function enqueue(elem) {
35635
35145
  debug2("ENQUEUE", elem[0].name, elem[1]);
@@ -36493,7 +36003,7 @@ var require_index_688c5d50 = __commonJS({
36493
36003
  for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
36494
36004
  var tail = re.slice(pl.reStart + pl.open.length);
36495
36005
  this.debug("setting tail", re, pl);
36496
- tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) {
36006
+ tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) {
36497
36007
  if (!$2) {
36498
36008
  $2 = "\\";
36499
36009
  }
@@ -37933,7 +37443,7 @@ var require_index_688c5d50 = __commonJS({
37933
37443
  silent: true
37934
37444
  };
37935
37445
  var timeout = 0;
37936
- var isWindows2 = process.platform === "win32";
37446
+ var isWindows3 = process.platform === "win32";
37937
37447
  function defaults(options) {
37938
37448
  var methods = [
37939
37449
  "unlink",
@@ -38021,7 +37531,7 @@ var require_index_688c5d50 = __commonJS({
38021
37531
  options.lstat(p2, function(er, st) {
38022
37532
  if (er && er.code === "ENOENT")
38023
37533
  return cb(null);
38024
- if (er && er.code === "EPERM" && isWindows2)
37534
+ if (er && er.code === "EPERM" && isWindows3)
38025
37535
  fixWinEPERM(p2, options, er, cb);
38026
37536
  if (st && st.isDirectory())
38027
37537
  return rmdir(p2, options, er, cb);
@@ -38030,7 +37540,7 @@ var require_index_688c5d50 = __commonJS({
38030
37540
  if (er2.code === "ENOENT")
38031
37541
  return cb(null);
38032
37542
  if (er2.code === "EPERM")
38033
- return isWindows2 ? fixWinEPERM(p2, options, er2, cb) : rmdir(p2, options, er2, cb);
37543
+ return isWindows3 ? fixWinEPERM(p2, options, er2, cb) : rmdir(p2, options, er2, cb);
38034
37544
  if (er2.code === "EISDIR")
38035
37545
  return rmdir(p2, options, er2, cb);
38036
37546
  }
@@ -38149,7 +37659,7 @@ var require_index_688c5d50 = __commonJS({
38149
37659
  } catch (er) {
38150
37660
  if (er.code === "ENOENT")
38151
37661
  return;
38152
- if (er.code === "EPERM" && isWindows2)
37662
+ if (er.code === "EPERM" && isWindows3)
38153
37663
  fixWinEPERMSync(p2, options, er);
38154
37664
  }
38155
37665
  try {
@@ -38161,7 +37671,7 @@ var require_index_688c5d50 = __commonJS({
38161
37671
  if (er.code === "ENOENT")
38162
37672
  return;
38163
37673
  if (er.code === "EPERM")
38164
- return isWindows2 ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
37674
+ return isWindows3 ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er);
38165
37675
  if (er.code !== "EISDIR")
38166
37676
  throw er;
38167
37677
  rmdirSync(p2, options, er);
@@ -38190,7 +37700,7 @@ var require_index_688c5d50 = __commonJS({
38190
37700
  options.readdirSync(p2).forEach(function(f) {
38191
37701
  rimrafSync$1(path__default["default"].join(p2, f), options);
38192
37702
  });
38193
- var retries = isWindows2 ? 100 : 1;
37703
+ var retries = isWindows3 ? 100 : 1;
38194
37704
  var i = 0;
38195
37705
  do {
38196
37706
  var threw = true;
@@ -38527,7 +38037,7 @@ var require_index_688c5d50 = __commonJS({
38527
38037
  var browser = createCommonjsModule(function(module3, exports3) {
38528
38038
  exports3.formatArgs = formatArgs;
38529
38039
  exports3.save = save;
38530
- exports3.load = load;
38040
+ exports3.load = load2;
38531
38041
  exports3.useColors = useColors;
38532
38042
  exports3.storage = localstorage();
38533
38043
  exports3.destroy = /* @__PURE__ */ (() => {
@@ -38662,7 +38172,7 @@ var require_index_688c5d50 = __commonJS({
38662
38172
  } catch (error2) {
38663
38173
  }
38664
38174
  }
38665
- function load() {
38175
+ function load2() {
38666
38176
  let r;
38667
38177
  try {
38668
38178
  r = exports3.storage.getItem("debug");
@@ -38694,7 +38204,7 @@ var require_index_688c5d50 = __commonJS({
38694
38204
  exports3.log = log2;
38695
38205
  exports3.formatArgs = formatArgs;
38696
38206
  exports3.save = save;
38697
- exports3.load = load;
38207
+ exports3.load = load2;
38698
38208
  exports3.useColors = useColors;
38699
38209
  exports3.destroy = util__default["default"].deprecate(
38700
38210
  () => {
@@ -38789,7 +38299,7 @@ var require_index_688c5d50 = __commonJS({
38789
38299
  exports3.inspectOpts = Object.keys(process.env).filter((key) => {
38790
38300
  return /^debug_/i.test(key);
38791
38301
  }).reduce((obj, key) => {
38792
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_2, k) => {
38302
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
38793
38303
  return k.toUpperCase();
38794
38304
  });
38795
38305
  let val = process.env[key];
@@ -38836,7 +38346,7 @@ var require_index_688c5d50 = __commonJS({
38836
38346
  delete process.env.DEBUG;
38837
38347
  }
38838
38348
  }
38839
- function load() {
38349
+ function load2() {
38840
38350
  return process.env.DEBUG;
38841
38351
  }
38842
38352
  function init(debug2) {
@@ -48347,7 +47857,7 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
48347
47857
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
48348
47858
  var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
48349
47859
  var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
48350
- var _2, done = false;
47860
+ var _, done = false;
48351
47861
  for (var i = decorators.length - 1; i >= 0; i--) {
48352
47862
  var context = {};
48353
47863
  for (var p2 in contextIn) context[p2] = p2 === "access" ? {} : contextIn[p2];
@@ -48360,12 +47870,12 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
48360
47870
  if (kind === "accessor") {
48361
47871
  if (result === void 0) continue;
48362
47872
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
48363
- if (_2 = accept(result.get)) descriptor.get = _2;
48364
- if (_2 = accept(result.set)) descriptor.set = _2;
48365
- if (_2 = accept(result.init)) initializers.unshift(_2);
48366
- } else if (_2 = accept(result)) {
48367
- if (kind === "field") initializers.unshift(_2);
48368
- else descriptor[key] = _2;
47873
+ if (_ = accept(result.get)) descriptor.get = _;
47874
+ if (_ = accept(result.set)) descriptor.set = _;
47875
+ if (_ = accept(result.init)) initializers.unshift(_);
47876
+ } else if (_ = accept(result)) {
47877
+ if (kind === "field") initializers.unshift(_);
47878
+ else descriptor[key] = _;
48369
47879
  }
48370
47880
  }
48371
47881
  if (target) Object.defineProperty(target, contextIn.name, descriptor);
@@ -48416,7 +47926,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
48416
47926
  });
48417
47927
  }
48418
47928
  function __generator(thisArg, body) {
48419
- var _2 = { label: 0, sent: function() {
47929
+ var _ = { label: 0, sent: function() {
48420
47930
  if (t2[0] & 1) throw t2[1];
48421
47931
  return t2[1];
48422
47932
  }, trys: [], ops: [] }, f, y2, t2, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
@@ -48430,7 +47940,7 @@ function __generator(thisArg, body) {
48430
47940
  }
48431
47941
  function step(op) {
48432
47942
  if (f) throw new TypeError("Generator is already executing.");
48433
- while (g && (g = 0, op[0] && (_2 = 0)), _2) try {
47943
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
48434
47944
  if (f = 1, y2 && (t2 = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t2 = y2["return"]) && t2.call(y2), 0) : y2.next) && !(t2 = t2.call(y2, op[1])).done) return t2;
48435
47945
  if (y2 = 0, t2) op = [op[0] & 2, t2.value];
48436
47946
  switch (op[0]) {
@@ -48439,41 +47949,41 @@ function __generator(thisArg, body) {
48439
47949
  t2 = op;
48440
47950
  break;
48441
47951
  case 4:
48442
- _2.label++;
47952
+ _.label++;
48443
47953
  return { value: op[1], done: false };
48444
47954
  case 5:
48445
- _2.label++;
47955
+ _.label++;
48446
47956
  y2 = op[1];
48447
47957
  op = [0];
48448
47958
  continue;
48449
47959
  case 7:
48450
- op = _2.ops.pop();
48451
- _2.trys.pop();
47960
+ op = _.ops.pop();
47961
+ _.trys.pop();
48452
47962
  continue;
48453
47963
  default:
48454
- if (!(t2 = _2.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
48455
- _2 = 0;
47964
+ if (!(t2 = _.trys, t2 = t2.length > 0 && t2[t2.length - 1]) && (op[0] === 6 || op[0] === 2)) {
47965
+ _ = 0;
48456
47966
  continue;
48457
47967
  }
48458
47968
  if (op[0] === 3 && (!t2 || op[1] > t2[0] && op[1] < t2[3])) {
48459
- _2.label = op[1];
47969
+ _.label = op[1];
48460
47970
  break;
48461
47971
  }
48462
- if (op[0] === 6 && _2.label < t2[1]) {
48463
- _2.label = t2[1];
47972
+ if (op[0] === 6 && _.label < t2[1]) {
47973
+ _.label = t2[1];
48464
47974
  t2 = op;
48465
47975
  break;
48466
47976
  }
48467
- if (t2 && _2.label < t2[2]) {
48468
- _2.label = t2[2];
48469
- _2.ops.push(op);
47977
+ if (t2 && _.label < t2[2]) {
47978
+ _.label = t2[2];
47979
+ _.ops.push(op);
48470
47980
  break;
48471
47981
  }
48472
- if (t2[2]) _2.ops.pop();
48473
- _2.trys.pop();
47982
+ if (t2[2]) _.ops.pop();
47983
+ _.trys.pop();
48474
47984
  continue;
48475
47985
  }
48476
- op = body.call(thisArg, _2);
47986
+ op = body.call(thisArg, _);
48477
47987
  } catch (e) {
48478
47988
  op = [6, e];
48479
47989
  y2 = 0;
@@ -59219,7 +58729,7 @@ var require_lib = __commonJS({
59219
58729
  let regex2 = null;
59220
58730
  try {
59221
58731
  regex2 = new RegExp(pattern, flags);
59222
- } catch (_2) {
58732
+ } catch (_) {
59223
58733
  }
59224
58734
  const node = this.estreeParseLiteral(regex2);
59225
58735
  node.regex = {
@@ -74651,9 +74161,9 @@ var stdout = process.stdout;
74651
74161
  var stderr = process.stderr;
74652
74162
 
74653
74163
  // ../cli/dist/check-macos-version.mjs
74654
- var import_node_os3 = __toESM(require("node:os"), 1);
74164
+ var import_node_os4 = __toESM(require("node:os"), 1);
74655
74165
 
74656
- // ../workers-utils/dist/chunk-DCOBXSFB.mjs
74166
+ // ../workers-utils/dist/chunk-DDRU76YD.mjs
74657
74167
  var __create2 = Object.create;
74658
74168
  var __defProp2 = Object.defineProperty;
74659
74169
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -74670,10 +74180,6 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
74670
74180
  var __commonJS2 = (cb, mod) => function __require2() {
74671
74181
  return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
74672
74182
  };
74673
- var __export2 = (target, all2) => {
74674
- for (var name3 in all2)
74675
- __defProp2(target, name3, { get: all2[name3], enumerable: true });
74676
- };
74677
74183
  var __copyProps2 = (to, from, except, desc) => {
74678
74184
  if (from && typeof from === "object" || typeof from === "function") {
74679
74185
  for (let key of __getOwnPropNames2(from))
@@ -74682,7 +74188,6 @@ var __copyProps2 = (to, from, except, desc) => {
74682
74188
  }
74683
74189
  return to;
74684
74190
  };
74685
- var __reExport2 = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
74686
74191
  var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
74687
74192
  // If the importer is in node compatibility mode or this is not an ESM
74688
74193
  // file that has been converted to a CommonJS file using a Babel-
@@ -74692,7 +74197,7 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create2(__
74692
74197
  mod
74693
74198
  ));
74694
74199
 
74695
- // ../workers-utils/dist/chunk-J6D57QVQ.mjs
74200
+ // ../workers-utils/dist/chunk-ELQRF72O.mjs
74696
74201
  var import_node_assert = __toESM(require("node:assert"), 1);
74697
74202
  function isCompatDate(str) {
74698
74203
  return /^\d{4}-\d{2}-\d{2}$/.test(str);
@@ -75172,9 +74677,204 @@ function constructWranglerConfig(config49) {
75172
74677
  }
75173
74678
  __name(constructWranglerConfig, "constructWranglerConfig");
75174
74679
 
75175
- // ../workers-utils/dist/chunk-ULVYGN52.mjs
74680
+ // ../workers-utils/dist/chunk-OC543JY3.mjs
75176
74681
  var import_node_fs = __toESM(require("node:fs"), 1);
74682
+ function isDirectory(path6) {
74683
+ return import_node_fs.default.statSync(path6, { throwIfNoEntry: false })?.isDirectory() ?? false;
74684
+ }
74685
+ __name(isDirectory, "isDirectory");
74686
+ function removeDir(dirPath, { fireAndForget = false } = {}) {
74687
+ const result = import_node_fs.default.promises.rm(dirPath, {
74688
+ recursive: true,
74689
+ force: true,
74690
+ maxRetries: 5,
74691
+ retryDelay: 100
74692
+ });
74693
+ if (fireAndForget) {
74694
+ void result.catch(() => {
74695
+ });
74696
+ } else {
74697
+ return result;
74698
+ }
74699
+ }
74700
+ __name(removeDir, "removeDir");
74701
+ function removeDirSync(dirPath) {
74702
+ import_node_fs.default.rmSync(dirPath, {
74703
+ recursive: true,
74704
+ force: true,
74705
+ maxRetries: 5,
74706
+ retryDelay: 100
74707
+ });
74708
+ }
74709
+ __name(removeDirSync, "removeDirSync");
74710
+
74711
+ // ../workers-utils/dist/chunk-OTBYAUQ6.mjs
74712
+ var import_node_os2 = __toESM(require("node:os"), 1);
75177
74713
  var import_node_path = __toESM(require("node:path"), 1);
74714
+ function isWindows() {
74715
+ return /^win/i.test(process.platform);
74716
+ }
74717
+ __name(isWindows, "isWindows");
74718
+ function isMacOS() {
74719
+ return /^darwin$/i.test(process.platform);
74720
+ }
74721
+ __name(isMacOS, "isMacOS");
74722
+ function isNonEmpty(value) {
74723
+ return !!value;
74724
+ }
74725
+ __name(isNonEmpty, "isNonEmpty");
74726
+ function getEnv(name3) {
74727
+ return process.env[name3];
74728
+ }
74729
+ __name(getEnv, "getEnv");
74730
+ function normalizePath(p2) {
74731
+ return p2 ? import_node_path.default.normalize(import_node_path.default.join(p2, ".")) : void 0;
74732
+ }
74733
+ __name(normalizePath, "normalizePath");
74734
+ function homeDir() {
74735
+ if (isWindows()) {
74736
+ const priorityList = [
74737
+ import_node_os2.default.homedir(),
74738
+ getEnv("USERPROFILE"),
74739
+ getEnv("HOME"),
74740
+ // NOTE: `os-paths@7` uses `||` here (not `&&`), so a home directory is
74741
+ // derived even when only one of HOMEDRIVE/HOMEPATH is set. This is
74742
+ // preserved deliberately for byte-for-byte parity — see the parity
74743
+ // tests, which compare this branch against the real package.
74744
+ getEnv("HOMEDRIVE") || getEnv("HOMEPATH") ? import_node_path.default.join(getEnv("HOMEDRIVE") ?? "", getEnv("HOMEPATH") ?? "") : void 0
74745
+ ];
74746
+ return normalizePath(priorityList.find(isNonEmpty));
74747
+ }
74748
+ return normalizePath(import_node_os2.default.homedir() || getEnv("HOME"));
74749
+ }
74750
+ __name(homeDir, "homeDir");
74751
+ function joinToBase(base, segments) {
74752
+ return base ? import_node_path.default.join(base, ...segments) : void 0;
74753
+ }
74754
+ __name(joinToBase, "joinToBase");
74755
+ function tempDir() {
74756
+ if (isWindows()) {
74757
+ const fallback2 = "C:\\Temp";
74758
+ const priorityListLazy = [
74759
+ () => import_node_os2.default.tmpdir(),
74760
+ () => getEnv("TEMP"),
74761
+ () => getEnv("TMP"),
74762
+ () => joinToBase(getEnv("LOCALAPPDATA"), ["Temp"]),
74763
+ () => joinToBase(homeDir(), ["AppData", "Local", "Temp"]),
74764
+ () => joinToBase(getEnv("ALLUSERSPROFILE"), ["Temp"]),
74765
+ () => joinToBase(getEnv("SystemRoot"), ["Temp"]),
74766
+ () => joinToBase(getEnv("windir"), ["Temp"]),
74767
+ () => joinToBase(getEnv("SystemDrive"), ["\\", "Temp"])
74768
+ ];
74769
+ const found = priorityListLazy.find((fn) => isNonEmpty(fn()));
74770
+ return found && normalizePath(found()) || fallback2;
74771
+ }
74772
+ const fallback = "/tmp";
74773
+ const priorityList = [
74774
+ import_node_os2.default.tmpdir(),
74775
+ getEnv("TMPDIR"),
74776
+ getEnv("TEMP"),
74777
+ getEnv("TMP")
74778
+ ];
74779
+ return normalizePath(priorityList.find(isNonEmpty)) || fallback;
74780
+ }
74781
+ __name(tempDir, "tempDir");
74782
+ function baseDir() {
74783
+ return homeDir() || tempDir();
74784
+ }
74785
+ __name(baseDir, "baseDir");
74786
+ function valOrPath(value, segments) {
74787
+ return value || import_node_path.default.join(...segments);
74788
+ }
74789
+ __name(valOrPath, "valOrPath");
74790
+ function windowsAppData() {
74791
+ return valOrPath(getEnv("APPDATA"), [baseDir(), "AppData", "Roaming"]);
74792
+ }
74793
+ __name(windowsAppData, "windowsAppData");
74794
+ function windowsLocalAppData() {
74795
+ return valOrPath(getEnv("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
74796
+ }
74797
+ __name(windowsLocalAppData, "windowsLocalAppData");
74798
+ function xdgConfig() {
74799
+ if (isMacOS()) {
74800
+ return valOrPath(getEnv("XDG_CONFIG_HOME"), [
74801
+ baseDir(),
74802
+ "Library",
74803
+ "Preferences"
74804
+ ]);
74805
+ }
74806
+ if (isWindows()) {
74807
+ return valOrPath(getEnv("XDG_CONFIG_HOME"), [
74808
+ windowsAppData(),
74809
+ "xdg.config"
74810
+ ]);
74811
+ }
74812
+ return valOrPath(getEnv("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
74813
+ }
74814
+ __name(xdgConfig, "xdgConfig");
74815
+ function xdgCache() {
74816
+ if (isMacOS()) {
74817
+ return valOrPath(getEnv("XDG_CACHE_HOME"), [
74818
+ baseDir(),
74819
+ "Library",
74820
+ "Caches"
74821
+ ]);
74822
+ }
74823
+ if (isWindows()) {
74824
+ return valOrPath(getEnv("XDG_CACHE_HOME"), [
74825
+ windowsLocalAppData(),
74826
+ "xdg.cache"
74827
+ ]);
74828
+ }
74829
+ return valOrPath(getEnv("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
74830
+ }
74831
+ __name(xdgCache, "xdgCache");
74832
+ function xdgAppPaths(name3) {
74833
+ const segment = import_node_path.default.parse(name3).name;
74834
+ return {
74835
+ config: /* @__PURE__ */ __name(() => import_node_path.default.join(xdgConfig(), segment), "config"),
74836
+ cache: /* @__PURE__ */ __name(() => import_node_path.default.join(xdgCache(), segment), "cache")
74837
+ };
74838
+ }
74839
+ __name(xdgAppPaths, "xdgAppPaths");
74840
+ function getGlobalConfigPath({
74841
+ appName = "wrangler",
74842
+ leadingDot = true,
74843
+ useLegacyHomeDir = true
74844
+ } = {}) {
74845
+ const dirName = `${leadingDot ? "." : ""}${appName}`;
74846
+ const configDir = xdgAppPaths(dirName).config();
74847
+ if (useLegacyHomeDir) {
74848
+ const legacyConfigDir = import_node_path.default.join(import_node_os2.default.homedir(), dirName);
74849
+ if (isDirectory(legacyConfigDir)) {
74850
+ return legacyConfigDir;
74851
+ }
74852
+ }
74853
+ return configDir;
74854
+ }
74855
+ __name(getGlobalConfigPath, "getGlobalConfigPath");
74856
+ function getGlobalWranglerCachePath() {
74857
+ return xdgAppPaths(".wrangler").cache();
74858
+ }
74859
+ __name(getGlobalWranglerCachePath, "getGlobalWranglerCachePath");
74860
+
74861
+ // ../workers-utils/dist/chunk-27EBTAT2.mjs
74862
+ var import_node_fs2 = require("node:fs");
74863
+ var import_node_path2 = __toESM(require("node:path"), 1);
74864
+ function partitionExports(exports2) {
74865
+ const partitioned = {
74866
+ "durable-object": {},
74867
+ worker: {}
74868
+ };
74869
+ if (exports2 === void 0) {
74870
+ return partitioned;
74871
+ }
74872
+ for (const [name3, entry] of Object.entries(exports2)) {
74873
+ partitioned[entry.type][name3] = entry;
74874
+ }
74875
+ return partitioned;
74876
+ }
74877
+ __name(partitionExports, "partitionExports");
75178
74878
  var UserError = class extends Error {
75179
74879
  static {
75180
74880
  __name(this, "UserError");
@@ -76006,12 +75706,12 @@ function parseTree(text, errors = [], options = ParseOptions.DEFAULT) {
76006
75706
  return result;
76007
75707
  }
76008
75708
  __name(parseTree, "parseTree");
76009
- function findNodeAtLocation(root, path22) {
75709
+ function findNodeAtLocation(root, path23) {
76010
75710
  if (!root) {
76011
75711
  return void 0;
76012
75712
  }
76013
75713
  let node = root;
76014
- for (let segment of path22) {
75714
+ for (let segment of path23) {
76015
75715
  if (typeof segment === "string") {
76016
75716
  if (node.type !== "object" || !Array.isArray(node.children)) {
76017
75717
  return void 0;
@@ -76358,14 +76058,14 @@ function getNodeType(value) {
76358
76058
  }
76359
76059
  __name(getNodeType, "getNodeType");
76360
76060
  function setProperty(text, originalPath, value, options) {
76361
- const path22 = originalPath.slice();
76061
+ const path23 = originalPath.slice();
76362
76062
  const errors = [];
76363
76063
  const root = parseTree(text, errors);
76364
76064
  let parent = void 0;
76365
76065
  let lastSegment = void 0;
76366
- while (path22.length > 0) {
76367
- lastSegment = path22.pop();
76368
- parent = findNodeAtLocation(root, path22);
76066
+ while (path23.length > 0) {
76067
+ lastSegment = path23.pop();
76068
+ parent = findNodeAtLocation(root, path23);
76369
76069
  if (parent === void 0 && value !== void 0) {
76370
76070
  if (typeof lastSegment === "string") {
76371
76071
  value = { [lastSegment]: value };
@@ -76594,8 +76294,8 @@ function format2(documentText, range, options) {
76594
76294
  return format(documentText, range, options);
76595
76295
  }
76596
76296
  __name(format2, "format");
76597
- function modify(text, path22, value, options) {
76598
- return setProperty(text, path22, value, options);
76297
+ function modify(text, path23, value, options) {
76298
+ return setProperty(text, path23, value, options);
76599
76299
  }
76600
76300
  __name(modify, "modify");
76601
76301
  function applyEdits(text, edits) {
@@ -77502,6 +77202,12 @@ var APIError = class extends ParseError {
77502
77202
  #status;
77503
77203
  code;
77504
77204
  accountTag;
77205
+ /**
77206
+ * Optional structured metadata hoisted from the first `FetchError.meta`
77207
+ * on the v4 response envelope. Consumers can inspect this to render
77208
+ * endpoint-specific structured error payloads.
77209
+ */
77210
+ meta;
77505
77211
  constructor({ status: status2, ...rest }) {
77506
77212
  super(rest);
77507
77213
  this.name = this.constructor.name;
@@ -77580,14 +77286,14 @@ function parseJSONC(input, file2, options = { allowTrailingComma: true }) {
77580
77286
  __name(parseJSONC, "parseJSONC");
77581
77287
  function readFileSyncToBuffer(file2) {
77582
77288
  try {
77583
- return (0, import_node_fs.readFileSync)(file2);
77289
+ return (0, import_node_fs2.readFileSync)(file2);
77584
77290
  } catch (err) {
77585
77291
  const { message } = err;
77586
77292
  throw new ParseError({
77587
77293
  text: `Could not read file: ${file2}`,
77588
77294
  notes: [
77589
77295
  {
77590
- text: message.replace(file2, (0, import_node_path.resolve)(file2))
77296
+ text: message.replace(file2, (0, import_node_path2.resolve)(file2))
77591
77297
  }
77592
77298
  ],
77593
77299
  telemetryMessage: false
@@ -77597,7 +77303,7 @@ function readFileSyncToBuffer(file2) {
77597
77303
  __name(readFileSyncToBuffer, "readFileSyncToBuffer");
77598
77304
  function readFileSync(file2) {
77599
77305
  try {
77600
- const buffer = (0, import_node_fs.readFileSync)(file2);
77306
+ const buffer = (0, import_node_fs2.readFileSync)(file2);
77601
77307
  return removeBOMAndValidate(buffer, file2);
77602
77308
  } catch (err) {
77603
77309
  if (err instanceof ParseError) {
@@ -77608,7 +77314,7 @@ function readFileSync(file2) {
77608
77314
  text: `Could not read file: ${file2}`,
77609
77315
  notes: [
77610
77316
  {
77611
- text: message.replace(file2, (0, import_node_path.resolve)(file2))
77317
+ text: message.replace(file2, (0, import_node_path2.resolve)(file2))
77612
77318
  }
77613
77319
  ],
77614
77320
  telemetryMessage: "Could not read file"
@@ -77693,7 +77399,7 @@ function parseHumanDuration(s) {
77693
77399
  const unitsMap = new Map(Object.entries(units));
77694
77400
  s = s.trim().toLowerCase();
77695
77401
  let base = 1;
77696
- for (const [name3, _2] of unitsMap) {
77402
+ for (const [name3, _] of unitsMap) {
77697
77403
  if (s.endsWith(name3)) {
77698
77404
  s = s.substring(0, s.length - name3.length);
77699
77405
  base = unitsMap.get(name3) || 1;
@@ -77795,7 +77501,7 @@ function removeBOMAndValidate(buffer, file2) {
77795
77501
  __name(removeBOMAndValidate, "removeBOMAndValidate");
77796
77502
  var PATH_TO_DEPLOY_CONFIG = ".wrangler/deploy/config.json";
77797
77503
  function absolute(input, root) {
77798
- return (0, import_node_path.isAbsolute)(input) ? input : (0, import_node_path.resolve)(root || ".", input);
77504
+ return (0, import_node_path2.isAbsolute)(input) ? input : (0, import_node_path2.resolve)(root || ".", input);
77799
77505
  }
77800
77506
  __name(absolute, "absolute");
77801
77507
  function up(base, options) {
@@ -77805,7 +77511,7 @@ function up(base, options) {
77805
77511
  let prev, arr = [];
77806
77512
  while (prev !== root) {
77807
77513
  arr.push(tmp);
77808
- tmp = (0, import_node_path.dirname)(prev = tmp);
77514
+ tmp = (0, import_node_path2.dirname)(prev = tmp);
77809
77515
  if (tmp === prev) break;
77810
77516
  }
77811
77517
  return arr;
@@ -77816,8 +77522,8 @@ function file(name3, options) {
77816
77522
  let start = options && options.cwd || "";
77817
77523
  for (dir of up(start, options)) {
77818
77524
  try {
77819
- tmp = (0, import_node_path.join)(dir, name3);
77820
- if ((0, import_node_fs.statSync)(tmp).isFile()) return tmp;
77525
+ tmp = (0, import_node_path2.join)(dir, name3);
77526
+ if ((0, import_node_fs2.statSync)(tmp).isFile()) return tmp;
77821
77527
  } catch {
77822
77528
  }
77823
77529
  }
@@ -77875,7 +77581,7 @@ function resolveWranglerConfigPath({
77875
77581
  redirected: false
77876
77582
  };
77877
77583
  }
77878
- const leafPath = script !== void 0 ? import_node_path.default.dirname(script) : process.cwd();
77584
+ const leafPath = script !== void 0 ? import_node_path2.default.dirname(script) : process.cwd();
77879
77585
  return findWranglerConfig(leafPath, options);
77880
77586
  }
77881
77587
  __name(resolveWranglerConfigPath, "resolveWranglerConfigPath");
@@ -77907,17 +77613,17 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
77907
77613
  const deployConfigFile = readFileSync(deployConfigPath);
77908
77614
  try {
77909
77615
  const deployConfig = parseJSONC(deployConfigFile, deployConfigPath);
77910
- redirectedConfigPath = deployConfig.configPath && import_node_path.default.resolve(import_node_path.default.dirname(deployConfigPath), deployConfig.configPath);
77616
+ redirectedConfigPath = deployConfig.configPath && import_node_path2.default.resolve(import_node_path2.default.dirname(deployConfigPath), deployConfig.configPath);
77911
77617
  } catch (e) {
77912
77618
  throw new UserError(
77913
- `Failed to parse the deploy configuration file at ${import_node_path.default.relative(".", deployConfigPath)}`,
77619
+ `Failed to parse the deploy configuration file at ${import_node_path2.default.relative(".", deployConfigPath)}`,
77914
77620
  { cause: e, telemetryMessage: false }
77915
77621
  );
77916
77622
  }
77917
77623
  if (!redirectedConfigPath) {
77918
77624
  throw new UserError(
77919
77625
  esm_default`
77920
- A deploy configuration file was found at "${import_node_path.default.relative(".", deployConfigPath)}".
77626
+ A deploy configuration file was found at "${import_node_path2.default.relative(".", deployConfigPath)}".
77921
77627
  But this is not valid - the required "configPath" property was not found.
77922
77628
  Instead this file contains:
77923
77629
  \`\`\`
@@ -77927,21 +77633,21 @@ function findRedirectedWranglerConfig(cwd, userConfigPath) {
77927
77633
  { telemetryMessage: false }
77928
77634
  );
77929
77635
  }
77930
- if (!(0, import_node_fs.existsSync)(redirectedConfigPath)) {
77636
+ if (!(0, import_node_fs2.existsSync)(redirectedConfigPath)) {
77931
77637
  throw new UserError(
77932
77638
  esm_default`
77933
- There is a deploy configuration at "${import_node_path.default.relative(".", deployConfigPath)}".
77934
- But the redirected configuration path it points to, "${import_node_path.default.relative(".", redirectedConfigPath)}", does not exist.
77639
+ There is a deploy configuration at "${import_node_path2.default.relative(".", deployConfigPath)}".
77640
+ But the redirected configuration path it points to, "${import_node_path2.default.relative(".", redirectedConfigPath)}", does not exist.
77935
77641
  `,
77936
77642
  { telemetryMessage: false }
77937
77643
  );
77938
77644
  }
77939
77645
  if (userConfigPath) {
77940
- if (import_node_path.default.join(import_node_path.default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) {
77646
+ if (import_node_path2.default.join(import_node_path2.default.dirname(userConfigPath), PATH_TO_DEPLOY_CONFIG) !== deployConfigPath) {
77941
77647
  throw new UserError(
77942
77648
  esm_default`
77943
- Found both a user configuration file at "${import_node_path.default.relative(".", userConfigPath)}"
77944
- and a deploy configuration file at "${import_node_path.default.relative(".", deployConfigPath)}".
77649
+ Found both a user configuration file at "${import_node_path2.default.relative(".", userConfigPath)}"
77650
+ and a deploy configuration file at "${import_node_path2.default.relative(".", deployConfigPath)}".
77945
77651
  But these do not share the same base path so it is not clear which should be used.
77946
77652
  `,
77947
77653
  { telemetryMessage: false }
@@ -77999,732 +77705,24 @@ function formatConfigSnippet(snippet, configPath, formatted = true) {
77999
77705
  }
78000
77706
  }
78001
77707
  __name(formatConfigSnippet, "formatConfigSnippet");
78002
- function isDirectory(path22) {
78003
- return import_node_fs.default.statSync(path22, { throwIfNoEntry: false })?.isDirectory() ?? false;
78004
- }
78005
- __name(isDirectory, "isDirectory");
78006
- function removeDir(dirPath, { fireAndForget = false } = {}) {
78007
- const result = import_node_fs.default.promises.rm(dirPath, {
78008
- recursive: true,
78009
- force: true,
78010
- maxRetries: 5,
78011
- retryDelay: 100
78012
- });
78013
- if (fireAndForget) {
78014
- void result.catch(() => {
78015
- });
78016
- } else {
78017
- return result;
78018
- }
78019
- }
78020
- __name(removeDir, "removeDir");
78021
- function removeDirSync(dirPath) {
78022
- import_node_fs.default.rmSync(dirPath, {
78023
- recursive: true,
78024
- force: true,
78025
- maxRetries: 5,
78026
- retryDelay: 100
78027
- });
78028
- }
78029
- __name(removeDirSync, "removeDirSync");
78030
77708
 
78031
77709
  // ../workers-utils/dist/index.mjs
78032
- var import_node_fs2 = __toESM(require("node:fs"), 1);
77710
+ var import_node_fs3 = __toESM(require("node:fs"), 1);
78033
77711
  var import_node_assert2 = __toESM(require("node:assert"), 1);
78034
- var import_node_path2 = __toESM(require("node:path"), 1);
78035
- var import_node_os2 = __toESM(require("node:os"), 1);
77712
+ var import_node_path3 = __toESM(require("node:path"), 1);
78036
77713
  var import_node_child_process = require("node:child_process");
78037
77714
  var import_node_crypto = require("node:crypto");
77715
+ var import_node_os3 = require("node:os");
78038
77716
  var import_undici = __toESM(require_undici(), 1);
78039
77717
  var import_node_url = require("node:url");
78040
77718
  var timersPromises = __toESM(require("node:timers/promises"), 1);
78041
77719
  var import_promises = require("node:timers/promises");
78042
- var require_XDGAppPaths = __commonJS2({
78043
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
78044
- exports2.__esModule = true;
78045
- exports2.Adapt = void 0;
78046
- function isBoolean22(t2) {
78047
- return typeOf(t2) === "boolean";
78048
- }
78049
- __name(isBoolean22, "isBoolean");
78050
- function isObject(t2) {
78051
- return typeOf(t2) === "object";
78052
- }
78053
- __name(isObject, "isObject");
78054
- function isString2(t2) {
78055
- return typeOf(t2) === "string";
78056
- }
78057
- __name(isString2, "isString");
78058
- function typeOf(t2) {
78059
- return typeof t2;
78060
- }
78061
- __name(typeOf, "typeOf");
78062
- function Adapt(adapter_) {
78063
- var meta = adapter_.meta, path52 = adapter_.path, xdg = adapter_.xdg;
78064
- var XDGAppPaths_ = /* @__PURE__ */ (function() {
78065
- function XDGAppPaths_2(options_) {
78066
- if (options_ === void 0) {
78067
- options_ = {};
78068
- }
78069
- var _a2, _b2, _c2;
78070
- function XDGAppPaths(options2) {
78071
- if (options2 === void 0) {
78072
- options2 = {};
78073
- }
78074
- return new XDGAppPaths_2(options2);
78075
- }
78076
- __name(XDGAppPaths, "XDGAppPaths");
78077
- var options = isObject(options_) ? options_ : { name: options_ };
78078
- var suffix = (_a2 = options.suffix) !== null && _a2 !== void 0 ? _a2 : "";
78079
- var isolated_ = (_b2 = options.isolated) !== null && _b2 !== void 0 ? _b2 : true;
78080
- var namePriorityList = [
78081
- options.name,
78082
- meta.pkgMainFilename(),
78083
- meta.mainFilename()
78084
- ];
78085
- var nameFallback = "$eval";
78086
- var name3 = path52.parse(((_c2 = namePriorityList.find(function(e2) {
78087
- return isString2(e2);
78088
- })) !== null && _c2 !== void 0 ? _c2 : nameFallback) + suffix).name;
78089
- XDGAppPaths.$name = /* @__PURE__ */ __name(function $name() {
78090
- return name3;
78091
- }, "$name");
78092
- XDGAppPaths.$isolated = /* @__PURE__ */ __name(function $isolated() {
78093
- return isolated_;
78094
- }, "$isolated");
78095
- function isIsolated(dirOptions) {
78096
- var _a22;
78097
- dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
78098
- var isolated = isBoolean22(dirOptions) ? dirOptions : (_a22 = dirOptions.isolated) !== null && _a22 !== void 0 ? _a22 : isolated_;
78099
- return isolated;
78100
- }
78101
- __name(isIsolated, "isIsolated");
78102
- function finalPathSegment(dirOptions) {
78103
- return isIsolated(dirOptions) ? name3 : "";
78104
- }
78105
- __name(finalPathSegment, "finalPathSegment");
78106
- XDGAppPaths.cache = /* @__PURE__ */ __name(function cache(dirOptions) {
78107
- return path52.join(xdg.cache(), finalPathSegment(dirOptions));
78108
- }, "cache");
78109
- XDGAppPaths.config = /* @__PURE__ */ __name(function config49(dirOptions) {
78110
- return path52.join(xdg.config(), finalPathSegment(dirOptions));
78111
- }, "config");
78112
- XDGAppPaths.data = /* @__PURE__ */ __name(function data(dirOptions) {
78113
- return path52.join(xdg.data(), finalPathSegment(dirOptions));
78114
- }, "data");
78115
- XDGAppPaths.runtime = /* @__PURE__ */ __name(function runtime(dirOptions) {
78116
- return xdg.runtime() ? path52.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
78117
- }, "runtime");
78118
- XDGAppPaths.state = /* @__PURE__ */ __name(function state(dirOptions) {
78119
- return path52.join(xdg.state(), finalPathSegment(dirOptions));
78120
- }, "state");
78121
- XDGAppPaths.configDirs = /* @__PURE__ */ __name(function configDirs(dirOptions) {
78122
- return xdg.configDirs().map(function(s) {
78123
- return path52.join(s, finalPathSegment(dirOptions));
78124
- });
78125
- }, "configDirs");
78126
- XDGAppPaths.dataDirs = /* @__PURE__ */ __name(function dataDirs(dirOptions) {
78127
- return xdg.dataDirs().map(function(s) {
78128
- return path52.join(s, finalPathSegment(dirOptions));
78129
- });
78130
- }, "dataDirs");
78131
- return XDGAppPaths;
78132
- }
78133
- __name(XDGAppPaths_2, "XDGAppPaths_");
78134
- return XDGAppPaths_2;
78135
- })();
78136
- return { XDGAppPaths: new XDGAppPaths_() };
78137
- }
78138
- __name(Adapt, "Adapt");
78139
- exports2.Adapt = Adapt;
78140
- }
78141
- });
78142
- var require_XDG = __commonJS2({
78143
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports2) {
78144
- var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) {
78145
- for (var i = 0, il = from.length, j2 = to.length; i < il; i++, j2++)
78146
- to[j2] = from[i];
78147
- return to;
78148
- };
78149
- exports2.__esModule = true;
78150
- exports2.Adapt = void 0;
78151
- function Adapt(adapter_) {
78152
- var env3 = adapter_.env, osPaths = adapter_.osPaths, path52 = adapter_.path;
78153
- var isMacOS = /^darwin$/i.test(adapter_.process.platform);
78154
- var isWinOS = /^win/i.test(adapter_.process.platform);
78155
- function baseDir() {
78156
- return osPaths.home() || osPaths.temp();
78157
- }
78158
- __name(baseDir, "baseDir");
78159
- function valOrPath(val, pathSegments) {
78160
- return val || path52.join.apply(path52, pathSegments);
78161
- }
78162
- __name(valOrPath, "valOrPath");
78163
- var linux = /* @__PURE__ */ __name(function() {
78164
- var cache = /* @__PURE__ */ __name(function() {
78165
- return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
78166
- }, "cache");
78167
- var config49 = /* @__PURE__ */ __name(function() {
78168
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
78169
- }, "config");
78170
- var data = /* @__PURE__ */ __name(function() {
78171
- return valOrPath(env3.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
78172
- }, "data");
78173
- var runtime = /* @__PURE__ */ __name(function() {
78174
- return env3.get("XDG_RUNTIME_DIR") || void 0;
78175
- }, "runtime");
78176
- var state = /* @__PURE__ */ __name(function() {
78177
- return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
78178
- }, "state");
78179
- return { cache, config: config49, data, runtime, state };
78180
- }, "linux");
78181
- var macos = /* @__PURE__ */ __name(function() {
78182
- var cache = /* @__PURE__ */ __name(function() {
78183
- return valOrPath(env3.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
78184
- }, "cache");
78185
- var config49 = /* @__PURE__ */ __name(function() {
78186
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
78187
- }, "config");
78188
- var data = /* @__PURE__ */ __name(function() {
78189
- return valOrPath(env3.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
78190
- }, "data");
78191
- var runtime = /* @__PURE__ */ __name(function() {
78192
- return env3.get("XDG_RUNTIME_DIR") || void 0;
78193
- }, "runtime");
78194
- var state = /* @__PURE__ */ __name(function() {
78195
- return valOrPath(env3.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
78196
- }, "state");
78197
- return { cache, config: config49, data, runtime, state };
78198
- }, "macos");
78199
- var windows = /* @__PURE__ */ __name(function() {
78200
- function appData() {
78201
- return valOrPath(env3.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
78202
- }
78203
- __name(appData, "appData");
78204
- function localAppData() {
78205
- return valOrPath(env3.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
78206
- }
78207
- __name(localAppData, "localAppData");
78208
- var cache = /* @__PURE__ */ __name(function() {
78209
- return valOrPath(env3.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
78210
- }, "cache");
78211
- var config49 = /* @__PURE__ */ __name(function() {
78212
- return valOrPath(env3.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
78213
- }, "config");
78214
- var data = /* @__PURE__ */ __name(function() {
78215
- return valOrPath(env3.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
78216
- }, "data");
78217
- var runtime = /* @__PURE__ */ __name(function() {
78218
- return env3.get("XDG_RUNTIME_DIR") || void 0;
78219
- }, "runtime");
78220
- var state = /* @__PURE__ */ __name(function() {
78221
- return valOrPath(env3.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
78222
- }, "state");
78223
- return { cache, config: config49, data, runtime, state };
78224
- }, "windows");
78225
- var XDG_ = /* @__PURE__ */ (function() {
78226
- function XDG_2() {
78227
- function XDG() {
78228
- return new XDG_2();
78229
- }
78230
- __name(XDG, "XDG");
78231
- var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
78232
- XDG.cache = extension.cache;
78233
- XDG.config = extension.config;
78234
- XDG.data = extension.data;
78235
- XDG.runtime = extension.runtime;
78236
- XDG.state = extension.state;
78237
- XDG.configDirs = /* @__PURE__ */ __name(function configDirs() {
78238
- var pathList = env3.get("XDG_CONFIG_DIRS");
78239
- return __spreadArray2([extension.config()], pathList ? pathList.split(path52.delimiter) : []);
78240
- }, "configDirs");
78241
- XDG.dataDirs = /* @__PURE__ */ __name(function dataDirs() {
78242
- var pathList = env3.get("XDG_DATA_DIRS");
78243
- return __spreadArray2([extension.data()], pathList ? pathList.split(path52.delimiter) : []);
78244
- }, "dataDirs");
78245
- return XDG;
78246
- }
78247
- __name(XDG_2, "XDG_");
78248
- return XDG_2;
78249
- })();
78250
- return { XDG: new XDG_() };
78251
- }
78252
- __name(Adapt, "Adapt");
78253
- exports2.Adapt = Adapt;
78254
- }
78255
- });
78256
- var require_OSPaths = __commonJS2({
78257
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports2) {
78258
- var __spreadArray2 = exports2 && exports2.__spreadArray || function(to, from) {
78259
- for (var i = 0, il = from.length, j2 = to.length; i < il; i++, j2++)
78260
- to[j2] = from[i];
78261
- return to;
78262
- };
78263
- exports2.__esModule = true;
78264
- exports2.Adapt = void 0;
78265
- function isEmpty(s) {
78266
- return !s;
78267
- }
78268
- __name(isEmpty, "isEmpty");
78269
- function Adapt(adapter_) {
78270
- var env3 = adapter_.env, os22 = adapter_.os, path52 = adapter_.path;
78271
- var isWinOS = /^win/i.test(adapter_.process.platform);
78272
- function normalizePath(path_) {
78273
- return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
78274
- }
78275
- __name(normalizePath, "normalizePath");
78276
- function home() {
78277
- var posix = /* @__PURE__ */ __name(function() {
78278
- return normalizePath((typeof os22.homedir === "function" ? os22.homedir() : void 0) || env3.get("HOME"));
78279
- }, "posix");
78280
- var windows = /* @__PURE__ */ __name(function() {
78281
- var priorityList = [
78282
- typeof os22.homedir === "function" ? os22.homedir() : void 0,
78283
- env3.get("USERPROFILE"),
78284
- env3.get("HOME"),
78285
- env3.get("HOMEDRIVE") || env3.get("HOMEPATH") ? path52.join(env3.get("HOMEDRIVE") || "", env3.get("HOMEPATH") || "") : void 0
78286
- ];
78287
- return normalizePath(priorityList.find(function(v) {
78288
- return !isEmpty(v);
78289
- }));
78290
- }, "windows");
78291
- return isWinOS ? windows() : posix();
78292
- }
78293
- __name(home, "home");
78294
- function temp() {
78295
- function joinPathToBase(base, segments) {
78296
- return base ? path52.join.apply(path52, __spreadArray2([base], segments)) : void 0;
78297
- }
78298
- __name(joinPathToBase, "joinPathToBase");
78299
- function posix() {
78300
- var fallback = "/tmp";
78301
- var priorityList = [
78302
- typeof os22.tmpdir === "function" ? os22.tmpdir() : void 0,
78303
- env3.get("TMPDIR"),
78304
- env3.get("TEMP"),
78305
- env3.get("TMP")
78306
- ];
78307
- return normalizePath(priorityList.find(function(v) {
78308
- return !isEmpty(v);
78309
- })) || fallback;
78310
- }
78311
- __name(posix, "posix");
78312
- function windows() {
78313
- var fallback = "C:\\Temp";
78314
- var priorityListLazy = [
78315
- typeof os22.tmpdir === "function" ? os22.tmpdir : function() {
78316
- return void 0;
78317
- },
78318
- function() {
78319
- return env3.get("TEMP");
78320
- },
78321
- function() {
78322
- return env3.get("TMP");
78323
- },
78324
- function() {
78325
- return joinPathToBase(env3.get("LOCALAPPDATA"), ["Temp"]);
78326
- },
78327
- function() {
78328
- return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
78329
- },
78330
- function() {
78331
- return joinPathToBase(env3.get("ALLUSERSPROFILE"), ["Temp"]);
78332
- },
78333
- function() {
78334
- return joinPathToBase(env3.get("SystemRoot"), ["Temp"]);
78335
- },
78336
- function() {
78337
- return joinPathToBase(env3.get("windir"), ["Temp"]);
78338
- },
78339
- function() {
78340
- return joinPathToBase(env3.get("SystemDrive"), ["\\", "Temp"]);
78341
- }
78342
- ];
78343
- var v = priorityListLazy.find(function(v2) {
78344
- return v2 && !isEmpty(v2());
78345
- });
78346
- return v && normalizePath(v()) || fallback;
78347
- }
78348
- __name(windows, "windows");
78349
- return isWinOS ? windows() : posix();
78350
- }
78351
- __name(temp, "temp");
78352
- var OSPaths_ = /* @__PURE__ */ (function() {
78353
- function OSPaths_2() {
78354
- function OSPaths() {
78355
- return new OSPaths_2();
78356
- }
78357
- __name(OSPaths, "OSPaths");
78358
- OSPaths.home = home;
78359
- OSPaths.temp = temp;
78360
- return OSPaths;
78361
- }
78362
- __name(OSPaths_2, "OSPaths_");
78363
- return OSPaths_2;
78364
- })();
78365
- return { OSPaths: new OSPaths_() };
78366
- }
78367
- __name(Adapt, "Adapt");
78368
- exports2.Adapt = Adapt;
78369
- }
78370
- });
78371
- var require_node = __commonJS2({
78372
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports2) {
78373
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
78374
- if (k2 === void 0) k2 = k;
78375
- Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
78376
- return m[k];
78377
- }, "get") });
78378
- } : function(o, m, k, k2) {
78379
- if (k2 === void 0) k2 = k;
78380
- o[k2] = m[k];
78381
- });
78382
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
78383
- Object.defineProperty(o, "default", { enumerable: true, value: v });
78384
- } : function(o, v) {
78385
- o["default"] = v;
78386
- });
78387
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
78388
- if (mod && mod.__esModule) return mod;
78389
- var result = {};
78390
- if (mod != null) {
78391
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
78392
- }
78393
- __setModuleDefault2(result, mod);
78394
- return result;
78395
- };
78396
- exports2.__esModule = true;
78397
- exports2.adapter = void 0;
78398
- var os22 = __importStar2(__require("os"));
78399
- var path52 = __importStar2(__require("path"));
78400
- exports2.adapter = {
78401
- atImportPermissions: { env: true },
78402
- env: {
78403
- get: /* @__PURE__ */ __name(function(s) {
78404
- return process.env[s];
78405
- }, "get")
78406
- },
78407
- os: os22,
78408
- path: path52,
78409
- process
78410
- };
78411
- }
78412
- });
78413
- var require_mod_cjs = __commonJS2({
78414
- "../../node_modules/.pnpm/os-paths@7.4.0/node_modules/os-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
78415
- var OSPaths_js_1 = require_OSPaths();
78416
- var node_js_1 = require_node();
78417
- module2.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
78418
- }
78419
- });
78420
- var require_node2 = __commonJS2({
78421
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
78422
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
78423
- if (k2 === void 0) k2 = k;
78424
- Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
78425
- return m[k];
78426
- }, "get") });
78427
- } : function(o, m, k, k2) {
78428
- if (k2 === void 0) k2 = k;
78429
- o[k2] = m[k];
78430
- });
78431
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
78432
- Object.defineProperty(o, "default", { enumerable: true, value: v });
78433
- } : function(o, v) {
78434
- o["default"] = v;
78435
- });
78436
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
78437
- if (mod && mod.__esModule) return mod;
78438
- var result = {};
78439
- if (mod != null) {
78440
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
78441
- }
78442
- __setModuleDefault2(result, mod);
78443
- return result;
78444
- };
78445
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
78446
- return mod && mod.__esModule ? mod : { "default": mod };
78447
- };
78448
- exports2.__esModule = true;
78449
- exports2.adapter = void 0;
78450
- var path52 = __importStar2(__require("path"));
78451
- var os_paths_1 = __importDefault2(require_mod_cjs());
78452
- exports2.adapter = {
78453
- atImportPermissions: { env: true },
78454
- env: {
78455
- get: /* @__PURE__ */ __name(function(s) {
78456
- return process.env[s];
78457
- }, "get")
78458
- },
78459
- osPaths: os_paths_1["default"],
78460
- path: path52,
78461
- process
78462
- };
78463
- }
78464
- });
78465
- var require_mod_cjs2 = __commonJS2({
78466
- "../../node_modules/.pnpm/xdg-portable@10.6.0/node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports2, module2) {
78467
- var XDG_js_1 = require_XDG();
78468
- var node_js_1 = require_node2();
78469
- module2.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
78470
- }
78471
- });
78472
- var require_node3 = __commonJS2({
78473
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
78474
- var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
78475
- if (k2 === void 0) k2 = k;
78476
- Object.defineProperty(o, k2, { enumerable: true, get: /* @__PURE__ */ __name(function() {
78477
- return m[k];
78478
- }, "get") });
78479
- } : function(o, m, k, k2) {
78480
- if (k2 === void 0) k2 = k;
78481
- o[k2] = m[k];
78482
- });
78483
- var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? function(o, v) {
78484
- Object.defineProperty(o, "default", { enumerable: true, value: v });
78485
- } : function(o, v) {
78486
- o["default"] = v;
78487
- });
78488
- var __importStar2 = exports2 && exports2.__importStar || function(mod) {
78489
- if (mod && mod.__esModule) return mod;
78490
- var result = {};
78491
- if (mod != null) {
78492
- for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k);
78493
- }
78494
- __setModuleDefault2(result, mod);
78495
- return result;
78496
- };
78497
- var __importDefault2 = exports2 && exports2.__importDefault || function(mod) {
78498
- return mod && mod.__esModule ? mod : { "default": mod };
78499
- };
78500
- exports2.__esModule = true;
78501
- exports2.adapter = void 0;
78502
- var path52 = __importStar2(__require("path"));
78503
- var xdg_portable_1 = __importDefault2(require_mod_cjs2());
78504
- exports2.adapter = {
78505
- atImportPermissions: { env: true, read: true },
78506
- meta: {
78507
- mainFilename: /* @__PURE__ */ __name(function() {
78508
- var requireMain = typeof __require !== "undefined" && __require !== null && __require.main ? __require.main : { filename: void 0 };
78509
- var requireMainFilename = requireMain.filename;
78510
- var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
78511
- return filename;
78512
- }, "mainFilename"),
78513
- pkgMainFilename: /* @__PURE__ */ __name(function() {
78514
- return process.pkg ? process.execPath : void 0;
78515
- }, "pkgMainFilename")
78516
- },
78517
- path: path52,
78518
- process,
78519
- xdg: xdg_portable_1["default"]
78520
- };
78521
- }
78522
- });
78523
- var require_mod_cjs3 = __commonJS2({
78524
- "../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
78525
- var XDGAppPaths_js_1 = require_XDGAppPaths();
78526
- var node_js_1 = require_node3();
78527
- module2.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
78528
- }
78529
- });
78530
- var require_signals = __commonJS2({
78531
- "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports2, module2) {
78532
- module2.exports = [
78533
- "SIGABRT",
78534
- "SIGALRM",
78535
- "SIGHUP",
78536
- "SIGINT",
78537
- "SIGTERM"
78538
- ];
78539
- if (process.platform !== "win32") {
78540
- module2.exports.push(
78541
- "SIGVTALRM",
78542
- "SIGXCPU",
78543
- "SIGXFSZ",
78544
- "SIGUSR2",
78545
- "SIGTRAP",
78546
- "SIGSYS",
78547
- "SIGQUIT",
78548
- "SIGIOT"
78549
- // should detect profiler and enable/disable accordingly.
78550
- // see #21
78551
- // 'SIGPROF'
78552
- );
78553
- }
78554
- if (process.platform === "linux") {
78555
- module2.exports.push(
78556
- "SIGIO",
78557
- "SIGPOLL",
78558
- "SIGPWR",
78559
- "SIGSTKFLT",
78560
- "SIGUNUSED"
78561
- );
78562
- }
78563
- }
78564
- });
78565
- var require_signal_exit = __commonJS2({
78566
- "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports2, module2) {
78567
- var process22 = global.process;
78568
- var processOk = /* @__PURE__ */ __name(function(process32) {
78569
- return process32 && typeof process32 === "object" && typeof process32.removeListener === "function" && typeof process32.emit === "function" && typeof process32.reallyExit === "function" && typeof process32.listeners === "function" && typeof process32.kill === "function" && typeof process32.pid === "number" && typeof process32.on === "function";
78570
- }, "processOk");
78571
- if (!processOk(process22)) {
78572
- module2.exports = function() {
78573
- return function() {
78574
- };
78575
- };
78576
- } else {
78577
- assert32 = __require("assert");
78578
- signals = require_signals();
78579
- isWin = /^win/i.test(process22.platform);
78580
- EE = __require("events");
78581
- if (typeof EE !== "function") {
78582
- EE = EE.EventEmitter;
78583
- }
78584
- if (process22.__signal_exit_emitter__) {
78585
- emitter = process22.__signal_exit_emitter__;
78586
- } else {
78587
- emitter = process22.__signal_exit_emitter__ = new EE();
78588
- emitter.count = 0;
78589
- emitter.emitted = {};
78590
- }
78591
- if (!emitter.infinite) {
78592
- emitter.setMaxListeners(Infinity);
78593
- emitter.infinite = true;
78594
- }
78595
- module2.exports = function(cb, opts) {
78596
- if (!processOk(global.process)) {
78597
- return function() {
78598
- };
78599
- }
78600
- assert32.equal(typeof cb, "function", "a callback must be provided for exit handler");
78601
- if (loaded === false) {
78602
- load();
78603
- }
78604
- var ev = "exit";
78605
- if (opts && opts.alwaysLast) {
78606
- ev = "afterexit";
78607
- }
78608
- var remove = /* @__PURE__ */ __name(function() {
78609
- emitter.removeListener(ev, cb);
78610
- if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
78611
- unload();
78612
- }
78613
- }, "remove");
78614
- emitter.on(ev, cb);
78615
- return remove;
78616
- };
78617
- unload = /* @__PURE__ */ __name(function unload2() {
78618
- if (!loaded || !processOk(global.process)) {
78619
- return;
78620
- }
78621
- loaded = false;
78622
- signals.forEach(function(sig) {
78623
- try {
78624
- process22.removeListener(sig, sigListeners[sig]);
78625
- } catch (er) {
78626
- }
78627
- });
78628
- process22.emit = originalProcessEmit;
78629
- process22.reallyExit = originalProcessReallyExit;
78630
- emitter.count -= 1;
78631
- }, "unload");
78632
- module2.exports.unload = unload;
78633
- emit = /* @__PURE__ */ __name(function emit2(event, code, signal) {
78634
- if (emitter.emitted[event]) {
78635
- return;
78636
- }
78637
- emitter.emitted[event] = true;
78638
- emitter.emit(event, code, signal);
78639
- }, "emit");
78640
- sigListeners = {};
78641
- signals.forEach(function(sig) {
78642
- sigListeners[sig] = /* @__PURE__ */ __name(function listener() {
78643
- if (!processOk(global.process)) {
78644
- return;
78645
- }
78646
- var listeners = process22.listeners(sig);
78647
- if (listeners.length === emitter.count) {
78648
- unload();
78649
- emit("exit", null, sig);
78650
- emit("afterexit", null, sig);
78651
- if (isWin && sig === "SIGHUP") {
78652
- sig = "SIGINT";
78653
- }
78654
- process22.kill(process22.pid, sig);
78655
- }
78656
- }, "listener");
78657
- });
78658
- module2.exports.signals = function() {
78659
- return signals;
78660
- };
78661
- loaded = false;
78662
- load = /* @__PURE__ */ __name(function load2() {
78663
- if (loaded || !processOk(global.process)) {
78664
- return;
78665
- }
78666
- loaded = true;
78667
- emitter.count += 1;
78668
- signals = signals.filter(function(sig) {
78669
- try {
78670
- process22.on(sig, sigListeners[sig]);
78671
- return true;
78672
- } catch (er) {
78673
- return false;
78674
- }
78675
- });
78676
- process22.emit = processEmit;
78677
- process22.reallyExit = processReallyExit;
78678
- }, "load");
78679
- module2.exports.load = load;
78680
- originalProcessReallyExit = process22.reallyExit;
78681
- processReallyExit = /* @__PURE__ */ __name(function processReallyExit2(code) {
78682
- if (!processOk(global.process)) {
78683
- return;
78684
- }
78685
- process22.exitCode = code || /* istanbul ignore next */
78686
- 0;
78687
- emit("exit", process22.exitCode, null);
78688
- emit("afterexit", process22.exitCode, null);
78689
- originalProcessReallyExit.call(process22, process22.exitCode);
78690
- }, "processReallyExit");
78691
- originalProcessEmit = process22.emit;
78692
- processEmit = /* @__PURE__ */ __name(function processEmit2(ev, arg) {
78693
- if (ev === "exit" && processOk(global.process)) {
78694
- if (arg !== void 0) {
78695
- process22.exitCode = arg;
78696
- }
78697
- var ret = originalProcessEmit.apply(this, arguments);
78698
- emit("exit", process22.exitCode, null);
78699
- emit("afterexit", process22.exitCode, null);
78700
- return ret;
78701
- } else {
78702
- return originalProcessEmit.apply(this, arguments);
78703
- }
78704
- }, "processEmit");
78705
- }
78706
- var assert32;
78707
- var signals;
78708
- var isWin;
78709
- var EE;
78710
- var emitter;
78711
- var unload;
78712
- var emit;
78713
- var sigListeners;
78714
- var loaded;
78715
- var load;
78716
- var originalProcessReallyExit;
78717
- var processReallyExit;
78718
- var originalProcessEmit;
78719
- var processEmit;
78720
- }
78721
- });
78722
77720
  var require_command_exists = __commonJS2({
78723
77721
  "../../node_modules/.pnpm/command-exists@1.2.9/node_modules/command-exists/lib/command-exists.js"(exports2, module2) {
78724
77722
  var exec4 = __require("child_process").exec;
78725
77723
  var execSync = __require("child_process").execSync;
78726
77724
  var fs32 = __require("fs");
78727
- var path52 = __require("path");
77725
+ var path42 = __require("path");
78728
77726
  var access = fs32.access;
78729
77727
  var accessSync2 = fs32.accessSync;
78730
77728
  var constants2 = fs32.constants || fs32;
@@ -78828,8 +77826,8 @@ var require_command_exists = __commonJS2({
78828
77826
  cleanInput = /* @__PURE__ */ __name(function(s) {
78829
77827
  var isPathName = /[\\]/.test(s);
78830
77828
  if (isPathName) {
78831
- var dirname22 = '"' + path52.dirname(s) + '"';
78832
- var basename22 = '"' + path52.basename(s) + '"';
77829
+ var dirname22 = '"' + path42.dirname(s) + '"';
77830
+ var basename22 = '"' + path42.basename(s) + '"';
78833
77831
  return dirname22 + ":" + basename22;
78834
77832
  }
78835
77833
  return '"' + s + '"';
@@ -78889,7 +77887,7 @@ var require_ini = __commonJS2({
78889
77887
  opt.whitespace = opt.whitespace === true;
78890
77888
  }
78891
77889
  var separator = opt.whitespace ? " = " : "=";
78892
- Object.keys(obj).forEach(function(k, _2, __) {
77890
+ Object.keys(obj).forEach(function(k, _, __) {
78893
77891
  var val = obj[k];
78894
77892
  if (val && Array.isArray(val)) {
78895
77893
  val.forEach(function(item) {
@@ -78902,7 +77900,7 @@ var require_ini = __commonJS2({
78902
77900
  });
78903
77901
  if (opt.section && out.length)
78904
77902
  out = "[" + safe(opt.section) + "]" + eol + out;
78905
- children.forEach(function(k, _2, __) {
77903
+ children.forEach(function(k, _, __) {
78906
77904
  var nk = dotSplit(k).join("\\.");
78907
77905
  var section = (opt.section ? opt.section + "." : "") + nk;
78908
77906
  var child = encode(obj[k], {
@@ -78928,7 +77926,7 @@ var require_ini = __commonJS2({
78928
77926
  var section = null;
78929
77927
  var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
78930
77928
  var lines = str.split(/[\r\n]+/g);
78931
- lines.forEach(function(line, _2, __) {
77929
+ lines.forEach(function(line, _, __) {
78932
77930
  if (!line || line.match(/^\s*[;#]/))
78933
77931
  return;
78934
77932
  var match = line.match(re);
@@ -78967,14 +77965,14 @@ var require_ini = __commonJS2({
78967
77965
  else
78968
77966
  p2[key] = value;
78969
77967
  });
78970
- Object.keys(out).filter(function(k, _2, __) {
77968
+ Object.keys(out).filter(function(k, _, __) {
78971
77969
  if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k]))
78972
77970
  return false;
78973
77971
  var parts = dotSplit(k);
78974
77972
  var p22 = out;
78975
77973
  var l = parts.pop();
78976
77974
  var nl = l.replace(/\\\./g, ".");
78977
- parts.forEach(function(part, _3, __2) {
77975
+ parts.forEach(function(part, _2, __2) {
78978
77976
  if (part === "__proto__")
78979
77977
  return;
78980
77978
  if (!p22[part] || typeof p22[part] !== "object")
@@ -78985,7 +77983,7 @@ var require_ini = __commonJS2({
78985
77983
  return false;
78986
77984
  p22[nl] = out[k];
78987
77985
  return true;
78988
- }).forEach(function(del, _2, __) {
77986
+ }).forEach(function(del, _, __) {
78989
77987
  delete out[del];
78990
77988
  });
78991
77989
  return out;
@@ -79006,7 +78004,7 @@ var require_ini = __commonJS2({
79006
78004
  val = val.substr(1, val.length - 2);
79007
78005
  try {
79008
78006
  val = JSON.parse(val);
79009
- } catch (_2) {
78007
+ } catch (_) {
79010
78008
  }
79011
78009
  } else {
79012
78010
  var esc = false;
@@ -79105,7 +78103,7 @@ var require_utils2 = __commonJS2({
79105
78103
  "../../node_modules/.pnpm/rc@1.2.8/node_modules/rc/lib/utils.js"(exports2) {
79106
78104
  var fs32 = __require("fs");
79107
78105
  var ini = require_ini();
79108
- var path52 = __require("path");
78106
+ var path42 = __require("path");
79109
78107
  var stripJsonComments = require_strip_json_comments();
79110
78108
  var parse10 = exports2.parse = function(content) {
79111
78109
  if (/^\s*{/.test(content))
@@ -79119,7 +78117,7 @@ var require_utils2 = __commonJS2({
79119
78117
  for (var i in args)
79120
78118
  if ("string" !== typeof args[i])
79121
78119
  return;
79122
- var file22 = path52.join.apply(null, args);
78120
+ var file22 = path42.join.apply(null, args);
79123
78121
  try {
79124
78122
  return fs32.readFileSync(file22, "utf-8");
79125
78123
  } catch (err) {
@@ -79156,15 +78154,15 @@ var require_utils2 = __commonJS2({
79156
78154
  return obj;
79157
78155
  };
79158
78156
  exports2.find = function() {
79159
- var rel = path52.join.apply(null, [].slice.call(arguments));
78157
+ var rel = path42.join.apply(null, [].slice.call(arguments));
79160
78158
  function find2(start, rel2) {
79161
- var file22 = path52.join(start, rel2);
78159
+ var file22 = path42.join(start, rel2);
79162
78160
  try {
79163
78161
  fs32.statSync(file22);
79164
78162
  return file22;
79165
78163
  } catch (err) {
79166
- if (path52.dirname(start) !== start)
79167
- return find2(path52.dirname(start), rel2);
78164
+ if (path42.dirname(start) !== start)
78165
+ return find2(path42.dirname(start), rel2);
79168
78166
  }
79169
78167
  }
79170
78168
  __name(find2, "find");
@@ -79628,7 +78626,7 @@ var require_registry_auth_token = __commonJS2({
79628
78626
  if (!options.recursive) {
79629
78627
  return /\/$/.test(checkUrl) ? void 0 : getRegistryAuthInfo(url.resolve(checkUrl, "."), options);
79630
78628
  }
79631
- parsed.pathname = url.resolve(normalizePath(pathname), "..") || "/";
78629
+ parsed.pathname = url.resolve(normalizePath2(pathname), "..") || "/";
79632
78630
  }
79633
78631
  return void 0;
79634
78632
  }
@@ -79640,10 +78638,10 @@ var require_registry_auth_token = __commonJS2({
79640
78638
  return void 0;
79641
78639
  }
79642
78640
  __name(getLegacyAuthInfo, "getLegacyAuthInfo");
79643
- function normalizePath(path52) {
79644
- return path52[path52.length - 1] === "/" ? path52 : path52 + "/";
78641
+ function normalizePath2(path42) {
78642
+ return path42[path42.length - 1] === "/" ? path42 : path42 + "/";
79645
78643
  }
79646
- __name(normalizePath, "normalizePath");
78644
+ __name(normalizePath2, "normalizePath");
79647
78645
  function getAuthInfoForUrl(regUrl, npmrc) {
79648
78646
  var bearerAuth = getBearerToken(npmrc[regUrl + tokenKey] || npmrc[regUrl + "/" + tokenKey]);
79649
78647
  if (bearerAuth) {
@@ -79838,6 +78836,14 @@ var require_update_check = __commonJS2({
79838
78836
  };
79839
78837
  }
79840
78838
  });
78839
+ function getDurableObjectExports(exports2) {
78840
+ return partitionExports(exports2)["durable-object"];
78841
+ }
78842
+ __name(getDurableObjectExports, "getDurableObjectExports");
78843
+ function hasDurableObjectExports(exports2) {
78844
+ return Object.keys(getDurableObjectExports(exports2)).length > 0;
78845
+ }
78846
+ __name(hasDurableObjectExports, "hasDurableObjectExports");
79841
78847
  var defaultWranglerConfig = {
79842
78848
  /* COMPUTED_FIELDS */
79843
78849
  configPath: void 0,
@@ -79929,6 +78935,7 @@ var defaultWranglerConfig = {
79929
78935
  jsx_factory: "React.createElement",
79930
78936
  jsx_fragment: "React.Fragment",
79931
78937
  migrations: [],
78938
+ exports: {},
79932
78939
  triggers: {
79933
78940
  crons: void 0
79934
78941
  },
@@ -80022,7 +79029,7 @@ var util;
80022
79029
  }
80023
79030
  __name(joinValues, "joinValues");
80024
79031
  util2.joinValues = joinValues;
80025
- util2.jsonStringifyReplacer = (_2, value) => {
79032
+ util2.jsonStringifyReplacer = (_, value) => {
80026
79033
  if (typeof value === "bigint") {
80027
79034
  return value.toString();
80028
79035
  }
@@ -80323,8 +79330,8 @@ function getErrorMap() {
80323
79330
  }
80324
79331
  __name(getErrorMap, "getErrorMap");
80325
79332
  var makeIssue = /* @__PURE__ */ __name((params) => {
80326
- const { data, path: path52, errorMaps, issueData } = params;
80327
- const fullPath = [...path52, ...issueData.path || []];
79333
+ const { data, path: path42, errorMaps, issueData } = params;
79334
+ const fullPath = [...path42, ...issueData.path || []];
80328
79335
  const fullIssue = {
80329
79336
  ...issueData,
80330
79337
  path: fullPath
@@ -80430,11 +79437,11 @@ var ParseInputLazyPath = class {
80430
79437
  static {
80431
79438
  __name(this, "ParseInputLazyPath");
80432
79439
  }
80433
- constructor(parent, value, path52, key) {
79440
+ constructor(parent, value, path42, key) {
80434
79441
  this._cachedPath = [];
80435
79442
  this.parent = parent;
80436
79443
  this.data = value;
80437
- this._path = path52;
79444
+ this._path = path42;
80438
79445
  this._key = key;
80439
79446
  }
80440
79447
  get path() {
@@ -83843,33 +82850,6 @@ z.object({
83843
82850
  }).strict().optional(),
83844
82851
  timeout: z.number().gte(0).or(z.string()).optional()
83845
82852
  }).strict();
83846
- var mod_esm_exports = {};
83847
- __export2(mod_esm_exports, {
83848
- default: () => mod_esm_default
83849
- });
83850
- var import_mod_cjs = __toESM2(require_mod_cjs3(), 1);
83851
- __reExport2(mod_esm_exports, __toESM2(require_mod_cjs3(), 1));
83852
- var mod_esm_default = import_mod_cjs.default;
83853
- function getGlobalConfigPath({
83854
- appName = "wrangler",
83855
- leadingDot = true,
83856
- useLegacyHomeDir = true
83857
- } = {}) {
83858
- const dirName = `${leadingDot ? "." : ""}${appName}`;
83859
- const configDir = mod_esm_default(dirName).config();
83860
- if (useLegacyHomeDir) {
83861
- const legacyConfigDir = import_node_path2.default.join(import_node_os2.default.homedir(), dirName);
83862
- if (isDirectory(legacyConfigDir)) {
83863
- return legacyConfigDir;
83864
- }
83865
- }
83866
- return configDir;
83867
- }
83868
- __name(getGlobalConfigPath, "getGlobalConfigPath");
83869
- function getGlobalWranglerConfigPath() {
83870
- return getGlobalConfigPath();
83871
- }
83872
- __name(getGlobalWranglerConfigPath, "getGlobalWranglerConfigPath");
83873
82853
  function getBooleanEnvironmentVariableFactory(options) {
83874
82854
  return () => {
83875
82855
  if (!(options.variableName in process.env) || process.env[options.variableName] === void 0) {
@@ -84014,7 +82994,7 @@ var getBuildPlatformFromEnv = getEnvironmentVariableFactory({
84014
82994
  var getRegistryPath = getEnvironmentVariableFactory({
84015
82995
  variableName: "WRANGLER_REGISTRY_PATH",
84016
82996
  defaultValue() {
84017
- return import_node_path2.default.join(getGlobalWranglerConfigPath(), "registry");
82997
+ return import_node_path3.default.join(getGlobalConfigPath(), "registry");
84018
82998
  }
84019
82999
  });
84020
83000
  var getD1ExtraLocationChoices = getEnvironmentVariableFactory({
@@ -84228,9 +83208,9 @@ Please add "${field}" to "env.${envName}".`
84228
83208
  return rawEnv[field] ?? defaultValue;
84229
83209
  }
84230
83210
  __name(notInheritable, "notInheritable");
84231
- function unwindPropertyPath(root, path52) {
83211
+ function unwindPropertyPath(root, path42) {
84232
83212
  let container = root;
84233
- const parts = path52.split(".");
83213
+ const parts = path42.split(".");
84234
83214
  for (let i = 0; i < parts.length - 1; i++) {
84235
83215
  if (!hasProperty(container, parts[i])) {
84236
83216
  return;
@@ -84473,10 +83453,10 @@ var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && va
84473
83453
  var validateUniqueNameProperty = /* @__PURE__ */ __name((diagnostics, field, value) => {
84474
83454
  if (Array.isArray(value)) {
84475
83455
  const nameCount = /* @__PURE__ */ new Map();
84476
- Object.entries(value).forEach(([_2, entry]) => {
83456
+ Object.entries(value).forEach(([_, entry]) => {
84477
83457
  nameCount.set(entry.name, (nameCount.get(entry.name) ?? 0) + 1);
84478
83458
  });
84479
- const duplicates = Array.from(nameCount.entries()).filter(([_2, count]) => count > 1).map(([name3]) => name3);
83459
+ const duplicates = Array.from(nameCount.entries()).filter(([_, count]) => count > 1).map(([name3]) => name3);
84480
83460
  if (duplicates.length > 0) {
84481
83461
  const list = duplicates.join('", "');
84482
83462
  diagnostics.errors.push(
@@ -84607,7 +83587,7 @@ function isPagesConfig(rawConfig) {
84607
83587
  __name(isPagesConfig, "isPagesConfig");
84608
83588
  function normalizeAndValidateConfig(rawConfig, configPath, userConfigPath, args, preserveOriginalMain = false) {
84609
83589
  const diagnostics = new Diagnostics(
84610
- `Processing ${configPath ? import_node_path2.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
83590
+ `Processing ${configPath ? import_node_path3.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
84611
83591
  );
84612
83592
  validateOptionalProperty(
84613
83593
  diagnostics,
@@ -84832,13 +83812,13 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
84832
83812
  // be configured in the Wrangler configuration file, but who knows, that may
84833
83813
  // change in the future, so we do a check anyway
84834
83814
  command2 && configPath ? Array.isArray(watch_dir) ? watch_dir.map(
84835
- (dir) => import_node_path2.default.relative(
83815
+ (dir) => import_node_path3.default.relative(
84836
83816
  process.cwd(),
84837
- import_node_path2.default.join(import_node_path2.default.dirname(configPath), `${dir}`)
83817
+ import_node_path3.default.join(import_node_path3.default.dirname(configPath), `${dir}`)
84838
83818
  )
84839
- ) : import_node_path2.default.relative(
83819
+ ) : import_node_path3.default.relative(
84840
83820
  process.cwd(),
84841
- import_node_path2.default.join(import_node_path2.default.dirname(configPath), `${watch_dir}`)
83821
+ import_node_path3.default.join(import_node_path3.default.dirname(configPath), `${watch_dir}`)
84842
83822
  ) : watch_dir
84843
83823
  ),
84844
83824
  cwd
@@ -84846,11 +83826,11 @@ function normalizeAndValidateBuild(diagnostics, rawEnv, rawBuild, configPath) {
84846
83826
  }
84847
83827
  __name(normalizeAndValidateBuild, "normalizeAndValidateBuild");
84848
83828
  function normalizeAndValidateMainField(configPath, rawMain) {
84849
- const configDir = import_node_path2.default.dirname(configPath ?? "wrangler.toml");
83829
+ const configDir = import_node_path3.default.dirname(configPath ?? "wrangler.toml");
84850
83830
  if (rawMain !== void 0) {
84851
83831
  if (typeof rawMain === "string") {
84852
- const directory = import_node_path2.default.resolve(configDir);
84853
- return import_node_path2.default.resolve(directory, rawMain);
83832
+ const directory = import_node_path3.default.resolve(configDir);
83833
+ return import_node_path3.default.resolve(directory, rawMain);
84854
83834
  } else {
84855
83835
  return rawMain;
84856
83836
  }
@@ -84860,11 +83840,11 @@ function normalizeAndValidateMainField(configPath, rawMain) {
84860
83840
  }
84861
83841
  __name(normalizeAndValidateMainField, "normalizeAndValidateMainField");
84862
83842
  function normalizeAndValidateBaseDirField(configPath, rawDir) {
84863
- const configDir = import_node_path2.default.dirname(configPath ?? "wrangler.toml");
83843
+ const configDir = import_node_path3.default.dirname(configPath ?? "wrangler.toml");
84864
83844
  if (rawDir !== void 0) {
84865
83845
  if (typeof rawDir === "string") {
84866
- const directory = import_node_path2.default.resolve(configDir);
84867
- return import_node_path2.default.resolve(directory, rawDir);
83846
+ const directory = import_node_path3.default.resolve(configDir);
83847
+ return import_node_path3.default.resolve(directory, rawDir);
84868
83848
  } else {
84869
83849
  return rawDir;
84870
83850
  }
@@ -84874,11 +83854,11 @@ function normalizeAndValidateBaseDirField(configPath, rawDir) {
84874
83854
  }
84875
83855
  __name(normalizeAndValidateBaseDirField, "normalizeAndValidateBaseDirField");
84876
83856
  function normalizeAndValidatePagesBuildOutputDir(configPath, rawPagesDir) {
84877
- const configDir = import_node_path2.default.dirname(configPath ?? "wrangler.toml");
83857
+ const configDir = import_node_path3.default.dirname(configPath ?? "wrangler.toml");
84878
83858
  if (rawPagesDir !== void 0) {
84879
83859
  if (typeof rawPagesDir === "string") {
84880
- const directory = import_node_path2.default.resolve(configDir);
84881
- return import_node_path2.default.resolve(directory, rawPagesDir);
83860
+ const directory = import_node_path3.default.resolve(configDir);
83861
+ return import_node_path3.default.resolve(directory, rawPagesDir);
84882
83862
  } else {
84883
83863
  return rawPagesDir;
84884
83864
  }
@@ -85019,11 +83999,12 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
85019
83999
  validateRequiredProperty(diagnostics, "site", "bucket", bucket, "string");
85020
84000
  validateTypedArray(diagnostics, "sites.include", include, "string");
85021
84001
  validateTypedArray(diagnostics, "sites.exclude", exclude, "string");
84002
+ const legacySiteEntryPoint = rawConfig.site["entry-point"];
85022
84003
  validateOptionalProperty(
85023
84004
  diagnostics,
85024
84005
  "site",
85025
84006
  "entry-point",
85026
- rawConfig.site["entry-point"],
84007
+ legacySiteEntryPoint,
85027
84008
  "string"
85028
84009
  );
85029
84010
  deprecated(
@@ -85032,16 +84013,16 @@ function normalizeAndValidateSite(diagnostics, configPath, rawConfig, mainEntryP
85032
84013
  `site.entry-point`,
85033
84014
  `Delete the \`site.entry-point\` field, then add the top level \`main\` field to your configuration file:
85034
84015
  \`\`\`
85035
- main = "${import_node_path2.default.join(
85036
- String(rawConfig.site["entry-point"]) || "workers-site",
85037
- import_node_path2.default.extname(String(rawConfig.site["entry-point"]) || "workers-site") ? "" : "index.js"
84016
+ main = "${import_node_path3.default.join(
84017
+ String(legacySiteEntryPoint) || "workers-site",
84018
+ import_node_path3.default.extname(String(legacySiteEntryPoint) || "workers-site") ? "" : "index.js"
85038
84019
  )}"
85039
84020
  \`\`\``,
85040
84021
  false,
85041
84022
  void 0,
85042
84023
  "warning"
85043
84024
  );
85044
- let siteEntryPoint = rawConfig.site["entry-point"];
84025
+ let siteEntryPoint = legacySiteEntryPoint;
85045
84026
  if (!mainEntryPoint && !siteEntryPoint) {
85046
84027
  diagnostics.warnings.push(
85047
84028
  `Because you've defined a [site] configuration, we're defaulting to "workers-site" for the deprecated \`site.entry-point\`field.
@@ -85059,9 +84040,9 @@ Delete the deprecated \`site.entry-point\` field from your config.`
85059
84040
  );
85060
84041
  }
85061
84042
  if (configPath && siteEntryPoint) {
85062
- siteEntryPoint = import_node_path2.default.relative(
84043
+ siteEntryPoint = import_node_path3.default.relative(
85063
84044
  process.cwd(),
85064
- import_node_path2.default.join(import_node_path2.default.dirname(configPath), siteEntryPoint)
84045
+ import_node_path3.default.join(import_node_path3.default.dirname(configPath), siteEntryPoint)
85065
84046
  );
85066
84047
  }
85067
84048
  return {
@@ -85107,9 +84088,9 @@ function normalizeAndValidateModulePaths(diagnostics, configPath, field, rawMapp
85107
84088
  for (const [name3, filePath] of Object.entries(rawMapping)) {
85108
84089
  if (isString(diagnostics, `${field}['${name3}']`, filePath, void 0)) {
85109
84090
  if (configPath) {
85110
- mapping[name3] = configPath ? import_node_path2.default.relative(
84091
+ mapping[name3] = configPath ? import_node_path3.default.relative(
85111
84092
  process.cwd(),
85112
- import_node_path2.default.join(import_node_path2.default.dirname(configPath), filePath)
84093
+ import_node_path3.default.join(import_node_path3.default.dirname(configPath), filePath)
85113
84094
  ) : filePath;
85114
84095
  }
85115
84096
  }
@@ -85669,6 +84650,14 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
85669
84650
  validateMigrations,
85670
84651
  []
85671
84652
  ),
84653
+ exports: inheritable(
84654
+ diagnostics,
84655
+ topLevelEnv,
84656
+ rawEnv,
84657
+ "exports",
84658
+ validateExports,
84659
+ {}
84660
+ ),
85672
84661
  kv_namespaces: notInheritable(
85673
84662
  diagnostics,
85674
84663
  topLevelEnv,
@@ -86118,12 +85107,18 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
86118
85107
  void 0
86119
85108
  )
86120
85109
  };
86121
- warnIfDurableObjectsHaveNoMigrations(
85110
+ warnIfDurableObjectsHaveNoLifecycleConfig(
86122
85111
  diagnostics,
86123
85112
  environment.durable_objects,
86124
85113
  environment.migrations,
85114
+ environment.exports,
86125
85115
  configPath
86126
85116
  );
85117
+ errorIfMigrationsAndExportsBothSet(
85118
+ diagnostics,
85119
+ environment.migrations,
85120
+ environment.exports
85121
+ );
86127
85122
  if (envName !== "top level") {
86128
85123
  validateAdditionalProperties(
86129
85124
  diagnostics,
@@ -86144,9 +85139,9 @@ function validateAndNormalizeTsconfig(diagnostics, topLevelEnv, rawEnv, configPa
86144
85139
  isString,
86145
85140
  void 0
86146
85141
  );
86147
- return configPath && tsconfig ? import_node_path2.default.relative(
85142
+ return configPath && tsconfig ? import_node_path3.default.relative(
86148
85143
  process.cwd(),
86149
- import_node_path2.default.join(import_node_path2.default.dirname(configPath), tsconfig)
85144
+ import_node_path3.default.join(import_node_path3.default.dirname(configPath), tsconfig)
86150
85145
  ) : tsconfig;
86151
85146
  }
86152
85147
  __name(validateAndNormalizeTsconfig, "validateAndNormalizeTsconfig");
@@ -87020,9 +86015,9 @@ function validateContainerApp(envName, topLevelName, configPath) {
87020
86015
  let resolvedBuildContextPath = void 0;
87021
86016
  try {
87022
86017
  if (isDockerfile(resolvedImage, configPath)) {
87023
- const baseDir = configPath ? import_node_path2.default.dirname(configPath) : process.cwd();
87024
- resolvedImage = import_node_path2.default.resolve(baseDir, resolvedImage);
87025
- resolvedBuildContextPath = containerAppOptional.image_build_context ? import_node_path2.default.resolve(baseDir, containerAppOptional.image_build_context) : import_node_path2.default.dirname(resolvedImage);
86018
+ const baseDir2 = configPath ? import_node_path3.default.dirname(configPath) : process.cwd();
86019
+ resolvedImage = import_node_path3.default.resolve(baseDir2, resolvedImage);
86020
+ resolvedBuildContextPath = containerAppOptional.image_build_context ? import_node_path3.default.resolve(baseDir2, containerAppOptional.image_build_context) : import_node_path3.default.dirname(resolvedImage);
87026
86021
  }
87027
86022
  } catch (err) {
87028
86023
  if (err instanceof Error && err.message) {
@@ -87691,6 +86686,38 @@ var validateD1Binding = /* @__PURE__ */ __name((diagnostics, field, value) => {
87691
86686
  );
87692
86687
  isValid2 = false;
87693
86688
  }
86689
+ if (!isOptionalProperty(value, "database_name", "string")) {
86690
+ diagnostics.errors.push(
86691
+ `"${field}" bindings should, optionally, have a string "database_name" field but got ${JSON.stringify(
86692
+ value
86693
+ )}.`
86694
+ );
86695
+ isValid2 = false;
86696
+ }
86697
+ if (!isOptionalProperty(value, "migrations_dir", "string")) {
86698
+ diagnostics.errors.push(
86699
+ `"${field}" bindings should, optionally, have a string "migrations_dir" field but got ${JSON.stringify(
86700
+ value
86701
+ )}.`
86702
+ );
86703
+ isValid2 = false;
86704
+ }
86705
+ if (!isOptionalProperty(value, "migrations_table", "string")) {
86706
+ diagnostics.errors.push(
86707
+ `"${field}" bindings should, optionally, have a string "migrations_table" field but got ${JSON.stringify(
86708
+ value
86709
+ )}.`
86710
+ );
86711
+ isValid2 = false;
86712
+ }
86713
+ if (!isOptionalProperty(value, "database_internal_env", "string")) {
86714
+ diagnostics.errors.push(
86715
+ `"${field}" bindings should, optionally, have a string "database_internal_env" field but got ${JSON.stringify(
86716
+ value
86717
+ )}.`
86718
+ );
86719
+ isValid2 = false;
86720
+ }
87694
86721
  validateAdditionalProperties(diagnostics, field, Object.keys(value), [
87695
86722
  "binding",
87696
86723
  "database_id",
@@ -89032,6 +88059,210 @@ var validateMigrations = /* @__PURE__ */ __name((diagnostics, field, value) => {
89032
88059
  }
89033
88060
  return valid;
89034
88061
  }, "validateMigrations");
88062
+ var VALID_EXPORT_STORAGES = /* @__PURE__ */ new Set(["sqlite", "legacy-kv"]);
88063
+ var JS_IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
88064
+ function validateDurableObjectExportProperties(diagnostics, className, durableObjectExport, allowedProperties) {
88065
+ let valid = true;
88066
+ for (const key of Object.keys(durableObjectExport)) {
88067
+ if (!allowedProperties.includes(key)) {
88068
+ diagnostics.errors.push(
88069
+ `"exports.${className}.${key}" is forbidden on state "${durableObjectExport.state ?? "created"}".`
88070
+ );
88071
+ valid = false;
88072
+ }
88073
+ }
88074
+ if (!valid) {
88075
+ diagnostics.errors.push(
88076
+ `Allowed properties are: ${ENGLISH.format(allowedProperties)}.`
88077
+ );
88078
+ }
88079
+ return valid;
88080
+ }
88081
+ __name(validateDurableObjectExportProperties, "validateDurableObjectExportProperties");
88082
+ function validateDurableObjectExport(diagnostics, className, durableObjectExport) {
88083
+ let valid = true;
88084
+ if (className === "") {
88085
+ diagnostics.errors.push(`"export" keys cannot be the empty string.`);
88086
+ valid = false;
88087
+ }
88088
+ switch (durableObjectExport.state) {
88089
+ case void 0:
88090
+ case "created": {
88091
+ if (typeof durableObjectExport.storage !== "string" || !VALID_EXPORT_STORAGES.has(durableObjectExport.storage)) {
88092
+ diagnostics.errors.push(
88093
+ `"exports.${className}.storage" is required for state "created" and must be one of ${ENGLISH.format(VALID_EXPORT_STORAGES)}, but got ${JSON.stringify(durableObjectExport.storage)}`
88094
+ );
88095
+ valid = false;
88096
+ }
88097
+ valid = validateDurableObjectExportProperties(
88098
+ diagnostics,
88099
+ className,
88100
+ durableObjectExport,
88101
+ ["type", "state", "storage"]
88102
+ ) && valid;
88103
+ break;
88104
+ }
88105
+ case "deleted": {
88106
+ valid = validateDurableObjectExportProperties(
88107
+ diagnostics,
88108
+ className,
88109
+ durableObjectExport,
88110
+ ["type", "state"]
88111
+ ) && valid;
88112
+ break;
88113
+ }
88114
+ case "renamed": {
88115
+ if (typeof durableObjectExport.renamed_to !== "string" || durableObjectExport.renamed_to === "") {
88116
+ diagnostics.errors.push(
88117
+ `"exports.${className}.renamed_to" is required for state "renamed" and must be a non-empty string.`
88118
+ );
88119
+ valid = false;
88120
+ } else {
88121
+ if (!JS_IDENTIFIER_RE.test(durableObjectExport.renamed_to)) {
88122
+ diagnostics.errors.push(
88123
+ `"exports.${className}.renamed_to" must be a valid JavaScript identifier (got "${durableObjectExport.renamed_to}").`
88124
+ );
88125
+ valid = false;
88126
+ }
88127
+ if (durableObjectExport.renamed_to === className) {
88128
+ diagnostics.errors.push(
88129
+ `"exports.${className}.renamed_to" cannot equal the source class name "${className}".`
88130
+ );
88131
+ valid = false;
88132
+ }
88133
+ }
88134
+ valid = validateDurableObjectExportProperties(
88135
+ diagnostics,
88136
+ className,
88137
+ durableObjectExport,
88138
+ ["type", "state", "renamed_to"]
88139
+ ) && valid;
88140
+ break;
88141
+ }
88142
+ case "transferred": {
88143
+ if (typeof durableObjectExport.transferred_to !== "string" || durableObjectExport.transferred_to === "") {
88144
+ diagnostics.errors.push(
88145
+ `"exports.${className}.transferred_to" is required for state "transferred" and must be a non-empty string.`
88146
+ );
88147
+ valid = false;
88148
+ }
88149
+ valid = validateDurableObjectExportProperties(
88150
+ diagnostics,
88151
+ className,
88152
+ durableObjectExport,
88153
+ ["type", "state", "transferred_to"]
88154
+ ) && valid;
88155
+ break;
88156
+ }
88157
+ case "expecting-transfer": {
88158
+ if (typeof durableObjectExport.storage !== "string" || !VALID_EXPORT_STORAGES.has(durableObjectExport.storage)) {
88159
+ diagnostics.errors.push(
88160
+ `"exports.${className}.storage" is required for state "expecting-transfer" and must be one of ${ENGLISH.format(VALID_EXPORT_STORAGES)}, but got ${JSON.stringify(durableObjectExport.storage)}`
88161
+ );
88162
+ valid = false;
88163
+ }
88164
+ if (typeof durableObjectExport.transfer_from !== "string" || durableObjectExport.transfer_from === "") {
88165
+ diagnostics.errors.push(
88166
+ `"exports.${className}.transfer_from" is required for state "expecting-transfer" and must be a non-empty string.`
88167
+ );
88168
+ valid = false;
88169
+ }
88170
+ valid = validateDurableObjectExportProperties(
88171
+ diagnostics,
88172
+ className,
88173
+ durableObjectExport,
88174
+ ["type", "state", "storage", "transfer_from"]
88175
+ ) && valid;
88176
+ break;
88177
+ }
88178
+ default: {
88179
+ const state = durableObjectExport.state;
88180
+ diagnostics.errors.push(
88181
+ `"exports.${className}.state" must be one of "created", "deleted", "renamed", "transferred", or "expecting-transfer" but got ${JSON.stringify(state)}.`
88182
+ );
88183
+ valid = false;
88184
+ }
88185
+ }
88186
+ return valid;
88187
+ }
88188
+ __name(validateDurableObjectExport, "validateDurableObjectExport");
88189
+ function validateWorkerExport(diagnostics, exportName, workerExport) {
88190
+ let valid = true;
88191
+ valid = validateAdditionalProperties(
88192
+ diagnostics,
88193
+ `exports.${exportName}`,
88194
+ Object.keys(workerExport),
88195
+ ["type", "cache"]
88196
+ ) && valid;
88197
+ valid = validateWorkerExportCache(
88198
+ diagnostics,
88199
+ `exports.${exportName}.cache`,
88200
+ workerExport.cache
88201
+ ) && valid;
88202
+ return valid;
88203
+ }
88204
+ __name(validateWorkerExport, "validateWorkerExport");
88205
+ function validateWorkerExportCache(diagnostics, field, value) {
88206
+ if (value === void 0) {
88207
+ return true;
88208
+ }
88209
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
88210
+ diagnostics.errors.push(
88211
+ `"${field}" should be an object but got ${JSON.stringify(value)}.`
88212
+ );
88213
+ return false;
88214
+ }
88215
+ const cache = value;
88216
+ let valid = true;
88217
+ valid = validateRequiredProperty(
88218
+ diagnostics,
88219
+ field,
88220
+ "enabled",
88221
+ cache.enabled,
88222
+ "boolean"
88223
+ ) && valid;
88224
+ valid = validateAdditionalProperties(diagnostics, field, Object.keys(cache), [
88225
+ "enabled"
88226
+ ]) && valid;
88227
+ return valid;
88228
+ }
88229
+ __name(validateWorkerExportCache, "validateWorkerExportCache");
88230
+ var validateExports = /* @__PURE__ */ __name((diagnostics, field, value) => {
88231
+ if (value === void 0 || value === null) {
88232
+ return true;
88233
+ }
88234
+ if (typeof value !== "object" || Array.isArray(value)) {
88235
+ diagnostics.errors.push(
88236
+ `The optional "${field}" field should be an object keyed by class name, but got ${JSON.stringify(
88237
+ value
88238
+ )}`
88239
+ );
88240
+ return false;
88241
+ }
88242
+ let valid = true;
88243
+ for (const [exportName, exportConfig] of Object.entries(value)) {
88244
+ if (typeof exportConfig !== "object" || exportConfig === null) {
88245
+ diagnostics.errors.push(
88246
+ `"exports.${exportName}" should be an object but got ${JSON.stringify(
88247
+ exportConfig
88248
+ )}.`
88249
+ );
88250
+ valid = false;
88251
+ continue;
88252
+ }
88253
+ if (exportConfig.type === "durable-object") {
88254
+ valid = validateDurableObjectExport(diagnostics, exportName, exportConfig) && valid;
88255
+ } else if (exportConfig.type === "worker") {
88256
+ valid = validateWorkerExport(diagnostics, exportName, exportConfig) && valid;
88257
+ } else {
88258
+ valid = false;
88259
+ diagnostics.errors.push(
88260
+ `"exports.${exportName}.type" must be "durable-object" or "worker", but got ${JSON.stringify(exportConfig.type)}.`
88261
+ );
88262
+ }
88263
+ }
88264
+ return valid;
88265
+ }, "validateExports");
89035
88266
  var validateObservability = /* @__PURE__ */ __name((diagnostics, field, value) => {
89036
88267
  if (value === void 0) {
89037
88268
  return true;
@@ -89187,43 +88418,71 @@ var validateCache = /* @__PURE__ */ __name((diagnostics, field, value) => {
89187
88418
  val.enabled,
89188
88419
  "boolean"
89189
88420
  ) && isValid2;
88421
+ isValid2 = validateOptionalProperty(
88422
+ diagnostics,
88423
+ field,
88424
+ "cross_version_cache",
88425
+ val.cross_version_cache,
88426
+ "boolean"
88427
+ ) && isValid2;
89190
88428
  isValid2 = validateAdditionalProperties(diagnostics, field, Object.keys(val), [
89191
- "enabled"
88429
+ "enabled",
88430
+ "cross_version_cache"
89192
88431
  ]) && isValid2;
89193
88432
  return isValid2;
89194
88433
  }, "validateCache");
89195
- function warnIfDurableObjectsHaveNoMigrations(diagnostics, durableObjects, migrations, configPath) {
89196
- if (Array.isArray(durableObjects.bindings) && durableObjects.bindings.length > 0) {
89197
- const exportedDurableObjects = (durableObjects.bindings || []).filter(
89198
- (binding) => !binding.script_name
89199
- );
89200
- if (exportedDurableObjects.length > 0 && migrations.length === 0) {
89201
- if (!exportedDurableObjects.some(
89202
- (exportedDurableObject) => typeof exportedDurableObject.class_name !== "string"
89203
- )) {
89204
- const durableObjectClassnames = exportedDurableObjects.map(
89205
- (durable) => durable.class_name
89206
- );
89207
- diagnostics.warnings.push(dedent`
89208
- In your ${configFileName(configPath)} file, you have configured \`durable_objects\` exported by this Worker (${durableObjectClassnames.join(", ")}), but no \`migrations\` for them. This may not work as expected until you add a \`migrations\` section to your ${configFileName(configPath)} file. Add the following configuration:
89209
-
89210
- \`\`\`
89211
- ${formatConfigSnippet(
89212
- {
89213
- migrations: [
89214
- { tag: "v1", new_sqlite_classes: durableObjectClassnames }
89215
- ]
89216
- },
89217
- configPath
89218
- )}
89219
- \`\`\`
89220
-
89221
- Refer to https://developers.cloudflare.com/durable-objects/reference/durable-objects-migrations/ for more details.`);
89222
- }
88434
+ function warnIfDurableObjectsHaveNoLifecycleConfig(diagnostics, durableObjects, migrations, exports2, configPath) {
88435
+ if (!Array.isArray(durableObjects.bindings) || durableObjects.bindings.length === 0) {
88436
+ return;
88437
+ }
88438
+ const exportedDurableObjects = durableObjects.bindings.filter(
88439
+ (binding) => !binding.script_name
88440
+ );
88441
+ const exportsCovers = /* @__PURE__ */ __name((className) => {
88442
+ const entry = exports2?.[className];
88443
+ if (entry === void 0 || entry.type !== "durable-object") {
88444
+ return false;
89223
88445
  }
88446
+ const state = entry.state ?? "created";
88447
+ return state === "created" || state === "expecting-transfer";
88448
+ }, "exportsCovers");
88449
+ const uncoveredByExports = exportedDurableObjects.filter(
88450
+ (binding) => typeof binding.class_name !== "string" || !exportsCovers(binding.class_name)
88451
+ );
88452
+ if (uncoveredByExports.length === 0 || migrations.length > 0) {
88453
+ return;
88454
+ }
88455
+ if (uncoveredByExports.some(
88456
+ (exportedDurableObject) => typeof exportedDurableObject.class_name !== "string"
88457
+ )) {
88458
+ return;
88459
+ }
88460
+ const durableObjectClassnames = uncoveredByExports.map(
88461
+ (durable) => durable.class_name
88462
+ );
88463
+ const suggestedExports = {};
88464
+ for (const className of durableObjectClassnames) {
88465
+ suggestedExports[className] = {
88466
+ type: "durable-object",
88467
+ storage: "sqlite"
88468
+ };
88469
+ }
88470
+ diagnostics.warnings.push(dedent`
88471
+ In your ${configFileName(configPath)} file, you have configured \`durable_objects\` exported by this Worker (${durableObjectClassnames.join(", ")}), but no live \`exports\` entry for them. This may not work as expected until you add a live \`durable-object\` entry to \`exports\` for each. Add the following configuration:
88472
+
88473
+ \`\`\`
88474
+ ${formatConfigSnippet({ exports: suggestedExports }, configPath)}
88475
+ \`\`\``);
88476
+ }
88477
+ __name(warnIfDurableObjectsHaveNoLifecycleConfig, "warnIfDurableObjectsHaveNoLifecycleConfig");
88478
+ function errorIfMigrationsAndExportsBothSet(diagnostics, migrations, exports2) {
88479
+ if (migrations.length > 0 && exports2 !== void 0 && Object.values(exports2).some((entry) => entry.type === "durable-object")) {
88480
+ diagnostics.errors.push(
88481
+ `\`migrations\` and \`exports\` are mutually exclusive. Choose one or the other to declare your Durable Object lifecycle, but not both.`
88482
+ );
89224
88483
  }
89225
88484
  }
89226
- __name(warnIfDurableObjectsHaveNoMigrations, "warnIfDurableObjectsHaveNoMigrations");
88485
+ __name(errorIfMigrationsAndExportsBothSet, "errorIfMigrationsAndExportsBothSet");
89227
88486
  var validatePythonModules = /* @__PURE__ */ __name((diagnostics, field, value, topLevelEnv) => {
89228
88487
  if (value === void 0) {
89229
88488
  return true;
@@ -89256,9 +88515,9 @@ function isRemoteValid(targetObject, fieldPath, diagnostics) {
89256
88515
  }
89257
88516
  __name(isRemoteValid, "isRemoteValid");
89258
88517
  function isDockerfile(imagePath, configPath) {
89259
- const baseDir = configPath ? import_node_path2.default.dirname(configPath) : process.cwd();
89260
- const maybeDockerfile = import_node_path2.default.resolve(baseDir, imagePath);
89261
- if (import_node_fs2.default.existsSync(maybeDockerfile)) {
88518
+ const baseDir2 = configPath ? import_node_path3.default.dirname(configPath) : process.cwd();
88519
+ const maybeDockerfile = import_node_path3.default.resolve(baseDir2, imagePath);
88520
+ if (import_node_fs3.default.existsSync(maybeDockerfile)) {
89262
88521
  if (isDirectory(maybeDockerfile)) {
89263
88522
  throw new UserError(
89264
88523
  `${imagePath} is a directory, you should specify a path to the Dockerfile`,
@@ -89477,10 +88736,268 @@ Pages requires Durable Object bindings to specify the name of the Worker where t
89477
88736
  }
89478
88737
  }
89479
88738
  __name(validateDurableObjectBinding2, "validateDurableObjectBinding");
89480
- var import_signal_exit = __toESM2(require_signal_exit());
88739
+ var signals = [];
88740
+ signals.push("SIGHUP", "SIGINT", "SIGTERM");
88741
+ if (process.platform !== "win32") {
88742
+ signals.push(
88743
+ "SIGALRM",
88744
+ "SIGABRT",
88745
+ "SIGVTALRM",
88746
+ "SIGXCPU",
88747
+ "SIGXFSZ",
88748
+ "SIGUSR2",
88749
+ "SIGTRAP",
88750
+ "SIGSYS",
88751
+ "SIGQUIT",
88752
+ "SIGIOT"
88753
+ // should detect profiler and enable/disable accordingly.
88754
+ // see #21
88755
+ // 'SIGPROF'
88756
+ );
88757
+ }
88758
+ if (process.platform === "linux") {
88759
+ signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
88760
+ }
88761
+ var processOk = /* @__PURE__ */ __name((process32) => !!process32 && typeof process32 === "object" && typeof process32.removeListener === "function" && typeof process32.emit === "function" && typeof process32.reallyExit === "function" && typeof process32.listeners === "function" && typeof process32.kill === "function" && typeof process32.pid === "number" && typeof process32.on === "function", "processOk");
88762
+ var kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
88763
+ var global2 = globalThis;
88764
+ var ObjectDefineProperty = Object.defineProperty.bind(Object);
88765
+ var Emitter = class {
88766
+ static {
88767
+ __name(this, "Emitter");
88768
+ }
88769
+ emitted = {
88770
+ afterExit: false,
88771
+ exit: false
88772
+ };
88773
+ listeners = {
88774
+ afterExit: [],
88775
+ exit: []
88776
+ };
88777
+ count = 0;
88778
+ id = Math.random();
88779
+ constructor() {
88780
+ if (global2[kExitEmitter]) {
88781
+ return global2[kExitEmitter];
88782
+ }
88783
+ ObjectDefineProperty(global2, kExitEmitter, {
88784
+ value: this,
88785
+ writable: false,
88786
+ enumerable: false,
88787
+ configurable: false
88788
+ });
88789
+ }
88790
+ on(ev, fn) {
88791
+ this.listeners[ev].push(fn);
88792
+ }
88793
+ removeListener(ev, fn) {
88794
+ const list = this.listeners[ev];
88795
+ const i = list.indexOf(fn);
88796
+ if (i === -1) {
88797
+ return;
88798
+ }
88799
+ if (i === 0 && list.length === 1) {
88800
+ list.length = 0;
88801
+ } else {
88802
+ list.splice(i, 1);
88803
+ }
88804
+ }
88805
+ emit(ev, code, signal) {
88806
+ if (this.emitted[ev]) {
88807
+ return false;
88808
+ }
88809
+ this.emitted[ev] = true;
88810
+ let ret = false;
88811
+ for (const fn of this.listeners[ev]) {
88812
+ ret = fn(code, signal) === true || ret;
88813
+ }
88814
+ if (ev === "exit") {
88815
+ ret = this.emit("afterExit", code, signal) || ret;
88816
+ }
88817
+ return ret;
88818
+ }
88819
+ };
88820
+ var SignalExitBase = class {
88821
+ static {
88822
+ __name(this, "SignalExitBase");
88823
+ }
88824
+ };
88825
+ var signalExitWrap = /* @__PURE__ */ __name((handler) => {
88826
+ return {
88827
+ onExit(cb, opts) {
88828
+ return handler.onExit(cb, opts);
88829
+ },
88830
+ load() {
88831
+ return handler.load();
88832
+ },
88833
+ unload() {
88834
+ return handler.unload();
88835
+ }
88836
+ };
88837
+ }, "signalExitWrap");
88838
+ var SignalExitFallback = class extends SignalExitBase {
88839
+ static {
88840
+ __name(this, "SignalExitFallback");
88841
+ }
88842
+ onExit() {
88843
+ return () => {
88844
+ };
88845
+ }
88846
+ load() {
88847
+ }
88848
+ unload() {
88849
+ }
88850
+ };
88851
+ var SignalExit = class extends SignalExitBase {
88852
+ static {
88853
+ __name(this, "SignalExit");
88854
+ }
88855
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
88856
+ // so use a supported signal instead
88857
+ /* c8 ignore start */
88858
+ #hupSig = process22.platform === "win32" ? "SIGINT" : "SIGHUP";
88859
+ /* c8 ignore stop */
88860
+ #emitter = new Emitter();
88861
+ #process;
88862
+ #originalProcessEmit;
88863
+ #originalProcessReallyExit;
88864
+ #sigListeners = {};
88865
+ #loaded = false;
88866
+ constructor(process32) {
88867
+ super();
88868
+ this.#process = process32;
88869
+ this.#sigListeners = {};
88870
+ for (const sig of signals) {
88871
+ this.#sigListeners[sig] = () => {
88872
+ const listeners = this.#process.listeners(sig);
88873
+ let { count } = this.#emitter;
88874
+ const p2 = process32;
88875
+ if (typeof p2.__signal_exit_emitter__ === "object" && typeof p2.__signal_exit_emitter__.count === "number") {
88876
+ count += p2.__signal_exit_emitter__.count;
88877
+ }
88878
+ if (listeners.length === count) {
88879
+ this.unload();
88880
+ const ret = this.#emitter.emit("exit", null, sig);
88881
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
88882
+ if (!ret)
88883
+ process32.kill(process32.pid, s);
88884
+ }
88885
+ };
88886
+ }
88887
+ this.#originalProcessReallyExit = process32.reallyExit;
88888
+ this.#originalProcessEmit = process32.emit;
88889
+ }
88890
+ onExit(cb, opts) {
88891
+ if (!processOk(this.#process)) {
88892
+ return () => {
88893
+ };
88894
+ }
88895
+ if (this.#loaded === false) {
88896
+ this.load();
88897
+ }
88898
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
88899
+ this.#emitter.on(ev, cb);
88900
+ return () => {
88901
+ this.#emitter.removeListener(ev, cb);
88902
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
88903
+ this.unload();
88904
+ }
88905
+ };
88906
+ }
88907
+ load() {
88908
+ if (this.#loaded) {
88909
+ return;
88910
+ }
88911
+ this.#loaded = true;
88912
+ this.#emitter.count += 1;
88913
+ for (const sig of signals) {
88914
+ try {
88915
+ const fn = this.#sigListeners[sig];
88916
+ if (fn)
88917
+ this.#process.on(sig, fn);
88918
+ } catch (_) {
88919
+ }
88920
+ }
88921
+ this.#process.emit = (ev, ...a) => {
88922
+ return this.#processEmit(ev, ...a);
88923
+ };
88924
+ this.#process.reallyExit = (code) => {
88925
+ return this.#processReallyExit(code);
88926
+ };
88927
+ }
88928
+ unload() {
88929
+ if (!this.#loaded) {
88930
+ return;
88931
+ }
88932
+ this.#loaded = false;
88933
+ signals.forEach((sig) => {
88934
+ const listener = this.#sigListeners[sig];
88935
+ if (!listener) {
88936
+ throw new Error("Listener not defined for signal: " + sig);
88937
+ }
88938
+ try {
88939
+ this.#process.removeListener(sig, listener);
88940
+ } catch (_) {
88941
+ }
88942
+ });
88943
+ this.#process.emit = this.#originalProcessEmit;
88944
+ this.#process.reallyExit = this.#originalProcessReallyExit;
88945
+ this.#emitter.count -= 1;
88946
+ }
88947
+ #processReallyExit(code) {
88948
+ if (!processOk(this.#process)) {
88949
+ return 0;
88950
+ }
88951
+ this.#process.exitCode = code || 0;
88952
+ this.#emitter.emit("exit", this.#process.exitCode, null);
88953
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
88954
+ }
88955
+ #processEmit(ev, ...args) {
88956
+ const og = this.#originalProcessEmit;
88957
+ if (ev === "exit" && processOk(this.#process)) {
88958
+ if (typeof args[0] === "number") {
88959
+ this.#process.exitCode = args[0];
88960
+ }
88961
+ const ret = og.call(this.#process, ev, ...args);
88962
+ this.#emitter.emit("exit", this.#process.exitCode, null);
88963
+ return ret;
88964
+ } else {
88965
+ return og.call(this.#process, ev, ...args);
88966
+ }
88967
+ }
88968
+ };
88969
+ var process22 = globalThis.process;
88970
+ var {
88971
+ /**
88972
+ * Called when the process is exiting, whether via signal, explicit
88973
+ * exit, or running out of stuff to do.
88974
+ *
88975
+ * If the global process object is not suitable for instrumentation,
88976
+ * then this will be a no-op.
88977
+ *
88978
+ * Returns a function that may be used to unload signal-exit.
88979
+ */
88980
+ onExit,
88981
+ /**
88982
+ * Load the listeners. Likely you never need to call this, unless
88983
+ * doing a rather deep integration with signal-exit functionality.
88984
+ * Mostly exposed for the benefit of testing.
88985
+ *
88986
+ * @internal
88987
+ */
88988
+ load,
88989
+ /**
88990
+ * Unload the listeners. Likely you never need to call this, unless
88991
+ * doing a rather deep integration with signal-exit functionality.
88992
+ * Mostly exposed for the benefit of testing.
88993
+ *
88994
+ * @internal
88995
+ */
88996
+ unload
88997
+ } = signalExitWrap(processOk(process22) ? new SignalExit(process22) : new SignalExitFallback());
89481
88998
  function getWranglerHiddenDirPath(projectRoot) {
89482
88999
  projectRoot ??= process.cwd();
89483
- return import_node_path2.default.join(projectRoot, ".wrangler");
89000
+ return import_node_path3.default.join(projectRoot, ".wrangler");
89484
89001
  }
89485
89002
  __name(getWranglerHiddenDirPath, "getWranglerHiddenDirPath");
89486
89003
  var STALE_WRANGLER_TMP_DIR_MS = 24 * 60 * 60 * 1e3;
@@ -89492,7 +89009,7 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
89492
89009
  sweptTmpRoots.add(tmpRoot);
89493
89010
  let entries;
89494
89011
  try {
89495
- entries = import_node_fs2.default.readdirSync(tmpRoot, { withFileTypes: true });
89012
+ entries = import_node_fs3.default.readdirSync(tmpRoot, { withFileTypes: true });
89496
89013
  } catch {
89497
89014
  return;
89498
89015
  }
@@ -89501,9 +89018,9 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
89501
89018
  if (!entry.isDirectory()) {
89502
89019
  continue;
89503
89020
  }
89504
- const entryPath = import_node_path2.default.join(tmpRoot, entry.name);
89021
+ const entryPath = import_node_path3.default.join(tmpRoot, entry.name);
89505
89022
  try {
89506
- if (import_node_fs2.default.statSync(entryPath).mtimeMs < cutoff) {
89023
+ if (import_node_fs3.default.statSync(entryPath).mtimeMs < cutoff) {
89507
89024
  removeDirSync(entryPath);
89508
89025
  }
89509
89026
  } catch {
@@ -89512,11 +89029,11 @@ function sweepStaleWranglerTmpDirs(tmpRoot) {
89512
89029
  }
89513
89030
  __name(sweepStaleWranglerTmpDirs, "sweepStaleWranglerTmpDirs");
89514
89031
  function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
89515
- const tmpRoot = import_node_path2.default.join(getWranglerHiddenDirPath(projectRoot), "tmp");
89516
- import_node_fs2.default.mkdirSync(tmpRoot, { recursive: true });
89032
+ const tmpRoot = import_node_path3.default.join(getWranglerHiddenDirPath(projectRoot), "tmp");
89033
+ import_node_fs3.default.mkdirSync(tmpRoot, { recursive: true });
89517
89034
  sweepStaleWranglerTmpDirs(tmpRoot);
89518
- const tmpPrefix = import_node_path2.default.join(tmpRoot, `${prefix}-`);
89519
- const tmpDir = import_node_fs2.default.realpathSync(import_node_fs2.default.mkdtempSync(tmpPrefix));
89035
+ const tmpPrefix = import_node_path3.default.join(tmpRoot, `${prefix}-`);
89036
+ const tmpDir = import_node_fs3.default.realpathSync(import_node_fs3.default.mkdtempSync(tmpPrefix));
89520
89037
  const cleanupDir = /* @__PURE__ */ __name(() => {
89521
89038
  if (cleanup) {
89522
89039
  try {
@@ -89525,7 +89042,7 @@ function getWranglerTmpDir(projectRoot, prefix, cleanup = true) {
89525
89042
  }
89526
89043
  }
89527
89044
  }, "cleanupDir");
89528
- const removeExitListener = (0, import_signal_exit.default)(cleanupDir);
89045
+ const removeExitListener = onExit(cleanupDir);
89529
89046
  return {
89530
89047
  path: tmpDir,
89531
89048
  remove() {
@@ -89543,7 +89060,7 @@ function sha256Hex(buffer) {
89543
89060
  }
89544
89061
  __name(sha256Hex, "sha256Hex");
89545
89062
  function getGoArch() {
89546
- const nodeArch = (0, import_node_os2.arch)();
89063
+ const nodeArch = (0, import_node_os3.arch)();
89547
89064
  switch (nodeArch) {
89548
89065
  case "x64":
89549
89066
  return "amd64";
@@ -89680,17 +89197,17 @@ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-
89680
89197
  }
89681
89198
  __name(getLatestVersionInfo, "getLatestVersionInfo");
89682
89199
  function getCacheDir(version3) {
89683
- return (0, import_node_path2.join)(getGlobalWranglerConfigPath(), "cloudflared", version3);
89200
+ return (0, import_node_path3.join)(getGlobalConfigPath(), "cloudflared", version3);
89684
89201
  }
89685
89202
  __name(getCacheDir, "getCacheDir");
89686
89203
  function getCloudflaredBinPath(version3) {
89687
89204
  const binName = process.platform === "win32" ? "cloudflared.exe" : "cloudflared";
89688
- return (0, import_node_path2.join)(getCacheDir(version3), binName);
89205
+ return (0, import_node_path3.join)(getCacheDir(version3), binName);
89689
89206
  }
89690
89207
  __name(getCloudflaredBinPath, "getCloudflaredBinPath");
89691
89208
  function isBinaryExecutable(binPath) {
89692
89209
  try {
89693
- (0, import_node_fs2.accessSync)(binPath, import_node_fs2.constants.X_OK);
89210
+ (0, import_node_fs3.accessSync)(binPath, import_node_fs3.constants.X_OK);
89694
89211
  return true;
89695
89212
  } catch {
89696
89213
  return false;
@@ -89725,7 +89242,7 @@ On Linux, make sure you have the required dependencies:
89725
89242
  errorMessage += ` - For Debian/Ubuntu: sudo apt-get install libc6
89726
89243
  `;
89727
89244
  }
89728
- const cacheDir = (0, import_node_path2.join)(getGlobalWranglerConfigPath(), "cloudflared");
89245
+ const cacheDir = (0, import_node_path3.join)(getGlobalConfigPath(), "cloudflared");
89729
89246
  errorMessage += `
89730
89247
  You can try:
89731
89248
  `;
@@ -89821,18 +89338,18 @@ Update: https://developers.cloudflare.com/cloudflare-one/networks/connectors/clo
89821
89338
  }
89822
89339
  __name(warnIfOutdated, "warnIfOutdated");
89823
89340
  function writeFileAtomic(filePath, contents) {
89824
- const dir = (0, import_node_path2.dirname)(filePath);
89825
- const tmpPath = (0, import_node_path2.join)(
89341
+ const dir = (0, import_node_path3.dirname)(filePath);
89342
+ const tmpPath = (0, import_node_path3.join)(
89826
89343
  dir,
89827
89344
  `.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`
89828
89345
  );
89829
89346
  try {
89830
- (0, import_node_fs2.writeFileSync)(tmpPath, contents);
89831
- (0, import_node_fs2.renameSync)(tmpPath, filePath);
89347
+ (0, import_node_fs3.writeFileSync)(tmpPath, contents);
89348
+ (0, import_node_fs3.renameSync)(tmpPath, filePath);
89832
89349
  } finally {
89833
89350
  try {
89834
- if ((0, import_node_fs2.existsSync)(tmpPath)) {
89835
- (0, import_node_fs2.unlinkSync)(tmpPath);
89351
+ if ((0, import_node_fs3.existsSync)(tmpPath)) {
89352
+ (0, import_node_fs3.unlinkSync)(tmpPath);
89836
89353
  }
89837
89354
  } catch {
89838
89355
  }
@@ -89844,8 +89361,8 @@ async function downloadCloudflared(versionInfo, binPath, options) {
89844
89361
  const { url, version: version3, checksum, compressed } = versionInfo;
89845
89362
  logger?.log(`Downloading cloudflared ${version3}...`);
89846
89363
  logger?.debug(`Download URL: ${url}`);
89847
- const cacheDir = (0, import_node_path2.dirname)(binPath);
89848
- (0, import_node_fs2.mkdirSync)(cacheDir, { recursive: true });
89364
+ const cacheDir = (0, import_node_path3.dirname)(binPath);
89365
+ (0, import_node_fs3.mkdirSync)(cacheDir, { recursive: true });
89849
89366
  let response;
89850
89367
  try {
89851
89368
  response = await (0, import_undici.fetch)(url, {
@@ -89881,8 +89398,8 @@ https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-
89881
89398
  }
89882
89399
  } catch (e2) {
89883
89400
  try {
89884
- if ((0, import_node_fs2.existsSync)(binPath)) {
89885
- (0, import_node_fs2.unlinkSync)(binPath);
89401
+ if ((0, import_node_fs3.existsSync)(binPath)) {
89402
+ (0, import_node_fs3.unlinkSync)(binPath);
89886
89403
  }
89887
89404
  } catch {
89888
89405
  }
@@ -89899,26 +89416,26 @@ Please ensure you have write permissions to: ${cacheDir}`,
89899
89416
  );
89900
89417
  }
89901
89418
  if (process.platform !== "win32") {
89902
- (0, import_node_fs2.chmodSync)(binPath, 493);
89419
+ (0, import_node_fs3.chmodSync)(binPath, 493);
89903
89420
  }
89904
89421
  logger?.log(`cloudflared ${version3} installed`);
89905
89422
  logger?.debug(`Binary location: ${binPath}`);
89906
89423
  }
89907
89424
  __name(downloadCloudflared, "downloadCloudflared");
89908
89425
  async function downloadAndExtractTarball(response, expectedChecksum, binPath, cacheDir) {
89909
- const tempTarPath = (0, import_node_path2.join)(cacheDir, "cloudflared.tgz");
89426
+ const tempTarPath = (0, import_node_path3.join)(cacheDir, "cloudflared.tgz");
89910
89427
  const buffer = Buffer.from(await response.arrayBuffer());
89911
- (0, import_node_fs2.writeFileSync)(tempTarPath, buffer);
89428
+ (0, import_node_fs3.writeFileSync)(tempTarPath, buffer);
89912
89429
  try {
89913
89430
  (0, import_node_child_process.execFileSync)("tar", ["-xzf", tempTarPath, "-C", cacheDir], {
89914
89431
  stdio: "ignore"
89915
89432
  });
89916
- const extractedPath = (0, import_node_path2.join)(cacheDir, "cloudflared");
89917
- if (extractedPath !== binPath && (0, import_node_fs2.existsSync)(extractedPath)) {
89918
- (0, import_node_fs2.renameSync)(extractedPath, binPath);
89433
+ const extractedPath = (0, import_node_path3.join)(cacheDir, "cloudflared");
89434
+ if (extractedPath !== binPath && (0, import_node_fs3.existsSync)(extractedPath)) {
89435
+ (0, import_node_fs3.renameSync)(extractedPath, binPath);
89919
89436
  }
89920
89437
  if (expectedChecksum) {
89921
- const extractedBinary = (0, import_node_fs2.readFileSync)(binPath);
89438
+ const extractedBinary = (0, import_node_fs3.readFileSync)(binPath);
89922
89439
  const actualSha256 = sha256Hex(extractedBinary);
89923
89440
  if (actualSha256 !== expectedChecksum) {
89924
89441
  throw new UserError(
@@ -89934,8 +89451,8 @@ Actual: ${actualSha256}`,
89934
89451
  }
89935
89452
  } finally {
89936
89453
  try {
89937
- if ((0, import_node_fs2.existsSync)(tempTarPath)) {
89938
- (0, import_node_fs2.unlinkSync)(tempTarPath);
89454
+ if ((0, import_node_fs3.existsSync)(tempTarPath)) {
89455
+ (0, import_node_fs3.unlinkSync)(tempTarPath);
89939
89456
  }
89940
89457
  } catch {
89941
89458
  }
@@ -89963,7 +89480,7 @@ async function getCloudflaredPath(options) {
89963
89480
  const logger = options?.logger;
89964
89481
  const envPath = getCloudflaredPathFromEnv();
89965
89482
  if (envPath) {
89966
- if (!(0, import_node_fs2.existsSync)(envPath)) {
89483
+ if (!(0, import_node_fs3.existsSync)(envPath)) {
89967
89484
  throw new UserError(
89968
89485
  `CLOUDFLARED_PATH is set to "${envPath}" but the file does not exist.
89969
89486
 
@@ -90011,7 +89528,7 @@ Then either add it to your PATH or set CLOUDFLARED_PATH.`,
90011
89528
  { telemetryMessage: "tunnel cloudflared download declined" }
90012
89529
  );
90013
89530
  }
90014
- if ((0, import_node_fs2.existsSync)(binPath)) {
89531
+ if ((0, import_node_fs3.existsSync)(binPath)) {
90015
89532
  const cacheDir = removeCloudflaredCache(versionInfo.version);
90016
89533
  if (cacheDir) {
90017
89534
  logger?.log(`Removed cloudflared cache: ${cacheDir}`);
@@ -90040,8 +89557,8 @@ async function spawnCloudflared(args, options) {
90040
89557
  }
90041
89558
  __name(spawnCloudflared, "spawnCloudflared");
90042
89559
  function removeCloudflaredCache(version3) {
90043
- const cacheDir = version3 ? getCacheDir(version3) : (0, import_node_path2.join)(getGlobalWranglerConfigPath(), "cloudflared");
90044
- if ((0, import_node_fs2.existsSync)(cacheDir)) {
89560
+ const cacheDir = version3 ? getCacheDir(version3) : (0, import_node_path3.join)(getGlobalConfigPath(), "cloudflared");
89561
+ if ((0, import_node_fs3.existsSync)(cacheDir)) {
90045
89562
  removeDirSync(cacheDir);
90046
89563
  return cacheDir;
90047
89564
  }
@@ -90075,18 +89592,18 @@ function startTunnel(options) {
90075
89592
  env: options.token ? { TUNNEL_TOKEN: options.token } : void 0,
90076
89593
  skipVersionCheck: true,
90077
89594
  logger
90078
- }).then((process22) => {
90079
- cloudflaredProcess = process22;
89595
+ }).then((process32) => {
89596
+ cloudflaredProcess = process32;
90080
89597
  if (disposed) {
90081
- terminateCloudflared(process22);
89598
+ terminateCloudflared(process32);
90082
89599
  }
90083
- return process22;
89600
+ return process32;
90084
89601
  });
90085
- const readyPromise = cloudflaredPromise.then((process22) => {
89602
+ const readyPromise = cloudflaredPromise.then((process32) => {
90086
89603
  if (isNamedTunnel) {
90087
89604
  return { mode: "named" };
90088
89605
  }
90089
- return waitForQuickTunnelReady(process22, timeoutMs, {
89606
+ return waitForQuickTunnelReady(process32, timeoutMs, {
90090
89607
  logger,
90091
89608
  origin: options.origin
90092
89609
  });
@@ -90584,6 +90101,10 @@ function throwFetchError(resource, response, status2) {
90584
90101
  if (code) {
90585
90102
  error2.code = code;
90586
90103
  }
90104
+ const meta = errors[0]?.meta;
90105
+ if (meta) {
90106
+ error2.meta = meta;
90107
+ }
90587
90108
  error2.accountTag = extractAccountTag(resource);
90588
90109
  throw error2;
90589
90110
  }
@@ -90786,12 +90307,12 @@ function toValidWorkerName(input) {
90786
90307
  }
90787
90308
  __name(toValidWorkerName, "toValidWorkerName");
90788
90309
  function getWorkerName(projectOrWorkerName = "", projectPath) {
90789
- const rawName = getCIOverrideName() ?? (projectOrWorkerName || (0, import_node_path2.basename)(projectPath));
90310
+ const rawName = getCIOverrideName() ?? (projectOrWorkerName || (0, import_node_path3.basename)(projectPath));
90790
90311
  return toValidWorkerName(rawName);
90791
90312
  }
90792
90313
  __name(getWorkerName, "getWorkerName");
90793
90314
  function getWorkerNameFromProject(projectPath) {
90794
- const packageJsonPath = (0, import_node_path2.resolve)(projectPath, "package.json");
90315
+ const packageJsonPath = (0, import_node_path3.resolve)(projectPath, "package.json");
90795
90316
  let packageJsonName;
90796
90317
  try {
90797
90318
  const packageJson = parsePackageJSON(
@@ -90811,7 +90332,7 @@ var MINIMUM_MACOS_VERSION = "13.5.0";
90811
90332
  function checkMacOSVersion(options) {
90812
90333
  if (process.platform !== "darwin") return;
90813
90334
  if (import_ci_info.default.isCI) return;
90814
- const macOSVersion = darwinVersionToMacOSVersion(import_node_os3.default.release());
90335
+ const macOSVersion = darwinVersionToMacOSVersion(import_node_os4.default.release());
90815
90336
  if (macOSVersion && isVersionLessThan(macOSVersion, MINIMUM_MACOS_VERSION)) if (options.shouldThrow) throw new UserError(`Unsupported macOS version: The Cloudflare Workers runtime cannot run on the current version of macOS (${macOSVersion}). The minimum requirement is macOS ${MINIMUM_MACOS_VERSION}+. See https://github.com/cloudflare/workerd?tab=readme-ov-file#running-workerd If you cannot upgrade your version of macOS, you could try running in a DevContainer setup with a supported version of Linux (glibc 2.35+ required).`, { telemetryMessage: false });
90816
90337
  else console.warn(`\u26A0\uFE0F Warning: Unsupported macOS version detected (${macOSVersion}). The Cloudflare Workers runtime may not work correctly on macOS versions below ${MINIMUM_MACOS_VERSION}. Consider upgrading to macOS ${MINIMUM_MACOS_VERSION}+ or using a DevContainer setup with a supported version of Linux (glibc 2.35+ required).`);
90817
90338
  }
@@ -91786,9 +91307,9 @@ var import_node_process5 = __toESM(require("node:process"), 1);
91786
91307
  // ../../node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
91787
91308
  var import_node_process4 = __toESM(require("node:process"), 1);
91788
91309
  var import_onetime = __toESM(require_onetime(), 1);
91789
- var import_signal_exit2 = __toESM(require_signal_exit2(), 1);
91310
+ var import_signal_exit = __toESM(require_signal_exit(), 1);
91790
91311
  var restoreCursor = (0, import_onetime.default)(() => {
91791
- (0, import_signal_exit2.default)(() => {
91312
+ (0, import_signal_exit.default)(() => {
91792
91313
  import_node_process4.default.stderr.write("\x1B[?25h");
91793
91314
  }, { alwaysLast: true });
91794
91315
  });
@@ -92557,7 +92078,7 @@ var getSelectRenderers = (config49) => {
92557
92078
  const indicator = isInListOfValues || active && !Array.isArray(value) ? color(opt.activeIcon ?? shapes.radioActive) : color(opt.inactiveIcon ?? shapes.radioInactive);
92558
92079
  return `${space(2)}${indicator} ${text} ${sublabel}`;
92559
92080
  };
92560
- const renderOptionCondition = (_2, i) => {
92081
+ const renderOptionCondition = (_, i) => {
92561
92082
  if (options.length <= maxItemsPerPage) return true;
92562
92083
  if (i < cursor) return options.length - i <= maxItemsPerPage;
92563
92084
  return cursor + maxItemsPerPage > i;
@@ -92798,11 +92319,11 @@ function isInteractive() {
92798
92319
  }
92799
92320
 
92800
92321
  // ../cli/dist/gitignore.mjs
92801
- var import_node_fs3 = require("node:fs");
92802
- var import_node_path3 = require("node:path");
92322
+ var import_node_fs4 = require("node:fs");
92323
+ var import_node_path4 = require("node:path");
92803
92324
  function maybeAppendWranglerToGitIgnoreLikeFile(filePath) {
92804
- const filePreExisted = (0, import_node_fs3.existsSync)(filePath);
92805
- if (!filePreExisted) (0, import_node_fs3.writeFileSync)(filePath, "");
92325
+ const filePreExisted = (0, import_node_fs4.existsSync)(filePath);
92326
+ if (!filePreExisted) (0, import_node_fs4.writeFileSync)(filePath, "");
92806
92327
  const existingGitIgnoreContent = readFileSync(filePath);
92807
92328
  const wranglerGitIgnoreFilesToAdd = [];
92808
92329
  const hasDotWrangler = existingGitIgnoreContent.match(/^\/?\.wrangler(\/|\s|$)/m);
@@ -92813,25 +92334,25 @@ function maybeAppendWranglerToGitIgnoreLikeFile(filePath) {
92813
92334
  if (!existingGitIgnoreContent.match(/^!\/?\.env\.example(\s|$)/m)) wranglerGitIgnoreFilesToAdd.push("!.env.example");
92814
92335
  if (wranglerGitIgnoreFilesToAdd.length === 0) return;
92815
92336
  const s = spinner();
92816
- s.start(`Adding Wrangler files to the ${(0, import_node_path3.basename)(filePath)} file`);
92337
+ s.start(`Adding Wrangler files to the ${(0, import_node_path4.basename)(filePath)} file`);
92817
92338
  const linesToAppend = [...filePreExisted ? ["", ...!existingGitIgnoreContent.match(/\n\s*$/) ? [""] : []] : []];
92818
92339
  if (!hasDotWrangler && wranglerGitIgnoreFilesToAdd.length > 1) linesToAppend.push("# wrangler files");
92819
92340
  wranglerGitIgnoreFilesToAdd.forEach((line) => linesToAppend.push(line));
92820
92341
  linesToAppend.push("");
92821
- (0, import_node_fs3.appendFileSync)(filePath, linesToAppend.join("\n"));
92822
- const fileName = (0, import_node_path3.basename)(filePath);
92342
+ (0, import_node_fs4.appendFileSync)(filePath, linesToAppend.join("\n"));
92343
+ const fileName = (0, import_node_path4.basename)(filePath);
92823
92344
  s.stop(`${brandColor(filePreExisted ? "updated" : "created")} ${dim(`${fileName} file`)}`);
92824
92345
  }
92825
92346
  function maybeAppendWranglerToGitIgnore(projectPath) {
92826
92347
  const gitIgnorePath = `${projectPath}/.gitignore`;
92827
- const gitIgnorePreExisted = (0, import_node_fs3.existsSync)(gitIgnorePath);
92348
+ const gitIgnorePreExisted = (0, import_node_fs4.existsSync)(gitIgnorePath);
92828
92349
  const gitDirExists = directoryExists(`${projectPath}/.git`);
92829
92350
  if (!gitIgnorePreExisted && !gitDirExists) return;
92830
92351
  maybeAppendWranglerToGitIgnoreLikeFile(gitIgnorePath);
92831
92352
  }
92832
92353
  function directoryExists(path$1) {
92833
92354
  try {
92834
- return (0, import_node_fs3.statSync)(path$1).isDirectory();
92355
+ return (0, import_node_fs4.statSync)(path$1).isDirectory();
92835
92356
  } catch (error2) {
92836
92357
  if (error2.code === "ENOENT") return false;
92837
92358
  throw new Error(error2);
@@ -94530,8 +94051,8 @@ var GlobalMiddleware = class {
94530
94051
  this.frozens = [];
94531
94052
  this.yargs = yargs;
94532
94053
  }
94533
- addMiddleware(callback, applyBeforeValidation, global2 = true, mutates = false) {
94534
- argsert("<array|function> [boolean] [boolean] [boolean]", [callback, applyBeforeValidation, global2], arguments.length);
94054
+ addMiddleware(callback, applyBeforeValidation, global3 = true, mutates = false) {
94055
+ argsert("<array|function> [boolean] [boolean] [boolean]", [callback, applyBeforeValidation, global3], arguments.length);
94535
94056
  if (Array.isArray(callback)) {
94536
94057
  for (let i = 0; i < callback.length; i++) {
94537
94058
  if (typeof callback[i] !== "function") {
@@ -94539,13 +94060,13 @@ var GlobalMiddleware = class {
94539
94060
  }
94540
94061
  const m = callback[i];
94541
94062
  m.applyBeforeValidation = applyBeforeValidation;
94542
- m.global = global2;
94063
+ m.global = global3;
94543
94064
  }
94544
94065
  Array.prototype.push.apply(this.globalMiddleware, callback);
94545
94066
  } else if (typeof callback === "function") {
94546
94067
  const m = callback;
94547
94068
  m.applyBeforeValidation = applyBeforeValidation;
94548
- m.global = global2;
94069
+ m.global = global3;
94549
94070
  m.mutates = mutates;
94550
94071
  this.globalMiddleware.push(callback);
94551
94072
  }
@@ -96387,8 +95908,8 @@ var YargsInstance = class {
96387
95908
  this[kTrackManuallySetKeys](keys);
96388
95909
  return this;
96389
95910
  }
96390
- check(f, global2) {
96391
- argsert("<function> [boolean]", [f, global2], arguments.length);
95911
+ check(f, global3) {
95912
+ argsert("<function> [boolean]", [f, global3], arguments.length);
96392
95913
  this.middleware((argv, _yargs) => {
96393
95914
  return maybeAsyncResult(() => {
96394
95915
  return f(argv, _yargs.getOptions());
@@ -96403,7 +95924,7 @@ var YargsInstance = class {
96403
95924
  __classPrivateFieldGet(this, _YargsInstance_usage, "f").fail(err.message ? err.message : err.toString(), err);
96404
95925
  return argv;
96405
95926
  });
96406
- }, false, global2);
95927
+ }, false, global3);
96407
95928
  return this;
96408
95929
  }
96409
95930
  choices(key, value) {
@@ -96709,10 +96230,10 @@ var YargsInstance = class {
96709
96230
  getStrictOptions() {
96710
96231
  return __classPrivateFieldGet(this, _YargsInstance_strictOptions, "f");
96711
96232
  }
96712
- global(globals, global2) {
96713
- argsert("<string|array> [boolean]", [globals, global2], arguments.length);
96233
+ global(globals, global3) {
96234
+ argsert("<string|array> [boolean]", [globals, global3], arguments.length);
96714
96235
  globals = [].concat(globals);
96715
- if (global2 !== false) {
96236
+ if (global3 !== false) {
96716
96237
  __classPrivateFieldGet(this, _YargsInstance_options, "f").local = __classPrivateFieldGet(this, _YargsInstance_options, "f").local.filter((l) => globals.indexOf(l) === -1);
96717
96238
  } else {
96718
96239
  globals.forEach((g) => {
@@ -96756,8 +96277,8 @@ var YargsInstance = class {
96756
96277
  __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.setLocale(locale);
96757
96278
  return this;
96758
96279
  }
96759
- middleware(callback, applyBeforeValidation, global2) {
96760
- return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global2);
96280
+ middleware(callback, applyBeforeValidation, global3) {
96281
+ return __classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addMiddleware(callback, !!applyBeforeValidation, global3);
96761
96282
  }
96762
96283
  nargs(key, value) {
96763
96284
  argsert("<string|object|array> [number]", [key, value], arguments.length);
@@ -97689,7 +97210,7 @@ var Yargs = YargsFactory(esm_default2);
97689
97210
  var yargs_default = Yargs;
97690
97211
 
97691
97212
  // package.json
97692
- var version = "2.70.6";
97213
+ var version = "2.70.8";
97693
97214
 
97694
97215
  // src/metrics.ts
97695
97216
  var import_node_async_hooks = require("node:async_hooks");
@@ -97699,36 +97220,6 @@ var import_promises2 = require("node:timers/promises");
97699
97220
  var import_node_crypto2 = require("node:crypto");
97700
97221
  var import_node_fs5 = require("node:fs");
97701
97222
  var import_node_path5 = __toESM(require("node:path"));
97702
-
97703
- // src/helpers/global-wrangler-config-path.ts
97704
- var import_node_fs4 = __toESM(require("node:fs"));
97705
- var import_node_os4 = __toESM(require("node:os"));
97706
- var import_node_path4 = __toESM(require("node:path"));
97707
-
97708
- // ../../node_modules/.pnpm/xdg-app-paths@8.3.0/node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js
97709
- var mod_esm_exports2 = {};
97710
- __export(mod_esm_exports2, {
97711
- default: () => mod_esm_default2
97712
- });
97713
- var import_mod_cjs2 = __toESM(require_mod_cjs6(), 1);
97714
- __reExport(mod_esm_exports2, __toESM(require_mod_cjs6(), 1));
97715
- var mod_esm_default2 = import_mod_cjs2.default;
97716
-
97717
- // src/helpers/global-wrangler-config-path.ts
97718
- function isDirectory2(configPath) {
97719
- return import_node_fs4.default.statSync(configPath, { throwIfNoEntry: false })?.isDirectory() ?? false;
97720
- }
97721
- function getGlobalWranglerConfigPath2() {
97722
- const configDir = mod_esm_default2(".wrangler").config();
97723
- const legacyConfigDir = import_node_path4.default.join(import_node_os4.default.homedir(), ".wrangler");
97724
- if (isDirectory2(legacyConfigDir)) {
97725
- return legacyConfigDir;
97726
- } else {
97727
- return configDir;
97728
- }
97729
- }
97730
-
97731
- // src/helpers/metrics-config.ts
97732
97223
  function writeMetricsConfig(config49) {
97733
97224
  (0, import_node_fs5.mkdirSync)(import_node_path5.default.dirname(getMetricsConfigPath()), { recursive: true });
97734
97225
  (0, import_node_fs5.writeFileSync)(
@@ -97752,7 +97243,7 @@ function readMetricsConfig() {
97752
97243
  }
97753
97244
  }
97754
97245
  function getMetricsConfigPath() {
97755
- return import_node_path5.default.resolve(getGlobalWranglerConfigPath2(), "metrics.json");
97246
+ return import_node_path5.default.resolve(getGlobalConfigPath(), "metrics.json");
97756
97247
  }
97757
97248
  function getDeviceId(config49) {
97758
97249
  const deviceId = config49.deviceId ?? (0, import_node_crypto2.randomUUID)();
@@ -97854,7 +97345,7 @@ var import_which_pm_runs = __toESM(require_which_pm_runs());
97854
97345
 
97855
97346
  // e2e/helpers/constants.ts
97856
97347
  var import_node_assert3 = __toESM(require("node:assert"));
97857
- var isWindows = process.platform === "win32";
97348
+ var isWindows2 = process.platform === "win32";
97858
97349
  var TEST_TIMEOUT = 1e3 * 60 * 5;
97859
97350
  var LONG_TIMEOUT = 1e3 * 60 * 10;
97860
97351
  var CLOUDFLARE_ACCOUNT_ID = process.env.CLOUDFLARE_ACCOUNT_ID ?? "8d783f274e1f82dc46744c297b015a2f";
@@ -97950,12 +97441,7 @@ var rectifyPmMismatch = async (ctx) => {
97950
97441
  }
97951
97442
  const nodeModulesPath = import_node_path6.default.join(ctx.project.path, "node_modules");
97952
97443
  if ((0, import_node_fs6.existsSync)(nodeModulesPath)) {
97953
- (0, import_node_fs6.rmSync)(nodeModulesPath, {
97954
- recursive: true,
97955
- force: true,
97956
- maxRetries: 5,
97957
- retryDelay: 100
97958
- });
97444
+ removeDirSync(nodeModulesPath);
97959
97445
  }
97960
97446
  const lockfilePath = import_node_path6.default.join(ctx.project.path, "package-lock.json");
97961
97447
  if ((0, import_node_fs6.existsSync)(lockfilePath)) {
@@ -99440,7 +98926,7 @@ var promptOrEOF = async (packages) => {
99440
98926
  return prompt;
99441
98927
  }
99442
98928
  let onEnd;
99443
- const eof = new Promise((_2, reject) => {
98929
+ const eof = new Promise((_, reject) => {
99444
98930
  onEnd = () => reject(new Error(STDIN_EOF_MARKER));
99445
98931
  process.stdin.once("end", onEnd);
99446
98932
  process.stdin.resume();
@@ -100252,23 +99738,23 @@ __name2(getPropertyName, "getPropertyName");
100252
99738
  var package_default = {
100253
99739
  name: "frameworks_clis_info",
100254
99740
  dependencies: {
100255
- "@angular/create": "22.0.3",
100256
- "@tanstack/cli": "0.69.3",
100257
- "create-analog": "2.6.1",
100258
- "create-astro": "5.0.6",
99741
+ "@angular/create": "22.0.5",
99742
+ "@tanstack/cli": "0.69.5",
99743
+ "create-analog": "2.6.2",
99744
+ "create-astro": "5.2.2",
100259
99745
  "create-docusaurus": "3.10.1",
100260
99746
  "create-hono": "0.19.4",
100261
- "create-next-app": "16.2.9",
99747
+ "create-next-app": "16.2.10",
100262
99748
  "create-qwik": "1.20.0",
100263
- "create-react-router": "8.0.1",
99749
+ "create-react-router": "8.1.0",
100264
99750
  "create-rwsdk": "3.1.3",
100265
99751
  "create-solid": "0.7.0",
100266
- "create-vike": "0.0.654",
100267
- "create-vite": "9.0.7",
99752
+ "create-vike": "0.0.660",
99753
+ "create-vite": "9.1.1",
100268
99754
  "create-vue": "3.22.4",
100269
99755
  "create-waku": "0.12.5-1.0.0-alpha.10-0",
100270
99756
  gatsby: "5.16.1",
100271
- nuxi: "3.35.2",
99757
+ nuxi: "3.36.1",
100272
99758
  sv: "0.15.4"
100273
99759
  },
100274
99760
  info: [
@@ -100336,7 +99822,12 @@ function getLatestTypesEntrypoint(ctx) {
100336
99822
  var recast2 = __toESM(require_main2());
100337
99823
  var { npm } = detectPackageManager();
100338
99824
  var generate = async (ctx) => {
100339
- await runFrameworkGenerator(ctx, [ctx.project.name, "--template=latest"]);
99825
+ await runFrameworkGenerator(ctx, [
99826
+ ctx.project.name,
99827
+ "--template=latest",
99828
+ // Analog's npm Vite overrides can fail as deps shift; remove once fixed upstream.
99829
+ ...npm === "npm" ? ["--skipViteOverrides"] : []
99830
+ ]);
100340
99831
  logRaw("");
100341
99832
  };
100342
99833
  var configure = async (ctx) => {
@@ -102083,7 +101574,7 @@ var config33 = {
102083
101574
  },
102084
101575
  generate: generate20,
102085
101576
  configure: configure11,
102086
- transformPackageJson: async (_2, ctx) => ({
101577
+ transformPackageJson: async (_, ctx) => ({
102087
101578
  scripts: {
102088
101579
  deploy: `${npm14} run build && wrangler deploy`,
102089
101580
  preview: `${npm14} run build && vite preview`,
@@ -102617,7 +102108,7 @@ var config45 = {
102617
102108
  },
102618
102109
  configure: configure15,
102619
102110
  generate: generate29,
102620
- transformPackageJson: async (_2, ctx) => ({
102111
+ transformPackageJson: async (_, ctx) => ({
102621
102112
  scripts: {
102622
102113
  deploy: `${npm21} run build && wrangler deploy`,
102623
102114
  preview: `${npm21} run build && wrangler dev`,
@@ -102764,7 +102255,7 @@ If the application uses Durable Objects or Workflows, refer to the relevant best
102764
102255
  var import_node_assert6 = __toESM(require("node:assert"));
102765
102256
 
102766
102257
  // ../wrangler/package.json
102767
- var version2 = "4.104.0";
102258
+ var version2 = "4.107.1";
102768
102259
 
102769
102260
  // src/git.ts
102770
102261
  var offerGit = async (ctx) => {
@@ -106404,16 +105895,23 @@ async function updateTsConfig(ctx, { usesNodeCompat }) {
106404
105895
  let newTypes = new Set(currentTypes);
106405
105896
  if (ctx.template.workersTypes === "installed") {
106406
105897
  const entrypointVersion = getLatestTypesEntrypoint(ctx);
106407
- if (entrypointVersion === null) {
106408
- return;
106409
- }
106410
- const typesEntrypoint = `@cloudflare/workers-types/${entrypointVersion}`;
106411
105898
  const explicitEntrypoint = currentTypes.some(
106412
105899
  (t2) => t2.match(/@cloudflare\/workers-types\/\d{4}-\d{2}-\d{2}/)
106413
105900
  );
106414
105901
  if (!explicitEntrypoint) {
106415
105902
  newTypes.delete("@cloudflare/workers-types");
106416
- newTypes.add(typesEntrypoint);
105903
+ if (entrypointVersion !== null) {
105904
+ newTypes.add(`@cloudflare/workers-types/${entrypointVersion}`);
105905
+ } else if ((0, import_node_fs21.existsSync)(
105906
+ (0, import_node_path25.join)(
105907
+ ctx.project.path,
105908
+ "node_modules",
105909
+ "@cloudflare",
105910
+ "workers-types"
105911
+ )
105912
+ )) {
105913
+ newTypes.add("@cloudflare/workers-types");
105914
+ }
106417
105915
  }
106418
105916
  } else if (ctx.template.workersTypes === "generated") {
106419
105917
  newTypes.add(ctx.template.typesPath ?? "./worker-configuration.d.ts");