@shopify/create-app 3.93.1 → 3.94.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/{chunk-TR27HABY.js → chunk-3QXHJGOG.js} +1061 -1198
- package/dist/{chunk-SR2M4BGN.js → chunk-CXPWSYGC.js} +11 -11
- package/dist/{chunk-WFKQYLB4.js → chunk-EQGHDVWZ.js} +26 -20
- package/dist/{chunk-TM5S3XKJ.js → chunk-IFG7N3S2.js} +288 -140
- package/dist/{chunk-HK42PKRF.js → chunk-NIYBO6HO.js} +10 -29
- package/dist/{chunk-POUAMSSZ.js → chunk-SERZNJLR.js} +5 -5
- package/dist/{chunk-SW7GINIY.js → chunk-V6HCEO5N.js} +40 -21
- package/dist/{chunk-WADXLNQQ.js → chunk-X7WPZPGY.js} +54 -14
- package/dist/{error-handler-F3OBT6R6.js → error-handler-O246E3LL.js} +7 -7
- package/dist/hooks/postrun.js +7 -7
- package/dist/hooks/prerun.js +7 -7
- package/dist/{http-proxy-node16-RJKHWVRW.js → http-proxy-node16-U5VBDLS3.js} +2 -2
- package/dist/index.js +108598 -103917
- package/dist/index.test.js +7 -7
- package/dist/{lib-GUBXVVG4.js → lib-PPI2FZOR.js} +3 -3
- package/dist/{local-P4J234JR.js → local-YL23CMQD.js} +5 -5
- package/dist/{node-package-manager-3AWQEMQM.js → node-package-manager-2BRTEAQH.js} +8 -6
- package/dist/{path-TAO6YSB2.js → path-NQ6GZ2WO.js} +4 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-GHSEMVQX.js → ui-PS2SZVOU.js} +5 -5
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -3,19 +3,20 @@ import {
|
|
|
3
3
|
require_lib,
|
|
4
4
|
require_semver,
|
|
5
5
|
require_source_map
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IFG7N3S2.js";
|
|
7
7
|
import {
|
|
8
8
|
require_has_flag
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CXPWSYGC.js";
|
|
10
10
|
import {
|
|
11
11
|
cwd,
|
|
12
12
|
delimiter,
|
|
13
13
|
dirname,
|
|
14
|
+
join,
|
|
14
15
|
joinPath,
|
|
15
16
|
normalizePath,
|
|
16
17
|
relativizePath,
|
|
17
18
|
sniffForPath
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-NIYBO6HO.js";
|
|
19
20
|
import {
|
|
20
21
|
require_out
|
|
21
22
|
} from "./chunk-AROS7RI6.js";
|
|
@@ -8108,7 +8109,7 @@ Error generating stack: ` + x.message + `
|
|
|
8108
8109
|
function markRetryLaneIfNotHydrated(fiber, retryLane) {
|
|
8109
8110
|
markRetryLaneImpl(fiber, retryLane), (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
|
|
8110
8111
|
}
|
|
8111
|
-
var exports2 = {},
|
|
8112
|
+
var exports2 = {}, React43 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React43.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
|
|
8112
8113
|
$$$config.cloneMutableInstance;
|
|
8113
8114
|
var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
|
|
8114
8115
|
$$$config.cloneMutableTextInstance;
|
|
@@ -8767,10 +8768,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8767
8768
|
fiber = fiber.next, id--;
|
|
8768
8769
|
return fiber;
|
|
8769
8770
|
}
|
|
8770
|
-
function copyWithSetImpl(obj,
|
|
8771
|
-
if (index >=
|
|
8772
|
-
var key =
|
|
8773
|
-
return updated[key] = copyWithSetImpl(obj[key],
|
|
8771
|
+
function copyWithSetImpl(obj, path7, index, value) {
|
|
8772
|
+
if (index >= path7.length) return value;
|
|
8773
|
+
var key = path7[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
|
|
8774
|
+
return updated[key] = copyWithSetImpl(obj[key], path7, index + 1, value), updated;
|
|
8774
8775
|
}
|
|
8775
8776
|
function copyWithRename(obj, oldPath, newPath) {
|
|
8776
8777
|
if (oldPath.length !== newPath.length)
|
|
@@ -8795,9 +8796,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8795
8796
|
index + 1
|
|
8796
8797
|
), updated;
|
|
8797
8798
|
}
|
|
8798
|
-
function copyWithDeleteImpl(obj,
|
|
8799
|
-
var key =
|
|
8800
|
-
return index + 1 ===
|
|
8799
|
+
function copyWithDeleteImpl(obj, path7, index) {
|
|
8800
|
+
var key = path7[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
|
|
8801
|
+
return index + 1 === path7.length ? (isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated) : (updated[key] = copyWithDeleteImpl(obj[key], path7, index + 1), updated);
|
|
8801
8802
|
}
|
|
8802
8803
|
function shouldSuspendImpl() {
|
|
8803
8804
|
return !1;
|
|
@@ -18847,7 +18848,7 @@ Check the render method of %s.`,
|
|
|
18847
18848
|
function getCurrentFiberForDevTools() {
|
|
18848
18849
|
return current;
|
|
18849
18850
|
}
|
|
18850
|
-
var exports2 = {},
|
|
18851
|
+
var exports2 = {}, React43 = require_react(), Scheduler2 = require_scheduler(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React43.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, rendererVersion = $$$config.rendererVersion, rendererPackageName = $$$config.rendererPackageName, extraDevToolsConfig = $$$config.extraDevToolsConfig, getPublicInstance = $$$config.getPublicInstance, getRootHostContext = $$$config.getRootHostContext, getChildHostContext = $$$config.getChildHostContext, prepareForCommit = $$$config.prepareForCommit, resetAfterCommit = $$$config.resetAfterCommit, createInstance = $$$config.createInstance;
|
|
18851
18852
|
$$$config.cloneMutableInstance;
|
|
18852
18853
|
var appendInitialChild = $$$config.appendInitialChild, finalizeInitialChildren = $$$config.finalizeInitialChildren, shouldSetTextContent = $$$config.shouldSetTextContent, createTextInstance = $$$config.createTextInstance;
|
|
18853
18854
|
$$$config.cloneMutableTextInstance;
|
|
@@ -19943,16 +19944,16 @@ Check the top-level render call using <` + componentName2 + ">.");
|
|
|
19943
19944
|
hasBadMapPolyfill = !0;
|
|
19944
19945
|
}
|
|
19945
19946
|
var didWarnAboutNestedUpdates = !1, didWarnAboutFindNodeInStrictMode = {}, overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
|
|
19946
|
-
return overrideHookState = function(fiber, id,
|
|
19947
|
-
id = findHook(fiber, id), id !== null && (
|
|
19948
|
-
}, overrideHookStateDeletePath = function(fiber, id,
|
|
19949
|
-
id = findHook(fiber, id), id !== null && (
|
|
19947
|
+
return overrideHookState = function(fiber, id, path7, value) {
|
|
19948
|
+
id = findHook(fiber, id), id !== null && (path7 = copyWithSetImpl(id.memoizedState, path7, 0, value), id.memoizedState = path7, id.baseState = path7, fiber.memoizedProps = assign({}, fiber.memoizedProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), path7 !== null && scheduleUpdateOnFiber(path7, fiber, 2));
|
|
19949
|
+
}, overrideHookStateDeletePath = function(fiber, id, path7) {
|
|
19950
|
+
id = findHook(fiber, id), id !== null && (path7 = copyWithDeleteImpl(id.memoizedState, path7, 0), id.memoizedState = path7, id.baseState = path7, fiber.memoizedProps = assign({}, fiber.memoizedProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), path7 !== null && scheduleUpdateOnFiber(path7, fiber, 2));
|
|
19950
19951
|
}, overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
|
|
19951
19952
|
id = findHook(fiber, id), id !== null && (oldPath = copyWithRename(id.memoizedState, oldPath, newPath), id.memoizedState = oldPath, id.baseState = oldPath, fiber.memoizedProps = assign({}, fiber.memoizedProps), oldPath = enqueueConcurrentRenderForLane(fiber, 2), oldPath !== null && scheduleUpdateOnFiber(oldPath, fiber, 2));
|
|
19952
|
-
}, overrideProps = function(fiber,
|
|
19953
|
-
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps,
|
|
19954
|
-
}, overridePropsDeletePath = function(fiber,
|
|
19955
|
-
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps,
|
|
19953
|
+
}, overrideProps = function(fiber, path7, value) {
|
|
19954
|
+
fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path7, 0, value), fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), path7 !== null && scheduleUpdateOnFiber(path7, fiber, 2);
|
|
19955
|
+
}, overridePropsDeletePath = function(fiber, path7) {
|
|
19956
|
+
fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path7, 0), fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps), path7 = enqueueConcurrentRenderForLane(fiber, 2), path7 !== null && scheduleUpdateOnFiber(path7, fiber, 2);
|
|
19956
19957
|
}, overridePropsRenamePath = function(fiber, oldPath, newPath) {
|
|
19957
19958
|
fiber.pendingProps = copyWithRename(
|
|
19958
19959
|
fiber.memoizedProps,
|
|
@@ -20583,7 +20584,7 @@ var require_supports_color = __commonJS({
|
|
|
20583
20584
|
"../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
|
|
20584
20585
|
"use strict";
|
|
20585
20586
|
init_cjs_shims();
|
|
20586
|
-
var
|
|
20587
|
+
var os6 = __require("os"), tty4 = __require("tty"), hasFlag3 = require_has_flag(), { env: env5 } = process, forceColor;
|
|
20587
20588
|
hasFlag3("no-color") || hasFlag3("no-colors") || hasFlag3("color=false") || hasFlag3("color=never") ? forceColor = 0 : (hasFlag3("color") || hasFlag3("colors") || hasFlag3("color=true") || hasFlag3("color=always")) && (forceColor = 1);
|
|
20588
20589
|
"FORCE_COLOR" in env5 && (env5.FORCE_COLOR === "true" ? forceColor = 1 : env5.FORCE_COLOR === "false" ? forceColor = 0 : forceColor = env5.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env5.FORCE_COLOR, 10), 3));
|
|
20589
20590
|
function translateLevel3(level) {
|
|
@@ -20607,7 +20608,7 @@ var require_supports_color = __commonJS({
|
|
|
20607
20608
|
if (env5.TERM === "dumb")
|
|
20608
20609
|
return min;
|
|
20609
20610
|
if (process.platform === "win32") {
|
|
20610
|
-
let osRelease =
|
|
20611
|
+
let osRelease = os6.release().split(".");
|
|
20611
20612
|
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
|
|
20612
20613
|
}
|
|
20613
20614
|
if ("CI" in env5)
|
|
@@ -20627,8 +20628,8 @@ var require_supports_color = __commonJS({
|
|
|
20627
20628
|
}
|
|
20628
20629
|
return /-256(color)?$/i.test(env5.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env5.TERM) || "COLORTERM" in env5 ? 1 : min;
|
|
20629
20630
|
}
|
|
20630
|
-
function getSupportLevel(
|
|
20631
|
-
let level = supportsColor4(
|
|
20631
|
+
function getSupportLevel(stream) {
|
|
20632
|
+
let level = supportsColor4(stream, stream && stream.isTTY);
|
|
20632
20633
|
return translateLevel3(level);
|
|
20633
20634
|
}
|
|
20634
20635
|
module.exports = {
|
|
@@ -20661,7 +20662,7 @@ var require_supports_hyperlinks = __commonJS({
|
|
|
20661
20662
|
patch: versions[2]
|
|
20662
20663
|
};
|
|
20663
20664
|
}
|
|
20664
|
-
function supportsHyperlink(
|
|
20665
|
+
function supportsHyperlink(stream) {
|
|
20665
20666
|
let {
|
|
20666
20667
|
CI,
|
|
20667
20668
|
FORCE_HYPERLINK,
|
|
@@ -20677,7 +20678,7 @@ var require_supports_hyperlinks = __commonJS({
|
|
|
20677
20678
|
return !1;
|
|
20678
20679
|
if (hasFlag3("hyperlink=true") || hasFlag3("hyperlink=always") || NETLIFY)
|
|
20679
20680
|
return !0;
|
|
20680
|
-
if (!supportsColor4.supportsColor(
|
|
20681
|
+
if (!supportsColor4.supportsColor(stream) || stream && !stream.isTTY)
|
|
20681
20682
|
return !1;
|
|
20682
20683
|
if ("WT_SESSION" in process.env)
|
|
20683
20684
|
return !0;
|
|
@@ -20777,13 +20778,13 @@ var require_path = __commonJS({
|
|
|
20777
20778
|
"../../node_modules/.pnpm/get-source@2.0.12/node_modules/get-source/impl/path.js"(exports, module) {
|
|
20778
20779
|
"use strict";
|
|
20779
20780
|
init_cjs_shims();
|
|
20780
|
-
var isBrowser3 = typeof window < "u" && window.window === window && window.navigator, cwd3 = isBrowser3 ? window.location.href : process.cwd(), urlRegexp = new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"),
|
|
20781
|
+
var isBrowser3 = typeof window < "u" && window.window === window && window.navigator, cwd3 = isBrowser3 ? window.location.href : process.cwd(), urlRegexp = new RegExp("^((https|http)://)?[a-z0-9A-Z]{3}.[a-z0-9A-Z][a-z0-9A-Z]{0,61}?[a-z0-9A-Z].com|net|cn|cc (:s[0-9]{1-4})?/$"), path7 = module.exports = {
|
|
20781
20782
|
concat(a, b) {
|
|
20782
20783
|
let a_endsWithSlash = a[a.length - 1] === "/", b_startsWithSlash = b[0] === "/";
|
|
20783
20784
|
return a + (a_endsWithSlash || b_startsWithSlash ? "" : "/") + (a_endsWithSlash && b_startsWithSlash ? b.substring(1) : b);
|
|
20784
20785
|
},
|
|
20785
20786
|
resolve(x) {
|
|
20786
|
-
return
|
|
20787
|
+
return path7.isAbsolute(x) ? path7.normalize(x) : path7.normalize(path7.concat(cwd3, x));
|
|
20787
20788
|
},
|
|
20788
20789
|
normalize(x) {
|
|
20789
20790
|
let output2 = [], skip = 0;
|
|
@@ -20797,7 +20798,7 @@ var require_path = __commonJS({
|
|
|
20797
20798
|
isURL: (x) => urlRegexp.test(x),
|
|
20798
20799
|
isAbsolute: (x) => x[0] === "/" || /^[^\/]*:/.test(x),
|
|
20799
20800
|
relativeToFile(a, b) {
|
|
20800
|
-
return
|
|
20801
|
+
return path7.isData(a) || path7.isAbsolute(b) ? path7.normalize(b) : path7.normalize(path7.concat(a.split("/").slice(0, -1).join("/"), b));
|
|
20801
20802
|
}
|
|
20802
20803
|
};
|
|
20803
20804
|
}
|
|
@@ -20832,16 +20833,16 @@ var require_get_source = __commonJS({
|
|
|
20832
20833
|
"../../node_modules/.pnpm/get-source@2.0.12/node_modules/get-source/get-source.js"(exports, module) {
|
|
20833
20834
|
"use strict";
|
|
20834
20835
|
init_cjs_shims();
|
|
20835
|
-
var { assign } = Object, isBrowser3 = typeof window < "u" && window.window === window && window.navigator, SourceMapConsumer = require_source_map().SourceMapConsumer, SyncPromise = require_SyncPromise(),
|
|
20836
|
+
var { assign } = Object, isBrowser3 = typeof window < "u" && window.window === window && window.navigator, SourceMapConsumer = require_source_map().SourceMapConsumer, SyncPromise = require_SyncPromise(), path7 = require_path(), dataURIToBuffer = require_data_uri_to_buffer(), nodeRequire = isBrowser3 ? null : module.require, memoize = (f) => {
|
|
20836
20837
|
let m = (x) => x in m.cache ? m.cache[x] : m.cache[x] = f(x);
|
|
20837
20838
|
return m.forgetEverything = () => {
|
|
20838
20839
|
m.cache = /* @__PURE__ */ Object.create(null);
|
|
20839
20840
|
}, m.cache = /* @__PURE__ */ Object.create(null), m;
|
|
20840
20841
|
};
|
|
20841
20842
|
function impl(fetchFile, sync) {
|
|
20842
|
-
let PromiseImpl = sync ? SyncPromise : Promise, SourceFileMemoized = memoize((
|
|
20843
|
+
let PromiseImpl = sync ? SyncPromise : Promise, SourceFileMemoized = memoize((path8) => SourceFile(path8, fetchFile(path8)));
|
|
20843
20844
|
function SourceFile(srcPath, text) {
|
|
20844
|
-
return text === void 0 ? SourceFileMemoized(
|
|
20845
|
+
return text === void 0 ? SourceFileMemoized(path7.resolve(srcPath)) : PromiseImpl.resolve(text).then((text2) => {
|
|
20845
20846
|
let file, lines, resolver, _resolve = (loc) => (resolver = resolver || SourceMapResolverFromFetchedFile(file))(loc);
|
|
20846
20847
|
return file = {
|
|
20847
20848
|
path: srcPath,
|
|
@@ -20879,9 +20880,9 @@ var require_get_source = __commonJS({
|
|
|
20879
20880
|
return url ? SourceMapResolver(file.path, url, defaultResolver) : defaultResolver;
|
|
20880
20881
|
}
|
|
20881
20882
|
function SourceMapResolver(originalFilePath, sourceMapPath, fallbackResolve) {
|
|
20882
|
-
let srcFile = sourceMapPath.startsWith("data:") ? SourceFile(originalFilePath, dataURIToBuffer(sourceMapPath).toString()) : SourceFile(
|
|
20883
|
+
let srcFile = sourceMapPath.startsWith("data:") ? SourceFile(originalFilePath, dataURIToBuffer(sourceMapPath).toString()) : SourceFile(path7.relativeToFile(originalFilePath, sourceMapPath)), parsedMap = srcFile.then((f) => SourceMapConsumer(JSON.parse(f.text))), sourceFor = memoize(function(filePath) {
|
|
20883
20884
|
return srcFile.then((f) => {
|
|
20884
|
-
let fullPath =
|
|
20885
|
+
let fullPath = path7.relativeToFile(f.path, filePath);
|
|
20885
20886
|
return parsedMap.then((x) => SourceFile(
|
|
20886
20887
|
fullPath,
|
|
20887
20888
|
x.sourceContentFor(
|
|
@@ -20903,14 +20904,14 @@ var require_get_source = __commonJS({
|
|
|
20903
20904
|
) : fallbackResolve(loc);
|
|
20904
20905
|
}).catch((e) => assign(fallbackResolve(loc), { sourceMapError: e }));
|
|
20905
20906
|
}
|
|
20906
|
-
return assign(function(
|
|
20907
|
-
let file = SourceFile(
|
|
20907
|
+
return assign(function(path8) {
|
|
20908
|
+
let file = SourceFile(path8);
|
|
20908
20909
|
if (sync)
|
|
20909
20910
|
try {
|
|
20910
20911
|
return SyncPromise.valueFrom(file);
|
|
20911
20912
|
} catch (e) {
|
|
20912
20913
|
let noFile = {
|
|
20913
|
-
path:
|
|
20914
|
+
path: path8,
|
|
20914
20915
|
text: "",
|
|
20915
20916
|
lines: [],
|
|
20916
20917
|
error: e,
|
|
@@ -20926,29 +20927,29 @@ var require_get_source = __commonJS({
|
|
|
20926
20927
|
getCache: () => SourceFileMemoized.cache
|
|
20927
20928
|
});
|
|
20928
20929
|
}
|
|
20929
|
-
module.exports = impl(function(
|
|
20930
|
+
module.exports = impl(function(path8) {
|
|
20930
20931
|
return new SyncPromise((resolve) => {
|
|
20931
20932
|
if (isBrowser3) {
|
|
20932
20933
|
let xhr = new XMLHttpRequest();
|
|
20933
20934
|
xhr.open(
|
|
20934
20935
|
"GET",
|
|
20935
|
-
|
|
20936
|
+
path8,
|
|
20936
20937
|
!1
|
|
20937
20938
|
/* SYNCHRONOUS XHR FTW :) */
|
|
20938
20939
|
), xhr.send(null), resolve(xhr.responseText);
|
|
20939
20940
|
} else
|
|
20940
|
-
resolve(nodeRequire("fs").readFileSync(
|
|
20941
|
+
resolve(nodeRequire("fs").readFileSync(path8, { encoding: "utf8" }));
|
|
20941
20942
|
});
|
|
20942
20943
|
}, !0);
|
|
20943
|
-
module.exports.async = impl(function(
|
|
20944
|
+
module.exports.async = impl(function(path8) {
|
|
20944
20945
|
return new Promise((resolve, reject) => {
|
|
20945
20946
|
if (isBrowser3) {
|
|
20946
20947
|
let xhr = new XMLHttpRequest();
|
|
20947
|
-
xhr.open("GET",
|
|
20948
|
+
xhr.open("GET", path8), xhr.onreadystatechange = (event) => {
|
|
20948
20949
|
xhr.readyState === 4 && (xhr.status === 200 ? resolve(xhr.responseText) : reject(new Error(xhr.statusText)));
|
|
20949
20950
|
}, xhr.send(null);
|
|
20950
20951
|
} else
|
|
20951
|
-
nodeRequire("fs").readFile(
|
|
20952
|
+
nodeRequire("fs").readFile(path8, { encoding: "utf8" }, (e, x) => {
|
|
20952
20953
|
e ? reject(e) : resolve(x);
|
|
20953
20954
|
});
|
|
20954
20955
|
});
|
|
@@ -22736,10 +22737,10 @@ var require_baseGet = __commonJS({
|
|
|
22736
22737
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseGet.js"(exports, module) {
|
|
22737
22738
|
init_cjs_shims();
|
|
22738
22739
|
var castPath = require_castPath(), toKey = require_toKey();
|
|
22739
|
-
function baseGet(object,
|
|
22740
|
-
|
|
22741
|
-
for (var index = 0, length =
|
|
22742
|
-
object = object[toKey(
|
|
22740
|
+
function baseGet(object, path7) {
|
|
22741
|
+
path7 = castPath(path7, object);
|
|
22742
|
+
for (var index = 0, length = path7.length; object != null && index < length; )
|
|
22743
|
+
object = object[toKey(path7[index++])];
|
|
22743
22744
|
return index && index == length ? object : void 0;
|
|
22744
22745
|
}
|
|
22745
22746
|
module.exports = baseGet;
|
|
@@ -22751,8 +22752,8 @@ var require_get = __commonJS({
|
|
|
22751
22752
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/get.js"(exports, module) {
|
|
22752
22753
|
init_cjs_shims();
|
|
22753
22754
|
var baseGet = require_baseGet();
|
|
22754
|
-
function get(object,
|
|
22755
|
-
var result = object == null ? void 0 : baseGet(object,
|
|
22755
|
+
function get(object, path7, defaultValue) {
|
|
22756
|
+
var result = object == null ? void 0 : baseGet(object, path7);
|
|
22756
22757
|
return result === void 0 ? defaultValue : result;
|
|
22757
22758
|
}
|
|
22758
22759
|
module.exports = get;
|
|
@@ -22775,10 +22776,10 @@ var require_hasPath = __commonJS({
|
|
|
22775
22776
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_hasPath.js"(exports, module) {
|
|
22776
22777
|
init_cjs_shims();
|
|
22777
22778
|
var castPath = require_castPath(), isArguments = require_isArguments(), isArray = require_isArray(), isIndex = require_isIndex(), isLength = require_isLength(), toKey = require_toKey();
|
|
22778
|
-
function hasPath(object,
|
|
22779
|
-
|
|
22780
|
-
for (var index = -1, length =
|
|
22781
|
-
var key = toKey(
|
|
22779
|
+
function hasPath(object, path7, hasFunc) {
|
|
22780
|
+
path7 = castPath(path7, object);
|
|
22781
|
+
for (var index = -1, length = path7.length, result = !1; ++index < length; ) {
|
|
22782
|
+
var key = toKey(path7[index]);
|
|
22782
22783
|
if (!(result = object != null && hasFunc(object, key)))
|
|
22783
22784
|
break;
|
|
22784
22785
|
object = object[key];
|
|
@@ -22794,8 +22795,8 @@ var require_hasIn = __commonJS({
|
|
|
22794
22795
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/hasIn.js"(exports, module) {
|
|
22795
22796
|
init_cjs_shims();
|
|
22796
22797
|
var baseHasIn = require_baseHasIn(), hasPath = require_hasPath();
|
|
22797
|
-
function hasIn(object,
|
|
22798
|
-
return object != null && hasPath(object,
|
|
22798
|
+
function hasIn(object, path7) {
|
|
22799
|
+
return object != null && hasPath(object, path7, baseHasIn);
|
|
22799
22800
|
}
|
|
22800
22801
|
module.exports = hasIn;
|
|
22801
22802
|
}
|
|
@@ -22806,10 +22807,10 @@ var require_baseMatchesProperty = __commonJS({
|
|
|
22806
22807
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_baseMatchesProperty.js"(exports, module) {
|
|
22807
22808
|
init_cjs_shims();
|
|
22808
22809
|
var baseIsEqual = require_baseIsEqual(), get = require_get(), hasIn = require_hasIn(), isKey = require_isKey(), isStrictComparable = require_isStrictComparable(), matchesStrictComparable = require_matchesStrictComparable(), toKey = require_toKey(), COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
22809
|
-
function baseMatchesProperty(
|
|
22810
|
-
return isKey(
|
|
22811
|
-
var objValue = get(object,
|
|
22812
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object,
|
|
22810
|
+
function baseMatchesProperty(path7, srcValue) {
|
|
22811
|
+
return isKey(path7) && isStrictComparable(srcValue) ? matchesStrictComparable(toKey(path7), srcValue) : function(object) {
|
|
22812
|
+
var objValue = get(object, path7);
|
|
22813
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path7) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
22813
22814
|
};
|
|
22814
22815
|
}
|
|
22815
22816
|
module.exports = baseMatchesProperty;
|
|
@@ -22845,9 +22846,9 @@ var require_basePropertyDeep = __commonJS({
|
|
|
22845
22846
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/_basePropertyDeep.js"(exports, module) {
|
|
22846
22847
|
init_cjs_shims();
|
|
22847
22848
|
var baseGet = require_baseGet();
|
|
22848
|
-
function basePropertyDeep(
|
|
22849
|
+
function basePropertyDeep(path7) {
|
|
22849
22850
|
return function(object) {
|
|
22850
|
-
return baseGet(object,
|
|
22851
|
+
return baseGet(object, path7);
|
|
22851
22852
|
};
|
|
22852
22853
|
}
|
|
22853
22854
|
module.exports = basePropertyDeep;
|
|
@@ -22859,8 +22860,8 @@ var require_property = __commonJS({
|
|
|
22859
22860
|
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/property.js"(exports, module) {
|
|
22860
22861
|
init_cjs_shims();
|
|
22861
22862
|
var baseProperty = require_baseProperty(), basePropertyDeep = require_basePropertyDeep(), isKey = require_isKey(), toKey = require_toKey();
|
|
22862
|
-
function property(
|
|
22863
|
-
return isKey(
|
|
22863
|
+
function property(path7) {
|
|
22864
|
+
return isKey(path7) ? baseProperty(toKey(path7)) : basePropertyDeep(path7);
|
|
22864
22865
|
}
|
|
22865
22866
|
module.exports = property;
|
|
22866
22867
|
}
|
|
@@ -23606,10 +23607,10 @@ function __disposeResources(env5) {
|
|
|
23606
23607
|
}
|
|
23607
23608
|
return next();
|
|
23608
23609
|
}
|
|
23609
|
-
function __rewriteRelativeImportExtension(
|
|
23610
|
-
return typeof
|
|
23610
|
+
function __rewriteRelativeImportExtension(path7, preserveJsx) {
|
|
23611
|
+
return typeof path7 == "string" && /^\.\.?\//.test(path7) ? path7.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) {
|
|
23611
23612
|
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext2 || !cm) ? m : d + ext2 + "." + cm.toLowerCase() + "js";
|
|
23612
|
-
}) :
|
|
23613
|
+
}) : path7;
|
|
23613
23614
|
}
|
|
23614
23615
|
var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default, init_tslib_es6 = __esm({
|
|
23615
23616
|
"../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs"() {
|
|
@@ -25713,28 +25714,28 @@ var require_windows = __commonJS({
|
|
|
25713
25714
|
init_cjs_shims();
|
|
25714
25715
|
module.exports = isexe;
|
|
25715
25716
|
isexe.sync = sync;
|
|
25716
|
-
var
|
|
25717
|
-
function checkPathExt(
|
|
25717
|
+
var fs4 = __require("fs");
|
|
25718
|
+
function checkPathExt(path7, options) {
|
|
25718
25719
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
25719
25720
|
if (!pathext || (pathext = pathext.split(";"), pathext.indexOf("") !== -1))
|
|
25720
25721
|
return !0;
|
|
25721
25722
|
for (var i = 0; i < pathext.length; i++) {
|
|
25722
25723
|
var p = pathext[i].toLowerCase();
|
|
25723
|
-
if (p &&
|
|
25724
|
+
if (p && path7.substr(-p.length).toLowerCase() === p)
|
|
25724
25725
|
return !0;
|
|
25725
25726
|
}
|
|
25726
25727
|
return !1;
|
|
25727
25728
|
}
|
|
25728
|
-
function checkStat(stat,
|
|
25729
|
-
return !stat.isSymbolicLink() && !stat.isFile() ? !1 : checkPathExt(
|
|
25729
|
+
function checkStat(stat, path7, options) {
|
|
25730
|
+
return !stat.isSymbolicLink() && !stat.isFile() ? !1 : checkPathExt(path7, options);
|
|
25730
25731
|
}
|
|
25731
|
-
function isexe(
|
|
25732
|
-
|
|
25733
|
-
cb(er, er ? !1 : checkStat(stat,
|
|
25732
|
+
function isexe(path7, options, cb) {
|
|
25733
|
+
fs4.stat(path7, function(er, stat) {
|
|
25734
|
+
cb(er, er ? !1 : checkStat(stat, path7, options));
|
|
25734
25735
|
});
|
|
25735
25736
|
}
|
|
25736
|
-
function sync(
|
|
25737
|
-
return checkStat(
|
|
25737
|
+
function sync(path7, options) {
|
|
25738
|
+
return checkStat(fs4.statSync(path7), path7, options);
|
|
25738
25739
|
}
|
|
25739
25740
|
}
|
|
25740
25741
|
});
|
|
@@ -25745,14 +25746,14 @@ var require_mode = __commonJS({
|
|
|
25745
25746
|
init_cjs_shims();
|
|
25746
25747
|
module.exports = isexe;
|
|
25747
25748
|
isexe.sync = sync;
|
|
25748
|
-
var
|
|
25749
|
-
function isexe(
|
|
25750
|
-
|
|
25749
|
+
var fs4 = __require("fs");
|
|
25750
|
+
function isexe(path7, options, cb) {
|
|
25751
|
+
fs4.stat(path7, function(er, stat) {
|
|
25751
25752
|
cb(er, er ? !1 : checkStat(stat, options));
|
|
25752
25753
|
});
|
|
25753
25754
|
}
|
|
25754
|
-
function sync(
|
|
25755
|
-
return checkStat(
|
|
25755
|
+
function sync(path7, options) {
|
|
25756
|
+
return checkStat(fs4.statSync(path7), options);
|
|
25756
25757
|
}
|
|
25757
25758
|
function checkStat(stat, options) {
|
|
25758
25759
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -25768,27 +25769,27 @@ var require_mode = __commonJS({
|
|
|
25768
25769
|
var require_isexe = __commonJS({
|
|
25769
25770
|
"../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
25770
25771
|
init_cjs_shims();
|
|
25771
|
-
var
|
|
25772
|
+
var fs4 = __require("fs"), core;
|
|
25772
25773
|
process.platform === "win32" || global.TESTING_WINDOWS ? core = require_windows() : core = require_mode();
|
|
25773
25774
|
module.exports = isexe;
|
|
25774
25775
|
isexe.sync = sync;
|
|
25775
|
-
function isexe(
|
|
25776
|
+
function isexe(path7, options, cb) {
|
|
25776
25777
|
if (typeof options == "function" && (cb = options, options = {}), !cb) {
|
|
25777
25778
|
if (typeof Promise != "function")
|
|
25778
25779
|
throw new TypeError("callback not provided");
|
|
25779
25780
|
return new Promise(function(resolve, reject) {
|
|
25780
|
-
isexe(
|
|
25781
|
+
isexe(path7, options || {}, function(er, is) {
|
|
25781
25782
|
er ? reject(er) : resolve(is);
|
|
25782
25783
|
});
|
|
25783
25784
|
});
|
|
25784
25785
|
}
|
|
25785
|
-
core(
|
|
25786
|
+
core(path7, options || {}, function(er, is) {
|
|
25786
25787
|
er && (er.code === "EACCES" || options && options.ignoreErrors) && (er = null, is = !1), cb(er, is);
|
|
25787
25788
|
});
|
|
25788
25789
|
}
|
|
25789
|
-
function sync(
|
|
25790
|
+
function sync(path7, options) {
|
|
25790
25791
|
try {
|
|
25791
|
-
return core.sync(
|
|
25792
|
+
return core.sync(path7, options || {});
|
|
25792
25793
|
} catch (er) {
|
|
25793
25794
|
if (options && options.ignoreErrors || er.code === "EACCES")
|
|
25794
25795
|
return !1;
|
|
@@ -25802,7 +25803,7 @@ var require_isexe = __commonJS({
|
|
|
25802
25803
|
var require_which = __commonJS({
|
|
25803
25804
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
25804
25805
|
init_cjs_shims();
|
|
25805
|
-
var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys",
|
|
25806
|
+
var isWindows4 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", path7 = __require("path"), COLON = isWindows4 ? ";" : ":", isexe = require_isexe(), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, opt) => {
|
|
25806
25807
|
let colon = opt.colon || COLON, pathEnv = cmd.match(/\//) || isWindows4 && cmd.match(/\\/) ? [""] : [
|
|
25807
25808
|
// windows always checks the cwd first
|
|
25808
25809
|
...isWindows4 ? [process.cwd()] : [],
|
|
@@ -25819,7 +25820,7 @@ var require_which = __commonJS({
|
|
|
25819
25820
|
let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [], step = (i) => new Promise((resolve, reject) => {
|
|
25820
25821
|
if (i === pathEnv.length)
|
|
25821
25822
|
return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
25822
|
-
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd =
|
|
25823
|
+
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd = path7.join(pathPart, cmd), p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
25823
25824
|
resolve(subStep(p, i, 0));
|
|
25824
25825
|
}), subStep = (p, i, ii) => new Promise((resolve, reject) => {
|
|
25825
25826
|
if (ii === pathExt.length)
|
|
@@ -25839,7 +25840,7 @@ var require_which = __commonJS({
|
|
|
25839
25840
|
opt = opt || {};
|
|
25840
25841
|
let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [];
|
|
25841
25842
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
25842
|
-
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd =
|
|
25843
|
+
let ppRaw = pathEnv[i], pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw, pCmd = path7.join(pathPart, cmd), p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
25843
25844
|
for (let j = 0; j < pathExt.length; j++) {
|
|
25844
25845
|
let cur = p + pathExt[j];
|
|
25845
25846
|
try {
|
|
@@ -25882,7 +25883,7 @@ var require_resolveCommand = __commonJS({
|
|
|
25882
25883
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
25883
25884
|
"use strict";
|
|
25884
25885
|
init_cjs_shims();
|
|
25885
|
-
var
|
|
25886
|
+
var path7 = __require("path"), which3 = require_which(), getPathKey = require_path_key();
|
|
25886
25887
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
25887
25888
|
let env5 = parsed.options.env || process.env, cwd3 = process.cwd(), hasCustomCwd = parsed.options.cwd != null, shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
|
25888
25889
|
if (shouldSwitchCwd)
|
|
@@ -25894,13 +25895,13 @@ var require_resolveCommand = __commonJS({
|
|
|
25894
25895
|
try {
|
|
25895
25896
|
resolved = which3.sync(parsed.command, {
|
|
25896
25897
|
path: env5[getPathKey({ env: env5 })],
|
|
25897
|
-
pathExt: withoutPathExt ?
|
|
25898
|
+
pathExt: withoutPathExt ? path7.delimiter : void 0
|
|
25898
25899
|
});
|
|
25899
25900
|
} catch {
|
|
25900
25901
|
} finally {
|
|
25901
25902
|
shouldSwitchCwd && process.chdir(cwd3);
|
|
25902
25903
|
}
|
|
25903
|
-
return resolved && (resolved =
|
|
25904
|
+
return resolved && (resolved = path7.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved)), resolved;
|
|
25904
25905
|
}
|
|
25905
25906
|
function resolveCommand(parsed) {
|
|
25906
25907
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, !0);
|
|
@@ -25945,7 +25946,7 @@ var require_shebang_command = __commonJS({
|
|
|
25945
25946
|
let match2 = string.match(shebangRegex);
|
|
25946
25947
|
if (!match2)
|
|
25947
25948
|
return null;
|
|
25948
|
-
let [
|
|
25949
|
+
let [path7, argument] = match2[0].replace(/#! ?/, "").split(" "), binary = path7.split("/").pop();
|
|
25949
25950
|
return binary === "env" ? argument : argument ? `${binary} ${argument}` : binary;
|
|
25950
25951
|
};
|
|
25951
25952
|
}
|
|
@@ -25956,11 +25957,11 @@ var require_readShebang = __commonJS({
|
|
|
25956
25957
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
25957
25958
|
"use strict";
|
|
25958
25959
|
init_cjs_shims();
|
|
25959
|
-
var
|
|
25960
|
+
var fs4 = __require("fs"), shebangCommand = require_shebang_command();
|
|
25960
25961
|
function readShebang(command) {
|
|
25961
25962
|
let buffer = Buffer.alloc(150), fd;
|
|
25962
25963
|
try {
|
|
25963
|
-
fd =
|
|
25964
|
+
fd = fs4.openSync(command, "r"), fs4.readSync(fd, buffer, 0, 150, 0), fs4.closeSync(fd);
|
|
25964
25965
|
} catch {
|
|
25965
25966
|
}
|
|
25966
25967
|
return shebangCommand(buffer.toString());
|
|
@@ -25974,7 +25975,7 @@ var require_parse = __commonJS({
|
|
|
25974
25975
|
"../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
25975
25976
|
"use strict";
|
|
25976
25977
|
init_cjs_shims();
|
|
25977
|
-
var
|
|
25978
|
+
var path7 = __require("path"), resolveCommand = require_resolveCommand(), escape3 = require_escape(), readShebang = require_readShebang(), isWin = process.platform === "win32", isExecutableRegExp = /\.(?:com|exe)$/i, isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
25978
25979
|
function detectShebang(parsed) {
|
|
25979
25980
|
parsed.file = resolveCommand(parsed);
|
|
25980
25981
|
let shebang = parsed.file && readShebang(parsed.file);
|
|
@@ -25986,7 +25987,7 @@ var require_parse = __commonJS({
|
|
|
25986
25987
|
let commandFile = detectShebang(parsed), needsShell = !isExecutableRegExp.test(commandFile);
|
|
25987
25988
|
if (parsed.options.forceShell || needsShell) {
|
|
25988
25989
|
let needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
|
|
25989
|
-
parsed.command =
|
|
25990
|
+
parsed.command = path7.normalize(parsed.command), parsed.command = escape3.command(parsed.command), parsed.args = parsed.args.map((arg) => escape3.argument(arg, needsDoubleEscapeMetaChars));
|
|
25990
25991
|
let shellCommand = [parsed.command].concat(parsed.args).join(" ");
|
|
25991
25992
|
parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`], parsed.command = process.env.comspec || "cmd.exe", parsed.options.windowsVerbatimArguments = !0;
|
|
25992
25993
|
}
|
|
@@ -26085,12 +26086,12 @@ var require_buffer_stream = __commonJS({
|
|
|
26085
26086
|
options = { ...options };
|
|
26086
26087
|
let { array } = options, { encoding } = options, isBuffer = encoding === "buffer", objectMode = !1;
|
|
26087
26088
|
array ? objectMode = !(encoding || isBuffer) : encoding = encoding || "utf8", isBuffer && (encoding = null);
|
|
26088
|
-
let
|
|
26089
|
-
encoding &&
|
|
26089
|
+
let stream = new PassThroughStream({ objectMode });
|
|
26090
|
+
encoding && stream.setEncoding(encoding);
|
|
26090
26091
|
let length = 0, chunks = [];
|
|
26091
|
-
return
|
|
26092
|
+
return stream.on("data", (chunk) => {
|
|
26092
26093
|
chunks.push(chunk), objectMode ? length = chunks.length : length += chunk.length;
|
|
26093
|
-
}),
|
|
26094
|
+
}), stream.getBufferedValue = () => array ? chunks : isBuffer ? Buffer.concat(chunks, length) : chunks.join(""), stream.getBufferedLength = () => length, stream;
|
|
26094
26095
|
};
|
|
26095
26096
|
}
|
|
26096
26097
|
});
|
|
@@ -26100,7 +26101,7 @@ var require_get_stream = __commonJS({
|
|
|
26100
26101
|
"../../node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module) {
|
|
26101
26102
|
"use strict";
|
|
26102
26103
|
init_cjs_shims();
|
|
26103
|
-
var { constants: BufferConstants } = __require("buffer"),
|
|
26104
|
+
var { constants: BufferConstants } = __require("buffer"), stream = __require("stream"), { promisify } = __require("util"), bufferStream = require_buffer_stream(), streamPipelinePromisified = promisify(stream.pipeline), MaxBufferError = class extends Error {
|
|
26104
26105
|
constructor() {
|
|
26105
26106
|
super("maxBuffer exceeded"), this.name = "MaxBufferError";
|
|
26106
26107
|
}
|
|
@@ -26112,25 +26113,25 @@ var require_get_stream = __commonJS({
|
|
|
26112
26113
|
maxBuffer: 1 / 0,
|
|
26113
26114
|
...options
|
|
26114
26115
|
};
|
|
26115
|
-
let { maxBuffer } = options,
|
|
26116
|
+
let { maxBuffer } = options, stream2 = bufferStream(options);
|
|
26116
26117
|
return await new Promise((resolve, reject) => {
|
|
26117
26118
|
let rejectPromise = (error) => {
|
|
26118
|
-
error &&
|
|
26119
|
+
error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH && (error.bufferedData = stream2.getBufferedValue()), reject(error);
|
|
26119
26120
|
};
|
|
26120
26121
|
(async () => {
|
|
26121
26122
|
try {
|
|
26122
|
-
await streamPipelinePromisified(inputStream,
|
|
26123
|
+
await streamPipelinePromisified(inputStream, stream2), resolve();
|
|
26123
26124
|
} catch (error) {
|
|
26124
26125
|
rejectPromise(error);
|
|
26125
26126
|
}
|
|
26126
|
-
})(),
|
|
26127
|
-
|
|
26127
|
+
})(), stream2.on("data", () => {
|
|
26128
|
+
stream2.getBufferedLength() > maxBuffer && rejectPromise(new MaxBufferError());
|
|
26128
26129
|
});
|
|
26129
|
-
}),
|
|
26130
|
+
}), stream2.getBufferedValue();
|
|
26130
26131
|
}
|
|
26131
26132
|
module.exports = getStream2;
|
|
26132
|
-
module.exports.buffer = (
|
|
26133
|
-
module.exports.array = (
|
|
26133
|
+
module.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" });
|
|
26134
|
+
module.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: !0 });
|
|
26134
26135
|
module.exports.MaxBufferError = MaxBufferError;
|
|
26135
26136
|
}
|
|
26136
26137
|
});
|
|
@@ -26278,7 +26279,7 @@ var require_index_min = __commonJS({
|
|
|
26278
26279
|
var require_lib2 = __commonJS({
|
|
26279
26280
|
"../../node_modules/.pnpm/which@4.0.0/node_modules/which/lib/index.js"(exports, module) {
|
|
26280
26281
|
init_cjs_shims();
|
|
26281
|
-
var { isexe, sync: isexeSync } = require_index_min(), { join:
|
|
26282
|
+
var { isexe, sync: isexeSync } = require_index_min(), { join: join3, delimiter: delimiter2, sep: sep3, posix } = __require("path"), isWindows4 = process.platform === "win32", rSlash = new RegExp(`[${posix.sep}${sep3 === posix.sep ? "" : sep3}]`.replace(/(\\)/g, "\\$1")), rRel = new RegExp(`^\\.${rSlash.source}`), getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), getPathInfo = (cmd, {
|
|
26282
26283
|
path: optPath = process.env.PATH,
|
|
26283
26284
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
26284
26285
|
delimiter: optDelimiter = delimiter2
|
|
@@ -26296,7 +26297,7 @@ var require_lib2 = __commonJS({
|
|
|
26296
26297
|
return { pathEnv, pathExt: [""] };
|
|
26297
26298
|
}, getPathPart = (raw, cmd) => {
|
|
26298
26299
|
let pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw;
|
|
26299
|
-
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") +
|
|
26300
|
+
return (!pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : "") + join3(pathPart, cmd);
|
|
26300
26301
|
}, which3 = async (cmd, opt = {}) => {
|
|
26301
26302
|
let { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt), found = [];
|
|
26302
26303
|
for (let envPart of pathEnv) {
|
|
@@ -26380,20 +26381,20 @@ var require_polyfills = __commonJS({
|
|
|
26380
26381
|
}, Object.setPrototypeOf && Object.setPrototypeOf(process.chdir, chdir));
|
|
26381
26382
|
var chdir;
|
|
26382
26383
|
module.exports = patch;
|
|
26383
|
-
function patch(
|
|
26384
|
-
constants4.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(
|
|
26384
|
+
function patch(fs4) {
|
|
26385
|
+
constants4.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./) && patchLchmod(fs4), fs4.lutimes || patchLutimes(fs4), fs4.chown = chownFix(fs4.chown), fs4.fchown = chownFix(fs4.fchown), fs4.lchown = chownFix(fs4.lchown), fs4.chmod = chmodFix(fs4.chmod), fs4.fchmod = chmodFix(fs4.fchmod), fs4.lchmod = chmodFix(fs4.lchmod), fs4.chownSync = chownFixSync(fs4.chownSync), fs4.fchownSync = chownFixSync(fs4.fchownSync), fs4.lchownSync = chownFixSync(fs4.lchownSync), fs4.chmodSync = chmodFixSync(fs4.chmodSync), fs4.fchmodSync = chmodFixSync(fs4.fchmodSync), fs4.lchmodSync = chmodFixSync(fs4.lchmodSync), fs4.stat = statFix(fs4.stat), fs4.fstat = statFix(fs4.fstat), fs4.lstat = statFix(fs4.lstat), fs4.statSync = statFixSync(fs4.statSync), fs4.fstatSync = statFixSync(fs4.fstatSync), fs4.lstatSync = statFixSync(fs4.lstatSync), fs4.chmod && !fs4.lchmod && (fs4.lchmod = function(path7, mode, cb) {
|
|
26385
26386
|
cb && process.nextTick(cb);
|
|
26386
|
-
},
|
|
26387
|
-
}),
|
|
26387
|
+
}, fs4.lchmodSync = function() {
|
|
26388
|
+
}), fs4.chown && !fs4.lchown && (fs4.lchown = function(path7, uid, gid, cb) {
|
|
26388
26389
|
cb && process.nextTick(cb);
|
|
26389
|
-
},
|
|
26390
|
-
}), platform3 === "win32" && (
|
|
26390
|
+
}, fs4.lchownSync = function() {
|
|
26391
|
+
}), platform3 === "win32" && (fs4.rename = typeof fs4.rename != "function" ? fs4.rename : (function(fs$rename) {
|
|
26391
26392
|
function rename(from, to, cb) {
|
|
26392
26393
|
var start = Date.now(), backoff = 0;
|
|
26393
26394
|
fs$rename(from, to, function CB(er) {
|
|
26394
26395
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
26395
26396
|
setTimeout(function() {
|
|
26396
|
-
|
|
26397
|
+
fs4.stat(to, function(stater, st) {
|
|
26397
26398
|
stater && stater.code === "ENOENT" ? fs$rename(from, to, CB) : cb(er);
|
|
26398
26399
|
});
|
|
26399
26400
|
}, backoff), backoff < 100 && (backoff += 10);
|
|
@@ -26403,25 +26404,25 @@ var require_polyfills = __commonJS({
|
|
|
26403
26404
|
});
|
|
26404
26405
|
}
|
|
26405
26406
|
return Object.setPrototypeOf && Object.setPrototypeOf(rename, fs$rename), rename;
|
|
26406
|
-
})(
|
|
26407
|
+
})(fs4.rename)), fs4.read = typeof fs4.read != "function" ? fs4.read : (function(fs$read) {
|
|
26407
26408
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
26408
26409
|
var callback;
|
|
26409
26410
|
if (callback_ && typeof callback_ == "function") {
|
|
26410
26411
|
var eagCounter = 0;
|
|
26411
26412
|
callback = function(er, _, __) {
|
|
26412
26413
|
if (er && er.code === "EAGAIN" && eagCounter < 10)
|
|
26413
|
-
return eagCounter++, fs$read.call(
|
|
26414
|
+
return eagCounter++, fs$read.call(fs4, fd, buffer, offset, length, position, callback);
|
|
26414
26415
|
callback_.apply(this, arguments);
|
|
26415
26416
|
};
|
|
26416
26417
|
}
|
|
26417
|
-
return fs$read.call(
|
|
26418
|
+
return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
|
|
26418
26419
|
}
|
|
26419
26420
|
return Object.setPrototypeOf && Object.setPrototypeOf(read, fs$read), read;
|
|
26420
|
-
})(
|
|
26421
|
+
})(fs4.read), fs4.readSync = typeof fs4.readSync != "function" ? fs4.readSync : /* @__PURE__ */ (function(fs$readSync) {
|
|
26421
26422
|
return function(fd, buffer, offset, length, position) {
|
|
26422
26423
|
for (var eagCounter = 0; ; )
|
|
26423
26424
|
try {
|
|
26424
|
-
return fs$readSync.call(
|
|
26425
|
+
return fs$readSync.call(fs4, fd, buffer, offset, length, position);
|
|
26425
26426
|
} catch (er) {
|
|
26426
26427
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
26427
26428
|
eagCounter++;
|
|
@@ -26430,11 +26431,11 @@ var require_polyfills = __commonJS({
|
|
|
26430
26431
|
throw er;
|
|
26431
26432
|
}
|
|
26432
26433
|
};
|
|
26433
|
-
})(
|
|
26434
|
-
function patchLchmod(
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26434
|
+
})(fs4.readSync);
|
|
26435
|
+
function patchLchmod(fs5) {
|
|
26436
|
+
fs5.lchmod = function(path7, mode, callback) {
|
|
26437
|
+
fs5.open(
|
|
26438
|
+
path7,
|
|
26438
26439
|
constants4.O_WRONLY | constants4.O_SYMLINK,
|
|
26439
26440
|
mode,
|
|
26440
26441
|
function(err, fd) {
|
|
@@ -26442,64 +26443,64 @@ var require_polyfills = __commonJS({
|
|
|
26442
26443
|
callback && callback(err);
|
|
26443
26444
|
return;
|
|
26444
26445
|
}
|
|
26445
|
-
|
|
26446
|
-
|
|
26446
|
+
fs5.fchmod(fd, mode, function(err2) {
|
|
26447
|
+
fs5.close(fd, function(err22) {
|
|
26447
26448
|
callback && callback(err2 || err22);
|
|
26448
26449
|
});
|
|
26449
26450
|
});
|
|
26450
26451
|
}
|
|
26451
26452
|
);
|
|
26452
|
-
},
|
|
26453
|
-
var fd =
|
|
26453
|
+
}, fs5.lchmodSync = function(path7, mode) {
|
|
26454
|
+
var fd = fs5.openSync(path7, constants4.O_WRONLY | constants4.O_SYMLINK, mode), threw = !0, ret;
|
|
26454
26455
|
try {
|
|
26455
|
-
ret =
|
|
26456
|
+
ret = fs5.fchmodSync(fd, mode), threw = !1;
|
|
26456
26457
|
} finally {
|
|
26457
26458
|
if (threw)
|
|
26458
26459
|
try {
|
|
26459
|
-
|
|
26460
|
+
fs5.closeSync(fd);
|
|
26460
26461
|
} catch {
|
|
26461
26462
|
}
|
|
26462
26463
|
else
|
|
26463
|
-
|
|
26464
|
+
fs5.closeSync(fd);
|
|
26464
26465
|
}
|
|
26465
26466
|
return ret;
|
|
26466
26467
|
};
|
|
26467
26468
|
}
|
|
26468
|
-
function patchLutimes(
|
|
26469
|
-
constants4.hasOwnProperty("O_SYMLINK") &&
|
|
26470
|
-
|
|
26469
|
+
function patchLutimes(fs5) {
|
|
26470
|
+
constants4.hasOwnProperty("O_SYMLINK") && fs5.futimes ? (fs5.lutimes = function(path7, at, mt, cb) {
|
|
26471
|
+
fs5.open(path7, constants4.O_SYMLINK, function(er, fd) {
|
|
26471
26472
|
if (er) {
|
|
26472
26473
|
cb && cb(er);
|
|
26473
26474
|
return;
|
|
26474
26475
|
}
|
|
26475
|
-
|
|
26476
|
-
|
|
26476
|
+
fs5.futimes(fd, at, mt, function(er2) {
|
|
26477
|
+
fs5.close(fd, function(er22) {
|
|
26477
26478
|
cb && cb(er2 || er22);
|
|
26478
26479
|
});
|
|
26479
26480
|
});
|
|
26480
26481
|
});
|
|
26481
|
-
},
|
|
26482
|
-
var fd =
|
|
26482
|
+
}, fs5.lutimesSync = function(path7, at, mt) {
|
|
26483
|
+
var fd = fs5.openSync(path7, constants4.O_SYMLINK), ret, threw = !0;
|
|
26483
26484
|
try {
|
|
26484
|
-
ret =
|
|
26485
|
+
ret = fs5.futimesSync(fd, at, mt), threw = !1;
|
|
26485
26486
|
} finally {
|
|
26486
26487
|
if (threw)
|
|
26487
26488
|
try {
|
|
26488
|
-
|
|
26489
|
+
fs5.closeSync(fd);
|
|
26489
26490
|
} catch {
|
|
26490
26491
|
}
|
|
26491
26492
|
else
|
|
26492
|
-
|
|
26493
|
+
fs5.closeSync(fd);
|
|
26493
26494
|
}
|
|
26494
26495
|
return ret;
|
|
26495
|
-
}) :
|
|
26496
|
+
}) : fs5.futimes && (fs5.lutimes = function(_a2, _b, _c, cb) {
|
|
26496
26497
|
cb && process.nextTick(cb);
|
|
26497
|
-
},
|
|
26498
|
+
}, fs5.lutimesSync = function() {
|
|
26498
26499
|
});
|
|
26499
26500
|
}
|
|
26500
26501
|
function chmodFix(orig) {
|
|
26501
26502
|
return orig && function(target, mode, cb) {
|
|
26502
|
-
return orig.call(
|
|
26503
|
+
return orig.call(fs4, target, mode, function(er) {
|
|
26503
26504
|
chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
|
|
26504
26505
|
});
|
|
26505
26506
|
};
|
|
@@ -26507,7 +26508,7 @@ var require_polyfills = __commonJS({
|
|
|
26507
26508
|
function chmodFixSync(orig) {
|
|
26508
26509
|
return orig && function(target, mode) {
|
|
26509
26510
|
try {
|
|
26510
|
-
return orig.call(
|
|
26511
|
+
return orig.call(fs4, target, mode);
|
|
26511
26512
|
} catch (er) {
|
|
26512
26513
|
if (!chownErOk(er)) throw er;
|
|
26513
26514
|
}
|
|
@@ -26515,7 +26516,7 @@ var require_polyfills = __commonJS({
|
|
|
26515
26516
|
}
|
|
26516
26517
|
function chownFix(orig) {
|
|
26517
26518
|
return orig && function(target, uid, gid, cb) {
|
|
26518
|
-
return orig.call(
|
|
26519
|
+
return orig.call(fs4, target, uid, gid, function(er) {
|
|
26519
26520
|
chownErOk(er) && (er = null), cb && cb.apply(this, arguments);
|
|
26520
26521
|
});
|
|
26521
26522
|
};
|
|
@@ -26523,7 +26524,7 @@ var require_polyfills = __commonJS({
|
|
|
26523
26524
|
function chownFixSync(orig) {
|
|
26524
26525
|
return orig && function(target, uid, gid) {
|
|
26525
26526
|
try {
|
|
26526
|
-
return orig.call(
|
|
26527
|
+
return orig.call(fs4, target, uid, gid);
|
|
26527
26528
|
} catch (er) {
|
|
26528
26529
|
if (!chownErOk(er)) throw er;
|
|
26529
26530
|
}
|
|
@@ -26535,12 +26536,12 @@ var require_polyfills = __commonJS({
|
|
|
26535
26536
|
function callback(er, stats) {
|
|
26536
26537
|
stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), cb && cb.apply(this, arguments);
|
|
26537
26538
|
}
|
|
26538
|
-
return options ? orig.call(
|
|
26539
|
+
return options ? orig.call(fs4, target, options, callback) : orig.call(fs4, target, callback);
|
|
26539
26540
|
};
|
|
26540
26541
|
}
|
|
26541
26542
|
function statFixSync(orig) {
|
|
26542
26543
|
return orig && function(target, options) {
|
|
26543
|
-
var stats = options ? orig.call(
|
|
26544
|
+
var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
|
|
26544
26545
|
return stats && (stats.uid < 0 && (stats.uid += 4294967296), stats.gid < 0 && (stats.gid += 4294967296)), stats;
|
|
26545
26546
|
};
|
|
26546
26547
|
}
|
|
@@ -26560,16 +26561,16 @@ var require_legacy_streams = __commonJS({
|
|
|
26560
26561
|
init_cjs_shims();
|
|
26561
26562
|
var Stream2 = __require("stream").Stream;
|
|
26562
26563
|
module.exports = legacy;
|
|
26563
|
-
function legacy(
|
|
26564
|
+
function legacy(fs4) {
|
|
26564
26565
|
return {
|
|
26565
26566
|
ReadStream,
|
|
26566
26567
|
WriteStream
|
|
26567
26568
|
};
|
|
26568
|
-
function ReadStream(
|
|
26569
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
26569
|
+
function ReadStream(path7, options) {
|
|
26570
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path7, options);
|
|
26570
26571
|
Stream2.call(this);
|
|
26571
26572
|
var self2 = this;
|
|
26572
|
-
this.path =
|
|
26573
|
+
this.path = path7, this.fd = null, this.readable = !0, this.paused = !1, this.flags = "r", this.mode = 438, this.bufferSize = 64 * 1024, options = options || {};
|
|
26573
26574
|
for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
|
|
26574
26575
|
var key = keys[index];
|
|
26575
26576
|
this[key] = options[key];
|
|
@@ -26591,7 +26592,7 @@ var require_legacy_streams = __commonJS({
|
|
|
26591
26592
|
});
|
|
26592
26593
|
return;
|
|
26593
26594
|
}
|
|
26594
|
-
|
|
26595
|
+
fs4.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
26595
26596
|
if (err) {
|
|
26596
26597
|
self2.emit("error", err), self2.readable = !1;
|
|
26597
26598
|
return;
|
|
@@ -26599,9 +26600,9 @@ var require_legacy_streams = __commonJS({
|
|
|
26599
26600
|
self2.fd = fd, self2.emit("open", fd), self2._read();
|
|
26600
26601
|
});
|
|
26601
26602
|
}
|
|
26602
|
-
function WriteStream(
|
|
26603
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
26604
|
-
Stream2.call(this), this.path =
|
|
26603
|
+
function WriteStream(path7, options) {
|
|
26604
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path7, options);
|
|
26605
|
+
Stream2.call(this), this.path = path7, this.fd = null, this.writable = !0, this.flags = "w", this.encoding = "binary", this.mode = 438, this.bytesWritten = 0, options = options || {};
|
|
26605
26606
|
for (var keys = Object.keys(options), index = 0, length = keys.length; index < length; index++) {
|
|
26606
26607
|
var key = keys[index];
|
|
26607
26608
|
this[key] = options[key];
|
|
@@ -26613,7 +26614,7 @@ var require_legacy_streams = __commonJS({
|
|
|
26613
26614
|
throw new Error("start must be >= zero");
|
|
26614
26615
|
this.pos = this.start;
|
|
26615
26616
|
}
|
|
26616
|
-
this.busy = !1, this._queue = [], this.fd === null && (this._open =
|
|
26617
|
+
this.busy = !1, this._queue = [], this.fd === null && (this._open = fs4.open, this._queue.push([this._open, this.path, this.flags, this.mode, void 0]), this.flush());
|
|
26617
26618
|
}
|
|
26618
26619
|
}
|
|
26619
26620
|
}
|
|
@@ -26646,7 +26647,7 @@ var require_clone = __commonJS({
|
|
|
26646
26647
|
var require_graceful_fs = __commonJS({
|
|
26647
26648
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
26648
26649
|
init_cjs_shims();
|
|
26649
|
-
var
|
|
26650
|
+
var fs4 = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
|
|
26650
26651
|
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
|
|
26651
26652
|
function noop4() {
|
|
26652
26653
|
}
|
|
@@ -26663,63 +26664,63 @@ var require_graceful_fs = __commonJS({
|
|
|
26663
26664
|
m = "GFS4: " + m.split(/\n/).join(`
|
|
26664
26665
|
GFS4: `), console.error(m);
|
|
26665
26666
|
});
|
|
26666
|
-
|
|
26667
|
+
fs4[gracefulQueue] || (queue = global[gracefulQueue] || [], publishQueue(fs4, queue), fs4.close = (function(fs$close) {
|
|
26667
26668
|
function close(fd, cb) {
|
|
26668
|
-
return fs$close.call(
|
|
26669
|
+
return fs$close.call(fs4, fd, function(err) {
|
|
26669
26670
|
err || resetQueue(), typeof cb == "function" && cb.apply(this, arguments);
|
|
26670
26671
|
});
|
|
26671
26672
|
}
|
|
26672
26673
|
return Object.defineProperty(close, previousSymbol, {
|
|
26673
26674
|
value: fs$close
|
|
26674
26675
|
}), close;
|
|
26675
|
-
})(
|
|
26676
|
+
})(fs4.close), fs4.closeSync = (function(fs$closeSync) {
|
|
26676
26677
|
function closeSync(fd) {
|
|
26677
|
-
fs$closeSync.apply(
|
|
26678
|
+
fs$closeSync.apply(fs4, arguments), resetQueue();
|
|
26678
26679
|
}
|
|
26679
26680
|
return Object.defineProperty(closeSync, previousSymbol, {
|
|
26680
26681
|
value: fs$closeSync
|
|
26681
26682
|
}), closeSync;
|
|
26682
|
-
})(
|
|
26683
|
-
debug(
|
|
26683
|
+
})(fs4.closeSync), /\bgfs4\b/i.test(process.env.NODE_DEBUG || "") && process.on("exit", function() {
|
|
26684
|
+
debug(fs4[gracefulQueue]), __require("assert").equal(fs4[gracefulQueue].length, 0);
|
|
26684
26685
|
}));
|
|
26685
26686
|
var queue;
|
|
26686
|
-
global[gracefulQueue] || publishQueue(global,
|
|
26687
|
-
module.exports = patch(clone(
|
|
26688
|
-
process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
26689
|
-
function patch(
|
|
26690
|
-
polyfills(
|
|
26691
|
-
var fs$readFile =
|
|
26692
|
-
|
|
26693
|
-
function readFile2(
|
|
26694
|
-
return typeof options == "function" && (cb = options, options = null), go$readFile(
|
|
26695
|
-
function go$readFile(
|
|
26696
|
-
return fs$readFile(
|
|
26697
|
-
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [
|
|
26687
|
+
global[gracefulQueue] || publishQueue(global, fs4[gracefulQueue]);
|
|
26688
|
+
module.exports = patch(clone(fs4));
|
|
26689
|
+
process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched && (module.exports = patch(fs4), fs4.__patched = !0);
|
|
26690
|
+
function patch(fs5) {
|
|
26691
|
+
polyfills(fs5), fs5.gracefulify = patch, fs5.createReadStream = createReadStream2, fs5.createWriteStream = createWriteStream2;
|
|
26692
|
+
var fs$readFile = fs5.readFile;
|
|
26693
|
+
fs5.readFile = readFile2;
|
|
26694
|
+
function readFile2(path7, options, cb) {
|
|
26695
|
+
return typeof options == "function" && (cb = options, options = null), go$readFile(path7, options, cb);
|
|
26696
|
+
function go$readFile(path8, options2, cb2, startTime) {
|
|
26697
|
+
return fs$readFile(path8, options2, function(err) {
|
|
26698
|
+
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
|
|
26698
26699
|
});
|
|
26699
26700
|
}
|
|
26700
26701
|
}
|
|
26701
|
-
var fs$writeFile =
|
|
26702
|
-
|
|
26703
|
-
function writeFile2(
|
|
26704
|
-
return typeof options == "function" && (cb = options, options = null), go$writeFile(
|
|
26705
|
-
function go$writeFile(
|
|
26706
|
-
return fs$writeFile(
|
|
26707
|
-
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [
|
|
26702
|
+
var fs$writeFile = fs5.writeFile;
|
|
26703
|
+
fs5.writeFile = writeFile2;
|
|
26704
|
+
function writeFile2(path7, data, options, cb) {
|
|
26705
|
+
return typeof options == "function" && (cb = options, options = null), go$writeFile(path7, data, options, cb);
|
|
26706
|
+
function go$writeFile(path8, data2, options2, cb2, startTime) {
|
|
26707
|
+
return fs$writeFile(path8, data2, options2, function(err) {
|
|
26708
|
+
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
|
|
26708
26709
|
});
|
|
26709
26710
|
}
|
|
26710
26711
|
}
|
|
26711
|
-
var fs$appendFile =
|
|
26712
|
-
fs$appendFile && (
|
|
26713
|
-
function appendFile2(
|
|
26714
|
-
return typeof options == "function" && (cb = options, options = null), go$appendFile(
|
|
26715
|
-
function go$appendFile(
|
|
26716
|
-
return fs$appendFile(
|
|
26717
|
-
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [
|
|
26712
|
+
var fs$appendFile = fs5.appendFile;
|
|
26713
|
+
fs$appendFile && (fs5.appendFile = appendFile2);
|
|
26714
|
+
function appendFile2(path7, data, options, cb) {
|
|
26715
|
+
return typeof options == "function" && (cb = options, options = null), go$appendFile(path7, data, options, cb);
|
|
26716
|
+
function go$appendFile(path8, data2, options2, cb2, startTime) {
|
|
26717
|
+
return fs$appendFile(path8, data2, options2, function(err) {
|
|
26718
|
+
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
|
|
26718
26719
|
});
|
|
26719
26720
|
}
|
|
26720
26721
|
}
|
|
26721
|
-
var fs$copyFile =
|
|
26722
|
-
fs$copyFile && (
|
|
26722
|
+
var fs$copyFile = fs5.copyFile;
|
|
26723
|
+
fs$copyFile && (fs5.copyFile = copyFile2);
|
|
26723
26724
|
function copyFile2(src, dest, flags, cb) {
|
|
26724
26725
|
return typeof flags == "function" && (cb = flags, flags = 0), go$copyFile(src, dest, flags, cb);
|
|
26725
26726
|
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
|
@@ -26728,32 +26729,32 @@ GFS4: `), console.error(m);
|
|
|
26728
26729
|
});
|
|
26729
26730
|
}
|
|
26730
26731
|
}
|
|
26731
|
-
var fs$readdir =
|
|
26732
|
-
|
|
26732
|
+
var fs$readdir = fs5.readdir;
|
|
26733
|
+
fs5.readdir = readdir2;
|
|
26733
26734
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
26734
|
-
function readdir2(
|
|
26735
|
+
function readdir2(path7, options, cb) {
|
|
26735
26736
|
typeof options == "function" && (cb = options, options = null);
|
|
26736
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function(
|
|
26737
|
-
return fs$readdir(
|
|
26738
|
-
|
|
26737
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function(path8, options2, cb2, startTime) {
|
|
26738
|
+
return fs$readdir(path8, fs$readdirCallback(
|
|
26739
|
+
path8,
|
|
26739
26740
|
options2,
|
|
26740
26741
|
cb2,
|
|
26741
26742
|
startTime
|
|
26742
26743
|
));
|
|
26743
|
-
} : function(
|
|
26744
|
-
return fs$readdir(
|
|
26745
|
-
|
|
26744
|
+
} : function(path8, options2, cb2, startTime) {
|
|
26745
|
+
return fs$readdir(path8, options2, fs$readdirCallback(
|
|
26746
|
+
path8,
|
|
26746
26747
|
options2,
|
|
26747
26748
|
cb2,
|
|
26748
26749
|
startTime
|
|
26749
26750
|
));
|
|
26750
26751
|
};
|
|
26751
|
-
return go$readdir(
|
|
26752
|
-
function fs$readdirCallback(
|
|
26752
|
+
return go$readdir(path7, options, cb);
|
|
26753
|
+
function fs$readdirCallback(path8, options2, cb2, startTime) {
|
|
26753
26754
|
return function(err, files) {
|
|
26754
26755
|
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([
|
|
26755
26756
|
go$readdir,
|
|
26756
|
-
[
|
|
26757
|
+
[path8, options2, cb2],
|
|
26757
26758
|
err,
|
|
26758
26759
|
startTime || Date.now(),
|
|
26759
26760
|
Date.now()
|
|
@@ -26762,13 +26763,13 @@ GFS4: `), console.error(m);
|
|
|
26762
26763
|
}
|
|
26763
26764
|
}
|
|
26764
26765
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
26765
|
-
var legStreams = legacy(
|
|
26766
|
+
var legStreams = legacy(fs5);
|
|
26766
26767
|
ReadStream = legStreams.ReadStream, WriteStream = legStreams.WriteStream;
|
|
26767
26768
|
}
|
|
26768
|
-
var fs$ReadStream =
|
|
26769
|
+
var fs$ReadStream = fs5.ReadStream;
|
|
26769
26770
|
fs$ReadStream && (ReadStream.prototype = Object.create(fs$ReadStream.prototype), ReadStream.prototype.open = ReadStream$open);
|
|
26770
|
-
var fs$WriteStream =
|
|
26771
|
-
fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(
|
|
26771
|
+
var fs$WriteStream = fs5.WriteStream;
|
|
26772
|
+
fs$WriteStream && (WriteStream.prototype = Object.create(fs$WriteStream.prototype), WriteStream.prototype.open = WriteStream$open), Object.defineProperty(fs5, "ReadStream", {
|
|
26772
26773
|
get: function() {
|
|
26773
26774
|
return ReadStream;
|
|
26774
26775
|
},
|
|
@@ -26777,7 +26778,7 @@ GFS4: `), console.error(m);
|
|
|
26777
26778
|
},
|
|
26778
26779
|
enumerable: !0,
|
|
26779
26780
|
configurable: !0
|
|
26780
|
-
}), Object.defineProperty(
|
|
26781
|
+
}), Object.defineProperty(fs5, "WriteStream", {
|
|
26781
26782
|
get: function() {
|
|
26782
26783
|
return WriteStream;
|
|
26783
26784
|
},
|
|
@@ -26788,7 +26789,7 @@ GFS4: `), console.error(m);
|
|
|
26788
26789
|
configurable: !0
|
|
26789
26790
|
});
|
|
26790
26791
|
var FileReadStream = ReadStream;
|
|
26791
|
-
Object.defineProperty(
|
|
26792
|
+
Object.defineProperty(fs5, "FileReadStream", {
|
|
26792
26793
|
get: function() {
|
|
26793
26794
|
return FileReadStream;
|
|
26794
26795
|
},
|
|
@@ -26799,7 +26800,7 @@ GFS4: `), console.error(m);
|
|
|
26799
26800
|
configurable: !0
|
|
26800
26801
|
});
|
|
26801
26802
|
var FileWriteStream = WriteStream;
|
|
26802
|
-
Object.defineProperty(
|
|
26803
|
+
Object.defineProperty(fs5, "FileWriteStream", {
|
|
26803
26804
|
get: function() {
|
|
26804
26805
|
return FileWriteStream;
|
|
26805
26806
|
},
|
|
@@ -26809,7 +26810,7 @@ GFS4: `), console.error(m);
|
|
|
26809
26810
|
enumerable: !0,
|
|
26810
26811
|
configurable: !0
|
|
26811
26812
|
});
|
|
26812
|
-
function ReadStream(
|
|
26813
|
+
function ReadStream(path7, options) {
|
|
26813
26814
|
return this instanceof ReadStream ? (fs$ReadStream.apply(this, arguments), this) : ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
26814
26815
|
}
|
|
26815
26816
|
function ReadStream$open() {
|
|
@@ -26818,7 +26819,7 @@ GFS4: `), console.error(m);
|
|
|
26818
26819
|
err ? (that.autoClose && that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd), that.read());
|
|
26819
26820
|
});
|
|
26820
26821
|
}
|
|
26821
|
-
function WriteStream(
|
|
26822
|
+
function WriteStream(path7, options) {
|
|
26822
26823
|
return this instanceof WriteStream ? (fs$WriteStream.apply(this, arguments), this) : WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
26823
26824
|
}
|
|
26824
26825
|
function WriteStream$open() {
|
|
@@ -26827,36 +26828,36 @@ GFS4: `), console.error(m);
|
|
|
26827
26828
|
err ? (that.destroy(), that.emit("error", err)) : (that.fd = fd, that.emit("open", fd));
|
|
26828
26829
|
});
|
|
26829
26830
|
}
|
|
26830
|
-
function createReadStream2(
|
|
26831
|
-
return new
|
|
26831
|
+
function createReadStream2(path7, options) {
|
|
26832
|
+
return new fs5.ReadStream(path7, options);
|
|
26832
26833
|
}
|
|
26833
|
-
function createWriteStream2(
|
|
26834
|
-
return new
|
|
26834
|
+
function createWriteStream2(path7, options) {
|
|
26835
|
+
return new fs5.WriteStream(path7, options);
|
|
26835
26836
|
}
|
|
26836
|
-
var fs$open =
|
|
26837
|
-
|
|
26838
|
-
function open(
|
|
26839
|
-
return typeof mode == "function" && (cb = mode, mode = null), go$open(
|
|
26840
|
-
function go$open(
|
|
26841
|
-
return fs$open(
|
|
26842
|
-
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [
|
|
26837
|
+
var fs$open = fs5.open;
|
|
26838
|
+
fs5.open = open;
|
|
26839
|
+
function open(path7, flags, mode, cb) {
|
|
26840
|
+
return typeof mode == "function" && (cb = mode, mode = null), go$open(path7, flags, mode, cb);
|
|
26841
|
+
function go$open(path8, flags2, mode2, cb2, startTime) {
|
|
26842
|
+
return fs$open(path8, flags2, mode2, function(err, fd) {
|
|
26843
|
+
err && (err.code === "EMFILE" || err.code === "ENFILE") ? enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]) : typeof cb2 == "function" && cb2.apply(this, arguments);
|
|
26843
26844
|
});
|
|
26844
26845
|
}
|
|
26845
26846
|
}
|
|
26846
|
-
return
|
|
26847
|
+
return fs5;
|
|
26847
26848
|
}
|
|
26848
26849
|
function enqueue(elem) {
|
|
26849
|
-
debug("ENQUEUE", elem[0].name, elem[1]),
|
|
26850
|
+
debug("ENQUEUE", elem[0].name, elem[1]), fs4[gracefulQueue].push(elem), retry();
|
|
26850
26851
|
}
|
|
26851
26852
|
var retryTimer;
|
|
26852
26853
|
function resetQueue() {
|
|
26853
|
-
for (var now = Date.now(), i = 0; i <
|
|
26854
|
-
|
|
26854
|
+
for (var now = Date.now(), i = 0; i < fs4[gracefulQueue].length; ++i)
|
|
26855
|
+
fs4[gracefulQueue][i].length > 2 && (fs4[gracefulQueue][i][3] = now, fs4[gracefulQueue][i][4] = now);
|
|
26855
26856
|
retry();
|
|
26856
26857
|
}
|
|
26857
26858
|
function retry() {
|
|
26858
|
-
if (clearTimeout(retryTimer), retryTimer = void 0,
|
|
26859
|
-
var elem =
|
|
26859
|
+
if (clearTimeout(retryTimer), retryTimer = void 0, fs4[gracefulQueue].length !== 0) {
|
|
26860
|
+
var elem = fs4[gracefulQueue].shift(), fn = elem[0], args = elem[1], err = elem[2], startTime = elem[3], lastTime = elem[4];
|
|
26860
26861
|
if (startTime === void 0)
|
|
26861
26862
|
debug("RETRY", fn.name, args), fn.apply(null, args);
|
|
26862
26863
|
else if (Date.now() - startTime >= 6e4) {
|
|
@@ -26865,7 +26866,7 @@ GFS4: `), console.error(m);
|
|
|
26865
26866
|
typeof cb == "function" && cb.call(null, err);
|
|
26866
26867
|
} else {
|
|
26867
26868
|
var sinceAttempt = Date.now() - lastTime, sinceStart = Math.max(lastTime - startTime, 1), desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
26868
|
-
sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) :
|
|
26869
|
+
sinceAttempt >= desiredDelay ? (debug("RETRY", fn.name, args), fn.apply(null, args.concat([startTime]))) : fs4[gracefulQueue].push(elem);
|
|
26869
26870
|
}
|
|
26870
26871
|
retryTimer === void 0 && (retryTimer = setTimeout(retry, 0));
|
|
26871
26872
|
}
|
|
@@ -26878,7 +26879,7 @@ var require_fs = __commonJS({
|
|
|
26878
26879
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
|
|
26879
26880
|
"use strict";
|
|
26880
26881
|
init_cjs_shims();
|
|
26881
|
-
var u = require_universalify().fromCallback,
|
|
26882
|
+
var u = require_universalify().fromCallback, fs4 = require_graceful_fs(), api = [
|
|
26882
26883
|
"access",
|
|
26883
26884
|
"appendFile",
|
|
26884
26885
|
"chmod",
|
|
@@ -26913,47 +26914,47 @@ var require_fs = __commonJS({
|
|
|
26913
26914
|
"unlink",
|
|
26914
26915
|
"utimes",
|
|
26915
26916
|
"writeFile"
|
|
26916
|
-
].filter((key) => typeof
|
|
26917
|
-
Object.assign(exports,
|
|
26917
|
+
].filter((key) => typeof fs4[key] == "function");
|
|
26918
|
+
Object.assign(exports, fs4);
|
|
26918
26919
|
api.forEach((method) => {
|
|
26919
|
-
exports[method] = u(
|
|
26920
|
+
exports[method] = u(fs4[method]);
|
|
26920
26921
|
});
|
|
26921
26922
|
exports.exists = function(filename, callback) {
|
|
26922
|
-
return typeof callback == "function" ?
|
|
26923
|
+
return typeof callback == "function" ? fs4.exists(filename, callback) : new Promise((resolve) => fs4.exists(filename, resolve));
|
|
26923
26924
|
};
|
|
26924
26925
|
exports.read = function(fd, buffer, offset, length, position, callback) {
|
|
26925
|
-
return typeof callback == "function" ?
|
|
26926
|
-
|
|
26926
|
+
return typeof callback == "function" ? fs4.read(fd, buffer, offset, length, position, callback) : new Promise((resolve, reject) => {
|
|
26927
|
+
fs4.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
|
|
26927
26928
|
if (err) return reject(err);
|
|
26928
26929
|
resolve({ bytesRead, buffer: buffer2 });
|
|
26929
26930
|
});
|
|
26930
26931
|
});
|
|
26931
26932
|
};
|
|
26932
26933
|
exports.write = function(fd, buffer, ...args) {
|
|
26933
|
-
return typeof args[args.length - 1] == "function" ?
|
|
26934
|
-
|
|
26934
|
+
return typeof args[args.length - 1] == "function" ? fs4.write(fd, buffer, ...args) : new Promise((resolve, reject) => {
|
|
26935
|
+
fs4.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
|
|
26935
26936
|
if (err) return reject(err);
|
|
26936
26937
|
resolve({ bytesWritten, buffer: buffer2 });
|
|
26937
26938
|
});
|
|
26938
26939
|
});
|
|
26939
26940
|
};
|
|
26940
26941
|
exports.readv = function(fd, buffers, ...args) {
|
|
26941
|
-
return typeof args[args.length - 1] == "function" ?
|
|
26942
|
-
|
|
26942
|
+
return typeof args[args.length - 1] == "function" ? fs4.readv(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
26943
|
+
fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
|
|
26943
26944
|
if (err) return reject(err);
|
|
26944
26945
|
resolve({ bytesRead, buffers: buffers2 });
|
|
26945
26946
|
});
|
|
26946
26947
|
});
|
|
26947
26948
|
};
|
|
26948
26949
|
exports.writev = function(fd, buffers, ...args) {
|
|
26949
|
-
return typeof args[args.length - 1] == "function" ?
|
|
26950
|
-
|
|
26950
|
+
return typeof args[args.length - 1] == "function" ? fs4.writev(fd, buffers, ...args) : new Promise((resolve, reject) => {
|
|
26951
|
+
fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
|
|
26951
26952
|
if (err) return reject(err);
|
|
26952
26953
|
resolve({ bytesWritten, buffers: buffers2 });
|
|
26953
26954
|
});
|
|
26954
26955
|
});
|
|
26955
26956
|
};
|
|
26956
|
-
typeof
|
|
26957
|
+
typeof fs4.realpath.native == "function" ? exports.realpath.native = u(fs4.realpath.native) : process.emitWarning(
|
|
26957
26958
|
"fs.realpath.native is not a function. Is fs being monkey-patched?",
|
|
26958
26959
|
"Warning",
|
|
26959
26960
|
"fs-extra-WARN0003"
|
|
@@ -26966,9 +26967,9 @@ var require_utils = __commonJS({
|
|
|
26966
26967
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
|
|
26967
26968
|
"use strict";
|
|
26968
26969
|
init_cjs_shims();
|
|
26969
|
-
var
|
|
26970
|
+
var path7 = __require("path");
|
|
26970
26971
|
module.exports.checkPath = function(pth) {
|
|
26971
|
-
if (process.platform === "win32" && /[<>:"|?*]/.test(pth.replace(
|
|
26972
|
+
if (process.platform === "win32" && /[<>:"|?*]/.test(pth.replace(path7.parse(pth).root, ""))) {
|
|
26972
26973
|
let error = new Error(`Path contains invalid characters: ${pth}`);
|
|
26973
26974
|
throw error.code = "EINVAL", error;
|
|
26974
26975
|
}
|
|
@@ -26981,15 +26982,15 @@ var require_make_dir = __commonJS({
|
|
|
26981
26982
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
|
|
26982
26983
|
"use strict";
|
|
26983
26984
|
init_cjs_shims();
|
|
26984
|
-
var
|
|
26985
|
+
var fs4 = require_fs(), { checkPath } = require_utils(), getMode = (options) => {
|
|
26985
26986
|
let defaults2 = { mode: 511 };
|
|
26986
26987
|
return typeof options == "number" ? options : { ...defaults2, ...options }.mode;
|
|
26987
26988
|
};
|
|
26988
|
-
module.exports.makeDir = async (dir, options) => (checkPath(dir),
|
|
26989
|
+
module.exports.makeDir = async (dir, options) => (checkPath(dir), fs4.mkdir(dir, {
|
|
26989
26990
|
mode: getMode(options),
|
|
26990
26991
|
recursive: !0
|
|
26991
26992
|
}));
|
|
26992
|
-
module.exports.makeDirSync = (dir, options) => (checkPath(dir),
|
|
26993
|
+
module.exports.makeDirSync = (dir, options) => (checkPath(dir), fs4.mkdirSync(dir, {
|
|
26993
26994
|
mode: getMode(options),
|
|
26994
26995
|
recursive: !0
|
|
26995
26996
|
}));
|
|
@@ -27019,13 +27020,13 @@ var require_path_exists = __commonJS({
|
|
|
27019
27020
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
|
|
27020
27021
|
"use strict";
|
|
27021
27022
|
init_cjs_shims();
|
|
27022
|
-
var u = require_universalify().fromPromise,
|
|
27023
|
-
function pathExists3(
|
|
27024
|
-
return
|
|
27023
|
+
var u = require_universalify().fromPromise, fs4 = require_fs();
|
|
27024
|
+
function pathExists3(path7) {
|
|
27025
|
+
return fs4.access(path7).then(() => !0).catch(() => !1);
|
|
27025
27026
|
}
|
|
27026
27027
|
module.exports = {
|
|
27027
27028
|
pathExists: u(pathExists3),
|
|
27028
|
-
pathExistsSync:
|
|
27029
|
+
pathExistsSync: fs4.existsSync
|
|
27029
27030
|
};
|
|
27030
27031
|
}
|
|
27031
27032
|
});
|
|
@@ -27035,20 +27036,20 @@ var require_utimes = __commonJS({
|
|
|
27035
27036
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
|
|
27036
27037
|
"use strict";
|
|
27037
27038
|
init_cjs_shims();
|
|
27038
|
-
var
|
|
27039
|
-
function utimesMillis(
|
|
27040
|
-
|
|
27039
|
+
var fs4 = require_graceful_fs();
|
|
27040
|
+
function utimesMillis(path7, atime, mtime, callback) {
|
|
27041
|
+
fs4.open(path7, "r+", (err, fd) => {
|
|
27041
27042
|
if (err) return callback(err);
|
|
27042
|
-
|
|
27043
|
-
|
|
27043
|
+
fs4.futimes(fd, atime, mtime, (futimesErr) => {
|
|
27044
|
+
fs4.close(fd, (closeErr) => {
|
|
27044
27045
|
callback && callback(futimesErr || closeErr);
|
|
27045
27046
|
});
|
|
27046
27047
|
});
|
|
27047
27048
|
});
|
|
27048
27049
|
}
|
|
27049
|
-
function utimesMillisSync(
|
|
27050
|
-
let fd =
|
|
27051
|
-
return
|
|
27050
|
+
function utimesMillisSync(path7, atime, mtime) {
|
|
27051
|
+
let fd = fs4.openSync(path7, "r+");
|
|
27052
|
+
return fs4.futimesSync(fd, atime, mtime), fs4.closeSync(fd);
|
|
27052
27053
|
}
|
|
27053
27054
|
module.exports = {
|
|
27054
27055
|
utimesMillis,
|
|
@@ -27062,9 +27063,9 @@ var require_stat = __commonJS({
|
|
|
27062
27063
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
|
|
27063
27064
|
"use strict";
|
|
27064
27065
|
init_cjs_shims();
|
|
27065
|
-
var
|
|
27066
|
+
var fs4 = require_fs(), path7 = __require("path"), util = __require("util");
|
|
27066
27067
|
function getStats(src, dest, opts) {
|
|
27067
|
-
let statFunc = opts.dereference ? (file) =>
|
|
27068
|
+
let statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: !0 }) : (file) => fs4.lstat(file, { bigint: !0 });
|
|
27068
27069
|
return Promise.all([
|
|
27069
27070
|
statFunc(src),
|
|
27070
27071
|
statFunc(dest).catch((err) => {
|
|
@@ -27074,7 +27075,7 @@ var require_stat = __commonJS({
|
|
|
27074
27075
|
]).then(([srcStat, destStat]) => ({ srcStat, destStat }));
|
|
27075
27076
|
}
|
|
27076
27077
|
function getStatsSync(src, dest, opts) {
|
|
27077
|
-
let destStat, statFunc = opts.dereference ? (file) =>
|
|
27078
|
+
let destStat, statFunc = opts.dereference ? (file) => fs4.statSync(file, { bigint: !0 }) : (file) => fs4.lstatSync(file, { bigint: !0 }), srcStat = statFunc(src);
|
|
27078
27079
|
try {
|
|
27079
27080
|
destStat = statFunc(dest);
|
|
27080
27081
|
} catch (err) {
|
|
@@ -27089,7 +27090,7 @@ var require_stat = __commonJS({
|
|
|
27089
27090
|
let { srcStat, destStat } = stats;
|
|
27090
27091
|
if (destStat) {
|
|
27091
27092
|
if (areIdentical(srcStat, destStat)) {
|
|
27092
|
-
let srcBaseName =
|
|
27093
|
+
let srcBaseName = path7.basename(src), destBaseName = path7.basename(dest);
|
|
27093
27094
|
return funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase() ? cb(null, { srcStat, destStat, isChangingCase: !0 }) : cb(new Error("Source and destination must not be the same."));
|
|
27094
27095
|
}
|
|
27095
27096
|
if (srcStat.isDirectory() && !destStat.isDirectory())
|
|
@@ -27104,7 +27105,7 @@ var require_stat = __commonJS({
|
|
|
27104
27105
|
let { srcStat, destStat } = getStatsSync(src, dest, opts);
|
|
27105
27106
|
if (destStat) {
|
|
27106
27107
|
if (areIdentical(srcStat, destStat)) {
|
|
27107
|
-
let srcBaseName =
|
|
27108
|
+
let srcBaseName = path7.basename(src), destBaseName = path7.basename(dest);
|
|
27108
27109
|
if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase())
|
|
27109
27110
|
return { srcStat, destStat, isChangingCase: !0 };
|
|
27110
27111
|
throw new Error("Source and destination must not be the same.");
|
|
@@ -27119,16 +27120,16 @@ var require_stat = __commonJS({
|
|
|
27119
27120
|
return { srcStat, destStat };
|
|
27120
27121
|
}
|
|
27121
27122
|
function checkParentPaths(src, srcStat, dest, funcName, cb) {
|
|
27122
|
-
let srcParent =
|
|
27123
|
-
if (destParent === srcParent || destParent ===
|
|
27124
|
-
|
|
27123
|
+
let srcParent = path7.resolve(path7.dirname(src)), destParent = path7.resolve(path7.dirname(dest));
|
|
27124
|
+
if (destParent === srcParent || destParent === path7.parse(destParent).root) return cb();
|
|
27125
|
+
fs4.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));
|
|
27125
27126
|
}
|
|
27126
27127
|
function checkParentPathsSync(src, srcStat, dest, funcName) {
|
|
27127
|
-
let srcParent =
|
|
27128
|
-
if (destParent === srcParent || destParent ===
|
|
27128
|
+
let srcParent = path7.resolve(path7.dirname(src)), destParent = path7.resolve(path7.dirname(dest));
|
|
27129
|
+
if (destParent === srcParent || destParent === path7.parse(destParent).root) return;
|
|
27129
27130
|
let destStat;
|
|
27130
27131
|
try {
|
|
27131
|
-
destStat =
|
|
27132
|
+
destStat = fs4.statSync(destParent, { bigint: !0 });
|
|
27132
27133
|
} catch (err) {
|
|
27133
27134
|
if (err.code === "ENOENT") return;
|
|
27134
27135
|
throw err;
|
|
@@ -27141,7 +27142,7 @@ var require_stat = __commonJS({
|
|
|
27141
27142
|
return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
|
|
27142
27143
|
}
|
|
27143
27144
|
function isSrcSubdir(src, dest) {
|
|
27144
|
-
let srcArr =
|
|
27145
|
+
let srcArr = path7.resolve(src).split(path7.sep).filter((i) => i), destArr = path7.resolve(dest).split(path7.sep).filter((i) => i);
|
|
27145
27146
|
return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, !0);
|
|
27146
27147
|
}
|
|
27147
27148
|
function errMsg(src, dest, funcName) {
|
|
@@ -27163,7 +27164,7 @@ var require_copy = __commonJS({
|
|
|
27163
27164
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
|
|
27164
27165
|
"use strict";
|
|
27165
27166
|
init_cjs_shims();
|
|
27166
|
-
var
|
|
27167
|
+
var fs4 = require_graceful_fs(), path7 = __require("path"), mkdirs2 = require_mkdirs().mkdirs, pathExists3 = require_path_exists().pathExists, utimesMillis = require_utimes().utimesMillis, stat = require_stat();
|
|
27167
27168
|
function copy2(src, dest, opts, cb) {
|
|
27168
27169
|
typeof opts == "function" && !cb ? (cb = opts, opts = {}) : typeof opts == "function" && (opts = { filter: opts }), cb = cb || function() {
|
|
27169
27170
|
}, 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(
|
|
@@ -27186,7 +27187,7 @@ var require_copy = __commonJS({
|
|
|
27186
27187
|
});
|
|
27187
27188
|
}
|
|
27188
27189
|
function checkParentDir(destStat, src, dest, opts, cb) {
|
|
27189
|
-
let destParent =
|
|
27190
|
+
let destParent = path7.dirname(dest);
|
|
27190
27191
|
pathExists3(destParent, (err, dirExists) => {
|
|
27191
27192
|
if (err) return cb(err);
|
|
27192
27193
|
if (dirExists) return getStats(destStat, src, dest, opts, cb);
|
|
@@ -27198,18 +27199,18 @@ var require_copy = __commonJS({
|
|
|
27198
27199
|
Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
|
|
27199
27200
|
}
|
|
27200
27201
|
function getStats(destStat, src, dest, opts, cb) {
|
|
27201
|
-
(opts.dereference ?
|
|
27202
|
+
(opts.dereference ? fs4.stat : fs4.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}`)));
|
|
27202
27203
|
}
|
|
27203
27204
|
function onFile(srcStat, destStat, src, dest, opts, cb) {
|
|
27204
27205
|
return destStat ? mayCopyFile(srcStat, src, dest, opts, cb) : copyFile2(srcStat, src, dest, opts, cb);
|
|
27205
27206
|
}
|
|
27206
27207
|
function mayCopyFile(srcStat, src, dest, opts, cb) {
|
|
27207
27208
|
if (opts.overwrite)
|
|
27208
|
-
|
|
27209
|
+
fs4.unlink(dest, (err) => err ? cb(err) : copyFile2(srcStat, src, dest, opts, cb));
|
|
27209
27210
|
else return opts.errorOnExist ? cb(new Error(`'${dest}' already exists`)) : cb();
|
|
27210
27211
|
}
|
|
27211
27212
|
function copyFile2(srcStat, src, dest, opts, cb) {
|
|
27212
|
-
|
|
27213
|
+
fs4.copyFile(src, dest, (err) => err ? cb(err) : opts.preserveTimestamps ? handleTimestampsAndMode(srcStat.mode, src, dest, cb) : setDestMode(dest, srcStat.mode, cb));
|
|
27213
27214
|
}
|
|
27214
27215
|
function handleTimestampsAndMode(srcMode, src, dest, cb) {
|
|
27215
27216
|
return fileIsNotWritable(srcMode) ? makeFileWritable(dest, srcMode, (err) => err ? cb(err) : setDestTimestampsAndMode(srcMode, src, dest, cb)) : setDestTimestampsAndMode(srcMode, src, dest, cb);
|
|
@@ -27224,29 +27225,29 @@ var require_copy = __commonJS({
|
|
|
27224
27225
|
setDestTimestamps(src, dest, (err) => err ? cb(err) : setDestMode(dest, srcMode, cb));
|
|
27225
27226
|
}
|
|
27226
27227
|
function setDestMode(dest, srcMode, cb) {
|
|
27227
|
-
return
|
|
27228
|
+
return fs4.chmod(dest, srcMode, cb);
|
|
27228
27229
|
}
|
|
27229
27230
|
function setDestTimestamps(src, dest, cb) {
|
|
27230
|
-
|
|
27231
|
+
fs4.stat(src, (err, updatedSrcStat) => err ? cb(err) : utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb));
|
|
27231
27232
|
}
|
|
27232
27233
|
function onDir(srcStat, destStat, src, dest, opts, cb) {
|
|
27233
27234
|
return destStat ? copyDir(src, dest, opts, cb) : mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
|
|
27234
27235
|
}
|
|
27235
27236
|
function mkDirAndCopy(srcMode, src, dest, opts, cb) {
|
|
27236
|
-
|
|
27237
|
+
fs4.mkdir(dest, (err) => {
|
|
27237
27238
|
if (err) return cb(err);
|
|
27238
27239
|
copyDir(src, dest, opts, (err2) => err2 ? cb(err2) : setDestMode(dest, srcMode, cb));
|
|
27239
27240
|
});
|
|
27240
27241
|
}
|
|
27241
27242
|
function copyDir(src, dest, opts, cb) {
|
|
27242
|
-
|
|
27243
|
+
fs4.readdir(src, (err, items) => err ? cb(err) : copyDirItems(items, src, dest, opts, cb));
|
|
27243
27244
|
}
|
|
27244
27245
|
function copyDirItems(items, src, dest, opts, cb) {
|
|
27245
27246
|
let item = items.pop();
|
|
27246
27247
|
return item ? copyDirItem(items, item, src, dest, opts, cb) : cb();
|
|
27247
27248
|
}
|
|
27248
27249
|
function copyDirItem(items, item, src, dest, opts, cb) {
|
|
27249
|
-
let srcItem =
|
|
27250
|
+
let srcItem = path7.join(src, item), destItem = path7.join(dest, item);
|
|
27250
27251
|
runFilter(srcItem, destItem, opts, (err, include) => {
|
|
27251
27252
|
if (err) return cb(err);
|
|
27252
27253
|
if (!include) return copyDirItems(items, src, dest, opts, cb);
|
|
@@ -27258,16 +27259,16 @@ var require_copy = __commonJS({
|
|
|
27258
27259
|
});
|
|
27259
27260
|
}
|
|
27260
27261
|
function onLink(destStat, src, dest, opts, cb) {
|
|
27261
|
-
|
|
27262
|
+
fs4.readlink(src, (err, resolvedSrc) => {
|
|
27262
27263
|
if (err) return cb(err);
|
|
27263
|
-
if (opts.dereference && (resolvedSrc =
|
|
27264
|
-
|
|
27264
|
+
if (opts.dereference && (resolvedSrc = path7.resolve(process.cwd(), resolvedSrc)), destStat)
|
|
27265
|
+
fs4.readlink(dest, (err2, resolvedDest) => err2 ? err2.code === "EINVAL" || err2.code === "UNKNOWN" ? fs4.symlink(resolvedSrc, dest, cb) : cb(err2) : (opts.dereference && (resolvedDest = path7.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)));
|
|
27265
27266
|
else
|
|
27266
|
-
return
|
|
27267
|
+
return fs4.symlink(resolvedSrc, dest, cb);
|
|
27267
27268
|
});
|
|
27268
27269
|
}
|
|
27269
27270
|
function copyLink(resolvedSrc, dest, cb) {
|
|
27270
|
-
|
|
27271
|
+
fs4.unlink(dest, (err) => err ? cb(err) : fs4.symlink(resolvedSrc, dest, cb));
|
|
27271
27272
|
}
|
|
27272
27273
|
module.exports = copy2;
|
|
27273
27274
|
}
|
|
@@ -27278,7 +27279,7 @@ var require_copy_sync = __commonJS({
|
|
|
27278
27279
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
|
|
27279
27280
|
"use strict";
|
|
27280
27281
|
init_cjs_shims();
|
|
27281
|
-
var
|
|
27282
|
+
var fs4 = require_graceful_fs(), path7 = __require("path"), mkdirsSync2 = require_mkdirs().mkdirsSync, utimesMillisSync = require_utimes().utimesMillisSync, stat = require_stat();
|
|
27282
27283
|
function copySync2(src, dest, opts) {
|
|
27283
27284
|
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(
|
|
27284
27285
|
`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
@@ -27289,11 +27290,11 @@ var require_copy_sync = __commonJS({
|
|
|
27289
27290
|
);
|
|
27290
27291
|
let { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
|
|
27291
27292
|
if (stat.checkParentPathsSync(src, srcStat, dest, "copy"), opts.filter && !opts.filter(src, dest)) return;
|
|
27292
|
-
let destParent =
|
|
27293
|
-
return
|
|
27293
|
+
let destParent = path7.dirname(dest);
|
|
27294
|
+
return fs4.existsSync(destParent) || mkdirsSync2(destParent), getStats(destStat, src, dest, opts);
|
|
27294
27295
|
}
|
|
27295
27296
|
function getStats(destStat, src, dest, opts) {
|
|
27296
|
-
let srcStat = (opts.dereference ?
|
|
27297
|
+
let srcStat = (opts.dereference ? fs4.statSync : fs4.lstatSync)(src);
|
|
27297
27298
|
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
|
|
27298
27299
|
if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
|
|
27299
27300
|
if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
|
|
@@ -27304,12 +27305,12 @@ var require_copy_sync = __commonJS({
|
|
|
27304
27305
|
}
|
|
27305
27306
|
function mayCopyFile(srcStat, src, dest, opts) {
|
|
27306
27307
|
if (opts.overwrite)
|
|
27307
|
-
return
|
|
27308
|
+
return fs4.unlinkSync(dest), copyFile2(srcStat, src, dest, opts);
|
|
27308
27309
|
if (opts.errorOnExist)
|
|
27309
27310
|
throw new Error(`'${dest}' already exists`);
|
|
27310
27311
|
}
|
|
27311
27312
|
function copyFile2(srcStat, src, dest, opts) {
|
|
27312
|
-
return
|
|
27313
|
+
return fs4.copyFileSync(src, dest), opts.preserveTimestamps && handleTimestamps(srcStat.mode, src, dest), setDestMode(dest, srcStat.mode);
|
|
27313
27314
|
}
|
|
27314
27315
|
function handleTimestamps(srcMode, src, dest) {
|
|
27315
27316
|
return fileIsNotWritable(srcMode) && makeFileWritable(dest, srcMode), setDestTimestamps(src, dest);
|
|
@@ -27321,47 +27322,47 @@ var require_copy_sync = __commonJS({
|
|
|
27321
27322
|
return setDestMode(dest, srcMode | 128);
|
|
27322
27323
|
}
|
|
27323
27324
|
function setDestMode(dest, srcMode) {
|
|
27324
|
-
return
|
|
27325
|
+
return fs4.chmodSync(dest, srcMode);
|
|
27325
27326
|
}
|
|
27326
27327
|
function setDestTimestamps(src, dest) {
|
|
27327
|
-
let updatedSrcStat =
|
|
27328
|
+
let updatedSrcStat = fs4.statSync(src);
|
|
27328
27329
|
return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
27329
27330
|
}
|
|
27330
27331
|
function onDir(srcStat, destStat, src, dest, opts) {
|
|
27331
27332
|
return destStat ? copyDir(src, dest, opts) : mkDirAndCopy(srcStat.mode, src, dest, opts);
|
|
27332
27333
|
}
|
|
27333
27334
|
function mkDirAndCopy(srcMode, src, dest, opts) {
|
|
27334
|
-
return
|
|
27335
|
+
return fs4.mkdirSync(dest), copyDir(src, dest, opts), setDestMode(dest, srcMode);
|
|
27335
27336
|
}
|
|
27336
27337
|
function copyDir(src, dest, opts) {
|
|
27337
|
-
|
|
27338
|
+
fs4.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
|
|
27338
27339
|
}
|
|
27339
27340
|
function copyDirItem(item, src, dest, opts) {
|
|
27340
|
-
let srcItem =
|
|
27341
|
+
let srcItem = path7.join(src, item), destItem = path7.join(dest, item);
|
|
27341
27342
|
if (opts.filter && !opts.filter(srcItem, destItem)) return;
|
|
27342
27343
|
let { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
|
|
27343
27344
|
return getStats(destStat, srcItem, destItem, opts);
|
|
27344
27345
|
}
|
|
27345
27346
|
function onLink(destStat, src, dest, opts) {
|
|
27346
|
-
let resolvedSrc =
|
|
27347
|
-
if (opts.dereference && (resolvedSrc =
|
|
27347
|
+
let resolvedSrc = fs4.readlinkSync(src);
|
|
27348
|
+
if (opts.dereference && (resolvedSrc = path7.resolve(process.cwd(), resolvedSrc)), destStat) {
|
|
27348
27349
|
let resolvedDest;
|
|
27349
27350
|
try {
|
|
27350
|
-
resolvedDest =
|
|
27351
|
+
resolvedDest = fs4.readlinkSync(dest);
|
|
27351
27352
|
} catch (err) {
|
|
27352
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
27353
|
+
if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs4.symlinkSync(resolvedSrc, dest);
|
|
27353
27354
|
throw err;
|
|
27354
27355
|
}
|
|
27355
|
-
if (opts.dereference && (resolvedDest =
|
|
27356
|
+
if (opts.dereference && (resolvedDest = path7.resolve(process.cwd(), resolvedDest)), stat.isSrcSubdir(resolvedSrc, resolvedDest))
|
|
27356
27357
|
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
|
|
27357
27358
|
if (stat.isSrcSubdir(resolvedDest, resolvedSrc))
|
|
27358
27359
|
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
|
|
27359
27360
|
return copyLink(resolvedSrc, dest);
|
|
27360
27361
|
} else
|
|
27361
|
-
return
|
|
27362
|
+
return fs4.symlinkSync(resolvedSrc, dest);
|
|
27362
27363
|
}
|
|
27363
27364
|
function copyLink(resolvedSrc, dest) {
|
|
27364
|
-
return
|
|
27365
|
+
return fs4.unlinkSync(dest), fs4.symlinkSync(resolvedSrc, dest);
|
|
27365
27366
|
}
|
|
27366
27367
|
module.exports = copySync2;
|
|
27367
27368
|
}
|
|
@@ -27385,12 +27386,12 @@ var require_remove = __commonJS({
|
|
|
27385
27386
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
|
|
27386
27387
|
"use strict";
|
|
27387
27388
|
init_cjs_shims();
|
|
27388
|
-
var
|
|
27389
|
-
function remove2(
|
|
27390
|
-
|
|
27389
|
+
var fs4 = require_graceful_fs(), u = require_universalify().fromCallback;
|
|
27390
|
+
function remove2(path7, callback) {
|
|
27391
|
+
fs4.rm(path7, { recursive: !0, force: !0 }, callback);
|
|
27391
27392
|
}
|
|
27392
|
-
function removeSync2(
|
|
27393
|
-
|
|
27393
|
+
function removeSync2(path7) {
|
|
27394
|
+
fs4.rmSync(path7, { recursive: !0, force: !0 });
|
|
27394
27395
|
}
|
|
27395
27396
|
module.exports = {
|
|
27396
27397
|
remove: u(remove2),
|
|
@@ -27404,24 +27405,24 @@ var require_empty = __commonJS({
|
|
|
27404
27405
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
|
|
27405
27406
|
"use strict";
|
|
27406
27407
|
init_cjs_shims();
|
|
27407
|
-
var u = require_universalify().fromPromise,
|
|
27408
|
+
var u = require_universalify().fromPromise, fs4 = require_fs(), path7 = __require("path"), mkdir2 = require_mkdirs(), remove2 = require_remove(), emptyDir2 = u(async function(dir) {
|
|
27408
27409
|
let items;
|
|
27409
27410
|
try {
|
|
27410
|
-
items = await
|
|
27411
|
+
items = await fs4.readdir(dir);
|
|
27411
27412
|
} catch {
|
|
27412
27413
|
return mkdir2.mkdirs(dir);
|
|
27413
27414
|
}
|
|
27414
|
-
return Promise.all(items.map((item) => remove2.remove(
|
|
27415
|
+
return Promise.all(items.map((item) => remove2.remove(path7.join(dir, item))));
|
|
27415
27416
|
});
|
|
27416
27417
|
function emptyDirSync2(dir) {
|
|
27417
27418
|
let items;
|
|
27418
27419
|
try {
|
|
27419
|
-
items =
|
|
27420
|
+
items = fs4.readdirSync(dir);
|
|
27420
27421
|
} catch {
|
|
27421
27422
|
return mkdir2.mkdirsSync(dir);
|
|
27422
27423
|
}
|
|
27423
27424
|
items.forEach((item) => {
|
|
27424
|
-
item =
|
|
27425
|
+
item = path7.join(dir, item), remove2.removeSync(item);
|
|
27425
27426
|
});
|
|
27426
27427
|
}
|
|
27427
27428
|
module.exports = {
|
|
@@ -27438,24 +27439,24 @@ var require_file = __commonJS({
|
|
|
27438
27439
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
|
|
27439
27440
|
"use strict";
|
|
27440
27441
|
init_cjs_shims();
|
|
27441
|
-
var u = require_universalify().fromCallback,
|
|
27442
|
+
var u = require_universalify().fromCallback, path7 = __require("path"), fs4 = require_graceful_fs(), mkdir2 = require_mkdirs();
|
|
27442
27443
|
function createFile2(file, callback) {
|
|
27443
27444
|
function makeFile() {
|
|
27444
|
-
|
|
27445
|
+
fs4.writeFile(file, "", (err) => {
|
|
27445
27446
|
if (err) return callback(err);
|
|
27446
27447
|
callback();
|
|
27447
27448
|
});
|
|
27448
27449
|
}
|
|
27449
|
-
|
|
27450
|
+
fs4.stat(file, (err, stats) => {
|
|
27450
27451
|
if (!err && stats.isFile()) return callback();
|
|
27451
|
-
let dir =
|
|
27452
|
-
|
|
27452
|
+
let dir = path7.dirname(file);
|
|
27453
|
+
fs4.stat(dir, (err2, stats2) => {
|
|
27453
27454
|
if (err2)
|
|
27454
27455
|
return err2.code === "ENOENT" ? mkdir2.mkdirs(dir, (err3) => {
|
|
27455
27456
|
if (err3) return callback(err3);
|
|
27456
27457
|
makeFile();
|
|
27457
27458
|
}) : callback(err2);
|
|
27458
|
-
stats2.isDirectory() ? makeFile() :
|
|
27459
|
+
stats2.isDirectory() ? makeFile() : fs4.readdir(dir, (err3) => {
|
|
27459
27460
|
if (err3) return callback(err3);
|
|
27460
27461
|
});
|
|
27461
27462
|
});
|
|
@@ -27464,18 +27465,18 @@ var require_file = __commonJS({
|
|
|
27464
27465
|
function createFileSync2(file) {
|
|
27465
27466
|
let stats;
|
|
27466
27467
|
try {
|
|
27467
|
-
stats =
|
|
27468
|
+
stats = fs4.statSync(file);
|
|
27468
27469
|
} catch {
|
|
27469
27470
|
}
|
|
27470
27471
|
if (stats && stats.isFile()) return;
|
|
27471
|
-
let dir =
|
|
27472
|
+
let dir = path7.dirname(file);
|
|
27472
27473
|
try {
|
|
27473
|
-
|
|
27474
|
+
fs4.statSync(dir).isDirectory() || fs4.readdirSync(dir);
|
|
27474
27475
|
} catch (err) {
|
|
27475
27476
|
if (err && err.code === "ENOENT") mkdir2.mkdirsSync(dir);
|
|
27476
27477
|
else throw err;
|
|
27477
27478
|
}
|
|
27478
|
-
|
|
27479
|
+
fs4.writeFileSync(file, "");
|
|
27479
27480
|
}
|
|
27480
27481
|
module.exports = {
|
|
27481
27482
|
createFile: u(createFile2),
|
|
@@ -27489,20 +27490,20 @@ var require_link = __commonJS({
|
|
|
27489
27490
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
|
|
27490
27491
|
"use strict";
|
|
27491
27492
|
init_cjs_shims();
|
|
27492
|
-
var u = require_universalify().fromCallback,
|
|
27493
|
+
var u = require_universalify().fromCallback, path7 = __require("path"), fs4 = require_graceful_fs(), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists, { areIdentical } = require_stat();
|
|
27493
27494
|
function createLink2(srcpath, dstpath, callback) {
|
|
27494
27495
|
function makeLink(srcpath2, dstpath2) {
|
|
27495
|
-
|
|
27496
|
+
fs4.link(srcpath2, dstpath2, (err) => {
|
|
27496
27497
|
if (err) return callback(err);
|
|
27497
27498
|
callback(null);
|
|
27498
27499
|
});
|
|
27499
27500
|
}
|
|
27500
|
-
|
|
27501
|
-
|
|
27501
|
+
fs4.lstat(dstpath, (_, dstStat) => {
|
|
27502
|
+
fs4.lstat(srcpath, (err, srcStat) => {
|
|
27502
27503
|
if (err)
|
|
27503
27504
|
return err.message = err.message.replace("lstat", "ensureLink"), callback(err);
|
|
27504
27505
|
if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
|
|
27505
|
-
let dir =
|
|
27506
|
+
let dir = path7.dirname(dstpath);
|
|
27506
27507
|
pathExists3(dir, (err2, dirExists) => {
|
|
27507
27508
|
if (err2) return callback(err2);
|
|
27508
27509
|
if (dirExists) return makeLink(srcpath, dstpath);
|
|
@@ -27517,17 +27518,17 @@ var require_link = __commonJS({
|
|
|
27517
27518
|
function createLinkSync2(srcpath, dstpath) {
|
|
27518
27519
|
let dstStat;
|
|
27519
27520
|
try {
|
|
27520
|
-
dstStat =
|
|
27521
|
+
dstStat = fs4.lstatSync(dstpath);
|
|
27521
27522
|
} catch {
|
|
27522
27523
|
}
|
|
27523
27524
|
try {
|
|
27524
|
-
let srcStat =
|
|
27525
|
+
let srcStat = fs4.lstatSync(srcpath);
|
|
27525
27526
|
if (dstStat && areIdentical(srcStat, dstStat)) return;
|
|
27526
27527
|
} catch (err) {
|
|
27527
27528
|
throw err.message = err.message.replace("lstat", "ensureLink"), err;
|
|
27528
27529
|
}
|
|
27529
|
-
let dir =
|
|
27530
|
-
return
|
|
27530
|
+
let dir = path7.dirname(dstpath);
|
|
27531
|
+
return fs4.existsSync(dir) || mkdir2.mkdirsSync(dir), fs4.linkSync(srcpath, dstpath);
|
|
27531
27532
|
}
|
|
27532
27533
|
module.exports = {
|
|
27533
27534
|
createLink: u(createLink2),
|
|
@@ -27541,43 +27542,43 @@ var require_symlink_paths = __commonJS({
|
|
|
27541
27542
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
|
|
27542
27543
|
"use strict";
|
|
27543
27544
|
init_cjs_shims();
|
|
27544
|
-
var
|
|
27545
|
+
var path7 = __require("path"), fs4 = require_graceful_fs(), pathExists3 = require_path_exists().pathExists;
|
|
27545
27546
|
function symlinkPaths(srcpath, dstpath, callback) {
|
|
27546
|
-
if (
|
|
27547
|
-
return
|
|
27547
|
+
if (path7.isAbsolute(srcpath))
|
|
27548
|
+
return fs4.lstat(srcpath, (err) => err ? (err.message = err.message.replace("lstat", "ensureSymlink"), callback(err)) : callback(null, {
|
|
27548
27549
|
toCwd: srcpath,
|
|
27549
27550
|
toDst: srcpath
|
|
27550
27551
|
}));
|
|
27551
27552
|
{
|
|
27552
|
-
let dstdir =
|
|
27553
|
+
let dstdir = path7.dirname(dstpath), relativeToDst = path7.join(dstdir, srcpath);
|
|
27553
27554
|
return pathExists3(relativeToDst, (err, exists) => err ? callback(err) : exists ? callback(null, {
|
|
27554
27555
|
toCwd: relativeToDst,
|
|
27555
27556
|
toDst: srcpath
|
|
27556
|
-
}) :
|
|
27557
|
+
}) : fs4.lstat(srcpath, (err2) => err2 ? (err2.message = err2.message.replace("lstat", "ensureSymlink"), callback(err2)) : callback(null, {
|
|
27557
27558
|
toCwd: srcpath,
|
|
27558
|
-
toDst:
|
|
27559
|
+
toDst: path7.relative(dstdir, srcpath)
|
|
27559
27560
|
})));
|
|
27560
27561
|
}
|
|
27561
27562
|
}
|
|
27562
27563
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
27563
27564
|
let exists;
|
|
27564
|
-
if (
|
|
27565
|
-
if (exists =
|
|
27565
|
+
if (path7.isAbsolute(srcpath)) {
|
|
27566
|
+
if (exists = fs4.existsSync(srcpath), !exists) throw new Error("absolute srcpath does not exist");
|
|
27566
27567
|
return {
|
|
27567
27568
|
toCwd: srcpath,
|
|
27568
27569
|
toDst: srcpath
|
|
27569
27570
|
};
|
|
27570
27571
|
} else {
|
|
27571
|
-
let dstdir =
|
|
27572
|
-
if (exists =
|
|
27572
|
+
let dstdir = path7.dirname(dstpath), relativeToDst = path7.join(dstdir, srcpath);
|
|
27573
|
+
if (exists = fs4.existsSync(relativeToDst), exists)
|
|
27573
27574
|
return {
|
|
27574
27575
|
toCwd: relativeToDst,
|
|
27575
27576
|
toDst: srcpath
|
|
27576
27577
|
};
|
|
27577
|
-
if (exists =
|
|
27578
|
+
if (exists = fs4.existsSync(srcpath), !exists) throw new Error("relative srcpath does not exist");
|
|
27578
27579
|
return {
|
|
27579
27580
|
toCwd: srcpath,
|
|
27580
|
-
toDst:
|
|
27581
|
+
toDst: path7.relative(dstdir, srcpath)
|
|
27581
27582
|
};
|
|
27582
27583
|
}
|
|
27583
27584
|
}
|
|
@@ -27593,10 +27594,10 @@ var require_symlink_type = __commonJS({
|
|
|
27593
27594
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
|
|
27594
27595
|
"use strict";
|
|
27595
27596
|
init_cjs_shims();
|
|
27596
|
-
var
|
|
27597
|
+
var fs4 = require_graceful_fs();
|
|
27597
27598
|
function symlinkType(srcpath, type, callback) {
|
|
27598
27599
|
if (callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, type) return callback(null, type);
|
|
27599
|
-
|
|
27600
|
+
fs4.lstat(srcpath, (err, stats) => {
|
|
27600
27601
|
if (err) return callback(null, "file");
|
|
27601
27602
|
type = stats && stats.isDirectory() ? "dir" : "file", callback(null, type);
|
|
27602
27603
|
});
|
|
@@ -27605,7 +27606,7 @@ var require_symlink_type = __commonJS({
|
|
|
27605
27606
|
let stats;
|
|
27606
27607
|
if (type) return type;
|
|
27607
27608
|
try {
|
|
27608
|
-
stats =
|
|
27609
|
+
stats = fs4.lstatSync(srcpath);
|
|
27609
27610
|
} catch {
|
|
27610
27611
|
return "file";
|
|
27611
27612
|
}
|
|
@@ -27623,12 +27624,12 @@ var require_symlink = __commonJS({
|
|
|
27623
27624
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
|
|
27624
27625
|
"use strict";
|
|
27625
27626
|
init_cjs_shims();
|
|
27626
|
-
var u = require_universalify().fromCallback,
|
|
27627
|
+
var u = require_universalify().fromCallback, path7 = __require("path"), fs4 = 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();
|
|
27627
27628
|
function createSymlink2(srcpath, dstpath, type, callback) {
|
|
27628
|
-
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type,
|
|
27629
|
+
callback = typeof type == "function" ? type : callback, type = typeof type == "function" ? !1 : type, fs4.lstat(dstpath, (err, stats) => {
|
|
27629
27630
|
!err && stats.isSymbolicLink() ? Promise.all([
|
|
27630
|
-
|
|
27631
|
-
|
|
27631
|
+
fs4.stat(srcpath),
|
|
27632
|
+
fs4.stat(dstpath)
|
|
27632
27633
|
]).then(([srcStat, dstStat]) => {
|
|
27633
27634
|
if (areIdentical(srcStat, dstStat)) return callback(null);
|
|
27634
27635
|
_createSymlink(srcpath, dstpath, type, callback);
|
|
@@ -27640,13 +27641,13 @@ var require_symlink = __commonJS({
|
|
|
27640
27641
|
if (err) return callback(err);
|
|
27641
27642
|
srcpath = relative.toDst, symlinkType(relative.toCwd, type, (err2, type2) => {
|
|
27642
27643
|
if (err2) return callback(err2);
|
|
27643
|
-
let dir =
|
|
27644
|
+
let dir = path7.dirname(dstpath);
|
|
27644
27645
|
pathExists3(dir, (err3, dirExists) => {
|
|
27645
27646
|
if (err3) return callback(err3);
|
|
27646
|
-
if (dirExists) return
|
|
27647
|
+
if (dirExists) return fs4.symlink(srcpath, dstpath, type2, callback);
|
|
27647
27648
|
mkdirs2(dir, (err4) => {
|
|
27648
27649
|
if (err4) return callback(err4);
|
|
27649
|
-
|
|
27650
|
+
fs4.symlink(srcpath, dstpath, type2, callback);
|
|
27650
27651
|
});
|
|
27651
27652
|
});
|
|
27652
27653
|
});
|
|
@@ -27655,17 +27656,17 @@ var require_symlink = __commonJS({
|
|
|
27655
27656
|
function createSymlinkSync2(srcpath, dstpath, type) {
|
|
27656
27657
|
let stats;
|
|
27657
27658
|
try {
|
|
27658
|
-
stats =
|
|
27659
|
+
stats = fs4.lstatSync(dstpath);
|
|
27659
27660
|
} catch {
|
|
27660
27661
|
}
|
|
27661
27662
|
if (stats && stats.isSymbolicLink()) {
|
|
27662
|
-
let srcStat =
|
|
27663
|
+
let srcStat = fs4.statSync(srcpath), dstStat = fs4.statSync(dstpath);
|
|
27663
27664
|
if (areIdentical(srcStat, dstStat)) return;
|
|
27664
27665
|
}
|
|
27665
27666
|
let relative = symlinkPathsSync(srcpath, dstpath);
|
|
27666
27667
|
srcpath = relative.toDst, type = symlinkTypeSync(relative.toCwd, type);
|
|
27667
|
-
let dir =
|
|
27668
|
-
return
|
|
27668
|
+
let dir = path7.dirname(dstpath);
|
|
27669
|
+
return fs4.existsSync(dir) || mkdirsSync2(dir), fs4.symlinkSync(srcpath, dstpath, type);
|
|
27669
27670
|
}
|
|
27670
27671
|
module.exports = {
|
|
27671
27672
|
createSymlink: u(createSymlink2),
|
|
@@ -27729,7 +27730,7 @@ var require_jsonfile = __commonJS({
|
|
|
27729
27730
|
var universalify = require_universalify(), { stringify, stripBom } = require_utils2();
|
|
27730
27731
|
async function _readFile(file, options = {}) {
|
|
27731
27732
|
typeof options == "string" && (options = { encoding: options });
|
|
27732
|
-
let
|
|
27733
|
+
let fs4 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0, data = await universalify.fromCallback(fs4.readFile)(file, options);
|
|
27733
27734
|
data = stripBom(data);
|
|
27734
27735
|
let obj;
|
|
27735
27736
|
try {
|
|
@@ -27744,9 +27745,9 @@ var require_jsonfile = __commonJS({
|
|
|
27744
27745
|
var readFile2 = universalify.fromPromise(_readFile);
|
|
27745
27746
|
function readFileSync4(file, options = {}) {
|
|
27746
27747
|
typeof options == "string" && (options = { encoding: options });
|
|
27747
|
-
let
|
|
27748
|
+
let fs4 = options.fs || _fs, shouldThrow = "throws" in options ? options.throws : !0;
|
|
27748
27749
|
try {
|
|
27749
|
-
let content =
|
|
27750
|
+
let content = fs4.readFileSync(file, options);
|
|
27750
27751
|
return content = stripBom(content), JSON.parse(content, options.reviver);
|
|
27751
27752
|
} catch (err) {
|
|
27752
27753
|
if (shouldThrow)
|
|
@@ -27755,13 +27756,13 @@ var require_jsonfile = __commonJS({
|
|
|
27755
27756
|
}
|
|
27756
27757
|
}
|
|
27757
27758
|
async function _writeFile(file, obj, options = {}) {
|
|
27758
|
-
let
|
|
27759
|
-
await universalify.fromCallback(
|
|
27759
|
+
let fs4 = options.fs || _fs, str = stringify(obj, options);
|
|
27760
|
+
await universalify.fromCallback(fs4.writeFile)(file, str, options);
|
|
27760
27761
|
}
|
|
27761
27762
|
var writeFile2 = universalify.fromPromise(_writeFile);
|
|
27762
27763
|
function writeFileSync2(file, obj, options = {}) {
|
|
27763
|
-
let
|
|
27764
|
-
return
|
|
27764
|
+
let fs4 = options.fs || _fs, str = stringify(obj, options);
|
|
27765
|
+
return fs4.writeFileSync(file, str, options);
|
|
27765
27766
|
}
|
|
27766
27767
|
module.exports = {
|
|
27767
27768
|
readFile: readFile2,
|
|
@@ -27793,24 +27794,24 @@ var require_output_file = __commonJS({
|
|
|
27793
27794
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
|
|
27794
27795
|
"use strict";
|
|
27795
27796
|
init_cjs_shims();
|
|
27796
|
-
var u = require_universalify().fromCallback,
|
|
27797
|
+
var u = require_universalify().fromCallback, fs4 = require_graceful_fs(), path7 = __require("path"), mkdir2 = require_mkdirs(), pathExists3 = require_path_exists().pathExists;
|
|
27797
27798
|
function outputFile2(file, data, encoding, callback) {
|
|
27798
27799
|
typeof encoding == "function" && (callback = encoding, encoding = "utf8");
|
|
27799
|
-
let dir =
|
|
27800
|
+
let dir = path7.dirname(file);
|
|
27800
27801
|
pathExists3(dir, (err, itDoes) => {
|
|
27801
27802
|
if (err) return callback(err);
|
|
27802
|
-
if (itDoes) return
|
|
27803
|
+
if (itDoes) return fs4.writeFile(file, data, encoding, callback);
|
|
27803
27804
|
mkdir2.mkdirs(dir, (err2) => {
|
|
27804
27805
|
if (err2) return callback(err2);
|
|
27805
|
-
|
|
27806
|
+
fs4.writeFile(file, data, encoding, callback);
|
|
27806
27807
|
});
|
|
27807
27808
|
});
|
|
27808
27809
|
}
|
|
27809
27810
|
function outputFileSync2(file, ...args) {
|
|
27810
|
-
let dir =
|
|
27811
|
-
if (
|
|
27812
|
-
return
|
|
27813
|
-
mkdir2.mkdirsSync(dir),
|
|
27811
|
+
let dir = path7.dirname(file);
|
|
27812
|
+
if (fs4.existsSync(dir))
|
|
27813
|
+
return fs4.writeFileSync(file, ...args);
|
|
27814
|
+
mkdir2.mkdirsSync(dir), fs4.writeFileSync(file, ...args);
|
|
27814
27815
|
}
|
|
27815
27816
|
module.exports = {
|
|
27816
27817
|
outputFile: u(outputFile2),
|
|
@@ -27870,7 +27871,7 @@ var require_move = __commonJS({
|
|
|
27870
27871
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
27871
27872
|
"use strict";
|
|
27872
27873
|
init_cjs_shims();
|
|
27873
|
-
var
|
|
27874
|
+
var fs4 = require_graceful_fs(), path7 = __require("path"), copy2 = require_copy2().copy, remove2 = require_remove().remove, mkdirp2 = require_mkdirs().mkdirp, pathExists3 = require_path_exists().pathExists, stat = require_stat();
|
|
27874
27875
|
function move2(src, dest, opts, cb) {
|
|
27875
27876
|
typeof opts == "function" && (cb = opts, opts = {}), opts = opts || {};
|
|
27876
27877
|
let overwrite = opts.overwrite || opts.clobber || !1;
|
|
@@ -27880,13 +27881,13 @@ var require_move = __commonJS({
|
|
|
27880
27881
|
stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
|
|
27881
27882
|
if (err2) return cb(err2);
|
|
27882
27883
|
if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb);
|
|
27883
|
-
mkdirp2(
|
|
27884
|
+
mkdirp2(path7.dirname(dest), (err3) => err3 ? cb(err3) : doRename(src, dest, overwrite, isChangingCase, cb));
|
|
27884
27885
|
});
|
|
27885
27886
|
});
|
|
27886
27887
|
}
|
|
27887
27888
|
function isParentRoot(dest) {
|
|
27888
|
-
let parent =
|
|
27889
|
-
return
|
|
27889
|
+
let parent = path7.dirname(dest);
|
|
27890
|
+
return path7.parse(parent).root === parent;
|
|
27890
27891
|
}
|
|
27891
27892
|
function doRename(src, dest, overwrite, isChangingCase, cb) {
|
|
27892
27893
|
if (isChangingCase) return rename(src, dest, overwrite, cb);
|
|
@@ -27895,7 +27896,7 @@ var require_move = __commonJS({
|
|
|
27895
27896
|
pathExists3(dest, (err, destExists) => err ? cb(err) : destExists ? cb(new Error("dest already exists.")) : rename(src, dest, overwrite, cb));
|
|
27896
27897
|
}
|
|
27897
27898
|
function rename(src, dest, overwrite, cb) {
|
|
27898
|
-
|
|
27899
|
+
fs4.rename(src, dest, (err) => err ? err.code !== "EXDEV" ? cb(err) : moveAcrossDevice(src, dest, overwrite, cb) : cb());
|
|
27899
27900
|
}
|
|
27900
27901
|
function moveAcrossDevice(src, dest, overwrite, cb) {
|
|
27901
27902
|
copy2(src, dest, {
|
|
@@ -27912,26 +27913,26 @@ var require_move_sync = __commonJS({
|
|
|
27912
27913
|
"../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
27913
27914
|
"use strict";
|
|
27914
27915
|
init_cjs_shims();
|
|
27915
|
-
var
|
|
27916
|
+
var fs4 = require_graceful_fs(), path7 = __require("path"), copySync2 = require_copy2().copySync, removeSync2 = require_remove().removeSync, mkdirpSync2 = require_mkdirs().mkdirpSync, stat = require_stat();
|
|
27916
27917
|
function moveSync2(src, dest, opts) {
|
|
27917
27918
|
opts = opts || {};
|
|
27918
27919
|
let overwrite = opts.overwrite || opts.clobber || !1, { srcStat, isChangingCase = !1 } = stat.checkPathsSync(src, dest, "move", opts);
|
|
27919
|
-
return stat.checkParentPathsSync(src, srcStat, dest, "move"), isParentRoot(dest) || mkdirpSync2(
|
|
27920
|
+
return stat.checkParentPathsSync(src, srcStat, dest, "move"), isParentRoot(dest) || mkdirpSync2(path7.dirname(dest)), doRename(src, dest, overwrite, isChangingCase);
|
|
27920
27921
|
}
|
|
27921
27922
|
function isParentRoot(dest) {
|
|
27922
|
-
let parent =
|
|
27923
|
-
return
|
|
27923
|
+
let parent = path7.dirname(dest);
|
|
27924
|
+
return path7.parse(parent).root === parent;
|
|
27924
27925
|
}
|
|
27925
27926
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
27926
27927
|
if (isChangingCase) return rename(src, dest, overwrite);
|
|
27927
27928
|
if (overwrite)
|
|
27928
27929
|
return removeSync2(dest), rename(src, dest, overwrite);
|
|
27929
|
-
if (
|
|
27930
|
+
if (fs4.existsSync(dest)) throw new Error("dest already exists.");
|
|
27930
27931
|
return rename(src, dest, overwrite);
|
|
27931
27932
|
}
|
|
27932
27933
|
function rename(src, dest, overwrite) {
|
|
27933
27934
|
try {
|
|
27934
|
-
|
|
27935
|
+
fs4.renameSync(src, dest);
|
|
27935
27936
|
} catch (err) {
|
|
27936
27937
|
if (err.code !== "EXDEV") throw err;
|
|
27937
27938
|
return moveAcrossDevice(src, dest, overwrite);
|
|
@@ -28093,8 +28094,8 @@ var require_getmacaddress_unix = __commonJS({
|
|
|
28093
28094
|
var require_getmacaddress = __commonJS({
|
|
28094
28095
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getmacaddress.js"(exports, module) {
|
|
28095
28096
|
init_cjs_shims();
|
|
28096
|
-
var
|
|
28097
|
-
switch (
|
|
28097
|
+
var os6 = __require("os"), _getMacAddress, _validIfaceRegExp = "^[a-z0-9]+$";
|
|
28098
|
+
switch (os6.platform()) {
|
|
28098
28099
|
case "win32":
|
|
28099
28100
|
_validIfaceRegExp = "^[a-z0-9 -]+$", _getMacAddress = require_getmacaddress_windows();
|
|
28100
28101
|
break;
|
|
@@ -28198,8 +28199,8 @@ var require_getallinterfaces_unix = __commonJS({
|
|
|
28198
28199
|
var require_getallinterfaces = __commonJS({
|
|
28199
28200
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/getallinterfaces.js"(exports, module) {
|
|
28200
28201
|
init_cjs_shims();
|
|
28201
|
-
var
|
|
28202
|
-
switch (
|
|
28202
|
+
var os6 = __require("os"), _getAllInterfaces;
|
|
28203
|
+
switch (os6.platform()) {
|
|
28203
28204
|
case "win32":
|
|
28204
28205
|
_getAllInterfaces = require_getallinterfaces_windows();
|
|
28205
28206
|
break;
|
|
@@ -28223,11 +28224,11 @@ var require_getallinterfaces = __commonJS({
|
|
|
28223
28224
|
var require_networkinterfaces = __commonJS({
|
|
28224
28225
|
"../../node_modules/.pnpm/macaddress@0.5.3/node_modules/macaddress/lib/networkinterfaces.js"(exports, module) {
|
|
28225
28226
|
init_cjs_shims();
|
|
28226
|
-
var
|
|
28227
|
+
var os6 = __require("os");
|
|
28227
28228
|
module.exports = function() {
|
|
28228
28229
|
var allAddresses = {};
|
|
28229
28230
|
try {
|
|
28230
|
-
var ifaces =
|
|
28231
|
+
var ifaces = os6.networkInterfaces();
|
|
28231
28232
|
} catch (e) {
|
|
28232
28233
|
if (e.syscall === "uv_interface_addresses")
|
|
28233
28234
|
return allAddresses;
|
|
@@ -28529,7 +28530,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
28529
28530
|
try {
|
|
28530
28531
|
await getAndSet();
|
|
28531
28532
|
} catch (error) {
|
|
28532
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
28533
|
+
let { sendErrorToBugsnag } = await import("./error-handler-O246E3LL.js");
|
|
28533
28534
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
28534
28535
|
}
|
|
28535
28536
|
}, durationStack = [];
|
|
@@ -28566,6 +28567,120 @@ var coreData = createRuntimeMetadataContainer({ cmd_all_timing_network_ms: 0, cm
|
|
|
28566
28567
|
|
|
28567
28568
|
// ../cli-kit/dist/private/node/ui/components/ConcurrentOutput.js
|
|
28568
28569
|
init_cjs_shims();
|
|
28570
|
+
|
|
28571
|
+
// ../cli-kit/dist/private/node/ui.js
|
|
28572
|
+
init_cjs_shims();
|
|
28573
|
+
|
|
28574
|
+
// ../cli-kit/dist/private/node/output.js
|
|
28575
|
+
init_cjs_shims();
|
|
28576
|
+
function withOrWithoutStyle(message) {
|
|
28577
|
+
return shouldDisplayColors() ? message : unstyled(message);
|
|
28578
|
+
}
|
|
28579
|
+
function consoleLog(message) {
|
|
28580
|
+
process.stdout.write(`${withOrWithoutStyle(message)}
|
|
28581
|
+
`);
|
|
28582
|
+
}
|
|
28583
|
+
function consoleWarn(message) {
|
|
28584
|
+
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
28585
|
+
`);
|
|
28586
|
+
}
|
|
28587
|
+
function output(content, logLevel = "info", logger = consoleWarn) {
|
|
28588
|
+
isUnitTest() && collectLog(logLevel, content);
|
|
28589
|
+
let message = stringifyMessage(content);
|
|
28590
|
+
outputWhereAppropriate(logLevel, logger, message);
|
|
28591
|
+
}
|
|
28592
|
+
|
|
28593
|
+
// ../cli-kit/dist/public/node/tree-kill.js
|
|
28594
|
+
init_cjs_shims();
|
|
28595
|
+
import { exec, spawn } from "child_process";
|
|
28596
|
+
function treeKill(pid = process.pid, killSignal = "SIGTERM", killRoot = !0, callback) {
|
|
28597
|
+
adaptedTreeKill(pid, killSignal, killRoot, callback ?? ((error) => {
|
|
28598
|
+
error && outputDebug(`Failed to kill process ${pid}: ${error}`);
|
|
28599
|
+
}));
|
|
28600
|
+
}
|
|
28601
|
+
function adaptedTreeKill(pid, killSignal, killRoot, callback) {
|
|
28602
|
+
let rootPid = typeof pid == "number" ? pid.toString() : pid;
|
|
28603
|
+
if (Number.isNaN(rootPid))
|
|
28604
|
+
if (callback) {
|
|
28605
|
+
callback(new Error("pid must be a number"));
|
|
28606
|
+
return;
|
|
28607
|
+
} else
|
|
28608
|
+
throw new Error("pid must be a number");
|
|
28609
|
+
let tree = {};
|
|
28610
|
+
tree[rootPid] = [];
|
|
28611
|
+
let pidsToProcess = /* @__PURE__ */ new Set();
|
|
28612
|
+
switch (pidsToProcess.add(rootPid), process.platform) {
|
|
28613
|
+
case "win32":
|
|
28614
|
+
exec(`taskkill /pid ${pid} /T /F`, callback);
|
|
28615
|
+
break;
|
|
28616
|
+
case "darwin":
|
|
28617
|
+
buildProcessTree(rootPid, tree, pidsToProcess, function(parentPid) {
|
|
28618
|
+
return spawn("pgrep", ["-lfP", parentPid]);
|
|
28619
|
+
}, function() {
|
|
28620
|
+
killAll(tree, killSignal, rootPid, killRoot, callback);
|
|
28621
|
+
});
|
|
28622
|
+
break;
|
|
28623
|
+
default:
|
|
28624
|
+
buildProcessTree(rootPid, tree, pidsToProcess, function(parentPid) {
|
|
28625
|
+
return spawn("ps", ["-o", "pid command", "--no-headers", "--ppid", parentPid]);
|
|
28626
|
+
}, function() {
|
|
28627
|
+
killAll(tree, killSignal, rootPid, killRoot, callback);
|
|
28628
|
+
});
|
|
28629
|
+
break;
|
|
28630
|
+
}
|
|
28631
|
+
}
|
|
28632
|
+
function killAll(tree, killSignal, rootPid, killRoot, callback) {
|
|
28633
|
+
let killed = /* @__PURE__ */ new Set();
|
|
28634
|
+
try {
|
|
28635
|
+
Object.keys(tree).forEach(function(pid) {
|
|
28636
|
+
tree[pid].forEach(function(pidpid) {
|
|
28637
|
+
killed.has(pidpid) || (killPid(pidpid, killSignal), killed.add(pidpid));
|
|
28638
|
+
}), pid === rootPid && killRoot && !killed.has(pid) && (killPid(pid, killSignal), killed.add(pid));
|
|
28639
|
+
});
|
|
28640
|
+
} catch (err) {
|
|
28641
|
+
if (callback) {
|
|
28642
|
+
callback(err);
|
|
28643
|
+
return;
|
|
28644
|
+
} else
|
|
28645
|
+
throw err;
|
|
28646
|
+
}
|
|
28647
|
+
callback && callback();
|
|
28648
|
+
}
|
|
28649
|
+
function killPid(pid, killSignal) {
|
|
28650
|
+
try {
|
|
28651
|
+
process.kill(parseInt(pid, 10), killSignal);
|
|
28652
|
+
} catch (err) {
|
|
28653
|
+
if (err.code !== "ESRCH")
|
|
28654
|
+
throw err;
|
|
28655
|
+
}
|
|
28656
|
+
}
|
|
28657
|
+
function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) {
|
|
28658
|
+
let ps = spawnChildProcessesList(parentPid), allData = "";
|
|
28659
|
+
ps.stdout?.on("data", function(data) {
|
|
28660
|
+
let dataStr = data.toString("ascii");
|
|
28661
|
+
allData += dataStr;
|
|
28662
|
+
});
|
|
28663
|
+
let onClose = (code) => {
|
|
28664
|
+
if (pidsToProcess.delete(parentPid), code !== 0) {
|
|
28665
|
+
if (pidsToProcess.size === 0) {
|
|
28666
|
+
cb();
|
|
28667
|
+
return;
|
|
28668
|
+
}
|
|
28669
|
+
return;
|
|
28670
|
+
}
|
|
28671
|
+
allData.trim().split(`
|
|
28672
|
+
`).forEach(function(line) {
|
|
28673
|
+
let match2 = line.match(/^(\d+)\s(.*)$/);
|
|
28674
|
+
if (match2) {
|
|
28675
|
+
let pid = match2[1], cmd = match2[2];
|
|
28676
|
+
tree[parentPid].push(pid), tree[pid] = [], outputDebug(`Killing process ${pid}: ${cmd}`), pidsToProcess.add(pid), buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb);
|
|
28677
|
+
}
|
|
28678
|
+
});
|
|
28679
|
+
};
|
|
28680
|
+
ps.on("close", onClose);
|
|
28681
|
+
}
|
|
28682
|
+
|
|
28683
|
+
// ../cli-kit/dist/private/node/ui.js
|
|
28569
28684
|
var import_react29 = __toESM(require_react(), 1);
|
|
28570
28685
|
|
|
28571
28686
|
// ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/index.js
|
|
@@ -30229,7 +30344,7 @@ var ESCAPES = /* @__PURE__ */ new Set([
|
|
|
30229
30344
|
for (; last > 0 && !(stringWidth(words[last - 1]) > 0); )
|
|
30230
30345
|
last--;
|
|
30231
30346
|
return last === words.length ? string : words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
30232
|
-
},
|
|
30347
|
+
}, exec2 = (string, columns, options = {}) => {
|
|
30233
30348
|
if (options.trim !== !1 && string.trim() === "")
|
|
30234
30349
|
return "";
|
|
30235
30350
|
let returnValue = "", escapeCode, escapeUrl, lengths = wordLengths(string), rows = [""];
|
|
@@ -30276,7 +30391,7 @@ function wrapAnsi(string, columns, options) {
|
|
|
30276
30391
|
return String(string).normalize().replaceAll(`\r
|
|
30277
30392
|
`, `
|
|
30278
30393
|
`).split(`
|
|
30279
|
-
`).map((line) =>
|
|
30394
|
+
`).map((line) => exec2(line, columns, options)).join(`
|
|
30280
30395
|
`);
|
|
30281
30396
|
}
|
|
30282
30397
|
|
|
@@ -30286,7 +30401,7 @@ import process4 from "node:process";
|
|
|
30286
30401
|
import { execFileSync } from "node:child_process";
|
|
30287
30402
|
import fs from "node:fs";
|
|
30288
30403
|
import tty from "node:tty";
|
|
30289
|
-
var defaultColumns = 80, defaultRows = 24,
|
|
30404
|
+
var defaultColumns = 80, defaultRows = 24, exec3 = (command, arguments_, { shell, env: env5 } = {}) => execFileSync(command, arguments_, {
|
|
30290
30405
|
encoding: "utf8",
|
|
30291
30406
|
stdio: ["ignore", "pipe", "ignore"],
|
|
30292
30407
|
timeout: 500,
|
|
@@ -30334,7 +30449,7 @@ var devTty = () => {
|
|
|
30334
30449
|
}
|
|
30335
30450
|
}, tput = () => {
|
|
30336
30451
|
try {
|
|
30337
|
-
let columns =
|
|
30452
|
+
let columns = exec3("tput", ["cols"], { env: { TERM: "dumb", ...process4.env } }), rows = exec3("tput", ["lines"], { env: { TERM: "dumb", ...process4.env } });
|
|
30338
30453
|
if (columns && rows)
|
|
30339
30454
|
return createIfNotDefault(columns, rows);
|
|
30340
30455
|
} catch {
|
|
@@ -30343,7 +30458,7 @@ var devTty = () => {
|
|
|
30343
30458
|
try {
|
|
30344
30459
|
if (!isForegroundProcess())
|
|
30345
30460
|
return;
|
|
30346
|
-
let size =
|
|
30461
|
+
let size = exec3("resize", ["-u"]).match(/\d+/g);
|
|
30347
30462
|
if (size.length === 2)
|
|
30348
30463
|
return createIfNotDefault(size[0], size[1]);
|
|
30349
30464
|
} catch {
|
|
@@ -31428,9 +31543,9 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
|
31428
31543
|
}
|
|
31429
31544
|
return /-256(color)?$/i.test(env3.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env3.TERM) || "COLORTERM" in env3 ? 1 : min;
|
|
31430
31545
|
}
|
|
31431
|
-
function createSupportsColor(
|
|
31432
|
-
let level = _supportsColor(
|
|
31433
|
-
streamIsTTY:
|
|
31546
|
+
function createSupportsColor(stream, options = {}) {
|
|
31547
|
+
let level = _supportsColor(stream, {
|
|
31548
|
+
streamIsTTY: stream && stream.isTTY,
|
|
31434
31549
|
...options
|
|
31435
31550
|
});
|
|
31436
31551
|
return translateLevel(level);
|
|
@@ -32694,12 +32809,12 @@ var cursorPositionChanged = (a, b) => a?.x !== b?.x || a?.y !== b?.y, buildCurso
|
|
|
32694
32809
|
|
|
32695
32810
|
// ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/log-update.js
|
|
32696
32811
|
var visibleLineCount = (lines, str) => str.endsWith(`
|
|
32697
|
-
`) ? lines.length - 1 : lines.length, createStandard = (
|
|
32812
|
+
`) ? lines.length - 1 : lines.length, createStandard = (stream, { showCursor = !1 } = {}) => {
|
|
32698
32813
|
let previousLineCount = 0, previousOutput = "", hasHiddenCursor = !1, cursorPosition, cursorDirty = !1, previousCursorPosition, cursorWasShown = !1, getActiveCursor = () => cursorDirty ? cursorPosition : void 0, hasChanges = (str, activeCursor) => {
|
|
32699
32814
|
let cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
32700
32815
|
return str !== previousOutput || cursorChanged;
|
|
32701
32816
|
}, render3 = (str) => {
|
|
32702
|
-
!showCursor && !hasHiddenCursor && (cli_cursor_default.hide(
|
|
32817
|
+
!showCursor && !hasHiddenCursor && (cli_cursor_default.hide(stream), hasHiddenCursor = !0);
|
|
32703
32818
|
let activeCursor = getActiveCursor();
|
|
32704
32819
|
cursorDirty = !1;
|
|
32705
32820
|
let cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
@@ -32708,7 +32823,7 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
32708
32823
|
let lines = str.split(`
|
|
32709
32824
|
`), visibleCount = visibleLineCount(lines, str), cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
32710
32825
|
if (str === previousOutput && cursorChanged)
|
|
32711
|
-
|
|
32826
|
+
stream.write(buildCursorOnlySequence({
|
|
32712
32827
|
cursorWasShown,
|
|
32713
32828
|
previousLineCount,
|
|
32714
32829
|
previousCursorPosition,
|
|
@@ -32718,30 +32833,30 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
32718
32833
|
else {
|
|
32719
32834
|
previousOutput = str;
|
|
32720
32835
|
let returnPrefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
32721
|
-
|
|
32836
|
+
stream.write(returnPrefix + base_exports.eraseLines(previousLineCount) + str + cursorSuffix), previousLineCount = lines.length;
|
|
32722
32837
|
}
|
|
32723
32838
|
return previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, cursorWasShown = activeCursor !== void 0, !0;
|
|
32724
32839
|
};
|
|
32725
32840
|
return render3.clear = () => {
|
|
32726
32841
|
let prefix = buildReturnToBottomPrefix(cursorWasShown, previousLineCount, previousCursorPosition);
|
|
32727
|
-
|
|
32842
|
+
stream.write(prefix + base_exports.eraseLines(previousLineCount)), previousOutput = "", previousLineCount = 0, previousCursorPosition = void 0, cursorWasShown = !1;
|
|
32728
32843
|
}, render3.done = () => {
|
|
32729
|
-
previousOutput = "", previousLineCount = 0, previousCursorPosition = void 0, cursorWasShown = !1, showCursor || (cli_cursor_default.show(
|
|
32844
|
+
previousOutput = "", previousLineCount = 0, previousCursorPosition = void 0, cursorWasShown = !1, showCursor || (cli_cursor_default.show(stream), hasHiddenCursor = !1);
|
|
32730
32845
|
}, render3.sync = (str) => {
|
|
32731
32846
|
let activeCursor = cursorDirty ? cursorPosition : void 0;
|
|
32732
32847
|
cursorDirty = !1;
|
|
32733
32848
|
let lines = str.split(`
|
|
32734
32849
|
`);
|
|
32735
|
-
previousOutput = str, previousLineCount = lines.length, !activeCursor && cursorWasShown &&
|
|
32850
|
+
previousOutput = str, previousLineCount = lines.length, !activeCursor && cursorWasShown && stream.write(hideCursorEscape), activeCursor && stream.write(buildCursorSuffix(visibleLineCount(lines, str), activeCursor)), previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, cursorWasShown = activeCursor !== void 0;
|
|
32736
32851
|
}, render3.setCursorPosition = (position) => {
|
|
32737
32852
|
cursorPosition = position, cursorDirty = !0;
|
|
32738
32853
|
}, render3.isCursorDirty = () => cursorDirty, render3.willRender = (str) => hasChanges(str, getActiveCursor()), render3;
|
|
32739
|
-
}, createIncremental = (
|
|
32854
|
+
}, createIncremental = (stream, { showCursor = !1 } = {}) => {
|
|
32740
32855
|
let previousLines = [], previousOutput = "", hasHiddenCursor = !1, cursorPosition, cursorDirty = !1, previousCursorPosition, cursorWasShown = !1, getActiveCursor = () => cursorDirty ? cursorPosition : void 0, hasChanges = (str, activeCursor) => {
|
|
32741
32856
|
let cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
32742
32857
|
return str !== previousOutput || cursorChanged;
|
|
32743
32858
|
}, render3 = (str) => {
|
|
32744
|
-
!showCursor && !hasHiddenCursor && (cli_cursor_default.hide(
|
|
32859
|
+
!showCursor && !hasHiddenCursor && (cli_cursor_default.hide(stream), hasHiddenCursor = !0);
|
|
32745
32860
|
let activeCursor = getActiveCursor();
|
|
32746
32861
|
cursorDirty = !1;
|
|
32747
32862
|
let cursorChanged = cursorPositionChanged(activeCursor, previousCursorPosition);
|
|
@@ -32750,7 +32865,7 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
32750
32865
|
let nextLines = str.split(`
|
|
32751
32866
|
`), visibleCount = visibleLineCount(nextLines, str), previousVisible = visibleLineCount(previousLines, previousOutput);
|
|
32752
32867
|
if (str === previousOutput && cursorChanged)
|
|
32753
|
-
return
|
|
32868
|
+
return stream.write(buildCursorOnlySequence({
|
|
32754
32869
|
cursorWasShown,
|
|
32755
32870
|
previousLineCount: previousLines.length,
|
|
32756
32871
|
previousCursorPosition,
|
|
@@ -32761,7 +32876,7 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
32761
32876
|
if (str === `
|
|
32762
32877
|
` || previousOutput.length === 0) {
|
|
32763
32878
|
let cursorSuffix2 = buildCursorSuffix(visibleCount, activeCursor);
|
|
32764
|
-
return
|
|
32879
|
+
return stream.write(returnPrefix + base_exports.eraseLines(previousLines.length) + str + cursorSuffix2), cursorWasShown = activeCursor !== void 0, previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, previousOutput = str, previousLines = nextLines, !0;
|
|
32765
32880
|
}
|
|
32766
32881
|
let hasTrailingNewline = str.endsWith(`
|
|
32767
32882
|
`), buffer = [];
|
|
@@ -32783,29 +32898,29 @@ var visibleLineCount = (lines, str) => str.endsWith(`
|
|
|
32783
32898
|
`));
|
|
32784
32899
|
}
|
|
32785
32900
|
let cursorSuffix = buildCursorSuffix(visibleCount, activeCursor);
|
|
32786
|
-
return buffer.push(cursorSuffix),
|
|
32901
|
+
return buffer.push(cursorSuffix), stream.write(buffer.join("")), cursorWasShown = activeCursor !== void 0, previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, previousOutput = str, previousLines = nextLines, !0;
|
|
32787
32902
|
};
|
|
32788
32903
|
return render3.clear = () => {
|
|
32789
32904
|
let prefix = buildReturnToBottomPrefix(cursorWasShown, previousLines.length, previousCursorPosition);
|
|
32790
|
-
|
|
32905
|
+
stream.write(prefix + base_exports.eraseLines(previousLines.length)), previousOutput = "", previousLines = [], previousCursorPosition = void 0, cursorWasShown = !1;
|
|
32791
32906
|
}, render3.done = () => {
|
|
32792
|
-
previousOutput = "", previousLines = [], previousCursorPosition = void 0, cursorWasShown = !1, showCursor || (cli_cursor_default.show(
|
|
32907
|
+
previousOutput = "", previousLines = [], previousCursorPosition = void 0, cursorWasShown = !1, showCursor || (cli_cursor_default.show(stream), hasHiddenCursor = !1);
|
|
32793
32908
|
}, render3.sync = (str) => {
|
|
32794
32909
|
let activeCursor = cursorDirty ? cursorPosition : void 0;
|
|
32795
32910
|
cursorDirty = !1;
|
|
32796
32911
|
let lines = str.split(`
|
|
32797
32912
|
`);
|
|
32798
|
-
previousOutput = str, previousLines = lines, !activeCursor && cursorWasShown &&
|
|
32913
|
+
previousOutput = str, previousLines = lines, !activeCursor && cursorWasShown && stream.write(hideCursorEscape), activeCursor && stream.write(buildCursorSuffix(visibleLineCount(lines, str), activeCursor)), previousCursorPosition = activeCursor ? { ...activeCursor } : void 0, cursorWasShown = activeCursor !== void 0;
|
|
32799
32914
|
}, render3.setCursorPosition = (position) => {
|
|
32800
32915
|
cursorPosition = position, cursorDirty = !0;
|
|
32801
32916
|
}, render3.isCursorDirty = () => cursorDirty, render3.willRender = (str) => hasChanges(str, getActiveCursor()), render3;
|
|
32802
|
-
}, create2 = (
|
|
32917
|
+
}, create2 = (stream, { showCursor = !1, incremental = !1 } = {}) => incremental ? createIncremental(stream, { showCursor }) : createStandard(stream, { showCursor }), logUpdate = { create: create2 }, log_update_default = logUpdate;
|
|
32803
32918
|
|
|
32804
32919
|
// ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/write-synchronized.js
|
|
32805
32920
|
init_cjs_shims();
|
|
32806
32921
|
var bsu = "\x1B[?2026h", esu = "\x1B[?2026l";
|
|
32807
|
-
function shouldSynchronize(
|
|
32808
|
-
return "isTTY" in
|
|
32922
|
+
function shouldSynchronize(stream) {
|
|
32923
|
+
return "isTTY" in stream && stream.isTTY === !0 && !is_in_ci_default;
|
|
32809
32924
|
}
|
|
32810
32925
|
|
|
32811
32926
|
// ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/instances.js
|
|
@@ -33093,7 +33208,7 @@ function Text({ color, backgroundColor, dimColor = !1, bold = !1, italic = !1, u
|
|
|
33093
33208
|
}
|
|
33094
33209
|
|
|
33095
33210
|
// ../../node_modules/.pnpm/ink@6.8.0_@types+react@18.3.12_react@19.2.4/node_modules/ink/build/components/ErrorOverview.js
|
|
33096
|
-
var cleanupPath = (
|
|
33211
|
+
var cleanupPath = (path7) => path7?.replace(`file://${cwd2()}/`, ""), stackUtils = new import_stack_utils.default({
|
|
33097
33212
|
cwd: cwd2(),
|
|
33098
33213
|
internals: import_stack_utils.default.nodeInternals()
|
|
33099
33214
|
});
|
|
@@ -33679,8 +33794,8 @@ var noop = () => {
|
|
|
33679
33794
|
`));
|
|
33680
33795
|
}
|
|
33681
33796
|
patchConsole() {
|
|
33682
|
-
this.options.debug || (this.restoreConsole = dist_default((
|
|
33683
|
-
|
|
33797
|
+
this.options.debug || (this.restoreConsole = dist_default((stream, data) => {
|
|
33798
|
+
stream === "stdout" && this.writeToStdout(data), stream === "stderr" && (data.startsWith("The above error occurred") || this.writeToStderr(data));
|
|
33684
33799
|
}));
|
|
33685
33800
|
}
|
|
33686
33801
|
initKittyKeyboard() {
|
|
@@ -34221,6 +34336,59 @@ var measureElement = (node) => ({
|
|
|
34221
34336
|
height: node.yogaNode?.getComputedHeight() ?? 0
|
|
34222
34337
|
}), measure_element_default = measureElement;
|
|
34223
34338
|
|
|
34339
|
+
// ../cli-kit/dist/private/node/ui.js
|
|
34340
|
+
import { EventEmitter as EventEmitter3 } from "events";
|
|
34341
|
+
var CompletionContext = (0, import_react29.createContext)(null);
|
|
34342
|
+
function useComplete() {
|
|
34343
|
+
let complete = (0, import_react29.useContext)(CompletionContext);
|
|
34344
|
+
if (!complete)
|
|
34345
|
+
throw new Error("useComplete() called outside InkLifecycleRoot");
|
|
34346
|
+
return complete;
|
|
34347
|
+
}
|
|
34348
|
+
function InkLifecycleRoot({ children }) {
|
|
34349
|
+
let { exit } = use_app_default(), [exitResult, setExitResult] = (0, import_react29.useState)(null), complete = (0, import_react29.useCallback)((error) => {
|
|
34350
|
+
setExitResult({ error });
|
|
34351
|
+
}, []);
|
|
34352
|
+
return (0, import_react29.useEffect)(() => {
|
|
34353
|
+
exitResult !== null && exit(exitResult.error);
|
|
34354
|
+
}, [exitResult, exit]), import_react29.default.createElement(CompletionContext.Provider, { value: complete }, children);
|
|
34355
|
+
}
|
|
34356
|
+
function renderOnce(element, { logLevel = "info", renderOptions }) {
|
|
34357
|
+
let { output: renderedString, unmount } = renderString(element, renderOptions);
|
|
34358
|
+
return renderedString && output(renderedString, logLevel), unmount(), renderedString;
|
|
34359
|
+
}
|
|
34360
|
+
async function render2(element, options) {
|
|
34361
|
+
let { waitUntilExit } = render_default(import_react29.default.createElement(InkLifecycleRoot, null, element), options);
|
|
34362
|
+
await waitUntilExit();
|
|
34363
|
+
}
|
|
34364
|
+
var Stdout = class extends EventEmitter3 {
|
|
34365
|
+
constructor(options) {
|
|
34366
|
+
super(), this.frames = [], this.write = (frame) => {
|
|
34367
|
+
this.frames.push(frame), frame !== `
|
|
34368
|
+
` && (this._lastFrame = frame);
|
|
34369
|
+
}, this.lastFrame = () => this._lastFrame, this.columns = options.columns ?? 80, this.rows = options.rows ?? 80;
|
|
34370
|
+
}
|
|
34371
|
+
}, renderString = (element, renderOptions) => {
|
|
34372
|
+
let columns = isUnitTest() ? 80 : process.stdout.columns, stdout = renderOptions?.stdout ?? new Stdout({ columns }), instance = render_default(element, {
|
|
34373
|
+
stdout,
|
|
34374
|
+
debug: !0,
|
|
34375
|
+
exitOnCtrlC: !1,
|
|
34376
|
+
patchConsole: !1
|
|
34377
|
+
});
|
|
34378
|
+
return {
|
|
34379
|
+
output: stdout.lastFrame(),
|
|
34380
|
+
unmount: instance.unmount
|
|
34381
|
+
};
|
|
34382
|
+
};
|
|
34383
|
+
function handleCtrlC(input, key, exit = () => {
|
|
34384
|
+
treeKill(process.pid, "SIGINT");
|
|
34385
|
+
}) {
|
|
34386
|
+
input === "c" && key.ctrl && exit();
|
|
34387
|
+
}
|
|
34388
|
+
|
|
34389
|
+
// ../cli-kit/dist/private/node/ui/components/ConcurrentOutput.js
|
|
34390
|
+
var import_react30 = __toESM(require_react(), 1);
|
|
34391
|
+
|
|
34224
34392
|
// ../../node_modules/.pnpm/figures@5.0.0/node_modules/figures/index.js
|
|
34225
34393
|
init_cjs_shims();
|
|
34226
34394
|
import process16 from "node:process";
|
|
@@ -34528,16 +34696,16 @@ function useConcurrentOutputContext(context, callback) {
|
|
|
34528
34696
|
return outputContextStore.run(context, callback);
|
|
34529
34697
|
}
|
|
34530
34698
|
var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestamps = !0, keepRunningAfterProcessesResolve = !1, useAlternativeColorPalette = !1 }) => {
|
|
34531
|
-
let [processOutput, setProcessOutput] = (0,
|
|
34699
|
+
let [processOutput, setProcessOutput] = (0, import_react30.useState)([]), [completionResult, setCompletionResult] = (0, import_react30.useState)(null), complete = useComplete(), concurrentColors = (0, import_react30.useMemo)(() => useAlternativeColorPalette ? ["#b994c3", "#e69e19", "#d17a73", "cyan", "magenta", "blue"] : ["yellow", "cyan", "magenta", "green", "blue"], [useAlternativeColorPalette]), calculatedPrefixColumnSize = (0, import_react30.useMemo)(() => {
|
|
34532
34700
|
let columnSize = prefixColumnSize ?? processes.reduce((maxPrefixLength, process24) => Math.max(maxPrefixLength, process24.prefix.length), 0);
|
|
34533
34701
|
return Math.min(columnSize, 25);
|
|
34534
34702
|
}, [processes, prefixColumnSize]), addPrefix = (prefix, prefixes) => {
|
|
34535
34703
|
let index = prefixes.indexOf(prefix);
|
|
34536
34704
|
return index !== -1 ? index : (prefixes.push(prefix), prefixes.length - 1);
|
|
34537
|
-
}, lineColor = (0,
|
|
34705
|
+
}, lineColor = (0, import_react30.useCallback)((index) => {
|
|
34538
34706
|
let colorIndex = index % concurrentColors.length;
|
|
34539
34707
|
return concurrentColors[colorIndex];
|
|
34540
|
-
}, [concurrentColors]), writableStream = (0,
|
|
34708
|
+
}, [concurrentColors]), writableStream = (0, import_react30.useCallback)((process24, prefixes) => new Writable({
|
|
34541
34709
|
write(chunk, _encoding, next) {
|
|
34542
34710
|
let context = outputContextStore.getStore(), prefix = context?.outputPrefix ?? process24.prefix, shouldStripAnsi = context?.stripAnsi ?? !0, log = chunk.toString("utf8").replace(/(\n)$/, ""), index = addPrefix(prefix, prefixes), lines = shouldStripAnsi ? stripAnsi(log).split(/\n/) : log.split(/\n/);
|
|
34543
34711
|
setProcessOutput((previousProcessOutput) => [
|
|
@@ -34550,27 +34718,29 @@ var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestam
|
|
|
34550
34718
|
]), next();
|
|
34551
34719
|
}
|
|
34552
34720
|
}), [lineColor]), formatPrefix = (prefix) => prefix.length > calculatedPrefixColumnSize ? prefix.substring(0, calculatedPrefixColumnSize) : `${" ".repeat(calculatedPrefixColumnSize - prefix.length)}${prefix}`;
|
|
34553
|
-
(0,
|
|
34721
|
+
(0, import_react30.useEffect)(() => {
|
|
34554
34722
|
(async () => {
|
|
34555
34723
|
let prefixes = [];
|
|
34556
34724
|
try {
|
|
34557
34725
|
await Promise.all(processes.map(async (process24) => {
|
|
34558
34726
|
let stdout = writableStream(process24, prefixes), stderr = writableStream(process24, prefixes);
|
|
34559
34727
|
await process24.action(stdout, stderr, abortSignal);
|
|
34560
|
-
})), keepRunningAfterProcessesResolve ||
|
|
34728
|
+
})), keepRunningAfterProcessesResolve || setCompletionResult({});
|
|
34561
34729
|
} catch (error) {
|
|
34562
|
-
keepRunningAfterProcessesResolve ||
|
|
34730
|
+
keepRunningAfterProcessesResolve || setCompletionResult({ error });
|
|
34563
34731
|
}
|
|
34564
34732
|
})();
|
|
34565
|
-
}, [abortSignal, processes, writableStream,
|
|
34733
|
+
}, [abortSignal, processes, writableStream, keepRunningAfterProcessesResolve]), (0, import_react30.useEffect)(() => {
|
|
34734
|
+
completionResult !== null && complete(completionResult.error);
|
|
34735
|
+
}, [completionResult, complete]);
|
|
34566
34736
|
let { lineVertical } = figures_default;
|
|
34567
|
-
return
|
|
34737
|
+
return import_react30.default.createElement(Static, { items: processOutput }, (chunk, index) => import_react30.default.createElement(Box_default, { flexDirection: "column", key: index }, chunk.lines.map((line, index2) => import_react30.default.createElement(
|
|
34568
34738
|
Box_default,
|
|
34569
34739
|
{ key: index2, flexDirection: "row" },
|
|
34570
|
-
|
|
34740
|
+
import_react30.default.createElement(
|
|
34571
34741
|
Text,
|
|
34572
34742
|
null,
|
|
34573
|
-
showTimestamps ?
|
|
34743
|
+
showTimestamps ? import_react30.default.createElement(
|
|
34574
34744
|
Text,
|
|
34575
34745
|
null,
|
|
34576
34746
|
currentTime(),
|
|
@@ -34578,8 +34748,8 @@ var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestam
|
|
|
34578
34748
|
lineVertical,
|
|
34579
34749
|
" "
|
|
34580
34750
|
) : null,
|
|
34581
|
-
|
|
34582
|
-
|
|
34751
|
+
import_react30.default.createElement(Text, { color: chunk.color }, formatPrefix(chunk.prefix)),
|
|
34752
|
+
import_react30.default.createElement(
|
|
34583
34753
|
Text,
|
|
34584
34754
|
null,
|
|
34585
34755
|
" ",
|
|
@@ -34591,153 +34761,6 @@ var ConcurrentOutput = ({ processes, prefixColumnSize, abortSignal, showTimestam
|
|
|
34591
34761
|
))));
|
|
34592
34762
|
};
|
|
34593
34763
|
|
|
34594
|
-
// ../cli-kit/dist/private/node/ui.js
|
|
34595
|
-
init_cjs_shims();
|
|
34596
|
-
|
|
34597
|
-
// ../cli-kit/dist/private/node/output.js
|
|
34598
|
-
init_cjs_shims();
|
|
34599
|
-
function withOrWithoutStyle(message) {
|
|
34600
|
-
return shouldDisplayColors() ? message : unstyled(message);
|
|
34601
|
-
}
|
|
34602
|
-
function consoleLog(message) {
|
|
34603
|
-
process.stdout.write(`${withOrWithoutStyle(message)}
|
|
34604
|
-
`);
|
|
34605
|
-
}
|
|
34606
|
-
function consoleWarn(message) {
|
|
34607
|
-
process.stderr.write(`${withOrWithoutStyle(message)}
|
|
34608
|
-
`);
|
|
34609
|
-
}
|
|
34610
|
-
function output(content, logLevel = "info", logger = consoleWarn) {
|
|
34611
|
-
isUnitTest() && collectLog(logLevel, content);
|
|
34612
|
-
let message = stringifyMessage(content);
|
|
34613
|
-
outputWhereAppropriate(logLevel, logger, message);
|
|
34614
|
-
}
|
|
34615
|
-
|
|
34616
|
-
// ../cli-kit/dist/public/node/tree-kill.js
|
|
34617
|
-
init_cjs_shims();
|
|
34618
|
-
import { exec as exec3, spawn } from "child_process";
|
|
34619
|
-
function treeKill(pid = process.pid, killSignal = "SIGTERM", killRoot = !0, callback) {
|
|
34620
|
-
adaptedTreeKill(pid, killSignal, killRoot, callback ?? ((error) => {
|
|
34621
|
-
error && outputDebug(`Failed to kill process ${pid}: ${error}`);
|
|
34622
|
-
}));
|
|
34623
|
-
}
|
|
34624
|
-
function adaptedTreeKill(pid, killSignal, killRoot, callback) {
|
|
34625
|
-
let rootPid = typeof pid == "number" ? pid.toString() : pid;
|
|
34626
|
-
if (Number.isNaN(rootPid))
|
|
34627
|
-
if (callback) {
|
|
34628
|
-
callback(new Error("pid must be a number"));
|
|
34629
|
-
return;
|
|
34630
|
-
} else
|
|
34631
|
-
throw new Error("pid must be a number");
|
|
34632
|
-
let tree = {};
|
|
34633
|
-
tree[rootPid] = [];
|
|
34634
|
-
let pidsToProcess = /* @__PURE__ */ new Set();
|
|
34635
|
-
switch (pidsToProcess.add(rootPid), process.platform) {
|
|
34636
|
-
case "win32":
|
|
34637
|
-
exec3(`taskkill /pid ${pid} /T /F`, callback);
|
|
34638
|
-
break;
|
|
34639
|
-
case "darwin":
|
|
34640
|
-
buildProcessTree(rootPid, tree, pidsToProcess, function(parentPid) {
|
|
34641
|
-
return spawn("pgrep", ["-lfP", parentPid]);
|
|
34642
|
-
}, function() {
|
|
34643
|
-
killAll(tree, killSignal, rootPid, killRoot, callback);
|
|
34644
|
-
});
|
|
34645
|
-
break;
|
|
34646
|
-
default:
|
|
34647
|
-
buildProcessTree(rootPid, tree, pidsToProcess, function(parentPid) {
|
|
34648
|
-
return spawn("ps", ["-o", "pid command", "--no-headers", "--ppid", parentPid]);
|
|
34649
|
-
}, function() {
|
|
34650
|
-
killAll(tree, killSignal, rootPid, killRoot, callback);
|
|
34651
|
-
});
|
|
34652
|
-
break;
|
|
34653
|
-
}
|
|
34654
|
-
}
|
|
34655
|
-
function killAll(tree, killSignal, rootPid, killRoot, callback) {
|
|
34656
|
-
let killed = /* @__PURE__ */ new Set();
|
|
34657
|
-
try {
|
|
34658
|
-
Object.keys(tree).forEach(function(pid) {
|
|
34659
|
-
tree[pid].forEach(function(pidpid) {
|
|
34660
|
-
killed.has(pidpid) || (killPid(pidpid, killSignal), killed.add(pidpid));
|
|
34661
|
-
}), pid === rootPid && killRoot && !killed.has(pid) && (killPid(pid, killSignal), killed.add(pid));
|
|
34662
|
-
});
|
|
34663
|
-
} catch (err) {
|
|
34664
|
-
if (callback) {
|
|
34665
|
-
callback(err);
|
|
34666
|
-
return;
|
|
34667
|
-
} else
|
|
34668
|
-
throw err;
|
|
34669
|
-
}
|
|
34670
|
-
callback && callback();
|
|
34671
|
-
}
|
|
34672
|
-
function killPid(pid, killSignal) {
|
|
34673
|
-
try {
|
|
34674
|
-
process.kill(parseInt(pid, 10), killSignal);
|
|
34675
|
-
} catch (err) {
|
|
34676
|
-
if (err.code !== "ESRCH")
|
|
34677
|
-
throw err;
|
|
34678
|
-
}
|
|
34679
|
-
}
|
|
34680
|
-
function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) {
|
|
34681
|
-
let ps = spawnChildProcessesList(parentPid), allData = "";
|
|
34682
|
-
ps.stdout?.on("data", function(data) {
|
|
34683
|
-
let dataStr = data.toString("ascii");
|
|
34684
|
-
allData += dataStr;
|
|
34685
|
-
});
|
|
34686
|
-
let onClose = (code) => {
|
|
34687
|
-
if (pidsToProcess.delete(parentPid), code !== 0) {
|
|
34688
|
-
if (pidsToProcess.size === 0) {
|
|
34689
|
-
cb();
|
|
34690
|
-
return;
|
|
34691
|
-
}
|
|
34692
|
-
return;
|
|
34693
|
-
}
|
|
34694
|
-
allData.trim().split(`
|
|
34695
|
-
`).forEach(function(line) {
|
|
34696
|
-
let match2 = line.match(/^(\d+)\s(.*)$/);
|
|
34697
|
-
if (match2) {
|
|
34698
|
-
let pid = match2[1], cmd = match2[2];
|
|
34699
|
-
tree[parentPid].push(pid), tree[pid] = [], outputDebug(`Killing process ${pid}: ${cmd}`), pidsToProcess.add(pid), buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb);
|
|
34700
|
-
}
|
|
34701
|
-
});
|
|
34702
|
-
};
|
|
34703
|
-
ps.on("close", onClose);
|
|
34704
|
-
}
|
|
34705
|
-
|
|
34706
|
-
// ../cli-kit/dist/private/node/ui.js
|
|
34707
|
-
import { EventEmitter as EventEmitter3 } from "events";
|
|
34708
|
-
function renderOnce(element, { logLevel = "info", renderOptions }) {
|
|
34709
|
-
let { output: renderedString, unmount } = renderString(element, renderOptions);
|
|
34710
|
-
return renderedString && output(renderedString, logLevel), unmount(), renderedString;
|
|
34711
|
-
}
|
|
34712
|
-
async function render2(element, options) {
|
|
34713
|
-
let { waitUntilExit } = render_default(element, options);
|
|
34714
|
-
return await waitUntilExit(), new Promise((resolve) => setImmediate(resolve));
|
|
34715
|
-
}
|
|
34716
|
-
var Stdout = class extends EventEmitter3 {
|
|
34717
|
-
constructor(options) {
|
|
34718
|
-
super(), this.frames = [], this.write = (frame) => {
|
|
34719
|
-
this.frames.push(frame), frame !== `
|
|
34720
|
-
` && (this._lastFrame = frame);
|
|
34721
|
-
}, this.lastFrame = () => this._lastFrame, this.columns = options.columns ?? 80, this.rows = options.rows ?? 80;
|
|
34722
|
-
}
|
|
34723
|
-
}, renderString = (element, renderOptions) => {
|
|
34724
|
-
let columns = isUnitTest() ? 80 : process.stdout.columns, stdout = renderOptions?.stdout ?? new Stdout({ columns }), instance = render_default(element, {
|
|
34725
|
-
stdout,
|
|
34726
|
-
debug: !0,
|
|
34727
|
-
exitOnCtrlC: !1,
|
|
34728
|
-
patchConsole: !1
|
|
34729
|
-
});
|
|
34730
|
-
return {
|
|
34731
|
-
output: stdout.lastFrame(),
|
|
34732
|
-
unmount: instance.unmount
|
|
34733
|
-
};
|
|
34734
|
-
};
|
|
34735
|
-
function handleCtrlC(input, key, exit = () => {
|
|
34736
|
-
treeKill(process.pid, "SIGINT");
|
|
34737
|
-
}) {
|
|
34738
|
-
input === "c" && key.ctrl && exit();
|
|
34739
|
-
}
|
|
34740
|
-
|
|
34741
34764
|
// ../cli-kit/dist/private/node/ui/alert.js
|
|
34742
34765
|
init_cjs_shims();
|
|
34743
34766
|
|
|
@@ -34749,10 +34772,10 @@ init_cjs_shims();
|
|
|
34749
34772
|
|
|
34750
34773
|
// ../cli-kit/dist/private/node/ui/hooks/use-layout.js
|
|
34751
34774
|
init_cjs_shims();
|
|
34752
|
-
var
|
|
34775
|
+
var import_react31 = __toESM(require_react(), 1), MIN_FULL_WIDTH = 20, MIN_FRACTION_WIDTH = 80;
|
|
34753
34776
|
function useLayout() {
|
|
34754
|
-
let { stdout } = use_stdout_default(), [layout, setLayout] = (0,
|
|
34755
|
-
return (0,
|
|
34777
|
+
let { stdout } = use_stdout_default(), [layout, setLayout] = (0, import_react31.useState)(calculateLayout(stdout));
|
|
34778
|
+
return (0, import_react31.useLayoutEffect)(() => {
|
|
34756
34779
|
if (!stdout)
|
|
34757
34780
|
return;
|
|
34758
34781
|
function onResize() {
|
|
@@ -34778,10 +34801,10 @@ function column({ fullWidth, fraction, minWidth }) {
|
|
|
34778
34801
|
|
|
34779
34802
|
// ../cli-kit/dist/private/node/ui/contexts/LinksContext.js
|
|
34780
34803
|
init_cjs_shims();
|
|
34781
|
-
var
|
|
34804
|
+
var import_react32 = __toESM(require_react(), 1), LinksContext = import_react32.default.createContext(null);
|
|
34782
34805
|
|
|
34783
34806
|
// ../cli-kit/dist/private/node/ui/components/Banner.js
|
|
34784
|
-
var
|
|
34807
|
+
var import_react33 = __toESM(require_react(), 1);
|
|
34785
34808
|
function typeToColor(type) {
|
|
34786
34809
|
return {
|
|
34787
34810
|
success: "green",
|
|
@@ -34792,14 +34815,14 @@ function typeToColor(type) {
|
|
|
34792
34815
|
}[type];
|
|
34793
34816
|
}
|
|
34794
34817
|
var Footnotes = () => {
|
|
34795
|
-
let linksContext = (0,
|
|
34818
|
+
let linksContext = (0, import_react33.useContext)(LinksContext);
|
|
34796
34819
|
if (linksContext === null || linksContext.links.current === null)
|
|
34797
34820
|
return null;
|
|
34798
34821
|
let links = linksContext.links.current, linkIds = Object.keys(links);
|
|
34799
|
-
return linkIds.length > 0 ?
|
|
34822
|
+
return linkIds.length > 0 ? import_react33.default.createElement(Box_default, { marginBottom: 1, marginTop: -1, flexDirection: "column" }, linkIds.map((id) => import_react33.default.createElement(Text, { key: id }, `[${id}] ${links[id]?.url}`))) : null;
|
|
34800
34823
|
}, BoxWithBorder = ({ type, children }) => {
|
|
34801
|
-
let { twoThirds } = useLayout(), links = (0,
|
|
34802
|
-
return
|
|
34824
|
+
let { twoThirds } = useLayout(), links = (0, import_react33.useRef)({});
|
|
34825
|
+
return import_react33.default.createElement(
|
|
34803
34826
|
LinksContext.Provider,
|
|
34804
34827
|
{ value: {
|
|
34805
34828
|
links,
|
|
@@ -34814,38 +34837,38 @@ var Footnotes = () => {
|
|
|
34814
34837
|
}, newId;
|
|
34815
34838
|
}
|
|
34816
34839
|
} },
|
|
34817
|
-
|
|
34840
|
+
import_react33.default.createElement(
|
|
34818
34841
|
Box_default,
|
|
34819
34842
|
{ width: twoThirds, marginBottom: 1, borderStyle: "round", flexDirection: "column", borderColor: typeToColor(type) },
|
|
34820
|
-
|
|
34843
|
+
import_react33.default.createElement(
|
|
34821
34844
|
Box_default,
|
|
34822
34845
|
{ marginTop: -1, marginLeft: 1 },
|
|
34823
|
-
|
|
34846
|
+
import_react33.default.createElement(Text, null, ` ${type.replace(/_/g, " ")} `)
|
|
34824
34847
|
),
|
|
34825
|
-
|
|
34848
|
+
import_react33.default.createElement(Box_default, { flexDirection: "column", paddingY: 1, paddingX: 2, gap: 1 }, children)
|
|
34826
34849
|
),
|
|
34827
|
-
|
|
34850
|
+
import_react33.default.createElement(Footnotes, null)
|
|
34828
34851
|
);
|
|
34829
34852
|
}, BoxWithTopBottomLines = ({ type, children }) => {
|
|
34830
34853
|
let { twoThirds } = useLayout(), topLineAfterTypeLength = twoThirds - 2 - type.length - 2;
|
|
34831
|
-
return topLineAfterTypeLength < 0 && (topLineAfterTypeLength = 0),
|
|
34854
|
+
return topLineAfterTypeLength < 0 && (topLineAfterTypeLength = 0), import_react33.default.createElement(
|
|
34832
34855
|
Box_default,
|
|
34833
34856
|
{ flexDirection: "column", marginBottom: 1, gap: 1 },
|
|
34834
|
-
|
|
34857
|
+
import_react33.default.createElement(
|
|
34835
34858
|
Text,
|
|
34836
34859
|
null,
|
|
34837
|
-
|
|
34838
|
-
|
|
34839
|
-
|
|
34860
|
+
import_react33.default.createElement(Text, { color: typeToColor(type) }, "\u2500".repeat(2)),
|
|
34861
|
+
import_react33.default.createElement(Text, null, ` ${type.replace(/_/g, " ")} `),
|
|
34862
|
+
import_react33.default.createElement(Text, { color: typeToColor(type) }, "\u2500".repeat(topLineAfterTypeLength))
|
|
34840
34863
|
),
|
|
34841
34864
|
children,
|
|
34842
|
-
|
|
34865
|
+
import_react33.default.createElement(Text, { color: typeToColor(type) }, "\u2500".repeat(twoThirds))
|
|
34843
34866
|
);
|
|
34844
|
-
}, Banner = ({ children, ...props }) => props.type === "external_error" ?
|
|
34867
|
+
}, Banner = ({ children, ...props }) => props.type === "external_error" ? import_react33.default.createElement(BoxWithTopBottomLines, props, children) : import_react33.default.createElement(BoxWithBorder, props, children);
|
|
34845
34868
|
|
|
34846
34869
|
// ../cli-kit/dist/private/node/ui/components/Link.js
|
|
34847
34870
|
init_cjs_shims();
|
|
34848
|
-
var
|
|
34871
|
+
var import_react34 = __toESM(require_react(), 1);
|
|
34849
34872
|
|
|
34850
34873
|
// ../../node_modules/.pnpm/ansi-escapes@6.2.1/node_modules/ansi-escapes/index.js
|
|
34851
34874
|
init_cjs_shims();
|
|
@@ -35134,9 +35157,9 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
|
35134
35157
|
}
|
|
35135
35158
|
return /-256(color)?$/i.test(env4.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env4.TERM) || "COLORTERM" in env4 ? 1 : min;
|
|
35136
35159
|
}
|
|
35137
|
-
function createSupportsColor2(
|
|
35138
|
-
let level = _supportsColor2(
|
|
35139
|
-
streamIsTTY:
|
|
35160
|
+
function createSupportsColor2(stream, options = {}) {
|
|
35161
|
+
let level = _supportsColor2(stream, {
|
|
35162
|
+
streamIsTTY: stream && stream.isTTY,
|
|
35140
35163
|
...options
|
|
35141
35164
|
});
|
|
35142
35165
|
return translateLevel2(level);
|
|
@@ -35280,8 +35303,8 @@ function link2(label, url, linksContext) {
|
|
|
35280
35303
|
return ansi_escapes_default.link(label ?? url, url);
|
|
35281
35304
|
}
|
|
35282
35305
|
var Link = ({ label, url }) => {
|
|
35283
|
-
let linksContext = (0,
|
|
35284
|
-
return
|
|
35306
|
+
let linksContext = (0, import_react34.useContext)(LinksContext);
|
|
35307
|
+
return import_react34.default.createElement(Text, null, link2(label, url, linksContext));
|
|
35285
35308
|
};
|
|
35286
35309
|
|
|
35287
35310
|
// ../cli-kit/dist/private/node/ui/components/List.js
|
|
@@ -35292,7 +35315,7 @@ init_cjs_shims();
|
|
|
35292
35315
|
|
|
35293
35316
|
// ../cli-kit/dist/private/node/ui/components/Command.js
|
|
35294
35317
|
init_cjs_shims();
|
|
35295
|
-
var
|
|
35318
|
+
var import_react35 = __toESM(require_react(), 1), Command = ({ command }) => import_react35.default.createElement(
|
|
35296
35319
|
Text,
|
|
35297
35320
|
{ color: "magentaBright" },
|
|
35298
35321
|
"`",
|
|
@@ -35302,18 +35325,18 @@ var import_react34 = __toESM(require_react(), 1), Command = ({ command }) => imp
|
|
|
35302
35325
|
|
|
35303
35326
|
// ../cli-kit/dist/private/node/ui/components/UserInput.js
|
|
35304
35327
|
init_cjs_shims();
|
|
35305
|
-
var
|
|
35328
|
+
var import_react36 = __toESM(require_react(), 1), UserInput = ({ userInput }) => import_react36.default.createElement(Text, { color: "cyan" }, userInput);
|
|
35306
35329
|
|
|
35307
35330
|
// ../cli-kit/dist/private/node/ui/components/FilePath.js
|
|
35308
35331
|
init_cjs_shims();
|
|
35309
|
-
var
|
|
35332
|
+
var import_react37 = __toESM(require_react(), 1), FilePath = ({ filePath }) => import_react37.default.createElement(Text, { italic: !0 }, filePath);
|
|
35310
35333
|
|
|
35311
35334
|
// ../cli-kit/dist/private/node/ui/components/Subdued.js
|
|
35312
35335
|
init_cjs_shims();
|
|
35313
|
-
var
|
|
35336
|
+
var import_react38 = __toESM(require_react(), 1), Subdued = ({ subdued }) => import_react38.default.createElement(Text, { dimColor: !0 }, subdued);
|
|
35314
35337
|
|
|
35315
35338
|
// ../cli-kit/dist/private/node/ui/components/TokenizedText.js
|
|
35316
|
-
var
|
|
35339
|
+
var import_react39 = __toESM(require_react(), 1);
|
|
35317
35340
|
function tokenToBlock(token) {
|
|
35318
35341
|
return {
|
|
35319
35342
|
display: typeof token != "string" && "list" in token ? "block" : "inline",
|
|
@@ -35335,44 +35358,44 @@ function splitByDisplayType(acc, item) {
|
|
|
35335
35358
|
}
|
|
35336
35359
|
return acc;
|
|
35337
35360
|
}
|
|
35338
|
-
var InlineBlocks = ({ blocks }) =>
|
|
35361
|
+
var InlineBlocks = ({ blocks }) => import_react39.default.createElement(Text, null, blocks.map((block, blockIndex) => import_react39.default.createElement(
|
|
35339
35362
|
Text,
|
|
35340
35363
|
{ key: blockIndex },
|
|
35341
|
-
blockIndex !== 0 && !(typeof block.value != "string" && "char" in block.value) &&
|
|
35342
|
-
|
|
35364
|
+
blockIndex !== 0 && !(typeof block.value != "string" && "char" in block.value) && import_react39.default.createElement(Text, null, " "),
|
|
35365
|
+
import_react39.default.createElement(TokenizedText, { item: block.value })
|
|
35343
35366
|
))), TokenizedText = ({ item }) => {
|
|
35344
35367
|
if (typeof item == "string")
|
|
35345
|
-
return
|
|
35368
|
+
return import_react39.default.createElement(Text, null, item);
|
|
35346
35369
|
if ("command" in item)
|
|
35347
|
-
return
|
|
35370
|
+
return import_react39.default.createElement(Command, { command: item.command });
|
|
35348
35371
|
if ("link" in item)
|
|
35349
|
-
return
|
|
35372
|
+
return import_react39.default.createElement(Link, { ...item.link });
|
|
35350
35373
|
if ("char" in item)
|
|
35351
|
-
return
|
|
35374
|
+
return import_react39.default.createElement(Text, null, item.char[0]);
|
|
35352
35375
|
if ("userInput" in item)
|
|
35353
|
-
return
|
|
35376
|
+
return import_react39.default.createElement(UserInput, { userInput: item.userInput });
|
|
35354
35377
|
if ("subdued" in item)
|
|
35355
|
-
return
|
|
35378
|
+
return import_react39.default.createElement(Subdued, { subdued: item.subdued });
|
|
35356
35379
|
if ("filePath" in item)
|
|
35357
|
-
return
|
|
35380
|
+
return import_react39.default.createElement(FilePath, { filePath: item.filePath });
|
|
35358
35381
|
if ("list" in item)
|
|
35359
|
-
return
|
|
35382
|
+
return import_react39.default.createElement(List, { ...item.list });
|
|
35360
35383
|
if ("bold" in item)
|
|
35361
|
-
return
|
|
35384
|
+
return import_react39.default.createElement(Text, { bold: !0 }, item.bold);
|
|
35362
35385
|
if ("info" in item)
|
|
35363
|
-
return
|
|
35386
|
+
return import_react39.default.createElement(Text, { color: "blue" }, item.info);
|
|
35364
35387
|
if ("warn" in item)
|
|
35365
|
-
return
|
|
35388
|
+
return import_react39.default.createElement(Text, { color: "yellow" }, item.warn);
|
|
35366
35389
|
if ("error" in item)
|
|
35367
|
-
return
|
|
35390
|
+
return import_react39.default.createElement(Text, { color: "red" }, item.error);
|
|
35368
35391
|
{
|
|
35369
35392
|
let groupedItems = item.map(tokenToBlock).reduce(splitByDisplayType, []);
|
|
35370
|
-
return groupedItems.length === 1 && groupedItems[0].every((item2) => item2.display === "inline") ?
|
|
35393
|
+
return groupedItems.length === 1 && groupedItems[0].every((item2) => item2.display === "inline") ? import_react39.default.createElement(InlineBlocks, { blocks: groupedItems[0] }) : import_react39.default.createElement(Box_default, { flexDirection: "column" }, groupedItems.map((items, groupIndex) => items[0].display === "inline" ? import_react39.default.createElement(InlineBlocks, { blocks: items, key: groupIndex }) : import_react39.default.createElement(List, { key: groupIndex, ...items[0].value.list })));
|
|
35371
35394
|
}
|
|
35372
35395
|
};
|
|
35373
35396
|
|
|
35374
35397
|
// ../cli-kit/dist/private/node/ui/components/List.js
|
|
35375
|
-
var
|
|
35398
|
+
var import_react40 = __toESM(require_react(), 1), DOT = "\u2022", List = ({ title, items, margin = !0, ordered = !1, color, bullet = DOT }) => {
|
|
35376
35399
|
function isCustomListItem(item) {
|
|
35377
35400
|
return item.item !== void 0;
|
|
35378
35401
|
}
|
|
@@ -35389,68 +35412,68 @@ var import_react39 = __toESM(require_react(), 1), DOT = "\u2022", List = ({ titl
|
|
|
35389
35412
|
...item
|
|
35390
35413
|
} : resolvedItem;
|
|
35391
35414
|
}
|
|
35392
|
-
let ListItem = ({ item, color: color2, bullet: bullet2, index, ordered: ordered2 }) =>
|
|
35415
|
+
let ListItem = ({ item, color: color2, bullet: bullet2, index, ordered: ordered2 }) => import_react40.default.createElement(
|
|
35393
35416
|
Box_default,
|
|
35394
35417
|
{ key: index, marginLeft: margin ? 2 : 0 },
|
|
35395
|
-
|
|
35396
|
-
|
|
35418
|
+
import_react40.default.createElement(Text, { color: color2 }, ordered2 ? `${index + 1}.` : bullet2),
|
|
35419
|
+
import_react40.default.createElement(
|
|
35397
35420
|
Box_default,
|
|
35398
35421
|
{ flexGrow: 1, marginLeft: 1 },
|
|
35399
|
-
|
|
35422
|
+
import_react40.default.createElement(
|
|
35400
35423
|
Text,
|
|
35401
35424
|
{ color: color2 },
|
|
35402
|
-
|
|
35425
|
+
import_react40.default.createElement(TokenizedText, { item })
|
|
35403
35426
|
)
|
|
35404
35427
|
)
|
|
35405
35428
|
);
|
|
35406
|
-
return
|
|
35429
|
+
return import_react40.default.createElement(
|
|
35407
35430
|
Box_default,
|
|
35408
35431
|
{ flexDirection: "column" },
|
|
35409
|
-
title ?
|
|
35432
|
+
title ? import_react40.default.createElement(
|
|
35410
35433
|
Text,
|
|
35411
35434
|
{ color },
|
|
35412
|
-
|
|
35435
|
+
import_react40.default.createElement(TokenizedText, { item: title })
|
|
35413
35436
|
) : null,
|
|
35414
|
-
items.map(resolveListItem).map(({ index, item, color: color2, bullet: bullet2, ordered: ordered2 }) =>
|
|
35437
|
+
items.map(resolveListItem).map(({ index, item, color: color2, bullet: bullet2, ordered: ordered2 }) => import_react40.default.createElement(ListItem, { key: index, item, color: color2, bullet: bullet2, index, ordered: ordered2 }))
|
|
35415
35438
|
);
|
|
35416
35439
|
};
|
|
35417
35440
|
|
|
35418
35441
|
// ../cli-kit/dist/private/node/ui/components/TabularData.js
|
|
35419
35442
|
init_cjs_shims();
|
|
35420
|
-
var
|
|
35443
|
+
var import_react41 = __toESM(require_react(), 1), TabularData = ({ tabularData: data, firstColumnSubdued }) => {
|
|
35421
35444
|
let columnWidths = data.reduce((acc, row) => (row.forEach((cell, index) => {
|
|
35422
35445
|
acc[index] = Math.max(acc[index] ?? 0, unstyled(tokenItemToString(cell)).length);
|
|
35423
35446
|
}), acc), []);
|
|
35424
|
-
return
|
|
35447
|
+
return import_react41.default.createElement(Box_default, { flexDirection: "column" }, data.map((row, index) => import_react41.default.createElement(Box_default, { key: index, flexDirection: "row", gap: 2 }, row.map((cell, index2) => import_react41.default.createElement(
|
|
35425
35448
|
Box_default,
|
|
35426
35449
|
{ key: index2, width: columnWidths[index2] ?? 0, flexShrink: index2 === 0 ? 0 : 1 },
|
|
35427
|
-
|
|
35450
|
+
import_react41.default.createElement(TokenizedText, { item: index2 === 0 && firstColumnSubdued && typeof cell == "string" ? { subdued: cell } : cell })
|
|
35428
35451
|
)))));
|
|
35429
35452
|
};
|
|
35430
35453
|
|
|
35431
35454
|
// ../cli-kit/dist/private/node/ui/components/Alert.js
|
|
35432
|
-
var
|
|
35455
|
+
var import_react42 = __toESM(require_react(), 1), Alert = ({ type, headline, body, nextSteps, reference, link: link3, customSections, orderedNextSteps = !1 }) => import_react42.default.createElement(
|
|
35433
35456
|
Banner,
|
|
35434
35457
|
{ type },
|
|
35435
|
-
headline ?
|
|
35458
|
+
headline ? import_react42.default.createElement(
|
|
35436
35459
|
Text,
|
|
35437
35460
|
{ bold: !0 },
|
|
35438
|
-
|
|
35461
|
+
import_react42.default.createElement(TokenizedText, { item: headline })
|
|
35439
35462
|
) : null,
|
|
35440
|
-
body ?
|
|
35441
|
-
nextSteps && nextSteps.length > 0 ?
|
|
35442
|
-
reference && reference.length > 0 ?
|
|
35443
|
-
link3 ?
|
|
35444
|
-
customSections && customSections.length > 0 ?
|
|
35463
|
+
body ? import_react42.default.createElement(TokenizedText, { item: body }) : null,
|
|
35464
|
+
nextSteps && nextSteps.length > 0 ? import_react42.default.createElement(List, { title: "Next steps", items: nextSteps, ordered: orderedNextSteps }) : null,
|
|
35465
|
+
reference && reference.length > 0 ? import_react42.default.createElement(List, { title: "Reference", items: reference }) : null,
|
|
35466
|
+
link3 ? import_react42.default.createElement(Link, { url: link3.url, label: link3.label }) : null,
|
|
35467
|
+
customSections && customSections.length > 0 ? import_react42.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, customSections.map((section, index) => import_react42.default.createElement(
|
|
35445
35468
|
Box_default,
|
|
35446
35469
|
{ key: index, flexDirection: "column" },
|
|
35447
|
-
section.title ?
|
|
35448
|
-
typeof section.body == "object" && "tabularData" in section.body ?
|
|
35470
|
+
section.title ? import_react42.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
35471
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react42.default.createElement(TabularData, { ...section.body }) : import_react42.default.createElement(TokenizedText, { item: section.body })
|
|
35449
35472
|
))) : null
|
|
35450
35473
|
);
|
|
35451
35474
|
|
|
35452
35475
|
// ../cli-kit/dist/private/node/ui/alert.js
|
|
35453
|
-
var
|
|
35476
|
+
var import_react43 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
35454
35477
|
info: "info",
|
|
35455
35478
|
warning: "warn",
|
|
35456
35479
|
success: "info",
|
|
@@ -35458,54 +35481,54 @@ var import_react42 = __toESM(require_react(), 1), typeToLogLevel = {
|
|
|
35458
35481
|
};
|
|
35459
35482
|
function alert({ type, headline, body, nextSteps, reference, link: link3, customSections, orderedNextSteps = !1, renderOptions }) {
|
|
35460
35483
|
let { type: alertType, ..._eventProps } = arguments[0];
|
|
35461
|
-
return renderOnce(
|
|
35484
|
+
return renderOnce(import_react43.default.createElement(Alert, { type, headline, body, nextSteps, reference, link: link3, orderedNextSteps, customSections }), { logLevel: typeToLogLevel[type], renderOptions });
|
|
35462
35485
|
}
|
|
35463
35486
|
|
|
35464
35487
|
// ../cli-kit/dist/private/node/ui/components/FatalError.js
|
|
35465
35488
|
init_cjs_shims();
|
|
35466
|
-
var
|
|
35489
|
+
var import_react44 = __toESM(require_react(), 1), import_stacktracey = __toESM(require_stacktracey(), 1), FatalError = ({ error }) => {
|
|
35467
35490
|
let stack, tool;
|
|
35468
35491
|
return error instanceof BugError && (stack = new import_stacktracey.default(error), stack.items.forEach((item) => {
|
|
35469
35492
|
item.file = cleanSingleStackTracePath(item.file);
|
|
35470
35493
|
}), stack = stack.withSources(), stack = stack.filter((entry) => !entry.file.includes("@oclif/core")).map((item) => {
|
|
35471
35494
|
let fileShortComponents = item.fileShort.split("packages/");
|
|
35472
35495
|
return item.fileShort = fileShortComponents.length === 2 ? fileShortComponents[1] : fileShortComponents[0], item;
|
|
35473
|
-
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`),
|
|
35496
|
+
})), error instanceof ExternalError && (tool = `${error.command} ${error.args.join(" ")}`), import_react44.default.createElement(
|
|
35474
35497
|
Banner,
|
|
35475
35498
|
{ type: tool ? "external_error" : "error" },
|
|
35476
|
-
tool ?
|
|
35499
|
+
tool ? import_react44.default.createElement(
|
|
35477
35500
|
Text,
|
|
35478
35501
|
null,
|
|
35479
35502
|
"Error coming from ",
|
|
35480
|
-
|
|
35503
|
+
import_react44.default.createElement(Command, { command: tool })
|
|
35481
35504
|
) : null,
|
|
35482
|
-
error.formattedMessage ?
|
|
35483
|
-
error.tryMessage ?
|
|
35484
|
-
error.nextSteps && error.nextSteps.length > 0 ?
|
|
35485
|
-
error.customSections && error.customSections.length > 0 ?
|
|
35505
|
+
error.formattedMessage ? import_react44.default.createElement(TokenizedText, { item: error.formattedMessage }) : import_react44.default.createElement(Text, null, error.message),
|
|
35506
|
+
error.tryMessage ? import_react44.default.createElement(TokenizedText, { item: error.tryMessage }) : null,
|
|
35507
|
+
error.nextSteps && error.nextSteps.length > 0 ? import_react44.default.createElement(List, { title: "Next steps", items: error.nextSteps }) : null,
|
|
35508
|
+
error.customSections && error.customSections.length > 0 ? import_react44.default.createElement(Box_default, { flexDirection: "column", gap: 1 }, error.customSections.map((section, index) => import_react44.default.createElement(
|
|
35486
35509
|
Box_default,
|
|
35487
35510
|
{ key: index, flexDirection: "column" },
|
|
35488
|
-
section.title ?
|
|
35489
|
-
typeof section.body == "object" && "tabularData" in section.body ?
|
|
35511
|
+
section.title ? import_react44.default.createElement(Text, { bold: !0 }, section.title) : null,
|
|
35512
|
+
typeof section.body == "object" && "tabularData" in section.body ? import_react44.default.createElement(TabularData, { ...section.body }) : import_react44.default.createElement(TokenizedText, { item: section.body })
|
|
35490
35513
|
))) : null,
|
|
35491
|
-
stack && stack.items.length !== 0 ?
|
|
35514
|
+
stack && stack.items.length !== 0 ? import_react44.default.createElement(
|
|
35492
35515
|
Box_default,
|
|
35493
35516
|
{ flexDirection: "column" },
|
|
35494
|
-
|
|
35495
|
-
stack.items.map((item, index) =>
|
|
35517
|
+
import_react44.default.createElement(Text, null, "To investigate the issue, examine this stack trace:"),
|
|
35518
|
+
stack.items.map((item, index) => import_react44.default.createElement(
|
|
35496
35519
|
Box_default,
|
|
35497
35520
|
{ flexDirection: "column", key: index, paddingLeft: 2 },
|
|
35498
|
-
|
|
35521
|
+
import_react44.default.createElement(
|
|
35499
35522
|
Text,
|
|
35500
35523
|
null,
|
|
35501
35524
|
"at",
|
|
35502
|
-
item.calleeShort ?
|
|
35525
|
+
item.calleeShort ? import_react44.default.createElement(Text, { color: "yellow" }, ` ${item.calleeShort}`) : null,
|
|
35503
35526
|
item.fileShort ? ` (${item.fileShort}:${item.line})` : null
|
|
35504
35527
|
),
|
|
35505
|
-
|
|
35528
|
+
import_react44.default.createElement(
|
|
35506
35529
|
Box_default,
|
|
35507
35530
|
{ paddingLeft: 2 },
|
|
35508
|
-
|
|
35531
|
+
import_react44.default.createElement(Text, { dimColor: !0 }, item.sourceLine?.trim())
|
|
35509
35532
|
)
|
|
35510
35533
|
))
|
|
35511
35534
|
) : null
|
|
@@ -35517,13 +35540,13 @@ init_cjs_shims();
|
|
|
35517
35540
|
|
|
35518
35541
|
// ../cli-kit/dist/private/node/ui/components/Table/Row.js
|
|
35519
35542
|
init_cjs_shims();
|
|
35520
|
-
var
|
|
35521
|
-
function
|
|
35543
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
35544
|
+
function join2(elements, separator) {
|
|
35522
35545
|
return elements.reduce((elements2, element, index) => elements2.length === 0 ? [element] : [...elements2, separator(index), element], []);
|
|
35523
35546
|
}
|
|
35524
|
-
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) =>
|
|
35547
|
+
var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_react45.default.createElement(Box_default, { flexDirection: "row" }, ...join2(columns.map((column2) => {
|
|
35525
35548
|
let content = data[column2.name], key = `${rowKey}-cell-${column2.name.toString()}`, marginRight = column2.width - unstyled(String(content ?? "")).length;
|
|
35526
|
-
return
|
|
35549
|
+
return import_react45.default.createElement(
|
|
35527
35550
|
Text,
|
|
35528
35551
|
{ key, color: ignoreColumnColor ? void 0 : column2.color },
|
|
35529
35552
|
content,
|
|
@@ -35531,11 +35554,11 @@ var Row = ({ rowKey, columns, data, fillerChar, ignoreColumnColor }) => import_r
|
|
|
35531
35554
|
);
|
|
35532
35555
|
}), (index) => {
|
|
35533
35556
|
let key = `${rowKey}-horizontal-separator-${index}`;
|
|
35534
|
-
return
|
|
35557
|
+
return import_react45.default.createElement(Text, { key }, " ");
|
|
35535
35558
|
}));
|
|
35536
35559
|
|
|
35537
35560
|
// ../cli-kit/dist/private/node/ui/components/Table/Table.js
|
|
35538
|
-
var
|
|
35561
|
+
var import_react46 = __toESM(require_react(), 1);
|
|
35539
35562
|
function Table({ rows, columns: columnsConfiguration }) {
|
|
35540
35563
|
let columns = Object.entries(columnsConfiguration).map(([key, { header, color }]) => {
|
|
35541
35564
|
let headerWidth = String(header ?? key).length, columnWidths = rows.map((row) => {
|
|
@@ -35548,17 +35571,17 @@ function Table({ rows, columns: columnsConfiguration }) {
|
|
|
35548
35571
|
color
|
|
35549
35572
|
};
|
|
35550
35573
|
}), headings = Object.entries(columnsConfiguration).reduce((headings2, [column2, { header }]) => ({ ...headings2, [column2]: header ?? column2 }), {});
|
|
35551
|
-
return
|
|
35574
|
+
return import_react46.default.createElement(
|
|
35552
35575
|
Box_default,
|
|
35553
35576
|
{ flexDirection: "column" },
|
|
35554
|
-
|
|
35555
|
-
|
|
35577
|
+
import_react46.default.createElement(Row, { rowKey: "heading", fillerChar: " ", columns, data: headings, ignoreColumnColor: !0 }),
|
|
35578
|
+
import_react46.default.createElement(Row, { rowKey: "separator", fillerChar: "\u2500", columns, data: {}, ignoreColumnColor: !0 }),
|
|
35556
35579
|
rows.map((row, index) => {
|
|
35557
35580
|
let key = `row-${index}`;
|
|
35558
|
-
return
|
|
35581
|
+
return import_react46.default.createElement(
|
|
35559
35582
|
Box_default,
|
|
35560
35583
|
{ flexDirection: "column", key },
|
|
35561
|
-
|
|
35584
|
+
import_react46.default.createElement(Row, { rowKey: `data-${key}`, fillerChar: " ", columns, data: row })
|
|
35562
35585
|
);
|
|
35563
35586
|
})
|
|
35564
35587
|
);
|
|
@@ -35569,14 +35592,14 @@ init_cjs_shims();
|
|
|
35569
35592
|
|
|
35570
35593
|
// ../cli-kit/dist/private/node/ui/components/TextInput.js
|
|
35571
35594
|
init_cjs_shims();
|
|
35572
|
-
var
|
|
35595
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
35573
35596
|
var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholder = "", noColor = !shouldDisplayColors(), color = noColor ? void 0 : "cyan", password = !1, focus = !0 }) => {
|
|
35574
|
-
let [cursorOffset, setCursorOffset] = (0,
|
|
35575
|
-
(0,
|
|
35597
|
+
let [cursorOffset, setCursorOffset] = (0, import_react47.useState)((originalValue || "").length), clampedCursorOffset = Math.min(cursorOffset, (originalValue || "").length);
|
|
35598
|
+
(0, import_react47.useLayoutEffect)(() => {
|
|
35576
35599
|
clampedCursorOffset !== cursorOffset && setCursorOffset(clampedCursorOffset);
|
|
35577
35600
|
}, [clampedCursorOffset, cursorOffset]);
|
|
35578
|
-
let value = password ? "*".repeat(originalValue.length) : originalValue, renderedValue, renderPlaceholder = (value2) => source_default2.inverse(value2[0]) + source_default2.dim(value2.slice(1)), cursorChar = figures_default.square, defaultCursor =
|
|
35579
|
-
return renderedValue = value.split("").map((char, index) => index === clampedCursorOffset ? noColor ? cursorChar : source_default2.inverse(char) : char).join(""), clampedCursorOffset === value.length && (renderedValue =
|
|
35601
|
+
let value = password ? "*".repeat(originalValue.length) : originalValue, renderedValue, renderPlaceholder = (value2) => source_default2.inverse(value2[0]) + source_default2.dim(value2.slice(1)), cursorChar = figures_default.square, defaultCursor = import_react47.default.createElement(Text, { backgroundColor: color }, cursorChar), placeholderText = defaultValue.length > 0 ? defaultValue : placeholder.length > 0 ? placeholder : "", renderedPlaceholder = placeholderText.length > 0 ? renderPlaceholder(placeholderText) : defaultCursor;
|
|
35602
|
+
return renderedValue = value.split("").map((char, index) => index === clampedCursorOffset ? noColor ? cursorChar : source_default2.inverse(char) : char).join(""), clampedCursorOffset === value.length && (renderedValue = import_react47.default.createElement(
|
|
35580
35603
|
Text,
|
|
35581
35604
|
null,
|
|
35582
35605
|
renderedValue,
|
|
@@ -35590,7 +35613,7 @@ var TextInput = ({ value: originalValue, defaultValue = "", onChange, placeholde
|
|
|
35590
35613
|
}
|
|
35591
35614
|
let nextCursorOffset = clampedCursorOffset, nextValue = originalValue;
|
|
35592
35615
|
key.leftArrow ? clampedCursorOffset > 0 && nextCursorOffset-- : key.rightArrow ? clampedCursorOffset < originalValue.length && nextCursorOffset++ : key.backspace || key.delete ? clampedCursorOffset > 0 && (nextValue = originalValue.slice(0, clampedCursorOffset - 1) + originalValue.slice(clampedCursorOffset, originalValue.length), nextCursorOffset--) : (nextValue = originalValue.slice(0, clampedCursorOffset) + input + originalValue.slice(clampedCursorOffset, originalValue.length), nextCursorOffset += input.length), setCursorOffset(nextCursorOffset), nextValue !== originalValue && onChange(nextValue);
|
|
35593
|
-
}, { isActive: focus }),
|
|
35616
|
+
}, { isActive: focus }), import_react47.default.createElement(Text, { color }, value.length > 0 ? renderedValue : renderedPlaceholder);
|
|
35594
35617
|
};
|
|
35595
35618
|
|
|
35596
35619
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
|
|
@@ -35852,7 +35875,7 @@ function formatTimeUnit(count, unit) {
|
|
|
35852
35875
|
}
|
|
35853
35876
|
|
|
35854
35877
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoTable.js
|
|
35855
|
-
var
|
|
35878
|
+
var import_react48 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
35856
35879
|
let sections = Array.isArray(table) ? table : Object.keys(table).map((header) => ({
|
|
35857
35880
|
header,
|
|
35858
35881
|
items: table[header],
|
|
@@ -35862,23 +35885,23 @@ var import_react47 = __toESM(require_react(), 1), InfoTable = ({ table }) => {
|
|
|
35862
35885
|
emptyItemsText: void 0
|
|
35863
35886
|
})), headerColumnWidth = Math.max(...sections.map((section) => Math.max(...section.header.split(`
|
|
35864
35887
|
`).map((line) => line.length))));
|
|
35865
|
-
return
|
|
35888
|
+
return import_react48.default.createElement(Box_default, { flexDirection: "column" }, sections.map((section, index) => import_react48.default.createElement(
|
|
35866
35889
|
Box_default,
|
|
35867
35890
|
{ key: index, marginBottom: index === sections.length - 1 ? 0 : 1, flexDirection: "column" },
|
|
35868
|
-
section.header.length > 0 &&
|
|
35891
|
+
section.header.length > 0 && import_react48.default.createElement(
|
|
35869
35892
|
Box_default,
|
|
35870
35893
|
{ width: headerColumnWidth + 1 },
|
|
35871
|
-
|
|
35894
|
+
import_react48.default.createElement(Text, { color: section.color, bold: !0 }, capitalize(section.header))
|
|
35872
35895
|
),
|
|
35873
|
-
|
|
35896
|
+
import_react48.default.createElement(
|
|
35874
35897
|
Box_default,
|
|
35875
35898
|
{ flexGrow: 1, flexDirection: "column", gap: 1 },
|
|
35876
|
-
section.emptyItemsText && section.items.length === 0 ?
|
|
35899
|
+
section.emptyItemsText && section.items.length === 0 ? import_react48.default.createElement(
|
|
35877
35900
|
Text,
|
|
35878
35901
|
{ color: section.color },
|
|
35879
|
-
|
|
35880
|
-
) :
|
|
35881
|
-
section.helperText ?
|
|
35902
|
+
import_react48.default.createElement(TokenizedText, { item: { subdued: section.emptyItemsText } })
|
|
35903
|
+
) : import_react48.default.createElement(List, { margin: !1, items: section.items, color: section.color, bullet: section.bullet }),
|
|
35904
|
+
section.helperText ? import_react48.default.createElement(Text, { color: section.color }, section.helperText) : null
|
|
35882
35905
|
)
|
|
35883
35906
|
)));
|
|
35884
35907
|
};
|
|
@@ -35892,28 +35915,31 @@ function messageWithPunctuation(message) {
|
|
|
35892
35915
|
|
|
35893
35916
|
// ../cli-kit/dist/private/node/ui/hooks/use-abort-signal.js
|
|
35894
35917
|
init_cjs_shims();
|
|
35895
|
-
var
|
|
35918
|
+
var import_react49 = __toESM(require_react(), 1), noop2 = () => Promise.resolve();
|
|
35896
35919
|
function useAbortSignal(abortSignal, onAbort = noop2) {
|
|
35897
|
-
let
|
|
35898
|
-
return (0,
|
|
35920
|
+
let complete = useComplete(), [isAborted, setIsAborted] = (0, import_react49.useState)(!1);
|
|
35921
|
+
return (0, import_react49.useLayoutEffect)(() => {
|
|
35899
35922
|
abortSignal?.addEventListener("abort", () => {
|
|
35900
35923
|
let abortWithError = abortSignal.reason.message === "AbortError" ? void 0 : abortSignal.reason;
|
|
35901
|
-
onAbort(abortWithError).then(() => {
|
|
35902
|
-
setIsAborted(!0), setImmediate(() => unmountInk(abortWithError));
|
|
35903
|
-
}).catch(() => {
|
|
35924
|
+
onAbort(abortWithError).then(() => setIsAborted(!0)).catch(() => {
|
|
35904
35925
|
});
|
|
35905
35926
|
});
|
|
35906
|
-
}, []),
|
|
35927
|
+
}, []), (0, import_react49.useEffect)(() => {
|
|
35928
|
+
if (isAborted) {
|
|
35929
|
+
let abortWithError = abortSignal?.reason?.message === "AbortError" ? void 0 : abortSignal?.reason;
|
|
35930
|
+
complete(abortWithError);
|
|
35931
|
+
}
|
|
35932
|
+
}, [isAborted]), { isAborted };
|
|
35907
35933
|
}
|
|
35908
35934
|
|
|
35909
35935
|
// ../cli-kit/dist/private/node/ui/hooks/use-prompt.js
|
|
35910
35936
|
init_cjs_shims();
|
|
35911
|
-
var
|
|
35937
|
+
var import_react50 = __toESM(require_react(), 1), PromptState;
|
|
35912
35938
|
(function(PromptState2) {
|
|
35913
35939
|
PromptState2.Idle = "idle", PromptState2.Loading = "loading", PromptState2.Submitted = "submitted", PromptState2.Error = "error", PromptState2.Cancelled = "cancelled";
|
|
35914
35940
|
})(PromptState || (PromptState = {}));
|
|
35915
35941
|
function usePrompt({ initialAnswer }) {
|
|
35916
|
-
let [promptState, setPromptState] = (0,
|
|
35942
|
+
let [promptState, setPromptState] = (0, import_react50.useState)(PromptState.Idle), [answer, setAnswer] = (0, import_react50.useState)(initialAnswer);
|
|
35917
35943
|
return {
|
|
35918
35944
|
promptState,
|
|
35919
35945
|
setPromptState,
|
|
@@ -35923,91 +35949,102 @@ function usePrompt({ initialAnswer }) {
|
|
|
35923
35949
|
}
|
|
35924
35950
|
|
|
35925
35951
|
// ../cli-kit/dist/private/node/ui/components/DangerousConfirmationPrompt.js
|
|
35926
|
-
var
|
|
35927
|
-
var DangerousConfirmationPrompt = ({ message, confirmation, infoTable, onSubmit, abortSignal }) => {
|
|
35928
|
-
let validateAnswer = (0,
|
|
35952
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
35953
|
+
var DangerousConfirmationPrompt = ({ message, confirmation, infoTable, warningItem, onSubmit, abortSignal }) => {
|
|
35954
|
+
let validateAnswer = (0, import_react51.useCallback)((value) => value === confirmation ? void 0 : ["Value must be exactly", { userInput: confirmation }], [confirmation]), { oneThird, twoThirds } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
35929
35955
|
initialAnswer: ""
|
|
35930
|
-
}),
|
|
35956
|
+
}), complete = useComplete(), [error, setError] = (0, import_react51.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", underline = new Array(oneThird - 3).fill("\u2594"), { isAborted } = useAbortSignal(abortSignal);
|
|
35931
35957
|
use_input_default((input, key) => {
|
|
35932
35958
|
if (handleCtrlC(input, key), key.escape && (setPromptState(PromptState.Cancelled), setError(void 0)), key.return) {
|
|
35933
35959
|
let error2 = validateAnswer(answer);
|
|
35934
35960
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
35935
35961
|
}
|
|
35936
|
-
}), (0,
|
|
35937
|
-
promptState === PromptState.Submitted ? (onSubmit(!0),
|
|
35938
|
-
}, [onSubmit, promptState,
|
|
35962
|
+
}), (0, import_react51.useEffect)(() => {
|
|
35963
|
+
promptState === PromptState.Submitted ? (onSubmit(!0), complete()) : promptState === PromptState.Cancelled && (onSubmit(!1), complete());
|
|
35964
|
+
}, [onSubmit, promptState, complete]);
|
|
35939
35965
|
let completed = promptState === PromptState.Submitted || promptState === PromptState.Cancelled;
|
|
35940
|
-
return isAborted ? null :
|
|
35966
|
+
return isAborted ? null : import_react51.default.createElement(
|
|
35941
35967
|
Box_default,
|
|
35942
35968
|
{ flexDirection: "column", marginBottom: 1, width: twoThirds },
|
|
35943
|
-
|
|
35969
|
+
import_react51.default.createElement(
|
|
35944
35970
|
Box_default,
|
|
35945
35971
|
null,
|
|
35946
|
-
|
|
35972
|
+
import_react51.default.createElement(
|
|
35947
35973
|
Box_default,
|
|
35948
35974
|
{ marginRight: 2 },
|
|
35949
|
-
|
|
35975
|
+
import_react51.default.createElement(Text, null, "?")
|
|
35950
35976
|
),
|
|
35951
|
-
|
|
35977
|
+
import_react51.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
35952
35978
|
),
|
|
35953
|
-
completed ?
|
|
35954
|
-
|
|
35979
|
+
completed ? import_react51.default.createElement(CompletedPrompt, { cancelled: promptState === PromptState.Cancelled }) : import_react51.default.createElement(
|
|
35980
|
+
import_react51.default.Fragment,
|
|
35955
35981
|
null,
|
|
35956
|
-
|
|
35982
|
+
import_react51.default.createElement(
|
|
35957
35983
|
Box_default,
|
|
35958
35984
|
{ flexDirection: "column", gap: 1, marginTop: 1, marginLeft: 3 },
|
|
35959
|
-
infoTable ?
|
|
35985
|
+
infoTable ? import_react51.default.createElement(
|
|
35960
35986
|
Box_default,
|
|
35961
35987
|
{ paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
35962
|
-
|
|
35988
|
+
import_react51.default.createElement(InfoTable, { table: infoTable })
|
|
35989
|
+
) : null,
|
|
35990
|
+
warningItem ? import_react51.default.createElement(
|
|
35991
|
+
Box_default,
|
|
35992
|
+
{ flexDirection: "column" },
|
|
35993
|
+
import_react51.default.createElement(
|
|
35994
|
+
Text,
|
|
35995
|
+
{ color: "red" },
|
|
35996
|
+
figures_default.warning,
|
|
35997
|
+
" WARNING"
|
|
35998
|
+
),
|
|
35999
|
+
import_react51.default.createElement(TokenizedText, { item: warningItem })
|
|
35963
36000
|
) : null,
|
|
35964
|
-
|
|
36001
|
+
import_react51.default.createElement(
|
|
35965
36002
|
Box_default,
|
|
35966
36003
|
null,
|
|
35967
|
-
|
|
36004
|
+
import_react51.default.createElement(TokenizedText, { item: ["Type", { userInput: confirmation }, "to confirm, or press Escape to cancel."] })
|
|
35968
36005
|
)
|
|
35969
36006
|
),
|
|
35970
|
-
|
|
36007
|
+
import_react51.default.createElement(
|
|
35971
36008
|
Box_default,
|
|
35972
36009
|
{ flexDirection: "column", width: oneThird },
|
|
35973
|
-
|
|
36010
|
+
import_react51.default.createElement(
|
|
35974
36011
|
Box_default,
|
|
35975
36012
|
null,
|
|
35976
|
-
|
|
36013
|
+
import_react51.default.createElement(
|
|
35977
36014
|
Box_default,
|
|
35978
36015
|
{ marginRight: 2 },
|
|
35979
|
-
|
|
36016
|
+
import_react51.default.createElement(Text, { color }, ">")
|
|
35980
36017
|
),
|
|
35981
|
-
|
|
36018
|
+
import_react51.default.createElement(
|
|
35982
36019
|
Box_default,
|
|
35983
36020
|
{ flexGrow: 1 },
|
|
35984
|
-
|
|
36021
|
+
import_react51.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
35985
36022
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
35986
36023
|
}, defaultValue: "", color })
|
|
35987
36024
|
)
|
|
35988
36025
|
),
|
|
35989
|
-
|
|
36026
|
+
import_react51.default.createElement(
|
|
35990
36027
|
Box_default,
|
|
35991
36028
|
{ marginLeft: 3 },
|
|
35992
|
-
|
|
36029
|
+
import_react51.default.createElement(Text, { color }, underline)
|
|
35993
36030
|
),
|
|
35994
|
-
promptState === PromptState.Error && error ?
|
|
36031
|
+
promptState === PromptState.Error && error ? import_react51.default.createElement(
|
|
35995
36032
|
Box_default,
|
|
35996
36033
|
{ marginLeft: 3 },
|
|
35997
|
-
|
|
36034
|
+
import_react51.default.createElement(
|
|
35998
36035
|
Text,
|
|
35999
36036
|
{ color },
|
|
36000
|
-
|
|
36037
|
+
import_react51.default.createElement(TokenizedText, { item: error })
|
|
36001
36038
|
)
|
|
36002
36039
|
) : null
|
|
36003
36040
|
)
|
|
36004
36041
|
)
|
|
36005
36042
|
);
|
|
36006
|
-
}, CompletedPrompt = ({ cancelled }) =>
|
|
36043
|
+
}, CompletedPrompt = ({ cancelled }) => import_react51.default.createElement(
|
|
36007
36044
|
Box_default,
|
|
36008
36045
|
null,
|
|
36009
|
-
|
|
36010
|
-
|
|
36046
|
+
import_react51.default.createElement(Box_default, { width: 3 }, cancelled ? import_react51.default.createElement(Text, { color: "red" }, figures_default.cross) : import_react51.default.createElement(Text, { color: "cyan" }, figures_default.tick)),
|
|
36047
|
+
import_react51.default.createElement(Box_default, { flexGrow: 1 }, cancelled ? import_react51.default.createElement(Text, { color: "red" }, "Cancelled") : import_react51.default.createElement(Text, { color: "cyan" }, "Confirmed"))
|
|
36011
36048
|
);
|
|
36012
36049
|
|
|
36013
36050
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
@@ -36018,7 +36055,7 @@ init_cjs_shims();
|
|
|
36018
36055
|
|
|
36019
36056
|
// ../cli-kit/dist/private/node/ui/components/Scrollbar.js
|
|
36020
36057
|
init_cjs_shims();
|
|
36021
|
-
var
|
|
36058
|
+
var import_react52 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SCROLLBOX_CHAR = "\u2551", Scrollbar = ({ containerHeight, visibleListSectionLength, fullListLength, visibleFromIndex, noColor = !shouldDisplayColors() }) => {
|
|
36022
36059
|
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;
|
|
36023
36060
|
if (visibleToIndex >= fullListLength - 1)
|
|
36024
36061
|
topBuffer = fullHeight - scrollboxHeight;
|
|
@@ -36035,32 +36072,32 @@ var import_react51 = __toESM(require_react(), 1), BACKGROUND_CHAR = "\u2502", SC
|
|
|
36035
36072
|
);
|
|
36036
36073
|
}
|
|
36037
36074
|
let bottomBuffer = fullHeight - scrollboxHeight - topBuffer, backgroundChar = noColor ? BACKGROUND_CHAR : " ", scrollboxChar = noColor ? SCROLLBOX_CHAR : " ", bgColor = noColor ? void 0 : "gray", scrollboxColor = noColor ? void 0 : "cyan";
|
|
36038
|
-
return
|
|
36075
|
+
return import_react52.default.createElement(
|
|
36039
36076
|
Box_default,
|
|
36040
36077
|
{ flexDirection: "column" },
|
|
36041
|
-
displayArrows ?
|
|
36042
|
-
|
|
36078
|
+
displayArrows ? import_react52.default.createElement(Text, null, "\u25B3") : null,
|
|
36079
|
+
import_react52.default.createElement(
|
|
36043
36080
|
Box_default,
|
|
36044
36081
|
{ width: 1 },
|
|
36045
|
-
|
|
36082
|
+
import_react52.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(topBuffer))
|
|
36046
36083
|
),
|
|
36047
|
-
|
|
36084
|
+
import_react52.default.createElement(
|
|
36048
36085
|
Box_default,
|
|
36049
36086
|
{ width: 1 },
|
|
36050
|
-
|
|
36087
|
+
import_react52.default.createElement(Text, { backgroundColor: scrollboxColor }, scrollboxChar.repeat(scrollboxHeight))
|
|
36051
36088
|
),
|
|
36052
|
-
|
|
36089
|
+
import_react52.default.createElement(
|
|
36053
36090
|
Box_default,
|
|
36054
36091
|
{ width: 1 },
|
|
36055
|
-
|
|
36092
|
+
import_react52.default.createElement(Text, { backgroundColor: bgColor }, backgroundChar.repeat(bottomBuffer))
|
|
36056
36093
|
),
|
|
36057
|
-
displayArrows ?
|
|
36094
|
+
displayArrows ? import_react52.default.createElement(Text, null, "\u25BD") : null
|
|
36058
36095
|
);
|
|
36059
36096
|
};
|
|
36060
36097
|
|
|
36061
36098
|
// ../cli-kit/dist/private/node/ui/hooks/use-select-state.js
|
|
36062
36099
|
init_cjs_shims();
|
|
36063
|
-
var
|
|
36100
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
36064
36101
|
import { isDeepStrictEqual } from "node:util";
|
|
36065
36102
|
var OptionMap = class extends Map {
|
|
36066
36103
|
constructor(options) {
|
|
@@ -36154,7 +36191,7 @@ var OptionMap = class extends Map {
|
|
|
36154
36191
|
previousValue: option?.value
|
|
36155
36192
|
};
|
|
36156
36193
|
}, useSelectState = ({ visibleOptionCount, options, defaultValue }) => {
|
|
36157
|
-
let [state, dispatch] = (0,
|
|
36194
|
+
let [state, dispatch] = (0, import_react53.useReducer)(reducer, { visibleOptionCount, defaultValue, options }, createDefaultState), [lastOptions, setLastOptions] = (0, import_react53.useState)(options), [lastVisibleOptionCount, setLastVisibleOptionCount] = (0, import_react53.useState)(visibleOptionCount);
|
|
36158
36195
|
options !== lastOptions && !isDeepStrictEqual(options, lastOptions) && (dispatch({
|
|
36159
36196
|
type: "reset",
|
|
36160
36197
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
@@ -36162,20 +36199,20 @@ var OptionMap = class extends Map {
|
|
|
36162
36199
|
type: "reset",
|
|
36163
36200
|
state: createDefaultState({ visibleOptionCount, defaultValue, options })
|
|
36164
36201
|
}), setLastVisibleOptionCount(visibleOptionCount));
|
|
36165
|
-
let selectNextOption = (0,
|
|
36202
|
+
let selectNextOption = (0, import_react53.useCallback)(() => {
|
|
36166
36203
|
dispatch({
|
|
36167
36204
|
type: "select-next-option"
|
|
36168
36205
|
});
|
|
36169
|
-
}, []), selectPreviousOption = (0,
|
|
36206
|
+
}, []), selectPreviousOption = (0, import_react53.useCallback)(() => {
|
|
36170
36207
|
dispatch({
|
|
36171
36208
|
type: "select-previous-option"
|
|
36172
36209
|
});
|
|
36173
|
-
}, []), selectOption = (0,
|
|
36210
|
+
}, []), selectOption = (0, import_react53.useCallback)(({ option }) => {
|
|
36174
36211
|
dispatch({
|
|
36175
36212
|
type: "select-option",
|
|
36176
36213
|
option
|
|
36177
36214
|
});
|
|
36178
|
-
}, []), visibleOptions = (0,
|
|
36215
|
+
}, []), visibleOptions = (0, import_react53.useMemo)(() => options.slice(state.visibleFromIndex), [options, state.visibleFromIndex]);
|
|
36179
36216
|
return {
|
|
36180
36217
|
visibleFromIndex: state.visibleFromIndex,
|
|
36181
36218
|
visibleToIndex: state.visibleToIndex,
|
|
@@ -36189,7 +36226,7 @@ var OptionMap = class extends Map {
|
|
|
36189
36226
|
};
|
|
36190
36227
|
|
|
36191
36228
|
// ../cli-kit/dist/private/node/ui/components/SelectInput.js
|
|
36192
|
-
var
|
|
36229
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
36193
36230
|
var import_sortBy = __toESM(require_sortBy(), 1);
|
|
36194
36231
|
function highlightedLabel(label, term) {
|
|
36195
36232
|
if (!term)
|
|
@@ -36212,19 +36249,19 @@ function Item({ item, previousItem, isSelected, highlightedTerm, enableShortcuts
|
|
|
36212
36249
|
let label = highlightedLabel(item.label, highlightedTerm), title, labelColor;
|
|
36213
36250
|
isSelected ? labelColor = "cyan" : item.disabled && (labelColor = "dim"), (typeof previousItem > "u" || item.group !== previousItem.group) && (title = item.group ?? (hasAnyGroup ? "Other" : void 0));
|
|
36214
36251
|
let showKey = enableShortcuts && item.key && item.key.length > 0;
|
|
36215
|
-
return
|
|
36252
|
+
return import_react54.default.createElement(
|
|
36216
36253
|
Box_default,
|
|
36217
36254
|
{ key: index, flexDirection: "column", marginTop: items.indexOf(item) !== 0 && title ? 1 : 0, minHeight: title ? 2 : 1 },
|
|
36218
|
-
title ?
|
|
36255
|
+
title ? import_react54.default.createElement(
|
|
36219
36256
|
Box_default,
|
|
36220
36257
|
{ marginLeft: 3 },
|
|
36221
|
-
|
|
36258
|
+
import_react54.default.createElement(Text, { bold: !0 }, title)
|
|
36222
36259
|
) : null,
|
|
36223
|
-
|
|
36260
|
+
import_react54.default.createElement(
|
|
36224
36261
|
Box_default,
|
|
36225
36262
|
{ key: index, marginLeft: hasAnyGroup ? 3 : 0 },
|
|
36226
|
-
|
|
36227
|
-
|
|
36263
|
+
import_react54.default.createElement(Box_default, { marginRight: 2 }, isSelected ? import_react54.default.createElement(Text, { color: "cyan" }, ">") : import_react54.default.createElement(Text, null, " ")),
|
|
36264
|
+
import_react54.default.createElement(Text, { wrap: "end", color: labelColor }, showKey ? `(${item.key}) ${label}` : label)
|
|
36228
36265
|
)
|
|
36229
36266
|
);
|
|
36230
36267
|
}
|
|
@@ -36251,12 +36288,12 @@ function SelectInput({ items: rawItems, initialItems = rawItems, onChange, enabl
|
|
|
36251
36288
|
options: items,
|
|
36252
36289
|
defaultValue
|
|
36253
36290
|
});
|
|
36254
|
-
(0,
|
|
36291
|
+
(0, import_react54.useEffect)(() => {
|
|
36255
36292
|
typeof state.value < "u" && state.previousValue !== state.value && onChange?.(items.find((item) => item.value === state.value));
|
|
36256
36293
|
}, [state.previousValue, state.value, items, onChange]);
|
|
36257
36294
|
let handleArrows = (key) => {
|
|
36258
36295
|
key.upArrow ? state.selectPreviousOption() : key.downArrow && state.selectNextOption();
|
|
36259
|
-
}, handleShortcuts = (0,
|
|
36296
|
+
}, handleShortcuts = (0, import_react54.useCallback)((input) => {
|
|
36260
36297
|
if (state.visibleOptions.map((item) => item.key).includes(input)) {
|
|
36261
36298
|
let itemWithKey = state.visibleOptions.find((item2) => item2.key === input), item = items.find((item2) => item2.value === itemWithKey?.value);
|
|
36262
36299
|
itemWithKey && !itemWithKey.disabled && (onSubmit && item && onSubmit(item), state.selectOption({ option: itemWithKey }));
|
|
@@ -36271,40 +36308,40 @@ function SelectInput({ items: rawItems, initialItems = rawItems, onChange, enabl
|
|
|
36271
36308
|
}, { isActive: focus });
|
|
36272
36309
|
let { twoThirds } = useLayout();
|
|
36273
36310
|
if (loading)
|
|
36274
|
-
return
|
|
36311
|
+
return import_react54.default.createElement(
|
|
36275
36312
|
Box_default,
|
|
36276
36313
|
{ marginLeft: 3 },
|
|
36277
|
-
|
|
36314
|
+
import_react54.default.createElement(Text, { dimColor: !0 }, "Loading...")
|
|
36278
36315
|
);
|
|
36279
36316
|
if (errorMessage && errorMessage.length > 0)
|
|
36280
|
-
return
|
|
36317
|
+
return import_react54.default.createElement(
|
|
36281
36318
|
Box_default,
|
|
36282
36319
|
{ marginLeft: 3 },
|
|
36283
|
-
|
|
36320
|
+
import_react54.default.createElement(Text, { color: "red" }, errorMessage)
|
|
36284
36321
|
);
|
|
36285
36322
|
{
|
|
36286
36323
|
let optionsHeight = initialItems.length + maximumLinesLostToGroups(initialItems), sectionHeight = Math.max(hasAnyGroup ? 5 : 2, Math.min(availableLinesToUse, optionsHeight));
|
|
36287
|
-
return
|
|
36324
|
+
return import_react54.default.createElement(
|
|
36288
36325
|
Box_default,
|
|
36289
36326
|
{ flexDirection: "column", ref, gap: 1, width: twoThirds },
|
|
36290
|
-
|
|
36327
|
+
import_react54.default.createElement(
|
|
36291
36328
|
Box_default,
|
|
36292
36329
|
{ flexDirection: "row", height: sectionHeight, width: "100%" },
|
|
36293
|
-
|
|
36294
|
-
hasLimit ?
|
|
36330
|
+
import_react54.default.createElement(Box_default, { flexDirection: "column", overflowY: "hidden", flexGrow: 1 }, state.visibleOptions.map((item, index) => import_react54.default.createElement(Item, { key: index, item, previousItem: state.visibleOptions[index - 1], highlightedTerm, isSelected: item.value === state.value, items: state.visibleOptions, enableShortcuts, hasAnyGroup, index }))),
|
|
36331
|
+
hasLimit ? import_react54.default.createElement(Scrollbar, { containerHeight: sectionHeight, visibleListSectionLength: limit, fullListLength: items.length, visibleFromIndex: state.visibleFromIndex }) : null
|
|
36295
36332
|
),
|
|
36296
|
-
|
|
36333
|
+
import_react54.default.createElement(Box_default, { ref: inputFixedAreaRef }, noItems ? import_react54.default.createElement(
|
|
36297
36334
|
Box_default,
|
|
36298
36335
|
{ marginLeft: 3 },
|
|
36299
|
-
|
|
36300
|
-
) :
|
|
36336
|
+
import_react54.default.createElement(Text, { dimColor: !0 }, "Try again with a different keyword.")
|
|
36337
|
+
) : import_react54.default.createElement(
|
|
36301
36338
|
Box_default,
|
|
36302
36339
|
{ marginLeft: 3, flexDirection: "column" },
|
|
36303
|
-
|
|
36304
|
-
hasMorePages ?
|
|
36340
|
+
import_react54.default.createElement(Text, { dimColor: !0 }, `Press ${figures_default.arrowUp}${figures_default.arrowDown} arrows to select, enter ${itemsHaveKeys ? "or a shortcut " : ""}to confirm.`),
|
|
36341
|
+
hasMorePages ? import_react54.default.createElement(
|
|
36305
36342
|
Text,
|
|
36306
36343
|
null,
|
|
36307
|
-
|
|
36344
|
+
import_react54.default.createElement(
|
|
36308
36345
|
Text,
|
|
36309
36346
|
{ bold: !0 },
|
|
36310
36347
|
"1-",
|
|
@@ -36323,37 +36360,37 @@ init_cjs_shims();
|
|
|
36323
36360
|
|
|
36324
36361
|
// ../cli-kit/dist/private/node/ui/components/Prompts/InfoMessage.js
|
|
36325
36362
|
init_cjs_shims();
|
|
36326
|
-
var
|
|
36363
|
+
var import_react55 = __toESM(require_react(), 1), InfoMessage = ({ message: { title: { color, text: title }, body } }) => import_react55.default.createElement(
|
|
36327
36364
|
Box_default,
|
|
36328
36365
|
{ flexDirection: "column", gap: 1 },
|
|
36329
|
-
|
|
36366
|
+
import_react55.default.createElement(
|
|
36330
36367
|
Text,
|
|
36331
36368
|
{ color },
|
|
36332
|
-
|
|
36369
|
+
import_react55.default.createElement(TokenizedText, { item: title })
|
|
36333
36370
|
),
|
|
36334
|
-
|
|
36371
|
+
import_react55.default.createElement(TokenizedText, { item: body })
|
|
36335
36372
|
);
|
|
36336
36373
|
|
|
36337
36374
|
// ../cli-kit/dist/private/node/ui/components/Prompts/PromptLayout.js
|
|
36338
|
-
var
|
|
36375
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
36339
36376
|
var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, state, input, submittedAnswerLabel }) => {
|
|
36340
|
-
let { stdout } = use_stdout_default(), [wrapperHeight, setWrapperHeight] = (0,
|
|
36377
|
+
let { stdout } = use_stdout_default(), [wrapperHeight, setWrapperHeight] = (0, import_react56.useState)(0), [promptAreaHeight, setPromptAreaHeight] = (0, import_react56.useState)(0), [inputFixedAreaHeight, setInputFixedAreaHeight] = (0, import_react56.useState)(0), currentAvailableLines = stdout.rows - promptAreaHeight - inputFixedAreaHeight, [availableLines, setAvailableLines] = (0, import_react56.useState)(currentAvailableLines), wrapperRef = (0, import_react56.useCallback)((node) => {
|
|
36341
36378
|
if (node !== null) {
|
|
36342
36379
|
let { height } = measure_element_default(node);
|
|
36343
36380
|
wrapperHeight !== height && setWrapperHeight(height);
|
|
36344
36381
|
}
|
|
36345
|
-
}, [wrapperHeight]), promptAreaRef = (0,
|
|
36382
|
+
}, [wrapperHeight]), promptAreaRef = (0, import_react56.useCallback)((node) => {
|
|
36346
36383
|
if (node !== null) {
|
|
36347
36384
|
let { height } = measure_element_default(node);
|
|
36348
36385
|
setPromptAreaHeight(height);
|
|
36349
36386
|
}
|
|
36350
|
-
}, []), inputFixedAreaRef = (0,
|
|
36387
|
+
}, []), inputFixedAreaRef = (0, import_react56.useCallback)((node) => {
|
|
36351
36388
|
if (node !== null) {
|
|
36352
36389
|
let { height } = measure_element_default(node);
|
|
36353
36390
|
setInputFixedAreaHeight(height + 3);
|
|
36354
36391
|
}
|
|
36355
|
-
}, []), inputComponent = (0,
|
|
36356
|
-
(0,
|
|
36392
|
+
}, []), inputComponent = (0, import_react56.cloneElement)(input, { availableLines, inputFixedAreaRef });
|
|
36393
|
+
(0, import_react56.useLayoutEffect)(() => {
|
|
36357
36394
|
function onResize() {
|
|
36358
36395
|
let newAvailableLines = stdout.rows - promptAreaHeight - inputFixedAreaHeight;
|
|
36359
36396
|
newAvailableLines !== availableLines && setAvailableLines(newAvailableLines);
|
|
@@ -36363,56 +36400,56 @@ var PromptLayout = ({ message, infoTable, abortSignal, infoMessage, header, stat
|
|
|
36363
36400
|
};
|
|
36364
36401
|
}, [wrapperHeight, promptAreaHeight, stdout, availableLines, inputFixedAreaHeight]);
|
|
36365
36402
|
let { isAborted } = useAbortSignal(abortSignal), showInfoTable = infoTable && Object.keys(infoTable).length > 0;
|
|
36366
|
-
return isAborted ? null :
|
|
36403
|
+
return isAborted ? null : import_react56.default.createElement(
|
|
36367
36404
|
Box_default,
|
|
36368
36405
|
{ flexDirection: "column", marginBottom: 1, ref: wrapperRef },
|
|
36369
|
-
|
|
36406
|
+
import_react56.default.createElement(
|
|
36370
36407
|
Box_default,
|
|
36371
36408
|
{ ref: promptAreaRef, flexDirection: "column" },
|
|
36372
|
-
|
|
36409
|
+
import_react56.default.createElement(
|
|
36373
36410
|
Box_default,
|
|
36374
36411
|
null,
|
|
36375
|
-
|
|
36412
|
+
import_react56.default.createElement(
|
|
36376
36413
|
Box_default,
|
|
36377
36414
|
{ marginRight: 2 },
|
|
36378
|
-
|
|
36415
|
+
import_react56.default.createElement(Text, null, "?")
|
|
36379
36416
|
),
|
|
36380
|
-
|
|
36417
|
+
import_react56.default.createElement(TokenizedText, { item: messageWithPunctuation(message) }),
|
|
36381
36418
|
header
|
|
36382
36419
|
),
|
|
36383
|
-
(showInfoTable || infoMessage) && state !== PromptState.Submitted ?
|
|
36420
|
+
(showInfoTable || infoMessage) && state !== PromptState.Submitted ? import_react56.default.createElement(
|
|
36384
36421
|
Box_default,
|
|
36385
36422
|
{ marginTop: 1, marginLeft: 3, paddingLeft: 2, borderStyle: "bold", borderLeft: !0, borderRight: !1, borderTop: !1, borderBottom: !1, flexDirection: "column", gap: 1 },
|
|
36386
|
-
infoMessage ?
|
|
36387
|
-
showInfoTable ?
|
|
36423
|
+
infoMessage ? import_react56.default.createElement(InfoMessage, { message: infoMessage }) : null,
|
|
36424
|
+
showInfoTable ? import_react56.default.createElement(InfoTable, { table: infoTable }) : null
|
|
36388
36425
|
) : null
|
|
36389
36426
|
),
|
|
36390
|
-
state === PromptState.Submitted && submittedAnswerLabel ?
|
|
36427
|
+
state === PromptState.Submitted && submittedAnswerLabel ? import_react56.default.createElement(
|
|
36391
36428
|
Box_default,
|
|
36392
36429
|
null,
|
|
36393
|
-
|
|
36430
|
+
import_react56.default.createElement(
|
|
36394
36431
|
Box_default,
|
|
36395
36432
|
{ width: 3 },
|
|
36396
|
-
|
|
36433
|
+
import_react56.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
36397
36434
|
),
|
|
36398
|
-
|
|
36399
|
-
) :
|
|
36435
|
+
import_react56.default.createElement(Text, { color: "cyan" }, submittedAnswerLabel)
|
|
36436
|
+
) : import_react56.default.createElement(Box_default, { marginTop: 1 }, inputComponent)
|
|
36400
36437
|
);
|
|
36401
36438
|
};
|
|
36402
36439
|
|
|
36403
36440
|
// ../cli-kit/dist/private/node/ui/components/SelectPrompt.js
|
|
36404
|
-
var
|
|
36441
|
+
var import_react57 = __toESM(require_react(), 1);
|
|
36405
36442
|
function SelectPrompt({ message, choices, infoTable, infoMessage, onSubmit, defaultValue, abortSignal, groupOrder }) {
|
|
36406
36443
|
if (choices.length === 0)
|
|
36407
36444
|
throw new Error("SelectPrompt requires at least one choice");
|
|
36408
|
-
let
|
|
36445
|
+
let complete = useComplete(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
36409
36446
|
initialAnswer: void 0
|
|
36410
|
-
}), submitAnswer = (0,
|
|
36447
|
+
}), submitAnswer = (0, import_react57.useCallback)((answer2) => {
|
|
36411
36448
|
setAnswer(answer2), setPromptState(PromptState.Submitted);
|
|
36412
36449
|
}, [setAnswer, setPromptState]);
|
|
36413
|
-
return (0,
|
|
36414
|
-
promptState === PromptState.Submitted && answer && (
|
|
36415
|
-
}, [answer, onSubmit, promptState,
|
|
36450
|
+
return (0, import_react57.useEffect)(() => {
|
|
36451
|
+
promptState === PromptState.Submitted && answer && (onSubmit(answer.value), complete());
|
|
36452
|
+
}, [answer, onSubmit, promptState, complete]), import_react57.default.createElement(PromptLayout, { message, state: promptState, submittedAnswerLabel: answer?.label, infoTable, infoMessage, abortSignal, input: import_react57.default.createElement(SelectInput, { defaultValue, items: choices, onSubmit: submitAnswer, groupOrder }) });
|
|
36416
36453
|
}
|
|
36417
36454
|
|
|
36418
36455
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
@@ -36423,7 +36460,7 @@ init_cjs_shims();
|
|
|
36423
36460
|
|
|
36424
36461
|
// ../cli-kit/dist/private/node/ui/components/TextAnimation.js
|
|
36425
36462
|
init_cjs_shims();
|
|
36426
|
-
var
|
|
36463
|
+
var import_react58 = __toESM(require_react(), 1), import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
36427
36464
|
function rainbow(text, frame) {
|
|
36428
36465
|
let hue = 5 * frame, leftColor = { h: hue % 360, s: 0.8, v: 1 }, rightColor = { h: (hue + 1) % 360, s: 0.8, v: 1 };
|
|
36429
36466
|
return (0, import_gradient_string.default)(leftColor, rightColor)(text, { interpolation: "hsv", hsvSpin: "long" });
|
|
@@ -36435,9 +36472,9 @@ function rotated(text, steps) {
|
|
|
36435
36472
|
function truncated(text, maxWidth) {
|
|
36436
36473
|
return maxWidth ? text.slice(0, maxWidth) : text;
|
|
36437
36474
|
}
|
|
36438
|
-
var TextAnimation = (0,
|
|
36439
|
-
let frame = (0,
|
|
36440
|
-
(0,
|
|
36475
|
+
var TextAnimation = (0, import_react58.memo)(({ text, maxWidth }) => {
|
|
36476
|
+
let frame = (0, import_react58.useRef)(0), [renderedFrame, setRenderedFrame] = (0, import_react58.useState)(text), timeout = (0, import_react58.useRef)(), { stdout } = use_stdout_default(), [width, setWidth] = (0, import_react58.useState)(maxWidth ?? Math.floor(stdout.columns * 0.66));
|
|
36477
|
+
(0, import_react58.useLayoutEffect)(() => {
|
|
36441
36478
|
let handleResize = () => {
|
|
36442
36479
|
setWidth(Math.floor(stdout.columns * 0.66));
|
|
36443
36480
|
};
|
|
@@ -36445,27 +36482,27 @@ var TextAnimation = (0, import_react57.memo)(({ text, maxWidth }) => {
|
|
|
36445
36482
|
stdout.off("resize", handleResize);
|
|
36446
36483
|
};
|
|
36447
36484
|
}, [stdout]);
|
|
36448
|
-
let renderAnimation = (0,
|
|
36485
|
+
let renderAnimation = (0, import_react58.useCallback)(() => {
|
|
36449
36486
|
let newFrame = frame.current + 1;
|
|
36450
36487
|
frame.current = newFrame, setRenderedFrame(rainbow(truncated(rotated(text, frame.current), width), frame.current)), timeout.current = setTimeout(() => {
|
|
36451
36488
|
renderAnimation();
|
|
36452
36489
|
}, 35);
|
|
36453
36490
|
}, [text, width]);
|
|
36454
|
-
return (0,
|
|
36491
|
+
return (0, import_react58.useLayoutEffect)(() => (renderAnimation(), () => {
|
|
36455
36492
|
clearTimeout(timeout.current);
|
|
36456
|
-
}), [renderAnimation]),
|
|
36493
|
+
}), [renderAnimation]), import_react58.default.createElement(Text, null, renderedFrame);
|
|
36457
36494
|
});
|
|
36458
36495
|
TextAnimation.displayName = "TextAnimation";
|
|
36459
36496
|
|
|
36460
36497
|
// ../cli-kit/dist/private/node/ui/components/LoadingBar.js
|
|
36461
|
-
var
|
|
36498
|
+
var import_react59 = __toESM(require_react(), 1);
|
|
36462
36499
|
var loadingBarChar = "\u2580", hillString = "\u2581\u2581\u2582\u2582\u2583\u2583\u2584\u2584\u2585\u2585\u2586\u2586\u2587\u2587\u2588\u2588\u2587\u2587\u2586\u2586\u2585\u2585\u2584\u2584\u2583\u2583\u2582\u2582\u2581\u2581", LoadingBar = ({ title, noColor, noProgressBar }) => {
|
|
36463
|
-
let { twoThirds } = useLayout(), loadingBar = new Array(twoThirds).fill(loadingBarChar).join("");
|
|
36464
|
-
return (noColor ?? !shouldDisplayColors()) && (loadingBar = hillString.repeat(Math.ceil(twoThirds / hillString.length))),
|
|
36500
|
+
let { twoThirds } = useLayout(), { stdout } = use_stdout_default(), isTTY2 = !!stdout.isTTY, loadingBar = new Array(twoThirds).fill(loadingBarChar).join("");
|
|
36501
|
+
return (noColor ?? !shouldDisplayColors()) && (loadingBar = hillString.repeat(Math.ceil(twoThirds / hillString.length))), import_react59.default.createElement(
|
|
36465
36502
|
Box_default,
|
|
36466
36503
|
{ flexDirection: "column" },
|
|
36467
|
-
!noProgressBar &&
|
|
36468
|
-
|
|
36504
|
+
isTTY2 && !noProgressBar && import_react59.default.createElement(TextAnimation, { text: loadingBar, maxWidth: twoThirds }),
|
|
36505
|
+
import_react59.default.createElement(
|
|
36469
36506
|
Text,
|
|
36470
36507
|
null,
|
|
36471
36508
|
title,
|
|
@@ -36476,18 +36513,20 @@ var loadingBarChar = "\u2580", hillString = "\u2581\u2581\u2582\u2582\u2583\u258
|
|
|
36476
36513
|
|
|
36477
36514
|
// ../cli-kit/dist/private/node/ui/hooks/use-async-and-unmount.js
|
|
36478
36515
|
init_cjs_shims();
|
|
36479
|
-
var
|
|
36516
|
+
var import_react60 = __toESM(require_react(), 1);
|
|
36480
36517
|
function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
36481
36518
|
}, onRejected = () => {
|
|
36482
36519
|
} } = {}) {
|
|
36483
|
-
let
|
|
36484
|
-
(0,
|
|
36520
|
+
let complete = useComplete(), [result, setResult] = (0, import_react60.useState)(null);
|
|
36521
|
+
(0, import_react60.useEffect)(() => {
|
|
36485
36522
|
asyncFunction().then(() => {
|
|
36486
|
-
onFulfilled(),
|
|
36523
|
+
onFulfilled(), setResult({});
|
|
36487
36524
|
}).catch((error) => {
|
|
36488
|
-
onRejected(error),
|
|
36525
|
+
onRejected(error), setResult({ error });
|
|
36489
36526
|
});
|
|
36490
|
-
}, [])
|
|
36527
|
+
}, []), (0, import_react60.useEffect)(() => {
|
|
36528
|
+
result !== null && complete(result.error);
|
|
36529
|
+
}, [result]);
|
|
36491
36530
|
}
|
|
36492
36531
|
|
|
36493
36532
|
// ../cli-kit/dist/private/node/ui/hooks/use-exit-on-ctrl-c.js
|
|
@@ -36501,7 +36540,7 @@ function useExitOnCtrlC() {
|
|
|
36501
36540
|
}
|
|
36502
36541
|
|
|
36503
36542
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
36504
|
-
var
|
|
36543
|
+
var import_react61 = __toESM(require_react(), 1), TasksState;
|
|
36505
36544
|
(function(TasksState2) {
|
|
36506
36545
|
TasksState2.Loading = "loading", TasksState2.Success = "success", TasksState2.Failure = "failure";
|
|
36507
36546
|
})(TasksState || (TasksState = {}));
|
|
@@ -36520,7 +36559,7 @@ async function runTask(task, ctx) {
|
|
|
36520
36559
|
var noop3 = () => {
|
|
36521
36560
|
};
|
|
36522
36561
|
function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal, noColor, noProgressBar = !1 }) {
|
|
36523
|
-
let [currentTask, setCurrentTask] = (0,
|
|
36562
|
+
let [currentTask, setCurrentTask] = (0, import_react61.useState)(tasks[0]), [state, setState] = (0, import_react61.useState)(TasksState.Loading), ctx = (0, import_react61.useRef)({});
|
|
36524
36563
|
useAsyncAndUnmount(async () => {
|
|
36525
36564
|
for (let task of tasks) {
|
|
36526
36565
|
setCurrentTask(task);
|
|
@@ -36541,89 +36580,89 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal,
|
|
|
36541
36580
|
if (silent)
|
|
36542
36581
|
return null;
|
|
36543
36582
|
let title = typeof currentTask.title == "string" ? currentTask.title : currentTask.title.value;
|
|
36544
|
-
return state === TasksState.Loading && !isAborted ?
|
|
36583
|
+
return state === TasksState.Loading && !isAborted ? import_react61.default.createElement(LoadingBar, { title, noColor, noProgressBar }) : null;
|
|
36545
36584
|
}
|
|
36546
36585
|
|
|
36547
36586
|
// ../cli-kit/dist/private/node/ui/components/TextPrompt.js
|
|
36548
36587
|
init_cjs_shims();
|
|
36549
|
-
var
|
|
36588
|
+
var import_react62 = __toESM(require_react(), 1);
|
|
36550
36589
|
var TextPrompt = ({ message, onSubmit, validate: validate2, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
|
|
36551
36590
|
if (password && defaultValue)
|
|
36552
36591
|
throw new Error("Can't use defaultValue with password");
|
|
36553
|
-
let validateAnswer = (0,
|
|
36592
|
+
let validateAnswer = (0, import_react62.useCallback)((value) => {
|
|
36554
36593
|
if (validate2)
|
|
36555
36594
|
return validate2(value);
|
|
36556
36595
|
if (value.length === 0 && !allowEmpty)
|
|
36557
36596
|
return "Type an answer to the prompt.";
|
|
36558
36597
|
}, [allowEmpty, validate2]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
36559
36598
|
initialAnswer
|
|
36560
|
-
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault,
|
|
36599
|
+
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, complete = useComplete(), [error, setError] = (0, import_react62.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", underline = new Array(oneThird - 3).fill("\u2594"), { isAborted } = useAbortSignal(abortSignal);
|
|
36561
36600
|
return use_input_default((input, key) => {
|
|
36562
36601
|
if (handleCtrlC(input, key), key.return) {
|
|
36563
36602
|
let error2 = validateAnswer(answerOrDefault);
|
|
36564
36603
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
36565
36604
|
}
|
|
36566
|
-
}), (0,
|
|
36567
|
-
promptState === PromptState.Submitted && (onSubmit(answerOrDefault),
|
|
36568
|
-
}, [answerOrDefault, onSubmit, promptState,
|
|
36605
|
+
}), (0, import_react62.useEffect)(() => {
|
|
36606
|
+
promptState === PromptState.Submitted && (onSubmit(answerOrDefault), complete());
|
|
36607
|
+
}, [answerOrDefault, onSubmit, promptState, complete]), isAborted ? null : import_react62.default.createElement(
|
|
36569
36608
|
Box_default,
|
|
36570
36609
|
{ flexDirection: "column", marginBottom: 1, width: oneThird },
|
|
36571
|
-
|
|
36610
|
+
import_react62.default.createElement(
|
|
36572
36611
|
Box_default,
|
|
36573
36612
|
null,
|
|
36574
|
-
|
|
36613
|
+
import_react62.default.createElement(
|
|
36575
36614
|
Box_default,
|
|
36576
36615
|
{ marginRight: 2 },
|
|
36577
|
-
|
|
36616
|
+
import_react62.default.createElement(Text, null, "?")
|
|
36578
36617
|
),
|
|
36579
|
-
|
|
36618
|
+
import_react62.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
36580
36619
|
),
|
|
36581
|
-
promptState === PromptState.Submitted ?
|
|
36620
|
+
promptState === PromptState.Submitted ? import_react62.default.createElement(
|
|
36582
36621
|
Box_default,
|
|
36583
36622
|
null,
|
|
36584
|
-
|
|
36623
|
+
import_react62.default.createElement(
|
|
36585
36624
|
Box_default,
|
|
36586
36625
|
{ width: 3 },
|
|
36587
|
-
|
|
36626
|
+
import_react62.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
36588
36627
|
),
|
|
36589
|
-
|
|
36628
|
+
import_react62.default.createElement(
|
|
36590
36629
|
Box_default,
|
|
36591
36630
|
{ flexGrow: 1 },
|
|
36592
|
-
|
|
36631
|
+
import_react62.default.createElement(Text, { color: "cyan", dimColor: displayEmptyValue }, password ? "*".repeat(answer.length) : displayedAnswer)
|
|
36593
36632
|
)
|
|
36594
|
-
) :
|
|
36633
|
+
) : import_react62.default.createElement(
|
|
36595
36634
|
Box_default,
|
|
36596
36635
|
{ flexDirection: "column" },
|
|
36597
|
-
|
|
36636
|
+
import_react62.default.createElement(
|
|
36598
36637
|
Box_default,
|
|
36599
36638
|
null,
|
|
36600
|
-
|
|
36639
|
+
import_react62.default.createElement(
|
|
36601
36640
|
Box_default,
|
|
36602
36641
|
{ marginRight: 2 },
|
|
36603
|
-
|
|
36642
|
+
import_react62.default.createElement(Text, { color }, ">")
|
|
36604
36643
|
),
|
|
36605
|
-
|
|
36644
|
+
import_react62.default.createElement(
|
|
36606
36645
|
Box_default,
|
|
36607
36646
|
{ flexGrow: 1 },
|
|
36608
|
-
|
|
36647
|
+
import_react62.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
36609
36648
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
36610
36649
|
}, defaultValue, color, password })
|
|
36611
36650
|
)
|
|
36612
36651
|
),
|
|
36613
|
-
|
|
36652
|
+
import_react62.default.createElement(
|
|
36614
36653
|
Box_default,
|
|
36615
36654
|
{ marginLeft: 3 },
|
|
36616
|
-
|
|
36655
|
+
import_react62.default.createElement(Text, { color }, underline)
|
|
36617
36656
|
),
|
|
36618
|
-
promptState === PromptState.Error ?
|
|
36657
|
+
promptState === PromptState.Error ? import_react62.default.createElement(
|
|
36619
36658
|
Box_default,
|
|
36620
36659
|
{ marginLeft: 3 },
|
|
36621
|
-
|
|
36660
|
+
import_react62.default.createElement(Text, { color }, error)
|
|
36622
36661
|
) : null,
|
|
36623
|
-
promptState !== PromptState.Error && preview ?
|
|
36662
|
+
promptState !== PromptState.Error && preview ? import_react62.default.createElement(
|
|
36624
36663
|
Box_default,
|
|
36625
36664
|
{ marginLeft: 3 },
|
|
36626
|
-
|
|
36665
|
+
import_react62.default.createElement(TokenizedText, { item: preview(answerOrDefault) })
|
|
36627
36666
|
) : null
|
|
36628
36667
|
)
|
|
36629
36668
|
);
|
|
@@ -36643,24 +36682,24 @@ function throttle2(func, wait, options) {
|
|
|
36643
36682
|
}
|
|
36644
36683
|
|
|
36645
36684
|
// ../cli-kit/dist/private/node/ui/components/AutocompletePrompt.js
|
|
36646
|
-
var
|
|
36685
|
+
var import_react63 = __toESM(require_react(), 1);
|
|
36647
36686
|
var MIN_NUMBER_OF_ITEMS_FOR_SEARCH = 5;
|
|
36648
36687
|
function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, hasMorePages: initialHasMorePages = !1, abortSignal, infoMessage, groupOrder }) {
|
|
36649
|
-
let
|
|
36688
|
+
let complete = useComplete(), [searchTerm, setSearchTerm] = (0, import_react63.useState)(""), [searchResults, setSearchResults] = (0, import_react63.useState)(choices), canSearch = choices.length > MIN_NUMBER_OF_ITEMS_FOR_SEARCH, [hasMorePages, setHasMorePages] = (0, import_react63.useState)(initialHasMorePages), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
36650
36689
|
initialAnswer: void 0
|
|
36651
|
-
}), paginatedSearch = (0,
|
|
36690
|
+
}), paginatedSearch = (0, import_react63.useCallback)(async (term) => await search(term), [search]), submitAnswer = (0, import_react63.useCallback)((answer2) => {
|
|
36652
36691
|
promptState === PromptState.Idle && (setAnswer(answer2), setPromptState(PromptState.Submitted));
|
|
36653
36692
|
}, [promptState, setAnswer, setPromptState]);
|
|
36654
|
-
(0,
|
|
36655
|
-
promptState === PromptState.Submitted && answer && (setSearchTerm(""),
|
|
36656
|
-
}, [answer, onSubmit, promptState,
|
|
36657
|
-
let setLoadingWhenSlow = (0,
|
|
36693
|
+
(0, import_react63.useEffect)(() => {
|
|
36694
|
+
promptState === PromptState.Submitted && answer && (setSearchTerm(""), onSubmit(answer.value), complete());
|
|
36695
|
+
}, [answer, onSubmit, promptState, complete]);
|
|
36696
|
+
let setLoadingWhenSlow = (0, import_react63.useRef)(), searchTermRef = (0, import_react63.useRef)("");
|
|
36658
36697
|
searchTermRef.current = searchTerm;
|
|
36659
|
-
let choicesRef = (0,
|
|
36698
|
+
let choicesRef = (0, import_react63.useRef)(choices);
|
|
36660
36699
|
choicesRef.current = choices;
|
|
36661
|
-
let initialHasPagesRef = (0,
|
|
36700
|
+
let initialHasPagesRef = (0, import_react63.useRef)(initialHasMorePages);
|
|
36662
36701
|
initialHasPagesRef.current = initialHasMorePages;
|
|
36663
|
-
let debounceSearch =
|
|
36702
|
+
let debounceSearch = import_react63.default.useMemo(() => throttle2((term) => {
|
|
36664
36703
|
setLoadingWhenSlow.current = setTimeout(() => {
|
|
36665
36704
|
setPromptState(PromptState.Loading);
|
|
36666
36705
|
}, 100), paginatedSearch(term).then((result) => {
|
|
@@ -36671,38 +36710,40 @@ function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, has
|
|
|
36671
36710
|
clearTimeout(setLoadingWhenSlow.current);
|
|
36672
36711
|
});
|
|
36673
36712
|
}, 400, { leading: !0, trailing: !0 }), [paginatedSearch, setPromptState]);
|
|
36674
|
-
return
|
|
36713
|
+
return import_react63.default.createElement(PromptLayout, { message, state: promptState, infoTable, infoMessage, abortSignal, header: promptState !== PromptState.Submitted && canSearch ? import_react63.default.createElement(
|
|
36675
36714
|
Box_default,
|
|
36676
36715
|
{ marginLeft: 3 },
|
|
36677
|
-
|
|
36716
|
+
import_react63.default.createElement(TextInput, { value: searchTerm, onChange: (term) => {
|
|
36678
36717
|
setSearchTerm(term), searchTermRef.current = term, term.length > 0 ? debounceSearch(term) : (debounceSearch.cancel(), setPromptState(PromptState.Idle), setSearchResults(choices));
|
|
36679
36718
|
}, placeholder: "Type to search..." })
|
|
36680
|
-
) : null, submittedAnswerLabel: answer?.label, input:
|
|
36719
|
+
) : null, submittedAnswerLabel: answer?.label, input: import_react63.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, groupOrder }) });
|
|
36681
36720
|
}
|
|
36682
36721
|
|
|
36683
36722
|
// ../cli-kit/dist/private/node/ui/components/SingleTask.js
|
|
36684
36723
|
init_cjs_shims();
|
|
36685
|
-
var
|
|
36724
|
+
var import_react64 = __toESM(require_react(), 1);
|
|
36686
36725
|
var SingleTask = ({ task, title, onComplete, onAbort, noColor }) => {
|
|
36687
|
-
let [status, setStatus] = (0,
|
|
36726
|
+
let [status, setStatus] = (0, import_react64.useState)(title), [isDone, setIsDone] = (0, import_react64.useState)(!1), [taskResult, setTaskResult] = (0, import_react64.useState)(null), complete = useComplete(), { isRawModeSupported } = use_stdin_default();
|
|
36688
36727
|
return use_input_default((input, key) => {
|
|
36689
36728
|
onAbort ? handleCtrlC(input, key, onAbort) : handleCtrlC(input, key);
|
|
36690
|
-
}, { isActive: !!isRawModeSupported }), (0,
|
|
36729
|
+
}, { isActive: !!isRawModeSupported }), (0, import_react64.useEffect)(() => {
|
|
36691
36730
|
task(setStatus).then((result) => {
|
|
36692
|
-
setIsDone(!0), onComplete?.(result),
|
|
36731
|
+
setIsDone(!0), onComplete?.(result), setTaskResult({});
|
|
36693
36732
|
}).catch((error) => {
|
|
36694
|
-
setIsDone(!0),
|
|
36733
|
+
setIsDone(!0), setTaskResult({ error });
|
|
36695
36734
|
});
|
|
36696
|
-
}, [task,
|
|
36735
|
+
}, [task, onComplete]), (0, import_react64.useEffect)(() => {
|
|
36736
|
+
taskResult !== null && complete(taskResult.error);
|
|
36737
|
+
}, [taskResult, complete]), isDone ? null : import_react64.default.createElement(LoadingBar, { title: status.value, noColor });
|
|
36697
36738
|
};
|
|
36698
36739
|
|
|
36699
36740
|
// ../cli-kit/dist/public/node/ui.js
|
|
36700
|
-
var
|
|
36741
|
+
var import_react65 = __toESM(require_react(), 1), defaultUIDebugOptions = {
|
|
36701
36742
|
skipTTYCheck: !1
|
|
36702
36743
|
};
|
|
36703
36744
|
async function renderConcurrent({ renderOptions, ...props }) {
|
|
36704
36745
|
let abortSignal = props.abortSignal ?? new AbortController2().signal;
|
|
36705
|
-
return render2(
|
|
36746
|
+
return render2(import_react65.default.createElement(ConcurrentOutput, { ...props, abortSignal }), renderOptions);
|
|
36706
36747
|
}
|
|
36707
36748
|
function renderInfo(options) {
|
|
36708
36749
|
return alert({ ...options, type: "info" });
|
|
@@ -36717,12 +36758,12 @@ function renderError(options) {
|
|
|
36717
36758
|
return alert({ ...options, type: "error" });
|
|
36718
36759
|
}
|
|
36719
36760
|
function renderFatalError(error, { renderOptions } = {}) {
|
|
36720
|
-
return renderOnce(
|
|
36761
|
+
return renderOnce(import_react65.default.createElement(FatalError, { error }), { logLevel: "error", renderOptions });
|
|
36721
36762
|
}
|
|
36722
36763
|
async function renderSelectPrompt({ renderOptions, isConfirmationPrompt, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
36723
36764
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
36724
36765
|
let selectedValue;
|
|
36725
|
-
return await render2(
|
|
36766
|
+
return await render2(import_react65.default.createElement(SelectPrompt, { ...props, onSubmit: (value) => {
|
|
36726
36767
|
selectedValue = value;
|
|
36727
36768
|
} }), {
|
|
36728
36769
|
...renderOptions,
|
|
@@ -36766,7 +36807,7 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
36766
36807
|
};
|
|
36767
36808
|
return runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
36768
36809
|
let selectedValue;
|
|
36769
|
-
if (await render2(
|
|
36810
|
+
if (await render2(import_react65.default.createElement(AutocompletePrompt, { ...newProps, onSubmit: (value) => {
|
|
36770
36811
|
selectedValue = value;
|
|
36771
36812
|
} }), {
|
|
36772
36813
|
...renderOptions,
|
|
@@ -36777,29 +36818,32 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
36777
36818
|
});
|
|
36778
36819
|
}
|
|
36779
36820
|
function renderTable({ renderOptions, ...props }) {
|
|
36780
|
-
return renderOnce(
|
|
36821
|
+
return renderOnce(import_react65.default.createElement(Table, { ...props }), { renderOptions });
|
|
36781
36822
|
}
|
|
36782
36823
|
async function renderTasks(tasks, { renderOptions, noProgressBar } = {}) {
|
|
36783
|
-
|
|
36784
|
-
|
|
36785
|
-
|
|
36786
|
-
|
|
36787
|
-
|
|
36788
|
-
|
|
36789
|
-
|
|
36824
|
+
let taskResult;
|
|
36825
|
+
return await render2(import_react65.default.createElement(Tasks, { tasks, onComplete: (ctx) => {
|
|
36826
|
+
taskResult = ctx;
|
|
36827
|
+
}, noProgressBar }), {
|
|
36828
|
+
stdout: process.stderr,
|
|
36829
|
+
...renderOptions,
|
|
36830
|
+
exitOnCtrlC: !1
|
|
36831
|
+
}), taskResult;
|
|
36790
36832
|
}
|
|
36791
36833
|
async function renderSingleTask({ title, task, onAbort, renderOptions }) {
|
|
36792
|
-
|
|
36793
|
-
|
|
36794
|
-
|
|
36795
|
-
|
|
36796
|
-
|
|
36797
|
-
|
|
36834
|
+
let taskResult;
|
|
36835
|
+
return await render2(import_react65.default.createElement(SingleTask, { title, task, onComplete: (result) => {
|
|
36836
|
+
taskResult = result;
|
|
36837
|
+
}, onAbort }), {
|
|
36838
|
+
stdout: process.stderr,
|
|
36839
|
+
...renderOptions,
|
|
36840
|
+
exitOnCtrlC: !1
|
|
36841
|
+
}), taskResult;
|
|
36798
36842
|
}
|
|
36799
36843
|
async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
36800
36844
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
36801
36845
|
let enteredText = "";
|
|
36802
|
-
return await render2(
|
|
36846
|
+
return await render2(import_react65.default.createElement(TextPrompt, { ...props, onSubmit: (value) => {
|
|
36803
36847
|
enteredText = value;
|
|
36804
36848
|
} }), {
|
|
36805
36849
|
...renderOptions,
|
|
@@ -36810,7 +36854,7 @@ async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = de
|
|
|
36810
36854
|
async function renderDangerousConfirmationPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
36811
36855
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
36812
36856
|
let confirmed;
|
|
36813
|
-
return await render2(
|
|
36857
|
+
return await render2(import_react65.default.createElement(DangerousConfirmationPrompt, { ...props, onSubmit: (value) => {
|
|
36814
36858
|
confirmed = value;
|
|
36815
36859
|
} }), {
|
|
36816
36860
|
...renderOptions,
|
|
@@ -36933,7 +36977,9 @@ function errorMessageImpliesEnvironmentIssue(message) {
|
|
|
36933
36977
|
"Client network socket disconnected before secure TLS connection was established",
|
|
36934
36978
|
"spawn EPERM",
|
|
36935
36979
|
"socket hang up",
|
|
36936
|
-
"The user aborted a request."
|
|
36980
|
+
"The user aborted a request.",
|
|
36981
|
+
"write EPIPE",
|
|
36982
|
+
"Unsupported platform"
|
|
36937
36983
|
].some((issueMessage) => message.includes(issueMessage));
|
|
36938
36984
|
}
|
|
36939
36985
|
|
|
@@ -37491,11 +37537,11 @@ import { ChildProcess } from "node:child_process";
|
|
|
37491
37537
|
|
|
37492
37538
|
// ../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
|
|
37493
37539
|
init_cjs_shims();
|
|
37494
|
-
function isStream(
|
|
37495
|
-
return
|
|
37540
|
+
function isStream(stream) {
|
|
37541
|
+
return stream !== null && typeof stream == "object" && typeof stream.pipe == "function";
|
|
37496
37542
|
}
|
|
37497
|
-
function isWritableStream(
|
|
37498
|
-
return isStream(
|
|
37543
|
+
function isWritableStream(stream) {
|
|
37544
|
+
return isStream(stream) && stream.writable !== !1 && typeof stream._write == "function" && typeof stream._writableState == "object";
|
|
37499
37545
|
}
|
|
37500
37546
|
|
|
37501
37547
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js
|
|
@@ -37532,18 +37578,18 @@ var import_get_stream = __toESM(require_get_stream(), 1), import_merge_stream =
|
|
|
37532
37578
|
return;
|
|
37533
37579
|
let mixed = (0, import_merge_stream.default)();
|
|
37534
37580
|
return spawned.stdout && mixed.add(spawned.stdout), spawned.stderr && mixed.add(spawned.stderr), mixed;
|
|
37535
|
-
}, getBufferedData = async (
|
|
37536
|
-
if (!(!
|
|
37537
|
-
|
|
37581
|
+
}, getBufferedData = async (stream, streamPromise) => {
|
|
37582
|
+
if (!(!stream || streamPromise === void 0)) {
|
|
37583
|
+
stream.destroy();
|
|
37538
37584
|
try {
|
|
37539
37585
|
return await streamPromise;
|
|
37540
37586
|
} catch (error) {
|
|
37541
37587
|
return error.bufferedData;
|
|
37542
37588
|
}
|
|
37543
37589
|
}
|
|
37544
|
-
}, getStreamPromise = (
|
|
37545
|
-
if (!(!
|
|
37546
|
-
return encoding ? (0, import_get_stream.default)(
|
|
37590
|
+
}, getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
|
|
37591
|
+
if (!(!stream || !buffer))
|
|
37592
|
+
return encoding ? (0, import_get_stream.default)(stream, { encoding, maxBuffer }) : import_get_stream.default.buffer(stream, { maxBuffer });
|
|
37547
37593
|
}, getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
|
|
37548
37594
|
let stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer }), stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer }), allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
|
|
37549
37595
|
try {
|
|
@@ -37839,7 +37885,7 @@ function makeUsernameFromId(userId) {
|
|
|
37839
37885
|
}
|
|
37840
37886
|
|
|
37841
37887
|
// ../cli-kit/dist/public/node/system.js
|
|
37842
|
-
var import_which = __toESM(require_lib2(), 1);
|
|
37888
|
+
var import_supports_hyperlinks2 = __toESM(require_supports_hyperlinks(), 1), import_which = __toESM(require_lib2(), 1);
|
|
37843
37889
|
async function openURL(url) {
|
|
37844
37890
|
let externalOpen = await import("./open-BHIF7E3E.js");
|
|
37845
37891
|
try {
|
|
@@ -37916,6 +37962,9 @@ async function sleep(seconds) {
|
|
|
37916
37962
|
setTimeout(resolve, 1e3 * seconds);
|
|
37917
37963
|
});
|
|
37918
37964
|
}
|
|
37965
|
+
function terminalSupportsHyperlinks() {
|
|
37966
|
+
return import_supports_hyperlinks2.default.stdout;
|
|
37967
|
+
}
|
|
37919
37968
|
function terminalSupportsPrompting() {
|
|
37920
37969
|
return isTruthy(process.env.CI) ? !1 : !!(process.stdin.isTTY && process.stdout.isTTY);
|
|
37921
37970
|
}
|
|
@@ -37938,7 +37987,7 @@ async function localCLIVersion(directory) {
|
|
|
37938
37987
|
}
|
|
37939
37988
|
async function globalCLIVersion() {
|
|
37940
37989
|
try {
|
|
37941
|
-
let env5 = { ...process.env, SHOPIFY_CLI_NO_ANALYTICS: "1" }, shopifyBinaries = import_which2.default.sync("shopify", { all: !0 }).filter((
|
|
37990
|
+
let env5 = { ...process.env, SHOPIFY_CLI_NO_ANALYTICS: "1" }, shopifyBinaries = import_which2.default.sync("shopify", { all: !0 }).filter((path7) => !path7.includes("node_modules"));
|
|
37942
37991
|
if (!shopifyBinaries[0])
|
|
37943
37992
|
return;
|
|
37944
37993
|
let versionMatch = (await captureOutput(shopifyBinaries[0], [], { env: env5 })).match(/@shopify\/cli\/([^\s]+)/);
|
|
@@ -37969,7 +38018,7 @@ function currentProcessIsGlobal(argv = process.argv) {
|
|
|
37969
38018
|
try {
|
|
37970
38019
|
if (_isGlobal !== void 0 && !isUnitTest())
|
|
37971
38020
|
return _isGlobal;
|
|
37972
|
-
let
|
|
38021
|
+
let path7 = sniffForPath() ?? cwd(), projectDir = getProjectDir(path7);
|
|
37973
38022
|
return projectDir ? (_isGlobal = !(argv[1] ?? "").startsWith(projectDir.trim()), _isGlobal) : !0;
|
|
37974
38023
|
} catch {
|
|
37975
38024
|
return !1;
|
|
@@ -38022,96 +38071,7 @@ init_cjs_shims();
|
|
|
38022
38071
|
|
|
38023
38072
|
// ../cli-kit/dist/private/node/content-tokens.js
|
|
38024
38073
|
init_cjs_shims();
|
|
38025
|
-
|
|
38026
|
-
// ../../node_modules/.pnpm/terminal-link@3.0.0/node_modules/terminal-link/index.js
|
|
38027
|
-
init_cjs_shims();
|
|
38028
|
-
|
|
38029
|
-
// ../../node_modules/.pnpm/ansi-escapes@5.0.0/node_modules/ansi-escapes/index.js
|
|
38030
|
-
init_cjs_shims();
|
|
38031
|
-
var isTerminalApp3 = process.env.TERM_PROGRAM === "Apple_Terminal", ansiEscapes2 = {};
|
|
38032
|
-
ansiEscapes2.cursorTo = (x, y) => {
|
|
38033
|
-
if (typeof x != "number")
|
|
38034
|
-
throw new TypeError("The `x` argument is required");
|
|
38035
|
-
return typeof y != "number" ? "\x1B[" + (x + 1) + "G" : "\x1B[" + (y + 1) + ";" + (x + 1) + "H";
|
|
38036
|
-
};
|
|
38037
|
-
ansiEscapes2.cursorMove = (x, y) => {
|
|
38038
|
-
if (typeof x != "number")
|
|
38039
|
-
throw new TypeError("The `x` argument is required");
|
|
38040
|
-
let returnValue = "";
|
|
38041
|
-
return x < 0 ? returnValue += "\x1B[" + -x + "D" : x > 0 && (returnValue += "\x1B[" + x + "C"), y < 0 ? returnValue += "\x1B[" + -y + "A" : y > 0 && (returnValue += "\x1B[" + y + "B"), returnValue;
|
|
38042
|
-
};
|
|
38043
|
-
ansiEscapes2.cursorUp = (count = 1) => "\x1B[" + count + "A";
|
|
38044
|
-
ansiEscapes2.cursorDown = (count = 1) => "\x1B[" + count + "B";
|
|
38045
|
-
ansiEscapes2.cursorForward = (count = 1) => "\x1B[" + count + "C";
|
|
38046
|
-
ansiEscapes2.cursorBackward = (count = 1) => "\x1B[" + count + "D";
|
|
38047
|
-
ansiEscapes2.cursorLeft = "\x1B[G";
|
|
38048
|
-
ansiEscapes2.cursorSavePosition = isTerminalApp3 ? "\x1B7" : "\x1B[s";
|
|
38049
|
-
ansiEscapes2.cursorRestorePosition = isTerminalApp3 ? "\x1B8" : "\x1B[u";
|
|
38050
|
-
ansiEscapes2.cursorGetPosition = "\x1B[6n";
|
|
38051
|
-
ansiEscapes2.cursorNextLine = "\x1B[E";
|
|
38052
|
-
ansiEscapes2.cursorPrevLine = "\x1B[F";
|
|
38053
|
-
ansiEscapes2.cursorHide = "\x1B[?25l";
|
|
38054
|
-
ansiEscapes2.cursorShow = "\x1B[?25h";
|
|
38055
|
-
ansiEscapes2.eraseLines = (count) => {
|
|
38056
|
-
let clear = "";
|
|
38057
|
-
for (let i = 0; i < count; i++)
|
|
38058
|
-
clear += ansiEscapes2.eraseLine + (i < count - 1 ? ansiEscapes2.cursorUp() : "");
|
|
38059
|
-
return count && (clear += ansiEscapes2.cursorLeft), clear;
|
|
38060
|
-
};
|
|
38061
|
-
ansiEscapes2.eraseEndLine = "\x1B[K";
|
|
38062
|
-
ansiEscapes2.eraseStartLine = "\x1B[1K";
|
|
38063
|
-
ansiEscapes2.eraseLine = "\x1B[2K";
|
|
38064
|
-
ansiEscapes2.eraseDown = "\x1B[J";
|
|
38065
|
-
ansiEscapes2.eraseUp = "\x1B[1J";
|
|
38066
|
-
ansiEscapes2.eraseScreen = "\x1B[2J";
|
|
38067
|
-
ansiEscapes2.scrollUp = "\x1B[S";
|
|
38068
|
-
ansiEscapes2.scrollDown = "\x1B[T";
|
|
38069
|
-
ansiEscapes2.clearScreen = "\x1Bc";
|
|
38070
|
-
ansiEscapes2.clearTerminal = process.platform === "win32" ? `${ansiEscapes2.eraseScreen}\x1B[0f` : (
|
|
38071
|
-
// 1. Erases the screen (Only done in case `2` is not supported)
|
|
38072
|
-
// 2. Erases the whole screen including scrollback buffer
|
|
38073
|
-
// 3. Moves cursor to the top-left position
|
|
38074
|
-
// More info: https://www.real-world-systems.com/docs/ANSIcode.html
|
|
38075
|
-
`${ansiEscapes2.eraseScreen}\x1B[3J\x1B[H`
|
|
38076
|
-
);
|
|
38077
|
-
ansiEscapes2.beep = "\x07";
|
|
38078
|
-
ansiEscapes2.link = (text, url) => [
|
|
38079
|
-
"\x1B]",
|
|
38080
|
-
"8",
|
|
38081
|
-
";",
|
|
38082
|
-
";",
|
|
38083
|
-
url,
|
|
38084
|
-
"\x07",
|
|
38085
|
-
text,
|
|
38086
|
-
"\x1B]",
|
|
38087
|
-
"8",
|
|
38088
|
-
";",
|
|
38089
|
-
";",
|
|
38090
|
-
"\x07"
|
|
38091
|
-
].join("");
|
|
38092
|
-
ansiEscapes2.image = (buffer, options = {}) => {
|
|
38093
|
-
let returnValue = "\x1B]1337;File=inline=1";
|
|
38094
|
-
return options.width && (returnValue += `;width=${options.width}`), options.height && (returnValue += `;height=${options.height}`), options.preserveAspectRatio === !1 && (returnValue += ";preserveAspectRatio=0"), returnValue + ":" + buffer.toString("base64") + "\x07";
|
|
38095
|
-
};
|
|
38096
|
-
ansiEscapes2.iTerm = {
|
|
38097
|
-
setCwd: (cwd3 = process.cwd()) => `\x1B]50;CurrentDir=${cwd3}\x07`,
|
|
38098
|
-
annotation: (message, options = {}) => {
|
|
38099
|
-
let returnValue = "\x1B]1337;", hasX = typeof options.x < "u", hasY = typeof options.y < "u";
|
|
38100
|
-
if ((hasX || hasY) && !(hasX && hasY && typeof options.length < "u"))
|
|
38101
|
-
throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
|
|
38102
|
-
return message = message.replace(/\|/g, ""), returnValue += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=", options.length > 0 ? returnValue += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|") : returnValue += message, returnValue + "\x07";
|
|
38103
|
-
}
|
|
38104
|
-
};
|
|
38105
|
-
var ansi_escapes_default2 = ansiEscapes2;
|
|
38106
|
-
|
|
38107
|
-
// ../../node_modules/.pnpm/terminal-link@3.0.0/node_modules/terminal-link/index.js
|
|
38108
|
-
var import_supports_hyperlinks2 = __toESM(require_supports_hyperlinks(), 1);
|
|
38109
|
-
function terminalLink(text, url, { target = "stdout", ...options } = {}) {
|
|
38110
|
-
return import_supports_hyperlinks2.default[target] ? ansi_escapes_default2.link(text, url) : options.fallback === !1 ? text : typeof options.fallback == "function" ? options.fallback(text, url) : `${text} (\u200B${url}\u200B)`;
|
|
38111
|
-
}
|
|
38112
|
-
terminalLink.isSupported = import_supports_hyperlinks2.default.stdout;
|
|
38113
|
-
terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, { target: "stderr", ...options });
|
|
38114
|
-
terminalLink.stderr.isSupported = import_supports_hyperlinks2.default.stderr;
|
|
38074
|
+
var import_supports_hyperlinks3 = __toESM(require_supports_hyperlinks(), 1);
|
|
38115
38075
|
|
|
38116
38076
|
// ../../node_modules/.pnpm/color-json@3.0.5/node_modules/color-json/index.js
|
|
38117
38077
|
init_cjs_shims();
|
|
@@ -38166,7 +38126,7 @@ var ContentToken = class {
|
|
|
38166
38126
|
}
|
|
38167
38127
|
output() {
|
|
38168
38128
|
let text = source_default2.green(stringifyMessage(this.value)), url = this.link ?? "", defaultFallback = this.value === this.link ? text : `${text} ( ${url} )`;
|
|
38169
|
-
return
|
|
38129
|
+
return import_supports_hyperlinks3.default.stdout ? ansi_escapes_default.link(text, url) : this.fallback ?? defaultFallback;
|
|
38170
38130
|
}
|
|
38171
38131
|
}, CommandContentToken = class extends ContentToken {
|
|
38172
38132
|
output() {
|
|
@@ -38391,6 +38351,12 @@ function formatSection(title, body) {
|
|
|
38391
38351
|
return outputContent`${outputToken.heading(formattedTitle)}\n${body}`.value;
|
|
38392
38352
|
}
|
|
38393
38353
|
|
|
38354
|
+
// ../cli-kit/dist/private/node/temp-dir.js
|
|
38355
|
+
init_cjs_shims();
|
|
38356
|
+
import { realpath } from "fs/promises";
|
|
38357
|
+
import { tmpdir as tmpdir2 } from "os";
|
|
38358
|
+
var systemTempDir = await realpath(tmpdir2());
|
|
38359
|
+
|
|
38394
38360
|
// ../../node_modules/.pnpm/fs-extra@11.1.0/node_modules/fs-extra/lib/esm.mjs
|
|
38395
38361
|
init_cjs_shims();
|
|
38396
38362
|
var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_empty(), 1), import_ensure = __toESM(require_ensure(), 1), import_json = __toESM(require_json(), 1), import_mkdirs = __toESM(require_mkdirs(), 1), import_move = __toESM(require_move2(), 1), import_output_file = __toESM(require_output_file(), 1), import_path_exists = __toESM(require_path_exists(), 1), import_remove = __toESM(require_remove(), 1), copy = import_copy.default.copy, copySync = import_copy.default.copySync, emptyDirSync = import_empty.default.emptyDirSync, emptydirSync = import_empty.default.emptydirSync, emptyDir = import_empty.default.emptyDir, emptydir = import_empty.default.emptydir, createFile = import_ensure.default.createFile, createFileSync = import_ensure.default.createFileSync, ensureFile = import_ensure.default.ensureFile, ensureFileSync = import_ensure.default.ensureFileSync, createLink = import_ensure.default.createLink, createLinkSync = import_ensure.default.createLinkSync, ensureLink = import_ensure.default.ensureLink, ensureLinkSync = import_ensure.default.ensureLinkSync, createSymlink = import_ensure.default.createSymlink, createSymlinkSync = import_ensure.default.createSymlinkSync, ensureSymlink = import_ensure.default.ensureSymlink, ensureSymlinkSync = import_ensure.default.ensureSymlinkSync, readJson = import_json.default.readJson, readJSON = import_json.default.readJSON, readJsonSync = import_json.default.readJsonSync, readJSONSync = import_json.default.readJSONSync, writeJson = import_json.default.writeJson, writeJSON = import_json.default.writeJSON, writeJsonSync = import_json.default.writeJsonSync, writeJSONSync = import_json.default.writeJSONSync, outputJson = import_json.default.outputJson, outputJSON = import_json.default.outputJSON, outputJsonSync = import_json.default.outputJsonSync, outputJSONSync = import_json.default.outputJSONSync, mkdirs = import_mkdirs.default.mkdirs, mkdirsSync = import_mkdirs.default.mkdirsSync, mkdirp = import_mkdirs.default.mkdirp, mkdirpSync = import_mkdirs.default.mkdirpSync, ensureDir = import_mkdirs.default.ensureDir, ensureDirSync = import_mkdirs.default.ensureDirSync, move = import_move.default.move, moveSync = import_move.default.moveSync, outputFile = import_output_file.default.outputFile, outputFileSync = import_output_file.default.outputFileSync, pathExists = import_path_exists.default.pathExists, pathExistsSync = import_path_exists.default.pathExistsSync, remove = import_remove.default.remove, removeSync = import_remove.default.removeSync, esm_default = {
|
|
@@ -38405,118 +38371,16 @@ var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_em
|
|
|
38405
38371
|
...import_remove.default
|
|
38406
38372
|
};
|
|
38407
38373
|
|
|
38408
|
-
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
38409
|
-
init_cjs_shims();
|
|
38410
|
-
import fs4 from "node:fs";
|
|
38411
|
-
import fsPromises from "node:fs/promises";
|
|
38412
|
-
import path4 from "node:path";
|
|
38413
|
-
import stream from "node:stream";
|
|
38414
|
-
import { promisify as promisify2 } from "node:util";
|
|
38415
|
-
|
|
38416
|
-
// ../../node_modules/.pnpm/unique-string@3.0.0/node_modules/unique-string/index.js
|
|
38417
|
-
init_cjs_shims();
|
|
38418
|
-
|
|
38419
|
-
// ../../node_modules/.pnpm/crypto-random-string@4.0.0/node_modules/crypto-random-string/index.js
|
|
38420
|
-
init_cjs_shims();
|
|
38421
|
-
import { promisify } from "util";
|
|
38422
|
-
import crypto from "crypto";
|
|
38423
|
-
var randomBytesAsync = promisify(crypto.randomBytes), urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""), numericCharacters = "0123456789".split(""), distinguishableCharacters = "CDEHKMPRTUWXY012458".split(""), asciiPrintableCharacters = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".split(""), alphanumericCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), generateForCustomCharacters = (length, characters) => {
|
|
38424
|
-
let characterCount = characters.length, maxValidSelector = Math.floor(65536 / characterCount) * characterCount - 1, entropyLength = 2 * Math.ceil(1.1 * length), string = "", stringLength = 0;
|
|
38425
|
-
for (; stringLength < length; ) {
|
|
38426
|
-
let entropy = crypto.randomBytes(entropyLength), entropyPosition = 0;
|
|
38427
|
-
for (; entropyPosition < entropyLength && stringLength < length; ) {
|
|
38428
|
-
let entropyValue = entropy.readUInt16LE(entropyPosition);
|
|
38429
|
-
entropyPosition += 2, !(entropyValue > maxValidSelector) && (string += characters[entropyValue % characterCount], stringLength++);
|
|
38430
|
-
}
|
|
38431
|
-
}
|
|
38432
|
-
return string;
|
|
38433
|
-
}, generateForCustomCharactersAsync = async (length, characters) => {
|
|
38434
|
-
let characterCount = characters.length, maxValidSelector = Math.floor(65536 / characterCount) * characterCount - 1, entropyLength = 2 * Math.ceil(1.1 * length), string = "", stringLength = 0;
|
|
38435
|
-
for (; stringLength < length; ) {
|
|
38436
|
-
let entropy = await randomBytesAsync(entropyLength), entropyPosition = 0;
|
|
38437
|
-
for (; entropyPosition < entropyLength && stringLength < length; ) {
|
|
38438
|
-
let entropyValue = entropy.readUInt16LE(entropyPosition);
|
|
38439
|
-
entropyPosition += 2, !(entropyValue > maxValidSelector) && (string += characters[entropyValue % characterCount], stringLength++);
|
|
38440
|
-
}
|
|
38441
|
-
}
|
|
38442
|
-
return string;
|
|
38443
|
-
}, generateRandomBytes = (byteLength, type, length) => crypto.randomBytes(byteLength).toString(type).slice(0, length), generateRandomBytesAsync = async (byteLength, type, length) => (await randomBytesAsync(byteLength)).toString(type).slice(0, length), allowedTypes = /* @__PURE__ */ new Set([
|
|
38444
|
-
void 0,
|
|
38445
|
-
"hex",
|
|
38446
|
-
"base64",
|
|
38447
|
-
"url-safe",
|
|
38448
|
-
"numeric",
|
|
38449
|
-
"distinguishable",
|
|
38450
|
-
"ascii-printable",
|
|
38451
|
-
"alphanumeric"
|
|
38452
|
-
]), createGenerator = (generateForCustomCharacters2, generateRandomBytes2) => ({ length, type, characters }) => {
|
|
38453
|
-
if (!(length >= 0 && Number.isFinite(length)))
|
|
38454
|
-
throw new TypeError("Expected a `length` to be a non-negative finite number");
|
|
38455
|
-
if (type !== void 0 && characters !== void 0)
|
|
38456
|
-
throw new TypeError("Expected either `type` or `characters`");
|
|
38457
|
-
if (characters !== void 0 && typeof characters != "string")
|
|
38458
|
-
throw new TypeError("Expected `characters` to be string");
|
|
38459
|
-
if (!allowedTypes.has(type))
|
|
38460
|
-
throw new TypeError(`Unknown type: ${type}`);
|
|
38461
|
-
if (type === void 0 && characters === void 0 && (type = "hex"), type === "hex" || type === void 0 && characters === void 0)
|
|
38462
|
-
return generateRandomBytes2(Math.ceil(length * 0.5), "hex", length);
|
|
38463
|
-
if (type === "base64")
|
|
38464
|
-
return generateRandomBytes2(Math.ceil(length * 0.75), "base64", length);
|
|
38465
|
-
if (type === "url-safe")
|
|
38466
|
-
return generateForCustomCharacters2(length, urlSafeCharacters);
|
|
38467
|
-
if (type === "numeric")
|
|
38468
|
-
return generateForCustomCharacters2(length, numericCharacters);
|
|
38469
|
-
if (type === "distinguishable")
|
|
38470
|
-
return generateForCustomCharacters2(length, distinguishableCharacters);
|
|
38471
|
-
if (type === "ascii-printable")
|
|
38472
|
-
return generateForCustomCharacters2(length, asciiPrintableCharacters);
|
|
38473
|
-
if (type === "alphanumeric")
|
|
38474
|
-
return generateForCustomCharacters2(length, alphanumericCharacters);
|
|
38475
|
-
if (characters.length === 0)
|
|
38476
|
-
throw new TypeError("Expected `characters` string length to be greater than or equal to 1");
|
|
38477
|
-
if (characters.length > 65536)
|
|
38478
|
-
throw new TypeError("Expected `characters` string length to be less or equal to 65536");
|
|
38479
|
-
return generateForCustomCharacters2(length, characters.split(""));
|
|
38480
|
-
}, cryptoRandomString = createGenerator(generateForCustomCharacters, generateRandomBytes);
|
|
38481
|
-
cryptoRandomString.async = createGenerator(generateForCustomCharactersAsync, generateRandomBytesAsync);
|
|
38482
|
-
var crypto_random_string_default = cryptoRandomString;
|
|
38483
|
-
|
|
38484
|
-
// ../../node_modules/.pnpm/unique-string@3.0.0/node_modules/unique-string/index.js
|
|
38485
|
-
function uniqueString() {
|
|
38486
|
-
return crypto_random_string_default({ length: 32 });
|
|
38487
|
-
}
|
|
38488
|
-
|
|
38489
|
-
// ../../node_modules/.pnpm/temp-dir@3.0.0/node_modules/temp-dir/index.js
|
|
38490
|
-
init_cjs_shims();
|
|
38491
|
-
import { promises as fs3 } from "node:fs";
|
|
38492
|
-
import os6 from "node:os";
|
|
38493
|
-
var temporaryDirectory = await fs3.realpath(os6.tmpdir()), temp_dir_default = temporaryDirectory;
|
|
38494
|
-
|
|
38495
|
-
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
38496
|
-
var pipeline = promisify2(stream.pipeline), getPath = (prefix = "") => path4.join(temp_dir_default, prefix + uniqueString());
|
|
38497
|
-
async function runTask2(temporaryPath, callback) {
|
|
38498
|
-
try {
|
|
38499
|
-
return await callback(temporaryPath);
|
|
38500
|
-
} finally {
|
|
38501
|
-
await fsPromises.rm(temporaryPath, { recursive: !0, force: !0, maxRetries: 2 });
|
|
38502
|
-
}
|
|
38503
|
-
}
|
|
38504
|
-
function temporaryDirectory2({ prefix = "" } = {}) {
|
|
38505
|
-
let directory = getPath(prefix);
|
|
38506
|
-
return fs4.mkdirSync(directory), directory;
|
|
38507
|
-
}
|
|
38508
|
-
var temporaryDirectoryTask = async (callback, options) => runTask2(temporaryDirectory2(options), callback);
|
|
38509
|
-
|
|
38510
38374
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
38511
38375
|
init_cjs_shims();
|
|
38512
|
-
import
|
|
38376
|
+
import path5 from "node:path";
|
|
38513
38377
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
38514
38378
|
|
|
38515
38379
|
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
38516
38380
|
init_cjs_shims();
|
|
38517
38381
|
import process23 from "node:process";
|
|
38518
|
-
import
|
|
38519
|
-
import
|
|
38382
|
+
import path4 from "node:path";
|
|
38383
|
+
import fs3, { promises as fsPromises } from "node:fs";
|
|
38520
38384
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
38521
38385
|
|
|
38522
38386
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
@@ -38648,10 +38512,10 @@ async function locatePath(paths, {
|
|
|
38648
38512
|
preserveOrder
|
|
38649
38513
|
} = {}) {
|
|
38650
38514
|
checkType(type), cwd3 = toPath(cwd3);
|
|
38651
|
-
let statFunction = allowSymlinks ?
|
|
38515
|
+
let statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;
|
|
38652
38516
|
return pLocate(paths, async (path_) => {
|
|
38653
38517
|
try {
|
|
38654
|
-
let stat = await statFunction(
|
|
38518
|
+
let stat = await statFunction(path4.resolve(cwd3, path_));
|
|
38655
38519
|
return matchType(type, stat);
|
|
38656
38520
|
} catch {
|
|
38657
38521
|
return !1;
|
|
@@ -38664,10 +38528,10 @@ function locatePathSync(paths, {
|
|
|
38664
38528
|
allowSymlinks = !0
|
|
38665
38529
|
} = {}) {
|
|
38666
38530
|
checkType(type), cwd3 = toPath(cwd3);
|
|
38667
|
-
let statFunction = allowSymlinks ?
|
|
38531
|
+
let statFunction = allowSymlinks ? fs3.statSync : fs3.lstatSync;
|
|
38668
38532
|
for (let path_ of paths)
|
|
38669
38533
|
try {
|
|
38670
|
-
let stat = statFunction(
|
|
38534
|
+
let stat = statFunction(path4.resolve(cwd3, path_), {
|
|
38671
38535
|
throwIfNoEntry: !1
|
|
38672
38536
|
});
|
|
38673
38537
|
if (!stat)
|
|
@@ -38684,7 +38548,7 @@ init_cjs_shims();
|
|
|
38684
38548
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
38685
38549
|
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath3(urlOrPath) : urlOrPath, findUpStop = /* @__PURE__ */ Symbol("findUpStop");
|
|
38686
38550
|
async function findUpMultiple(name, options = {}) {
|
|
38687
|
-
let directory =
|
|
38551
|
+
let directory = path5.resolve(toPath2(options.cwd) || ""), { root } = path5.parse(directory), stopAt = path5.resolve(directory, options.stopAt || root), limit = options.limit || Number.POSITIVE_INFINITY, paths = [name].flat(), runMatcher = async (locateOptions) => {
|
|
38688
38552
|
if (typeof name != "function")
|
|
38689
38553
|
return locatePath(paths, locateOptions);
|
|
38690
38554
|
let foundPath = await name(locateOptions.cwd);
|
|
@@ -38692,14 +38556,14 @@ async function findUpMultiple(name, options = {}) {
|
|
|
38692
38556
|
}, matches = [];
|
|
38693
38557
|
for (; ; ) {
|
|
38694
38558
|
let foundPath = await runMatcher({ ...options, cwd: directory });
|
|
38695
|
-
if (foundPath === findUpStop || (foundPath && matches.push(
|
|
38559
|
+
if (foundPath === findUpStop || (foundPath && matches.push(path5.resolve(directory, foundPath)), directory === stopAt || matches.length >= limit))
|
|
38696
38560
|
break;
|
|
38697
|
-
directory =
|
|
38561
|
+
directory = path5.dirname(directory);
|
|
38698
38562
|
}
|
|
38699
38563
|
return matches;
|
|
38700
38564
|
}
|
|
38701
38565
|
function findUpMultipleSync(name, options = {}) {
|
|
38702
|
-
let directory =
|
|
38566
|
+
let directory = path5.resolve(toPath2(options.cwd) || ""), { root } = path5.parse(directory), stopAt = options.stopAt || root, limit = options.limit || Number.POSITIVE_INFINITY, paths = [name].flat(), runMatcher = (locateOptions) => {
|
|
38703
38567
|
if (typeof name != "function")
|
|
38704
38568
|
return locatePathSync(paths, locateOptions);
|
|
38705
38569
|
let foundPath = name(locateOptions.cwd);
|
|
@@ -38707,9 +38571,9 @@ function findUpMultipleSync(name, options = {}) {
|
|
|
38707
38571
|
}, matches = [];
|
|
38708
38572
|
for (; ; ) {
|
|
38709
38573
|
let foundPath = runMatcher({ ...options, cwd: directory });
|
|
38710
|
-
if (foundPath === findUpStop || (foundPath && matches.push(
|
|
38574
|
+
if (foundPath === findUpStop || (foundPath && matches.push(path5.resolve(directory, foundPath)), directory === stopAt || matches.length >= limit))
|
|
38711
38575
|
break;
|
|
38712
|
-
directory =
|
|
38576
|
+
directory = path5.dirname(directory);
|
|
38713
38577
|
}
|
|
38714
38578
|
return matches;
|
|
38715
38579
|
}
|
|
@@ -39381,10 +39245,10 @@ var minimatch = (p, pattern, options = {}) => (assertValidPattern(pattern), !opt
|
|
|
39381
39245
|
}, qmarksTestNoExtDot = ([$0]) => {
|
|
39382
39246
|
let len = $0.length;
|
|
39383
39247
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
39384
|
-
}, defaultPlatform = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix",
|
|
39248
|
+
}, defaultPlatform = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", path6 = {
|
|
39385
39249
|
win32: { sep: "\\" },
|
|
39386
39250
|
posix: { sep: "/" }
|
|
39387
|
-
}, sep = defaultPlatform === "win32" ?
|
|
39251
|
+
}, sep = defaultPlatform === "win32" ? path6.win32.sep : path6.posix.sep;
|
|
39388
39252
|
minimatch.sep = sep;
|
|
39389
39253
|
var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
|
|
39390
39254
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -39841,87 +39705,92 @@ minimatch.unescape = unescape2;
|
|
|
39841
39705
|
|
|
39842
39706
|
// ../cli-kit/dist/public/node/fs.js
|
|
39843
39707
|
var import_fast_glob = __toESM(require_out(), 1);
|
|
39844
|
-
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, accessSync, statSync } from "fs";
|
|
39708
|
+
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, mkdtempSync as fsMkdtempSync, accessSync, statSync } from "fs";
|
|
39845
39709
|
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, rm as fsRm, readdir as fsReaddir, symlink as fsSymlink } from "fs/promises";
|
|
39846
39710
|
async function inTemporaryDirectory(callback) {
|
|
39847
|
-
|
|
39711
|
+
let tmpDir = await fsMkdtemp(join(systemTempDir, "tmp-"));
|
|
39712
|
+
try {
|
|
39713
|
+
return await callback(tmpDir);
|
|
39714
|
+
} finally {
|
|
39715
|
+
await fsRm(tmpDir, { recursive: !0, force: !0, maxRetries: 2 });
|
|
39716
|
+
}
|
|
39848
39717
|
}
|
|
39849
39718
|
function tempDirectory() {
|
|
39850
|
-
return
|
|
39719
|
+
return fsMkdtempSync(join(systemTempDir, "tmp-"));
|
|
39851
39720
|
}
|
|
39852
|
-
async function readFile(
|
|
39853
|
-
return outputDebug(outputContent`Reading the content of file at ${outputToken.path(
|
|
39721
|
+
async function readFile(path7, options = { encoding: "utf8" }) {
|
|
39722
|
+
return outputDebug(outputContent`Reading the content of file at ${outputToken.path(path7)}...`), fsReadFile(path7, options);
|
|
39854
39723
|
}
|
|
39855
|
-
function readFileSync3(
|
|
39856
|
-
return outputDebug(outputContent`Sync-reading the content of file at ${outputToken.path(
|
|
39724
|
+
function readFileSync3(path7) {
|
|
39725
|
+
return outputDebug(outputContent`Sync-reading the content of file at ${outputToken.path(path7)}...`), fsReadFileSync(path7);
|
|
39857
39726
|
}
|
|
39858
|
-
async function fileRealPath(
|
|
39859
|
-
return fsRealPath(
|
|
39727
|
+
async function fileRealPath(path7) {
|
|
39728
|
+
return fsRealPath(path7);
|
|
39860
39729
|
}
|
|
39861
39730
|
async function copyFile(from, to) {
|
|
39862
39731
|
outputDebug(outputContent`Copying file from ${outputToken.path(from)} to ${outputToken.path(to)}...`), await copy(from, to);
|
|
39863
39732
|
}
|
|
39864
|
-
async function touchFile(
|
|
39865
|
-
outputDebug(outputContent`Creating an empty file at ${outputToken.path(
|
|
39733
|
+
async function touchFile(path7) {
|
|
39734
|
+
outputDebug(outputContent`Creating an empty file at ${outputToken.path(path7)}...`), await ensureFile(path7);
|
|
39866
39735
|
}
|
|
39867
|
-
async function appendFile(
|
|
39868
|
-
outputDebug(outputContent`Appending the following content to ${outputToken.path(
|
|
39736
|
+
async function appendFile(path7, content) {
|
|
39737
|
+
outputDebug(outputContent`Appending the following content to ${outputToken.path(path7)}:
|
|
39869
39738
|
${content.split(`
|
|
39870
39739
|
`).map((line) => ` ${line}`).join(`
|
|
39871
39740
|
`)}
|
|
39872
|
-
`), await fsAppendFile(
|
|
39741
|
+
`), await fsAppendFile(path7, content);
|
|
39873
39742
|
}
|
|
39874
|
-
async function writeFile(
|
|
39875
|
-
outputDebug(outputContent`Writing some content to file at ${outputToken.path(
|
|
39743
|
+
async function writeFile(path7, data, options = { encoding: "utf8" }) {
|
|
39744
|
+
outputDebug(outputContent`Writing some content to file at ${outputToken.path(path7)}...`), await fsWriteFile(path7, data, options);
|
|
39876
39745
|
}
|
|
39877
|
-
function writeFileSync(
|
|
39878
|
-
outputDebug(outputContent`File-writing some content to file at ${outputToken.path(
|
|
39746
|
+
function writeFileSync(path7, data) {
|
|
39747
|
+
outputDebug(outputContent`File-writing some content to file at ${outputToken.path(path7)}...`), fsWriteFileSync(path7, data);
|
|
39879
39748
|
}
|
|
39880
|
-
async function mkdir(
|
|
39881
|
-
outputDebug(outputContent`Creating directory at ${outputToken.path(
|
|
39749
|
+
async function mkdir(path7) {
|
|
39750
|
+
outputDebug(outputContent`Creating directory at ${outputToken.path(path7)}...`), await fsMkdir(path7, { recursive: !0 });
|
|
39882
39751
|
}
|
|
39883
|
-
async function removeFile(
|
|
39884
|
-
outputDebug(outputContent`Removing file at ${outputToken.path(
|
|
39752
|
+
async function removeFile(path7) {
|
|
39753
|
+
outputDebug(outputContent`Removing file at ${outputToken.path(path7)}...`), await remove(path7);
|
|
39885
39754
|
}
|
|
39886
|
-
async function symlink(target,
|
|
39887
|
-
outputDebug(outputContent`Creating symbolic link from ${outputToken.path(
|
|
39755
|
+
async function symlink(target, path7) {
|
|
39756
|
+
outputDebug(outputContent`Creating symbolic link from ${outputToken.path(path7)} to ${outputToken.path(target)}...`);
|
|
39888
39757
|
let type = "file";
|
|
39889
39758
|
try {
|
|
39890
39759
|
(await fsLstat(target)).isDirectory() && (type = "junction");
|
|
39891
39760
|
} catch {
|
|
39892
39761
|
}
|
|
39893
|
-
await fsSymlink(target,
|
|
39762
|
+
await fsSymlink(target, path7, type);
|
|
39894
39763
|
}
|
|
39895
|
-
function removeFileSync(
|
|
39896
|
-
outputDebug(outputContent`Sync-removing file at ${outputToken.path(
|
|
39764
|
+
function removeFileSync(path7) {
|
|
39765
|
+
outputDebug(outputContent`Sync-removing file at ${outputToken.path(path7)}...`), removeSync(path7);
|
|
39897
39766
|
}
|
|
39898
|
-
async function rmdir(
|
|
39899
|
-
outputDebug(outputContent`Removing directory at ${outputToken.path(
|
|
39767
|
+
async function rmdir(path7, options = {}) {
|
|
39768
|
+
outputDebug(outputContent`Removing directory at ${outputToken.path(path7)}...`), await fsRm(path7, { recursive: !0, force: options.force ?? !0 });
|
|
39900
39769
|
}
|
|
39901
|
-
async function isDirectory(
|
|
39902
|
-
return outputDebug(outputContent`Checking if ${outputToken.path(
|
|
39770
|
+
async function isDirectory(path7) {
|
|
39771
|
+
return outputDebug(outputContent`Checking if ${outputToken.path(path7)} is a directory...`), (await fsLstat(path7)).isDirectory();
|
|
39903
39772
|
}
|
|
39904
|
-
function isDirectorySync(
|
|
39905
|
-
return outputDebug(outputContent`Checking if ${outputToken.path(
|
|
39773
|
+
function isDirectorySync(path7) {
|
|
39774
|
+
return outputDebug(outputContent`Checking if ${outputToken.path(path7)} is a directory...`), fsStatSync(path7).isDirectory();
|
|
39906
39775
|
}
|
|
39907
|
-
async function fileSize(
|
|
39908
|
-
return outputDebug(outputContent`Getting the size of file file at ${outputToken.path(
|
|
39776
|
+
async function fileSize(path7) {
|
|
39777
|
+
return outputDebug(outputContent`Getting the size of file file at ${outputToken.path(path7)}...`), (await fsStat(path7)).size;
|
|
39909
39778
|
}
|
|
39910
|
-
function unlinkFile(
|
|
39911
|
-
return fsUnlink(
|
|
39779
|
+
function unlinkFile(path7) {
|
|
39780
|
+
return fsUnlink(path7);
|
|
39912
39781
|
}
|
|
39913
|
-
function createFileReadStream(
|
|
39914
|
-
return fsCreateReadStream(
|
|
39782
|
+
function createFileReadStream(path7, options) {
|
|
39783
|
+
return fsCreateReadStream(path7, options);
|
|
39915
39784
|
}
|
|
39916
|
-
function createFileWriteStream(
|
|
39917
|
-
return fsCreateWriteStream(
|
|
39785
|
+
function createFileWriteStream(path7) {
|
|
39786
|
+
return fsCreateWriteStream(path7);
|
|
39918
39787
|
}
|
|
39919
|
-
async function fileLastUpdated(
|
|
39920
|
-
return outputDebug(outputContent`Getting last updated timestamp for file at ${outputToken.path(
|
|
39788
|
+
async function fileLastUpdated(path7) {
|
|
39789
|
+
return outputDebug(outputContent`Getting last updated timestamp for file at ${outputToken.path(path7)}...`), (await fsStat(path7)).ctime;
|
|
39921
39790
|
}
|
|
39922
|
-
async function fileLastUpdatedTimestamp(
|
|
39791
|
+
async function fileLastUpdatedTimestamp(path7) {
|
|
39923
39792
|
try {
|
|
39924
|
-
return (await fileLastUpdated(
|
|
39793
|
+
return (await fileLastUpdated(path7)).getTime();
|
|
39925
39794
|
} catch {
|
|
39926
39795
|
return;
|
|
39927
39796
|
}
|
|
@@ -39929,44 +39798,44 @@ async function fileLastUpdatedTimestamp(path8) {
|
|
|
39929
39798
|
async function moveFile(src, dest, options = {}) {
|
|
39930
39799
|
await move(src, dest, options);
|
|
39931
39800
|
}
|
|
39932
|
-
async function chmod(
|
|
39933
|
-
await fsChmod(
|
|
39801
|
+
async function chmod(path7, mode) {
|
|
39802
|
+
await fsChmod(path7, mode);
|
|
39934
39803
|
}
|
|
39935
|
-
async function fileHasExecutablePermissions(
|
|
39804
|
+
async function fileHasExecutablePermissions(path7) {
|
|
39936
39805
|
try {
|
|
39937
|
-
return await fsAccess(
|
|
39806
|
+
return await fsAccess(path7, fsConstants.X_OK), !0;
|
|
39938
39807
|
} catch {
|
|
39939
39808
|
return !1;
|
|
39940
39809
|
}
|
|
39941
39810
|
}
|
|
39942
|
-
function fileHasWritePermissions(
|
|
39811
|
+
function fileHasWritePermissions(path7) {
|
|
39943
39812
|
try {
|
|
39944
|
-
return accessSync(
|
|
39813
|
+
return accessSync(path7, fsConstants.W_OK), !0;
|
|
39945
39814
|
} catch {
|
|
39946
39815
|
return !1;
|
|
39947
39816
|
}
|
|
39948
39817
|
}
|
|
39949
|
-
function unixFileIsOwnedByCurrentUser(
|
|
39818
|
+
function unixFileIsOwnedByCurrentUser(path7) {
|
|
39950
39819
|
if (!(process.platform === "win32" || typeof process.getuid != "function")) {
|
|
39951
|
-
if (!fileExistsSync(
|
|
39820
|
+
if (!fileExistsSync(path7))
|
|
39952
39821
|
return !1;
|
|
39953
39822
|
try {
|
|
39954
|
-
let stats = statSync(
|
|
39823
|
+
let stats = statSync(path7), currentUid = process.getuid();
|
|
39955
39824
|
return stats.uid === currentUid;
|
|
39956
39825
|
} catch {
|
|
39957
39826
|
return !1;
|
|
39958
39827
|
}
|
|
39959
39828
|
}
|
|
39960
39829
|
}
|
|
39961
|
-
async function fileExists(
|
|
39830
|
+
async function fileExists(path7) {
|
|
39962
39831
|
try {
|
|
39963
|
-
return await fsAccess(
|
|
39832
|
+
return await fsAccess(path7), !0;
|
|
39964
39833
|
} catch {
|
|
39965
39834
|
return !1;
|
|
39966
39835
|
}
|
|
39967
39836
|
}
|
|
39968
|
-
function fileExistsSync(
|
|
39969
|
-
return fsFileExistsSync(
|
|
39837
|
+
function fileExistsSync(path7) {
|
|
39838
|
+
return fsFileExistsSync(path7);
|
|
39970
39839
|
}
|
|
39971
39840
|
async function generateRandomNameForSubdirectory(options) {
|
|
39972
39841
|
let generated = `${getRandomName(options.family ?? "business")}-${options.suffix}`, randomDirectoryPath = joinPath(options.directory, generated);
|
|
@@ -39991,8 +39860,8 @@ function findPathUpSync(matcher, options) {
|
|
|
39991
39860
|
function matchGlob(key, pattern, options) {
|
|
39992
39861
|
return minimatch(key, pattern, options);
|
|
39993
39862
|
}
|
|
39994
|
-
function readdir(
|
|
39995
|
-
return fsReaddir(
|
|
39863
|
+
function readdir(path7) {
|
|
39864
|
+
return fsReaddir(path7);
|
|
39996
39865
|
}
|
|
39997
39866
|
async function copyDirectoryContents(srcDir, destDir) {
|
|
39998
39867
|
if (!await fileExists(srcDir))
|
|
@@ -40006,17 +39875,11 @@ async function copyDirectoryContents(srcDir, destDir) {
|
|
|
40006
39875
|
await Promise.all(filesToCopy);
|
|
40007
39876
|
}
|
|
40008
39877
|
|
|
40009
|
-
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
40010
|
-
init_cjs_shims();
|
|
40011
|
-
function isInteractive({ stream: stream2 = process.stdout } = {}) {
|
|
40012
|
-
return !!(stream2 && stream2.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
|
|
40013
|
-
}
|
|
40014
|
-
|
|
40015
39878
|
// ../cli-kit/dist/public/node/context/local.js
|
|
40016
39879
|
var import_macaddress = __toESM(require_macaddress(), 1);
|
|
40017
39880
|
import { homedir as homedir2 } from "os";
|
|
40018
39881
|
function isTerminalInteractive() {
|
|
40019
|
-
return
|
|
39882
|
+
return !!(process.stdout.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env));
|
|
40020
39883
|
}
|
|
40021
39884
|
function homeDirectory() {
|
|
40022
39885
|
return homedir2();
|
|
@@ -40224,9 +40087,9 @@ export {
|
|
|
40224
40087
|
platformAndArch,
|
|
40225
40088
|
require_lib2 as require_lib,
|
|
40226
40089
|
openURL,
|
|
40227
|
-
captureOutput,
|
|
40228
40090
|
exec4 as exec,
|
|
40229
40091
|
sleep,
|
|
40092
|
+
terminalSupportsHyperlinks,
|
|
40230
40093
|
terminalSupportsPrompting,
|
|
40231
40094
|
isCI,
|
|
40232
40095
|
isWsl,
|
|
@@ -40307,11 +40170,11 @@ export {
|
|
|
40307
40170
|
addPublicMetadata,
|
|
40308
40171
|
addSensitiveMetadata,
|
|
40309
40172
|
runWithTimer,
|
|
40173
|
+
render2 as render,
|
|
40174
|
+
handleCtrlC,
|
|
40310
40175
|
figures_default,
|
|
40311
40176
|
useConcurrentOutputContext,
|
|
40312
40177
|
ConcurrentOutput,
|
|
40313
|
-
render2 as render,
|
|
40314
|
-
handleCtrlC,
|
|
40315
40178
|
TabularData,
|
|
40316
40179
|
Alert,
|
|
40317
40180
|
useAbortSignal,
|
|
@@ -40424,4 +40287,4 @@ react-reconciler/cjs/react-reconciler.development.js:
|
|
|
40424
40287
|
* LICENSE file in the root directory of this source tree.
|
|
40425
40288
|
*)
|
|
40426
40289
|
*/
|
|
40427
|
-
//# sourceMappingURL=chunk-
|
|
40290
|
+
//# sourceMappingURL=chunk-3QXHJGOG.js.map
|