@base44-preview/cli 0.0.9-pr.74.f76e562 → 0.0.9-pr.75.1247e76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli/index.js +951 -923
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -2,22 +2,22 @@
2
2
  import { createRequire } from "node:module";
3
3
  import { EventEmitter, addAbortListener, on, once, setMaxListeners } from "node:events";
4
4
  import { ChildProcess, execFile, spawn, spawnSync } from "node:child_process";
5
- import path, { basename, dirname, join, posix, resolve, win32 } from "node:path";
5
+ import nodePath, { basename, dirname, join, posix, resolve, win32 } from "node:path";
6
6
  import fs, { appendFileSync, createReadStream, createWriteStream, readFileSync, statSync, writeFileSync } from "node:fs";
7
7
  import y, { execArgv, execPath, hrtime, platform, stdin, stdout } from "node:process";
8
+ import os, { constants, homedir, tmpdir } from "node:os";
9
+ import tty from "node:tty";
8
10
  import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
9
11
  import * as g from "node:readline";
10
12
  import O from "node:readline";
11
13
  import Stream, { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
12
- import os, { constants, homedir, tmpdir } from "node:os";
13
14
  import { fileURLToPath } from "node:url";
14
15
  import fs$1 from "fs";
15
- import path$1, { dirname as dirname$1, parse } from "path";
16
+ import path, { dirname as dirname$1, parse } from "path";
16
17
  import { finished } from "node:stream/promises";
17
18
  import EE, { EventEmitter as EventEmitter$1 } from "events";
18
19
  import fsPromises, { access, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
19
20
  import { Buffer as Buffer$1 } from "buffer";
20
- import tty from "node:tty";
21
21
  import { randomBytes, randomUUID } from "node:crypto";
22
22
  import { StringDecoder } from "node:string_decoder";
23
23
  import assert from "assert";
@@ -892,7 +892,7 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
892
892
  var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
893
893
  const EventEmitter$2 = __require("node:events").EventEmitter;
894
894
  const childProcess = __require("node:child_process");
895
- const path$16 = __require("node:path");
895
+ const path$15 = __require("node:path");
896
896
  const fs$10 = __require("node:fs");
897
897
  const process$3 = __require("node:process");
898
898
  const { Argument, humanReadableArgName } = require_argument();
@@ -1740,9 +1740,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
1740
1740
  ".cjs"
1741
1741
  ];
1742
1742
  function findFile(baseDir, baseName) {
1743
- const localBin = path$16.resolve(baseDir, baseName);
1743
+ const localBin = path$15.resolve(baseDir, baseName);
1744
1744
  if (fs$10.existsSync(localBin)) return localBin;
1745
- if (sourceExt.includes(path$16.extname(baseName))) return void 0;
1745
+ if (sourceExt.includes(path$15.extname(baseName))) return void 0;
1746
1746
  const foundExt = sourceExt.find((ext) => fs$10.existsSync(`${localBin}${ext}`));
1747
1747
  if (foundExt) return `${localBin}${foundExt}`;
1748
1748
  }
@@ -1757,17 +1757,17 @@ Expecting one of '${allowedValues.join("', '")}'`);
1757
1757
  } catch (err) {
1758
1758
  resolvedScriptPath = this._scriptPath;
1759
1759
  }
1760
- executableDir = path$16.resolve(path$16.dirname(resolvedScriptPath), executableDir);
1760
+ executableDir = path$15.resolve(path$15.dirname(resolvedScriptPath), executableDir);
1761
1761
  }
1762
1762
  if (executableDir) {
1763
1763
  let localFile = findFile(executableDir, executableFile);
1764
1764
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1765
- const legacyName = path$16.basename(this._scriptPath, path$16.extname(this._scriptPath));
1765
+ const legacyName = path$15.basename(this._scriptPath, path$15.extname(this._scriptPath));
1766
1766
  if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
1767
1767
  }
1768
1768
  executableFile = localFile || executableFile;
1769
1769
  }
1770
- launchWithNode = sourceExt.includes(path$16.extname(executableFile));
1770
+ launchWithNode = sourceExt.includes(path$15.extname(executableFile));
1771
1771
  let proc$1;
1772
1772
  if (process$3.platform !== "win32") if (launchWithNode) {
1773
1773
  args.unshift(executableFile);
@@ -2473,7 +2473,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2473
2473
  * @return {Command}
2474
2474
  */
2475
2475
  nameFromFilename(filename) {
2476
- this._name = path$16.basename(filename, path$16.extname(filename));
2476
+ this._name = path$15.basename(filename, path$15.extname(filename));
2477
2477
  return this;
2478
2478
  }
2479
2479
  /**
@@ -2487,9 +2487,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2487
2487
  * @param {string} [path]
2488
2488
  * @return {(string|null|Command)}
2489
2489
  */
2490
- executableDir(path$17) {
2491
- if (path$17 === void 0) return this._executableDir;
2492
- this._executableDir = path$17;
2490
+ executableDir(path$16) {
2491
+ if (path$16 === void 0) return this._executableDir;
2492
+ this._executableDir = path$16;
2493
2493
  return this;
2494
2494
  }
2495
2495
  /**
@@ -2705,6 +2705,415 @@ var require_commander = /* @__PURE__ */ __commonJSMin(((exports) => {
2705
2705
  var import_commander = /* @__PURE__ */ __toESM(require_commander(), 1);
2706
2706
  const { program: program$1, createCommand: createCommand$1, createArgument, createOption, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Command, Argument, Option, Help } = import_commander.default;
2707
2707
 
2708
+ //#endregion
2709
+ //#region node_modules/chalk/source/vendor/ansi-styles/index.js
2710
+ const ANSI_BACKGROUND_OFFSET = 10;
2711
+ const wrapAnsi16 = (offset = 0) => (code$1) => `\u001B[${code$1 + offset}m`;
2712
+ const wrapAnsi256 = (offset = 0) => (code$1) => `\u001B[${38 + offset};5;${code$1}m`;
2713
+ const wrapAnsi16m = (offset = 0) => (red$1, green$1, blue$1) => `\u001B[${38 + offset};2;${red$1};${green$1};${blue$1}m`;
2714
+ const styles$1 = {
2715
+ modifier: {
2716
+ reset: [0, 0],
2717
+ bold: [1, 22],
2718
+ dim: [2, 22],
2719
+ italic: [3, 23],
2720
+ underline: [4, 24],
2721
+ overline: [53, 55],
2722
+ inverse: [7, 27],
2723
+ hidden: [8, 28],
2724
+ strikethrough: [9, 29]
2725
+ },
2726
+ color: {
2727
+ black: [30, 39],
2728
+ red: [31, 39],
2729
+ green: [32, 39],
2730
+ yellow: [33, 39],
2731
+ blue: [34, 39],
2732
+ magenta: [35, 39],
2733
+ cyan: [36, 39],
2734
+ white: [37, 39],
2735
+ blackBright: [90, 39],
2736
+ gray: [90, 39],
2737
+ grey: [90, 39],
2738
+ redBright: [91, 39],
2739
+ greenBright: [92, 39],
2740
+ yellowBright: [93, 39],
2741
+ blueBright: [94, 39],
2742
+ magentaBright: [95, 39],
2743
+ cyanBright: [96, 39],
2744
+ whiteBright: [97, 39]
2745
+ },
2746
+ bgColor: {
2747
+ bgBlack: [40, 49],
2748
+ bgRed: [41, 49],
2749
+ bgGreen: [42, 49],
2750
+ bgYellow: [43, 49],
2751
+ bgBlue: [44, 49],
2752
+ bgMagenta: [45, 49],
2753
+ bgCyan: [46, 49],
2754
+ bgWhite: [47, 49],
2755
+ bgBlackBright: [100, 49],
2756
+ bgGray: [100, 49],
2757
+ bgGrey: [100, 49],
2758
+ bgRedBright: [101, 49],
2759
+ bgGreenBright: [102, 49],
2760
+ bgYellowBright: [103, 49],
2761
+ bgBlueBright: [104, 49],
2762
+ bgMagentaBright: [105, 49],
2763
+ bgCyanBright: [106, 49],
2764
+ bgWhiteBright: [107, 49]
2765
+ }
2766
+ };
2767
+ const modifierNames = Object.keys(styles$1.modifier);
2768
+ const foregroundColorNames = Object.keys(styles$1.color);
2769
+ const backgroundColorNames = Object.keys(styles$1.bgColor);
2770
+ const colorNames = [...foregroundColorNames, ...backgroundColorNames];
2771
+ function assembleStyles() {
2772
+ const codes = /* @__PURE__ */ new Map();
2773
+ for (const [groupName, group] of Object.entries(styles$1)) {
2774
+ for (const [styleName, style] of Object.entries(group)) {
2775
+ styles$1[styleName] = {
2776
+ open: `\u001B[${style[0]}m`,
2777
+ close: `\u001B[${style[1]}m`
2778
+ };
2779
+ group[styleName] = styles$1[styleName];
2780
+ codes.set(style[0], style[1]);
2781
+ }
2782
+ Object.defineProperty(styles$1, groupName, {
2783
+ value: group,
2784
+ enumerable: false
2785
+ });
2786
+ }
2787
+ Object.defineProperty(styles$1, "codes", {
2788
+ value: codes,
2789
+ enumerable: false
2790
+ });
2791
+ styles$1.color.close = "\x1B[39m";
2792
+ styles$1.bgColor.close = "\x1B[49m";
2793
+ styles$1.color.ansi = wrapAnsi16();
2794
+ styles$1.color.ansi256 = wrapAnsi256();
2795
+ styles$1.color.ansi16m = wrapAnsi16m();
2796
+ styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
2797
+ styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
2798
+ styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
2799
+ Object.defineProperties(styles$1, {
2800
+ rgbToAnsi256: {
2801
+ value(red$1, green$1, blue$1) {
2802
+ if (red$1 === green$1 && green$1 === blue$1) {
2803
+ if (red$1 < 8) return 16;
2804
+ if (red$1 > 248) return 231;
2805
+ return Math.round((red$1 - 8) / 247 * 24) + 232;
2806
+ }
2807
+ return 16 + 36 * Math.round(red$1 / 255 * 5) + 6 * Math.round(green$1 / 255 * 5) + Math.round(blue$1 / 255 * 5);
2808
+ },
2809
+ enumerable: false
2810
+ },
2811
+ hexToRgb: {
2812
+ value(hex) {
2813
+ const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
2814
+ if (!matches) return [
2815
+ 0,
2816
+ 0,
2817
+ 0
2818
+ ];
2819
+ let [colorString] = matches;
2820
+ if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
2821
+ const integer$1 = Number.parseInt(colorString, 16);
2822
+ return [
2823
+ integer$1 >> 16 & 255,
2824
+ integer$1 >> 8 & 255,
2825
+ integer$1 & 255
2826
+ ];
2827
+ },
2828
+ enumerable: false
2829
+ },
2830
+ hexToAnsi256: {
2831
+ value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
2832
+ enumerable: false
2833
+ },
2834
+ ansi256ToAnsi: {
2835
+ value(code$1) {
2836
+ if (code$1 < 8) return 30 + code$1;
2837
+ if (code$1 < 16) return 90 + (code$1 - 8);
2838
+ let red$1;
2839
+ let green$1;
2840
+ let blue$1;
2841
+ if (code$1 >= 232) {
2842
+ red$1 = ((code$1 - 232) * 10 + 8) / 255;
2843
+ green$1 = red$1;
2844
+ blue$1 = red$1;
2845
+ } else {
2846
+ code$1 -= 16;
2847
+ const remainder = code$1 % 36;
2848
+ red$1 = Math.floor(code$1 / 36) / 5;
2849
+ green$1 = Math.floor(remainder / 6) / 5;
2850
+ blue$1 = remainder % 6 / 5;
2851
+ }
2852
+ const value = Math.max(red$1, green$1, blue$1) * 2;
2853
+ if (value === 0) return 30;
2854
+ let result = 30 + (Math.round(blue$1) << 2 | Math.round(green$1) << 1 | Math.round(red$1));
2855
+ if (value === 2) result += 60;
2856
+ return result;
2857
+ },
2858
+ enumerable: false
2859
+ },
2860
+ rgbToAnsi: {
2861
+ value: (red$1, green$1, blue$1) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red$1, green$1, blue$1)),
2862
+ enumerable: false
2863
+ },
2864
+ hexToAnsi: {
2865
+ value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
2866
+ enumerable: false
2867
+ }
2868
+ });
2869
+ return styles$1;
2870
+ }
2871
+ const ansiStyles = assembleStyles();
2872
+ var ansi_styles_default = ansiStyles;
2873
+
2874
+ //#endregion
2875
+ //#region node_modules/chalk/source/vendor/supports-color/index.js
2876
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
2877
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
2878
+ const position = argv.indexOf(prefix + flag);
2879
+ const terminatorPosition = argv.indexOf("--");
2880
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
2881
+ }
2882
+ const { env } = y;
2883
+ let flagForceColor;
2884
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
2885
+ else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
2886
+ function envForceColor() {
2887
+ if ("FORCE_COLOR" in env) {
2888
+ if (env.FORCE_COLOR === "true") return 1;
2889
+ if (env.FORCE_COLOR === "false") return 0;
2890
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
2891
+ }
2892
+ }
2893
+ function translateLevel(level) {
2894
+ if (level === 0) return false;
2895
+ return {
2896
+ level,
2897
+ hasBasic: true,
2898
+ has256: level >= 2,
2899
+ has16m: level >= 3
2900
+ };
2901
+ }
2902
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
2903
+ const noFlagForceColor = envForceColor();
2904
+ if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
2905
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
2906
+ if (forceColor === 0) return 0;
2907
+ if (sniffFlags) {
2908
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
2909
+ if (hasFlag("color=256")) return 2;
2910
+ }
2911
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
2912
+ if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
2913
+ const min = forceColor || 0;
2914
+ if (env.TERM === "dumb") return min;
2915
+ if (y.platform === "win32") {
2916
+ const osRelease = os.release().split(".");
2917
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
2918
+ return 1;
2919
+ }
2920
+ if ("CI" in env) {
2921
+ if ([
2922
+ "GITHUB_ACTIONS",
2923
+ "GITEA_ACTIONS",
2924
+ "CIRCLECI"
2925
+ ].some((key) => key in env)) return 3;
2926
+ if ([
2927
+ "TRAVIS",
2928
+ "APPVEYOR",
2929
+ "GITLAB_CI",
2930
+ "BUILDKITE",
2931
+ "DRONE"
2932
+ ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
2933
+ return min;
2934
+ }
2935
+ if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
2936
+ if (env.COLORTERM === "truecolor") return 3;
2937
+ if (env.TERM === "xterm-kitty") return 3;
2938
+ if (env.TERM === "xterm-ghostty") return 3;
2939
+ if (env.TERM === "wezterm") return 3;
2940
+ if ("TERM_PROGRAM" in env) {
2941
+ const version$2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
2942
+ switch (env.TERM_PROGRAM) {
2943
+ case "iTerm.app": return version$2 >= 3 ? 3 : 2;
2944
+ case "Apple_Terminal": return 2;
2945
+ }
2946
+ }
2947
+ if (/-256(color)?$/i.test(env.TERM)) return 2;
2948
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
2949
+ if ("COLORTERM" in env) return 1;
2950
+ return min;
2951
+ }
2952
+ function createSupportsColor(stream, options = {}) {
2953
+ return translateLevel(_supportsColor(stream, {
2954
+ streamIsTTY: stream && stream.isTTY,
2955
+ ...options
2956
+ }));
2957
+ }
2958
+ const supportsColor = {
2959
+ stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
2960
+ stderr: createSupportsColor({ isTTY: tty.isatty(2) })
2961
+ };
2962
+ var supports_color_default = supportsColor;
2963
+
2964
+ //#endregion
2965
+ //#region node_modules/chalk/source/utilities.js
2966
+ function stringReplaceAll(string$2, substring, replacer) {
2967
+ let index = string$2.indexOf(substring);
2968
+ if (index === -1) return string$2;
2969
+ const substringLength = substring.length;
2970
+ let endIndex = 0;
2971
+ let returnValue = "";
2972
+ do {
2973
+ returnValue += string$2.slice(endIndex, index) + substring + replacer;
2974
+ endIndex = index + substringLength;
2975
+ index = string$2.indexOf(substring, endIndex);
2976
+ } while (index !== -1);
2977
+ returnValue += string$2.slice(endIndex);
2978
+ return returnValue;
2979
+ }
2980
+ function stringEncaseCRLFWithFirstIndex(string$2, prefix, postfix, index) {
2981
+ let endIndex = 0;
2982
+ let returnValue = "";
2983
+ do {
2984
+ const gotCR = string$2[index - 1] === "\r";
2985
+ returnValue += string$2.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
2986
+ endIndex = index + 1;
2987
+ index = string$2.indexOf("\n", endIndex);
2988
+ } while (index !== -1);
2989
+ returnValue += string$2.slice(endIndex);
2990
+ return returnValue;
2991
+ }
2992
+
2993
+ //#endregion
2994
+ //#region node_modules/chalk/source/index.js
2995
+ const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
2996
+ const GENERATOR = Symbol("GENERATOR");
2997
+ const STYLER = Symbol("STYLER");
2998
+ const IS_EMPTY = Symbol("IS_EMPTY");
2999
+ const levelMapping = [
3000
+ "ansi",
3001
+ "ansi",
3002
+ "ansi256",
3003
+ "ansi16m"
3004
+ ];
3005
+ const styles = Object.create(null);
3006
+ const applyOptions = (object$1, options = {}) => {
3007
+ if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
3008
+ const colorLevel = stdoutColor ? stdoutColor.level : 0;
3009
+ object$1.level = options.level === void 0 ? colorLevel : options.level;
3010
+ };
3011
+ const chalkFactory = (options) => {
3012
+ const chalk$1 = (...strings) => strings.join(" ");
3013
+ applyOptions(chalk$1, options);
3014
+ Object.setPrototypeOf(chalk$1, createChalk.prototype);
3015
+ return chalk$1;
3016
+ };
3017
+ function createChalk(options) {
3018
+ return chalkFactory(options);
3019
+ }
3020
+ Object.setPrototypeOf(createChalk.prototype, Function.prototype);
3021
+ for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
3022
+ const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
3023
+ Object.defineProperty(this, styleName, { value: builder });
3024
+ return builder;
3025
+ } };
3026
+ styles.visible = { get() {
3027
+ const builder = createBuilder(this, this[STYLER], true);
3028
+ Object.defineProperty(this, "visible", { value: builder });
3029
+ return builder;
3030
+ } };
3031
+ const getModelAnsi = (model, level, type, ...arguments_) => {
3032
+ if (model === "rgb") {
3033
+ if (level === "ansi16m") return ansi_styles_default[type].ansi16m(...arguments_);
3034
+ if (level === "ansi256") return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
3035
+ return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
3036
+ }
3037
+ if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
3038
+ return ansi_styles_default[type][model](...arguments_);
3039
+ };
3040
+ for (const model of [
3041
+ "rgb",
3042
+ "hex",
3043
+ "ansi256"
3044
+ ]) {
3045
+ styles[model] = { get() {
3046
+ const { level } = this;
3047
+ return function(...arguments_) {
3048
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
3049
+ return createBuilder(this, styler, this[IS_EMPTY]);
3050
+ };
3051
+ } };
3052
+ const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
3053
+ styles[bgModel] = { get() {
3054
+ const { level } = this;
3055
+ return function(...arguments_) {
3056
+ const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
3057
+ return createBuilder(this, styler, this[IS_EMPTY]);
3058
+ };
3059
+ } };
3060
+ }
3061
+ const proto = Object.defineProperties(() => {}, {
3062
+ ...styles,
3063
+ level: {
3064
+ enumerable: true,
3065
+ get() {
3066
+ return this[GENERATOR].level;
3067
+ },
3068
+ set(level) {
3069
+ this[GENERATOR].level = level;
3070
+ }
3071
+ }
3072
+ });
3073
+ const createStyler = (open, close, parent) => {
3074
+ let openAll;
3075
+ let closeAll;
3076
+ if (parent === void 0) {
3077
+ openAll = open;
3078
+ closeAll = close;
3079
+ } else {
3080
+ openAll = parent.openAll + open;
3081
+ closeAll = close + parent.closeAll;
3082
+ }
3083
+ return {
3084
+ open,
3085
+ close,
3086
+ openAll,
3087
+ closeAll,
3088
+ parent
3089
+ };
3090
+ };
3091
+ const createBuilder = (self$1, _styler, _isEmpty) => {
3092
+ const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
3093
+ Object.setPrototypeOf(builder, proto);
3094
+ builder[GENERATOR] = self$1;
3095
+ builder[STYLER] = _styler;
3096
+ builder[IS_EMPTY] = _isEmpty;
3097
+ return builder;
3098
+ };
3099
+ const applyStyle = (self$1, string$2) => {
3100
+ if (self$1.level <= 0 || !string$2) return self$1[IS_EMPTY] ? "" : string$2;
3101
+ let styler = self$1[STYLER];
3102
+ if (styler === void 0) return string$2;
3103
+ const { openAll, closeAll } = styler;
3104
+ if (string$2.includes("\x1B")) while (styler !== void 0) {
3105
+ string$2 = stringReplaceAll(string$2, styler.close, styler.open);
3106
+ styler = styler.parent;
3107
+ }
3108
+ const lfIndex = string$2.indexOf("\n");
3109
+ if (lfIndex !== -1) string$2 = stringEncaseCRLFWithFirstIndex(string$2, closeAll, openAll, lfIndex);
3110
+ return openAll + string$2 + closeAll;
3111
+ };
3112
+ Object.defineProperties(createChalk.prototype, styles);
3113
+ const chalk = createChalk();
3114
+ const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
3115
+ var source_default = chalk;
3116
+
2708
3117
  //#endregion
2709
3118
  //#region node_modules/sisteransi/src/index.js
2710
3119
  var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -4292,11 +4701,11 @@ function aborted$1(x$2, startIndex = 0) {
4292
4701
  for (let i$1 = startIndex; i$1 < x$2.issues.length; i$1++) if (x$2.issues[i$1]?.continue !== true) return true;
4293
4702
  return false;
4294
4703
  }
4295
- function prefixIssues(path$17, issues) {
4704
+ function prefixIssues(path$16, issues) {
4296
4705
  return issues.map((iss) => {
4297
4706
  var _a$1;
4298
4707
  (_a$1 = iss).path ?? (_a$1.path = []);
4299
- iss.path.unshift(path$17);
4708
+ iss.path.unshift(path$16);
4300
4709
  return iss;
4301
4710
  });
4302
4711
  }
@@ -4547,7 +4956,6 @@ const string$1 = (params) => {
4547
4956
  };
4548
4957
  const integer = /^-?\d+$/;
4549
4958
  const number$1 = /^-?\d+(?:\.\d+)?$/;
4550
- const boolean$1 = /^(?:true|false)$/i;
4551
4959
  const lowercase = /^[^A-Z]*$/;
4552
4960
  const uppercase = /^[^a-z]*$/;
4553
4961
 
@@ -5326,24 +5734,6 @@ const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst,
5326
5734
  $ZodCheckNumberFormat.init(inst, def);
5327
5735
  $ZodNumber.init(inst, def);
5328
5736
  });
5329
- const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
5330
- $ZodType.init(inst, def);
5331
- inst._zod.pattern = boolean$1;
5332
- inst._zod.parse = (payload, _ctx) => {
5333
- if (def.coerce) try {
5334
- payload.value = Boolean(payload.value);
5335
- } catch (_$2) {}
5336
- const input = payload.value;
5337
- if (typeof input === "boolean") return payload;
5338
- payload.issues.push({
5339
- expected: "boolean",
5340
- code: "invalid_type",
5341
- input,
5342
- inst
5343
- });
5344
- return payload;
5345
- };
5346
- });
5347
5737
  const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
5348
5738
  $ZodType.init(inst, def);
5349
5739
  inst._zod.parse = (payload) => payload;
@@ -5649,61 +6039,6 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
5649
6039
  });
5650
6040
  };
5651
6041
  });
5652
- const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
5653
- def.inclusive = false;
5654
- $ZodUnion.init(inst, def);
5655
- const _super = inst._zod.parse;
5656
- defineLazy(inst._zod, "propValues", () => {
5657
- const propValues = {};
5658
- for (const option of def.options) {
5659
- const pv = option._zod.propValues;
5660
- if (!pv || Object.keys(pv).length === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
5661
- for (const [k$2, v$1] of Object.entries(pv)) {
5662
- if (!propValues[k$2]) propValues[k$2] = /* @__PURE__ */ new Set();
5663
- for (const val of v$1) propValues[k$2].add(val);
5664
- }
5665
- }
5666
- return propValues;
5667
- });
5668
- const disc = cached(() => {
5669
- const opts = def.options;
5670
- const map = /* @__PURE__ */ new Map();
5671
- for (const o$2 of opts) {
5672
- const values = o$2._zod.propValues?.[def.discriminator];
5673
- if (!values || values.size === 0) throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o$2)}"`);
5674
- for (const v$1 of values) {
5675
- if (map.has(v$1)) throw new Error(`Duplicate discriminator value "${String(v$1)}"`);
5676
- map.set(v$1, o$2);
5677
- }
5678
- }
5679
- return map;
5680
- });
5681
- inst._zod.parse = (payload, ctx) => {
5682
- const input = payload.value;
5683
- if (!isObject$2(input)) {
5684
- payload.issues.push({
5685
- code: "invalid_type",
5686
- expected: "object",
5687
- input,
5688
- inst
5689
- });
5690
- return payload;
5691
- }
5692
- const opt = disc.value.get(input?.[def.discriminator]);
5693
- if (opt) return opt._zod.run(payload, ctx);
5694
- if (def.unionFallback) return _super(payload, ctx);
5695
- payload.issues.push({
5696
- code: "invalid_union",
5697
- errors: [],
5698
- note: "No matching discriminator",
5699
- discriminator: def.discriminator,
5700
- input,
5701
- path: [def.discriminator],
5702
- inst
5703
- });
5704
- return payload;
5705
- };
5706
- });
5707
6042
  const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
