alchemy 0.46.1 → 0.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/alchemy.mjs CHANGED
@@ -27,6 +27,7 @@ var __copyProps = (to, from, except, desc) => {
27
27
  }
28
28
  return to;
29
29
  };
30
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
30
31
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
31
32
  // If the importer is in node compatibility mode or this is not an ESM
32
33
  // file that has been converted to a CommonJS file using a Babel-
@@ -5150,18 +5151,18 @@ var require_core = __commonJS({
5150
5151
  (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
5151
5152
  inst._zod.traits.add(name);
5152
5153
  initializer(inst, def);
5153
- for (const k3 in _3.prototype) {
5154
+ for (const k3 in _4.prototype) {
5154
5155
  if (!(k3 in inst))
5155
- Object.defineProperty(inst, k3, { value: _3.prototype[k3].bind(inst) });
5156
+ Object.defineProperty(inst, k3, { value: _4.prototype[k3].bind(inst) });
5156
5157
  }
5157
- inst._zod.constr = _3;
5158
+ inst._zod.constr = _4;
5158
5159
  inst._zod.def = def;
5159
5160
  }
5160
5161
  const Parent = params?.Parent ?? Object;
5161
5162
  class Definition extends Parent {
5162
5163
  }
5163
5164
  Object.defineProperty(Definition, "name", { value: name });
5164
- function _3(def) {
5165
+ function _4(def) {
5165
5166
  var _a;
5166
5167
  const inst = params?.Parent ? new Definition() : this;
5167
5168
  init2(inst, def);
@@ -5171,16 +5172,16 @@ var require_core = __commonJS({
5171
5172
  }
5172
5173
  return inst;
5173
5174
  }
5174
- Object.defineProperty(_3, "init", { value: init2 });
5175
- Object.defineProperty(_3, Symbol.hasInstance, {
5175
+ Object.defineProperty(_4, "init", { value: init2 });
5176
+ Object.defineProperty(_4, Symbol.hasInstance, {
5176
5177
  value: (inst) => {
5177
5178
  if (params?.Parent && inst instanceof params.Parent)
5178
5179
  return true;
5179
5180
  return inst?._zod?.traits?.has(name);
5180
5181
  }
5181
5182
  });
5182
- Object.defineProperty(_3, "name", { value: name });
5183
- return _3;
5183
+ Object.defineProperty(_4, "name", { value: name });
5184
+ return _4;
5184
5185
  }
5185
5186
  exports2.$brand = Symbol("zod_brand");
5186
5187
  var $ZodAsyncError = class extends Error {
@@ -5256,17 +5257,17 @@ var require_util = __commonJS({
5256
5257
  function assertNever(_x) {
5257
5258
  throw new Error();
5258
5259
  }
5259
- function assert2(_3) {
5260
+ function assert2(_4) {
5260
5261
  }
5261
5262
  function getEnumValues(entries) {
5262
5263
  const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
5263
- const values = Object.entries(entries).filter(([k3, _3]) => numericValues.indexOf(+k3) === -1).map(([_3, v2]) => v2);
5264
+ const values = Object.entries(entries).filter(([k3, _4]) => numericValues.indexOf(+k3) === -1).map(([_4, v2]) => v2);
5264
5265
  return values;
5265
5266
  }
5266
5267
  function joinValues(array, separator = "|") {
5267
5268
  return array.map((val) => stringifyPrimitive(val)).join(separator);
5268
5269
  }
5269
- function jsonStringifyReplacer(_3, value) {
5270
+ function jsonStringifyReplacer(_4, value) {
5270
5271
  if (typeof value === "bigint")
5271
5272
  return value.toString();
5272
5273
  return value;
@@ -5368,7 +5369,7 @@ var require_util = __commonJS({
5368
5369
  const F2 = Function;
5369
5370
  new F2("");
5370
5371
  return true;
5371
- } catch (_3) {
5372
+ } catch (_4) {
5372
5373
  return false;
5373
5374
  }
5374
5375
  });
@@ -5470,31 +5471,31 @@ var require_util = __commonJS({
5470
5471
  function createTransparentProxy(getter) {
5471
5472
  let target;
5472
5473
  return new Proxy({}, {
5473
- get(_3, prop, receiver) {
5474
+ get(_4, prop, receiver) {
5474
5475
  target ?? (target = getter());
5475
5476
  return Reflect.get(target, prop, receiver);
5476
5477
  },
5477
- set(_3, prop, value, receiver) {
5478
+ set(_4, prop, value, receiver) {
5478
5479
  target ?? (target = getter());
5479
5480
  return Reflect.set(target, prop, value, receiver);
5480
5481
  },
5481
- has(_3, prop) {
5482
+ has(_4, prop) {
5482
5483
  target ?? (target = getter());
5483
5484
  return Reflect.has(target, prop);
5484
5485
  },
5485
- deleteProperty(_3, prop) {
5486
+ deleteProperty(_4, prop) {
5486
5487
  target ?? (target = getter());
5487
5488
  return Reflect.deleteProperty(target, prop);
5488
5489
  },
5489
- ownKeys(_3) {
5490
+ ownKeys(_4) {
5490
5491
  target ?? (target = getter());
5491
5492
  return Reflect.ownKeys(target);
5492
5493
  },
5493
- getOwnPropertyDescriptor(_3, prop) {
5494
+ getOwnPropertyDescriptor(_4, prop) {
5494
5495
  target ?? (target = getter());
5495
5496
  return Reflect.getOwnPropertyDescriptor(target, prop);
5496
5497
  },
5497
- defineProperty(_3, prop, descriptor2) {
5498
+ defineProperty(_4, prop, descriptor2) {
5498
5499
  target ?? (target = getter());
5499
5500
  return Reflect.defineProperty(target, prop, descriptor2);
5500
5501
  }
@@ -5705,7 +5706,7 @@ var require_util = __commonJS({
5705
5706
  return { ...iss };
5706
5707
  }
5707
5708
  function cleanEnum(obj) {
5708
- return Object.entries(obj).filter(([k3, _3]) => {
5709
+ return Object.entries(obj).filter(([k3, _4]) => {
5709
5710
  return Number.isNaN(Number.parseInt(k3, 10));
5710
5711
  }).map((el) => el[1]);
5711
5712
  }
@@ -6791,13 +6792,13 @@ var require_schemas = __commonJS({
6791
6792
  continue;
6792
6793
  }
6793
6794
  const currLen = payload.issues.length;
6794
- const _3 = ch._zod.check(payload);
6795
- if (_3 instanceof Promise && ctx?.async === false) {
6795
+ const _4 = ch._zod.check(payload);
6796
+ if (_4 instanceof Promise && ctx?.async === false) {
6796
6797
  throw new core.$ZodAsyncError();
6797
6798
  }
6798
- if (asyncResult || _3 instanceof Promise) {
6799
+ if (asyncResult || _4 instanceof Promise) {
6799
6800
  asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
6800
- await _3;
6801
+ await _4;
6801
6802
  const nextLen = payload.issues.length;
6802
6803
  if (nextLen === currLen)
6803
6804
  return;
@@ -6834,7 +6835,7 @@ var require_schemas = __commonJS({
6834
6835
  try {
6835
6836
  const r2 = (0, parse_js_1.safeParse)(inst, value);
6836
6837
  return r2.success ? { value: r2.data } : { issues: r2.error?.issues };
6837
- } catch (_3) {
6838
+ } catch (_4) {
6838
6839
  return (0, parse_js_1.safeParseAsync)(inst, value).then((r2) => r2.success ? { value: r2.data } : { issues: r2.error?.issues });
6839
6840
  }
6840
6841
  },
@@ -6849,11 +6850,11 @@ var require_schemas = __commonJS({
6849
6850
  exports2.$ZodString = core.$constructor("$ZodString", (inst, def) => {
6850
6851
  exports2.$ZodType.init(inst, def);
6851
6852
  inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? regexes.string(inst._zod.bag);
6852
- inst._zod.parse = (payload, _3) => {
6853
+ inst._zod.parse = (payload, _4) => {
6853
6854
  if (def.coerce)
6854
6855
  try {
6855
6856
  payload.value = String(payload.value);
6856
- } catch (_4) {
6857
+ } catch (_5) {
6857
6858
  }
6858
6859
  if (typeof payload.value === "string")
6859
6860
  return payload;
@@ -6939,7 +6940,7 @@ var require_schemas = __commonJS({
6939
6940
  payload.value = href;
6940
6941
  }
6941
6942
  return;
6942
- } catch (_3) {
6943
+ } catch (_4) {
6943
6944
  payload.issues.push({
6944
6945
  code: "invalid_format",
6945
6946
  format: "url",
@@ -7166,7 +7167,7 @@ var require_schemas = __commonJS({
7166
7167
  if (def.coerce)
7167
7168
  try {
7168
7169
  payload.value = Number(payload.value);
7169
- } catch (_3) {
7170
+ } catch (_4) {
7170
7171
  }
7171
7172
  const input = payload.value;
7172
7173
  if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
@@ -7194,7 +7195,7 @@ var require_schemas = __commonJS({
7194
7195
  if (def.coerce)
7195
7196
  try {
7196
7197
  payload.value = Boolean(payload.value);
7197
- } catch (_3) {
7198
+ } catch (_4) {
7198
7199
  }
7199
7200
  const input = payload.value;
7200
7201
  if (typeof input === "boolean")
@@ -7215,7 +7216,7 @@ var require_schemas = __commonJS({
7215
7216
  if (def.coerce)
7216
7217
  try {
7217
7218
  payload.value = BigInt(payload.value);
7218
- } catch (_3) {
7219
+ } catch (_4) {
7219
7220
  }
7220
7221
  if (typeof payload.value === "bigint")
7221
7222
  return payload;
@@ -8357,7 +8358,7 @@ var require_schemas = __commonJS({
8357
8358
  exports2.$ZodCustom = core.$constructor("$ZodCustom", (inst, def) => {
8358
8359
  checks.$ZodCheck.init(inst, def);
8359
8360
  exports2.$ZodType.init(inst, def);
8360
- inst._zod.parse = (payload, _3) => {
8361
+ inst._zod.parse = (payload, _4) => {
8361
8362
  return payload;
8362
8363
  };
8363
8364
  inst._zod.check = (payload) => {
@@ -16475,7 +16476,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16475
16476
  const gen2 = new JSONSchemaGenerator(_params);
16476
16477
  const defs = {};
16477
16478
  for (const entry of input._idmap.entries()) {
16478
- const [_3, schema] = entry;
16479
+ const [_4, schema] = entry;
16479
16480
  gen2.process(schema);
16480
16481
  }
16481
16482
  const schemas = {};
@@ -16803,7 +16804,7 @@ var require_util2 = __commonJS({
16803
16804
  exports2.getParsedType = exports2.ZodParsedType = exports2.objectUtil = exports2.util = void 0;
16804
16805
  var util2;
16805
16806
  (function(util3) {
16806
- util3.assertEqual = (_3) => {
16807
+ util3.assertEqual = (_4) => {
16807
16808
  };
16808
16809
  function assertIs(_arg) {
16809
16810
  }
@@ -16853,7 +16854,7 @@ var require_util2 = __commonJS({
16853
16854
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
16854
16855
  }
16855
16856
  util3.joinValues = joinValues;
16856
- util3.jsonStringifyReplacer = (_3, value) => {
16857
+ util3.jsonStringifyReplacer = (_4, value) => {
16857
16858
  if (typeof value === "bigint") {
16858
16859
  return value.toString();
16859
16860
  }
@@ -21498,7 +21499,7 @@ var require_string = __commonJS({
21498
21499
  case "trim":
21499
21500
  break;
21500
21501
  default:
21501
- /* @__PURE__ */ ((_3) => {
21502
+ /* @__PURE__ */ ((_4) => {
21502
21503
  })(check);
21503
21504
  }
21504
21505
  }
@@ -22361,7 +22362,7 @@ var require_selectParser = __commonJS({
22361
22362
  case zod_1.ZodFirstPartyTypeKind.ZodSymbol:
22362
22363
  return void 0;
22363
22364
  default:
22364
- return /* @__PURE__ */ ((_3) => void 0)(typeName);
22365
+ return /* @__PURE__ */ ((_4) => void 0)(typeName);
22365
22366
  }
22366
22367
  };
22367
22368
  exports2.selectParser = selectParser;
@@ -26202,7 +26203,7 @@ var require_polyfills = __commonJS({
26202
26203
  var callback;
26203
26204
  if (callback_ && typeof callback_ === "function") {
26204
26205
  var eagCounter = 0;
26205
- callback = function(er, _3, __) {
26206
+ callback = function(er, _4, __) {
26206
26207
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
26207
26208
  eagCounter++;
26208
26209
  return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
@@ -27913,7 +27914,7 @@ var require_jsonfile = __commonJS({
27913
27914
  var _fs;
27914
27915
  try {
27915
27916
  _fs = require_graceful_fs();
27916
- } catch (_3) {
27917
+ } catch (_4) {
27917
27918
  _fs = __require("fs");
27918
27919
  }
27919
27920
  var universalify = require_universalify();
@@ -34247,7 +34248,7 @@ var require_ignore = __commonJS({
34247
34248
  // (a ) -> (a)
34248
34249
  // (a \ ) -> (a )
34249
34250
  /((?:\\\\)*?)(\\?\s+)$/,
34250
- (_3, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
34251
+ (_4, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
34251
34252
  ],
34252
34253
  // Replace (\ ) with ' '
34253
34254
  // (\ ) -> ' '
@@ -34255,7 +34256,7 @@ var require_ignore = __commonJS({
34255
34256
  // (\\\ ) -> '\\ '
34256
34257
  [
34257
34258
  /(\\+?)\s/g,
34258
- (_3, m1) => {
34259
+ (_4, m1) => {
34259
34260
  const { length } = m1;
34260
34261
  return m1.slice(0, length - length % 2) + SPACE;
34261
34262
  }
@@ -34326,7 +34327,7 @@ var require_ignore = __commonJS({
34326
34327
  // Zero, one or several directories
34327
34328
  // should not use '*', or it will be replaced by the next replacer
34328
34329
  // Check if it is not the last `'/**'`
34329
- (_3, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
34330
+ (_4, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
34330
34331
  ],
34331
34332
  // normal intermediate wildcards
34332
34333
  [
@@ -34338,7 +34339,7 @@ var require_ignore = __commonJS({
34338
34339
  /(^|[^\\]+)(\\\*)+(?=.+)/g,
34339
34340
  // '*.js' matches '.js'
34340
34341
  // '*.js' doesn't match 'abc'
34341
- (_3, p1, p2) => {
34342
+ (_4, p1, p2) => {
34342
34343
  const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
34343
34344
  return p1 + unescaped;
34344
34345
  }
@@ -34385,11 +34386,11 @@ var require_ignore = __commonJS({
34385
34386
  var MODE_CHECK_IGNORE = "checkRegex";
34386
34387
  var UNDERSCORE = "_";
34387
34388
  var TRAILING_WILD_CARD_REPLACERS = {
34388
- [MODE_IGNORE](_3, p1) {
34389
+ [MODE_IGNORE](_4, p1) {
34389
34390
  const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
34390
34391
  return `${prefix}(?=$|\\/$)`;
34391
34392
  },
34392
- [MODE_CHECK_IGNORE](_3, p1) {
34393
+ [MODE_CHECK_IGNORE](_4, p1) {
34393
34394
  const prefix = p1 ? `${p1}[^/]*` : "[^/]*";
34394
34395
  return `${prefix}(?=$|\\/$)`;
34395
34396
  }
@@ -34652,6 +34653,495 @@ var require_ignore = __commonJS({
34652
34653
  }
34653
34654
  });
34654
34655
 
34656
+ // ../node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js
34657
+ var require_XDGAppPaths = __commonJS({
34658
+ "../node_modules/xdg-app-paths/dist/cjs/lib/XDGAppPaths.js"(exports2) {
34659
+ "use strict";
34660
+ exports2.__esModule = true;
34661
+ exports2.Adapt = void 0;
34662
+ function isBoolean(t2) {
34663
+ return typeOf(t2) === "boolean";
34664
+ }
34665
+ function isObject2(t2) {
34666
+ return typeOf(t2) === "object";
34667
+ }
34668
+ function isString(t2) {
34669
+ return typeOf(t2) === "string";
34670
+ }
34671
+ function typeOf(t2) {
34672
+ return typeof t2;
34673
+ }
34674
+ function Adapt(adapter_) {
34675
+ var meta = adapter_.meta, path14 = adapter_.path, xdg = adapter_.xdg;
34676
+ var XDGAppPaths_ = /* @__PURE__ */ function() {
34677
+ function XDGAppPaths_2(options_) {
34678
+ if (options_ === void 0) {
34679
+ options_ = {};
34680
+ }
34681
+ var _a, _b, _c;
34682
+ function XDGAppPaths(options2) {
34683
+ if (options2 === void 0) {
34684
+ options2 = {};
34685
+ }
34686
+ return new XDGAppPaths_2(options2);
34687
+ }
34688
+ var options = isObject2(options_) ? options_ : { name: options_ };
34689
+ var suffix = (_a = options.suffix) !== null && _a !== void 0 ? _a : "";
34690
+ var isolated_ = (_b = options.isolated) !== null && _b !== void 0 ? _b : true;
34691
+ var namePriorityList = [
34692
+ options.name,
34693
+ meta.pkgMainFilename(),
34694
+ meta.mainFilename()
34695
+ ];
34696
+ var nameFallback = "$eval";
34697
+ var name = path14.parse(((_c = namePriorityList.find(function(e2) {
34698
+ return isString(e2);
34699
+ })) !== null && _c !== void 0 ? _c : nameFallback) + suffix).name;
34700
+ XDGAppPaths.$name = function $name() {
34701
+ return name;
34702
+ };
34703
+ XDGAppPaths.$isolated = function $isolated() {
34704
+ return isolated_;
34705
+ };
34706
+ function isIsolated(dirOptions) {
34707
+ var _a2;
34708
+ dirOptions = dirOptions !== null && dirOptions !== void 0 ? dirOptions : { isolated: isolated_ };
34709
+ var isolated = isBoolean(dirOptions) ? dirOptions : (_a2 = dirOptions.isolated) !== null && _a2 !== void 0 ? _a2 : isolated_;
34710
+ return isolated;
34711
+ }
34712
+ function finalPathSegment(dirOptions) {
34713
+ return isIsolated(dirOptions) ? name : "";
34714
+ }
34715
+ XDGAppPaths.cache = function cache(dirOptions) {
34716
+ return path14.join(xdg.cache(), finalPathSegment(dirOptions));
34717
+ };
34718
+ XDGAppPaths.config = function config(dirOptions) {
34719
+ return path14.join(xdg.config(), finalPathSegment(dirOptions));
34720
+ };
34721
+ XDGAppPaths.data = function data(dirOptions) {
34722
+ return path14.join(xdg.data(), finalPathSegment(dirOptions));
34723
+ };
34724
+ XDGAppPaths.runtime = function runtime(dirOptions) {
34725
+ return xdg.runtime() ? path14.join(xdg.runtime(), finalPathSegment(dirOptions)) : void 0;
34726
+ };
34727
+ XDGAppPaths.state = function state(dirOptions) {
34728
+ return path14.join(xdg.state(), finalPathSegment(dirOptions));
34729
+ };
34730
+ XDGAppPaths.configDirs = function configDirs(dirOptions) {
34731
+ return xdg.configDirs().map(function(s) {
34732
+ return path14.join(s, finalPathSegment(dirOptions));
34733
+ });
34734
+ };
34735
+ XDGAppPaths.dataDirs = function dataDirs(dirOptions) {
34736
+ return xdg.dataDirs().map(function(s) {
34737
+ return path14.join(s, finalPathSegment(dirOptions));
34738
+ });
34739
+ };
34740
+ return XDGAppPaths;
34741
+ }
34742
+ return XDGAppPaths_2;
34743
+ }();
34744
+ return { XDGAppPaths: new XDGAppPaths_() };
34745
+ }
34746
+ exports2.Adapt = Adapt;
34747
+ }
34748
+ });
34749
+
34750
+ // ../node_modules/xdg-portable/dist/cjs/lib/XDG.js
34751
+ var require_XDG = __commonJS({
34752
+ "../node_modules/xdg-portable/dist/cjs/lib/XDG.js"(exports2) {
34753
+ "use strict";
34754
+ var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) {
34755
+ for (var i2 = 0, il = from.length, j2 = to.length; i2 < il; i2++, j2++)
34756
+ to[j2] = from[i2];
34757
+ return to;
34758
+ };
34759
+ exports2.__esModule = true;
34760
+ exports2.Adapt = void 0;
34761
+ function Adapt(adapter_) {
34762
+ var env = adapter_.env, osPaths = adapter_.osPaths, path14 = adapter_.path;
34763
+ var isMacOS = /^darwin$/i.test(adapter_.process.platform);
34764
+ var isWinOS = /^win/i.test(adapter_.process.platform);
34765
+ function baseDir() {
34766
+ return osPaths.home() || osPaths.temp();
34767
+ }
34768
+ function valOrPath(val, pathSegments) {
34769
+ return val || path14.join.apply(path14, pathSegments);
34770
+ }
34771
+ var linux = function() {
34772
+ var cache = function() {
34773
+ return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
34774
+ };
34775
+ var config = function() {
34776
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
34777
+ };
34778
+ var data = function() {
34779
+ return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
34780
+ };
34781
+ var runtime = function() {
34782
+ return env.get("XDG_RUNTIME_DIR") || void 0;
34783
+ };
34784
+ var state = function() {
34785
+ return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
34786
+ };
34787
+ return { cache, config, data, runtime, state };
34788
+ };
34789
+ var macos = function() {
34790
+ var cache = function() {
34791
+ return valOrPath(env.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
34792
+ };
34793
+ var config = function() {
34794
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
34795
+ };
34796
+ var data = function() {
34797
+ return valOrPath(env.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
34798
+ };
34799
+ var runtime = function() {
34800
+ return env.get("XDG_RUNTIME_DIR") || void 0;
34801
+ };
34802
+ var state = function() {
34803
+ return valOrPath(env.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
34804
+ };
34805
+ return { cache, config, data, runtime, state };
34806
+ };
34807
+ var windows = function() {
34808
+ function appData() {
34809
+ return valOrPath(env.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
34810
+ }
34811
+ function localAppData() {
34812
+ return valOrPath(env.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
34813
+ }
34814
+ var cache = function() {
34815
+ return valOrPath(env.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
34816
+ };
34817
+ var config = function() {
34818
+ return valOrPath(env.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
34819
+ };
34820
+ var data = function() {
34821
+ return valOrPath(env.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
34822
+ };
34823
+ var runtime = function() {
34824
+ return env.get("XDG_RUNTIME_DIR") || void 0;
34825
+ };
34826
+ var state = function() {
34827
+ return valOrPath(env.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
34828
+ };
34829
+ return { cache, config, data, runtime, state };
34830
+ };
34831
+ var XDG_ = /* @__PURE__ */ function() {
34832
+ function XDG_2() {
34833
+ function XDG() {
34834
+ return new XDG_2();
34835
+ }
34836
+ var extension = isMacOS ? macos() : isWinOS ? windows() : linux();
34837
+ XDG.cache = extension.cache;
34838
+ XDG.config = extension.config;
34839
+ XDG.data = extension.data;
34840
+ XDG.runtime = extension.runtime;
34841
+ XDG.state = extension.state;
34842
+ XDG.configDirs = function configDirs() {
34843
+ var pathList = env.get("XDG_CONFIG_DIRS");
34844
+ return __spreadArray([extension.config()], pathList ? pathList.split(path14.delimiter) : []);
34845
+ };
34846
+ XDG.dataDirs = function dataDirs() {
34847
+ var pathList = env.get("XDG_DATA_DIRS");
34848
+ return __spreadArray([extension.data()], pathList ? pathList.split(path14.delimiter) : []);
34849
+ };
34850
+ return XDG;
34851
+ }
34852
+ return XDG_2;
34853
+ }();
34854
+ return { XDG: new XDG_() };
34855
+ }
34856
+ exports2.Adapt = Adapt;
34857
+ }
34858
+ });
34859
+
34860
+ // ../node_modules/os-paths/dist/cjs/lib/OSPaths.js
34861
+ var require_OSPaths = __commonJS({
34862
+ "../node_modules/os-paths/dist/cjs/lib/OSPaths.js"(exports2) {
34863
+ "use strict";
34864
+ var __spreadArray = exports2 && exports2.__spreadArray || function(to, from) {
34865
+ for (var i2 = 0, il = from.length, j2 = to.length; i2 < il; i2++, j2++)
34866
+ to[j2] = from[i2];
34867
+ return to;
34868
+ };
34869
+ exports2.__esModule = true;
34870
+ exports2.Adapt = void 0;
34871
+ function isEmpty(s) {
34872
+ return !s;
34873
+ }
34874
+ function Adapt(adapter_) {
34875
+ var env = adapter_.env, os3 = adapter_.os, path14 = adapter_.path;
34876
+ var isWinOS = /^win/i.test(adapter_.process.platform);
34877
+ function normalizePath(path_) {
34878
+ return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
34879
+ }
34880
+ function home() {
34881
+ var posix = function() {
34882
+ return normalizePath((typeof os3.homedir === "function" ? os3.homedir() : void 0) || env.get("HOME"));
34883
+ };
34884
+ var windows = function() {
34885
+ var priorityList = [
34886
+ typeof os3.homedir === "function" ? os3.homedir() : void 0,
34887
+ env.get("USERPROFILE"),
34888
+ env.get("HOME"),
34889
+ env.get("HOMEDRIVE") || env.get("HOMEPATH") ? path14.join(env.get("HOMEDRIVE") || "", env.get("HOMEPATH") || "") : void 0
34890
+ ];
34891
+ return normalizePath(priorityList.find(function(v2) {
34892
+ return !isEmpty(v2);
34893
+ }));
34894
+ };
34895
+ return isWinOS ? windows() : posix();
34896
+ }
34897
+ function temp() {
34898
+ function joinPathToBase(base, segments) {
34899
+ return base ? path14.join.apply(path14, __spreadArray([base], segments)) : void 0;
34900
+ }
34901
+ function posix() {
34902
+ var fallback = "/tmp";
34903
+ var priorityList = [
34904
+ typeof os3.tmpdir === "function" ? os3.tmpdir() : void 0,
34905
+ env.get("TMPDIR"),
34906
+ env.get("TEMP"),
34907
+ env.get("TMP")
34908
+ ];
34909
+ return normalizePath(priorityList.find(function(v2) {
34910
+ return !isEmpty(v2);
34911
+ })) || fallback;
34912
+ }
34913
+ function windows() {
34914
+ var fallback = "C:\\Temp";
34915
+ var priorityListLazy = [
34916
+ typeof os3.tmpdir === "function" ? os3.tmpdir : function() {
34917
+ return void 0;
34918
+ },
34919
+ function() {
34920
+ return env.get("TEMP");
34921
+ },
34922
+ function() {
34923
+ return env.get("TMP");
34924
+ },
34925
+ function() {
34926
+ return joinPathToBase(env.get("LOCALAPPDATA"), ["Temp"]);
34927
+ },
34928
+ function() {
34929
+ return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
34930
+ },
34931
+ function() {
34932
+ return joinPathToBase(env.get("ALLUSERSPROFILE"), ["Temp"]);
34933
+ },
34934
+ function() {
34935
+ return joinPathToBase(env.get("SystemRoot"), ["Temp"]);
34936
+ },
34937
+ function() {
34938
+ return joinPathToBase(env.get("windir"), ["Temp"]);
34939
+ },
34940
+ function() {
34941
+ return joinPathToBase(env.get("SystemDrive"), ["\\", "Temp"]);
34942
+ }
34943
+ ];
34944
+ var v2 = priorityListLazy.find(function(v3) {
34945
+ return v3 && !isEmpty(v3());
34946
+ });
34947
+ return v2 && normalizePath(v2()) || fallback;
34948
+ }
34949
+ return isWinOS ? windows() : posix();
34950
+ }
34951
+ var OSPaths_ = /* @__PURE__ */ function() {
34952
+ function OSPaths_2() {
34953
+ function OSPaths() {
34954
+ return new OSPaths_2();
34955
+ }
34956
+ OSPaths.home = home;
34957
+ OSPaths.temp = temp;
34958
+ return OSPaths;
34959
+ }
34960
+ return OSPaths_2;
34961
+ }();
34962
+ return { OSPaths: new OSPaths_() };
34963
+ }
34964
+ exports2.Adapt = Adapt;
34965
+ }
34966
+ });
34967
+
34968
+ // ../node_modules/os-paths/dist/cjs/platform-adapters/node.js
34969
+ var require_node = __commonJS({
34970
+ "../node_modules/os-paths/dist/cjs/platform-adapters/node.js"(exports2) {
34971
+ "use strict";
34972
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m2, k3, k22) {
34973
+ if (k22 === void 0) k22 = k3;
34974
+ Object.defineProperty(o3, k22, { enumerable: true, get: function() {
34975
+ return m2[k3];
34976
+ } });
34977
+ } : function(o3, m2, k3, k22) {
34978
+ if (k22 === void 0) k22 = k3;
34979
+ o3[k22] = m2[k3];
34980
+ });
34981
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) {
34982
+ Object.defineProperty(o3, "default", { enumerable: true, value: v2 });
34983
+ } : function(o3, v2) {
34984
+ o3["default"] = v2;
34985
+ });
34986
+ var __importStar = exports2 && exports2.__importStar || function(mod) {
34987
+ if (mod && mod.__esModule) return mod;
34988
+ var result = {};
34989
+ if (mod != null) {
34990
+ for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3);
34991
+ }
34992
+ __setModuleDefault(result, mod);
34993
+ return result;
34994
+ };
34995
+ exports2.__esModule = true;
34996
+ exports2.adapter = void 0;
34997
+ var os3 = __importStar(__require("os"));
34998
+ var path14 = __importStar(__require("path"));
34999
+ exports2.adapter = {
35000
+ atImportPermissions: { env: true },
35001
+ env: {
35002
+ get: function(s) {
35003
+ return process.env[s];
35004
+ }
35005
+ },
35006
+ os: os3,
35007
+ path: path14,
35008
+ process
35009
+ };
35010
+ }
35011
+ });
35012
+
35013
+ // ../node_modules/os-paths/dist/cjs/mod.cjs.js
35014
+ var require_mod_cjs = __commonJS({
35015
+ "../node_modules/os-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
35016
+ "use strict";
35017
+ var OSPaths_js_1 = require_OSPaths();
35018
+ var node_js_1 = require_node();
35019
+ module2.exports = OSPaths_js_1.Adapt(node_js_1.adapter).OSPaths;
35020
+ }
35021
+ });
35022
+
35023
+ // ../node_modules/xdg-portable/dist/cjs/platform-adapters/node.js
35024
+ var require_node2 = __commonJS({
35025
+ "../node_modules/xdg-portable/dist/cjs/platform-adapters/node.js"(exports2) {
35026
+ "use strict";
35027
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m2, k3, k22) {
35028
+ if (k22 === void 0) k22 = k3;
35029
+ Object.defineProperty(o3, k22, { enumerable: true, get: function() {
35030
+ return m2[k3];
35031
+ } });
35032
+ } : function(o3, m2, k3, k22) {
35033
+ if (k22 === void 0) k22 = k3;
35034
+ o3[k22] = m2[k3];
35035
+ });
35036
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) {
35037
+ Object.defineProperty(o3, "default", { enumerable: true, value: v2 });
35038
+ } : function(o3, v2) {
35039
+ o3["default"] = v2;
35040
+ });
35041
+ var __importStar = exports2 && exports2.__importStar || function(mod) {
35042
+ if (mod && mod.__esModule) return mod;
35043
+ var result = {};
35044
+ if (mod != null) {
35045
+ for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3);
35046
+ }
35047
+ __setModuleDefault(result, mod);
35048
+ return result;
35049
+ };
35050
+ var __importDefault = exports2 && exports2.__importDefault || function(mod) {
35051
+ return mod && mod.__esModule ? mod : { "default": mod };
35052
+ };
35053
+ exports2.__esModule = true;
35054
+ exports2.adapter = void 0;
35055
+ var path14 = __importStar(__require("path"));
35056
+ var os_paths_1 = __importDefault(require_mod_cjs());
35057
+ exports2.adapter = {
35058
+ atImportPermissions: { env: true },
35059
+ env: {
35060
+ get: function(s) {
35061
+ return process.env[s];
35062
+ }
35063
+ },
35064
+ osPaths: os_paths_1["default"],
35065
+ path: path14,
35066
+ process
35067
+ };
35068
+ }
35069
+ });
35070
+
35071
+ // ../node_modules/xdg-portable/dist/cjs/mod.cjs.js
35072
+ var require_mod_cjs2 = __commonJS({
35073
+ "../node_modules/xdg-portable/dist/cjs/mod.cjs.js"(exports2, module2) {
35074
+ "use strict";
35075
+ var XDG_js_1 = require_XDG();
35076
+ var node_js_1 = require_node2();
35077
+ module2.exports = XDG_js_1.Adapt(node_js_1.adapter).XDG;
35078
+ }
35079
+ });
35080
+
35081
+ // ../node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js
35082
+ var require_node3 = __commonJS({
35083
+ "../node_modules/xdg-app-paths/dist/cjs/platform-adapters/node.js"(exports2) {
35084
+ "use strict";
35085
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o3, m2, k3, k22) {
35086
+ if (k22 === void 0) k22 = k3;
35087
+ Object.defineProperty(o3, k22, { enumerable: true, get: function() {
35088
+ return m2[k3];
35089
+ } });
35090
+ } : function(o3, m2, k3, k22) {
35091
+ if (k22 === void 0) k22 = k3;
35092
+ o3[k22] = m2[k3];
35093
+ });
35094
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? function(o3, v2) {
35095
+ Object.defineProperty(o3, "default", { enumerable: true, value: v2 });
35096
+ } : function(o3, v2) {
35097
+ o3["default"] = v2;
35098
+ });
35099
+ var __importStar = exports2 && exports2.__importStar || function(mod) {
35100
+ if (mod && mod.__esModule) return mod;
35101
+ var result = {};
35102
+ if (mod != null) {
35103
+ for (var k3 in mod) if (k3 !== "default" && Object.prototype.hasOwnProperty.call(mod, k3)) __createBinding(result, mod, k3);
35104
+ }
35105
+ __setModuleDefault(result, mod);
35106
+ return result;
35107
+ };
35108
+ var __importDefault = exports2 && exports2.__importDefault || function(mod) {
35109
+ return mod && mod.__esModule ? mod : { "default": mod };
35110
+ };
35111
+ exports2.__esModule = true;
35112
+ exports2.adapter = void 0;
35113
+ var path14 = __importStar(__require("path"));
35114
+ var xdg_portable_1 = __importDefault(require_mod_cjs2());
35115
+ exports2.adapter = {
35116
+ atImportPermissions: { env: true, read: true },
35117
+ meta: {
35118
+ mainFilename: function() {
35119
+ var requireMain = typeof __require !== "undefined" && __require !== null && __require.main ? __require.main : { filename: void 0 };
35120
+ var requireMainFilename = requireMain.filename;
35121
+ var filename = (requireMainFilename !== process.execArgv[0] ? requireMainFilename : void 0) || (typeof process._eval === "undefined" ? process.argv[1] : void 0);
35122
+ return filename;
35123
+ },
35124
+ pkgMainFilename: function() {
35125
+ return process.pkg ? process.execPath : void 0;
35126
+ }
35127
+ },
35128
+ path: path14,
35129
+ process,
35130
+ xdg: xdg_portable_1["default"]
35131
+ };
35132
+ }
35133
+ });
35134
+
35135
+ // ../node_modules/xdg-app-paths/dist/cjs/mod.cjs.js
35136
+ var require_mod_cjs3 = __commonJS({
35137
+ "../node_modules/xdg-app-paths/dist/cjs/mod.cjs.js"(exports2, module2) {
35138
+ "use strict";
35139
+ var XDGAppPaths_js_1 = require_XDGAppPaths();
35140
+ var node_js_1 = require_node3();
35141
+ module2.exports = XDGAppPaths_js_1.Adapt(node_js_1.adapter).XDGAppPaths;
35142
+ }
35143
+ });
35144
+
34655
35145
  // ../node_modules/@iarna/toml/lib/parser.js
34656
35146
  var require_parser = __commonJS({
34657
35147
  "../node_modules/@iarna/toml/lib/parser.js"(exports2, module2) {
@@ -35039,14 +35529,14 @@ var require_toml_parser = __commonJS({
35039
35529
  try {
35040
35530
  const utilInspect = eval("require('util').inspect");
35041
35531
  _custom = utilInspect.custom;
35042
- } catch (_3) {
35532
+ } catch (_4) {
35043
35533
  }
35044
35534
  var _inspect = _custom || "inspect";
35045
35535
  var BoxedBigInt = class {
35046
35536
  constructor(value) {
35047
35537
  try {
35048
35538
  this.value = global.BigInt.asIntN(64, value);
35049
- } catch (_3) {
35539
+ } catch (_4) {
35050
35540
  this.value = null;
35051
35541
  }
35052
35542
  Object.defineProperty(this, _type, { value: INTEGER });
@@ -36535,7 +37025,7 @@ var require_stringify2 = __commonJS({
36535
37025
  case "datetime":
36536
37026
  return stringifyDatetime(value);
36537
37027
  case "array":
36538
- return stringifyInlineArray(value.filter((_3) => tomlType2(_3) !== "null" && tomlType2(_3) !== "undefined" && tomlType2(_3) !== "nan"));
37028
+ return stringifyInlineArray(value.filter((_4) => tomlType2(_4) !== "null" && tomlType2(_4) !== "undefined" && tomlType2(_4) !== "nan"));
36539
37029
  case "table":
36540
37030
  return stringifyInlineTable(value);
36541
37031
  /* istanbul ignore next */
@@ -36572,8 +37062,8 @@ var require_stringify2 = __commonJS({
36572
37062
  }
36573
37063
  function arrayType2(values) {
36574
37064
  var contentType = tomlType2(values[0]);
36575
- if (values.every((_3) => tomlType2(_3) === contentType)) return contentType;
36576
- if (values.every((_3) => isNumber(tomlType2(_3)))) return "float";
37065
+ if (values.every((_4) => tomlType2(_4) === contentType)) return contentType;
37066
+ if (values.every((_4) => isNumber(tomlType2(_4)))) return "float";
36577
37067
  return "mixed";
36578
37068
  }
36579
37069
  function validateArray(values) {
@@ -36587,7 +37077,7 @@ var require_stringify2 = __commonJS({
36587
37077
  values = toJSON(values);
36588
37078
  const type = validateArray(values);
36589
37079
  var result = "[";
36590
- var stringified = values.map((_3) => stringifyInline(_3, type));
37080
+ var stringified = values.map((_4) => stringifyInline(_4, type));
36591
37081
  if (stringified.join(", ").length > 60 || /\n/.test(stringified)) {
36592
37082
  result += "\n " + stringified.join(",\n ") + "\n";
36593
37083
  } else {
@@ -37392,7 +37882,7 @@ __export(external_exports, {
37392
37882
  // ../node_modules/zod/v3/helpers/util.js
37393
37883
  var util;
37394
37884
  (function(util2) {
37395
- util2.assertEqual = (_3) => {
37885
+ util2.assertEqual = (_4) => {
37396
37886
  };
37397
37887
  function assertIs(_arg) {
37398
37888
  }
@@ -37442,7 +37932,7 @@ var util;
37442
37932
  return array.map((val) => typeof val === "string" ? `'${val}'` : val).join(separator);
37443
37933
  }
37444
37934
  util2.joinValues = joinValues;
37445
- util2.jsonStringifyReplacer = (_3, value) => {
37935
+ util2.jsonStringifyReplacer = (_4, value) => {
37446
37936
  if (typeof value === "bigint") {
37447
37937
  return value.toString();
37448
37938
  }
@@ -44896,7 +45386,7 @@ var getStdioArray = (stdio, options) => {
44896
45386
  throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
44897
45387
  }
44898
45388
  const length = Math.max(stdio.length, STANDARD_STREAMS_ALIASES.length);
44899
- return Array.from({ length }, (_3, fdNumber) => stdio[fdNumber]);
45389
+ return Array.from({ length }, (_4, fdNumber) => stdio[fdNumber]);
44900
45390
  };
44901
45391
  var hasAlias = (options) => STANDARD_STREAMS_ALIASES.some((alias) => options[alias] !== void 0);
44902
45392
  var addDefaultValue2 = (stdioOption, fdNumber) => {
@@ -46726,7 +47216,7 @@ var SignalExit = class extends SignalExitBase {
46726
47216
  const fn = this.#sigListeners[sig];
46727
47217
  if (fn)
46728
47218
  this.#process.on(sig, fn);
46729
- } catch (_3) {
47219
+ } catch (_4) {
46730
47220
  }
46731
47221
  }
46732
47222
  this.#process.emit = (ev, ...a2) => {
@@ -46748,7 +47238,7 @@ var SignalExit = class extends SignalExitBase {
46748
47238
  }
46749
47239
  try {
46750
47240
  this.#process.removeListener(sig, listener);
46751
- } catch (_3) {
47241
+ } catch (_4) {
46752
47242
  }
46753
47243
  });
46754
47244
  this.#process.emit = this.#originalProcessEmit;
@@ -50167,7 +50657,7 @@ var Ok = class {
50167
50657
  return value;
50168
50658
  }();
50169
50659
  }
50170
- _unsafeUnwrap(_3) {
50660
+ _unsafeUnwrap(_4) {
50171
50661
  return this.value;
50172
50662
  }
50173
50663
  _unsafeUnwrapErr(config) {
@@ -50243,7 +50733,7 @@ var Err = class {
50243
50733
  _unsafeUnwrap(config) {
50244
50734
  throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
50245
50735
  }
50246
- _unsafeUnwrapErr(_3) {
50736
+ _unsafeUnwrapErr(_4) {
50247
50737
  return this.error;
50248
50738
  }
50249
50739
  *[Symbol.iterator]() {
@@ -50755,6 +51245,15 @@ defineLazyProperty(apps, "browser", () => "browser");
50755
51245
  defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
50756
51246
  var open_default = open;
50757
51247
 
51248
+ // ../node_modules/xdg-app-paths/dist/cjs/esm-wrapper/mod.esm.js
51249
+ var mod_esm_exports = {};
51250
+ __export(mod_esm_exports, {
51251
+ default: () => mod_esm_default
51252
+ });
51253
+ var import_mod_cjs = __toESM(require_mod_cjs3(), 1);
51254
+ __reExport(mod_esm_exports, __toESM(require_mod_cjs3(), 1));
51255
+ var mod_esm_default = import_mod_cjs.default;
51256
+
50758
51257
  // src/util/http-server.ts
50759
51258
  import http from "node:http";
50760
51259
  import { Readable as Readable4 } from "node:stream";
@@ -50910,44 +51409,6 @@ var decodeJSON = (response) => {
50910
51409
  ).andThen((json) => response.ok ? ok(json) : err(json));
50911
51410
  };
50912
51411
 
50913
- // src/util/xdg-paths.ts
50914
- import { join as join4 } from "node:path";
50915
- import { homedir } from "node:os";
50916
- function createXdgAppPaths(appName) {
50917
- const platform3 = process.platform;
50918
- const home = homedir();
50919
- function config() {
50920
- if (platform3 === "win32") {
50921
- return join4(
50922
- process.env.LOCALAPPDATA || join4(home, "AppData", "Local"),
50923
- appName
50924
- );
50925
- } else if (platform3 === "darwin") {
50926
- return join4(home, "Library", "Preferences", appName);
50927
- } else {
50928
- const xdgConfigHome = process.env.XDG_CONFIG_HOME || join4(home, ".config");
50929
- return join4(xdgConfigHome, appName);
50930
- }
50931
- }
50932
- function state() {
50933
- if (platform3 === "win32") {
50934
- return join4(
50935
- process.env.LOCALAPPDATA || join4(home, "AppData", "Local"),
50936
- appName
50937
- );
50938
- } else if (platform3 === "darwin") {
50939
- return join4(home, "Library", "Application Support", appName);
50940
- } else {
50941
- const xdgStateHome = process.env.XDG_STATE_HOME || join4(home, ".local", "state");
50942
- return join4(xdgStateHome, appName);
50943
- }
50944
- }
50945
- return {
50946
- config,
50947
- state
50948
- };
50949
- }
50950
-
50951
51412
  // src/cloudflare/oauth.ts
50952
51413
  var CLIENT_ID = "54d11594-84e4-41aa-b438-e81b8fa78ee7";
50953
51414
  var REDIRECT_URI = "http://localhost:8976/oauth/callback";
@@ -50990,7 +51451,7 @@ var getRefreshedWranglerConfig = singleFlight(
50990
51451
  })
50991
51452
  );
50992
51453
  var getWranglerConfigPath = memoize(async () => {
50993
- const xdgConfigDir = createXdgAppPaths(".wrangler").config();
51454
+ const xdgConfigDir = mod_esm_default(".wrangler").config();
50994
51455
  const legacyConfigDir = path13.join(os2.homedir(), ".wrangler");
50995
51456
  const configDir = await fs15.stat(legacyConfigDir).then((stat) => stat.isDirectory()).catch(() => false) ? legacyConfigDir : xdgConfigDir;
50996
51457
  return path13.join(configDir, "config", "default.toml");
@@ -51006,7 +51467,7 @@ var readWranglerConfig = () => {
51006
51467
  const config = toml.parse(text.replace(/\r\n/g, "\n"));
51007
51468
  assert(typeof config.oauth_token === "string");
51008
51469
  assert(typeof config.refresh_token === "string");
51009
- assert(config.expiration_time instanceof Date);
51470
+ assert(!!config.expiration_time);
51010
51471
  assert(Array.isArray(config.scopes));
51011
51472
  return {
51012
51473
  oauth_token: config.oauth_token,
@@ -51023,6 +51484,7 @@ var writeWranglerConfig = (config) => {
51023
51484
  return ResultAsync.fromSafePromise(getWranglerConfigPath()).map(
51024
51485
  async (configPath) => {
51025
51486
  const toml = await Promise.resolve().then(() => __toESM(require_toml(), 1));
51487
+ await fs15.mkdir(path13.dirname(configPath), { recursive: true });
51026
51488
  await fs15.writeFile(
51027
51489
  configPath,
51028
51490
  toml.stringify({