@base44-preview/cli 0.0.9-pr.75.1247e76 → 0.0.10-pr.75.97830be
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +739 -730
- package/dist/cli/templates/templates.json +4 -4
- 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
|
|
5
|
+
import path, { 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";
|
|
10
8
|
import { aborted, callbackify, debuglog, inspect, promisify, stripVTControlCharacters } from "node:util";
|
|
11
9
|
import * as g from "node:readline";
|
|
12
10
|
import O from "node:readline";
|
|
13
11
|
import Stream, { Duplex, PassThrough, Readable, Transform, Writable, getDefaultHighWaterMark } from "node:stream";
|
|
12
|
+
import os, { constants, homedir, tmpdir } from "node:os";
|
|
14
13
|
import { fileURLToPath } from "node:url";
|
|
15
14
|
import fs$1 from "fs";
|
|
16
|
-
import path, { dirname as dirname$1, parse } from "path";
|
|
15
|
+
import path$1, { dirname as dirname$1, parse } from "path";
|
|
17
16
|
import { finished } from "node:stream/promises";
|
|
18
17
|
import EE, { EventEmitter as EventEmitter$1 } from "events";
|
|
19
18
|
import fsPromises, { access, copyFile, mkdir, readFile, unlink, writeFile } from "node:fs/promises";
|
|
20
19
|
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$
|
|
895
|
+
const path$16 = __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$
|
|
1743
|
+
const localBin = path$16.resolve(baseDir, baseName);
|
|
1744
1744
|
if (fs$10.existsSync(localBin)) return localBin;
|
|
1745
|
-
if (sourceExt.includes(path$
|
|
1745
|
+
if (sourceExt.includes(path$16.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$
|
|
1760
|
+
executableDir = path$16.resolve(path$16.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$
|
|
1765
|
+
const legacyName = path$16.basename(this._scriptPath, path$16.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$
|
|
1770
|
+
launchWithNode = sourceExt.includes(path$16.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$
|
|
2476
|
+
this._name = path$16.basename(filename, path$16.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$
|
|
2491
|
-
if (path$
|
|
2492
|
-
this._executableDir = path$
|
|
2490
|
+
executableDir(path$17) {
|
|
2491
|
+
if (path$17 === void 0) return this._executableDir;
|
|
2492
|
+
this._executableDir = path$17;
|
|
2493
2493
|
return this;
|
|
2494
2494
|
}
|
|
2495
2495
|
/**
|
|
@@ -2705,415 +2705,6 @@ 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
|
-
|
|
3117
2708
|
//#endregion
|
|
3118
2709
|
//#region node_modules/sisteransi/src/index.js
|
|
3119
2710
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
@@ -4701,11 +4292,11 @@ function aborted$1(x$2, startIndex = 0) {
|
|
|
4701
4292
|
for (let i$1 = startIndex; i$1 < x$2.issues.length; i$1++) if (x$2.issues[i$1]?.continue !== true) return true;
|
|
4702
4293
|
return false;
|
|
4703
4294
|
}
|
|
4704
|
-
function prefixIssues(path$
|
|
4295
|
+
function prefixIssues(path$17, issues) {
|
|
4705
4296
|
return issues.map((iss) => {
|
|
4706
4297
|
var _a$1;
|
|
4707
4298
|
(_a$1 = iss).path ?? (_a$1.path = []);
|
|
4708
|
-
iss.path.unshift(path$
|
|
4299
|
+
iss.path.unshift(path$17);
|
|
4709
4300
|
return iss;
|
|
4710
4301
|
});
|
|
4711
4302
|
}
|
|
@@ -9180,7 +8771,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9180
8771
|
//#region node_modules/dotenv/lib/main.js
|
|
9181
8772
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9182
8773
|
const fs$9 = __require("fs");
|
|
9183
|
-
const path$
|
|
8774
|
+
const path$15 = __require("path");
|
|
9184
8775
|
const os$3 = __require("os");
|
|
9185
8776
|
const crypto = __require("crypto");
|
|
9186
8777
|
const version = require_package$1().version;
|
|
@@ -9318,12 +8909,12 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9318
8909
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
9319
8910
|
for (const filepath of options.path) if (fs$9.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
9320
8911
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
9321
|
-
else possibleVaultPath = path$
|
|
8912
|
+
else possibleVaultPath = path$15.resolve(process.cwd(), ".env.vault");
|
|
9322
8913
|
if (fs$9.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
9323
8914
|
return null;
|
|
9324
8915
|
}
|
|
9325
8916
|
function _resolveHome(envPath) {
|
|
9326
|
-
return envPath[0] === "~" ? path$
|
|
8917
|
+
return envPath[0] === "~" ? path$15.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9327
8918
|
}
|
|
9328
8919
|
function _configVault(options) {
|
|
9329
8920
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -9336,7 +8927,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9336
8927
|
return { parsed };
|
|
9337
8928
|
}
|
|
9338
8929
|
function configDotenv(options) {
|
|
9339
|
-
const dotenvPath = path$
|
|
8930
|
+
const dotenvPath = path$15.resolve(process.cwd(), ".env");
|
|
9340
8931
|
let encoding = "utf8";
|
|
9341
8932
|
let processEnv = process.env;
|
|
9342
8933
|
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
@@ -9352,11 +8943,11 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9352
8943
|
}
|
|
9353
8944
|
let lastError;
|
|
9354
8945
|
const parsedAll = {};
|
|
9355
|
-
for (const path$
|
|
9356
|
-
const parsed = DotenvModule.parse(fs$9.readFileSync(path$
|
|
8946
|
+
for (const path$17 of optionPaths) try {
|
|
8947
|
+
const parsed = DotenvModule.parse(fs$9.readFileSync(path$17, { encoding }));
|
|
9357
8948
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
9358
8949
|
} catch (e$1) {
|
|
9359
|
-
if (debug) _debug(`Failed to load ${path$
|
|
8950
|
+
if (debug) _debug(`Failed to load ${path$17} ${e$1.message}`);
|
|
9360
8951
|
lastError = e$1;
|
|
9361
8952
|
}
|
|
9362
8953
|
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
@@ -9366,7 +8957,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9366
8957
|
const keysCount = Object.keys(populated).length;
|
|
9367
8958
|
const shortPaths = [];
|
|
9368
8959
|
for (const filePath of optionPaths) try {
|
|
9369
|
-
const relative = path$
|
|
8960
|
+
const relative = path$15.relative(process.cwd(), filePath);
|
|
9370
8961
|
shortPaths.push(relative);
|
|
9371
8962
|
} catch (e$1) {
|
|
9372
8963
|
if (debug) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
@@ -9684,7 +9275,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9684
9275
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9685
9276
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
9686
9277
|
const os$2 = __require("os");
|
|
9687
|
-
const path$
|
|
9278
|
+
const path$14 = __require("path");
|
|
9688
9279
|
const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
|
|
9689
9280
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
9690
9281
|
/**
|
|
@@ -9713,7 +9304,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9713
9304
|
}
|
|
9714
9305
|
exports.unixify = unixify;
|
|
9715
9306
|
function makeAbsolute(cwd, filepath) {
|
|
9716
|
-
return path$
|
|
9307
|
+
return path$14.resolve(cwd, filepath);
|
|
9717
9308
|
}
|
|
9718
9309
|
exports.makeAbsolute = makeAbsolute;
|
|
9719
9310
|
function removeLeadingDotSegment(entry) {
|
|
@@ -10979,7 +10570,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
10979
10570
|
//#endregion
|
|
10980
10571
|
//#region node_modules/micromatch/node_modules/picomatch/lib/constants.js
|
|
10981
10572
|
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
10982
|
-
const path$
|
|
10573
|
+
const path$13 = __require("path");
|
|
10983
10574
|
const WIN_SLASH = "\\\\/";
|
|
10984
10575
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
10985
10576
|
/**
|
|
@@ -11104,7 +10695,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11104
10695
|
CHAR_UNDERSCORE: 95,
|
|
11105
10696
|
CHAR_VERTICAL_LINE: 124,
|
|
11106
10697
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
11107
|
-
SEP: path$
|
|
10698
|
+
SEP: path$13.sep,
|
|
11108
10699
|
extglobChars(chars) {
|
|
11109
10700
|
return {
|
|
11110
10701
|
"!": {
|
|
@@ -11143,7 +10734,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11143
10734
|
//#endregion
|
|
11144
10735
|
//#region node_modules/micromatch/node_modules/picomatch/lib/utils.js
|
|
11145
10736
|
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11146
|
-
const path$
|
|
10737
|
+
const path$12 = __require("path");
|
|
11147
10738
|
const win32 = process.platform === "win32";
|
|
11148
10739
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
|
|
11149
10740
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -11163,7 +10754,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11163
10754
|
};
|
|
11164
10755
|
exports.isWindows = (options) => {
|
|
11165
10756
|
if (options && typeof options.windows === "boolean") return options.windows;
|
|
11166
|
-
return win32 === true || path$
|
|
10757
|
+
return win32 === true || path$12.sep === "\\";
|
|
11167
10758
|
};
|
|
11168
10759
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
11169
10760
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -12339,7 +11930,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12339
11930
|
//#endregion
|
|
12340
11931
|
//#region node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
|
|
12341
11932
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12342
|
-
const path$
|
|
11933
|
+
const path$11 = __require("path");
|
|
12343
11934
|
const scan = require_scan();
|
|
12344
11935
|
const parse = require_parse$2();
|
|
12345
11936
|
const utils = require_utils$3();
|
|
@@ -12478,7 +12069,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12478
12069
|
* @api public
|
|
12479
12070
|
*/
|
|
12480
12071
|
picomatch.matchBase = (input, glob, options, posix$1 = utils.isWindows(options)) => {
|
|
12481
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$
|
|
12072
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$11.basename(input));
|
|
12482
12073
|
};
|
|
12483
12074
|
/**
|
|
12484
12075
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -13036,7 +12627,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13036
12627
|
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13037
12628
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13038
12629
|
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;
|
|
13039
|
-
const path$
|
|
12630
|
+
const path$10 = __require("path");
|
|
13040
12631
|
const globParent = require_glob_parent();
|
|
13041
12632
|
const micromatch = require_micromatch();
|
|
13042
12633
|
const GLOBSTAR = "**";
|
|
@@ -13144,7 +12735,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13144
12735
|
}
|
|
13145
12736
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
13146
12737
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
13147
|
-
const basename$1 = path$
|
|
12738
|
+
const basename$1 = path$10.basename(pattern);
|
|
13148
12739
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename$1);
|
|
13149
12740
|
}
|
|
13150
12741
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -13218,7 +12809,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13218
12809
|
}
|
|
13219
12810
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
13220
12811
|
function isAbsolute(pattern) {
|
|
13221
|
-
return path$
|
|
12812
|
+
return path$10.isAbsolute(pattern);
|
|
13222
12813
|
}
|
|
13223
12814
|
exports.isAbsolute = isAbsolute;
|
|
13224
12815
|
}));
|
|
@@ -13461,8 +13052,8 @@ var require_tasks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13461
13052
|
var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13462
13053
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13463
13054
|
exports.read = void 0;
|
|
13464
|
-
function read(path$
|
|
13465
|
-
settings.fs.lstat(path$
|
|
13055
|
+
function read(path$17, settings, callback) {
|
|
13056
|
+
settings.fs.lstat(path$17, (lstatError, lstat) => {
|
|
13466
13057
|
if (lstatError !== null) {
|
|
13467
13058
|
callFailureCallback(callback, lstatError);
|
|
13468
13059
|
return;
|
|
@@ -13471,7 +13062,7 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13471
13062
|
callSuccessCallback(callback, lstat);
|
|
13472
13063
|
return;
|
|
13473
13064
|
}
|
|
13474
|
-
settings.fs.stat(path$
|
|
13065
|
+
settings.fs.stat(path$17, (statError, stat) => {
|
|
13475
13066
|
if (statError !== null) {
|
|
13476
13067
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
13477
13068
|
callFailureCallback(callback, statError);
|
|
@@ -13499,11 +13090,11 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13499
13090
|
var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13500
13091
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13501
13092
|
exports.read = void 0;
|
|
13502
|
-
function read(path$
|
|
13503
|
-
const lstat = settings.fs.lstatSync(path$
|
|
13093
|
+
function read(path$17, settings) {
|
|
13094
|
+
const lstat = settings.fs.lstatSync(path$17);
|
|
13504
13095
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
|
|
13505
13096
|
try {
|
|
13506
|
-
const stat = settings.fs.statSync(path$
|
|
13097
|
+
const stat = settings.fs.statSync(path$17);
|
|
13507
13098
|
if (settings.markSymbolicLink) stat.isSymbolicLink = () => true;
|
|
13508
13099
|
return stat;
|
|
13509
13100
|
} catch (error) {
|
|
@@ -13562,17 +13153,17 @@ var require_out$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13562
13153
|
const sync = require_sync$5();
|
|
13563
13154
|
const settings_1 = require_settings$3();
|
|
13564
13155
|
exports.Settings = settings_1.default;
|
|
13565
|
-
function stat(path$
|
|
13156
|
+
function stat(path$17, optionsOrSettingsOrCallback, callback) {
|
|
13566
13157
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13567
|
-
async.read(path$
|
|
13158
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13568
13159
|
return;
|
|
13569
13160
|
}
|
|
13570
|
-
async.read(path$
|
|
13161
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13571
13162
|
}
|
|
13572
13163
|
exports.stat = stat;
|
|
13573
|
-
function statSync(path$
|
|
13164
|
+
function statSync(path$17, optionsOrSettings) {
|
|
13574
13165
|
const settings = getSettings(optionsOrSettings);
|
|
13575
|
-
return sync.read(path$
|
|
13166
|
+
return sync.read(path$17, settings);
|
|
13576
13167
|
}
|
|
13577
13168
|
exports.statSync = statSync;
|
|
13578
13169
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -13771,16 +13362,16 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13771
13362
|
return;
|
|
13772
13363
|
}
|
|
13773
13364
|
rpl(names.map((name$1) => {
|
|
13774
|
-
const path$
|
|
13365
|
+
const path$17 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
|
|
13775
13366
|
return (done) => {
|
|
13776
|
-
fsStat.stat(path$
|
|
13367
|
+
fsStat.stat(path$17, settings.fsStatSettings, (error, stats) => {
|
|
13777
13368
|
if (error !== null) {
|
|
13778
13369
|
done(error);
|
|
13779
13370
|
return;
|
|
13780
13371
|
}
|
|
13781
13372
|
const entry = {
|
|
13782
13373
|
name: name$1,
|
|
13783
|
-
path: path$
|
|
13374
|
+
path: path$17,
|
|
13784
13375
|
dirent: utils.fs.createDirentFromStats(name$1, stats)
|
|
13785
13376
|
};
|
|
13786
13377
|
if (settings.stats) entry.stats = stats;
|
|
@@ -13877,7 +13468,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13877
13468
|
//#region node_modules/@nodelib/fs.scandir/out/settings.js
|
|
13878
13469
|
var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13879
13470
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13880
|
-
const path$
|
|
13471
|
+
const path$9 = __require("path");
|
|
13881
13472
|
const fsStat = require_out$3();
|
|
13882
13473
|
const fs = require_fs();
|
|
13883
13474
|
var Settings = class {
|
|
@@ -13885,7 +13476,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13885
13476
|
this._options = _options;
|
|
13886
13477
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
13887
13478
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
13888
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
13479
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$9.sep);
|
|
13889
13480
|
this.stats = this._getValue(this._options.stats, false);
|
|
13890
13481
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
13891
13482
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -13910,17 +13501,17 @@ var require_out$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13910
13501
|
const sync = require_sync$4();
|
|
13911
13502
|
const settings_1 = require_settings$2();
|
|
13912
13503
|
exports.Settings = settings_1.default;
|
|
13913
|
-
function scandir(path$
|
|
13504
|
+
function scandir(path$17, optionsOrSettingsOrCallback, callback) {
|
|
13914
13505
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13915
|
-
async.read(path$
|
|
13506
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13916
13507
|
return;
|
|
13917
13508
|
}
|
|
13918
|
-
async.read(path$
|
|
13509
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13919
13510
|
}
|
|
13920
13511
|
exports.scandir = scandir;
|
|
13921
|
-
function scandirSync(path$
|
|
13512
|
+
function scandirSync(path$17, optionsOrSettings) {
|
|
13922
13513
|
const settings = getSettings(optionsOrSettings);
|
|
13923
|
-
return sync.read(path$
|
|
13514
|
+
return sync.read(path$17, settings);
|
|
13924
13515
|
}
|
|
13925
13516
|
exports.scandirSync = scandirSync;
|
|
13926
13517
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -14490,7 +14081,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14490
14081
|
//#region node_modules/@nodelib/fs.walk/out/settings.js
|
|
14491
14082
|
var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14492
14083
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14493
|
-
const path$
|
|
14084
|
+
const path$8 = __require("path");
|
|
14494
14085
|
const fsScandir = require_out$2();
|
|
14495
14086
|
var Settings = class {
|
|
14496
14087
|
constructor(_options = {}) {
|
|
@@ -14500,7 +14091,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14500
14091
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
14501
14092
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
14502
14093
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
14503
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
14094
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
|
|
14504
14095
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
14505
14096
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
14506
14097
|
fs: this._options.fs,
|
|
@@ -14554,7 +14145,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14554
14145
|
//#region node_modules/fast-glob/out/readers/reader.js
|
|
14555
14146
|
var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14556
14147
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14557
|
-
const path$
|
|
14148
|
+
const path$7 = __require("path");
|
|
14558
14149
|
const fsStat = require_out$3();
|
|
14559
14150
|
const utils = require_utils$2();
|
|
14560
14151
|
var Reader = class {
|
|
@@ -14567,7 +14158,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14567
14158
|
});
|
|
14568
14159
|
}
|
|
14569
14160
|
_getFullEntryPath(filepath) {
|
|
14570
|
-
return path$
|
|
14161
|
+
return path$7.resolve(this._settings.cwd, filepath);
|
|
14571
14162
|
}
|
|
14572
14163
|
_makeEntry(stats, pattern) {
|
|
14573
14164
|
const entry = {
|
|
@@ -14911,7 +14502,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14911
14502
|
//#region node_modules/fast-glob/out/providers/provider.js
|
|
14912
14503
|
var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14913
14504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14914
|
-
const path$
|
|
14505
|
+
const path$6 = __require("path");
|
|
14915
14506
|
const deep_1 = require_deep();
|
|
14916
14507
|
const entry_1 = require_entry$1();
|
|
14917
14508
|
const error_1 = require_error();
|
|
@@ -14925,7 +14516,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14925
14516
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
14926
14517
|
}
|
|
14927
14518
|
_getRootDirectory(task) {
|
|
14928
|
-
return path$
|
|
14519
|
+
return path$6.resolve(this._settings.cwd, task.base);
|
|
14929
14520
|
}
|
|
14930
14521
|
_getReaderOptions(task) {
|
|
14931
14522
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -15378,14 +14969,14 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15378
14969
|
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this);
|
|
15379
14970
|
return this._added;
|
|
15380
14971
|
}
|
|
15381
|
-
test(path$
|
|
14972
|
+
test(path$17, checkUnignored, mode) {
|
|
15382
14973
|
let ignored = false;
|
|
15383
14974
|
let unignored = false;
|
|
15384
14975
|
let matchedRule;
|
|
15385
14976
|
this._rules.forEach((rule) => {
|
|
15386
14977
|
const { negative } = rule;
|
|
15387
14978
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
|
|
15388
|
-
if (!rule[mode].test(path$
|
|
14979
|
+
if (!rule[mode].test(path$17)) return;
|
|
15389
14980
|
ignored = !negative;
|
|
15390
14981
|
unignored = negative;
|
|
15391
14982
|
matchedRule = negative ? UNDEFINED : rule;
|
|
@@ -15401,13 +14992,13 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15401
14992
|
const throwError = (message, Ctor) => {
|
|
15402
14993
|
throw new Ctor(message);
|
|
15403
14994
|
};
|
|
15404
|
-
const checkPath = (path$
|
|
15405
|
-
if (!isString(path$
|
|
15406
|
-
if (!path$
|
|
15407
|
-
if (checkPath.isNotRelative(path$
|
|
14995
|
+
const checkPath = (path$17, originalPath, doThrow) => {
|
|
14996
|
+
if (!isString(path$17)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
14997
|
+
if (!path$17) return doThrow(`path must not be empty`, TypeError);
|
|
14998
|
+
if (checkPath.isNotRelative(path$17)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
|
|
15408
14999
|
return true;
|
|
15409
15000
|
};
|
|
15410
|
-
const isNotRelative = (path$
|
|
15001
|
+
const isNotRelative = (path$17) => REGEX_TEST_INVALID_PATH.test(path$17);
|
|
15411
15002
|
checkPath.isNotRelative = isNotRelative;
|
|
15412
15003
|
/* istanbul ignore next */
|
|
15413
15004
|
checkPath.convert = (p$1) => p$1;
|
|
@@ -15430,49 +15021,49 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15430
15021
|
return this.add(pattern);
|
|
15431
15022
|
}
|
|
15432
15023
|
_test(originalPath, cache$1, checkUnignored, slices) {
|
|
15433
|
-
const path$
|
|
15434
|
-
checkPath(path$
|
|
15435
|
-
return this._t(path$
|
|
15024
|
+
const path$17 = originalPath && checkPath.convert(originalPath);
|
|
15025
|
+
checkPath(path$17, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
15026
|
+
return this._t(path$17, cache$1, checkUnignored, slices);
|
|
15436
15027
|
}
|
|
15437
|
-
checkIgnore(path$
|
|
15438
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(path$
|
|
15439
|
-
const slices = path$
|
|
15028
|
+
checkIgnore(path$17) {
|
|
15029
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path$17)) return this.test(path$17);
|
|
15030
|
+
const slices = path$17.split(SLASH).filter(Boolean);
|
|
15440
15031
|
slices.pop();
|
|
15441
15032
|
if (slices.length) {
|
|
15442
15033
|
const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
|
|
15443
15034
|
if (parent.ignored) return parent;
|
|
15444
15035
|
}
|
|
15445
|
-
return this._rules.test(path$
|
|
15036
|
+
return this._rules.test(path$17, false, MODE_CHECK_IGNORE);
|
|
15446
15037
|
}
|
|
15447
|
-
_t(path$
|
|
15448
|
-
if (path$
|
|
15449
|
-
if (!slices) slices = path$
|
|
15038
|
+
_t(path$17, cache$1, checkUnignored, slices) {
|
|
15039
|
+
if (path$17 in cache$1) return cache$1[path$17];
|
|
15040
|
+
if (!slices) slices = path$17.split(SLASH).filter(Boolean);
|
|
15450
15041
|
slices.pop();
|
|
15451
|
-
if (!slices.length) return cache$1[path$
|
|
15042
|
+
if (!slices.length) return cache$1[path$17] = this._rules.test(path$17, checkUnignored, MODE_IGNORE);
|
|
15452
15043
|
const parent = this._t(slices.join(SLASH) + SLASH, cache$1, checkUnignored, slices);
|
|
15453
|
-
return cache$1[path$
|
|
15044
|
+
return cache$1[path$17] = parent.ignored ? parent : this._rules.test(path$17, checkUnignored, MODE_IGNORE);
|
|
15454
15045
|
}
|
|
15455
|
-
ignores(path$
|
|
15456
|
-
return this._test(path$
|
|
15046
|
+
ignores(path$17) {
|
|
15047
|
+
return this._test(path$17, this._ignoreCache, false).ignored;
|
|
15457
15048
|
}
|
|
15458
15049
|
createFilter() {
|
|
15459
|
-
return (path$
|
|
15050
|
+
return (path$17) => !this.ignores(path$17);
|
|
15460
15051
|
}
|
|
15461
15052
|
filter(paths) {
|
|
15462
15053
|
return makeArray(paths).filter(this.createFilter());
|
|
15463
15054
|
}
|
|
15464
|
-
test(path$
|
|
15465
|
-
return this._test(path$
|
|
15055
|
+
test(path$17) {
|
|
15056
|
+
return this._test(path$17, this._testCache, true);
|
|
15466
15057
|
}
|
|
15467
15058
|
};
|
|
15468
15059
|
const factory = (options) => new Ignore(options);
|
|
15469
|
-
const isPathValid = (path$
|
|
15060
|
+
const isPathValid = (path$17) => checkPath(path$17 && checkPath.convert(path$17), path$17, RETURN_FALSE);
|
|
15470
15061
|
/* istanbul ignore next */
|
|
15471
15062
|
const setupWindows = () => {
|
|
15472
15063
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
15473
15064
|
checkPath.convert = makePosix;
|
|
15474
15065
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
15475
|
-
checkPath.isNotRelative = (path$
|
|
15066
|
+
checkPath.isNotRelative = (path$17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$17) || isNotRelative(path$17);
|
|
15476
15067
|
};
|
|
15477
15068
|
/* istanbul ignore next */
|
|
15478
15069
|
if (typeof process !== "undefined" && process.platform === "win32") setupWindows();
|
|
@@ -15486,15 +15077,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15486
15077
|
//#region node_modules/is-path-inside/index.js
|
|
15487
15078
|
var import_ignore = /* @__PURE__ */ __toESM(require_ignore(), 1);
|
|
15488
15079
|
function isPathInside(childPath, parentPath) {
|
|
15489
|
-
const relation =
|
|
15490
|
-
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${
|
|
15080
|
+
const relation = path.relative(parentPath, childPath);
|
|
15081
|
+
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath));
|
|
15491
15082
|
}
|
|
15492
15083
|
|
|
15493
15084
|
//#endregion
|
|
15494
15085
|
//#region node_modules/slash/index.js
|
|
15495
|
-
function slash(path$
|
|
15496
|
-
if (path$
|
|
15497
|
-
return path$
|
|
15086
|
+
function slash(path$17) {
|
|
15087
|
+
if (path$17.startsWith("\\\\?\\")) return path$17;
|
|
15088
|
+
return path$17.replace(/\\/g, "/");
|
|
15498
15089
|
}
|
|
15499
15090
|
|
|
15500
15091
|
//#endregion
|
|
@@ -15580,7 +15171,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15580
15171
|
let currentPath = startPath;
|
|
15581
15172
|
chain.push(currentPath);
|
|
15582
15173
|
while (currentPath !== rootPath) {
|
|
15583
|
-
const parentPath =
|
|
15174
|
+
const parentPath = path.dirname(currentPath);
|
|
15584
15175
|
if (parentPath === currentPath) break;
|
|
15585
15176
|
currentPath = parentPath;
|
|
15586
15177
|
chain.push(currentPath);
|
|
@@ -15589,7 +15180,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15589
15180
|
};
|
|
15590
15181
|
const findGitRootInChain = async (paths, statMethod) => {
|
|
15591
15182
|
for (const directory of paths) {
|
|
15592
|
-
const gitPath =
|
|
15183
|
+
const gitPath = path.join(directory, ".git");
|
|
15593
15184
|
try {
|
|
15594
15185
|
if (pathHasGitDirectory(await statMethod(gitPath))) return directory;
|
|
15595
15186
|
} catch {}
|
|
@@ -15598,11 +15189,11 @@ const findGitRootInChain = async (paths, statMethod) => {
|
|
|
15598
15189
|
const findGitRootSyncUncached = (cwd, fsImplementation) => {
|
|
15599
15190
|
const statSyncMethod = getStatSyncMethod$1(fsImplementation);
|
|
15600
15191
|
if (!statSyncMethod) return;
|
|
15601
|
-
const currentPath =
|
|
15602
|
-
const { root } =
|
|
15192
|
+
const currentPath = path.resolve(cwd);
|
|
15193
|
+
const { root } = path.parse(currentPath);
|
|
15603
15194
|
const chain = buildPathChain(currentPath, root);
|
|
15604
15195
|
for (const directory of chain) {
|
|
15605
|
-
const gitPath =
|
|
15196
|
+
const gitPath = path.join(directory, ".git");
|
|
15606
15197
|
try {
|
|
15607
15198
|
if (pathHasGitDirectory(statSyncMethod(gitPath))) return directory;
|
|
15608
15199
|
} catch {}
|
|
@@ -15615,8 +15206,8 @@ const findGitRootSync = (cwd, fsImplementation) => {
|
|
|
15615
15206
|
const findGitRootAsyncUncached = async (cwd, fsImplementation) => {
|
|
15616
15207
|
const statMethod = getAsyncStatMethod(fsImplementation);
|
|
15617
15208
|
if (!statMethod) return findGitRootSync(cwd, fsImplementation);
|
|
15618
|
-
const currentPath =
|
|
15619
|
-
const { root } =
|
|
15209
|
+
const currentPath = path.resolve(cwd);
|
|
15210
|
+
const { root } = path.parse(currentPath);
|
|
15620
15211
|
return findGitRootInChain(buildPathChain(currentPath, root), statMethod);
|
|
15621
15212
|
};
|
|
15622
15213
|
const findGitRoot = async (cwd, fsImplementation) => {
|
|
@@ -15631,8 +15222,8 @@ Get paths to all .gitignore files from git root to cwd (inclusive).
|
|
|
15631
15222
|
@returns {string[]} Array of .gitignore file paths to search for.
|
|
15632
15223
|
*/
|
|
15633
15224
|
const isWithinGitRoot = (gitRoot, cwd) => {
|
|
15634
|
-
const resolvedGitRoot =
|
|
15635
|
-
const resolvedCwd =
|
|
15225
|
+
const resolvedGitRoot = path.resolve(gitRoot);
|
|
15226
|
+
const resolvedCwd = path.resolve(cwd);
|
|
15636
15227
|
return resolvedCwd === resolvedGitRoot || isPathInside(resolvedCwd, resolvedGitRoot);
|
|
15637
15228
|
};
|
|
15638
15229
|
const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
@@ -15640,7 +15231,7 @@ const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
|
15640
15231
|
if (typeof cwd !== "string") throw new TypeError("cwd must be a string");
|
|
15641
15232
|
if (!gitRoot) return [];
|
|
15642
15233
|
if (!isWithinGitRoot(gitRoot, cwd)) return [];
|
|
15643
|
-
return [...buildPathChain(
|
|
15234
|
+
return [...buildPathChain(path.resolve(cwd), path.resolve(gitRoot))].reverse().map((directory) => path.join(directory, ".gitignore"));
|
|
15644
15235
|
};
|
|
15645
15236
|
/**
|
|
15646
15237
|
Convert ignore patterns to fast-glob compatible format.
|
|
@@ -15747,18 +15338,18 @@ const applyBaseToPattern = (pattern, base) => {
|
|
|
15747
15338
|
const slashIndex = cleanPattern.indexOf("/");
|
|
15748
15339
|
const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
|
|
15749
15340
|
let result;
|
|
15750
|
-
if (!hasNonTrailingSlash) result =
|
|
15751
|
-
else if (cleanPattern.startsWith("/")) result =
|
|
15752
|
-
else result =
|
|
15341
|
+
if (!hasNonTrailingSlash) result = path.posix.join(base, "**", cleanPattern);
|
|
15342
|
+
else if (cleanPattern.startsWith("/")) result = path.posix.join(base, cleanPattern.slice(1));
|
|
15343
|
+
else result = path.posix.join(base, cleanPattern);
|
|
15753
15344
|
return isNegative ? "!" + result : result;
|
|
15754
15345
|
};
|
|
15755
15346
|
const parseIgnoreFile = (file, cwd) => {
|
|
15756
|
-
const base = slash(
|
|
15347
|
+
const base = slash(path.relative(cwd, path.dirname(file.filePath)));
|
|
15757
15348
|
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
15758
15349
|
};
|
|
15759
15350
|
const toRelativePath = (fileOrDirectory, cwd) => {
|
|
15760
|
-
if (
|
|
15761
|
-
const relativePath =
|
|
15351
|
+
if (path.isAbsolute(fileOrDirectory)) {
|
|
15352
|
+
const relativePath = path.relative(cwd, fileOrDirectory);
|
|
15762
15353
|
if (relativePath && !isPathInside(fileOrDirectory, cwd)) return;
|
|
15763
15354
|
return relativePath;
|
|
15764
15355
|
}
|
|
@@ -15768,11 +15359,11 @@ const toRelativePath = (fileOrDirectory, cwd) => {
|
|
|
15768
15359
|
};
|
|
15769
15360
|
const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
15770
15361
|
const ignores = (0, import_ignore.default)().add(patterns);
|
|
15771
|
-
const resolvedCwd =
|
|
15772
|
-
const resolvedBaseDir =
|
|
15362
|
+
const resolvedCwd = path.normalize(path.resolve(cwd));
|
|
15363
|
+
const resolvedBaseDir = path.normalize(path.resolve(baseDir));
|
|
15773
15364
|
return (fileOrDirectory) => {
|
|
15774
15365
|
fileOrDirectory = toPath$1(fileOrDirectory);
|
|
15775
|
-
if (
|
|
15366
|
+
if (path.normalize(path.resolve(fileOrDirectory)) === resolvedCwd) return false;
|
|
15776
15367
|
const relativePath = toRelativePath(fileOrDirectory, resolvedBaseDir);
|
|
15777
15368
|
if (relativePath === void 0) return false;
|
|
15778
15369
|
return relativePath ? ignores.ignores(slash(relativePath)) : false;
|
|
@@ -15847,35 +15438,35 @@ const assertPatternsInput = (patterns) => {
|
|
|
15847
15438
|
};
|
|
15848
15439
|
const getStatMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "stat") ?? bindFsMethod(fs.promises, "stat") ?? promisifyFsMethod(fsImplementation, "stat");
|
|
15849
15440
|
const getStatSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "statSync") ?? bindFsMethod(fs, "statSync");
|
|
15850
|
-
const isDirectory = async (path$
|
|
15441
|
+
const isDirectory = async (path$17, fsImplementation) => {
|
|
15851
15442
|
try {
|
|
15852
|
-
return (await getStatMethod(fsImplementation)(path$
|
|
15443
|
+
return (await getStatMethod(fsImplementation)(path$17)).isDirectory();
|
|
15853
15444
|
} catch {
|
|
15854
15445
|
return false;
|
|
15855
15446
|
}
|
|
15856
15447
|
};
|
|
15857
|
-
const isDirectorySync = (path$
|
|
15448
|
+
const isDirectorySync = (path$17, fsImplementation) => {
|
|
15858
15449
|
try {
|
|
15859
|
-
return getStatSyncMethod(fsImplementation)(path$
|
|
15450
|
+
return getStatSyncMethod(fsImplementation)(path$17).isDirectory();
|
|
15860
15451
|
} catch {
|
|
15861
15452
|
return false;
|
|
15862
15453
|
}
|
|
15863
15454
|
};
|
|
15864
15455
|
const normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
15865
|
-
const path$
|
|
15866
|
-
return
|
|
15456
|
+
const path$17 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
15457
|
+
return path.isAbsolute(path$17) ? path$17 : path.join(cwd, path$17);
|
|
15867
15458
|
};
|
|
15868
15459
|
const shouldExpandGlobstarDirectory = (pattern) => {
|
|
15869
15460
|
const match = pattern?.match(/\*\*\/([^/]+)$/);
|
|
15870
15461
|
if (!match) return false;
|
|
15871
15462
|
const dirname$2 = match[1];
|
|
15872
15463
|
const hasWildcards = /[*?[\]{}]/.test(dirname$2);
|
|
15873
|
-
const hasExtension =
|
|
15464
|
+
const hasExtension = path.extname(dirname$2) && !dirname$2.startsWith(".");
|
|
15874
15465
|
return !hasWildcards && !hasExtension;
|
|
15875
15466
|
};
|
|
15876
15467
|
const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
15877
15468
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
15878
|
-
return files ? files.map((file) =>
|
|
15469
|
+
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
15879
15470
|
};
|
|
15880
15471
|
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
15881
15472
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
@@ -15990,12 +15581,12 @@ const createFilterFunction = (isIgnored, cwd) => {
|
|
|
15990
15581
|
const basePath = cwd || y.cwd();
|
|
15991
15582
|
const pathCache = /* @__PURE__ */ new Map();
|
|
15992
15583
|
return (fastGlobResult) => {
|
|
15993
|
-
const pathKey$1 =
|
|
15584
|
+
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
15994
15585
|
if (seen.has(pathKey$1)) return false;
|
|
15995
15586
|
if (isIgnored) {
|
|
15996
15587
|
let absolutePath = pathCache.get(pathKey$1);
|
|
15997
15588
|
if (absolutePath === void 0) {
|
|
15998
|
-
absolutePath =
|
|
15589
|
+
absolutePath = path.isAbsolute(pathKey$1) ? pathKey$1 : path.resolve(basePath, pathKey$1);
|
|
15999
15590
|
pathCache.set(pathKey$1, absolutePath);
|
|
16000
15591
|
if (pathCache.size > 1e4) pathCache.clear();
|
|
16001
15592
|
}
|
|
@@ -17068,9 +16659,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17068
16659
|
//#endregion
|
|
17069
16660
|
//#region src/core/utils/fs.ts
|
|
17070
16661
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
17071
|
-
async function pathExists(path$
|
|
16662
|
+
async function pathExists(path$17) {
|
|
17072
16663
|
try {
|
|
17073
|
-
await access(path$
|
|
16664
|
+
await access(path$17);
|
|
17074
16665
|
return true;
|
|
17075
16666
|
} catch {
|
|
17076
16667
|
return false;
|
|
@@ -17239,14 +16830,10 @@ function toDeployPayloadItem(fn) {
|
|
|
17239
16830
|
async function deployFunctions(functions) {
|
|
17240
16831
|
const appClient = getAppClient();
|
|
17241
16832
|
const payload = { functions: functions.map(toDeployPayloadItem) };
|
|
17242
|
-
const response = await appClient.put("backend-functions
|
|
16833
|
+
const response = await appClient.put("backend-functions", {
|
|
17243
16834
|
json: payload,
|
|
17244
|
-
|
|
16835
|
+
timeout: 3e4
|
|
17245
16836
|
});
|
|
17246
|
-
if (!response.ok) {
|
|
17247
|
-
const errorJson = await response.json();
|
|
17248
|
-
throw new Error(`Failed to deploy functions: ${errorJson}`);
|
|
17249
|
-
}
|
|
17250
16837
|
return DeployFunctionsResponseSchema.parse(await response.json());
|
|
17251
16838
|
}
|
|
17252
16839
|
|
|
@@ -17621,7 +17208,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17621
17208
|
* @public
|
|
17622
17209
|
*/
|
|
17623
17210
|
var fs$5 = __require("fs");
|
|
17624
|
-
var path$
|
|
17211
|
+
var path$5 = __require("path");
|
|
17625
17212
|
var utils = require_utils();
|
|
17626
17213
|
var scopeOptionWarned = false;
|
|
17627
17214
|
/** @type {string} */
|
|
@@ -17691,9 +17278,9 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17691
17278
|
* @return {String}
|
|
17692
17279
|
*/
|
|
17693
17280
|
exports.resolveInclude = function(name$1, filename, isDir) {
|
|
17694
|
-
var dirname$2 = path$
|
|
17695
|
-
var extname = path$
|
|
17696
|
-
var resolve$1 = path$
|
|
17281
|
+
var dirname$2 = path$5.dirname;
|
|
17282
|
+
var extname = path$5.extname;
|
|
17283
|
+
var resolve$1 = path$5.resolve;
|
|
17697
17284
|
var includePath = resolve$1(isDir ? filename : dirname$2(filename), name$1);
|
|
17698
17285
|
if (!extname(name$1)) includePath += ".ejs";
|
|
17699
17286
|
return includePath;
|
|
@@ -17719,22 +17306,22 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17719
17306
|
* @param {Options} options compilation options
|
|
17720
17307
|
* @return {String}
|
|
17721
17308
|
*/
|
|
17722
|
-
function getIncludePath(path$
|
|
17309
|
+
function getIncludePath(path$17, options) {
|
|
17723
17310
|
var includePath;
|
|
17724
17311
|
var filePath;
|
|
17725
17312
|
var views = options.views;
|
|
17726
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(path$
|
|
17313
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path$17);
|
|
17727
17314
|
if (match && match.length) {
|
|
17728
|
-
path$
|
|
17729
|
-
if (Array.isArray(options.root)) includePath = resolvePaths(path$
|
|
17730
|
-
else includePath = exports.resolveInclude(path$
|
|
17315
|
+
path$17 = path$17.replace(/^\/*/, "");
|
|
17316
|
+
if (Array.isArray(options.root)) includePath = resolvePaths(path$17, options.root);
|
|
17317
|
+
else includePath = exports.resolveInclude(path$17, options.root || "/", true);
|
|
17731
17318
|
} else {
|
|
17732
17319
|
if (options.filename) {
|
|
17733
|
-
filePath = exports.resolveInclude(path$
|
|
17320
|
+
filePath = exports.resolveInclude(path$17, options.filename);
|
|
17734
17321
|
if (fs$5.existsSync(filePath)) includePath = filePath;
|
|
17735
17322
|
}
|
|
17736
|
-
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$
|
|
17737
|
-
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$
|
|
17323
|
+
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$17, views);
|
|
17324
|
+
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$17) + "\"");
|
|
17738
17325
|
}
|
|
17739
17326
|
return includePath;
|
|
17740
17327
|
}
|
|
@@ -17826,11 +17413,11 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17826
17413
|
* Depending on the value of `options.client`, either type might be returned
|
|
17827
17414
|
* @static
|
|
17828
17415
|
*/
|
|
17829
|
-
function includeFile(path$
|
|
17416
|
+
function includeFile(path$17, options) {
|
|
17830
17417
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
17831
|
-
opts.filename = getIncludePath(path$
|
|
17418
|
+
opts.filename = getIncludePath(path$17, opts);
|
|
17832
17419
|
if (typeof options.includer === "function") {
|
|
17833
|
-
var includerResult = options.includer(path$
|
|
17420
|
+
var includerResult = options.includer(path$17, opts.filename);
|
|
17834
17421
|
if (includerResult) {
|
|
17835
17422
|
if (includerResult.filename) opts.filename = includerResult.filename;
|
|
17836
17423
|
if (includerResult.template) return handleCache(opts, includerResult.template);
|
|
@@ -18081,10 +17668,10 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18081
17668
|
throw e$1;
|
|
18082
17669
|
}
|
|
18083
17670
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
|
18084
|
-
var include = function(path$
|
|
17671
|
+
var include = function(path$17, includeData) {
|
|
18085
17672
|
var d$2 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
18086
17673
|
if (includeData) d$2 = utils.shallowCopy(d$2, includeData);
|
|
18087
|
-
return includeFile(path$
|
|
17674
|
+
return includeFile(path$17, opts)(d$2);
|
|
18088
17675
|
};
|
|
18089
17676
|
return fn.apply(opts.context, [
|
|
18090
17677
|
data || utils.createNullProtoObjWherePossible(),
|
|
@@ -18095,7 +17682,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18095
17682
|
};
|
|
18096
17683
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
18097
17684
|
var filename = opts.filename;
|
|
18098
|
-
var basename$1 = path$
|
|
17685
|
+
var basename$1 = path$5.basename(filename, path$5.extname(filename));
|
|
18099
17686
|
try {
|
|
18100
17687
|
Object.defineProperty(returnedFn, "name", {
|
|
18101
17688
|
value: basename$1,
|
|
@@ -26203,10 +25790,436 @@ async function getUserInfo(accessToken) {
|
|
|
26203
25790
|
return result.data;
|
|
26204
25791
|
}
|
|
26205
25792
|
|
|
25793
|
+
//#endregion
|
|
25794
|
+
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
25795
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
25796
|
+
const wrapAnsi16 = (offset = 0) => (code$1) => `\u001B[${code$1 + offset}m`;
|
|
25797
|
+
const wrapAnsi256 = (offset = 0) => (code$1) => `\u001B[${38 + offset};5;${code$1}m`;
|
|
25798
|
+
const wrapAnsi16m = (offset = 0) => (red$1, green$1, blue$1) => `\u001B[${38 + offset};2;${red$1};${green$1};${blue$1}m`;
|
|
25799
|
+
const styles$1 = {
|
|
25800
|
+
modifier: {
|
|
25801
|
+
reset: [0, 0],
|
|
25802
|
+
bold: [1, 22],
|
|
25803
|
+
dim: [2, 22],
|
|
25804
|
+
italic: [3, 23],
|
|
25805
|
+
underline: [4, 24],
|
|
25806
|
+
overline: [53, 55],
|
|
25807
|
+
inverse: [7, 27],
|
|
25808
|
+
hidden: [8, 28],
|
|
25809
|
+
strikethrough: [9, 29]
|
|
25810
|
+
},
|
|
25811
|
+
color: {
|
|
25812
|
+
black: [30, 39],
|
|
25813
|
+
red: [31, 39],
|
|
25814
|
+
green: [32, 39],
|
|
25815
|
+
yellow: [33, 39],
|
|
25816
|
+
blue: [34, 39],
|
|
25817
|
+
magenta: [35, 39],
|
|
25818
|
+
cyan: [36, 39],
|
|
25819
|
+
white: [37, 39],
|
|
25820
|
+
blackBright: [90, 39],
|
|
25821
|
+
gray: [90, 39],
|
|
25822
|
+
grey: [90, 39],
|
|
25823
|
+
redBright: [91, 39],
|
|
25824
|
+
greenBright: [92, 39],
|
|
25825
|
+
yellowBright: [93, 39],
|
|
25826
|
+
blueBright: [94, 39],
|
|
25827
|
+
magentaBright: [95, 39],
|
|
25828
|
+
cyanBright: [96, 39],
|
|
25829
|
+
whiteBright: [97, 39]
|
|
25830
|
+
},
|
|
25831
|
+
bgColor: {
|
|
25832
|
+
bgBlack: [40, 49],
|
|
25833
|
+
bgRed: [41, 49],
|
|
25834
|
+
bgGreen: [42, 49],
|
|
25835
|
+
bgYellow: [43, 49],
|
|
25836
|
+
bgBlue: [44, 49],
|
|
25837
|
+
bgMagenta: [45, 49],
|
|
25838
|
+
bgCyan: [46, 49],
|
|
25839
|
+
bgWhite: [47, 49],
|
|
25840
|
+
bgBlackBright: [100, 49],
|
|
25841
|
+
bgGray: [100, 49],
|
|
25842
|
+
bgGrey: [100, 49],
|
|
25843
|
+
bgRedBright: [101, 49],
|
|
25844
|
+
bgGreenBright: [102, 49],
|
|
25845
|
+
bgYellowBright: [103, 49],
|
|
25846
|
+
bgBlueBright: [104, 49],
|
|
25847
|
+
bgMagentaBright: [105, 49],
|
|
25848
|
+
bgCyanBright: [106, 49],
|
|
25849
|
+
bgWhiteBright: [107, 49]
|
|
25850
|
+
}
|
|
25851
|
+
};
|
|
25852
|
+
const modifierNames = Object.keys(styles$1.modifier);
|
|
25853
|
+
const foregroundColorNames = Object.keys(styles$1.color);
|
|
25854
|
+
const backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
25855
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
25856
|
+
function assembleStyles() {
|
|
25857
|
+
const codes = /* @__PURE__ */ new Map();
|
|
25858
|
+
for (const [groupName, group] of Object.entries(styles$1)) {
|
|
25859
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
25860
|
+
styles$1[styleName] = {
|
|
25861
|
+
open: `\u001B[${style[0]}m`,
|
|
25862
|
+
close: `\u001B[${style[1]}m`
|
|
25863
|
+
};
|
|
25864
|
+
group[styleName] = styles$1[styleName];
|
|
25865
|
+
codes.set(style[0], style[1]);
|
|
25866
|
+
}
|
|
25867
|
+
Object.defineProperty(styles$1, groupName, {
|
|
25868
|
+
value: group,
|
|
25869
|
+
enumerable: false
|
|
25870
|
+
});
|
|
25871
|
+
}
|
|
25872
|
+
Object.defineProperty(styles$1, "codes", {
|
|
25873
|
+
value: codes,
|
|
25874
|
+
enumerable: false
|
|
25875
|
+
});
|
|
25876
|
+
styles$1.color.close = "\x1B[39m";
|
|
25877
|
+
styles$1.bgColor.close = "\x1B[49m";
|
|
25878
|
+
styles$1.color.ansi = wrapAnsi16();
|
|
25879
|
+
styles$1.color.ansi256 = wrapAnsi256();
|
|
25880
|
+
styles$1.color.ansi16m = wrapAnsi16m();
|
|
25881
|
+
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
25882
|
+
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
25883
|
+
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
25884
|
+
Object.defineProperties(styles$1, {
|
|
25885
|
+
rgbToAnsi256: {
|
|
25886
|
+
value(red$1, green$1, blue$1) {
|
|
25887
|
+
if (red$1 === green$1 && green$1 === blue$1) {
|
|
25888
|
+
if (red$1 < 8) return 16;
|
|
25889
|
+
if (red$1 > 248) return 231;
|
|
25890
|
+
return Math.round((red$1 - 8) / 247 * 24) + 232;
|
|
25891
|
+
}
|
|
25892
|
+
return 16 + 36 * Math.round(red$1 / 255 * 5) + 6 * Math.round(green$1 / 255 * 5) + Math.round(blue$1 / 255 * 5);
|
|
25893
|
+
},
|
|
25894
|
+
enumerable: false
|
|
25895
|
+
},
|
|
25896
|
+
hexToRgb: {
|
|
25897
|
+
value(hex) {
|
|
25898
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
25899
|
+
if (!matches) return [
|
|
25900
|
+
0,
|
|
25901
|
+
0,
|
|
25902
|
+
0
|
|
25903
|
+
];
|
|
25904
|
+
let [colorString] = matches;
|
|
25905
|
+
if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
|
|
25906
|
+
const integer$1 = Number.parseInt(colorString, 16);
|
|
25907
|
+
return [
|
|
25908
|
+
integer$1 >> 16 & 255,
|
|
25909
|
+
integer$1 >> 8 & 255,
|
|
25910
|
+
integer$1 & 255
|
|
25911
|
+
];
|
|
25912
|
+
},
|
|
25913
|
+
enumerable: false
|
|
25914
|
+
},
|
|
25915
|
+
hexToAnsi256: {
|
|
25916
|
+
value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
|
|
25917
|
+
enumerable: false
|
|
25918
|
+
},
|
|
25919
|
+
ansi256ToAnsi: {
|
|
25920
|
+
value(code$1) {
|
|
25921
|
+
if (code$1 < 8) return 30 + code$1;
|
|
25922
|
+
if (code$1 < 16) return 90 + (code$1 - 8);
|
|
25923
|
+
let red$1;
|
|
25924
|
+
let green$1;
|
|
25925
|
+
let blue$1;
|
|
25926
|
+
if (code$1 >= 232) {
|
|
25927
|
+
red$1 = ((code$1 - 232) * 10 + 8) / 255;
|
|
25928
|
+
green$1 = red$1;
|
|
25929
|
+
blue$1 = red$1;
|
|
25930
|
+
} else {
|
|
25931
|
+
code$1 -= 16;
|
|
25932
|
+
const remainder = code$1 % 36;
|
|
25933
|
+
red$1 = Math.floor(code$1 / 36) / 5;
|
|
25934
|
+
green$1 = Math.floor(remainder / 6) / 5;
|
|
25935
|
+
blue$1 = remainder % 6 / 5;
|
|
25936
|
+
}
|
|
25937
|
+
const value = Math.max(red$1, green$1, blue$1) * 2;
|
|
25938
|
+
if (value === 0) return 30;
|
|
25939
|
+
let result = 30 + (Math.round(blue$1) << 2 | Math.round(green$1) << 1 | Math.round(red$1));
|
|
25940
|
+
if (value === 2) result += 60;
|
|
25941
|
+
return result;
|
|
25942
|
+
},
|
|
25943
|
+
enumerable: false
|
|
25944
|
+
},
|
|
25945
|
+
rgbToAnsi: {
|
|
25946
|
+
value: (red$1, green$1, blue$1) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red$1, green$1, blue$1)),
|
|
25947
|
+
enumerable: false
|
|
25948
|
+
},
|
|
25949
|
+
hexToAnsi: {
|
|
25950
|
+
value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
|
|
25951
|
+
enumerable: false
|
|
25952
|
+
}
|
|
25953
|
+
});
|
|
25954
|
+
return styles$1;
|
|
25955
|
+
}
|
|
25956
|
+
const ansiStyles = assembleStyles();
|
|
25957
|
+
var ansi_styles_default = ansiStyles;
|
|
25958
|
+
|
|
25959
|
+
//#endregion
|
|
25960
|
+
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
25961
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
25962
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
25963
|
+
const position = argv.indexOf(prefix + flag);
|
|
25964
|
+
const terminatorPosition = argv.indexOf("--");
|
|
25965
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
25966
|
+
}
|
|
25967
|
+
const { env } = y;
|
|
25968
|
+
let flagForceColor;
|
|
25969
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
25970
|
+
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
25971
|
+
function envForceColor() {
|
|
25972
|
+
if ("FORCE_COLOR" in env) {
|
|
25973
|
+
if (env.FORCE_COLOR === "true") return 1;
|
|
25974
|
+
if (env.FORCE_COLOR === "false") return 0;
|
|
25975
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
25976
|
+
}
|
|
25977
|
+
}
|
|
25978
|
+
function translateLevel(level) {
|
|
25979
|
+
if (level === 0) return false;
|
|
25980
|
+
return {
|
|
25981
|
+
level,
|
|
25982
|
+
hasBasic: true,
|
|
25983
|
+
has256: level >= 2,
|
|
25984
|
+
has16m: level >= 3
|
|
25985
|
+
};
|
|
25986
|
+
}
|
|
25987
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
25988
|
+
const noFlagForceColor = envForceColor();
|
|
25989
|
+
if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
|
|
25990
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
25991
|
+
if (forceColor === 0) return 0;
|
|
25992
|
+
if (sniffFlags) {
|
|
25993
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
25994
|
+
if (hasFlag("color=256")) return 2;
|
|
25995
|
+
}
|
|
25996
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
|
|
25997
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
25998
|
+
const min = forceColor || 0;
|
|
25999
|
+
if (env.TERM === "dumb") return min;
|
|
26000
|
+
if (y.platform === "win32") {
|
|
26001
|
+
const osRelease = os.release().split(".");
|
|
26002
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
26003
|
+
return 1;
|
|
26004
|
+
}
|
|
26005
|
+
if ("CI" in env) {
|
|
26006
|
+
if ([
|
|
26007
|
+
"GITHUB_ACTIONS",
|
|
26008
|
+
"GITEA_ACTIONS",
|
|
26009
|
+
"CIRCLECI"
|
|
26010
|
+
].some((key) => key in env)) return 3;
|
|
26011
|
+
if ([
|
|
26012
|
+
"TRAVIS",
|
|
26013
|
+
"APPVEYOR",
|
|
26014
|
+
"GITLAB_CI",
|
|
26015
|
+
"BUILDKITE",
|
|
26016
|
+
"DRONE"
|
|
26017
|
+
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
26018
|
+
return min;
|
|
26019
|
+
}
|
|
26020
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
26021
|
+
if (env.COLORTERM === "truecolor") return 3;
|
|
26022
|
+
if (env.TERM === "xterm-kitty") return 3;
|
|
26023
|
+
if (env.TERM === "xterm-ghostty") return 3;
|
|
26024
|
+
if (env.TERM === "wezterm") return 3;
|
|
26025
|
+
if ("TERM_PROGRAM" in env) {
|
|
26026
|
+
const version$2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
26027
|
+
switch (env.TERM_PROGRAM) {
|
|
26028
|
+
case "iTerm.app": return version$2 >= 3 ? 3 : 2;
|
|
26029
|
+
case "Apple_Terminal": return 2;
|
|
26030
|
+
}
|
|
26031
|
+
}
|
|
26032
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
26033
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
26034
|
+
if ("COLORTERM" in env) return 1;
|
|
26035
|
+
return min;
|
|
26036
|
+
}
|
|
26037
|
+
function createSupportsColor(stream, options = {}) {
|
|
26038
|
+
return translateLevel(_supportsColor(stream, {
|
|
26039
|
+
streamIsTTY: stream && stream.isTTY,
|
|
26040
|
+
...options
|
|
26041
|
+
}));
|
|
26042
|
+
}
|
|
26043
|
+
const supportsColor = {
|
|
26044
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
26045
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
26046
|
+
};
|
|
26047
|
+
var supports_color_default = supportsColor;
|
|
26048
|
+
|
|
26049
|
+
//#endregion
|
|
26050
|
+
//#region node_modules/chalk/source/utilities.js
|
|
26051
|
+
function stringReplaceAll(string$2, substring, replacer) {
|
|
26052
|
+
let index = string$2.indexOf(substring);
|
|
26053
|
+
if (index === -1) return string$2;
|
|
26054
|
+
const substringLength = substring.length;
|
|
26055
|
+
let endIndex = 0;
|
|
26056
|
+
let returnValue = "";
|
|
26057
|
+
do {
|
|
26058
|
+
returnValue += string$2.slice(endIndex, index) + substring + replacer;
|
|
26059
|
+
endIndex = index + substringLength;
|
|
26060
|
+
index = string$2.indexOf(substring, endIndex);
|
|
26061
|
+
} while (index !== -1);
|
|
26062
|
+
returnValue += string$2.slice(endIndex);
|
|
26063
|
+
return returnValue;
|
|
26064
|
+
}
|
|
26065
|
+
function stringEncaseCRLFWithFirstIndex(string$2, prefix, postfix, index) {
|
|
26066
|
+
let endIndex = 0;
|
|
26067
|
+
let returnValue = "";
|
|
26068
|
+
do {
|
|
26069
|
+
const gotCR = string$2[index - 1] === "\r";
|
|
26070
|
+
returnValue += string$2.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
26071
|
+
endIndex = index + 1;
|
|
26072
|
+
index = string$2.indexOf("\n", endIndex);
|
|
26073
|
+
} while (index !== -1);
|
|
26074
|
+
returnValue += string$2.slice(endIndex);
|
|
26075
|
+
return returnValue;
|
|
26076
|
+
}
|
|
26077
|
+
|
|
26078
|
+
//#endregion
|
|
26079
|
+
//#region node_modules/chalk/source/index.js
|
|
26080
|
+
const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
26081
|
+
const GENERATOR = Symbol("GENERATOR");
|
|
26082
|
+
const STYLER = Symbol("STYLER");
|
|
26083
|
+
const IS_EMPTY = Symbol("IS_EMPTY");
|
|
26084
|
+
const levelMapping = [
|
|
26085
|
+
"ansi",
|
|
26086
|
+
"ansi",
|
|
26087
|
+
"ansi256",
|
|
26088
|
+
"ansi16m"
|
|
26089
|
+
];
|
|
26090
|
+
const styles = Object.create(null);
|
|
26091
|
+
const applyOptions = (object$1, options = {}) => {
|
|
26092
|
+
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");
|
|
26093
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
26094
|
+
object$1.level = options.level === void 0 ? colorLevel : options.level;
|
|
26095
|
+
};
|
|
26096
|
+
const chalkFactory = (options) => {
|
|
26097
|
+
const chalk$1 = (...strings) => strings.join(" ");
|
|
26098
|
+
applyOptions(chalk$1, options);
|
|
26099
|
+
Object.setPrototypeOf(chalk$1, createChalk.prototype);
|
|
26100
|
+
return chalk$1;
|
|
26101
|
+
};
|
|
26102
|
+
function createChalk(options) {
|
|
26103
|
+
return chalkFactory(options);
|
|
26104
|
+
}
|
|
26105
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
26106
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
|
|
26107
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
26108
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
26109
|
+
return builder;
|
|
26110
|
+
} };
|
|
26111
|
+
styles.visible = { get() {
|
|
26112
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
26113
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
26114
|
+
return builder;
|
|
26115
|
+
} };
|
|
26116
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
26117
|
+
if (model === "rgb") {
|
|
26118
|
+
if (level === "ansi16m") return ansi_styles_default[type].ansi16m(...arguments_);
|
|
26119
|
+
if (level === "ansi256") return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
26120
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
26121
|
+
}
|
|
26122
|
+
if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
26123
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
26124
|
+
};
|
|
26125
|
+
for (const model of [
|
|
26126
|
+
"rgb",
|
|
26127
|
+
"hex",
|
|
26128
|
+
"ansi256"
|
|
26129
|
+
]) {
|
|
26130
|
+
styles[model] = { get() {
|
|
26131
|
+
const { level } = this;
|
|
26132
|
+
return function(...arguments_) {
|
|
26133
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
26134
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
26135
|
+
};
|
|
26136
|
+
} };
|
|
26137
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
26138
|
+
styles[bgModel] = { get() {
|
|
26139
|
+
const { level } = this;
|
|
26140
|
+
return function(...arguments_) {
|
|
26141
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
26142
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
26143
|
+
};
|
|
26144
|
+
} };
|
|
26145
|
+
}
|
|
26146
|
+
const proto = Object.defineProperties(() => {}, {
|
|
26147
|
+
...styles,
|
|
26148
|
+
level: {
|
|
26149
|
+
enumerable: true,
|
|
26150
|
+
get() {
|
|
26151
|
+
return this[GENERATOR].level;
|
|
26152
|
+
},
|
|
26153
|
+
set(level) {
|
|
26154
|
+
this[GENERATOR].level = level;
|
|
26155
|
+
}
|
|
26156
|
+
}
|
|
26157
|
+
});
|
|
26158
|
+
const createStyler = (open, close, parent) => {
|
|
26159
|
+
let openAll;
|
|
26160
|
+
let closeAll;
|
|
26161
|
+
if (parent === void 0) {
|
|
26162
|
+
openAll = open;
|
|
26163
|
+
closeAll = close;
|
|
26164
|
+
} else {
|
|
26165
|
+
openAll = parent.openAll + open;
|
|
26166
|
+
closeAll = close + parent.closeAll;
|
|
26167
|
+
}
|
|
26168
|
+
return {
|
|
26169
|
+
open,
|
|
26170
|
+
close,
|
|
26171
|
+
openAll,
|
|
26172
|
+
closeAll,
|
|
26173
|
+
parent
|
|
26174
|
+
};
|
|
26175
|
+
};
|
|
26176
|
+
const createBuilder = (self$1, _styler, _isEmpty) => {
|
|
26177
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
26178
|
+
Object.setPrototypeOf(builder, proto);
|
|
26179
|
+
builder[GENERATOR] = self$1;
|
|
26180
|
+
builder[STYLER] = _styler;
|
|
26181
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
26182
|
+
return builder;
|
|
26183
|
+
};
|
|
26184
|
+
const applyStyle = (self$1, string$2) => {
|
|
26185
|
+
if (self$1.level <= 0 || !string$2) return self$1[IS_EMPTY] ? "" : string$2;
|
|
26186
|
+
let styler = self$1[STYLER];
|
|
26187
|
+
if (styler === void 0) return string$2;
|
|
26188
|
+
const { openAll, closeAll } = styler;
|
|
26189
|
+
if (string$2.includes("\x1B")) while (styler !== void 0) {
|
|
26190
|
+
string$2 = stringReplaceAll(string$2, styler.close, styler.open);
|
|
26191
|
+
styler = styler.parent;
|
|
26192
|
+
}
|
|
26193
|
+
const lfIndex = string$2.indexOf("\n");
|
|
26194
|
+
if (lfIndex !== -1) string$2 = stringEncaseCRLFWithFirstIndex(string$2, closeAll, openAll, lfIndex);
|
|
26195
|
+
return openAll + string$2 + closeAll;
|
|
26196
|
+
};
|
|
26197
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
26198
|
+
const chalk = createChalk();
|
|
26199
|
+
const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
26200
|
+
var source_default = chalk;
|
|
26201
|
+
|
|
26202
|
+
//#endregion
|
|
26203
|
+
//#region src/cli/utils/theme.ts
|
|
26204
|
+
/**
|
|
26205
|
+
* Base44 CLI theme configuration
|
|
26206
|
+
*/
|
|
26207
|
+
const theme = {
|
|
26208
|
+
colors: {
|
|
26209
|
+
base44Orange: source_default.hex("#E86B3C"),
|
|
26210
|
+
shinyOrange: source_default.hex("#FFD700"),
|
|
26211
|
+
links: source_default.hex("#00D4FF"),
|
|
26212
|
+
white: source_default.white
|
|
26213
|
+
},
|
|
26214
|
+
styles: {
|
|
26215
|
+
header: source_default.dim,
|
|
26216
|
+
bold: source_default.bold,
|
|
26217
|
+
dim: source_default.dim
|
|
26218
|
+
}
|
|
26219
|
+
};
|
|
26220
|
+
|
|
26206
26221
|
//#endregion
|
|
26207
26222
|
//#region src/cli/utils/animate.ts
|
|
26208
|
-
const orange$2 = source_default.hex("#E86B3C");
|
|
26209
|
-
const gold = source_default.hex("#FFD700");
|
|
26210
26223
|
/**
|
|
26211
26224
|
* Sleep for a specified number of milliseconds.
|
|
26212
26225
|
*/
|
|
@@ -26223,13 +26236,13 @@ async function animateLineReveal(line, duration$2) {
|
|
|
26223
26236
|
const progress = step / steps;
|
|
26224
26237
|
const revealIndex = Math.floor(progress * line.length);
|
|
26225
26238
|
let output = "";
|
|
26226
|
-
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output +=
|
|
26227
|
-
else if (i$1 === revealIndex) output +=
|
|
26228
|
-
else output +=
|
|
26239
|
+
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.base44Orange(line[i$1]);
|
|
26240
|
+
else if (i$1 === revealIndex) output += theme.colors.shinyOrange(line[i$1]);
|
|
26241
|
+
else output += theme.styles.dim(line[i$1]);
|
|
26229
26242
|
process.stdout.write(`\r${output}`);
|
|
26230
26243
|
await sleep(stepDuration);
|
|
26231
26244
|
}
|
|
26232
|
-
process.stdout.write(`\r${
|
|
26245
|
+
process.stdout.write(`\r${theme.colors.base44Orange(line)}\n`);
|
|
26233
26246
|
}
|
|
26234
26247
|
/**
|
|
26235
26248
|
* Quick shimmer pass over the entire banner.
|
|
@@ -26246,15 +26259,15 @@ async function shimmerPass(lines, duration$2) {
|
|
|
26246
26259
|
let output = "";
|
|
26247
26260
|
for (let i$1 = 0; i$1 < line.length; i$1++) {
|
|
26248
26261
|
const dist = Math.abs(i$1 - shimmerPos);
|
|
26249
|
-
if (dist < 3) output += dist === 0 ?
|
|
26250
|
-
else output +=
|
|
26262
|
+
if (dist < 3) output += dist === 0 ? theme.colors.white(line[i$1]) : theme.colors.shinyOrange(line[i$1]);
|
|
26263
|
+
else output += theme.colors.base44Orange(line[i$1]);
|
|
26251
26264
|
}
|
|
26252
26265
|
console.log(output);
|
|
26253
26266
|
}
|
|
26254
26267
|
await sleep(stepDuration);
|
|
26255
26268
|
}
|
|
26256
26269
|
process.stdout.write(moveUp);
|
|
26257
|
-
for (const line of lines) console.log(
|
|
26270
|
+
for (const line of lines) console.log(theme.colors.base44Orange(line));
|
|
26258
26271
|
}
|
|
26259
26272
|
/**
|
|
26260
26273
|
* Animate the output with a smooth line-by-line reveal.
|
|
@@ -26274,7 +26287,6 @@ async function printAnimatedLines(lines) {
|
|
|
26274
26287
|
|
|
26275
26288
|
//#endregion
|
|
26276
26289
|
//#region src/cli/utils/banner.ts
|
|
26277
|
-
const orange$1 = source_default.hex("#E86B3C");
|
|
26278
26290
|
const BANNER_LINES = [
|
|
26279
26291
|
"██████╗ █████╗ ███████╗███████╗ ██╗ ██╗██╗ ██╗",
|
|
26280
26292
|
"██╔══██╗██╔══██╗██╔════╝██╔════╝ ██║ ██║██║ ██║",
|
|
@@ -26289,12 +26301,11 @@ const BANNER_LINES = [
|
|
|
26289
26301
|
*/
|
|
26290
26302
|
async function printBanner() {
|
|
26291
26303
|
if (process.stdout.isTTY) await printAnimatedLines(BANNER_LINES);
|
|
26292
|
-
else console.log(
|
|
26304
|
+
else console.log(theme.colors.base44Orange(BANNER_LINES.join("\n")));
|
|
26293
26305
|
}
|
|
26294
26306
|
|
|
26295
26307
|
//#endregion
|
|
26296
26308
|
//#region src/cli/utils/runCommand.ts
|
|
26297
|
-
const base44Color = source_default.bgHex("#E86B3C");
|
|
26298
26309
|
/**
|
|
26299
26310
|
* Wraps a command function with the Base44 intro/outro and error handling.
|
|
26300
26311
|
* All CLI commands should use this utility to ensure consistent branding.
|
|
@@ -26338,7 +26349,7 @@ async function runCommand(commandFn, options) {
|
|
|
26338
26349
|
if (options?.fullBanner) {
|
|
26339
26350
|
await printBanner();
|
|
26340
26351
|
Ie("");
|
|
26341
|
-
} else Ie(
|
|
26352
|
+
} else Ie(theme.colors.base44Orange(" Base 44 "));
|
|
26342
26353
|
await loadProjectEnv();
|
|
26343
26354
|
try {
|
|
26344
26355
|
if (options?.requireAuth) {
|
|
@@ -26430,7 +26441,7 @@ async function generateAndDisplayDeviceCode() {
|
|
|
26430
26441
|
successMessage: "Device code generated",
|
|
26431
26442
|
errorMessage: "Failed to generate device code"
|
|
26432
26443
|
});
|
|
26433
|
-
M.info(`Verification code: ${
|
|
26444
|
+
M.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`);
|
|
26434
26445
|
return deviceCodeResponse;
|
|
26435
26446
|
}
|
|
26436
26447
|
async function waitForAuthentication(deviceCode, expiresIn, interval) {
|
|
@@ -26474,7 +26485,7 @@ async function login() {
|
|
|
26474
26485
|
const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, deviceCodeResponse.interval);
|
|
26475
26486
|
const userInfo = await getUserInfo(token.accessToken);
|
|
26476
26487
|
await saveAuthData(token, userInfo);
|
|
26477
|
-
return { outroMessage: `Successfully logged in as ${
|
|
26488
|
+
return { outroMessage: `Successfully logged in as ${theme.styles.bold(userInfo.email)}` };
|
|
26478
26489
|
}
|
|
26479
26490
|
const loginCommand = new Command("login").description("Authenticate with Base44").action(async () => {
|
|
26480
26491
|
await runCommand(login);
|
|
@@ -26484,7 +26495,7 @@ const loginCommand = new Command("login").description("Authenticate with Base44"
|
|
|
26484
26495
|
//#region src/cli/commands/auth/whoami.ts
|
|
26485
26496
|
async function whoami() {
|
|
26486
26497
|
const auth = await readAuth();
|
|
26487
|
-
return { outroMessage: `Logged in as: ${
|
|
26498
|
+
return { outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}` };
|
|
26488
26499
|
}
|
|
26489
26500
|
const whoamiCommand = new Command("whoami").description("Display current authenticated user").action(async () => {
|
|
26490
26501
|
await runCommand(whoami, { requireAuth: true });
|
|
@@ -27400,15 +27411,15 @@ var ReadStream = class extends Minipass {
|
|
|
27400
27411
|
[_size];
|
|
27401
27412
|
[_remain];
|
|
27402
27413
|
[_autoClose];
|
|
27403
|
-
constructor(path$
|
|
27414
|
+
constructor(path$17, opt) {
|
|
27404
27415
|
opt = opt || {};
|
|
27405
27416
|
super(opt);
|
|
27406
27417
|
this.readable = true;
|
|
27407
27418
|
this.writable = false;
|
|
27408
|
-
if (typeof path$
|
|
27419
|
+
if (typeof path$17 !== "string") throw new TypeError("path must be a string");
|
|
27409
27420
|
this[_errored] = false;
|
|
27410
27421
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27411
|
-
this[_path] = path$
|
|
27422
|
+
this[_path] = path$17;
|
|
27412
27423
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
27413
27424
|
this[_reading] = false;
|
|
27414
27425
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -27550,10 +27561,10 @@ var WriteStream = class extends EE {
|
|
|
27550
27561
|
[_flags];
|
|
27551
27562
|
[_finished] = false;
|
|
27552
27563
|
[_pos];
|
|
27553
|
-
constructor(path$
|
|
27564
|
+
constructor(path$17, opt) {
|
|
27554
27565
|
opt = opt || {};
|
|
27555
27566
|
super(opt);
|
|
27556
|
-
this[_path] = path$
|
|
27567
|
+
this[_path] = path$17;
|
|
27557
27568
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27558
27569
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
27559
27570
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -28312,10 +28323,10 @@ var Header = class {
|
|
|
28312
28323
|
if (!(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
|
|
28313
28324
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
28314
28325
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
28315
|
-
const path$
|
|
28326
|
+
const path$17 = split[0];
|
|
28316
28327
|
const prefix = split[1];
|
|
28317
28328
|
this.needPax = !!split[2];
|
|
28318
|
-
this.needPax = encString(buf, off, 100, path$
|
|
28329
|
+
this.needPax = encString(buf, off, 100, path$17) || this.needPax;
|
|
28319
28330
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
28320
28331
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
28321
28332
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -29154,16 +29165,16 @@ const modeFix = (mode, isDir, portable) => {
|
|
|
29154
29165
|
//#endregion
|
|
29155
29166
|
//#region node_modules/tar/dist/esm/strip-absolute-path.js
|
|
29156
29167
|
const { isAbsolute, parse: parse$1 } = win32;
|
|
29157
|
-
const stripAbsolutePath = (path$
|
|
29168
|
+
const stripAbsolutePath = (path$17) => {
|
|
29158
29169
|
let r$1 = "";
|
|
29159
|
-
let parsed = parse$1(path$
|
|
29160
|
-
while (isAbsolute(path$
|
|
29161
|
-
const root = path$
|
|
29162
|
-
path$
|
|
29170
|
+
let parsed = parse$1(path$17);
|
|
29171
|
+
while (isAbsolute(path$17) || parsed.root) {
|
|
29172
|
+
const root = path$17.charAt(0) === "/" && path$17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
29173
|
+
path$17 = path$17.slice(root.length);
|
|
29163
29174
|
r$1 += root;
|
|
29164
|
-
parsed = parse$1(path$
|
|
29175
|
+
parsed = parse$1(path$17);
|
|
29165
29176
|
}
|
|
29166
|
-
return [r$1, path$
|
|
29177
|
+
return [r$1, path$17];
|
|
29167
29178
|
};
|
|
29168
29179
|
|
|
29169
29180
|
//#endregion
|
|
@@ -29183,10 +29194,10 @@ const decode = (s) => win.reduce((s$1, c$1) => s$1.split(c$1).join(toRaw.get(c$1
|
|
|
29183
29194
|
|
|
29184
29195
|
//#endregion
|
|
29185
29196
|
//#region node_modules/tar/dist/esm/write-entry.js
|
|
29186
|
-
const prefixPath = (path$
|
|
29187
|
-
if (!prefix) return normalizeWindowsPath(path$
|
|
29188
|
-
path$
|
|
29189
|
-
return stripTrailingSlashes(prefix) + "/" + path$
|
|
29197
|
+
const prefixPath = (path$17, prefix) => {
|
|
29198
|
+
if (!prefix) return normalizeWindowsPath(path$17);
|
|
29199
|
+
path$17 = normalizeWindowsPath(path$17).replace(/^\.(\/|$)/, "");
|
|
29200
|
+
return stripTrailingSlashes(prefix) + "/" + path$17;
|
|
29190
29201
|
};
|
|
29191
29202
|
const maxReadSize = 16 * 1024 * 1024;
|
|
29192
29203
|
const PROCESS$1 = Symbol("process");
|
|
@@ -29268,7 +29279,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29268
29279
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
29269
29280
|
p$1 = p$1.replace(/\\/g, "/");
|
|
29270
29281
|
}
|
|
29271
|
-
this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p$1));
|
|
29282
|
+
this.absolute = normalizeWindowsPath(opt.absolute || path$1.resolve(this.cwd, p$1));
|
|
29272
29283
|
if (this.path === "") this.path = "./";
|
|
29273
29284
|
if (pathWarn) this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
|
|
29274
29285
|
entry: this,
|
|
@@ -29310,8 +29321,8 @@ var WriteEntry = class extends Minipass {
|
|
|
29310
29321
|
[MODE](mode) {
|
|
29311
29322
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
29312
29323
|
}
|
|
29313
|
-
[PREFIX](path$
|
|
29314
|
-
return prefixPath(path$
|
|
29324
|
+
[PREFIX](path$17) {
|
|
29325
|
+
return prefixPath(path$17, this.prefix);
|
|
29315
29326
|
}
|
|
29316
29327
|
[HEADER]() {
|
|
29317
29328
|
/* c8 ignore start */
|
|
@@ -29377,7 +29388,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29377
29388
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
29378
29389
|
/* c8 ignore stop */
|
|
29379
29390
|
this.type = "Link";
|
|
29380
|
-
this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath));
|
|
29391
|
+
this.linkpath = normalizeWindowsPath(path$1.relative(this.cwd, linkpath));
|
|
29381
29392
|
this.stat.size = 0;
|
|
29382
29393
|
this[HEADER]();
|
|
29383
29394
|
this.end();
|
|
@@ -29643,8 +29654,8 @@ var WriteEntryTar = class extends Minipass {
|
|
|
29643
29654
|
super.write(b$2);
|
|
29644
29655
|
readEntry.pipe(this);
|
|
29645
29656
|
}
|
|
29646
|
-
[PREFIX](path$
|
|
29647
|
-
return prefixPath(path$
|
|
29657
|
+
[PREFIX](path$17) {
|
|
29658
|
+
return prefixPath(path$17, this.prefix);
|
|
29648
29659
|
}
|
|
29649
29660
|
[MODE](mode) {
|
|
29650
29661
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -29953,8 +29964,8 @@ var PackJob = class {
|
|
|
29953
29964
|
pending = false;
|
|
29954
29965
|
ignore = false;
|
|
29955
29966
|
piped = false;
|
|
29956
|
-
constructor(path$
|
|
29957
|
-
this.path = path$
|
|
29967
|
+
constructor(path$17, absolute) {
|
|
29968
|
+
this.path = path$17 || "./";
|
|
29958
29969
|
this.absolute = absolute;
|
|
29959
29970
|
}
|
|
29960
29971
|
};
|
|
@@ -30059,36 +30070,36 @@ var Pack = class extends Minipass {
|
|
|
30059
30070
|
[WRITE](chunk) {
|
|
30060
30071
|
return super.write(chunk);
|
|
30061
30072
|
}
|
|
30062
|
-
add(path$
|
|
30063
|
-
this.write(path$
|
|
30073
|
+
add(path$17) {
|
|
30074
|
+
this.write(path$17);
|
|
30064
30075
|
return this;
|
|
30065
30076
|
}
|
|
30066
|
-
end(path$
|
|
30077
|
+
end(path$17, encoding, cb) {
|
|
30067
30078
|
/* c8 ignore start */
|
|
30068
|
-
if (typeof path$
|
|
30069
|
-
cb = path$
|
|
30070
|
-
path$
|
|
30079
|
+
if (typeof path$17 === "function") {
|
|
30080
|
+
cb = path$17;
|
|
30081
|
+
path$17 = void 0;
|
|
30071
30082
|
}
|
|
30072
30083
|
if (typeof encoding === "function") {
|
|
30073
30084
|
cb = encoding;
|
|
30074
30085
|
encoding = void 0;
|
|
30075
30086
|
}
|
|
30076
30087
|
/* c8 ignore stop */
|
|
30077
|
-
if (path$
|
|
30088
|
+
if (path$17) this.add(path$17);
|
|
30078
30089
|
this[ENDED$1] = true;
|
|
30079
30090
|
this[PROCESS]();
|
|
30080
30091
|
/* c8 ignore next */
|
|
30081
30092
|
if (cb) cb();
|
|
30082
30093
|
return this;
|
|
30083
30094
|
}
|
|
30084
|
-
write(path$
|
|
30095
|
+
write(path$17) {
|
|
30085
30096
|
if (this[ENDED$1]) throw new Error("write after end");
|
|
30086
|
-
if (path$
|
|
30087
|
-
else this[ADDFSENTRY](path$
|
|
30097
|
+
if (path$17 instanceof ReadEntry) this[ADDTARENTRY](path$17);
|
|
30098
|
+
else this[ADDFSENTRY](path$17);
|
|
30088
30099
|
return this.flowing;
|
|
30089
30100
|
}
|
|
30090
30101
|
[ADDTARENTRY](p$1) {
|
|
30091
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1.path));
|
|
30102
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1.path));
|
|
30092
30103
|
if (!this.filter(p$1.path, p$1)) p$1.resume();
|
|
30093
30104
|
else {
|
|
30094
30105
|
const job = new PackJob(p$1.path, absolute);
|
|
@@ -30100,7 +30111,7 @@ var Pack = class extends Minipass {
|
|
|
30100
30111
|
this[PROCESS]();
|
|
30101
30112
|
}
|
|
30102
30113
|
[ADDFSENTRY](p$1) {
|
|
30103
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1));
|
|
30114
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1));
|
|
30104
30115
|
this[QUEUE].push(new PackJob(p$1, absolute));
|
|
30105
30116
|
this[PROCESS]();
|
|
30106
30117
|
}
|
|
@@ -30301,7 +30312,7 @@ const createFile = (opt, files) => {
|
|
|
30301
30312
|
const addFilesSync$1 = (p$1, files) => {
|
|
30302
30313
|
files.forEach((file) => {
|
|
30303
30314
|
if (file.charAt(0) === "@") list({
|
|
30304
|
-
file:
|
|
30315
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
30305
30316
|
sync: true,
|
|
30306
30317
|
noResume: true,
|
|
30307
30318
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -30314,7 +30325,7 @@ const addFilesAsync$1 = async (p$1, files) => {
|
|
|
30314
30325
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
30315
30326
|
const file = String(files[i$1]);
|
|
30316
30327
|
if (file.charAt(0) === "@") await list({
|
|
30317
|
-
file:
|
|
30328
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
30318
30329
|
noResume: true,
|
|
30319
30330
|
onReadEntry: (entry) => {
|
|
30320
30331
|
p$1.add(entry);
|
|
@@ -30352,9 +30363,9 @@ const getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMa
|
|
|
30352
30363
|
|
|
30353
30364
|
//#endregion
|
|
30354
30365
|
//#region node_modules/chownr/dist/esm/index.js
|
|
30355
|
-
const lchownSync = (path$
|
|
30366
|
+
const lchownSync = (path$17, uid, gid) => {
|
|
30356
30367
|
try {
|
|
30357
|
-
return fs.lchownSync(path$
|
|
30368
|
+
return fs.lchownSync(path$17, uid, gid);
|
|
30358
30369
|
} catch (er) {
|
|
30359
30370
|
if (er?.code !== "ENOENT") throw er;
|
|
30360
30371
|
}
|
|
@@ -30365,11 +30376,11 @@ const chown = (cpath, uid, gid, cb) => {
|
|
|
30365
30376
|
});
|
|
30366
30377
|
};
|
|
30367
30378
|
const chownrKid = (p$1, child, uid, gid, cb) => {
|
|
30368
|
-
if (child.isDirectory()) chownr(
|
|
30379
|
+
if (child.isDirectory()) chownr(path.resolve(p$1, child.name), uid, gid, (er) => {
|
|
30369
30380
|
if (er) return cb(er);
|
|
30370
|
-
chown(
|
|
30381
|
+
chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30371
30382
|
});
|
|
30372
|
-
else chown(
|
|
30383
|
+
else chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30373
30384
|
};
|
|
30374
30385
|
const chownr = (p$1, uid, gid, cb) => {
|
|
30375
30386
|
fs.readdir(p$1, { withFileTypes: true }, (er, children) => {
|
|
@@ -30391,8 +30402,8 @@ const chownr = (p$1, uid, gid, cb) => {
|
|
|
30391
30402
|
});
|
|
30392
30403
|
};
|
|
30393
30404
|
const chownrKidSync = (p$1, child, uid, gid) => {
|
|
30394
|
-
if (child.isDirectory()) chownrSync(
|
|
30395
|
-
lchownSync(
|
|
30405
|
+
if (child.isDirectory()) chownrSync(path.resolve(p$1, child.name), uid, gid);
|
|
30406
|
+
lchownSync(path.resolve(p$1, child.name), uid, gid);
|
|
30396
30407
|
};
|
|
30397
30408
|
const chownrSync = (p$1, uid, gid) => {
|
|
30398
30409
|
let children;
|
|
@@ -30414,9 +30425,9 @@ var CwdError = class extends Error {
|
|
|
30414
30425
|
path;
|
|
30415
30426
|
code;
|
|
30416
30427
|
syscall = "chdir";
|
|
30417
|
-
constructor(path$
|
|
30418
|
-
super(`${code$1}: Cannot cd into '${path$
|
|
30419
|
-
this.path = path$
|
|
30428
|
+
constructor(path$17, code$1) {
|
|
30429
|
+
super(`${code$1}: Cannot cd into '${path$17}'`);
|
|
30430
|
+
this.path = path$17;
|
|
30420
30431
|
this.code = code$1;
|
|
30421
30432
|
}
|
|
30422
30433
|
get name() {
|
|
@@ -30431,10 +30442,10 @@ var SymlinkError = class extends Error {
|
|
|
30431
30442
|
symlink;
|
|
30432
30443
|
syscall = "symlink";
|
|
30433
30444
|
code = "TAR_SYMLINK_ERROR";
|
|
30434
|
-
constructor(symlink, path$
|
|
30445
|
+
constructor(symlink, path$17) {
|
|
30435
30446
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
30436
30447
|
this.symlink = symlink;
|
|
30437
|
-
this.path = path$
|
|
30448
|
+
this.path = path$17;
|
|
30438
30449
|
}
|
|
30439
30450
|
get name() {
|
|
30440
30451
|
return "SymlinkError";
|
|
@@ -30480,12 +30491,12 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30480
30491
|
mode,
|
|
30481
30492
|
recursive: true
|
|
30482
30493
|
}).then((made) => done(null, made ?? void 0), done);
|
|
30483
|
-
mkdir_(cwd, normalizeWindowsPath(
|
|
30494
|
+
mkdir_(cwd, normalizeWindowsPath(path.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
|
|
30484
30495
|
};
|
|
30485
30496
|
const mkdir_ = (base, parts, mode, unlink$1, cwd, created, cb) => {
|
|
30486
30497
|
if (!parts.length) return cb(null, created);
|
|
30487
30498
|
const p$1 = parts.shift();
|
|
30488
|
-
const part = normalizeWindowsPath(
|
|
30499
|
+
const part = normalizeWindowsPath(path.resolve(base + "/" + p$1));
|
|
30489
30500
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, unlink$1, cwd, created, cb));
|
|
30490
30501
|
};
|
|
30491
30502
|
const onmkdir = (part, parts, mode, unlink$1, cwd, created, cb) => (er) => {
|
|
@@ -30541,10 +30552,10 @@ const mkdirSync = (dir, opt) => {
|
|
|
30541
30552
|
mode,
|
|
30542
30553
|
recursive: true
|
|
30543
30554
|
}) ?? void 0);
|
|
30544
|
-
const parts = normalizeWindowsPath(
|
|
30555
|
+
const parts = normalizeWindowsPath(path.relative(cwd, dir)).split("/");
|
|
30545
30556
|
let created = void 0;
|
|
30546
30557
|
for (let p$1 = parts.shift(), part = cwd; p$1 && (part += "/" + p$1); p$1 = parts.shift()) {
|
|
30547
|
-
part = normalizeWindowsPath(
|
|
30558
|
+
part = normalizeWindowsPath(path.resolve(part));
|
|
30548
30559
|
try {
|
|
30549
30560
|
fs.mkdirSync(part, mode);
|
|
30550
30561
|
created = created || part;
|
|
@@ -30584,11 +30595,11 @@ const normalizeUnicode = (s) => {
|
|
|
30584
30595
|
//#endregion
|
|
30585
30596
|
//#region node_modules/tar/dist/esm/path-reservations.js
|
|
30586
30597
|
const isWindows$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30587
|
-
const getDirs = (path$
|
|
30588
|
-
return path$
|
|
30598
|
+
const getDirs = (path$17) => {
|
|
30599
|
+
return path$17.split("/").slice(0, -1).reduce((set, path$18) => {
|
|
30589
30600
|
const s = set[set.length - 1];
|
|
30590
|
-
if (s !== void 0) path$
|
|
30591
|
-
set.push(path$
|
|
30601
|
+
if (s !== void 0) path$18 = join(s, path$18);
|
|
30602
|
+
set.push(path$18 || "/");
|
|
30592
30603
|
return set;
|
|
30593
30604
|
}, []);
|
|
30594
30605
|
};
|
|
@@ -30600,7 +30611,7 @@ var PathReservations = class {
|
|
|
30600
30611
|
paths = isWindows$1 ? ["win32 parallelization disabled"] : paths.map((p$1) => {
|
|
30601
30612
|
return stripTrailingSlashes(join(normalizeUnicode(p$1))).toLowerCase();
|
|
30602
30613
|
});
|
|
30603
|
-
const dirs = new Set(paths.map((path$
|
|
30614
|
+
const dirs = new Set(paths.map((path$17) => getDirs(path$17)).reduce((a$1, b$2) => a$1.concat(b$2)));
|
|
30604
30615
|
this.#reservations.set(fn, {
|
|
30605
30616
|
dirs,
|
|
30606
30617
|
paths
|
|
@@ -30627,8 +30638,8 @@ var PathReservations = class {
|
|
|
30627
30638
|
if (!res) throw new Error("function does not have any path reservations");
|
|
30628
30639
|
/* c8 ignore stop */
|
|
30629
30640
|
return {
|
|
30630
|
-
paths: res.paths.map((path$
|
|
30631
|
-
dirs: [...res.dirs].map((path$
|
|
30641
|
+
paths: res.paths.map((path$17) => this.#queues.get(path$17)),
|
|
30642
|
+
dirs: [...res.dirs].map((path$17) => this.#queues.get(path$17))
|
|
30632
30643
|
};
|
|
30633
30644
|
}
|
|
30634
30645
|
check(fn) {
|
|
@@ -30649,14 +30660,14 @@ var PathReservations = class {
|
|
|
30649
30660
|
/* c8 ignore stop */
|
|
30650
30661
|
const { paths, dirs } = res;
|
|
30651
30662
|
const next = /* @__PURE__ */ new Set();
|
|
30652
|
-
for (const path$
|
|
30653
|
-
const q$2 = this.#queues.get(path$
|
|
30663
|
+
for (const path$17 of paths) {
|
|
30664
|
+
const q$2 = this.#queues.get(path$17);
|
|
30654
30665
|
/* c8 ignore start */
|
|
30655
30666
|
if (!q$2 || q$2?.[0] !== fn) continue;
|
|
30656
30667
|
/* c8 ignore stop */
|
|
30657
30668
|
const q0 = q$2[1];
|
|
30658
30669
|
if (!q0) {
|
|
30659
|
-
this.#queues.delete(path$
|
|
30670
|
+
this.#queues.delete(path$17);
|
|
30660
30671
|
continue;
|
|
30661
30672
|
}
|
|
30662
30673
|
q$2.shift();
|
|
@@ -30713,20 +30724,20 @@ const CHECKED_CWD = Symbol("checkedCwd");
|
|
|
30713
30724
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30714
30725
|
const DEFAULT_MAX_DEPTH = 1024;
|
|
30715
30726
|
/* c8 ignore start */
|
|
30716
|
-
const unlinkFile = (path$
|
|
30717
|
-
if (!isWindows) return fs.unlink(path$
|
|
30718
|
-
const name$1 = path$
|
|
30719
|
-
fs.rename(path$
|
|
30727
|
+
const unlinkFile = (path$17, cb) => {
|
|
30728
|
+
if (!isWindows) return fs.unlink(path$17, cb);
|
|
30729
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30730
|
+
fs.rename(path$17, name$1, (er) => {
|
|
30720
30731
|
if (er) return cb(er);
|
|
30721
30732
|
fs.unlink(name$1, cb);
|
|
30722
30733
|
});
|
|
30723
30734
|
};
|
|
30724
30735
|
/* c8 ignore stop */
|
|
30725
30736
|
/* c8 ignore start */
|
|
30726
|
-
const unlinkFileSync = (path$
|
|
30727
|
-
if (!isWindows) return fs.unlinkSync(path$
|
|
30728
|
-
const name$1 = path$
|
|
30729
|
-
fs.renameSync(path$
|
|
30737
|
+
const unlinkFileSync = (path$17) => {
|
|
30738
|
+
if (!isWindows) return fs.unlinkSync(path$17);
|
|
30739
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30740
|
+
fs.renameSync(path$17, name$1);
|
|
30730
30741
|
fs.unlinkSync(name$1);
|
|
30731
30742
|
};
|
|
30732
30743
|
/* c8 ignore stop */
|
|
@@ -30791,7 +30802,7 @@ var Unpack = class extends Parser {
|
|
|
30791
30802
|
this.noMtime = !!opt.noMtime;
|
|
30792
30803
|
this.preservePaths = !!opt.preservePaths;
|
|
30793
30804
|
this.unlink = !!opt.unlink;
|
|
30794
|
-
this.cwd = normalizeWindowsPath(
|
|
30805
|
+
this.cwd = normalizeWindowsPath(path.resolve(opt.cwd || process.cwd()));
|
|
30795
30806
|
this.strip = Number(opt.strip) || 0;
|
|
30796
30807
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
30797
30808
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -30811,22 +30822,22 @@ var Unpack = class extends Parser {
|
|
|
30811
30822
|
}
|
|
30812
30823
|
}
|
|
30813
30824
|
[STRIPABSOLUTEPATH](entry, field) {
|
|
30814
|
-
const path$
|
|
30815
|
-
if (!path$
|
|
30816
|
-
const parts = path$
|
|
30825
|
+
const path$17 = entry[field];
|
|
30826
|
+
if (!path$17 || this.preservePaths) return true;
|
|
30827
|
+
const parts = path$17.split("/");
|
|
30817
30828
|
if (parts.includes("..") || isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
|
|
30818
30829
|
this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
|
|
30819
30830
|
entry,
|
|
30820
|
-
[field]: path$
|
|
30831
|
+
[field]: path$17
|
|
30821
30832
|
});
|
|
30822
30833
|
return false;
|
|
30823
30834
|
}
|
|
30824
|
-
const [root, stripped] = stripAbsolutePath(path$
|
|
30835
|
+
const [root, stripped] = stripAbsolutePath(path$17);
|
|
30825
30836
|
if (root) {
|
|
30826
30837
|
entry[field] = String(stripped);
|
|
30827
30838
|
this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute ${field}`, {
|
|
30828
30839
|
entry,
|
|
30829
|
-
[field]: path$
|
|
30840
|
+
[field]: path$17
|
|
30830
30841
|
});
|
|
30831
30842
|
}
|
|
30832
30843
|
return true;
|
|
@@ -30854,8 +30865,8 @@ var Unpack = class extends Parser {
|
|
|
30854
30865
|
return false;
|
|
30855
30866
|
}
|
|
30856
30867
|
if (!this[STRIPABSOLUTEPATH](entry, "path") || !this[STRIPABSOLUTEPATH](entry, "linkpath")) return false;
|
|
30857
|
-
if (
|
|
30858
|
-
else entry.absolute = normalizeWindowsPath(
|
|
30868
|
+
if (path.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(path.resolve(entry.path));
|
|
30869
|
+
else entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path));
|
|
30859
30870
|
/* c8 ignore start - defense in depth */
|
|
30860
30871
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
30861
30872
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -30869,9 +30880,9 @@ var Unpack = class extends Parser {
|
|
|
30869
30880
|
/* c8 ignore stop */
|
|
30870
30881
|
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") return false;
|
|
30871
30882
|
if (this.win32) {
|
|
30872
|
-
const { root: aRoot } =
|
|
30883
|
+
const { root: aRoot } = path.win32.parse(String(entry.absolute));
|
|
30873
30884
|
entry.absolute = aRoot + encode(String(entry.absolute).slice(aRoot.length));
|
|
30874
|
-
const { root: pRoot } =
|
|
30885
|
+
const { root: pRoot } = path.win32.parse(entry.path);
|
|
30875
30886
|
entry.path = pRoot + encode(entry.path.slice(pRoot.length));
|
|
30876
30887
|
}
|
|
30877
30888
|
return true;
|
|
@@ -31017,7 +31028,7 @@ var Unpack = class extends Parser {
|
|
|
31017
31028
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
31018
31029
|
}
|
|
31019
31030
|
[HARDLINK](entry, done) {
|
|
31020
|
-
const linkpath = normalizeWindowsPath(
|
|
31031
|
+
const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath)));
|
|
31021
31032
|
this[LINK](entry, linkpath, "link", done);
|
|
31022
31033
|
}
|
|
31023
31034
|
[PEND]() {
|
|
@@ -31057,7 +31068,7 @@ var Unpack = class extends Parser {
|
|
|
31057
31068
|
};
|
|
31058
31069
|
const start = () => {
|
|
31059
31070
|
if (entry.absolute !== this.cwd) {
|
|
31060
|
-
const parent = normalizeWindowsPath(
|
|
31071
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31061
31072
|
if (parent !== this.cwd) return this[MKDIR](parent, this.dmode, (er) => {
|
|
31062
31073
|
if (er) {
|
|
31063
31074
|
this[ONERROR](er, entry);
|
|
@@ -31139,7 +31150,7 @@ var UnpackSync = class extends Unpack {
|
|
|
31139
31150
|
this[CHECKED_CWD] = true;
|
|
31140
31151
|
}
|
|
31141
31152
|
if (entry.absolute !== this.cwd) {
|
|
31142
|
-
const parent = normalizeWindowsPath(
|
|
31153
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31143
31154
|
if (parent !== this.cwd) {
|
|
31144
31155
|
const mkParent = this[MKDIR](parent, this.dmode);
|
|
31145
31156
|
if (mkParent) return this[ONERROR](mkParent, entry);
|
|
@@ -31411,7 +31422,7 @@ const replaceAsync = (opt, files) => {
|
|
|
31411
31422
|
const addFilesSync = (p$1, files) => {
|
|
31412
31423
|
files.forEach((file) => {
|
|
31413
31424
|
if (file.charAt(0) === "@") list({
|
|
31414
|
-
file:
|
|
31425
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
31415
31426
|
sync: true,
|
|
31416
31427
|
noResume: true,
|
|
31417
31428
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -31424,7 +31435,7 @@ const addFilesAsync = async (p$1, files) => {
|
|
|
31424
31435
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
31425
31436
|
const file = String(files[i$1]);
|
|
31426
31437
|
if (file.charAt(0) === "@") await list({
|
|
31427
|
-
file:
|
|
31438
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
31428
31439
|
noResume: true,
|
|
31429
31440
|
onReadEntry: (entry) => p$1.add(entry)
|
|
31430
31441
|
});
|
|
@@ -31459,7 +31470,7 @@ const update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFi
|
|
|
31459
31470
|
const mtimeFilter = (opt) => {
|
|
31460
31471
|
const filter = opt.filter;
|
|
31461
31472
|
if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
31462
|
-
opt.filter = filter ? (path$
|
|
31473
|
+
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));
|
|
31463
31474
|
};
|
|
31464
31475
|
|
|
31465
31476
|
//#endregion
|
|
@@ -31519,7 +31530,7 @@ async function deployFunctionsAction() {
|
|
|
31519
31530
|
if (result.deployed.length > 0) M.success(`Deployed: ${result.deployed.join(", ")}`);
|
|
31520
31531
|
if (result.deleted.length > 0) M.warn(`Deleted: ${result.deleted.join(", ")}`);
|
|
31521
31532
|
if (result.errors && result.errors.length > 0) {
|
|
31522
|
-
const errorMessages = result.errors.map((e$1) => `
|
|
31533
|
+
const errorMessages = result.errors.map((e$1) => `'${e$1.name}' function: ${e$1.message}`).join("\n");
|
|
31523
31534
|
throw new Error(`Function deployment errors:\n${errorMessages}`);
|
|
31524
31535
|
}
|
|
31525
31536
|
return {};
|
|
@@ -32152,7 +32163,7 @@ const green = format(32, 39);
|
|
|
32152
32163
|
const yellow = format(33, 39);
|
|
32153
32164
|
const blue = format(34, 39);
|
|
32154
32165
|
const magenta = format(35, 39);
|
|
32155
|
-
const cyan
|
|
32166
|
+
const cyan = format(36, 39);
|
|
32156
32167
|
const white = format(37, 39);
|
|
32157
32168
|
const gray = format(90, 39);
|
|
32158
32169
|
const bgBlack = format(40, 49);
|
|
@@ -32321,28 +32332,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32321
32332
|
module.exports = isexe;
|
|
32322
32333
|
isexe.sync = sync;
|
|
32323
32334
|
var fs$4 = __require("fs");
|
|
32324
|
-
function checkPathExt(path$
|
|
32335
|
+
function checkPathExt(path$17, options) {
|
|
32325
32336
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
32326
32337
|
if (!pathext) return true;
|
|
32327
32338
|
pathext = pathext.split(";");
|
|
32328
32339
|
if (pathext.indexOf("") !== -1) return true;
|
|
32329
32340
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
32330
32341
|
var p$1 = pathext[i$1].toLowerCase();
|
|
32331
|
-
if (p$1 && path$
|
|
32342
|
+
if (p$1 && path$17.substr(-p$1.length).toLowerCase() === p$1) return true;
|
|
32332
32343
|
}
|
|
32333
32344
|
return false;
|
|
32334
32345
|
}
|
|
32335
|
-
function checkStat(stat, path$
|
|
32346
|
+
function checkStat(stat, path$17, options) {
|
|
32336
32347
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
32337
|
-
return checkPathExt(path$
|
|
32348
|
+
return checkPathExt(path$17, options);
|
|
32338
32349
|
}
|
|
32339
|
-
function isexe(path$
|
|
32340
|
-
fs$4.stat(path$
|
|
32341
|
-
cb(er, er ? false : checkStat(stat, path$
|
|
32350
|
+
function isexe(path$17, options, cb) {
|
|
32351
|
+
fs$4.stat(path$17, function(er, stat) {
|
|
32352
|
+
cb(er, er ? false : checkStat(stat, path$17, options));
|
|
32342
32353
|
});
|
|
32343
32354
|
}
|
|
32344
|
-
function sync(path$
|
|
32345
|
-
return checkStat(fs$4.statSync(path$
|
|
32355
|
+
function sync(path$17, options) {
|
|
32356
|
+
return checkStat(fs$4.statSync(path$17), path$17, options);
|
|
32346
32357
|
}
|
|
32347
32358
|
}));
|
|
32348
32359
|
|
|
@@ -32352,13 +32363,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32352
32363
|
module.exports = isexe;
|
|
32353
32364
|
isexe.sync = sync;
|
|
32354
32365
|
var fs$3 = __require("fs");
|
|
32355
|
-
function isexe(path$
|
|
32356
|
-
fs$3.stat(path$
|
|
32366
|
+
function isexe(path$17, options, cb) {
|
|
32367
|
+
fs$3.stat(path$17, function(er, stat) {
|
|
32357
32368
|
cb(er, er ? false : checkStat(stat, options));
|
|
32358
32369
|
});
|
|
32359
32370
|
}
|
|
32360
|
-
function sync(path$
|
|
32361
|
-
return checkStat(fs$3.statSync(path$
|
|
32371
|
+
function sync(path$17, options) {
|
|
32372
|
+
return checkStat(fs$3.statSync(path$17), options);
|
|
32362
32373
|
}
|
|
32363
32374
|
function checkStat(stat, options) {
|
|
32364
32375
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -32386,7 +32397,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32386
32397
|
else core = require_mode();
|
|
32387
32398
|
module.exports = isexe;
|
|
32388
32399
|
isexe.sync = sync;
|
|
32389
|
-
function isexe(path$
|
|
32400
|
+
function isexe(path$17, options, cb) {
|
|
32390
32401
|
if (typeof options === "function") {
|
|
32391
32402
|
cb = options;
|
|
32392
32403
|
options = {};
|
|
@@ -32394,13 +32405,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32394
32405
|
if (!cb) {
|
|
32395
32406
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
32396
32407
|
return new Promise(function(resolve$1, reject) {
|
|
32397
|
-
isexe(path$
|
|
32408
|
+
isexe(path$17, options || {}, function(er, is) {
|
|
32398
32409
|
if (er) reject(er);
|
|
32399
32410
|
else resolve$1(is);
|
|
32400
32411
|
});
|
|
32401
32412
|
});
|
|
32402
32413
|
}
|
|
32403
|
-
core(path$
|
|
32414
|
+
core(path$17, options || {}, function(er, is) {
|
|
32404
32415
|
if (er) {
|
|
32405
32416
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
32406
32417
|
er = null;
|
|
@@ -32410,9 +32421,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32410
32421
|
cb(er, is);
|
|
32411
32422
|
});
|
|
32412
32423
|
}
|
|
32413
|
-
function sync(path$
|
|
32424
|
+
function sync(path$17, options) {
|
|
32414
32425
|
try {
|
|
32415
|
-
return core.sync(path$
|
|
32426
|
+
return core.sync(path$17, options || {});
|
|
32416
32427
|
} catch (er) {
|
|
32417
32428
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
32418
32429
|
else throw er;
|
|
@@ -32424,7 +32435,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32424
32435
|
//#region node_modules/which/which.js
|
|
32425
32436
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32426
32437
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
32427
|
-
const path$
|
|
32438
|
+
const path$4 = __require("path");
|
|
32428
32439
|
const COLON = isWindows ? ";" : ":";
|
|
32429
32440
|
const isexe = require_isexe();
|
|
32430
32441
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -32454,7 +32465,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32454
32465
|
if (i$1 === pathEnv.length) return opt.all && found.length ? resolve$1(found) : reject(getNotFoundError(cmd));
|
|
32455
32466
|
const ppRaw = pathEnv[i$1];
|
|
32456
32467
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32457
|
-
const pCmd = path$
|
|
32468
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32458
32469
|
resolve$1(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
32459
32470
|
});
|
|
32460
32471
|
const subStep = (p$1, i$1, ii) => new Promise((resolve$1, reject) => {
|
|
@@ -32475,7 +32486,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32475
32486
|
for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
|
|
32476
32487
|
const ppRaw = pathEnv[i$1];
|
|
32477
32488
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32478
|
-
const pCmd = path$
|
|
32489
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32479
32490
|
const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
32480
32491
|
for (let j = 0; j < pathExt.length; j++) {
|
|
32481
32492
|
const cur = p$1 + pathExt[j];
|
|
@@ -32508,7 +32519,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32508
32519
|
//#endregion
|
|
32509
32520
|
//#region node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
32510
32521
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32511
|
-
const path$
|
|
32522
|
+
const path$3 = __require("path");
|
|
32512
32523
|
const which = require_which();
|
|
32513
32524
|
const getPathKey = require_path_key();
|
|
32514
32525
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -32523,12 +32534,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32523
32534
|
try {
|
|
32524
32535
|
resolved = which.sync(parsed.command, {
|
|
32525
32536
|
path: env$1[getPathKey({ env: env$1 })],
|
|
32526
|
-
pathExt: withoutPathExt ? path$
|
|
32537
|
+
pathExt: withoutPathExt ? path$3.delimiter : void 0
|
|
32527
32538
|
});
|
|
32528
32539
|
} catch (e$1) {} finally {
|
|
32529
32540
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
32530
32541
|
}
|
|
32531
|
-
if (resolved) resolved = path$
|
|
32542
|
+
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
32532
32543
|
return resolved;
|
|
32533
32544
|
}
|
|
32534
32545
|
function resolveCommand(parsed) {
|
|
@@ -32571,8 +32582,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
32571
32582
|
module.exports = (string$2 = "") => {
|
|
32572
32583
|
const match = string$2.match(shebangRegex);
|
|
32573
32584
|
if (!match) return null;
|
|
32574
|
-
const [path$
|
|
32575
|
-
const binary = path$
|
|
32585
|
+
const [path$17, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
32586
|
+
const binary = path$17.split("/").pop();
|
|
32576
32587
|
if (binary === "env") return argument;
|
|
32577
32588
|
return argument ? `${binary} ${argument}` : binary;
|
|
32578
32589
|
};
|
|
@@ -32600,7 +32611,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32600
32611
|
//#endregion
|
|
32601
32612
|
//#region node_modules/cross-spawn/lib/parse.js
|
|
32602
32613
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32603
|
-
const path$
|
|
32614
|
+
const path$2 = __require("path");
|
|
32604
32615
|
const resolveCommand = require_resolveCommand();
|
|
32605
32616
|
const escape = require_escape();
|
|
32606
32617
|
const readShebang = require_readShebang();
|
|
@@ -32623,7 +32634,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32623
32634
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
32624
32635
|
if (parsed.options.forceShell || needsShell) {
|
|
32625
32636
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
32626
|
-
parsed.command = path$
|
|
32637
|
+
parsed.command = path$2.normalize(parsed.command);
|
|
32627
32638
|
parsed.command = escape.command(parsed.command);
|
|
32628
32639
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
32629
32640
|
parsed.args = [
|
|
@@ -32741,12 +32752,12 @@ function toPath(urlOrPath) {
|
|
|
32741
32752
|
}
|
|
32742
32753
|
function traversePathUp(startPath) {
|
|
32743
32754
|
return { *[Symbol.iterator]() {
|
|
32744
|
-
let currentPath =
|
|
32755
|
+
let currentPath = path.resolve(toPath(startPath));
|
|
32745
32756
|
let previousPath;
|
|
32746
32757
|
while (previousPath !== currentPath) {
|
|
32747
32758
|
yield currentPath;
|
|
32748
32759
|
previousPath = currentPath;
|
|
32749
|
-
currentPath =
|
|
32760
|
+
currentPath = path.resolve(currentPath, "..");
|
|
32750
32761
|
}
|
|
32751
32762
|
} };
|
|
32752
32763
|
}
|
|
@@ -32755,21 +32766,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32755
32766
|
//#endregion
|
|
32756
32767
|
//#region node_modules/npm-run-path/index.js
|
|
32757
32768
|
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32758
|
-
const cwdPath =
|
|
32769
|
+
const cwdPath = path.resolve(toPath(cwd));
|
|
32759
32770
|
const result = [];
|
|
32760
|
-
const pathParts = pathOption.split(
|
|
32771
|
+
const pathParts = pathOption.split(path.delimiter);
|
|
32761
32772
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
32762
32773
|
if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
|
|
32763
|
-
return pathOption === "" || pathOption ===
|
|
32774
|
+
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
32764
32775
|
};
|
|
32765
32776
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
32766
32777
|
for (const directory of traversePathUp(cwdPath)) {
|
|
32767
|
-
const pathPart =
|
|
32778
|
+
const pathPart = path.join(directory, "node_modules/.bin");
|
|
32768
32779
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32769
32780
|
}
|
|
32770
32781
|
};
|
|
32771
32782
|
const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
32772
|
-
const pathPart =
|
|
32783
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32773
32784
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32774
32785
|
};
|
|
32775
32786
|
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
@@ -33801,10 +33812,10 @@ const mapNode = ({ options }) => {
|
|
|
33801
33812
|
node: true
|
|
33802
33813
|
} };
|
|
33803
33814
|
};
|
|
33804
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath
|
|
33815
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
33805
33816
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
33806
|
-
const normalizedNodePath = safeNormalizeFileUrl(nodePath
|
|
33807
|
-
const resolvedNodePath =
|
|
33817
|
+
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
33818
|
+
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
33808
33819
|
const newOptions = {
|
|
33809
33820
|
...options,
|
|
33810
33821
|
nodePath: resolvedNodePath,
|
|
@@ -33816,7 +33827,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
33816
33827
|
commandArguments,
|
|
33817
33828
|
newOptions
|
|
33818
33829
|
];
|
|
33819
|
-
if (
|
|
33830
|
+
if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
33820
33831
|
return [
|
|
33821
33832
|
resolvedNodePath,
|
|
33822
33833
|
[
|
|
@@ -33903,7 +33914,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
|
|
|
33903
33914
|
//#region node_modules/execa/lib/arguments/cwd.js
|
|
33904
33915
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
33905
33916
|
const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
|
|
33906
|
-
return
|
|
33917
|
+
return path.resolve(cwdString);
|
|
33907
33918
|
};
|
|
33908
33919
|
const getDefaultCwd = () => {
|
|
33909
33920
|
try {
|
|
@@ -33942,7 +33953,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33942
33953
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33943
33954
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33944
33955
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33945
|
-
if (y.platform === "win32" &&
|
|
33956
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33946
33957
|
return {
|
|
33947
33958
|
file,
|
|
33948
33959
|
commandArguments,
|
|
@@ -33967,7 +33978,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33967
33978
|
ipc,
|
|
33968
33979
|
serialization
|
|
33969
33980
|
});
|
|
33970
|
-
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath
|
|
33981
|
+
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33971
33982
|
const env$1 = extendEnv ? {
|
|
33972
33983
|
...y.env,
|
|
33973
33984
|
...envOption
|
|
@@ -33975,7 +33986,7 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
33975
33986
|
if (preferLocal || node) return npmRunPathEnv({
|
|
33976
33987
|
env: env$1,
|
|
33977
33988
|
cwd: localDirectory,
|
|
33978
|
-
execPath: nodePath
|
|
33989
|
+
execPath: nodePath,
|
|
33979
33990
|
preferLocal,
|
|
33980
33991
|
addExecPath: node
|
|
33981
33992
|
});
|
|
@@ -35720,12 +35731,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
35720
35731
|
}
|
|
35721
35732
|
};
|
|
35722
35733
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
35723
|
-
for (const { path: path$
|
|
35724
|
-
const pathString = typeof path$
|
|
35725
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path$
|
|
35734
|
+
for (const { path: path$17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
35735
|
+
const pathString = typeof path$17 === "string" ? path$17 : path$17.toString();
|
|
35736
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path$17, serializedResult);
|
|
35726
35737
|
else {
|
|
35727
35738
|
outputFiles.add(pathString);
|
|
35728
|
-
writeFileSync(path$
|
|
35739
|
+
writeFileSync(path$17, serializedResult);
|
|
35729
35740
|
}
|
|
35730
35741
|
}
|
|
35731
35742
|
};
|
|
@@ -38196,8 +38207,6 @@ var require_lodash = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
38196
38207
|
//#endregion
|
|
38197
38208
|
//#region src/cli/commands/project/create.ts
|
|
38198
38209
|
var import_lodash = /* @__PURE__ */ __toESM(require_lodash(), 1);
|
|
38199
|
-
const orange = source_default.hex("#E86B3C");
|
|
38200
|
-
const cyan = source_default.hex("#00D4FF");
|
|
38201
38210
|
const DEFAULT_TEMPLATE_ID = "backend-only";
|
|
38202
38211
|
async function getDefaultTemplate() {
|
|
38203
38212
|
const template = (await listTemplates()).find((t) => t.id === DEFAULT_TEMPLATE_ID);
|
|
@@ -38205,8 +38214,8 @@ async function getDefaultTemplate() {
|
|
|
38205
38214
|
return template;
|
|
38206
38215
|
}
|
|
38207
38216
|
function validateNonInteractiveFlags(command) {
|
|
38208
|
-
const { name: name$1, path: path$
|
|
38209
|
-
const providedCount = [name$1, path$
|
|
38217
|
+
const { name: name$1, path: path$17 } = command.opts();
|
|
38218
|
+
const providedCount = [name$1, path$17].filter(Boolean).length;
|
|
38210
38219
|
if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
|
|
38211
38220
|
}
|
|
38212
38221
|
async function chooseCreate(options) {
|
|
@@ -38241,7 +38250,7 @@ async function createInteractive(options) {
|
|
|
38241
38250
|
projectPath: async ({ results }) => {
|
|
38242
38251
|
const suggestedPath = `./${(0, import_lodash.default)(results.name)}`;
|
|
38243
38252
|
return he({
|
|
38244
|
-
message: "Where should we create
|
|
38253
|
+
message: "Where should we create your project?",
|
|
38245
38254
|
placeholder: suggestedPath,
|
|
38246
38255
|
initialValue: suggestedPath
|
|
38247
38256
|
});
|
|
@@ -38277,7 +38286,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38277
38286
|
template
|
|
38278
38287
|
});
|
|
38279
38288
|
}, {
|
|
38280
|
-
successMessage:
|
|
38289
|
+
successMessage: theme.colors.base44Orange("Project created successfully"),
|
|
38281
38290
|
errorMessage: "Failed to create project"
|
|
38282
38291
|
});
|
|
38283
38292
|
await loadProjectEnv(resolvedPath);
|
|
@@ -38286,21 +38295,21 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38286
38295
|
if (entities.length > 0) {
|
|
38287
38296
|
let shouldPushEntities;
|
|
38288
38297
|
if (isInteractive) {
|
|
38289
|
-
const result = await ye({ message: "
|
|
38298
|
+
const result = await ye({ message: "Set up the backend data now? (This pushes the data models used by the template to Base44)" });
|
|
38290
38299
|
shouldPushEntities = !pD(result) && result;
|
|
38291
38300
|
} else shouldPushEntities = !!deploy;
|
|
38292
|
-
if (shouldPushEntities) await runTask(`Pushing ${entities.length}
|
|
38301
|
+
if (shouldPushEntities) await runTask(`Pushing ${entities.length} data models to Base44...`, async () => {
|
|
38293
38302
|
await pushEntities(entities);
|
|
38294
38303
|
}, {
|
|
38295
|
-
successMessage:
|
|
38296
|
-
errorMessage: "Failed to push
|
|
38304
|
+
successMessage: theme.colors.base44Orange("Data models pushed successfully"),
|
|
38305
|
+
errorMessage: "Failed to push data models"
|
|
38297
38306
|
});
|
|
38298
38307
|
}
|
|
38299
38308
|
if (project.site) {
|
|
38300
38309
|
const { installCommand, buildCommand, outputDirectory } = project.site;
|
|
38301
38310
|
let shouldDeploy;
|
|
38302
38311
|
if (isInteractive) {
|
|
38303
|
-
const result = await ye({ message: "Would you like to deploy the site now?" });
|
|
38312
|
+
const result = await ye({ message: "Would you like to deploy the site now? (Hosted on Base44)" });
|
|
38304
38313
|
shouldDeploy = !pD(result) && result;
|
|
38305
38314
|
} else shouldDeploy = !!deploy;
|
|
38306
38315
|
if (shouldDeploy && installCommand && buildCommand && outputDirectory) {
|
|
@@ -38317,17 +38326,17 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38317
38326
|
updateMessage("Deploying site...");
|
|
38318
38327
|
return await deploySite(join(resolvedPath, outputDirectory));
|
|
38319
38328
|
}, {
|
|
38320
|
-
successMessage:
|
|
38329
|
+
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
38321
38330
|
errorMessage: "Failed to deploy site"
|
|
38322
38331
|
});
|
|
38323
38332
|
finalAppUrl = appUrl;
|
|
38324
38333
|
}
|
|
38325
38334
|
}
|
|
38326
38335
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38327
|
-
M.message(`${
|
|
38328
|
-
M.message(`${
|
|
38329
|
-
if (finalAppUrl) M.message(`${
|
|
38330
|
-
return { outroMessage: "Your project is set and ready to use" };
|
|
38336
|
+
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38337
|
+
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
|
|
38338
|
+
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38339
|
+
return { outroMessage: "Your project is set up and ready to use" };
|
|
38331
38340
|
}
|
|
38332
38341
|
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) => {
|
|
38333
38342
|
await chooseCreate(options);
|
|
@@ -38356,7 +38365,7 @@ const siteDeployCommand = new Command("site").description("Manage site deploymen
|
|
|
38356
38365
|
|
|
38357
38366
|
//#endregion
|
|
38358
38367
|
//#region package.json
|
|
38359
|
-
var version = "0.0.
|
|
38368
|
+
var version = "0.0.10";
|
|
38360
38369
|
|
|
38361
38370
|
//#endregion
|
|
38362
38371
|
//#region src/cli/index.ts
|