alchemy 0.46.0 → 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.
Files changed (61) hide show
  1. package/bin/alchemy.mjs +713 -255
  2. package/bin/commands/login.ts +2 -5
  3. package/lib/build-date.d.ts +1 -1
  4. package/lib/build-date.js +1 -1
  5. package/lib/cloudflare/api.d.ts +9 -5
  6. package/lib/cloudflare/api.d.ts.map +1 -1
  7. package/lib/cloudflare/api.js +6 -46
  8. package/lib/cloudflare/api.js.map +1 -1
  9. package/lib/cloudflare/auth.d.ts +16 -35
  10. package/lib/cloudflare/auth.d.ts.map +1 -1
  11. package/lib/cloudflare/auth.js +54 -24
  12. package/lib/cloudflare/auth.js.map +1 -1
  13. package/lib/cloudflare/{auth-wrangler.d.ts → oauth.d.ts} +11 -14
  14. package/lib/cloudflare/oauth.d.ts.map +1 -0
  15. package/lib/cloudflare/{auth-wrangler.js → oauth.js} +101 -111
  16. package/lib/cloudflare/oauth.js.map +1 -0
  17. package/lib/cloudflare/user.d.ts +1 -1
  18. package/lib/cloudflare/user.d.ts.map +1 -1
  19. package/lib/cloudflare/user.js +20 -29
  20. package/lib/cloudflare/user.js.map +1 -1
  21. package/lib/cloudflare/worker-metadata.d.ts +6 -0
  22. package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
  23. package/lib/cloudflare/worker-metadata.js +1 -0
  24. package/lib/cloudflare/worker-metadata.js.map +1 -1
  25. package/lib/cloudflare/worker.d.ts +27 -1
  26. package/lib/cloudflare/worker.d.ts.map +1 -1
  27. package/lib/cloudflare/worker.js +8 -3
  28. package/lib/cloudflare/worker.js.map +1 -1
  29. package/lib/cloudflare/zone.d.ts +1 -1
  30. package/lib/cloudflare/zone.d.ts.map +1 -1
  31. package/lib/cloudflare/zone.js +38 -56
  32. package/lib/cloudflare/zone.js.map +1 -1
  33. package/lib/util/memoize.d.ts +0 -1
  34. package/lib/util/memoize.d.ts.map +1 -1
  35. package/lib/util/memoize.js +0 -13
  36. package/lib/util/memoize.js.map +1 -1
  37. package/lib/util/neverthrow.d.ts +7 -0
  38. package/lib/util/neverthrow.d.ts.map +1 -1
  39. package/lib/util/neverthrow.js +17 -0
  40. package/lib/util/neverthrow.js.map +1 -1
  41. package/lib/util/telemetry/constants.js +2 -2
  42. package/lib/util/telemetry/constants.js.map +1 -1
  43. package/package.json +2 -1
  44. package/src/build-date.ts +1 -1
  45. package/src/cloudflare/api.ts +18 -57
  46. package/src/cloudflare/auth.ts +84 -68
  47. package/src/cloudflare/{auth-wrangler.ts → oauth.ts} +156 -169
  48. package/src/cloudflare/user.ts +33 -51
  49. package/src/cloudflare/worker-metadata.ts +7 -0
  50. package/src/cloudflare/worker.ts +40 -4
  51. package/src/cloudflare/zone.ts +50 -70
  52. package/src/util/memoize.ts +0 -17
  53. package/src/util/neverthrow.ts +28 -0
  54. package/src/util/telemetry/constants.ts +2 -2
  55. package/lib/cloudflare/auth-wrangler.d.ts.map +0 -1
  56. package/lib/cloudflare/auth-wrangler.js.map +0 -1
  57. package/lib/util/xdg-paths.d.ts +0 -9
  58. package/lib/util/xdg-paths.d.ts.map +0 -1
  59. package/lib/util/xdg-paths.js +0 -41
  60. package/lib/util/xdg-paths.js.map +0 -1
  61. package/src/util/xdg-paths.ts +0 -48
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-
@@ -112,7 +113,7 @@ var require_utils_BhNVZA_c = __commonJS({
112
113
  function identity3(it) {
113
114
  return it;
114
115
  }
115
- function assert(condition, msg = "no additional info") {
116
+ function assert2(condition, msg = "no additional info") {
116
117
  if (!condition) throw new Error(`AssertionError: ${msg}`);
117
118
  }
118
119
  function sleep(ms = 0) {
@@ -155,7 +156,7 @@ var require_utils_BhNVZA_c = __commonJS({
155
156
  Object.defineProperty(exports2, "assert", {
156
157
  enumerable: true,
157
158
  get: function() {
158
- return assert;
159
+ return assert2;
159
160
  }
160
161
  });
161
162
  Object.defineProperty(exports2, "identity", {
@@ -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 {
@@ -5208,11 +5209,11 @@ var require_util = __commonJS({
5208
5209
  exports2.assertNotEqual = assertNotEqual;
5209
5210
  exports2.assertIs = assertIs;
5210
5211
  exports2.assertNever = assertNever;
5211
- exports2.assert = assert;
5212
+ exports2.assert = assert2;
5212
5213
  exports2.getEnumValues = getEnumValues;
5213
5214
  exports2.joinValues = joinValues;
5214
5215
  exports2.jsonStringifyReplacer = jsonStringifyReplacer;
5215
- exports2.cached = cached;
5216
+ exports2.cached = cached2;
5216
5217
  exports2.nullish = nullish;
5217
5218
  exports2.cleanRegex = cleanRegex;
5218
5219
  exports2.floatSafeRemainder = floatSafeRemainder2;
@@ -5256,22 +5257,22 @@ var require_util = __commonJS({
5256
5257
  function assertNever(_x) {
5257
5258
  throw new Error();
5258
5259
  }
5259
- function assert(_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;
5273
5274
  }
5274
- function cached(getter) {
5275
+ function cached2(getter) {
5275
5276
  const set = false;
5276
5277
  return {
5277
5278
  get value() {
@@ -5360,7 +5361,7 @@ var require_util = __commonJS({
5360
5361
  function isObject2(data) {
5361
5362
  return typeof data === "object" && data !== null && !Array.isArray(data);
5362
5363
  }
5363
- exports2.allowsEval = cached(() => {
5364
+ exports2.allowsEval = cached2(() => {
5364
5365
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
5365
5366
  return false;
5366
5367
  }
@@ -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
  }
@@ -20960,10 +20961,10 @@ var require_zod = __commonJS({
20960
20961
  };
20961
20962
  Object.defineProperty(exports2, "__esModule", { value: true });
20962
20963
  exports2.z = void 0;
20963
- var z2 = __importStar(require_external());
20964
- exports2.z = z2;
20964
+ var z3 = __importStar(require_external());
20965
+ exports2.z = z3;
20965
20966
  __exportStar(require_external(), exports2);
20966
- exports2.default = z2;
20967
+ exports2.default = z3;
20967
20968
  }
20968
20969
  });
20969
20970
 
@@ -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;
@@ -25361,10 +25362,10 @@ var require_classic = __commonJS({
25361
25362
  };
25362
25363
  Object.defineProperty(exports2, "__esModule", { value: true });
25363
25364
  exports2.z = void 0;
25364
- var z2 = __importStar(require_external2());
25365
- exports2.z = z2;
25365
+ var z3 = __importStar(require_external2());
25366
+ exports2.z = z3;
25366
25367
  __exportStar(require_external2(), exports2);
25367
- exports2.default = z2;
25368
+ exports2.default = z3;
25368
25369
  }
25369
25370
  });
25370
25371
 
@@ -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 {
@@ -36648,7 +37138,7 @@ var require_toml = __commonJS({
36648
37138
  });
36649
37139
 
36650
37140
  // bin/alchemy.ts
36651
- var import_trpc_cli2 = __toESM(require_dist2(), 1);
37141
+ var import_trpc_cli3 = __toESM(require_dist2(), 1);
36652
37142
 
36653
37143
  // ../node_modules/@clack/prompts/dist/index.mjs
36654
37144
  import { stripVTControlCharacters as S2 } from "node:util";
@@ -37255,8 +37745,8 @@ var Y2 = ({ indicator: t2 = "dots" } = {}) => {
37255
37745
  if (i2) process.stdout.write(`${I2} ${l2}...`);
37256
37746
  else if (t2 === "timer") process.stdout.write(`${I2} ${l2} ${O2(g2)}`);
37257
37747
  else {
37258
- const z2 = ".".repeat(Math.floor(w2)).slice(0, 3);
37259
- process.stdout.write(`${I2} ${l2}${z2}`);
37748
+ const z3 = ".".repeat(Math.floor(w2)).slice(0, 3);
37749
+ process.stdout.write(`${I2} ${l2}${z3}`);
37260
37750
  }
37261
37751
  h3 = h3 + 1 < n2.length ? h3 + 1 : 0, w2 = w2 < n2.length ? w2 + 0.125 : 0;
37262
37752
  }, r2);
@@ -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;
@@ -49673,6 +50163,7 @@ var dev = t.procedure.meta({
49673
50163
 
49674
50164
  // bin/commands/login.ts
49675
50165
  var import_picocolors6 = __toESM(require_picocolors(), 1);
50166
+ var import_trpc_cli2 = __toESM(require_dist2(), 1);
49676
50167
 
49677
50168
  // ../node_modules/kleur/index.mjs
49678
50169
  var FORCE_COLOR;
@@ -50039,6 +50530,9 @@ var ResultAsync = class _ResultAsync {
50039
50530
  });
50040
50531
  }
50041
50532
  };
50533
+ function okAsync(value) {
50534
+ return new ResultAsync(Promise.resolve(new Ok(value)));
50535
+ }
50042
50536
  function errAsync(err2) {
50043
50537
  return new ResultAsync(Promise.resolve(new Err(err2)));
50044
50538
  }
@@ -50163,7 +50657,7 @@ var Ok = class {
50163
50657
  return value;
50164
50658
  }();
50165
50659
  }
50166
- _unsafeUnwrap(_3) {
50660
+ _unsafeUnwrap(_4) {
50167
50661
  return this.value;
50168
50662
  }
50169
50663
  _unsafeUnwrapErr(config) {
@@ -50239,7 +50733,7 @@ var Err = class {
50239
50733
  _unsafeUnwrap(config) {
50240
50734
  throw createNeverThrowError("Called `_unsafeUnwrap` on an Err", this, config);
50241
50735
  }
50242
- _unsafeUnwrapErr(_3) {
50736
+ _unsafeUnwrapErr(_4) {
50243
50737
  return this.error;
50244
50738
  }
50245
50739
  *[Symbol.iterator]() {
@@ -50250,7 +50744,8 @@ var Err = class {
50250
50744
  };
50251
50745
  var fromThrowable = Result.fromThrowable;
50252
50746
 
50253
- // src/cloudflare/auth-wrangler.ts
50747
+ // src/cloudflare/oauth.ts
50748
+ import assert from "node:assert";
50254
50749
  import crypto from "node:crypto";
50255
50750
  import fs15 from "node:fs/promises";
50256
50751
  import os2 from "node:os";
@@ -50750,6 +51245,15 @@ defineLazyProperty(apps, "browser", () => "browser");
50750
51245
  defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
50751
51246
  var open_default = open;
50752
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
+
50753
51257
  // src/util/http-server.ts
50754
51258
  import http from "node:http";
50755
51259
  import { Readable as Readable4 } from "node:stream";
@@ -50840,9 +51344,9 @@ function memoize(fn, keyFn = defaultKeyFn) {
50840
51344
  const cache = /* @__PURE__ */ new Map();
50841
51345
  return async (...args) => {
50842
51346
  const key = keyFn(...args);
50843
- const cached = cache.get(key);
50844
- if (cached) {
50845
- return await cached;
51347
+ const cached2 = cache.get(key);
51348
+ if (cached2) {
51349
+ return await cached2;
50846
51350
  }
50847
51351
  const promise = fn(...args).catch((error) => {
50848
51352
  cache.delete(key);
@@ -50852,19 +51356,6 @@ function memoize(fn, keyFn = defaultKeyFn) {
50852
51356
  return await promise;
50853
51357
  };
50854
51358
  }
50855
- function memoizeSync(fn, keyFn = defaultKeyFn) {
50856
- const cache = /* @__PURE__ */ new Map();
50857
- return (...args) => {
50858
- const key = keyFn(...args);
50859
- const cached = cache.get(key);
50860
- if (cached) {
50861
- return cached;
50862
- }
50863
- const result = fn(...args);
50864
- cache.set(key, result);
50865
- return result;
50866
- };
50867
- }
50868
51359
  var defaultKeyFn = (...args) => {
50869
51360
  return createHash("sha256").update(JSON.stringify(args)).digest("hex");
50870
51361
  };
@@ -50885,9 +51376,9 @@ var singleFlight = (fn) => {
50885
51376
  const results = /* @__PURE__ */ new Map();
50886
51377
  return (...args) => {
50887
51378
  const key = JSON.stringify(args ?? []);
50888
- const cached = results.get(key);
50889
- if (cached) {
50890
- return cached;
51379
+ const cached2 = results.get(key);
51380
+ if (cached2) {
51381
+ return cached2;
50891
51382
  }
50892
51383
  const result = fn(...args);
50893
51384
  results.set(key, result);
@@ -50896,49 +51387,31 @@ var singleFlight = (fn) => {
50896
51387
  });
50897
51388
  };
50898
51389
  };
50899
-
50900
- // src/util/xdg-paths.ts
50901
- import { join as join4 } from "node:path";
50902
- import { homedir } from "node:os";
50903
- function createXdgAppPaths(appName) {
50904
- const platform3 = process.platform;
50905
- const home = homedir();
50906
- function config() {
50907
- if (platform3 === "win32") {
50908
- return join4(
50909
- process.env.LOCALAPPDATA || join4(home, "AppData", "Local"),
50910
- appName
50911
- );
50912
- } else if (platform3 === "darwin") {
50913
- return join4(home, "Library", "Preferences", appName);
50914
- } else {
50915
- const xdgConfigHome = process.env.XDG_CONFIG_HOME || join4(home, ".config");
50916
- return join4(xdgConfigHome, appName);
50917
- }
50918
- }
50919
- function state() {
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", "Application Support", appName);
50927
- } else {
50928
- const xdgStateHome = process.env.XDG_STATE_HOME || join4(home, ".local", "state");
50929
- return join4(xdgStateHome, appName);
50930
- }
51390
+ var HTTPError = class extends Error {
51391
+ constructor(message, status) {
51392
+ super(message);
51393
+ this.status = status;
50931
51394
  }
50932
- return {
50933
- config,
50934
- state
50935
- };
50936
- }
51395
+ };
51396
+ var fetchResult = (url, init2 = {}) => {
51397
+ return ResultAsync.fromPromise(
51398
+ fetch(url, init2),
51399
+ () => new HTTPError(`Failed to ${init2.method ?? "GET"} ${url}`, 0)
51400
+ );
51401
+ };
51402
+ var fetchJSON = (url, init2 = {}) => {
51403
+ return fetchResult(url, init2).andThen(decodeJSON);
51404
+ };
51405
+ var decodeJSON = (response) => {
51406
+ return ResultAsync.fromPromise(
51407
+ response.json(),
51408
+ () => new HTTPError("Failed to decode JSON", response.status)
51409
+ ).andThen((json) => response.ok ? ok(json) : err(json));
51410
+ };
50937
51411
 
50938
- // src/cloudflare/auth-wrangler.ts
51412
+ // src/cloudflare/oauth.ts
50939
51413
  var CLIENT_ID = "54d11594-84e4-41aa-b438-e81b8fa78ee7";
50940
51414
  var REDIRECT_URI = "http://localhost:8976/oauth/callback";
50941
- var ALCHEMY_BASE_URL = "https://alchemy.run";
50942
51415
  var DEFAULT_SCOPES = [
50943
51416
  "account:read",
50944
51417
  "user:read",
@@ -50958,37 +51431,60 @@ var DEFAULT_SCOPES = [
50958
51431
  "containers:write",
50959
51432
  "cloudchamber:write"
50960
51433
  ];
51434
+ var ALCHEMY_BASE_URL = "https://alchemy.run";
51435
+ var cached;
51436
+ var getRefreshedWranglerConfig = singleFlight(
51437
+ () => readWranglerConfig().andThen((config) => {
51438
+ if (config.expiration_time.getTime() > Date.now() + 10 * 1e3) {
51439
+ return ok(config);
51440
+ }
51441
+ return fetchToken({
51442
+ grant_type: "refresh_token",
51443
+ refresh_token: config.refresh_token,
51444
+ client_id: CLIENT_ID
51445
+ });
51446
+ }).orElse((error) => {
51447
+ if (isInteractive()) {
51448
+ return wranglerLogin();
51449
+ }
51450
+ return err(error);
51451
+ })
51452
+ );
50961
51453
  var getWranglerConfigPath = memoize(async () => {
50962
- const xdgConfigDir = createXdgAppPaths(".wrangler").config();
51454
+ const xdgConfigDir = mod_esm_default(".wrangler").config();
50963
51455
  const legacyConfigDir = path13.join(os2.homedir(), ".wrangler");
50964
51456
  const configDir = await fs15.stat(legacyConfigDir).then((stat) => stat.isDirectory()).catch(() => false) ? legacyConfigDir : xdgConfigDir;
50965
51457
  return path13.join(configDir, "config", "default.toml");
50966
51458
  });
50967
51459
  var readWranglerConfig = () => {
50968
- return ResultAsync.fromSafePromise(getWranglerConfigPath()).andThen(
50969
- (path14) => ResultAsync.fromPromise(
50970
- fs15.readFile(path14, "utf-8").then(async (text) => {
50971
- const toml = await Promise.resolve().then(() => __toESM(require_toml(), 1));
50972
- return toml.parse(text.replace(/\r\n/g, "\n"));
50973
- }),
50974
- () => new Error("Failed to read Wrangler config.")
50975
- )
50976
- ).andThen((config) => {
50977
- if (typeof config.oauth_token !== "string" || typeof config.refresh_token !== "string" || !config.expiration_time || !Array.isArray(config.scopes)) {
50978
- return err(new Error("Invalid Wrangler config."));
50979
- }
50980
- return ok({
50981
- oauth_token: config.oauth_token,
50982
- refresh_token: config.refresh_token,
50983
- expiration_time: new Date(config.expiration_time),
50984
- scopes: Array.from(config.scopes)
50985
- });
50986
- });
51460
+ if (cached) {
51461
+ return okAsync(cached);
51462
+ }
51463
+ return ResultAsync.fromPromise(
51464
+ getWranglerConfigPath().then(async (path14) => {
51465
+ const text = await fs15.readFile(path14, "utf-8");
51466
+ const toml = await Promise.resolve().then(() => __toESM(require_toml(), 1));
51467
+ const config = toml.parse(text.replace(/\r\n/g, "\n"));
51468
+ assert(typeof config.oauth_token === "string");
51469
+ assert(typeof config.refresh_token === "string");
51470
+ assert(!!config.expiration_time);
51471
+ assert(Array.isArray(config.scopes));
51472
+ return {
51473
+ oauth_token: config.oauth_token,
51474
+ refresh_token: config.refresh_token,
51475
+ expiration_time: new Date(config.expiration_time),
51476
+ scopes: config.scopes
51477
+ };
51478
+ }),
51479
+ () => new Error("Cloudflare credentials are missing or invalid.")
51480
+ );
50987
51481
  };
50988
51482
  var writeWranglerConfig = (config) => {
51483
+ cached = config;
50989
51484
  return ResultAsync.fromSafePromise(getWranglerConfigPath()).map(
50990
51485
  async (configPath) => {
50991
51486
  const toml = await Promise.resolve().then(() => __toESM(require_toml(), 1));
51487
+ await fs15.mkdir(path13.dirname(configPath), { recursive: true });
50992
51488
  await fs15.writeFile(
50993
51489
  configPath,
50994
51490
  toml.stringify({
@@ -51001,98 +51497,6 @@ var writeWranglerConfig = (config) => {
51001
51497
  }
51002
51498
  );
51003
51499
  };
51004
- var fetchToken = (body) => {
51005
- return ResultAsync.fromPromise(
51006
- fetch("https://dash.cloudflare.com/oauth2/token", {
51007
- method: "POST",
51008
- headers: {
51009
- "Content-Type": "application/x-www-form-urlencoded"
51010
- },
51011
- body: new URLSearchParams(body)
51012
- }),
51013
- () => new OAuthError({
51014
- error: "fetch_error",
51015
- error_description: "Failed to fetch OAuth token.",
51016
- status_code: 0
51017
- })
51018
- ).andThen(
51019
- (res) => ResultAsync.fromPromise(
51020
- res.json(),
51021
- () => new OAuthError({
51022
- error: "invalid_response",
51023
- error_description: "The server returned an invalid response.",
51024
- status_code: res.status
51025
- })
51026
- ).andThen(
51027
- (json) => res.ok ? ok(json) : err(new OAuthError(json))
51028
- )
51029
- ).map(
51030
- (tokens) => ({
51031
- oauth_token: tokens.access_token,
51032
- refresh_token: tokens.refresh_token,
51033
- expiration_time: new Date(Date.now() + tokens.expires_in * 1e3),
51034
- scopes: tokens.scope.split(" ")
51035
- })
51036
- ).andTee((config) => writeWranglerConfig(config));
51037
- };
51038
- var getRefreshedWranglerConfig = singleFlight(
51039
- memoizeSync(
51040
- () => {
51041
- return readWranglerConfig().andThen((config) => {
51042
- if (config.expiration_time.getTime() > Date.now() + 10 * 1e3) {
51043
- return ok(config);
51044
- }
51045
- return fetchToken({
51046
- grant_type: "refresh_token",
51047
- refresh_token: config.refresh_token,
51048
- client_id: CLIENT_ID
51049
- });
51050
- }).orElse((error) => {
51051
- if (isInteractive()) {
51052
- return wranglerLogin();
51053
- }
51054
- if (error instanceof OAuthError) {
51055
- return err(error);
51056
- }
51057
- return ok(null);
51058
- });
51059
- },
51060
- () => Math.floor(Date.now() / 5e3).toString()
51061
- )
51062
- );
51063
- var isInteractive = () => {
51064
- return process.stdin.isTTY && process.stdout.isTTY && !process.env.CI;
51065
- };
51066
- var generateAuthorizationURL = (scopes) => {
51067
- const state = crypto.randomBytes(32).toString("base64url");
51068
- const verifier = crypto.randomBytes(96).toString("base64url");
51069
- const challenge = crypto.createHash("sha256").update(verifier).digest("base64url");
51070
- const url = new URL("https://dash.cloudflare.com/oauth2/auth");
51071
- url.search = new URLSearchParams({
51072
- response_type: "code",
51073
- client_id: CLIENT_ID,
51074
- redirect_uri: REDIRECT_URI,
51075
- scope: [...scopes, "offline_access"].join(" "),
51076
- state,
51077
- code_challenge: challenge,
51078
- code_challenge_method: "S256"
51079
- }).toString();
51080
- return { url: url.toString(), state, verifier };
51081
- };
51082
- var OAuthError = class extends Error {
51083
- error;
51084
- error_verbose;
51085
- error_hint;
51086
- status_code;
51087
- constructor(params) {
51088
- console.dir(params, { depth: null });
51089
- super(params.error_description);
51090
- this.error = params.error;
51091
- this.error_verbose = params.error_verbose;
51092
- this.error_hint = params.error_hint;
51093
- this.status_code = params.status_code;
51094
- }
51095
- };
51096
51500
  var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51097
51501
  const challenge = generateAuthorizationURL(scopes);
51098
51502
  log(
@@ -51107,6 +51511,9 @@ var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51107
51511
  );
51108
51512
  open_default(challenge.url);
51109
51513
  const { result, ok: ok2, err: err2 } = detached();
51514
+ const renderResponse = async (type) => {
51515
+ return Response.redirect(`${ALCHEMY_BASE_URL}/auth/${type}`);
51516
+ };
51110
51517
  const server = new HTTPServer({
51111
51518
  port: 8976,
51112
51519
  fetch: async (request) => {
@@ -51126,7 +51533,7 @@ var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51126
51533
  status_code: 400
51127
51534
  })
51128
51535
  );
51129
- return Response.redirect(`${ALCHEMY_BASE_URL}/auth/error`);
51536
+ return renderResponse("error");
51130
51537
  }
51131
51538
  if (!code || !state || state !== challenge.state) {
51132
51539
  err2(
@@ -51136,7 +51543,7 @@ var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51136
51543
  status_code: 400
51137
51544
  })
51138
51545
  );
51139
- return Response.redirect(`${ALCHEMY_BASE_URL}/auth/error`);
51546
+ return renderResponse("error");
51140
51547
  }
51141
51548
  const tokens = await fetchToken({
51142
51549
  grant_type: "authorization_code",
@@ -51147,10 +51554,10 @@ var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51147
51554
  });
51148
51555
  if (tokens.isErr()) {
51149
51556
  err2(tokens.error);
51150
- return Response.redirect(`${ALCHEMY_BASE_URL}/auth/error`);
51557
+ return renderResponse("error");
51151
51558
  }
51152
51559
  ok2(tokens.value);
51153
- return Response.redirect(`${ALCHEMY_BASE_URL}/auth/success`);
51560
+ return renderResponse("success");
51154
51561
  }
51155
51562
  });
51156
51563
  const timeout = setTimeout(
@@ -51165,20 +51572,71 @@ var wranglerLogin = (scopes = DEFAULT_SCOPES, log = console.log) => {
51165
51572
  },
51166
51573
  1e3 * 60 * 5
51167
51574
  );
51168
- return ensure(result, async () => {
51575
+ return ensure(result, () => {
51169
51576
  clearTimeout(timeout);
51170
- await server.stop();
51577
+ void server.stop();
51171
51578
  });
51172
51579
  };
51580
+ var generateAuthorizationURL = (scopes) => {
51581
+ const state = crypto.randomBytes(32).toString("base64url");
51582
+ const verifier = crypto.randomBytes(96).toString("base64url");
51583
+ const challenge = crypto.createHash("sha256").update(verifier).digest("base64url");
51584
+ const url = new URL("https://dash.cloudflare.com/oauth2/auth");
51585
+ url.search = new URLSearchParams({
51586
+ response_type: "code",
51587
+ client_id: CLIENT_ID,
51588
+ redirect_uri: "http://localhost:8976/oauth/callback",
51589
+ scope: [...scopes, "offline_access"].join(" "),
51590
+ state,
51591
+ code_challenge: challenge,
51592
+ code_challenge_method: "S256"
51593
+ }).toString();
51594
+ return { url: url.toString(), state, verifier };
51595
+ };
51596
+ var OAuthError = class extends Error {
51597
+ constructor(params) {
51598
+ super(
51599
+ `Cloudflare authentication failed with error ${params.error} (${params.status_code}): ${params.error_description}`
51600
+ );
51601
+ }
51602
+ };
51603
+ var fetchToken = (body) => {
51604
+ return fetchJSON(
51605
+ "https://dash.cloudflare.com/oauth2/token",
51606
+ {
51607
+ method: "POST",
51608
+ headers: {
51609
+ "Content-Type": "application/x-www-form-urlencoded"
51610
+ },
51611
+ body: new URLSearchParams(body)
51612
+ }
51613
+ ).map(
51614
+ (tokens) => ({
51615
+ oauth_token: tokens.access_token,
51616
+ refresh_token: tokens.refresh_token,
51617
+ expiration_time: new Date(Date.now() + tokens.expires_in * 1e3),
51618
+ scopes: tokens.scope.split(" ")
51619
+ })
51620
+ ).mapErr(
51621
+ (error) => error instanceof HTTPError ? new OAuthError({
51622
+ error: "http_error",
51623
+ error_description: error.message,
51624
+ status_code: error.status
51625
+ }) : new OAuthError(error)
51626
+ ).andTee((config) => writeWranglerConfig(config));
51627
+ };
51628
+ var isInteractive = () => {
51629
+ return process.stdin.isTTY && process.stdout.isTTY && !process.env.CI;
51630
+ };
51173
51631
 
51174
51632
  // bin/commands/login.ts
51175
51633
  var login = t.procedure.meta({
51176
51634
  description: "Login to Cloudflare"
51177
51635
  }).input(
51178
- zod_default.tuple([
51179
- zod_default.object({
51180
- scopes: zod_default.array(zod_default.string()).optional().default([]).describe("Cloudflare OAuth scopes to authorize"),
51181
- defaultScopes: zod_default.boolean().optional().default(true).describe(
51636
+ import_trpc_cli2.zod.tuple([
51637
+ import_trpc_cli2.zod.object({
51638
+ scopes: import_trpc_cli2.zod.array(import_trpc_cli2.zod.string()).optional().default([]).describe("Cloudflare OAuth scopes to authorize"),
51639
+ defaultScopes: import_trpc_cli2.zod.boolean().optional().default(true).describe(
51182
51640
  "Whether to include the default Wrangler scopes when authenticating"
51183
51641
  )
51184
51642
  })
@@ -51241,7 +51699,7 @@ var router = t.router({
51241
51699
  dev,
51242
51700
  run: run2
51243
51701
  });
51244
- var cli = (0, import_trpc_cli2.createCli)({
51702
+ var cli = (0, import_trpc_cli3.createCli)({
51245
51703
  router,
51246
51704
  name: "alchemy",
51247
51705
  version: getPackageVersion(),