@storm-software/eslint 0.162.1 → 0.163.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/preset.js CHANGED
@@ -5,16 +5,16 @@ import {
5
5
  isPackageInScope,
6
6
  parserPlain,
7
7
  renameRules
8
- } from "./chunk-2ASHINGN.js";
8
+ } from "./chunk-D7COKLND.js";
9
9
  import {
10
10
  getTsConfigPath
11
- } from "./chunk-WSRPN4A5.js";
11
+ } from "./chunk-ROE6YWPJ.js";
12
12
  import {
13
13
  banner_plugin_default
14
- } from "./chunk-URESQVUQ.js";
14
+ } from "./chunk-BBKL5SSX.js";
15
15
  import {
16
16
  getFileBanner
17
- } from "./chunk-2PBILQLV.js";
17
+ } from "./chunk-HMONPZQV.js";
18
18
  import {
19
19
  GLOB_ASTRO,
20
20
  GLOB_ASTRO_TS,
@@ -41,18 +41,19 @@ import {
41
41
  GLOB_TSX,
42
42
  GLOB_XML,
43
43
  GLOB_YAML
44
- } from "./chunk-FYHJSIQT.js";
44
+ } from "./chunk-NVCVBDX5.js";
45
45
  import {
46
46
  findWorkspaceRoot
47
- } from "./chunk-CP5TACRD.js";
47
+ } from "./chunk-TJ47LVUP.js";
48
48
  import {
49
49
  joinPaths
50
- } from "./chunk-LFKAEEDN.js";
50
+ } from "./chunk-4T2VGUKQ.js";
51
51
  import {
52
52
  __commonJS,
53
+ __export,
53
54
  __toESM,
54
55
  init_esm_shims
55
- } from "./chunk-ECVSHAMX.js";
56
+ } from "./chunk-VQHWUYQL.js";
56
57
 
57
58
  // ../../node_modules/.pnpm/eslint-plugin-tsdoc@0.4.0_patch_hash=de009a33a0a628f48c96f1a59298fb264fe3e5f5a0a221b7fda5cc52d4c890de/node_modules/eslint-plugin-tsdoc/lib/Debug.js
