@shopify/create-app 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/{chokidar-5LLC6S6D.js → chokidar-LYCK7UIU.js} +20 -574
- package/dist/chunk-3I3GQNEW.js +95 -0
- package/dist/{chunk-CRHXI6PS.js → chunk-5DBS6QOU.js} +102 -638
- package/dist/{chunk-Z2K6T5HO.js → chunk-A2CUF3IE.js} +2 -2
- package/dist/{chunk-BUFIEXZ5.js → chunk-B3YWYURY.js} +701 -141
- package/dist/{chunk-K7HGDAI4.js → chunk-CDBXAE2F.js} +20 -104
- package/dist/chunk-CP3BRHWK.js +33 -0
- package/dist/{chunk-OAZFIMJ3.js → chunk-LQ2ZKVR6.js} +45 -115
- package/dist/{chunk-5MQK53ZB.js → chunk-MFOTVT4R.js} +489 -410
- package/dist/{chunk-3HBRMIPY.js → chunk-MW7RWHY5.js} +341 -211
- package/dist/{chunk-BOBYVF6Z.js → chunk-NBA3G6YQ.js} +55430 -36539
- package/dist/{chunk-7BLDARWR.js → chunk-PNW5KDM2.js} +40 -22
- package/dist/{chunk-55N7E5WW.js → chunk-QPEQYFIE.js} +1849 -4319
- package/dist/chunk-RVS7NPOH.js +15929 -0
- package/dist/{chunk-U52U2BAX.js → chunk-VK6YB4CW.js} +640 -1166
- package/dist/{chunk-EZFQXNK5.js → chunk-ZKGBK6WQ.js} +2 -2
- package/dist/chunk-ZUCWDIGE.js +111 -0
- package/dist/{custom-oclif-loader-COXUWDRX.js → custom-oclif-loader-3WFQ2GRD.js} +9 -8
- package/dist/{del-WGII2Y5S.js → del-CKAQ44SX.js} +5 -5
- package/dist/{devtools-K7FXBBFZ.js → devtools-6LOQORRT.js} +2 -2
- package/dist/{error-handler-NLEDBRP4.js → error-handler-N6P2X42R.js} +13 -12
- package/dist/hooks/postrun.js +14 -12
- package/dist/hooks/prerun.js +27 -12
- package/dist/{http-proxy-FXWKYHZ3.js → http-proxy-L3MCJRQS.js} +3 -2
- package/dist/index.js +19912 -17261
- package/dist/index.test.js +80 -133
- package/dist/lib-ZAUU5FOJ.js +11 -0
- package/dist/{local-WM5Y2GKE.js → local-EBAW6AUD.js} +11 -10
- package/dist/{node-package-manager-U4IKWNRD.js → node-package-manager-VTG2B4KW.js} +10 -9
- package/dist/out-AZBX4ITJ.js +7 -0
- package/dist/{path-2HZUSAGR.js → path-GWAZZN2N.js} +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-NMBUMLWD.js → ui-QBKDPUJX.js} +9 -8
- package/oclif.manifest.json +1 -1
- package/package.json +3 -4
- package/dist/chunk-JHSNPAK4.js +0 -15742
- package/dist/chunk-TKDPJ4ZU.js +0 -27
- package/dist/lib-CKTRCGTR.js +0 -11
- package/dist/out-JR4DWQ2G.js +0 -7
|
@@ -5,19 +5,22 @@ import {
|
|
|
5
5
|
require_source,
|
|
6
6
|
require_source_map,
|
|
7
7
|
require_supports_hyperlinks
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-NBA3G6YQ.js";
|
|
9
9
|
import {
|
|
10
10
|
Queue
|
|
11
11
|
} from "./chunk-CFIKVUNW.js";
|
|
12
12
|
import {
|
|
13
13
|
cwd,
|
|
14
|
-
delimiter,
|
|
15
14
|
dirname,
|
|
16
15
|
joinPath,
|
|
17
16
|
normalizePath,
|
|
18
17
|
relativizePath,
|
|
18
|
+
sniffForJson,
|
|
19
19
|
sniffForPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-ZUCWDIGE.js";
|
|
21
|
+
import {
|
|
22
|
+
delimiter
|
|
23
|
+
} from "./chunk-CDBXAE2F.js";
|
|
21
24
|
import {
|
|
22
25
|
require_graceful_fs
|
|
23
26
|
} from "./chunk-75LV6AQS.js";
|
|
@@ -6576,7 +6579,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
6576
6579
|
"use strict";
|
|
6577
6580
|
init_cjs_shims();
|
|
6578
6581
|
process.env.NODE_ENV !== "production" && (module.exports = function($$$hostConfig) {
|
|
6579
|
-
var exports2 = {},
|
|
6582
|
+
var exports2 = {}, React39 = require_react(), Scheduler = require_scheduler(), ReactSharedInternals = React39.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, suppressWarning = !1;
|
|
6580
6583
|
function setSuppressWarning(newSuppressWarning) {
|
|
6581
6584
|
suppressWarning = newSuppressWarning;
|
|
6582
6585
|
}
|
|
@@ -20961,7 +20964,7 @@ var require_fs = __commonJS({
|
|
|
20961
20964
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
20962
20965
|
"use strict";
|
|
20963
20966
|
init_cjs_shims();
|
|
20964
|
-
var u = require_universalify().fromCallback,
|
|
20967
|
+
var u = require_universalify().fromCallback, fs5 = require_graceful_fs(), api = [
|
|
20965
20968
|
"access",
|
|
20966
20969
|
"appendFile",
|
|
20967
20970
|
"chmod",
|
|
@@ -20996,47 +20999,47 @@ var require_fs = __commonJS({
|
|
|
20996
20999
|
"unlink",
|
|
20997
21000
|
"utimes",
|
|
20998
21001
|
"writeFile"
|
|
20999
|
-
].filter((key) => typeof
|
|
21000
|
-
Object.assign(exports,
|
|
21002
|
+
].filter((key) => typeof fs5[key] == "function");
|
|
21003
|
+
Object.assign(exports, fs5);
|
|
21001
21004
|
api.forEach((method) => {
|
|
21002
|
-
exports[method] = u(
|
|
21005
|
+
exports[method] = u(fs5[method]);
|
|
21003
21006
|
});
|
|
21004
21007
|
exports.exists = function(filename, callback) {
|
|
21005
|
-
return typeof callback == "function" ?
|
|
21008
|
+
return typeof callback == "function" ? fs5.exists(filename, callback) : new Promise((resolve) => fs5.exists(filename, resolve));
|
|
21006
21009
|
};
|
|
21007
21010
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
21008
|
-
return typeof callback == "function" ?
|
|
21009
|
-
|
|
21011
|
+
return typeof callback == "function" ? fs5.read(fd, buffer, offset, length, position, callback) : new Promise((resolve, reject) => {
|
|
21012
|
+
fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
21010
21013
|
if (err) return reject(err);
|
|
21011
21014
|
resolve({ bytesRead, buffer: buffer2 });
|
|
21012
21015
|
});
|
|
21013
21016
|
});
|
|
21014
21017
|
};
|
|
21015
21018
|
exports.write = function(fd, buffer, ...args) {
|
|
21016
|
-
return typeof args[args.length - 1] == "function" ?
|
|
21017
|
-
|
|
21019
|
+
return typeof args[args.length - 1] == "function" ? fs5.write(fd, buffer, ...args) : new Promise((resolve, reject) => {
|
|
21020
|
+
fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
21018
21021
|
if (err) return reject(err);
|
|
21019
21022
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
21020
21023
|
});
|
|
21021
21024
|
});
|
|
21022
21025
|
};
|
|
21023
21026
|
exports.readv = function(fd, buffers, ...args) {
|
|
21024
|
-
return typeof args[args.length - 1] == "function" ?
|
|
21025
|
-
|
|
21027
|
+
return typeof args[args.length - 1] == "function" ? fs5.readv(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
21028
|
+
fs5.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
21026
21029
|
if (err) return reject(err);
|
|
21027
21030
|
resolve({ bytesRead, buffers: buffers2 });
|
|
21028
21031
|
});
|
|
21029
21032
|
});
|
|
21030
21033
|
};
|
|
21031
21034
|
exports.writev = function(fd, buffers, ...args) {
|
|
21032
|
-
return typeof args[args.length - 1] == "function" ?
|
|
21033
|
-
|
|
21035
|
+
return typeof args[args.length - 1] == "function" ? fs5.writev(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
21036
|
+
fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
21034
21037
|
if (err) return reject(err);
|
|
21035
21038
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
21036
21039
|
});
|
|
21037
21040
|
});
|
|
21038
21041
|
};
|
|
21039
|
-
typeof
|
|
21042
|
+
typeof fs5.realpath.native == "function" ? exports.realpath.native = u(fs5.realpath.native) : process.emitWarning(
|
|
21040
21043
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
21041
21044
|
"Warning",
|
|
21042
21045
|
"fs-extra-WARN0003"
|
|
@@ -21064,15 +21067,15 @@ var require_make_dir = __commonJS({
|
|
|
21064
21067
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
21065
21068
|
"use strict";
|
|
21066
21069
|
init_cjs_shims();
|
|
21067
|
-
var
|
|
21070
|
+
var fs5 = require_fs(), { checkPath } = require_utils(), getMode = (options) => {
|
|
21068
21071
|
let defaults2 = { mode: 511 };
|
|
21069
21072
|
return typeof options == "number" ? options : { ...defaults2, ...options }.mode;
|
|
21070
21073
|
};
|
|
21071
|
-
module.exports.makeDir = async (dir, options) => (checkPath(dir),
|
|
21074
|
+
module.exports.makeDir = async (dir, options) => (checkPath(dir), fs5.mkdir(dir, {
|
|
21072
21075
|
mode: getMode(options),
|
|
21073
21076
|
recursive: !0
|
|
21074
21077
|
}));
|
|
21075
|
-
module.exports.makeDirSync = (dir, options) => (checkPath(dir),
|
|
21078
|
+
module.exports.makeDirSync = (dir, options) => (checkPath(dir), fs5.mkdirSync(dir, {
|
|
21076
21079
|
mode: getMode(options),
|
|
21077
21080
|
recursive: !0
|
|
21078
21081
|
}));
|
|
@@ -21102,13 +21105,13 @@ var require_path_exists = __commonJS({
|
|
|
21102
21105
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
21103
21106
|
"use strict";
|
|
21104
21107
|
init_cjs_shims();
|
|
21105
|
-
var u = require_universalify().fromPromise,
|
|
21108
|
+
var u = require_universalify().fromPromise, fs5 = require_fs();
|
|
21106
21109
|
function pathExists3(path8) {
|
|
21107
|
-
return
|
|
21110
|
+
return fs5.access(path8).then(() => !0).catch(() => !1);
|
|
21108
21111
|
}
|
|
21109
21112
|
module.exports = {
|
|
21110
21113
|
pathExists: u(pathExists3),
|
|
21111
|
-
pathExistsSync:
|
|
21114
|
+
pathExistsSync: fs5.existsSync
|
|
21112
21115
|
};
|
|
21113
21116
|
}
|
|
21114
21117
|
});
|
|
@@ -21118,20 +21121,20 @@ var require_utimes = __commonJS({
|
|
|
21118
21121
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
21119
21122
|
"use strict";
|
|
21120
21123
|
init_cjs_shims();
|
|
21121
|
-
var
|
|
21124
|
+
var fs5 = require_graceful_fs();
|
|
21122
21125
|
function utimesMillis(path8, atime, mtime, callback) {
|
|
21123
|
-
|
|
21126
|
+
fs5.open(path8, "r+", (err, fd) => {
|
|
21124
21127
|
if (err) return callback(err);
|
|
21125
|
-
|
|
21126
|
-
|
|
21128
|
+
fs5.futimes(fd, atime, mtime, (futimesErr) => {
|
|
21129
|
+
fs5.close(fd, (closeErr) => {
|
|
21127
21130
|
callback && callback(futimesErr || closeErr);
|
|
21128
21131
|
});
|
|
21129
21132
|
});
|
|
21130
21133
|
});
|
|
21131
21134
|
}
|
|
21132
21135
|
function utimesMillisSync(path8, atime, mtime) {
|
|
21133
|
-
let fd =
|
|
21134
|
-
return
|
|
21136
|
+
let fd = fs5.openSync(path8, "r+");
|
|
21137
|
+
return fs5.futimesSync(fd, atime, mtime), fs5.closeSync(fd);
|
|
21135
21138
|
}
|
|
21136
21139
|
module.exports = {
|
|
21137
21140
|
utimesMillis,
|
|
@@ -21145,9 +21148,9 @@ var require_stat = __commonJS({
|
|
|
21145
21148
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
21146
21149
|
"use strict";
|
|
21147
21150
|
init_cjs_shims();
|
|
21148
|
-
var
|
|
21151
|
+
var fs5 = require_fs(), path8 = __require("path"), util = __require("util");
|
|
21149
21152
|
function getStats(src, dest, opts) {
|
|
21150
|
-
let statFunc = opts.dereference ? (file) =>
|
|
21153
|
+
let statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: !0 }) : (file) => fs5.lstat(file, { bigint: !0 });
|
|
21151
21154
|
return Promise.all([
|
|
21152
21155
|
statFunc(src),
|
|
21153
21156
|
statFunc(dest).catch((err) => {
|
|
@@ -21157,7 +21160,7 @@ var require_stat = __commonJS({
|
|
|
21157
21160
|
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
21158
21161
|
}
|
|
21159
21162
|
function getStatsSync(src, dest, opts) {
|
|
21160
|
-
let destStat, statFunc = opts.dereference ? (file) =>
|
|
21163
|
+
let destStat, statFunc = opts.dereference ? (file) => fs5.statSync(file, { bigint: !0 }) : (file) => fs5.lstatSync(file, { bigint: !0 }), srcStat = statFunc(src);
|
|
21161
21164
|
try {
|
|
21162
21165
|
destStat = statFunc(dest);
|
|
21163
21166
|
} catch (err) {
|
|
@@ -21204,14 +21207,14 @@ var require_stat = __commonJS({
|
|
|
21204
21207
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
21205
21208
|
let srcParent = path8.resolve(path8.dirname(src)), destParent = path8.resolve(path8.dirname(dest));
|
|
21206
21209
|
if (destParent === srcParent || destParent === path8.parse(destParent).root) return cb();
|
|
21207
|
-
|
|
21210
|
+
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));
|
|
21208
21211
|
}
|
|
21209
21212
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
21210
21213
|
let srcParent = path8.resolve(path8.dirname(src)), destParent = path8.resolve(path8.dirname(dest));
|
|
21211
21214
|
if (destParent === srcParent || destParent === path8.parse(destParent).root) return;
|
|
21212
21215
|
let destStat;
|
|
21213
21216
|
try {
|
|
21214
|
-
destStat =
|
|
21217
|
+
destStat = fs5.statSync(destParent, { bigint: !0 });
|
|
21215
21218
|
} catch (err) {
|
|
21216
21219
|
if (err.code === "ENOENT") return;
|
|
21217
21220
|
throw err;
|
|
@@ -21246,7 +21249,7 @@ var require_copy = __commonJS({
|
|
|
21246
21249
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
21247
21250
|
"use strict";
|
|
21248
21251
|
init_cjs_shims();
|
|
21249
|
-
var
|
|
21252
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), mkdirs2 = require_mkdirs().mkdirs, pathExists3 = require_path_exists().pathExists, utimesMillis = require_utimes().utimesMillis, stat = require_stat();
|
|
21250
21253
|
function copy2(src, dest, opts, cb) {
|
|
21251
21254
|
typeof opts == "function" && !cb ? (cb = opts, opts = {}) : typeof opts == "function" && (opts = { filter: opts }), cb = cb || function() {
|
|
21252
21255
|
}, 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(
|
|
@@ -21281,18 +21284,18 @@ var require_copy = __commonJS({
|
|
|
21281
21284
|
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
|
21282
21285
|
}
|
|
21283
21286
|
function getStats(destStat, src, dest, opts, cb) {
|
|
21284
|
-
(opts.dereference ?
|
|
21287
|
+
(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}`)));
|
|
21285
21288
|
}
|
|
21286
21289
|
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
21287
21290
|
return destStat ? mayCopyFile(srcStat, src, dest, opts, cb) : copyFile2(srcStat, src, dest, opts, cb);
|
|
21288
21291
|
}
|
|
21289
21292
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
21290
21293
|
if (opts.overwrite)
|
|
21291
|
-
|
|
21294
|
+
fs5.unlink(dest, (err) => err ? cb(err) : copyFile2(srcStat, src, dest, opts, cb));
|
|
21292
21295
|
else return opts.errorOnExist ? cb(new Error(`'${dest}' already exists`)) : cb();
|
|
21293
21296
|
}
|
|
21294
21297
|
function copyFile2(srcStat, src, dest, opts, cb) {
|
|
21295
|
-
|
|
21298
|
+
fs5.copyFile(src, dest, (err) => err ? cb(err) : opts.preserveTimestamps ? handleTimestampsAndMode(srcStat.mode, src, dest, cb) : setDestMode(dest, srcStat.mode, cb));
|
|
21296
21299
|
}
|
|
21297
21300
|
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
21298
21301
|
return fileIsNotWritable(srcMode) ? makeFileWritable(dest, srcMode, (err) => err ? cb(err) : setDestTimestampsAndMode(srcMode, src, dest, cb)) : setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
@@ -21307,22 +21310,22 @@ var require_copy = __commonJS({
|
|
|
21307
21310
|
setDestTimestamps(src, dest, (err) => err ? cb(err) : setDestMode(dest, srcMode, cb));
|
|
21308
21311
|
}
|
|
21309
21312
|
function setDestMode(dest, srcMode, cb) {
|
|
21310
|
-
return
|
|
21313
|
+
return fs5.chmod(dest, srcMode, cb);
|
|
21311
21314
|
}
|
|
21312
21315
|
function setDestTimestamps(src, dest, cb) {
|
|
21313
|
-
|
|
21316
|
+
fs5.stat(src, (err, updatedSrcStat) => err ? cb(err) : utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb));
|
|
21314
21317
|
}
|
|
21315
21318
|
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
21316
21319
|
return destStat ? copyDir(src, dest, opts, cb) : mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
21317
21320
|
}
|
|
21318
21321
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
21319
|
-
|
|
21322
|
+
fs5.mkdir(dest, (err) => {
|
|
21320
21323
|
if (err) return cb(err);
|
|
21321
21324
|
copyDir(src, dest, opts, (err2) => err2 ? cb(err2) : setDestMode(dest, srcMode, cb));
|
|
21322
21325
|
});
|
|
21323
21326
|
}
|
|
21324
21327
|
function copyDir(src, dest, opts, cb) {
|
|
21325
|
-
|
|
21328
|
+
fs5.readdir(src, (err, items) => err ? cb(err) : copyDirItems(items, src, dest, opts, cb));
|
|
21326
21329
|
}
|
|
21327
21330
|
function copyDirItems(items, src, dest, opts, cb) {
|
|
21328
21331
|
let item = items.pop();
|
|
@@ -21341,16 +21344,16 @@ var require_copy = __commonJS({
|
|
|
21341
21344
|
});
|
|
21342
21345
|
}
|
|
21343
21346
|
function onLink(destStat, src, dest, opts, cb) {
|
|
21344
|
-
|
|
21347
|
+
fs5.readlink(src, (err, resolvedSrc) => {
|
|
21345
21348
|
if (err) return cb(err);
|
|
21346
21349
|
if (opts.dereference && (resolvedSrc = path8.resolve(process.cwd(), resolvedSrc)), destStat)
|
|
21347
|
-
|
|
21350
|
+
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)));
|
|
21348
21351
|
else
|
|
21349
|
-
return
|
|
21352
|
+
return fs5.symlink(resolvedSrc, dest, cb);
|
|
21350
21353
|
});
|
|
21351
21354
|
}
|
|
21352
21355
|
function copyLink(resolvedSrc, dest, cb) {
|
|
21353
|
-
|
|
21356
|
+
fs5.unlink(dest, (err) => err ? cb(err) : fs5.symlink(resolvedSrc, dest, cb));
|
|
21354
21357
|
}
|
|
21355
21358
|
module.exports = copy2;
|
|
21356
21359
|
}
|
|
@@ -21361,7 +21364,7 @@ var require_copy_sync = __commonJS({
|
|
|
21361
21364
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
21362
21365
|
"use strict";
|
|
21363
21366
|
init_cjs_shims();
|
|
21364
|
-
var
|
|
21367
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), mkdirsSync2 = require_mkdirs().mkdirsSync, utimesMillisSync = require_utimes().utimesMillisSync, stat = require_stat();
|
|
21365
21368
|
function copySync2(src, dest, opts) {
|
|
21366
21369
|
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(
|
|
21367
21370
|
`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -21373,10 +21376,10 @@ var require_copy_sync = __commonJS({
|
|
|
21373
21376
|
let { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
21374
21377
|
if (stat.checkParentPathsSync(src, srcStat, dest, "copy"), opts.filter && !opts.filter(src, dest)) return;
|
|
21375
21378
|
let destParent = path8.dirname(dest);
|
|
21376
|
-
return
|
|
21379
|
+
return fs5.existsSync(destParent) || mkdirsSync2(destParent), getStats(destStat, src, dest, opts);
|
|
21377
21380
|
}
|
|
21378
21381
|
function getStats(destStat, src, dest, opts) {
|
|
21379
|
-
let srcStat = (opts.dereference ?
|
|
21382
|
+
let srcStat = (opts.dereference ? fs5.statSync : fs5.lstatSync)(src);
|
|
21380
21383
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
21381
21384
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
21382
21385
|
if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
|
@@ -21387,12 +21390,12 @@ var require_copy_sync = __commonJS({
|
|
|
21387
21390
|
}
|
|
21388
21391
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
21389
21392
|
if (opts.overwrite)
|
|
21390
|
-
return
|
|
21393
|
+
return fs5.unlinkSync(dest), copyFile2(srcStat, src, dest, opts);
|
|
21391
21394
|
if (opts.errorOnExist)
|
|
21392
21395
|
throw new Error(`'${dest}' already exists`);
|
|
21393
21396
|
}
|
|
21394
21397
|
function copyFile2(srcStat, src, dest, opts) {
|
|
21395
|
-
return
|
|
21398
|
+
return fs5.copyFileSync(src, dest), opts.preserveTimestamps && handleTimestamps(srcStat.mode, src, dest), setDestMode(dest, srcStat.mode);
|
|
21396
21399
|
}
|
|
21397
21400
|
function handleTimestamps(srcMode, src, dest) {
|
|
21398
21401
|
return fileIsNotWritable(srcMode) && makeFileWritable(dest, srcMode), setDestTimestamps(src, dest);
|
|
@@ -21404,20 +21407,20 @@ var require_copy_sync = __commonJS({
|
|
|
21404
21407
|
return setDestMode(dest, srcMode | 128);
|
|
21405
21408
|
}
|
|
21406
21409
|
function setDestMode(dest, srcMode) {
|
|
21407
|
-
return
|
|
21410
|
+
return fs5.chmodSync(dest, srcMode);
|
|
21408
21411
|
}
|
|
21409
21412
|
function setDestTimestamps(src, dest) {
|
|
21410
|
-
let updatedSrcStat =
|
|
21413
|
+
let updatedSrcStat = fs5.statSync(src);
|
|
21411
21414
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
21412
21415
|
}
|
|
21413
21416
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
21414
21417
|
return destStat ? copyDir(src, dest, opts) : mkDirAndCopy(srcStat.mode, src, dest, opts);
|
|
21415
21418
|
}
|
|
21416
21419
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
21417
|
-
return
|
|
21420
|
+
return fs5.mkdirSync(dest), copyDir(src, dest, opts), setDestMode(dest, srcMode);
|
|
21418
21421
|
}
|
|
21419
21422
|
function copyDir(src, dest, opts) {
|
|
21420
|
-
|
|
21423
|
+
fs5.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
21421
21424
|
}
|
|
21422
21425
|
function copyDirItem(item, src, dest, opts) {
|
|
21423
21426
|
let srcItem = path8.join(src, item), destItem = path8.join(dest, item);
|
|
@@ -21426,13 +21429,13 @@ var require_copy_sync = __commonJS({
|
|
|
21426
21429
|
return getStats(destStat, srcItem, destItem, opts);
|
|
21427
21430
|
}
|
|
21428
21431
|
function onLink(destStat, src, dest, opts) {
|
|
21429
|
-
let resolvedSrc =
|
|
21432
|
+
let resolvedSrc = fs5.readlinkSync(src);
|
|
21430
21433
|
if (opts.dereference && (resolvedSrc = path8.resolve(process.cwd(), resolvedSrc)), destStat) {
|
|
21431
21434
|
let resolvedDest;
|
|
21432
21435
|
try {
|
|
21433
|
-
resolvedDest =
|
|
21436
|
+
resolvedDest = fs5.readlinkSync(dest);
|
|
21434
21437
|
} catch (err) {
|
|
21435
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
21438
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs5.symlinkSync(resolvedSrc, dest);
|
|
21436
21439
|
throw err;
|
|
21437
21440
|
}
|
|
21438
21441
|
if (opts.dereference && (resolvedDest = path8.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest))
|
|
@@ -21441,10 +21444,10 @@ var require_copy_sync = __commonJS({
|
|
|
21441
21444
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
21442
21445
|
return copyLink(resolvedSrc, dest);
|
|
21443
21446
|
} else
|
|
21444
|
-
return
|
|
21447
|
+
return fs5.symlinkSync(resolvedSrc, dest);
|
|
21445
21448
|
}
|
|
21446
21449
|
function copyLink(resolvedSrc, dest) {
|
|
21447
|
-
return
|
|
21450
|
+
return fs5.unlinkSync(dest), fs5.symlinkSync(resolvedSrc, dest);
|
|
21448
21451
|
}
|
|
21449
21452
|
module.exports = copySync2;
|
|
21450
21453
|
}
|
|
@@ -21468,12 +21471,12 @@ var require_remove = __commonJS({
|
|
|
21468
21471
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
21469
21472
|
"use strict";
|
|
21470
21473
|
init_cjs_shims();
|
|
21471
|
-
var
|
|
21474
|
+
var fs5 = require_graceful_fs(), u = require_universalify().fromCallback;
|
|
21472
21475
|
function remove2(path8, callback) {
|
|
21473
|
-
|
|
21476
|
+
fs5.rm(path8, { recursive: !0, force: !0 }, callback);
|
|
21474
21477
|
}
|
|
21475
21478
|
function removeSync2(path8) {
|
|
21476
|
-
|
|
21479
|
+
fs5.rmSync(path8, { recursive: !0, force: !0 });
|
|
21477
21480
|
}
|
|
21478
21481
|
module.exports = {
|
|
21479
21482
|
remove: u(remove2),
|
|
@@ -21487,10 +21490,10 @@ var require_empty = __commonJS({
|
|
|
21487
21490
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
21488
21491
|
"use strict";
|
|
21489
21492
|
init_cjs_shims();
|
|
21490
|
-
var u = require_universalify().fromPromise,
|
|
21493
|
+
var u = require_universalify().fromPromise, fs5 = require_fs(), path8 = __require("path"), mkdir2 = require_mkdirs(), remove2 = require_remove(), emptyDir2 = u(async function(dir) {
|
|
21491
21494
|
let items;
|
|
21492
21495
|
try {
|
|
21493
|
-
items = await
|
|
21496
|
+
items = await fs5.readdir(dir);
|
|
21494
21497
|
} catch {
|
|
21495
21498
|
return mkdir2.mkdirs(dir);
|
|
21496
21499
|
}
|
|
@@ -21499,7 +21502,7 @@ var require_empty = __commonJS({
|
|
|
21499
21502
|
function emptyDirSync2(dir) {
|
|
21500
21503
|
let items;
|
|
21501
21504
|
try {
|
|
21502
|
-
items =
|
|
21505
|
+
items = fs5.readdirSync(dir);
|
|
21503
21506
|
} catch {
|
|
21504
21507
|
return mkdir2.mkdirsSync(dir);
|
|
21505
21508
|
}
|
|
@@ -21521,24 +21524,24 @@ var require_file = __commonJS({
|
|
|
21521
21524
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
21522
21525
|
"use strict";
|
|
21523
21526
|
init_cjs_shims();
|
|
21524
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
21527
|
+
var u = require_universalify().fromCallback, path8 = __require("path"), fs5 = require_graceful_fs(), mkdir2 = require_mkdirs();
|
|
21525
21528
|
function createFile2(file, callback) {
|
|
21526
21529
|
function makeFile() {
|
|
21527
|
-
|
|
21530
|
+
fs5.writeFile(file, "", (err) => {
|
|
21528
21531
|
if (err) return callback(err);
|
|
21529
21532
|
callback();
|
|
21530
21533
|
});
|
|
21531
21534
|
}
|
|
21532
|
-
|
|
21535
|
+
fs5.stat(file, (err, stats) => {
|
|
21533
21536
|
if (!err && stats.isFile()) return callback();
|
|
21534
21537
|
let dir = path8.dirname(file);
|
|
21535
|
-
|
|
21538
|
+
fs5.stat(dir, (err2, stats2) => {
|
|
21536
21539
|
if (err2)
|
|
21537
21540
|
return err2.code === "ENOENT" ? mkdir2.mkdirs(dir, (err3) => {
|
|
21538
21541
|
if (err3) return callback(err3);
|
|
21539
21542
|
makeFile();
|
|
21540
21543
|
}) : callback(err2);
|
|
21541
|
-
stats2.isDirectory() ? makeFile() :
|
|
21544
|
+
stats2.isDirectory() ? makeFile() : fs5.readdir(dir, (err3) => {
|
|
21542
21545
|
if (err3) return callback(err3);
|
|
21543
21546
|
});
|
|
21544
21547
|
});
|
|
@@ -21547,18 +21550,18 @@ var require_file = __commonJS({
|
|
|
21547
21550
|
function createFileSync2(file) {
|
|
21548
21551
|
let stats;
|
|
21549
21552
|
try {
|
|
21550
|
-
stats =
|
|
21553
|
+
stats = fs5.statSync(file);
|
|
21551
21554
|
} catch {
|
|
21552
21555
|
}
|
|
21553
21556
|
if (stats && stats.isFile()) return;
|
|
21554
21557
|
let dir = path8.dirname(file);
|
|
21555
21558
|
try {
|
|
21556
|
-
|
|
21559
|
+
fs5.statSync(dir).isDirectory() || fs5.readdirSync(dir);
|
|
21557
21560
|
} catch (err) {
|
|
21558
21561
|
if (err && err.code === "ENOENT") mkdir2.mkdirsSync(dir);
|
|
21559
21562
|
else throw err;
|
|
21560
21563
|
}
|
|
21561
|
-
|
|
21564
|
+
fs5.writeFileSync(file, "");
|
|
21562
21565
|
}
|
|
21563
21566
|
module.exports = {
|
|
21564
21567
|
createFile: u(createFile2),
|
|
@@ -21572,16 +21575,16 @@ var require_link = __commonJS({
|
|
|
21572
21575
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
21573
21576
|
"use strict";
|
|
21574
21577
|
init_cjs_shims();
|
|
21575
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
21578
|
+
var u = require_universalify().fromCallback, path8 = __require("path"), fs5 = require_graceful_fs(), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
|
|
21576
21579
|
function createLink2(srcpath, dstpath, callback) {
|
|
21577
21580
|
function makeLink(srcpath2, dstpath2) {
|
|
21578
|
-
|
|
21581
|
+
fs5.link(srcpath2, dstpath2, (err) => {
|
|
21579
21582
|
if (err) return callback(err);
|
|
21580
21583
|
callback(null);
|
|
21581
21584
|
});
|
|
21582
21585
|
}
|
|
21583
|
-
|
|
21584
|
-
|
|
21586
|
+
fs5.lstat(dstpath, (_2, dstStat) => {
|
|
21587
|
+
fs5.lstat(srcpath, (err, srcStat) => {
|
|
21585
21588
|
if (err)
|
|
21586
21589
|
return err.message = err.message.replace("lstat", "ensureLink"), callback(err);
|
|
21587
21590
|
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
|
@@ -21600,17 +21603,17 @@ var require_link = __commonJS({
|
|
|
21600
21603
|
function createLinkSync2(srcpath, dstpath) {
|
|
21601
21604
|
let dstStat;
|
|
21602
21605
|
try {
|
|
21603
|
-
dstStat =
|
|
21606
|
+
dstStat = fs5.lstatSync(dstpath);
|
|
21604
21607
|
} catch {
|
|
21605
21608
|
}
|
|
21606
21609
|
try {
|
|
21607
|
-
let srcStat =
|
|
21610
|
+
let srcStat = fs5.lstatSync(srcpath);
|
|
21608
21611
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
21609
21612
|
} catch (err) {
|
|
21610
21613
|
throw err.message = err.message.replace("lstat", "ensureLink"), err;
|
|
21611
21614
|
}
|
|
21612
21615
|
let dir = path8.dirname(dstpath);
|
|
21613
|
-
return
|
|
21616
|
+
return fs5.existsSync(dir) || mkdir2.mkdirsSync(dir), fs5.linkSync(srcpath, dstpath);
|
|
21614
21617
|
}
|
|
21615
21618
|
module.exports = {
|
|
21616
21619
|
createLink: u(createLink2),
|
|
@@ -21624,10 +21627,10 @@ var require_symlink_paths = __commonJS({
|
|
|
21624
21627
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
21625
21628
|
"use strict";
|
|
21626
21629
|
init_cjs_shims();
|
|
21627
|
-
var path8 = __require("path"),
|
|
21630
|
+
var path8 = __require("path"), fs5 = require_graceful_fs(), pathExists3 = require_path_exists().pathExists;
|
|
21628
21631
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
21629
21632
|
if (path8.isAbsolute(srcpath))
|
|
21630
|
-
return
|
|
21633
|
+
return fs5.lstat(srcpath, (err) => err ? (err.message = err.message.replace("lstat", "ensureSymlink"), callback(err)) : callback(null, {
|
|
21631
21634
|
toCwd: srcpath,
|
|
21632
21635
|
toDst: srcpath
|
|
21633
21636
|
}));
|
|
@@ -21636,7 +21639,7 @@ var require_symlink_paths = __commonJS({
|
|
|
21636
21639
|
return pathExists3(relativeToDst, (err, exists) => err ? callback(err) : exists ? callback(null, {
|
|
21637
21640
|
toCwd: relativeToDst,
|
|
21638
21641
|
toDst: srcpath
|
|
21639
|
-
}) :
|
|
21642
|
+
}) : fs5.lstat(srcpath, (err2) => err2 ? (err2.message = err2.message.replace("lstat", "ensureSymlink"), callback(err2)) : callback(null, {
|
|
21640
21643
|
toCwd: srcpath,
|
|
21641
21644
|
toDst: path8.relative(dstdir, srcpath)
|
|
21642
21645
|
})));
|
|
@@ -21645,19 +21648,19 @@ var require_symlink_paths = __commonJS({
|
|
|
21645
21648
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
21646
21649
|
let exists;
|
|
21647
21650
|
if (path8.isAbsolute(srcpath)) {
|
|
21648
|
-
if (exists =
|
|
21651
|
+
if (exists = fs5.existsSync(srcpath), !exists) throw new Error("absolute srcpath does not exist");
|
|
21649
21652
|
return {
|
|
21650
21653
|
toCwd: srcpath,
|
|
21651
21654
|
toDst: srcpath
|
|
21652
21655
|
};
|
|
21653
21656
|
} else {
|
|
21654
21657
|
let dstdir = path8.dirname(dstpath), relativeToDst = path8.join(dstdir, srcpath);
|
|
21655
|
-
if (exists =
|
|
21658
|
+
if (exists = fs5.existsSync(relativeToDst), exists)
|
|
21656
21659
|
return {
|
|
21657
21660
|
toCwd: relativeToDst,
|
|
21658
21661
|
toDst: srcpath
|
|
21659
21662
|
};
|
|
21660
|
-
if (exists =
|
|
21663
|
+
if (exists = fs5.existsSync(srcpath), !exists) throw new Error("relative srcpath does not exist");
|
|
21661
21664
|
return {
|
|
21662
21665
|
toCwd: srcpath,
|
|
21663
21666
|
toDst: path8.relative(dstdir, srcpath)
|
|
@@ -21676,10 +21679,10 @@ var require_symlink_type = __commonJS({
|
|
|
21676
21679
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
21677
21680
|
"use strict";
|
|
21678
21681
|
init_cjs_shims();
|
|
21679
|
-
var
|
|
21682
|
+
var fs5 = require_graceful_fs();
|
|
21680
21683
|
function symlinkType(srcpath, type, callback) {
|
|
21681
21684
|
if (callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, type) return callback(null, type);
|
|
21682
|
-
|
|
21685
|
+
fs5.lstat(srcpath, (err, stats) => {
|
|
21683
21686
|
if (err) return callback(null, "file");
|
|
21684
21687
|
type = stats && stats.isDirectory() ? "dir" : "file", callback(null, type);
|
|
21685
21688
|
});
|
|
@@ -21688,7 +21691,7 @@ var require_symlink_type = __commonJS({
|
|
|
21688
21691
|
let stats;
|
|
21689
21692
|
if (type) return type;
|
|
21690
21693
|
try {
|
|
21691
|
-
stats =
|
|
21694
|
+
stats = fs5.lstatSync(srcpath);
|
|
21692
21695
|
} catch {
|
|
21693
21696
|
return "file";
|
|
21694
21697
|
}
|
|
@@ -21706,12 +21709,12 @@ var require_symlink = __commonJS({
|
|
|
21706
21709
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
21707
21710
|
"use strict";
|
|
21708
21711
|
init_cjs_shims();
|
|
21709
|
-
var u = require_universalify().fromCallback, path8 = __require("path"),
|
|
21712
|
+
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();
|
|
21710
21713
|
function createSymlink2(srcpath, dstpath, type, callback) {
|
|
21711
|
-
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type,
|
|
21714
|
+
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, fs5.lstat(dstpath, (err, stats) => {
|
|
21712
21715
|
!err && stats.isSymbolicLink() ? Promise.all([
|
|
21713
|
-
|
|
21714
|
-
|
|
21716
|
+
fs5.stat(srcpath),
|
|
21717
|
+
fs5.stat(dstpath)
|
|
21715
21718
|
]).then(([srcStat, dstStat]) => {
|
|
21716
21719
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
21717
21720
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
@@ -21726,10 +21729,10 @@ var require_symlink = __commonJS({
|
|
|
21726
21729
|
let dir = path8.dirname(dstpath);
|
|
21727
21730
|
pathExists3(dir, (err3, dirExists) => {
|
|
21728
21731
|
if (err3) return callback(err3);
|
|
21729
|
-
if (dirExists) return
|
|
21732
|
+
if (dirExists) return fs5.symlink(srcpath, dstpath, type2, callback);
|
|
21730
21733
|
mkdirs2(dir, (err4) => {
|
|
21731
21734
|
if (err4) return callback(err4);
|
|
21732
|
-
|
|
21735
|
+
fs5.symlink(srcpath, dstpath, type2, callback);
|
|
21733
21736
|
});
|
|
21734
21737
|
});
|
|
21735
21738
|
});
|
|
@@ -21738,17 +21741,17 @@ var require_symlink = __commonJS({
|
|
|
21738
21741
|
function createSymlinkSync2(srcpath, dstpath, type) {
|
|
21739
21742
|
let stats;
|
|
21740
21743
|
try {
|
|
21741
|
-
stats =
|
|
21744
|
+
stats = fs5.lstatSync(dstpath);
|
|
21742
21745
|
} catch {
|
|
21743
21746
|
}
|
|
21744
21747
|
if (stats && stats.isSymbolicLink()) {
|
|
21745
|
-
let srcStat =
|
|
21748
|
+
let srcStat = fs5.statSync(srcpath), dstStat = fs5.statSync(dstpath);
|
|
21746
21749
|
if (areIdentical(srcStat, dstStat)) return;
|
|
21747
21750
|
}
|
|
21748
21751
|
let relative = symlinkPathsSync(srcpath, dstpath);
|
|
21749
21752
|
srcpath = relative.toDst, type = symlinkTypeSync(relative.toCwd, type);
|
|
21750
21753
|
let dir = path8.dirname(dstpath);
|
|
21751
|
-
return
|
|
21754
|
+
return fs5.existsSync(dir) || mkdirsSync2(dir), fs5.symlinkSync(srcpath, dstpath, type);
|
|
21752
21755
|
}
|
|
21753
21756
|
module.exports = {
|
|
21754
21757
|
createSymlink: u(createSymlink2),
|
|
@@ -21787,10 +21790,10 @@ var require_ensure = __commonJS({
|
|
|
21787
21790
|
var require_utils2 = __commonJS({
|
|
21788
21791
|
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
|
|
21789
21792
|
init_cjs_shims();
|
|
21790
|
-
function stringify(obj, { EOL = `
|
|
21793
|
+
function stringify(obj, { EOL: EOL2 = `
|
|
21791
21794
|
`, finalEOL = !0, replacer = null, spaces } = {}) {
|
|
21792
|
-
let EOF = finalEOL ?
|
|
21793
|
-
return JSON.stringify(obj, replacer, spaces).replace(/\n/g,
|
|
21795
|
+
let EOF = finalEOL ? EOL2 : "";
|
|
21796
|
+
return JSON.stringify(obj, replacer, spaces).replace(/\n/g, EOL2) + EOF;
|
|
21794
21797
|
}
|
|
21795
21798
|
function stripBom(content) {
|
|
21796
21799
|
return Buffer.isBuffer(content) && (content = content.toString("utf8")), content.replace(/^\uFEFF/, "");
|
|
@@ -21812,7 +21815,7 @@ var require_jsonfile = __commonJS({
|
|
|
21812
21815
|
var universalify = require_universalify(), { stringify, stripBom } = require_utils2();
|
|
21813
21816
|
async function _readFile(file, options = {}) {
|
|
21814
21817
|
typeof options == "string" && (options = { encoding: options });
|
|
21815
|
-
let
|
|
21818
|
+
let fs5 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0, data = await universalify.fromCallback(fs5.readFile)(file, options);
|
|
21816
21819
|
data = stripBom(data);
|
|
21817
21820
|
let obj;
|
|
21818
21821
|
try {
|
|
@@ -21827,9 +21830,9 @@ var require_jsonfile = __commonJS({
|
|
|
21827
21830
|
var readFile2 = universalify.fromPromise(_readFile);
|
|
21828
21831
|
function readFileSync4(file, options = {}) {
|
|
21829
21832
|
typeof options == "string" && (options = { encoding: options });
|
|
21830
|
-
let
|
|
21833
|
+
let fs5 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0;
|
|
21831
21834
|
try {
|
|
21832
|
-
let content =
|
|
21835
|
+
let content = fs5.readFileSync(file, options);
|
|
21833
21836
|
return content = stripBom(content), JSON.parse(content, options.reviver);
|
|
21834
21837
|
} catch (err) {
|
|
21835
21838
|
if (shouldThrow)
|
|
@@ -21838,13 +21841,13 @@ var require_jsonfile = __commonJS({
|
|
|
21838
21841
|
}
|
|
21839
21842
|
}
|
|
21840
21843
|
async function _writeFile(file, obj, options = {}) {
|
|
21841
|
-
let
|
|
21842
|
-
await universalify.fromCallback(
|
|
21844
|
+
let fs5 = options.fs || _fs, str = stringify(obj, options);
|
|
21845
|
+
await universalify.fromCallback(fs5.writeFile)(file, str, options);
|
|
21843
21846
|
}
|
|
21844
21847
|
var writeFile2 = universalify.fromPromise(_writeFile);
|
|
21845
21848
|
function writeFileSync2(file, obj, options = {}) {
|
|
21846
|
-
let
|
|
21847
|
-
return
|
|
21849
|
+
let fs5 = options.fs || _fs, str = stringify(obj, options);
|
|
21850
|
+
return fs5.writeFileSync(file, str, options);
|
|
21848
21851
|
}
|
|
21849
21852
|
var jsonfile = {
|
|
21850
21853
|
readFile: readFile2,
|
|
@@ -21877,24 +21880,24 @@ var require_output_file = __commonJS({
|
|
|
21877
21880
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
21878
21881
|
"use strict";
|
|
21879
21882
|
init_cjs_shims();
|
|
21880
|
-
var u = require_universalify().fromCallback,
|
|
21883
|
+
var u = require_universalify().fromCallback, fs5 = require_graceful_fs(), path8 = __require("path"), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists;
|
|
21881
21884
|
function outputFile2(file, data, encoding, callback) {
|
|
21882
21885
|
typeof encoding == "function" && (callback = encoding, encoding = "utf8");
|
|
21883
21886
|
let dir = path8.dirname(file);
|
|
21884
21887
|
pathExists3(dir, (err, itDoes) => {
|
|
21885
21888
|
if (err) return callback(err);
|
|
21886
|
-
if (itDoes) return
|
|
21889
|
+
if (itDoes) return fs5.writeFile(file, data, encoding, callback);
|
|
21887
21890
|
mkdir2.mkdirs(dir, (err2) => {
|
|
21888
21891
|
if (err2) return callback(err2);
|
|
21889
|
-
|
|
21892
|
+
fs5.writeFile(file, data, encoding, callback);
|
|
21890
21893
|
});
|
|
21891
21894
|
});
|
|
21892
21895
|
}
|
|
21893
21896
|
function outputFileSync2(file, ...args) {
|
|
21894
21897
|
let dir = path8.dirname(file);
|
|
21895
|
-
if (
|
|
21896
|
-
return
|
|
21897
|
-
mkdir2.mkdirsSync(dir),
|
|
21898
|
+
if (fs5.existsSync(dir))
|
|
21899
|
+
return fs5.writeFileSync(file, ...args);
|
|
21900
|
+
mkdir2.mkdirsSync(dir), fs5.writeFileSync(file, ...args);
|
|
21898
21901
|
}
|
|
21899
21902
|
module.exports = {
|
|
21900
21903
|
outputFile: u(outputFile2),
|
|
@@ -21954,7 +21957,7 @@ var require_move = __commonJS({
|
|
|
21954
21957
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
21955
21958
|
"use strict";
|
|
21956
21959
|
init_cjs_shims();
|
|
21957
|
-
var
|
|
21960
|
+
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();
|
|
21958
21961
|
function move2(src, dest, opts, cb) {
|
|
21959
21962
|
typeof opts == "function" && (cb = opts, opts = {}), opts = opts || {};
|
|
21960
21963
|
let overwrite = opts.overwrite || opts.clobber || !1;
|
|
@@ -21979,7 +21982,7 @@ var require_move = __commonJS({
|
|
|
21979
21982
|
pathExists3(dest, (err, destExists) => err ? cb(err) : destExists ? cb(new Error("dest already exists.")) : rename(src, dest, overwrite, cb));
|
|
21980
21983
|
}
|
|
21981
21984
|
function rename(src, dest, overwrite, cb) {
|
|
21982
|
-
|
|
21985
|
+
fs5.rename(src, dest, (err) => err ? err.code !== "EXDEV" ? cb(err) : moveAcrossDevice(src, dest, overwrite, cb) : cb());
|
|
21983
21986
|
}
|
|
21984
21987
|
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
21985
21988
|
copy2(src, dest, {
|
|
@@ -21996,7 +21999,7 @@ var require_move_sync = __commonJS({
|
|
|
21996
21999
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
21997
22000
|
"use strict";
|
|
21998
22001
|
init_cjs_shims();
|
|
21999
|
-
var
|
|
22002
|
+
var fs5 = require_graceful_fs(), path8 = __require("path"), copySync2 = require_copy2().copySync, removeSync2 = require_remove().removeSync, mkdirpSync2 = require_mkdirs().mkdirpSync, stat = require_stat();
|
|
22000
22003
|
function moveSync2(src, dest, opts) {
|
|
22001
22004
|
opts = opts || {};
|
|
22002
22005
|
let overwrite = opts.overwrite || opts.clobber || !1, { srcStat, isChangingCase = !1 } = stat.checkPathsSync(src, dest, "move", opts);
|
|
@@ -22010,12 +22013,12 @@ var require_move_sync = __commonJS({
|
|
|
22010
22013
|
if (isChangingCase) return rename(src, dest, overwrite);
|
|
22011
22014
|
if (overwrite)
|
|
22012
22015
|
return removeSync2(dest), rename(src, dest, overwrite);
|
|
22013
|
-
if (
|
|
22016
|
+
if (fs5.existsSync(dest)) throw new Error("dest already exists.");
|
|
22014
22017
|
return rename(src, dest, overwrite);
|
|
22015
22018
|
}
|
|
22016
22019
|
function rename(src, dest, overwrite) {
|
|
22017
22020
|
try {
|
|
22018
|
-
|
|
22021
|
+
fs5.renameSync(src, dest);
|
|
22019
22022
|
} catch (err) {
|
|
22020
22023
|
if (err.code !== "EXDEV") throw err;
|
|
22021
22024
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -22044,19 +22047,6 @@ var require_move2 = __commonJS({
|
|
|
22044
22047
|
}
|
|
22045
22048
|
});
|
|
22046
22049
|
|
|
22047
|
-
// ../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js
|
|
22048
|
-
var require_temp_dir = __commonJS({
|
|
22049
|
-
"../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports, module) {
|
|
22050
|
-
"use strict";
|
|
22051
|
-
init_cjs_shims();
|
|
22052
|
-
var fs4 = __require("fs"), os4 = __require("os"), tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
|
|
22053
|
-
global[tempDirectorySymbol] || Object.defineProperty(global, tempDirectorySymbol, {
|
|
22054
|
-
value: fs4.realpathSync(os4.tmpdir())
|
|
22055
|
-
});
|
|
22056
|
-
module.exports = global[tempDirectorySymbol];
|
|
22057
|
-
}
|
|
22058
|
-
});
|
|
22059
|
-
|
|
22060
22050
|
// ../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js
|
|
22061
22051
|
var require_util = __commonJS({
|
|
22062
22052
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/util.js"(exports, module) {
|
|
@@ -22190,8 +22180,8 @@ var require_getmacaddress_unix = __commonJS({
|
|
|
22190
22180
|
var require_getmacaddress = __commonJS({
|
|
22191
22181
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getmacaddress.js"(exports, module) {
|
|
22192
22182
|
init_cjs_shims();
|
|
22193
|
-
var
|
|
22194
|
-
switch (
|
|
22183
|
+
var os6 = __require("os"), _getMacAddress, _validIfaceRegExp = "^[a-z0-9]+$";
|
|
22184
|
+
switch (os6.platform()) {
|
|
22195
22185
|
case "win32":
|
|
22196
22186
|
_validIfaceRegExp = "^[a-z0-9 -]+$", _getMacAddress = require_getmacaddress_windows();
|
|
22197
22187
|
break;
|
|
@@ -22295,8 +22285,8 @@ var require_getallinterfaces_unix = __commonJS({
|
|
|
22295
22285
|
var require_getallinterfaces = __commonJS({
|
|
22296
22286
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getallinterfaces.js"(exports, module) {
|
|
22297
22287
|
init_cjs_shims();
|
|
22298
|
-
var
|
|
22299
|
-
switch (
|
|
22288
|
+
var os6 = __require("os"), _getAllInterfaces;
|
|
22289
|
+
switch (os6.platform()) {
|
|
22300
22290
|
case "win32":
|
|
22301
22291
|
_getAllInterfaces = require_getallinterfaces_windows();
|
|
22302
22292
|
break;
|
|
@@ -22320,11 +22310,11 @@ var require_getallinterfaces = __commonJS({
|
|
|
22320
22310
|
var require_networkinterfaces = __commonJS({
|
|
22321
22311
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/networkinterfaces.js"(exports, module) {
|
|
22322
22312
|
init_cjs_shims();
|
|
22323
|
-
var
|
|
22313
|
+
var os6 = __require("os");
|
|
22324
22314
|
module.exports = function() {
|
|
22325
22315
|
var allAddresses = {};
|
|
22326
22316
|
try {
|
|
22327
|
-
var ifaces =
|
|
22317
|
+
var ifaces = os6.networkInterfaces();
|
|
22328
22318
|
} catch (e) {
|
|
22329
22319
|
if (e.syscall === "uv_interface_addresses")
|
|
22330
22320
|
return allAddresses;
|
|
@@ -22468,7 +22458,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
22468
22458
|
try {
|
|
22469
22459
|
await getAndSet();
|
|
22470
22460
|
} catch (error) {
|
|
22471
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
22461
|
+
let { sendErrorToBugsnag } = await import("./error-handler-N6P2X42R.js");
|
|
22472
22462
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
22473
22463
|
}
|
|
22474
22464
|
}, durationStack = [];
|
|
@@ -22486,7 +22476,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
22486
22476
|
let end = performance2.now();
|
|
22487
22477
|
end = Math.max(start, end);
|
|
22488
22478
|
let wallClockDuration = Math.max(end - start, 0), childDurations = durationStack.pop(), duration = Math.max(wallClockDuration - childDurations, 0);
|
|
22489
|
-
durationStack.length > 0 && (durationStack[durationStack.length - 1]
|
|
22479
|
+
durationStack.length > 0 && (durationStack[durationStack.length - 1] = (durationStack[durationStack.length - 1] ?? 0) + wallClockDuration), performance2.measure(`${field}#measurable`, {
|
|
22490
22480
|
start,
|
|
22491
22481
|
duration
|
|
22492
22482
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -22520,7 +22510,7 @@ init_cjs_shims();
|
|
|
22520
22510
|
var import_react10 = __toESM(require_react(), 1), import_throttle = __toESM(require_throttle(), 1);
|
|
22521
22511
|
import process11 from "node:process";
|
|
22522
22512
|
|
|
22523
|
-
// ../../node_modules/.pnpm/ansi-escapes@6.2.
|
|
22513
|
+
// ../../node_modules/.pnpm/ansi-escapes@6.2.1/node_modules/ansi-escapes/index.js
|
|
22524
22514
|
init_cjs_shims();
|
|
22525
22515
|
import process2 from "node:process";
|
|
22526
22516
|
var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isBrowser = typeof window < "u" && typeof window.document < "u", isTerminalApp = !isBrowser && process2.env.TERM_PROGRAM === "Apple_Terminal", isWindows = !isBrowser && process2.platform === "win32", cwdFunction = isBrowser ? () => {
|
|
@@ -24074,7 +24064,7 @@ var applyPositionStyles = (node, style) => {
|
|
|
24074
24064
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.2.0/node_modules/ink/build/reconciler.js
|
|
24075
24065
|
if (process3.env.DEV === "true")
|
|
24076
24066
|
try {
|
|
24077
|
-
await import("./devtools-
|
|
24067
|
+
await import("./devtools-6LOQORRT.js");
|
|
24078
24068
|
} catch (error) {
|
|
24079
24069
|
if (error.code === "MODULE_NOT_FOUND")
|
|
24080
24070
|
console.warn(`
|
|
@@ -24265,10 +24255,10 @@ var getMaxWidth = (yogaNode) => yogaNode.getComputedWidth() - yogaNode.getComput
|
|
|
24265
24255
|
init_cjs_shims();
|
|
24266
24256
|
var import_cli_boxes = __toESM(require_cli_boxes(), 1);
|
|
24267
24257
|
|
|
24268
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
24258
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
|
|
24269
24259
|
init_cjs_shims();
|
|
24270
24260
|
|
|
24271
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
24261
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
24272
24262
|
init_cjs_shims();
|
|
24273
24263
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles3 = {
|
|
24274
24264
|
modifier: {
|
|
@@ -24409,7 +24399,7 @@ function assembleStyles2() {
|
|
|
24409
24399
|
}
|
|
24410
24400
|
var ansiStyles2 = assembleStyles2(), ansi_styles_default2 = ansiStyles2;
|
|
24411
24401
|
|
|
24412
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
24402
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
24413
24403
|
init_cjs_shims();
|
|
24414
24404
|
import process4 from "node:process";
|
|
24415
24405
|
import os from "node:os";
|
|
@@ -24456,7 +24446,7 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
|
24456
24446
|
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
|
|
24457
24447
|
}
|
|
24458
24448
|
if ("CI" in env)
|
|
24459
|
-
return "GITHUB_ACTIONS"
|
|
24449
|
+
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship" ? 1 : min;
|
|
24460
24450
|
if ("TEAMCITY_VERSION" in env)
|
|
24461
24451
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
24462
24452
|
if (env.COLORTERM === "truecolor" || env.TERM === "xterm-kitty")
|
|
@@ -24484,7 +24474,7 @@ var supportsColor = {
|
|
|
24484
24474
|
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
24485
24475
|
}, supports_color_default = supportsColor;
|
|
24486
24476
|
|
|
24487
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
24477
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/utilities.js
|
|
24488
24478
|
init_cjs_shims();
|
|
24489
24479
|
function stringReplaceAll(string, substring, replacer) {
|
|
24490
24480
|
let index = string.indexOf(substring);
|
|
@@ -24508,7 +24498,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
24508
24498
|
return returnValue += string.slice(endIndex), returnValue;
|
|
24509
24499
|
}
|
|
24510
24500
|
|
|
24511
|
-
// ../../node_modules/.pnpm/chalk@5.
|
|
24501
|
+
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/index.js
|
|
24512
24502
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default, GENERATOR = Symbol("GENERATOR"), STYLER = Symbol("STYLER"), IS_EMPTY = Symbol("IS_EMPTY"), levelMapping = [
|
|
24513
24503
|
"ansi",
|
|
24514
24504
|
"ansi",
|
|
@@ -26865,29 +26855,42 @@ var import_react32 = __toESM(require_react(), 1), DOT = "\u2022", List = ({ titl
|
|
|
26865
26855
|
);
|
|
26866
26856
|
};
|
|
26867
26857
|
|
|
26858
|
+
// ../cli-kit/dist/private/node/ui/components/TabularData.js
|
|
26859
|
+
init_cjs_shims();
|
|
26860
|
+
var import_react33 = __toESM(require_react(), 1), TabularData = ({ tabularData: data, firstColumnSubdued }) => {
|
|
26861
|
+
let columnWidths = data.reduce((acc, row) => (row.forEach((cell, index) => {
|
|
26862
|
+
acc[index] = Math.max(acc[index] ?? 0, unstyled(tokenItemToString(cell)).length);
|
|
26863
|
+
}), acc), []);
|
|
26864
|
+
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(
|
|
26865
|
+
Box_default,
|
|
26866
|
+
{ key: index2, width: columnWidths[index2] ?? 0, flexShrink: index2 === 0 ? 0 : 1 },
|
|
26867
|
+
import_react33.default.createElement(TokenizedText, { item: index2 === 0 && firstColumnSubdued && typeof cell == "string" ? { subdued: cell } : cell })
|
|
26868
|
+
)))));
|
|
26869
|
+
};
|
|
26870
|
+
|
|
26868
26871
|
// ../cli-kit/dist/private/node/ui/components/Alert.js
|
|
26869
|
-
var
|
|
26872
|
+
var import_react34 = __toESM(require_react(), 1), Alert = ({ type, headline, body, nextSteps, reference, link: link2, customSections, orderedNextSteps = !1 }) => import_react34.default.createElement(
|
|
26870
26873
|
Banner,
|
|
26871
26874
|
{ type },
|
|
26872
|
-
headline ?
|
|
26875
|
+
headline ? import_react34.default.createElement(
|
|
26873
26876
|
Text,
|
|
26874
26877
|
{ bold: !0 },
|
|
26875
|
-
|
|
26878
|
+
import_react34.default.createElement(TokenizedText, { item: headline })
|
|
26876
26879
|
) : null,
|
|
26877
|
-
body ?
|
|
26878
|
-
nextSteps && nextSteps.length > 0 ?
|
|
26879
|
-
reference && reference.length > 0 ?
|
|
26880
|
-
link2 ?
|
|
26881
|
-
customSections && customSections.length > 0 ?
|
|
26880
|
+
body ? import_react34.default.createElement(TokenizedText, { item: body }) : null,
|
|
26881
|
+
nextSteps && nextSteps.length > 0 ? import_react34.default.createElement(List, { title: "Next steps", items: nextSteps, ordered: orderedNextSteps }) : null,
|
|
26882
|
+
reference && reference.length > 0 ? import_react34.default.createElement(List, { title: "Reference", items: reference }) : null,
|
|
26883
|
+
link2 ? import_react34.default.createElement(Link, { url: link2.url, label: link2.label }) : null,
|
|
26884
|
+
customSections && customSections.length > 0 ? import_react34.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, customSections.map((section, index) => import_react34.default.createElement(
|
|
26882
26885
|
Box_default,
|
|
26883
26886
|
{ key: index, flexDirection: "column" },
|
|
26884
|
-
section.title ?
|
|
26885
|
-
|
|
26887
|
+
section.title ? import_react34.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
26888
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react34.default.createElement(TabularData, { ...section.body }) : import_react34.default.createElement(TokenizedText, { item: section.body })
|
|
26886
26889
|
))) : null
|
|
26887
26890
|
);
|
|
26888
26891
|
|
|
26889
26892
|
// ../cli-kit/dist/private/node/ui/alert.js
|
|
26890
|
-
var
|
|
26893
|
+
var import_react35 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
26891
26894
|
info: "info",
|
|
26892
26895
|
warning: "warn",
|
|
26893
26896
|
success: "info",
|
|
@@ -26900,54 +26903,54 @@ var import_react34 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
|
26900
26903
|
};
|
|
26901
26904
|
function alert({ type, headline, body, nextSteps, reference, link: link2, customSections, orderedNextSteps = !1, renderOptions }) {
|
|
26902
26905
|
let { type: alertType, ..._eventProps } = arguments[0];
|
|
26903
|
-
return renderOnce(
|
|
26906
|
+
return renderOnce(import_react35.default.createElement(Alert, { type, headline, body, nextSteps, reference, link: link2, orderedNextSteps, customSections }), { logLevel: typeToLogLevel[type], logger: typeToLogger[type], renderOptions });
|
|
26904
26907
|
}
|
|
26905
26908
|
|
|
26906
26909
|
// ../cli-kit/dist/private/node/ui/components/FatalError.js
|
|
26907
26910
|
init_cjs_shims();
|
|
26908
|
-
var
|
|
26911
|
+
var import_react36 = __toESM(require_react(), 1), import_stacktracey = __toESM(require_stacktracey(), 1), FatalError = ({ error }) => {
|
|
26909
26912
|
let stack, tool;
|
|
26910
26913
|
return error instanceof BugError && (stack = new import_stacktracey.default(error), stack.items.forEach((item) => {
|
|
26911
26914
|
item.file = cleanSingleStackTracePath(item.file);
|
|
26912
26915
|
}), stack = stack.withSources(), stack = stack.filter((entry) => !entry.file.includes("@oclif/core")).map((item) => {
|
|
26913
26916
|
let fileShortComponents = item.fileShort.split("packages/");
|
|
26914
26917
|
return item.fileShort = fileShortComponents.length === 2 ? fileShortComponents[1] : fileShortComponents[0], item;
|
|
26915
|
-
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`),
|
|
26918
|
+
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`), import_react36.default.createElement(
|
|
26916
26919
|
Banner,
|
|
26917
26920
|
{ type: tool ? "external_error" : "error" },
|
|
26918
|
-
tool ?
|
|
26921
|
+
tool ? import_react36.default.createElement(
|
|
26919
26922
|
Text,
|
|
26920
26923
|
null,
|
|
26921
26924
|
"Error coming from ",
|
|
26922
|
-
|
|
26925
|
+
import_react36.default.createElement(Command, { command: tool })
|
|
26923
26926
|
) : null,
|
|
26924
|
-
error.formattedMessage ?
|
|
26925
|
-
error.tryMessage ?
|
|
26926
|
-
error.nextSteps && error.nextSteps.length > 0 ?
|
|
26927
|
-
error.customSections && error.customSections.length > 0 ?
|
|
26927
|
+
error.formattedMessage ? import_react36.default.createElement(TokenizedText, { item: error.formattedMessage }) : import_react36.default.createElement(Text, null, error.message),
|
|
26928
|
+
error.tryMessage ? import_react36.default.createElement(TokenizedText, { item: error.tryMessage }) : null,
|
|
26929
|
+
error.nextSteps && error.nextSteps.length > 0 ? import_react36.default.createElement(List, { title: "Next steps", items: error.nextSteps }) : null,
|
|
26930
|
+
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(
|
|
26928
26931
|
Box_default,
|
|
26929
26932
|
{ key: index, flexDirection: "column" },
|
|
26930
|
-
section.title ?
|
|
26931
|
-
|
|
26933
|
+
section.title ? import_react36.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
26934
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react36.default.createElement(TabularData, { ...section.body }) : import_react36.default.createElement(TokenizedText, { item: section.body })
|
|
26932
26935
|
))) : null,
|
|
26933
|
-
stack && stack.items.length !== 0 ?
|
|
26936
|
+
stack && stack.items.length !== 0 ? import_react36.default.createElement(
|
|
26934
26937
|
Box_default,
|
|
26935
26938
|
{ flexDirection: "column" },
|
|
26936
|
-
|
|
26937
|
-
stack.items.map((item, index) =>
|
|
26939
|
+
import_react36.default.createElement(Text, null, "To investigate the issue, examine this stack trace:"),
|
|
26940
|
+
stack.items.map((item, index) => import_react36.default.createElement(
|
|
26938
26941
|
Box_default,
|
|
26939
26942
|
{ flexDirection: "column", key: index, paddingLeft: 2 },
|
|
26940
|
-
|
|
26943
|
+
import_react36.default.createElement(
|
|
26941
26944
|
Text,
|
|
26942
26945
|
null,
|
|
26943
26946
|
"at",
|
|
26944
|
-
item.calleeShort ?
|
|
26947
|
+
item.calleeShort ? import_react36.default.createElement(Text, { color: "yellow" }, ` ${item.calleeShort}`) : null,
|
|
26945
26948
|
item.fileShort ? ` (${item.fileShort}:${item.line})` : null
|
|
26946
26949
|
),
|
|
26947
|
-
|
|
26950
|
+
import_react36.default.createElement(
|
|
26948
26951
|
Box_default,
|
|
26949
26952
|
{ paddingLeft: 2 },
|
|
26950
|
-
|
|
26953
|
+
import_react36.default.createElement(Text, { dimColor: !0 }, item.sourceLine?.trim())
|
|
26951
26954
|
)
|
|
26952
26955
|
))
|
|
26953
26956
|
) : null
|
|
@@ -26959,13 +26962,13 @@ init_cjs_shims();
|
|
|
26959
26962
|
|
|
26960
26963
|
// ../cli-kit/dist/private/node/ui/components/Table/Row.js
|
|
26961
26964
|
init_cjs_shims();
|
|
26962
|
-
var
|
|
26965
|
+
var import_react37 = __toESM(require_react(), 1);
|
|
26963
26966
|
function join(elements, separator) {
|
|
26964
26967
|
return elements.reduce((elements2, element, index) => elements2.length === 0 ? [element] : [...elements2, separator(index), element], []);
|
|
26965
26968
|
}
|
|
26966
|
-
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) =>
|
|
26969
|
+
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_react37.default.createElement(Box_default, { flexDirection: "row" }, ...join(columns.map((column2) => {
|
|
26967
26970
|
let content = data[column2.name], key = `${rowKey}-cell-${column2.name.toString()}`, marginRight = column2.width - unstyled(String(content ?? "")).length;
|
|
26968
|
-
return
|
|
26971
|
+
return import_react37.default.createElement(
|
|
26969
26972
|
Text,
|
|
26970
26973
|
{ key, color: ignoreColumnColor ? void 0 : column2.color },
|
|
26971
26974
|
content,
|
|
@@ -26973,11 +26976,11 @@ var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_r
|
|
|
26973
26976
|
);
|
|
26974
26977
|
}), (index) => {
|
|
26975
26978
|
let key = `${rowKey}-horizontal-separator-${index}`;
|
|
26976
|
-
return
|
|
26979
|
+
return import_react37.default.createElement(Text, { key }, " ");
|
|
26977
26980
|
}));
|
|
26978
26981
|
|
|
26979
26982
|
// ../cli-kit/dist/private/node/ui/components/Table/Table.js
|
|
26980
|
-
var
|
|
26983
|
+
var import_react38 = __toESM(require_react(), 1);
|
|
26981
26984
|
function Table({ rows, columns: columnsConfiguration }) {
|
|
26982
26985
|
let columns = Object.entries(columnsConfiguration).map(([key, { header, color }]) => {
|
|
26983
26986
|
let headerWidth = String(header || key).length, columnWidths = rows.map((row) => {
|
|
@@ -26990,17 +26993,17 @@ function Table({ rows, columns: columnsConfiguration }) {
|
|
|
26990
26993
|
color
|
|
26991
26994
|
};
|
|
26992
26995
|
}), headings = Object.entries(columnsConfiguration).reduce((headings2, [column2, { header }]) => ({ ...headings2, [column2]: header || column2 }), {});
|
|
26993
|
-
return
|
|
26996
|
+
return import_react38.default.createElement(
|
|
26994
26997
|
Box_default,
|
|
26995
26998
|
{ flexDirection: "column" },
|
|
26996
|
-
|
|
26997
|
-
|
|
26999
|
+
import_react38.default.createElement(Row, { rowKey: "heading", fillerChar: " ", columns, data: headings, ignoreColumnColor: !0 }),
|
|
27000
|
+
import_react38.default.createElement(Row, { rowKey: "separator", fillerChar: "\u2500", columns, data: {}, ignoreColumnColor: !0 }),
|
|
26998
27001
|
rows.map((row, index) => {
|
|
26999
27002
|
let key = `row-${index}`;
|
|
27000
|
-
return
|
|
27003
|
+
return import_react38.default.createElement(
|
|
27001
27004
|
Box_default,
|
|
27002
27005
|
{ flexDirection: "column", key },
|
|
27003
|
-
|
|
27006
|
+
import_react38.default.createElement(Row, { rowKey: `data-${key}`, fillerChar: " ", columns, data: row })
|
|
27004
27007
|
);
|
|
27005
27008
|
})
|
|
27006
27009
|
);
|
|
@@ -27011,17 +27014,17 @@ init_cjs_shims();
|
|
|
27011
27014
|
|
|
27012
27015
|
// ../cli-kit/dist/private/node/ui/components/TextInput.js
|
|
27013
27016
|
init_cjs_shims();
|
|
27014
|
-
var
|
|
27017
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
27015
27018
|
var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholder = "", noColor = !shouldDisplayColors(), color = noColor ? void 0 : "cyan", password = !1, focus = !0 }) => {
|
|
27016
|
-
let [cursorOffset, setCursorOffset] = (0,
|
|
27017
|
-
(0,
|
|
27019
|
+
let [cursorOffset, setCursorOffset] = (0, import_react39.useState)((originalValue || "").length);
|
|
27020
|
+
(0, import_react39.useEffect)(() => {
|
|
27018
27021
|
setCursorOffset((previousOffset) => {
|
|
27019
27022
|
let newValue = originalValue || "";
|
|
27020
27023
|
return previousOffset > newValue.length - 1 ? newValue.length : previousOffset;
|
|
27021
27024
|
});
|
|
27022
27025
|
}, [originalValue]);
|
|
27023
|
-
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 =
|
|
27024
|
-
return renderedValue = value.split("").map((char, index) => index === cursorOffset ? noColor ? cursorChar : source_default.inverse(char) : char).join(""), cursorOffset === value.length && (renderedValue =
|
|
27026
|
+
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;
|
|
27027
|
+
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(
|
|
27025
27028
|
Text,
|
|
27026
27029
|
null,
|
|
27027
27030
|
renderedValue,
|
|
@@ -27035,7 +27038,7 @@ var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholde
|
|
|
27035
27038
|
}
|
|
27036
27039
|
let nextCursorOffset = cursorOffset, nextValue = originalValue;
|
|
27037
27040
|
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);
|
|
27038
|
-
}, { isActive: focus }),
|
|
27041
|
+
}, { isActive: focus }), import_react39.default.createElement(Text, { color }, value.length > 0 ? renderedValue : renderedPlaceholder);
|
|
27039
27042
|
};
|
|
27040
27043
|
|
|
27041
27044
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
|
|
@@ -27239,15 +27242,6 @@ function tryParseInt(maybeInt) {
|
|
|
27239
27242
|
let asInt;
|
|
27240
27243
|
return maybeInt !== void 0 && (asInt = parseInt(maybeInt, 10), isNaN(asInt) && (asInt = void 0)), asInt;
|
|
27241
27244
|
}
|
|
27242
|
-
function linesToColumns(lines) {
|
|
27243
|
-
let widths = [];
|
|
27244
|
-
for (let i = 0; lines[0] && i < lines[0].length; i++) {
|
|
27245
|
-
let columnRows = lines.map((line) => line[i]);
|
|
27246
|
-
widths.push(Math.max(...columnRows.map((row) => unstyled(row).length)));
|
|
27247
|
-
}
|
|
27248
|
-
return lines.map((line) => line.map((col, index) => `${col}${" ".repeat(widths[index] - unstyled(col).length)}`).join(" ").trimEnd()).join(`
|
|
27249
|
-
`);
|
|
27250
|
-
}
|
|
27251
27245
|
function slugify(str) {
|
|
27252
27246
|
return str.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
27253
27247
|
}
|
|
@@ -27285,7 +27279,7 @@ function normalizeDelimitedString(delimitedString, delimiter2 = ",") {
|
|
|
27285
27279
|
}
|
|
27286
27280
|
|
|
27287
27281
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
|
|
27288
|
-
var
|
|
27282
|
+
var import_react40 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
27289
27283
|
let sections = Array.isArray(table) ? table : Object.keys(table).map((header) => ({
|
|
27290
27284
|
header,
|
|
27291
27285
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -27296,23 +27290,23 @@ var import_react39 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
|
27296
27290
|
emptyItemsText: void 0
|
|
27297
27291
|
})), headerColumnWidth = Math.max(...sections.map((section) => Math.max(...section.header.split(`
|
|
27298
27292
|
`).map((line) => line.length))));
|
|
27299
|
-
return
|
|
27293
|
+
return import_react40.default.createElement(Box_default, { flexDirection: "column" }, sections.map((section, index) => import_react40.default.createElement(
|
|
27300
27294
|
Box_default,
|
|
27301
27295
|
{ key: index, marginBottom: index === sections.length - 1 ? 0 : 1, flexDirection: "column" },
|
|
27302
|
-
section.header.length > 0 &&
|
|
27296
|
+
section.header.length > 0 && import_react40.default.createElement(
|
|
27303
27297
|
Box_default,
|
|
27304
27298
|
{ width: headerColumnWidth + 1 },
|
|
27305
|
-
|
|
27299
|
+
import_react40.default.createElement(Text, { color: section.color, bold: !0 }, capitalize(section.header))
|
|
27306
27300
|
),
|
|
27307
|
-
|
|
27301
|
+
import_react40.default.createElement(
|
|
27308
27302
|
Box_default,
|
|
27309
27303
|
{ flexGrow: 1, flexDirection: "column", gap: 1 },
|
|
27310
|
-
section.emptyItemsText && section.items.length === 0 ?
|
|
27304
|
+
section.emptyItemsText && section.items.length === 0 ? import_react40.default.createElement(
|
|
27311
27305
|
Text,
|
|
27312
27306
|
{ color: section.color },
|
|
27313
|
-
|
|
27314
|
-
) :
|
|
27315
|
-
section.helperText ?
|
|
27307
|
+
import_react40.default.createElement(TokenizedText, { item: { subdued: section.emptyItemsText } })
|
|
27308
|
+
) : import_react40.default.createElement(List, { margin: !1, items: section.items, color: section.color, bullet: section.bullet }),
|
|
27309
|
+
section.helperText ? import_react40.default.createElement(Text, { color: section.color }, section.helperText) : null
|
|
27316
27310
|
)
|
|
27317
27311
|
)));
|
|
27318
27312
|
};
|
|
@@ -27326,10 +27320,10 @@ function messageWithPunctuation(message) {
|
|
|
27326
27320
|
|
|
27327
27321
|
// ../cli-kit/dist/private/node/ui/hooks/use-abort-signal.js
|
|
27328
27322
|
init_cjs_shims();
|
|
27329
|
-
var
|
|
27323
|
+
var import_react41 = __toESM(require_react(), 1), noop2 = () => Promise.resolve();
|
|
27330
27324
|
function useAbortSignal(abortSignal, onAbort = noop2) {
|
|
27331
|
-
let { exit: unmountInk } = use_app_default(), [isAborted, setIsAborted] = (0,
|
|
27332
|
-
return (0,
|
|
27325
|
+
let { exit: unmountInk } = use_app_default(), [isAborted, setIsAborted] = (0, import_react41.useState)(!1);
|
|
27326
|
+
return (0, import_react41.useLayoutEffect)(() => {
|
|
27333
27327
|
abortSignal?.addEventListener("abort", () => {
|
|
27334
27328
|
let abortWithError = abortSignal.reason.message === "AbortError" ? void 0 : abortSignal.reason;
|
|
27335
27329
|
onAbort(abortWithError).then(() => {
|
|
@@ -27342,12 +27336,12 @@ function useAbortSignal(abortSignal, onAbort = noop2) {
|
|
|
27342
27336
|
|
|
27343
27337
|
// ../cli-kit/dist/private/node/ui/hooks/use-prompt.js
|
|
27344
27338
|
init_cjs_shims();
|
|
27345
|
-
var
|
|
27339
|
+
var import_react42 = __toESM(require_react(), 1), PromptState;
|
|
27346
27340
|
(function(PromptState2) {
|
|
27347
27341
|
PromptState2.Idle = "idle", PromptState2.Loading = "loading", PromptState2.Submitted = "submitted", PromptState2.Error = "error", PromptState2.Cancelled = "cancelled";
|
|
27348
27342
|
})(PromptState || (PromptState = {}));
|
|
27349
27343
|
function usePrompt({ initialAnswer }) {
|
|
27350
|
-
let [promptState, setPromptState] = (0,
|
|
27344
|
+
let [promptState, setPromptState] = (0, import_react42.useState)(PromptState.Idle), [answer, setAnswer] = (0, import_react42.useState)(initialAnswer);
|
|
27351
27345
|
return {
|
|
27352
27346
|
promptState,
|
|
27353
27347
|
setPromptState,
|
|
@@ -27357,91 +27351,91 @@ function usePrompt({ initialAnswer }) {
|
|
|
27357
27351
|
}
|
|
27358
27352
|
|
|
27359
27353
|
// ../cli-kit/dist/private/node/ui/components/DangerousConfirmationPrompt.js
|
|
27360
|
-
var
|
|
27354
|
+
var import_react43 = __toESM(require_react(), 1);
|
|
27361
27355
|
var DangerousConfirmationPrompt = ({ message, confirmation, infoTable, onSubmit, abortSignal }) => {
|
|
27362
|
-
let validateAnswer = (0,
|
|
27356
|
+
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({
|
|
27363
27357
|
initialAnswer: ""
|
|
27364
|
-
}), { exit: unmountInk } = use_app_default(), [error, setError] = (0,
|
|
27358
|
+
}), { 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);
|
|
27365
27359
|
use_input_default((input, key) => {
|
|
27366
27360
|
if (handleCtrlC(input, key), key.escape && (setPromptState(PromptState.Cancelled), setError(void 0)), key.return) {
|
|
27367
27361
|
let error2 = validateAnswer(answer);
|
|
27368
27362
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
27369
27363
|
}
|
|
27370
|
-
}), (0,
|
|
27364
|
+
}), (0, import_react43.useEffect)(() => {
|
|
27371
27365
|
promptState === PromptState.Submitted ? (onSubmit(!0), unmountInk()) : promptState === PromptState.Cancelled && (onSubmit(!1), unmountInk());
|
|
27372
27366
|
}, [onSubmit, promptState, unmountInk]);
|
|
27373
27367
|
let completed = promptState === PromptState.Submitted || promptState === PromptState.Cancelled;
|
|
27374
|
-
return isAborted ? null :
|
|
27368
|
+
return isAborted ? null : import_react43.default.createElement(
|
|
27375
27369
|
Box_default,
|
|
27376
27370
|
{ flexDirection: "column", marginBottom: 1, width: twoThirds },
|
|
27377
|
-
|
|
27371
|
+
import_react43.default.createElement(
|
|
27378
27372
|
Box_default,
|
|
27379
27373
|
null,
|
|
27380
|
-
|
|
27374
|
+
import_react43.default.createElement(
|
|
27381
27375
|
Box_default,
|
|
27382
27376
|
{ marginRight: 2 },
|
|
27383
|
-
|
|
27377
|
+
import_react43.default.createElement(Text, null, "?")
|
|
27384
27378
|
),
|
|
27385
|
-
|
|
27379
|
+
import_react43.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
27386
27380
|
),
|
|
27387
|
-
completed ?
|
|
27388
|
-
|
|
27381
|
+
completed ? import_react43.default.createElement(CompletedPrompt, { cancelled: promptState === PromptState.Cancelled }) : import_react43.default.createElement(
|
|
27382
|
+
import_react43.default.Fragment,
|
|
27389
27383
|
null,
|
|
27390
|
-
|
|
27384
|
+
import_react43.default.createElement(
|
|
27391
27385
|
Box_default,
|
|
27392
27386
|
{ flexDirection: "column", gap: 1, marginTop: 1, marginLeft: 3 },
|
|
27393
|
-
infoTable ?
|
|
27387
|
+
infoTable ? import_react43.default.createElement(
|
|
27394
27388
|
Box_default,
|
|
27395
27389
|
{ paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
27396
|
-
|
|
27390
|
+
import_react43.default.createElement(InfoTable, { table: infoTable })
|
|
27397
27391
|
) : null,
|
|
27398
|
-
|
|
27392
|
+
import_react43.default.createElement(
|
|
27399
27393
|
Box_default,
|
|
27400
27394
|
null,
|
|
27401
|
-
|
|
27395
|
+
import_react43.default.createElement(TokenizedText, { item: ["Type", { userInput: confirmation }, "to confirm, or press Escape to cancel."] })
|
|
27402
27396
|
)
|
|
27403
27397
|
),
|
|
27404
|
-
|
|
27398
|
+
import_react43.default.createElement(
|
|
27405
27399
|
Box_default,
|
|
27406
27400
|
{ flexDirection: "column", width: oneThird },
|
|
27407
|
-
|
|
27401
|
+
import_react43.default.createElement(
|
|
27408
27402
|
Box_default,
|
|
27409
27403
|
null,
|
|
27410
|
-
|
|
27404
|
+
import_react43.default.createElement(
|
|
27411
27405
|
Box_default,
|
|
27412
27406
|
{ marginRight: 2 },
|
|
27413
|
-
|
|
27407
|
+
import_react43.default.createElement(Text, { color }, ">")
|
|
27414
27408
|
),
|
|
27415
|
-
|
|
27409
|
+
import_react43.default.createElement(
|
|
27416
27410
|
Box_default,
|
|
27417
27411
|
{ flexGrow: 1 },
|
|
27418
|
-
|
|
27412
|
+
import_react43.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
27419
27413
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
27420
27414
|
}, defaultValue: "", color })
|
|
27421
27415
|
)
|
|
27422
27416
|
),
|
|
27423
|
-
|
|
27417
|
+
import_react43.default.createElement(
|
|
27424
27418
|
Box_default,
|
|
27425
27419
|
{ marginLeft: 3 },
|
|
27426
|
-
|
|
27420
|
+
import_react43.default.createElement(Text, { color }, underline)
|
|
27427
27421
|
),
|
|
27428
|
-
promptState === PromptState.Error && error ?
|
|
27422
|
+
promptState === PromptState.Error && error ? import_react43.default.createElement(
|
|
27429
27423
|
Box_default,
|
|
27430
27424
|
{ marginLeft: 3 },
|
|
27431
|
-
|
|
27425
|
+
import_react43.default.createElement(
|
|
27432
27426
|
Text,
|
|
27433
27427
|
{ color },
|
|
27434
|
-
|
|
27428
|
+
import_react43.default.createElement(TokenizedText, { item: error })
|
|
27435
27429
|
)
|
|
27436
27430
|
) : null
|
|
27437
27431
|
)
|
|
27438
27432
|
)
|
|
27439
27433
|
);
|
|
27440
|
-
}, CompletedPrompt = ({ cancelled }) =>
|
|
27434
|
+
}, CompletedPrompt = ({ cancelled }) => import_react43.default.createElement(
|
|
27441
27435
|
Box_default,
|
|
27442
27436
|
null,
|
|
27443
|
-
|
|
27444
|
-
|
|
27437
|
+
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)),
|
|
27438
|
+
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"))
|
|
27445
27439
|
);
|
|
27446
27440
|
|
|
27447
27441
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
@@ -27452,7 +27446,7 @@ init_cjs_shims();
|
|
|
27452
27446
|
|
|
27453
27447
|
// ../cli-kit/dist/private/node/ui/components/Scrollbar.js
|
|
27454
27448
|
init_cjs_shims();
|
|
27455
|
-
var
|
|
27449
|
+
var import_react44 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SCROLLBOX_CHAR = "\u2551", Scrollbar = ({ containerHeight, visibleListSectionLength, fullListLength, visibleFromIndex, noColor = !shouldDisplayColors() }) => {
|
|
27456
27450
|
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;
|
|
27457
27451
|
if (visibleToIndex >= fullListLength - 1)
|
|
27458
27452
|
topBuffer = fullHeight - scrollboxHeight;
|
|
@@ -27469,32 +27463,32 @@ var import_react43 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SC
|
|
|
27469
27463
|
);
|
|
27470
27464
|
}
|
|
27471
27465
|
let bottomBuffer = fullHeight - scrollboxHeight - topBuffer, backgroundChar = noColor ? BACKGROUND_CHAR : " ", scrollboxChar = noColor ? SCROLLBOX_CHAR : " ", bgColor = noColor ? void 0 : "gray", scrollboxColor = noColor ? void 0 : "cyan";
|
|
27472
|
-
return
|
|
27466
|
+
return import_react44.default.createElement(
|
|
27473
27467
|
Box_default,
|
|
27474
27468
|
{ flexDirection: "column" },
|
|
27475
|
-
displayArrows ?
|
|
27476
|
-
|
|
27469
|
+
displayArrows ? import_react44.default.createElement(Text, null, "\u25B3") : null,
|
|
27470
|
+
import_react44.default.createElement(
|
|
27477
27471
|
Box_default,
|
|
27478
27472
|
{ width: 1 },
|
|
27479
|
-
|
|
27473
|
+
import_react44.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(topBuffer))
|
|
27480
27474
|
),
|
|
27481
|
-
|
|
27475
|
+
import_react44.default.createElement(
|
|
27482
27476
|
Box_default,
|
|
27483
27477
|
{ width: 1 },
|
|
27484
|
-
|
|
27478
|
+
import_react44.default.createElement(Text, { backgroundColor: scrollboxColor }, scrollboxChar.repeat(scrollboxHeight))
|
|
27485
27479
|
),
|
|
27486
|
-
|
|
27480
|
+
import_react44.default.createElement(
|
|
27487
27481
|
Box_default,
|
|
27488
27482
|
{ width: 1 },
|
|
27489
|
-
|
|
27483
|
+
import_react44.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(bottomBuffer))
|
|
27490
27484
|
),
|
|
27491
|
-
displayArrows ?
|
|
27485
|
+
displayArrows ? import_react44.default.createElement(Text, null, "\u25BD") : null
|
|
27492
27486
|
);
|
|
27493
27487
|
};
|
|
27494
27488
|
|
|
27495
27489
|
// ../cli-kit/dist/private/node/ui/hooks/use-select-state.js
|
|
27496
27490
|
init_cjs_shims();
|
|
27497
|
-
var
|
|
27491
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
27498
27492
|
import { isDeepStrictEqual } from "node:util";
|
|
27499
27493
|
var OptionMap = class extends Map {
|
|
27500
27494
|
constructor(options) {
|
|
@@ -27588,7 +27582,7 @@ var OptionMap = class extends Map {
|
|
|
27588
27582
|
previousValue: option?.value
|
|
27589
27583
|
};
|
|
27590
27584
|
}, useSelectState = ({ visibleOptionCount, options, defaultValue }) => {
|
|
27591
|
-
let [state, dispatch] = (0,
|
|
27585
|
+
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);
|
|
27592
27586
|
options !== lastOptions && !isDeepStrictEqual(options, lastOptions) && (dispatch({
|
|
27593
27587
|
type: "reset",
|
|
27594
27588
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
@@ -27596,20 +27590,20 @@ var OptionMap = class extends Map {
|
|
|
27596
27590
|
type: "reset",
|
|
27597
27591
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
27598
27592
|
}), setLastVisibleOptionCount(visibleOptionCount));
|
|
27599
|
-
let selectNextOption = (0,
|
|
27593
|
+
let selectNextOption = (0, import_react45.useCallback)(() => {
|
|
27600
27594
|
dispatch({
|
|
27601
27595
|
type: "select-next-option"
|
|
27602
27596
|
});
|
|
27603
|
-
}, []), selectPreviousOption = (0,
|
|
27597
|
+
}, []), selectPreviousOption = (0, import_react45.useCallback)(() => {
|
|
27604
27598
|
dispatch({
|
|
27605
27599
|
type: "select-previous-option"
|
|
27606
27600
|
});
|
|
27607
|
-
}, []), selectOption = (0,
|
|
27601
|
+
}, []), selectOption = (0, import_react45.useCallback)(({ option }) => {
|
|
27608
27602
|
dispatch({
|
|
27609
27603
|
type: "select-option",
|
|
27610
27604
|
option
|
|
27611
27605
|
});
|
|
27612
|
-
}, []), visibleOptions = (0,
|
|
27606
|
+
}, []), visibleOptions = (0, import_react45.useMemo)(() => options.slice(state.visibleFromIndex), [options, state.visibleFromIndex]);
|
|
27613
27607
|
return {
|
|
27614
27608
|
visibleFromIndex: state.visibleFromIndex,
|
|
27615
27609
|
visibleToIndex: state.visibleToIndex,
|
|
@@ -27623,7 +27617,7 @@ var OptionMap = class extends Map {
|
|
|
27623
27617
|
};
|
|
27624
27618
|
|
|
27625
27619
|
// ../cli-kit/dist/private/node/ui/components/SelectInput.js
|
|
27626
|
-
var
|
|
27620
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
27627
27621
|
var import_sortBy = __toESM(require_sortBy(), 1);
|
|
27628
27622
|
function highlightedLabel(label, term) {
|
|
27629
27623
|
if (!term)
|
|
@@ -27646,19 +27640,19 @@ function Item({ item, previousItem, isSelected, highlightedTerm, enableShortcuts
|
|
|
27646
27640
|
let label = highlightedLabel(item.label, highlightedTerm), title, labelColor;
|
|
27647
27641
|
isSelected ? labelColor = "cyan" : item.disabled && (labelColor = "dim"), (typeof previousItem > "u" || item.group !== previousItem.group) && (title = item.group ?? (hasAnyGroup ? "Other" : void 0));
|
|
27648
27642
|
let showKey = enableShortcuts && item.key && item.key.length > 0;
|
|
27649
|
-
return
|
|
27643
|
+
return import_react46.default.createElement(
|
|
27650
27644
|
Box_default,
|
|
27651
27645
|
{ key: index, flexDirection: "column", marginTop: items.indexOf(item) !== 0 && title ? 1 : 0, minHeight: title ? 2 : 1 },
|
|
27652
|
-
title ?
|
|
27646
|
+
title ? import_react46.default.createElement(
|
|
27653
27647
|
Box_default,
|
|
27654
27648
|
{ marginLeft: 3 },
|
|
27655
|
-
|
|
27649
|
+
import_react46.default.createElement(Text, { bold: !0 }, title)
|
|
27656
27650
|
) : null,
|
|
27657
|
-
|
|
27651
|
+
import_react46.default.createElement(
|
|
27658
27652
|
Box_default,
|
|
27659
27653
|
{ key: index, marginLeft: hasAnyGroup ? 3 : 0 },
|
|
27660
|
-
|
|
27661
|
-
|
|
27654
|
+
import_react46.default.createElement(Box_default, { marginRight: 2 }, isSelected ? import_react46.default.createElement(Text, { color: "cyan" }, ">") : import_react46.default.createElement(Text, null, " ")),
|
|
27655
|
+
import_react46.default.createElement(Text, { wrap: "end", color: labelColor }, showKey ? `(${item.key}) ${label}` : label)
|
|
27662
27656
|
)
|
|
27663
27657
|
);
|
|
27664
27658
|
}
|
|
@@ -27678,12 +27672,12 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
27678
27672
|
options: items,
|
|
27679
27673
|
defaultValue
|
|
27680
27674
|
});
|
|
27681
|
-
(0,
|
|
27675
|
+
(0, import_react46.useEffect)(() => {
|
|
27682
27676
|
typeof state.value < "u" && state.previousValue !== state.value && onChange?.(items.find((item) => item.value === state.value));
|
|
27683
27677
|
}, [state.previousValue, state.value, items, onChange]);
|
|
27684
27678
|
let handleArrows = (key) => {
|
|
27685
27679
|
key.upArrow ? state.selectPreviousOption() : key.downArrow && state.selectNextOption();
|
|
27686
|
-
}, handleShortcuts = (0,
|
|
27680
|
+
}, handleShortcuts = (0, import_react46.useCallback)((input) => {
|
|
27687
27681
|
if (state.visibleOptions.map((item) => item.key).includes(input)) {
|
|
27688
27682
|
let itemWithKey = state.visibleOptions.find((item2) => item2.key === input), item = items.find((item2) => item2.value === itemWithKey?.value);
|
|
27689
27683
|
itemWithKey && !itemWithKey.disabled && (onSubmit && item && onSubmit(item), state.selectOption({ option: itemWithKey }));
|
|
@@ -27698,40 +27692,40 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
27698
27692
|
}, { isActive: focus });
|
|
27699
27693
|
let { twoThirds } = useLayout();
|
|
27700
27694
|
if (loading)
|
|
27701
|
-
return
|
|
27695
|
+
return import_react46.default.createElement(
|
|
27702
27696
|
Box_default,
|
|
27703
27697
|
{ marginLeft: 3 },
|
|
27704
|
-
|
|
27698
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, "Loading...")
|
|
27705
27699
|
);
|
|
27706
27700
|
if (errorMessage && errorMessage.length > 0)
|
|
27707
|
-
return
|
|
27701
|
+
return import_react46.default.createElement(
|
|
27708
27702
|
Box_default,
|
|
27709
27703
|
{ marginLeft: 3 },
|
|
27710
|
-
|
|
27704
|
+
import_react46.default.createElement(Text, { color: "red" }, errorMessage)
|
|
27711
27705
|
);
|
|
27712
27706
|
{
|
|
27713
27707
|
let optionsHeight = initialItems.length + maximumLinesLostToGroups(initialItems), sectionHeight = Math.max(hasAnyGroup ? 5 : 2, Math.min(availableLinesToUse, optionsHeight));
|
|
27714
|
-
return
|
|
27708
|
+
return import_react46.default.createElement(
|
|
27715
27709
|
Box_default,
|
|
27716
27710
|
{ flexDirection: "column", ref, gap: 1, width: twoThirds },
|
|
27717
|
-
|
|
27711
|
+
import_react46.default.createElement(
|
|
27718
27712
|
Box_default,
|
|
27719
27713
|
{ flexDirection: "row", height: sectionHeight, width: "100%" },
|
|
27720
|
-
|
|
27721
|
-
hasLimit ?
|
|
27714
|
+
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 }))),
|
|
27715
|
+
hasLimit ? import_react46.default.createElement(Scrollbar, { containerHeight: sectionHeight, visibleListSectionLength: limit, fullListLength: items.length, visibleFromIndex: state.visibleFromIndex }) : null
|
|
27722
27716
|
),
|
|
27723
|
-
|
|
27717
|
+
import_react46.default.createElement(Box_default, { ref: inputFixedAreaRef }, noItems ? import_react46.default.createElement(
|
|
27724
27718
|
Box_default,
|
|
27725
27719
|
{ marginLeft: 3 },
|
|
27726
|
-
|
|
27727
|
-
) :
|
|
27720
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, "Try again with a different keyword.")
|
|
27721
|
+
) : import_react46.default.createElement(
|
|
27728
27722
|
Box_default,
|
|
27729
27723
|
{ marginLeft: 3, flexDirection: "column" },
|
|
27730
|
-
|
|
27731
|
-
hasMorePages ?
|
|
27724
|
+
import_react46.default.createElement(Text, { dimColor: !0 }, `Press ${figures_default.arrowUp}${figures_default.arrowDown} arrows to select, enter ${itemsHaveKeys ? "or a shortcut " : ""}to confirm.`),
|
|
27725
|
+
hasMorePages ? import_react46.default.createElement(
|
|
27732
27726
|
Text,
|
|
27733
27727
|
null,
|
|
27734
|
-
|
|
27728
|
+
import_react46.default.createElement(
|
|
27735
27729
|
Text,
|
|
27736
27730
|
{ bold: !0 },
|
|
27737
27731
|
"1-",
|
|
@@ -27744,44 +27738,44 @@ function SelectInputInner({ items: rawItems, initialItems = rawItems, onChange,
|
|
|
27744
27738
|
);
|
|
27745
27739
|
}
|
|
27746
27740
|
}
|
|
27747
|
-
var SelectInput = (0,
|
|
27741
|
+
var SelectInput = (0, import_react46.forwardRef)(SelectInputInner);
|
|
27748
27742
|
|
|
27749
27743
|
// ../cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.js
|
|
27750
27744
|
init_cjs_shims();
|
|
27751
27745
|
|
|
27752
27746
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoMessage.js
|
|
27753
27747
|
init_cjs_shims();
|
|
27754
|
-
var
|
|
27748
|
+
var import_react47 = __toESM(require_react(), 1), InfoMessage = ({ message: { title: { color, text: title }, body } }) => import_react47.default.createElement(
|
|
27755
27749
|
Box_default,
|
|
27756
27750
|
{ flexDirection: "column", gap: 1 },
|
|
27757
|
-
|
|
27751
|
+
import_react47.default.createElement(
|
|
27758
27752
|
Text,
|
|
27759
27753
|
{ color },
|
|
27760
|
-
|
|
27754
|
+
import_react47.default.createElement(TokenizedText, { item: title })
|
|
27761
27755
|
),
|
|
27762
|
-
|
|
27756
|
+
import_react47.default.createElement(TokenizedText, { item: body })
|
|
27763
27757
|
);
|
|
27764
27758
|
|
|
27765
27759
|
// ../cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.js
|
|
27766
|
-
var
|
|
27760
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
27767
27761
|
var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, state, input, submittedAnswerLabel }) => {
|
|
27768
|
-
let { stdout } = use_stdout_default(), [wrapperHeight, setWrapperHeight] = (0,
|
|
27762
|
+
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) => {
|
|
27769
27763
|
if (node !== null) {
|
|
27770
27764
|
let { height } = measure_element_default(node);
|
|
27771
27765
|
wrapperHeight !== height && setWrapperHeight(height);
|
|
27772
27766
|
}
|
|
27773
|
-
}, [wrapperHeight]), promptAreaRef = (0,
|
|
27767
|
+
}, [wrapperHeight]), promptAreaRef = (0, import_react48.useCallback)((node) => {
|
|
27774
27768
|
if (node !== null) {
|
|
27775
27769
|
let { height } = measure_element_default(node);
|
|
27776
27770
|
setPromptAreaHeight(height);
|
|
27777
27771
|
}
|
|
27778
|
-
}, []), inputFixedAreaRef = (0,
|
|
27772
|
+
}, []), inputFixedAreaRef = (0, import_react48.useCallback)((node) => {
|
|
27779
27773
|
if (node !== null) {
|
|
27780
27774
|
let { height } = measure_element_default(node);
|
|
27781
27775
|
setInputFixedAreaHeight(height + 3);
|
|
27782
27776
|
}
|
|
27783
|
-
}, []), inputComponent = (0,
|
|
27784
|
-
(0,
|
|
27777
|
+
}, []), inputComponent = (0, import_react48.cloneElement)(input, { availableLines, inputFixedAreaRef });
|
|
27778
|
+
(0, import_react48.useLayoutEffect)(() => {
|
|
27785
27779
|
function onResize() {
|
|
27786
27780
|
let newAvailableLines = stdout.rows - promptAreaHeight - inputFixedAreaHeight;
|
|
27787
27781
|
newAvailableLines !== availableLines && setAvailableLines(newAvailableLines);
|
|
@@ -27791,56 +27785,56 @@ var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, stat
|
|
|
27791
27785
|
};
|
|
27792
27786
|
}, [wrapperHeight, promptAreaHeight, stdout, availableLines, inputFixedAreaHeight]);
|
|
27793
27787
|
let { isAborted } = useAbortSignal(abortSignal), showInfoTable = infoTable && Object.keys(infoTable).length > 0;
|
|
27794
|
-
return isAborted ? null :
|
|
27788
|
+
return isAborted ? null : import_react48.default.createElement(
|
|
27795
27789
|
Box_default,
|
|
27796
27790
|
{ flexDirection: "column", marginBottom: 1, ref: wrapperRef },
|
|
27797
|
-
|
|
27791
|
+
import_react48.default.createElement(
|
|
27798
27792
|
Box_default,
|
|
27799
27793
|
{ ref: promptAreaRef, flexDirection: "column" },
|
|
27800
|
-
|
|
27794
|
+
import_react48.default.createElement(
|
|
27801
27795
|
Box_default,
|
|
27802
27796
|
null,
|
|
27803
|
-
|
|
27797
|
+
import_react48.default.createElement(
|
|
27804
27798
|
Box_default,
|
|
27805
27799
|
{ marginRight: 2 },
|
|
27806
|
-
|
|
27800
|
+
import_react48.default.createElement(Text, null, "?")
|
|
27807
27801
|
),
|
|
27808
|
-
|
|
27802
|
+
import_react48.default.createElement(TokenizedText, { item: messageWithPunctuation(message) }),
|
|
27809
27803
|
header
|
|
27810
27804
|
),
|
|
27811
|
-
(showInfoTable || infoMessage) && state !== PromptState.Submitted ?
|
|
27805
|
+
(showInfoTable || infoMessage) && state !== PromptState.Submitted ? import_react48.default.createElement(
|
|
27812
27806
|
Box_default,
|
|
27813
27807
|
{ marginTop: 1, marginLeft: 3, paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
27814
|
-
infoMessage ?
|
|
27815
|
-
showInfoTable ?
|
|
27808
|
+
infoMessage ? import_react48.default.createElement(InfoMessage, { message: infoMessage }) : null,
|
|
27809
|
+
showInfoTable ? import_react48.default.createElement(InfoTable, { table: infoTable }) : null
|
|
27816
27810
|
) : null
|
|
27817
27811
|
),
|
|
27818
|
-
state === PromptState.Submitted && submittedAnswerLabel ?
|
|
27812
|
+
state === PromptState.Submitted && submittedAnswerLabel ? import_react48.default.createElement(
|
|
27819
27813
|
Box_default,
|
|
27820
27814
|
null,
|
|
27821
|
-
|
|
27815
|
+
import_react48.default.createElement(
|
|
27822
27816
|
Box_default,
|
|
27823
27817
|
{ marginRight: 2 },
|
|
27824
|
-
|
|
27818
|
+
import_react48.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
27825
27819
|
),
|
|
27826
|
-
|
|
27827
|
-
) :
|
|
27820
|
+
import_react48.default.createElement(Text, { color: "cyan" }, submittedAnswerLabel)
|
|
27821
|
+
) : import_react48.default.createElement(Box_default, { marginTop: 1 }, inputComponent)
|
|
27828
27822
|
);
|
|
27829
27823
|
};
|
|
27830
27824
|
|
|
27831
27825
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
27832
|
-
var
|
|
27826
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
27833
27827
|
function SelectPrompt({ message, choices, infoTable, infoMessage, onSubmit, defaultValue, abortSignal }) {
|
|
27834
27828
|
if (choices.length === 0)
|
|
27835
27829
|
throw new Error("SelectPrompt requires at least one choice");
|
|
27836
27830
|
let { exit: unmountInk } = use_app_default(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
27837
27831
|
initialAnswer: void 0
|
|
27838
|
-
}), submitAnswer = (0,
|
|
27832
|
+
}), submitAnswer = (0, import_react49.useCallback)((answer2) => {
|
|
27839
27833
|
setAnswer(answer2), setPromptState(PromptState.Submitted);
|
|
27840
27834
|
}, [setAnswer, setPromptState]);
|
|
27841
|
-
return (0,
|
|
27835
|
+
return (0, import_react49.useEffect)(() => {
|
|
27842
27836
|
promptState === PromptState.Submitted && answer && (unmountInk(), onSubmit(answer.value));
|
|
27843
|
-
}, [answer, onSubmit, promptState, unmountInk]),
|
|
27837
|
+
}, [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 }) });
|
|
27844
27838
|
}
|
|
27845
27839
|
|
|
27846
27840
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
@@ -27848,32 +27842,32 @@ init_cjs_shims();
|
|
|
27848
27842
|
|
|
27849
27843
|
// ../cli-kit/dist/private/node/ui/components/TextAnimation.js
|
|
27850
27844
|
init_cjs_shims();
|
|
27851
|
-
var
|
|
27845
|
+
var import_react50 = __toESM(require_react(), 1), import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
27852
27846
|
function rainbow(text, frame) {
|
|
27853
27847
|
let hue = 5 * frame, leftColor = { h: hue % 360, s: 0.8, v: 1 }, rightColor = { h: (hue + 1) % 360, s: 0.8, v: 1 };
|
|
27854
27848
|
return (0, import_gradient_string.default)(leftColor, rightColor)(text, { interpolation: "hsv", hsvSpin: "long" });
|
|
27855
27849
|
}
|
|
27856
|
-
var TextAnimation = (0,
|
|
27857
|
-
let frame = (0,
|
|
27850
|
+
var TextAnimation = (0, import_react50.memo)(({ text }) => {
|
|
27851
|
+
let frame = (0, import_react50.useRef)(0), [renderedFrame, setRenderedFrame] = (0, import_react50.useState)(text), timeout = (0, import_react50.useRef)(), renderAnimation = (0, import_react50.useCallback)(() => {
|
|
27858
27852
|
let newFrame = frame.current + 1;
|
|
27859
27853
|
frame.current = newFrame, setRenderedFrame(rainbow(text, frame.current)), timeout.current = setTimeout(() => {
|
|
27860
27854
|
renderAnimation();
|
|
27861
27855
|
}, 35);
|
|
27862
27856
|
}, [text]);
|
|
27863
|
-
return (0,
|
|
27857
|
+
return (0, import_react50.useLayoutEffect)(() => (renderAnimation(), () => {
|
|
27864
27858
|
clearTimeout(timeout.current);
|
|
27865
|
-
}), [renderAnimation]),
|
|
27859
|
+
}), [renderAnimation]), import_react50.default.createElement(Text, null, renderedFrame);
|
|
27866
27860
|
});
|
|
27867
27861
|
TextAnimation.displayName = "TextAnimation";
|
|
27868
27862
|
|
|
27869
27863
|
// ../cli-kit/dist/private/node/ui/hooks/use-async-and-unmount.js
|
|
27870
27864
|
init_cjs_shims();
|
|
27871
|
-
var
|
|
27865
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
27872
27866
|
function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
27873
27867
|
}, onRejected = () => {
|
|
27874
27868
|
} } = {}) {
|
|
27875
27869
|
let { exit: unmountInk } = use_app_default();
|
|
27876
|
-
(0,
|
|
27870
|
+
(0, import_react51.useEffect)(() => {
|
|
27877
27871
|
asyncFunction().then(() => {
|
|
27878
27872
|
onFulfilled(), unmountInk();
|
|
27879
27873
|
}).catch((error) => {
|
|
@@ -27883,7 +27877,7 @@ function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
|
27883
27877
|
}
|
|
27884
27878
|
|
|
27885
27879
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
27886
|
-
var
|
|
27880
|
+
var import_react52 = __toESM(require_react(), 1), loadingBarChar = "\u2580", TasksState;
|
|
27887
27881
|
(function(TasksState2) {
|
|
27888
27882
|
TasksState2.Loading = "loading", TasksState2.Success = "success", TasksState2.Failure = "failure";
|
|
27889
27883
|
})(TasksState || (TasksState = {}));
|
|
@@ -27902,7 +27896,7 @@ async function runTask(task, ctx) {
|
|
|
27902
27896
|
var noop3 = () => {
|
|
27903
27897
|
};
|
|
27904
27898
|
function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }) {
|
|
27905
|
-
let { twoThirds } = useLayout(), loadingBar = new Array(twoThirds).fill(loadingBarChar).join(""), [currentTask, setCurrentTask] = (0,
|
|
27899
|
+
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();
|
|
27906
27900
|
useAsyncAndUnmount(async () => {
|
|
27907
27901
|
for (let task of tasks) {
|
|
27908
27902
|
setCurrentTask(task);
|
|
@@ -27923,11 +27917,11 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }
|
|
|
27923
27917
|
return null;
|
|
27924
27918
|
}, { isActive: !!isRawModeSupported });
|
|
27925
27919
|
let { isAborted } = useAbortSignal(abortSignal);
|
|
27926
|
-
return silent ? null : state === TasksState.Loading && !isAborted ?
|
|
27920
|
+
return silent ? null : state === TasksState.Loading && !isAborted ? import_react52.default.createElement(
|
|
27927
27921
|
Box_default,
|
|
27928
27922
|
{ flexDirection: "column" },
|
|
27929
|
-
|
|
27930
|
-
|
|
27923
|
+
import_react52.default.createElement(TextAnimation, { text: loadingBar }),
|
|
27924
|
+
import_react52.default.createElement(
|
|
27931
27925
|
Text,
|
|
27932
27926
|
null,
|
|
27933
27927
|
currentTask.title,
|
|
@@ -27938,84 +27932,84 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal }
|
|
|
27938
27932
|
|
|
27939
27933
|
// ../cli-kit/dist/private/node/ui/components/TextPrompt.js
|
|
27940
27934
|
init_cjs_shims();
|
|
27941
|
-
var
|
|
27935
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
27942
27936
|
var TextPrompt = ({ message, onSubmit, validate, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
|
|
27943
27937
|
if (password && defaultValue)
|
|
27944
27938
|
throw new Error("Can't use defaultValue with password");
|
|
27945
|
-
let validateAnswer = (0,
|
|
27939
|
+
let validateAnswer = (0, import_react53.useCallback)((value) => {
|
|
27946
27940
|
if (validate)
|
|
27947
27941
|
return validate(value);
|
|
27948
27942
|
if (value.length === 0 && !allowEmpty)
|
|
27949
27943
|
return "Type an answer to the prompt.";
|
|
27950
27944
|
}, [allowEmpty, validate]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
27951
27945
|
initialAnswer
|
|
27952
|
-
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, { exit: unmountInk } = use_app_default(), [error, setError] = (0,
|
|
27946
|
+
}), 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);
|
|
27953
27947
|
return use_input_default((input, key) => {
|
|
27954
27948
|
if (handleCtrlC(input, key), key.return) {
|
|
27955
27949
|
let error2 = validateAnswer(answerOrDefault);
|
|
27956
27950
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
27957
27951
|
}
|
|
27958
|
-
}), (0,
|
|
27952
|
+
}), (0, import_react53.useEffect)(() => {
|
|
27959
27953
|
promptState === PromptState.Submitted && (onSubmit(answerOrDefault), unmountInk());
|
|
27960
|
-
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null :
|
|
27954
|
+
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null : import_react53.default.createElement(
|
|
27961
27955
|
Box_default,
|
|
27962
27956
|
{ flexDirection: "column", marginBottom: 1, width: oneThird },
|
|
27963
|
-
|
|
27957
|
+
import_react53.default.createElement(
|
|
27964
27958
|
Box_default,
|
|
27965
27959
|
null,
|
|
27966
|
-
|
|
27960
|
+
import_react53.default.createElement(
|
|
27967
27961
|
Box_default,
|
|
27968
27962
|
{ marginRight: 2 },
|
|
27969
|
-
|
|
27963
|
+
import_react53.default.createElement(Text, null, "?")
|
|
27970
27964
|
),
|
|
27971
|
-
|
|
27965
|
+
import_react53.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
27972
27966
|
),
|
|
27973
|
-
promptState === PromptState.Submitted ?
|
|
27967
|
+
promptState === PromptState.Submitted ? import_react53.default.createElement(
|
|
27974
27968
|
Box_default,
|
|
27975
27969
|
null,
|
|
27976
|
-
|
|
27970
|
+
import_react53.default.createElement(
|
|
27977
27971
|
Box_default,
|
|
27978
27972
|
{ marginRight: 2 },
|
|
27979
|
-
|
|
27973
|
+
import_react53.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
27980
27974
|
),
|
|
27981
|
-
|
|
27975
|
+
import_react53.default.createElement(
|
|
27982
27976
|
Box_default,
|
|
27983
27977
|
{ flexGrow: 1 },
|
|
27984
|
-
|
|
27978
|
+
import_react53.default.createElement(Text, { color: "cyan", dimColor: displayEmptyValue }, password ? "*".repeat(answer.length) : displayedAnswer)
|
|
27985
27979
|
)
|
|
27986
|
-
) :
|
|
27980
|
+
) : import_react53.default.createElement(
|
|
27987
27981
|
Box_default,
|
|
27988
27982
|
{ flexDirection: "column" },
|
|
27989
|
-
|
|
27983
|
+
import_react53.default.createElement(
|
|
27990
27984
|
Box_default,
|
|
27991
27985
|
null,
|
|
27992
|
-
|
|
27986
|
+
import_react53.default.createElement(
|
|
27993
27987
|
Box_default,
|
|
27994
27988
|
{ marginRight: 2 },
|
|
27995
|
-
|
|
27989
|
+
import_react53.default.createElement(Text, { color }, ">")
|
|
27996
27990
|
),
|
|
27997
|
-
|
|
27991
|
+
import_react53.default.createElement(
|
|
27998
27992
|
Box_default,
|
|
27999
27993
|
{ flexGrow: 1 },
|
|
28000
|
-
|
|
27994
|
+
import_react53.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
28001
27995
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
28002
27996
|
}, defaultValue, color, password })
|
|
28003
27997
|
)
|
|
28004
27998
|
),
|
|
28005
|
-
|
|
27999
|
+
import_react53.default.createElement(
|
|
28006
28000
|
Box_default,
|
|
28007
28001
|
{ marginLeft: 3 },
|
|
28008
|
-
|
|
28002
|
+
import_react53.default.createElement(Text, { color }, underline)
|
|
28009
28003
|
),
|
|
28010
|
-
promptState === PromptState.Error ?
|
|
28004
|
+
promptState === PromptState.Error ? import_react53.default.createElement(
|
|
28011
28005
|
Box_default,
|
|
28012
28006
|
{ marginLeft: 3 },
|
|
28013
|
-
|
|
28007
|
+
import_react53.default.createElement(Text, { color }, error)
|
|
28014
28008
|
) : null,
|
|
28015
|
-
promptState !== PromptState.Error && preview ?
|
|
28009
|
+
promptState !== PromptState.Error && preview ? import_react53.default.createElement(
|
|
28016
28010
|
Box_default,
|
|
28017
28011
|
{ marginLeft: 3 },
|
|
28018
|
-
|
|
28012
|
+
import_react53.default.createElement(TokenizedText, { item: preview(answerOrDefault) })
|
|
28019
28013
|
) : null
|
|
28020
28014
|
)
|
|
28021
28015
|
);
|
|
@@ -28032,20 +28026,20 @@ function debounce(func, wait, options) {
|
|
|
28032
28026
|
}
|
|
28033
28027
|
|
|
28034
28028
|
// ../cli-kit/dist/private/node/ui/components/AutocompletePrompt.js
|
|
28035
|
-
var
|
|
28029
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
28036
28030
|
var MIN_NUMBER_OF_ITEMS_FOR_SEARCH = 5;
|
|
28037
28031
|
function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, hasMorePages: initialHasMorePages = !1, abortSignal, infoMessage }) {
|
|
28038
|
-
let { exit: unmountInk } = use_app_default(), [searchTerm, setSearchTerm] = (0,
|
|
28032
|
+
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({
|
|
28039
28033
|
initialAnswer: void 0
|
|
28040
|
-
}), paginatedSearch = (0,
|
|
28034
|
+
}), paginatedSearch = (0, import_react54.useCallback)(async (term) => await search(term), [search]), submitAnswer = (0, import_react54.useCallback)((answer2) => {
|
|
28041
28035
|
promptState === PromptState.Idle && (setAnswer(answer2), setPromptState(PromptState.Submitted));
|
|
28042
28036
|
}, [promptState, setAnswer, setPromptState]);
|
|
28043
|
-
(0,
|
|
28037
|
+
(0, import_react54.useEffect)(() => {
|
|
28044
28038
|
promptState === PromptState.Submitted && answer && (setSearchTerm(""), unmountInk(), onSubmit(answer.value));
|
|
28045
28039
|
}, [answer, onSubmit, promptState, unmountInk]);
|
|
28046
|
-
let setLoadingWhenSlow = (0,
|
|
28040
|
+
let setLoadingWhenSlow = (0, import_react54.useRef)(), searchTermRef = (0, import_react54.useRef)("");
|
|
28047
28041
|
searchTermRef.current = searchTerm;
|
|
28048
|
-
let debounceSearch = (0,
|
|
28042
|
+
let debounceSearch = (0, import_react54.useCallback)(debounce((term) => {
|
|
28049
28043
|
setLoadingWhenSlow.current = setTimeout(() => {
|
|
28050
28044
|
setPromptState(PromptState.Loading);
|
|
28051
28045
|
}, 100), paginatedSearch(term).then((result) => {
|
|
@@ -28056,22 +28050,22 @@ function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, has
|
|
|
28056
28050
|
clearTimeout(setLoadingWhenSlow.current);
|
|
28057
28051
|
});
|
|
28058
28052
|
}, 300, { leading: !0 }), [initialHasMorePages, choices, paginatedSearch, searchResults]);
|
|
28059
|
-
return
|
|
28053
|
+
return import_react54.default.createElement(PromptLayout, { message, state: promptState, infoTable, infoMessage, abortSignal, header: promptState !== PromptState.Submitted && canSearch ? import_react54.default.createElement(
|
|
28060
28054
|
Box_default,
|
|
28061
28055
|
{ marginLeft: 3 },
|
|
28062
|
-
|
|
28056
|
+
import_react54.default.createElement(TextInput, { value: searchTerm, onChange: (term) => {
|
|
28063
28057
|
setSearchTerm(term), term.length > 0 ? debounceSearch(term) : (debounceSearch.cancel(), setPromptState(PromptState.Idle), setSearchResults(choices));
|
|
28064
28058
|
}, placeholder: "Type to search..." })
|
|
28065
|
-
) : null, submittedAnswerLabel: answer?.label, input:
|
|
28059
|
+
) : 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 }) });
|
|
28066
28060
|
}
|
|
28067
28061
|
|
|
28068
28062
|
// ../cli-kit/dist/public/node/ui.js
|
|
28069
|
-
var
|
|
28063
|
+
var import_react55 = __toESM(require_react(), 1), defaultUIDebugOptions = {
|
|
28070
28064
|
skipTTYCheck: !1
|
|
28071
28065
|
};
|
|
28072
28066
|
async function renderConcurrent({ renderOptions, ...props }) {
|
|
28073
28067
|
let abortSignal = props.abortSignal ?? new AbortController().signal;
|
|
28074
|
-
return render2(
|
|
28068
|
+
return render2(import_react55.default.createElement(ConcurrentOutput, { ...props, abortSignal }), renderOptions);
|
|
28075
28069
|
}
|
|
28076
28070
|
function renderInfo(options) {
|
|
28077
28071
|
return alert({ ...options, type: "info" });
|
|
@@ -28086,12 +28080,12 @@ function renderError(options) {
|
|
|
28086
28080
|
return alert({ ...options, type: "error" });
|
|
28087
28081
|
}
|
|
28088
28082
|
function renderFatalError(error, { renderOptions } = {}) {
|
|
28089
|
-
return renderOnce(
|
|
28083
|
+
return renderOnce(import_react55.default.createElement(FatalError, { error }), { logLevel: "error", logger: consoleError, renderOptions });
|
|
28090
28084
|
}
|
|
28091
28085
|
async function renderSelectPrompt({ renderOptions, isConfirmationPrompt, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28092
28086
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28093
28087
|
let selectedValue;
|
|
28094
|
-
return await render2(
|
|
28088
|
+
return await render2(import_react55.default.createElement(SelectPrompt, { ...props, onSubmit: (value) => {
|
|
28095
28089
|
selectedValue = value;
|
|
28096
28090
|
} }), {
|
|
28097
28091
|
...renderOptions,
|
|
@@ -28135,7 +28129,7 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
28135
28129
|
};
|
|
28136
28130
|
return runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28137
28131
|
let selectedValue;
|
|
28138
|
-
return await render2(
|
|
28132
|
+
return await render2(import_react55.default.createElement(AutocompletePrompt, { ...newProps, onSubmit: (value) => {
|
|
28139
28133
|
selectedValue = value;
|
|
28140
28134
|
} }), {
|
|
28141
28135
|
...renderOptions,
|
|
@@ -28144,11 +28138,11 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
28144
28138
|
});
|
|
28145
28139
|
}
|
|
28146
28140
|
function renderTable({ renderOptions, ...props }) {
|
|
28147
|
-
return renderOnce(
|
|
28141
|
+
return renderOnce(import_react55.default.createElement(Table, { ...props }), { renderOptions });
|
|
28148
28142
|
}
|
|
28149
28143
|
async function renderTasks(tasks, { renderOptions } = {}) {
|
|
28150
28144
|
return new Promise((resolve, reject) => {
|
|
28151
|
-
render2(
|
|
28145
|
+
render2(import_react55.default.createElement(Tasks, { tasks, onComplete: resolve }), {
|
|
28152
28146
|
...renderOptions,
|
|
28153
28147
|
exitOnCtrlC: !1
|
|
28154
28148
|
}).then(() => {
|
|
@@ -28158,7 +28152,7 @@ async function renderTasks(tasks, { renderOptions } = {}) {
|
|
|
28158
28152
|
async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28159
28153
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28160
28154
|
let enteredText = "";
|
|
28161
|
-
return await render2(
|
|
28155
|
+
return await render2(import_react55.default.createElement(TextPrompt, { ...props, onSubmit: (value) => {
|
|
28162
28156
|
enteredText = value;
|
|
28163
28157
|
} }), {
|
|
28164
28158
|
...renderOptions,
|
|
@@ -28169,7 +28163,7 @@ async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = de
|
|
|
28169
28163
|
async function renderDangerousConfirmationPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28170
28164
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28171
28165
|
let confirmed;
|
|
28172
|
-
return await render2(
|
|
28166
|
+
return await render2(import_react55.default.createElement(DangerousConfirmationPrompt, { ...props, onSubmit: (value) => {
|
|
28173
28167
|
confirmed = value;
|
|
28174
28168
|
} }), {
|
|
28175
28169
|
...renderOptions,
|
|
@@ -29618,13 +29612,16 @@ function itemToString(item) {
|
|
|
29618
29612
|
return tokenItemToString(item);
|
|
29619
29613
|
}
|
|
29620
29614
|
function consoleLog(message) {
|
|
29621
|
-
|
|
29615
|
+
process.stdout.write(`${withOrWithoutStyle(message)}
|
|
29616
|
+
`);
|
|
29622
29617
|
}
|
|
29623
29618
|
function consoleError(message) {
|
|
29624
|
-
|
|
29619
|
+
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
29620
|
+
`);
|
|
29625
29621
|
}
|
|
29626
29622
|
function consoleWarn(message) {
|
|
29627
|
-
|
|
29623
|
+
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
29624
|
+
`);
|
|
29628
29625
|
}
|
|
29629
29626
|
function outputWhereAppropriate(logLevel, logger, message) {
|
|
29630
29627
|
shouldOutput(logLevel) && (logger instanceof Writable2 ? logger.write(message) : logger(message, logLevel));
|
|
@@ -29658,9 +29655,9 @@ var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_em
|
|
|
29658
29655
|
...import_remove.default
|
|
29659
29656
|
};
|
|
29660
29657
|
|
|
29661
|
-
// ../../node_modules/.pnpm/tempy@3.
|
|
29658
|
+
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
29662
29659
|
init_cjs_shims();
|
|
29663
|
-
import
|
|
29660
|
+
import fs3 from "node:fs";
|
|
29664
29661
|
import fsPromises from "node:fs/promises";
|
|
29665
29662
|
import path3 from "node:path";
|
|
29666
29663
|
import stream from "node:stream";
|
|
@@ -29739,21 +29736,26 @@ function uniqueString() {
|
|
|
29739
29736
|
return crypto_random_string_default({ length: 32 });
|
|
29740
29737
|
}
|
|
29741
29738
|
|
|
29742
|
-
// ../../node_modules/.pnpm/
|
|
29743
|
-
|
|
29744
|
-
|
|
29739
|
+
// ../../node_modules/.pnpm/temp-dir@3.0.0/node_modules/temp-dir/index.js
|
|
29740
|
+
init_cjs_shims();
|
|
29741
|
+
import { promises as fs2 } from "node:fs";
|
|
29742
|
+
import os3 from "node:os";
|
|
29743
|
+
var temporaryDirectory = await fs2.realpath(os3.tmpdir()), temp_dir_default = temporaryDirectory;
|
|
29744
|
+
|
|
29745
|
+
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
29746
|
+
var pipeline = promisify2(stream.pipeline), getPath = (prefix = "") => path3.join(temp_dir_default, prefix + uniqueString());
|
|
29745
29747
|
async function runTask2(temporaryPath, callback) {
|
|
29746
29748
|
try {
|
|
29747
29749
|
return await callback(temporaryPath);
|
|
29748
29750
|
} finally {
|
|
29749
|
-
await fsPromises.rm(temporaryPath, { recursive: !0, force: !0 });
|
|
29751
|
+
await fsPromises.rm(temporaryPath, { recursive: !0, force: !0, maxRetries: 2 });
|
|
29750
29752
|
}
|
|
29751
29753
|
}
|
|
29752
|
-
function
|
|
29754
|
+
function temporaryDirectory2({ prefix = "" } = {}) {
|
|
29753
29755
|
let directory = getPath(prefix);
|
|
29754
|
-
return
|
|
29756
|
+
return fs3.mkdirSync(directory), directory;
|
|
29755
29757
|
}
|
|
29756
|
-
var temporaryDirectoryTask = async (callback, options) => runTask2(
|
|
29758
|
+
var temporaryDirectoryTask = async (callback, options) => runTask2(temporaryDirectory2(options), callback);
|
|
29757
29759
|
|
|
29758
29760
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
29759
29761
|
init_cjs_shims();
|
|
@@ -29764,7 +29766,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
|
29764
29766
|
init_cjs_shims();
|
|
29765
29767
|
import process19 from "node:process";
|
|
29766
29768
|
import path4 from "node:path";
|
|
29767
|
-
import
|
|
29769
|
+
import fs4, { promises as fsPromises2 } from "node:fs";
|
|
29768
29770
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
29769
29771
|
|
|
29770
29772
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
@@ -29884,11 +29886,11 @@ async function findUp(name, options = {}) {
|
|
|
29884
29886
|
return (await findUpMultiple(name, { ...options, limit: 1 }))[0];
|
|
29885
29887
|
}
|
|
29886
29888
|
|
|
29887
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29889
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js
|
|
29888
29890
|
init_cjs_shims();
|
|
29889
29891
|
var import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
29890
29892
|
|
|
29891
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29893
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
29892
29894
|
init_cjs_shims();
|
|
29893
29895
|
var assertValidPattern = (pattern) => {
|
|
29894
29896
|
if (typeof pattern != "string")
|
|
@@ -29897,10 +29899,10 @@ var assertValidPattern = (pattern) => {
|
|
|
29897
29899
|
throw new TypeError("pattern is too long");
|
|
29898
29900
|
};
|
|
29899
29901
|
|
|
29900
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29902
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/ast.js
|
|
29901
29903
|
init_cjs_shims();
|
|
29902
29904
|
|
|
29903
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29905
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/brace-expressions.js
|
|
29904
29906
|
init_cjs_shims();
|
|
29905
29907
|
var posixClasses = {
|
|
29906
29908
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
@@ -29971,11 +29973,11 @@ var posixClasses = {
|
|
|
29971
29973
|
return [ranges.length && negs.length ? "(" + sranges + "|" + snegs + ")" : ranges.length ? sranges : snegs, uflag, endPos - pos, !0];
|
|
29972
29974
|
};
|
|
29973
29975
|
|
|
29974
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29976
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/unescape.js
|
|
29975
29977
|
init_cjs_shims();
|
|
29976
29978
|
var unescape2 = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
29977
29979
|
|
|
29978
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
29980
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/ast.js
|
|
29979
29981
|
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 {
|
|
29980
29982
|
type;
|
|
29981
29983
|
#root;
|
|
@@ -30150,6 +30152,9 @@ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType =
|
|
|
30150
30152
|
_glob: glob2
|
|
30151
30153
|
});
|
|
30152
30154
|
}
|
|
30155
|
+
get options() {
|
|
30156
|
+
return this.#options;
|
|
30157
|
+
}
|
|
30153
30158
|
// returns the string match, the regexp source, whether there's magic
|
|
30154
30159
|
// in the regexp (so a regular expression is required) and whether or
|
|
30155
30160
|
// not the uflag is needed for the regular expression (for posix classes)
|
|
@@ -30308,11 +30313,11 @@ var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), isExtglobType =
|
|
|
30308
30313
|
}
|
|
30309
30314
|
};
|
|
30310
30315
|
|
|
30311
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
30316
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/escape.js
|
|
30312
30317
|
init_cjs_shims();
|
|
30313
30318
|
var escape2 = (s, { windowsPathsNoEscape = !1 } = {}) => windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
30314
30319
|
|
|
30315
|
-
// ../../node_modules/.pnpm/minimatch@9.0.
|
|
30320
|
+
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js
|
|
30316
30321
|
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 = ""]) => {
|
|
30317
30322
|
let noext = qmarksTestNoExt([$0]);
|
|
30318
30323
|
return ext2 ? (ext2 = ext2.toLowerCase(), (f) => noext(f) && f.toLowerCase().endsWith(ext2)) : noext;
|
|
@@ -30565,7 +30570,10 @@ var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/, regExpEscape2 = (s) => s.replace(/[-[
|
|
|
30565
30570
|
for (let i = 0; i < globParts.length - 1; i++)
|
|
30566
30571
|
for (let j = i + 1; j < globParts.length; j++) {
|
|
30567
30572
|
let matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
|
|
30568
|
-
|
|
30573
|
+
if (matched) {
|
|
30574
|
+
globParts[i] = [], globParts[j] = matched;
|
|
30575
|
+
break;
|
|
30576
|
+
}
|
|
30569
30577
|
}
|
|
30570
30578
|
return globParts.filter((gs) => gs.length);
|
|
30571
30579
|
}
|
|
@@ -30667,7 +30675,7 @@ globstar while`, file, fr, pattern, pr, swallowee), this.matchOne(file.slice(fr)
|
|
|
30667
30675
|
let m, fastTest = null;
|
|
30668
30676
|
(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);
|
|
30669
30677
|
let re = AST.fromGlob(pattern, this.options).toMMPattern();
|
|
30670
|
-
return fastTest
|
|
30678
|
+
return fastTest && typeof re == "object" && Reflect.defineProperty(re, "test", { value: fastTest }), re;
|
|
30671
30679
|
}
|
|
30672
30680
|
makeRe() {
|
|
30673
30681
|
if (this.regexp || this.regexp === !1)
|
|
@@ -30734,9 +30742,13 @@ minimatch.unescape = unescape2;
|
|
|
30734
30742
|
// ../cli-kit/dist/public/node/fs.js
|
|
30735
30743
|
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";
|
|
30736
30744
|
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";
|
|
30745
|
+
import * as os4 from "os";
|
|
30737
30746
|
async function inTemporaryDirectory(callback) {
|
|
30738
30747
|
return temporaryDirectoryTask(callback);
|
|
30739
30748
|
}
|
|
30749
|
+
function tempDirectory() {
|
|
30750
|
+
return temporaryDirectory2();
|
|
30751
|
+
}
|
|
30740
30752
|
async function readFile(path8, options = { encoding: "utf8" }) {
|
|
30741
30753
|
return outputDebug(outputContent`Reading the content of file at ${outputToken.path(path8)}...`), fsReadFile(path8, options);
|
|
30742
30754
|
}
|
|
@@ -30775,7 +30787,7 @@ async function removeFile(path8) {
|
|
|
30775
30787
|
outputDebug(outputContent`Removing file at ${outputToken.path(path8)}...`), await remove(path8);
|
|
30776
30788
|
}
|
|
30777
30789
|
async function rmdir(path8, options = {}) {
|
|
30778
|
-
let { default: del } = await import("./del-
|
|
30790
|
+
let { default: del } = await import("./del-CKAQ44SX.js");
|
|
30779
30791
|
outputDebug(outputContent`Removing directory at ${outputToken.path(path8)}...`), await del(path8, { force: options.force });
|
|
30780
30792
|
}
|
|
30781
30793
|
async function isDirectory(path8) {
|
|
@@ -30831,9 +30843,23 @@ async function generateRandomNameForSubdirectory(options) {
|
|
|
30831
30843
|
return await fileExists(randomDirectoryPath) ? generateRandomNameForSubdirectory(options) : generated;
|
|
30832
30844
|
}
|
|
30833
30845
|
async function glob(pattern, options) {
|
|
30834
|
-
let { default: fastGlob } = await import("./out-
|
|
30846
|
+
let { default: fastGlob } = await import("./out-AZBX4ITJ.js"), overridenOptions = options;
|
|
30835
30847
|
return options?.dot == null && (overridenOptions = { ...options, dot: !0 }), fastGlob(pattern, overridenOptions);
|
|
30836
30848
|
}
|
|
30849
|
+
function detectEOL(content) {
|
|
30850
|
+
let match2 = content.match(/\r\n|\n/g);
|
|
30851
|
+
if (!match2)
|
|
30852
|
+
return defaultEOL();
|
|
30853
|
+
let crlf = match2.filter((eol) => eol === `\r
|
|
30854
|
+
`).length, lf = match2.filter((eol) => eol === `
|
|
30855
|
+
`).length;
|
|
30856
|
+
return crlf > lf ? `\r
|
|
30857
|
+
` : `
|
|
30858
|
+
`;
|
|
30859
|
+
}
|
|
30860
|
+
function defaultEOL() {
|
|
30861
|
+
return os4.EOL;
|
|
30862
|
+
}
|
|
30837
30863
|
async function findPathUp(matcher, options) {
|
|
30838
30864
|
let got = await findUp(matcher, options);
|
|
30839
30865
|
return got ? normalizePath(got) : void 0;
|
|
@@ -30848,16 +30874,16 @@ init_cjs_shims();
|
|
|
30848
30874
|
// ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
|
|
30849
30875
|
init_cjs_shims();
|
|
30850
30876
|
import path7 from "node:path";
|
|
30851
|
-
import
|
|
30877
|
+
import os5 from "node:os";
|
|
30852
30878
|
import process20 from "node:process";
|
|
30853
|
-
var homedir =
|
|
30879
|
+
var homedir = os5.homedir(), tmpdir2 = os5.tmpdir(), { env: env2 } = process20, macos = (name) => {
|
|
30854
30880
|
let library = path7.join(homedir, "Library");
|
|
30855
30881
|
return {
|
|
30856
30882
|
data: path7.join(library, "Application Support", name),
|
|
30857
30883
|
config: path7.join(library, "Preferences", name),
|
|
30858
30884
|
cache: path7.join(library, "Caches", name),
|
|
30859
30885
|
log: path7.join(library, "Logs", name),
|
|
30860
|
-
temp: path7.join(
|
|
30886
|
+
temp: path7.join(tmpdir2, name)
|
|
30861
30887
|
};
|
|
30862
30888
|
}, windows = (name) => {
|
|
30863
30889
|
let appData = env2.APPDATA || path7.join(homedir, "AppData", "Roaming"), localAppData = env2.LOCALAPPDATA || path7.join(homedir, "AppData", "Local");
|
|
@@ -30867,7 +30893,7 @@ var homedir = os3.homedir(), tmpdir = os3.tmpdir(), { env: env2 } = process20, m
|
|
|
30867
30893
|
config: path7.join(appData, name, "Config"),
|
|
30868
30894
|
cache: path7.join(localAppData, name, "Cache"),
|
|
30869
30895
|
log: path7.join(localAppData, name, "Log"),
|
|
30870
|
-
temp: path7.join(
|
|
30896
|
+
temp: path7.join(tmpdir2, name)
|
|
30871
30897
|
};
|
|
30872
30898
|
}, linux = (name) => {
|
|
30873
30899
|
let username = path7.basename(homedir);
|
|
@@ -30877,7 +30903,7 @@ var homedir = os3.homedir(), tmpdir = os3.tmpdir(), { env: env2 } = process20, m
|
|
|
30877
30903
|
cache: path7.join(env2.XDG_CACHE_HOME || path7.join(homedir, ".cache"), name),
|
|
30878
30904
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
30879
30905
|
log: path7.join(env2.XDG_STATE_HOME || path7.join(homedir, ".local", "state"), name),
|
|
30880
|
-
temp: path7.join(
|
|
30906
|
+
temp: path7.join(tmpdir2, username, name)
|
|
30881
30907
|
};
|
|
30882
30908
|
};
|
|
30883
30909
|
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
@@ -30919,8 +30945,7 @@ var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ?
|
|
|
30919
30945
|
refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
|
|
30920
30946
|
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
30921
30947
|
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
30922
|
-
json: "SHOPIFY_FLAG_JSON"
|
|
30923
|
-
useAppManagement: "USE_APP_MANAGEMENT_API"
|
|
30948
|
+
json: "SHOPIFY_FLAG_JSON"
|
|
30924
30949
|
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
30925
30950
|
backendPort: "BACKEND_PORT"
|
|
30926
30951
|
}, pathConstants = {
|
|
@@ -31091,6 +31116,50 @@ function getCIMetadata(envName, envs) {
|
|
|
31091
31116
|
}
|
|
31092
31117
|
}
|
|
31093
31118
|
|
|
31119
|
+
// ../cli-kit/dist/public/node/environment.js
|
|
31120
|
+
init_cjs_shims();
|
|
31121
|
+
|
|
31122
|
+
// ../cli-kit/dist/public/node/crypto.js
|
|
31123
|
+
init_cjs_shims();
|
|
31124
|
+
import crypto2 from "crypto";
|
|
31125
|
+
function hashString(str) {
|
|
31126
|
+
return crypto2.createHash("sha1").update(str).digest("hex");
|
|
31127
|
+
}
|
|
31128
|
+
function fileHash(buff) {
|
|
31129
|
+
return crypto2.createHash("md5").update(buff).digest("hex");
|
|
31130
|
+
}
|
|
31131
|
+
function randomUUID() {
|
|
31132
|
+
return crypto2.randomUUID();
|
|
31133
|
+
}
|
|
31134
|
+
function nonRandomUUID(subject) {
|
|
31135
|
+
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");
|
|
31136
|
+
}
|
|
31137
|
+
|
|
31138
|
+
// ../cli-kit/dist/public/node/environment.js
|
|
31139
|
+
function getEnvironmentVariables() {
|
|
31140
|
+
return process.env;
|
|
31141
|
+
}
|
|
31142
|
+
function getPartnersToken() {
|
|
31143
|
+
return getEnvironmentVariables()[environmentVariables.partnersToken];
|
|
31144
|
+
}
|
|
31145
|
+
function getBackendPort() {
|
|
31146
|
+
let backendPort = getEnvironmentVariables()[systemEnvironmentVariables.backendPort];
|
|
31147
|
+
if (backendPort && !isNaN(Number(backendPort)))
|
|
31148
|
+
return Number(backendPort);
|
|
31149
|
+
}
|
|
31150
|
+
function getIdentityTokenInformation() {
|
|
31151
|
+
let identityToken = getEnvironmentVariables()[environmentVariables.identityToken], refreshToken = getEnvironmentVariables()[environmentVariables.refreshToken];
|
|
31152
|
+
if (!(!identityToken || !refreshToken))
|
|
31153
|
+
return {
|
|
31154
|
+
accessToken: identityToken,
|
|
31155
|
+
refreshToken,
|
|
31156
|
+
userId: nonRandomUUID(identityToken)
|
|
31157
|
+
};
|
|
31158
|
+
}
|
|
31159
|
+
function jsonOutputEnabled(environment = getEnvironmentVariables()) {
|
|
31160
|
+
return sniffForJson() || isTruthy(environment[environmentVariables.json]);
|
|
31161
|
+
}
|
|
31162
|
+
|
|
31094
31163
|
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
31095
31164
|
init_cjs_shims();
|
|
31096
31165
|
function isInteractive({ stream: stream2 = process.stdout } = {}) {
|
|
@@ -31112,8 +31181,8 @@ function isDevelopment(env3 = process.env) {
|
|
|
31112
31181
|
function isVerbose(env3 = process.env) {
|
|
31113
31182
|
return isTruthy(env3[environmentVariables.verbose]) || process.argv.includes("--verbose");
|
|
31114
31183
|
}
|
|
31115
|
-
function
|
|
31116
|
-
return
|
|
31184
|
+
function isAppManagementDisabled() {
|
|
31185
|
+
return !!getPartnersToken();
|
|
31117
31186
|
}
|
|
31118
31187
|
async function isShopify(env3 = process.env) {
|
|
31119
31188
|
return Object.prototype.hasOwnProperty.call(env3, environmentVariables.runAsUser) ? !isTruthy(env3[environmentVariables.runAsUser]) : await fileExists(pathConstants.executables.dev) || isSpin(env3);
|
|
@@ -31234,7 +31303,6 @@ export {
|
|
|
31234
31303
|
capitalize,
|
|
31235
31304
|
pluralize,
|
|
31236
31305
|
tryParseInt,
|
|
31237
|
-
linesToColumns,
|
|
31238
31306
|
slugify,
|
|
31239
31307
|
camelize,
|
|
31240
31308
|
hyphenate,
|
|
@@ -31246,6 +31314,7 @@ export {
|
|
|
31246
31314
|
pascalize,
|
|
31247
31315
|
normalizeDelimitedString,
|
|
31248
31316
|
inTemporaryDirectory,
|
|
31317
|
+
tempDirectory,
|
|
31249
31318
|
readFile,
|
|
31250
31319
|
readFileSync3 as readFileSync,
|
|
31251
31320
|
fileRealPath,
|
|
@@ -31271,12 +31340,12 @@ export {
|
|
|
31271
31340
|
fileExistsSync,
|
|
31272
31341
|
generateRandomNameForSubdirectory,
|
|
31273
31342
|
glob,
|
|
31343
|
+
detectEOL,
|
|
31274
31344
|
findPathUp,
|
|
31275
31345
|
matchGlob,
|
|
31276
31346
|
envPaths,
|
|
31277
31347
|
logsFolder,
|
|
31278
31348
|
environmentVariables,
|
|
31279
|
-
systemEnvironmentVariables,
|
|
31280
31349
|
sessionConstants,
|
|
31281
31350
|
bugsnagApiKey,
|
|
31282
31351
|
reportingRateLimit,
|
|
@@ -31301,11 +31370,20 @@ export {
|
|
|
31301
31370
|
appHost,
|
|
31302
31371
|
spinVariables,
|
|
31303
31372
|
fetchSpinPort,
|
|
31373
|
+
hashString,
|
|
31374
|
+
fileHash,
|
|
31375
|
+
randomUUID,
|
|
31376
|
+
nonRandomUUID,
|
|
31377
|
+
getEnvironmentVariables,
|
|
31378
|
+
getPartnersToken,
|
|
31379
|
+
getBackendPort,
|
|
31380
|
+
getIdentityTokenInformation,
|
|
31381
|
+
jsonOutputEnabled,
|
|
31304
31382
|
isTerminalInteractive,
|
|
31305
31383
|
homeDirectory,
|
|
31306
31384
|
isDevelopment,
|
|
31307
31385
|
isVerbose,
|
|
31308
|
-
|
|
31386
|
+
isAppManagementDisabled,
|
|
31309
31387
|
isShopify,
|
|
31310
31388
|
isUnitTest,
|
|
31311
31389
|
analyticsDisabled,
|
|
@@ -31351,6 +31429,7 @@ export {
|
|
|
31351
31429
|
consoleError,
|
|
31352
31430
|
consoleWarn,
|
|
31353
31431
|
unstyled,
|
|
31432
|
+
shouldDisplayColors,
|
|
31354
31433
|
formatSection,
|
|
31355
31434
|
CancelExecution,
|
|
31356
31435
|
FatalError2 as FatalError,
|
|
@@ -31487,4 +31566,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31487
31566
|
* LICENSE file in the root directory of this source tree.
|
|
31488
31567
|
*)
|
|
31489
31568
|
*/
|
|
31490
|
-
//# sourceMappingURL=chunk-
|
|
31569
|
+
//# sourceMappingURL=chunk-MFOTVT4R.js.map
|