@shopify/cli 3.73.2 → 3.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/dev-console/extensions/dev-console/assets/{index-D7F9wNys.js → index-lyGm6l3x.js} +12 -12
- package/dist/assets/dev-console/index.html +2 -2
- package/dist/assets/speedscope/SourceCodePro-Regular.ttf.f546cbe0.woff2 +0 -0
- package/dist/assets/speedscope/demangle-cpp.1768f4cc.js +4 -0
- package/dist/assets/speedscope/favicon-16x16.f74b3187.png +0 -0
- package/dist/assets/speedscope/favicon-32x32.bc503437.png +0 -0
- package/dist/assets/speedscope/file-format-schema.json +324 -0
- package/dist/assets/speedscope/import.bcbb2033.js +123 -0
- package/dist/assets/speedscope/index.html +2 -0
- package/dist/assets/speedscope/perf-vertx-stacks-01-collapsed-all.2681da68.txt +199 -0
- package/dist/assets/speedscope/release.txt +3 -0
- package/dist/assets/speedscope/reset.8c46b7a1.css +2 -0
- package/dist/assets/speedscope/source-code-pro.52b1676f.css +2 -0
- package/dist/assets/speedscope/source-code-pro.LICENSE.md +93 -0
- package/dist/assets/speedscope/source-map.438fa06b.js +24 -0
- package/dist/assets/speedscope/speedscope.6f107512.js +193 -0
- package/dist/{chokidar-5LLC6S6D.js → chokidar-BLUAYFAB.js} +13 -1044
- package/dist/chokidar-OATAHMV6.js +1122 -0
- package/dist/{chunk-ES3T7FIW.js → chunk-2GCE2GUM.js} +3 -3
- package/dist/chunk-3I3GQNEW.js +95 -0
- package/dist/{chunk-5NHIBL5K.js → chunk-4QRIOWN3.js} +2 -2
- package/dist/{chunk-Y2KXNORY.js → chunk-4W33LVQQ.js} +3 -3
- package/dist/{chunk-CKC5C2DR.js → chunk-53WQGP7S.js} +4 -4
- package/dist/chunk-57Q6OQG4.js +111 -0
- package/dist/{chunk-MHUINF7I.js → chunk-5CLGH5PH.js} +2 -2
- package/dist/{chunk-CRHXI6PS.js → chunk-5DBS6QOU.js} +102 -638
- package/dist/{chunk-ZOCACHGF.js → chunk-5JC3BUPR.js} +3 -3
- package/dist/{chunk-YMB5HUU3.js → chunk-5JWRABV2.js} +8 -8
- package/dist/{chunk-LLWX47E4.js → chunk-6JNRBEP6.js} +7 -9
- package/dist/{chunk-Y43XESY2.js → chunk-76NEANNG.js} +6442 -3165
- package/dist/{chunk-LVEURM2X.js → chunk-7T4EKFVU.js} +16 -2
- package/dist/{chunk-WKN62GWH.js → chunk-ACIVN2Q4.js} +502 -699
- package/dist/{chunk-ZX3L2JKV.js → chunk-AKL7T64Q.js} +80 -133
- package/dist/{chunk-2QGVACPR.js → chunk-B27LGWRZ.js} +3 -3
- package/dist/{chunk-BUFIEXZ5.js → chunk-B3YWYURY.js} +701 -141
- package/dist/{chunk-7VQ2QADA.js → chunk-BWBSJLZN.js} +333 -156
- package/dist/{chunk-K7HGDAI4.js → chunk-CDBXAE2F.js} +20 -104
- package/dist/{chunk-SBPFWO4S.js → chunk-CDQA3SST.js} +56182 -37290
- package/dist/chunk-CP3BRHWK.js +33 -0
- package/dist/{chunk-XEZJEXCU.js → chunk-D5AR5HKB.js} +2 -2
- package/dist/chunk-EMPP4I5H.js +497 -0
- package/dist/{chunk-DVCOVWXF.js → chunk-FCWD4NEK.js} +3 -3
- package/dist/{chunk-PJZVGRJ6.js → chunk-FMXC2O6H.js} +2 -2
- package/dist/{chunk-2GWO5FJL.js → chunk-GVMUVIT5.js} +7 -7
- package/dist/{chunk-KUM3DVPF.js → chunk-HMDWNGIV.js} +142 -471
- package/dist/{chunk-SVSIFM5Y.js → chunk-I6YWZKVU.js} +2 -2
- package/dist/{chunk-7TAOK36E.js → chunk-IYQNHNNP.js} +4 -4
- package/dist/{chunk-KXGCBBJW.js → chunk-JWRRKMF2.js} +2 -2
- package/dist/{chunk-IY7TUSI2.js → chunk-L3FVJFIT.js} +498 -412
- package/dist/{chunk-FJHGD37G.js → chunk-LH6BHL6J.js} +3 -3
- package/dist/{chunk-OAZFIMJ3.js → chunk-LQ2ZKVR6.js} +45 -115
- package/dist/{chunk-ONK6AXDE.js → chunk-MDJOXUMQ.js} +4 -4
- package/dist/{chunk-52WEPVL5.js → chunk-MSBZRBI5.js} +4 -4
- package/dist/{chunk-3HBRMIPY.js → chunk-MW7RWHY5.js} +341 -211
- package/dist/{chunk-O73CKGH7.js → chunk-NUW6LQU4.js} +4 -4
- package/dist/{chunk-ZQ55XXD5.js → chunk-PMOQBQSE.js} +3 -3
- package/dist/{chunk-2RKSPXIM.js → chunk-QEUQO265.js} +5 -7
- package/dist/chunk-QRARFXIM.js +1137 -0
- package/dist/{chunk-NQFTYLP6.js → chunk-R7RENZQC.js} +3 -3
- package/dist/chunk-UB7RN523.js +15933 -0
- package/dist/{chunk-GSPOKRGB.js → chunk-VI4NVMJH.js} +2 -2
- package/dist/{chunk-WNQ6HYKJ.js → chunk-WBTJ7MQU.js} +3 -3
- package/dist/{chunk-2EKHINO6.js → chunk-WKO4CJCL.js} +5 -7
- package/dist/{chunk-YP35ARHU.js → chunk-WNUVUNTL.js} +41 -23
- package/dist/{chunk-AWW6JHWH.js → chunk-XBIDXV7B.js} +4 -4
- package/dist/{chunk-KETZRITQ.js → chunk-XJNTFQIK.js} +5 -5
- package/dist/cli/commands/auth/logout.js +20 -19
- package/dist/cli/commands/auth/logout.test.js +22 -21
- package/dist/cli/commands/cache/clear.js +19 -18
- package/dist/cli/commands/debug/command-flags.js +19 -18
- package/dist/cli/commands/docs/generate.js +19 -18
- package/dist/cli/commands/docs/generate.test.js +20 -19
- package/dist/cli/commands/help.js +19 -18
- package/dist/cli/commands/kitchen-sink/async.js +20 -19
- package/dist/cli/commands/kitchen-sink/async.test.js +21 -20
- package/dist/cli/commands/kitchen-sink/index.js +22 -21
- package/dist/cli/commands/kitchen-sink/index.test.js +23 -22
- package/dist/cli/commands/kitchen-sink/prompts.js +20 -19
- package/dist/cli/commands/kitchen-sink/prompts.test.js +21 -20
- package/dist/cli/commands/kitchen-sink/static.js +20 -19
- package/dist/cli/commands/kitchen-sink/static.test.js +21 -20
- package/dist/cli/commands/notifications/generate.js +20 -19
- package/dist/cli/commands/notifications/list.js +20 -19
- package/dist/cli/commands/search.js +20 -19
- package/dist/cli/commands/upgrade.js +20 -19
- package/dist/cli/commands/upgrade.test.js +2 -1
- package/dist/cli/commands/version.js +20 -19
- package/dist/cli/commands/version.test.js +21 -20
- package/dist/cli/services/commands/notifications.js +14 -13
- package/dist/cli/services/commands/search.js +9 -8
- package/dist/cli/services/commands/search.test.js +10 -9
- package/dist/cli/services/commands/version.js +10 -9
- package/dist/cli/services/commands/version.test.js +12 -11
- package/dist/cli/services/kitchen-sink/async.js +9 -8
- package/dist/cli/services/kitchen-sink/prompts.js +9 -8
- package/dist/cli/services/kitchen-sink/static.js +9 -8
- package/dist/cli/services/upgrade.d.ts +0 -1
- package/dist/cli/services/upgrade.js +11 -10
- package/dist/cli/services/upgrade.test.js +14 -13
- package/dist/configs/all.yml +6 -0
- package/dist/configs/recommended.yml +6 -0
- package/dist/{custom-oclif-loader-4X7Y4CNS.js → custom-oclif-loader-ZY5GUSB3.js} +9 -8
- package/dist/{del-P2RS6GN2.js → del-FBU5JYXS.js} +4 -4
- package/dist/{devtools-K7FXBBFZ.js → devtools-6LOQORRT.js} +2 -2
- package/dist/{error-handler-KHFKBXR4.js → error-handler-YRN4E6SY.js} +17 -16
- package/dist/hooks/postrun.js +18 -16
- package/dist/hooks/prerun.js +15 -14
- package/dist/{http-proxy-FXWKYHZ3.js → http-proxy-L3MCJRQS.js} +3 -2
- package/dist/index.js +18712 -17414
- package/dist/lib-E2DSNKUX.js +13 -0
- package/dist/{local-PBMBK3CF.js → local-VTZT5Q4L.js} +11 -10
- package/dist/{morph-OSHCID2F.js → morph-ACVSDUS7.js} +3 -3
- package/dist/{node-ENALIQ2H.js → node-ONVZF27D.js} +23 -20
- package/dist/{node-package-manager-CVGCLCTC.js → node-package-manager-BZNXJETD.js} +11 -10
- package/dist/{npa-TM76BGG3.js → npa-JAX2F6CO.js} +2 -2
- package/dist/out-AZBX4ITJ.js +7 -0
- package/dist/{path-2HZUSAGR.js → path-2K5HIMHZ.js} +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-BBB46DQS.js → ui-3RKZNTJR.js} +9 -8
- package/dist/{workerd-F7DWDIYO.js → workerd-PSNADDQA.js} +23 -20
- package/oclif.manifest.json +103 -2
- package/package.json +9 -9
- package/LICENSE +0 -8
- package/dist/chunk-KIOWYILS.js +0 -3811
- package/dist/chunk-R4HZPLY4.js +0 -15746
- package/dist/lib-QZGSY5YB.js +0 -13
- package/dist/out-JR4DWQ2G.js +0 -7
- /package/dist/assets/dev-console/extensions/dev-console/assets/{index-Cgb-oKsM.css → index-n8yr6cxq.css} +0 -0
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
} from "./chunk-75LV6AQS.js";
|
|
7
7
|
import {
|
|
8
8
|
cwd,
|
|
9
|
-
delimiter,
|
|
10
9
|
dirname,
|
|
11
10
|
joinPath,
|
|
12
11
|
normalizePath,
|
|
13
12
|
relativizePath,
|
|
13
|
+
sniffForJson,
|
|
14
14
|
sniffForPath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-57Q6OQG4.js";
|
|
16
16
|
import {
|
|
17
17
|
require_cross_spawn,
|
|
18
18
|
require_lib,
|
|
19
19
|
require_source,
|
|
20
20
|
require_supports_hyperlinks
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-CDQA3SST.js";
|
|
22
22
|
import {
|
|
23
23
|
require_brace_expansion,
|
|
24
24
|
require_source_map
|
|
@@ -26,6 +26,9 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
Queue
|
|
28
28
|
} from "./chunk-CFIKVUNW.js";
|
|
29
|
+
import {
|
|
30
|
+
delimiter
|
|
31
|
+
} from "./chunk-CDBXAE2F.js";
|
|
29
32
|
import {
|
|
30
33
|
__commonJS,
|
|
31
34
|
__esm,
|
|
@@ -2818,7 +2821,7 @@ var require_fs = __commonJS({
|
|
|
2818
2821
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
2819
2822
|
"use strict";
|
|
2820
2823
|
init_cjs_shims();
|
|
2821
|
-
var u = require_universalify().fromCallback,
|
|
2824
|
+
var u = require_universalify().fromCallback, fs5 = require_graceful_fs(), api = [
|
|
2822
2825
|
"access",
|
|
2823
2826
|
"appendFile",
|
|
2824
2827
|
"chmod",
|
|
@@ -2853,47 +2856,47 @@ var require_fs = __commonJS({
|
|
|
2853
2856
|
"unlink",
|
|
2854
2857
|
"utimes",
|
|
2855
2858
|
"writeFile"
|
|
2856
|
-
].filter((key) => typeof
|
|
2857
|
-
Object.assign(exports,
|
|
2859
|
+
].filter((key) => typeof fs5[key] == "function");
|
|
2860
|
+
Object.assign(exports, fs5);
|
|
2858
2861
|
api.forEach((method) => {
|
|
2859
|
-
exports[method] = u(
|
|
2862
|
+
exports[method] = u(fs5[method]);
|
|
2860
2863
|
});
|
|
2861
2864
|
exports.exists = function(filename, callback) {
|
|
2862
|
-
return typeof callback == "function" ?
|
|
2865
|
+
return typeof callback == "function" ? fs5.exists(filename, callback) : new Promise((resolve) => fs5.exists(filename, resolve));
|
|
2863
2866
|
};
|
|
2864
2867
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
2865
|
-
return typeof callback == "function" ?
|
|
2866
|
-
|
|
2868
|
+
return typeof callback == "function" ? fs5.read(fd, buffer, offset, length, position, callback) : new Promise((resolve, reject) => {
|
|
2869
|
+
fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
2867
2870
|
if (err) return reject(err);
|
|
2868
2871
|
resolve({ bytesRead, buffer: buffer2 });
|
|
2869
2872
|
});
|
|
2870
2873
|
});
|
|
2871
2874
|
};
|
|
2872
2875
|
exports.write = function(fd, buffer, ...args) {
|
|
2873
|
-
return typeof args[args.length - 1] == "function" ?
|
|
2874
|
-
|
|
2876
|
+
return typeof args[args.length - 1] == "function" ? fs5.write(fd, buffer, ...args) : new Promise((resolve, reject) => {
|
|
2877
|
+
fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
2875
2878
|
if (err) return reject(err);
|
|
2876
2879
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
2877
2880
|
});
|
|
2878
2881
|
});
|
|
2879
2882
|
};
|
|
2880
2883
|
exports.readv = function(fd, buffers, ...args) {
|
|
2881
|
-
return typeof args[args.length - 1] == "function" ?
|
|
2882
|
-
|
|
2884
|
+
return typeof args[args.length - 1] == "function" ? fs5.readv(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
2885
|
+
fs5.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
2883
2886
|
if (err) return reject(err);
|
|
2884
2887
|
resolve({ bytesRead, buffers: buffers2 });
|
|
2885
2888
|
});
|
|
2886
2889
|
});
|
|
2887
2890
|
};
|
|
2888
2891
|
exports.writev = function(fd, buffers, ...args) {
|
|
2889
|
-
return typeof args[args.length - 1] == "function" ?
|
|
2890
|
-
|
|
2892
|
+
return typeof args[args.length - 1] == "function" ? fs5.writev(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
2893
|
+
fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
2891
2894
|
if (err) return reject(err);
|
|
2892
2895
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
2893
2896
|
});
|
|
2894
2897
|
});
|
|
2895
2898
|
};
|
|
2896
|
-
typeof
|
|
2899
|
+
typeof fs5.realpath.native == "function" ? exports.realpath.native = u(fs5.realpath.native) : process.emitWarning(
|
|
2897
2900
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
2898
2901
|
"Warning",
|
|
2899
2902
|
"fs-extra-WARN0003"
|
|
@@ -2921,15 +2924,15 @@ var require_make_dir = __commonJS({
|
|
|
2921
2924
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
2922
2925
|
"use strict";
|
|
2923
2926
|
init_cjs_shims();
|
|
2924
|
-
var
|
|
2927
|
+
var fs5 = require_fs(), { checkPath } = require_utils(), getMode = (options) => {
|
|
2925
2928
|
let defaults2 = { mode: 511 };
|
|
2926
2929
|
return typeof options == "number" ? options : { ...defaults2, ...options }.mode;
|
|
2927
2930
|
};
|
|
2928
|
-
module.exports.makeDir = async (dir, options) => (checkPath(dir),
|
|
2931
|
+
module.exports.makeDir = async (dir, options) => (checkPath(dir), fs5.mkdir(dir, {
|
|
2929
2932
|
mode: getMode(options),
|
|
2930
2933
|
recursive: !0
|
|
2931
2934
|
}));
|
|
2932
|
-
module.exports.makeDirSync = (dir, options) => (checkPath(dir),
|
|
2935
|
+
module.exports.makeDirSync = (dir, options) => (checkPath(dir), fs5.mkdirSync(dir, {
|
|
2933
2936
|
mode: getMode(options),
|
|
2934
2937
|
recursive: !0
|
|
2935
2938
|
}));
|
|
@@ -2959,13 +2962,13 @@ var require_path_exists = __commonJS({
|
|
|
2959
2962
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
2960
2963
|
"use strict";
|
|
2961
2964
|
init_cjs_shims();
|
|
2962
|
-
var u = require_universalify().fromPromise,
|
|
2965
|
+
var u = require_universalify().fromPromise, fs5 = require_fs();
|
|
2963
2966
|
function pathExists3(path8) {
|
|
2964
|
-
return
|
|
2967
|
+
return fs5.access(path8).then(() => !0).catch(() => !1);
|
|
2965
2968
|
}
|
|
2966
2969
|
module.exports = {
|
|
2967
2970
|
pathExists: u(pathExists3),
|
|
2968
|
-
pathExistsSync:
|
|
2971
|
+
pathExistsSync: fs5.existsSync
|
|
2969
2972
|
};
|
|
2970
2973
|
}
|
|
2971
2974
|
});
|
|
@@ -2975,20 +2978,20 @@ var require_utimes = __commonJS({
|
|
|
2975
2978
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
2976
2979
|
"use strict";
|
|
2977
2980
|
init_cjs_shims();
|
|
2978
|
-
var
|
|
2981
|
+
var fs5 = require_graceful_fs();
|
|
2979
2982
|
function utimesMillis(path8, atime, mtime, callback) {
|
|
2980
|
-
|
|
2983
|
+
fs5.open(path8, "r+", (err, fd) => {
|
|
2981
2984
|
if (err) return callback(err);
|
|
2982
|
-
|
|
2983
|
-
|
|
2985
|
+
fs5.futimes(fd, atime, mtime, (futimesErr) => {
|
|
2986
|
+
fs5.close(fd, (closeErr) => {
|
|
2984
2987
|
callback && callback(futimesErr || closeErr);
|
|
2985
2988
|
});
|
|
2986
2989
|
});
|
|
2987
2990
|
});
|
|
2988
2991
|
}
|
|
2989
2992
|
function utimesMillisSync(path8, atime, mtime) {
|
|
2990
|
-
let fd =
|
|
2991
|
-
return
|
|
2993
|
+
let fd = fs5.openSync(path8, "r+");
|
|
2994
|
+
return fs5.futimesSync(fd, atime, mtime), fs5.closeSync(fd);
|
|
2992
2995
|
}
|
|
2993
2996
|
module.exports = {
|
|
2994
2997
|
utimesMillis,
|
|
@@ -3002,9 +3005,9 @@ var require_stat = __commonJS({
|
|
|
3002
3005
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
3003
3006
|
"use strict";
|
|
3004
3007
|
init_cjs_shims();
|
|
3005
|
-
var
|
|
3008
|
+
var fs5 = require_fs(), path8 = __require("path"), util = __require("util");
|
|
3006
3009
|
function getStats(src, dest, opts) {
|
|
3007
|
-
let statFunc = opts.dereference ? (file) =>
|
|
3010
|
+
let statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: !0 }) : (file) => fs5.lstat(file, { bigint: !0 });
|
|
3008
3011
|
return Promise.all([
|
|
3009
3012
|
statFunc(src),
|
|
3010
3013
|
statFunc(dest).catch((err) => {
|
|
@@ -3014,7 +3017,7 @@ var require_stat = __commonJS({
|
|
|
3014
3017
|
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
3015
3018
|
}
|
|
3016
3019
|
function getStatsSync(src, dest, opts) {
|
|
3017
|
-
let destStat, statFunc = opts.dereference ? (file) =>
|
|
3020
|
+
let destStat, statFunc = opts.dereference ? (file) => fs5.statSync(file, { bigint: !0 }) : (file) => fs5.lstatSync(file, { bigint: !0 }), srcStat = statFunc(src);
|
|
3018
3021
|
try {
|
|
3019
3022
|
destStat = statFunc(dest);
|
|
3020
3023
|
} catch (err) {
|
|
@@ -3061,14 +3064,14 @@ var require_stat = __commonJS({
|
|
|
3061
3064
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
3062
3065
|
let srcParent = path8.resolve(path8.dirname(src)), destParent = path8.resolve(path8.dirname(dest));
|
|
3063
3066
|
if (destParent === srcParent || destParent === path8.parse(destParent).root) return cb();
|
|
3064
|
-
|
|
3067
|
+
fs5.stat(destParent, { bigint: !0 }, (err, destStat) => err ? err.code === "ENOENT" ? cb() : cb(err) : areIdentical(srcStat, destStat) ? cb(new Error(errMsg(src, dest, funcName))) : checkParentPaths(src, srcStat, destParent, funcName, cb));
|
|
3065
3068
|
}
|
|
3066
3069
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
3067
3070
|
let srcParent = path8.resolve(path8.dirname(src)), destParent = path8.resolve(path8.dirname(dest));
|
|
3068
3071
|
if (destParent === srcParent || destParent === path8.parse(destParent).root) return;
|
|
3069
3072
|
let destStat;
|
|
3070
3073
|
try {
|
|
3071
|
-
destStat =
|
|
3074
|
+
destStat = fs5.statSync(destParent, { bigint: !0 });
|
|
3072
3075
|
} catch (err) {
|
|
3073
3076
|
if (err.code === "ENOENT") return;
|
|
3074
3077
|
throw err;
|
|
@@ -3103,7 +3106,7 @@ var require_copy = __commonJS({
|
|
|
3103
3106
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
3104
3107
|
"use strict";
|
|
3105
3108
|
init_cjs_shims();
|
|
3106
|
-
var
|
|
3109
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), mkdirs2 = require_mkdirs().mkdirs, pathExists3 = require_path_exists().pathExists, utimesMillis = require_utimes().utimesMillis, stat = require_stat();
|
|
3107
3110
|
function copy2(src, dest, opts, cb) {
|
|
3108
3111
|
typeof opts == "function" && !cb ? (cb = opts, opts = {}) : typeof opts == "function" && (opts = { filter: opts }), cb = cb || function() {
|
|
3109
3112
|
}, opts = opts || {}, opts.clobber = "clobber" in opts ? !!opts.clobber : !0, opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber, opts.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
|
|
@@ -3138,18 +3141,18 @@ var require_copy = __commonJS({
|
|
|
3138
3141
|
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
|
3139
3142
|
}
|
|
3140
3143
|
function getStats(destStat, src, dest, opts, cb) {
|
|
3141
|
-
(opts.dereference ?
|
|
3144
|
+
(opts.dereference ? fs5.stat : fs5.lstat)(src, (err, srcStat) => err ? cb(err) : srcStat.isDirectory() ? onDir(srcStat, destStat, src, dest, opts, cb) : srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice() ? onFile(srcStat, destStat, src, dest, opts, cb) : srcStat.isSymbolicLink() ? onLink(destStat, src, dest, opts, cb) : srcStat.isSocket() ? cb(new Error(`Cannot copy a socket file: ${src}`)) : srcStat.isFIFO() ? cb(new Error(`Cannot copy a FIFO pipe: ${src}`)) : cb(new Error(`Unknown file: ${src}`)));
|
|
3142
3145
|
}
|
|
3143
3146
|
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
3144
3147
|
return destStat ? mayCopyFile(srcStat, src, dest, opts, cb) : copyFile2(srcStat, src, dest, opts, cb);
|
|
3145
3148
|
}
|
|
3146
3149
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
3147
3150
|
if (opts.overwrite)
|
|
3148
|
-
|
|
3151
|
+
fs5.unlink(dest, (err) => err ? cb(err) : copyFile2(srcStat, src, dest, opts, cb));
|
|
3149
3152
|
else return opts.errorOnExist ? cb(new Error(`'${dest}' already exists`)) : cb();
|
|
3150
3153
|
}
|
|
3151
3154
|
function copyFile2(srcStat, src, dest, opts, cb) {
|
|
3152
|
-
|
|
3155
|
+
fs5.copyFile(src, dest, (err) => err ? cb(err) : opts.preserveTimestamps ? handleTimestampsAndMode(srcStat.mode, src, dest, cb) : setDestMode(dest, srcStat.mode, cb));
|
|
3153
3156
|
}
|
|
3154
3157
|
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
3155
3158
|
return fileIsNotWritable(srcMode) ? makeFileWritable(dest, srcMode, (err) => err ? cb(err) : setDestTimestampsAndMode(srcMode, src, dest, cb)) : setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
@@ -3164,22 +3167,22 @@ var require_copy = __commonJS({
|
|
|
3164
3167
|
setDestTimestamps(src, dest, (err) => err ? cb(err) : setDestMode(dest, srcMode, cb));
|
|
3165
3168
|
}
|
|
3166
3169
|
function setDestMode(dest, srcMode, cb) {
|
|
3167
|
-
return
|
|
3170
|
+
return fs5.chmod(dest, srcMode, cb);
|
|
3168
3171
|
}
|
|
3169
3172
|
function setDestTimestamps(src, dest, cb) {
|
|
3170
|
-
|
|
3173
|
+
fs5.stat(src, (err, updatedSrcStat) => err ? cb(err) : utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb));
|
|
3171
3174
|
}
|
|
3172
3175
|
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
3173
3176
|
return destStat ? copyDir(src, dest, opts, cb) : mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
3174
3177
|
}
|
|
3175
3178
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
3176
|
-
|
|
3179
|
+
fs5.mkdir(dest, (err) => {
|
|
3177
3180
|
if (err) return cb(err);
|
|
3178
3181
|
copyDir(src, dest, opts, (err2) => err2 ? cb(err2) : setDestMode(dest, srcMode, cb));
|
|
3179
3182
|
});
|
|
3180
3183
|
}
|
|
3181
3184
|
function copyDir(src, dest, opts, cb) {
|
|
3182
|
-
|
|
3185
|
+
fs5.readdir(src, (err, items) => err ? cb(err) : copyDirItems(items, src, dest, opts, cb));
|
|
3183
3186
|
}
|
|
3184
3187
|
function copyDirItems(items, src, dest, opts, cb) {
|
|
3185
3188
|
let item = items.pop();
|
|
@@ -3198,16 +3201,16 @@ var require_copy = __commonJS({
|
|
|
3198
3201
|
});
|
|
3199
3202
|
}
|
|
3200
3203
|
function onLink(destStat, src, dest, opts, cb) {
|
|
3201
|
-
|
|
3204
|
+
fs5.readlink(src, (err, resolvedSrc) => {
|
|
3202
3205
|
if (err) return cb(err);
|
|
3203
3206
|
if (opts.dereference && (resolvedSrc = path8.resolve(process.cwd(), resolvedSrc)), destStat)
|
|
3204
|
-
|
|
3207
|
+
fs5.readlink(dest, (err2, resolvedDest) => err2 ? err2.code === "EINVAL" || err2.code === "UNKNOWN" ? fs5.symlink(resolvedSrc, dest, cb) : cb(err2) : (opts.dereference && (resolvedDest = path8.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest) ? cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)) : stat.isSrcSubdir(resolvedDest, resolvedSrc) ? cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)) : copyLink(resolvedSrc, dest, cb)));
|
|
3205
3208
|
else
|
|
3206
|
-
return
|
|
3209
|
+
return fs5.symlink(resolvedSrc, dest, cb);
|
|
3207
3210
|
});
|
|
3208
3211
|
}
|
|
3209
3212
|
function copyLink(resolvedSrc, dest, cb) {
|
|
3210
|
-
|
|
3213
|
+
fs5.unlink(dest, (err) => err ? cb(err) : fs5.symlink(resolvedSrc, dest, cb));
|
|
3211
3214
|
}
|
|
3212
3215
|
module.exports = copy2;
|
|
3213
3216
|
}
|
|
@@ -3218,7 +3221,7 @@ var require_copy_sync = __commonJS({
|
|
|
3218
3221
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
3219
3222
|
"use strict";
|
|
3220
3223
|
init_cjs_shims();
|
|
3221
|
-
var
|
|
3224
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), mkdirsSync2 = require_mkdirs().mkdirsSync, utimesMillisSync = require_utimes().utimesMillisSync, stat = require_stat();
|
|
3222
3225
|
function copySync2(src, dest, opts) {
|
|
3223
3226
|
typeof opts == "function" && (opts = { filter: opts }), opts = opts || {}, opts.clobber = "clobber" in opts ? !!opts.clobber : !0, opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber, opts.preserveTimestamps && process.arch === "ia32" && process.emitWarning(
|
|
3224
3227
|
`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -3230,10 +3233,10 @@ var require_copy_sync = __commonJS({
|
|
|
3230
3233
|
let { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
3231
3234
|
if (stat.checkParentPathsSync(src, srcStat, dest, "copy"), opts.filter && !opts.filter(src, dest)) return;
|
|
3232
3235
|
let destParent = path8.dirname(dest);
|
|
3233
|
-
return
|
|
3236
|
+
return fs5.existsSync(destParent) || mkdirsSync2(destParent), getStats(destStat, src, dest, opts);
|
|
3234
3237
|
}
|
|
3235
3238
|
function getStats(destStat, src, dest, opts) {
|
|
3236
|
-
let srcStat = (opts.dereference ?
|
|
3239
|
+
let srcStat = (opts.dereference ? fs5.statSync : fs5.lstatSync)(src);
|
|
3237
3240
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
3238
3241
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
3239
3242
|
if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
|
@@ -3244,12 +3247,12 @@ var require_copy_sync = __commonJS({
|
|
|
3244
3247
|
}
|
|
3245
3248
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
3246
3249
|
if (opts.overwrite)
|
|
3247
|
-
return
|
|
3250
|
+
return fs5.unlinkSync(dest), copyFile2(srcStat, src, dest, opts);
|
|
3248
3251
|
if (opts.errorOnExist)
|
|
3249
3252
|
throw new Error(`'${dest}' already exists`);
|
|
3250
3253
|
}
|
|
3251
3254
|
function copyFile2(srcStat, src, dest, opts) {
|
|
3252
|
-
return
|
|
3255
|
+
return fs5.copyFileSync(src, dest), opts.preserveTimestamps && handleTimestamps(srcStat.mode, src, dest), setDestMode(dest, srcStat.mode);
|
|
3253
3256
|
}
|
|
3254
3257
|
function handleTimestamps(srcMode, src, dest) {
|
|
3255
3258
|
return fileIsNotWritable(srcMode) && makeFileWritable(dest, srcMode), setDestTimestamps(src, dest);
|
|
@@ -3261,20 +3264,20 @@ var require_copy_sync = __commonJS({
|
|
|
3261
3264
|
return setDestMode(dest, srcMode | 128);
|
|
3262
3265
|
}
|
|
3263
3266
|
function setDestMode(dest, srcMode) {
|
|
3264
|
-
return
|
|
3267
|
+
return fs5.chmodSync(dest, srcMode);
|
|
3265
3268
|
}
|
|
3266
3269
|
function setDestTimestamps(src, dest) {
|
|
3267
|
-
let updatedSrcStat =
|
|
3270
|
+
let updatedSrcStat = fs5.statSync(src);
|
|
3268
3271
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
3269
3272
|
}
|
|
3270
3273
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
3271
3274
|
return destStat ? copyDir(src, dest, opts) : mkDirAndCopy(srcStat.mode, src, dest, opts);
|
|
3272
3275
|
}
|
|
3273
3276
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
3274
|
-
return
|
|
3277
|
+
return fs5.mkdirSync(dest), copyDir(src, dest, opts), setDestMode(dest, srcMode);
|
|
3275
3278
|
}
|
|
3276
3279
|
function copyDir(src, dest, opts) {
|
|
3277
|
-
|
|
3280
|
+
fs5.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
3278
3281
|
}
|
|
3279
3282
|
function copyDirItem(item, src, dest, opts) {
|
|
3280
3283
|
let srcItem = path8.join(src, item), destItem = path8.join(dest, item);
|
|
@@ -3283,13 +3286,13 @@ var require_copy_sync = __commonJS({
|
|
|
3283
3286
|
return getStats(destStat, srcItem, destItem, opts);
|
|
3284
3287
|
}
|
|
3285
3288
|
function onLink(destStat, src, dest, opts) {
|
|
3286
|
-
let resolvedSrc =
|
|
3289
|
+
let resolvedSrc = fs5.readlinkSync(src);
|
|
3287
3290
|
if (opts.dereference && (resolvedSrc = path8.resolve(process.cwd(), resolvedSrc)), destStat) {
|
|
3288
3291
|
let resolvedDest;
|
|
3289
3292
|
try {
|
|
3290
|
-
resolvedDest =
|
|
3293
|
+
resolvedDest = fs5.readlinkSync(dest);
|
|
3291
3294
|
} catch (err) {
|
|
3292
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
3295
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs5.symlinkSync(resolvedSrc, dest);
|
|
3293
3296
|
throw err;
|
|
3294
3297
|
}
|
|
3295
3298
|
if (opts.dereference && (resolvedDest = path8.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest))
|
|
@@ -3298,10 +3301,10 @@ var require_copy_sync = __commonJS({
|
|
|
3298
3301
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
3299
3302
|
return copyLink(resolvedSrc, dest);
|
|
3300
3303
|
} else
|
|
3301
|
-
return
|
|
3304
|
+
return fs5.symlinkSync(resolvedSrc, dest);
|
|
3302
3305
|
}
|
|
3303
3306
|
function copyLink(resolvedSrc, dest) {
|
|
3304
|
-
return
|
|
3307
|
+
return fs5.unlinkSync(dest), fs5.symlinkSync(resolvedSrc, dest);
|
|
3305
3308
|
}
|
|
3306
3309
|
module.exports = copySync2;
|
|
3307
3310
|
}
|
|
@@ -3325,12 +3328,12 @@ var require_remove = __commonJS({
|
|
|
3325
3328
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
3326
3329
|
"use strict";
|
|
3327
3330
|
init_cjs_shims();
|
|
3328
|
-
var
|
|
3331
|
+
var fs5 = require_graceful_fs(), u = require_universalify().fromCallback;
|
|
3329
3332
|
function remove2(path8, callback) {
|
|
3330
|
-
|
|
3333
|
+
fs5.rm(path8, { recursive: !0, force: !0 }, callback);
|
|
3331
3334
|
}
|
|
3332
3335
|
function removeSync2(path8) {
|
|
3333
|
-
|
|
3336
|
+
fs5.rmSync(path8, { recursive: !0, force: !0 });
|
|
3334
3337
|
}
|
|
3335
3338
|
module.exports = {
|
|
3336
3339
|
remove: u(remove2),
|
|
@@ -3344,10 +3347,10 @@ var require_empty = __commonJS({
|
|
|
3344
3347
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
3345
3348
|
"use strict";
|
|
3346
3349
|
init_cjs_shims();
|
|
3347
|
-
var u = require_universalify().fromPromise,
|
|
3350
|
+
var u = require_universalify().fromPromise, fs5 = require_fs(), path8 = __require("path"), mkdir2 = require_mkdirs(), remove2 = require_remove(), emptyDir2 = u(async function(dir) {
|
|
3348
3351
|
let items;
|
|
3349
3352
|
try {
|
|
3350
|
-
items = await
|
|
3353
|
+
items = await fs5.readdir(dir);
|
|
3351
3354
|
} catch {
|
|
3352
3355
|
return mkdir2.mkdirs(dir);
|
|
3353
3356
|
}
|
|
@@ -3356,7 +3359,7 @@ var require_empty = __commonJS({
|
|
|
3356
3359
|
function emptyDirSync2(dir) {
|
|
3357
3360
|
let items;
|
|
3358
3361
|
try {
|
|
3359
|
-
items =
|
|
3362
|
+
items = fs5.readdirSync(dir);
|
|
3360
3363
|
} catch {
|
|
3361
3364
|
return mkdir2.mkdirsSync(dir);
|
|
3362
3365
|
}
|
|
@@ -3378,24 +3381,24 @@ var require_file = __commonJS({
|
|
|
3378
3381
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
3379
3382
|
"use strict";
|
|
3380
3383
|
init_cjs_shims();
|
|
3381
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
3384
|
+
var u = require_universalify().fromCallback, path8 = __require("path"), fs5 = require_graceful_fs(), mkdir2 = require_mkdirs();
|
|
3382
3385
|
function createFile2(file, callback) {
|
|
3383
3386
|
function makeFile() {
|
|
3384
|
-
|
|
3387
|
+
fs5.writeFile(file, "", (err) => {
|
|
3385
3388
|
if (err) return callback(err);
|
|
3386
3389
|
callback();
|
|
3387
3390
|
});
|
|
3388
3391
|
}
|
|
3389
|
-
|
|
3392
|
+
fs5.stat(file, (err, stats) => {
|
|
3390
3393
|
if (!err && stats.isFile()) return callback();
|
|
3391
3394
|
let dir = path8.dirname(file);
|
|
3392
|
-
|
|
3395
|
+
fs5.stat(dir, (err2, stats2) => {
|
|
3393
3396
|
if (err2)
|
|
3394
3397
|
return err2.code === "ENOENT" ? mkdir2.mkdirs(dir, (err3) => {
|
|
3395
3398
|
if (err3) return callback(err3);
|
|
3396
3399
|
makeFile();
|
|
3397
3400
|
}) : callback(err2);
|
|
3398
|
-
stats2.isDirectory() ? makeFile() :
|
|
3401
|
+
stats2.isDirectory() ? makeFile() : fs5.readdir(dir, (err3) => {
|
|
3399
3402
|
if (err3) return callback(err3);
|
|
3400
3403
|
});
|
|
3401
3404
|
});
|
|
@@ -3404,18 +3407,18 @@ var require_file = __commonJS({
|
|
|
3404
3407
|
function createFileSync2(file) {
|
|
3405
3408
|
let stats;
|
|
3406
3409
|
try {
|
|
3407
|
-
stats =
|
|
3410
|
+
stats = fs5.statSync(file);
|
|
3408
3411
|
} catch {
|
|
3409
3412
|
}
|
|
3410
3413
|
if (stats && stats.isFile()) return;
|
|
3411
3414
|
let dir = path8.dirname(file);
|
|
3412
3415
|
try {
|
|
3413
|
-
|
|
3416
|
+
fs5.statSync(dir).isDirectory() || fs5.readdirSync(dir);
|
|
3414
3417
|
} catch (err) {
|
|
3415
3418
|
if (err && err.code === "ENOENT") mkdir2.mkdirsSync(dir);
|
|
3416
3419
|
else throw err;
|
|
3417
3420
|
}
|
|
3418
|
-
|
|
3421
|
+
fs5.writeFileSync(file, "");
|
|
3419
3422
|
}
|
|
3420
3423
|
module.exports = {
|
|
3421
3424
|
createFile: u(createFile2),
|
|
@@ -3429,16 +3432,16 @@ var require_link = __commonJS({
|
|
|
3429
3432
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
3430
3433
|
"use strict";
|
|
3431
3434
|
init_cjs_shims();
|
|
3432
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
3435
|
+
var u = require_universalify().fromCallback, path8 = __require("path"), fs5 = require_graceful_fs(), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
|
|
3433
3436
|
function createLink2(srcpath, dstpath, callback) {
|
|
3434
3437
|
function makeLink(srcpath2, dstpath2) {
|
|
3435
|
-
|
|
3438
|
+
fs5.link(srcpath2, dstpath2, (err) => {
|
|
3436
3439
|
if (err) return callback(err);
|
|
3437
3440
|
callback(null);
|
|
3438
3441
|
});
|
|
3439
3442
|
}
|
|
3440
|
-
|
|
3441
|
-
|
|
3443
|
+
fs5.lstat(dstpath, (_2, dstStat) => {
|
|
3444
|
+
fs5.lstat(srcpath, (err, srcStat) => {
|
|
3442
3445
|
if (err)
|
|
3443
3446
|
return err.message = err.message.replace("lstat", "ensureLink"), callback(err);
|
|
3444
3447
|
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
|
@@ -3457,17 +3460,17 @@ var require_link = __commonJS({
|
|
|
3457
3460
|
function createLinkSync2(srcpath, dstpath) {
|
|
3458
3461
|
let dstStat;
|
|
3459
3462
|
try {
|
|
3460
|
-
dstStat =
|
|
3463
|
+
dstStat = fs5.lstatSync(dstpath);
|
|
3461
3464
|
} catch {
|
|
3462
3465
|
}
|
|
3463
3466
|
try {
|
|
3464
|
-
let srcStat =
|
|
3467
|
+
let srcStat = fs5.lstatSync(srcpath);
|
|
3465
3468
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
3466
3469
|
} catch (err) {
|
|
3467
3470
|
throw err.message = err.message.replace("lstat", "ensureLink"), err;
|
|
3468
3471
|
}
|
|
3469
3472
|
let dir = path8.dirname(dstpath);
|
|
3470
|
-
return
|
|
3473
|
+
return fs5.existsSync(dir) || mkdir2.mkdirsSync(dir), fs5.linkSync(srcpath, dstpath);
|
|
3471
3474
|
}
|
|
3472
3475
|
module.exports = {
|
|
3473
3476
|
createLink: u(createLink2),
|
|
@@ -3481,10 +3484,10 @@ var require_symlink_paths = __commonJS({
|
|
|
3481
3484
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
3482
3485
|
"use strict";
|
|
3483
3486
|
init_cjs_shims();
|
|
3484
|
-
var path8 = __require("path"),
|
|
3487
|
+
var path8 = __require("path"), fs5 = require_graceful_fs(), pathExists3 = require_path_exists().pathExists;
|
|
3485
3488
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
3486
3489
|
if (path8.isAbsolute(srcpath))
|
|
3487
|
-
return
|
|
3490
|
+
return fs5.lstat(srcpath, (err) => err ? (err.message = err.message.replace("lstat", "ensureSymlink"), callback(err)) : callback(null, {
|
|
3488
3491
|
toCwd: srcpath,
|
|
3489
3492
|
toDst: srcpath
|
|
3490
3493
|
}));
|
|
@@ -3493,7 +3496,7 @@ var require_symlink_paths = __commonJS({
|
|
|
3493
3496
|
return pathExists3(relativeToDst, (err, exists) => err ? callback(err) : exists ? callback(null, {
|
|
3494
3497
|
toCwd: relativeToDst,
|
|
3495
3498
|
toDst: srcpath
|
|
3496
|
-
}) :
|
|
3499
|
+
}) : fs5.lstat(srcpath, (err2) => err2 ? (err2.message = err2.message.replace("lstat", "ensureSymlink"), callback(err2)) : callback(null, {
|
|
3497
3500
|
toCwd: srcpath,
|
|
3498
3501
|
toDst: path8.relative(dstdir, srcpath)
|
|
3499
3502
|
})));
|
|
@@ -3502,19 +3505,19 @@ var require_symlink_paths = __commonJS({
|
|
|
3502
3505
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
3503
3506
|
let exists;
|
|
3504
3507
|
if (path8.isAbsolute(srcpath)) {
|
|
3505
|
-
if (exists =
|
|
3508
|
+
if (exists = fs5.existsSync(srcpath), !exists) throw new Error("absolute srcpath does not exist");
|
|
3506
3509
|
return {
|
|
3507
3510
|
toCwd: srcpath,
|
|
3508
3511
|
toDst: srcpath
|
|
3509
3512
|
};
|
|
3510
3513
|
} else {
|
|
3511
3514
|
let dstdir = path8.dirname(dstpath), relativeToDst = path8.join(dstdir, srcpath);
|
|
3512
|
-
if (exists =
|
|
3515
|
+
if (exists = fs5.existsSync(relativeToDst), exists)
|
|
3513
3516
|
return {
|
|
3514
3517
|
toCwd: relativeToDst,
|
|
3515
3518
|
toDst: srcpath
|
|
3516
3519
|
};
|
|
3517
|
-
if (exists =
|
|
3520
|
+
if (exists = fs5.existsSync(srcpath), !exists) throw new Error("relative srcpath does not exist");
|
|
3518
3521
|
return {
|
|
3519
3522
|
toCwd: srcpath,
|
|
3520
3523
|
toDst: path8.relative(dstdir, srcpath)
|
|
@@ -3533,10 +3536,10 @@ var require_symlink_type = __commonJS({
|
|
|
3533
3536
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
3534
3537
|
"use strict";
|
|
3535
3538
|
init_cjs_shims();
|
|
3536
|
-
var
|
|
3539
|
+
var fs5 = require_graceful_fs();
|
|
3537
3540
|
function symlinkType(srcpath, type, callback) {
|
|
3538
3541
|
if (callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, type) return callback(null, type);
|
|
3539
|
-
|
|
3542
|
+
fs5.lstat(srcpath, (err, stats) => {
|
|
3540
3543
|
if (err) return callback(null, "file");
|
|
3541
3544
|
type = stats && stats.isDirectory() ? "dir" : "file", callback(null, type);
|
|
3542
3545
|
});
|
|
@@ -3545,7 +3548,7 @@ var require_symlink_type = __commonJS({
|
|
|
3545
3548
|
let stats;
|
|
3546
3549
|
if (type) return type;
|
|
3547
3550
|
try {
|
|
3548
|
-
stats =
|
|
3551
|
+
stats = fs5.lstatSync(srcpath);
|
|
3549
3552
|
} catch {
|
|
3550
3553
|
return "file";
|
|
3551
3554
|
}
|
|
@@ -3563,12 +3566,12 @@ var require_symlink = __commonJS({
|
|
|
3563
3566
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
3564
3567
|
"use strict";
|
|
3565
3568
|
init_cjs_shims();
|
|
3566
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
3569
|
+
var u = require_universalify().fromCallback, path8 = __require("path"), fs5 = require_fs(), _mkdirs2 = require_mkdirs(), mkdirs2 = _mkdirs2.mkdirs, mkdirsSync2 = _mkdirs2.mkdirsSync, _symlinkPaths = require_symlink_paths(), symlinkPaths = _symlinkPaths.symlinkPaths, symlinkPathsSync = _symlinkPaths.symlinkPathsSync, _symlinkType = require_symlink_type(), symlinkType = _symlinkType.symlinkType, symlinkTypeSync = _symlinkType.symlinkTypeSync, pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
|
|
3567
3570
|
function createSymlink2(srcpath, dstpath, type, callback) {
|
|
3568
|
-
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type,
|
|
3571
|
+
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, fs5.lstat(dstpath, (err, stats) => {
|
|
3569
3572
|
!err && stats.isSymbolicLink() ? Promise.all([
|
|
3570
|
-
|
|
3571
|
-
|
|
3573
|
+
fs5.stat(srcpath),
|
|
3574
|
+
fs5.stat(dstpath)
|
|
3572
3575
|
]).then(([srcStat, dstStat]) => {
|
|
3573
3576
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
3574
3577
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
@@ -3583,10 +3586,10 @@ var require_symlink = __commonJS({
|
|
|
3583
3586
|
let dir = path8.dirname(dstpath);
|
|
3584
3587
|
pathExists3(dir, (err3, dirExists) => {
|
|
3585
3588
|
if (err3) return callback(err3);
|
|
3586
|
-
if (dirExists) return
|
|
3589
|
+
if (dirExists) return fs5.symlink(srcpath, dstpath, type2, callback);
|
|
3587
3590
|
mkdirs2(dir, (err4) => {
|
|
3588
3591
|
if (err4) return callback(err4);
|
|
3589
|
-
|
|
3592
|
+
fs5.symlink(srcpath, dstpath, type2, callback);
|
|
3590
3593
|
});
|
|
3591
3594
|
});
|
|
3592
3595
|
});
|
|
@@ -3595,17 +3598,17 @@ var require_symlink = __commonJS({
|
|
|
3595
3598
|
function createSymlinkSync2(srcpath, dstpath, type) {
|
|
3596
3599
|
let stats;
|
|
3597
3600
|
try {
|
|
3598
|
-
stats =
|
|
3601
|
+
stats = fs5.lstatSync(dstpath);
|
|
3599
3602
|
} catch {
|
|
3600
3603
|
}
|
|
3601
3604
|
if (stats && stats.isSymbolicLink()) {
|
|
3602
|
-
let srcStat =
|
|
3605
|
+
let srcStat = fs5.statSync(srcpath), dstStat = fs5.statSync(dstpath);
|
|
3603
3606
|
if (areIdentical(srcStat, dstStat)) return;
|
|
3604
3607
|
}
|
|
3605
3608
|
let relative = symlinkPathsSync(srcpath, dstpath);
|
|
3606
3609
|
srcpath = relative.toDst, type = symlinkTypeSync(relative.toCwd, type);
|
|
3607
3610
|
let dir = path8.dirname(dstpath);
|
|
3608
|
-
return
|
|
3611
|
+
return fs5.existsSync(dir) || mkdirsSync2(dir), fs5.symlinkSync(srcpath, dstpath, type);
|
|
3609
3612
|
}
|
|
3610
3613
|
module.exports = {
|
|
3611
3614
|
createSymlink: u(createSymlink2),
|
|
@@ -3644,10 +3647,10 @@ var require_ensure = __commonJS({
|
|
|
3644
3647
|
var require_utils2 = __commonJS({
|
|
3645
3648
|
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
|
|
3646
3649
|
init_cjs_shims();
|
|
3647
|
-
function stringify(obj, { EOL = `
|
|
3650
|
+
function stringify(obj, { EOL: EOL2 = `
|
|
3648
3651
|
`, finalEOL = !0, replacer = null, spaces } = {}) {
|
|
3649
|
-
let EOF = finalEOL ?
|
|
3650
|
-
return JSON.stringify(obj, replacer, spaces).replace(/\n/g,
|
|
3652
|
+
let EOF = finalEOL ? EOL2 : "";
|
|
3653
|
+
return JSON.stringify(obj, replacer, spaces).replace(/\n/g, EOL2) + EOF;
|
|
3651
3654
|
}
|
|
3652
3655
|
function stripBom(content) {
|
|
3653
3656
|
return Buffer.isBuffer(content) && (content = content.toString("utf8")), content.replace(/^\uFEFF/, "");
|
|
@@ -3669,7 +3672,7 @@ var require_jsonfile = __commonJS({
|
|
|
3669
3672
|
var universalify = require_universalify(), { stringify, stripBom } = require_utils2();
|
|
3670
3673
|
async function _readFile(file, options = {}) {
|
|
3671
3674
|
typeof options == "string" && (options = { encoding: options });
|
|
3672
|
-
let
|
|
3675
|
+
let fs5 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0, data = await universalify.fromCallback(fs5.readFile)(file, options);
|
|
3673
3676
|
data = stripBom(data);
|
|
3674
3677
|
let obj;
|
|
3675
3678
|
try {
|
|
@@ -3684,9 +3687,9 @@ var require_jsonfile = __commonJS({
|
|
|
3684
3687
|
var readFile2 = universalify.fromPromise(_readFile);
|
|
3685
3688
|
function readFileSync4(file, options = {}) {
|
|
3686
3689
|
typeof options == "string" && (options = { encoding: options });
|
|
3687
|
-
let
|
|
3690
|
+
let fs5 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0;
|
|
3688
3691
|
try {
|
|
3689
|
-
let content =
|
|
3692
|
+
let content = fs5.readFileSync(file, options);
|
|
3690
3693
|
return content = stripBom(content), JSON.parse(content, options.reviver);
|
|
3691
3694
|
} catch (err) {
|
|
3692
3695
|
if (shouldThrow)
|
|
@@ -3695,13 +3698,13 @@ var require_jsonfile = __commonJS({
|
|
|
3695
3698
|
}
|
|
3696
3699
|
}
|
|
3697
3700
|
async function _writeFile(file, obj, options = {}) {
|
|
3698
|
-
let
|
|
3699
|
-
await universalify.fromCallback(
|
|
3701
|
+
let fs5 = options.fs || _fs, str = stringify(obj, options);
|
|
3702
|
+
await universalify.fromCallback(fs5.writeFile)(file, str, options);
|
|
3700
3703
|
}
|
|
3701
3704
|
var writeFile2 = universalify.fromPromise(_writeFile);
|
|
3702
3705
|
function writeFileSync2(file, obj, options = {}) {
|
|
3703
|
-
let
|
|
3704
|
-
return
|
|
3706
|
+
let fs5 = options.fs || _fs, str = stringify(obj, options);
|
|
3707
|
+
return fs5.writeFileSync(file, str, options);
|
|
3705
3708
|
}
|
|
3706
3709
|
var jsonfile = {
|
|
3707
3710
|
readFile: readFile2,
|
|
@@ -3734,24 +3737,24 @@ var require_output_file = __commonJS({
|
|
|
3734
3737
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
3735
3738
|
"use strict";
|
|
3736
3739
|
init_cjs_shims();
|
|
3737
|
-
var u = require_universalify().fromCallback,
|
|
3740
|
+
var u = require_universalify().fromCallback, fs5 = require_graceful_fs(), path8 = __require("path"), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists;
|
|
3738
3741
|
function outputFile2(file, data, encoding, callback) {
|
|
3739
3742
|
typeof encoding == "function" && (callback = encoding, encoding = "utf8");
|
|
3740
3743
|
let dir = path8.dirname(file);
|
|
3741
3744
|
pathExists3(dir, (err, itDoes) => {
|
|
3742
3745
|
if (err) return callback(err);
|
|
3743
|
-
if (itDoes) return
|
|
3746
|
+
if (itDoes) return fs5.writeFile(file, data, encoding, callback);
|
|
3744
3747
|
mkdir2.mkdirs(dir, (err2) => {
|
|
3745
3748
|
if (err2) return callback(err2);
|
|
3746
|
-
|
|
3749
|
+
fs5.writeFile(file, data, encoding, callback);
|
|
3747
3750
|
});
|
|
3748
3751
|
});
|
|
3749
3752
|
}
|
|
3750
3753
|
function outputFileSync2(file, ...args) {
|
|
3751
3754
|
let dir = path8.dirname(file);
|
|
3752
|
-
if (
|
|
3753
|
-
return
|
|
3754
|
-
mkdir2.mkdirsSync(dir),
|
|
3755
|
+
if (fs5.existsSync(dir))
|
|
3756
|
+
return fs5.writeFileSync(file, ...args);
|
|
3757
|
+
mkdir2.mkdirsSync(dir), fs5.writeFileSync(file, ...args);
|
|
3755
3758
|
}
|
|
3756
3759
|
module.exports = {
|
|
3757
3760
|
outputFile: u(outputFile2),
|
|
@@ -3811,7 +3814,7 @@ var require_move = __commonJS({
|
|
|
3811
3814
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
3812
3815
|
"use strict";
|
|
3813
3816
|
init_cjs_shims();
|
|
3814
|
-
var
|
|
3817
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), copy2 = require_copy2().copy, remove2 = require_remove().remove, mkdirp2 = require_mkdirs().mkdirp, pathExists3 = require_path_exists().pathExists, stat = require_stat();
|
|
3815
3818
|
function move2(src, dest, opts, cb) {
|
|
3816
3819
|
typeof opts == "function" && (cb = opts, opts = {}), opts = opts || {};
|
|
3817
3820
|
let overwrite = opts.overwrite || opts.clobber || !1;
|
|
@@ -3836,7 +3839,7 @@ var require_move = __commonJS({
|
|
|
3836
3839
|
pathExists3(dest, (err, destExists) => err ? cb(err) : destExists ? cb(new Error("dest already exists.")) : rename(src, dest, overwrite, cb));
|
|
3837
3840
|
}
|
|
3838
3841
|
function rename(src, dest, overwrite, cb) {
|
|
3839
|
-
|
|
3842
|
+
fs5.rename(src, dest, (err) => err ? err.code !== "EXDEV" ? cb(err) : moveAcrossDevice(src, dest, overwrite, cb) : cb());
|
|
3840
3843
|
}
|
|
3841
3844
|
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
3842
3845
|
copy2(src, dest, {
|
|
@@ -3853,7 +3856,7 @@ var require_move_sync = __commonJS({
|
|
|
3853
3856
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
3854
3857
|
"use strict";
|
|
3855
3858
|
init_cjs_shims();
|
|
3856
|
-
var
|
|
3859
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), copySync2 = require_copy2().copySync, removeSync2 = require_remove().removeSync, mkdirpSync2 = require_mkdirs().mkdirpSync, stat = require_stat();
|
|
3857
3860
|
function moveSync2(src, dest, opts) {
|
|
3858
3861
|
opts = opts || {};
|
|
3859
3862
|
let overwrite = opts.overwrite || opts.clobber || !1, { srcStat, isChangingCase = !1 } = stat.checkPathsSync(src, dest, "move", opts);
|
|
@@ -3867,12 +3870,12 @@ var require_move_sync = __commonJS({
|
|
|
3867
3870
|
if (isChangingCase) return rename(src, dest, overwrite);
|
|
3868
3871
|
if (overwrite)
|
|
3869
3872
|
return removeSync2(dest), rename(src, dest, overwrite);
|
|
3870
|
-
if (
|
|
3873
|
+
if (fs5.existsSync(dest)) throw new Error("dest already exists.");
|
|
3871
3874
|
return rename(src, dest, overwrite);
|
|
3872
3875
|
}
|
|
3873
3876
|
function rename(src, dest, overwrite) {
|
|
3874
3877
|
try {
|
|
3875
|
-
|
|
3878
|
+
fs5.renameSync(src, dest);
|
|
3876
3879
|
} catch (err) {
|
|
3877
3880
|
if (err.code !== "EXDEV") throw err;
|
|
3878
3881
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -3901,19 +3904,6 @@ var require_move2 = __commonJS({
|
|
|
3901
3904
|
}
|
|
3902
3905
|
});
|
|
3903
3906
|
|
|
3904
|
-
// ../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js
|
|
3905
|
-
var require_temp_dir = __commonJS({
|
|
3906
|
-
"../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports, module) {
|
|
3907
|
-
"use strict";
|
|
3908
|
-
init_cjs_shims();
|
|
3909
|
-
var fs4 = __require("fs"), os4 = __require("os"), tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
|
|
3910
|
-
global[tempDirectorySymbol] || Object.defineProperty(global, tempDirectorySymbol, {
|
|
3911
|
-
value: fs4.realpathSync(os4.tmpdir())
|
|
3912
|
-
});
|
|
3913
|
-
module.exports = global[tempDirectorySymbol];
|
|
3914
|
-
}
|
|
3915
|
-
});
|
|
3916
|
-
|
|
3917
3907
|
// ../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
|
|
3918
3908
|
var require_signals = __commonJS({
|
|
3919
3909
|
"../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module) {
|
|
@@ -4227,8 +4217,8 @@ var require_getmacaddress_unix = __commonJS({
|
|
|
4227
4217
|
var require_getmacaddress = __commonJS({
|
|
4228
4218
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getmacaddress.js"(exports, module) {
|
|
4229
4219
|
init_cjs_shims();
|
|
4230
|
-
var
|
|
4231
|
-
switch (
|
|
4220
|
+
var os6 = __require("os"), _getMacAddress, _validIfaceRegExp = "^[a-z0-9]+$";
|
|
4221
|
+
switch (os6.platform()) {
|
|
4232
4222
|
case "win32":
|
|
4233
4223
|
_validIfaceRegExp = "^[a-z0-9 -]+$", _getMacAddress = require_getmacaddress_windows();
|
|
4234
4224
|
break;
|
|
@@ -4332,8 +4322,8 @@ var require_getallinterfaces_unix = __commonJS({
|
|
|
4332
4322
|
var require_getallinterfaces = __commonJS({
|
|
4333
4323
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getallinterfaces.js"(exports, module) {
|
|
4334
4324
|
init_cjs_shims();
|
|
4335
|
-
var
|
|
4336
|
-
switch (
|
|
4325
|
+
var os6 = __require("os"), _getAllInterfaces;
|
|
4326
|
+
switch (os6.platform()) {
|
|
4337
4327
|
case "win32":
|
|
4338
4328
|
_getAllInterfaces = require_getallinterfaces_windows();
|
|
4339
4329
|
break;
|
|
@@ -4357,11 +4347,11 @@ var require_getallinterfaces = __commonJS({
|
|
|
4357
4347
|
var require_networkinterfaces = __commonJS({
|
|
4358
4348
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/networkinterfaces.js"(exports, module) {
|
|
4359
4349
|
init_cjs_shims();
|
|
4360
|
-
var
|
|
4350
|
+
var os6 = __require("os");
|
|
4361
4351
|
module.exports = function() {
|
|
4362
4352
|
var allAddresses = {};
|
|
4363
4353
|
try {
|
|
4364
|
-
var ifaces =
|
|
4354
|
+
var ifaces = os6.networkInterfaces();
|
|
4365
4355
|
} catch (e) {
|
|
4366
4356
|
if (e.syscall === "uv_interface_addresses")
|
|
4367
4357
|
return allAddresses;
|
|
@@ -10732,7 +10722,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
10732
10722
|
"use strict";
|
|
10733
10723
|
init_cjs_shims();
|
|
10734
10724
|
process.env.NODE_ENV !== "production" && (module.exports = function($$$hostConfig) {
|
|
10735
|
-
var exports2 = {},
|
|
10725
|
+
var exports2 = {}, React39 = require_react(), Scheduler = require_scheduler(), ReactSharedInternals = React39.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, suppressWarning = !1;
|
|
10736
10726
|
function setSuppressWarning(newSuppressWarning) {
|
|
10737
10727
|
suppressWarning = newSuppressWarning;
|
|
10738
10728
|
}
|
|
@@ -22493,9 +22483,9 @@ var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_em
|
|
|
22493
22483
|
...import_remove.default
|
|
22494
22484
|
};
|
|
22495
22485
|
|
|
22496
|
-
// ../../node_modules/.pnpm/tempy@3.
|
|
22486
|
+
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
22497
22487
|
init_cjs_shims();
|
|
22498
|
-
import
|
|
22488
|
+
import fs2 from "node:fs";
|
|
22499
22489
|
import fsPromises from "node:fs/promises";
|
|
22500
22490
|
import path from "node:path";
|
|
22501
22491
|
import stream from "node:stream";
|
|
@@ -22574,8 +22564,11 @@ function uniqueString() {
|
|
|
22574
22564
|
return crypto_random_string_default({ length: 32 });
|
|
22575
22565
|
}
|
|
22576
22566
|
|
|
22577
|
-
// ../../node_modules/.pnpm/
|
|
22578
|
-
|
|
22567
|
+
// ../../node_modules/.pnpm/temp-dir@3.0.0/node_modules/temp-dir/index.js
|
|
22568
|
+
init_cjs_shims();
|
|
22569
|
+
import { promises as fs } from "node:fs";
|
|
22570
|
+
import os from "node:os";
|
|
22571
|
+
var temporaryDirectory = await fs.realpath(os.tmpdir()), temp_dir_default = temporaryDirectory;
|
|
22579
22572
|
|
|
22580
22573
|
// ../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
|
|
22581
22574
|
init_cjs_shims();
|
|
@@ -22586,20 +22579,20 @@ function isWritableStream(stream2) {
|
|
|
22586
22579
|
return isStream(stream2) && stream2.writable !== !1 && typeof stream2._write == "function" && typeof stream2._writableState == "object";
|
|
22587
22580
|
}
|
|
22588
22581
|
|
|
22589
|
-
// ../../node_modules/.pnpm/tempy@3.
|
|
22590
|
-
var
|
|
22582
|
+
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
22583
|
+
var pipeline = promisify2(stream.pipeline), getPath = (prefix = "") => path.join(temp_dir_default, prefix + uniqueString());
|
|
22591
22584
|
async function runTask(temporaryPath, callback) {
|
|
22592
22585
|
try {
|
|
22593
22586
|
return await callback(temporaryPath);
|
|
22594
22587
|
} finally {
|
|
22595
|
-
await fsPromises.rm(temporaryPath, { recursive: !0, force: !0 });
|
|
22588
|
+
await fsPromises.rm(temporaryPath, { recursive: !0, force: !0, maxRetries: 2 });
|
|
22596
22589
|
}
|
|
22597
22590
|
}
|
|
22598
|
-
function
|
|
22591
|
+
function temporaryDirectory2({ prefix = "" } = {}) {
|
|
22599
22592
|
let directory = getPath(prefix);
|
|
22600
|
-
return
|
|
22593
|
+
return fs2.mkdirSync(directory), directory;
|
|
22601
22594
|
}
|
|
22602
|
-
var temporaryDirectoryTask = async (callback, options) => runTask(
|
|
22595
|
+
var temporaryDirectoryTask = async (callback, options) => runTask(temporaryDirectory2(options), callback);
|
|
22603
22596
|
|
|
22604
22597
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
22605
22598
|
init_cjs_shims();
|
|
@@ -22610,7 +22603,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
|
22610
22603
|
init_cjs_shims();
|
|
22611
22604
|
import process2 from "node:process";
|
|
22612
22605
|
import path2 from "node:path";
|
|
22613
|
-
import
|
|
22606
|
+
import fs3, { promises as fsPromises2 } from "node:fs";
|
|
22614
22607
|
import { fileURLToPath } from "node:url";
|
|
22615
22608
|
|
|
22616
22609
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
@@ -22730,11 +22723,11 @@ async function findUp(name, options = {}) {
|
|
|
22730
22723
|
return (await findUpMultiple(name, { ...options, limit: 1 }))[0];
|
|
22731
22724
|
}
|
|
22732
22725
|
|
|
22733
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22726
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js
|
|
22734
22727
|
init_cjs_shims();
|
|
22735
22728
|
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
22736
22729
|
|
|
22737
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22730
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
22738
22731
|
init_cjs_shims();
|
|
22739
22732
|
var assertValidPattern = (pattern) => {
|
|
22740
22733
|
if (typeof pattern != "string")
|
|
@@ -22743,10 +22736,10 @@ var assertValidPattern = (pattern) => {
|
|
|
22743
22736
|
throw new TypeError("pattern is too long");
|
|
22744
22737
|
};
|
|
22745
22738
|
|
|
22746
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22739
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/ast.js
|
|
22747
22740
|
init_cjs_shims();
|
|
22748
22741
|
|
|
22749
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22742
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/brace-expressions.js
|
|
22750
22743
|
init_cjs_shims();
|
|
22751
22744
|
var posixClasses = {
|
|
22752
22745
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
@@ -22817,11 +22810,11 @@ var posixClasses = {
|
|
|
22817
22810
|
return [ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs, uflag, endPos - pos, !0];
|
|
22818
22811
|
};
|
|
22819
22812
|
|
|
22820
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22813
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/unescape.js
|
|
22821
22814
|
init_cjs_shims();
|
|
22822
22815
|
var unescape2 = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
22823
22816
|
|
|
22824
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
22817
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/ast.js
|
|
22825
22818
|
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType = (c) => types.has(c), startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))", startNoDot = "(?!\\.)", addPatternStart = /* @__PURE__ */ new Set(["[", "."]), justDots = /* @__PURE__ */ new Set(["..", "."]), reSpecials = new Set("().*{}+?[]^$\\!"), regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), qmark = "[^/]", star = qmark + "*?", starNoEmpty = qmark + "+?", AST = class _AST {
|
|
22826
22819
|
type;
|
|
22827
22820
|
#root;
|
|
@@ -22996,6 +22989,9 @@ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType =
|
|
|
22996
22989
|
_glob: glob2
|
|
22997
22990
|
});
|
|
22998
22991
|
}
|
|
22992
|
+
get options() {
|
|
22993
|
+
return this.#options;
|
|
22994
|
+
}
|
|
22999
22995
|
// returns the string match, the regexp source, whether there's magic
|
|
23000
22996
|
// in the regexp (so a regular expression is required) and whether or
|
|
23001
22997
|
// not the uflag is needed for the regular expression (for posix classes)
|
|
@@ -23154,11 +23150,11 @@ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType =
|
|
|
23154
23150
|
}
|
|
23155
23151
|
};
|
|
23156
23152
|
|
|
23157
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
23153
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/escape.js
|
|
23158
23154
|
init_cjs_shims();
|
|
23159
23155
|
var escape = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
23160
23156
|
|
|
23161
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
23157
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js
|
|
23162
23158
|
var minimatch = (p, pattern, options = {}) => (assertValidPattern(pattern), !options.nocomment && pattern.charAt(0) === "#" ? !1 : new Minimatch(pattern, options).match(p)), starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/, starDotExtTest = (ext2) => (f) => !f.startsWith(".") && f.endsWith(ext2), starDotExtTestDot = (ext2) => (f) => f.endsWith(ext2), starDotExtTestNocase = (ext2) => (ext2 = ext2.toLowerCase(), (f) => !f.startsWith(".") && f.toLowerCase().endsWith(ext2)), starDotExtTestNocaseDot = (ext2) => (ext2 = ext2.toLowerCase(), (f) => f.toLowerCase().endsWith(ext2)), starDotStarRE = /^\*+\.\*+$/, starDotStarTest = (f) => !f.startsWith(".") && f.includes("."), starDotStarTestDot = (f) => f !== "." && f !== ".." && f.includes("."), dotStarRE = /^\.\*+$/, dotStarTest = (f) => f !== "." && f !== ".." && f.startsWith("."), starRE = /^\*+$/, starTest = (f) => f.length !== 0 && !f.startsWith("."), starTestDot = (f) => f.length !== 0 && f !== "." && f !== "..", qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/, qmarksTestNocase = ([$0, ext2 = ""]) => {
|
|
23163
23159
|
let noext = qmarksTestNoExt([$0]);
|
|
23164
23160
|
return ext2 ? (ext2 = ext2.toLowerCase(), (f) => noext(f) && f.toLowerCase().endsWith(ext2)) : noext;
|
|
@@ -23411,7 +23407,10 @@ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/, regExpEscape2 = (s) => s.replace(/[-[
|
|
|
23411
23407
|
for (let i = 0; i < globParts.length - 1; i++)
|
|
23412
23408
|
for (let j = i + 1; j < globParts.length; j++) {
|
|
23413
23409
|
let matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
23414
|
-
|
|
23410
|
+
if (matched) {
|
|
23411
|
+
globParts[i] = [], globParts[j] = matched;
|
|
23412
|
+
break;
|
|
23413
|
+
}
|
|
23415
23414
|
}
|
|
23416
23415
|
return globParts.filter((gs) => gs.length);
|
|
23417
23416
|
}
|
|
@@ -23513,7 +23512,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
23513
23512
|
let m, fastTest = null;
|
|
23514
23513
|
(m = pattern.match(starRE)) ? fastTest = options.dot ? starTestDot : starTest : (m = pattern.match(starDotExtRE)) ? fastTest = (options.nocase ? options.dot ? starDotExtTestNocaseDot : starDotExtTestNocase : options.dot ? starDotExtTestDot : starDotExtTest)(m[1]) : (m = pattern.match(qmarksRE)) ? fastTest = (options.nocase ? options.dot ? qmarksTestNocaseDot : qmarksTestNocase : options.dot ? qmarksTestDot : qmarksTest)(m) : (m = pattern.match(starDotStarRE)) ? fastTest = options.dot ? starDotStarTestDot : starDotStarTest : (m = pattern.match(dotStarRE)) && (fastTest = dotStarTest);
|
|
23515
23514
|
let re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
23516
|
-
return fastTest
|
|
23515
|
+
return fastTest && typeof re == "object" && Reflect.defineProperty(re, "test", { value: fastTest }), re;
|
|
23517
23516
|
}
|
|
23518
23517
|
makeRe() {
|
|
23519
23518
|
if (this.regexp || this.regexp === !1)
|
|
@@ -23580,9 +23579,13 @@ minimatch.unescape = unescape2;
|
|
|
23580
23579
|
// ../cli-kit/dist/public/node/fs.js
|
|
23581
23580
|
import { mkdirSync as fsMkdirSync, readFileSync as fsReadFileSync, writeFileSync as fsWriteFileSync, appendFileSync as fsAppendFileSync, statSync as fsStatSync, createReadStream as fsCreateReadStream, createWriteStream as fsCreateWriteStream, constants as fsConstants, existsSync as fsFileExistsSync, unlinkSync as fsUnlinkSync } from "fs";
|
|
23582
23581
|
import { mkdir as fsMkdir, writeFile as fsWriteFile, readFile as fsReadFile, realpath as fsRealPath, appendFile as fsAppendFile, mkdtemp as fsMkdtemp, stat as fsStat, lstat as fsLstat, chmod as fsChmod, access as fsAccess, rename as fsRename, unlink as fsUnlink } from "fs/promises";
|
|
23582
|
+
import * as os2 from "os";
|
|
23583
23583
|
async function inTemporaryDirectory(callback) {
|
|
23584
23584
|
return temporaryDirectoryTask(callback);
|
|
23585
23585
|
}
|
|
23586
|
+
function tempDirectory() {
|
|
23587
|
+
return temporaryDirectory2();
|
|
23588
|
+
}
|
|
23586
23589
|
async function readFile(path8, options = { encoding: "utf8" }) {
|
|
23587
23590
|
return outputDebug(outputContent`Reading the content of file at ${outputToken.path(path8)}...`), fsReadFile(path8, options);
|
|
23588
23591
|
}
|
|
@@ -23624,7 +23627,7 @@ async function renameFile(from, to) {
|
|
|
23624
23627
|
outputDebug(outputContent`Renaming file from ${outputToken.path(from)} to ${outputToken.path(to)}...`), await fsRename(from, to);
|
|
23625
23628
|
}
|
|
23626
23629
|
async function rmdir(path8, options = {}) {
|
|
23627
|
-
let { default: del } = await import("./del-
|
|
23630
|
+
let { default: del } = await import("./del-FBU5JYXS.js");
|
|
23628
23631
|
outputDebug(outputContent`Removing directory at ${outputToken.path(path8)}...`), await del(path8, { force: options.force });
|
|
23629
23632
|
}
|
|
23630
23633
|
async function isDirectory(path8) {
|
|
@@ -23686,9 +23689,23 @@ async function generateRandomNameForSubdirectory(options) {
|
|
|
23686
23689
|
return await fileExists(randomDirectoryPath) ? generateRandomNameForSubdirectory(options) : generated;
|
|
23687
23690
|
}
|
|
23688
23691
|
async function glob(pattern, options) {
|
|
23689
|
-
let { default: fastGlob } = await import("./out-
|
|
23692
|
+
let { default: fastGlob } = await import("./out-AZBX4ITJ.js"), overridenOptions = options;
|
|
23690
23693
|
return options?.dot == null && (overridenOptions = { ...options, dot: !0 }), fastGlob(pattern, overridenOptions);
|
|
23691
23694
|
}
|
|
23695
|
+
function detectEOL(content) {
|
|
23696
|
+
let match2 = content.match(/\r\n|\n/g);
|
|
23697
|
+
if (!match2)
|
|
23698
|
+
return defaultEOL();
|
|
23699
|
+
let crlf = match2.filter((eol) => eol === `\r
|
|
23700
|
+
`).length, lf = match2.filter((eol) => eol === `
|
|
23701
|
+
`).length;
|
|
23702
|
+
return crlf > lf ? `\r
|
|
23703
|
+
` : `
|
|
23704
|
+
`;
|
|
23705
|
+
}
|
|
23706
|
+
function defaultEOL() {
|
|
23707
|
+
return os2.EOL;
|
|
23708
|
+
}
|
|
23692
23709
|
async function findPathUp(matcher, options) {
|
|
23693
23710
|
let got = await findUp(matcher, options);
|
|
23694
23711
|
return got ? normalizePath(got) : void 0;
|
|
@@ -23703,16 +23720,16 @@ init_cjs_shims();
|
|
|
23703
23720
|
// ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
|
|
23704
23721
|
init_cjs_shims();
|
|
23705
23722
|
import path5 from "node:path";
|
|
23706
|
-
import
|
|
23723
|
+
import os3 from "node:os";
|
|
23707
23724
|
import process3 from "node:process";
|
|
23708
|
-
var homedir =
|
|
23725
|
+
var homedir = os3.homedir(), tmpdir2 = os3.tmpdir(), { env } = process3, macos = (name) => {
|
|
23709
23726
|
let library = path5.join(homedir, "Library");
|
|
23710
23727
|
return {
|
|
23711
23728
|
data: path5.join(library, "Application Support", name),
|
|
23712
23729
|
config: path5.join(library, "Preferences", name),
|
|
23713
23730
|
cache: path5.join(library, "Caches", name),
|
|
23714
23731
|
log: path5.join(library, "Logs", name),
|
|
23715
|
-
temp: path5.join(
|
|
23732
|
+
temp: path5.join(tmpdir2, name)
|
|
23716
23733
|
};
|
|
23717
23734
|
}, windows = (name) => {
|
|
23718
23735
|
let appData = env.APPDATA || path5.join(homedir, "AppData", "Roaming"), localAppData = env.LOCALAPPDATA || path5.join(homedir, "AppData", "Local");
|
|
@@ -23722,7 +23739,7 @@ var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process3, macos = (n
|
|
|
23722
23739
|
config: path5.join(appData, name, "Config"),
|
|
23723
23740
|
cache: path5.join(localAppData, name, "Cache"),
|
|
23724
23741
|
log: path5.join(localAppData, name, "Log"),
|
|
23725
|
-
temp: path5.join(
|
|
23742
|
+
temp: path5.join(tmpdir2, name)
|
|
23726
23743
|
};
|
|
23727
23744
|
}, linux = (name) => {
|
|
23728
23745
|
let username = path5.basename(homedir);
|
|
@@ -23732,7 +23749,7 @@ var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process3, macos = (n
|
|
|
23732
23749
|
cache: path5.join(env.XDG_CACHE_HOME || path5.join(homedir, ".cache"), name),
|
|
23733
23750
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
23734
23751
|
log: path5.join(env.XDG_STATE_HOME || path5.join(homedir, ".local", "state"), name),
|
|
23735
|
-
temp: path5.join(
|
|
23752
|
+
temp: path5.join(tmpdir2, username, name)
|
|
23736
23753
|
};
|
|
23737
23754
|
};
|
|
23738
23755
|
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
@@ -23774,8 +23791,7 @@ var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ?
|
|
|
23774
23791
|
refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
|
|
23775
23792
|
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
23776
23793
|
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
23777
|
-
json: "SHOPIFY_FLAG_JSON"
|
|
23778
|
-
useAppManagement: "USE_APP_MANAGEMENT_API"
|
|
23794
|
+
json: "SHOPIFY_FLAG_JSON"
|
|
23779
23795
|
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
23780
23796
|
backendPort: "BACKEND_PORT"
|
|
23781
23797
|
}, pathConstants = {
|
|
@@ -24387,7 +24403,7 @@ var aliases = ["stdin", "stdout", "stderr"], hasAlias = (options) => aliases.som
|
|
|
24387
24403
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js
|
|
24388
24404
|
init_cjs_shims();
|
|
24389
24405
|
var import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
24390
|
-
import
|
|
24406
|
+
import os4 from "node:os";
|
|
24391
24407
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5, spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
24392
24408
|
let killResult = kill(signal);
|
|
24393
24409
|
return setKillTimeout(kill, signal, options, killResult), killResult;
|
|
@@ -24398,7 +24414,7 @@ var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5, spawnedKill = (kill, signal = "SIGTERM
|
|
|
24398
24414
|
kill("SIGKILL");
|
|
24399
24415
|
}, timeout);
|
|
24400
24416
|
t.unref && t.unref();
|
|
24401
|
-
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== !1 && killResult, isSigterm = (signal) => signal ===
|
|
24417
|
+
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== !1 && killResult, isSigterm = (signal) => signal === os4.constants.signals.SIGTERM || typeof signal == "string" && signal.toUpperCase() === "SIGTERM", getForceKillAfterTimeout = ({ forceKillAfterTimeout = !0 }) => {
|
|
24402
24418
|
if (forceKillAfterTimeout === !0)
|
|
24403
24419
|
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
24404
24420
|
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0)
|
|
@@ -24950,6 +24966,50 @@ function getCIMetadata(envName, envs) {
|
|
|
24950
24966
|
}
|
|
24951
24967
|
}
|
|
24952
24968
|
|
|
24969
|
+
// ../cli-kit/dist/public/node/environment.js
|
|
24970
|
+
init_cjs_shims();
|
|
24971
|
+
|
|
24972
|
+
// ../cli-kit/dist/public/node/crypto.js
|
|
24973
|
+
init_cjs_shims();
|
|
24974
|
+
import crypto2 from "crypto";
|
|
24975
|
+
function hashString(str) {
|
|
24976
|
+
return crypto2.createHash("sha1").update(str).digest("hex");
|
|
24977
|
+
}
|
|
24978
|
+
function fileHash(buff) {
|
|
24979
|
+
return crypto2.createHash("md5").update(buff).digest("hex");
|
|
24980
|
+
}
|
|
24981
|
+
function randomUUID() {
|
|
24982
|
+
return crypto2.randomUUID();
|
|
24983
|
+
}
|
|
24984
|
+
function nonRandomUUID(subject) {
|
|
24985
|
+
return crypto2.createHash("sha1").update(Buffer.from("6ba7b810-9dad-11d1-80b4-00c04fd430c8".replace(/-/g, ""), "hex")).update(subject).digest().toString("hex").replace(/(.{8})(.{4})(.{4})(.{4})(.{12})/, "$1-$2-$3-$4-$5");
|
|
24986
|
+
}
|
|
24987
|
+
|
|
24988
|
+
// ../cli-kit/dist/public/node/environment.js
|
|
24989
|
+
function getEnvironmentVariables() {
|
|
24990
|
+
return process.env;
|
|
24991
|
+
}
|
|
24992
|
+
function getPartnersToken() {
|
|
24993
|
+
return getEnvironmentVariables()[environmentVariables.partnersToken];
|
|
24994
|
+
}
|
|
24995
|
+
function getBackendPort() {
|
|
24996
|
+
let backendPort = getEnvironmentVariables()[systemEnvironmentVariables.backendPort];
|
|
24997
|
+
if (backendPort && !isNaN(Number(backendPort)))
|
|
24998
|
+
return Number(backendPort);
|
|
24999
|
+
}
|
|
25000
|
+
function getIdentityTokenInformation() {
|
|
25001
|
+
let identityToken = getEnvironmentVariables()[environmentVariables.identityToken], refreshToken = getEnvironmentVariables()[environmentVariables.refreshToken];
|
|
25002
|
+
if (!(!identityToken || !refreshToken))
|
|
25003
|
+
return {
|
|
25004
|
+
accessToken: identityToken,
|
|
25005
|
+
refreshToken,
|
|
25006
|
+
userId: nonRandomUUID(identityToken)
|
|
25007
|
+
};
|
|
25008
|
+
}
|
|
25009
|
+
function jsonOutputEnabled(environment = getEnvironmentVariables()) {
|
|
25010
|
+
return sniffForJson() || isTruthy(environment[environmentVariables.json]);
|
|
25011
|
+
}
|
|
25012
|
+
|
|
24953
25013
|
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
24954
25014
|
init_cjs_shims();
|
|
24955
25015
|
function isInteractive({ stream: stream2 = process.stdout } = {}) {
|
|
@@ -24971,8 +25031,8 @@ function isDevelopment(env3 = process.env) {
|
|
|
24971
25031
|
function isVerbose(env3 = process.env) {
|
|
24972
25032
|
return isTruthy(env3[environmentVariables.verbose]) || process.argv.includes("--verbose");
|
|
24973
25033
|
}
|
|
24974
|
-
function
|
|
24975
|
-
return
|
|
25034
|
+
function isAppManagementDisabled() {
|
|
25035
|
+
return !!getPartnersToken();
|
|
24976
25036
|
}
|
|
24977
25037
|
async function isShopify(env3 = process.env) {
|
|
24978
25038
|
return Object.prototype.hasOwnProperty.call(env3, environmentVariables.runAsUser) ? !isTruthy(env3[environmentVariables.runAsUser]) : await fileExists(pathConstants.executables.dev) || isSpin(env3);
|
|
@@ -25092,10 +25152,10 @@ function inferPackageManagerForGlobalCLI(argv = process.argv) {
|
|
|
25092
25152
|
// ../cli-kit/dist/public/node/colors.js
|
|
25093
25153
|
init_cjs_shims();
|
|
25094
25154
|
|
|
25095
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
25155
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
|
|
25096
25156
|
init_cjs_shims();
|
|
25097
25157
|
|
|
25098
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
25158
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
25099
25159
|
init_cjs_shims();
|
|
25100
25160
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles = {
|
|
25101
25161
|
modifier: {
|
|
@@ -25236,10 +25296,10 @@ function assembleStyles() {
|
|
|
25236
25296
|
}
|
|
25237
25297
|
var ansiStyles = assembleStyles(), ansi_styles_default = ansiStyles;
|
|
25238
25298
|
|
|
25239
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
25299
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
25240
25300
|
init_cjs_shims();
|
|
25241
25301
|
import process8 from "node:process";
|
|
25242
|
-
import
|
|
25302
|
+
import os5 from "node:os";
|
|
25243
25303
|
import tty from "node:tty";
|
|
25244
25304
|
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process8.argv) {
|
|
25245
25305
|
let prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--", position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf("--");
|
|
@@ -25279,11 +25339,11 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
|
25279
25339
|
if (env2.TERM === "dumb")
|
|
25280
25340
|
return min;
|
|
25281
25341
|
if (process8.platform === "win32") {
|
|
25282
|
-
let osRelease =
|
|
25342
|
+
let osRelease = os5.release().split(".");
|
|
25283
25343
|
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
|
|
25284
25344
|
}
|
|
25285
25345
|
if ("CI" in env2)
|
|
25286
|
-
return "GITHUB_ACTIONS"
|
|
25346
|
+
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship" ? 1 : min;
|
|
25287
25347
|
if ("TEAMCITY_VERSION" in env2)
|
|
25288
25348
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
25289
25349
|
if (env2.COLORTERM === "truecolor" || env2.TERM === "xterm-kitty")
|
|
@@ -25311,7 +25371,7 @@ var supportsColor = {
|
|
|
25311
25371
|
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
25312
25372
|
}, supports_color_default = supportsColor;
|
|
25313
25373
|
|
|
25314
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
25374
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
|
|
25315
25375
|
init_cjs_shims();
|
|
25316
25376
|
function stringReplaceAll(string, substring, replacer) {
|
|
25317
25377
|
let index = string.indexOf(substring);
|
|
@@ -25335,7 +25395,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
25335
25395
|
return returnValue += string.slice(endIndex), returnValue;
|
|
25336
25396
|
}
|
|
25337
25397
|
|
|
25338
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
25398
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
|
|
25339
25399
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default, GENERATOR = Symbol("GENERATOR"), STYLER = Symbol("STYLER"), IS_EMPTY = Symbol("IS_EMPTY"), levelMapping = [
|
|
25340
25400
|
"ansi",
|
|
25341
25401
|
"ansi",
|
|
@@ -25646,7 +25706,7 @@ init_cjs_shims();
|
|
|
25646
25706
|
var import_react10 = __toESM(require_react(), 1), import_throttle = __toESM(require_throttle(), 1);
|
|
25647
25707
|
import process17 from "node:process";
|
|
25648
25708
|
|
|
25649
|
-
// ../../node_modules/.pnpm/ansi-escapes@6.2.
|
|
25709
|
+
// ../../node_modules/.pnpm/ansi-escapes@6.2.1/node_modules/ansi-escapes/index.js
|
|
25650
25710
|
init_cjs_shims();
|
|
25651
25711
|
import process9 from "node:process";
|
|
25652
25712
|
var ESC2 = "\x1B[", OSC2 = "\x1B]", BEL2 = "\x07", SEP2 = ";", isBrowser = typeof window < "u" && typeof window.document < "u", isTerminalApp2 = !isBrowser && process9.env.TERM_PROGRAM === "Apple_Terminal", isWindows = !isBrowser && process9.platform === "win32", cwdFunction = isBrowser ? () => {
|
|
@@ -26655,7 +26715,7 @@ var Yoga = await initYoga(await E(_(import.meta.url).resolve("./yoga.wasm")));
|
|
|
26655
26715
|
|
|
26656
26716
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/reconciler.js
|
|
26657
26717
|
init_cjs_shims();
|
|
26658
|
-
var import_react_reconciler = __toESM(require_react_reconciler(), 1),
|
|
26718
|
+
var import_react_reconciler = __toESM(require_react_reconciler(), 1), import_constants5 = __toESM(require_constants(), 1);
|
|
26659
26719
|
import process10 from "node:process";
|
|
26660
26720
|
|
|
26661
26721
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/dom.js
|
|
@@ -27200,7 +27260,7 @@ var applyPositionStyles = (node, style) => {
|
|
|
27200
27260
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/reconciler.js
|
|
27201
27261
|
if (process10.env.DEV === "true")
|
|
27202
27262
|
try {
|
|
27203
|
-
await import("./devtools-
|
|
27263
|
+
await import("./devtools-6LOQORRT.js");
|
|
27204
27264
|
} catch (error) {
|
|
27205
27265
|
if (error.code === "MODULE_NOT_FOUND")
|
|
27206
27266
|
console.warn(`
|
|
@@ -27300,7 +27360,7 @@ var diff = (before, after) => {
|
|
|
27300
27360
|
scheduleTimeout: setTimeout,
|
|
27301
27361
|
cancelTimeout: clearTimeout,
|
|
27302
27362
|
noTimeout: -1,
|
|
27303
|
-
getCurrentEventPriority: () =>
|
|
27363
|
+
getCurrentEventPriority: () => import_constants5.DefaultEventPriority,
|
|
27304
27364
|
beforeActiveInstanceBlur() {
|
|
27305
27365
|
},
|
|
27306
27366
|
afterActiveInstanceBlur() {
|
|
@@ -27988,7 +28048,7 @@ var FocusContext_default = FocusContext;
|
|
|
27988
28048
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/components/ErrorOverview.js
|
|
27989
28049
|
init_cjs_shims();
|
|
27990
28050
|
var import_react8 = __toESM(require_react(), 1), import_stack_utils = __toESM(require_stack_utils(), 1);
|
|
27991
|
-
import * as
|
|
28051
|
+
import * as fs4 from "node:fs";
|
|
27992
28052
|
import { cwd as cwd2 } from "node:process";
|
|
27993
28053
|
|
|
27994
28054
|
// ../../node_modules/.pnpm/code-excerpt@4.0.0/node_modules/code-excerpt/dist/index.js
|
|
@@ -28049,8 +28109,8 @@ var cleanupPath = (path8) => path8?.replace(`file://${cwd2()}/`, ""), stackUtils
|
|
|
28049
28109
|
function ErrorOverview({ error }) {
|
|
28050
28110
|
let stack = error.stack ? error.stack.split(`
|
|
28051
28111
|
`).slice(1) : void 0, origin = stack ? stackUtils.parseLine(stack[0]) : void 0, filePath = cleanupPath(origin?.file), excerpt, lineWidth = 0;
|
|
28052
|
-
if (filePath && origin?.line &&
|
|
28053
|
-
let sourceCode =
|
|
28112
|
+
if (filePath && origin?.line && fs4.existsSync(filePath)) {
|
|
28113
|
+
let sourceCode = fs4.readFileSync(filePath, "utf8");
|
|
28054
28114
|
if (excerpt = dist_default3(sourceCode, origin.line), excerpt)
|
|
28055
28115
|
for (let { line } of excerpt)
|
|
28056
28116
|
lineWidth = Math.max(lineWidth, String(line).length);
|
|
@@ -29209,13 +29269,16 @@ function itemToString(item) {
|
|
|
29209
29269
|
return tokenItemToString(item);
|
|
29210
29270
|
}
|
|
29211
29271
|
function consoleLog(message) {
|
|
29212
|
-
|
|
29272
|
+
process.stdout.write(`${withOrWithoutStyle(message)}
|
|
29273
|
+
`);
|
|
29213
29274
|
}
|
|
29214
29275
|
function consoleError(message) {
|
|
29215
|
-
|
|
29276
|
+
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
29277
|
+
`);
|
|
29216
29278
|
}
|
|
29217
29279
|
function consoleWarn(message) {
|
|
29218
|
-
|
|
29280
|
+
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
29281
|
+
`);
|
|
29219
29282
|
}
|
|
29220
29283
|
function outputWhereAppropriate(logLevel, logger, message) {
|
|
29221
29284
|
shouldOutput(logLevel) && (logger instanceof Writable ? logger.write(message) : logger(message, logLevel));
|
|
@@ -29364,7 +29427,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
29364
29427
|
try {
|
|
29365
29428
|
await getAndSet();
|
|
29366
29429
|
} catch (error) {
|
|
29367
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
29430
|
+
let { sendErrorToBugsnag } = await import("./error-handler-YRN4E6SY.js");
|
|
29368
29431
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
29369
29432
|
}
|
|
29370
29433
|
}, durationStack = [];
|
|
@@ -29382,7 +29445,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
29382
29445
|
let end = performance2.now();
|
|
29383
29446
|
end = Math.max(start, end);
|
|
29384
29447
|
let wallClockDuration = Math.max(end - start, 0), childDurations = durationStack.pop(), duration = Math.max(wallClockDuration - childDurations, 0);
|
|
29385
|
-
durationStack.length > 0 && (durationStack[durationStack.length - 1]
|
|
29448
|
+
durationStack.length > 0 && (durationStack[durationStack.length - 1] = (durationStack[durationStack.length - 1] ?? 0) + wallClockDuration), performance2.measure(`${field}#measurable`, {
|
|
29386
29449
|
start,
|
|
29387
29450
|
duration
|
|
29388
29451
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -29909,29 +29972,42 @@ var Footnotes = () => {
|
|
|
29909
29972
|
);
|
|
29910
29973
|
}, Banner = ({ children, ...props }) => props.type === "external_error" ? import_react32.default.createElement(BoxWithTopBottomLines, props, children) : import_react32.default.createElement(BoxWithBorder, props, children);
|
|
29911
29974
|
|
|
29975
|
+
// ../cli-kit/dist/private/node/ui/components/TabularData.js
|
|
29976
|
+
init_cjs_shims();
|
|
29977
|
+
var import_react33 = __toESM(require_react(), 1), TabularData = ({ tabularData: data, firstColumnSubdued }) => {
|
|
29978
|
+
let columnWidths = data.reduce((acc, row) => (row.forEach((cell, index) => {
|
|
29979
|
+
acc[index] = Math.max(acc[index] ?? 0, unstyled(tokenItemToString(cell)).length);
|
|
29980
|
+
}), acc), []);
|
|
29981
|
+
return import_react33.default.createElement(Box_default, { flexDirection: "column" }, data.map((row, index) => import_react33.default.createElement(Box_default, { key: index, flexDirection: "row", gap: 2 }, row.map((cell, index2) => import_react33.default.createElement(
|
|
29982
|
+
Box_default,
|
|
29983
|
+
{ key: index2, width: columnWidths[index2] ?? 0, flexShrink: index2 === 0 ? 0 : 1 },
|
|
29984
|
+
import_react33.default.createElement(TokenizedText, { item: index2 === 0 && firstColumnSubdued && typeof cell == "string" ? { subdued: cell } : cell })
|
|
29985
|
+
)))));
|
|
29986
|
+
};
|
|
29987
|
+
|
|
29912
29988
|
// ../cli-kit/dist/private/node/ui/components/Alert.js
|
|
29913
|
-
var
|
|
29989
|
+
var import_react34 = __toESM(require_react(), 1), Alert = ({ type, headline, body, nextSteps, reference, link: link2, customSections, orderedNextSteps = !1 }) => import_react34.default.createElement(
|
|
29914
29990
|
Banner,
|
|
29915
29991
|
{ type },
|
|
29916
|
-
headline ?
|
|
29992
|
+
headline ? import_react34.default.createElement(
|
|
29917
29993
|
Text,
|
|
29918
29994
|
{ bold: !0 },
|
|
29919
|
-
|
|
29995
|
+
import_react34.default.createElement(TokenizedText, { item: headline })
|
|
29920
29996
|
) : null,
|
|
29921
|
-
body ?
|
|
29922
|
-
nextSteps && nextSteps.length > 0 ?
|
|
29923
|
-
reference && reference.length > 0 ?
|
|
29924
|
-
link2 ?
|
|
29925
|
-
customSections && customSections.length > 0 ?
|
|
29997
|
+
body ? import_react34.default.createElement(TokenizedText, { item: body }) : null,
|
|
29998
|
+
nextSteps && nextSteps.length > 0 ? import_react34.default.createElement(List, { title: "Next steps", items: nextSteps, ordered: orderedNextSteps }) : null,
|
|
29999
|
+
reference && reference.length > 0 ? import_react34.default.createElement(List, { title: "Reference", items: reference }) : null,
|
|
30000
|
+
link2 ? import_react34.default.createElement(Link, { url: link2.url, label: link2.label }) : null,
|
|
30001
|
+
customSections && customSections.length > 0 ? import_react34.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, customSections.map((section, index) => import_react34.default.createElement(
|
|
29926
30002
|
Box_default,
|
|
29927
30003
|
{ key: index, flexDirection: "column" },
|
|
29928
|
-
section.title ?
|
|
29929
|
-
|
|
30004
|
+
section.title ? import_react34.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
30005
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react34.default.createElement(TabularData, { ...section.body }) : import_react34.default.createElement(TokenizedText, { item: section.body })
|
|
29930
30006
|
))) : null
|
|
29931
30007
|
);
|
|
29932
30008
|
|
|
29933
30009
|
// ../cli-kit/dist/private/node/ui/alert.js
|
|
29934
|
-
var
|
|
30010
|
+
var import_react35 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
29935
30011
|
info: "info",
|
|
29936
30012
|
warning: "warn",
|
|
29937
30013
|
success: "info",
|
|
@@ -29944,54 +30020,54 @@ var import_react34 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
|
29944
30020
|
};
|
|
29945
30021
|
function alert({ type, headline, body, nextSteps, reference, link: link2, customSections, orderedNextSteps = !1, renderOptions }) {
|
|
29946
30022
|
let { type: alertType, ..._eventProps } = arguments[0];
|
|
29947
|
-
return renderOnce(
|
|
30023
|
+
return renderOnce(import_react35.default.createElement(Alert, { type, headline, body, nextSteps, reference, link: link2, orderedNextSteps, customSections }), { logLevel: typeToLogLevel[type], logger: typeToLogger[type], renderOptions });
|
|
29948
30024
|
}
|
|
29949
30025
|
|
|
29950
30026
|
// ../cli-kit/dist/private/node/ui/components/FatalError.js
|
|
29951
30027
|
init_cjs_shims();
|
|
29952
|
-
var
|
|
30028
|
+
var import_react36 = __toESM(require_react(), 1), import_stacktracey = __toESM(require_stacktracey(), 1), FatalError2 = ({ error }) => {
|
|
29953
30029
|
let stack, tool;
|
|
29954
30030
|
return error instanceof BugError && (stack = new import_stacktracey.default(error), stack.items.forEach((item) => {
|
|
29955
30031
|
item.file = cleanSingleStackTracePath(item.file);
|
|
29956
30032
|
}), stack = stack.withSources(), stack = stack.filter((entry) => !entry.file.includes("@oclif/core")).map((item) => {
|
|
29957
30033
|
let fileShortComponents = item.fileShort.split("packages/");
|
|
29958
30034
|
return item.fileShort = fileShortComponents.length === 2 ? fileShortComponents[1] : fileShortComponents[0], item;
|
|
29959
|
-
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`),
|
|
30035
|
+
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`), import_react36.default.createElement(
|
|
29960
30036
|
Banner,
|
|
29961
30037
|
{ type: tool ? "external_error" : "error" },
|
|
29962
|
-
tool ?
|
|
30038
|
+
tool ? import_react36.default.createElement(
|
|
29963
30039
|
Text,
|
|
29964
30040
|
null,
|
|
29965
30041
|
"Error coming from ",
|
|
29966
|
-
|
|
30042
|
+
import_react36.default.createElement(Command, { command: tool })
|
|
29967
30043
|
) : null,
|
|
29968
|
-
error.formattedMessage ?
|
|
29969
|
-
error.tryMessage ?
|
|
29970
|
-
error.nextSteps && error.nextSteps.length > 0 ?
|
|
29971
|
-
error.customSections && error.customSections.length > 0 ?
|
|
30044
|
+
error.formattedMessage ? import_react36.default.createElement(TokenizedText, { item: error.formattedMessage }) : import_react36.default.createElement(Text, null, error.message),
|
|
30045
|
+
error.tryMessage ? import_react36.default.createElement(TokenizedText, { item: error.tryMessage }) : null,
|
|
30046
|
+
error.nextSteps && error.nextSteps.length > 0 ? import_react36.default.createElement(List, { title: "Next steps", items: error.nextSteps }) : null,
|
|
30047
|
+
error.customSections && error.customSections.length > 0 ? import_react36.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, error.customSections.map((section, index) => import_react36.default.createElement(
|
|
29972
30048
|
Box_default,
|
|
29973
30049
|
{ key: index, flexDirection: "column" },
|
|
29974
|
-
section.title ?
|
|
29975
|
-
|
|
30050
|
+
section.title ? import_react36.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
30051
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react36.default.createElement(TabularData, { ...section.body }) : import_react36.default.createElement(TokenizedText, { item: section.body })
|
|
29976
30052
|
))) : null,
|
|
29977
|
-
stack && stack.items.length !== 0 ?
|
|
30053
|
+
stack && stack.items.length !== 0 ? import_react36.default.createElement(
|
|
29978
30054
|
Box_default,
|
|
29979
30055
|
{ flexDirection: "column" },
|
|
29980
|
-
|
|
29981
|
-
stack.items.map((item, index) =>
|
|
30056
|
+
import_react36.default.createElement(Text, null, "To investigate the issue, examine this stack trace:"),
|
|
30057
|
+
stack.items.map((item, index) => import_react36.default.createElement(
|
|
29982
30058
|
Box_default,
|
|
29983
30059
|
{ flexDirection: "column", key: index, paddingLeft: 2 },
|
|
29984
|
-
|
|
30060
|
+
import_react36.default.createElement(
|
|
29985
30061
|
Text,
|
|
29986
30062
|
null,
|
|
29987
30063
|
"at",
|
|
29988
|
-
item.calleeShort ?
|
|
30064
|
+
item.calleeShort ? import_react36.default.createElement(Text, { color: "yellow" }, ` ${item.calleeShort}`) : null,
|
|
29989
30065
|
item.fileShort ? ` (${item.fileShort}:${item.line})` : null
|
|
29990
30066
|
),
|
|
29991
|
-
|
|
30067
|
+
import_react36.default.createElement(
|
|
29992
30068
|
Box_default,
|
|
29993
30069
|
{ paddingLeft: 2 },
|
|
29994
|
-
|
|
30070
|
+
import_react36.default.createElement(Text, { dimColor: !0 }, item.sourceLine?.trim())
|
|
29995
30071
|
)
|
|
29996
30072
|
))
|
|
29997
30073
|
) : null
|
|
@@ -30003,13 +30079,13 @@ init_cjs_shims();
|
|
|
30003
30079
|
|
|
30004
30080
|
// ../cli-kit/dist/private/node/ui/components/Table/Row.js
|
|
30005
30081
|
init_cjs_shims();
|
|
30006
|
-
var
|
|
30082
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
30007
30083
|
function join(elements, separator) {
|
|
30008
30084
|
return elements.reduce((elements2, element, index) => elements2.length === 0 ? [element] : [...elements2, separator(index), element], []);
|
|
30009
30085
|
}
|
|
30010
|
-
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) =>
|
|
30086
|
+
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_react37.default.createElement(Box_default, { flexDirection: "row" }, ...join(columns.map((column2) => {
|
|
30011
30087
|
let content = data[column2.name], key = `${rowKey}-cell-${column2.name.toString()}`, marginRight = column2.width - unstyled(String(content ?? "")).length;
|
|
30012
|
-
return
|
|
30088
|
+
return import_react37.default.createElement(
|
|
30013
30089
|
Text,
|
|
30014
30090
|
{ key, color: ignoreColumnColor ? void 0 : column2.color },
|
|
30015
30091
|
content,
|
|
@@ -30017,11 +30093,11 @@ var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_r
|
|
|
30017
30093
|
);
|
|
30018
30094
|
}), (index) => {
|
|
30019
30095
|
let key = `${rowKey}-horizontal-separator-${index}`;
|
|
30020
|
-
return
|
|
30096
|
+
return import_react37.default.createElement(Text, { key }, " ");
|
|
30021
30097
|
}));
|
|
30022
30098
|
|
|
30023
30099
|
// ../cli-kit/dist/private/node/ui/components/Table/Table.js
|
|
30024
|
-
var
|
|
30100
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
30025
30101
|
function Table({ rows, columns: columnsConfiguration }) {
|
|
30026
30102
|
let columns = Object.entries(columnsConfiguration).map(([key, { header, color }]) => {
|
|
30027
30103
|
let headerWidth = String(header || key).length, columnWidths = rows.map((row) => {
|
|
@@ -30034,17 +30110,17 @@ function Table({ rows, columns: columnsConfiguration }) {
|
|
|
30034
30110
|
color
|
|
30035
30111
|
};
|
|
30036
30112
|
}), headings = Object.entries(columnsConfiguration).reduce((headings2, [column2, { header }]) => ({ ...headings2, [column2]: header || column2 }), {});
|
|
30037
|
-
return
|
|
30113
|
+
return import_react38.default.createElement(
|
|
30038
30114
|
Box_default,
|
|
30039
30115
|
{ flexDirection: "column" },
|
|
30040
|
-
|
|
30041
|
-
|
|
30116
|
+
import_react38.default.createElement(Row, { rowKey: "heading", fillerChar: " ", columns, data: headings, ignoreColumnColor: !0 }),
|
|
30117
|
+
import_react38.default.createElement(Row, { rowKey: "separator", fillerChar: "\u2500", columns, data: {}, ignoreColumnColor: !0 }),
|
|
30042
30118
|
rows.map((row, index) => {
|
|
30043
30119
|
let key = `row-${index}`;
|
|
30044
|
-
return
|
|
30120
|
+
return import_react38.default.createElement(
|
|
30045
30121
|
Box_default,
|
|
30046
30122
|
{ flexDirection: "column", key },
|
|
30047
|
-
|
|
30123
|
+
import_react38.default.createElement(Row, { rowKey: `data-${key}`, fillerChar: " ", columns, data: row })
|
|
30048
30124
|
);
|
|
30049
30125
|
})
|
|
30050
30126
|
);
|
|
@@ -30055,17 +30131,17 @@ init_cjs_shims();
|
|
|
30055
30131
|
|
|
30056
30132
|
// ../cli-kit/dist/private/node/ui/components/TextInput.js
|
|
30057
30133
|
init_cjs_shims();
|
|
30058
|
-
var
|
|
30134
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
30059
30135
|
var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholder = "", noColor = !shouldDisplayColors(), color = noColor ? void 0 : "cyan", password = !1, focus = !0 }) => {
|
|
30060
|
-
let [cursorOffset, setCursorOffset] = (0,
|
|
30061
|
-
(0,
|
|
30136
|
+
let [cursorOffset, setCursorOffset] = (0, import_react39.useState)((originalValue || "").length);
|
|
30137
|
+
(0, import_react39.useEffect)(() => {
|
|
30062
30138
|
setCursorOffset((previousOffset) => {
|
|
30063
30139
|
let newValue = originalValue || "";
|
|
30064
30140
|
return previousOffset > newValue.length - 1 ? newValue.length : previousOffset;
|
|
30065
30141
|
});
|
|
30066
30142
|
}, [originalValue]);
|
|
30067
|
-
let value = password ? "*".repeat(originalValue.length) : originalValue, renderedValue, renderPlaceholder = (value2) => source_default.inverse(value2[0]) + source_default.dim(value2.slice(1)), cursorChar = figures_default.square, defaultCursor =
|
|
30068
|
-
return renderedValue = value.split("").map((char, index) => index === cursorOffset ? noColor ? cursorChar : source_default.inverse(char) : char).join(""), cursorOffset === value.length && (renderedValue =
|
|
30143
|
+
let value = password ? "*".repeat(originalValue.length) : originalValue, renderedValue, renderPlaceholder = (value2) => source_default.inverse(value2[0]) + source_default.dim(value2.slice(1)), cursorChar = figures_default.square, defaultCursor = import_react39.default.createElement(Text, { backgroundColor: color }, cursorChar), placeholderText = defaultValue.length > 0 ? defaultValue : placeholder.length > 0 ? placeholder : "", renderedPlaceholder = placeholderText.length > 0 ? renderPlaceholder(placeholderText) : defaultCursor;
|
|
30144
|
+
return renderedValue = value.split("").map((char, index) => index === cursorOffset ? noColor ? cursorChar : source_default.inverse(char) : char).join(""), cursorOffset === value.length && (renderedValue = import_react39.default.createElement(
|
|
30069
30145
|
Text,
|
|
30070
30146
|
null,
|
|
30071
30147
|
renderedValue,
|
|
@@ -30079,12 +30155,12 @@ var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholde
|
|
|
30079
30155
|
}
|
|
30080
30156
|
let nextCursorOffset = cursorOffset, nextValue = originalValue;
|
|
30081
30157
|
key.leftArrow ? cursorOffset > 0 && nextCursorOffset-- : key.rightArrow ? cursorOffset < originalValue.length && nextCursorOffset++ : key.backspace || key.delete ? cursorOffset > 0 && (nextValue = originalValue.slice(0, cursorOffset - 1) + originalValue.slice(cursorOffset, originalValue.length), nextCursorOffset--) : (nextValue = originalValue.slice(0, cursorOffset) + input + originalValue.slice(cursorOffset, originalValue.length), nextCursorOffset += input.length), setCursorOffset(nextCursorOffset), nextValue !== originalValue && onChange(nextValue);
|
|
30082
|
-
}, { isActive: focus }),
|
|
30158
|
+
}, { isActive: focus }), import_react39.default.createElement(Text, { color }, value.length > 0 ? renderedValue : renderedPlaceholder);
|
|
30083
30159
|
};
|
|
30084
30160
|
|
|
30085
30161
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
|
|
30086
30162
|
init_cjs_shims();
|
|
30087
|
-
var
|
|
30163
|
+
var import_react40 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
30088
30164
|
let sections = Array.isArray(table) ? table : Object.keys(table).map((header) => ({
|
|
30089
30165
|
header,
|
|
30090
30166
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -30095,23 +30171,23 @@ var import_react39 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
|
30095
30171
|
emptyItemsText: void 0
|
|
30096
30172
|
})), headerColumnWidth = Math.max(...sections.map((section) => Math.max(...section.header.split(`
|
|
30097
30173
|
`).map((line) => line.length))));
|
|
30098
|
-
return
|
|
30174
|
+
return import_react40.default.createElement(Box_default, { flexDirection: "column" }, sections.map((section, index) => import_react40.default.createElement(
|
|
30099
30175
|
Box_default,
|
|
30100
30176
|
{ key: index, marginBottom: index === sections.length - 1 ? 0 : 1, flexDirection: "column" },
|
|
30101
|
-
section.header.length > 0 &&
|
|
30177
|
+
section.header.length > 0 && import_react40.default.createElement(
|
|
30102
30178
|
Box_default,
|
|
30103
30179
|
{ width: headerColumnWidth + 1 },
|
|
30104
|
-
|
|
30180
|
+
import_react40.default.createElement(Text, { color: section.color, bold: !0 }, capitalize(section.header))
|
|
30105
30181
|
),
|
|
30106
|
-
|
|
30182
|
+
import_react40.default.createElement(
|
|
30107
30183
|
Box_default,
|
|
30108
30184
|
{ flexGrow: 1, flexDirection: "column", gap: 1 },
|
|
30109
|
-
section.emptyItemsText && section.items.length === 0 ?
|
|
30185
|
+
section.emptyItemsText && section.items.length === 0 ? import_react40.default.createElement(
|
|
30110
30186
|
Text,
|
|
30111
30187
|
{ color: section.color },
|
|
30112
|
-
|
|
30113
|
-
) :
|
|
30114
|
-
section.helperText ?
|
|
30188
|
+
import_react40.default.createElement(TokenizedText, { item: { subdued: section.emptyItemsText } })
|
|
30189
|
+
) : import_react40.default.createElement(List, { margin: !1, items: section.items, color: section.color, bullet: section.bullet }),
|
|
30190
|
+
section.helperText ? import_react40.default.createElement(Text, { color: section.color }, section.helperText) : null
|
|
30115
30191
|
)
|
|
30116
30192
|
)));
|
|
30117
30193
|
};
|
|
@@ -30125,10 +30201,10 @@ function messageWithPunctuation(message) {
|
|
|
30125
30201
|
|
|
30126
30202
|
// ../cli-kit/dist/private/node/ui/hooks/use-abort-signal.js
|
|
30127
30203
|
init_cjs_shims();
|
|
30128
|
-
var
|
|
30204
|
+
var import_react41 = __toESM(require_react(), 1), noop2 = () => Promise.resolve();
|
|
30129
30205
|
function useAbortSignal(abortSignal, onAbort = noop2) {
|
|
30130
|
-
let { exit: unmountInk } = use_app_default(), [isAborted, setIsAborted] = (0,
|
|
30131
|
-
return (0,
|
|
30206
|
+
let { exit: unmountInk } = use_app_default(), [isAborted, setIsAborted] = (0, import_react41.useState)(!1);
|
|
30207
|
+
return (0, import_react41.useLayoutEffect)(() => {
|
|
30132
30208
|
abortSignal?.addEventListener("abort", () => {
|
|
30133
30209
|
let abortWithError = abortSignal.reason.message === "AbortError" ? void 0 : abortSignal.reason;
|
|
30134
30210
|
onAbort(abortWithError).then(() => {
|
|
@@ -30141,12 +30217,12 @@ function useAbortSignal(abortSignal, onAbort = noop2) {
|
|
|
30141
30217
|
|
|
30142
30218
|
// ../cli-kit/dist/private/node/ui/hooks/use-prompt.js
|
|
30143
30219
|
init_cjs_shims();
|
|
30144
|
-
var
|
|
30220
|
+
var import_react42 = __toESM(require_react(), 1), PromptState;
|
|
30145
30221
|
(function(PromptState2) {
|
|
30146
30222
|
PromptState2.Idle = "idle", PromptState2.Loading = "loading", PromptState2.Submitted = "submitted", PromptState2.Error = "error", PromptState2.Cancelled = "cancelled";
|
|
30147
30223
|
})(PromptState || (PromptState = {}));
|
|
30148
30224
|
function usePrompt({ initialAnswer }) {
|
|
30149
|
-
let [promptState, setPromptState] = (0,
|
|
30225
|
+
let [promptState, setPromptState] = (0, import_react42.useState)(PromptState.Idle), [answer, setAnswer] = (0, import_react42.useState)(initialAnswer);
|
|
30150
30226
|
return {
|
|
30151
30227
|
promptState,
|
|
30152
30228
|
setPromptState,
|
|
@@ -30156,91 +30232,91 @@ function usePrompt({ initialAnswer }) {
|
|
|
30156
30232
|
}
|
|
30157
30233
|
|
|
30158
30234
|
// ../cli-kit/dist/private/node/ui/components/DangerousConfirmationPrompt.js
|
|
30159
|
-
var
|
|
30235
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
30160
30236
|
var DangerousConfirmationPrompt = ({ message, confirmation, infoTable, onSubmit, abortSignal }) => {
|
|
30161
|
-
let validateAnswer = (0,
|
|
30237
|
+
let validateAnswer = (0, import_react43.useCallback)((value) => value === confirmation ? void 0 : ["Value must be exactly", { userInput: confirmation }], [confirmation]), { oneThird, twoThirds } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
30162
30238
|
initialAnswer: ""
|
|
30163
|
-
}), { exit: unmountInk } = use_app_default(), [error, setError] = (0,
|
|
30239
|
+
}), { exit: unmountInk } = use_app_default(), [error, setError] = (0, import_react43.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", underline = new Array(oneThird - 3).fill("\u2594"), { isAborted } = useAbortSignal(abortSignal);
|
|
30164
30240
|
use_input_default((input, key) => {
|
|
30165
30241
|
if (handleCtrlC(input, key), key.escape && (setPromptState(PromptState.Cancelled), setError(void 0)), key.return) {
|
|
30166
30242
|
let error2 = validateAnswer(answer);
|
|
30167
30243
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
30168
30244
|
}
|
|
30169
|
-
}), (0,
|
|
30245
|
+
}), (0, import_react43.useEffect)(() => {
|
|
30170
30246
|
promptState === PromptState.Submitted ? (onSubmit(!0), unmountInk()) : promptState === PromptState.Cancelled && (onSubmit(!1), unmountInk());
|
|
30171
30247
|
}, [onSubmit, promptState, unmountInk]);
|
|
30172
30248
|
let completed = promptState === PromptState.Submitted || promptState === PromptState.Cancelled;
|
|
30173
|
-
return isAborted ? null :
|
|
30249
|
+
return isAborted ? null : import_react43.default.createElement(
|
|
30174
30250
|
Box_default,
|
|
30175
30251
|
{ flexDirection: "column", marginBottom: 1, width: twoThirds },
|
|
30176
|
-
|
|
30252
|
+
import_react43.default.createElement(
|
|
30177
30253
|
Box_default,
|
|
30178
30254
|
null,
|
|
30179
|
-
|
|
30255
|
+
import_react43.default.createElement(
|
|
30180
30256
|
Box_default,
|
|
30181
30257
|
{ marginRight: 2 },
|
|
30182
|
-
|
|
30258
|
+
import_react43.default.createElement(Text, null, "?")
|
|
30183
30259
|
),
|
|
30184
|
-
|
|
30260
|
+
import_react43.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
30185
30261
|
),
|
|
30186
|
-
completed ?
|
|
30187
|
-
|
|
30262
|
+
completed ? import_react43.default.createElement(CompletedPrompt, { cancelled: promptState === PromptState.Cancelled }) : import_react43.default.createElement(
|
|
30263
|
+
import_react43.default.Fragment,
|
|
30188
30264
|
null,
|
|
30189
|
-
|
|
30265
|
+
import_react43.default.createElement(
|
|
30190
30266
|
Box_default,
|
|
30191
30267
|
{ flexDirection: "column", gap: 1, marginTop: 1, marginLeft: 3 },
|
|
30192
|
-
infoTable ?
|
|
30268
|
+
infoTable ? import_react43.default.createElement(
|
|
30193
30269
|
Box_default,
|
|
30194
30270
|
{ paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
30195
|
-
|
|
30271
|
+
import_react43.default.createElement(InfoTable, { table: infoTable })
|
|
30196
30272
|
) : null,
|
|
30197
|
-
|
|
30273
|
+
import_react43.default.createElement(
|
|
30198
30274
|
Box_default,
|
|
30199
30275
|
null,
|
|
30200
|
-
|
|
30276
|
+
import_react43.default.createElement(TokenizedText, { item: ["Type", { userInput: confirmation }, "to confirm, or press Escape to cancel."] })
|
|
30201
30277
|
)
|
|
30202
30278
|
),
|
|
30203
|
-
|
|
30279
|
+
import_react43.default.createElement(
|
|
30204
30280
|
Box_default,
|
|
30205
30281
|
{ flexDirection: "column", width: oneThird },
|
|
30206
|
-
|
|
30282
|
+
import_react43.default.createElement(
|
|
30207
30283
|
Box_default,
|
|
30208
30284
|
null,
|
|
30209
|
-
|
|
30285
|
+
import_react43.default.createElement(
|
|
30210
30286
|
Box_default,
|
|
30211
30287
|
{ marginRight: 2 },
|
|
30212
|
-
|
|
30288
|
+
import_react43.default.createElement(Text, { color }, ">")
|
|
30213
30289
|
),
|
|
30214
|
-
|
|
30290
|
+
import_react43.default.createElement(
|
|
30215
30291
|
Box_default,
|
|
30216
30292
|
{ flexGrow: 1 },
|
|
30217
|
-
|
|
30293
|
+
import_react43.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
30218
30294
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
30219
30295
|
}, defaultValue: "", color })
|
|
30220
30296
|
)
|
|
30221
30297
|
),
|
|
30222
|
-
|
|
30298
|
+
import_react43.default.createElement(
|
|
30223
30299
|
Box_default,
|
|
30224
30300
|
{ marginLeft: 3 },
|
|
30225
|
-
|
|
30301
|
+
import_react43.default.createElement(Text, { color }, underline)
|
|
30226
30302
|
),
|
|
30227
|
-
promptState === PromptState.Error && error ?
|
|
30303
|
+
promptState === PromptState.Error && error ? import_react43.default.createElement(
|
|
30228
30304
|
Box_default,
|
|
30229
30305
|
{ marginLeft: 3 },
|
|
30230
|
-
|
|
30306
|
+
import_react43.default.createElement(
|
|
30231
30307
|
Text,
|
|
30232
30308
|
{ color },
|
|
30233
|
-
|
|
30309
|
+
import_react43.default.createElement(TokenizedText, { item: error })
|
|
30234
30310
|
)
|
|
30235
30311
|
) : null
|
|
30236
30312
|
)
|
|
30237
30313
|
)
|
|
30238
30314
|
);
|
|
30239
|
-
}, CompletedPrompt = ({ cancelled }) =>
|
|
30315
|
+
}, CompletedPrompt = ({ cancelled }) => import_react43.default.createElement(
|
|
30240
30316
|
Box_default,
|
|
30241
30317
|
null,
|
|
30242
|
-
|
|
30243
|
-
|
|
30318
|
+
import_react43.default.createElement(Box_default, { marginRight: 2 }, cancelled ? import_react43.default.createElement(Text, { color: "red" }, figures_default.cross) : import_react43.default.createElement(Text, { color: "cyan" }, figures_default.tick)),
|
|
30319
|
+
import_react43.default.createElement(Box_default, { flexGrow: 1 }, cancelled ? import_react43.default.createElement(Text, { color: "red" }, "Cancelled") : import_react43.default.createElement(Text, { color: "cyan" }, "Confirmed"))
|
|
30244
30320
|
);
|
|
30245
30321
|
|
|
30246
30322
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
@@ -30251,7 +30327,7 @@ init_cjs_shims();
|
|
|
30251
30327
|
|
|
30252
30328
|
// ../cli-kit/dist/private/node/ui/components/Scrollbar.js
|
|
30253
30329
|
init_cjs_shims();
|
|
30254
|
-
var
|
|
30330
|
+
var import_react44 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SCROLLBOX_CHAR = "\u2551", Scrollbar = ({ containerHeight, visibleListSectionLength, fullListLength, visibleFromIndex, noColor = !shouldDisplayColors() }) => {
|
|
30255
30331
|
let displayArrows = containerHeight >= 4 && noColor, visibleToIndex = visibleFromIndex + visibleListSectionLength - 1, fullHeight = displayArrows ? containerHeight - 2 : containerHeight, scrollboxHeight = Math.min(fullHeight - 1, Math.ceil(Math.min(1, visibleListSectionLength / fullListLength) * fullHeight)), topBuffer;
|
|
30256
30332
|
if (visibleToIndex >= fullListLength - 1)
|
|
30257
30333
|
topBuffer = fullHeight - scrollboxHeight;
|
|
@@ -30268,32 +30344,32 @@ var import_react43 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SC
|
|
|
30268
30344
|
);
|
|
30269
30345
|
}
|
|
30270
30346
|
let bottomBuffer = fullHeight - scrollboxHeight - topBuffer, backgroundChar = noColor ? BACKGROUND_CHAR : " ", scrollboxChar = noColor ? SCROLLBOX_CHAR : " ", bgColor = noColor ? void 0 : "gray", scrollboxColor = noColor ? void 0 : "cyan";
|
|
30271
|
-
return
|
|
30347
|
+
return import_react44.default.createElement(
|
|
30272
30348
|
Box_default,
|
|
30273
30349
|
{ flexDirection: "column" },
|
|
30274
|
-
displayArrows ?
|
|
30275
|
-
|
|
30350
|
+
displayArrows ? import_react44.default.createElement(Text, null, "\u25B3") : null,
|
|
30351
|
+
import_react44.default.createElement(
|
|
30276
30352
|
Box_default,
|
|
30277
30353
|
{ width: 1 },
|
|
30278
|
-
|
|
30354
|
+
import_react44.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(topBuffer))
|
|
30279
30355
|
),
|
|
30280
|
-
|
|
30356
|
+
import_react44.default.createElement(
|
|
30281
30357
|
Box_default,
|
|
30282
30358
|
{ width: 1 },
|
|
30283
|
-
|
|
30359
|
+
import_react44.default.createElement(Text, { backgroundColor: scrollboxColor }, scrollboxChar.repeat(scrollboxHeight))
|
|
30284
30360
|
),
|
|
30285
|
-
|
|
30361
|
+
import_react44.default.createElement(
|
|
30286
30362
|
Box_default,
|
|
30287
30363
|
{ width: 1 },
|
|
30288
|
-
|
|
30364
|
+
import_react44.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(bottomBuffer))
|
|
30289
30365
|
),
|
|
30290
|
-
displayArrows ?
|
|
30366
|
+
displayArrows ? import_react44.default.createElement(Text, null, "\u25BD") : null
|
|
30291
30367
|
);
|
|
30292
30368
|
};
|
|
30293
30369
|
|
|
30294
30370
|
// ../cli-kit/dist/private/node/ui/hooks/use-select-state.js
|
|
30295
30371
|
init_cjs_shims();
|
|
30296
|
-
var
|
|
30372
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
30297
30373
|
import { isDeepStrictEqual } from "node:util";
|
|
30298
30374
|
var OptionMap = class extends Map {
|
|
30299
30375
|
constructor(options) {
|
|
@@ -30387,7 +30463,7 @@ var OptionMap = class extends Map {
|
|
|
30387
30463
|
previousValue: option?.value
|
|
30388
30464
|
};
|
|
30389
30465
|
}, useSelectState = ({ visibleOptionCount, options, defaultValue }) => {
|
|
30390
|
-
let [state, dispatch] = (0,
|
|
30466
|
+
let [state, dispatch] = (0, import_react45.useReducer)(reducer, { visibleOptionCount, defaultValue, options }, createDefaultState), [lastOptions, setLastOptions] = (0, import_react45.useState)(options), [lastVisibleOptionCount, setLastVisibleOptionCount] = (0, import_react45.useState)(visibleOptionCount);
|
|
30391
30467
|
options !== lastOptions && !isDeepStrictEqual(options, lastOptions) && (dispatch({
|
|
30392
30468
|
type: "reset",
|
|
30393
30469
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
@@ -30395,20 +30471,20 @@ var OptionMap = class extends Map {
|
|
|
30395
30471
|
type: "reset",
|
|
30396
30472
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
30397
30473
|
}), setLastVisibleOptionCount(visibleOptionCount));
|
|
30398
|
-
let selectNextOption = (0,
|
|
30474
|
+
let selectNextOption = (0, import_react45.useCallback)(() => {
|
|
30399
30475
|
dispatch({
|
|
30400
30476
|
type: "select-next-option"
|
|
30401
30477
|
});
|
|
30402
|
-
}, []), selectPreviousOption = (0,
|
|
30478
|
+
}, []), selectPreviousOption = (0, import_react45.useCallback)(() => {
|
|
30403
30479
|
dispatch({
|
|
30404
30480
|
type: "select-previous-option"
|
|
30405
30481
|
});
|
|
30406
|
-
}, []), selectOption = (0,
|
|
30482
|
+
}, []), selectOption = (0, import_react45.useCallback)(({ option }) => {
|
|
30407
30483
|
dispatch({
|
|
30408
30484
|
type: "select-option",
|
|
30409
30485
|
option
|
|
30410
30486
|
});
|
|
30411
|
-
}, []), visibleOptions = (0,
|
|
30487
|
+
}, []), visibleOptions = (0, import_react45.useMemo)(() => options.slice(state.visibleFromIndex), [options, state.visibleFromIndex]);
|
|
30412
30488
|
return {
|
|
30413
30489
|
visibleFromIndex: state.visibleFromIndex,
|
|
30414
30490
|
visibleToIndex: state.visibleToIndex,
|
|
@@ -30422,7 +30498,7 @@ var OptionMap = class extends Map {
|
|
|
30422
30498
|
};
|
|
30423
30499
|
|
|
30424
30500
|
// ../cli-kit/dist/private/node/ui/components/SelectInput.js
|
|
30425
|
-
var
|
|
30501
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
30426
30502
|
var import_sortBy = __toESM(require_sortBy(), 1);
|
|
30427
30503
|
function highlightedLabel(label, term) {
|
|
30428
30504
|
if (!term)
|
|
@@ -30445,19 +30521,19 @@ function Item({ item, previousItem, isSelected, highlightedTerm, enableShortcuts
|
|
|
30445
30521
|
let label = highlightedLabel(item.label, highlightedTerm), title, labelColor;
|
|
30446
30522
|
isSelected ? labelColor = "cyan" : item.disabled && (labelColor = "dim"), (typeof previousItem > "u" || item.group !== previousItem.group) && (title = item.group ?? (hasAnyGroup ? "Other" : void 0));
|
|
30447
30523
|
let showKey = enableShortcuts && item.key && item.key.length > 0;
|
|
30448
|
-
return
|
|
30524
|
+
return import_react46.default.createElement(
|
|
30449
30525
|
Box_default,
|
|
30450
30526
|
{ key: index, flexDirection: "column", marginTop: items.indexOf(item) !== 0 && title ? 1 : 0, minHeight: title ? 2 : 1 },
|
|
30451
|
-
title ?
|
|
30527
|
+
title ? import_react46.default.createElement(
|
|
30452
30528
|
Box_default,
|
|
30453
30529
|
{ marginLeft: 3 },
|
|
30454
|
-
|
|
30530
|
+
import_react46.default.createElement(Text, { bold: !0 }, title)
|
|
30455
30531
|
) : null,
|
|
30456
|
-
|
|
30532
|
+
import_react46.default.createElement(
|
|
30457
30533
|
Box_default,
|
|
30458
30534
|
{ key: index, marginLeft: hasAnyGroup ? 3 : 0 },
|
|
30459
|
-
|
|
30460
|
-
|
|
30535
|
+
import_react46.default.createElement(Box_default, { marginRight: 2 }, isSelected ? import_react46.default.createElement(Text, { color: "cyan" }, ">") : import_react46.default.createElement(Text, null, " ")),
|
|
30536
|
+
import_react46.default.createElement(Text, { wrap: "end", color: labelColor }, showKey ? `(${item.key}) ${label}` : label)
|
|
30461
30537
|
)
|
|
30462
30538
|
);
|
|
30463
30539
|
}
|
|
@@ -30477,12 +30553,12 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
30477
30553
|
options: items,
|
|
30478
30554
|
defaultValue
|
|
30479
30555
|
});
|
|
30480
|
-
(0,
|
|
30556
|
+
(0, import_react46.useEffect)(() => {
|
|
30481
30557
|
typeof state.value < "u" && state.previousValue !== state.value && onChange?.(items.find((item) => item.value === state.value));
|
|
30482
30558
|
}, [state.previousValue, state.value, items, onChange]);
|
|
30483
30559
|
let handleArrows = (key) => {
|
|
30484
30560
|
key.upArrow ? state.selectPreviousOption() : key.downArrow && state.selectNextOption();
|
|
30485
|
-
}, handleShortcuts = (0,
|
|
30561
|
+
}, handleShortcuts = (0, import_react46.useCallback)((input) => {
|
|
30486
30562
|
if (state.visibleOptions.map((item) => item.key).includes(input)) {
|
|
30487
30563
|
let itemWithKey = state.visibleOptions.find((item2) => item2.key === input), item = items.find((item2) => item2.value === itemWithKey?.value);
|
|
30488
30564
|
itemWithKey && !itemWithKey.disabled && (onSubmit && item && onSubmit(item), state.selectOption({ option: itemWithKey }));
|
|
@@ -30497,40 +30573,40 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
30497
30573
|
}, { isActive: focus });
|
|
30498
30574
|
let { twoThirds } = useLayout();
|
|
30499
30575
|
if (loading)
|
|
30500
|
-
return
|
|
30576
|
+
return import_react46.default.createElement(
|
|
30501
30577
|
Box_default,
|
|
30502
30578
|
{ marginLeft: 3 },
|
|
30503
|
-
|
|
30579
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, "Loading...")
|
|
30504
30580
|
);
|
|
30505
30581
|
if (errorMessage && errorMessage.length > 0)
|
|
30506
|
-
return
|
|
30582
|
+
return import_react46.default.createElement(
|
|
30507
30583
|
Box_default,
|
|
30508
30584
|
{ marginLeft: 3 },
|
|
30509
|
-
|
|
30585
|
+
import_react46.default.createElement(Text, { color: "red" }, errorMessage)
|
|
30510
30586
|
);
|
|
30511
30587
|
{
|
|
30512
30588
|
let optionsHeight = initialItems.length + maximumLinesLostToGroups(initialItems), sectionHeight = Math.max(hasAnyGroup ? 5 : 2, Math.min(availableLinesToUse, optionsHeight));
|
|
30513
|
-
return
|
|
30589
|
+
return import_react46.default.createElement(
|
|
30514
30590
|
Box_default,
|
|
30515
30591
|
{ flexDirection: "column", ref, gap: 1, width: twoThirds },
|
|
30516
|
-
|
|
30592
|
+
import_react46.default.createElement(
|
|
30517
30593
|
Box_default,
|
|
30518
30594
|
{ flexDirection: "row", height: sectionHeight, width: "100%" },
|
|
30519
|
-
|
|
30520
|
-
hasLimit ?
|
|
30595
|
+
import_react46.default.createElement(Box_default, { flexDirection: "column", overflowY: "hidden", flexGrow: 1 }, state.visibleOptions.map((item, index) => import_react46.default.createElement(Item, { key: index, item, previousItem: state.visibleOptions[index - 1], highlightedTerm, isSelected: item.value === state.value, items: state.visibleOptions, enableShortcuts, hasAnyGroup, index }))),
|
|
30596
|
+
hasLimit ? import_react46.default.createElement(Scrollbar, { containerHeight: sectionHeight, visibleListSectionLength: limit, fullListLength: items.length, visibleFromIndex: state.visibleFromIndex }) : null
|
|
30521
30597
|
),
|
|
30522
|
-
|
|
30598
|
+
import_react46.default.createElement(Box_default, { ref: inputFixedAreaRef }, noItems ? import_react46.default.createElement(
|
|
30523
30599
|
Box_default,
|
|
30524
30600
|
{ marginLeft: 3 },
|
|
30525
|
-
|
|
30526
|
-
) :
|
|
30601
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, "Try again with a different keyword.")
|
|
30602
|
+
) : import_react46.default.createElement(
|
|
30527
30603
|
Box_default,
|
|
30528
30604
|
{ marginLeft: 3, flexDirection: "column" },
|
|
30529
|
-
|
|
30530
|
-
hasMorePages ?
|
|
30605
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, `Press ${figures_default.arrowUp}${figures_default.arrowDown} arrows to select, enter ${itemsHaveKeys ? "or a shortcut " : ""}to confirm.`),
|
|
30606
|
+
hasMorePages ? import_react46.default.createElement(
|
|
30531
30607
|
Text,
|
|
30532
30608
|
null,
|
|
30533
|
-
|
|
30609
|
+
import_react46.default.createElement(
|
|
30534
30610
|
Text,
|
|
30535
30611
|
{ bold: !0 },
|
|
30536
30612
|
"1-",
|
|
@@ -30543,44 +30619,44 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
30543
30619
|
);
|
|
30544
30620
|
}
|
|
30545
30621
|
}
|
|
30546
|
-
var SelectInput = (0,
|
|
30622
|
+
var SelectInput = (0, import_react46.forwardRef)(SelectInputInner);
|
|
30547
30623
|
|
|
30548
30624
|
// ../cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.js
|
|
30549
30625
|
init_cjs_shims();
|
|
30550
30626
|
|
|
30551
30627
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoMessage.js
|
|
30552
30628
|
init_cjs_shims();
|
|
30553
|
-
var
|
|
30629
|
+
var import_react47 = __toESM(require_react(), 1), InfoMessage = ({ message: { title: { color, text: title }, body } }) => import_react47.default.createElement(
|
|
30554
30630
|
Box_default,
|
|
30555
30631
|
{ flexDirection: "column", gap: 1 },
|
|
30556
|
-
|
|
30632
|
+
import_react47.default.createElement(
|
|
30557
30633
|
Text,
|
|
30558
30634
|
{ color },
|
|
30559
|
-
|
|
30635
|
+
import_react47.default.createElement(TokenizedText, { item: title })
|
|
30560
30636
|
),
|
|
30561
|
-
|
|
30637
|
+
import_react47.default.createElement(TokenizedText, { item: body })
|
|
30562
30638
|
);
|
|
30563
30639
|
|
|
30564
30640
|
// ../cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.js
|
|
30565
|
-
var
|
|
30641
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
30566
30642
|
var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, state, input, submittedAnswerLabel }) => {
|
|
30567
|
-
let { stdout } = use_stdout_default(), [wrapperHeight, setWrapperHeight] = (0,
|
|
30643
|
+
let { stdout } = use_stdout_default(), [wrapperHeight, setWrapperHeight] = (0, import_react48.useState)(0), [promptAreaHeight, setPromptAreaHeight] = (0, import_react48.useState)(0), [inputFixedAreaHeight, setInputFixedAreaHeight] = (0, import_react48.useState)(0), currentAvailableLines = stdout.rows - promptAreaHeight - inputFixedAreaHeight, [availableLines, setAvailableLines] = (0, import_react48.useState)(currentAvailableLines), wrapperRef = (0, import_react48.useCallback)((node) => {
|
|
30568
30644
|
if (node !== null) {
|
|
30569
30645
|
let { height } = measure_element_default(node);
|
|
30570
30646
|
wrapperHeight !== height && setWrapperHeight(height);
|
|
30571
30647
|
}
|
|
30572
|
-
}, [wrapperHeight]), promptAreaRef = (0,
|
|
30648
|
+
}, [wrapperHeight]), promptAreaRef = (0, import_react48.useCallback)((node) => {
|
|
30573
30649
|
if (node !== null) {
|
|
30574
30650
|
let { height } = measure_element_default(node);
|
|
30575
30651
|
setPromptAreaHeight(height);
|
|
30576
30652
|
}
|
|
30577
|
-
}, []), inputFixedAreaRef = (0,
|
|
30653
|
+
}, []), inputFixedAreaRef = (0, import_react48.useCallback)((node) => {
|
|
30578
30654
|
if (node !== null) {
|
|
30579
30655
|
let { height } = measure_element_default(node);
|
|
30580
30656
|
setInputFixedAreaHeight(height + 3);
|
|
30581
30657
|
}
|
|
30582
|
-
}, []), inputComponent = (0,
|
|
30583
|
-
(0,
|
|
30658
|
+
}, []), inputComponent = (0, import_react48.cloneElement)(input, { availableLines, inputFixedAreaRef });
|
|
30659
|
+
(0, import_react48.useLayoutEffect)(() => {
|
|
30584
30660
|
function onResize() {
|
|
30585
30661
|
let newAvailableLines = stdout.rows - promptAreaHeight - inputFixedAreaHeight;
|
|
30586
30662
|
newAvailableLines !== availableLines && setAvailableLines(newAvailableLines);
|
|
@@ -30590,56 +30666,56 @@ var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, stat
|
|
|
30590
30666
|
};
|
|
30591
30667
|
}, [wrapperHeight, promptAreaHeight, stdout, availableLines, inputFixedAreaHeight]);
|
|
30592
30668
|
let { isAborted } = useAbortSignal(abortSignal), showInfoTable = infoTable && Object.keys(infoTable).length > 0;
|
|
30593
|
-
return isAborted ? null :
|
|
30669
|
+
return isAborted ? null : import_react48.default.createElement(
|
|
30594
30670
|
Box_default,
|
|
30595
30671
|
{ flexDirection: "column", marginBottom: 1, ref: wrapperRef },
|
|
30596
|
-
|
|
30672
|
+
import_react48.default.createElement(
|
|
30597
30673
|
Box_default,
|
|
30598
30674
|
{ ref: promptAreaRef, flexDirection: "column" },
|
|
30599
|
-
|
|
30675
|
+
import_react48.default.createElement(
|
|
30600
30676
|
Box_default,
|
|
30601
30677
|
null,
|
|
30602
|
-
|
|
30678
|
+
import_react48.default.createElement(
|
|
30603
30679
|
Box_default,
|
|
30604
30680
|
{ marginRight: 2 },
|
|
30605
|
-
|
|
30681
|
+
import_react48.default.createElement(Text, null, "?")
|
|
30606
30682
|
),
|
|
30607
|
-
|
|
30683
|
+
import_react48.default.createElement(TokenizedText, { item: messageWithPunctuation(message) }),
|
|
30608
30684
|
header
|
|
30609
30685
|
),
|
|
30610
|
-
(showInfoTable || infoMessage) && state !== PromptState.Submitted ?
|
|
30686
|
+
(showInfoTable || infoMessage) && state !== PromptState.Submitted ? import_react48.default.createElement(
|
|
30611
30687
|
Box_default,
|
|
30612
30688
|
{ marginTop: 1, marginLeft: 3, paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
30613
|
-
infoMessage ?
|
|
30614
|
-
showInfoTable ?
|
|
30689
|
+
infoMessage ? import_react48.default.createElement(InfoMessage, { message: infoMessage }) : null,
|
|
30690
|
+
showInfoTable ? import_react48.default.createElement(InfoTable, { table: infoTable }) : null
|
|
30615
30691
|
) : null
|
|
30616
30692
|
),
|
|
30617
|
-
state === PromptState.Submitted && submittedAnswerLabel ?
|
|
30693
|
+
state === PromptState.Submitted && submittedAnswerLabel ? import_react48.default.createElement(
|
|
30618
30694
|
Box_default,
|
|
30619
30695
|
null,
|
|
30620
|
-
|
|
30696
|
+
import_react48.default.createElement(
|
|
30621
30697
|
Box_default,
|
|
30622
30698
|
{ marginRight: 2 },
|
|
30623
|
-
|
|
30699
|
+
import_react48.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
30624
30700
|
),
|
|
30625
|
-
|
|
30626
|
-
) :
|
|
30701
|
+
import_react48.default.createElement(Text, { color: "cyan" }, submittedAnswerLabel)
|
|
30702
|
+
) : import_react48.default.createElement(Box_default, { marginTop: 1 }, inputComponent)
|
|
30627
30703
|
);
|
|
30628
30704
|
};
|
|
30629
30705
|
|
|
30630
30706
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
30631
|
-
var
|
|
30707
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
30632
30708
|
function SelectPrompt({ message, choices, infoTable, infoMessage, onSubmit, defaultValue, abortSignal }) {
|
|
30633
30709
|
if (choices.length === 0)
|
|
30634
30710
|
throw new Error("SelectPrompt requires at least one choice");
|
|
30635
30711
|
let { exit: unmountInk } = use_app_default(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
30636
30712
|
initialAnswer: void 0
|
|
30637
|
-
}), submitAnswer = (0,
|
|
30713
|
+
}), submitAnswer = (0, import_react49.useCallback)((answer2) => {
|
|
30638
30714
|
setAnswer(answer2), setPromptState(PromptState.Submitted);
|
|
30639
30715
|
}, [setAnswer, setPromptState]);
|
|
30640
|
-
return (0,
|
|
30716
|
+
return (0, import_react49.useEffect)(() => {
|
|
30641
30717
|
promptState === PromptState.Submitted && answer && (unmountInk(), onSubmit(answer.value));
|
|
30642
|
-
}, [answer, onSubmit, promptState, unmountInk]),
|
|
30718
|
+
}, [answer, onSubmit, promptState, unmountInk]), import_react49.default.createElement(PromptLayout, { message, state: promptState, submittedAnswerLabel: answer?.label, infoTable, infoMessage, abortSignal, input: import_react49.default.createElement(SelectInput, { defaultValue, items: choices, onSubmit: submitAnswer }) });
|
|
30643
30719
|
}
|
|
30644
30720
|
|
|
30645
30721
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
@@ -30647,32 +30723,32 @@ init_cjs_shims();
|
|
|
30647
30723
|
|
|
30648
30724
|
// ../cli-kit/dist/private/node/ui/components/TextAnimation.js
|
|
30649
30725
|
init_cjs_shims();
|
|
30650
|
-
var
|
|
30726
|
+
var import_react50 = __toESM(require_react(), 1), import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
30651
30727
|
function rainbow(text, frame) {
|
|
30652
30728
|
let hue = 5 * frame, leftColor = { h: hue % 360, s: 0.8, v: 1 }, rightColor = { h: (hue + 1) % 360, s: 0.8, v: 1 };
|
|
30653
30729
|
return (0, import_gradient_string.default)(leftColor, rightColor)(text, { interpolation: "hsv", hsvSpin: "long" });
|
|
30654
30730
|
}
|
|
30655
|
-
var TextAnimation = (0,
|
|
30656
|
-
let frame = (0,
|
|
30731
|
+
var TextAnimation = (0, import_react50.memo)(({ text }) => {
|
|
30732
|
+
let frame = (0, import_react50.useRef)(0), [renderedFrame, setRenderedFrame] = (0, import_react50.useState)(text), timeout = (0, import_react50.useRef)(), renderAnimation = (0, import_react50.useCallback)(() => {
|
|
30657
30733
|
let newFrame = frame.current + 1;
|
|
30658
30734
|
frame.current = newFrame, setRenderedFrame(rainbow(text, frame.current)), timeout.current = setTimeout(() => {
|
|
30659
30735
|
renderAnimation();
|
|
30660
30736
|
}, 35);
|
|
30661
30737
|
}, [text]);
|
|
30662
|
-
return (0,
|
|
30738
|
+
return (0, import_react50.useLayoutEffect)(() => (renderAnimation(), () => {
|
|
30663
30739
|
clearTimeout(timeout.current);
|
|
30664
|
-
}), [renderAnimation]),
|
|
30740
|
+
}), [renderAnimation]), import_react50.default.createElement(Text, null, renderedFrame);
|
|
30665
30741
|
});
|
|
30666
30742
|
TextAnimation.displayName = "TextAnimation";
|
|
30667
30743
|
|
|
30668
30744
|
// ../cli-kit/dist/private/node/ui/hooks/use-async-and-unmount.js
|
|
30669
30745
|
init_cjs_shims();
|
|
30670
|
-
var
|
|
30746
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
30671
30747
|
function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
30672
30748
|
}, onRejected = () => {
|
|
30673
30749
|
} } = {}) {
|
|
30674
30750
|
let { exit: unmountInk } = use_app_default();
|
|
30675
|
-
(0,
|
|
30751
|
+
(0, import_react51.useEffect)(() => {
|
|
30676
30752
|
asyncFunction().then(() => {
|
|
30677
30753
|
onFulfilled(), unmountInk();
|
|
30678
30754
|
}).catch((error) => {
|
|
@@ -30682,7 +30758,7 @@ function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
|
30682
30758
|
}
|
|
30683
30759
|
|
|
30684
30760
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
30685
|
-
var
|
|
30761
|
+
var import_react52 = __toESM(require_react(), 1), loadingBarChar = "\u2580", TasksState;
|
|
30686
30762
|
(function(TasksState2) {
|
|
30687
30763
|
TasksState2.Loading = "loading", TasksState2.Success = "success", TasksState2.Failure = "failure";
|
|
30688
30764
|
})(TasksState || (TasksState = {}));
|
|
@@ -30701,7 +30777,7 @@ async function runTask2(task, ctx) {
|
|
|
30701
30777
|
var noop3 = () => {
|
|
30702
30778
|
};
|
|
30703
30779
|
function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }) {
|
|
30704
|
-
let { twoThirds } = useLayout(), loadingBar = new Array(twoThirds).fill(loadingBarChar).join(""), [currentTask, setCurrentTask] = (0,
|
|
30780
|
+
let { twoThirds } = useLayout(), loadingBar = new Array(twoThirds).fill(loadingBarChar).join(""), [currentTask, setCurrentTask] = (0, import_react52.useState)(tasks[0]), [state, setState] = (0, import_react52.useState)(TasksState.Loading), ctx = (0, import_react52.useRef)({}), { isRawModeSupported } = use_stdin_default();
|
|
30705
30781
|
useAsyncAndUnmount(async () => {
|
|
30706
30782
|
for (let task of tasks) {
|
|
30707
30783
|
setCurrentTask(task);
|
|
@@ -30722,11 +30798,11 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }
|
|
|
30722
30798
|
return null;
|
|
30723
30799
|
}, { isActive: !!isRawModeSupported });
|
|
30724
30800
|
let { isAborted } = useAbortSignal(abortSignal);
|
|
30725
|
-
return silent ? null : state === TasksState.Loading && !isAborted ?
|
|
30801
|
+
return silent ? null : state === TasksState.Loading && !isAborted ? import_react52.default.createElement(
|
|
30726
30802
|
Box_default,
|
|
30727
30803
|
{ flexDirection: "column" },
|
|
30728
|
-
|
|
30729
|
-
|
|
30804
|
+
import_react52.default.createElement(TextAnimation, { text: loadingBar }),
|
|
30805
|
+
import_react52.default.createElement(
|
|
30730
30806
|
Text,
|
|
30731
30807
|
null,
|
|
30732
30808
|
currentTask.title,
|
|
@@ -30737,84 +30813,84 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }
|
|
|
30737
30813
|
|
|
30738
30814
|
// ../cli-kit/dist/private/node/ui/components/TextPrompt.js
|
|
30739
30815
|
init_cjs_shims();
|
|
30740
|
-
var
|
|
30816
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
30741
30817
|
var TextPrompt = ({ message, onSubmit, validate, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
|
|
30742
30818
|
if (password && defaultValue)
|
|
30743
30819
|
throw new Error("Can't use defaultValue with password");
|
|
30744
|
-
let validateAnswer = (0,
|
|
30820
|
+
let validateAnswer = (0, import_react53.useCallback)((value) => {
|
|
30745
30821
|
if (validate)
|
|
30746
30822
|
return validate(value);
|
|
30747
30823
|
if (value.length === 0 && !allowEmpty)
|
|
30748
30824
|
return "Type an answer to the prompt.";
|
|
30749
30825
|
}, [allowEmpty, validate]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
30750
30826
|
initialAnswer
|
|
30751
|
-
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, { exit: unmountInk } = use_app_default(), [error, setError] = (0,
|
|
30827
|
+
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, { exit: unmountInk } = use_app_default(), [error, setError] = (0, import_react53.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", underline = new Array(oneThird - 3).fill("\u2594"), { isAborted } = useAbortSignal(abortSignal);
|
|
30752
30828
|
return use_input_default((input, key) => {
|
|
30753
30829
|
if (handleCtrlC(input, key), key.return) {
|
|
30754
30830
|
let error2 = validateAnswer(answerOrDefault);
|
|
30755
30831
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
30756
30832
|
}
|
|
30757
|
-
}), (0,
|
|
30833
|
+
}), (0, import_react53.useEffect)(() => {
|
|
30758
30834
|
promptState === PromptState.Submitted && (onSubmit(answerOrDefault), unmountInk());
|
|
30759
|
-
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null :
|
|
30835
|
+
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null : import_react53.default.createElement(
|
|
30760
30836
|
Box_default,
|
|
30761
30837
|
{ flexDirection: "column", marginBottom: 1, width: oneThird },
|
|
30762
|
-
|
|
30838
|
+
import_react53.default.createElement(
|
|
30763
30839
|
Box_default,
|
|
30764
30840
|
null,
|
|
30765
|
-
|
|
30841
|
+
import_react53.default.createElement(
|
|
30766
30842
|
Box_default,
|
|
30767
30843
|
{ marginRight: 2 },
|
|
30768
|
-
|
|
30844
|
+
import_react53.default.createElement(Text, null, "?")
|
|
30769
30845
|
),
|
|
30770
|
-
|
|
30846
|
+
import_react53.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
30771
30847
|
),
|
|
30772
|
-
promptState === PromptState.Submitted ?
|
|
30848
|
+
promptState === PromptState.Submitted ? import_react53.default.createElement(
|
|
30773
30849
|
Box_default,
|
|
30774
30850
|
null,
|
|
30775
|
-
|
|
30851
|
+
import_react53.default.createElement(
|
|
30776
30852
|
Box_default,
|
|
30777
30853
|
{ marginRight: 2 },
|
|
30778
|
-
|
|
30854
|
+
import_react53.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
30779
30855
|
),
|
|
30780
|
-
|
|
30856
|
+
import_react53.default.createElement(
|
|
30781
30857
|
Box_default,
|
|
30782
30858
|
{ flexGrow: 1 },
|
|
30783
|
-
|
|
30859
|
+
import_react53.default.createElement(Text, { color: "cyan", dimColor: displayEmptyValue }, password ? "*".repeat(answer.length) : displayedAnswer)
|
|
30784
30860
|
)
|
|
30785
|
-
) :
|
|
30861
|
+
) : import_react53.default.createElement(
|
|
30786
30862
|
Box_default,
|
|
30787
30863
|
{ flexDirection: "column" },
|
|
30788
|
-
|
|
30864
|
+
import_react53.default.createElement(
|
|
30789
30865
|
Box_default,
|
|
30790
30866
|
null,
|
|
30791
|
-
|
|
30867
|
+
import_react53.default.createElement(
|
|
30792
30868
|
Box_default,
|
|
30793
30869
|
{ marginRight: 2 },
|
|
30794
|
-
|
|
30870
|
+
import_react53.default.createElement(Text, { color }, ">")
|
|
30795
30871
|
),
|
|
30796
|
-
|
|
30872
|
+
import_react53.default.createElement(
|
|
30797
30873
|
Box_default,
|
|
30798
30874
|
{ flexGrow: 1 },
|
|
30799
|
-
|
|
30875
|
+
import_react53.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
30800
30876
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
30801
30877
|
}, defaultValue, color, password })
|
|
30802
30878
|
)
|
|
30803
30879
|
),
|
|
30804
|
-
|
|
30880
|
+
import_react53.default.createElement(
|
|
30805
30881
|
Box_default,
|
|
30806
30882
|
{ marginLeft: 3 },
|
|
30807
|
-
|
|
30883
|
+
import_react53.default.createElement(Text, { color }, underline)
|
|
30808
30884
|
),
|
|
30809
|
-
promptState === PromptState.Error ?
|
|
30885
|
+
promptState === PromptState.Error ? import_react53.default.createElement(
|
|
30810
30886
|
Box_default,
|
|
30811
30887
|
{ marginLeft: 3 },
|
|
30812
|
-
|
|
30888
|
+
import_react53.default.createElement(Text, { color }, error)
|
|
30813
30889
|
) : null,
|
|
30814
|
-
promptState !== PromptState.Error && preview ?
|
|
30890
|
+
promptState !== PromptState.Error && preview ? import_react53.default.createElement(
|
|
30815
30891
|
Box_default,
|
|
30816
30892
|
{ marginLeft: 3 },
|
|
30817
|
-
|
|
30893
|
+
import_react53.default.createElement(TokenizedText, { item: preview(answerOrDefault) })
|
|
30818
30894
|
) : null
|
|
30819
30895
|
)
|
|
30820
30896
|
);
|
|
@@ -30831,20 +30907,20 @@ function debounce(func, wait, options) {
|
|
|
30831
30907
|
}
|
|
30832
30908
|
|
|
30833
30909
|
// ../cli-kit/dist/private/node/ui/components/AutocompletePrompt.js
|
|
30834
|
-
var
|
|
30910
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
30835
30911
|
var MIN_NUMBER_OF_ITEMS_FOR_SEARCH = 5;
|
|
30836
30912
|
function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, hasMorePages: initialHasMorePages = !1, abortSignal, infoMessage }) {
|
|
30837
|
-
let { exit: unmountInk } = use_app_default(), [searchTerm, setSearchTerm] = (0,
|
|
30913
|
+
let { exit: unmountInk } = use_app_default(), [searchTerm, setSearchTerm] = (0, import_react54.useState)(""), [searchResults, setSearchResults] = (0, import_react54.useState)(choices), canSearch = choices.length > MIN_NUMBER_OF_ITEMS_FOR_SEARCH, [hasMorePages, setHasMorePages] = (0, import_react54.useState)(initialHasMorePages), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
30838
30914
|
initialAnswer: void 0
|
|
30839
|
-
}), paginatedSearch = (0,
|
|
30915
|
+
}), paginatedSearch = (0, import_react54.useCallback)(async (term) => await search(term), [search]), submitAnswer = (0, import_react54.useCallback)((answer2) => {
|
|
30840
30916
|
promptState === PromptState.Idle && (setAnswer(answer2), setPromptState(PromptState.Submitted));
|
|
30841
30917
|
}, [promptState, setAnswer, setPromptState]);
|
|
30842
|
-
(0,
|
|
30918
|
+
(0, import_react54.useEffect)(() => {
|
|
30843
30919
|
promptState === PromptState.Submitted && answer && (setSearchTerm(""), unmountInk(), onSubmit(answer.value));
|
|
30844
30920
|
}, [answer, onSubmit, promptState, unmountInk]);
|
|
30845
|
-
let setLoadingWhenSlow = (0,
|
|
30921
|
+
let setLoadingWhenSlow = (0, import_react54.useRef)(), searchTermRef = (0, import_react54.useRef)("");
|
|
30846
30922
|
searchTermRef.current = searchTerm;
|
|
30847
|
-
let debounceSearch = (0,
|
|
30923
|
+
let debounceSearch = (0, import_react54.useCallback)(debounce((term) => {
|
|
30848
30924
|
setLoadingWhenSlow.current = setTimeout(() => {
|
|
30849
30925
|
setPromptState(PromptState.Loading);
|
|
30850
30926
|
}, 100), paginatedSearch(term).then((result) => {
|
|
@@ -30855,22 +30931,22 @@ function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, has
|
|
|
30855
30931
|
clearTimeout(setLoadingWhenSlow.current);
|
|
30856
30932
|
});
|
|
30857
30933
|
}, 300, { leading: !0 }), [initialHasMorePages, choices, paginatedSearch, searchResults]);
|
|
30858
|
-
return
|
|
30934
|
+
return import_react54.default.createElement(PromptLayout, { message, state: promptState, infoTable, infoMessage, abortSignal, header: promptState !== PromptState.Submitted && canSearch ? import_react54.default.createElement(
|
|
30859
30935
|
Box_default,
|
|
30860
30936
|
{ marginLeft: 3 },
|
|
30861
|
-
|
|
30937
|
+
import_react54.default.createElement(TextInput, { value: searchTerm, onChange: (term) => {
|
|
30862
30938
|
setSearchTerm(term), term.length > 0 ? debounceSearch(term) : (debounceSearch.cancel(), setPromptState(PromptState.Idle), setSearchResults(choices));
|
|
30863
30939
|
}, placeholder: "Type to search..." })
|
|
30864
|
-
) : null, submittedAnswerLabel: answer?.label, input:
|
|
30940
|
+
) : null, submittedAnswerLabel: answer?.label, input: import_react54.default.createElement(SelectInput, { items: searchResults, initialItems: choices, enableShortcuts: !1, emptyMessage: "No results found.", highlightedTerm: searchTerm, loading: promptState === PromptState.Loading, errorMessage: promptState === PromptState.Error ? "There has been an error while searching. Please try again later." : void 0, hasMorePages, morePagesMessage: "Find what you're looking for by typing its name.", onSubmit: submitAnswer }) });
|
|
30865
30941
|
}
|
|
30866
30942
|
|
|
30867
30943
|
// ../cli-kit/dist/public/node/ui.js
|
|
30868
|
-
var
|
|
30944
|
+
var import_react55 = __toESM(require_react()), defaultUIDebugOptions = {
|
|
30869
30945
|
skipTTYCheck: !1
|
|
30870
30946
|
};
|
|
30871
30947
|
async function renderConcurrent({ renderOptions, ...props }) {
|
|
30872
30948
|
let abortSignal = props.abortSignal ?? new AbortController().signal;
|
|
30873
|
-
return render2(
|
|
30949
|
+
return render2(import_react55.default.createElement(ConcurrentOutput, { ...props, abortSignal }), renderOptions);
|
|
30874
30950
|
}
|
|
30875
30951
|
function renderInfo(options) {
|
|
30876
30952
|
return alert({ ...options, type: "info" });
|
|
@@ -30885,12 +30961,12 @@ function renderError(options) {
|
|
|
30885
30961
|
return alert({ ...options, type: "error" });
|
|
30886
30962
|
}
|
|
30887
30963
|
function renderFatalError(error, { renderOptions } = {}) {
|
|
30888
|
-
return renderOnce(
|
|
30964
|
+
return renderOnce(import_react55.default.createElement(FatalError2, { error }), { logLevel: "error", logger: consoleError, renderOptions });
|
|
30889
30965
|
}
|
|
30890
30966
|
async function renderSelectPrompt({ renderOptions, isConfirmationPrompt, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
30891
30967
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
30892
30968
|
let selectedValue;
|
|
30893
|
-
return await render2(
|
|
30969
|
+
return await render2(import_react55.default.createElement(SelectPrompt, { ...props, onSubmit: (value) => {
|
|
30894
30970
|
selectedValue = value;
|
|
30895
30971
|
} }), {
|
|
30896
30972
|
...renderOptions,
|
|
@@ -30934,7 +31010,7 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
30934
31010
|
};
|
|
30935
31011
|
return runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
30936
31012
|
let selectedValue;
|
|
30937
|
-
return await render2(
|
|
31013
|
+
return await render2(import_react55.default.createElement(AutocompletePrompt, { ...newProps, onSubmit: (value) => {
|
|
30938
31014
|
selectedValue = value;
|
|
30939
31015
|
} }), {
|
|
30940
31016
|
...renderOptions,
|
|
@@ -30943,11 +31019,11 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
30943
31019
|
});
|
|
30944
31020
|
}
|
|
30945
31021
|
function renderTable({ renderOptions, ...props }) {
|
|
30946
|
-
return renderOnce(
|
|
31022
|
+
return renderOnce(import_react55.default.createElement(Table, { ...props }), { renderOptions });
|
|
30947
31023
|
}
|
|
30948
31024
|
async function renderTasks(tasks, { renderOptions } = {}) {
|
|
30949
31025
|
return new Promise((resolve, reject) => {
|
|
30950
|
-
render2(
|
|
31026
|
+
render2(import_react55.default.createElement(Tasks, { tasks, onComplete: resolve }), {
|
|
30951
31027
|
...renderOptions,
|
|
30952
31028
|
exitOnCtrlC: !1
|
|
30953
31029
|
}).then(() => {
|
|
@@ -30957,7 +31033,7 @@ async function renderTasks(tasks, { renderOptions } = {}) {
|
|
|
30957
31033
|
async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
30958
31034
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
30959
31035
|
let enteredText = "";
|
|
30960
|
-
return await render2(
|
|
31036
|
+
return await render2(import_react55.default.createElement(TextPrompt, { ...props, onSubmit: (value) => {
|
|
30961
31037
|
enteredText = value;
|
|
30962
31038
|
} }), {
|
|
30963
31039
|
...renderOptions,
|
|
@@ -30968,7 +31044,7 @@ async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = de
|
|
|
30968
31044
|
async function renderDangerousConfirmationPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
30969
31045
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
30970
31046
|
let confirmed;
|
|
30971
|
-
return await render2(
|
|
31047
|
+
return await render2(import_react55.default.createElement(DangerousConfirmationPrompt, { ...props, onSubmit: (value) => {
|
|
30972
31048
|
confirmed = value;
|
|
30973
31049
|
} }), {
|
|
30974
31050
|
...renderOptions,
|
|
@@ -31016,7 +31092,6 @@ export {
|
|
|
31016
31092
|
runWithTimer,
|
|
31017
31093
|
require_react,
|
|
31018
31094
|
require_isObject,
|
|
31019
|
-
ansi_escapes_default2 as ansi_escapes_default,
|
|
31020
31095
|
require_signal_exit,
|
|
31021
31096
|
require_scheduler,
|
|
31022
31097
|
stripAnsi,
|
|
@@ -31149,9 +31224,11 @@ export {
|
|
|
31149
31224
|
consoleError,
|
|
31150
31225
|
consoleWarn,
|
|
31151
31226
|
unstyled,
|
|
31227
|
+
shouldDisplayColors,
|
|
31152
31228
|
formatSection,
|
|
31153
|
-
|
|
31229
|
+
uniqueString,
|
|
31154
31230
|
inTemporaryDirectory,
|
|
31231
|
+
tempDirectory,
|
|
31155
31232
|
readFile,
|
|
31156
31233
|
readFileSync,
|
|
31157
31234
|
fileRealPath,
|
|
@@ -31180,12 +31257,12 @@ export {
|
|
|
31180
31257
|
fileExistsSync,
|
|
31181
31258
|
generateRandomNameForSubdirectory,
|
|
31182
31259
|
glob,
|
|
31260
|
+
detectEOL,
|
|
31183
31261
|
findPathUp,
|
|
31184
31262
|
matchGlob,
|
|
31185
31263
|
envPaths,
|
|
31186
31264
|
logsFolder,
|
|
31187
31265
|
environmentVariables,
|
|
31188
|
-
systemEnvironmentVariables,
|
|
31189
31266
|
sessionConstants,
|
|
31190
31267
|
bugsnagApiKey,
|
|
31191
31268
|
reportingRateLimit,
|
|
@@ -31199,11 +31276,20 @@ export {
|
|
|
31199
31276
|
appHost,
|
|
31200
31277
|
spinVariables,
|
|
31201
31278
|
fetchSpinPort,
|
|
31279
|
+
hashString,
|
|
31280
|
+
fileHash,
|
|
31281
|
+
randomUUID,
|
|
31282
|
+
nonRandomUUID,
|
|
31283
|
+
getEnvironmentVariables,
|
|
31284
|
+
getPartnersToken,
|
|
31285
|
+
getBackendPort,
|
|
31286
|
+
getIdentityTokenInformation,
|
|
31287
|
+
jsonOutputEnabled,
|
|
31202
31288
|
isTerminalInteractive,
|
|
31203
31289
|
homeDirectory,
|
|
31204
31290
|
isDevelopment,
|
|
31205
31291
|
isVerbose,
|
|
31206
|
-
|
|
31292
|
+
isAppManagementDisabled,
|
|
31207
31293
|
isShopify,
|
|
31208
31294
|
isUnitTest,
|
|
31209
31295
|
analyticsDisabled,
|
|
@@ -31313,4 +31399,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31313
31399
|
* LICENSE file in the root directory of this source tree.
|
|
31314
31400
|
*)
|
|
31315
31401
|
*/
|
|
31316
|
-
//# sourceMappingURL=chunk-
|
|
31402
|
+
//# sourceMappingURL=chunk-L3FVJFIT.js.map
|