58
59
  var require_Debug = __commonJS({
@@ -652,7 +653,7 @@ async function stylistic(options = {}) {
652
653
  const pluginStylistic = await interopDefault(
653
654
  import("@stylistic/eslint-plugin")
654
655
  );
655
- const config2 = pluginStylistic.configs.customize({
656
+ const config3 = pluginStylistic.configs.customize({
656
657
  indent,
657
658
  jsx: jsx2,
658
659
  pluginName: "style",
@@ -666,7 +667,7 @@ async function stylistic(options = {}) {
666
667
  style: pluginStylistic
667
668
  },
668
669
  rules: {
669
- ...config2.rules,
670
+ ...config3.rules,
670
671
  "style/lines-around-comment": "off",
671
672
  "style/linebreak-style": ["error", lineEndings],
672
673
  "style/comma-dangle": ["error", "never"],
@@ -1144,9 +1145,10 @@ init_esm_shims();
1144
1145
  import { default as default2 } from "@cspell/eslint-plugin";
1145
1146
  import { default as default3 } from "@nx/eslint-plugin/nx.js";
1146
1147
  import * as pluginImport from "eslint-plugin-import-x";
1147
- import { default as default4 } from "eslint-plugin-n";
1148
- import { default as default5 } from "eslint-plugin-no-secrets";
1149
- import { default as default6 } from "eslint-plugin-perfectionist";
1148
+ import { default as default4 } from "eslint-plugin-import-zod";
1149
+ import { default as default5 } from "eslint-plugin-n";
1150
+ import { default as default6 } from "eslint-plugin-no-secrets";
1151
+ import { default as default7 } from "eslint-plugin-perfectionist";
1150
1152
 
1151
1153
  // ../../node_modules/.pnpm/eslint-plugin-pnpm@0.3.0_patch_hash=72dcde755c336eeca3e6170de1106fd85ecb66171e060788f80_a52766881145434b16cf7b4f340819e2/node_modules/eslint-plugin-pnpm/dist/index.mjs
1152
1154
  init_esm_shims();
@@ -1262,9 +1264,9 @@ function readPnpmWorkspace() {
1262
1264
  clearTimeout(queueTimer);
1263
1265
  queueTimer = setTimeout(() => {
1264
1266
  queueTimer = void 0;
1265
- const clone = [...queue];
1267
+ const clone2 = [...queue];
1266
1268
  queue.length = 0;
1267
- for (const fn2 of clone)
1269
+ for (const fn2 of clone2)
1268
1270
  fn2(workspace2);
1269
1271
  if (workspace2.hasChanged())
1270
1272
  write();
@@ -1838,9 +1840,9 @@ var configs = {
1838
1840
  plugin.configs = configs;
1839
1841
 
1840
1842
  // src/plugins.ts
1841
- import { default as default7 } from "eslint-plugin-prettier";
1842
- import { default as default8 } from "eslint-plugin-unicorn";
1843
- import { default as default9 } from "eslint-plugin-unused-imports";
1843
+ import { default as default8 } from "eslint-plugin-prettier";
1844
+ import { default as default9 } from "eslint-plugin-unicorn";
1845
+ import { default as default10 } from "eslint-plugin-unused-imports";
1844
1846
 
1845
1847
  // src/configs/imports.ts
1846
1848
  async function imports(options = {}) {
@@ -2004,8 +2006,8 @@ var CONSOLE_ICONS = {
2004
2006
 
2005
2007
  // ../config-tools/src/logger/format-timestamp.ts
2006
2008
  init_esm_shims();
2007
- var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
2008
- return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
2009
+ var formatTimestamp = (date2 = /* @__PURE__ */ new Date()) => {
2010
+ return `${date2.toLocaleDateString()} ${date2.toLocaleTimeString()}`;
2009
2011
  };
2010
2012
 
2011
2013
  // ../config-tools/src/logger/get-log-level.ts
@@ -2061,9 +2063,9 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
2061
2063
  };
2062
2064
 
2063
2065
  // ../config-tools/src/logger/console.ts
2064
- var getLogFn = (logLevel = LogLevel.INFO, config2 = {}, _chalk = getChalk()) => {
2065
- const colors = !config2.colors?.dark && !config2.colors?.["base"] && !config2.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config2.colors?.dark && typeof config2.colors.dark === "string" ? config2.colors : config2.colors?.["base"]?.dark && typeof config2.colors["base"].dark === "string" ? config2.colors["base"].dark : config2.colors?.["base"] ? config2.colors?.["base"] : DEFAULT_COLOR_CONFIG;
2066
- const configLogLevel = config2.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
2066
+ var getLogFn = (logLevel = LogLevel.INFO, config3 = {}, _chalk = getChalk()) => {
2067
+ const colors = !config3.colors?.dark && !config3.colors?.["base"] && !config3.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config3.colors?.dark && typeof config3.colors.dark === "string" ? config3.colors : config3.colors?.["base"]?.dark && typeof config3.colors["base"].dark === "string" ? config3.colors["base"].dark : config3.colors?.["base"] ? config3.colors?.["base"] : DEFAULT_COLOR_CONFIG;
2068
+ const configLogLevel = config3.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
2067
2069
  if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
2068
2070
  return (_) => {
2069
2071
  };
@@ -2139,8 +2141,8 @@ ${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CON
2139
2141
  );
2140
2142
  };
2141
2143
  };
2142
- var writeWarning = (message, config2) => getLogFn(LogLevel.WARN, config2)(message);
2143
- var writeTrace = (message, config2) => getLogFn(LogLevel.TRACE, config2)(message);
2144
+ var writeWarning = (message, config3) => getLogFn(LogLevel.WARN, config3)(message);
2145
+ var writeTrace = (message, config3) => getLogFn(LogLevel.TRACE, config3)(message);
2144
2146
  var MAX_DEPTH = 4;
2145
2147
  var formatLogMessage = (message, options = {}, depth2 = 0) => {
2146
2148
  if (depth2 > MAX_DEPTH) {
@@ -2420,78 +2422,1845 @@ init_esm_shims();
2420
2422
 
2421
2423
  // ../config/src/schema.ts
2422
2424
  init_esm_shims();
2423
- import * as z from "zod/mini";
2424
- var schemaRegistry = z.registry();
2425
- var colorSchema = z.string().check(
2426
- z.length(7),
2427
- z.toLowerCase(),
2428
- z.regex(/^#([0-9a-f]{3}){1,2}$/i),
2429
- z.trim()
2425
+
2426
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/mini/external.js
2427
+ init_esm_shims();
2428
+
2429
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/index.js
2430
+ init_esm_shims();
2431
+
2432
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/core.js
2433
+ init_esm_shims();
2434
+ var NEVER = Object.freeze({
2435
+ status: "aborted"
2436
+ });
2437
+ // @__NO_SIDE_EFFECTS__
2438
+ function $constructor(name2, initializer2, params) {
2439
+ function init(inst, def) {
2440
+ var _a;
2441
+ Object.defineProperty(inst, "_zod", {
2442
+ value: inst._zod ?? {},
2443
+ enumerable: false
2444
+ });
2445
+ (_a = inst._zod).traits ?? (_a.traits = /* @__PURE__ */ new Set());
2446
+ inst._zod.traits.add(name2);
2447
+ initializer2(inst, def);
2448
+ for (const k in _.prototype) {
2449
+ if (!(k in inst))
2450
+ Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
2451
+ }
2452
+ inst._zod.constr = _;
2453
+ inst._zod.def = def;
2454
+ }
2455
+ const Parent = params?.Parent ?? Object;
2456
+ class Definition extends Parent {
2457
+ }
2458
+ Object.defineProperty(Definition, "name", { value: name2 });
2459
+ function _(def) {
2460
+ var _a;
2461
+ const inst = params?.Parent ? new Definition() : this;
2462
+ init(inst, def);
2463
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
2464
+ for (const fn of inst._zod.deferred) {
2465
+ fn();
2466
+ }
2467
+ return inst;
2468
+ }
2469
+ Object.defineProperty(_, "init", { value: init });
2470
+ Object.defineProperty(_, Symbol.hasInstance, {
2471
+ value: (inst) => {
2472
+ if (params?.Parent && inst instanceof params.Parent)
2473
+ return true;
2474
+ return inst?._zod?.traits?.has(name2);
2475
+ }
2476
+ });
2477
+ Object.defineProperty(_, "name", { value: name2 });
2478
+ return _;
2479
+ }
2480
+ var $brand = Symbol("zod_brand");
2481
+ var $ZodAsyncError = class extends Error {
2482
+ constructor() {
2483
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
2484
+ }
2485
+ };
2486
+ var globalConfig = {};
2487
+ function config(newConfig) {
2488
+ if (newConfig)
2489
+ Object.assign(globalConfig, newConfig);
2490
+ return globalConfig;
2491
+ }
2492
+
2493
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/parse.js
2494
+ init_esm_shims();
2495
+
2496
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/errors.js
2497
+ init_esm_shims();
2498
+
2499
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/util.js
2500
+ var util_exports = {};
2501
+ __export(util_exports, {
2502
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
2503
+ Class: () => Class,
2504
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
2505
+ aborted: () => aborted,
2506
+ allowsEval: () => allowsEval,
2507
+ assert: () => assert,
2508
+ assertEqual: () => assertEqual,
2509
+ assertIs: () => assertIs,
2510
+ assertNever: () => assertNever,
2511
+ assertNotEqual: () => assertNotEqual,
2512
+ assignProp: () => assignProp,
2513
+ cached: () => cached,
2514
+ captureStackTrace: () => captureStackTrace,
2515
+ cleanEnum: () => cleanEnum,
2516
+ cleanRegex: () => cleanRegex,
2517
+ clone: () => clone,
2518
+ createTransparentProxy: () => createTransparentProxy,
2519
+ defineLazy: () => defineLazy,
2520
+ esc: () => esc,
2521
+ escapeRegex: () => escapeRegex,
2522
+ extend: () => extend,
2523
+ finalizeIssue: () => finalizeIssue,
2524
+ floatSafeRemainder: () => floatSafeRemainder,
2525
+ getElementAtPath: () => getElementAtPath,
2526
+ getEnumValues: () => getEnumValues,
2527
+ getLengthableOrigin: () => getLengthableOrigin,
2528
+ getParsedType: () => getParsedType,
2529
+ getSizableOrigin: () => getSizableOrigin,
2530
+ isObject: () => isObject,
2531
+ isPlainObject: () => isPlainObject,
2532
+ issue: () => issue,
2533
+ joinValues: () => joinValues,
2534
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
2535
+ merge: () => merge,
2536
+ normalizeParams: () => normalizeParams,
2537
+ nullish: () => nullish,
2538
+ numKeys: () => numKeys,
2539
+ omit: () => omit,
2540
+ optionalKeys: () => optionalKeys,
2541
+ partial: () => partial,
2542
+ pick: () => pick,
2543
+ prefixIssues: () => prefixIssues,
2544
+ primitiveTypes: () => primitiveTypes,
2545
+ promiseAllObject: () => promiseAllObject,
2546
+ propertyKeyTypes: () => propertyKeyTypes,
2547
+ randomString: () => randomString,
2548
+ required: () => required,
2549
+ stringifyPrimitive: () => stringifyPrimitive,
2550
+ unwrapMessage: () => unwrapMessage
2551
+ });
2552
+ init_esm_shims();
2553
+ function assertEqual(val) {
2554
+ return val;
2555
+ }
2556
+ function assertNotEqual(val) {
2557
+ return val;
2558
+ }
2559
+ function assertIs(_arg) {
2560
+ }
2561
+ function assertNever(_x) {
2562
+ throw new Error();
2563
+ }
2564
+ function assert(_) {
2565
+ }
2566
+ function getEnumValues(entries) {
2567
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
2568
+ const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
2569
+ return values;
2570
+ }
2571
+ function joinValues(array2, separator = "|") {
2572
+ return array2.map((val) => stringifyPrimitive(val)).join(separator);
2573
+ }
2574
+ function jsonStringifyReplacer(_, value) {
2575
+ if (typeof value === "bigint")
2576
+ return value.toString();
2577
+ return value;
2578
+ }
2579
+ function cached(getter) {
2580
+ const set = false;
2581
+ return {
2582
+ get value() {
2583
+ if (!set) {
2584
+ const value = getter();
2585
+ Object.defineProperty(this, "value", { value });
2586
+ return value;
2587
+ }
2588
+ throw new Error("cached value already set");
2589
+ }
2590
+ };
2591
+ }
2592
+ function nullish(input) {
2593
+ return input === null || input === void 0;
2594
+ }
2595
+ function cleanRegex(source) {
2596
+ const start = source.startsWith("^") ? 1 : 0;
2597
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
2598
+ return source.slice(start, end);
2599
+ }
2600
+ function floatSafeRemainder(val, step) {
2601
+ const valDecCount = (val.toString().split(".")[1] || "").length;
2602
+ const stepDecCount = (step.toString().split(".")[1] || "").length;
2603
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
2604
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
2605
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
2606
+ return valInt % stepInt / 10 ** decCount;
2607
+ }
2608
+ function defineLazy(object2, key, getter) {
2609
+ const set = false;
2610
+ Object.defineProperty(object2, key, {
2611
+ get() {
2612
+ if (!set) {
2613
+ const value = getter();
2614
+ object2[key] = value;
2615
+ return value;
2616
+ }
2617
+ throw new Error("cached value already set");
2618
+ },
2619
+ set(v) {
2620
+ Object.defineProperty(object2, key, {
2621
+ value: v
2622
+ // configurable: true,
2623
+ });
2624
+ },
2625
+ configurable: true
2626
+ });
2627
+ }
2628
+ function assignProp(target, prop, value) {
2629
+ Object.defineProperty(target, prop, {
2630
+ value,
2631
+ writable: true,
2632
+ enumerable: true,
2633
+ configurable: true
2634
+ });
2635
+ }
2636
+ function getElementAtPath(obj, path) {
2637
+ if (!path)
2638
+ return obj;
2639
+ return path.reduce((acc, key) => acc?.[key], obj);
2640
+ }
2641
+ function promiseAllObject(promisesObj) {
2642
+ const keys = Object.keys(promisesObj);
2643
+ const promises = keys.map((key) => promisesObj[key]);
2644
+ return Promise.all(promises).then((results) => {
2645
+ const resolvedObj = {};
2646
+ for (let i = 0; i < keys.length; i++) {
2647
+ resolvedObj[keys[i]] = results[i];
2648
+ }
2649
+ return resolvedObj;
2650
+ });
2651
+ }
2652
+ function randomString(length = 10) {
2653
+ const chars = "abcdefghijklmnopqrstuvwxyz";
2654
+ let str = "";
2655
+ for (let i = 0; i < length; i++) {
2656
+ str += chars[Math.floor(Math.random() * chars.length)];
2657
+ }
2658
+ return str;
2659
+ }
2660
+ function esc(str) {
2661
+ return JSON.stringify(str);
2662
+ }
2663
+ var captureStackTrace = Error.captureStackTrace ? Error.captureStackTrace : (..._args) => {
2664
+ };
2665
+ function isObject(data) {
2666
+ return typeof data === "object" && data !== null && !Array.isArray(data);
2667
+ }
2668
+ var allowsEval = cached(() => {
2669
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
2670
+ return false;
2671
+ }
2672
+ try {
2673
+ const F = Function;
2674
+ new F("");
2675
+ return true;
2676
+ } catch (_) {
2677
+ return false;
2678
+ }
2679
+ });
2680
+ function isPlainObject(o) {
2681
+ if (isObject(o) === false)
2682
+ return false;
2683
+ const ctor = o.constructor;
2684
+ if (ctor === void 0)
2685
+ return true;
2686
+ const prot = ctor.prototype;
2687
+ if (isObject(prot) === false)
2688
+ return false;
2689
+ if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
2690
+ return false;
2691
+ }
2692
+ return true;
2693
+ }
2694
+ function numKeys(data) {
2695
+ let keyCount = 0;
2696
+ for (const key in data) {
2697
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
2698
+ keyCount++;
2699
+ }
2700
+ }
2701
+ return keyCount;
2702
+ }
2703
+ var getParsedType = (data) => {
2704
+ const t = typeof data;
2705
+ switch (t) {
2706
+ case "undefined":
2707
+ return "undefined";
2708
+ case "string":
2709
+ return "string";
2710
+ case "number":
2711
+ return Number.isNaN(data) ? "nan" : "number";
2712
+ case "boolean":
2713
+ return "boolean";
2714
+ case "function":
2715
+ return "function";
2716
+ case "bigint":
2717
+ return "bigint";
2718
+ case "symbol":
2719
+ return "symbol";
2720
+ case "object":
2721
+ if (Array.isArray(data)) {
2722
+ return "array";
2723
+ }
2724
+ if (data === null) {
2725
+ return "null";
2726
+ }
2727
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
2728
+ return "promise";
2729
+ }
2730
+ if (typeof Map !== "undefined" && data instanceof Map) {
2731
+ return "map";
2732
+ }
2733
+ if (typeof Set !== "undefined" && data instanceof Set) {
2734
+ return "set";
2735
+ }
2736
+ if (typeof Date !== "undefined" && data instanceof Date) {
2737
+ return "date";
2738
+ }
2739
+ if (typeof File !== "undefined" && data instanceof File) {
2740
+ return "file";
2741
+ }
2742
+ return "object";
2743
+ default:
2744
+ throw new Error(`Unknown data type: ${t}`);
2745
+ }
2746
+ };
2747
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
2748
+ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
2749
+ function escapeRegex(str) {
2750
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2751
+ }
2752
+ function clone(inst, def, params) {
2753
+ const cl = new inst._zod.constr(def ?? inst._zod.def);
2754
+ if (!def || params?.parent)
2755
+ cl._zod.parent = inst;
2756
+ return cl;
2757
+ }
2758
+ function normalizeParams(_params) {
2759
+ const params = _params;
2760
+ if (!params)
2761
+ return {};
2762
+ if (typeof params === "string")
2763
+ return { error: () => params };
2764
+ if (params?.message !== void 0) {
2765
+ if (params?.error !== void 0)
2766
+ throw new Error("Cannot specify both `message` and `error` params");
2767
+ params.error = params.message;
2768
+ }
2769
+ delete params.message;
2770
+ if (typeof params.error === "string")
2771
+ return { ...params, error: () => params.error };
2772
+ return params;
2773
+ }
2774
+ function createTransparentProxy(getter) {
2775
+ let target;
2776
+ return new Proxy({}, {
2777
+ get(_, prop, receiver) {
2778
+ target ?? (target = getter());
2779
+ return Reflect.get(target, prop, receiver);
2780
+ },
2781
+ set(_, prop, value, receiver) {
2782
+ target ?? (target = getter());
2783
+ return Reflect.set(target, prop, value, receiver);
2784
+ },
2785
+ has(_, prop) {
2786
+ target ?? (target = getter());
2787
+ return Reflect.has(target, prop);
2788
+ },
2789
+ deleteProperty(_, prop) {
2790
+ target ?? (target = getter());
2791
+ return Reflect.deleteProperty(target, prop);
2792
+ },
2793
+ ownKeys(_) {
2794
+ target ?? (target = getter());
2795
+ return Reflect.ownKeys(target);
2796
+ },
2797
+ getOwnPropertyDescriptor(_, prop) {
2798
+ target ?? (target = getter());
2799
+ return Reflect.getOwnPropertyDescriptor(target, prop);
2800
+ },
2801
+ defineProperty(_, prop, descriptor) {
2802
+ target ?? (target = getter());
2803
+ return Reflect.defineProperty(target, prop, descriptor);
2804
+ }
2805
+ });
2806
+ }
2807
+ function stringifyPrimitive(value) {
2808
+ if (typeof value === "bigint")
2809
+ return value.toString() + "n";
2810
+ if (typeof value === "string")
2811
+ return `"${value}"`;
2812
+ return `${value}`;
2813
+ }
2814
+ function optionalKeys(shape) {
2815
+ return Object.keys(shape).filter((k) => {
2816
+ return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
2817
+ });
2818
+ }
2819
+ var NUMBER_FORMAT_RANGES = {
2820
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
2821
+ int32: [-2147483648, 2147483647],
2822
+ uint32: [0, 4294967295],
2823
+ float32: [-34028234663852886e22, 34028234663852886e22],
2824
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
2825
+ };
2826
+ var BIGINT_FORMAT_RANGES = {
2827
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
2828
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
2829
+ };
2830
+ function pick(schema, mask) {
2831
+ const newShape = {};
2832
+ const currDef = schema._zod.def;
2833
+ for (const key in mask) {
2834
+ if (!(key in currDef.shape)) {
2835
+ throw new Error(`Unrecognized key: "${key}"`);
2836
+ }
2837
+ if (!mask[key])
2838
+ continue;
2839
+ newShape[key] = currDef.shape[key];
2840
+ }
2841
+ return clone(schema, {
2842
+ ...schema._zod.def,
2843
+ shape: newShape,
2844
+ checks: []
2845
+ });
2846
+ }
2847
+ function omit(schema, mask) {
2848
+ const newShape = { ...schema._zod.def.shape };
2849
+ const currDef = schema._zod.def;
2850
+ for (const key in mask) {
2851
+ if (!(key in currDef.shape)) {
2852
+ throw new Error(`Unrecognized key: "${key}"`);
2853
+ }
2854
+ if (!mask[key])
2855
+ continue;
2856
+ delete newShape[key];
2857
+ }
2858
+ return clone(schema, {
2859
+ ...schema._zod.def,
2860
+ shape: newShape,
2861
+ checks: []
2862
+ });
2863
+ }
2864
+ function extend(schema, shape) {
2865
+ if (!isPlainObject(shape)) {
2866
+ throw new Error("Invalid input to extend: expected a plain object");
2867
+ }
2868
+ const def = {
2869
+ ...schema._zod.def,
2870
+ get shape() {
2871
+ const _shape = { ...schema._zod.def.shape, ...shape };
2872
+ assignProp(this, "shape", _shape);
2873
+ return _shape;
2874
+ },
2875
+ checks: []
2876
+ // delete existing checks
2877
+ };
2878
+ return clone(schema, def);
2879
+ }
2880
+ function merge(a, b) {
2881
+ return clone(a, {
2882
+ ...a._zod.def,
2883
+ get shape() {
2884
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
2885
+ assignProp(this, "shape", _shape);
2886
+ return _shape;
2887
+ },
2888
+ catchall: b._zod.def.catchall,
2889
+ checks: []
2890
+ // delete existing checks
2891
+ });
2892
+ }
2893
+ function partial(Class2, schema, mask) {
2894
+ const oldShape = schema._zod.def.shape;
2895
+ const shape = { ...oldShape };
2896
+ if (mask) {
2897
+ for (const key in mask) {
2898
+ if (!(key in oldShape)) {
2899
+ throw new Error(`Unrecognized key: "${key}"`);
2900
+ }
2901
+ if (!mask[key])
2902
+ continue;
2903
+ shape[key] = Class2 ? new Class2({
2904
+ type: "optional",
2905
+ innerType: oldShape[key]
2906
+ }) : oldShape[key];
2907
+ }
2908
+ } else {
2909
+ for (const key in oldShape) {
2910
+ shape[key] = Class2 ? new Class2({
2911
+ type: "optional",
2912
+ innerType: oldShape[key]
2913
+ }) : oldShape[key];
2914
+ }
2915
+ }
2916
+ return clone(schema, {
2917
+ ...schema._zod.def,
2918
+ shape,
2919
+ checks: []
2920
+ });
2921
+ }
2922
+ function required(Class2, schema, mask) {
2923
+ const oldShape = schema._zod.def.shape;
2924
+ const shape = { ...oldShape };
2925
+ if (mask) {
2926
+ for (const key in mask) {
2927
+ if (!(key in shape)) {
2928
+ throw new Error(`Unrecognized key: "${key}"`);
2929
+ }
2930
+ if (!mask[key])
2931
+ continue;
2932
+ shape[key] = new Class2({
2933
+ type: "nonoptional",
2934
+ innerType: oldShape[key]
2935
+ });
2936
+ }
2937
+ } else {
2938
+ for (const key in oldShape) {
2939
+ shape[key] = new Class2({
2940
+ type: "nonoptional",
2941
+ innerType: oldShape[key]
2942
+ });
2943
+ }
2944
+ }
2945
+ return clone(schema, {
2946
+ ...schema._zod.def,
2947
+ shape,
2948
+ // optional: [],
2949
+ checks: []
2950
+ });
2951
+ }
2952
+ function aborted(x, startIndex = 0) {
2953
+ for (let i = startIndex; i < x.issues.length; i++) {
2954
+ if (x.issues[i]?.continue !== true)
2955
+ return true;
2956
+ }
2957
+ return false;
2958
+ }
2959
+ function prefixIssues(path, issues) {
2960
+ return issues.map((iss) => {
2961
+ var _a;
2962
+ (_a = iss).path ?? (_a.path = []);
2963
+ iss.path.unshift(path);
2964
+ return iss;
2965
+ });
2966
+ }
2967
+ function unwrapMessage(message) {
2968
+ return typeof message === "string" ? message : message?.message;
2969
+ }
2970
+ function finalizeIssue(iss, ctx, config3) {
2971
+ const full = { ...iss, path: iss.path ?? [] };
2972
+ if (!iss.message) {
2973
+ const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config3.customError?.(iss)) ?? unwrapMessage(config3.localeError?.(iss)) ?? "Invalid input";
2974
+ full.message = message;
2975
+ }
2976
+ delete full.inst;
2977
+ delete full.continue;
2978
+ if (!ctx?.reportInput) {
2979
+ delete full.input;
2980
+ }
2981
+ return full;
2982
+ }
2983
+ function getSizableOrigin(input) {
2984
+ if (input instanceof Set)
2985
+ return "set";
2986
+ if (input instanceof Map)
2987
+ return "map";
2988
+ if (input instanceof File)
2989
+ return "file";
2990
+ return "unknown";
2991
+ }
2992
+ function getLengthableOrigin(input) {
2993
+ if (Array.isArray(input))
2994
+ return "array";
2995
+ if (typeof input === "string")
2996
+ return "string";
2997
+ return "unknown";
2998
+ }
2999
+ function issue(...args) {
3000
+ const [iss, input, inst] = args;
3001
+ if (typeof iss === "string") {
3002
+ return {
3003
+ message: iss,
3004
+ code: "custom",
3005
+ input,
3006
+ inst
3007
+ };
3008
+ }
3009
+ return { ...iss };
3010
+ }
3011
+ function cleanEnum(obj) {
3012
+ return Object.entries(obj).filter(([k, _]) => {
3013
+ return Number.isNaN(Number.parseInt(k, 10));
3014
+ }).map((el) => el[1]);
3015
+ }
3016
+ var Class = class {
3017
+ constructor(..._args) {
3018
+ }
3019
+ };
3020
+
3021
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/errors.js
3022
+ var initializer = (inst, def) => {
3023
+ inst.name = "$ZodError";
3024
+ Object.defineProperty(inst, "_zod", {
3025
+ value: inst._zod,
3026
+ enumerable: false
3027
+ });
3028
+ Object.defineProperty(inst, "issues", {
3029
+ value: def,
3030
+ enumerable: false
3031
+ });
3032
+ Object.defineProperty(inst, "message", {
3033
+ get() {
3034
+ return JSON.stringify(def, jsonStringifyReplacer, 2);
3035
+ },
3036
+ enumerable: true
3037
+ // configurable: false,
3038
+ });
3039
+ Object.defineProperty(inst, "toString", {
3040
+ value: () => inst.message,
3041
+ enumerable: false
3042
+ });
3043
+ };
3044
+ var $ZodError = $constructor("$ZodError", initializer);
3045
+ var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
3046
+
3047
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/parse.js
3048
+ var _parse = (_Err) => (schema, value, _ctx, _params) => {
3049
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
3050
+ const result = schema._zod.run({ value, issues: [] }, ctx);
3051
+ if (result instanceof Promise) {
3052
+ throw new $ZodAsyncError();
3053
+ }
3054
+ if (result.issues.length) {
3055
+ const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
3056
+ captureStackTrace(e, _params?.callee);
3057
+ throw e;
3058
+ }
3059
+ return result.value;
3060
+ };
3061
+ var parse = /* @__PURE__ */ _parse($ZodRealError);
3062
+ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
3063
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
3064
+ let result = schema._zod.run({ value, issues: [] }, ctx);
3065
+ if (result instanceof Promise)
3066
+ result = await result;
3067
+ if (result.issues.length) {
3068
+ const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
3069
+ captureStackTrace(e, params?.callee);
3070
+ throw e;
3071
+ }
3072
+ return result.value;
3073
+ };
3074
+ var parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
3075
+ var _safeParse = (_Err) => (schema, value, _ctx) => {
3076
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
3077
+ const result = schema._zod.run({ value, issues: [] }, ctx);
3078
+ if (result instanceof Promise) {
3079
+ throw new $ZodAsyncError();
3080
+ }
3081
+ return result.issues.length ? {
3082
+ success: false,
3083
+ error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
3084
+ } : { success: true, data: result.value };
3085
+ };
3086
+ var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
3087
+ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
3088
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
3089
+ let result = schema._zod.run({ value, issues: [] }, ctx);
3090
+ if (result instanceof Promise)
3091
+ result = await result;
3092
+ return result.issues.length ? {
3093
+ success: false,
3094
+ error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
3095
+ } : { success: true, data: result.value };
3096
+ };
3097
+ var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
3098
+
3099
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/schemas.js
3100
+ init_esm_shims();
3101
+
3102
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/checks.js
3103
+ init_esm_shims();
3104
+
3105
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/regexes.js
3106
+ init_esm_shims();
3107
+ var hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
3108
+ var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
3109
+ var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
3110
+ var string = (params) => {
3111
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
3112
+ return new RegExp(`^${regex}$`);
3113
+ };
3114
+ var boolean = /true|false/i;
3115
+
3116
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/checks.js
3117
+ var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
3118
+ var _a;
3119
+ inst._zod ?? (inst._zod = {});
3120
+ inst._zod.def = def;
3121
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
3122
+ });
3123
+ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
3124
+ var _a;
3125
+ $ZodCheck.init(inst, def);
3126
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
3127
+ const val = payload.value;
3128
+ return !nullish(val) && val.length !== void 0;
3129
+ });
3130
+ inst._zod.onattach.push((inst2) => {
3131
+ const bag = inst2._zod.bag;
3132
+ bag.minimum = def.length;
3133
+ bag.maximum = def.length;
3134
+ bag.length = def.length;
3135
+ });
3136
+ inst._zod.check = (payload) => {
3137
+ const input = payload.value;
3138
+ const length = input.length;
3139
+ if (length === def.length)
3140
+ return;
3141
+ const origin = getLengthableOrigin(input);
3142
+ const tooBig = length > def.length;
3143
+ payload.issues.push({
3144
+ origin,
3145
+ ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
3146
+ inclusive: true,
3147
+ exact: true,
3148
+ input: payload.value,
3149
+ inst,
3150
+ continue: !def.abort
3151
+ });
3152
+ };
3153
+ });
3154
+ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
3155
+ var _a, _b;
3156
+ $ZodCheck.init(inst, def);
3157
+ inst._zod.onattach.push((inst2) => {
3158
+ const bag = inst2._zod.bag;
3159
+ bag.format = def.format;
3160
+ if (def.pattern) {
3161
+ bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
3162
+ bag.patterns.add(def.pattern);
3163
+ }
3164
+ });
3165
+ if (def.pattern)
3166
+ (_a = inst._zod).check ?? (_a.check = (payload) => {
3167
+ def.pattern.lastIndex = 0;
3168
+ if (def.pattern.test(payload.value))
3169
+ return;
3170
+ payload.issues.push({
3171
+ origin: "string",
3172
+ code: "invalid_format",
3173
+ format: def.format,
3174
+ input: payload.value,
3175
+ ...def.pattern ? { pattern: def.pattern.toString() } : {},
3176
+ inst,
3177
+ continue: !def.abort
3178
+ });
3179
+ });
3180
+ else
3181
+ (_b = inst._zod).check ?? (_b.check = () => {
3182
+ });
3183
+ });
3184
+ var $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
3185
+ $ZodCheckStringFormat.init(inst, def);
3186
+ inst._zod.check = (payload) => {
3187
+ def.pattern.lastIndex = 0;
3188
+ if (def.pattern.test(payload.value))
3189
+ return;
3190
+ payload.issues.push({
3191
+ origin: "string",
3192
+ code: "invalid_format",
3193
+ format: "regex",
3194
+ input: payload.value,
3195
+ pattern: def.pattern.toString(),
3196
+ inst,
3197
+ continue: !def.abort
3198
+ });
3199
+ };
3200
+ });
3201
+ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
3202
+ $ZodCheck.init(inst, def);
3203
+ inst._zod.check = (payload) => {
3204
+ payload.value = def.tx(payload.value);
3205
+ };
3206
+ });
3207
+
3208
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/doc.js
3209
+ init_esm_shims();
3210
+ var Doc = class {
3211
+ constructor(args = []) {
3212
+ this.content = [];
3213
+ this.indent = 0;
3214
+ if (this)
3215
+ this.args = args;
3216
+ }
3217
+ indented(fn) {
3218
+ this.indent += 1;
3219
+ fn(this);
3220
+ this.indent -= 1;
3221
+ }
3222
+ write(arg) {
3223
+ if (typeof arg === "function") {
3224
+ arg(this, { execution: "sync" });
3225
+ arg(this, { execution: "async" });
3226
+ return;
3227
+ }
3228
+ const content = arg;
3229
+ const lines = content.split("\n").filter((x) => x);
3230
+ const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
3231
+ const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
3232
+ for (const line of dedented) {
3233
+ this.content.push(line);
3234
+ }
3235
+ }
3236
+ compile() {
3237
+ const F = Function;
3238
+ const args = this?.args;
3239
+ const content = this?.content ?? [``];
3240
+ const lines = [...content.map((x) => ` ${x}`)];
3241
+ return new F(...args, lines.join("\n"));
3242
+ }
3243
+ };
3244
+
3245
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/versions.js
3246
+ init_esm_shims();
3247
+ var version2 = {
3248
+ major: 4,
3249
+ minor: 0,
3250
+ patch: 5
3251
+ };
3252
+
3253
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/schemas.js
3254
+ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
3255
+ var _a;
3256
+ inst ?? (inst = {});
3257
+ inst._zod.def = def;
3258
+ inst._zod.bag = inst._zod.bag || {};
3259
+ inst._zod.version = version2;
3260
+ const checks = [...inst._zod.def.checks ?? []];
3261
+ if (inst._zod.traits.has("$ZodCheck")) {
3262
+ checks.unshift(inst);
3263
+ }
3264
+ for (const ch of checks) {
3265
+ for (const fn of ch._zod.onattach) {
3266
+ fn(inst);
3267
+ }
3268
+ }
3269
+ if (checks.length === 0) {
3270
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
3271
+ inst._zod.deferred?.push(() => {
3272
+ inst._zod.run = inst._zod.parse;
3273
+ });
3274
+ } else {
3275
+ const runChecks = (payload, checks2, ctx) => {
3276
+ let isAborted = aborted(payload);
3277
+ let asyncResult;
3278
+ for (const ch of checks2) {
3279
+ if (ch._zod.def.when) {
3280
+ const shouldRun = ch._zod.def.when(payload);
3281
+ if (!shouldRun)
3282
+ continue;
3283
+ } else if (isAborted) {
3284
+ continue;
3285
+ }
3286
+ const currLen = payload.issues.length;
3287
+ const _ = ch._zod.check(payload);
3288
+ if (_ instanceof Promise && ctx?.async === false) {
3289
+ throw new $ZodAsyncError();
3290
+ }
3291
+ if (asyncResult || _ instanceof Promise) {
3292
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
3293
+ await _;
3294
+ const nextLen = payload.issues.length;
3295
+ if (nextLen === currLen)
3296
+ return;
3297
+ if (!isAborted)
3298
+ isAborted = aborted(payload, currLen);
3299
+ });
3300
+ } else {
3301
+ const nextLen = payload.issues.length;
3302
+ if (nextLen === currLen)
3303
+ continue;
3304
+ if (!isAborted)
3305
+ isAborted = aborted(payload, currLen);
3306
+ }
3307
+ }
3308
+ if (asyncResult) {
3309
+ return asyncResult.then(() => {
3310
+ return payload;
3311
+ });
3312
+ }
3313
+ return payload;
3314
+ };
3315
+ inst._zod.run = (payload, ctx) => {
3316
+ const result = inst._zod.parse(payload, ctx);
3317
+ if (result instanceof Promise) {
3318
+ if (ctx.async === false)
3319
+ throw new $ZodAsyncError();
3320
+ return result.then((result2) => runChecks(result2, checks, ctx));
3321
+ }
3322
+ return runChecks(result, checks, ctx);
3323
+ };
3324
+ }
3325
+ inst["~standard"] = {
3326
+ validate: (value) => {
3327
+ try {
3328
+ const r = safeParse(inst, value);
3329
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
3330
+ } catch (_) {
3331
+ return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
3332
+ }
3333
+ },
3334
+ vendor: "zod",
3335
+ version: 1
3336
+ };
3337
+ });
3338
+ var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
3339
+ $ZodType.init(inst, def);
3340
+ inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string(inst._zod.bag);
3341
+ inst._zod.parse = (payload, _) => {
3342
+ if (def.coerce)
3343
+ try {
3344
+ payload.value = String(payload.value);
3345
+ } catch (_2) {
3346
+ }
3347
+ if (typeof payload.value === "string")
3348
+ return payload;
3349
+ payload.issues.push({
3350
+ expected: "string",
3351
+ code: "invalid_type",
3352
+ input: payload.value,
3353
+ inst
3354
+ });
3355
+ return payload;
3356
+ };
3357
+ });
3358
+ var $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
3359
+ $ZodCheckStringFormat.init(inst, def);
3360
+ $ZodString.init(inst, def);
3361
+ });
3362
+ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
3363
+ $ZodStringFormat.init(inst, def);
3364
+ inst._zod.check = (payload) => {
3365
+ try {
3366
+ const orig = payload.value;
3367
+ const url2 = new URL(orig);
3368
+ const href = url2.href;
3369
+ if (def.hostname) {
3370
+ def.hostname.lastIndex = 0;
3371
+ if (!def.hostname.test(url2.hostname)) {
3372
+ payload.issues.push({
3373
+ code: "invalid_format",
3374
+ format: "url",
3375
+ note: "Invalid hostname",
3376
+ pattern: hostname.source,
3377
+ input: payload.value,
3378
+ inst,
3379
+ continue: !def.abort
3380
+ });
3381
+ }
3382
+ }
3383
+ if (def.protocol) {
3384
+ def.protocol.lastIndex = 0;
3385
+ if (!def.protocol.test(url2.protocol.endsWith(":") ? url2.protocol.slice(0, -1) : url2.protocol)) {
3386
+ payload.issues.push({
3387
+ code: "invalid_format",
3388
+ format: "url",
3389
+ note: "Invalid protocol",
3390
+ pattern: def.protocol.source,
3391
+ input: payload.value,
3392
+ inst,
3393
+ continue: !def.abort
3394
+ });
3395
+ }
3396
+ }
3397
+ if (!orig.endsWith("/") && href.endsWith("/")) {
3398
+ payload.value = href.slice(0, -1);
3399
+ } else {
3400
+ payload.value = href;
3401
+ }
3402
+ return;
3403
+ } catch (_) {
3404
+ payload.issues.push({
3405
+ code: "invalid_format",
3406
+ format: "url",
3407
+ input: payload.value,
3408
+ inst,
3409
+ continue: !def.abort
3410
+ });
3411
+ }
3412
+ };
3413
+ });
3414
+ var $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
3415
+ $ZodType.init(inst, def);
3416
+ inst._zod.pattern = boolean;
3417
+ inst._zod.parse = (payload, _ctx) => {
3418
+ if (def.coerce)
3419
+ try {
3420
+ payload.value = Boolean(payload.value);
3421
+ } catch (_) {
3422
+ }
3423
+ const input = payload.value;
3424
+ if (typeof input === "boolean")
3425
+ return payload;
3426
+ payload.issues.push({
3427
+ expected: "boolean",
3428
+ code: "invalid_type",
3429
+ input,
3430
+ inst
3431
+ });
3432
+ return payload;
3433
+ };
3434
+ });
3435
+ var $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
3436
+ $ZodType.init(inst, def);
3437
+ inst._zod.parse = (payload) => payload;
3438
+ });
3439
+ function handleArrayResult(result, final, index) {
3440
+ if (result.issues.length) {
3441
+ final.issues.push(...prefixIssues(index, result.issues));
3442
+ }
3443
+ final.value[index] = result.value;
3444
+ }
3445
+ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
3446
+ $ZodType.init(inst, def);
3447
+ inst._zod.parse = (payload, ctx) => {
3448
+ const input = payload.value;
3449
+ if (!Array.isArray(input)) {
3450
+ payload.issues.push({
3451
+ expected: "array",
3452
+ code: "invalid_type",
3453
+ input,
3454
+ inst
3455
+ });
3456
+ return payload;
3457
+ }
3458
+ payload.value = Array(input.length);
3459
+ const proms = [];
3460
+ for (let i = 0; i < input.length; i++) {
3461
+ const item = input[i];
3462
+ const result = def.element._zod.run({
3463
+ value: item,
3464
+ issues: []
3465
+ }, ctx);
3466
+ if (result instanceof Promise) {
3467
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
3468
+ } else {
3469
+ handleArrayResult(result, payload, i);
3470
+ }
3471
+ }
3472
+ if (proms.length) {
3473
+ return Promise.all(proms).then(() => payload);
3474
+ }
3475
+ return payload;
3476
+ };
3477
+ });
3478
+ function handleObjectResult(result, final, key) {
3479
+ if (result.issues.length) {
3480
+ final.issues.push(...prefixIssues(key, result.issues));
3481
+ }
3482
+ final.value[key] = result.value;
3483
+ }
3484
+ function handleOptionalObjectResult(result, final, key, input) {
3485
+ if (result.issues.length) {
3486
+ if (input[key] === void 0) {
3487
+ if (key in input) {
3488
+ final.value[key] = void 0;
3489
+ } else {
3490
+ final.value[key] = result.value;
3491
+ }
3492
+ } else {
3493
+ final.issues.push(...prefixIssues(key, result.issues));
3494
+ }
3495
+ } else if (result.value === void 0) {
3496
+ if (key in input)
3497
+ final.value[key] = void 0;
3498
+ } else {
3499
+ final.value[key] = result.value;
3500
+ }
3501
+ }
3502
+ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
3503
+ $ZodType.init(inst, def);
3504
+ const _normalized = cached(() => {
3505
+ const keys = Object.keys(def.shape);
3506
+ for (const k of keys) {
3507
+ if (!(def.shape[k] instanceof $ZodType)) {
3508
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
3509
+ }
3510
+ }
3511
+ const okeys = optionalKeys(def.shape);
3512
+ return {
3513
+ shape: def.shape,
3514
+ keys,
3515
+ keySet: new Set(keys),
3516
+ numKeys: keys.length,
3517
+ optionalKeys: new Set(okeys)
3518
+ };
3519
+ });
3520
+ defineLazy(inst._zod, "propValues", () => {
3521
+ const shape = def.shape;
3522
+ const propValues = {};
3523
+ for (const key in shape) {
3524
+ const field = shape[key]._zod;
3525
+ if (field.values) {
3526
+ propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
3527
+ for (const v of field.values)
3528
+ propValues[key].add(v);
3529
+ }
3530
+ }
3531
+ return propValues;
3532
+ });
3533
+ const generateFastpass = (shape) => {
3534
+ const doc = new Doc(["shape", "payload", "ctx"]);
3535
+ const normalized = _normalized.value;
3536
+ const parseStr = (key) => {
3537
+ const k = esc(key);
3538
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
3539
+ };
3540
+ doc.write(`const input = payload.value;`);
3541
+ const ids = /* @__PURE__ */ Object.create(null);
3542
+ let counter = 0;
3543
+ for (const key of normalized.keys) {
3544
+ ids[key] = `key_${counter++}`;
3545
+ }
3546
+ doc.write(`const newResult = {}`);
3547
+ for (const key of normalized.keys) {
3548
+ if (normalized.optionalKeys.has(key)) {
3549
+ const id = ids[key];
3550
+ doc.write(`const ${id} = ${parseStr(key)};`);
3551
+ const k = esc(key);
3552
+ doc.write(`
3553
+ if (${id}.issues.length) {
3554
+ if (input[${k}] === undefined) {
3555
+ if (${k} in input) {
3556
+ newResult[${k}] = undefined;
3557
+ }
3558
+ } else {
3559
+ payload.issues = payload.issues.concat(
3560
+ ${id}.issues.map((iss) => ({
3561
+ ...iss,
3562
+ path: iss.path ? [${k}, ...iss.path] : [${k}],
3563
+ }))
3564
+ );
3565
+ }
3566
+ } else if (${id}.value === undefined) {
3567
+ if (${k} in input) newResult[${k}] = undefined;
3568
+ } else {
3569
+ newResult[${k}] = ${id}.value;
3570
+ }
3571
+ `);
3572
+ } else {
3573
+ const id = ids[key];
3574
+ doc.write(`const ${id} = ${parseStr(key)};`);
3575
+ doc.write(`
3576
+ if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
3577
+ ...iss,
3578
+ path: iss.path ? [${esc(key)}, ...iss.path] : [${esc(key)}]
3579
+ })));`);
3580
+ doc.write(`newResult[${esc(key)}] = ${id}.value`);
3581
+ }
3582
+ }
3583
+ doc.write(`payload.value = newResult;`);
3584
+ doc.write(`return payload;`);
3585
+ const fn = doc.compile();
3586
+ return (payload, ctx) => fn(shape, payload, ctx);
3587
+ };
3588
+ let fastpass;
3589
+ const isObject2 = isObject;
3590
+ const jit = !globalConfig.jitless;
3591
+ const allowsEval2 = allowsEval;
3592
+ const fastEnabled = jit && allowsEval2.value;
3593
+ const catchall = def.catchall;
3594
+ let value;
3595
+ inst._zod.parse = (payload, ctx) => {
3596
+ value ?? (value = _normalized.value);
3597
+ const input = payload.value;
3598
+ if (!isObject2(input)) {
3599
+ payload.issues.push({
3600
+ expected: "object",
3601
+ code: "invalid_type",
3602
+ input,
3603
+ inst
3604
+ });
3605
+ return payload;
3606
+ }
3607
+ const proms = [];
3608
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
3609
+ if (!fastpass)
3610
+ fastpass = generateFastpass(def.shape);
3611
+ payload = fastpass(payload, ctx);
3612
+ } else {
3613
+ payload.value = {};
3614
+ const shape = value.shape;
3615
+ for (const key of value.keys) {
3616
+ const el = shape[key];
3617
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
3618
+ const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
3619
+ if (r instanceof Promise) {
3620
+ proms.push(r.then((r2) => isOptional ? handleOptionalObjectResult(r2, payload, key, input) : handleObjectResult(r2, payload, key)));
3621
+ } else if (isOptional) {
3622
+ handleOptionalObjectResult(r, payload, key, input);
3623
+ } else {
3624
+ handleObjectResult(r, payload, key);
3625
+ }
3626
+ }
3627
+ }
3628
+ if (!catchall) {
3629
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
3630
+ }
3631
+ const unrecognized = [];
3632
+ const keySet = value.keySet;
3633
+ const _catchall = catchall._zod;
3634
+ const t = _catchall.def.type;
3635
+ for (const key of Object.keys(input)) {
3636
+ if (keySet.has(key))
3637
+ continue;
3638
+ if (t === "never") {
3639
+ unrecognized.push(key);
3640
+ continue;
3641
+ }
3642
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
3643
+ if (r instanceof Promise) {
3644
+ proms.push(r.then((r2) => handleObjectResult(r2, payload, key)));
3645
+ } else {
3646
+ handleObjectResult(r, payload, key);
3647
+ }
3648
+ }
3649
+ if (unrecognized.length) {
3650
+ payload.issues.push({
3651
+ code: "unrecognized_keys",
3652
+ keys: unrecognized,
3653
+ input,
3654
+ inst
3655
+ });
3656
+ }
3657
+ if (!proms.length)
3658
+ return payload;
3659
+ return Promise.all(proms).then(() => {
3660
+ return payload;
3661
+ });
3662
+ };
3663
+ });
3664
+ function handleUnionResults(results, final, inst, ctx) {
3665
+ for (const result of results) {
3666
+ if (result.issues.length === 0) {
3667
+ final.value = result.value;
3668
+ return final;
3669
+ }
3670
+ }
3671
+ final.issues.push({
3672
+ code: "invalid_union",
3673
+ input: final.value,
3674
+ inst,
3675
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
3676
+ });
3677
+ return final;
3678
+ }
3679
+ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
3680
+ $ZodType.init(inst, def);
3681
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
3682
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
3683
+ defineLazy(inst._zod, "values", () => {
3684
+ if (def.options.every((o) => o._zod.values)) {
3685
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
3686
+ }
3687
+ return void 0;
3688
+ });
3689
+ defineLazy(inst._zod, "pattern", () => {
3690
+ if (def.options.every((o) => o._zod.pattern)) {
3691
+ const patterns = def.options.map((o) => o._zod.pattern);
3692
+ return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
3693
+ }
3694
+ return void 0;
3695
+ });
3696
+ inst._zod.parse = (payload, ctx) => {
3697
+ let async = false;
3698
+ const results = [];
3699
+ for (const option of def.options) {
3700
+ const result = option._zod.run({
3701
+ value: payload.value,
3702
+ issues: []
3703
+ }, ctx);
3704
+ if (result instanceof Promise) {
3705
+ results.push(result);
3706
+ async = true;
3707
+ } else {
3708
+ if (result.issues.length === 0)
3709
+ return result;
3710
+ results.push(result);
3711
+ }
3712
+ }
3713
+ if (!async)
3714
+ return handleUnionResults(results, payload, inst, ctx);
3715
+ return Promise.all(results).then((results2) => {
3716
+ return handleUnionResults(results2, payload, inst, ctx);
3717
+ });
3718
+ };
3719
+ });
3720
+ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
3721
+ $ZodType.init(inst, def);
3722
+ inst._zod.parse = (payload, ctx) => {
3723
+ const input = payload.value;
3724
+ if (!isPlainObject(input)) {
3725
+ payload.issues.push({
3726
+ expected: "record",
3727
+ code: "invalid_type",
3728
+ input,
3729
+ inst
3730
+ });
3731
+ return payload;
3732
+ }
3733
+ const proms = [];
3734
+ if (def.keyType._zod.values) {
3735
+ const values = def.keyType._zod.values;
3736
+ payload.value = {};
3737
+ for (const key of values) {
3738
+ if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
3739
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3740
+ if (result instanceof Promise) {
3741
+ proms.push(result.then((result2) => {
3742
+ if (result2.issues.length) {
3743
+ payload.issues.push(...prefixIssues(key, result2.issues));
3744
+ }
3745
+ payload.value[key] = result2.value;
3746
+ }));
3747
+ } else {
3748
+ if (result.issues.length) {
3749
+ payload.issues.push(...prefixIssues(key, result.issues));
3750
+ }
3751
+ payload.value[key] = result.value;
3752
+ }
3753
+ }
3754
+ }
3755
+ let unrecognized;
3756
+ for (const key in input) {
3757
+ if (!values.has(key)) {
3758
+ unrecognized = unrecognized ?? [];
3759
+ unrecognized.push(key);
3760
+ }
3761
+ }
3762
+ if (unrecognized && unrecognized.length > 0) {
3763
+ payload.issues.push({
3764
+ code: "unrecognized_keys",
3765
+ input,
3766
+ inst,
3767
+ keys: unrecognized
3768
+ });
3769
+ }
3770
+ } else {
3771
+ payload.value = {};
3772
+ for (const key of Reflect.ownKeys(input)) {
3773
+ if (key === "__proto__")
3774
+ continue;
3775
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
3776
+ if (keyResult instanceof Promise) {
3777
+ throw new Error("Async schemas not supported in object keys currently");
3778
+ }
3779
+ if (keyResult.issues.length) {
3780
+ payload.issues.push({
3781
+ origin: "record",
3782
+ code: "invalid_key",
3783
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
3784
+ input: key,
3785
+ path: [key],
3786
+ inst
3787
+ });
3788
+ payload.value[keyResult.value] = keyResult.value;
3789
+ continue;
3790
+ }
3791
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
3792
+ if (result instanceof Promise) {
3793
+ proms.push(result.then((result2) => {
3794
+ if (result2.issues.length) {
3795
+ payload.issues.push(...prefixIssues(key, result2.issues));
3796
+ }
3797
+ payload.value[keyResult.value] = result2.value;
3798
+ }));
3799
+ } else {
3800
+ if (result.issues.length) {
3801
+ payload.issues.push(...prefixIssues(key, result.issues));
3802
+ }
3803
+ payload.value[keyResult.value] = result.value;
3804
+ }
3805
+ }
3806
+ }
3807
+ if (proms.length) {
3808
+ return Promise.all(proms).then(() => payload);
3809
+ }
3810
+ return payload;
3811
+ };
3812
+ });
3813
+ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
3814
+ $ZodType.init(inst, def);
3815
+ const values = getEnumValues(def.entries);
3816
+ inst._zod.values = new Set(values);
3817
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
3818
+ inst._zod.parse = (payload, _ctx) => {
3819
+ const input = payload.value;
3820
+ if (inst._zod.values.has(input)) {
3821
+ return payload;
3822
+ }
3823
+ payload.issues.push({
3824
+ code: "invalid_value",
3825
+ values,
3826
+ input,
3827
+ inst
3828
+ });
3829
+ return payload;
3830
+ };
3831
+ });
3832
+ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
3833
+ $ZodType.init(inst, def);
3834
+ inst._zod.values = new Set(def.values);
3835
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
3836
+ inst._zod.parse = (payload, _ctx) => {
3837
+ const input = payload.value;
3838
+ if (inst._zod.values.has(input)) {
3839
+ return payload;
3840
+ }
3841
+ payload.issues.push({
3842
+ code: "invalid_value",
3843
+ values: def.values,
3844
+ input,
3845
+ inst
3846
+ });
3847
+ return payload;
3848
+ };
3849
+ });
3850
+ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3851
+ $ZodType.init(inst, def);
3852
+ inst._zod.optin = "optional";
3853
+ inst._zod.optout = "optional";
3854
+ defineLazy(inst._zod, "values", () => {
3855
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
3856
+ });
3857
+ defineLazy(inst._zod, "pattern", () => {
3858
+ const pattern = def.innerType._zod.pattern;
3859
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
3860
+ });
3861
+ inst._zod.parse = (payload, ctx) => {
3862
+ if (def.innerType._zod.optin === "optional") {
3863
+ return def.innerType._zod.run(payload, ctx);
3864
+ }
3865
+ if (payload.value === void 0) {
3866
+ return payload;
3867
+ }
3868
+ return def.innerType._zod.run(payload, ctx);
3869
+ };
3870
+ });
3871
+ var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
3872
+ $ZodType.init(inst, def);
3873
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3874
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3875
+ defineLazy(inst._zod, "pattern", () => {
3876
+ const pattern = def.innerType._zod.pattern;
3877
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
3878
+ });
3879
+ defineLazy(inst._zod, "values", () => {
3880
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
3881
+ });
3882
+ inst._zod.parse = (payload, ctx) => {
3883
+ if (payload.value === null)
3884
+ return payload;
3885
+ return def.innerType._zod.run(payload, ctx);
3886
+ };
3887
+ });
3888
+ var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
3889
+ $ZodType.init(inst, def);
3890
+ inst._zod.optin = "optional";
3891
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3892
+ inst._zod.parse = (payload, ctx) => {
3893
+ if (payload.value === void 0) {
3894
+ payload.value = def.defaultValue;
3895
+ return payload;
3896
+ }
3897
+ const result = def.innerType._zod.run(payload, ctx);
3898
+ if (result instanceof Promise) {
3899
+ return result.then((result2) => handleDefaultResult(result2, def));
3900
+ }
3901
+ return handleDefaultResult(result, def);
3902
+ };
3903
+ });
3904
+ function handleDefaultResult(payload, def) {
3905
+ if (payload.value === void 0) {
3906
+ payload.value = def.defaultValue;
3907
+ }
3908
+ return payload;
3909
+ }
3910
+
3911
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/registries.js
3912
+ init_esm_shims();
3913
+ var $output = Symbol("ZodOutput");
3914
+ var $input = Symbol("ZodInput");
3915
+ var $ZodRegistry = class {
3916
+ constructor() {
3917
+ this._map = /* @__PURE__ */ new Map();
3918
+ this._idmap = /* @__PURE__ */ new Map();
3919
+ }
3920
+ add(schema, ..._meta) {
3921
+ const meta = _meta[0];
3922
+ this._map.set(schema, meta);
3923
+ if (meta && typeof meta === "object" && "id" in meta) {
3924
+ if (this._idmap.has(meta.id)) {
3925
+ throw new Error(`ID ${meta.id} already exists in the registry`);
3926
+ }
3927
+ this._idmap.set(meta.id, schema);
3928
+ }
3929
+ return this;
3930
+ }
3931
+ clear() {
3932
+ this._map = /* @__PURE__ */ new Map();
3933
+ this._idmap = /* @__PURE__ */ new Map();
3934
+ return this;
3935
+ }
3936
+ remove(schema) {
3937
+ const meta = this._map.get(schema);
3938
+ if (meta && typeof meta === "object" && "id" in meta) {
3939
+ this._idmap.delete(meta.id);
3940
+ }
3941
+ this._map.delete(schema);
3942
+ return this;
3943
+ }
3944
+ get(schema) {
3945
+ const p = schema._zod.parent;
3946
+ if (p) {
3947
+ const pm = { ...this.get(p) ?? {} };
3948
+ delete pm.id;
3949
+ return { ...pm, ...this._map.get(schema) };
3950
+ }
3951
+ return this._map.get(schema);
3952
+ }
3953
+ has(schema) {
3954
+ return this._map.has(schema);
3955
+ }
3956
+ };
3957
+ function registry() {
3958
+ return new $ZodRegistry();
3959
+ }
3960
+
3961
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/core/api.js
3962
+ init_esm_shims();
3963
+ function _string(Class2, params) {
3964
+ return new Class2({
3965
+ type: "string",
3966
+ ...normalizeParams(params)
3967
+ });
3968
+ }
3969
+ function _url(Class2, params) {
3970
+ return new Class2({
3971
+ type: "string",
3972
+ format: "url",
3973
+ check: "string_format",
3974
+ abort: false,
3975
+ ...normalizeParams(params)
3976
+ });
3977
+ }
3978
+ function _boolean(Class2, params) {
3979
+ return new Class2({
3980
+ type: "boolean",
3981
+ ...normalizeParams(params)
3982
+ });
3983
+ }
3984
+ function _any(Class2) {
3985
+ return new Class2({
3986
+ type: "any"
3987
+ });
3988
+ }
3989
+ function _length(length, params) {
3990
+ return new $ZodCheckLengthEquals({
3991
+ check: "length_equals",
3992
+ ...normalizeParams(params),
3993
+ length
3994
+ });
3995
+ }
3996
+ function _regex(pattern, params) {
3997
+ return new $ZodCheckRegex({
3998
+ check: "string_format",
3999
+ format: "regex",
4000
+ ...normalizeParams(params),
4001
+ pattern
4002
+ });
4003
+ }
4004
+ function _overwrite(tx) {
4005
+ return new $ZodCheckOverwrite({
4006
+ check: "overwrite",
4007
+ tx
4008
+ });
4009
+ }
4010
+ function _trim() {
4011
+ return _overwrite((input) => input.trim());
4012
+ }
4013
+ function _toLowerCase() {
4014
+ return _overwrite((input) => input.toLowerCase());
4015
+ }
4016
+
4017
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/mini/parse.js
4018
+ init_esm_shims();
4019
+
4020
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/mini/schemas.js
4021
+ init_esm_shims();
4022
+ var ZodMiniType = /* @__PURE__ */ $constructor("ZodMiniType", (inst, def) => {
4023
+ if (!inst._zod)
4024
+ throw new Error("Uninitialized schema in ZodMiniType.");
4025
+ $ZodType.init(inst, def);
4026
+ inst.def = def;
4027
+ inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
4028
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
4029
+ inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
4030
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
4031
+ inst.check = (...checks) => {
4032
+ return inst.clone(
4033
+ {
4034
+ ...def,
4035
+ checks: [
4036
+ ...def.checks ?? [],
4037
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
4038
+ ]
4039
+ }
4040
+ // { parent: true }
4041
+ );
4042
+ };
4043
+ inst.clone = (_def, params) => clone(inst, _def, params);
4044
+ inst.brand = () => inst;
4045
+ inst.register = (reg, meta) => {
4046
+ reg.add(inst, meta);
4047
+ return inst;
4048
+ };
4049
+ });
4050
+ var ZodMiniString = /* @__PURE__ */ $constructor("ZodMiniString", (inst, def) => {
4051
+ $ZodString.init(inst, def);
4052
+ ZodMiniType.init(inst, def);
4053
+ });
4054
+ function string2(params) {
4055
+ return _string(ZodMiniString, params);
4056
+ }
4057
+ var ZodMiniStringFormat = /* @__PURE__ */ $constructor("ZodMiniStringFormat", (inst, def) => {
4058
+ $ZodStringFormat.init(inst, def);
4059
+ ZodMiniString.init(inst, def);
4060
+ });
4061
+ var ZodMiniURL = /* @__PURE__ */ $constructor("ZodMiniURL", (inst, def) => {
4062
+ $ZodURL.init(inst, def);
4063
+ ZodMiniStringFormat.init(inst, def);
4064
+ });
4065
+ function url(params) {
4066
+ return _url(ZodMiniURL, params);
4067
+ }
4068
+ var ZodMiniBoolean = /* @__PURE__ */ $constructor("ZodMiniBoolean", (inst, def) => {
4069
+ $ZodBoolean.init(inst, def);
4070
+ ZodMiniType.init(inst, def);
4071
+ });
4072
+ function boolean2(params) {
4073
+ return _boolean(ZodMiniBoolean, params);
4074
+ }
4075
+ var ZodMiniAny = /* @__PURE__ */ $constructor("ZodMiniAny", (inst, def) => {
4076
+ $ZodAny.init(inst, def);
4077
+ ZodMiniType.init(inst, def);
4078
+ });
4079
+ function any() {
4080
+ return _any(ZodMiniAny);
4081
+ }
4082
+ var ZodMiniArray = /* @__PURE__ */ $constructor("ZodMiniArray", (inst, def) => {
4083
+ $ZodArray.init(inst, def);
4084
+ ZodMiniType.init(inst, def);
4085
+ });
4086
+ function array(element, params) {
4087
+ return new ZodMiniArray({
4088
+ type: "array",
4089
+ element,
4090
+ ...util_exports.normalizeParams(params)
4091
+ });
4092
+ }
4093
+ var ZodMiniObject = /* @__PURE__ */ $constructor("ZodMiniObject", (inst, def) => {
4094
+ $ZodObject.init(inst, def);
4095
+ ZodMiniType.init(inst, def);
4096
+ util_exports.defineLazy(inst, "shape", () => def.shape);
4097
+ });
4098
+ function object(shape, params) {
4099
+ const def = {
4100
+ type: "object",
4101
+ get shape() {
4102
+ util_exports.assignProp(this, "shape", { ...shape });
4103
+ return this.shape;
4104
+ },
4105
+ ...util_exports.normalizeParams(params)
4106
+ };
4107
+ return new ZodMiniObject(def);
4108
+ }
4109
+ var ZodMiniUnion = /* @__PURE__ */ $constructor("ZodMiniUnion", (inst, def) => {
4110
+ $ZodUnion.init(inst, def);
4111
+ ZodMiniType.init(inst, def);
4112
+ });
4113
+ function union(options, params) {
4114
+ return new ZodMiniUnion({
4115
+ type: "union",
4116
+ options,
4117
+ ...util_exports.normalizeParams(params)
4118
+ });
4119
+ }
4120
+ var ZodMiniRecord = /* @__PURE__ */ $constructor("ZodMiniRecord", (inst, def) => {
4121
+ $ZodRecord.init(inst, def);
4122
+ ZodMiniType.init(inst, def);
4123
+ });
4124
+ function record(keyType, valueType, params) {
4125
+ return new ZodMiniRecord({
4126
+ type: "record",
4127
+ keyType,
4128
+ valueType,
4129
+ ...util_exports.normalizeParams(params)
4130
+ });
4131
+ }
4132
+ var ZodMiniEnum = /* @__PURE__ */ $constructor("ZodMiniEnum", (inst, def) => {
4133
+ $ZodEnum.init(inst, def);
4134
+ ZodMiniType.init(inst, def);
4135
+ });
4136
+ function _enum(values, params) {
4137
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
4138
+ return new ZodMiniEnum({
4139
+ type: "enum",
4140
+ entries,
4141
+ ...util_exports.normalizeParams(params)
4142
+ });
4143
+ }
4144
+ var ZodMiniLiteral = /* @__PURE__ */ $constructor("ZodMiniLiteral", (inst, def) => {
4145
+ $ZodLiteral.init(inst, def);
4146
+ ZodMiniType.init(inst, def);
4147
+ });
4148
+ function literal(value, params) {
4149
+ return new ZodMiniLiteral({
4150
+ type: "literal",
4151
+ values: Array.isArray(value) ? value : [value],
4152
+ ...util_exports.normalizeParams(params)
4153
+ });
4154
+ }
4155
+ var ZodMiniOptional = /* @__PURE__ */ $constructor("ZodMiniOptional", (inst, def) => {
4156
+ $ZodOptional.init(inst, def);
4157
+ ZodMiniType.init(inst, def);
4158
+ });
4159
+ function optional(innerType) {
4160
+ return new ZodMiniOptional({
4161
+ type: "optional",
4162
+ innerType
4163
+ });
4164
+ }
4165
+ var ZodMiniNullable = /* @__PURE__ */ $constructor("ZodMiniNullable", (inst, def) => {
4166
+ $ZodNullable.init(inst, def);
4167
+ ZodMiniType.init(inst, def);
4168
+ });
4169
+ function nullable(innerType) {
4170
+ return new ZodMiniNullable({
4171
+ type: "nullable",
4172
+ innerType
4173
+ });
4174
+ }
4175
+ var ZodMiniDefault = /* @__PURE__ */ $constructor("ZodMiniDefault", (inst, def) => {
4176
+ $ZodDefault.init(inst, def);
4177
+ ZodMiniType.init(inst, def);
4178
+ });
4179
+ function _default(innerType, defaultValue) {
4180
+ return new ZodMiniDefault({
4181
+ type: "default",
4182
+ innerType,
4183
+ get defaultValue() {
4184
+ return typeof defaultValue === "function" ? defaultValue() : defaultValue;
4185
+ }
4186
+ });
4187
+ }
4188
+
4189
+ // ../../node_modules/.pnpm/zod@4.0.5/node_modules/zod/v4/mini/checks.js
4190
+ init_esm_shims();
4191
+
4192
+ // ../config/src/schema.ts
4193
+ var schemaRegistry = registry();
4194
+ var colorSchema = string2().check(
4195
+ _length(7),
4196
+ _toLowerCase(),
4197
+ _regex(/^#([0-9a-f]{3}){1,2}$/i),
4198
+ _trim()
2430
4199
  );
2431
4200
  schemaRegistry.add(colorSchema, {
2432
4201
  description: "A base schema for describing the format of colors"
2433
4202
  });
2434
- var darkColorSchema = z._default(colorSchema, "#151718");
4203
+ var darkColorSchema = _default(colorSchema, "#151718");
2435
4204
  schemaRegistry.add(darkColorSchema, {
2436
4205
  description: "The dark background color of the workspace"
2437
4206
  });
2438
- var lightColorSchema = z._default(colorSchema, "#cbd5e1");
4207
+ var lightColorSchema = _default(colorSchema, "#cbd5e1");
2439
4208
  schemaRegistry.add(lightColorSchema, {
2440
4209
  description: "The light background color of the workspace"
2441
4210
  });
2442
- var brandColorSchema = z._default(colorSchema, "#1fb2a6");
4211
+ var brandColorSchema = _default(colorSchema, "#1fb2a6");
2443
4212
  schemaRegistry.add(brandColorSchema, {
2444
4213
  description: "The primary brand specific color of the workspace"
2445
4214
  });
2446
- var alternateColorSchema = z.optional(colorSchema);
4215
+ var alternateColorSchema = optional(colorSchema);
2447
4216
  schemaRegistry.add(alternateColorSchema, {
2448
4217
  description: "The alternate brand specific color of the workspace"
2449
4218
  });
2450
- var accentColorSchema = z.optional(colorSchema);
4219
+ var accentColorSchema = optional(colorSchema);
2451
4220
  schemaRegistry.add(accentColorSchema, {
2452
4221
  description: "The secondary brand specific color of the workspace"
2453
4222
  });
2454
- var linkColorSchema = z._default(colorSchema, "#3fa6ff");
4223
+ var linkColorSchema = _default(colorSchema, "#3fa6ff");
2455
4224
  schemaRegistry.add(linkColorSchema, {
2456
4225
  description: "The color used to display hyperlink text"
2457
4226
  });
2458
- var helpColorSchema = z._default(colorSchema, "#818cf8");
4227
+ var helpColorSchema = _default(colorSchema, "#818cf8");
2459
4228
  schemaRegistry.add(helpColorSchema, {
2460
4229
  description: "The second brand specific color of the workspace"
2461
4230
  });
2462
- var successColorSchema = z._default(colorSchema, "#45b27e");
4231
+ var successColorSchema = _default(colorSchema, "#45b27e");
2463
4232
  schemaRegistry.add(successColorSchema, {
2464
4233
  description: "The success color of the workspace"
2465
4234
  });
2466
- var infoColorSchema = z._default(colorSchema, "#38bdf8");
4235
+ var infoColorSchema = _default(colorSchema, "#38bdf8");
2467
4236
  schemaRegistry.add(infoColorSchema, {
2468
4237
  description: "The informational color of the workspace"
2469
4238
  });
2470
- var warningColorSchema = z._default(colorSchema, "#f3d371");
4239
+ var warningColorSchema = _default(colorSchema, "#f3d371");
2471
4240
  schemaRegistry.add(warningColorSchema, {
2472
4241
  description: "The warning color of the workspace"
2473
4242
  });
2474
- var dangerColorSchema = z._default(colorSchema, "#d8314a");
4243
+ var dangerColorSchema = _default(colorSchema, "#d8314a");
2475
4244
  schemaRegistry.add(dangerColorSchema, {
2476
4245
  description: "The danger color of the workspace"
2477
4246
  });
2478
- var fatalColorSchema = z.optional(colorSchema);
4247
+ var fatalColorSchema = optional(colorSchema);
2479
4248
  schemaRegistry.add(fatalColorSchema, {
2480
4249
  description: "The fatal color of the workspace"
2481
4250
  });
2482
- var positiveColorSchema = z._default(colorSchema, "#4ade80");
4251
+ var positiveColorSchema = _default(colorSchema, "#4ade80");
2483
4252
  schemaRegistry.add(positiveColorSchema, {
2484
4253
  description: "The positive number color of the workspace"
2485
4254
  });
2486
- var negativeColorSchema = z._default(colorSchema, "#ef4444");
4255
+ var negativeColorSchema = _default(colorSchema, "#ef4444");
2487
4256
  schemaRegistry.add(negativeColorSchema, {
2488
4257
  description: "The negative number color of the workspace"
2489
4258
  });
2490
- var gradientStopsSchema = z.optional(z.array(colorSchema));
4259
+ var gradientStopsSchema = optional(array(colorSchema));
2491
4260
  schemaRegistry.add(gradientStopsSchema, {
2492
4261
  description: "The color stops for the base gradient color pattern used in the workspace"
2493
4262
  });
2494
- var darkColorsSchema = z.object({
4263
+ var darkColorsSchema = object({
2495
4264
  foreground: lightColorSchema,
2496
4265
  background: darkColorSchema,
2497
4266
  brand: brandColorSchema,
@@ -2508,7 +4277,7 @@ var darkColorsSchema = z.object({
2508
4277
  negative: negativeColorSchema,
2509
4278
  gradient: gradientStopsSchema
2510
4279
  });
2511
- var lightColorsSchema = z.object({
4280
+ var lightColorsSchema = object({
2512
4281
  foreground: darkColorSchema,
2513
4282
  background: lightColorSchema,
2514
4283
  brand: brandColorSchema,
@@ -2525,11 +4294,11 @@ var lightColorsSchema = z.object({
2525
4294
  negative: negativeColorSchema,
2526
4295
  gradient: gradientStopsSchema
2527
4296
  });
2528
- var multiColorsSchema = z.object({
4297
+ var multiColorsSchema = object({
2529
4298
  dark: darkColorsSchema,
2530
4299
  light: lightColorsSchema
2531
4300
  });
2532
- var singleColorsSchema = z.object({
4301
+ var singleColorsSchema = object({
2533
4302
  dark: darkColorSchema,
2534
4303
  light: lightColorSchema,
2535
4304
  brand: brandColorSchema,
@@ -2546,12 +4315,12 @@ var singleColorsSchema = z.object({
2546
4315
  negative: negativeColorSchema,
2547
4316
  gradient: gradientStopsSchema
2548
4317
  });
2549
- var registryUrlConfigSchema = z.optional(z.url());
4318
+ var registryUrlConfigSchema = optional(url());
2550
4319
  schemaRegistry.add(registryUrlConfigSchema, {
2551
4320
  description: "A remote registry URL used to publish distributable packages"
2552
4321
  });
2553
- var registrySchema = z._default(
2554
- z.object({
4322
+ var registrySchema = _default(
4323
+ object({
2555
4324
  github: registryUrlConfigSchema,
2556
4325
  npm: registryUrlConfigSchema,
2557
4326
  cargo: registryUrlConfigSchema,
@@ -2563,74 +4332,74 @@ var registrySchema = z._default(
2563
4332
  schemaRegistry.add(registrySchema, {
2564
4333
  description: "A list of remote registry URLs used by Storm Software"
2565
4334
  });
2566
- var colorsSchema = z.union([singleColorsSchema, multiColorsSchema]);
4335
+ var colorsSchema = union([singleColorsSchema, multiColorsSchema]);
2567
4336
  schemaRegistry.add(colorsSchema, {
2568
4337
  description: "Colors used for various workspace elements"
2569
4338
  });
2570
- var themeColorsSchema = z.record(
2571
- z.union([z.union([z.literal("base"), z.string()]), z.string()]),
4339
+ var themeColorsSchema = record(
4340
+ union([union([literal("base"), string2()]), string2()]),
2572
4341
  colorsSchema
2573
4342
  );
2574
4343
  schemaRegistry.add(themeColorsSchema, {
2575
4344
  description: "Storm theme config values used for styling various package elements"
2576
4345
  });
2577
- var extendsSchema = z.optional(
2578
- z.union([z.string().check(z.trim()), z.array(z.string().check(z.trim()))])
4346
+ var extendsSchema = optional(
4347
+ union([string2().check(_trim()), array(string2().check(_trim()))])
2579
4348
  );
2580
4349
  schemaRegistry.add(extendsSchema, {
2581
4350
  description: "The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
2582
4351
  });
2583
- var workspaceBotNameSchema = z.string().check(z.trim());
4352
+ var workspaceBotNameSchema = string2().check(_trim());
2584
4353
  schemaRegistry.add(workspaceBotNameSchema, {
2585
4354
  description: "The workspace bot user's name (this is the bot that will be used to perform various tasks)"
2586
4355
  });
2587
- var workspaceBotEmailSchema = z.string().check(z.trim());
4356
+ var workspaceBotEmailSchema = string2().check(_trim());
2588
4357
  schemaRegistry.add(workspaceBotEmailSchema, {
2589
4358
  description: "The email of the workspace bot"
2590
4359
  });
2591
- var workspaceBotSchema = z.object({
4360
+ var workspaceBotSchema = object({
2592
4361
  name: workspaceBotNameSchema,
2593
4362
  email: workspaceBotEmailSchema
2594
4363
  });
2595
4364
  schemaRegistry.add(workspaceBotSchema, {
2596
4365
  description: "The workspace's bot user's config used to automated various operations tasks"
2597
4366
  });
2598
- var workspaceReleaseBannerUrlSchema = z.optional(
2599
- z.string().check(z.trim(), z.url())
4367
+ var workspaceReleaseBannerUrlSchema = optional(
4368
+ string2().check(_trim(), url())
2600
4369
  );
2601
4370
  schemaRegistry.add(workspaceReleaseBannerUrlSchema, {
2602
4371
  description: "A URL to a banner image used to display the workspace's release"
2603
4372
  });
2604
- var workspaceReleaseBannerAltSchema = z._default(
2605
- z.string().check(z.trim()),
4373
+ var workspaceReleaseBannerAltSchema = _default(
4374
+ string2().check(_trim()),
2606
4375
  STORM_DEFAULT_BANNER_ALT
2607
4376
  );
2608
4377
  schemaRegistry.add(workspaceReleaseBannerAltSchema, {
2609
4378
  description: "The alt text for the workspace's release banner image"
2610
4379
  });
2611
- var workspaceReleaseBannerSchema = z.object({
4380
+ var workspaceReleaseBannerSchema = object({
2612
4381
  url: workspaceReleaseBannerUrlSchema,
2613
4382
  alt: workspaceReleaseBannerAltSchema
2614
4383
  });
2615
4384
  schemaRegistry.add(workspaceReleaseBannerSchema, {
2616
4385
  description: "The workspace's banner image used during the release process"
2617
4386
  });
2618
- var workspaceReleaseHeaderSchema = z.optional(
2619
- z.string().check(z.trim())
4387
+ var workspaceReleaseHeaderSchema = optional(
4388
+ string2().check(_trim())
2620
4389
  );
2621
4390
  schemaRegistry.add(workspaceReleaseHeaderSchema, {
2622
4391
  description: "A header message appended to the start of the workspace's release notes"
2623
4392
  });
2624
- var workspaceReleaseFooterSchema = z.optional(
2625
- z.string().check(z.trim())
4393
+ var workspaceReleaseFooterSchema = optional(
4394
+ string2().check(_trim())
2626
4395
  );
2627
4396
  schemaRegistry.add(workspaceReleaseFooterSchema, {
2628
4397
  description: "A footer message appended to the end of the workspace's release notes"
2629
4398
  });
2630
- var workspaceReleaseSchema = z.object({
2631
- banner: z.union([
4399
+ var workspaceReleaseSchema = object({
4400
+ banner: union([
2632
4401
  workspaceReleaseBannerSchema,
2633
- z.string().check(z.trim(), z.url())
4402
+ string2().check(_trim(), url())
2634
4403
  ]),
2635
4404
  header: workspaceReleaseHeaderSchema,
2636
4405
  footer: workspaceReleaseFooterSchema
@@ -2638,43 +4407,43 @@ var workspaceReleaseSchema = z.object({
2638
4407
  schemaRegistry.add(workspaceReleaseSchema, {
2639
4408
  description: "The workspace's release config used during the release process"
2640
4409
  });
2641
- var workspaceSocialsTwitterSchema = z.optional(
2642
- z.string().check(z.trim())
4410
+ var workspaceSocialsTwitterSchema = optional(
4411
+ string2().check(_trim())
2643
4412
  );
2644
4413
  schemaRegistry.add(workspaceSocialsTwitterSchema, {
2645
4414
  description: "A Twitter/X account associated with the organization/project"
2646
4415
  });
2647
- var workspaceSocialsDiscordSchema = z.optional(
2648
- z.string().check(z.trim())
4416
+ var workspaceSocialsDiscordSchema = optional(
4417
+ string2().check(_trim())
2649
4418
  );
2650
4419
  schemaRegistry.add(workspaceSocialsDiscordSchema, {
2651
4420
  description: "A Discord account associated with the organization/project"
2652
4421
  });
2653
- var workspaceSocialsTelegramSchema = z.optional(
2654
- z.string().check(z.trim())
4422
+ var workspaceSocialsTelegramSchema = optional(
4423
+ string2().check(_trim())
2655
4424
  );
2656
4425
  schemaRegistry.add(workspaceSocialsTelegramSchema, {
2657
4426
  description: "A Telegram account associated with the organization/project"
2658
4427
  });
2659
- var workspaceSocialsSlackSchema = z.optional(
2660
- z.string().check(z.trim())
4428
+ var workspaceSocialsSlackSchema = optional(
4429
+ string2().check(_trim())
2661
4430
  );
2662
4431
  schemaRegistry.add(workspaceSocialsSlackSchema, {
2663
4432
  description: "A Slack account associated with the organization/project"
2664
4433
  });
2665
- var workspaceSocialsMediumSchema = z.optional(
2666
- z.string().check(z.trim())
4434
+ var workspaceSocialsMediumSchema = optional(
4435
+ string2().check(_trim())
2667
4436
  );
2668
4437
  schemaRegistry.add(workspaceSocialsMediumSchema, {
2669
4438
  description: "A Medium account associated with the organization/project"
2670
4439
  });
2671
- var workspaceSocialsGithubSchema = z.optional(
2672
- z.string().check(z.trim())
4440
+ var workspaceSocialsGithubSchema = optional(
4441
+ string2().check(_trim())
2673
4442
  );
2674
4443
  schemaRegistry.add(workspaceSocialsGithubSchema, {
2675
4444
  description: "A GitHub account associated with the organization/project"
2676
4445
  });
2677
- var workspaceSocialsSchema = z.object({
4446
+ var workspaceSocialsSchema = object({
2678
4447
  twitter: workspaceSocialsTwitterSchema,
2679
4448
  discord: workspaceSocialsDiscordSchema,
2680
4449
  telegram: workspaceSocialsTelegramSchema,
@@ -2685,44 +4454,44 @@ var workspaceSocialsSchema = z.object({
2685
4454
  schemaRegistry.add(workspaceSocialsSchema, {
2686
4455
  description: "The workspace's account config used to store various social media links"
2687
4456
  });
2688
- var workspaceDirectoryCacheSchema = z.optional(
2689
- z.string().check(z.trim())
4457
+ var workspaceDirectoryCacheSchema = optional(
4458
+ string2().check(_trim())
2690
4459
  );
2691
4460
  schemaRegistry.add(workspaceDirectoryCacheSchema, {
2692
4461
  description: "The directory used to store the environment's cached file data"
2693
4462
  });
2694
- var workspaceDirectoryDataSchema = z.optional(
2695
- z.string().check(z.trim())
4463
+ var workspaceDirectoryDataSchema = optional(
4464
+ string2().check(_trim())
2696
4465
  );
2697
4466
  schemaRegistry.add(workspaceDirectoryDataSchema, {
2698
4467
  description: "The directory used to store the environment's data files"
2699
4468
  });
2700
- var workspaceDirectoryConfigSchema = z.optional(
2701
- z.string().check(z.trim())
4469
+ var workspaceDirectoryConfigSchema = optional(
4470
+ string2().check(_trim())
2702
4471
  );
2703
4472
  schemaRegistry.add(workspaceDirectoryConfigSchema, {
2704
4473
  description: "The directory used to store the environment's configuration files"
2705
4474
  });
2706
- var workspaceDirectoryTempSchema = z.optional(
2707
- z.string().check(z.trim())
4475
+ var workspaceDirectoryTempSchema = optional(
4476
+ string2().check(_trim())
2708
4477
  );
2709
4478
  schemaRegistry.add(workspaceDirectoryTempSchema, {
2710
4479
  description: "The directory used to store the environment's temp files"
2711
4480
  });
2712
- var workspaceDirectoryLogSchema = z.optional(
2713
- z.string().check(z.trim())
4481
+ var workspaceDirectoryLogSchema = optional(
4482
+ string2().check(_trim())
2714
4483
  );
2715
4484
  schemaRegistry.add(workspaceDirectoryLogSchema, {
2716
4485
  description: "The directory used to store the environment's log files"
2717
4486
  });
2718
- var workspaceDirectoryBuildSchema = z._default(
2719
- z.string().check(z.trim()),
4487
+ var workspaceDirectoryBuildSchema = _default(
4488
+ string2().check(_trim()),
2720
4489
  "dist"
2721
4490
  );
2722
4491
  schemaRegistry.add(workspaceDirectoryBuildSchema, {
2723
4492
  description: "The directory used to store the workspace's distributable files after a build (relative to the workspace root)"
2724
4493
  });
2725
- var workspaceDirectorySchema = z.object({
4494
+ var workspaceDirectorySchema = object({
2726
4495
  cache: workspaceDirectoryCacheSchema,
2727
4496
  data: workspaceDirectoryDataSchema,
2728
4497
  config: workspaceDirectoryConfigSchema,
@@ -2733,49 +4502,49 @@ var workspaceDirectorySchema = z.object({
2733
4502
  schemaRegistry.add(workspaceDirectorySchema, {
2734
4503
  description: "Various directories used by the workspace to store data, cache, and configuration files"
2735
4504
  });
2736
- var errorCodesFileSchema = z._default(
2737
- z.string().check(z.trim()),
4505
+ var errorCodesFileSchema = _default(
4506
+ string2().check(_trim()),
2738
4507
  STORM_DEFAULT_ERROR_CODES_FILE
2739
4508
  );
2740
4509
  schemaRegistry.add(errorCodesFileSchema, {
2741
4510
  description: "The path to the workspace's error codes JSON file"
2742
4511
  });
2743
- var errorUrlSchema = z.optional(z.url());
4512
+ var errorUrlSchema = optional(url());
2744
4513
  schemaRegistry.add(errorUrlSchema, {
2745
4514
  description: "A URL to a page that looks up the workspace's error messages given a specific error code"
2746
4515
  });
2747
- var errorSchema = z.object({
4516
+ var errorSchema = object({
2748
4517
  codesFile: errorCodesFileSchema,
2749
4518
  url: errorUrlSchema
2750
4519
  });
2751
4520
  schemaRegistry.add(errorSchema, {
2752
4521
  description: "The workspace's error config used when creating error details during a system error"
2753
4522
  });
2754
- var organizationNameSchema = z.optional(
2755
- z.string().check(z.trim(), z.toLowerCase())
4523
+ var organizationNameSchema = optional(
4524
+ string2().check(_trim(), _toLowerCase())
2756
4525
  );
2757
4526
  schemaRegistry.add(organizationNameSchema, {
2758
4527
  description: "The name of the organization"
2759
4528
  });
2760
- var organizationDescriptionSchema = z.optional(
2761
- z.string().check(z.trim())
4529
+ var organizationDescriptionSchema = optional(
4530
+ string2().check(_trim())
2762
4531
  );
2763
4532
  schemaRegistry.add(organizationDescriptionSchema, {
2764
4533
  description: "A description of the organization"
2765
4534
  });
2766
- var organizationLogoSchema = z.optional(z.url());
4535
+ var organizationLogoSchema = optional(url());
2767
4536
  schemaRegistry.add(organizationLogoSchema, {
2768
4537
  description: "A URL to the organization's logo image"
2769
4538
  });
2770
- var organizationIconSchema = z.optional(z.url());
4539
+ var organizationIconSchema = optional(url());
2771
4540
  schemaRegistry.add(organizationIconSchema, {
2772
4541
  description: "A URL to the organization's icon image"
2773
4542
  });
2774
- var organizationUrlSchema = z.optional(z.url());
4543
+ var organizationUrlSchema = optional(url());
2775
4544
  schemaRegistry.add(organizationUrlSchema, {
2776
4545
  description: "A URL to a page that provides more information about the organization"
2777
4546
  });
2778
- var organizationSchema = z.object({
4547
+ var organizationSchema = object({
2779
4548
  name: organizationNameSchema,
2780
4549
  description: organizationDescriptionSchema,
2781
4550
  logo: organizationLogoSchema,
@@ -2785,120 +4554,120 @@ var organizationSchema = z.object({
2785
4554
  schemaRegistry.add(organizationSchema, {
2786
4555
  description: "The workspace's organization details"
2787
4556
  });
2788
- var schemaNameSchema = z._default(
2789
- z.string().check(z.trim(), z.toLowerCase()),
4557
+ var schemaNameSchema = _default(
4558
+ string2().check(_trim(), _toLowerCase()),
2790
4559
  "https://public.storm-cdn.com/schemas/storm-workspace.schema.json"
2791
4560
  );
2792
4561
  schemaRegistry.add(schemaNameSchema, {
2793
4562
  description: "The URL or file path to the JSON schema file that describes the Storm configuration file"
2794
4563
  });
2795
- var nameSchema = z.string().check(z.trim(), z.toLowerCase());
4564
+ var nameSchema = string2().check(_trim(), _toLowerCase());
2796
4565
  schemaRegistry.add(nameSchema, {
2797
4566
  description: "The name of the workspace/project/service/package/scope using this configuration"
2798
4567
  });
2799
- var namespaceSchema = z.string().check(z.trim(), z.toLowerCase());
4568
+ var namespaceSchema = string2().check(_trim(), _toLowerCase());
2800
4569
  schemaRegistry.add(namespaceSchema, {
2801
4570
  description: "The namespace of the workspace/project/service/package/scope using this configuration"
2802
4571
  });
2803
- var orgSchema = z.union([
4572
+ var orgSchema = union([
2804
4573
  organizationSchema,
2805
- z.string().check(z.trim(), z.toLowerCase())
4574
+ string2().check(_trim(), _toLowerCase())
2806
4575
  ]);
2807
4576
  schemaRegistry.add(orgSchema, {
2808
4577
  description: "The organization of the workspace. This can be a string or an object containing the organization's details"
2809
4578
  });
2810
- var repositorySchema = z.string().check(z.trim(), z.toLowerCase());
4579
+ var repositorySchema = string2().check(_trim(), _toLowerCase());
2811
4580
  schemaRegistry.add(repositorySchema, {
2812
4581
  description: "The repo URL of the workspace (i.e. the GitHub repository URL)"
2813
4582
  });
2814
- var licenseSchema = z._default(
2815
- z.string().check(z.trim()),
4583
+ var licenseSchema = _default(
4584
+ string2().check(_trim()),
2816
4585
  "Apache-2.0"
2817
4586
  );
2818
4587
  schemaRegistry.add(licenseSchema, {
2819
4588
  description: "The license type of the package"
2820
4589
  });
2821
- var homepageSchema = z.optional(z.url());
4590
+ var homepageSchema = optional(url());
2822
4591
  schemaRegistry.add(homepageSchema, {
2823
4592
  description: "The homepage of the workspace"
2824
4593
  });
2825
- var docsSchema = z.optional(z.url());
4594
+ var docsSchema = optional(url());
2826
4595
  schemaRegistry.add(docsSchema, {
2827
4596
  description: "The documentation site for the workspace"
2828
4597
  });
2829
- var portalSchema = z.optional(z.url());
4598
+ var portalSchema = optional(url());
2830
4599
  schemaRegistry.add(portalSchema, {
2831
4600
  description: "The development portal site for the workspace"
2832
4601
  });
2833
- var licensingSchema = z.optional(z.url());
4602
+ var licensingSchema = optional(url());
2834
4603
  schemaRegistry.add(licensingSchema, {
2835
4604
  description: "The licensing site for the workspace"
2836
4605
  });
2837
- var contactSchema = z.optional(z.url());
4606
+ var contactSchema = optional(url());
2838
4607
  schemaRegistry.add(contactSchema, {
2839
4608
  description: "The contact site for the workspace"
2840
4609
  });
2841
- var supportSchema = z.optional(z.url());
4610
+ var supportSchema = optional(url());
2842
4611
  schemaRegistry.add(supportSchema, {
2843
4612
  description: "The support site for the workspace. If not provided, this is defaulted to the `contact` config value"
2844
4613
  });
2845
- var branchSchema = z._default(
2846
- z.string().check(z.trim(), z.toLowerCase()),
4614
+ var branchSchema = _default(
4615
+ string2().check(_trim(), _toLowerCase()),
2847
4616
  "main"
2848
4617
  );
2849
4618
  schemaRegistry.add(branchSchema, {
2850
4619
  description: "The branch of the workspace"
2851
4620
  });
2852
- var preidSchema = z.optional(
2853
- z.string().check(z.trim(), z.toLowerCase())
4621
+ var preidSchema = optional(
4622
+ string2().check(_trim(), _toLowerCase())
2854
4623
  );
2855
4624
  schemaRegistry.add(preidSchema, {
2856
4625
  description: "A tag specifying the version pre-release identifier"
2857
4626
  });
2858
- var ownerSchema = z.optional(
2859
- z.string().check(z.trim(), z.toLowerCase())
4627
+ var ownerSchema = optional(
4628
+ string2().check(_trim(), _toLowerCase())
2860
4629
  );
2861
4630
  schemaRegistry.add(ownerSchema, {
2862
4631
  description: "The owner of the package"
2863
4632
  });
2864
- var modeSchema = z._default(
2865
- z.enum(["development", "staging", "production"]).check(z.trim(), z.toLowerCase()),
4633
+ var modeSchema = _default(
4634
+ _enum(["development", "staging", "production"]).check(_trim(), _toLowerCase()),
2866
4635
  "production"
2867
4636
  );
2868
4637
  schemaRegistry.add(modeSchema, {
2869
4638
  description: "The current runtime environment mode for the package"
2870
4639
  });
2871
- var workspaceRootSchema = z.string().check(z.trim(), z.toLowerCase());
4640
+ var workspaceRootSchema = string2().check(_trim(), _toLowerCase());
2872
4641
  schemaRegistry.add(workspaceRootSchema, {
2873
4642
  description: "The root directory of the workspace"
2874
4643
  });
2875
- var skipCacheSchema = z._default(z.boolean(), false);
4644
+ var skipCacheSchema = _default(boolean2(), false);
2876
4645
  schemaRegistry.add(skipCacheSchema, {
2877
4646
  description: "Should all known types of workspace caching be skipped?"
2878
4647
  });
2879
- var packageManagerSchema = z._default(
2880
- z.enum(["npm", "yarn", "pnpm", "bun"]),
4648
+ var packageManagerSchema = _default(
4649
+ _enum(["npm", "yarn", "pnpm", "bun"]),
2881
4650
  "npm"
2882
4651
  );
2883
4652
  schemaRegistry.add(packageManagerSchema, {
2884
4653
  description: "The JavaScript/TypeScript package manager used by the repository"
2885
4654
  });
2886
- var timezoneSchema = z._default(
2887
- z.string().check(z.trim(), z.toLowerCase()),
4655
+ var timezoneSchema = _default(
4656
+ string2().check(_trim(), _toLowerCase()),
2888
4657
  "America/New_York"
2889
4658
  );
2890
4659
  schemaRegistry.add(timezoneSchema, {
2891
4660
  description: "The default timezone of the workspace"
2892
4661
  });
2893
- var localeSchema = z._default(
2894
- z.string().check(z.trim(), z.toLowerCase()),
4662
+ var localeSchema = _default(
4663
+ string2().check(_trim(), _toLowerCase()),
2895
4664
  "en-US"
2896
4665
  );
2897
4666
  schemaRegistry.add(localeSchema, {
2898
4667
  description: "The default locale of the workspace"
2899
4668
  });
2900
- var logLevelSchema = z._default(
2901
- z.enum([
4669
+ var logLevelSchema = _default(
4670
+ _enum([
2902
4671
  "silent",
2903
4672
  "fatal",
2904
4673
  "error",
@@ -2914,22 +4683,22 @@ var logLevelSchema = z._default(
2914
4683
  schemaRegistry.add(logLevelSchema, {
2915
4684
  description: "The log level used to filter out lower priority log messages. If not provided, this is defaulted using the `environment` config value (if `environment` is set to `production` then `level` is `error`, else `level` is `debug`)."
2916
4685
  });
2917
- var skipConfigLoggingSchema = z._default(z.boolean(), true);
4686
+ var skipConfigLoggingSchema = _default(boolean2(), true);
2918
4687
  schemaRegistry.add(skipConfigLoggingSchema, {
2919
4688
  description: "Should the logging of the current Storm Workspace configuration be skipped?"
2920
4689
  });
2921
- var configFileSchema = z._default(
2922
- z.nullable(z.string().check(z.trim())),
4690
+ var configFileSchema = _default(
4691
+ nullable(string2().check(_trim())),
2923
4692
  null
2924
4693
  );
2925
4694
  schemaRegistry.add(configFileSchema, {
2926
4695
  description: "The filepath of the Storm config. When this field is null, no config file was found in the current workspace."
2927
4696
  });
2928
- var extensionsSchema = z._default(z.record(z.string(), z.any()), {});
4697
+ var extensionsSchema = _default(record(string2(), any()), {});
2929
4698
  schemaRegistry.add(extensionsSchema, {
2930
4699
  description: "Configuration of each used extension"
2931
4700
  });
2932
- var workspaceConfigSchema = z.object({
4701
+ var workspaceConfigSchema = object({
2933
4702
  $schema: schemaNameSchema,
2934
4703
  extends: extendsSchema,
2935
4704
  name: nameSchema,
@@ -2961,7 +4730,7 @@ var workspaceConfigSchema = z.object({
2961
4730
  skipConfigLogging: skipConfigLoggingSchema,
2962
4731
  registry: registrySchema,
2963
4732
  configFile: configFileSchema,
2964
- colors: z.union([colorsSchema, themeColorsSchema]),
4733
+ colors: union([colorsSchema, themeColorsSchema]),
2965
4734
  extensions: extensionsSchema
2966
4735
  });
2967
4736
  schemaRegistry.add(extensionsSchema, {
@@ -3045,34 +4814,34 @@ async function getPackageJsonConfig(root) {
3045
4814
  support
3046
4815
  };
3047
4816
  }
3048
- function applyDefaultConfig(config2) {
3049
- if (!config2.support && config2.contact) {
3050
- config2.support = config2.contact;
4817
+ function applyDefaultConfig(config3) {
4818
+ if (!config3.support && config3.contact) {
4819
+ config3.support = config3.contact;
3051
4820
  }
3052
- if (!config2.contact && config2.support) {
3053
- config2.contact = config2.support;
4821
+ if (!config3.contact && config3.support) {
4822
+ config3.contact = config3.support;
3054
4823
  }
3055
- if (config2.homepage) {
3056
- if (!config2.docs) {
3057
- config2.docs = `${config2.homepage}/docs`;
4824
+ if (config3.homepage) {
4825
+ if (!config3.docs) {
4826
+ config3.docs = `${config3.homepage}/docs`;
3058
4827
  }
3059
- if (!config2.license) {
3060
- config2.license = `${config2.homepage}/license`;
4828
+ if (!config3.license) {
4829
+ config3.license = `${config3.homepage}/license`;
3061
4830
  }
3062
- if (!config2.support) {
3063
- config2.support = `${config2.homepage}/support`;
4831
+ if (!config3.support) {
4832
+ config3.support = `${config3.homepage}/support`;
3064
4833
  }
3065
- if (!config2.contact) {
3066
- config2.contact = `${config2.homepage}/contact`;
4834
+ if (!config3.contact) {
4835
+ config3.contact = `${config3.homepage}/contact`;
3067
4836
  }
3068
- if (!config2.error?.codesFile || !config2?.error?.url) {
3069
- config2.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
3070
- if (config2.homepage) {
3071
- config2.error.url ??= `${config2.homepage}/errors`;
4837
+ if (!config3.error?.codesFile || !config3?.error?.url) {
4838
+ config3.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
4839
+ if (config3.homepage) {
4840
+ config3.error.url ??= `${config3.homepage}/errors`;
3072
4841
  }
3073
4842
  }
3074
4843
  }
3075
- return config2;
4844
+ return config3;
3076
4845
  }
3077
4846
 
3078
4847
  // ../config-tools/src/config-file/get-config-file.ts
@@ -3114,9 +4883,9 @@ var getConfigFileByName = async (fileName, filePath, options = {}) => {
3114
4883
  var getConfigFile = async (filePath, additionalFileNames = []) => {
3115
4884
  const workspacePath = filePath ? filePath : findWorkspaceRoot2(filePath);
3116
4885
  const result = await getConfigFileByName("storm-workspace", workspacePath);
3117
- let config2 = result.config;
4886
+ let config3 = result.config;
3118
4887
  const configFile = result.configFile;
3119
- if (config2 && configFile && Object.keys(config2).length > 0 && !config2.skipConfigLogging) {
4888
+ if (config3 && configFile && Object.keys(config3).length > 0 && !config3.skipConfigLogging) {
3120
4889
  writeTrace(
3121
4890
  `Found Storm configuration file "${configFile.includes(`${workspacePath}/`) ? configFile.replace(`${workspacePath}/`, "") : configFile}" at "${workspacePath}"`,
3122
4891
  {
@@ -3132,7 +4901,7 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
3132
4901
  );
3133
4902
  for (const result2 of results) {
3134
4903
  if (result2?.config && result2?.configFile && Object.keys(result2.config).length > 0) {
3135
- if (!config2.skipConfigLogging && !result2.config.skipConfigLogging) {
4904
+ if (!config3.skipConfigLogging && !result2.config.skipConfigLogging) {
3136
4905
  writeTrace(
3137
4906
  `Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
3138
4907
  {
@@ -3140,15 +4909,15 @@ var getConfigFile = async (filePath, additionalFileNames = []) => {
3140
4909
  }
3141
4910
  );
3142
4911
  }
3143
- config2 = defu2(result2.config ?? {}, config2 ?? {});
4912
+ config3 = defu2(result2.config ?? {}, config3 ?? {});
3144
4913
  }
3145
4914
  }
3146
4915
  }
3147
- if (!config2 || Object.keys(config2).length === 0) {
4916
+ if (!config3 || Object.keys(config3).length === 0) {
3148
4917
  return void 0;
3149
4918
  }
3150
- config2.configFile = configFile;
3151
- return config2;
4919
+ config3.configFile = configFile;
4920
+ return config3;
3152
4921
  };
3153
4922
 
3154
4923
  // ../config-tools/src/create-storm-config.ts
@@ -3171,7 +4940,7 @@ var getExtensionEnv = (extensionName) => {
3171
4940
  };
3172
4941
  var getConfigEnv = () => {
3173
4942
  const prefix = "STORM_";
3174
- let config2 = {
4943
+ let config3 = {
3175
4944
  extends: process.env[`${prefix}EXTENDS`] || void 0,
3176
4945
  name: process.env[`${prefix}NAME`] || void 0,
3177
4946
  namespace: process.env[`${prefix}NAMESPACE`] || void 0,
@@ -3259,38 +5028,38 @@ var getConfigEnv = () => {
3259
5028
  (colorKey) => !envKey.startsWith(`${prefix}COLOR_LIGHT_${colorKey}`) && !envKey.startsWith(`${prefix}COLOR_DARK_${colorKey}`)
3260
5029
  )
3261
5030
  );
3262
- config2.colors = themeNames.length > 0 ? themeNames.reduce(
5031
+ config3.colors = themeNames.length > 0 ? themeNames.reduce(
3263
5032
  (ret, themeName) => {
3264
5033
  ret[themeName] = getThemeColorsEnv(prefix, themeName);
3265
5034
  return ret;
3266
5035
  },
3267
5036
  {}
3268
5037
  ) : getThemeColorsEnv(prefix);
3269
- if (config2.docs === STORM_DEFAULT_DOCS) {
3270
- if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
3271
- config2.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/docs`;
5038
+ if (config3.docs === STORM_DEFAULT_DOCS) {
5039
+ if (config3.homepage === STORM_DEFAULT_HOMEPAGE) {
5040
+ config3.docs = `${STORM_DEFAULT_HOMEPAGE}/projects/${config3.name}/docs`;
3272
5041
  } else {
3273
- config2.docs = `${config2.homepage}/docs`;
5042
+ config3.docs = `${config3.homepage}/docs`;
3274
5043
  }
3275
5044
  }
3276
- if (config2.licensing === STORM_DEFAULT_LICENSING) {
3277
- if (config2.homepage === STORM_DEFAULT_HOMEPAGE) {
3278
- config2.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config2.name}/licensing`;
5045
+ if (config3.licensing === STORM_DEFAULT_LICENSING) {
5046
+ if (config3.homepage === STORM_DEFAULT_HOMEPAGE) {
5047
+ config3.licensing = `${STORM_DEFAULT_HOMEPAGE}/projects/${config3.name}/licensing`;
3279
5048
  } else {
3280
- config2.licensing = `${config2.homepage}/docs`;
5049
+ config3.licensing = `${config3.homepage}/docs`;
3281
5050
  }
3282
5051
  }
3283
5052
  const serializedConfig = process.env[`${prefix}CONFIG`];
3284
5053
  if (serializedConfig) {
3285
5054
  const parsed = JSON.parse(serializedConfig);
3286
- config2 = {
3287
- ...config2,
5055
+ config3 = {
5056
+ ...config3,
3288
5057
  ...parsed,
3289
- colors: { ...config2.colors, ...parsed.colors },
3290
- extensions: { ...config2.extensions, ...parsed.extensions }
5058
+ colors: { ...config3.colors, ...parsed.colors },
5059
+ extensions: { ...config3.extensions, ...parsed.extensions }
3291
5060
  };
3292
5061
  }
3293
- return config2;
5062
+ return config3;
3294
5063
  };
3295
5064
  var getThemeColorsEnv = (prefix, theme) => {
3296
5065
  const themeName = `COLOR_${theme && theme !== "base" ? `${theme}_` : ""}`.toUpperCase();
@@ -3391,343 +5160,343 @@ var setExtensionEnv = (extensionName, extension) => {
3391
5160
  }
3392
5161
  }
3393
5162
  };
3394
- var setConfigEnv = (config2) => {
5163
+ var setConfigEnv = (config3) => {
3395
5164
  const prefix = "STORM_";
3396
- if (config2.extends) {
3397
- process.env[`${prefix}EXTENDS`] = Array.isArray(config2.extends) ? JSON.stringify(config2.extends) : config2.extends;
5165
+ if (config3.extends) {
5166
+ process.env[`${prefix}EXTENDS`] = Array.isArray(config3.extends) ? JSON.stringify(config3.extends) : config3.extends;
3398
5167
  }
3399
- if (config2.name) {
3400
- process.env[`${prefix}NAME`] = config2.name;
5168
+ if (config3.name) {
5169
+ process.env[`${prefix}NAME`] = config3.name;
3401
5170
  }
3402
- if (config2.namespace) {
3403
- process.env[`${prefix}NAMESPACE`] = config2.namespace;
5171
+ if (config3.namespace) {
5172
+ process.env[`${prefix}NAMESPACE`] = config3.namespace;
3404
5173
  }
3405
- if (config2.owner) {
3406
- process.env[`${prefix}OWNER`] = config2.owner;
5174
+ if (config3.owner) {
5175
+ process.env[`${prefix}OWNER`] = config3.owner;
3407
5176
  }
3408
- if (config2.bot) {
3409
- process.env[`${prefix}BOT_NAME`] = config2.bot.name;
3410
- process.env[`${prefix}BOT_EMAIL`] = config2.bot.email;
5177
+ if (config3.bot) {
5178
+ process.env[`${prefix}BOT_NAME`] = config3.bot.name;
5179
+ process.env[`${prefix}BOT_EMAIL`] = config3.bot.email;
3411
5180
  }
3412
- if (config2.error) {
3413
- process.env[`${prefix}ERROR_CODES_FILE`] = config2.error.codesFile;
3414
- process.env[`${prefix}ERROR_URL`] = config2.error.url;
5181
+ if (config3.error) {
5182
+ process.env[`${prefix}ERROR_CODES_FILE`] = config3.error.codesFile;
5183
+ process.env[`${prefix}ERROR_URL`] = config3.error.url;
3415
5184
  }
3416
- if (config2.release) {
3417
- if (config2.release.banner) {
3418
- if (typeof config2.release.banner === "string") {
3419
- process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner;
3420
- process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner;
5185
+ if (config3.release) {
5186
+ if (config3.release.banner) {
5187
+ if (typeof config3.release.banner === "string") {
5188
+ process.env[`${prefix}RELEASE_BANNER`] = config3.release.banner;
5189
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config3.release.banner;
3421
5190
  } else {
3422
- process.env[`${prefix}RELEASE_BANNER`] = config2.release.banner.url;
3423
- process.env[`${prefix}RELEASE_BANNER_URL`] = config2.release.banner.url;
3424
- process.env[`${prefix}RELEASE_BANNER_ALT`] = config2.release.banner.alt;
5191
+ process.env[`${prefix}RELEASE_BANNER`] = config3.release.banner.url;
5192
+ process.env[`${prefix}RELEASE_BANNER_URL`] = config3.release.banner.url;
5193
+ process.env[`${prefix}RELEASE_BANNER_ALT`] = config3.release.banner.alt;
3425
5194
  }
3426
5195
  }
3427
- process.env[`${prefix}RELEASE_HEADER`] = config2.release.header;
3428
- process.env[`${prefix}RELEASE_FOOTER`] = config2.release.footer;
5196
+ process.env[`${prefix}RELEASE_HEADER`] = config3.release.header;
5197
+ process.env[`${prefix}RELEASE_FOOTER`] = config3.release.footer;
3429
5198
  }
3430
- if (config2.socials) {
3431
- if (config2.socials.twitter) {
3432
- process.env[`${prefix}SOCIAL_TWITTER`] = config2.socials.twitter;
5199
+ if (config3.socials) {
5200
+ if (config3.socials.twitter) {
5201
+ process.env[`${prefix}SOCIAL_TWITTER`] = config3.socials.twitter;
3433
5202
  }
3434
- if (config2.socials.discord) {
3435
- process.env[`${prefix}SOCIAL_DISCORD`] = config2.socials.discord;
5203
+ if (config3.socials.discord) {
5204
+ process.env[`${prefix}SOCIAL_DISCORD`] = config3.socials.discord;
3436
5205
  }
3437
- if (config2.socials.telegram) {
3438
- process.env[`${prefix}SOCIAL_TELEGRAM`] = config2.socials.telegram;
5206
+ if (config3.socials.telegram) {
5207
+ process.env[`${prefix}SOCIAL_TELEGRAM`] = config3.socials.telegram;
3439
5208
  }
3440
- if (config2.socials.slack) {
3441
- process.env[`${prefix}SOCIAL_SLACK`] = config2.socials.slack;
5209
+ if (config3.socials.slack) {
5210
+ process.env[`${prefix}SOCIAL_SLACK`] = config3.socials.slack;
3442
5211
  }
3443
- if (config2.socials.medium) {
3444
- process.env[`${prefix}SOCIAL_MEDIUM`] = config2.socials.medium;
5212
+ if (config3.socials.medium) {
5213
+ process.env[`${prefix}SOCIAL_MEDIUM`] = config3.socials.medium;
3445
5214
  }
3446
- if (config2.socials.github) {
3447
- process.env[`${prefix}SOCIAL_GITHUB`] = config2.socials.github;
5215
+ if (config3.socials.github) {
5216
+ process.env[`${prefix}SOCIAL_GITHUB`] = config3.socials.github;
3448
5217
  }
3449
5218
  }
3450
- if (config2.organization) {
3451
- if (typeof config2.organization === "string") {
3452
- process.env[`${prefix}ORG`] = config2.organization;
3453
- process.env[`${prefix}ORG_NAME`] = config2.organization;
3454
- process.env[`${prefix}ORGANIZATION`] = config2.organization;
3455
- process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization;
5219
+ if (config3.organization) {
5220
+ if (typeof config3.organization === "string") {
5221
+ process.env[`${prefix}ORG`] = config3.organization;
5222
+ process.env[`${prefix}ORG_NAME`] = config3.organization;
5223
+ process.env[`${prefix}ORGANIZATION`] = config3.organization;
5224
+ process.env[`${prefix}ORGANIZATION_NAME`] = config3.organization;
3456
5225
  } else {
3457
- process.env[`${prefix}ORG`] = config2.organization.name;
3458
- process.env[`${prefix}ORG_NAME`] = config2.organization.name;
3459
- process.env[`${prefix}ORGANIZATION`] = config2.organization.name;
3460
- process.env[`${prefix}ORGANIZATION_NAME`] = config2.organization.name;
3461
- if (config2.organization.url) {
3462
- process.env[`${prefix}ORG_URL`] = config2.organization.url;
3463
- process.env[`${prefix}ORGANIZATION_URL`] = config2.organization.url;
5226
+ process.env[`${prefix}ORG`] = config3.organization.name;
5227
+ process.env[`${prefix}ORG_NAME`] = config3.organization.name;
5228
+ process.env[`${prefix}ORGANIZATION`] = config3.organization.name;
5229
+ process.env[`${prefix}ORGANIZATION_NAME`] = config3.organization.name;
5230
+ if (config3.organization.url) {
5231
+ process.env[`${prefix}ORG_URL`] = config3.organization.url;
5232
+ process.env[`${prefix}ORGANIZATION_URL`] = config3.organization.url;
3464
5233
  }
3465
- if (config2.organization.description) {
3466
- process.env[`${prefix}ORG_DESCRIPTION`] = config2.organization.description;
3467
- process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config2.organization.description;
5234
+ if (config3.organization.description) {
5235
+ process.env[`${prefix}ORG_DESCRIPTION`] = config3.organization.description;
5236
+ process.env[`${prefix}ORGANIZATION_DESCRIPTION`] = config3.organization.description;
3468
5237
  }
3469
- if (config2.organization.logo) {
3470
- process.env[`${prefix}ORG_LOGO`] = config2.organization.logo;
3471
- process.env[`${prefix}ORGANIZATION_LOGO`] = config2.organization.logo;
5238
+ if (config3.organization.logo) {
5239
+ process.env[`${prefix}ORG_LOGO`] = config3.organization.logo;
5240
+ process.env[`${prefix}ORGANIZATION_LOGO`] = config3.organization.logo;
3472
5241
  }
3473
- if (config2.organization.icon) {
3474
- process.env[`${prefix}ORG_ICON`] = config2.organization.icon;
3475
- process.env[`${prefix}ORGANIZATION_ICON`] = config2.organization.icon;
5242
+ if (config3.organization.icon) {
5243
+ process.env[`${prefix}ORG_ICON`] = config3.organization.icon;
5244
+ process.env[`${prefix}ORGANIZATION_ICON`] = config3.organization.icon;
3476
5245
  }
3477
5246
  }
3478
5247
  }
3479
- if (config2.packageManager) {
3480
- process.env[`${prefix}PACKAGE_MANAGER`] = config2.packageManager;
5248
+ if (config3.packageManager) {
5249
+ process.env[`${prefix}PACKAGE_MANAGER`] = config3.packageManager;
3481
5250
  }
3482
- if (config2.license) {
3483
- process.env[`${prefix}LICENSE`] = config2.license;
5251
+ if (config3.license) {
5252
+ process.env[`${prefix}LICENSE`] = config3.license;
3484
5253
  }
3485
- if (config2.homepage) {
3486
- process.env[`${prefix}HOMEPAGE`] = config2.homepage;
5254
+ if (config3.homepage) {
5255
+ process.env[`${prefix}HOMEPAGE`] = config3.homepage;
3487
5256
  }
3488
- if (config2.docs) {
3489
- process.env[`${prefix}DOCS`] = config2.docs;
5257
+ if (config3.docs) {
5258
+ process.env[`${prefix}DOCS`] = config3.docs;
3490
5259
  }
3491
- if (config2.portal) {
3492
- process.env[`${prefix}PORTAL`] = config2.portal;
5260
+ if (config3.portal) {
5261
+ process.env[`${prefix}PORTAL`] = config3.portal;
3493
5262
  }
3494
- if (config2.licensing) {
3495
- process.env[`${prefix}LICENSING`] = config2.licensing;
5263
+ if (config3.licensing) {
5264
+ process.env[`${prefix}LICENSING`] = config3.licensing;
3496
5265
  }
3497
- if (config2.contact) {
3498
- process.env[`${prefix}CONTACT`] = config2.contact;
5266
+ if (config3.contact) {
5267
+ process.env[`${prefix}CONTACT`] = config3.contact;
3499
5268
  }
3500
- if (config2.support) {
3501
- process.env[`${prefix}SUPPORT`] = config2.support;
5269
+ if (config3.support) {
5270
+ process.env[`${prefix}SUPPORT`] = config3.support;
3502
5271
  }
3503
- if (config2.timezone) {
3504
- process.env[`${prefix}TIMEZONE`] = config2.timezone;
3505
- process.env.TZ = config2.timezone;
3506
- process.env.DEFAULT_TIMEZONE = config2.timezone;
3507
- process.env.TIMEZONE = config2.timezone;
5272
+ if (config3.timezone) {
5273
+ process.env[`${prefix}TIMEZONE`] = config3.timezone;
5274
+ process.env.TZ = config3.timezone;
5275
+ process.env.DEFAULT_TIMEZONE = config3.timezone;
5276
+ process.env.TIMEZONE = config3.timezone;
3508
5277
  }
3509
- if (config2.locale) {
3510
- process.env[`${prefix}LOCALE`] = config2.locale;
3511
- process.env.DEFAULT_LOCALE = config2.locale;
3512
- process.env.LOCALE = config2.locale;
3513
- process.env.LANG = config2.locale ? `${config2.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
5278
+ if (config3.locale) {
5279
+ process.env[`${prefix}LOCALE`] = config3.locale;
5280
+ process.env.DEFAULT_LOCALE = config3.locale;
5281
+ process.env.LOCALE = config3.locale;
5282
+ process.env.LANG = config3.locale ? `${config3.locale.replaceAll("-", "_")}.UTF-8` : "en_US.UTF-8";
3514
5283
  }
3515
- if (config2.configFile) {
3516
- process.env[`${prefix}CONFIG_FILE`] = correctPaths(config2.configFile);
5284
+ if (config3.configFile) {
5285
+ process.env[`${prefix}CONFIG_FILE`] = correctPaths(config3.configFile);
3517
5286
  }
3518
- if (config2.workspaceRoot) {
3519
- process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config2.workspaceRoot);
3520
- process.env.NX_WORKSPACE_ROOT = correctPaths(config2.workspaceRoot);
3521
- process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config2.workspaceRoot);
5287
+ if (config3.workspaceRoot) {
5288
+ process.env[`${prefix}WORKSPACE_ROOT`] = correctPaths(config3.workspaceRoot);
5289
+ process.env.NX_WORKSPACE_ROOT = correctPaths(config3.workspaceRoot);
5290
+ process.env.NX_WORKSPACE_ROOT_PATH = correctPaths(config3.workspaceRoot);
3522
5291
  }
3523
- if (config2.directories) {
3524
- if (!config2.skipCache && config2.directories.cache) {
5292
+ if (config3.directories) {
5293
+ if (!config3.skipCache && config3.directories.cache) {
3525
5294
  process.env[`${prefix}CACHE_DIR`] = correctPaths(
3526
- config2.directories.cache
5295
+ config3.directories.cache
3527
5296
  );
3528
5297
  process.env[`${prefix}CACHE_DIRECTORY`] = process.env[`${prefix}CACHE_DIR`];
3529
5298
  }
3530
- if (config2.directories.data) {
3531
- process.env[`${prefix}DATA_DIR`] = correctPaths(config2.directories.data);
5299
+ if (config3.directories.data) {
5300
+ process.env[`${prefix}DATA_DIR`] = correctPaths(config3.directories.data);
3532
5301
  process.env[`${prefix}DATA_DIRECTORY`] = process.env[`${prefix}DATA_DIR`];
3533
5302
  }
3534
- if (config2.directories.config) {
5303
+ if (config3.directories.config) {
3535
5304
  process.env[`${prefix}CONFIG_DIR`] = correctPaths(
3536
- config2.directories.config
5305
+ config3.directories.config
3537
5306
  );
3538
5307
  process.env[`${prefix}CONFIG_DIRECTORY`] = process.env[`${prefix}CONFIG_DIR`];
3539
5308
  }
3540
- if (config2.directories.temp) {
3541
- process.env[`${prefix}TEMP_DIR`] = correctPaths(config2.directories.temp);
5309
+ if (config3.directories.temp) {
5310
+ process.env[`${prefix}TEMP_DIR`] = correctPaths(config3.directories.temp);
3542
5311
  process.env[`${prefix}TEMP_DIRECTORY`] = process.env[`${prefix}TEMP_DIR`];
3543
5312
  }
3544
- if (config2.directories.log) {
3545
- process.env[`${prefix}LOG_DIR`] = correctPaths(config2.directories.log);
5313
+ if (config3.directories.log) {
5314
+ process.env[`${prefix}LOG_DIR`] = correctPaths(config3.directories.log);
3546
5315
  process.env[`${prefix}LOG_DIRECTORY`] = process.env[`${prefix}LOG_DIR`];
3547
5316
  }
3548
- if (config2.directories.build) {
5317
+ if (config3.directories.build) {
3549
5318
  process.env[`${prefix}BUILD_DIR`] = correctPaths(
3550
- config2.directories.build
5319
+ config3.directories.build
3551
5320
  );
3552
5321
  process.env[`${prefix}BUILD_DIRECTORY`] = process.env[`${prefix}BUILD_DIR`];
3553
5322
  }
3554
5323
  }
3555
- if (config2.skipCache !== void 0) {
3556
- process.env[`${prefix}SKIP_CACHE`] = String(config2.skipCache);
3557
- if (config2.skipCache) {
3558
- process.env.NX_SKIP_NX_CACHE ??= String(config2.skipCache);
3559
- process.env.NX_CACHE_PROJECT_GRAPH ??= String(config2.skipCache);
5324
+ if (config3.skipCache !== void 0) {
5325
+ process.env[`${prefix}SKIP_CACHE`] = String(config3.skipCache);
5326
+ if (config3.skipCache) {
5327
+ process.env.NX_SKIP_NX_CACHE ??= String(config3.skipCache);
5328
+ process.env.NX_CACHE_PROJECT_GRAPH ??= String(config3.skipCache);
3560
5329
  }
3561
5330
  }
3562
- if (config2.mode) {
3563
- process.env[`${prefix}MODE`] = config2.mode;
3564
- process.env.NODE_ENV = config2.mode;
3565
- process.env.ENVIRONMENT = config2.mode;
5331
+ if (config3.mode) {
5332
+ process.env[`${prefix}MODE`] = config3.mode;
5333
+ process.env.NODE_ENV = config3.mode;
5334
+ process.env.ENVIRONMENT = config3.mode;
3566
5335
  }
3567
- if (config2.colors?.base?.light || config2.colors?.base?.dark) {
3568
- for (const key of Object.keys(config2.colors)) {
3569
- setThemeColorsEnv(`${prefix}COLOR_${key}_`, config2.colors[key]);
5336
+ if (config3.colors?.base?.light || config3.colors?.base?.dark) {
5337
+ for (const key of Object.keys(config3.colors)) {
5338
+ setThemeColorsEnv(`${prefix}COLOR_${key}_`, config3.colors[key]);
3570
5339
  }
3571
5340
  } else {
3572
5341
  setThemeColorsEnv(
3573
5342
  `${prefix}COLOR_`,
3574
- config2.colors
5343
+ config3.colors
3575
5344
  );
3576
5345
  }
3577
- if (config2.repository) {
3578
- process.env[`${prefix}REPOSITORY`] = config2.repository;
5346
+ if (config3.repository) {
5347
+ process.env[`${prefix}REPOSITORY`] = config3.repository;
3579
5348
  }
3580
- if (config2.branch) {
3581
- process.env[`${prefix}BRANCH`] = config2.branch;
5349
+ if (config3.branch) {
5350
+ process.env[`${prefix}BRANCH`] = config3.branch;
3582
5351
  }
3583
- if (config2.preid) {
3584
- process.env[`${prefix}PRE_ID`] = String(config2.preid);
5352
+ if (config3.preid) {
5353
+ process.env[`${prefix}PRE_ID`] = String(config3.preid);
3585
5354
  }
3586
- if (config2.registry) {
3587
- if (config2.registry.github) {
3588
- process.env[`${prefix}REGISTRY_GITHUB`] = String(config2.registry.github);
5355
+ if (config3.registry) {
5356
+ if (config3.registry.github) {
5357
+ process.env[`${prefix}REGISTRY_GITHUB`] = String(config3.registry.github);
3589
5358
  }
3590
- if (config2.registry.npm) {
3591
- process.env[`${prefix}REGISTRY_NPM`] = String(config2.registry.npm);
5359
+ if (config3.registry.npm) {
5360
+ process.env[`${prefix}REGISTRY_NPM`] = String(config3.registry.npm);
3592
5361
  }
3593
- if (config2.registry.cargo) {
3594
- process.env[`${prefix}REGISTRY_CARGO`] = String(config2.registry.cargo);
5362
+ if (config3.registry.cargo) {
5363
+ process.env[`${prefix}REGISTRY_CARGO`] = String(config3.registry.cargo);
3595
5364
  }
3596
- if (config2.registry.cyclone) {
5365
+ if (config3.registry.cyclone) {
3597
5366
  process.env[`${prefix}REGISTRY_CYCLONE`] = String(
3598
- config2.registry.cyclone
5367
+ config3.registry.cyclone
3599
5368
  );
3600
5369
  }
3601
- if (config2.registry.container) {
5370
+ if (config3.registry.container) {
3602
5371
  process.env[`${prefix}REGISTRY_CONTAINER`] = String(
3603
- config2.registry.container
5372
+ config3.registry.container
3604
5373
  );
3605
5374
  }
3606
5375
  }
3607
- if (config2.logLevel) {
3608
- process.env[`${prefix}LOG_LEVEL`] = String(config2.logLevel);
3609
- process.env.LOG_LEVEL = String(config2.logLevel);
5376
+ if (config3.logLevel) {
5377
+ process.env[`${prefix}LOG_LEVEL`] = String(config3.logLevel);
5378
+ process.env.LOG_LEVEL = String(config3.logLevel);
3610
5379
  process.env.NX_VERBOSE_LOGGING = String(
3611
- getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? true : false
5380
+ getLogLevel(config3.logLevel) >= LogLevel.DEBUG ? true : false
3612
5381
  );
3613
- process.env.RUST_BACKTRACE = getLogLevel(config2.logLevel) >= LogLevel.DEBUG ? "full" : "none";
5382
+ process.env.RUST_BACKTRACE = getLogLevel(config3.logLevel) >= LogLevel.DEBUG ? "full" : "none";
3614
5383
  }
3615
- if (config2.skipConfigLogging !== void 0) {
5384
+ if (config3.skipConfigLogging !== void 0) {
3616
5385
  process.env[`${prefix}SKIP_CONFIG_LOGGING`] = String(
3617
- config2.skipConfigLogging
5386
+ config3.skipConfigLogging
3618
5387
  );
3619
5388
  }
3620
- process.env[`${prefix}CONFIG`] = JSON.stringify(config2);
3621
- for (const key of Object.keys(config2.extensions ?? {})) {
3622
- if (config2.extensions[key] && Object.keys(config2.extensions[key])) {
3623
- setExtensionEnv(key, config2.extensions[key]);
5389
+ process.env[`${prefix}CONFIG`] = JSON.stringify(config3);
5390
+ for (const key of Object.keys(config3.extensions ?? {})) {
5391
+ if (config3.extensions[key] && Object.keys(config3.extensions[key])) {
5392
+ setExtensionEnv(key, config3.extensions[key]);
3624
5393
  }
3625
5394
  }
3626
5395
  };
3627
- var setThemeColorsEnv = (prefix, config2) => {
3628
- return config2?.light?.brand || config2?.dark?.brand ? setMultiThemeColorsEnv(prefix, config2) : setSingleThemeColorsEnv(prefix, config2);
5396
+ var setThemeColorsEnv = (prefix, config3) => {
5397
+ return config3?.light?.brand || config3?.dark?.brand ? setMultiThemeColorsEnv(prefix, config3) : setSingleThemeColorsEnv(prefix, config3);
3629
5398
  };
3630
- var setSingleThemeColorsEnv = (prefix, config2) => {
3631
- if (config2.dark) {
3632
- process.env[`${prefix}DARK`] = config2.dark;
5399
+ var setSingleThemeColorsEnv = (prefix, config3) => {
5400
+ if (config3.dark) {
5401
+ process.env[`${prefix}DARK`] = config3.dark;
3633
5402
  }
3634
- if (config2.light) {
3635
- process.env[`${prefix}LIGHT`] = config2.light;
5403
+ if (config3.light) {
5404
+ process.env[`${prefix}LIGHT`] = config3.light;
3636
5405
  }
3637
- if (config2.brand) {
3638
- process.env[`${prefix}BRAND`] = config2.brand;
5406
+ if (config3.brand) {
5407
+ process.env[`${prefix}BRAND`] = config3.brand;
3639
5408
  }
3640
- if (config2.alternate) {
3641
- process.env[`${prefix}ALTERNATE`] = config2.alternate;
5409
+ if (config3.alternate) {
5410
+ process.env[`${prefix}ALTERNATE`] = config3.alternate;
3642
5411
  }
3643
- if (config2.accent) {
3644
- process.env[`${prefix}ACCENT`] = config2.accent;
5412
+ if (config3.accent) {
5413
+ process.env[`${prefix}ACCENT`] = config3.accent;
3645
5414
  }
3646
- if (config2.link) {
3647
- process.env[`${prefix}LINK`] = config2.link;
5415
+ if (config3.link) {
5416
+ process.env[`${prefix}LINK`] = config3.link;
3648
5417
  }
3649
- if (config2.help) {
3650
- process.env[`${prefix}HELP`] = config2.help;
5418
+ if (config3.help) {
5419
+ process.env[`${prefix}HELP`] = config3.help;
3651
5420
  }
3652
- if (config2.success) {
3653
- process.env[`${prefix}SUCCESS`] = config2.success;
5421
+ if (config3.success) {
5422
+ process.env[`${prefix}SUCCESS`] = config3.success;
3654
5423
  }
3655
- if (config2.info) {
3656
- process.env[`${prefix}INFO`] = config2.info;
5424
+ if (config3.info) {
5425
+ process.env[`${prefix}INFO`] = config3.info;
3657
5426
  }
3658
- if (config2.warning) {
3659
- process.env[`${prefix}WARNING`] = config2.warning;
5427
+ if (config3.warning) {
5428
+ process.env[`${prefix}WARNING`] = config3.warning;
3660
5429
  }
3661
- if (config2.danger) {
3662
- process.env[`${prefix}DANGER`] = config2.danger;
5430
+ if (config3.danger) {
5431
+ process.env[`${prefix}DANGER`] = config3.danger;
3663
5432
  }
3664
- if (config2.fatal) {
3665
- process.env[`${prefix}FATAL`] = config2.fatal;
5433
+ if (config3.fatal) {
5434
+ process.env[`${prefix}FATAL`] = config3.fatal;
3666
5435
  }
3667
- if (config2.positive) {
3668
- process.env[`${prefix}POSITIVE`] = config2.positive;
5436
+ if (config3.positive) {
5437
+ process.env[`${prefix}POSITIVE`] = config3.positive;
3669
5438
  }
3670
- if (config2.negative) {
3671
- process.env[`${prefix}NEGATIVE`] = config2.negative;
5439
+ if (config3.negative) {
5440
+ process.env[`${prefix}NEGATIVE`] = config3.negative;
3672
5441
  }
3673
- if (config2.gradient) {
3674
- for (let i = 0; i < config2.gradient.length; i++) {
3675
- process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
5442
+ if (config3.gradient) {
5443
+ for (let i = 0; i < config3.gradient.length; i++) {
5444
+ process.env[`${prefix}GRADIENT_${i}`] = config3.gradient[i];
3676
5445
  }
3677
5446
  }
3678
5447
  };
3679
- var setMultiThemeColorsEnv = (prefix, config2) => {
5448
+ var setMultiThemeColorsEnv = (prefix, config3) => {
3680
5449
  return {
3681
- light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config2.light),
3682
- dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config2.dark)
5450
+ light: setBaseThemeColorsEnv(`${prefix}LIGHT_`, config3.light),
5451
+ dark: setBaseThemeColorsEnv(`${prefix}DARK_`, config3.dark)
3683
5452
  };
3684
5453
  };
3685
- var setBaseThemeColorsEnv = (prefix, config2) => {
3686
- if (config2.foreground) {
3687
- process.env[`${prefix}FOREGROUND`] = config2.foreground;
5454
+ var setBaseThemeColorsEnv = (prefix, config3) => {
5455
+ if (config3.foreground) {
5456
+ process.env[`${prefix}FOREGROUND`] = config3.foreground;
3688
5457
  }
3689
- if (config2.background) {
3690
- process.env[`${prefix}BACKGROUND`] = config2.background;
5458
+ if (config3.background) {
5459
+ process.env[`${prefix}BACKGROUND`] = config3.background;
3691
5460
  }
3692
- if (config2.brand) {
3693
- process.env[`${prefix}BRAND`] = config2.brand;
5461
+ if (config3.brand) {
5462
+ process.env[`${prefix}BRAND`] = config3.brand;
3694
5463
  }
3695
- if (config2.alternate) {
3696
- process.env[`${prefix}ALTERNATE`] = config2.alternate;
5464
+ if (config3.alternate) {
5465
+ process.env[`${prefix}ALTERNATE`] = config3.alternate;
3697
5466
  }
3698
- if (config2.accent) {
3699
- process.env[`${prefix}ACCENT`] = config2.accent;
5467
+ if (config3.accent) {
5468
+ process.env[`${prefix}ACCENT`] = config3.accent;
3700
5469
  }
3701
- if (config2.link) {
3702
- process.env[`${prefix}LINK`] = config2.link;
5470
+ if (config3.link) {
5471
+ process.env[`${prefix}LINK`] = config3.link;
3703
5472
  }
3704
- if (config2.help) {
3705
- process.env[`${prefix}HELP`] = config2.help;
5473
+ if (config3.help) {
5474
+ process.env[`${prefix}HELP`] = config3.help;
3706
5475
  }
3707
- if (config2.success) {
3708
- process.env[`${prefix}SUCCESS`] = config2.success;
5476
+ if (config3.success) {
5477
+ process.env[`${prefix}SUCCESS`] = config3.success;
3709
5478
  }
3710
- if (config2.info) {
3711
- process.env[`${prefix}INFO`] = config2.info;
5479
+ if (config3.info) {
5480
+ process.env[`${prefix}INFO`] = config3.info;
3712
5481
  }
3713
- if (config2.warning) {
3714
- process.env[`${prefix}WARNING`] = config2.warning;
5482
+ if (config3.warning) {
5483
+ process.env[`${prefix}WARNING`] = config3.warning;
3715
5484
  }
3716
- if (config2.danger) {
3717
- process.env[`${prefix}DANGER`] = config2.danger;
5485
+ if (config3.danger) {
5486
+ process.env[`${prefix}DANGER`] = config3.danger;
3718
5487
  }
3719
- if (config2.fatal) {
3720
- process.env[`${prefix}FATAL`] = config2.fatal;
5488
+ if (config3.fatal) {
5489
+ process.env[`${prefix}FATAL`] = config3.fatal;
3721
5490
  }
3722
- if (config2.positive) {
3723
- process.env[`${prefix}POSITIVE`] = config2.positive;
5491
+ if (config3.positive) {
5492
+ process.env[`${prefix}POSITIVE`] = config3.positive;
3724
5493
  }
3725
- if (config2.negative) {
3726
- process.env[`${prefix}NEGATIVE`] = config2.negative;
5494
+ if (config3.negative) {
5495
+ process.env[`${prefix}NEGATIVE`] = config3.negative;
3727
5496
  }
3728
- if (config2.gradient) {
3729
- for (let i = 0; i < config2.gradient.length; i++) {
3730
- process.env[`${prefix}GRADIENT_${i}`] = config2.gradient[i];
5497
+ if (config3.gradient) {
5498
+ for (let i = 0; i < config3.gradient.length; i++) {
5499
+ process.env[`${prefix}GRADIENT_${i}`] = config3.gradient[i];
3731
5500
  }
3732
5501
  }
3733
5502
  };
@@ -3807,25 +5576,25 @@ var createConfigExtension = (extensionName, schema) => {
3807
5576
  };
3808
5577
  var tryLoadStormWorkspaceConfig = async (workspaceRoot, skipLogs = true, useDefault = false) => {
3809
5578
  try {
3810
- const config2 = await createStormWorkspaceConfig(
5579
+ const config3 = await createStormWorkspaceConfig(
3811
5580
  void 0,
3812
5581
  void 0,
3813
5582
  workspaceRoot,
3814
5583
  skipLogs,
3815
5584
  useDefault
3816
5585
  );
3817
- if (!config2) {
5586
+ if (!config3) {
3818
5587
  return void 0;
3819
5588
  }
3820
- setConfigEnv(config2);
3821
- if (!skipLogs && !config2.skipConfigLogging) {
5589
+ setConfigEnv(config3);
5590
+ if (!skipLogs && !config3.skipConfigLogging) {
3822
5591
  writeTrace(
3823
5592
  `\u2699\uFE0F Using Storm Workspace configuration:
3824
- ${formatLogMessage(config2)}`,
3825
- config2
5593
+ ${formatLogMessage(config3)}`,
5594
+ config3
3826
5595
  );
3827
5596
  }
3828
- return config2;
5597
+ return config3;
3829
5598
  } catch (error) {
3830
5599
  if (!skipLogs) {
3831
5600
  writeWarning(
@@ -3906,7 +5675,7 @@ async function javascript(options = {}) {
3906
5675
  {
3907
5676
  name: "storm/javascript/rules",
3908
5677
  plugins: {
3909
- "unused-imports": default9
5678
+ "unused-imports": default10
3910
5679
  },
3911
5680
  rules: {
3912
5681
  // disallow use of console
@@ -5211,7 +6980,7 @@ async function node() {
5211
6980
  {
5212
6981
  name: "storm/node/rules",
5213
6982
  plugins: {
5214
- node: default4
6983
+ node: default5
5215
6984
  },
5216
6985
  rules: {
5217
6986
  "node/handle-callback-err": ["error", "^(err|error)$"],
@@ -5302,7 +7071,7 @@ async function perfectionist() {
5302
7071
  {
5303
7072
  name: "storm/perfectionist/rules",
5304
7073
  plugins: {
5305
- perfectionist: default6
7074
+ perfectionist: default7
5306
7075
  },
5307
7076
  rules: {
5308
7077
  "perfectionist/sort-exports": [
@@ -5452,18 +7221,18 @@ async function pnpm(options = {}) {
5452
7221
 
5453
7222
  // src/configs/prettier.ts
5454
7223
  init_esm_shims();
5455
- import config from "eslint-config-prettier";
7224
+ import config2 from "eslint-config-prettier";
5456
7225
  async function prettier() {
5457
7226
  return [
5458
7227
  {
5459
- ...config,
7228
+ ...config2,
5460
7229
  name: "storm/prettier/rules",
5461
7230
  plugins: {
5462
- ...config.plugins,
5463
- prettier: default7
7231
+ ...config2.plugins,
7232
+ prettier: default8
5464
7233
  },
5465
7234
  rules: {
5466
- ...config.rules,
7235
+ ...config2.rules,
5467
7236
  "prettier/prettier": "error",
5468
7237
  "arrow-body-style": "off",
5469
7238
  "prefer-arrow-callback": "off"
@@ -5674,9 +7443,9 @@ async function reactNative(options = {}) {
5674
7443
  init_esm_shims();
5675
7444
  import { configs as configs2 } from "eslint-plugin-regexp";
5676
7445
  async function regexp(options = {}) {
5677
- const config2 = configs2["flat/recommended"];
7446
+ const config3 = configs2["flat/recommended"];
5678
7447
  const rules2 = {
5679
- ...config2.rules
7448
+ ...config3.rules
5680
7449
  };
5681
7450
  if (options.level === "warn") {
5682
7451
  for (const key in rules2) {
@@ -5685,7 +7454,7 @@ async function regexp(options = {}) {
5685
7454
  }
5686
7455
  return [
5687
7456
  {
5688
- ...config2,
7457
+ ...config3,
5689
7458
  name: "storm/regexp/rules",
5690
7459
  rules: {
5691
7460
  ...rules2,
@@ -5714,7 +7483,7 @@ async function secrets(options) {
5714
7483
  name: "storm/secrets/rules",
5715
7484
  files: [`**/*.{js,ts,jsx,tsx${json ? ",json,jsonc" : ""}`],
5716
7485
  plugins: {
5717
- "no-secrets": default5
7486
+ "no-secrets": default6
5718
7487
  },
5719
7488
  rules: {
5720
7489
  "no-secrets/no-secrets": [
@@ -6412,10 +8181,10 @@ async function unicorn(options = {}) {
6412
8181
  {
6413
8182
  name: "storm/unicorn/rules",
6414
8183
  plugins: {
6415
- unicorn: default8
8184
+ unicorn: default9
6416
8185
  },
6417
8186
  rules: {
6418
- ...options.allRecommended ? default8.configs["recommended"].rules : {
8187
+ ...options.allRecommended ? default9.configs["recommended"].rules : {
6419
8188
  "unicorn/consistent-empty-array-spread": "error",
6420
8189
  "unicorn/error-message": "error",
6421
8190
  "unicorn/escape-case": "error",
@@ -6542,6 +8311,26 @@ async function yaml(options = {}) {
6542
8311
  ];
6543
8312
  }
6544
8313
 
8314
+ // src/configs/zod.ts
8315
+ init_esm_shims();
8316
+ async function zod(options = {}) {
8317
+ const { overrides = {} } = options;
8318
+ await ensurePackages(["eslint-plugin-import-zod"]);
8319
+ return [
8320
+ {
8321
+ name: "storm/zod/rules",
8322
+ files: [GLOB_SRC],
8323
+ plugins: {
8324
+ "import-zod": default4
8325
+ },
8326
+ rules: {
8327
+ "import-zod/prefer-zod-namespace": "error"
8328
+ },
8329
+ ...overrides
8330
+ }
8331
+ ];
8332
+ }
8333
+
6545
8334
  // src/preset.ts
6546
8335
  var flatConfigProps = [
6547
8336
  "name",
@@ -6591,7 +8380,8 @@ function getStormConfig(options, ...userConfigs) {
6591
8380
  typescript: enableTypeScript = isPackageExists2("typescript"),
6592
8381
  unicorn: enableUnicorn = true,
6593
8382
  tsdoc: enableTSDoc = true,
6594
- unocss: enableUnoCSS = false
8383
+ unocss: enableUnoCSS = false,
8384
+ zod: enableZod = true
6595
8385
  } = options;
6596
8386
  let isInEditor = options.isInEditor;
6597
8387
  if (isInEditor == null) {
@@ -6681,6 +8471,13 @@ function getStormConfig(options, ...userConfigs) {
6681
8471
  })
6682
8472
  );
6683
8473
  }
8474
+ if (enableZod) {
8475
+ configs3.push(
8476
+ zod({
8477
+ overrides: getOverrides(options, "zod")
8478
+ })
8479
+ );
8480
+ }
6684
8481
  if (stylisticOptions) {
6685
8482
  configs3.push(
6686
8483
  stylistic({