@base44-preview/cli 0.0.9-pr.74.2f7b0bf → 0.0.9-pr.74.f76e562
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 +723 -716
- 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
|
}
|
|
@@ -9212,7 +8803,7 @@ var require_package$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9212
8803
|
//#region node_modules/dotenv/lib/main.js
|
|
9213
8804
|
var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
9214
8805
|
const fs$9 = __require("fs");
|
|
9215
|
-
const path$
|
|
8806
|
+
const path$15 = __require("path");
|
|
9216
8807
|
const os$3 = __require("os");
|
|
9217
8808
|
const crypto = __require("crypto");
|
|
9218
8809
|
const version = require_package$1().version;
|
|
@@ -9350,12 +8941,12 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9350
8941
|
if (options && options.path && options.path.length > 0) if (Array.isArray(options.path)) {
|
|
9351
8942
|
for (const filepath of options.path) if (fs$9.existsSync(filepath)) possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
|
|
9352
8943
|
} else possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
|
|
9353
|
-
else possibleVaultPath = path$
|
|
8944
|
+
else possibleVaultPath = path$15.resolve(process.cwd(), ".env.vault");
|
|
9354
8945
|
if (fs$9.existsSync(possibleVaultPath)) return possibleVaultPath;
|
|
9355
8946
|
return null;
|
|
9356
8947
|
}
|
|
9357
8948
|
function _resolveHome(envPath) {
|
|
9358
|
-
return envPath[0] === "~" ? path$
|
|
8949
|
+
return envPath[0] === "~" ? path$15.join(os$3.homedir(), envPath.slice(1)) : envPath;
|
|
9359
8950
|
}
|
|
9360
8951
|
function _configVault(options) {
|
|
9361
8952
|
const debug = parseBoolean(process.env.DOTENV_CONFIG_DEBUG || options && options.debug);
|
|
@@ -9368,7 +8959,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9368
8959
|
return { parsed };
|
|
9369
8960
|
}
|
|
9370
8961
|
function configDotenv(options) {
|
|
9371
|
-
const dotenvPath = path$
|
|
8962
|
+
const dotenvPath = path$15.resolve(process.cwd(), ".env");
|
|
9372
8963
|
let encoding = "utf8";
|
|
9373
8964
|
let processEnv = process.env;
|
|
9374
8965
|
if (options && options.processEnv != null) processEnv = options.processEnv;
|
|
@@ -9384,11 +8975,11 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9384
8975
|
}
|
|
9385
8976
|
let lastError;
|
|
9386
8977
|
const parsedAll = {};
|
|
9387
|
-
for (const path$
|
|
9388
|
-
const parsed = DotenvModule.parse(fs$9.readFileSync(path$
|
|
8978
|
+
for (const path$17 of optionPaths) try {
|
|
8979
|
+
const parsed = DotenvModule.parse(fs$9.readFileSync(path$17, { encoding }));
|
|
9389
8980
|
DotenvModule.populate(parsedAll, parsed, options);
|
|
9390
8981
|
} catch (e$1) {
|
|
9391
|
-
if (debug) _debug(`Failed to load ${path$
|
|
8982
|
+
if (debug) _debug(`Failed to load ${path$17} ${e$1.message}`);
|
|
9392
8983
|
lastError = e$1;
|
|
9393
8984
|
}
|
|
9394
8985
|
const populated = DotenvModule.populate(processEnv, parsedAll, options);
|
|
@@ -9398,7 +8989,7 @@ var require_main = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
9398
8989
|
const keysCount = Object.keys(populated).length;
|
|
9399
8990
|
const shortPaths = [];
|
|
9400
8991
|
for (const filePath of optionPaths) try {
|
|
9401
|
-
const relative = path$
|
|
8992
|
+
const relative = path$15.relative(process.cwd(), filePath);
|
|
9402
8993
|
shortPaths.push(relative);
|
|
9403
8994
|
} catch (e$1) {
|
|
9404
8995
|
if (debug) _debug(`Failed to load ${filePath} ${e$1.message}`);
|
|
@@ -9716,7 +9307,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9716
9307
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9717
9308
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
9718
9309
|
const os$2 = __require("os");
|
|
9719
|
-
const path$
|
|
9310
|
+
const path$14 = __require("path");
|
|
9720
9311
|
const IS_WINDOWS_PLATFORM = os$2.platform() === "win32";
|
|
9721
9312
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
9722
9313
|
/**
|
|
@@ -9745,7 +9336,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9745
9336
|
}
|
|
9746
9337
|
exports.unixify = unixify;
|
|
9747
9338
|
function makeAbsolute(cwd, filepath) {
|
|
9748
|
-
return path$
|
|
9339
|
+
return path$14.resolve(cwd, filepath);
|
|
9749
9340
|
}
|
|
9750
9341
|
exports.makeAbsolute = makeAbsolute;
|
|
9751
9342
|
function removeLeadingDotSegment(entry) {
|
|
@@ -11011,7 +10602,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11011
10602
|
//#endregion
|
|
11012
10603
|
//#region node_modules/micromatch/node_modules/picomatch/lib/constants.js
|
|
11013
10604
|
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
11014
|
-
const path$
|
|
10605
|
+
const path$13 = __require("path");
|
|
11015
10606
|
const WIN_SLASH = "\\\\/";
|
|
11016
10607
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
11017
10608
|
/**
|
|
@@ -11136,7 +10727,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11136
10727
|
CHAR_UNDERSCORE: 95,
|
|
11137
10728
|
CHAR_VERTICAL_LINE: 124,
|
|
11138
10729
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
11139
|
-
SEP: path$
|
|
10730
|
+
SEP: path$13.sep,
|
|
11140
10731
|
extglobChars(chars) {
|
|
11141
10732
|
return {
|
|
11142
10733
|
"!": {
|
|
@@ -11175,7 +10766,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
11175
10766
|
//#endregion
|
|
11176
10767
|
//#region node_modules/micromatch/node_modules/picomatch/lib/utils.js
|
|
11177
10768
|
var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
11178
|
-
const path$
|
|
10769
|
+
const path$12 = __require("path");
|
|
11179
10770
|
const win32 = process.platform === "win32";
|
|
11180
10771
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
|
|
11181
10772
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -11195,7 +10786,7 @@ var require_utils$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
11195
10786
|
};
|
|
11196
10787
|
exports.isWindows = (options) => {
|
|
11197
10788
|
if (options && typeof options.windows === "boolean") return options.windows;
|
|
11198
|
-
return win32 === true || path$
|
|
10789
|
+
return win32 === true || path$12.sep === "\\";
|
|
11199
10790
|
};
|
|
11200
10791
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
11201
10792
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -12371,7 +11962,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12371
11962
|
//#endregion
|
|
12372
11963
|
//#region node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
|
|
12373
11964
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
12374
|
-
const path$
|
|
11965
|
+
const path$11 = __require("path");
|
|
12375
11966
|
const scan = require_scan();
|
|
12376
11967
|
const parse = require_parse$2();
|
|
12377
11968
|
const utils = require_utils$3();
|
|
@@ -12510,7 +12101,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
12510
12101
|
* @api public
|
|
12511
12102
|
*/
|
|
12512
12103
|
picomatch.matchBase = (input, glob, options, posix$1 = utils.isWindows(options)) => {
|
|
12513
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$
|
|
12104
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$11.basename(input));
|
|
12514
12105
|
};
|
|
12515
12106
|
/**
|
|
12516
12107
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -13068,7 +12659,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
13068
12659
|
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13069
12660
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13070
12661
|
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;
|
|
13071
|
-
const path$
|
|
12662
|
+
const path$10 = __require("path");
|
|
13072
12663
|
const globParent = require_glob_parent();
|
|
13073
12664
|
const micromatch = require_micromatch();
|
|
13074
12665
|
const GLOBSTAR = "**";
|
|
@@ -13176,7 +12767,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13176
12767
|
}
|
|
13177
12768
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
13178
12769
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
13179
|
-
const basename$1 = path$
|
|
12770
|
+
const basename$1 = path$10.basename(pattern);
|
|
13180
12771
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename$1);
|
|
13181
12772
|
}
|
|
13182
12773
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -13250,7 +12841,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13250
12841
|
}
|
|
13251
12842
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
13252
12843
|
function isAbsolute(pattern) {
|
|
13253
|
-
return path$
|
|
12844
|
+
return path$10.isAbsolute(pattern);
|
|
13254
12845
|
}
|
|
13255
12846
|
exports.isAbsolute = isAbsolute;
|
|
13256
12847
|
}));
|
|
@@ -13493,8 +13084,8 @@ var require_tasks = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13493
13084
|
var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13494
13085
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13495
13086
|
exports.read = void 0;
|
|
13496
|
-
function read(path$
|
|
13497
|
-
settings.fs.lstat(path$
|
|
13087
|
+
function read(path$17, settings, callback) {
|
|
13088
|
+
settings.fs.lstat(path$17, (lstatError, lstat) => {
|
|
13498
13089
|
if (lstatError !== null) {
|
|
13499
13090
|
callFailureCallback(callback, lstatError);
|
|
13500
13091
|
return;
|
|
@@ -13503,7 +13094,7 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13503
13094
|
callSuccessCallback(callback, lstat);
|
|
13504
13095
|
return;
|
|
13505
13096
|
}
|
|
13506
|
-
settings.fs.stat(path$
|
|
13097
|
+
settings.fs.stat(path$17, (statError, stat) => {
|
|
13507
13098
|
if (statError !== null) {
|
|
13508
13099
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
13509
13100
|
callFailureCallback(callback, statError);
|
|
@@ -13531,11 +13122,11 @@ var require_async$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13531
13122
|
var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13532
13123
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13533
13124
|
exports.read = void 0;
|
|
13534
|
-
function read(path$
|
|
13535
|
-
const lstat = settings.fs.lstatSync(path$
|
|
13125
|
+
function read(path$17, settings) {
|
|
13126
|
+
const lstat = settings.fs.lstatSync(path$17);
|
|
13536
13127
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) return lstat;
|
|
13537
13128
|
try {
|
|
13538
|
-
const stat = settings.fs.statSync(path$
|
|
13129
|
+
const stat = settings.fs.statSync(path$17);
|
|
13539
13130
|
if (settings.markSymbolicLink) stat.isSymbolicLink = () => true;
|
|
13540
13131
|
return stat;
|
|
13541
13132
|
} catch (error) {
|
|
@@ -13594,17 +13185,17 @@ var require_out$3 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13594
13185
|
const sync = require_sync$5();
|
|
13595
13186
|
const settings_1 = require_settings$3();
|
|
13596
13187
|
exports.Settings = settings_1.default;
|
|
13597
|
-
function stat(path$
|
|
13188
|
+
function stat(path$17, optionsOrSettingsOrCallback, callback) {
|
|
13598
13189
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13599
|
-
async.read(path$
|
|
13190
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13600
13191
|
return;
|
|
13601
13192
|
}
|
|
13602
|
-
async.read(path$
|
|
13193
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13603
13194
|
}
|
|
13604
13195
|
exports.stat = stat;
|
|
13605
|
-
function statSync(path$
|
|
13196
|
+
function statSync(path$17, optionsOrSettings) {
|
|
13606
13197
|
const settings = getSettings(optionsOrSettings);
|
|
13607
|
-
return sync.read(path$
|
|
13198
|
+
return sync.read(path$17, settings);
|
|
13608
13199
|
}
|
|
13609
13200
|
exports.statSync = statSync;
|
|
13610
13201
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -13803,16 +13394,16 @@ var require_async$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13803
13394
|
return;
|
|
13804
13395
|
}
|
|
13805
13396
|
rpl(names.map((name$1) => {
|
|
13806
|
-
const path$
|
|
13397
|
+
const path$17 = common.joinPathSegments(directory, name$1, settings.pathSegmentSeparator);
|
|
13807
13398
|
return (done) => {
|
|
13808
|
-
fsStat.stat(path$
|
|
13399
|
+
fsStat.stat(path$17, settings.fsStatSettings, (error, stats) => {
|
|
13809
13400
|
if (error !== null) {
|
|
13810
13401
|
done(error);
|
|
13811
13402
|
return;
|
|
13812
13403
|
}
|
|
13813
13404
|
const entry = {
|
|
13814
13405
|
name: name$1,
|
|
13815
|
-
path: path$
|
|
13406
|
+
path: path$17,
|
|
13816
13407
|
dirent: utils.fs.createDirentFromStats(name$1, stats)
|
|
13817
13408
|
};
|
|
13818
13409
|
if (settings.stats) entry.stats = stats;
|
|
@@ -13909,7 +13500,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13909
13500
|
//#region node_modules/@nodelib/fs.scandir/out/settings.js
|
|
13910
13501
|
var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
13911
13502
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13912
|
-
const path$
|
|
13503
|
+
const path$9 = __require("path");
|
|
13913
13504
|
const fsStat = require_out$3();
|
|
13914
13505
|
const fs = require_fs();
|
|
13915
13506
|
var Settings = class {
|
|
@@ -13917,7 +13508,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13917
13508
|
this._options = _options;
|
|
13918
13509
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
13919
13510
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
13920
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
13511
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$9.sep);
|
|
13921
13512
|
this.stats = this._getValue(this._options.stats, false);
|
|
13922
13513
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
13923
13514
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -13942,17 +13533,17 @@ var require_out$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13942
13533
|
const sync = require_sync$4();
|
|
13943
13534
|
const settings_1 = require_settings$2();
|
|
13944
13535
|
exports.Settings = settings_1.default;
|
|
13945
|
-
function scandir(path$
|
|
13536
|
+
function scandir(path$17, optionsOrSettingsOrCallback, callback) {
|
|
13946
13537
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
13947
|
-
async.read(path$
|
|
13538
|
+
async.read(path$17, getSettings(), optionsOrSettingsOrCallback);
|
|
13948
13539
|
return;
|
|
13949
13540
|
}
|
|
13950
|
-
async.read(path$
|
|
13541
|
+
async.read(path$17, getSettings(optionsOrSettingsOrCallback), callback);
|
|
13951
13542
|
}
|
|
13952
13543
|
exports.scandir = scandir;
|
|
13953
|
-
function scandirSync(path$
|
|
13544
|
+
function scandirSync(path$17, optionsOrSettings) {
|
|
13954
13545
|
const settings = getSettings(optionsOrSettings);
|
|
13955
|
-
return sync.read(path$
|
|
13546
|
+
return sync.read(path$17, settings);
|
|
13956
13547
|
}
|
|
13957
13548
|
exports.scandirSync = scandirSync;
|
|
13958
13549
|
function getSettings(settingsOrOptions = {}) {
|
|
@@ -14522,7 +14113,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14522
14113
|
//#region node_modules/@nodelib/fs.walk/out/settings.js
|
|
14523
14114
|
var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14524
14115
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14525
|
-
const path$
|
|
14116
|
+
const path$8 = __require("path");
|
|
14526
14117
|
const fsScandir = require_out$2();
|
|
14527
14118
|
var Settings = class {
|
|
14528
14119
|
constructor(_options = {}) {
|
|
@@ -14532,7 +14123,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14532
14123
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
14533
14124
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
14534
14125
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
14535
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
14126
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$8.sep);
|
|
14536
14127
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
14537
14128
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
14538
14129
|
fs: this._options.fs,
|
|
@@ -14586,7 +14177,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14586
14177
|
//#region node_modules/fast-glob/out/readers/reader.js
|
|
14587
14178
|
var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14588
14179
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14589
|
-
const path$
|
|
14180
|
+
const path$7 = __require("path");
|
|
14590
14181
|
const fsStat = require_out$3();
|
|
14591
14182
|
const utils = require_utils$2();
|
|
14592
14183
|
var Reader = class {
|
|
@@ -14599,7 +14190,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14599
14190
|
});
|
|
14600
14191
|
}
|
|
14601
14192
|
_getFullEntryPath(filepath) {
|
|
14602
|
-
return path$
|
|
14193
|
+
return path$7.resolve(this._settings.cwd, filepath);
|
|
14603
14194
|
}
|
|
14604
14195
|
_makeEntry(stats, pattern) {
|
|
14605
14196
|
const entry = {
|
|
@@ -14943,7 +14534,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14943
14534
|
//#region node_modules/fast-glob/out/providers/provider.js
|
|
14944
14535
|
var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
14945
14536
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14946
|
-
const path$
|
|
14537
|
+
const path$6 = __require("path");
|
|
14947
14538
|
const deep_1 = require_deep();
|
|
14948
14539
|
const entry_1 = require_entry$1();
|
|
14949
14540
|
const error_1 = require_error();
|
|
@@ -14957,7 +14548,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
14957
14548
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
14958
14549
|
}
|
|
14959
14550
|
_getRootDirectory(task) {
|
|
14960
|
-
return path$
|
|
14551
|
+
return path$6.resolve(this._settings.cwd, task.base);
|
|
14961
14552
|
}
|
|
14962
14553
|
_getReaderOptions(task) {
|
|
14963
14554
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -15410,14 +15001,14 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15410
15001
|
makeArray(isString(pattern) ? splitPattern(pattern) : pattern).forEach(this._add, this);
|
|
15411
15002
|
return this._added;
|
|
15412
15003
|
}
|
|
15413
|
-
test(path$
|
|
15004
|
+
test(path$17, checkUnignored, mode) {
|
|
15414
15005
|
let ignored = false;
|
|
15415
15006
|
let unignored = false;
|
|
15416
15007
|
let matchedRule;
|
|
15417
15008
|
this._rules.forEach((rule) => {
|
|
15418
15009
|
const { negative } = rule;
|
|
15419
15010
|
if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) return;
|
|
15420
|
-
if (!rule[mode].test(path$
|
|
15011
|
+
if (!rule[mode].test(path$17)) return;
|
|
15421
15012
|
ignored = !negative;
|
|
15422
15013
|
unignored = negative;
|
|
15423
15014
|
matchedRule = negative ? UNDEFINED : rule;
|
|
@@ -15433,13 +15024,13 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15433
15024
|
const throwError = (message, Ctor) => {
|
|
15434
15025
|
throw new Ctor(message);
|
|
15435
15026
|
};
|
|
15436
|
-
const checkPath = (path$
|
|
15437
|
-
if (!isString(path$
|
|
15438
|
-
if (!path$
|
|
15439
|
-
if (checkPath.isNotRelative(path$
|
|
15027
|
+
const checkPath = (path$17, originalPath, doThrow) => {
|
|
15028
|
+
if (!isString(path$17)) return doThrow(`path must be a string, but got \`${originalPath}\``, TypeError);
|
|
15029
|
+
if (!path$17) return doThrow(`path must not be empty`, TypeError);
|
|
15030
|
+
if (checkPath.isNotRelative(path$17)) return doThrow(`path should be a \`path.relative()\`d string, but got "${originalPath}"`, RangeError);
|
|
15440
15031
|
return true;
|
|
15441
15032
|
};
|
|
15442
|
-
const isNotRelative = (path$
|
|
15033
|
+
const isNotRelative = (path$17) => REGEX_TEST_INVALID_PATH.test(path$17);
|
|
15443
15034
|
checkPath.isNotRelative = isNotRelative;
|
|
15444
15035
|
/* istanbul ignore next */
|
|
15445
15036
|
checkPath.convert = (p$1) => p$1;
|
|
@@ -15462,49 +15053,49 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15462
15053
|
return this.add(pattern);
|
|
15463
15054
|
}
|
|
15464
15055
|
_test(originalPath, cache$1, checkUnignored, slices) {
|
|
15465
|
-
const path$
|
|
15466
|
-
checkPath(path$
|
|
15467
|
-
return this._t(path$
|
|
15056
|
+
const path$17 = originalPath && checkPath.convert(originalPath);
|
|
15057
|
+
checkPath(path$17, originalPath, this._strictPathCheck ? throwError : RETURN_FALSE);
|
|
15058
|
+
return this._t(path$17, cache$1, checkUnignored, slices);
|
|
15468
15059
|
}
|
|
15469
|
-
checkIgnore(path$
|
|
15470
|
-
if (!REGEX_TEST_TRAILING_SLASH.test(path$
|
|
15471
|
-
const slices = path$
|
|
15060
|
+
checkIgnore(path$17) {
|
|
15061
|
+
if (!REGEX_TEST_TRAILING_SLASH.test(path$17)) return this.test(path$17);
|
|
15062
|
+
const slices = path$17.split(SLASH).filter(Boolean);
|
|
15472
15063
|
slices.pop();
|
|
15473
15064
|
if (slices.length) {
|
|
15474
15065
|
const parent = this._t(slices.join(SLASH) + SLASH, this._testCache, true, slices);
|
|
15475
15066
|
if (parent.ignored) return parent;
|
|
15476
15067
|
}
|
|
15477
|
-
return this._rules.test(path$
|
|
15068
|
+
return this._rules.test(path$17, false, MODE_CHECK_IGNORE);
|
|
15478
15069
|
}
|
|
15479
|
-
_t(path$
|
|
15480
|
-
if (path$
|
|
15481
|
-
if (!slices) slices = path$
|
|
15070
|
+
_t(path$17, cache$1, checkUnignored, slices) {
|
|
15071
|
+
if (path$17 in cache$1) return cache$1[path$17];
|
|
15072
|
+
if (!slices) slices = path$17.split(SLASH).filter(Boolean);
|
|
15482
15073
|
slices.pop();
|
|
15483
|
-
if (!slices.length) return cache$1[path$
|
|
15074
|
+
if (!slices.length) return cache$1[path$17] = this._rules.test(path$17, checkUnignored, MODE_IGNORE);
|
|
15484
15075
|
const parent = this._t(slices.join(SLASH) + SLASH, cache$1, checkUnignored, slices);
|
|
15485
|
-
return cache$1[path$
|
|
15076
|
+
return cache$1[path$17] = parent.ignored ? parent : this._rules.test(path$17, checkUnignored, MODE_IGNORE);
|
|
15486
15077
|
}
|
|
15487
|
-
ignores(path$
|
|
15488
|
-
return this._test(path$
|
|
15078
|
+
ignores(path$17) {
|
|
15079
|
+
return this._test(path$17, this._ignoreCache, false).ignored;
|
|
15489
15080
|
}
|
|
15490
15081
|
createFilter() {
|
|
15491
|
-
return (path$
|
|
15082
|
+
return (path$17) => !this.ignores(path$17);
|
|
15492
15083
|
}
|
|
15493
15084
|
filter(paths) {
|
|
15494
15085
|
return makeArray(paths).filter(this.createFilter());
|
|
15495
15086
|
}
|
|
15496
|
-
test(path$
|
|
15497
|
-
return this._test(path$
|
|
15087
|
+
test(path$17) {
|
|
15088
|
+
return this._test(path$17, this._testCache, true);
|
|
15498
15089
|
}
|
|
15499
15090
|
};
|
|
15500
15091
|
const factory = (options) => new Ignore(options);
|
|
15501
|
-
const isPathValid = (path$
|
|
15092
|
+
const isPathValid = (path$17) => checkPath(path$17 && checkPath.convert(path$17), path$17, RETURN_FALSE);
|
|
15502
15093
|
/* istanbul ignore next */
|
|
15503
15094
|
const setupWindows = () => {
|
|
15504
15095
|
const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
|
|
15505
15096
|
checkPath.convert = makePosix;
|
|
15506
15097
|
const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
|
|
15507
|
-
checkPath.isNotRelative = (path$
|
|
15098
|
+
checkPath.isNotRelative = (path$17) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path$17) || isNotRelative(path$17);
|
|
15508
15099
|
};
|
|
15509
15100
|
/* istanbul ignore next */
|
|
15510
15101
|
if (typeof process !== "undefined" && process.platform === "win32") setupWindows();
|
|
@@ -15518,15 +15109,15 @@ var require_ignore = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15518
15109
|
//#region node_modules/is-path-inside/index.js
|
|
15519
15110
|
var import_ignore = /* @__PURE__ */ __toESM(require_ignore(), 1);
|
|
15520
15111
|
function isPathInside(childPath, parentPath) {
|
|
15521
|
-
const relation =
|
|
15522
|
-
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${
|
|
15112
|
+
const relation = path.relative(parentPath, childPath);
|
|
15113
|
+
return Boolean(relation && relation !== ".." && !relation.startsWith(`..${path.sep}`) && relation !== path.resolve(childPath));
|
|
15523
15114
|
}
|
|
15524
15115
|
|
|
15525
15116
|
//#endregion
|
|
15526
15117
|
//#region node_modules/slash/index.js
|
|
15527
|
-
function slash(path$
|
|
15528
|
-
if (path$
|
|
15529
|
-
return path$
|
|
15118
|
+
function slash(path$17) {
|
|
15119
|
+
if (path$17.startsWith("\\\\?\\")) return path$17;
|
|
15120
|
+
return path$17.replace(/\\/g, "/");
|
|
15530
15121
|
}
|
|
15531
15122
|
|
|
15532
15123
|
//#endregion
|
|
@@ -15612,7 +15203,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15612
15203
|
let currentPath = startPath;
|
|
15613
15204
|
chain.push(currentPath);
|
|
15614
15205
|
while (currentPath !== rootPath) {
|
|
15615
|
-
const parentPath =
|
|
15206
|
+
const parentPath = path.dirname(currentPath);
|
|
15616
15207
|
if (parentPath === currentPath) break;
|
|
15617
15208
|
currentPath = parentPath;
|
|
15618
15209
|
chain.push(currentPath);
|
|
@@ -15621,7 +15212,7 @@ const buildPathChain = (startPath, rootPath) => {
|
|
|
15621
15212
|
};
|
|
15622
15213
|
const findGitRootInChain = async (paths, statMethod) => {
|
|
15623
15214
|
for (const directory of paths) {
|
|
15624
|
-
const gitPath =
|
|
15215
|
+
const gitPath = path.join(directory, ".git");
|
|
15625
15216
|
try {
|
|
15626
15217
|
if (pathHasGitDirectory(await statMethod(gitPath))) return directory;
|
|
15627
15218
|
} catch {}
|
|
@@ -15630,11 +15221,11 @@ const findGitRootInChain = async (paths, statMethod) => {
|
|
|
15630
15221
|
const findGitRootSyncUncached = (cwd, fsImplementation) => {
|
|
15631
15222
|
const statSyncMethod = getStatSyncMethod$1(fsImplementation);
|
|
15632
15223
|
if (!statSyncMethod) return;
|
|
15633
|
-
const currentPath =
|
|
15634
|
-
const { root } =
|
|
15224
|
+
const currentPath = path.resolve(cwd);
|
|
15225
|
+
const { root } = path.parse(currentPath);
|
|
15635
15226
|
const chain = buildPathChain(currentPath, root);
|
|
15636
15227
|
for (const directory of chain) {
|
|
15637
|
-
const gitPath =
|
|
15228
|
+
const gitPath = path.join(directory, ".git");
|
|
15638
15229
|
try {
|
|
15639
15230
|
if (pathHasGitDirectory(statSyncMethod(gitPath))) return directory;
|
|
15640
15231
|
} catch {}
|
|
@@ -15647,8 +15238,8 @@ const findGitRootSync = (cwd, fsImplementation) => {
|
|
|
15647
15238
|
const findGitRootAsyncUncached = async (cwd, fsImplementation) => {
|
|
15648
15239
|
const statMethod = getAsyncStatMethod(fsImplementation);
|
|
15649
15240
|
if (!statMethod) return findGitRootSync(cwd, fsImplementation);
|
|
15650
|
-
const currentPath =
|
|
15651
|
-
const { root } =
|
|
15241
|
+
const currentPath = path.resolve(cwd);
|
|
15242
|
+
const { root } = path.parse(currentPath);
|
|
15652
15243
|
return findGitRootInChain(buildPathChain(currentPath, root), statMethod);
|
|
15653
15244
|
};
|
|
15654
15245
|
const findGitRoot = async (cwd, fsImplementation) => {
|
|
@@ -15663,8 +15254,8 @@ Get paths to all .gitignore files from git root to cwd (inclusive).
|
|
|
15663
15254
|
@returns {string[]} Array of .gitignore file paths to search for.
|
|
15664
15255
|
*/
|
|
15665
15256
|
const isWithinGitRoot = (gitRoot, cwd) => {
|
|
15666
|
-
const resolvedGitRoot =
|
|
15667
|
-
const resolvedCwd =
|
|
15257
|
+
const resolvedGitRoot = path.resolve(gitRoot);
|
|
15258
|
+
const resolvedCwd = path.resolve(cwd);
|
|
15668
15259
|
return resolvedCwd === resolvedGitRoot || isPathInside(resolvedCwd, resolvedGitRoot);
|
|
15669
15260
|
};
|
|
15670
15261
|
const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
@@ -15672,7 +15263,7 @@ const getParentGitignorePaths = (gitRoot, cwd) => {
|
|
|
15672
15263
|
if (typeof cwd !== "string") throw new TypeError("cwd must be a string");
|
|
15673
15264
|
if (!gitRoot) return [];
|
|
15674
15265
|
if (!isWithinGitRoot(gitRoot, cwd)) return [];
|
|
15675
|
-
return [...buildPathChain(
|
|
15266
|
+
return [...buildPathChain(path.resolve(cwd), path.resolve(gitRoot))].reverse().map((directory) => path.join(directory, ".gitignore"));
|
|
15676
15267
|
};
|
|
15677
15268
|
/**
|
|
15678
15269
|
Convert ignore patterns to fast-glob compatible format.
|
|
@@ -15779,18 +15370,18 @@ const applyBaseToPattern = (pattern, base) => {
|
|
|
15779
15370
|
const slashIndex = cleanPattern.indexOf("/");
|
|
15780
15371
|
const hasNonTrailingSlash = slashIndex !== -1 && slashIndex !== cleanPattern.length - 1;
|
|
15781
15372
|
let result;
|
|
15782
|
-
if (!hasNonTrailingSlash) result =
|
|
15783
|
-
else if (cleanPattern.startsWith("/")) result =
|
|
15784
|
-
else result =
|
|
15373
|
+
if (!hasNonTrailingSlash) result = path.posix.join(base, "**", cleanPattern);
|
|
15374
|
+
else if (cleanPattern.startsWith("/")) result = path.posix.join(base, cleanPattern.slice(1));
|
|
15375
|
+
else result = path.posix.join(base, cleanPattern);
|
|
15785
15376
|
return isNegative ? "!" + result : result;
|
|
15786
15377
|
};
|
|
15787
15378
|
const parseIgnoreFile = (file, cwd) => {
|
|
15788
|
-
const base = slash(
|
|
15379
|
+
const base = slash(path.relative(cwd, path.dirname(file.filePath)));
|
|
15789
15380
|
return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base));
|
|
15790
15381
|
};
|
|
15791
15382
|
const toRelativePath = (fileOrDirectory, cwd) => {
|
|
15792
|
-
if (
|
|
15793
|
-
const relativePath =
|
|
15383
|
+
if (path.isAbsolute(fileOrDirectory)) {
|
|
15384
|
+
const relativePath = path.relative(cwd, fileOrDirectory);
|
|
15794
15385
|
if (relativePath && !isPathInside(fileOrDirectory, cwd)) return;
|
|
15795
15386
|
return relativePath;
|
|
15796
15387
|
}
|
|
@@ -15800,11 +15391,11 @@ const toRelativePath = (fileOrDirectory, cwd) => {
|
|
|
15800
15391
|
};
|
|
15801
15392
|
const createIgnorePredicate = (patterns, cwd, baseDir) => {
|
|
15802
15393
|
const ignores = (0, import_ignore.default)().add(patterns);
|
|
15803
|
-
const resolvedCwd =
|
|
15804
|
-
const resolvedBaseDir =
|
|
15394
|
+
const resolvedCwd = path.normalize(path.resolve(cwd));
|
|
15395
|
+
const resolvedBaseDir = path.normalize(path.resolve(baseDir));
|
|
15805
15396
|
return (fileOrDirectory) => {
|
|
15806
15397
|
fileOrDirectory = toPath$1(fileOrDirectory);
|
|
15807
|
-
if (
|
|
15398
|
+
if (path.normalize(path.resolve(fileOrDirectory)) === resolvedCwd) return false;
|
|
15808
15399
|
const relativePath = toRelativePath(fileOrDirectory, resolvedBaseDir);
|
|
15809
15400
|
if (relativePath === void 0) return false;
|
|
15810
15401
|
return relativePath ? ignores.ignores(slash(relativePath)) : false;
|
|
@@ -15879,35 +15470,35 @@ const assertPatternsInput = (patterns) => {
|
|
|
15879
15470
|
};
|
|
15880
15471
|
const getStatMethod = (fsImplementation) => bindFsMethod(fsImplementation?.promises, "stat") ?? bindFsMethod(fs.promises, "stat") ?? promisifyFsMethod(fsImplementation, "stat");
|
|
15881
15472
|
const getStatSyncMethod = (fsImplementation) => bindFsMethod(fsImplementation, "statSync") ?? bindFsMethod(fs, "statSync");
|
|
15882
|
-
const isDirectory = async (path$
|
|
15473
|
+
const isDirectory = async (path$17, fsImplementation) => {
|
|
15883
15474
|
try {
|
|
15884
|
-
return (await getStatMethod(fsImplementation)(path$
|
|
15475
|
+
return (await getStatMethod(fsImplementation)(path$17)).isDirectory();
|
|
15885
15476
|
} catch {
|
|
15886
15477
|
return false;
|
|
15887
15478
|
}
|
|
15888
15479
|
};
|
|
15889
|
-
const isDirectorySync = (path$
|
|
15480
|
+
const isDirectorySync = (path$17, fsImplementation) => {
|
|
15890
15481
|
try {
|
|
15891
|
-
return getStatSyncMethod(fsImplementation)(path$
|
|
15482
|
+
return getStatSyncMethod(fsImplementation)(path$17).isDirectory();
|
|
15892
15483
|
} catch {
|
|
15893
15484
|
return false;
|
|
15894
15485
|
}
|
|
15895
15486
|
};
|
|
15896
15487
|
const normalizePathForDirectoryGlob = (filePath, cwd) => {
|
|
15897
|
-
const path$
|
|
15898
|
-
return
|
|
15488
|
+
const path$17 = isNegativePattern(filePath) ? filePath.slice(1) : filePath;
|
|
15489
|
+
return path.isAbsolute(path$17) ? path$17 : path.join(cwd, path$17);
|
|
15899
15490
|
};
|
|
15900
15491
|
const shouldExpandGlobstarDirectory = (pattern) => {
|
|
15901
15492
|
const match = pattern?.match(/\*\*\/([^/]+)$/);
|
|
15902
15493
|
if (!match) return false;
|
|
15903
15494
|
const dirname$2 = match[1];
|
|
15904
15495
|
const hasWildcards = /[*?[\]{}]/.test(dirname$2);
|
|
15905
|
-
const hasExtension =
|
|
15496
|
+
const hasExtension = path.extname(dirname$2) && !dirname$2.startsWith(".");
|
|
15906
15497
|
return !hasWildcards && !hasExtension;
|
|
15907
15498
|
};
|
|
15908
15499
|
const getDirectoryGlob = ({ directoryPath, files, extensions }) => {
|
|
15909
15500
|
const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : "";
|
|
15910
|
-
return files ? files.map((file) =>
|
|
15501
|
+
return files ? files.map((file) => path.posix.join(directoryPath, `**/${path.extname(file) ? file : `${file}${extensionGlob}`}`)) : [path.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)];
|
|
15911
15502
|
};
|
|
15912
15503
|
const directoryToGlob = async (directoryPaths, { cwd = y.cwd(), files, extensions, fs: fsImplementation } = {}) => {
|
|
15913
15504
|
return (await Promise.all(directoryPaths.map(async (directoryPath) => {
|
|
@@ -16022,12 +15613,12 @@ const createFilterFunction = (isIgnored, cwd) => {
|
|
|
16022
15613
|
const basePath = cwd || y.cwd();
|
|
16023
15614
|
const pathCache = /* @__PURE__ */ new Map();
|
|
16024
15615
|
return (fastGlobResult) => {
|
|
16025
|
-
const pathKey$1 =
|
|
15616
|
+
const pathKey$1 = path.normalize(fastGlobResult.path ?? fastGlobResult);
|
|
16026
15617
|
if (seen.has(pathKey$1)) return false;
|
|
16027
15618
|
if (isIgnored) {
|
|
16028
15619
|
let absolutePath = pathCache.get(pathKey$1);
|
|
16029
15620
|
if (absolutePath === void 0) {
|
|
16030
|
-
absolutePath =
|
|
15621
|
+
absolutePath = path.isAbsolute(pathKey$1) ? pathKey$1 : path.resolve(basePath, pathKey$1);
|
|
16031
15622
|
pathCache.set(pathKey$1, absolutePath);
|
|
16032
15623
|
if (pathCache.size > 1e4) pathCache.clear();
|
|
16033
15624
|
}
|
|
@@ -17100,9 +16691,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
17100
16691
|
//#endregion
|
|
17101
16692
|
//#region src/core/utils/fs.ts
|
|
17102
16693
|
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
17103
|
-
async function pathExists(path$
|
|
16694
|
+
async function pathExists(path$17) {
|
|
17104
16695
|
try {
|
|
17105
|
-
await access(path$
|
|
16696
|
+
await access(path$17);
|
|
17106
16697
|
return true;
|
|
17107
16698
|
} catch {
|
|
17108
16699
|
return false;
|
|
@@ -17605,7 +17196,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17605
17196
|
* @public
|
|
17606
17197
|
*/
|
|
17607
17198
|
var fs$5 = __require("fs");
|
|
17608
|
-
var path$
|
|
17199
|
+
var path$5 = __require("path");
|
|
17609
17200
|
var utils = require_utils();
|
|
17610
17201
|
var scopeOptionWarned = false;
|
|
17611
17202
|
/** @type {string} */
|
|
@@ -17675,9 +17266,9 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17675
17266
|
* @return {String}
|
|
17676
17267
|
*/
|
|
17677
17268
|
exports.resolveInclude = function(name$1, filename, isDir) {
|
|
17678
|
-
var dirname$2 = path$
|
|
17679
|
-
var extname = path$
|
|
17680
|
-
var resolve$1 = path$
|
|
17269
|
+
var dirname$2 = path$5.dirname;
|
|
17270
|
+
var extname = path$5.extname;
|
|
17271
|
+
var resolve$1 = path$5.resolve;
|
|
17681
17272
|
var includePath = resolve$1(isDir ? filename : dirname$2(filename), name$1);
|
|
17682
17273
|
if (!extname(name$1)) includePath += ".ejs";
|
|
17683
17274
|
return includePath;
|
|
@@ -17703,22 +17294,22 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17703
17294
|
* @param {Options} options compilation options
|
|
17704
17295
|
* @return {String}
|
|
17705
17296
|
*/
|
|
17706
|
-
function getIncludePath(path$
|
|
17297
|
+
function getIncludePath(path$17, options) {
|
|
17707
17298
|
var includePath;
|
|
17708
17299
|
var filePath;
|
|
17709
17300
|
var views = options.views;
|
|
17710
|
-
var match = /^[A-Za-z]+:\\|^\//.exec(path$
|
|
17301
|
+
var match = /^[A-Za-z]+:\\|^\//.exec(path$17);
|
|
17711
17302
|
if (match && match.length) {
|
|
17712
|
-
path$
|
|
17713
|
-
if (Array.isArray(options.root)) includePath = resolvePaths(path$
|
|
17714
|
-
else includePath = exports.resolveInclude(path$
|
|
17303
|
+
path$17 = path$17.replace(/^\/*/, "");
|
|
17304
|
+
if (Array.isArray(options.root)) includePath = resolvePaths(path$17, options.root);
|
|
17305
|
+
else includePath = exports.resolveInclude(path$17, options.root || "/", true);
|
|
17715
17306
|
} else {
|
|
17716
17307
|
if (options.filename) {
|
|
17717
|
-
filePath = exports.resolveInclude(path$
|
|
17308
|
+
filePath = exports.resolveInclude(path$17, options.filename);
|
|
17718
17309
|
if (fs$5.existsSync(filePath)) includePath = filePath;
|
|
17719
17310
|
}
|
|
17720
|
-
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$
|
|
17721
|
-
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$
|
|
17311
|
+
if (!includePath && Array.isArray(views)) includePath = resolvePaths(path$17, views);
|
|
17312
|
+
if (!includePath && typeof options.includer !== "function") throw new Error("Could not find the include file \"" + options.escapeFunction(path$17) + "\"");
|
|
17722
17313
|
}
|
|
17723
17314
|
return includePath;
|
|
17724
17315
|
}
|
|
@@ -17810,11 +17401,11 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17810
17401
|
* Depending on the value of `options.client`, either type might be returned
|
|
17811
17402
|
* @static
|
|
17812
17403
|
*/
|
|
17813
|
-
function includeFile(path$
|
|
17404
|
+
function includeFile(path$17, options) {
|
|
17814
17405
|
var opts = utils.shallowCopy(utils.createNullProtoObjWherePossible(), options);
|
|
17815
|
-
opts.filename = getIncludePath(path$
|
|
17406
|
+
opts.filename = getIncludePath(path$17, opts);
|
|
17816
17407
|
if (typeof options.includer === "function") {
|
|
17817
|
-
var includerResult = options.includer(path$
|
|
17408
|
+
var includerResult = options.includer(path$17, opts.filename);
|
|
17818
17409
|
if (includerResult) {
|
|
17819
17410
|
if (includerResult.filename) opts.filename = includerResult.filename;
|
|
17820
17411
|
if (includerResult.template) return handleCache(opts, includerResult.template);
|
|
@@ -18065,10 +17656,10 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18065
17656
|
throw e$1;
|
|
18066
17657
|
}
|
|
18067
17658
|
var returnedFn = opts.client ? fn : function anonymous(data) {
|
|
18068
|
-
var include = function(path$
|
|
17659
|
+
var include = function(path$17, includeData) {
|
|
18069
17660
|
var d$2 = utils.shallowCopy(utils.createNullProtoObjWherePossible(), data);
|
|
18070
17661
|
if (includeData) d$2 = utils.shallowCopy(d$2, includeData);
|
|
18071
|
-
return includeFile(path$
|
|
17662
|
+
return includeFile(path$17, opts)(d$2);
|
|
18072
17663
|
};
|
|
18073
17664
|
return fn.apply(opts.context, [
|
|
18074
17665
|
data || utils.createNullProtoObjWherePossible(),
|
|
@@ -18079,7 +17670,7 @@ var require_ejs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18079
17670
|
};
|
|
18080
17671
|
if (opts.filename && typeof Object.defineProperty === "function") {
|
|
18081
17672
|
var filename = opts.filename;
|
|
18082
|
-
var basename$1 = path$
|
|
17673
|
+
var basename$1 = path$5.basename(filename, path$5.extname(filename));
|
|
18083
17674
|
try {
|
|
18084
17675
|
Object.defineProperty(returnedFn, "name", {
|
|
18085
17676
|
value: basename$1,
|
|
@@ -26187,17 +25778,433 @@ async function getUserInfo(accessToken) {
|
|
|
26187
25778
|
return result.data;
|
|
26188
25779
|
}
|
|
26189
25780
|
|
|
25781
|
+
//#endregion
|
|
25782
|
+
//#region node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
25783
|
+
const ANSI_BACKGROUND_OFFSET = 10;
|
|
25784
|
+
const wrapAnsi16 = (offset = 0) => (code$1) => `\u001B[${code$1 + offset}m`;
|
|
25785
|
+
const wrapAnsi256 = (offset = 0) => (code$1) => `\u001B[${38 + offset};5;${code$1}m`;
|
|
25786
|
+
const wrapAnsi16m = (offset = 0) => (red$1, green$1, blue$1) => `\u001B[${38 + offset};2;${red$1};${green$1};${blue$1}m`;
|
|
25787
|
+
const styles$1 = {
|
|
25788
|
+
modifier: {
|
|
25789
|
+
reset: [0, 0],
|
|
25790
|
+
bold: [1, 22],
|
|
25791
|
+
dim: [2, 22],
|
|
25792
|
+
italic: [3, 23],
|
|
25793
|
+
underline: [4, 24],
|
|
25794
|
+
overline: [53, 55],
|
|
25795
|
+
inverse: [7, 27],
|
|
25796
|
+
hidden: [8, 28],
|
|
25797
|
+
strikethrough: [9, 29]
|
|
25798
|
+
},
|
|
25799
|
+
color: {
|
|
25800
|
+
black: [30, 39],
|
|
25801
|
+
red: [31, 39],
|
|
25802
|
+
green: [32, 39],
|
|
25803
|
+
yellow: [33, 39],
|
|
25804
|
+
blue: [34, 39],
|
|
25805
|
+
magenta: [35, 39],
|
|
25806
|
+
cyan: [36, 39],
|
|
25807
|
+
white: [37, 39],
|
|
25808
|
+
blackBright: [90, 39],
|
|
25809
|
+
gray: [90, 39],
|
|
25810
|
+
grey: [90, 39],
|
|
25811
|
+
redBright: [91, 39],
|
|
25812
|
+
greenBright: [92, 39],
|
|
25813
|
+
yellowBright: [93, 39],
|
|
25814
|
+
blueBright: [94, 39],
|
|
25815
|
+
magentaBright: [95, 39],
|
|
25816
|
+
cyanBright: [96, 39],
|
|
25817
|
+
whiteBright: [97, 39]
|
|
25818
|
+
},
|
|
25819
|
+
bgColor: {
|
|
25820
|
+
bgBlack: [40, 49],
|
|
25821
|
+
bgRed: [41, 49],
|
|
25822
|
+
bgGreen: [42, 49],
|
|
25823
|
+
bgYellow: [43, 49],
|
|
25824
|
+
bgBlue: [44, 49],
|
|
25825
|
+
bgMagenta: [45, 49],
|
|
25826
|
+
bgCyan: [46, 49],
|
|
25827
|
+
bgWhite: [47, 49],
|
|
25828
|
+
bgBlackBright: [100, 49],
|
|
25829
|
+
bgGray: [100, 49],
|
|
25830
|
+
bgGrey: [100, 49],
|
|
25831
|
+
bgRedBright: [101, 49],
|
|
25832
|
+
bgGreenBright: [102, 49],
|
|
25833
|
+
bgYellowBright: [103, 49],
|
|
25834
|
+
bgBlueBright: [104, 49],
|
|
25835
|
+
bgMagentaBright: [105, 49],
|
|
25836
|
+
bgCyanBright: [106, 49],
|
|
25837
|
+
bgWhiteBright: [107, 49]
|
|
25838
|
+
}
|
|
25839
|
+
};
|
|
25840
|
+
const modifierNames = Object.keys(styles$1.modifier);
|
|
25841
|
+
const foregroundColorNames = Object.keys(styles$1.color);
|
|
25842
|
+
const backgroundColorNames = Object.keys(styles$1.bgColor);
|
|
25843
|
+
const colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
25844
|
+
function assembleStyles() {
|
|
25845
|
+
const codes = /* @__PURE__ */ new Map();
|
|
25846
|
+
for (const [groupName, group] of Object.entries(styles$1)) {
|
|
25847
|
+
for (const [styleName, style] of Object.entries(group)) {
|
|
25848
|
+
styles$1[styleName] = {
|
|
25849
|
+
open: `\u001B[${style[0]}m`,
|
|
25850
|
+
close: `\u001B[${style[1]}m`
|
|
25851
|
+
};
|
|
25852
|
+
group[styleName] = styles$1[styleName];
|
|
25853
|
+
codes.set(style[0], style[1]);
|
|
25854
|
+
}
|
|
25855
|
+
Object.defineProperty(styles$1, groupName, {
|
|
25856
|
+
value: group,
|
|
25857
|
+
enumerable: false
|
|
25858
|
+
});
|
|
25859
|
+
}
|
|
25860
|
+
Object.defineProperty(styles$1, "codes", {
|
|
25861
|
+
value: codes,
|
|
25862
|
+
enumerable: false
|
|
25863
|
+
});
|
|
25864
|
+
styles$1.color.close = "\x1B[39m";
|
|
25865
|
+
styles$1.bgColor.close = "\x1B[49m";
|
|
25866
|
+
styles$1.color.ansi = wrapAnsi16();
|
|
25867
|
+
styles$1.color.ansi256 = wrapAnsi256();
|
|
25868
|
+
styles$1.color.ansi16m = wrapAnsi16m();
|
|
25869
|
+
styles$1.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
25870
|
+
styles$1.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
25871
|
+
styles$1.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
25872
|
+
Object.defineProperties(styles$1, {
|
|
25873
|
+
rgbToAnsi256: {
|
|
25874
|
+
value(red$1, green$1, blue$1) {
|
|
25875
|
+
if (red$1 === green$1 && green$1 === blue$1) {
|
|
25876
|
+
if (red$1 < 8) return 16;
|
|
25877
|
+
if (red$1 > 248) return 231;
|
|
25878
|
+
return Math.round((red$1 - 8) / 247 * 24) + 232;
|
|
25879
|
+
}
|
|
25880
|
+
return 16 + 36 * Math.round(red$1 / 255 * 5) + 6 * Math.round(green$1 / 255 * 5) + Math.round(blue$1 / 255 * 5);
|
|
25881
|
+
},
|
|
25882
|
+
enumerable: false
|
|
25883
|
+
},
|
|
25884
|
+
hexToRgb: {
|
|
25885
|
+
value(hex) {
|
|
25886
|
+
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
25887
|
+
if (!matches) return [
|
|
25888
|
+
0,
|
|
25889
|
+
0,
|
|
25890
|
+
0
|
|
25891
|
+
];
|
|
25892
|
+
let [colorString] = matches;
|
|
25893
|
+
if (colorString.length === 3) colorString = [...colorString].map((character) => character + character).join("");
|
|
25894
|
+
const integer$1 = Number.parseInt(colorString, 16);
|
|
25895
|
+
return [
|
|
25896
|
+
integer$1 >> 16 & 255,
|
|
25897
|
+
integer$1 >> 8 & 255,
|
|
25898
|
+
integer$1 & 255
|
|
25899
|
+
];
|
|
25900
|
+
},
|
|
25901
|
+
enumerable: false
|
|
25902
|
+
},
|
|
25903
|
+
hexToAnsi256: {
|
|
25904
|
+
value: (hex) => styles$1.rgbToAnsi256(...styles$1.hexToRgb(hex)),
|
|
25905
|
+
enumerable: false
|
|
25906
|
+
},
|
|
25907
|
+
ansi256ToAnsi: {
|
|
25908
|
+
value(code$1) {
|
|
25909
|
+
if (code$1 < 8) return 30 + code$1;
|
|
25910
|
+
if (code$1 < 16) return 90 + (code$1 - 8);
|
|
25911
|
+
let red$1;
|
|
25912
|
+
let green$1;
|
|
25913
|
+
let blue$1;
|
|
25914
|
+
if (code$1 >= 232) {
|
|
25915
|
+
red$1 = ((code$1 - 232) * 10 + 8) / 255;
|
|
25916
|
+
green$1 = red$1;
|
|
25917
|
+
blue$1 = red$1;
|
|
25918
|
+
} else {
|
|
25919
|
+
code$1 -= 16;
|
|
25920
|
+
const remainder = code$1 % 36;
|
|
25921
|
+
red$1 = Math.floor(code$1 / 36) / 5;
|
|
25922
|
+
green$1 = Math.floor(remainder / 6) / 5;
|
|
25923
|
+
blue$1 = remainder % 6 / 5;
|
|
25924
|
+
}
|
|
25925
|
+
const value = Math.max(red$1, green$1, blue$1) * 2;
|
|
25926
|
+
if (value === 0) return 30;
|
|
25927
|
+
let result = 30 + (Math.round(blue$1) << 2 | Math.round(green$1) << 1 | Math.round(red$1));
|
|
25928
|
+
if (value === 2) result += 60;
|
|
25929
|
+
return result;
|
|
25930
|
+
},
|
|
25931
|
+
enumerable: false
|
|
25932
|
+
},
|
|
25933
|
+
rgbToAnsi: {
|
|
25934
|
+
value: (red$1, green$1, blue$1) => styles$1.ansi256ToAnsi(styles$1.rgbToAnsi256(red$1, green$1, blue$1)),
|
|
25935
|
+
enumerable: false
|
|
25936
|
+
},
|
|
25937
|
+
hexToAnsi: {
|
|
25938
|
+
value: (hex) => styles$1.ansi256ToAnsi(styles$1.hexToAnsi256(hex)),
|
|
25939
|
+
enumerable: false
|
|
25940
|
+
}
|
|
25941
|
+
});
|
|
25942
|
+
return styles$1;
|
|
25943
|
+
}
|
|
25944
|
+
const ansiStyles = assembleStyles();
|
|
25945
|
+
var ansi_styles_default = ansiStyles;
|
|
25946
|
+
|
|
25947
|
+
//#endregion
|
|
25948
|
+
//#region node_modules/chalk/source/vendor/supports-color/index.js
|
|
25949
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : y.argv) {
|
|
25950
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
25951
|
+
const position = argv.indexOf(prefix + flag);
|
|
25952
|
+
const terminatorPosition = argv.indexOf("--");
|
|
25953
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
25954
|
+
}
|
|
25955
|
+
const { env } = y;
|
|
25956
|
+
let flagForceColor;
|
|
25957
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) flagForceColor = 0;
|
|
25958
|
+
else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) flagForceColor = 1;
|
|
25959
|
+
function envForceColor() {
|
|
25960
|
+
if ("FORCE_COLOR" in env) {
|
|
25961
|
+
if (env.FORCE_COLOR === "true") return 1;
|
|
25962
|
+
if (env.FORCE_COLOR === "false") return 0;
|
|
25963
|
+
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
25964
|
+
}
|
|
25965
|
+
}
|
|
25966
|
+
function translateLevel(level) {
|
|
25967
|
+
if (level === 0) return false;
|
|
25968
|
+
return {
|
|
25969
|
+
level,
|
|
25970
|
+
hasBasic: true,
|
|
25971
|
+
has256: level >= 2,
|
|
25972
|
+
has16m: level >= 3
|
|
25973
|
+
};
|
|
25974
|
+
}
|
|
25975
|
+
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
25976
|
+
const noFlagForceColor = envForceColor();
|
|
25977
|
+
if (noFlagForceColor !== void 0) flagForceColor = noFlagForceColor;
|
|
25978
|
+
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
25979
|
+
if (forceColor === 0) return 0;
|
|
25980
|
+
if (sniffFlags) {
|
|
25981
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) return 3;
|
|
25982
|
+
if (hasFlag("color=256")) return 2;
|
|
25983
|
+
}
|
|
25984
|
+
if ("TF_BUILD" in env && "AGENT_NAME" in env) return 1;
|
|
25985
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) return 0;
|
|
25986
|
+
const min = forceColor || 0;
|
|
25987
|
+
if (env.TERM === "dumb") return min;
|
|
25988
|
+
if (y.platform === "win32") {
|
|
25989
|
+
const osRelease = os.release().split(".");
|
|
25990
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
25991
|
+
return 1;
|
|
25992
|
+
}
|
|
25993
|
+
if ("CI" in env) {
|
|
25994
|
+
if ([
|
|
25995
|
+
"GITHUB_ACTIONS",
|
|
25996
|
+
"GITEA_ACTIONS",
|
|
25997
|
+
"CIRCLECI"
|
|
25998
|
+
].some((key) => key in env)) return 3;
|
|
25999
|
+
if ([
|
|
26000
|
+
"TRAVIS",
|
|
26001
|
+
"APPVEYOR",
|
|
26002
|
+
"GITLAB_CI",
|
|
26003
|
+
"BUILDKITE",
|
|
26004
|
+
"DRONE"
|
|
26005
|
+
].some((sign) => sign in env) || env.CI_NAME === "codeship") return 1;
|
|
26006
|
+
return min;
|
|
26007
|
+
}
|
|
26008
|
+
if ("TEAMCITY_VERSION" in env) return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
26009
|
+
if (env.COLORTERM === "truecolor") return 3;
|
|
26010
|
+
if (env.TERM === "xterm-kitty") return 3;
|
|
26011
|
+
if (env.TERM === "xterm-ghostty") return 3;
|
|
26012
|
+
if (env.TERM === "wezterm") return 3;
|
|
26013
|
+
if ("TERM_PROGRAM" in env) {
|
|
26014
|
+
const version$2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
26015
|
+
switch (env.TERM_PROGRAM) {
|
|
26016
|
+
case "iTerm.app": return version$2 >= 3 ? 3 : 2;
|
|
26017
|
+
case "Apple_Terminal": return 2;
|
|
26018
|
+
}
|
|
26019
|
+
}
|
|
26020
|
+
if (/-256(color)?$/i.test(env.TERM)) return 2;
|
|
26021
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) return 1;
|
|
26022
|
+
if ("COLORTERM" in env) return 1;
|
|
26023
|
+
return min;
|
|
26024
|
+
}
|
|
26025
|
+
function createSupportsColor(stream, options = {}) {
|
|
26026
|
+
return translateLevel(_supportsColor(stream, {
|
|
26027
|
+
streamIsTTY: stream && stream.isTTY,
|
|
26028
|
+
...options
|
|
26029
|
+
}));
|
|
26030
|
+
}
|
|
26031
|
+
const supportsColor = {
|
|
26032
|
+
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
26033
|
+
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
26034
|
+
};
|
|
26035
|
+
var supports_color_default = supportsColor;
|
|
26036
|
+
|
|
26037
|
+
//#endregion
|
|
26038
|
+
//#region node_modules/chalk/source/utilities.js
|
|
26039
|
+
function stringReplaceAll(string$2, substring, replacer) {
|
|
26040
|
+
let index = string$2.indexOf(substring);
|
|
26041
|
+
if (index === -1) return string$2;
|
|
26042
|
+
const substringLength = substring.length;
|
|
26043
|
+
let endIndex = 0;
|
|
26044
|
+
let returnValue = "";
|
|
26045
|
+
do {
|
|
26046
|
+
returnValue += string$2.slice(endIndex, index) + substring + replacer;
|
|
26047
|
+
endIndex = index + substringLength;
|
|
26048
|
+
index = string$2.indexOf(substring, endIndex);
|
|
26049
|
+
} while (index !== -1);
|
|
26050
|
+
returnValue += string$2.slice(endIndex);
|
|
26051
|
+
return returnValue;
|
|
26052
|
+
}
|
|
26053
|
+
function stringEncaseCRLFWithFirstIndex(string$2, prefix, postfix, index) {
|
|
26054
|
+
let endIndex = 0;
|
|
26055
|
+
let returnValue = "";
|
|
26056
|
+
do {
|
|
26057
|
+
const gotCR = string$2[index - 1] === "\r";
|
|
26058
|
+
returnValue += string$2.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
26059
|
+
endIndex = index + 1;
|
|
26060
|
+
index = string$2.indexOf("\n", endIndex);
|
|
26061
|
+
} while (index !== -1);
|
|
26062
|
+
returnValue += string$2.slice(endIndex);
|
|
26063
|
+
return returnValue;
|
|
26064
|
+
}
|
|
26065
|
+
|
|
26066
|
+
//#endregion
|
|
26067
|
+
//#region node_modules/chalk/source/index.js
|
|
26068
|
+
const { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
26069
|
+
const GENERATOR = Symbol("GENERATOR");
|
|
26070
|
+
const STYLER = Symbol("STYLER");
|
|
26071
|
+
const IS_EMPTY = Symbol("IS_EMPTY");
|
|
26072
|
+
const levelMapping = [
|
|
26073
|
+
"ansi",
|
|
26074
|
+
"ansi",
|
|
26075
|
+
"ansi256",
|
|
26076
|
+
"ansi16m"
|
|
26077
|
+
];
|
|
26078
|
+
const styles = Object.create(null);
|
|
26079
|
+
const applyOptions = (object$1, options = {}) => {
|
|
26080
|
+
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) throw new Error("The `level` option should be an integer from 0 to 3");
|
|
26081
|
+
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
26082
|
+
object$1.level = options.level === void 0 ? colorLevel : options.level;
|
|
26083
|
+
};
|
|
26084
|
+
const chalkFactory = (options) => {
|
|
26085
|
+
const chalk$1 = (...strings) => strings.join(" ");
|
|
26086
|
+
applyOptions(chalk$1, options);
|
|
26087
|
+
Object.setPrototypeOf(chalk$1, createChalk.prototype);
|
|
26088
|
+
return chalk$1;
|
|
26089
|
+
};
|
|
26090
|
+
function createChalk(options) {
|
|
26091
|
+
return chalkFactory(options);
|
|
26092
|
+
}
|
|
26093
|
+
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
26094
|
+
for (const [styleName, style] of Object.entries(ansi_styles_default)) styles[styleName] = { get() {
|
|
26095
|
+
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
26096
|
+
Object.defineProperty(this, styleName, { value: builder });
|
|
26097
|
+
return builder;
|
|
26098
|
+
} };
|
|
26099
|
+
styles.visible = { get() {
|
|
26100
|
+
const builder = createBuilder(this, this[STYLER], true);
|
|
26101
|
+
Object.defineProperty(this, "visible", { value: builder });
|
|
26102
|
+
return builder;
|
|
26103
|
+
} };
|
|
26104
|
+
const getModelAnsi = (model, level, type, ...arguments_) => {
|
|
26105
|
+
if (model === "rgb") {
|
|
26106
|
+
if (level === "ansi16m") return ansi_styles_default[type].ansi16m(...arguments_);
|
|
26107
|
+
if (level === "ansi256") return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
26108
|
+
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
26109
|
+
}
|
|
26110
|
+
if (model === "hex") return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
26111
|
+
return ansi_styles_default[type][model](...arguments_);
|
|
26112
|
+
};
|
|
26113
|
+
for (const model of [
|
|
26114
|
+
"rgb",
|
|
26115
|
+
"hex",
|
|
26116
|
+
"ansi256"
|
|
26117
|
+
]) {
|
|
26118
|
+
styles[model] = { get() {
|
|
26119
|
+
const { level } = this;
|
|
26120
|
+
return function(...arguments_) {
|
|
26121
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
26122
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
26123
|
+
};
|
|
26124
|
+
} };
|
|
26125
|
+
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
26126
|
+
styles[bgModel] = { get() {
|
|
26127
|
+
const { level } = this;
|
|
26128
|
+
return function(...arguments_) {
|
|
26129
|
+
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
26130
|
+
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
26131
|
+
};
|
|
26132
|
+
} };
|
|
26133
|
+
}
|
|
26134
|
+
const proto = Object.defineProperties(() => {}, {
|
|
26135
|
+
...styles,
|
|
26136
|
+
level: {
|
|
26137
|
+
enumerable: true,
|
|
26138
|
+
get() {
|
|
26139
|
+
return this[GENERATOR].level;
|
|
26140
|
+
},
|
|
26141
|
+
set(level) {
|
|
26142
|
+
this[GENERATOR].level = level;
|
|
26143
|
+
}
|
|
26144
|
+
}
|
|
26145
|
+
});
|
|
26146
|
+
const createStyler = (open, close, parent) => {
|
|
26147
|
+
let openAll;
|
|
26148
|
+
let closeAll;
|
|
26149
|
+
if (parent === void 0) {
|
|
26150
|
+
openAll = open;
|
|
26151
|
+
closeAll = close;
|
|
26152
|
+
} else {
|
|
26153
|
+
openAll = parent.openAll + open;
|
|
26154
|
+
closeAll = close + parent.closeAll;
|
|
26155
|
+
}
|
|
26156
|
+
return {
|
|
26157
|
+
open,
|
|
26158
|
+
close,
|
|
26159
|
+
openAll,
|
|
26160
|
+
closeAll,
|
|
26161
|
+
parent
|
|
26162
|
+
};
|
|
26163
|
+
};
|
|
26164
|
+
const createBuilder = (self$1, _styler, _isEmpty) => {
|
|
26165
|
+
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
26166
|
+
Object.setPrototypeOf(builder, proto);
|
|
26167
|
+
builder[GENERATOR] = self$1;
|
|
26168
|
+
builder[STYLER] = _styler;
|
|
26169
|
+
builder[IS_EMPTY] = _isEmpty;
|
|
26170
|
+
return builder;
|
|
26171
|
+
};
|
|
26172
|
+
const applyStyle = (self$1, string$2) => {
|
|
26173
|
+
if (self$1.level <= 0 || !string$2) return self$1[IS_EMPTY] ? "" : string$2;
|
|
26174
|
+
let styler = self$1[STYLER];
|
|
26175
|
+
if (styler === void 0) return string$2;
|
|
26176
|
+
const { openAll, closeAll } = styler;
|
|
26177
|
+
if (string$2.includes("\x1B")) while (styler !== void 0) {
|
|
26178
|
+
string$2 = stringReplaceAll(string$2, styler.close, styler.open);
|
|
26179
|
+
styler = styler.parent;
|
|
26180
|
+
}
|
|
26181
|
+
const lfIndex = string$2.indexOf("\n");
|
|
26182
|
+
if (lfIndex !== -1) string$2 = stringEncaseCRLFWithFirstIndex(string$2, closeAll, openAll, lfIndex);
|
|
26183
|
+
return openAll + string$2 + closeAll;
|
|
26184
|
+
};
|
|
26185
|
+
Object.defineProperties(createChalk.prototype, styles);
|
|
26186
|
+
const chalk = createChalk();
|
|
26187
|
+
const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
26188
|
+
var source_default = chalk;
|
|
26189
|
+
|
|
26190
26190
|
//#endregion
|
|
26191
26191
|
//#region src/cli/utils/theme.ts
|
|
26192
26192
|
/**
|
|
26193
|
-
* Base44 theme configuration
|
|
26193
|
+
* Base44 CLI theme configuration
|
|
26194
26194
|
*/
|
|
26195
|
-
const theme = {
|
|
26196
|
-
|
|
26197
|
-
|
|
26198
|
-
|
|
26199
|
-
|
|
26200
|
-
|
|
26195
|
+
const theme = {
|
|
26196
|
+
colors: {
|
|
26197
|
+
base44Orange: source_default.hex("#E86B3C"),
|
|
26198
|
+
shinyOrange: source_default.hex("#FFD700"),
|
|
26199
|
+
links: source_default.hex("#00D4FF"),
|
|
26200
|
+
white: source_default.white
|
|
26201
|
+
},
|
|
26202
|
+
styles: {
|
|
26203
|
+
header: source_default.dim,
|
|
26204
|
+
bold: source_default.bold,
|
|
26205
|
+
dim: source_default.dim
|
|
26206
|
+
}
|
|
26207
|
+
};
|
|
26201
26208
|
|
|
26202
26209
|
//#endregion
|
|
26203
26210
|
//#region src/cli/utils/animate.ts
|
|
@@ -26217,13 +26224,13 @@ async function animateLineReveal(line, duration$2) {
|
|
|
26217
26224
|
const progress = step / steps;
|
|
26218
26225
|
const revealIndex = Math.floor(progress * line.length);
|
|
26219
26226
|
let output = "";
|
|
26220
|
-
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.
|
|
26221
|
-
else if (i$1 === revealIndex) output += theme.colors.
|
|
26222
|
-
else output +=
|
|
26227
|
+
for (let i$1 = 0; i$1 < line.length; i$1++) if (i$1 < revealIndex) output += theme.colors.base44Orange(line[i$1]);
|
|
26228
|
+
else if (i$1 === revealIndex) output += theme.colors.shinyOrange(line[i$1]);
|
|
26229
|
+
else output += theme.styles.dim(line[i$1]);
|
|
26223
26230
|
process.stdout.write(`\r${output}`);
|
|
26224
26231
|
await sleep(stepDuration);
|
|
26225
26232
|
}
|
|
26226
|
-
process.stdout.write(`\r${theme.colors.
|
|
26233
|
+
process.stdout.write(`\r${theme.colors.base44Orange(line)}\n`);
|
|
26227
26234
|
}
|
|
26228
26235
|
/**
|
|
26229
26236
|
* Quick shimmer pass over the entire banner.
|
|
@@ -26240,15 +26247,15 @@ async function shimmerPass(lines, duration$2) {
|
|
|
26240
26247
|
let output = "";
|
|
26241
26248
|
for (let i$1 = 0; i$1 < line.length; i$1++) {
|
|
26242
26249
|
const dist = Math.abs(i$1 - shimmerPos);
|
|
26243
|
-
if (dist < 3) output += dist === 0 ?
|
|
26244
|
-
else output += theme.colors.
|
|
26250
|
+
if (dist < 3) output += dist === 0 ? theme.colors.white(line[i$1]) : theme.colors.shinyOrange(line[i$1]);
|
|
26251
|
+
else output += theme.colors.base44Orange(line[i$1]);
|
|
26245
26252
|
}
|
|
26246
26253
|
console.log(output);
|
|
26247
26254
|
}
|
|
26248
26255
|
await sleep(stepDuration);
|
|
26249
26256
|
}
|
|
26250
26257
|
process.stdout.write(moveUp);
|
|
26251
|
-
for (const line of lines) console.log(theme.colors.
|
|
26258
|
+
for (const line of lines) console.log(theme.colors.base44Orange(line));
|
|
26252
26259
|
}
|
|
26253
26260
|
/**
|
|
26254
26261
|
* Animate the output with a smooth line-by-line reveal.
|
|
@@ -26282,7 +26289,7 @@ const BANNER_LINES = [
|
|
|
26282
26289
|
*/
|
|
26283
26290
|
async function printBanner() {
|
|
26284
26291
|
if (process.stdout.isTTY) await printAnimatedLines(BANNER_LINES);
|
|
26285
|
-
else console.log(theme.colors.
|
|
26292
|
+
else console.log(theme.colors.base44Orange(BANNER_LINES.join("\n")));
|
|
26286
26293
|
}
|
|
26287
26294
|
|
|
26288
26295
|
//#endregion
|
|
@@ -26330,7 +26337,7 @@ async function runCommand(commandFn, options) {
|
|
|
26330
26337
|
if (options?.fullBanner) {
|
|
26331
26338
|
await printBanner();
|
|
26332
26339
|
Ie("");
|
|
26333
|
-
} else Ie(theme.colors.
|
|
26340
|
+
} else Ie(theme.colors.base44Orange(" Base 44 "));
|
|
26334
26341
|
await loadProjectEnv();
|
|
26335
26342
|
try {
|
|
26336
26343
|
if (options?.requireAuth) {
|
|
@@ -26422,7 +26429,7 @@ async function generateAndDisplayDeviceCode() {
|
|
|
26422
26429
|
successMessage: "Device code generated",
|
|
26423
26430
|
errorMessage: "Failed to generate device code"
|
|
26424
26431
|
});
|
|
26425
|
-
M.info(`Verification code: ${
|
|
26432
|
+
M.info(`Verification code: ${theme.styles.bold(deviceCodeResponse.userCode)}\nPlease confirm this code at: ${deviceCodeResponse.verificationUri}`);
|
|
26426
26433
|
return deviceCodeResponse;
|
|
26427
26434
|
}
|
|
26428
26435
|
async function waitForAuthentication(deviceCode, expiresIn, interval) {
|
|
@@ -26466,7 +26473,7 @@ async function login() {
|
|
|
26466
26473
|
const token = await waitForAuthentication(deviceCodeResponse.deviceCode, deviceCodeResponse.expiresIn, deviceCodeResponse.interval);
|
|
26467
26474
|
const userInfo = await getUserInfo(token.accessToken);
|
|
26468
26475
|
await saveAuthData(token, userInfo);
|
|
26469
|
-
return { outroMessage: `Successfully logged in as ${
|
|
26476
|
+
return { outroMessage: `Successfully logged in as ${theme.styles.bold(userInfo.email)}` };
|
|
26470
26477
|
}
|
|
26471
26478
|
const loginCommand = new Command("login").description("Authenticate with Base44").action(async () => {
|
|
26472
26479
|
await runCommand(login);
|
|
@@ -26476,7 +26483,7 @@ const loginCommand = new Command("login").description("Authenticate with Base44"
|
|
|
26476
26483
|
//#region src/cli/commands/auth/whoami.ts
|
|
26477
26484
|
async function whoami() {
|
|
26478
26485
|
const auth = await readAuth();
|
|
26479
|
-
return { outroMessage: `Logged in as: ${
|
|
26486
|
+
return { outroMessage: `Logged in as: ${theme.styles.bold(auth.email)}` };
|
|
26480
26487
|
}
|
|
26481
26488
|
const whoamiCommand = new Command("whoami").description("Display current authenticated user").action(async () => {
|
|
26482
26489
|
await runCommand(whoami, { requireAuth: true });
|
|
@@ -27392,15 +27399,15 @@ var ReadStream = class extends Minipass {
|
|
|
27392
27399
|
[_size];
|
|
27393
27400
|
[_remain];
|
|
27394
27401
|
[_autoClose];
|
|
27395
|
-
constructor(path$
|
|
27402
|
+
constructor(path$17, opt) {
|
|
27396
27403
|
opt = opt || {};
|
|
27397
27404
|
super(opt);
|
|
27398
27405
|
this.readable = true;
|
|
27399
27406
|
this.writable = false;
|
|
27400
|
-
if (typeof path$
|
|
27407
|
+
if (typeof path$17 !== "string") throw new TypeError("path must be a string");
|
|
27401
27408
|
this[_errored] = false;
|
|
27402
27409
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27403
|
-
this[_path] = path$
|
|
27410
|
+
this[_path] = path$17;
|
|
27404
27411
|
this[_readSize] = opt.readSize || 16 * 1024 * 1024;
|
|
27405
27412
|
this[_reading] = false;
|
|
27406
27413
|
this[_size] = typeof opt.size === "number" ? opt.size : Infinity;
|
|
@@ -27542,10 +27549,10 @@ var WriteStream = class extends EE {
|
|
|
27542
27549
|
[_flags];
|
|
27543
27550
|
[_finished] = false;
|
|
27544
27551
|
[_pos];
|
|
27545
|
-
constructor(path$
|
|
27552
|
+
constructor(path$17, opt) {
|
|
27546
27553
|
opt = opt || {};
|
|
27547
27554
|
super(opt);
|
|
27548
|
-
this[_path] = path$
|
|
27555
|
+
this[_path] = path$17;
|
|
27549
27556
|
this[_fd] = typeof opt.fd === "number" ? opt.fd : void 0;
|
|
27550
27557
|
this[_mode] = opt.mode === void 0 ? 438 : opt.mode;
|
|
27551
27558
|
this[_pos] = typeof opt.start === "number" ? opt.start : void 0;
|
|
@@ -28304,10 +28311,10 @@ var Header = class {
|
|
|
28304
28311
|
if (!(buf.length >= off + 512)) throw new Error("need 512 bytes for header");
|
|
28305
28312
|
const prefixSize = this.ctime || this.atime ? 130 : 155;
|
|
28306
28313
|
const split = splitPrefix(this.path || "", prefixSize);
|
|
28307
|
-
const path$
|
|
28314
|
+
const path$17 = split[0];
|
|
28308
28315
|
const prefix = split[1];
|
|
28309
28316
|
this.needPax = !!split[2];
|
|
28310
|
-
this.needPax = encString(buf, off, 100, path$
|
|
28317
|
+
this.needPax = encString(buf, off, 100, path$17) || this.needPax;
|
|
28311
28318
|
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax;
|
|
28312
28319
|
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax;
|
|
28313
28320
|
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax;
|
|
@@ -29146,16 +29153,16 @@ const modeFix = (mode, isDir, portable) => {
|
|
|
29146
29153
|
//#endregion
|
|
29147
29154
|
//#region node_modules/tar/dist/esm/strip-absolute-path.js
|
|
29148
29155
|
const { isAbsolute, parse: parse$1 } = win32;
|
|
29149
|
-
const stripAbsolutePath = (path$
|
|
29156
|
+
const stripAbsolutePath = (path$17) => {
|
|
29150
29157
|
let r$1 = "";
|
|
29151
|
-
let parsed = parse$1(path$
|
|
29152
|
-
while (isAbsolute(path$
|
|
29153
|
-
const root = path$
|
|
29154
|
-
path$
|
|
29158
|
+
let parsed = parse$1(path$17);
|
|
29159
|
+
while (isAbsolute(path$17) || parsed.root) {
|
|
29160
|
+
const root = path$17.charAt(0) === "/" && path$17.slice(0, 4) !== "//?/" ? "/" : parsed.root;
|
|
29161
|
+
path$17 = path$17.slice(root.length);
|
|
29155
29162
|
r$1 += root;
|
|
29156
|
-
parsed = parse$1(path$
|
|
29163
|
+
parsed = parse$1(path$17);
|
|
29157
29164
|
}
|
|
29158
|
-
return [r$1, path$
|
|
29165
|
+
return [r$1, path$17];
|
|
29159
29166
|
};
|
|
29160
29167
|
|
|
29161
29168
|
//#endregion
|
|
@@ -29175,10 +29182,10 @@ const decode = (s) => win.reduce((s$1, c$1) => s$1.split(c$1).join(toRaw.get(c$1
|
|
|
29175
29182
|
|
|
29176
29183
|
//#endregion
|
|
29177
29184
|
//#region node_modules/tar/dist/esm/write-entry.js
|
|
29178
|
-
const prefixPath = (path$
|
|
29179
|
-
if (!prefix) return normalizeWindowsPath(path$
|
|
29180
|
-
path$
|
|
29181
|
-
return stripTrailingSlashes(prefix) + "/" + path$
|
|
29185
|
+
const prefixPath = (path$17, prefix) => {
|
|
29186
|
+
if (!prefix) return normalizeWindowsPath(path$17);
|
|
29187
|
+
path$17 = normalizeWindowsPath(path$17).replace(/^\.(\/|$)/, "");
|
|
29188
|
+
return stripTrailingSlashes(prefix) + "/" + path$17;
|
|
29182
29189
|
};
|
|
29183
29190
|
const maxReadSize = 16 * 1024 * 1024;
|
|
29184
29191
|
const PROCESS$1 = Symbol("process");
|
|
@@ -29260,7 +29267,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29260
29267
|
this.path = decode(this.path.replace(/\\/g, "/"));
|
|
29261
29268
|
p$1 = p$1.replace(/\\/g, "/");
|
|
29262
29269
|
}
|
|
29263
|
-
this.absolute = normalizeWindowsPath(opt.absolute || path.resolve(this.cwd, p$1));
|
|
29270
|
+
this.absolute = normalizeWindowsPath(opt.absolute || path$1.resolve(this.cwd, p$1));
|
|
29264
29271
|
if (this.path === "") this.path = "./";
|
|
29265
29272
|
if (pathWarn) this.warn("TAR_ENTRY_INFO", `stripping ${pathWarn} from absolute path`, {
|
|
29266
29273
|
entry: this,
|
|
@@ -29302,8 +29309,8 @@ var WriteEntry = class extends Minipass {
|
|
|
29302
29309
|
[MODE](mode) {
|
|
29303
29310
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
29304
29311
|
}
|
|
29305
|
-
[PREFIX](path$
|
|
29306
|
-
return prefixPath(path$
|
|
29312
|
+
[PREFIX](path$17) {
|
|
29313
|
+
return prefixPath(path$17, this.prefix);
|
|
29307
29314
|
}
|
|
29308
29315
|
[HEADER]() {
|
|
29309
29316
|
/* c8 ignore start */
|
|
@@ -29369,7 +29376,7 @@ var WriteEntry = class extends Minipass {
|
|
|
29369
29376
|
if (!this.stat) throw new Error("cannot create link entry without stat");
|
|
29370
29377
|
/* c8 ignore stop */
|
|
29371
29378
|
this.type = "Link";
|
|
29372
|
-
this.linkpath = normalizeWindowsPath(path.relative(this.cwd, linkpath));
|
|
29379
|
+
this.linkpath = normalizeWindowsPath(path$1.relative(this.cwd, linkpath));
|
|
29373
29380
|
this.stat.size = 0;
|
|
29374
29381
|
this[HEADER]();
|
|
29375
29382
|
this.end();
|
|
@@ -29635,8 +29642,8 @@ var WriteEntryTar = class extends Minipass {
|
|
|
29635
29642
|
super.write(b$2);
|
|
29636
29643
|
readEntry.pipe(this);
|
|
29637
29644
|
}
|
|
29638
|
-
[PREFIX](path$
|
|
29639
|
-
return prefixPath(path$
|
|
29645
|
+
[PREFIX](path$17) {
|
|
29646
|
+
return prefixPath(path$17, this.prefix);
|
|
29640
29647
|
}
|
|
29641
29648
|
[MODE](mode) {
|
|
29642
29649
|
return modeFix(mode, this.type === "Directory", this.portable);
|
|
@@ -29945,8 +29952,8 @@ var PackJob = class {
|
|
|
29945
29952
|
pending = false;
|
|
29946
29953
|
ignore = false;
|
|
29947
29954
|
piped = false;
|
|
29948
|
-
constructor(path$
|
|
29949
|
-
this.path = path$
|
|
29955
|
+
constructor(path$17, absolute) {
|
|
29956
|
+
this.path = path$17 || "./";
|
|
29950
29957
|
this.absolute = absolute;
|
|
29951
29958
|
}
|
|
29952
29959
|
};
|
|
@@ -30051,36 +30058,36 @@ var Pack = class extends Minipass {
|
|
|
30051
30058
|
[WRITE](chunk) {
|
|
30052
30059
|
return super.write(chunk);
|
|
30053
30060
|
}
|
|
30054
|
-
add(path$
|
|
30055
|
-
this.write(path$
|
|
30061
|
+
add(path$17) {
|
|
30062
|
+
this.write(path$17);
|
|
30056
30063
|
return this;
|
|
30057
30064
|
}
|
|
30058
|
-
end(path$
|
|
30065
|
+
end(path$17, encoding, cb) {
|
|
30059
30066
|
/* c8 ignore start */
|
|
30060
|
-
if (typeof path$
|
|
30061
|
-
cb = path$
|
|
30062
|
-
path$
|
|
30067
|
+
if (typeof path$17 === "function") {
|
|
30068
|
+
cb = path$17;
|
|
30069
|
+
path$17 = void 0;
|
|
30063
30070
|
}
|
|
30064
30071
|
if (typeof encoding === "function") {
|
|
30065
30072
|
cb = encoding;
|
|
30066
30073
|
encoding = void 0;
|
|
30067
30074
|
}
|
|
30068
30075
|
/* c8 ignore stop */
|
|
30069
|
-
if (path$
|
|
30076
|
+
if (path$17) this.add(path$17);
|
|
30070
30077
|
this[ENDED$1] = true;
|
|
30071
30078
|
this[PROCESS]();
|
|
30072
30079
|
/* c8 ignore next */
|
|
30073
30080
|
if (cb) cb();
|
|
30074
30081
|
return this;
|
|
30075
30082
|
}
|
|
30076
|
-
write(path$
|
|
30083
|
+
write(path$17) {
|
|
30077
30084
|
if (this[ENDED$1]) throw new Error("write after end");
|
|
30078
|
-
if (path$
|
|
30079
|
-
else this[ADDFSENTRY](path$
|
|
30085
|
+
if (path$17 instanceof ReadEntry) this[ADDTARENTRY](path$17);
|
|
30086
|
+
else this[ADDFSENTRY](path$17);
|
|
30080
30087
|
return this.flowing;
|
|
30081
30088
|
}
|
|
30082
30089
|
[ADDTARENTRY](p$1) {
|
|
30083
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1.path));
|
|
30090
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1.path));
|
|
30084
30091
|
if (!this.filter(p$1.path, p$1)) p$1.resume();
|
|
30085
30092
|
else {
|
|
30086
30093
|
const job = new PackJob(p$1.path, absolute);
|
|
@@ -30092,7 +30099,7 @@ var Pack = class extends Minipass {
|
|
|
30092
30099
|
this[PROCESS]();
|
|
30093
30100
|
}
|
|
30094
30101
|
[ADDFSENTRY](p$1) {
|
|
30095
|
-
const absolute = normalizeWindowsPath(path.resolve(this.cwd, p$1));
|
|
30102
|
+
const absolute = normalizeWindowsPath(path$1.resolve(this.cwd, p$1));
|
|
30096
30103
|
this[QUEUE].push(new PackJob(p$1, absolute));
|
|
30097
30104
|
this[PROCESS]();
|
|
30098
30105
|
}
|
|
@@ -30293,7 +30300,7 @@ const createFile = (opt, files) => {
|
|
|
30293
30300
|
const addFilesSync$1 = (p$1, files) => {
|
|
30294
30301
|
files.forEach((file) => {
|
|
30295
30302
|
if (file.charAt(0) === "@") list({
|
|
30296
|
-
file:
|
|
30303
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
30297
30304
|
sync: true,
|
|
30298
30305
|
noResume: true,
|
|
30299
30306
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -30306,7 +30313,7 @@ const addFilesAsync$1 = async (p$1, files) => {
|
|
|
30306
30313
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
30307
30314
|
const file = String(files[i$1]);
|
|
30308
30315
|
if (file.charAt(0) === "@") await list({
|
|
30309
|
-
file:
|
|
30316
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
30310
30317
|
noResume: true,
|
|
30311
30318
|
onReadEntry: (entry) => {
|
|
30312
30319
|
p$1.add(entry);
|
|
@@ -30344,9 +30351,9 @@ const getWriteFlag = !fMapEnabled ? () => "w" : (size) => size < fMapLimit ? fMa
|
|
|
30344
30351
|
|
|
30345
30352
|
//#endregion
|
|
30346
30353
|
//#region node_modules/chownr/dist/esm/index.js
|
|
30347
|
-
const lchownSync = (path$
|
|
30354
|
+
const lchownSync = (path$17, uid, gid) => {
|
|
30348
30355
|
try {
|
|
30349
|
-
return fs.lchownSync(path$
|
|
30356
|
+
return fs.lchownSync(path$17, uid, gid);
|
|
30350
30357
|
} catch (er) {
|
|
30351
30358
|
if (er?.code !== "ENOENT") throw er;
|
|
30352
30359
|
}
|
|
@@ -30357,11 +30364,11 @@ const chown = (cpath, uid, gid, cb) => {
|
|
|
30357
30364
|
});
|
|
30358
30365
|
};
|
|
30359
30366
|
const chownrKid = (p$1, child, uid, gid, cb) => {
|
|
30360
|
-
if (child.isDirectory()) chownr(
|
|
30367
|
+
if (child.isDirectory()) chownr(path.resolve(p$1, child.name), uid, gid, (er) => {
|
|
30361
30368
|
if (er) return cb(er);
|
|
30362
|
-
chown(
|
|
30369
|
+
chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30363
30370
|
});
|
|
30364
|
-
else chown(
|
|
30371
|
+
else chown(path.resolve(p$1, child.name), uid, gid, cb);
|
|
30365
30372
|
};
|
|
30366
30373
|
const chownr = (p$1, uid, gid, cb) => {
|
|
30367
30374
|
fs.readdir(p$1, { withFileTypes: true }, (er, children) => {
|
|
@@ -30383,8 +30390,8 @@ const chownr = (p$1, uid, gid, cb) => {
|
|
|
30383
30390
|
});
|
|
30384
30391
|
};
|
|
30385
30392
|
const chownrKidSync = (p$1, child, uid, gid) => {
|
|
30386
|
-
if (child.isDirectory()) chownrSync(
|
|
30387
|
-
lchownSync(
|
|
30393
|
+
if (child.isDirectory()) chownrSync(path.resolve(p$1, child.name), uid, gid);
|
|
30394
|
+
lchownSync(path.resolve(p$1, child.name), uid, gid);
|
|
30388
30395
|
};
|
|
30389
30396
|
const chownrSync = (p$1, uid, gid) => {
|
|
30390
30397
|
let children;
|
|
@@ -30406,9 +30413,9 @@ var CwdError = class extends Error {
|
|
|
30406
30413
|
path;
|
|
30407
30414
|
code;
|
|
30408
30415
|
syscall = "chdir";
|
|
30409
|
-
constructor(path$
|
|
30410
|
-
super(`${code$1}: Cannot cd into '${path$
|
|
30411
|
-
this.path = path$
|
|
30416
|
+
constructor(path$17, code$1) {
|
|
30417
|
+
super(`${code$1}: Cannot cd into '${path$17}'`);
|
|
30418
|
+
this.path = path$17;
|
|
30412
30419
|
this.code = code$1;
|
|
30413
30420
|
}
|
|
30414
30421
|
get name() {
|
|
@@ -30423,10 +30430,10 @@ var SymlinkError = class extends Error {
|
|
|
30423
30430
|
symlink;
|
|
30424
30431
|
syscall = "symlink";
|
|
30425
30432
|
code = "TAR_SYMLINK_ERROR";
|
|
30426
|
-
constructor(symlink, path$
|
|
30433
|
+
constructor(symlink, path$17) {
|
|
30427
30434
|
super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link");
|
|
30428
30435
|
this.symlink = symlink;
|
|
30429
|
-
this.path = path$
|
|
30436
|
+
this.path = path$17;
|
|
30430
30437
|
}
|
|
30431
30438
|
get name() {
|
|
30432
30439
|
return "SymlinkError";
|
|
@@ -30472,12 +30479,12 @@ const mkdir$1 = (dir, opt, cb) => {
|
|
|
30472
30479
|
mode,
|
|
30473
30480
|
recursive: true
|
|
30474
30481
|
}).then((made) => done(null, made ?? void 0), done);
|
|
30475
|
-
mkdir_(cwd, normalizeWindowsPath(
|
|
30482
|
+
mkdir_(cwd, normalizeWindowsPath(path.relative(cwd, dir)).split("/"), mode, unlink$1, cwd, void 0, done);
|
|
30476
30483
|
};
|
|
30477
30484
|
const mkdir_ = (base, parts, mode, unlink$1, cwd, created, cb) => {
|
|
30478
30485
|
if (!parts.length) return cb(null, created);
|
|
30479
30486
|
const p$1 = parts.shift();
|
|
30480
|
-
const part = normalizeWindowsPath(
|
|
30487
|
+
const part = normalizeWindowsPath(path.resolve(base + "/" + p$1));
|
|
30481
30488
|
fs.mkdir(part, mode, onmkdir(part, parts, mode, unlink$1, cwd, created, cb));
|
|
30482
30489
|
};
|
|
30483
30490
|
const onmkdir = (part, parts, mode, unlink$1, cwd, created, cb) => (er) => {
|
|
@@ -30533,10 +30540,10 @@ const mkdirSync = (dir, opt) => {
|
|
|
30533
30540
|
mode,
|
|
30534
30541
|
recursive: true
|
|
30535
30542
|
}) ?? void 0);
|
|
30536
|
-
const parts = normalizeWindowsPath(
|
|
30543
|
+
const parts = normalizeWindowsPath(path.relative(cwd, dir)).split("/");
|
|
30537
30544
|
let created = void 0;
|
|
30538
30545
|
for (let p$1 = parts.shift(), part = cwd; p$1 && (part += "/" + p$1); p$1 = parts.shift()) {
|
|
30539
|
-
part = normalizeWindowsPath(
|
|
30546
|
+
part = normalizeWindowsPath(path.resolve(part));
|
|
30540
30547
|
try {
|
|
30541
30548
|
fs.mkdirSync(part, mode);
|
|
30542
30549
|
created = created || part;
|
|
@@ -30576,11 +30583,11 @@ const normalizeUnicode = (s) => {
|
|
|
30576
30583
|
//#endregion
|
|
30577
30584
|
//#region node_modules/tar/dist/esm/path-reservations.js
|
|
30578
30585
|
const isWindows$1 = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30579
|
-
const getDirs = (path$
|
|
30580
|
-
return path$
|
|
30586
|
+
const getDirs = (path$17) => {
|
|
30587
|
+
return path$17.split("/").slice(0, -1).reduce((set, path$18) => {
|
|
30581
30588
|
const s = set[set.length - 1];
|
|
30582
|
-
if (s !== void 0) path$
|
|
30583
|
-
set.push(path$
|
|
30589
|
+
if (s !== void 0) path$18 = join(s, path$18);
|
|
30590
|
+
set.push(path$18 || "/");
|
|
30584
30591
|
return set;
|
|
30585
30592
|
}, []);
|
|
30586
30593
|
};
|
|
@@ -30592,7 +30599,7 @@ var PathReservations = class {
|
|
|
30592
30599
|
paths = isWindows$1 ? ["win32 parallelization disabled"] : paths.map((p$1) => {
|
|
30593
30600
|
return stripTrailingSlashes(join(normalizeUnicode(p$1))).toLowerCase();
|
|
30594
30601
|
});
|
|
30595
|
-
const dirs = new Set(paths.map((path$
|
|
30602
|
+
const dirs = new Set(paths.map((path$17) => getDirs(path$17)).reduce((a$1, b$2) => a$1.concat(b$2)));
|
|
30596
30603
|
this.#reservations.set(fn, {
|
|
30597
30604
|
dirs,
|
|
30598
30605
|
paths
|
|
@@ -30619,8 +30626,8 @@ var PathReservations = class {
|
|
|
30619
30626
|
if (!res) throw new Error("function does not have any path reservations");
|
|
30620
30627
|
/* c8 ignore stop */
|
|
30621
30628
|
return {
|
|
30622
|
-
paths: res.paths.map((path$
|
|
30623
|
-
dirs: [...res.dirs].map((path$
|
|
30629
|
+
paths: res.paths.map((path$17) => this.#queues.get(path$17)),
|
|
30630
|
+
dirs: [...res.dirs].map((path$17) => this.#queues.get(path$17))
|
|
30624
30631
|
};
|
|
30625
30632
|
}
|
|
30626
30633
|
check(fn) {
|
|
@@ -30641,14 +30648,14 @@ var PathReservations = class {
|
|
|
30641
30648
|
/* c8 ignore stop */
|
|
30642
30649
|
const { paths, dirs } = res;
|
|
30643
30650
|
const next = /* @__PURE__ */ new Set();
|
|
30644
|
-
for (const path$
|
|
30645
|
-
const q$2 = this.#queues.get(path$
|
|
30651
|
+
for (const path$17 of paths) {
|
|
30652
|
+
const q$2 = this.#queues.get(path$17);
|
|
30646
30653
|
/* c8 ignore start */
|
|
30647
30654
|
if (!q$2 || q$2?.[0] !== fn) continue;
|
|
30648
30655
|
/* c8 ignore stop */
|
|
30649
30656
|
const q0 = q$2[1];
|
|
30650
30657
|
if (!q0) {
|
|
30651
|
-
this.#queues.delete(path$
|
|
30658
|
+
this.#queues.delete(path$17);
|
|
30652
30659
|
continue;
|
|
30653
30660
|
}
|
|
30654
30661
|
q$2.shift();
|
|
@@ -30705,20 +30712,20 @@ const CHECKED_CWD = Symbol("checkedCwd");
|
|
|
30705
30712
|
const isWindows = (process.env.TESTING_TAR_FAKE_PLATFORM || process.platform) === "win32";
|
|
30706
30713
|
const DEFAULT_MAX_DEPTH = 1024;
|
|
30707
30714
|
/* c8 ignore start */
|
|
30708
|
-
const unlinkFile = (path$
|
|
30709
|
-
if (!isWindows) return fs.unlink(path$
|
|
30710
|
-
const name$1 = path$
|
|
30711
|
-
fs.rename(path$
|
|
30715
|
+
const unlinkFile = (path$17, cb) => {
|
|
30716
|
+
if (!isWindows) return fs.unlink(path$17, cb);
|
|
30717
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30718
|
+
fs.rename(path$17, name$1, (er) => {
|
|
30712
30719
|
if (er) return cb(er);
|
|
30713
30720
|
fs.unlink(name$1, cb);
|
|
30714
30721
|
});
|
|
30715
30722
|
};
|
|
30716
30723
|
/* c8 ignore stop */
|
|
30717
30724
|
/* c8 ignore start */
|
|
30718
|
-
const unlinkFileSync = (path$
|
|
30719
|
-
if (!isWindows) return fs.unlinkSync(path$
|
|
30720
|
-
const name$1 = path$
|
|
30721
|
-
fs.renameSync(path$
|
|
30725
|
+
const unlinkFileSync = (path$17) => {
|
|
30726
|
+
if (!isWindows) return fs.unlinkSync(path$17);
|
|
30727
|
+
const name$1 = path$17 + ".DELETE." + randomBytes(16).toString("hex");
|
|
30728
|
+
fs.renameSync(path$17, name$1);
|
|
30722
30729
|
fs.unlinkSync(name$1);
|
|
30723
30730
|
};
|
|
30724
30731
|
/* c8 ignore stop */
|
|
@@ -30783,7 +30790,7 @@ var Unpack = class extends Parser {
|
|
|
30783
30790
|
this.noMtime = !!opt.noMtime;
|
|
30784
30791
|
this.preservePaths = !!opt.preservePaths;
|
|
30785
30792
|
this.unlink = !!opt.unlink;
|
|
30786
|
-
this.cwd = normalizeWindowsPath(
|
|
30793
|
+
this.cwd = normalizeWindowsPath(path.resolve(opt.cwd || process.cwd()));
|
|
30787
30794
|
this.strip = Number(opt.strip) || 0;
|
|
30788
30795
|
this.processUmask = !this.chmod ? 0 : typeof opt.processUmask === "number" ? opt.processUmask : process.umask();
|
|
30789
30796
|
this.umask = typeof opt.umask === "number" ? opt.umask : this.processUmask;
|
|
@@ -30803,22 +30810,22 @@ var Unpack = class extends Parser {
|
|
|
30803
30810
|
}
|
|
30804
30811
|
}
|
|
30805
30812
|
[STRIPABSOLUTEPATH](entry, field) {
|
|
30806
|
-
const path$
|
|
30807
|
-
if (!path$
|
|
30808
|
-
const parts = path$
|
|
30813
|
+
const path$17 = entry[field];
|
|
30814
|
+
if (!path$17 || this.preservePaths) return true;
|
|
30815
|
+
const parts = path$17.split("/");
|
|
30809
30816
|
if (parts.includes("..") || isWindows && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
|
|
30810
30817
|
this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
|
|
30811
30818
|
entry,
|
|
30812
|
-
[field]: path$
|
|
30819
|
+
[field]: path$17
|
|
30813
30820
|
});
|
|
30814
30821
|
return false;
|
|
30815
30822
|
}
|
|
30816
|
-
const [root, stripped] = stripAbsolutePath(path$
|
|
30823
|
+
const [root, stripped] = stripAbsolutePath(path$17);
|
|
30817
30824
|
if (root) {
|
|
30818
30825
|
entry[field] = String(stripped);
|
|
30819
30826
|
this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute ${field}`, {
|
|
30820
30827
|
entry,
|
|
30821
|
-
[field]: path$
|
|
30828
|
+
[field]: path$17
|
|
30822
30829
|
});
|
|
30823
30830
|
}
|
|
30824
30831
|
return true;
|
|
@@ -30846,8 +30853,8 @@ var Unpack = class extends Parser {
|
|
|
30846
30853
|
return false;
|
|
30847
30854
|
}
|
|
30848
30855
|
if (!this[STRIPABSOLUTEPATH](entry, "path") || !this[STRIPABSOLUTEPATH](entry, "linkpath")) return false;
|
|
30849
|
-
if (
|
|
30850
|
-
else entry.absolute = normalizeWindowsPath(
|
|
30856
|
+
if (path.isAbsolute(entry.path)) entry.absolute = normalizeWindowsPath(path.resolve(entry.path));
|
|
30857
|
+
else entry.absolute = normalizeWindowsPath(path.resolve(this.cwd, entry.path));
|
|
30851
30858
|
/* c8 ignore start - defense in depth */
|
|
30852
30859
|
if (!this.preservePaths && typeof entry.absolute === "string" && entry.absolute.indexOf(this.cwd + "/") !== 0 && entry.absolute !== this.cwd) {
|
|
30853
30860
|
this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", {
|
|
@@ -30861,9 +30868,9 @@ var Unpack = class extends Parser {
|
|
|
30861
30868
|
/* c8 ignore stop */
|
|
30862
30869
|
if (entry.absolute === this.cwd && entry.type !== "Directory" && entry.type !== "GNUDumpDir") return false;
|
|
30863
30870
|
if (this.win32) {
|
|
30864
|
-
const { root: aRoot } =
|
|
30871
|
+
const { root: aRoot } = path.win32.parse(String(entry.absolute));
|
|
30865
30872
|
entry.absolute = aRoot + encode(String(entry.absolute).slice(aRoot.length));
|
|
30866
|
-
const { root: pRoot } =
|
|
30873
|
+
const { root: pRoot } = path.win32.parse(entry.path);
|
|
30867
30874
|
entry.path = pRoot + encode(entry.path.slice(pRoot.length));
|
|
30868
30875
|
}
|
|
30869
30876
|
return true;
|
|
@@ -31009,7 +31016,7 @@ var Unpack = class extends Parser {
|
|
|
31009
31016
|
this[LINK](entry, String(entry.linkpath), "symlink", done);
|
|
31010
31017
|
}
|
|
31011
31018
|
[HARDLINK](entry, done) {
|
|
31012
|
-
const linkpath = normalizeWindowsPath(
|
|
31019
|
+
const linkpath = normalizeWindowsPath(path.resolve(this.cwd, String(entry.linkpath)));
|
|
31013
31020
|
this[LINK](entry, linkpath, "link", done);
|
|
31014
31021
|
}
|
|
31015
31022
|
[PEND]() {
|
|
@@ -31049,7 +31056,7 @@ var Unpack = class extends Parser {
|
|
|
31049
31056
|
};
|
|
31050
31057
|
const start = () => {
|
|
31051
31058
|
if (entry.absolute !== this.cwd) {
|
|
31052
|
-
const parent = normalizeWindowsPath(
|
|
31059
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31053
31060
|
if (parent !== this.cwd) return this[MKDIR](parent, this.dmode, (er) => {
|
|
31054
31061
|
if (er) {
|
|
31055
31062
|
this[ONERROR](er, entry);
|
|
@@ -31131,7 +31138,7 @@ var UnpackSync = class extends Unpack {
|
|
|
31131
31138
|
this[CHECKED_CWD] = true;
|
|
31132
31139
|
}
|
|
31133
31140
|
if (entry.absolute !== this.cwd) {
|
|
31134
|
-
const parent = normalizeWindowsPath(
|
|
31141
|
+
const parent = normalizeWindowsPath(path.dirname(String(entry.absolute)));
|
|
31135
31142
|
if (parent !== this.cwd) {
|
|
31136
31143
|
const mkParent = this[MKDIR](parent, this.dmode);
|
|
31137
31144
|
if (mkParent) return this[ONERROR](mkParent, entry);
|
|
@@ -31403,7 +31410,7 @@ const replaceAsync = (opt, files) => {
|
|
|
31403
31410
|
const addFilesSync = (p$1, files) => {
|
|
31404
31411
|
files.forEach((file) => {
|
|
31405
31412
|
if (file.charAt(0) === "@") list({
|
|
31406
|
-
file:
|
|
31413
|
+
file: path.resolve(p$1.cwd, file.slice(1)),
|
|
31407
31414
|
sync: true,
|
|
31408
31415
|
noResume: true,
|
|
31409
31416
|
onReadEntry: (entry) => p$1.add(entry)
|
|
@@ -31416,7 +31423,7 @@ const addFilesAsync = async (p$1, files) => {
|
|
|
31416
31423
|
for (let i$1 = 0; i$1 < files.length; i$1++) {
|
|
31417
31424
|
const file = String(files[i$1]);
|
|
31418
31425
|
if (file.charAt(0) === "@") await list({
|
|
31419
|
-
file:
|
|
31426
|
+
file: path.resolve(String(p$1.cwd), file.slice(1)),
|
|
31420
31427
|
noResume: true,
|
|
31421
31428
|
onReadEntry: (entry) => p$1.add(entry)
|
|
31422
31429
|
});
|
|
@@ -31451,7 +31458,7 @@ const update = makeCommand(replace.syncFile, replace.asyncFile, replace.syncNoFi
|
|
|
31451
31458
|
const mtimeFilter = (opt) => {
|
|
31452
31459
|
const filter = opt.filter;
|
|
31453
31460
|
if (!opt.mtimeCache) opt.mtimeCache = /* @__PURE__ */ new Map();
|
|
31454
|
-
opt.filter = filter ? (path$
|
|
31461
|
+
opt.filter = filter ? (path$17, stat) => filter(path$17, stat) && !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0)) : (path$17, stat) => !((opt.mtimeCache?.get(path$17) ?? stat.mtime ?? 0) > (stat.mtime ?? 0));
|
|
31455
31462
|
};
|
|
31456
31463
|
|
|
31457
31464
|
//#endregion
|
|
@@ -32289,28 +32296,28 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32289
32296
|
module.exports = isexe;
|
|
32290
32297
|
isexe.sync = sync;
|
|
32291
32298
|
var fs$4 = __require("fs");
|
|
32292
|
-
function checkPathExt(path$
|
|
32299
|
+
function checkPathExt(path$17, options) {
|
|
32293
32300
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
32294
32301
|
if (!pathext) return true;
|
|
32295
32302
|
pathext = pathext.split(";");
|
|
32296
32303
|
if (pathext.indexOf("") !== -1) return true;
|
|
32297
32304
|
for (var i$1 = 0; i$1 < pathext.length; i$1++) {
|
|
32298
32305
|
var p$1 = pathext[i$1].toLowerCase();
|
|
32299
|
-
if (p$1 && path$
|
|
32306
|
+
if (p$1 && path$17.substr(-p$1.length).toLowerCase() === p$1) return true;
|
|
32300
32307
|
}
|
|
32301
32308
|
return false;
|
|
32302
32309
|
}
|
|
32303
|
-
function checkStat(stat, path$
|
|
32310
|
+
function checkStat(stat, path$17, options) {
|
|
32304
32311
|
if (!stat.isSymbolicLink() && !stat.isFile()) return false;
|
|
32305
|
-
return checkPathExt(path$
|
|
32312
|
+
return checkPathExt(path$17, options);
|
|
32306
32313
|
}
|
|
32307
|
-
function isexe(path$
|
|
32308
|
-
fs$4.stat(path$
|
|
32309
|
-
cb(er, er ? false : checkStat(stat, path$
|
|
32314
|
+
function isexe(path$17, options, cb) {
|
|
32315
|
+
fs$4.stat(path$17, function(er, stat) {
|
|
32316
|
+
cb(er, er ? false : checkStat(stat, path$17, options));
|
|
32310
32317
|
});
|
|
32311
32318
|
}
|
|
32312
|
-
function sync(path$
|
|
32313
|
-
return checkStat(fs$4.statSync(path$
|
|
32319
|
+
function sync(path$17, options) {
|
|
32320
|
+
return checkStat(fs$4.statSync(path$17), path$17, options);
|
|
32314
32321
|
}
|
|
32315
32322
|
}));
|
|
32316
32323
|
|
|
@@ -32320,13 +32327,13 @@ var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32320
32327
|
module.exports = isexe;
|
|
32321
32328
|
isexe.sync = sync;
|
|
32322
32329
|
var fs$3 = __require("fs");
|
|
32323
|
-
function isexe(path$
|
|
32324
|
-
fs$3.stat(path$
|
|
32330
|
+
function isexe(path$17, options, cb) {
|
|
32331
|
+
fs$3.stat(path$17, function(er, stat) {
|
|
32325
32332
|
cb(er, er ? false : checkStat(stat, options));
|
|
32326
32333
|
});
|
|
32327
32334
|
}
|
|
32328
|
-
function sync(path$
|
|
32329
|
-
return checkStat(fs$3.statSync(path$
|
|
32335
|
+
function sync(path$17, options) {
|
|
32336
|
+
return checkStat(fs$3.statSync(path$17), options);
|
|
32330
32337
|
}
|
|
32331
32338
|
function checkStat(stat, options) {
|
|
32332
32339
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -32354,7 +32361,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32354
32361
|
else core = require_mode();
|
|
32355
32362
|
module.exports = isexe;
|
|
32356
32363
|
isexe.sync = sync;
|
|
32357
|
-
function isexe(path$
|
|
32364
|
+
function isexe(path$17, options, cb) {
|
|
32358
32365
|
if (typeof options === "function") {
|
|
32359
32366
|
cb = options;
|
|
32360
32367
|
options = {};
|
|
@@ -32362,13 +32369,13 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32362
32369
|
if (!cb) {
|
|
32363
32370
|
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
32364
32371
|
return new Promise(function(resolve$1, reject) {
|
|
32365
|
-
isexe(path$
|
|
32372
|
+
isexe(path$17, options || {}, function(er, is) {
|
|
32366
32373
|
if (er) reject(er);
|
|
32367
32374
|
else resolve$1(is);
|
|
32368
32375
|
});
|
|
32369
32376
|
});
|
|
32370
32377
|
}
|
|
32371
|
-
core(path$
|
|
32378
|
+
core(path$17, options || {}, function(er, is) {
|
|
32372
32379
|
if (er) {
|
|
32373
32380
|
if (er.code === "EACCES" || options && options.ignoreErrors) {
|
|
32374
32381
|
er = null;
|
|
@@ -32378,9 +32385,9 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32378
32385
|
cb(er, is);
|
|
32379
32386
|
});
|
|
32380
32387
|
}
|
|
32381
|
-
function sync(path$
|
|
32388
|
+
function sync(path$17, options) {
|
|
32382
32389
|
try {
|
|
32383
|
-
return core.sync(path$
|
|
32390
|
+
return core.sync(path$17, options || {});
|
|
32384
32391
|
} catch (er) {
|
|
32385
32392
|
if (options && options.ignoreErrors || er.code === "EACCES") return false;
|
|
32386
32393
|
else throw er;
|
|
@@ -32392,7 +32399,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32392
32399
|
//#region node_modules/which/which.js
|
|
32393
32400
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32394
32401
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
32395
|
-
const path$
|
|
32402
|
+
const path$4 = __require("path");
|
|
32396
32403
|
const COLON = isWindows ? ";" : ":";
|
|
32397
32404
|
const isexe = require_isexe();
|
|
32398
32405
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -32422,7 +32429,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32422
32429
|
if (i$1 === pathEnv.length) return opt.all && found.length ? resolve$1(found) : reject(getNotFoundError(cmd));
|
|
32423
32430
|
const ppRaw = pathEnv[i$1];
|
|
32424
32431
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32425
|
-
const pCmd = path$
|
|
32432
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32426
32433
|
resolve$1(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i$1, 0));
|
|
32427
32434
|
});
|
|
32428
32435
|
const subStep = (p$1, i$1, ii) => new Promise((resolve$1, reject) => {
|
|
@@ -32443,7 +32450,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32443
32450
|
for (let i$1 = 0; i$1 < pathEnv.length; i$1++) {
|
|
32444
32451
|
const ppRaw = pathEnv[i$1];
|
|
32445
32452
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
32446
|
-
const pCmd = path$
|
|
32453
|
+
const pCmd = path$4.join(pathPart, cmd);
|
|
32447
32454
|
const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
32448
32455
|
for (let j = 0; j < pathExt.length; j++) {
|
|
32449
32456
|
const cur = p$1 + pathExt[j];
|
|
@@ -32476,7 +32483,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32476
32483
|
//#endregion
|
|
32477
32484
|
//#region node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
32478
32485
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32479
|
-
const path$
|
|
32486
|
+
const path$3 = __require("path");
|
|
32480
32487
|
const which = require_which();
|
|
32481
32488
|
const getPathKey = require_path_key();
|
|
32482
32489
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -32491,12 +32498,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
32491
32498
|
try {
|
|
32492
32499
|
resolved = which.sync(parsed.command, {
|
|
32493
32500
|
path: env$1[getPathKey({ env: env$1 })],
|
|
32494
|
-
pathExt: withoutPathExt ? path$
|
|
32501
|
+
pathExt: withoutPathExt ? path$3.delimiter : void 0
|
|
32495
32502
|
});
|
|
32496
32503
|
} catch (e$1) {} finally {
|
|
32497
32504
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
32498
32505
|
}
|
|
32499
|
-
if (resolved) resolved = path$
|
|
32506
|
+
if (resolved) resolved = path$3.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
32500
32507
|
return resolved;
|
|
32501
32508
|
}
|
|
32502
32509
|
function resolveCommand(parsed) {
|
|
@@ -32539,8 +32546,8 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
|
|
|
32539
32546
|
module.exports = (string$2 = "") => {
|
|
32540
32547
|
const match = string$2.match(shebangRegex);
|
|
32541
32548
|
if (!match) return null;
|
|
32542
|
-
const [path$
|
|
32543
|
-
const binary = path$
|
|
32549
|
+
const [path$17, argument] = match[0].replace(/#! ?/, "").split(" ");
|
|
32550
|
+
const binary = path$17.split("/").pop();
|
|
32544
32551
|
if (binary === "env") return argument;
|
|
32545
32552
|
return argument ? `${binary} ${argument}` : binary;
|
|
32546
32553
|
};
|
|
@@ -32568,7 +32575,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32568
32575
|
//#endregion
|
|
32569
32576
|
//#region node_modules/cross-spawn/lib/parse.js
|
|
32570
32577
|
var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
32571
|
-
const path$
|
|
32578
|
+
const path$2 = __require("path");
|
|
32572
32579
|
const resolveCommand = require_resolveCommand();
|
|
32573
32580
|
const escape = require_escape();
|
|
32574
32581
|
const readShebang = require_readShebang();
|
|
@@ -32591,7 +32598,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
32591
32598
|
const needsShell = !isExecutableRegExp.test(commandFile);
|
|
32592
32599
|
if (parsed.options.forceShell || needsShell) {
|
|
32593
32600
|
const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
32594
|
-
parsed.command = path$
|
|
32601
|
+
parsed.command = path$2.normalize(parsed.command);
|
|
32595
32602
|
parsed.command = escape.command(parsed.command);
|
|
32596
32603
|
parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
|
|
32597
32604
|
parsed.args = [
|
|
@@ -32709,12 +32716,12 @@ function toPath(urlOrPath) {
|
|
|
32709
32716
|
}
|
|
32710
32717
|
function traversePathUp(startPath) {
|
|
32711
32718
|
return { *[Symbol.iterator]() {
|
|
32712
|
-
let currentPath =
|
|
32719
|
+
let currentPath = path.resolve(toPath(startPath));
|
|
32713
32720
|
let previousPath;
|
|
32714
32721
|
while (previousPath !== currentPath) {
|
|
32715
32722
|
yield currentPath;
|
|
32716
32723
|
previousPath = currentPath;
|
|
32717
|
-
currentPath =
|
|
32724
|
+
currentPath = path.resolve(currentPath, "..");
|
|
32718
32725
|
}
|
|
32719
32726
|
} };
|
|
32720
32727
|
}
|
|
@@ -32723,21 +32730,21 @@ const TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
|
|
|
32723
32730
|
//#endregion
|
|
32724
32731
|
//#region node_modules/npm-run-path/index.js
|
|
32725
32732
|
const npmRunPath = ({ cwd = y.cwd(), path: pathOption = y.env[pathKey()], preferLocal = true, execPath: execPath$1 = y.execPath, addExecPath = true } = {}) => {
|
|
32726
|
-
const cwdPath =
|
|
32733
|
+
const cwdPath = path.resolve(toPath(cwd));
|
|
32727
32734
|
const result = [];
|
|
32728
|
-
const pathParts = pathOption.split(
|
|
32735
|
+
const pathParts = pathOption.split(path.delimiter);
|
|
32729
32736
|
if (preferLocal) applyPreferLocal(result, pathParts, cwdPath);
|
|
32730
32737
|
if (addExecPath) applyExecPath(result, pathParts, execPath$1, cwdPath);
|
|
32731
|
-
return pathOption === "" || pathOption ===
|
|
32738
|
+
return pathOption === "" || pathOption === path.delimiter ? `${result.join(path.delimiter)}${pathOption}` : [...result, pathOption].join(path.delimiter);
|
|
32732
32739
|
};
|
|
32733
32740
|
const applyPreferLocal = (result, pathParts, cwdPath) => {
|
|
32734
32741
|
for (const directory of traversePathUp(cwdPath)) {
|
|
32735
|
-
const pathPart =
|
|
32742
|
+
const pathPart = path.join(directory, "node_modules/.bin");
|
|
32736
32743
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32737
32744
|
}
|
|
32738
32745
|
};
|
|
32739
32746
|
const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
|
|
32740
|
-
const pathPart =
|
|
32747
|
+
const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
|
|
32741
32748
|
if (!pathParts.includes(pathPart)) result.push(pathPart);
|
|
32742
32749
|
};
|
|
32743
32750
|
const npmRunPathEnv = ({ env: env$1 = y.env, ...options } = {}) => {
|
|
@@ -33769,10 +33776,10 @@ const mapNode = ({ options }) => {
|
|
|
33769
33776
|
node: true
|
|
33770
33777
|
} };
|
|
33771
33778
|
};
|
|
33772
|
-
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath
|
|
33779
|
+
const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = false, nodePath = execPath, nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")), cwd, execPath: formerNodePath, ...options }) => {
|
|
33773
33780
|
if (formerNodePath !== void 0) throw new TypeError("The \"execPath\" option has been removed. Please use the \"nodePath\" option instead.");
|
|
33774
|
-
const normalizedNodePath = safeNormalizeFileUrl(nodePath
|
|
33775
|
-
const resolvedNodePath =
|
|
33781
|
+
const normalizedNodePath = safeNormalizeFileUrl(nodePath, "The \"nodePath\" option");
|
|
33782
|
+
const resolvedNodePath = path.resolve(cwd, normalizedNodePath);
|
|
33776
33783
|
const newOptions = {
|
|
33777
33784
|
...options,
|
|
33778
33785
|
nodePath: resolvedNodePath,
|
|
@@ -33784,7 +33791,7 @@ const handleNodeOption = (file, commandArguments, { node: shouldHandleNode = fal
|
|
|
33784
33791
|
commandArguments,
|
|
33785
33792
|
newOptions
|
|
33786
33793
|
];
|
|
33787
|
-
if (
|
|
33794
|
+
if (path.basename(file, ".exe") === "node") throw new TypeError("When the \"node\" option is true, the first argument does not need to be \"node\".");
|
|
33788
33795
|
return [
|
|
33789
33796
|
resolvedNodePath,
|
|
33790
33797
|
[
|
|
@@ -33871,7 +33878,7 @@ const serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encod
|
|
|
33871
33878
|
//#region node_modules/execa/lib/arguments/cwd.js
|
|
33872
33879
|
const normalizeCwd = (cwd = getDefaultCwd()) => {
|
|
33873
33880
|
const cwdString = safeNormalizeFileUrl(cwd, "The \"cwd\" option");
|
|
33874
|
-
return
|
|
33881
|
+
return path.resolve(cwdString);
|
|
33875
33882
|
};
|
|
33876
33883
|
const getDefaultCwd = () => {
|
|
33877
33884
|
try {
|
|
@@ -33910,7 +33917,7 @@ const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
|
33910
33917
|
options.killSignal = normalizeKillSignal(options.killSignal);
|
|
33911
33918
|
options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
|
|
33912
33919
|
options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
|
|
33913
|
-
if (y.platform === "win32" &&
|
|
33920
|
+
if (y.platform === "win32" && path.basename(file, ".exe") === "cmd") commandArguments.unshift("/q");
|
|
33914
33921
|
return {
|
|
33915
33922
|
file,
|
|
33916
33923
|
commandArguments,
|
|
@@ -33935,7 +33942,7 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd, localDi
|
|
|
33935
33942
|
ipc,
|
|
33936
33943
|
serialization
|
|
33937
33944
|
});
|
|
33938
|
-
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath
|
|
33945
|
+
const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
|
|
33939
33946
|
const env$1 = extendEnv ? {
|
|
33940
33947
|
...y.env,
|
|
33941
33948
|
...envOption
|
|
@@ -33943,7 +33950,7 @@ const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory,
|
|
|
33943
33950
|
if (preferLocal || node) return npmRunPathEnv({
|
|
33944
33951
|
env: env$1,
|
|
33945
33952
|
cwd: localDirectory,
|
|
33946
|
-
execPath: nodePath
|
|
33953
|
+
execPath: nodePath,
|
|
33947
33954
|
preferLocal,
|
|
33948
33955
|
addExecPath: node
|
|
33949
33956
|
});
|
|
@@ -35688,12 +35695,12 @@ const logOutputSync = ({ serializedResult, fdNumber, state, verboseInfo, encodin
|
|
|
35688
35695
|
}
|
|
35689
35696
|
};
|
|
35690
35697
|
const writeToFiles = (serializedResult, stdioItems, outputFiles) => {
|
|
35691
|
-
for (const { path: path$
|
|
35692
|
-
const pathString = typeof path$
|
|
35693
|
-
if (append || outputFiles.has(pathString)) appendFileSync(path$
|
|
35698
|
+
for (const { path: path$17, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
|
|
35699
|
+
const pathString = typeof path$17 === "string" ? path$17 : path$17.toString();
|
|
35700
|
+
if (append || outputFiles.has(pathString)) appendFileSync(path$17, serializedResult);
|
|
35694
35701
|
else {
|
|
35695
35702
|
outputFiles.add(pathString);
|
|
35696
|
-
writeFileSync(path$
|
|
35703
|
+
writeFileSync(path$17, serializedResult);
|
|
35697
35704
|
}
|
|
35698
35705
|
}
|
|
35699
35706
|
};
|
|
@@ -38171,8 +38178,8 @@ async function getDefaultTemplate() {
|
|
|
38171
38178
|
return template;
|
|
38172
38179
|
}
|
|
38173
38180
|
function validateNonInteractiveFlags(command) {
|
|
38174
|
-
const { name: name$1, path: path$
|
|
38175
|
-
const providedCount = [name$1, path$
|
|
38181
|
+
const { name: name$1, path: path$17 } = command.opts();
|
|
38182
|
+
const providedCount = [name$1, path$17].filter(Boolean).length;
|
|
38176
38183
|
if (providedCount > 0 && providedCount < 2) command.error("Non-interactive mode requires all flags: --name, --path");
|
|
38177
38184
|
}
|
|
38178
38185
|
async function chooseCreate(options) {
|
|
@@ -38243,7 +38250,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38243
38250
|
template
|
|
38244
38251
|
});
|
|
38245
38252
|
}, {
|
|
38246
|
-
successMessage: theme.colors.
|
|
38253
|
+
successMessage: theme.colors.base44Orange("Project created successfully"),
|
|
38247
38254
|
errorMessage: "Failed to create project"
|
|
38248
38255
|
});
|
|
38249
38256
|
await loadProjectEnv(resolvedPath);
|
|
@@ -38258,7 +38265,7 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38258
38265
|
if (shouldPushEntities) await runTask(`Pushing ${entities.length} entities to Base44...`, async () => {
|
|
38259
38266
|
await pushEntities(entities);
|
|
38260
38267
|
}, {
|
|
38261
|
-
successMessage: theme.colors.
|
|
38268
|
+
successMessage: theme.colors.base44Orange("Entities pushed successfully"),
|
|
38262
38269
|
errorMessage: "Failed to push entities"
|
|
38263
38270
|
});
|
|
38264
38271
|
}
|
|
@@ -38283,16 +38290,16 @@ async function executeCreate({ template, name: rawName, description, projectPath
|
|
|
38283
38290
|
updateMessage("Deploying site...");
|
|
38284
38291
|
return await deploySite(join(resolvedPath, outputDirectory));
|
|
38285
38292
|
}, {
|
|
38286
|
-
successMessage: theme.colors.
|
|
38293
|
+
successMessage: theme.colors.base44Orange("Site deployed successfully"),
|
|
38287
38294
|
errorMessage: "Failed to deploy site"
|
|
38288
38295
|
});
|
|
38289
38296
|
finalAppUrl = appUrl;
|
|
38290
38297
|
}
|
|
38291
38298
|
}
|
|
38292
38299
|
const dashboardUrl = `${getBase44ApiUrl()}/apps/${projectId}/editor/preview`;
|
|
38293
|
-
M.message(`${
|
|
38294
|
-
M.message(`${
|
|
38295
|
-
if (finalAppUrl) M.message(`${
|
|
38300
|
+
M.message(`${theme.styles.header("Project")}: ${theme.colors.base44Orange(name$1)}`);
|
|
38301
|
+
M.message(`${theme.styles.header("Dashboard")}: ${theme.colors.links(dashboardUrl)}`);
|
|
38302
|
+
if (finalAppUrl) M.message(`${theme.styles.header("Site")}: ${theme.colors.links(finalAppUrl)}`);
|
|
38296
38303
|
return { outroMessage: "Your project is set and ready to use" };
|
|
38297
38304
|
}
|
|
38298
38305
|
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) => {
|