5708
6043
  $ZodType.init(inst, def);
5709
6044
  inst._zod.parse = (payload, ctx) => {
@@ -5803,6 +6138,77 @@ function handleIntersectionResults(result, left, right) {
5803
6138
  result.value = merged.data;
5804
6139
  return result;
5805
6140
  }
6141
+ const $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
6142
+ $ZodType.init(inst, def);
6143
+ const items = def.items;
6144
+ inst._zod.parse = (payload, ctx) => {
6145
+ const input = payload.value;
6146
+ if (!Array.isArray(input)) {
6147
+ payload.issues.push({
6148
+ input,
6149
+ inst,
6150
+ expected: "tuple",
6151
+ code: "invalid_type"
6152
+ });
6153
+ return payload;
6154
+ }
6155
+ payload.value = [];
6156
+ const proms = [];
6157
+ const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
6158
+ const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
6159
+ if (!def.rest) {
6160
+ const tooBig = input.length > items.length;
6161
+ const tooSmall = input.length < optStart - 1;
6162
+ if (tooBig || tooSmall) {
6163
+ payload.issues.push({
6164
+ ...tooBig ? {
6165
+ code: "too_big",
6166
+ maximum: items.length,
6167
+ inclusive: true
6168
+ } : {
6169
+ code: "too_small",
6170
+ minimum: items.length
6171
+ },
6172
+ input,
6173
+ inst,
6174
+ origin: "array"
6175
+ });
6176
+ return payload;
6177
+ }
6178
+ }
6179
+ let i$1 = -1;
6180
+ for (const item of items) {
6181
+ i$1++;
6182
+ if (i$1 >= input.length) {
6183
+ if (i$1 >= optStart) continue;
6184
+ }
6185
+ const result = item._zod.run({
6186
+ value: input[i$1],
6187
+ issues: []
6188
+ }, ctx);
6189
+ if (result instanceof Promise) proms.push(result.then((result$1) => handleTupleResult(result$1, payload, i$1)));
6190
+ else handleTupleResult(result, payload, i$1);
6191
+ }
6192
+ if (def.rest) {
6193
+ const rest = input.slice(items.length);
6194
+ for (const el of rest) {
6195
+ i$1++;
6196
+ const result = def.rest._zod.run({
6197
+ value: el,
6198
+ issues: []
6199
+ }, ctx);
6200
+ if (result instanceof Promise) proms.push(result.then((result$1) => handleTupleResult(result$1, payload, i$1)));
6201
+ else handleTupleResult(result, payload, i$1);
6202
+ }
6203
+ }
6204
+ if (proms.length) return Promise.all(proms).then(() => payload);
6205
+ return payload;
6206
+ };
6207
+ });
6208
+ function handleTupleResult(result, final, index) {
6209
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
6210
+ final.value[index] = result.value;
6211
+ }
5806
6212
  const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
5807
6213
  $ZodType.init(inst, def);
5808
6214
  const values = getEnumValues(def.entries);
@@ -5821,24 +6227,6 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
5821
6227
  return payload;
5822
6228
  };
5823
6229
  });
5824
- const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
5825
- $ZodType.init(inst, def);
5826
- if (def.values.length === 0) throw new Error("Cannot create literal schema with no valid values");
5827
- const values = new Set(def.values);
5828
- inst._zod.values = values;
5829
- inst._zod.pattern = /* @__PURE__ */ new RegExp(`^(${def.values.map((o$2) => typeof o$2 === "string" ? escapeRegex(o$2) : o$2 ? escapeRegex(o$2.toString()) : String(o$2)).join("|")})$`);
5830
- inst._zod.parse = (payload, _ctx) => {
5831
- const input = payload.value;
5832
- if (values.has(input)) return payload;
5833
- payload.issues.push({
5834
- code: "invalid_value",
5835
- values: def.values,
5836
- input,
5837
- inst
5838
- });
5839
- return payload;
5840
- };
5841
- });
5842
6230
  const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
5843
6231
  $ZodType.init(inst, def);
5844
6232
  inst._zod.parse = (payload, ctx) => {
@@ -6400,13 +6788,6 @@ function _int(Class, params) {
6400
6788
  });
6401
6789
  }
6402
6790
  /* @__NO_SIDE_EFFECTS__ */
6403
- function _boolean(Class, params) {
6404
- return new Class({
6405
- type: "boolean",
6406
- ...normalizeParams(params)
6407
- });
6408
- }
6409
- /* @__NO_SIDE_EFFECTS__ */
6410
6791
  function _unknown(Class) {
6411
6792
  return new Class({ type: "unknown" });
6412
6793
  }
@@ -6977,9 +7358,6 @@ const numberProcessor = (schema, ctx, _json, _params) => {
6977
7358
  }
6978
7359
  if (typeof multipleOf === "number") json.multipleOf = multipleOf;
6979
7360
  };
6980
- const booleanProcessor = (_schema, _ctx, json, _params) => {
6981
- json.type = "boolean";
6982
- };
6983
7361
  const neverProcessor = (_schema, _ctx, json, _params) => {
6984
7362
  json.not = {};
6985
7363
  };
@@ -6991,27 +7369,6 @@ const enumProcessor = (schema, _ctx, json, _params) => {
6991
7369
  if (values.every((v$1) => typeof v$1 === "string")) json.type = "string";
6992
7370
  json.enum = values;
6993
7371
  };
6994
- const literalProcessor = (schema, ctx, json, _params) => {
6995
- const def = schema._zod.def;
6996
- const vals = [];
6997
- for (const val of def.values) if (val === void 0) {
6998
- if (ctx.unrepresentable === "throw") throw new Error("Literal `undefined` cannot be represented in JSON Schema");
6999
- } else if (typeof val === "bigint") if (ctx.unrepresentable === "throw") throw new Error("BigInt literals cannot be represented in JSON Schema");
7000
- else vals.push(Number(val));
7001
- else vals.push(val);
7002
- if (vals.length === 0) {} else if (vals.length === 1) {
7003
- const val = vals[0];
7004
- json.type = val === null ? "null" : typeof val;
7005
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") json.enum = [val];
7006
- else json.const = val;
7007
- } else {
7008
- if (vals.every((v$1) => typeof v$1 === "number")) json.type = "number";
7009
- if (vals.every((v$1) => typeof v$1 === "string")) json.type = "string";
7010
- if (vals.every((v$1) => typeof v$1 === "boolean")) json.type = "boolean";
7011
- if (vals.every((v$1) => v$1 === null)) json.type = "null";
7012
- json.enum = vals;
7013
- }
7014
- };
7015
7372
  const customProcessor = (_schema, ctx, _json, _params) => {
7016
7373
  if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
7017
7374
  };
@@ -7094,6 +7451,44 @@ const intersectionProcessor = (schema, ctx, json, params) => {
7094
7451
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
7095
7452
  json.allOf = [...isSimpleIntersection(a$1) ? a$1.allOf : [a$1], ...isSimpleIntersection(b$2) ? b$2.allOf : [b$2]];
7096
7453
  };
7454
+ const tupleProcessor = (schema, ctx, _json, params) => {
7455
+ const json = _json;
7456
+ const def = schema._zod.def;
7457
+ json.type = "array";
7458
+ const prefixPath$1 = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
7459
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
7460
+ const prefixItems = def.items.map((x$2, i$1) => process$2(x$2, ctx, {
7461
+ ...params,
7462
+ path: [
7463
+ ...params.path,
7464
+ prefixPath$1,
7465
+ i$1
7466
+ ]
7467
+ }));
7468
+ const rest = def.rest ? process$2(def.rest, ctx, {
7469
+ ...params,
7470
+ path: [
7471
+ ...params.path,
7472
+ restPath,
7473
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
7474
+ ]
7475
+ }) : null;
7476
+ if (ctx.target === "draft-2020-12") {
7477
+ json.prefixItems = prefixItems;
7478
+ if (rest) json.items = rest;
7479
+ } else if (ctx.target === "openapi-3.0") {
7480
+ json.items = { anyOf: prefixItems };
7481
+ if (rest) json.items.anyOf.push(rest);
7482
+ json.minItems = prefixItems.length;
7483
+ if (!rest) json.maxItems = prefixItems.length;
7484
+ } else {
7485
+ json.items = prefixItems;
7486
+ if (rest) json.additionalItems = rest;
7487
+ }
7488
+ const { minimum, maximum } = schema._zod.bag;
7489
+ if (typeof minimum === "number") json.minItems = minimum;
7490
+ if (typeof maximum === "number") json.maxItems = maximum;
7491
+ };
7097
7492
  const nullableProcessor = (schema, ctx, json, params) => {
7098
7493
  const def = schema._zod.def;
7099
7494
  const inner = process$2(def.innerType, ctx, params);
@@ -7486,14 +7881,6 @@ const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, d
7486
7881
  function int(params) {
7487
7882
  return _int(ZodNumberFormat, params);
7488
7883
  }
7489
- const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
7490
- $ZodBoolean.init(inst, def);
7491
- ZodType.init(inst, def);
7492
- inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
7493
- });
7494
- function boolean(params) {
7495
- return _boolean(ZodBoolean, params);
7496
- }
7497
7884
  const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
7498
7885
  $ZodUnknown.init(inst, def);
7499
7886
  ZodType.init(inst, def);
@@ -7592,18 +7979,6 @@ function union(options, params) {
7592
7979
  ...normalizeParams(params)
7593
7980
  });
7594
7981
  }
7595
- const ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
7596
- ZodUnion.init(inst, def);
7597
- $ZodDiscriminatedUnion.init(inst, def);
7598
- });
7599
- function discriminatedUnion(discriminator, options, params) {
7600
- return new ZodDiscriminatedUnion({
7601
- type: "union",
7602
- options,
7603
- discriminator,
7604
- ...normalizeParams(params)
7605
- });
7606
- }
7607
7982
  const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
7608
7983
  $ZodIntersection.init(inst, def);
7609
7984
  ZodType.init(inst, def);
@@ -7616,6 +7991,25 @@ function intersection(left, right) {
7616
7991
  right
7617
7992
  });
7618
7993
  }
7994
+ const ZodTuple = /* @__PURE__ */ $constructor("ZodTuple", (inst, def) => {
7995
+ $ZodTuple.init(inst, def);
7996
+ ZodType.init(inst, def);
7997
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
7998
+ inst.rest = (rest) => inst.clone({
7999
+ ...inst._zod.def,
8000
+ rest
8001
+ });
8002
+ });
8003
+ function tuple(items, _paramsOrRest, _params) {
8004
+ const hasRest = _paramsOrRest instanceof $ZodType;
8005
+ const params = hasRest ? _params : _paramsOrRest;
8006
+ return new ZodTuple({
8007
+ type: "tuple",
8008
+ items,
8009
+ rest: hasRest ? _paramsOrRest : null,
8010
+ ...normalizeParams(params)
8011
+ });
8012
+ }
7619
8013
  const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
7620
8014
  $ZodEnum.init(inst, def);
7621
8015
  ZodType.init(inst, def);
@@ -7653,23 +8047,6 @@ function _enum(values, params) {
7653
8047
  ...normalizeParams(params)
7654
8048
  });
7655
8049
  }
7656
- const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
7657
- $ZodLiteral.init(inst, def);
7658
- ZodType.init(inst, def);
7659
- inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
7660
- inst.values = new Set(def.values);
7661
- Object.defineProperty(inst, "value", { get() {
7662
- if (def.values.length > 1) throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
7663
- return def.values[0];
7664
- } });
7665
- });
7666
- function literal(value, params) {
7667
- return new ZodLiteral({
7668
- type: "literal",
7669
- values: Array.isArray(value) ? value : [value],
7670
- ...normalizeParams(params)
7671
- });
7672
- }
7673
8050
  const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
7674
8051
  $ZodTransform.init(inst, def);
7675
8052
  ZodType.init(inst, def);
@@ -8803,7 +9180,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8803
9180
  //#region node_modules/dotenv/lib/main.js
8804
9181
  var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8805
9182
  const fs$9 = __require("fs");
8806
- const path$15 = __require("path");
9183
+ const path$14 = __require("path");
8807
9184
  const os$3 = __require("os");
8808
9185
  const crypto = __require("crypto");
8809
9186
  const version = require_package$1().version;
@@ -8941,12 +9318,12 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8941
9318
  if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
8942
9319
  for (const filepath of options.path) if (fs$9.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
8943
9320
  } else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
8944
- else possibleVaultPath = path$15.resolve(process.cwd(), ".env.vault");
9321
+ else possibleVaultPath = path$14.resolve(process.cwd(), ".env.vault");
8945
9322
  if (fs$9.existsSync(possibleVaultPath)) return possibleVaultPath;
8946
9323
  return null;
8947
9324
  }
8948
9325
  function _resolveHome(envPath) {
8949
- return envPath[0] === "~" ? path$15.join(os$3.homedir(), envPath.slice(1)) : envPath;
9326
+ return envPath[0] === "~" ? path$14.join(os$3.homedir(), envPath.slice(1)) : envPath;
8950
9327
  }
8951
9328
  function _configVault(options) {
8952
9329
  const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
@@ -8959,7 +9336,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8959
9336
  return { parsed };
8960
9337
  }
8961
9338
  function configDotenv(options) {
8962
- const dotenvPath = path$15.resolve(process.cwd(), ".env");
9339
+ const dotenvPath = path$14.resolve(process.cwd(), ".env");
8963
9340
  let encoding = "utf8";
8964
9341
  let processEnv = process.env;
8965
9342
  if (options && options.processEnv != null) processEnv = options.processEnv;
@@ -8975,11 +9352,11 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8975
9352
  }
8976
9353
  let lastError;
8977
9354
  const parsedAll = {};
8978
- for (const path$17 of optionPaths) try {
8979
- const parsed = DotenvModule.parse(fs$9.readFileSync(path$17, { encoding }));
9355
+ for (const path$16 of optionPaths) try {
9356
+ const parsed = DotenvModule.parse(fs$9.readFileSync(path$16, { encoding }));
8980
9357
  DotenvModule.populate(parsedAll, parsed, options);
8981
9358
  } catch (e$1) {
8982
- if (debug) _debug(`Failed to load ${path$17} ${e$1.message}`);
9359
+ if (debug) _debug(`Failed to load ${path$16} ${e$1.message}`);
8983
9360
  lastError = e$1;
8984
9361
  }
8985
9362
  const populated = DotenvModule.populate(processEnv, parsedAll, options);
@@ -8989,7 +9366,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8989
9366
  const keysCount = Object.keys(populated).length;
8990
9367
  const shortPaths = [];
8991
9368
  for (const filePath of optionPaths) try {
8992
- const relative = path$15.relative(process.cwd(), filePath);
9369
+ const relative = path$14.relative(process.cwd(), filePath);
8993
9370
  shortPaths.push(relative);
8994
9371
  } catch (e$1) {
8995
9372
  if (debug) _debug(`Failed to load ${filePath} ${e$1.message}`);
@@ -9307,7 +9684,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
9307
9684
  Object.defineProperty(exports, "__esModule", { value: true });
9308
9685
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
9309
9686
  const os$2 = __require("os");
9310
- const path$14 = __require("path");
9687
+ const path$13 = __require("path");
9311
9688
  const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
9312
9689
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
9313
9690
  /**
@@ -9336,7 +9713,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
9336
9713
  }
9337
9714
  exports.unixify = unixify;
9338
9715
  function makeAbsolute(cwd, filepath) {
9339
- return path$14.resolve(cwd, filepath);
9716
+ return path$13.resolve(cwd, filepath);
9340
9717
  }
9341
9718
  exports.makeAbsolute = makeAbsolute;
9342
9719
  function removeLeadingDotSegment(entry) {
@@ -10602,7 +10979,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10602
10979
  //#endregion
10603
10980
  //#region node_modules/micromatch/node_modules/picomatch/lib/constants.js
10604
10981
  var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10605
- const path$13 = __require("path");
10982
+ const path$12 = __require("path");
10606
10983
  const WIN_SLASH = "\\\\/";
10607
10984
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
10608
10985
  /**
@@ -10727,7 +11104,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10727
11104
  CHAR_UNDERSCORE: 95,
10728
11105
  CHAR_VERTICAL_LINE: 124,
10729
11106
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
10730
- SEP: path$13.sep,
11107
+ SEP: path$12.sep,
10731
11108
  extglobChars(chars) {
10732
11109
  return {
10733
11110
  "!": {
@@ -10766,7 +11143,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10766
11143
  //#endregion
10767
11144
  //#region node_modules/micromatch/node_modules/picomatch/lib/utils.js
10768
11145
  var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
10769
- const path$12 = __require("path");
11146
+ const path$11 = __require("path");
10770
11147
  const win32 = process.platform === "win32";
10771
11148
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
10772
11149
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -10786,7 +11163,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
10786
11163
  };
10787
11164
  exports.isWindows = (options) => {
10788
11165
  if (options && typeof options.windows === "boolean") return options.windows;
10789
- return win32 === true || path$12.sep === "\\";
11166
+ return win32 === true || path$11.sep === "\\";
10790
11167
  };
10791
11168
  exports.escapeLast = (input, char, lastIdx) => {
10792
11169
  const idx = input.lastIndexOf(char, lastIdx);
@@ -11962,7 +12339,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11962
12339
  //#endregion
11963
12340
  //#region node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
11964
12341
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11965
- const path$11 = __require("path");
12342
+ const path$10 = __require("path");
11966
12343
  const scan = require_scan();
11967
12344
  const parse = require_parse$2();
11968
12345
  const utils = require_utils$3();
@@ -12101,7 +12478,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12101
12478
  * @api public
12102
12479
  */
12103
12480
  picomatch.matchBase = (input, glob, options, posix$1 = utils.isWindows(options)) => {
12104
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$11.basename(input));
12481
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$10.basename(input));
12105
12482
  };
12106
12483
  /**
12107
12484
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -12659,7 +13036,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12659
13036
  var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
12660
13037
  Object.defineProperty(exports, "__esModule", { value: true });
12661
13038
  exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
12662
- const path$10 = __require("path");
13039
+ const path$9 = __require("path");
12663
13040
  const globParent = require_glob_parent();
12664
13041
  const micromatch = require_micromatch();
12665
13042
  const GLOBSTAR = "**";
@@ -12767,7 +13144,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
12767
13144
  }
12768
13145
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
12769
13146
  function isAffectDepthOfReadingPattern(pattern) {
12770
- const basename$1 = path$10.basename(pattern);
13147
+ const basename$1 = path$9.basename(pattern);
12771
13148
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename$1);
12772
13149
  }
12773
13150
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -12841,7 +13218,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
12841
13218
  }
12842
13219
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
12843
13220
  function isAbsolute(pattern) {
12844
- return path$10.isAbsolute(pattern);
13221
+ return path$9.isAbsolute(pattern);
12845
13222
  }
12846
13223
  exports.isAbsolute = isAbsolute;
12847
13224
  }));
@@ -13084,8 +13461,8 @@ var require_tasks = /* @__PURE__ */ __commonJSMin(((exports) => {
13084
13461
  var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
13085
13462
  Object.defineProperty(exports, "__esModule", { value: true });
13086
13463
  exports.read = void 0;
13087
- function read(path$17, settings, callback) {
13088
- settings.fs.lstat(path$17, (lstatError, lstat) => {
13464
+ function read(path$16, settings, callback) {
13465
+ settings.fs.lstat(path$16, (lstatError, lstat) => {
13089
13466
  if (lstatError !== null) {
13090
13467
  callFailureCallback(callback, lstatError);
13091
13468
  return;
@@ -13094,7 +13471,7 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
13094
13471
  callSuccessCallback(callback, lstat);
13095
13472
  return;
13096
13473
  }
13097
- settings.fs.stat(path$17, (statError, stat) => {
13474
+ settings.fs.stat(path$16, (statError, stat) => {
13098
13475
  if (statError !== null) {
13099
13476
  if (settings.throwErrorOnBrokenSymbolicLink) {
13100
13477
  callFailureCallback(callback, statError);
@@ -13122,11 +13499,11 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
13122
13499
  var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
13123
13500
  Object.defineProperty(exports, "__esModule", { value: true });
13124
13501
  exports.read = void 0;
13125
- function read(path$17, settings) {
13126
- const lstat = settings.fs.lstatSync(path$17);
13502
+ function read(path$16, settings) {
13503
+ const lstat = settings.fs.lstatSync(path$16);
13127
13504
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
13128
13505
  try {
13129
- const stat = settings.fs.statSync(path$17);
13506
+ const stat = settings.fs.statSync(path$16);
13130
13507
  if (settings.markSymbolicLink) stat.isSymbolicLink = () => true;
13131
13508
  return stat;
13132
13509
  } catch (error) {
@@ -13185,17 +13562,17 @@ var require_out$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
13185
13562
  const sync = require_sync$5();
13186
13563
  const settings_1 = require_settings$3();
13187
13564
  exports.Settings = settings_1.default;
13188
- function stat(path$17, optionsOrSettingsOrCallback, callback) {
13565
+ function stat(path$16, optionsOrSettingsOrCallback, callback) {
13189
13566
  if (typeof optionsOrSettingsOrCallback === "function") {
13190
- async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
13567
+ async.read(path$16, getSettings(), optionsOrSettingsOrCallback);
13191
13568
  return;
13192
13569
  }
13193
- async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
13570
+ async.read(path$16, getSettings(optionsOrSettingsOrCallback), callback);
13194
13571
  }
13195
13572
  exports.stat = stat;
13196
- function statSync(path$17, optionsOrSettings) {
13573
+ function statSync(path$16, optionsOrSettings) {
13197
13574
  const settings = getSettings(optionsOrSettings);
13198
- return sync.read(path$17, settings);
13575
+ return sync.read(path$16, settings);
13199
13576
  }
13200
13577
  exports.statSync = statSync;
13201
13578
  function getSettings(settingsOrOptions = {}) {
@@ -13394,16 +13771,16 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
13394
13771
  return;
13395
13772
  }
13396
13773
  rpl(names.map((name$1) => {
13397
- const path$17 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
13774
+ const path$16 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
13398
13775
  return (done) => {
13399
- fsStat.stat(path$17, settings.fsStatSettings, (error, stats) => {
13776
+ fsStat.stat(path$16, settings.fsStatSettings, (error, stats) => {
13400
13777
  if (error !== null) {
13401
13778
  done(error);
13402
13779
  return;
13403
13780
  }
13404
13781
  const entry = {
13405
13782
  name: name$1,
13406
- path: path$17,
13783
+ path: path$16,
13407
13784
  dirent: utils.fs.createDirentFromStats(name$1, stats)
13408
13785
  };
13409
13786
  if (settings.stats) entry.stats = stats;
@@ -13500,7 +13877,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
13500
13877
  //#region node_modules/@nodelib/fs.scandir/out/settings.js
13501
13878
  var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
13502
13879
  Object.defineProperty(exports, "__esModule", { value: true });
13503
- const path$9 = __require("path");
13880
+ const path$8 = __require("path");
13504
13881
  const fsStat = require_out$3();
13505
13882
  const fs = require_fs();
13506
13883
  var Settings = class {
@@ -13508,7 +13885,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
13508
13885
  this._options = _options;
13509
13886
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
13510
13887
  this.fs = fs.createFileSystemAdapter(this._options.fs);
13511
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$9.sep);
13888
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
13512
13889
  this.stats = this._getValue(this._options.stats, false);
13513
13890
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
13514
13891
  this.fsStatSettings = new fsStat.Settings({
@@ -13533,17 +13910,17 @@ var require_out$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
13533
13910
  const sync = require_sync$4();
13534
13911
  const settings_1 = require_settings$2();
13535
13912
  exports.Settings = settings_1.default;
13536
- function scandir(path$17, optionsOrSettingsOrCallback, callback) {
13913
+ function scandir(path$16, optionsOrSettingsOrCallback, callback) {
13537
13914
  if (typeof optionsOrSettingsOrCallback === "function") {
13538
- async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
13915
+ async.read(path$16, getSettings(), optionsOrSettingsOrCallback);
13539
13916
  return;
13540
13917
  }
13541
- async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
13918
+ async.read(path$16, getSettings(optionsOrSettingsOrCallback), callback);
13542
13919
  }
13543
13920
  exports.scandir = scandir;
13544
- function scandirSync(path$17, optionsOrSettings) {
13921
+ function scandirSync(path$16, optionsOrSettings) {
13545
13922
  const settings = getSettings(optionsOrSettings);
13546
- return sync.read(path$17, settings);
13923
+ return sync.read(path$16, settings);
13547
13924
  }
13548
13925
  exports.scandirSync = scandirSync;
13549
13926
  function getSettings(settingsOrOptions = {}) {
@@ -14113,7 +14490,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
14113
14490
  //#region node_modules/@nodelib/fs.walk/out/settings.js
14114
14491
  var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
14115
14492
  Object.defineProperty(exports, "__esModule", { value: true });
14116
- const path$8 = __require("path");
14493
+ const path$7 = __require("path");
14117
14494
  const fsScandir = require_out$2();
14118
14495
  var Settings = class {
14119
14496
  constructor(_options = {}) {
@@ -14123,7 +14500,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
14123
14500
  this.deepFilter = this._getValue(this._options.deepFilter, null);
14124
14501
  this.entryFilter = this._getValue(this._options.entryFilter, null);
14125
14502
  this.errorFilter = this._getValue(this._options.errorFilter, null);
14126
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
14503
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$7.sep);
14127
14504
  this.fsScandirSettings = new fsScandir.Settings({
14128
14505
  followSymbolicLinks: this._options.followSymbolicLinks,
14129
14506
  fs: this._options.fs,
@@ -14177,7 +14554,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
14177
14554
  //#region node_modules/fast-glob/out/readers/reader.js
14178
14555
  var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
14179
14556
  Object.defineProperty(exports, "__esModule", { value: true });
14180
- const path$7 = __require("path");
14557
+ const path$6 = __require("path");
14181
14558
  const fsStat = require_out$3();
14182
14559
  const utils = require_utils$2();
14183
14560
  var Reader = class {
@@ -14190,7 +14567,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
14190
14567
  });
14191
14568
  }
14192
14569
  _getFullEntryPath(filepath) {
14193
- return path$7.resolve(this._settings.cwd, filepath);
14570
+ return path$6.resolve(this._settings.cwd, filepath);
14194
14571
  }
14195
14572
  _makeEntry(stats, pattern) {
14196
14573
  const entry = {
@@ -14534,7 +14911,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
14534
14911
  //#region node_modules/fast-glob/out/providers/provider.js
14535
14912
  var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
14536
14913
  Object.defineProperty(exports, "__esModule", { value: true });
14537
- const path$6 = __require("path");
14914
+ const path$5 = __require("path");
14538
14915
  const deep_1 = require_deep();
14539
14916
  const entry_1 = require_entry$1();
14540
14917
  const error_1 = require_error();
@@ -14548,7 +14925,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
14548
14925
  this.entryTransformer = new entry_2.default(this._settings);
14549
14926
  }
14550
14927
  _getRootDirectory(task) {
14551
- return path$6.resolve(this._settings.cwd, task.base);
14928
+ return path$5.resolve(this._settings.cwd, task.base);
14552
14929
  }
14553
14930
  _getReaderOptions(task) {
14554
14931
  const basePath = task.base === "." ? "" : task.base;
@@ -15001,14 +15378,14 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15001
15378
  makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this);
15002
15379
  return this._added;
15003
15380
  }
15004
- test(path$17, checkUnignored, mode) {
15381
+ test(path$16, checkUnignored, mode) {
15005
15382
  let ignored = false;
15006
15383
  let unignored = false;
15007
15384
  let matchedRule;
15008
15385
  this._rules.forEach((rule) => {
15009
15386
  const { negative } = rule;
15010
15387
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
15011
- if (!rule[mode].test(path$17)) return;
15388
+ if (!rule[mode].test(path$16)) return;
15012
15389
  ignored = !negative;
15013
15390
  unignored = negative;
15014
15391
  matchedRule = negative ? UNDEFINED : rule;
@@ -15024,13 +15401,13 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15024
15401
  const throwError = (message, Ctor) => {
15025
15402
  throw new Ctor(message);
15026
15403
  };
15027
- const checkPath = (path$17, originalPath, doThrow) => {
15028
- if (!isString(path$17)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
15029
- if (!path$17) return doThrow(`path must not be empty`, TypeError);
15030
- if (checkPath.isNotRelative(path$17)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
15404
+ const checkPath = (path$16, originalPath, doThrow) => {
15405
+ if (!isString(path$16)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
15406
+ if (!path$16) return doThrow(`path must not be empty`, TypeError);
15407
+ if (checkPath.isNotRelative(path$16)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
15031
15408
  return true;
15032
15409
  };
15033
- const isNotRelative = (path$17) => REGEX_TEST_INVALID_PATH.test(path$17);
15410
+ const isNotRelative = (path$16) => REGEX_TEST_INVALID_PATH.test(path$16);
15034
15411
  checkPath.isNotRelative = isNotRelative;
15035
15412
  /* istanbul ignore next */
15036
15413
  checkPath.convert = (p$1) => p$1;
@@ -15053,49 +15430,49 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15053
15430
  return this.add(pattern);
15054
15431
  }
15055
15432
  _test(originalPath, cache$1, checkUnignored, slices) {
15056
- const path$17 = originalPath && checkPath.convert(originalPath);
15057
- checkPath(path$17, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
15058
- return this._t(path$17, cache$1, checkUnignored, slices);
15433
+ const path$16 = originalPath && checkPath.convert(originalPath);
15434
+ checkPath(path$16, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
15435
+ return this._t(path$16, cache$1, checkUnignored, slices);
15059
15436
  }
15060
- checkIgnore(path$17) {
15061
- if (!REGEX_TEST_TRAILING_SLASH.test(path$17)) return this.test(path$17);
15062
- const slices = path$17.split(SLASH).filter(Boolean);
15437
+ checkIgnore(path$16) {
15438
+ if (!REGEX_TEST_TRAILING_SLASH.test(path$16)) return this.test(path$16);
15439
+ const slices = path$16.split(SLASH).filter(Boolean);
15063
15440
  slices.pop();
15064
15441
  if (slices.length) {
15065
15442
  const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
15066
15443
  if (parent.ignored) return parent;
15067
15444
  }
15068
- return this._rules.test(path$17, false, MODE_CHECK_IGNORE);
15445
+ return this._rules.test(path$16, false, MODE_CHECK_IGNORE);
15069
15446
  }
15070
- _t(path$17, cache$1, checkUnignored, slices) {
15071
- if (path$17 in cache$1) return cache$1[path$17];
15072
- if (!slices) slices = path$17.split(SLASH).filter(Boolean);
15447
+ _t(path$16, cache$1, checkUnignored, slices) {
15448
+ if (path$16 in cache$1) return cache$1[path$16];
15449
+ if (!slices) slices = path$16.split(SLASH).filter(Boolean);
15073
15450
  slices.pop();
15074
- if (!slices.length) return cache$1[path$17] = this._rules.test(path$17, checkUnignored, MODE_IGNORE);
15451
+ if (!slices.length) return cache$1[path$16] = this._rules.test(path$16, checkUnignored, MODE_IGNORE);
15075
15452
  const parent = this._t(slices.join(SLASH) + SLASH, cache$1, checkUnignored, slices);
15076
- return cache$1[path$17] = parent.ignored ? parent : this._rules.test(path$17, checkUnignored, MODE_IGNORE);
15453
+ return cache$1[path$16] = parent.ignored ? parent : this._rules.test(path$16, checkUnignored, MODE_IGNORE);
15077
15454
  }
15078
- ignores(path$17) {
15079
- return this._test(path$17, this._ignoreCache, false).ignored;
15455
+ ignores(path$16) {
15456
+ return this._test(path$16, this._ignoreCache, false).ignored;
15080
15457
  }
15081
15458
  createFilter() {
15082
- return (path$17) => !this.ignores(path$17);
15459
+ return (path$16) => !this.ignores(path$16);
15083
15460
  }
15084
15461
  filter(paths) {
15085
15462
  return makeArray(paths).filter(this.createFilter());
15086
15463
  }
15087
- test(path$17) {
15088
- return this._test(path$17, this._testCache, true);
15464
+ test(path$16) {
15465
+ return this._test(path$16, this._testCache, true);
15089
15466
  }
15090
15467
  };
15091
15468
  const factory = (options) => new Ignore(options);
15092
- const isPathValid = (path$17) => checkPath(path$17 && checkPath.convert(path$17), path$17, RETURN_FALSE);
15469
+ const isPathValid = (path$16) => checkPath(path$16 && checkPath.convert(path$16), path$16, RETURN_FALSE);
15093
15470
  /* istanbul ignore next */
15094
15471
  const setupWindows = () => {
15095
15472
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
15096
15473
  checkPath.convert = makePosix;
15097
15474
  const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
15098
- checkPath.isNotRelative = (path$17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$17) || isNotRelative(path$17);
15475
+ checkPath.isNotRelative = (path$16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$16) || isNotRelative(path$16);
15099
15476
  };
15100
15477
  /* istanbul ignore next */
15101
15478
  if (typeof process !== "undefined" && process.platform === "win32") setupWindows();
@@ -15109,15 +15486,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
15109
15486
  //#region node_modules/is-path-inside/index.js
15110
15487
  var import_ignore = /* @__PURE__ */ __toESM(require_ignore(), 1);
15111
15488
  function isPathInside(childPath, parentPath) {
15112
- const relation = path.relative(parentPath, childPath);
15113
- return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath));
15489
+ const relation = nodePath.relative(parentPath, childPath);
15490
+ return Boolean(relation && relation !== ".." && !relation.startsWith(`..${nodePath.sep}`) && relation !== nodePath.resolve(childPath));
15114
15491
  }
15115
15492
 
15116
15493
  //#endregion
15117
15494
  //#region node_modules/slash/index.js
15118
- function slash(path$17) {
15119
- if (path$17.startsWith("\\\\?\\")) return path$17;
15120
- return path$17.replace(/\\/g, "/");
15495
+ function slash(path$16) {
15496
+ if (path$16.startsWith("\\\\?\\")) return path$16;
15497
+ return path$16.replace(/\\/g, "/");
15121
15498
  }
15122
15499
 
15123
15500
  //#endregion
@@ -15203,7 +15580,7 @@ const buildPathChain = (startPath, rootPath) => {
15203
15580
  let currentPath = startPath;
15204
15581
  chain.push(currentPath);
15205
15582
  while (currentPath !== rootPath) {
15206
- const parentPath = path.dirname(currentPath);
15583
+ const parentPath = nodePath.dirname(currentPath);
15207
15584
  if (parentPath === currentPath) break;
15208
15585
  currentPath = parentPath;
15209
15586
  chain.push(currentPath);
@@ -15212,7 +15589,7 @@ const buildPathChain = (startPath, rootPath) => {
15212
15589
  };
15213
15590
  const findGitRootInChain = async (paths, statMethod) => {
15214
15591
  for (const directory of paths) {
15215
- const gitPath = path.join(directory, ".git");
15592
+ const gitPath = nodePath.join(directory, ".git");
15216
15593
  try {
15217
15594
  if (pathHasGitDirectory(await statMethod(gitPath))) return directory;
15218
15595
  } catch {}
@@ -15221,11 +15598,11 @@ const findGitRootInChain = async (paths, statMethod) => {
15221
15598
  const findGitRootSyncUncached = (cwd, fsImplementation) => {
15222
15599
  const statSyncMethod = getStatSyncMethod$1(fsImplementation);
15223
15600
  if (!statSyncMethod) return;
15224
- const currentPath = path.resolve(cwd);
15225
- const { root } = path.parse(currentPath);
15601
+ const currentPath = nodePath.resolve(cwd);
15602
+ const { root } = nodePath.parse(currentPath);
15226
15603
  const chain = buildPathChain(currentPath, root);
15227
15604
  for (const directory of chain) {
15228
- const gitPath = path.join(directory, ".git");
15605
+ const gitPath = nodePath.join(directory, ".git");
15229
15606
  try {
15230
15607
  if (pathHasGitDirectory(statSyncMethod(gitPath))) return directory;
15231
15608
  } catch {}
@@ -15238,8 +15615,8 @@ const findGitRootSync = (cwd, fsImplementation) => {
15238
15615
  const findGitRootAsyncUncached = async (cwd, fsImplementation) => {
15239
15616
  const statMethod = getAsyncStatMethod(fsImplementation);
15240
15617
  if (!statMethod) return findGitRootSync(cwd, fsImplementation);
15241
- const currentPath = path.resolve(cwd);
15242
- const { root } = path.parse(currentPath);
15618
+ const currentPath = nodePath.resolve(cwd);
15619
+ const { root } = nodePath.parse(currentPath);
15243
15620
  return findGitRootInChain(buildPathChain(currentPath, root), statMethod);
15244
15621
  };
15245
15622
  const findGitRoot = async (cwd, fsImplementation) => {
@@ -15254,8 +15631,8 @@ Get paths to all .gitignore files from git root to cwd (inclusive).
15254
15631
  @returns {string[]} Array of .gitignore file paths to search for.
15255
15632
  */
15256
15633
  const isWithinGitRoot = (gitRoot, cwd) => {
15257
- const resolvedGitRoot = path.resolve(gitRoot);
15258
- const resolvedCwd = path.resolve(cwd);
15634
+ const resolvedGitRoot = nodePath.resolve(gitRoot);
15635
+ const resolvedCwd = nodePath.resolve(cwd);
15259
15636
  return resolvedCwd === resolvedGitRoot || isPathInside(resolvedCwd, resolvedGitRoot);
15260
15637
  };
15261
15638
  const getParentGitignorePaths = (gitRoot, cwd) => {
@@ -15263,7 +15640,7 @@ const getParentGitignorePaths = (gitRoot, cwd) => {
15263
15640
  if (typeof cwd !== "string") throw new TypeError("cwd must be a string");
15264
15641
  if (!gitRoot) return [];
15265
15642
  if (!isWithinGitRoot(gitRoot, cwd)) return [];
15266
- return [...buildPathChain(path.resolve(cwd), path.resolve(gitRoot))].reverse().map((directory) => path.join(directory, ".gitignore"));
15643
+ return [...buildPathChain(nodePath.resolve(cwd), nodePath.resolve(gitRoot))].reverse().map((directory) => nodePath.join(directory, ".gitignore"));
15267
15644
  };
15268
15645
  /**
15269
15646
  Convert ignore patterns to fast-glob compatible format.
@@ -15370,18 +15747,18 @@ const applyBaseToPattern = (pattern, base) => {
15370
15747
  const slashIndex = cleanPattern.indexOf("/");
15371
15748
  const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
15372
15749
  let result;
15373
- if (!hasNonTrailingSlash) result = path.posix.join(base, "**", cleanPattern);
15374
- else if (cleanPattern.startsWith("/")) result = path.posix.join(base, cleanPattern.slice(1));
15375
- else result = path.posix.join(base, cleanPattern);
15750
+ if (!hasNonTrailingSlash) result = nodePath.posix.join(base, "**", cleanPattern);
15751
+ else if (cleanPattern.startsWith("/")) result = nodePath.posix.join(base, cleanPattern.slice(1));
15752
+ else result = nodePath.posix.join(base, cleanPattern);
15376
15753
  return isNegative ? "!" + result : result;
15377
15754
  };
15378
15755
  const parseIgnoreFile = (file, cwd) => {
15379
- const base = slash(path.relative(cwd, path.dirname(file.filePath)));
15756
+ const base = slash(nodePath.relative(cwd, nodePath.dirname(file.filePath)));
15380
15757
  return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
15381
15758
  };
15382
15759
  const toRelativePath = (fileOrDirectory, cwd) => {
15383
- if (path.isAbsolute(fileOrDirectory)) {
15384
- const relativePath = path.relative(cwd, fileOrDirectory);
15760
+ if (nodePath.isAbsolute(fileOrDirectory)) {
15761
+ const relativePath = nodePath.relative(cwd, fileOrDirectory);
15385
15762
  if (relativePath && !isPathInside(fileOrDirectory, cwd)) return;
15386
15763
  return relativePath;
15387
15764
  }
@@ -15391,11 +15768,11 @@ const toRelativePath = (fileOrDirectory, cwd) => {
15391
15768
  };
15392
15769
  const createIgnorePredicate = (patterns, cwd, baseDir) => {
15393
15770
  const ignores = (0, import_ignore.default)().add(patterns);
15394
- const resolvedCwd = path.normalize(path.resolve(cwd));
15395
- const resolvedBaseDir = path.normalize(path.resolve(baseDir));
15771
+ const resolvedCwd = nodePath.normalize(nodePath.resolve(cwd));
15772
+ const resolvedBaseDir = nodePath.normalize(nodePath.resolve(baseDir));
15396
15773
  return (fileOrDirectory) => {
15397
15774
  fileOrDirectory = toPath$1(fileOrDirectory);
15398
- if (path.normalize(path.resolve(fileOrDirectory)) === resolvedCwd) return false;
15775
+ if (nodePath.normalize(nodePath.resolve(fileOrDirectory)) === resolvedCwd) return false;
15399
15776
  const relativePath = toRelativePath(fileOrDirectory, resolvedBaseDir);
15400
15777
  if (relativePath === void 0) return false;
15401
15778
  return relativePath ? ignores.ignores(slash(relativePath)) : false;
@@ -15470,35 +15847,35 @@ const assertPatternsInput = (patterns) => {
15470
15847
  };
15471
15848
  const getStatMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "stat") ?? bindFsMethod(fs.promises, "stat") ?? promisifyFsMethod(fsImplementation, "stat");
15472
15849
  const getStatSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "statSync") ?? bindFsMethod(fs, "statSync");
15473
- const isDirectory = async (path$17, fsImplementation) => {
15850
+ const isDirectory = async (path$16, fsImplementation) => {
15474
15851
  try {
15475
- return (await getStatMethod(fsImplementation)(path$17)).isDirectory();
15852
+ return (await getStatMethod(fsImplementation)(path$16)).isDirectory();
15476
15853
  } catch {
15477
15854
  return false;
15478
15855
  }
15479
15856
  };
15480
- const isDirectorySync = (path$17, fsImplementation) => {
15857
+ const isDirectorySync = (path$16, fsImplementation) => {
15481
15858
  try {
15482
- return getStatSyncMethod(fsImplementation)(path$17).isDirectory();
15859
+ return getStatSyncMethod(fsImplementation)(path$16).isDirectory();
15483
15860
  } catch {
15484
15861
  return false;
15485
15862
  }
15486
15863
  };
15487
15864
  const normalizePathForDirectoryGlob = (filePath, cwd) => {
15488
- const path$17 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
15489
- return path.isAbsolute(path$17) ? path$17 : path.join(cwd, path$17);
15865
+ const path$16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
15866
+ return nodePath.isAbsolute(path$16) ? path$16 : nodePath.join(cwd, path$16);
15490
15867
  };
15491
15868
  const shouldExpandGlobstarDirectory = (pattern) => {
15492
15869
  const match = pattern?.match(/\*\*\/([^/]+)$/);
15493
15870
  if (!match) return false;
15494
15871
  const dirname$2 = match[1];
15495
15872
  const hasWildcards = /[*?[\]{}]/.test(dirname$2);
15496
- const hasExtension = path.extname(dirname$2) && !dirname$2.startsWith(".");
15873
+ const hasExtension = nodePath.extname(dirname$2) && !dirname$2.startsWith(".");
15497
15874
  return !hasWildcards && !hasExtension;
15498
15875
  };
15499
15876
  const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
15500
15877
  const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
15501
- return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
15878
+ return files ? files.map((file) => nodePath.posix.join(directoryPath, `**/${nodePath.extname(file) ? file : `${file}${extensionGlob}`}`)) : [nodePath.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
15502
15879
  };
15503
15880
  const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
15504
15881
  return (await Promise.all(directoryPaths.map(async (directoryPath) => {
@@ -15613,12 +15990,12 @@ const createFilterFunction = (isIgnored, cwd) => {
15613
15990
  const basePath = cwd || y.cwd();
15614
15991
  const pathCache = /* @__PURE__ */ new Map();
15615
15992
  return (fastGlobResult) => {
15616
- const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
15993
+ const pathKey$1 = nodePath.normalize(fastGlobResult.path ?? fastGlobResult);
15617
15994
  if (seen.has(pathKey$1)) return false;
15618
15995
  if (isIgnored) {
15619
15996
  let absolutePath = pathCache.get(pathKey$1);
15620
15997
  if (absolutePath === void 0) {
15621
- absolutePath = path.isAbsolute(pathKey$1) ? pathKey$1 : path.resolve(basePath, pathKey$1);
15998
+ absolutePath = nodePath.isAbsolute(pathKey$1) ? pathKey$1 : nodePath.resolve(basePath, pathKey$1);
15622
15999
  pathCache.set(pathKey$1, absolutePath);
15623
16000
  if (pathCache.size > 1e4) pathCache.clear();
15624
16001
  }
@@ -16691,9 +17068,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
16691
17068
  //#endregion
16692
17069
  //#region src/core/utils/fs.ts
16693
17070
  var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
16694
- async function pathExists(path$17) {
17071
+ async function pathExists(path$16) {
16695
17072
  try {
16696
- await access(path$17);
17073
+ await access(path$16);
16697
17074
  return true;
16698
17075
  } catch {
16699
17076
  return false;
@@ -16717,6 +17094,14 @@ async function readFile$1(filePath) {
16717
17094
  throw new Error(`Failed to read file ${filePath}: ${error instanceof Error ? error.message : "Unknown error"}`);
16718
17095
  }
16719
17096
  }
17097
+ async function readTextFile(filePath) {
17098
+ if (!await pathExists(filePath)) throw new Error(`File not found: ${filePath}`);
17099
+ try {
17100
+ return await readFile(filePath, "utf-8");
17101
+ } catch (error) {
17102
+ throw new Error(`Failed to read file ${filePath}: ${error instanceof Error ? error.message : "Unknown error"}`);
17103
+ }
17104
+ }
16720
17105
  async function readJsonFile(filePath) {
16721
17106
  if (!await pathExists(filePath)) throw new Error(`File not found: ${filePath}`);
16722
17107
  try {
@@ -16789,39 +17174,19 @@ const entityResource = {
16789
17174
 
16790
17175
  //#endregion
16791
17176
  //#region src/core/resources/function/schema.ts
16792
- const HttpTriggerSchema = object({
16793
- id: string().optional(),
16794
- name: string().optional(),
16795
- description: string().optional(),
16796
- type: literal("http"),
16797
- path: string().min(1, "Path cannot be empty")
16798
- });
16799
- const ScheduleTriggerSchema = object({
16800
- id: string().optional(),
16801
- name: string().optional(),
16802
- description: string().optional(),
16803
- type: literal("schedule"),
16804
- scheduleMode: _enum(["recurring", "once"]).optional(),
16805
- cron: string().min(1, "Cron expression cannot be empty"),
16806
- isActive: boolean().optional(),
16807
- timezone: string().optional()
16808
- });
16809
- const EventTriggerSchema = object({
16810
- id: string().optional(),
16811
- name: string().optional(),
16812
- description: string().optional(),
16813
- type: literal("event"),
16814
- entity: string().min(1, "Entity name cannot be empty"),
16815
- event: string().min(1, "Event type cannot be empty")
16816
- });
16817
- const TriggerSchema = discriminatedUnion("type", [
16818
- HttpTriggerSchema,
16819
- ScheduleTriggerSchema,
16820
- EventTriggerSchema
16821
- ]);
16822
17177
  const FunctionConfigSchema = object({
17178
+ name: string().min(1, "Function name cannot be empty").refine((name$1) => !name$1.includes("."), "Function name cannot contain dots"),
16823
17179
  entry: string().min(1, "Entry point cannot be empty"),
16824
- triggers: array(TriggerSchema).optional()
17180
+ triggers: tuple([]).optional()
17181
+ });
17182
+ const FunctionSchema = FunctionConfigSchema.extend({ codePath: string().min(1, "Code path cannot be empty") });
17183
+ const DeployFunctionsResponseSchema = object({
17184
+ deployed: array(string()),
17185
+ deleted: array(string()),
17186
+ errors: array(object({
17187
+ name: string(),
17188
+ message: string()
17189
+ })).nullable()
16825
17190
  });
16826
17191
 
16827
17192
  //#endregion
@@ -16829,7 +17194,19 @@ const FunctionConfigSchema = object({
16829
17194
  async function readFunctionConfig(configPath) {
16830
17195
  const parsed = await readJsonFile(configPath);
16831
17196
  const result = FunctionConfigSchema.safeParse(parsed);
16832
- if (!result.success) throw new Error(`Invalid function configuration in ${configPath}: ${result.error.issues.map((e$1) => e$1.message).join(", ")}`);
17197
+ if (!result.success) throw new Error(`Invalid function configuration in ${configPath}: ${result.error.message}`);
17198
+ return result.data;
17199
+ }
17200
+ async function readFunction(configPath) {
17201
+ const config$2 = await readFunctionConfig(configPath);
17202
+ const codePath = join(dirname(configPath), config$2.entry);
17203
+ if (!await pathExists(codePath)) throw new Error(`Function code file not found: ${codePath} (referenced in ${configPath})`);
17204
+ const functionData = {
17205
+ ...config$2,
17206
+ codePath
17207
+ };
17208
+ const result = FunctionSchema.safeParse(functionData);
17209
+ if (!result.success) throw new Error(`Invalid function in ${configPath}: ${result.error.message}`);
16833
17210
  return result.data;
16834
17211
  }
16835
17212
  async function readAllFunctions(functionsDir) {
@@ -16838,12 +17215,60 @@ async function readAllFunctions(functionsDir) {
16838
17215
  cwd: functionsDir,
16839
17216
  absolute: true
16840
17217
  });
16841
- return await Promise.all(configFiles.map((configPath) => readFunctionConfig(configPath)));
17218
+ const functions = await Promise.all(configFiles.map((configPath) => readFunction(configPath)));
17219
+ const names = /* @__PURE__ */ new Set();
17220
+ for (const fn of functions) {
17221
+ if (names.has(fn.name)) throw new Error(`Duplicate function name "${fn.name}"`);
17222
+ names.add(fn.name);
17223
+ }
17224
+ return functions;
17225
+ }
17226
+
17227
+ //#endregion
17228
+ //#region src/core/resources/function/api.ts
17229
+ function toDeployPayloadItem(fn) {
17230
+ return {
17231
+ name: fn.name,
17232
+ entry: fn.entry,
17233
+ files: [{
17234
+ path: fn.entry,
17235
+ content: fn.code
17236
+ }]
17237
+ };
17238
+ }
17239
+ async function deployFunctions(functions) {
17240
+ const appClient = getAppClient();
17241
+ const payload = { functions: functions.map(toDeployPayloadItem) };
17242
+ const response = await appClient.put("backend-functions/deploy", {
17243
+ json: payload,
17244
+ throwHttpErrors: false
17245
+ });
17246
+ if (!response.ok) {
17247
+ const errorJson = await response.json();
17248
+ throw new Error(`Failed to deploy functions: ${errorJson}`);
17249
+ }
17250
+ return DeployFunctionsResponseSchema.parse(await response.json());
17251
+ }
17252
+
17253
+ //#endregion
17254
+ //#region src/core/resources/function/deploy.ts
17255
+ async function loadFunctionCode(fn) {
17256
+ const code$1 = await readTextFile(fn.codePath);
17257
+ return {
17258
+ ...fn,
17259
+ code: code$1
17260
+ };
17261
+ }
17262
+ async function pushFunctions(functions) {
17263
+ return deployFunctions(await Promise.all(functions.map(loadFunctionCode)));
16842
17264
  }
16843
17265
 
16844
17266
  //#endregion
16845
17267
  //#region src/core/resources/function/resource.ts
16846
- const functionResource = { readAll: readAllFunctions };
17268
+ const functionResource = {
17269
+ readAll: readAllFunctions,
17270
+ push: pushFunctions
17271
+ };
16847
17272
 
16848
17273
  //#endregion
16849
17274
  //#region src/core/project/schema.ts
@@ -17196,7 +17621,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17196
17621
  * @public
17197
17622
  */
17198
17623
  var fs$5 = __require("fs");
17199
- var path$5 = __require("path");
17624
+ var path$4 = __require("path");
17200
17625
  var utils = require_utils();
17201
17626
  var scopeOptionWarned = false;
17202
17627
  /** @type {string} */
@@ -17266,9 +17691,9 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17266
17691
  * @return {String}
17267
17692
  */
17268
17693
  exports.resolveInclude = function(name$1, filename, isDir) {
17269
- var dirname$2 = path$5.dirname;
17270
- var extname = path$5.extname;
17271
- var resolve$1 = path$5.resolve;
17694
+ var dirname$2 = path$4.dirname;
17695
+ var extname = path$4.extname;
17696
+ var resolve$1 = path$4.resolve;
17272
17697
  var includePath = resolve$1(isDir ? filename : dirname$2(filename), name$1);
17273
17698
  if (!extname(name$1)) includePath += ".ejs";
17274
17699
  return includePath;
@@ -17294,22 +17719,22 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17294
17719
  * @param {Options} options compilation options
17295
17720
  * @return {String}
17296
17721
  */
17297
- function getIncludePath(path$17, options) {
17722
+ function getIncludePath(path$16, options) {
17298
17723
  var includePath;
17299
17724
  var filePath;
17300
17725
  var views = options.views;
17301
- var match = /^[A-Za-z]+:\\|^\//.exec(path$17);
17726
+ var match = /^[A-Za-z]+:\\|^\//.exec(path$16);
17302
17727
  if (match && match.length) {
17303
- path$17 = path$17.replace(/^\/*/, "");
17304
- if (Array.isArray(options.root)) includePath = resolvePaths(path$17, options.root);
17305
- else includePath = exports.resolveInclude(path$17, options.root || "/", true);
17728
+ path$16 = path$16.replace(/^\/*/, "");
17729
+ if (Array.isArray(options.root)) includePath = resolvePaths(path$16, options.root);
17730
+ else includePath = exports.resolveInclude(path$16, options.root || "/", true);
17306
17731
  } else {
17307
17732
  if (options.filename) {
17308
- filePath = exports.resolveInclude(path$17, options.filename);
17733
+ filePath = exports.resolveInclude(path$16, options.filename);
17309
17734
  if (fs$5.existsSync(filePath)) includePath = filePath;
17310
17735
  }
17311
- if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$17, views);
17312
- if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$17) + "\"");
17736
+ if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$16, views);
17737
+ if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$16) + "\"");
17313
17738
  }
17314
17739
  return includePath;
17315
17740
  }
@@ -17401,11 +17826,11 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17401
17826
  * Depending on the value of `options.client`, either type might be returned
17402
17827
  * @static
17403
17828
  */
17404
- function includeFile(path$17, options) {
17829
+ function includeFile(path$16, options) {
17405
17830
  var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
17406
- opts.filename = getIncludePath(path$17, opts);
17831
+ opts.filename = getIncludePath(path$16, opts);
17407
17832
  if (typeof options.includer === "function") {
17408
- var includerResult = options.includer(path$17, opts.filename);
17833
+ var includerResult = options.includer(path$16, opts.filename);
17409
17834
  if (includerResult) {
17410
17835
  if (includerResult.filename) opts.filename = includerResult.filename;
17411
17836
  if (includerResult.template) return handleCache(opts, includerResult.template);
@@ -17656,10 +18081,10 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17656
18081
  throw e$1;
17657
18082
  }
17658
18083
  var returnedFn = opts.client ? fn : function anonymous(data) {
17659
- var include = function(path$17, includeData) {
18084
+ var include = function(path$16, includeData) {
17660
18085
  var d$2 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
17661
18086
  if (includeData) d$2 = utils.shallowCopy(d$2, includeData);
17662
- return includeFile(path$17, opts)(d$2);
18087
+ return includeFile(path$16, opts)(d$2);
17663
18088
  };
17664
18089
  return fn.apply(opts.context, [
17665
18090
  data || utils.createNullProtoObjWherePossible(),
@@ -17670,7 +18095,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
17670
18095
  };
17671
18096
  if (opts.filename && typeof Object.defineProperty === "function") {
17672
18097
  var filename = opts.filename;
17673
- var basename$1 = path$5.basename(filename, path$5.extname(filename));
18098
+ var basename$1 = path$4.basename(filename, path$4.extname(filename));
17674
18099
  try {
17675
18100
  Object.defineProperty(returnedFn, "name", {
17676
18101
  value: basename$1,
@@ -25778,436 +26203,10 @@ async function getUserInfo(accessToken) {
25778
26203
  return result.data;
25779
26204
  }
25780
26205
 
25781
- //#endregion
25782
- //#region node_modules/chalk/source/vendor/ansi-styles/index.js
25783
- const ANSI_BACKGROUND_OFFSET = 10;
25784
- const wrapAnsi16 = (offset = 0) => (code$1) => `\u001B[${code$1 + offset}m`;
25785
- const wrapAnsi256 = (offset = 0) => (code$1) => `\u001B[${38 + offset};5;${code$1}m`;
25786
- const wrapAnsi16m = (offset = 0) => (red$1, green$1, blue$1) => `\u001B[${38 + offset};2;${red$1};${green$1};${blue$1}m`;
25787
- const styles$1 = {
25788
- modifier: {
25789
- reset: [0, 0],
25790
- bold: [1, 22],
25791
- dim: [2, 22],
25792
- italic: [3, 23],
25793
- underline: [4, 24],
25794
- overline: [53, 55],
25795
- inverse: [7, 27],
25796
- hidden: [8, 28],
25797
- strikethrough: [9, 29]
25798
- },
25799
- color: {
25800
- black: [30, 39],
25801
- red: [31, 39],
25802
- green: [32, 39],
25803
- yellow: [33, 39],
25804
- blue: [34, 39],
25805
- magenta: [35, 39],
25806
- cyan: [36, 39],
25807
- white: [37, 39],
25808
- blackBright: [90, 39],
25809
- gray: [90, 39],
25810
- grey: [90, 39],
25811
- redBright: [91, 39],
25812
- greenBright: [92, 39],
25813
- yellowBright: [93, 39],
25814
- blueBright: [94, 39],
25815
- magentaBright: [95, 39],
25816
- cyanBright: [96, 39],
25817
- whiteBright: [97, 39]
25818
- },
25819
- bgColor: {
25820
- bgBlack: [40, 49],
25821
- bgRed: [41, 49],
25822
- bgGreen: [42, 49],
25823
- bgYellow: [43, 49],
25824
- bgBlue: [44, 49],
25825
- bgMagenta: [45, 49],
25826
- bgCyan: [46, 49],
25827
- bgWhite: [47, 49],
25828
- bgBlackBright: [100, 49],
25829
- bgGray: [100, 49],
25830
- bgGrey: [100, 49],
25831
- bgRedBright: [101, 49],
25832
- bgGreenBright: [102, 49],
25833
- bgYellowBright: [103, 49],
25834
- bgBlueBright: [104, 49],
25835
- bgMagentaBright: [105, 49],
25836
- bgCyanBright: [106, 49],
25837
- bgWhiteBright: [107, 49]
25838
- }
25839
- };
25840
- const modifierNames = Object.keys(styles$1.modifier);
25841
- const foregroundColorNames = Object.keys(styles$1.color);
25842
- const backgroundColorNames = Object.keys(styles$1.bgColor);
25843
- const colorNames = [...foregroundColorNames, ...backgroundColorNames];
25844
- function assembleStyles() {
25845
- const codes = /* @__PURE__ */ new Map();
25846
- for (const [groupName, group] of Object.entries(styles$1)) {
25847
- for (const [styleName, style] of Object.entries(group)) {
25848
- styles$1[styleName] = {
25849
- open: `\u001B[${style[0]}m`,
25850
- close: `\u001B[${style[1]}m`
25851
- };
25852
- group[styleName] = styles$1[styleName];
25853
- codes.set(style[0], style[1]);
25854
- }
25855
- Object.defineProperty(styles$1, groupName, {
25856
- value: group,
25857
- enumerable: false
25858
- });
25859
- }
25860
- Object.defineProperty(styles$1, "codes", {
25861
- value: codes,
25862
- enumerable: false
25863
- });
25864
- styles$1.color.close = "\x1B[39m";
25865
- styles$1.bgColor.close = "\x1B[49m";
25866
- styles$1.color.ansi = wrapAnsi16();
25867
- styles$1.color.ansi256 = wrapAnsi256();
25868
- styles$1.color.ansi16m = wrapAnsi16m();
25869
- styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
25870
- styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
25871
- styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
25872
- Object.defineProperties(styles$1, {
25873
- rgbToAnsi256: {
25874
- value(red$1, green$1, blue$1) {
25875
- if (red$1 === green$1 && green$1 === blue$1) {
25876
- if (red$1 < 8) return 16;
25877
- if (red$1 > 248) return 231;
25878
- return Math.round((red$1 - 8) / 247 * 24) + 232;
25879
- }
25880
- return 16 + 36 * Math.round(red$1 / 255 * 5) + 6 * Math.round(green$1 / 255 * 5) + Math.round(blue$1 / 255 * 5);
25881
- },
25882
- enumerable: false
25883
- },
25884
- hexToRgb: {
25885
- value(hex) {
25886
- const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
25887
- if (!matches) return [
25888
- 0,
25889
- 0,
25890
- 0
25891
- ];
25892
- let [colorString] = matches;
25893
- if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
25894
- const integer$1 = Number.parseInt(colorString, 16);
25895
- return [
25896
- integer$1 >> 16 & 255,
25897
- integer$1 >> 8 & 255,
25898
- integer$1 & 255
25899
- ];
25900
- },
25901
- enumerable: false
25902
- },
25903
- hexToAnsi256: {
25904
- value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
25905
- enumerable: false
25906
- },
25907
- ansi256ToAnsi: {
25908
- value(code$1) {
25909
- if (code$1 < 8) return 30 + code$1;
25910
- if (code$1 < 16) return 90 + (code$1 - 8);
25911
- let red$1;
25912
- let green$1;
25913
- let blue$1;
25914
- if (code$1 >= 232) {
25915
- red$1 = ((code$1 - 232) * 10 + 8) / 255;
25916
- green$1 = red$1;
25917
- blue$1 = red$1;
25918
- } else {
25919
- code$1 -= 16;
25920
- const remainder = code$1 % 36;
25921
- red$1 = Math.floor(code$1 / 36) / 5;
25922
- green$1 = Math.floor(remainder / 6) / 5;
25923
- blue$1 = remainder % 6 / 5;
25924
- }
25925
- const value = Math.max(red$1, green$1, blue$1) * 2;
25926
- if (value === 0) return 30;
25927
- let result = 30 + (Math.round(blue$1) << 2 | Math.round(green$1) << 1 | Math.round(red$1));
25928
- if (value === 2) result += 60;
25929
- return result;
25930
- },
25931
- enumerable: false
25932
- },
25933
- rgbToAnsi: {
25934
- value: (red$1, green$1, blue$1) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red$1, green$1, blue$1)),
25935
- enumerable: false
25936
- },
25937
- hexToAnsi: {
25938
- value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
25939
- enumerable: false
25940
- }
25941
- });
25942
- return styles$1;
25943
- }
25944
- const ansiStyles = assembleStyles();
25945
- var ansi_styles_default = ansiStyles;
25946
-
25947
- //#endregion
25948
- //#region node_modules/chalk/source/vendor/supports-color/index.js
25949
- function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
25950
- const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
25951
- const position = argv.indexOf(prefix + flag);
25952
- const terminatorPosition = argv.indexOf("--");
25953
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
25954
- }
25955
- const { env } = y;
25956
- let flagForceColor;
25957
- if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
25958
- else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
25959
- function envForceColor() {
25960
- if ("FORCE_COLOR" in env) {
25961
- if (env.FORCE_COLOR === "true") return 1;
25962
- if (env.FORCE_COLOR === "false") return 0;
25963
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
25964
- }
25965
- }
25966
- function translateLevel(level) {
25967
- if (level === 0) return false;
25968
- return {
25969
- level,
25970
- hasBasic: true,
25971
- has256: level >= 2,
25972
- has16m: level >= 3
25973
- };
25974
- }
25975
- function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
25976
- const noFlagForceColor = envForceColor();
25977
- if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
25978
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
25979
- if (forceColor === 0) return 0;
25980
- if (sniffFlags) {
25981
- if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
25982
- if (hasFlag("color=256")) return 2;
25983
- }
25984
- if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
25985
- if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
25986
- const min = forceColor || 0;
25987
- if (env.TERM === "dumb") return min;
25988
- if (y.platform === "win32") {
25989
- const osRelease = os.release().split(".");
25990
- if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
25991
- return 1;
25992
- }
25993
- if ("CI" in env) {
25994
- if ([
25995
- "GITHUB_ACTIONS",
25996
- "GITEA_ACTIONS",
25997
- "CIRCLECI"
25998
- ].some((key) => key in env)) return 3;
25999
- if ([
26000
- "TRAVIS",
26001
- "APPVEYOR",
26002
- "GITLAB_CI",
26003
- "BUILDKITE",
26004
- "DRONE"
26005
- ].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
26006
- return min;
26007
- }
26008
- if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
26009
- if (env.COLORTERM === "truecolor") return 3;
26010
- if (env.TERM === "xterm-kitty") return 3;
26011
- if (env.TERM === "xterm-ghostty") return 3;
26012
- if (env.TERM === "wezterm") return 3;
26013
- if ("TERM_PROGRAM" in env) {
26014
- const version$2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
26015
- switch (env.TERM_PROGRAM) {
26016
- case "iTerm.app": return version$2 >= 3 ? 3 : 2;
26017
- case "Apple_Terminal": return 2;
26018
- }
26019
- }
26020
- if (/-256(color)?$/i.test(env.TERM)) return 2;
26021
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
26022
- if ("COLORTERM" in env) return 1;
26023
- return min;
26024
- }
26025
- function createSupportsColor(stream, options = {}) {
26026
- return translateLevel(_supportsColor(stream, {
26027
- streamIsTTY: stream && stream.isTTY,
26028
- ...options
26029
- }));
26030
- }
26031
- const supportsColor = {
26032
- stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
26033
- stderr: createSupportsColor({ isTTY: tty.isatty(2) })
26034
- };
26035
- var supports_color_default = supportsColor;
26036
-
26037
- //#endregion
26038
- //#region node_modules/chalk/source/utilities.js
26039
- function stringReplaceAll(string$2, substring, replacer) {
26040
- let index = string$2.indexOf(substring);
26041
- if (index === -1) return string$2;
26042
- const substringLength = substring.length;
26043
- let endIndex = 0;
26044
- let returnValue = "";
26045
- do {
26046
- returnValue += string$2.slice(endIndex, index) + substring + replacer;
26047
- endIndex = index + substringLength;
26048
- index = string$2.indexOf(substring, endIndex);
26049
- } while (index !== -1);
26050
- returnValue += string$2.slice(endIndex);
26051
- return returnValue;
26052
- }
26053
- function stringEncaseCRLFWithFirstIndex(string$2, prefix, postfix, index) {
26054
- let endIndex = 0;
26055
- let returnValue = "";
26056
- do {
26057
- const gotCR = string$2[index - 1] === "\r";
26058
- returnValue += string$2.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
26059
- endIndex = index + 1;
26060
- index = string$2.indexOf("\n", endIndex);
26061
- } while (index !== -1);
26062
- returnValue += string$2.slice(endIndex);
26063
- return returnValue;
26064
- }
26065
-
26066
- //#endregion
26067
- //#region node_modules/chalk/source/index.js
26068
- const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
26069
- const GENERATOR = Symbol("GENERATOR");
26070
- const STYLER = Symbol("STYLER");
26071
- const IS_EMPTY = Symbol("IS_EMPTY");
26072
- const levelMapping = [
26073
- "ansi",
26074
- "ansi",
26075
- "ansi256",
26076
- "ansi16m"
26077
- ];
26078
- const styles = Object.create(null);
26079
- const applyOptions = (object$1, options = {}) => {
26080
- if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
26081
- const colorLevel = stdoutColor ? stdoutColor.level : 0;
26082
- object$1.level = options.level === void 0 ? colorLevel : options.level;
26083
- };
26084
- const chalkFactory = (options) => {
26085
- const chalk$1 = (...strings) => strings.join(" ");
26086
- applyOptions(chalk$1, options);
26087
- Object.setPrototypeOf(chalk$1, createChalk.prototype);
26088
- return chalk$1;
26089
- };
26090
- function createChalk(options) {
26091
- return chalkFactory(options);
26092
- }
26093
- Object.setPrototypeOf(createChalk.prototype, Function.prototype);
26094
- for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
26095
- const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
26096
- Object.defineProperty(this, styleName, { value: builder });
26097
- return builder;
26098
- } };
26099
- styles.visible = { get() {
26100
- const builder = createBuilder(this, this[STYLER], true);
26101
- Object.defineProperty(this, "visible", { value: builder });
26102
- return builder;
26103
- } };
26104
- const getModelAnsi = (model, level, type, ...arguments_) => {
26105
- if (model === "rgb") {
26106
- if (level === "ansi16m") return ansi_styles_default[type].ansi16m(...arguments_);
26107
- if (level === "ansi256") return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
26108
- return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
26109
- }
26110
- if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
26111
- return ansi_styles_default[type][model](...arguments_);
26112
- };
26113
- for (const model of [
26114
- "rgb",
26115
- "hex",
26116
- "ansi256"
26117
- ]) {
26118
- styles[model] = { get() {
26119
- const { level } = this;
26120
- return function(...arguments_) {
26121
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
26122
- return createBuilder(this, styler, this[IS_EMPTY]);
26123
- };
26124
- } };
26125
- const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
26126
- styles[bgModel] = { get() {
26127
- const { level } = this;
26128
- return function(...arguments_) {
26129
- const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
26130
- return createBuilder(this, styler, this[IS_EMPTY]);
26131
- };
26132
- } };
26133
- }
26134
- const proto = Object.defineProperties(() => {}, {
26135
- ...styles,
26136
- level: {
26137
- enumerable: true,
26138
- get() {
26139
- return this[GENERATOR].level;
26140
- },
26141
- set(level) {
26142
- this[GENERATOR].level = level;
26143
- }
26144
- }
26145
- });
26146
- const createStyler = (open, close, parent) => {
26147
- let openAll;
26148
- let closeAll;
26149
- if (parent === void 0) {
26150
- openAll = open;
26151
- closeAll = close;
26152
- } else {
26153
- openAll = parent.openAll + open;
26154
- closeAll = close + parent.closeAll;
26155
- }
26156
- return {
26157
- open,
26158
- close,
26159
- openAll,
26160
- closeAll,
26161
- parent
26162
- };
26163
- };
26164
- const createBuilder = (self$1, _styler, _isEmpty) => {
26165
- const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
26166
- Object.setPrototypeOf(builder, proto);
26167
- builder[GENERATOR] = self$1;
26168
- builder[STYLER] = _styler;
26169
- builder[IS_EMPTY] = _isEmpty;
26170
- return builder;
26171
- };
26172
- const applyStyle = (self$1, string$2) => {
26173
- if (self$1.level <= 0 || !string$2) return self$1[IS_EMPTY] ? "" : string$2;
26174
- let styler = self$1[STYLER];
26175
- if (styler === void 0) return string$2;
26176
- const { openAll, closeAll } = styler;
26177
- if (string$2.includes("\x1B")) while (styler !== void 0) {
26178
- string$2 = stringReplaceAll(string$2, styler.close, styler.open);
26179
- styler = styler.parent;
26180
- }
26181
- const lfIndex = string$2.indexOf("\n");
26182
- if (lfIndex !== -1) string$2 = stringEncaseCRLFWithFirstIndex(string$2, closeAll, openAll, lfIndex);
26183
- return openAll + string$2 + closeAll;
26184
- };
26185
- Object.defineProperties(createChalk.prototype, styles);
26186
- const chalk = createChalk();
26187
- const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
26188
- var source_default = chalk;
26189
-
26190
- //#endregion
26191
- //#region src/cli/utils/theme.ts
26192
- /**
26193
- * Base44 CLI theme configuration
26194
- */
26195
- const theme = {
26196
- colors: {
26197
- base44Orange: source_default.hex("#E86B3C"),
26198
- shinyOrange: source_default.hex("#FFD700"),
26199
- links: source_default.hex("#00D4FF"),
26200
- white: source_default.white
26201
- },
26202
- styles: {
26203
- header: source_default.dim,
26204
- bold: source_default.bold,
26205
- dim: source_default.dim
26206
- }
26207
- };
26208
-
26209
26206
  //#endregion
26210
26207
  //#region src/cli/utils/animate.ts
26208
+ const orange$2 = source_default.hex("#E86B3C");
26209
+ const gold = source_default.hex("#FFD700");
26211
26210
  /**
26212
26211
  * Sleep for a specified number of milliseconds.
26213
26212
  */
@@ -26224,13 +26223,13 @@ async function animateLineReveal(line, duration$2) {
26224
26223
  const progress = step / steps;
26225
26224
  const revealIndex = Math.floor(progress * line.length);
26226
26225
  let output = "";
26227
- for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.base44Orange(line[i$1]);
26228
- else if (i$1 === revealIndex) output += theme.colors.shinyOrange(line[i$1]);
26229
- else output += theme.styles.dim(line[i$1]);
26226
+ for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += orange$2(line[i$1]);
26227
+ else if (i$1 === revealIndex) output += gold(line[i$1]);
26228
+ else output += source_default.dim(line[i$1]);
26230
26229
  process.stdout.write(`\r${output}`);
26231
26230
  await sleep(stepDuration);
26232
26231
  }
26233
- process.stdout.write(`\r${theme.colors.base44Orange(line)}\n`);
26232
+ process.stdout.write(`\r${orange$2(line)}\n`);
26234
26233
  }
26235
26234
  /**
26236
26235
  * Quick shimmer pass over the entire banner.
@@ -26247,15 +26246,15 @@ async function shimmerPass(lines, duration$2) {
26247
26246
  let output = "";
26248
26247
  for (let i$1 = 0; i$1 < line.length; i$1++) {
26249
26248
  const dist = Math.abs(i$1 - shimmerPos);
26250
- if (dist < 3) output += dist === 0 ? theme.colors.white(line[i$1]) : theme.colors.shinyOrange(line[i$1]);
26251
- else output += theme.colors.base44Orange(line[i$1]);
26249
+ if (dist < 3) output += dist === 0 ? source_default.white(line[i$1]) : gold(line[i$1]);
26250
+ else output += orange$2(line[i$1]);
26252
26251
  }
26253
26252
  console.log(output);
26254
26253
  }
26255
26254
  await sleep(stepDuration);
26256
26255
  }
26257
26256
  process.stdout.write(moveUp);
26258
- for (const line of lines) console.log(theme.colors.base44Orange(line));
26257
+ for (const line of lines) console.log(orange$2(line));
26259
26258
  }
26260
26259
  /**
26261
26260
  * Animate the output with a smooth line-by-line reveal.
@@ -26275,6 +26274,7 @@ async function printAnimatedLines(lines) {
26275
26274
 
26276
26275
  //#endregion
26277
26276
  //#region src/cli/utils/banner.ts
26277
+ const orange$1 = source_default.hex("#E86B3C");
26278
26278
  const BANNER_LINES = [
26279
26279
  "██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
26280
26280
  "██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
@@ -26289,11 +26289,12 @@ const BANNER_LINES = [
26289
26289
  */
26290
26290
  async function printBanner() {
26291
26291
  if (process.stdout.isTTY) await printAnimatedLines(BANNER_LINES);
26292
- else console.log(theme.colors.base44Orange(BANNER_LINES.join("\n")));
26292
+ else console.log(orange$1(BANNER_LINES.join("\n")));
26293
26293
  }
26294
26294
 
26295
26295
  //#endregion
26296
26296
  //#region src/cli/utils/runCommand.ts
26297
+ const base44Color = source_default.bgHex("#E86B3C");
26297
26298
  /**
26298
26299
  * Wraps a command function with the Base44 intro/outro and error handling.
26299
26300
  * All CLI commands should use this utility to ensure consistent branding.
@@ -26337,7 +26338,7 @@ async function runCommand(commandFn, options) {
26337
26338
  if (options?.fullBanner) {
26338
26339
  await printBanner();
26339
26340
  Ie("");
26340
- } else Ie(theme.colors.base44Orange(" Base 44 "));
26341
+ } else Ie(base44Color(" Base 44 "));
26341
26342
  await loadProjectEnv();
26342
26343
  try {
26343
26344
  if (options?.requireAuth) {
@@ -26429,7 +26430,7 @@ async function generateAndDisplayDeviceCode() {
26429
26430
  successMessage: "Device code generated",
26430
26431
  errorMessage: "Failed to generate device code"
26431
26432
  });
26432
- M.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`);
26433
+ M.info(`Verification code: ${source_default.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`);
26433
26434
  return deviceCodeResponse;
26434
26435
  }
26435
26436
  async function waitForAuthentication(deviceCode, expiresIn, interval) {
@@ -26473,7 +26474,7 @@ async function login() {
26473
26474
  const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, deviceCodeResponse.interval);
26474
26475
  const userInfo = await getUserInfo(token.accessToken);
26475
26476
  await saveAuthData(token, userInfo);
26476
- return { outroMessage: `Successfully logged in as ${theme.styles.bold(userInfo.email)}` };
26477
+ return { outroMessage: `Successfully logged in as ${source_default.bold(userInfo.email)}` };
26477
26478
  }
26478
26479
  const loginCommand = new Command("login").description("Authenticate with Base44").action(async () => {
26479
26480
  await runCommand(login);
@@ -26483,7 +26484,7 @@ const loginCommand = new Command("login").description("Authenticate with Base44"
26483
26484
  //#region src/cli/commands/auth/whoami.ts
26484
26485
  async function whoami() {
26485
26486
  const auth = await readAuth();
26486
- return { outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}` };
26487
+ return { outroMessage: `Logged in as: ${source_default.bold(auth.email)}` };
26487
26488
  }
26488
26489
  const whoamiCommand = new Command("whoami").description("Display current authenticated user").action(async () => {
26489
26490
  await runCommand(whoami, { requireAuth: true });
@@ -27399,15 +27400,15 @@ var ReadStream = class extends Minipass {
27399
27400
  [_size];
27400
27401
  [_remain];
27401
27402
  [_autoClose];
27402
- constructor(path$17, opt) {
27403
+ constructor(path$16, opt) {
27403
27404
  opt = opt || {};
27404
27405
  super(opt);
27405
27406
  this.readable = true;
27406
27407
  this.writable = false;
27407
- if (typeof path$17 !== "string") throw new TypeError("path must be a string");
27408
+ if (typeof path$16 !== "string") throw new TypeError("path must be a string");
27408
27409
  this[_errored] = false;
27409
27410
  this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
27410
- this[_path] = path$17;
27411
+ this[_path] = path$16;
27411
27412
  this[_readSize] = opt.readSize || 16 * 1024 * 1024;
27412
27413
  this[_reading] = false;
27413
27414
  this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
@@ -27549,10 +27550,10 @@ var WriteStream = class extends EE {
27549
27550
  [_flags];
27550
27551
  [_finished] = false;
27551
27552
  [_pos];
27552
- constructor(path$17, opt) {
27553
+ constructor(path$16, opt) {
27553
27554
  opt = opt || {};
27554
27555
  super(opt);
27555
- this[_path] = path$17;
27556
+ this[_path] = path$16;
27556
27557
  this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
27557
27558
  this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
27558
27559
  this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
@@ -28311,10 +28312,10 @@ var Header = class {
28311
28312
  if (!(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
28312
28313
  const prefixSize = this.ctime || this.atime ? 130 : 155;
28313
28314
  const split = splitPrefix(this.path || "", prefixSize);
28314
- const path$17 = split[0];
28315
+ const path$16 = split[0];
28315
28316
  const prefix = split[1];
28316
28317
  this.needPax = !!split[2];
28317
- this.needPax = encString(buf, off, 100, path$17) || this.needPax;
28318
+ this.needPax = encString(buf, off, 100, path$16) || this.needPax;
28318
28319
  this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
28319
28320
  this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
28320
28321
  this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
@@ -29153,16 +29154,16 @@ const modeFix = (mode, isDir, portable) => {
29153
29154
  //#endregion
29154
29155
  //#region node_modules/tar/dist/esm/strip-absolute-path.js
29155
29156
  const { isAbsolute, parse: parse$1 } = win32;
29156
- const stripAbsolutePath = (path$17) => {
29157
+ const stripAbsolutePath = (path$16) => {
29157
29158
  let r$1 = "";
29158
- let parsed = parse$1(path$17);
29159
- while (isAbsolute(path$17) || parsed.root) {
29160
- const root = path$17.charAt(0) === "/" && path$17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
29161
- path$17 = path$17.slice(root.length);
29159
+ let parsed = parse$1(path$16);
29160
+ while (isAbsolute(path$16) || parsed.root) {
29161
+ const root = path$16.charAt(0) === "/" && path$16.slice(0, 4) !== "//?/" ? "/" : parsed.root;
29162
+ path$16 = path$16.slice(root.length);
29162
29163
  r$1 += root;
29163
- parsed = parse$1(path$17);
29164
+ parsed = parse$1(path$16);
29164
29165
  }
29165
- return [r$1, path$17];
29166
+ return [r$1, path$16];
29166
29167
  };
29167
29168
 
29168
29169
  //#endregion
@@ -29182,10 +29183,10 @@ const decode = (s) => win.reduce((s$1, c$1) => s$1.split(c$1).join(toRaw.get(c$1
29182
29183
 
29183
29184
  //#endregion
29184
29185
  //#region node_modules/tar/dist/esm/write-entry.js
29185
- const prefixPath = (path$17, prefix) => {
29186
- if (!prefix) return normalizeWindowsPath(path$17);
29187
- path$17 = normalizeWindowsPath(path$17).replace(/^\.(\/|$)/, "");
29188
- return stripTrailingSlashes(prefix) + "/" + path$17;
29186
+ const prefixPath = (path$16, prefix) => {
29187
+ if (!prefix) return normalizeWindowsPath(path$16);
29188
+ path$16 = normalizeWindowsPath(path$16).replace(/^\.(\/|$)/, "");
29189
+ return stripTrailingSlashes(prefix) + "/" + path$16;
29189
29190
  };
29190
29191
  const maxReadSize = 16 * 1024 * 1024;
29191
29192
  const PROCESS$1 = Symbol("process");
@@ -29267,7 +29268,7 @@ var WriteEntry = class extends Minipass {
29267
29268
  this.path = decode(this.path.replace(/\\/g, "/"));
29268
29269
  p$1 = p$1.replace(/\\/g, "/");
29269
29270
  }
29270
- this.absolute = normalizeWindowsPath(opt.absolute || path$1.resolve(this.cwd, p$1));
29271
+ this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p$1));
29271
29272
  if (this.path === "") this.path = "./";
29272
29273
  if (pathWarn) this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
29273
29274
  entry: this,
@@ -29309,8 +29310,8 @@ var WriteEntry = class extends Minipass {
29309
29310
  [MODE](mode) {
29310
29311
  return modeFix(mode, this.type === "Directory", this.portable);
29311
29312
  }
29312
- [PREFIX](path$17) {
29313
- return prefixPath(path$17, this.prefix);
29313
+ [PREFIX](path$16) {
29314
+ return prefixPath(path$16, this.prefix);
29314
29315
  }
29315
29316
  [HEADER]() {
29316
29317
  /* c8 ignore start */
@@ -29376,7 +29377,7 @@ var WriteEntry = class extends Minipass {
29376
29377
  if (!this.stat) throw new Error("cannot create link entry without stat");
29377
29378
  /* c8 ignore stop */
29378
29379
  this.type = "Link";
29379
- this.linkpath = normalizeWindowsPath(path$1.relative(this.cwd, linkpath));
29380
+ this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath));
29380
29381
  this.stat.size = 0;
29381
29382
  this[HEADER]();
29382
29383
  this.end();
@@ -29642,8 +29643,8 @@ var WriteEntryTar = class extends Minipass {
29642
29643
  super.write(b$2);
29643
29644
  readEntry.pipe(this);
29644
29645
  }
29645
- [PREFIX](path$17) {
29646
- return prefixPath(path$17, this.prefix);
29646
+ [PREFIX](path$16) {
29647
+ return prefixPath(path$16, this.prefix);
29647
29648
  }
29648
29649
  [MODE](mode) {
29649
29650
  return modeFix(mode, this.type === "Directory", this.portable);
@@ -29952,8 +29953,8 @@ var PackJob = class {
29952
29953
  pending = false;
29953
29954
  ignore = false;
29954
29955
  piped = false;
29955
- constructor(path$17, absolute) {
29956
- this.path = path$17 || "./";
29956
+ constructor(path$16, absolute) {
29957
+ this.path = path$16 || "./";
29957
29958
  this.absolute = absolute;
29958
29959
  }
29959
29960
  };
@@ -30058,36 +30059,36 @@ var Pack = class extends Minipass {
30058
30059
  [WRITE](chunk) {
30059
30060
  return super.write(chunk);
30060
30061
  }
30061
- add(path$17) {
30062
- this.write(path$17);
30062
+ add(path$16) {
30063
+ this.write(path$16);
30063
30064
  return this;
30064
30065
  }
30065
- end(path$17, encoding, cb) {
30066
+ end(path$16, encoding, cb) {
30066
30067
  /* c8 ignore start */
30067
- if (typeof path$17 === "function") {
30068
- cb = path$17;
30069
- path$17 = void 0;
30068
+ if (typeof path$16 === "function") {
30069
+ cb = path$16;
30070
+ path$16 = void 0;
30070
30071
  }
30071
30072
  if (typeof encoding === "function") {
30072
30073
  cb = encoding;
30073
30074
  encoding = void 0;
30074
30075
  }
30075
30076
  /* c8 ignore stop */
30076
- if (path$17) this.add(path$17);
30077
+ if (path$16) this.add(path$16);
30077
30078
  this[ENDED$1] = true;
30078
30079
  this[PROCESS]();
30079
30080
  /* c8 ignore next */
30080
30081
  if (cb) cb();
30081
30082
  return this;
30082
30083
  }
30083
- write(path$17) {
30084
+ write(path$16) {
30084
30085
  if (this[ENDED$1]) throw new Error("write after end");
30085
- if (path$17 instanceof ReadEntry) this[ADDTARENTRY](path$17);
30086
- else this[ADDFSENTRY](path$17);
30086
+ if (path$16 instanceof ReadEntry) this[ADDTARENTRY](path$16);
30087
+ else this[ADDFSENTRY](path$16);
30087
30088
  return this.flowing;
30088
30089
  }
30089
30090
  [ADDTARENTRY](p$1) {
30090
- const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1.path));
30091
+ const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1.path));
30091
30092
  if (!this.filter(p$1.path, p$1)) p$1.resume();
30092
30093
  else {
30093
30094
  const job = new PackJob(p$1.path, absolute);
@@ -30099,7 +30100,7 @@ var Pack = class extends Minipass {
30099
30100
  this[PROCESS]();
30100
30101
  }
30101
30102
  [ADDFSENTRY](p$1) {
30102
- const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1));
30103
+ const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1));
30103
30104
  this[QUEUE].push(new PackJob(p$1, absolute));
30104
30105
  this[PROCESS]();
30105
30106
  }
@@ -30300,7 +30301,7 @@ const createFile = (opt, files) => {
30300
30301
  const addFilesSync$1 = (p$1, files) => {
30301
30302
  files.forEach((file) => {
30302
30303
  if (file.charAt(0) === "@") list({
30303
- file: path.resolve(p$1.cwd, file.slice(1)),
30304
+ file: nodePath.resolve(p$1.cwd, file.slice(1)),
30304
30305
  sync: true,
30305
30306
  noResume: true,
30306
30307
  onReadEntry: (entry) => p$1.add(entry)
@@ -30313,7 +30314,7 @@ const addFilesAsync$1 = async (p$1, files) => {
30313
30314
  for (let i$1 = 0; i$1 < files.length; i$1++) {
30314
30315
  const file = String(files[i$1]);
30315
30316
  if (file.charAt(0) === "@") await list({
30316
- file: path.resolve(String(p$1.cwd), file.slice(1)),
30317
+ file: nodePath.resolve(String(p$1.cwd), file.slice(1)),
30317
30318
  noResume: true,
30318
30319
  onReadEntry: (entry) => {
30319
30320
  p$1.add(entry);
@@ -30351,9 +30352,9 @@ const getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMa
30351
30352
 
30352
30353
  //#endregion
30353
30354
  //#region node_modules/chownr/dist/esm/index.js
30354
- const lchownSync = (path$17, uid, gid) => {
30355
+ const lchownSync = (path$16, uid, gid) => {
30355
30356
  try {
30356
- return fs.lchownSync(path$17, uid, gid);
30357
+ return fs.lchownSync(path$16, uid, gid);
30357
30358
  } catch (er) {
30358
30359
  if (er?.code !== "ENOENT") throw er;
30359
30360
  }
@@ -30364,11 +30365,11 @@ const chown = (cpath, uid, gid, cb) => {
30364
30365
  });
30365
30366
  };
30366
30367
  const chownrKid = (p$1, child, uid, gid, cb) => {
30367
- if (child.isDirectory()) chownr(path.resolve(p$1, child.name), uid, gid, (er) => {
30368
+ if (child.isDirectory()) chownr(nodePath.resolve(p$1, child.name), uid, gid, (er) => {
30368
30369
  if (er) return cb(er);
30369
- chown(path.resolve(p$1, child.name), uid, gid, cb);
30370
+ chown(nodePath.resolve(p$1, child.name), uid, gid, cb);
30370
30371
  });
30371
- else chown(path.resolve(p$1, child.name), uid, gid, cb);
30372
+ else chown(nodePath.resolve(p$1, child.name), uid, gid, cb);
30372
30373
  };
30373
30374
  const chownr = (p$1, uid, gid, cb) => {
30374
30375
  fs.readdir(p$1, { withFileTypes: true }, (er, children) => {
@@ -30390,8 +30391,8 @@ const chownr = (p$1, uid, gid, cb) => {
30390
30391
  });
30391
30392
  };
30392
30393
  const chownrKidSync = (p$1, child, uid, gid) => {
30393
- if (child.isDirectory()) chownrSync(path.resolve(p$1, child.name), uid, gid);
30394
- lchownSync(path.resolve(p$1, child.name), uid, gid);
30394
+ if (child.isDirectory()) chownrSync(nodePath.resolve(p$1, child.name), uid, gid);
30395
+ lchownSync(nodePath.resolve(p$1, child.name), uid, gid);
30395
30396
  };
30396
30397
  const chownrSync = (p$1, uid, gid) => {
30397
30398
  let children;
@@ -30413,9 +30414,9 @@ var CwdError = class extends Error {
30413
30414
  path;
30414
30415
  code;
30415
30416
  syscall = "chdir";
30416
- constructor(path$17, code$1) {
30417
- super(`${code$1}: Cannot cd into '${path$17}'`);
30418
- this.path = path$17;
30417
+ constructor(path$16, code$1) {
30418
+ super(`${code$1}: Cannot cd into '${path$16}'`);
30419
+ this.path = path$16;
30419
30420
  this.code = code$1;
30420
30421
  }
30421
30422
  get name() {
@@ -30430,10 +30431,10 @@ var SymlinkError = class extends Error {
30430
30431
  symlink;
30431
30432
  syscall = "symlink";
30432
30433
  code = "TAR_SYMLINK_ERROR";
30433
- constructor(symlink, path$17) {
30434
+ constructor(symlink, path$16) {
30434
30435
  super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
30435
30436
  this.symlink = symlink;
30436
- this.path = path$17;
30437
+ this.path = path$16;
30437
30438
  }
30438
30439
  get name() {
30439
30440
  return "SymlinkError";
@@ -30479,12 +30480,12 @@ const mkdir$1 = (dir, opt, cb) => {
30479
30480
  mode,
30480
30481
  recursive: true
30481
30482
  }).then((made) => done(null, made ?? void 0), done);
30482
- mkdir_(cwd, normalizeWindowsPath(path.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
30483
+ mkdir_(cwd, normalizeWindowsPath(nodePath.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
30483
30484
  };
30484
30485
  const mkdir_ = (base, parts, mode, unlink$1, cwd, created, cb) => {
30485
30486
  if (!parts.length) return cb(null, created);
30486
30487
  const p$1 = parts.shift();
30487
- const part = normalizeWindowsPath(path.resolve(base + "/" + p$1));
30488
+ const part = normalizeWindowsPath(nodePath.resolve(base + "/" + p$1));
30488
30489
  fs.mkdir(part, mode, onmkdir(part, parts, mode, unlink$1, cwd, created, cb));
30489
30490
  };
30490
30491
  const onmkdir = (part, parts, mode, unlink$1, cwd, created, cb) => (er) => {
@@ -30540,10 +30541,10 @@ const mkdirSync = (dir, opt) => {
30540
30541
  mode,
30541
30542
  recursive: true
30542
30543
  }) ?? void 0);
30543
- const parts = normalizeWindowsPath(path.relative(cwd, dir)).split("/");
30544
+ const parts = normalizeWindowsPath(nodePath.relative(cwd, dir)).split("/");
30544
30545
  let created = void 0;
30545
30546
  for (let p$1 = parts.shift(), part = cwd; p$1 && (part += "/" + p$1); p$1 = parts.shift()) {
30546
- part = normalizeWindowsPath(path.resolve(part));
30547
+ part = normalizeWindowsPath(nodePath.resolve(part));
30547
30548
  try {
30548
30549
  fs.mkdirSync(part, mode);
30549
30550
  created = created || part;
@@ -30583,11 +30584,11 @@ const normalizeUnicode = (s) => {
30583
30584
  //#endregion
30584
30585
  //#region node_modules/tar/dist/esm/path-reservations.js
30585
30586
  const isWindows$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
30586
- const getDirs = (path$17) => {
30587
- return path$17.split("/").slice(0, -1).reduce((set, path$18) => {
30587
+ const getDirs = (path$16) => {
30588
+ return path$16.split("/").slice(0, -1).reduce((set, path$17) => {
30588
30589
  const s = set[set.length - 1];
30589
- if (s !== void 0) path$18 = join(s, path$18);
30590
- set.push(path$18 || "/");
30590
+ if (s !== void 0) path$17 = join(s, path$17);
30591
+ set.push(path$17 || "/");
30591
30592
  return set;
30592
30593
  }, []);
30593
30594
  };
@@ -30599,7 +30600,7 @@ var PathReservations = class {
30599
30600
  paths = isWindows$1 ? ["win32 parallelization disabled"] : paths.map((p$1) => {
30600
30601
  return stripTrailingSlashes(join(normalizeUnicode(p$1))).toLowerCase();
30601
30602
  });
30602
- const dirs = new Set(paths.map((path$17) => getDirs(path$17)).reduce((a$1, b$2) => a$1.concat(b$2)));
30603
+ const dirs = new Set(paths.map((path$16) => getDirs(path$16)).reduce((a$1, b$2) => a$1.concat(b$2)));
30603
30604
  this.#reservations.set(fn, {
30604
30605
  dirs,
30605
30606
  paths
@@ -30626,8 +30627,8 @@ var PathReservations = class {
30626
30627
  if (!res) throw new Error("function does not have any path reservations");
30627
30628
  /* c8 ignore stop */
30628
30629
  return {
30629
- paths: res.paths.map((path$17) => this.#queues.get(path$17)),
30630
- dirs: [...res.dirs].map((path$17) => this.#queues.get(path$17))
30630
+ paths: res.paths.map((path$16) => this.#queues.get(path$16)),
30631
+ dirs: [...res.dirs].map((path$16) => this.#queues.get(path$16))
30631
30632
  };
30632
30633
  }
30633
30634
  check(fn) {
@@ -30648,14 +30649,14 @@ var PathReservations = class {
30648
30649
  /* c8 ignore stop */
30649
30650
  const { paths, dirs } = res;
30650
30651
  const next = /* @__PURE__ */ new Set();
30651
- for (const path$17 of paths) {
30652
- const q$2 = this.#queues.get(path$17);
30652
+ for (const path$16 of paths) {
30653
+ const q$2 = this.#queues.get(path$16);
30653
30654
  /* c8 ignore start */
30654
30655
  if (!q$2 || q$2?.[0] !== fn) continue;
30655
30656
  /* c8 ignore stop */
30656
30657
  const q0 = q$2[1];
30657
30658
  if (!q0) {
30658
- this.#queues.delete(path$17);
30659
+ this.#queues.delete(path$16);
30659
30660
  continue;
30660
30661
  }
30661
30662
  q$2.shift();
@@ -30712,20 +30713,20 @@ const CHECKED_CWD = Symbol("checkedCwd");
30712
30713
  const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
30713
30714
  const DEFAULT_MAX_DEPTH = 1024;
30714
30715
  /* c8 ignore start */
30715
- const unlinkFile = (path$17, cb) => {
30716
- if (!isWindows) return fs.unlink(path$17, cb);
30717
- const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
30718
- fs.rename(path$17, name$1, (er) => {
30716
+ const unlinkFile = (path$16, cb) => {
30717
+ if (!isWindows) return fs.unlink(path$16, cb);
30718
+ const name$1 = path$16 + ".DELETE." + randomBytes(16).toString("hex");
30719
+ fs.rename(path$16, name$1, (er) => {
30719
30720
  if (er) return cb(er);
30720
30721
  fs.unlink(name$1, cb);
30721
30722
  });
30722
30723
  };
30723
30724
  /* c8 ignore stop */
30724
30725
  /* c8 ignore start */
30725
- const unlinkFileSync = (path$17) => {
30726
- if (!isWindows) return fs.unlinkSync(path$17);
30727
- const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
30728
- fs.renameSync(path$17, name$1);
30726
+ const unlinkFileSync = (path$16) => {
30727
+ if (!isWindows) return fs.unlinkSync(path$16);
30728
+ const name$1 = path$16 + ".DELETE." + randomBytes(16).toString("hex");
30729
+ fs.renameSync(path$16, name$1);
30729
30730
  fs.unlinkSync(name$1);
30730
30731
  };
30731
30732
  /* c8 ignore stop */
@@ -30790,7 +30791,7 @@ var Unpack = class extends Parser {
30790
30791
  this.noMtime = !!opt.noMtime;
30791
30792
  this.preservePaths = !!opt.preservePaths;
30792
30793
  this.unlink = !!opt.unlink;
30793
- this.cwd = normalizeWindowsPath(path.resolve(opt.cwd || process.cwd()));
30794
+ this.cwd = normalizeWindowsPath(nodePath.resolve(opt.cwd || process.cwd()));
30794
30795
  this.strip = Number(opt.strip) || 0;
30795
30796
  this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
30796
30797
  this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
@@ -30810,22 +30811,22 @@ var Unpack = class extends Parser {
30810
30811
  }
30811
30812
  }
30812
30813
  [STRIPABSOLUTEPATH](entry, field) {
30813
- const path$17 = entry[field];
30814
- if (!path$17 || this.preservePaths) return true;
30815
- const parts = path$17.split("/");
30814
+ const path$16 = entry[field];
30815
+ if (!path$16 || this.preservePaths) return true;
30816
+ const parts = path$16.split("/");
30816
30817
  if (parts.includes("..") || isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
30817
30818
  this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
30818
30819
  entry,
30819
- [field]: path$17
30820
+ [field]: path$16
30820
30821
  });
30821
30822
  return false;
30822
30823
  }
30823
- const [root, stripped] = stripAbsolutePath(path$17);
30824
+ const [root, stripped] = stripAbsolutePath(path$16);
30824
30825
  if (root) {
30825
30826
  entry[field] = String(stripped);
30826
30827
  this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute ${field}`, {
30827
30828
  entry,
30828
- [field]: path$17
30829
+ [field]: path$16
30829
30830
  });
30830
30831
  }
30831
30832
  return true;
@@ -30853,8 +30854,8 @@ var Unpack = class extends Parser {
30853
30854
  return false;
30854
30855
  }
30855
30856
  if (!this[STRIPABSOLUTEPATH](entry, "path") || !this[STRIPABSOLUTEPATH](entry, "linkpath")) return false;
30856
- if (path.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(path.resolve(entry.path));
30857
- else entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path));
30857
+ if (nodePath.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(nodePath.resolve(entry.path));
30858
+ else entry.absolute = normalizeWindowsPath(nodePath.resolve(this.cwd, entry.path));
30858
30859
  /* c8 ignore start - defense in depth */
30859
30860
  if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
30860
30861
  this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
@@ -30868,9 +30869,9 @@ var Unpack = class extends Parser {
30868
30869
  /* c8 ignore stop */
30869
30870
  if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") return false;
30870
30871
  if (this.win32) {
30871
- const { root: aRoot } = path.win32.parse(String(entry.absolute));
30872
+ const { root: aRoot } = nodePath.win32.parse(String(entry.absolute));
30872
30873
  entry.absolute = aRoot + encode(String(entry.absolute).slice(aRoot.length));
30873
- const { root: pRoot } = path.win32.parse(entry.path);
30874
+ const { root: pRoot } = nodePath.win32.parse(entry.path);
30874
30875
  entry.path = pRoot + encode(entry.path.slice(pRoot.length));
30875
30876
  }
30876
30877
  return true;
@@ -31016,7 +31017,7 @@ var Unpack = class extends Parser {
31016
31017
  this[LINK](entry, String(entry.linkpath), "symlink", done);
31017
31018
  }
31018
31019
  [HARDLINK](entry, done) {
31019
- const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath)));
31020
+ const linkpath = normalizeWindowsPath(nodePath.resolve(this.cwd, String(entry.linkpath)));
31020
31021
  this[LINK](entry, linkpath, "link", done);
31021
31022
  }
31022
31023
  [PEND]() {
@@ -31056,7 +31057,7 @@ var Unpack = class extends Parser {
31056
31057
  };
31057
31058
  const start = () => {
31058
31059
  if (entry.absolute !== this.cwd) {
31059
- const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
31060
+ const parent = normalizeWindowsPath(nodePath.dirname(String(entry.absolute)));
31060
31061
  if (parent !== this.cwd) return this[MKDIR](parent, this.dmode, (er) => {
31061
31062
  if (er) {
31062
31063
  this[ONERROR](er, entry);
@@ -31138,7 +31139,7 @@ var UnpackSync = class extends Unpack {
31138
31139
  this[CHECKED_CWD] = true;
31139
31140
  }
31140
31141
  if (entry.absolute !== this.cwd) {
31141
- const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
31142
+ const parent = normalizeWindowsPath(nodePath.dirname(String(entry.absolute)));
31142
31143
  if (parent !== this.cwd) {
31143
31144
  const mkParent = this[MKDIR](parent, this.dmode);
31144
31145
  if (mkParent) return this[ONERROR](mkParent, entry);
@@ -31410,7 +31411,7 @@ const replaceAsync = (opt, files) => {
31410
31411
  const addFilesSync = (p$1, files) => {
31411
31412
  files.forEach((file) => {
31412
31413
  if (file.charAt(0) === "@") list({
31413
- file: path.resolve(p$1.cwd, file.slice(1)),
31414
+ file: nodePath.resolve(p$1.cwd, file.slice(1)),
31414
31415
  sync: true,
31415
31416
  noResume: true,
31416
31417
  onReadEntry: (entry) => p$1.add(entry)
@@ -31423,7 +31424,7 @@ const addFilesAsync = async (p$1, files) => {
31423
31424
  for (let i$1 = 0; i$1 < files.length; i$1++) {
31424
31425
  const file = String(files[i$1]);
31425
31426
  if (file.charAt(0) === "@") await list({
31426
- file: path.resolve(String(p$1.cwd), file.slice(1)),
31427
+ file: nodePath.resolve(String(p$1.cwd), file.slice(1)),
31427
31428
  noResume: true,
31428
31429
  onReadEntry: (entry) => p$1.add(entry)
31429
31430
  });
@@ -31458,7 +31459,7 @@ const update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFi
31458
31459
  const mtimeFilter = (opt) => {
31459
31460
  const filter = opt.filter;
31460
31461
  if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
31461
- opt.filter = filter ? (path$17, stat) => filter(path$17, stat) && !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path$17, stat) => !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
31462
+ opt.filter = filter ? (path$16, stat) => filter(path$16, stat) && !((opt.mtimeCache?.get(path$16) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path$16, stat) => !((opt.mtimeCache?.get(path$16) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
31462
31463
  };
31463
31464
 
31464
31465
  //#endregion
@@ -31503,6 +31504,30 @@ const entitiesPushCommand = new Command("entities").description("Manage project
31503
31504
  await runCommand(pushEntitiesAction, { requireAuth: true });
31504
31505
  }));
31505
31506
 
31507
+ //#endregion
31508
+ //#region src/cli/commands/functions/deploy.ts
31509
+ async function deployFunctionsAction() {
31510
+ const { functions } = await readProjectConfig();
31511
+ if (functions.length === 0) return { outroMessage: "No functions found. Create functions in the 'functions' directory." };
31512
+ M.info(`Found ${functions.length} ${functions.length === 1 ? "function" : "functions"} to deploy`);
31513
+ const result = await runTask("Deploying functions to Base44", async () => {
31514
+ return await pushFunctions(functions);
31515
+ }, {
31516
+ successMessage: "Functions deployed successfully",
31517
+ errorMessage: "Failed to deploy functions"
31518
+ });
31519
+ if (result.deployed.length > 0) M.success(`Deployed: ${result.deployed.join(", ")}`);
31520
+ if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
31521
+ if (result.errors && result.errors.length > 0) {
31522
+ const errorMessages = result.errors.map((e$1) => ` ${e$1.name}: ${e$1.message}`).join("\n");
31523
+ throw new Error(`Function deployment errors:\n${errorMessages}`);
31524
+ }
31525
+ return {};
31526
+ }
31527
+ const functionsDeployCommand = new Command("functions").description("Manage project functions").addCommand(new Command("deploy").description("Deploy local functions to Base44").action(async () => {
31528
+ await runCommand(deployFunctionsAction, { requireAuth: true });
31529
+ }));
31530
+
31506
31531
  //#endregion
31507
31532
  //#region node_modules/is-plain-obj/index.js
31508
31533
  function isPlainObject(value) {
@@ -32127,7 +32152,7 @@ const green = format(32, 39);
32127
32152
  const yellow = format(33, 39);
32128
32153
  const blue = format(34, 39);
32129
32154
  const magenta = format(35, 39);
32130
- const cyan = format(36, 39);
32155
+ const cyan$1 = format(36, 39);
32131
32156
  const white = format(37, 39);
32132
32157
  const gray = format(90, 39);
32133
32158
  const bgBlack = format(40, 49);
@@ -32296,28 +32321,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32296
32321
  module.exports = isexe;
32297
32322
  isexe.sync = sync;
32298
32323
  var fs$4 = __require("fs");
32299
- function checkPathExt(path$17, options) {
32324
+ function checkPathExt(path$16, options) {
32300
32325
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
32301
32326
  if (!pathext) return true;
32302
32327
  pathext = pathext.split(";");
32303
32328
  if (pathext.indexOf("") !== -1) return true;
32304
32329
  for (var i$1 = 0; i$1 < pathext.length; i$1++) {
32305
32330
  var p$1 = pathext[i$1].toLowerCase();
32306
- if (p$1 && path$17.substr(-p$1.length).toLowerCase() === p$1) return true;
32331
+ if (p$1 && path$16.substr(-p$1.length).toLowerCase() === p$1) return true;
32307
32332
  }
32308
32333
  return false;
32309
32334
  }
32310
- function checkStat(stat, path$17, options) {
32335
+ function checkStat(stat, path$16, options) {
32311
32336
  if (!stat.isSymbolicLink() && !stat.isFile()) return false;
32312
- return checkPathExt(path$17, options);
32337
+ return checkPathExt(path$16, options);
32313
32338
  }
32314
- function isexe(path$17, options, cb) {
32315
- fs$4.stat(path$17, function(er, stat) {
32316
- cb(er, er ? false : checkStat(stat, path$17, options));
32339
+ function isexe(path$16, options, cb) {
32340
+ fs$4.stat(path$16, function(er, stat) {
32341
+ cb(er, er ? false : checkStat(stat, path$16, options));
32317
32342
  });
32318
32343
  }
32319
- function sync(path$17, options) {
32320
- return checkStat(fs$4.statSync(path$17), path$17, options);
32344
+ function sync(path$16, options) {
32345
+ return checkStat(fs$4.statSync(path$16), path$16, options);
32321
32346
  }
32322
32347
  }));
32323
32348
 
@@ -32327,13 +32352,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32327
32352
  module.exports = isexe;
32328
32353
  isexe.sync = sync;
32329
32354
  var fs$3 = __require("fs");
32330
- function isexe(path$17, options, cb) {
32331
- fs$3.stat(path$17, function(er, stat) {
32355
+ function isexe(path$16, options, cb) {
32356
+ fs$3.stat(path$16, function(er, stat) {
32332
32357
  cb(er, er ? false : checkStat(stat, options));
32333
32358
  });
32334
32359
  }
32335
- function sync(path$17, options) {
32336
- return checkStat(fs$3.statSync(path$17), options);
32360
+ function sync(path$16, options) {
32361
+ return checkStat(fs$3.statSync(path$16), options);
32337
32362
  }
32338
32363
  function checkStat(stat, options) {
32339
32364
  return stat.isFile() && checkMode(stat, options);
@@ -32361,7 +32386,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32361
32386
  else core = require_mode();
32362
32387
  module.exports = isexe;
32363
32388
  isexe.sync = sync;
32364
- function isexe(path$17, options, cb) {
32389
+ function isexe(path$16, options, cb) {
32365
32390
  if (typeof options === "function") {
32366
32391
  cb = options;
32367
32392
  options = {};
@@ -32369,13 +32394,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32369
32394
  if (!cb) {
32370
32395
  if (typeof Promise !== "function") throw new TypeError("callback not provided");
32371
32396
  return new Promise(function(resolve$1, reject) {
32372
- isexe(path$17, options || {}, function(er, is) {
32397
+ isexe(path$16, options || {}, function(er, is) {
32373
32398
  if (er) reject(er);
32374
32399
  else resolve$1(is);
32375
32400
  });
32376
32401
  });
32377
32402
  }
32378
- core(path$17, options || {}, function(er, is) {
32403
+ core(path$16, options || {}, function(er, is) {
32379
32404
  if (er) {
32380
32405
  if (er.code === "EACCES" || options && options.ignoreErrors) {
32381
32406
  er = null;
@@ -32385,9 +32410,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32385
32410
  cb(er, is);
32386
32411
  });
32387
32412
  }
32388
- function sync(path$17, options) {
32413
+ function sync(path$16, options) {
32389
32414
  try {
32390
- return core.sync(path$17, options || {});
32415
+ return core.sync(path$16, options || {});
32391
32416
  } catch (er) {
32392
32417
  if (options && options.ignoreErrors || er.code === "EACCES") return false;
32393
32418
  else throw er;
@@ -32399,7 +32424,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32399
32424
  //#region node_modules/which/which.js
32400
32425
  var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32401
32426
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
32402
- const path$4 = __require("path");
32427
+ const path$3 = __require("path");
32403
32428
  const COLON = isWindows ? ";" : ":";
32404
32429
  const isexe = require_isexe();
32405
32430
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -32429,7 +32454,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32429
32454
  if (i$1 === pathEnv.length) return opt.all && found.length ? resolve$1(found) : reject(getNotFoundError(cmd));
32430
32455
  const ppRaw = pathEnv[i$1];
32431
32456
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
32432
- const pCmd = path$4.join(pathPart, cmd);
32457
+ const pCmd = path$3.join(pathPart, cmd);
32433
32458
  resolve$1(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
32434
32459
  });
32435
32460
  const subStep = (p$1, i$1, ii) => new Promise((resolve$1, reject) => {
@@ -32450,7 +32475,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32450
32475
  for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
32451
32476
  const ppRaw = pathEnv[i$1];
32452
32477
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
32453
- const pCmd = path$4.join(pathPart, cmd);
32478
+ const pCmd = path$3.join(pathPart, cmd);
32454
32479
  const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
32455
32480
  for (let j = 0; j < pathExt.length; j++) {
32456
32481
  const cur = p$1 + pathExt[j];
@@ -32483,7 +32508,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32483
32508
  //#endregion
32484
32509
  //#region node_modules/cross-spawn/lib/util/resolveCommand.js
32485
32510
  var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32486
- const path$3 = __require("path");
32511
+ const path$2 = __require("path");
32487
32512
  const which = require_which();
32488
32513
  const getPathKey = require_path_key();
32489
32514
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -32498,12 +32523,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
32498
32523
  try {
32499
32524
  resolved = which.sync(parsed.command, {
32500
32525
  path: env$1[getPathKey({ env: env$1 })],
32501
- pathExt: withoutPathExt ? path$3.delimiter : void 0
32526
+ pathExt: withoutPathExt ? path$2.delimiter : void 0
32502
32527
  });
32503
32528
  } catch (e$1) {} finally {
32504
32529
  if (shouldSwitchCwd) process.chdir(cwd);
32505
32530
  }
32506
- if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
32531
+ if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
32507
32532
  return resolved;
32508
32533
  }
32509
32534
  function resolveCommand(parsed) {
@@ -32546,8 +32571,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
32546
32571
  module.exports = (string$2 = "") => {
32547
32572
  const match = string$2.match(shebangRegex);
32548
32573
  if (!match) return null;
32549
- const [path$17, argument] = match[0].replace(/#! ?/, "").split(" ");
32550
- const binary = path$17.split("/").pop();
32574
+ const [path$16, argument] = match[0].replace(/#! ?/, "").split(" ");
32575
+ const binary = path$16.split("/").pop();
32551
32576
  if (binary === "env") return argument;
32552
32577
  return argument ? `${binary} ${argument}` : binary;
32553
32578
  };
@@ -32575,7 +32600,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32575
32600
  //#endregion
32576
32601
  //#region node_modules/cross-spawn/lib/parse.js
32577
32602
  var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32578
- const path$2 = __require("path");
32603
+ const path$1 = __require("path");
32579
32604
  const resolveCommand = require_resolveCommand();
32580
32605
  const escape = require_escape();
32581
32606
  const readShebang = require_readShebang();
@@ -32598,7 +32623,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
32598
32623
  const needsShell = !isExecutableRegExp.test(commandFile);
32599
32624
  if (parsed.options.forceShell || needsShell) {
32600
32625
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
32601
- parsed.command = path$2.normalize(parsed.command);
32626
+ parsed.command = path$1.normalize(parsed.command);
32602
32627
  parsed.command = escape.command(parsed.command);
32603
32628
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
32604
32629
  parsed.args = [
@@ -32716,12 +32741,12 @@ function toPath(urlOrPath) {
32716
32741
  }
32717
32742
  function traversePathUp(startPath) {
32718
32743
  return { *[Symbol.iterator]() {
32719
- let currentPath = path.resolve(toPath(startPath));
32744
+ let currentPath = nodePath.resolve(toPath(startPath));
32720
32745
  let previousPath;
32721
32746
  while (previousPath !== currentPath) {
32722
32747
  yield currentPath;
32723
32748
  previousPath = currentPath;
32724
- currentPath = path.resolve(currentPath, "..");
32749
+ currentPath = nodePath.resolve(currentPath, "..");
32725
32750
  }
32726
32751
  } };
32727
32752
  }
@@ -32730,21 +32755,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
32730
32755
  //#endregion
32731
32756
  //#region node_modules/npm-run-path/index.js
32732
32757
  const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
32733
- const cwdPath = path.resolve(toPath(cwd));
32758
+ const cwdPath = nodePath.resolve(toPath(cwd));
32734
32759
  const result = [];
32735
- const pathParts = pathOption.split(path.delimiter);
32760
+ const pathParts = pathOption.split(nodePath.delimiter);
32736
32761
  if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
32737
32762
  if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
32738
- return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
32763
+ return pathOption === "" || pathOption === nodePath.delimiter ? `${result.join(nodePath.delimiter)}${pathOption}` : [...result, pathOption].join(nodePath.delimiter);
32739
32764
  };
32740
32765
  const applyPreferLocal = (result, pathParts, cwdPath) => {
32741
32766
  for (const directory of traversePathUp(cwdPath)) {
32742
- const pathPart = path.join(directory, "node_modules/.bin");
32767
+ const pathPart = nodePath.join(directory, "node_modules/.bin");
32743
32768
  if (!pathParts.includes(pathPart)) result.push(pathPart);
32744
32769
  }
32745
32770
  };
32746
32771
  const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
32747
- const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
32772
+ const pathPart = nodePath.resolve(cwdPath, toPath(execPath$1), "..");
32748
32773
  if (!pathParts.includes(pathPart)) result.push(pathPart);
32749
32774
  };
32750
32775
  const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
@@ -33776,10 +33801,10 @@ const mapNode = ({ options }) => {
33776
33801
  node: true
33777
33802
  } };
33778
33803
  };
33779
- const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
33804
+ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath: nodePath$1 = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
33780
33805
  if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
33781
- const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
33782
- const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
33806
+ const normalizedNodePath = safeNormalizeFileUrl(nodePath$1, "The \"nodePath\" option");
33807
+ const resolvedNodePath = nodePath.resolve(cwd, normalizedNodePath);
33783
33808
  const newOptions = {
33784
33809
  ...options,
33785
33810
  nodePath: resolvedNodePath,
@@ -33791,7 +33816,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
33791
33816
  commandArguments,
33792
33817
  newOptions
33793
33818
  ];
33794
- if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
33819
+ if (nodePath.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
33795
33820
  return [
33796
33821
  resolvedNodePath,
33797
33822
  [
@@ -33878,7 +33903,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
33878
33903
  //#region node_modules/execa/lib/arguments/cwd.js
33879
33904
  const normalizeCwd = (cwd = getDefaultCwd()) => {
33880
33905
  const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
33881
- return path.resolve(cwdString);
33906
+ return nodePath.resolve(cwdString);
33882
33907
  };
33883
33908
  const getDefaultCwd = () => {
33884
33909
  try {
@@ -33917,7 +33942,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
33917
33942
  options.killSignal = normalizeKillSignal(options.killSignal);
33918
33943
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
33919
33944
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
33920
- if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
33945
+ if (y.platform === "win32" && nodePath.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
33921
33946
  return {
33922
33947
  file,
33923
33948
  commandArguments,
@@ -33942,7 +33967,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
33942
33967
  ipc,
33943
33968
  serialization
33944
33969
  });
33945
- const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
33970
+ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath: nodePath$1 }) => {
33946
33971
  const env$1 = extendEnv ? {
33947
33972
  ...y.env,
33948
33973
  ...envOption
@@ -33950,7 +33975,7 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
33950
33975
  if (preferLocal || node) return npmRunPathEnv({
33951
33976
  env: env$1,
33952
33977
  cwd: localDirectory,
33953
- execPath: nodePath,
33978
+ execPath: nodePath$1,
33954
33979
  preferLocal,
33955
33980
  addExecPath: node
33956
33981
  });
@@ -35695,12 +35720,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
35695
35720
  }
35696
35721
  };
35697
35722
  const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
35698
- for (const { path: path$17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
35699
- const pathString = typeof path$17 === "string" ? path$17 : path$17.toString();
35700
- if (append || outputFiles.has(pathString)) appendFileSync(path$17, serializedResult);
35723
+ for (const { path: path$16, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
35724
+ const pathString = typeof path$16 === "string" ? path$16 : path$16.toString();
35725
+ if (append || outputFiles.has(pathString)) appendFileSync(path$16, serializedResult);
35701
35726
  else {
35702
35727
  outputFiles.add(pathString);
35703
- writeFileSync(path$17, serializedResult);
35728
+ writeFileSync(path$16, serializedResult);
35704
35729
  }
35705
35730
  }
35706
35731
  };
@@ -38171,6 +38196,8 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
38171
38196
  //#endregion
38172
38197
  //#region src/cli/commands/project/create.ts
38173
38198
  var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
38199
+ const orange = source_default.hex("#E86B3C");
38200
+ const cyan = source_default.hex("#00D4FF");
38174
38201
  const DEFAULT_TEMPLATE_ID = "backend-only";
38175
38202
  async function getDefaultTemplate() {
38176
38203
  const template = (await listTemplates()).find((t) => t.id === DEFAULT_TEMPLATE_ID);
@@ -38178,8 +38205,8 @@ async function getDefaultTemplate() {
38178
38205
  return template;
38179
38206
  }
38180
38207
  function validateNonInteractiveFlags(command) {
38181
- const { name: name$1, path: path$17 } = command.opts();
38182
- const providedCount = [name$1, path$17].filter(Boolean).length;
38208
+ const { name: name$1, path: path$16 } = command.opts();
38209
+ const providedCount = [name$1, path$16].filter(Boolean).length;
38183
38210
  if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
38184
38211
  }
38185
38212
  async function chooseCreate(options) {
@@ -38250,7 +38277,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
38250
38277
  template
38251
38278
  });
38252
38279
  }, {
38253
- successMessage: theme.colors.base44Orange("Project created successfully"),
38280
+ successMessage: orange("Project created successfully"),
38254
38281
  errorMessage: "Failed to create project"
38255
38282
  });
38256
38283
  await loadProjectEnv(resolvedPath);
@@ -38265,7 +38292,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
38265
38292
  if (shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
38266
38293
  await pushEntities(entities);
38267
38294
  }, {
38268
- successMessage: theme.colors.base44Orange("Entities pushed successfully"),
38295
+ successMessage: orange("Entities pushed successfully"),
38269
38296
  errorMessage: "Failed to push entities"
38270
38297
  });
38271
38298
  }
@@ -38290,16 +38317,16 @@ async function executeCreate({ template, name: rawName, description, projectPath
38290
38317
  updateMessage("Deploying site...");
38291
38318
  return await deploySite(join(resolvedPath, outputDirectory));
38292
38319
  }, {
38293
- successMessage: theme.colors.base44Orange("Site deployed successfully"),
38320
+ successMessage: orange("Site deployed successfully"),
38294
38321
  errorMessage: "Failed to deploy site"
38295
38322
  });
38296
38323
  finalAppUrl = appUrl;
38297
38324
  }
38298
38325
  }
38299
38326
  const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
38300
- M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
38301
- M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
38302
- if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
38327
+ M.message(`${source_default.dim("Project")}: ${orange(name$1)}`);
38328
+ M.message(`${source_default.dim("Dashboard")}: ${cyan(dashboardUrl)}`);
38329
+ if (finalAppUrl) M.message(`${source_default.dim("Site")}: ${cyan(finalAppUrl)}`);
38303
38330
  return { outroMessage: "Your project is set and ready to use" };
38304
38331
  }
38305
38332
  const createCommand = new Command("create").description("Create a new Base44 project").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-p, --path <path>", "Path where to create the project").option("--deploy", "Build and deploy the site").hook("preAction", validateNonInteractiveFlags).action(async (options) => {
@@ -38340,6 +38367,7 @@ program.addCommand(whoamiCommand);
38340
38367
  program.addCommand(logoutCommand);
38341
38368
  program.addCommand(createCommand);
38342
38369
  program.addCommand(entitiesPushCommand);
38370
+ program.addCommand(functionsDeployCommand);
38343
38371
  program.addCommand(siteDeployCommand);
38344
38372
  program.parse();
38345
38373