@shopify/create-app 3.84.2 → 3.85.1
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/README.md +1 -1
- package/dist/{chunk-SLM4SKAZ.js → chunk-345OYFTI.js} +13 -12
- package/dist/{chunk-UVDRANBC.js → chunk-BPVVHBDS.js} +742 -666
- package/dist/{chunk-H3GWNOGA.js → chunk-G5HUFNZJ.js} +577 -750
- package/dist/{chunk-5OIQQPNB.js → chunk-K6GH3OTA.js} +5290 -1918
- package/dist/{chunk-REUQOPSX.js → chunk-LSGUB77H.js} +39 -15
- package/dist/{chunk-QPODWYGT.js → chunk-OF4U7FDV.js} +5 -5
- package/dist/{chunk-X3DDDXQD.js → chunk-UW5PDMY2.js} +183 -39
- package/dist/{custom-oclif-loader-IJRHD7VF.js → custom-oclif-loader-CPWFMSSL.js} +3 -3
- package/dist/{error-handler-PHJKJBTD.js → error-handler-PZL5TOG2.js} +7 -7
- package/dist/hooks/postrun.js +7 -8
- package/dist/hooks/prerun.js +5 -5
- package/dist/index.js +9738 -9215
- package/dist/index.test.js +7 -7
- package/dist/{lib-CLQ247I5.js → lib-G23FRF64.js} +2 -2
- package/dist/{local-KL3Z3TUT.js → local-CSLZHQAW.js} +3 -3
- package/dist/{node-package-manager-Q5SI4GGN.js → node-package-manager-3OVW7PSU.js} +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-SLWJS67T.js → ui-XUWZDBQN.js} +5 -3
- package/oclif.manifest.json +2 -2
- package/package.json +3 -3
- package/dist/chunk-CP3BRHWK.js +0 -33
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
require_lib,
|
|
5
5
|
require_semver,
|
|
6
6
|
require_source_map
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-G5HUFNZJ.js";
|
|
8
8
|
import {
|
|
9
9
|
require_has_flag
|
|
10
10
|
} from "./chunk-UMUTXITN.js";
|
|
@@ -1038,7 +1038,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1038
1038
|
}
|
|
1039
1039
|
return dispatcher.useContext(Context);
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function useState15(initialState) {
|
|
1042
1042
|
var dispatcher = resolveDispatcher();
|
|
1043
1043
|
return dispatcher.useState(initialState);
|
|
1044
1044
|
}
|
|
@@ -1050,7 +1050,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
1050
1050
|
var dispatcher = resolveDispatcher();
|
|
1051
1051
|
return dispatcher.useRef(initialValue);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function useEffect12(create2, deps) {
|
|
1054
1054
|
var dispatcher = resolveDispatcher();
|
|
1055
1055
|
return dispatcher.useEffect(create2, deps);
|
|
1056
1056
|
}
|
|
@@ -1579,7 +1579,7 @@ Check the top-level render call using <` + parentName + ">.");
|
|
|
1579
1579
|
toArray,
|
|
1580
1580
|
only: onlyChild
|
|
1581
1581
|
};
|
|
1582
|
-
exports.Children = Children, exports.Component = Component, exports.Fragment = REACT_FRAGMENT_TYPE, exports.Profiler = REACT_PROFILER_TYPE, exports.PureComponent = PureComponent2, exports.StrictMode = REACT_STRICT_MODE_TYPE, exports.Suspense = REACT_SUSPENSE_TYPE, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.act = act, exports.cloneElement = cloneElement$1, exports.createContext = createContext6, exports.createElement = createElement$1, exports.createFactory = createFactory, exports.createRef = createRef, exports.forwardRef = forwardRef3, exports.isValidElement = isValidElement, exports.lazy = lazy, exports.memo = memo2, exports.startTransition = startTransition, exports.unstable_act = act, exports.useCallback = useCallback10, exports.useContext = useContext9, exports.useDebugValue = useDebugValue, exports.useDeferredValue = useDeferredValue, exports.useEffect =
|
|
1582
|
+
exports.Children = Children, exports.Component = Component, exports.Fragment = REACT_FRAGMENT_TYPE, exports.Profiler = REACT_PROFILER_TYPE, exports.PureComponent = PureComponent2, exports.StrictMode = REACT_STRICT_MODE_TYPE, exports.Suspense = REACT_SUSPENSE_TYPE, exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals, exports.act = act, exports.cloneElement = cloneElement$1, exports.createContext = createContext6, exports.createElement = createElement$1, exports.createFactory = createFactory, exports.createRef = createRef, exports.forwardRef = forwardRef3, exports.isValidElement = isValidElement, exports.lazy = lazy, exports.memo = memo2, exports.startTransition = startTransition, exports.unstable_act = act, exports.useCallback = useCallback10, exports.useContext = useContext9, exports.useDebugValue = useDebugValue, exports.useDeferredValue = useDeferredValue, exports.useEffect = useEffect12, exports.useId = useId, exports.useImperativeHandle = useImperativeHandle, exports.useInsertionEffect = useInsertionEffect, exports.useLayoutEffect = useLayoutEffect6, exports.useMemo = useMemo5, exports.useReducer = useReducer2, exports.useRef = useRef5, exports.useState = useState15, exports.useSyncExternalStore = useSyncExternalStore, exports.useTransition = useTransition, exports.version = ReactVersion, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
1583
1583
|
}();
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
@@ -6579,7 +6579,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
6579
6579
|
"use strict";
|
|
6580
6580
|
init_cjs_shims();
|
|
6581
6581
|
process.env.NODE_ENV !== "production" && (module.exports = function($$$hostConfig) {
|
|
6582
|
-
var exports2 = {},
|
|
6582
|
+
var exports2 = {}, React41 = require_react(), Scheduler = require_scheduler(), ReactSharedInternals = React41.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, suppressWarning = !1;
|
|
6583
6583
|
function setSuppressWarning(newSuppressWarning) {
|
|
6584
6584
|
suppressWarning = newSuppressWarning;
|
|
6585
6585
|
}
|
|
@@ -6839,8 +6839,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
6839
6839
|
{
|
|
6840
6840
|
var owner = ReactCurrentOwner.current;
|
|
6841
6841
|
if (owner !== null && owner.tag === ClassComponent) {
|
|
6842
|
-
var ownerFiber = owner,
|
|
6843
|
-
|
|
6842
|
+
var ownerFiber = owner, instance = ownerFiber.stateNode;
|
|
6843
|
+
instance._warnedAboutRefsInRender || error("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", getComponentNameFromFiber(ownerFiber) || "A component"), instance._warnedAboutRefsInRender = !0;
|
|
6844
6844
|
}
|
|
6845
6845
|
}
|
|
6846
6846
|
var fiber = get(component);
|
|
@@ -7200,8 +7200,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7200
7200
|
}
|
|
7201
7201
|
function cacheContext(workInProgress2, unmaskedContext, maskedContext) {
|
|
7202
7202
|
{
|
|
7203
|
-
var
|
|
7204
|
-
|
|
7203
|
+
var instance = workInProgress2.stateNode;
|
|
7204
|
+
instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext, instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
|
|
7205
7205
|
}
|
|
7206
7206
|
}
|
|
7207
7207
|
function getMaskedContext(workInProgress2, unmaskedContext) {
|
|
@@ -7209,9 +7209,9 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7209
7209
|
var type = workInProgress2.type, contextTypes = type.contextTypes;
|
|
7210
7210
|
if (!contextTypes)
|
|
7211
7211
|
return emptyContextObject;
|
|
7212
|
-
var
|
|
7213
|
-
if (
|
|
7214
|
-
return
|
|
7212
|
+
var instance = workInProgress2.stateNode;
|
|
7213
|
+
if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext)
|
|
7214
|
+
return instance.__reactInternalMemoizedMaskedChildContext;
|
|
7215
7215
|
var context = {};
|
|
7216
7216
|
for (var key in contextTypes)
|
|
7217
7217
|
context[key] = unmaskedContext[key];
|
|
@@ -7219,7 +7219,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7219
7219
|
var name = getComponentNameFromFiber(workInProgress2) || "Unknown";
|
|
7220
7220
|
checkPropTypes(contextTypes, context, "context", name);
|
|
7221
7221
|
}
|
|
7222
|
-
return
|
|
7222
|
+
return instance && cacheContext(workInProgress2, unmaskedContext, context), context;
|
|
7223
7223
|
}
|
|
7224
7224
|
}
|
|
7225
7225
|
function hasContextChanged() {
|
|
@@ -7246,15 +7246,15 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7246
7246
|
}
|
|
7247
7247
|
function processChildContext(fiber, type, parentContext) {
|
|
7248
7248
|
{
|
|
7249
|
-
var
|
|
7250
|
-
if (typeof
|
|
7249
|
+
var instance = fiber.stateNode, childContextTypes = type.childContextTypes;
|
|
7250
|
+
if (typeof instance.getChildContext != "function") {
|
|
7251
7251
|
{
|
|
7252
7252
|
var componentName = getComponentNameFromFiber(fiber) || "Unknown";
|
|
7253
7253
|
warnedAboutMissingGetChildContext[componentName] || (warnedAboutMissingGetChildContext[componentName] = !0, error("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.", componentName, componentName));
|
|
7254
7254
|
}
|
|
7255
7255
|
return parentContext;
|
|
7256
7256
|
}
|
|
7257
|
-
var childContext =
|
|
7257
|
+
var childContext = instance.getChildContext();
|
|
7258
7258
|
for (var contextKey in childContext)
|
|
7259
7259
|
if (!(contextKey in childContextTypes))
|
|
7260
7260
|
throw new Error((getComponentNameFromFiber(fiber) || "Unknown") + '.getChildContext(): key "' + contextKey + '" is not defined in childContextTypes.');
|
|
@@ -7267,18 +7267,18 @@ var require_react_reconciler_development = __commonJS({
|
|
|
7267
7267
|
}
|
|
7268
7268
|
function pushContextProvider(workInProgress2) {
|
|
7269
7269
|
{
|
|
7270
|
-
var
|
|
7270
|
+
var instance = workInProgress2.stateNode, memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
|
|
7271
7271
|
return previousContext = contextStackCursor.current, push(contextStackCursor, memoizedMergedChildContext, workInProgress2), push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress2), !0;
|
|
7272
7272
|
}
|
|
7273
7273
|
}
|
|
7274
7274
|
function invalidateContextProvider(workInProgress2, type, didChange) {
|
|
7275
7275
|
{
|
|
7276
|
-
var
|
|
7277
|
-
if (!
|
|
7276
|
+
var instance = workInProgress2.stateNode;
|
|
7277
|
+
if (!instance)
|
|
7278
7278
|
throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");
|
|
7279
7279
|
if (didChange) {
|
|
7280
7280
|
var mergedContext = processChildContext(workInProgress2, type, previousContext);
|
|
7281
|
-
|
|
7281
|
+
instance.__reactInternalMemoizedMergedChildContext = mergedContext, pop(didPerformWorkStackCursor, workInProgress2), pop(contextStackCursor, workInProgress2), push(contextStackCursor, mergedContext, workInProgress2), push(didPerformWorkStackCursor, didChange, workInProgress2);
|
|
7282
7282
|
} else
|
|
7283
7283
|
pop(didPerformWorkStackCursor, workInProgress2), push(didPerformWorkStackCursor, didChange, workInProgress2);
|
|
7284
7284
|
}
|
|
@@ -8085,10 +8085,10 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8085
8085
|
function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {
|
|
8086
8086
|
return supportsHydration ? (nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance), hydrationParentFiber = fiber, isHydrating = !0, hydrationErrors = null, didSuspendOrErrorDEV = !1, treeContext !== null && restoreSuspendedTreeContext(fiber, treeContext), !0) : !1;
|
|
8087
8087
|
}
|
|
8088
|
-
function warnUnhydratedInstance(returnFiber,
|
|
8088
|
+
function warnUnhydratedInstance(returnFiber, instance) {
|
|
8089
8089
|
switch (returnFiber.tag) {
|
|
8090
8090
|
case HostRoot: {
|
|
8091
|
-
didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo,
|
|
8091
|
+
didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);
|
|
8092
8092
|
break;
|
|
8093
8093
|
}
|
|
8094
8094
|
case HostComponent: {
|
|
@@ -8097,7 +8097,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8097
8097
|
returnFiber.type,
|
|
8098
8098
|
returnFiber.memoizedProps,
|
|
8099
8099
|
returnFiber.stateNode,
|
|
8100
|
-
|
|
8100
|
+
instance,
|
|
8101
8101
|
// TODO: Delete this argument when we remove the legacy root API.
|
|
8102
8102
|
isConcurrentMode
|
|
8103
8103
|
);
|
|
@@ -8105,15 +8105,15 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8105
8105
|
}
|
|
8106
8106
|
case SuspenseComponent: {
|
|
8107
8107
|
var suspenseState = returnFiber.memoizedState;
|
|
8108
|
-
suspenseState.dehydrated !== null && didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated,
|
|
8108
|
+
suspenseState.dehydrated !== null && didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);
|
|
8109
8109
|
break;
|
|
8110
8110
|
}
|
|
8111
8111
|
}
|
|
8112
8112
|
}
|
|
8113
|
-
function deleteHydratableInstance(returnFiber,
|
|
8114
|
-
warnUnhydratedInstance(returnFiber,
|
|
8113
|
+
function deleteHydratableInstance(returnFiber, instance) {
|
|
8114
|
+
warnUnhydratedInstance(returnFiber, instance);
|
|
8115
8115
|
var childToDelete = createFiberFromHostInstanceForDeletion();
|
|
8116
|
-
childToDelete.stateNode =
|
|
8116
|
+
childToDelete.stateNode = instance, childToDelete.return = returnFiber;
|
|
8117
8117
|
var deletions = returnFiber.deletions;
|
|
8118
8118
|
deletions === null ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= ChildDeletion) : deletions.push(childToDelete);
|
|
8119
8119
|
}
|
|
@@ -8202,8 +8202,8 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8202
8202
|
function tryHydrate(fiber, nextInstance) {
|
|
8203
8203
|
switch (fiber.tag) {
|
|
8204
8204
|
case HostComponent: {
|
|
8205
|
-
var type = fiber.type, props = fiber.pendingProps,
|
|
8206
|
-
return
|
|
8205
|
+
var type = fiber.type, props = fiber.pendingProps, instance = canHydrateInstance(nextInstance, type, props);
|
|
8206
|
+
return instance !== null ? (fiber.stateNode = instance, hydrationParentFiber = fiber, nextHydratableInstance = getFirstHydratableChild(instance), !0) : !1;
|
|
8207
8207
|
}
|
|
8208
8208
|
case HostText: {
|
|
8209
8209
|
var text = fiber.pendingProps, textInstance = canHydrateTextInstance(nextInstance, text);
|
|
@@ -8255,7 +8255,7 @@ var require_react_reconciler_development = __commonJS({
|
|
|
8255
8255
|
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
|
|
8256
8256
|
if (!supportsHydration)
|
|
8257
8257
|
throw new Error("Expected prepareToHydrateHostInstance() to never be called. This error is likely caused by a bug in React. Please file an issue.");
|
|
8258
|
-
var
|
|
8258
|
+
var instance = fiber.stateNode, shouldWarnIfMismatchDev = !didSuspendOrErrorDEV, updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev);
|
|
8259
8259
|
return fiber.updateQueue = updatePayload, updatePayload !== null;
|
|
8260
8260
|
}
|
|
8261
8261
|
function prepareToHydrateHostTextInstance(fiber) {
|
|
@@ -8432,11 +8432,11 @@ Error generating stack: ` + x.message + `
|
|
|
8432
8432
|
isRendering = rendering;
|
|
8433
8433
|
}
|
|
8434
8434
|
var ReactStrictModeWarnings = {
|
|
8435
|
-
recordUnsafeLifecycleWarnings: function(fiber,
|
|
8435
|
+
recordUnsafeLifecycleWarnings: function(fiber, instance) {
|
|
8436
8436
|
},
|
|
8437
8437
|
flushPendingUnsafeLifecycleWarnings: function() {
|
|
8438
8438
|
},
|
|
8439
|
-
recordLegacyContextWarning: function(fiber,
|
|
8439
|
+
recordLegacyContextWarning: function(fiber, instance) {
|
|
8440
8440
|
},
|
|
8441
8441
|
flushLegacyContextWarning: function() {
|
|
8442
8442
|
},
|
|
@@ -8454,9 +8454,9 @@ Error generating stack: ` + x.message + `
|
|
|
8454
8454
|
array.push(value);
|
|
8455
8455
|
}), array.sort().join(", ");
|
|
8456
8456
|
}, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
|
|
8457
|
-
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber,
|
|
8458
|
-
didWarnAboutUnsafeLifecycles.has(fiber.type) || (typeof
|
|
8459
|
-
|
|
8457
|
+
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
|
|
8458
|
+
didWarnAboutUnsafeLifecycles.has(fiber.type) || (typeof instance.componentWillMount == "function" && // Don't warn about react-lifecycles-compat polyfilled components.
|
|
8459
|
+
instance.componentWillMount.__suppressDeprecationWarning !== !0 && pendingComponentWillMountWarnings.push(fiber), fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount == "function" && pendingUNSAFE_ComponentWillMountWarnings.push(fiber), typeof instance.componentWillReceiveProps == "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== !0 && pendingComponentWillReceivePropsWarnings.push(fiber), fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps == "function" && pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber), typeof instance.componentWillUpdate == "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== !0 && pendingComponentWillUpdateWarnings.push(fiber), fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate == "function" && pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber));
|
|
8460
8460
|
}, ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
|
|
8461
8461
|
var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
|
|
8462
8462
|
pendingComponentWillMountWarnings.length > 0 && (pendingComponentWillMountWarnings.forEach(function(fiber) {
|
|
@@ -8536,7 +8536,7 @@ Please update the following components: %s`, _sortedNames5);
|
|
|
8536
8536
|
}
|
|
8537
8537
|
};
|
|
8538
8538
|
var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
|
|
8539
|
-
ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber,
|
|
8539
|
+
ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
|
|
8540
8540
|
var strictRoot = findStrictRoot(fiber);
|
|
8541
8541
|
if (strictRoot === null) {
|
|
8542
8542
|
error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");
|
|
@@ -8544,7 +8544,7 @@ Please update the following components: %s`, _sortedNames5);
|
|
|
8544
8544
|
}
|
|
8545
8545
|
if (!didWarnAboutLegacyContext.has(fiber.type)) {
|
|
8546
8546
|
var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
|
|
8547
|
-
(fiber.type.contextTypes != null || fiber.type.childContextTypes != null ||
|
|
8547
|
+
(fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext == "function") && (warningsForRoot === void 0 && (warningsForRoot = [], pendingLegacyContextWarning.set(strictRoot, warningsForRoot)), warningsForRoot.push(fiber));
|
|
8548
8548
|
}
|
|
8549
8549
|
}, ReactStrictModeWarnings.flushLegacyContextWarning = function() {
|
|
8550
8550
|
pendingLegacyContextWarning.forEach(function(fiberArray, strictRoot) {
|
|
@@ -9314,18 +9314,18 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
|
|
9314
9314
|
var lastBaseUpdate = queue.lastBaseUpdate;
|
|
9315
9315
|
lastBaseUpdate === null ? queue.firstBaseUpdate = capturedUpdate : lastBaseUpdate.next = capturedUpdate, queue.lastBaseUpdate = capturedUpdate;
|
|
9316
9316
|
}
|
|
9317
|
-
function getStateFromUpdate(workInProgress2, queue, update, prevState, nextProps,
|
|
9317
|
+
function getStateFromUpdate(workInProgress2, queue, update, prevState, nextProps, instance) {
|
|
9318
9318
|
switch (update.tag) {
|
|
9319
9319
|
case ReplaceState: {
|
|
9320
9320
|
var payload = update.payload;
|
|
9321
9321
|
if (typeof payload == "function") {
|
|
9322
9322
|
enterDisallowedContextReadInDEV();
|
|
9323
|
-
var nextState = payload.call(
|
|
9323
|
+
var nextState = payload.call(instance, prevState, nextProps);
|
|
9324
9324
|
{
|
|
9325
9325
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
9326
9326
|
setIsStrictModeForDevtools(!0);
|
|
9327
9327
|
try {
|
|
9328
|
-
payload.call(
|
|
9328
|
+
payload.call(instance, prevState, nextProps);
|
|
9329
9329
|
} finally {
|
|
9330
9330
|
setIsStrictModeForDevtools(!1);
|
|
9331
9331
|
}
|
|
@@ -9342,12 +9342,12 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
|
|
9342
9342
|
case UpdateState: {
|
|
9343
9343
|
var _payload = update.payload, partialState;
|
|
9344
9344
|
if (typeof _payload == "function") {
|
|
9345
|
-
enterDisallowedContextReadInDEV(), partialState = _payload.call(
|
|
9345
|
+
enterDisallowedContextReadInDEV(), partialState = _payload.call(instance, prevState, nextProps);
|
|
9346
9346
|
{
|
|
9347
9347
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
9348
9348
|
setIsStrictModeForDevtools(!0);
|
|
9349
9349
|
try {
|
|
9350
|
-
_payload.call(
|
|
9350
|
+
_payload.call(instance, prevState, nextProps);
|
|
9351
9351
|
} finally {
|
|
9352
9352
|
setIsStrictModeForDevtools(!1);
|
|
9353
9353
|
}
|
|
@@ -9363,7 +9363,7 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
|
|
9363
9363
|
}
|
|
9364
9364
|
return prevState;
|
|
9365
9365
|
}
|
|
9366
|
-
function processUpdateQueue(workInProgress2, props,
|
|
9366
|
+
function processUpdateQueue(workInProgress2, props, instance, renderLanes2) {
|
|
9367
9367
|
var queue = workInProgress2.updateQueue;
|
|
9368
9368
|
hasForceUpdate = !1, currentlyProcessingQueue = queue.shared;
|
|
9369
9369
|
var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
|
|
@@ -9396,7 +9396,7 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
|
|
9396
9396
|
};
|
|
9397
9397
|
newLastBaseUpdate = newLastBaseUpdate.next = _clone;
|
|
9398
9398
|
}
|
|
9399
|
-
newState = getStateFromUpdate(workInProgress2, queue, update, newState, props,
|
|
9399
|
+
newState = getStateFromUpdate(workInProgress2, queue, update, newState, props, instance);
|
|
9400
9400
|
var callback = update.callback;
|
|
9401
9401
|
if (callback !== null && // If the update was already committed, we should not queue its
|
|
9402
9402
|
// callback again.
|
|
@@ -9446,12 +9446,12 @@ See https://reactjs.org/link/refs-must-have-owner for more information.`);
|
|
|
9446
9446
|
function checkHasForceUpdateAfterProcessing() {
|
|
9447
9447
|
return hasForceUpdate;
|
|
9448
9448
|
}
|
|
9449
|
-
function commitUpdateQueue(finishedWork, finishedQueue,
|
|
9449
|
+
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
|
|
9450
9450
|
var effects = finishedQueue.effects;
|
|
9451
9451
|
if (finishedQueue.effects = null, effects !== null)
|
|
9452
9452
|
for (var i = 0; i < effects.length; i++) {
|
|
9453
9453
|
var effect = effects[i], callback = effect.callback;
|
|
9454
|
-
callback !== null && (effect.callback = null, callCallback(callback,
|
|
9454
|
+
callback !== null && (effect.callback = null, callCallback(callback, instance));
|
|
9455
9455
|
}
|
|
9456
9456
|
}
|
|
9457
9457
|
var NO_CONTEXT = {}, contextStackCursor$1 = createCursor(NO_CONTEXT), contextFiberStackCursor = createCursor(NO_CONTEXT), rootInstanceStackCursor = createCursor(NO_CONTEXT);
|
|
@@ -10880,14 +10880,14 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
|
|
|
10880
10880
|
}
|
|
10881
10881
|
};
|
|
10882
10882
|
function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
|
|
10883
|
-
var
|
|
10884
|
-
if (typeof
|
|
10885
|
-
var shouldUpdate =
|
|
10883
|
+
var instance = workInProgress2.stateNode;
|
|
10884
|
+
if (typeof instance.shouldComponentUpdate == "function") {
|
|
10885
|
+
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
|
|
10886
10886
|
{
|
|
10887
10887
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
10888
10888
|
setIsStrictModeForDevtools(!0);
|
|
10889
10889
|
try {
|
|
10890
|
-
shouldUpdate =
|
|
10890
|
+
shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
|
|
10891
10891
|
} finally {
|
|
10892
10892
|
setIsStrictModeForDevtools(!1);
|
|
10893
10893
|
}
|
|
@@ -10899,10 +10899,10 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
|
|
|
10899
10899
|
return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : !0;
|
|
10900
10900
|
}
|
|
10901
10901
|
function checkClassInstance(workInProgress2, ctor, newProps) {
|
|
10902
|
-
var
|
|
10902
|
+
var instance = workInProgress2.stateNode;
|
|
10903
10903
|
{
|
|
10904
|
-
var name = getComponentNameFromType(ctor) || "Component", renderPresent =
|
|
10905
|
-
renderPresent || (ctor.prototype && typeof ctor.prototype.render == "function" ? error("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?", name) : error("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.", name)),
|
|
10904
|
+
var name = getComponentNameFromType(ctor) || "Component", renderPresent = instance.render;
|
|
10905
|
+
renderPresent || (ctor.prototype && typeof ctor.prototype.render == "function" ? error("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?", name) : error("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.", name)), instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state && error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", name), instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved && error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", name), instance.propTypes && error("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.", name), instance.contextType && error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", name), ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip
|
|
10906
10906
|
// this one.
|
|
10907
10907
|
(workInProgress2.mode & StrictLegacyMode) === NoMode && (didWarnAboutLegacyContext$1.add(ctor), error(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
|
|
10908
10908
|
|
|
@@ -10910,15 +10910,15 @@ Incoming: %s`, currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + next
|
|
|
10910
10910
|
// this one.
|
|
10911
10911
|
(workInProgress2.mode & StrictLegacyMode) === NoMode && (didWarnAboutLegacyContext$1.add(ctor), error(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
|
|
10912
10912
|
|
|
10913
|
-
Learn more about this warning here: https://reactjs.org/link/legacy-context`, name)),
|
|
10914
|
-
var hasMutatedProps =
|
|
10915
|
-
|
|
10916
|
-
var _state =
|
|
10917
|
-
_state && (typeof _state != "object" || isArray(_state)) && error("%s.state: must be set to an object or null", name), typeof
|
|
10913
|
+
Learn more about this warning here: https://reactjs.org/link/legacy-context`, name)), instance.contextTypes && error("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", name), ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor) && (didWarnAboutContextTypeAndContextTypes.add(ctor), error("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", name)), typeof instance.componentShouldUpdate == "function" && error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", name), ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate < "u" && error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(ctor) || "A pure component"), typeof instance.componentDidUnmount == "function" && error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", name), typeof instance.componentDidReceiveProps == "function" && error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name), typeof instance.componentWillRecieveProps == "function" && error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name), typeof instance.UNSAFE_componentWillRecieveProps == "function" && error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name);
|
|
10914
|
+
var hasMutatedProps = instance.props !== newProps;
|
|
10915
|
+
instance.props !== void 0 && hasMutatedProps && error("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", name, name), instance.defaultProps && error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", name, name), typeof instance.getSnapshotBeforeUpdate == "function" && typeof instance.componentDidUpdate != "function" && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor) && (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor), error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(ctor))), typeof instance.getDerivedStateFromProps == "function" && error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name), typeof instance.getDerivedStateFromError == "function" && error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name), typeof ctor.getSnapshotBeforeUpdate == "function" && error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", name);
|
|
10916
|
+
var _state = instance.state;
|
|
10917
|
+
_state && (typeof _state != "object" || isArray(_state)) && error("%s.state: must be set to an object or null", name), typeof instance.getChildContext == "function" && typeof ctor.childContextTypes != "object" && error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", name);
|
|
10918
10918
|
}
|
|
10919
10919
|
}
|
|
10920
|
-
function adoptClassInstance(workInProgress2,
|
|
10921
|
-
|
|
10920
|
+
function adoptClassInstance(workInProgress2, instance) {
|
|
10921
|
+
instance.updater = classComponentUpdater, workInProgress2.stateNode = instance, set(instance, workInProgress2), instance._reactInternalInstance = fakeInternalInstance;
|
|
10922
10922
|
}
|
|
10923
10923
|
function constructClassInstance(workInProgress2, ctor, props) {
|
|
10924
10924
|
var isLegacyContextConsumer = !1, unmaskedContext = emptyContextObject, context = emptyContextObject, contextType = ctor.contextType;
|
|
@@ -10940,25 +10940,25 @@ Learn more about this warning here: https://reactjs.org/link/legacy-context`, na
|
|
|
10940
10940
|
var contextTypes = ctor.contextTypes;
|
|
10941
10941
|
isLegacyContextConsumer = contextTypes != null, context = isLegacyContextConsumer ? getMaskedContext(workInProgress2, unmaskedContext) : emptyContextObject;
|
|
10942
10942
|
}
|
|
10943
|
-
var
|
|
10943
|
+
var instance = new ctor(props, context);
|
|
10944
10944
|
if (workInProgress2.mode & StrictLegacyMode) {
|
|
10945
10945
|
setIsStrictModeForDevtools(!0);
|
|
10946
10946
|
try {
|
|
10947
|
-
|
|
10947
|
+
instance = new ctor(props, context);
|
|
10948
10948
|
} finally {
|
|
10949
10949
|
setIsStrictModeForDevtools(!1);
|
|
10950
10950
|
}
|
|
10951
10951
|
}
|
|
10952
|
-
var state = workInProgress2.memoizedState =
|
|
10953
|
-
adoptClassInstance(workInProgress2,
|
|
10952
|
+
var state = workInProgress2.memoizedState = instance.state !== null && instance.state !== void 0 ? instance.state : null;
|
|
10953
|
+
adoptClassInstance(workInProgress2, instance);
|
|
10954
10954
|
{
|
|
10955
10955
|
if (typeof ctor.getDerivedStateFromProps == "function" && state === null) {
|
|
10956
10956
|
var componentName = getComponentNameFromType(ctor) || "Component";
|
|
10957
|
-
didWarnAboutUninitializedState.has(componentName) || (didWarnAboutUninitializedState.add(componentName), error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", componentName,
|
|
10957
|
+
didWarnAboutUninitializedState.has(componentName) || (didWarnAboutUninitializedState.add(componentName), error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", componentName, instance.state === null ? "null" : "undefined", componentName));
|
|
10958
10958
|
}
|
|
10959
|
-
if (typeof ctor.getDerivedStateFromProps == "function" || typeof
|
|
10959
|
+
if (typeof ctor.getDerivedStateFromProps == "function" || typeof instance.getSnapshotBeforeUpdate == "function") {
|
|
10960
10960
|
var foundWillMountName = null, foundWillReceivePropsName = null, foundWillUpdateName = null;
|
|
10961
|
-
if (typeof
|
|
10961
|
+
if (typeof instance.componentWillMount == "function" && instance.componentWillMount.__suppressDeprecationWarning !== !0 ? foundWillMountName = "componentWillMount" : typeof instance.UNSAFE_componentWillMount == "function" && (foundWillMountName = "UNSAFE_componentWillMount"), typeof instance.componentWillReceiveProps == "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== !0 ? foundWillReceivePropsName = "componentWillReceiveProps" : typeof instance.UNSAFE_componentWillReceiveProps == "function" && (foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps"), typeof instance.componentWillUpdate == "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== !0 ? foundWillUpdateName = "componentWillUpdate" : typeof instance.UNSAFE_componentWillUpdate == "function" && (foundWillUpdateName = "UNSAFE_componentWillUpdate"), foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
|
|
10962
10962
|
var _componentName = getComponentNameFromType(ctor) || "Component", newApiName = typeof ctor.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
|
10963
10963
|
didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName), error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
10964
10964
|
|
|
@@ -10972,62 +10972,62 @@ https://reactjs.org/link/unsafe-component-lifecycles`, _componentName, newApiNam
|
|
|
10972
10972
|
}
|
|
10973
10973
|
}
|
|
10974
10974
|
}
|
|
10975
|
-
return isLegacyContextConsumer && cacheContext(workInProgress2, unmaskedContext, context),
|
|
10975
|
+
return isLegacyContextConsumer && cacheContext(workInProgress2, unmaskedContext, context), instance;
|
|
10976
10976
|
}
|
|
10977
|
-
function callComponentWillMount(workInProgress2,
|
|
10978
|
-
var oldState =
|
|
10979
|
-
typeof
|
|
10977
|
+
function callComponentWillMount(workInProgress2, instance) {
|
|
10978
|
+
var oldState = instance.state;
|
|
10979
|
+
typeof instance.componentWillMount == "function" && instance.componentWillMount(), typeof instance.UNSAFE_componentWillMount == "function" && instance.UNSAFE_componentWillMount(), oldState !== instance.state && (error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromFiber(workInProgress2) || "Component"), classComponentUpdater.enqueueReplaceState(instance, instance.state, null));
|
|
10980
10980
|
}
|
|
10981
|
-
function callComponentWillReceiveProps(workInProgress2,
|
|
10982
|
-
var oldState =
|
|
10983
|
-
if (typeof
|
|
10981
|
+
function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
|
|
10982
|
+
var oldState = instance.state;
|
|
10983
|
+
if (typeof instance.componentWillReceiveProps == "function" && instance.componentWillReceiveProps(newProps, nextContext), typeof instance.UNSAFE_componentWillReceiveProps == "function" && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext), instance.state !== oldState) {
|
|
10984
10984
|
{
|
|
10985
10985
|
var componentName = getComponentNameFromFiber(workInProgress2) || "Component";
|
|
10986
10986
|
didWarnAboutStateAssignmentForComponent.has(componentName) || (didWarnAboutStateAssignmentForComponent.add(componentName), error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", componentName));
|
|
10987
10987
|
}
|
|
10988
|
-
classComponentUpdater.enqueueReplaceState(
|
|
10988
|
+
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
|
10989
10989
|
}
|
|
10990
10990
|
}
|
|
10991
10991
|
function mountClassInstance(workInProgress2, ctor, newProps, renderLanes2) {
|
|
10992
10992
|
checkClassInstance(workInProgress2, ctor, newProps);
|
|
10993
|
-
var
|
|
10994
|
-
|
|
10993
|
+
var instance = workInProgress2.stateNode;
|
|
10994
|
+
instance.props = newProps, instance.state = workInProgress2.memoizedState, instance.refs = {}, initializeUpdateQueue(workInProgress2);
|
|
10995
10995
|
var contextType = ctor.contextType;
|
|
10996
10996
|
if (typeof contextType == "object" && contextType !== null)
|
|
10997
|
-
|
|
10997
|
+
instance.context = readContext(contextType);
|
|
10998
10998
|
else {
|
|
10999
10999
|
var unmaskedContext = getUnmaskedContext(workInProgress2, ctor, !0);
|
|
11000
|
-
|
|
11000
|
+
instance.context = getMaskedContext(workInProgress2, unmaskedContext);
|
|
11001
11001
|
}
|
|
11002
11002
|
{
|
|
11003
|
-
if (
|
|
11003
|
+
if (instance.state === newProps) {
|
|
11004
11004
|
var componentName = getComponentNameFromType(ctor) || "Component";
|
|
11005
11005
|
didWarnAboutDirectlyAssigningPropsToState.has(componentName) || (didWarnAboutDirectlyAssigningPropsToState.add(componentName), error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", componentName));
|
|
11006
11006
|
}
|
|
11007
|
-
workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress2,
|
|
11007
|
+
workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress2, instance), ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress2, instance);
|
|
11008
11008
|
}
|
|
11009
|
-
|
|
11009
|
+
instance.state = workInProgress2.memoizedState;
|
|
11010
11010
|
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
|
11011
|
-
if (typeof getDerivedStateFromProps == "function" && (applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps),
|
|
11011
|
+
if (typeof getDerivedStateFromProps == "function" && (applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps), instance.state = workInProgress2.memoizedState), typeof ctor.getDerivedStateFromProps != "function" && typeof instance.getSnapshotBeforeUpdate != "function" && (typeof instance.UNSAFE_componentWillMount == "function" || typeof instance.componentWillMount == "function") && (callComponentWillMount(workInProgress2, instance), processUpdateQueue(workInProgress2, newProps, instance, renderLanes2), instance.state = workInProgress2.memoizedState), typeof instance.componentDidMount == "function") {
|
|
11012
11012
|
var fiberFlags = Update;
|
|
11013
11013
|
fiberFlags |= LayoutStatic, (workInProgress2.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= MountLayoutDev), workInProgress2.flags |= fiberFlags;
|
|
11014
11014
|
}
|
|
11015
11015
|
}
|
|
11016
11016
|
function resumeMountClassInstance(workInProgress2, ctor, newProps, renderLanes2) {
|
|
11017
|
-
var
|
|
11018
|
-
|
|
11019
|
-
var oldContext =
|
|
11017
|
+
var instance = workInProgress2.stateNode, oldProps = workInProgress2.memoizedProps;
|
|
11018
|
+
instance.props = oldProps;
|
|
11019
|
+
var oldContext = instance.context, contextType = ctor.contextType, nextContext = emptyContextObject;
|
|
11020
11020
|
if (typeof contextType == "object" && contextType !== null)
|
|
11021
11021
|
nextContext = readContext(contextType);
|
|
11022
11022
|
else {
|
|
11023
11023
|
var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress2, ctor, !0);
|
|
11024
11024
|
nextContext = getMaskedContext(workInProgress2, nextLegacyUnmaskedContext);
|
|
11025
11025
|
}
|
|
11026
|
-
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = typeof getDerivedStateFromProps == "function" || typeof
|
|
11027
|
-
!hasNewLifecycles && (typeof
|
|
11028
|
-
var oldState = workInProgress2.memoizedState, newState =
|
|
11029
|
-
if (processUpdateQueue(workInProgress2, newProps,
|
|
11030
|
-
if (typeof
|
|
11026
|
+
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = typeof getDerivedStateFromProps == "function" || typeof instance.getSnapshotBeforeUpdate == "function";
|
|
11027
|
+
!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps == "function" || typeof instance.componentWillReceiveProps == "function") && (oldProps !== newProps || oldContext !== nextContext) && callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext), resetHasForceUpdateBeforeProcessing();
|
|
11028
|
+
var oldState = workInProgress2.memoizedState, newState = instance.state = oldState;
|
|
11029
|
+
if (processUpdateQueue(workInProgress2, newProps, instance, renderLanes2), newState = workInProgress2.memoizedState, oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
|
|
11030
|
+
if (typeof instance.componentDidMount == "function") {
|
|
11031
11031
|
var fiberFlags = Update;
|
|
11032
11032
|
fiberFlags |= LayoutStatic, (workInProgress2.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= MountLayoutDev), workInProgress2.flags |= fiberFlags;
|
|
11033
11033
|
}
|
|
@@ -11036,43 +11036,43 @@ https://reactjs.org/link/unsafe-component-lifecycles`, _componentName, newApiNam
|
|
|
11036
11036
|
typeof getDerivedStateFromProps == "function" && (applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps), newState = workInProgress2.memoizedState);
|
|
11037
11037
|
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext);
|
|
11038
11038
|
if (shouldUpdate) {
|
|
11039
|
-
if (!hasNewLifecycles && (typeof
|
|
11039
|
+
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount == "function" || typeof instance.componentWillMount == "function") && (typeof instance.componentWillMount == "function" && instance.componentWillMount(), typeof instance.UNSAFE_componentWillMount == "function" && instance.UNSAFE_componentWillMount()), typeof instance.componentDidMount == "function") {
|
|
11040
11040
|
var _fiberFlags = Update;
|
|
11041
11041
|
_fiberFlags |= LayoutStatic, (workInProgress2.mode & StrictEffectsMode) !== NoMode && (_fiberFlags |= MountLayoutDev), workInProgress2.flags |= _fiberFlags;
|
|
11042
11042
|
}
|
|
11043
11043
|
} else {
|
|
11044
|
-
if (typeof
|
|
11044
|
+
if (typeof instance.componentDidMount == "function") {
|
|
11045
11045
|
var _fiberFlags2 = Update;
|
|
11046
11046
|
_fiberFlags2 |= LayoutStatic, (workInProgress2.mode & StrictEffectsMode) !== NoMode && (_fiberFlags2 |= MountLayoutDev), workInProgress2.flags |= _fiberFlags2;
|
|
11047
11047
|
}
|
|
11048
11048
|
workInProgress2.memoizedProps = newProps, workInProgress2.memoizedState = newState;
|
|
11049
11049
|
}
|
|
11050
|
-
return
|
|
11050
|
+
return instance.props = newProps, instance.state = newState, instance.context = nextContext, shouldUpdate;
|
|
11051
11051
|
}
|
|
11052
11052
|
function updateClassInstance(current2, workInProgress2, ctor, newProps, renderLanes2) {
|
|
11053
|
-
var
|
|
11053
|
+
var instance = workInProgress2.stateNode;
|
|
11054
11054
|
cloneUpdateQueue(current2, workInProgress2);
|
|
11055
11055
|
var unresolvedOldProps = workInProgress2.memoizedProps, oldProps = workInProgress2.type === workInProgress2.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress2.type, unresolvedOldProps);
|
|
11056
|
-
|
|
11057
|
-
var unresolvedNewProps = workInProgress2.pendingProps, oldContext =
|
|
11056
|
+
instance.props = oldProps;
|
|
11057
|
+
var unresolvedNewProps = workInProgress2.pendingProps, oldContext = instance.context, contextType = ctor.contextType, nextContext = emptyContextObject;
|
|
11058
11058
|
if (typeof contextType == "object" && contextType !== null)
|
|
11059
11059
|
nextContext = readContext(contextType);
|
|
11060
11060
|
else {
|
|
11061
11061
|
var nextUnmaskedContext = getUnmaskedContext(workInProgress2, ctor, !0);
|
|
11062
11062
|
nextContext = getMaskedContext(workInProgress2, nextUnmaskedContext);
|
|
11063
11063
|
}
|
|
11064
|
-
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = typeof getDerivedStateFromProps == "function" || typeof
|
|
11065
|
-
!hasNewLifecycles && (typeof
|
|
11066
|
-
var oldState = workInProgress2.memoizedState, newState =
|
|
11067
|
-
if (processUpdateQueue(workInProgress2, newProps,
|
|
11068
|
-
return typeof
|
|
11064
|
+
var getDerivedStateFromProps = ctor.getDerivedStateFromProps, hasNewLifecycles = typeof getDerivedStateFromProps == "function" || typeof instance.getSnapshotBeforeUpdate == "function";
|
|
11065
|
+
!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps == "function" || typeof instance.componentWillReceiveProps == "function") && (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) && callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext), resetHasForceUpdateBeforeProcessing();
|
|
11066
|
+
var oldState = workInProgress2.memoizedState, newState = instance.state = oldState;
|
|
11067
|
+
if (processUpdateQueue(workInProgress2, newProps, instance, renderLanes2), newState = workInProgress2.memoizedState, unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !enableLazyContextPropagation)
|
|
11068
|
+
return typeof instance.componentDidUpdate == "function" && (unresolvedOldProps !== current2.memoizedProps || oldState !== current2.memoizedState) && (workInProgress2.flags |= Update), typeof instance.getSnapshotBeforeUpdate == "function" && (unresolvedOldProps !== current2.memoizedProps || oldState !== current2.memoizedState) && (workInProgress2.flags |= Snapshot), !1;
|
|
11069
11069
|
typeof getDerivedStateFromProps == "function" && (applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps), newState = workInProgress2.memoizedState);
|
|
11070
11070
|
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,
|
|
11071
11071
|
// both before and after `shouldComponentUpdate` has been called. Not ideal,
|
|
11072
11072
|
// but I'm loath to refactor this function. This only happens for memoized
|
|
11073
11073
|
// components so it's not that common.
|
|
11074
11074
|
enableLazyContextPropagation;
|
|
11075
|
-
return shouldUpdate ? (!hasNewLifecycles && (typeof
|
|
11075
|
+
return shouldUpdate ? (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate == "function" || typeof instance.componentWillUpdate == "function") && (typeof instance.componentWillUpdate == "function" && instance.componentWillUpdate(newProps, newState, nextContext), typeof instance.UNSAFE_componentWillUpdate == "function" && instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext)), typeof instance.componentDidUpdate == "function" && (workInProgress2.flags |= Update), typeof instance.getSnapshotBeforeUpdate == "function" && (workInProgress2.flags |= Snapshot)) : (typeof instance.componentDidUpdate == "function" && (unresolvedOldProps !== current2.memoizedProps || oldState !== current2.memoizedState) && (workInProgress2.flags |= Update), typeof instance.getSnapshotBeforeUpdate == "function" && (unresolvedOldProps !== current2.memoizedProps || oldState !== current2.memoizedState) && (workInProgress2.flags |= Snapshot), workInProgress2.memoizedProps = newProps, workInProgress2.memoizedState = newState), instance.props = newProps, instance.state = newState, instance.context = nextContext, shouldUpdate;
|
|
11076
11076
|
}
|
|
11077
11077
|
function createCapturedValueAtFiber(value, source) {
|
|
11078
11078
|
return {
|
|
@@ -11245,8 +11245,8 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
11245
11245
|
return;
|
|
11246
11246
|
}
|
|
11247
11247
|
case ClassComponent:
|
|
11248
|
-
var errorInfo = value, ctor = workInProgress2.type,
|
|
11249
|
-
if ((workInProgress2.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError == "function" ||
|
|
11248
|
+
var errorInfo = value, ctor = workInProgress2.type, instance = workInProgress2.stateNode;
|
|
11249
|
+
if ((workInProgress2.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError == "function" || instance !== null && typeof instance.componentDidCatch == "function" && !isAlreadyFailedLegacyErrorBoundary(instance))) {
|
|
11250
11250
|
workInProgress2.flags |= ShouldCapture;
|
|
11251
11251
|
var _lane = pickArbitraryLane(rootRenderLanes);
|
|
11252
11252
|
workInProgress2.lanes = mergeLanes(workInProgress2.lanes, _lane);
|
|
@@ -11494,8 +11494,8 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
11494
11494
|
}
|
|
11495
11495
|
var hasContext;
|
|
11496
11496
|
isContextProvider(Component) ? (hasContext = !0, pushContextProvider(workInProgress2)) : hasContext = !1, prepareToReadContext(workInProgress2, renderLanes2);
|
|
11497
|
-
var
|
|
11498
|
-
|
|
11497
|
+
var instance = workInProgress2.stateNode, shouldUpdate;
|
|
11498
|
+
instance === null ? (resetSuspendedCurrentOnMountInLegacyMode(current2, workInProgress2), constructClassInstance(workInProgress2, Component, nextProps), mountClassInstance(workInProgress2, Component, nextProps, renderLanes2), shouldUpdate = !0) : current2 === null ? shouldUpdate = resumeMountClassInstance(workInProgress2, Component, nextProps, renderLanes2) : shouldUpdate = updateClassInstance(current2, workInProgress2, Component, nextProps, renderLanes2);
|
|
11499
11499
|
var nextUnitOfWork = finishClassComponent(current2, workInProgress2, Component, shouldUpdate, hasContext, renderLanes2);
|
|
11500
11500
|
{
|
|
11501
11501
|
var inst = workInProgress2.stateNode;
|
|
@@ -11508,7 +11508,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
11508
11508
|
var didCaptureError = (workInProgress2.flags & DidCapture) !== NoFlags;
|
|
11509
11509
|
if (!shouldUpdate && !didCaptureError)
|
|
11510
11510
|
return hasContext && invalidateContextProvider(workInProgress2, Component, !1), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
|
|
11511
|
-
var
|
|
11511
|
+
var instance = workInProgress2.stateNode;
|
|
11512
11512
|
ReactCurrentOwner$1.current = workInProgress2;
|
|
11513
11513
|
var nextChildren;
|
|
11514
11514
|
if (didCaptureError && typeof Component.getDerivedStateFromError != "function")
|
|
@@ -11516,10 +11516,10 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
11516
11516
|
else {
|
|
11517
11517
|
markComponentRenderStarted(workInProgress2);
|
|
11518
11518
|
{
|
|
11519
|
-
if (setIsRendering(!0), nextChildren =
|
|
11519
|
+
if (setIsRendering(!0), nextChildren = instance.render(), workInProgress2.mode & StrictLegacyMode) {
|
|
11520
11520
|
setIsStrictModeForDevtools(!0);
|
|
11521
11521
|
try {
|
|
11522
|
-
|
|
11522
|
+
instance.render();
|
|
11523
11523
|
} finally {
|
|
11524
11524
|
setIsStrictModeForDevtools(!1);
|
|
11525
11525
|
}
|
|
@@ -11528,7 +11528,7 @@ Visit https://reactjs.org/link/error-boundaries to learn more about error bounda
|
|
|
11528
11528
|
}
|
|
11529
11529
|
markComponentRenderStopped();
|
|
11530
11530
|
}
|
|
11531
|
-
return workInProgress2.flags |= PerformedWork, current2 !== null && didCaptureError ? forceUnmountCurrentAndReconcile(current2, workInProgress2, nextChildren, renderLanes2) : reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2), workInProgress2.memoizedState =
|
|
11531
|
+
return workInProgress2.flags |= PerformedWork, current2 !== null && didCaptureError ? forceUnmountCurrentAndReconcile(current2, workInProgress2, nextChildren, renderLanes2) : reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2), workInProgress2.memoizedState = instance.state, hasContext && invalidateContextProvider(workInProgress2, Component, !0), workInProgress2.child;
|
|
11532
11532
|
}
|
|
11533
11533
|
function pushHostRootContext(workInProgress2) {
|
|
11534
11534
|
var root = workInProgress2.stateNode;
|
|
@@ -12313,7 +12313,7 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12313
12313
|
}, updateHostComponent$1 = function(current2, workInProgress2, type, newProps, rootContainerInstance) {
|
|
12314
12314
|
var oldProps = current2.memoizedProps;
|
|
12315
12315
|
if (oldProps !== newProps) {
|
|
12316
|
-
var
|
|
12316
|
+
var instance = workInProgress2.stateNode, currentHostContext = getHostContext(), updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
|
|
12317
12317
|
workInProgress2.updateQueue = updatePayload, updatePayload && markUpdate(workInProgress2);
|
|
12318
12318
|
}
|
|
12319
12319
|
}, updateHostText$1 = function(current2, workInProgress2, oldText, newText) {
|
|
@@ -12323,12 +12323,12 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12323
12323
|
appendAllChildren = function(parent, workInProgress2, needsVisibilityToggle, isHidden2) {
|
|
12324
12324
|
for (var node = workInProgress2.child; node !== null; ) {
|
|
12325
12325
|
if (node.tag === HostComponent) {
|
|
12326
|
-
var
|
|
12326
|
+
var instance = node.stateNode;
|
|
12327
12327
|
if (needsVisibilityToggle && isHidden2) {
|
|
12328
12328
|
var props = node.memoizedProps, type = node.type;
|
|
12329
|
-
|
|
12329
|
+
instance = cloneHiddenInstance(instance, type, props, node);
|
|
12330
12330
|
}
|
|
12331
|
-
appendInitialChild(parent,
|
|
12331
|
+
appendInitialChild(parent, instance);
|
|
12332
12332
|
} else if (node.tag === HostText) {
|
|
12333
12333
|
var _instance = node.stateNode;
|
|
12334
12334
|
if (needsVisibilityToggle && isHidden2) {
|
|
@@ -12358,12 +12358,12 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12358
12358
|
var appendAllChildrenToContainer = function(containerChildSet, workInProgress2, needsVisibilityToggle, isHidden2) {
|
|
12359
12359
|
for (var node = workInProgress2.child; node !== null; ) {
|
|
12360
12360
|
if (node.tag === HostComponent) {
|
|
12361
|
-
var
|
|
12361
|
+
var instance = node.stateNode;
|
|
12362
12362
|
if (needsVisibilityToggle && isHidden2) {
|
|
12363
12363
|
var props = node.memoizedProps, type = node.type;
|
|
12364
|
-
|
|
12364
|
+
instance = cloneHiddenInstance(instance, type, props, node);
|
|
12365
12365
|
}
|
|
12366
|
-
appendChildToContainerChildSet(containerChildSet,
|
|
12366
|
+
appendChildToContainerChildSet(containerChildSet, instance);
|
|
12367
12367
|
} else if (node.tag === HostText) {
|
|
12368
12368
|
var _instance2 = node.stateNode;
|
|
12369
12369
|
if (needsVisibilityToggle && isHidden2) {
|
|
@@ -12538,8 +12538,8 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12538
12538
|
if (_wasHydrated)
|
|
12539
12539
|
prepareToHydrateHostInstance(workInProgress2, rootContainerInstance, currentHostContext) && markUpdate(workInProgress2);
|
|
12540
12540
|
else {
|
|
12541
|
-
var
|
|
12542
|
-
appendAllChildren(
|
|
12541
|
+
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress2);
|
|
12542
|
+
appendAllChildren(instance, workInProgress2, !1, !1), workInProgress2.stateNode = instance, finalizeInitialChildren(instance, type, newProps, rootContainerInstance, currentHostContext) && markUpdate(workInProgress2);
|
|
12543
12543
|
}
|
|
12544
12544
|
workInProgress2.ref !== null && markRef$1(workInProgress2);
|
|
12545
12545
|
}
|
|
@@ -12802,15 +12802,15 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12802
12802
|
throw error2;
|
|
12803
12803
|
}), clearCaughtError();
|
|
12804
12804
|
}
|
|
12805
|
-
var callComponentWillUnmountWithTimer = function(current2,
|
|
12806
|
-
if (
|
|
12805
|
+
var callComponentWillUnmountWithTimer = function(current2, instance) {
|
|
12806
|
+
if (instance.props = current2.memoizedProps, instance.state = current2.memoizedState, current2.mode & ProfileMode)
|
|
12807
12807
|
try {
|
|
12808
|
-
startLayoutEffectTimer(),
|
|
12808
|
+
startLayoutEffectTimer(), instance.componentWillUnmount();
|
|
12809
12809
|
} finally {
|
|
12810
12810
|
recordLayoutEffectDuration(current2);
|
|
12811
12811
|
}
|
|
12812
12812
|
else
|
|
12813
|
-
|
|
12813
|
+
instance.componentWillUnmount();
|
|
12814
12814
|
};
|
|
12815
12815
|
function safelyCallCommitHookLayoutEffectListMount(current2, nearestMountedAncestor) {
|
|
12816
12816
|
try {
|
|
@@ -12819,16 +12819,16 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12819
12819
|
captureCommitPhaseError(current2, nearestMountedAncestor, error2);
|
|
12820
12820
|
}
|
|
12821
12821
|
}
|
|
12822
|
-
function safelyCallComponentWillUnmount(current2, nearestMountedAncestor,
|
|
12822
|
+
function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
|
|
12823
12823
|
try {
|
|
12824
|
-
callComponentWillUnmountWithTimer(current2,
|
|
12824
|
+
callComponentWillUnmountWithTimer(current2, instance);
|
|
12825
12825
|
} catch (error2) {
|
|
12826
12826
|
captureCommitPhaseError(current2, nearestMountedAncestor, error2);
|
|
12827
12827
|
}
|
|
12828
12828
|
}
|
|
12829
|
-
function safelyCallComponentDidMount(current2, nearestMountedAncestor,
|
|
12829
|
+
function safelyCallComponentDidMount(current2, nearestMountedAncestor, instance) {
|
|
12830
12830
|
try {
|
|
12831
|
-
|
|
12831
|
+
instance.componentDidMount();
|
|
12832
12832
|
} catch (error2) {
|
|
12833
12833
|
captureCommitPhaseError(current2, nearestMountedAncestor, error2);
|
|
12834
12834
|
}
|
|
@@ -12908,14 +12908,14 @@ Check the render method of \`` + ownerName + "`.");
|
|
|
12908
12908
|
break;
|
|
12909
12909
|
case ClassComponent: {
|
|
12910
12910
|
if (current2 !== null) {
|
|
12911
|
-
var prevProps = current2.memoizedProps, prevState = current2.memoizedState,
|
|
12912
|
-
finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (
|
|
12913
|
-
var snapshot =
|
|
12911
|
+
var prevProps = current2.memoizedProps, prevState = current2.memoizedState, instance = finishedWork.stateNode;
|
|
12912
|
+
finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (instance.props !== finishedWork.memoizedProps && error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance"), instance.state !== finishedWork.memoizedState && error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance"));
|
|
12913
|
+
var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
|
|
12914
12914
|
{
|
|
12915
12915
|
var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
|
|
12916
12916
|
snapshot === void 0 && !didWarnSet.has(finishedWork.type) && (didWarnSet.add(finishedWork.type), error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork)));
|
|
12917
12917
|
}
|
|
12918
|
-
|
|
12918
|
+
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
|
|
12919
12919
|
}
|
|
12920
12920
|
break;
|
|
12921
12921
|
}
|
|
@@ -13028,30 +13028,30 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13028
13028
|
break;
|
|
13029
13029
|
}
|
|
13030
13030
|
case ClassComponent: {
|
|
13031
|
-
var
|
|
13031
|
+
var instance = finishedWork.stateNode;
|
|
13032
13032
|
if (finishedWork.flags & Update && !offscreenSubtreeWasHidden)
|
|
13033
13033
|
if (current2 === null)
|
|
13034
|
-
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (
|
|
13034
|
+
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (instance.props !== finishedWork.memoizedProps && error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance"), instance.state !== finishedWork.memoizedState && error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance")), finishedWork.mode & ProfileMode)
|
|
13035
13035
|
try {
|
|
13036
|
-
startLayoutEffectTimer(),
|
|
13036
|
+
startLayoutEffectTimer(), instance.componentDidMount();
|
|
13037
13037
|
} finally {
|
|
13038
13038
|
recordLayoutEffectDuration(finishedWork);
|
|
13039
13039
|
}
|
|
13040
13040
|
else
|
|
13041
|
-
|
|
13041
|
+
instance.componentDidMount();
|
|
13042
13042
|
else {
|
|
13043
13043
|
var prevProps = finishedWork.elementType === finishedWork.type ? current2.memoizedProps : resolveDefaultProps(finishedWork.type, current2.memoizedProps), prevState = current2.memoizedState;
|
|
13044
|
-
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (
|
|
13044
|
+
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (instance.props !== finishedWork.memoizedProps && error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance"), instance.state !== finishedWork.memoizedState && error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance")), finishedWork.mode & ProfileMode)
|
|
13045
13045
|
try {
|
|
13046
|
-
startLayoutEffectTimer(),
|
|
13046
|
+
startLayoutEffectTimer(), instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
|
|
13047
13047
|
} finally {
|
|
13048
13048
|
recordLayoutEffectDuration(finishedWork);
|
|
13049
13049
|
}
|
|
13050
13050
|
else
|
|
13051
|
-
|
|
13051
|
+
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
|
|
13052
13052
|
}
|
|
13053
13053
|
var updateQueue = finishedWork.updateQueue;
|
|
13054
|
-
updateQueue !== null && (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (
|
|
13054
|
+
updateQueue !== null && (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps && (instance.props !== finishedWork.memoizedProps && error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance"), instance.state !== finishedWork.memoizedState && error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance")), commitUpdateQueue(finishedWork, updateQueue, instance));
|
|
13055
13055
|
break;
|
|
13056
13056
|
}
|
|
13057
13057
|
case HostRoot: {
|
|
@@ -13139,8 +13139,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13139
13139
|
break;
|
|
13140
13140
|
}
|
|
13141
13141
|
case ClassComponent: {
|
|
13142
|
-
var
|
|
13143
|
-
typeof
|
|
13142
|
+
var instance = node.stateNode;
|
|
13143
|
+
typeof instance.componentDidMount == "function" && safelyCallComponentDidMount(node, node.return, instance), safelyAttachRef(node, node.return);
|
|
13144
13144
|
break;
|
|
13145
13145
|
}
|
|
13146
13146
|
case HostComponent: {
|
|
@@ -13157,8 +13157,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13157
13157
|
if (hostSubtreeRoot === null) {
|
|
13158
13158
|
hostSubtreeRoot = node;
|
|
13159
13159
|
try {
|
|
13160
|
-
var
|
|
13161
|
-
isHidden2 ? hideInstance(
|
|
13160
|
+
var instance = node.stateNode;
|
|
13161
|
+
isHidden2 ? hideInstance(instance) : unhideInstance(node.stateNode, node.memoizedProps);
|
|
13162
13162
|
} catch (error2) {
|
|
13163
13163
|
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
|
|
13164
13164
|
}
|
|
@@ -13190,13 +13190,13 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13190
13190
|
function commitAttachRef(finishedWork) {
|
|
13191
13191
|
var ref = finishedWork.ref;
|
|
13192
13192
|
if (ref !== null) {
|
|
13193
|
-
var
|
|
13193
|
+
var instance = finishedWork.stateNode, instanceToUse;
|
|
13194
13194
|
switch (finishedWork.tag) {
|
|
13195
13195
|
case HostComponent:
|
|
13196
|
-
instanceToUse = getPublicInstance(
|
|
13196
|
+
instanceToUse = getPublicInstance(instance);
|
|
13197
13197
|
break;
|
|
13198
13198
|
default:
|
|
13199
|
-
instanceToUse =
|
|
13199
|
+
instanceToUse = instance;
|
|
13200
13200
|
}
|
|
13201
13201
|
if (typeof ref == "function") {
|
|
13202
13202
|
var retVal;
|
|
@@ -13393,8 +13393,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13393
13393
|
case ClassComponent: {
|
|
13394
13394
|
if (!offscreenSubtreeWasHidden) {
|
|
13395
13395
|
safelyDetachRef(deletedFiber, nearestMountedAncestor);
|
|
13396
|
-
var
|
|
13397
|
-
typeof
|
|
13396
|
+
var instance = deletedFiber.stateNode;
|
|
13397
|
+
typeof instance.componentWillUnmount == "function" && safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);
|
|
13398
13398
|
}
|
|
13399
13399
|
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
|
|
13400
13400
|
return;
|
|
@@ -13512,9 +13512,9 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13512
13512
|
case HostComponent: {
|
|
13513
13513
|
if (recursivelyTraverseMutationEffects(root, finishedWork), commitReconciliationEffects(finishedWork), flags & Ref && current2 !== null && safelyDetachRef(current2, current2.return), supportsMutation) {
|
|
13514
13514
|
if (finishedWork.flags & ContentReset) {
|
|
13515
|
-
var
|
|
13515
|
+
var instance = finishedWork.stateNode;
|
|
13516
13516
|
try {
|
|
13517
|
-
resetTextContent(
|
|
13517
|
+
resetTextContent(instance);
|
|
13518
13518
|
} catch (error2) {
|
|
13519
13519
|
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
|
|
13520
13520
|
}
|
|
@@ -13718,8 +13718,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13718
13718
|
}
|
|
13719
13719
|
case ClassComponent: {
|
|
13720
13720
|
safelyDetachRef(fiber, fiber.return);
|
|
13721
|
-
var
|
|
13722
|
-
typeof
|
|
13721
|
+
var instance = fiber.stateNode;
|
|
13722
|
+
typeof instance.componentWillUnmount == "function" && safelyCallComponentWillUnmount(fiber, fiber.return, instance);
|
|
13723
13723
|
break;
|
|
13724
13724
|
}
|
|
13725
13725
|
case HostComponent: {
|
|
@@ -13937,9 +13937,9 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13937
13937
|
break;
|
|
13938
13938
|
}
|
|
13939
13939
|
case ClassComponent: {
|
|
13940
|
-
var
|
|
13940
|
+
var instance = fiber.stateNode;
|
|
13941
13941
|
try {
|
|
13942
|
-
|
|
13942
|
+
instance.componentDidMount();
|
|
13943
13943
|
} catch (error2) {
|
|
13944
13944
|
captureCommitPhaseError(fiber, fiber.return, error2);
|
|
13945
13945
|
}
|
|
@@ -13974,8 +13974,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
13974
13974
|
break;
|
|
13975
13975
|
}
|
|
13976
13976
|
case ClassComponent: {
|
|
13977
|
-
var
|
|
13978
|
-
typeof
|
|
13977
|
+
var instance = fiber.stateNode;
|
|
13978
|
+
typeof instance.componentWillUnmount == "function" && safelyCallComponentWillUnmount(fiber, fiber.return, instance);
|
|
13979
13979
|
break;
|
|
13980
13980
|
}
|
|
13981
13981
|
}
|
|
@@ -14825,11 +14825,11 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
14825
14825
|
}
|
|
14826
14826
|
return !0;
|
|
14827
14827
|
}
|
|
14828
|
-
function isAlreadyFailedLegacyErrorBoundary(
|
|
14829
|
-
return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(
|
|
14828
|
+
function isAlreadyFailedLegacyErrorBoundary(instance) {
|
|
14829
|
+
return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
|
|
14830
14830
|
}
|
|
14831
|
-
function markLegacyErrorBoundaryAsFailed(
|
|
14832
|
-
legacyErrorBoundariesThatAlreadyFailed === null ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([
|
|
14831
|
+
function markLegacyErrorBoundaryAsFailed(instance) {
|
|
14832
|
+
legacyErrorBoundariesThatAlreadyFailed === null ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([instance]) : legacyErrorBoundariesThatAlreadyFailed.add(instance);
|
|
14833
14833
|
}
|
|
14834
14834
|
function prepareToThrowUncaughtError(error2) {
|
|
14835
14835
|
hasUncaughtError || (hasUncaughtError = !0, firstUncaughtError = error2);
|
|
@@ -14850,8 +14850,8 @@ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-f
|
|
|
14850
14850
|
captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);
|
|
14851
14851
|
return;
|
|
14852
14852
|
} else if (fiber.tag === ClassComponent) {
|
|
14853
|
-
var ctor = fiber.type,
|
|
14854
|
-
if (typeof ctor.getDerivedStateFromError == "function" || typeof
|
|
14853
|
+
var ctor = fiber.type, instance = fiber.stateNode;
|
|
14854
|
+
if (typeof ctor.getDerivedStateFromError == "function" || typeof instance.componentDidCatch == "function" && !isAlreadyFailedLegacyErrorBoundary(instance)) {
|
|
14855
14855
|
var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber), update = createClassErrorUpdate(fiber, errorInfo, SyncLane), root = enqueueUpdate(fiber, update, SyncLane), eventTime = requestEventTime();
|
|
14856
14856
|
root !== null && (markRootUpdated(root, SyncLane, eventTime), ensureRootIsScheduled(root, eventTime));
|
|
14857
14857
|
return;
|
|
@@ -15730,7 +15730,7 @@ Check the render method of %s.`, getComponentNameFromFiber(current) || "Unknown"
|
|
|
15730
15730
|
var hostFiber = findCurrentHostFiber(fiber);
|
|
15731
15731
|
return hostFiber === null ? null : hostFiber.stateNode;
|
|
15732
15732
|
}
|
|
15733
|
-
function emptyFindFiberByHostInstance(
|
|
15733
|
+
function emptyFindFiberByHostInstance(instance) {
|
|
15734
15734
|
return null;
|
|
15735
15735
|
}
|
|
15736
15736
|
function getCurrentFiberForDevTools() {
|
|
@@ -19783,36 +19783,36 @@ var require_templates = __commonJS({
|
|
|
19783
19783
|
}
|
|
19784
19784
|
return results;
|
|
19785
19785
|
}
|
|
19786
|
-
function buildStyle(chalk2,
|
|
19786
|
+
function buildStyle(chalk2, styles6) {
|
|
19787
19787
|
let enabled = {};
|
|
19788
|
-
for (let layer of
|
|
19788
|
+
for (let layer of styles6)
|
|
19789
19789
|
for (let style of layer.styles)
|
|
19790
19790
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
19791
19791
|
let current = chalk2;
|
|
19792
|
-
for (let [styleName,
|
|
19793
|
-
if (Array.isArray(
|
|
19792
|
+
for (let [styleName, styles7] of Object.entries(enabled))
|
|
19793
|
+
if (Array.isArray(styles7)) {
|
|
19794
19794
|
if (!(styleName in current))
|
|
19795
19795
|
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
19796
|
-
current =
|
|
19796
|
+
current = styles7.length > 0 ? current[styleName](...styles7) : current[styleName];
|
|
19797
19797
|
}
|
|
19798
19798
|
return current;
|
|
19799
19799
|
}
|
|
19800
19800
|
module.exports = (chalk2, temporary) => {
|
|
19801
|
-
let
|
|
19801
|
+
let styles6 = [], chunks = [], chunk = [];
|
|
19802
19802
|
if (temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
19803
19803
|
if (escapeCharacter)
|
|
19804
19804
|
chunk.push(unescape3(escapeCharacter));
|
|
19805
19805
|
else if (style) {
|
|
19806
19806
|
let string = chunk.join("");
|
|
19807
|
-
chunk = [], chunks.push(
|
|
19807
|
+
chunk = [], chunks.push(styles6.length === 0 ? string : buildStyle(chalk2, styles6)(string)), styles6.push({ inverse, styles: parseStyle(style) });
|
|
19808
19808
|
} else if (close) {
|
|
19809
|
-
if (
|
|
19809
|
+
if (styles6.length === 0)
|
|
19810
19810
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
19811
|
-
chunks.push(buildStyle(chalk2,
|
|
19811
|
+
chunks.push(buildStyle(chalk2, styles6)(chunk.join(""))), chunk = [], styles6.pop();
|
|
19812
19812
|
} else
|
|
19813
19813
|
chunk.push(character);
|
|
19814
|
-
}), chunks.push(chunk.join("")),
|
|
19815
|
-
let errMessage = `Chalk template literal is missing ${
|
|
19814
|
+
}), chunks.push(chunk.join("")), styles6.length > 0) {
|
|
19815
|
+
let errMessage = `Chalk template literal is missing ${styles6.length} closing bracket${styles6.length === 1 ? "" : "s"} (\`}\`)`;
|
|
19816
19816
|
throw new Error(errMessage);
|
|
19817
19817
|
}
|
|
19818
19818
|
return chunks.join("");
|
|
@@ -19825,7 +19825,7 @@ var require_source = __commonJS({
|
|
|
19825
19825
|
"../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js"(exports, module) {
|
|
19826
19826
|
"use strict";
|
|
19827
19827
|
init_cjs_shims();
|
|
19828
|
-
var
|
|
19828
|
+
var ansiStyles4 = require_ansi_styles(), { stdout: stdoutColor2, stderr: stderrColor2 } = require_supports_color(), {
|
|
19829
19829
|
stringReplaceAll: stringReplaceAll2,
|
|
19830
19830
|
stringEncaseCRLFWithFirstIndex: stringEncaseCRLFWithFirstIndex2
|
|
19831
19831
|
} = require_util(), { isArray } = Array, levelMapping2 = [
|
|
@@ -19833,7 +19833,7 @@ var require_source = __commonJS({
|
|
|
19833
19833
|
"ansi",
|
|
19834
19834
|
"ansi256",
|
|
19835
19835
|
"ansi16m"
|
|
19836
|
-
],
|
|
19836
|
+
], styles6 = /* @__PURE__ */ Object.create(null), applyOptions2 = (object, options = {}) => {
|
|
19837
19837
|
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3))
|
|
19838
19838
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
19839
19839
|
let colorLevel = stdoutColor2 ? stdoutColor2.level : 0;
|
|
@@ -19851,14 +19851,14 @@ var require_source = __commonJS({
|
|
|
19851
19851
|
function Chalk(options) {
|
|
19852
19852
|
return chalkFactory2(options);
|
|
19853
19853
|
}
|
|
19854
|
-
for (let [styleName, style] of Object.entries(
|
|
19855
|
-
|
|
19854
|
+
for (let [styleName, style] of Object.entries(ansiStyles4))
|
|
19855
|
+
styles6[styleName] = {
|
|
19856
19856
|
get() {
|
|
19857
19857
|
let builder = createBuilder2(this, createStyler2(style.open, style.close, this._styler), this._isEmpty);
|
|
19858
19858
|
return Object.defineProperty(this, styleName, { value: builder }), builder;
|
|
19859
19859
|
}
|
|
19860
19860
|
};
|
|
19861
|
-
|
|
19861
|
+
styles6.visible = {
|
|
19862
19862
|
get() {
|
|
19863
19863
|
let builder = createBuilder2(this, this._styler, !0);
|
|
19864
19864
|
return Object.defineProperty(this, "visible", { value: builder }), builder;
|
|
@@ -19866,22 +19866,22 @@ var require_source = __commonJS({
|
|
|
19866
19866
|
};
|
|
19867
19867
|
var usedModels2 = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
19868
19868
|
for (let model of usedModels2)
|
|
19869
|
-
|
|
19869
|
+
styles6[model] = {
|
|
19870
19870
|
get() {
|
|
19871
19871
|
let { level } = this;
|
|
19872
19872
|
return function(...arguments_) {
|
|
19873
|
-
let styler = createStyler2(
|
|
19873
|
+
let styler = createStyler2(ansiStyles4.color[levelMapping2[level]][model](...arguments_), ansiStyles4.color.close, this._styler);
|
|
19874
19874
|
return createBuilder2(this, styler, this._isEmpty);
|
|
19875
19875
|
};
|
|
19876
19876
|
}
|
|
19877
19877
|
};
|
|
19878
19878
|
for (let model of usedModels2) {
|
|
19879
19879
|
let bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
19880
|
-
|
|
19880
|
+
styles6[bgModel] = {
|
|
19881
19881
|
get() {
|
|
19882
19882
|
let { level } = this;
|
|
19883
19883
|
return function(...arguments_) {
|
|
19884
|
-
let styler = createStyler2(
|
|
19884
|
+
let styler = createStyler2(ansiStyles4.bgColor[levelMapping2[level]][model](...arguments_), ansiStyles4.bgColor.close, this._styler);
|
|
19885
19885
|
return createBuilder2(this, styler, this._isEmpty);
|
|
19886
19886
|
};
|
|
19887
19887
|
}
|
|
@@ -19889,7 +19889,7 @@ var require_source = __commonJS({
|
|
|
19889
19889
|
}
|
|
19890
19890
|
var proto2 = Object.defineProperties(() => {
|
|
19891
19891
|
}, {
|
|
19892
|
-
...
|
|
19892
|
+
...styles6,
|
|
19893
19893
|
level: {
|
|
19894
19894
|
enumerable: !0,
|
|
19895
19895
|
get() {
|
|
@@ -19936,7 +19936,7 @@ var require_source = __commonJS({
|
|
|
19936
19936
|
);
|
|
19937
19937
|
return template === void 0 && (template = require_templates()), template(chalk3, parts.join(""));
|
|
19938
19938
|
};
|
|
19939
|
-
Object.defineProperties(Chalk.prototype,
|
|
19939
|
+
Object.defineProperties(Chalk.prototype, styles6);
|
|
19940
19940
|
var chalk2 = Chalk();
|
|
19941
19941
|
chalk2.supportsColor = stdoutColor2;
|
|
19942
19942
|
chalk2.stderr = Chalk({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
@@ -21013,36 +21013,36 @@ var require_cjs = __commonJS({
|
|
|
21013
21013
|
var originalConstructor = this.constructor, constructorName = originalConstructor.name || function() {
|
|
21014
21014
|
var constructorNameMatch = originalConstructor.toString().match(/^function\s*([^\s(]+)/);
|
|
21015
21015
|
return constructorNameMatch === null ? extendableErrorName || "Error" : constructorNameMatch[1];
|
|
21016
|
-
}(), constructorNameIsError = constructorName === "Error", name = constructorNameIsError ? extendableErrorName : constructorName,
|
|
21017
|
-
if (setPrototypeOf(
|
|
21018
|
-
var
|
|
21019
|
-
Error.apply(this, arguments), defineProperty(
|
|
21016
|
+
}(), constructorNameIsError = constructorName === "Error", name = constructorNameIsError ? extendableErrorName : constructorName, instance = Error.apply(this, arguments);
|
|
21017
|
+
if (setPrototypeOf(instance, getPrototypeOf(this)), !(instance instanceof originalConstructor) || !(instance instanceof ExtendableError2)) {
|
|
21018
|
+
var instance = this;
|
|
21019
|
+
Error.apply(this, arguments), defineProperty(instance, "message", {
|
|
21020
21020
|
configurable: !0,
|
|
21021
21021
|
enumerable: !1,
|
|
21022
21022
|
value: message,
|
|
21023
21023
|
writable: !0
|
|
21024
21024
|
});
|
|
21025
21025
|
}
|
|
21026
|
-
if (defineProperty(
|
|
21026
|
+
if (defineProperty(instance, "name", {
|
|
21027
21027
|
configurable: !0,
|
|
21028
21028
|
enumerable: !1,
|
|
21029
21029
|
value: name,
|
|
21030
21030
|
writable: !0
|
|
21031
21031
|
}), Error.captureStackTrace && Error.captureStackTrace(
|
|
21032
|
-
|
|
21032
|
+
instance,
|
|
21033
21033
|
constructorNameIsError ? ExtendableError2 : originalConstructor
|
|
21034
|
-
),
|
|
21034
|
+
), instance.stack === void 0) {
|
|
21035
21035
|
var err = new Error(message);
|
|
21036
|
-
err.name =
|
|
21036
|
+
err.name = instance.name, instance.stack = err.stack;
|
|
21037
21037
|
}
|
|
21038
|
-
return uglyErrorPrinting && defineProperty(
|
|
21038
|
+
return uglyErrorPrinting && defineProperty(instance, "toString", {
|
|
21039
21039
|
configurable: !0,
|
|
21040
21040
|
enumerable: !1,
|
|
21041
21041
|
value: function() {
|
|
21042
21042
|
return (this.name || "Error") + (typeof this.message > "u" ? "" : ": " + this.message);
|
|
21043
21043
|
},
|
|
21044
21044
|
writable: !0
|
|
21045
|
-
}),
|
|
21045
|
+
}), instance;
|
|
21046
21046
|
}
|
|
21047
21047
|
extendableErrorName = ExtendableError2.name || "ExtendableError";
|
|
21048
21048
|
ExtendableError2.prototype = objectCreate(Error.prototype, {
|
|
@@ -23171,15 +23171,169 @@ var require_macaddress = __commonJS({
|
|
|
23171
23171
|
// ../cli-kit/dist/public/node/context/local.js
|
|
23172
23172
|
init_cjs_shims();
|
|
23173
23173
|
|
|
23174
|
-
// ../cli-kit/dist/public/node/context/spin.js
|
|
23175
|
-
init_cjs_shims();
|
|
23176
|
-
|
|
23177
23174
|
// ../cli-kit/dist/public/node/context/utilities.js
|
|
23178
23175
|
init_cjs_shims();
|
|
23179
23176
|
function isTruthy(variable) {
|
|
23180
23177
|
return variable ? ["1", "true", "TRUE", "yes", "YES"].includes(variable) : !1;
|
|
23181
23178
|
}
|
|
23182
23179
|
|
|
23180
|
+
// ../cli-kit/dist/private/node/context/utilities.js
|
|
23181
|
+
init_cjs_shims();
|
|
23182
|
+
function isSet(variable) {
|
|
23183
|
+
return !(variable === void 0 || variable.trim() === "");
|
|
23184
|
+
}
|
|
23185
|
+
function getCIMetadata(envName, envs) {
|
|
23186
|
+
switch (envName) {
|
|
23187
|
+
case "bitbucket":
|
|
23188
|
+
return {
|
|
23189
|
+
branch: envs.BITBUCKET_BRANCH,
|
|
23190
|
+
build: envs.BITBUCKET_BUILD_NUMBER,
|
|
23191
|
+
commitSha: envs.BITBUCKET_COMMIT,
|
|
23192
|
+
run: envs.BITBUCKET_BUILD_NUMBER,
|
|
23193
|
+
url: `https://bitbucket.org/${envs.BITBUCKET_WORKSPACE}/${envs.BITBUCKET_REPO_SLUG}/pipelines/results/${envs.BITBUCKET_BUILD_NUMBER}`
|
|
23194
|
+
};
|
|
23195
|
+
case "circleci":
|
|
23196
|
+
return {
|
|
23197
|
+
actor: envs.CIRCLE_USERNAME,
|
|
23198
|
+
branch: envs.CIRCLE_BRANCH,
|
|
23199
|
+
build: envs.CIRCLE_BUILD_NUM,
|
|
23200
|
+
commitSha: envs.CIRCLE_SHA1,
|
|
23201
|
+
run: envs.CIRCLE_WORKFLOW_ID,
|
|
23202
|
+
url: envs.CIRCLE_BUILD_URL
|
|
23203
|
+
};
|
|
23204
|
+
case "github":
|
|
23205
|
+
return {
|
|
23206
|
+
actor: envs.GITHUB_ACTOR,
|
|
23207
|
+
attempt: envs.GITHUB_RUN_ATTEMPT,
|
|
23208
|
+
branch: envs.GITHUB_REF_NAME,
|
|
23209
|
+
build: envs.GITHUB_RUN_ID,
|
|
23210
|
+
commitSha: envs.GITHUB_SHA,
|
|
23211
|
+
run: envs.GITHUB_RUN_ID,
|
|
23212
|
+
runNumber: envs.GITHUB_RUN_NUMBER,
|
|
23213
|
+
url: `${envs.GITHUB_SERVER_URL}/${envs.GITHUB_REPOSITORY}/actions/runs/${envs.GITHUB_RUN_ID}`
|
|
23214
|
+
};
|
|
23215
|
+
case "gitlab":
|
|
23216
|
+
return {
|
|
23217
|
+
actor: envs.GITLAB_USER_LOGIN,
|
|
23218
|
+
branch: envs.CI_COMMIT_REF_NAME,
|
|
23219
|
+
build: envs.CI_PIPELINE_ID,
|
|
23220
|
+
commitSha: envs.CI_COMMIT_SHA,
|
|
23221
|
+
commitMessage: envs.CI_COMMIT_MESSAGE,
|
|
23222
|
+
run: envs.CI_RUNNER_ID,
|
|
23223
|
+
url: envs.CI_PIPELINE_URL
|
|
23224
|
+
};
|
|
23225
|
+
case "buildkite":
|
|
23226
|
+
return {
|
|
23227
|
+
branch: envs.BUILDKITE_BRANCH,
|
|
23228
|
+
build: envs.BUILDKITE_BUILD_NUMBER,
|
|
23229
|
+
commitSha: envs.BUILDKITE_COMMIT,
|
|
23230
|
+
commitMessage: envs.BUILDKITE_MESSAGE,
|
|
23231
|
+
run: envs.BUILDKITE_BUILD_NUMBER,
|
|
23232
|
+
url: envs.BUILDKITE_BUILD_URL
|
|
23233
|
+
};
|
|
23234
|
+
default:
|
|
23235
|
+
return {};
|
|
23236
|
+
}
|
|
23237
|
+
}
|
|
23238
|
+
|
|
23239
|
+
// ../cli-kit/dist/private/node/constants.js
|
|
23240
|
+
init_cjs_shims();
|
|
23241
|
+
|
|
23242
|
+
// ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
|
|
23243
|
+
init_cjs_shims();
|
|
23244
|
+
import path from "node:path";
|
|
23245
|
+
import os from "node:os";
|
|
23246
|
+
import process2 from "node:process";
|
|
23247
|
+
var homedir = os.homedir(), tmpdir = os.tmpdir(), { env } = process2, macos = (name) => {
|
|
23248
|
+
let library = path.join(homedir, "Library");
|
|
23249
|
+
return {
|
|
23250
|
+
data: path.join(library, "Application Support", name),
|
|
23251
|
+
config: path.join(library, "Preferences", name),
|
|
23252
|
+
cache: path.join(library, "Caches", name),
|
|
23253
|
+
log: path.join(library, "Logs", name),
|
|
23254
|
+
temp: path.join(tmpdir, name)
|
|
23255
|
+
};
|
|
23256
|
+
}, windows = (name) => {
|
|
23257
|
+
let appData = env.APPDATA || path.join(homedir, "AppData", "Roaming"), localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
|
|
23258
|
+
return {
|
|
23259
|
+
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
23260
|
+
data: path.join(localAppData, name, "Data"),
|
|
23261
|
+
config: path.join(appData, name, "Config"),
|
|
23262
|
+
cache: path.join(localAppData, name, "Cache"),
|
|
23263
|
+
log: path.join(localAppData, name, "Log"),
|
|
23264
|
+
temp: path.join(tmpdir, name)
|
|
23265
|
+
};
|
|
23266
|
+
}, linux = (name) => {
|
|
23267
|
+
let username2 = path.basename(homedir);
|
|
23268
|
+
return {
|
|
23269
|
+
data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
|
|
23270
|
+
config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
|
|
23271
|
+
cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
|
|
23272
|
+
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
23273
|
+
log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
|
|
23274
|
+
temp: path.join(tmpdir, username2, name)
|
|
23275
|
+
};
|
|
23276
|
+
};
|
|
23277
|
+
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
23278
|
+
if (typeof name != "string")
|
|
23279
|
+
throw new TypeError(`Expected a string, got ${typeof name}`);
|
|
23280
|
+
return suffix && (name += `-${suffix}`), process2.platform === "darwin" ? macos(name) : process2.platform === "win32" ? windows(name) : linux(name);
|
|
23281
|
+
}
|
|
23282
|
+
|
|
23283
|
+
// ../cli-kit/dist/private/node/constants.js
|
|
23284
|
+
var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ? process.env.XDG_CACHE_HOME : envPaths(identifier).cache;
|
|
23285
|
+
var environmentVariables = {
|
|
23286
|
+
alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
|
|
23287
|
+
alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
|
|
23288
|
+
deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
|
|
23289
|
+
enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
|
|
23290
|
+
env: "SHOPIFY_CLI_ENV",
|
|
23291
|
+
firstPartyDev: "SHOPIFY_CLI_1P_DEV",
|
|
23292
|
+
noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS",
|
|
23293
|
+
partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
|
|
23294
|
+
runAsUser: "SHOPIFY_RUN_AS_USER",
|
|
23295
|
+
serviceEnv: "SHOPIFY_SERVICE_ENV",
|
|
23296
|
+
skipCliRedirect: "SHOPIFY_CLI_SKIP_CLI_REDIRECT",
|
|
23297
|
+
spinInstance: "SPIN_INSTANCE",
|
|
23298
|
+
themeToken: "SHOPIFY_CLI_THEME_TOKEN",
|
|
23299
|
+
unitTest: "SHOPIFY_UNIT_TEST",
|
|
23300
|
+
verbose: "SHOPIFY_FLAG_VERBOSE",
|
|
23301
|
+
// Variables to detect if the CLI is running in a cloud environment
|
|
23302
|
+
codespaces: "CODESPACES",
|
|
23303
|
+
codespaceName: "CODESPACE_NAME",
|
|
23304
|
+
codespacePortForwardingDomain: "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",
|
|
23305
|
+
gitpod: "GITPOD_WORKSPACE_URL",
|
|
23306
|
+
cloudShell: "CLOUD_SHELL",
|
|
23307
|
+
spinAppPort: "SERVER_PORT",
|
|
23308
|
+
spinAppHost: "SPIN_APP_HOST",
|
|
23309
|
+
organization: "SHOPIFY_CLI_ORGANIZATION",
|
|
23310
|
+
identityToken: "SHOPIFY_CLI_IDENTITY_TOKEN",
|
|
23311
|
+
refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
|
|
23312
|
+
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
23313
|
+
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
23314
|
+
json: "SHOPIFY_FLAG_JSON",
|
|
23315
|
+
neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API",
|
|
23316
|
+
skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
|
|
23317
|
+
maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS"
|
|
23318
|
+
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
23319
|
+
backendPort: "BACKEND_PORT"
|
|
23320
|
+
}, pathConstants = {
|
|
23321
|
+
executables: {
|
|
23322
|
+
dev: "/opt/dev/bin/dev"
|
|
23323
|
+
},
|
|
23324
|
+
directories: {
|
|
23325
|
+
cache: {
|
|
23326
|
+
path: () => cacheFolder(),
|
|
23327
|
+
vendor: {
|
|
23328
|
+
path: () => joinPath(cacheFolder(), "vendor"),
|
|
23329
|
+
binaries: () => joinPath(cacheFolder(), "vendor", "binaries")
|
|
23330
|
+
}
|
|
23331
|
+
}
|
|
23332
|
+
}
|
|
23333
|
+
}, sessionConstants = {
|
|
23334
|
+
expirationTimeMarginInMinutes: 4
|
|
23335
|
+
}, bugsnagApiKey = "9e1e6889176fd0c795d5c659225e0fae", reportingRateLimit = { limit: 300, timeout: { days: 1 } }, themeKitAccessDomain = process.env[environmentVariables.themeKitAccessDomain] ?? defaultThemeKitAccessDomain;
|
|
23336
|
+
|
|
23183
23337
|
// ../cli-kit/dist/public/node/fs.js
|
|
23184
23338
|
init_cjs_shims();
|
|
23185
23339
|
|
|
@@ -23231,7 +23385,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
23231
23385
|
try {
|
|
23232
23386
|
await getAndSet();
|
|
23233
23387
|
} catch (error) {
|
|
23234
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
23388
|
+
let { sendErrorToBugsnag } = await import("./error-handler-PZL5TOG2.js");
|
|
23235
23389
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
23236
23390
|
}
|
|
23237
23391
|
}, durationStack = [];
|
|
@@ -23276,19 +23430,19 @@ init_cjs_shims();
|
|
|
23276
23430
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/render.js
|
|
23277
23431
|
init_cjs_shims();
|
|
23278
23432
|
import { Stream } from "node:stream";
|
|
23279
|
-
import
|
|
23433
|
+
import process13 from "node:process";
|
|
23280
23434
|
|
|
23281
23435
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/ink.js
|
|
23282
23436
|
init_cjs_shims();
|
|
23283
23437
|
var import_react10 = __toESM(require_react(), 1), import_throttle = __toESM(require_throttle(), 1);
|
|
23284
|
-
import
|
|
23438
|
+
import process12 from "node:process";
|
|
23285
23439
|
|
|
23286
23440
|
// ../../node_modules/.pnpm/ansi-escapes@6.2.1/node_modules/ansi-escapes/index.js
|
|
23287
23441
|
init_cjs_shims();
|
|
23288
|
-
import
|
|
23289
|
-
var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isBrowser = typeof window < "u" && typeof window.document < "u", isTerminalApp = !isBrowser &&
|
|
23442
|
+
import process3 from "node:process";
|
|
23443
|
+
var ESC = "\x1B[", OSC = "\x1B]", BEL = "\x07", SEP = ";", isBrowser = typeof window < "u" && typeof window.document < "u", isTerminalApp = !isBrowser && process3.env.TERM_PROGRAM === "Apple_Terminal", isWindows = !isBrowser && process3.platform === "win32", cwdFunction = isBrowser ? () => {
|
|
23290
23444
|
throw new Error("`process.cwd()` only works in Node.js, not the browser.");
|
|
23291
|
-
} :
|
|
23445
|
+
} : process3.cwd, ansiEscapes = {};
|
|
23292
23446
|
ansiEscapes.cursorTo = (x, y) => {
|
|
23293
23447
|
if (typeof x != "number")
|
|
23294
23448
|
throw new TypeError("The `x` argument is required");
|
|
@@ -24293,7 +24447,7 @@ var Yoga = await initYoga(await E(_(import.meta.url).resolve("./yoga.wasm")));
|
|
|
24293
24447
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/reconciler.js
|
|
24294
24448
|
init_cjs_shims();
|
|
24295
24449
|
var import_react_reconciler = __toESM(require_react_reconciler(), 1), import_constants = __toESM(require_constants(), 1);
|
|
24296
|
-
import
|
|
24450
|
+
import process4 from "node:process";
|
|
24297
24451
|
|
|
24298
24452
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/dom.js
|
|
24299
24453
|
init_cjs_shims();
|
|
@@ -24623,6 +24777,147 @@ function isFullwidthCodePoint(codePoint) {
|
|
|
24623
24777
|
131072 <= codePoint && codePoint <= 262141) : !1;
|
|
24624
24778
|
}
|
|
24625
24779
|
|
|
24780
|
+
// ../../node_modules/.pnpm/ansi-styles@6.2.3/node_modules/ansi-styles/index.js
|
|
24781
|
+
init_cjs_shims();
|
|
24782
|
+
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m2 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles2 = {
|
|
24783
|
+
modifier: {
|
|
24784
|
+
reset: [0, 0],
|
|
24785
|
+
// 21 isn't widely supported and 22 does the same thing
|
|
24786
|
+
bold: [1, 22],
|
|
24787
|
+
dim: [2, 22],
|
|
24788
|
+
italic: [3, 23],
|
|
24789
|
+
underline: [4, 24],
|
|
24790
|
+
overline: [53, 55],
|
|
24791
|
+
inverse: [7, 27],
|
|
24792
|
+
hidden: [8, 28],
|
|
24793
|
+
strikethrough: [9, 29]
|
|
24794
|
+
},
|
|
24795
|
+
color: {
|
|
24796
|
+
black: [30, 39],
|
|
24797
|
+
red: [31, 39],
|
|
24798
|
+
green: [32, 39],
|
|
24799
|
+
yellow: [33, 39],
|
|
24800
|
+
blue: [34, 39],
|
|
24801
|
+
magenta: [35, 39],
|
|
24802
|
+
cyan: [36, 39],
|
|
24803
|
+
white: [37, 39],
|
|
24804
|
+
// Bright color
|
|
24805
|
+
blackBright: [90, 39],
|
|
24806
|
+
gray: [90, 39],
|
|
24807
|
+
// Alias of `blackBright`
|
|
24808
|
+
grey: [90, 39],
|
|
24809
|
+
// Alias of `blackBright`
|
|
24810
|
+
redBright: [91, 39],
|
|
24811
|
+
greenBright: [92, 39],
|
|
24812
|
+
yellowBright: [93, 39],
|
|
24813
|
+
blueBright: [94, 39],
|
|
24814
|
+
magentaBright: [95, 39],
|
|
24815
|
+
cyanBright: [96, 39],
|
|
24816
|
+
whiteBright: [97, 39]
|
|
24817
|
+
},
|
|
24818
|
+
bgColor: {
|
|
24819
|
+
bgBlack: [40, 49],
|
|
24820
|
+
bgRed: [41, 49],
|
|
24821
|
+
bgGreen: [42, 49],
|
|
24822
|
+
bgYellow: [43, 49],
|
|
24823
|
+
bgBlue: [44, 49],
|
|
24824
|
+
bgMagenta: [45, 49],
|
|
24825
|
+
bgCyan: [46, 49],
|
|
24826
|
+
bgWhite: [47, 49],
|
|
24827
|
+
// Bright color
|
|
24828
|
+
bgBlackBright: [100, 49],
|
|
24829
|
+
bgGray: [100, 49],
|
|
24830
|
+
// Alias of `bgBlackBright`
|
|
24831
|
+
bgGrey: [100, 49],
|
|
24832
|
+
// Alias of `bgBlackBright`
|
|
24833
|
+
bgRedBright: [101, 49],
|
|
24834
|
+
bgGreenBright: [102, 49],
|
|
24835
|
+
bgYellowBright: [103, 49],
|
|
24836
|
+
bgBlueBright: [104, 49],
|
|
24837
|
+
bgMagentaBright: [105, 49],
|
|
24838
|
+
bgCyanBright: [106, 49],
|
|
24839
|
+
bgWhiteBright: [107, 49]
|
|
24840
|
+
}
|
|
24841
|
+
}, modifierNames2 = Object.keys(styles2.modifier), foregroundColorNames2 = Object.keys(styles2.color), backgroundColorNames2 = Object.keys(styles2.bgColor), colorNames2 = [...foregroundColorNames2, ...backgroundColorNames2];
|
|
24842
|
+
function assembleStyles2() {
|
|
24843
|
+
let codes = /* @__PURE__ */ new Map();
|
|
24844
|
+
for (let [groupName, group] of Object.entries(styles2)) {
|
|
24845
|
+
for (let [styleName, style] of Object.entries(group))
|
|
24846
|
+
styles2[styleName] = {
|
|
24847
|
+
open: `\x1B[${style[0]}m`,
|
|
24848
|
+
close: `\x1B[${style[1]}m`
|
|
24849
|
+
}, group[styleName] = styles2[styleName], codes.set(style[0], style[1]);
|
|
24850
|
+
Object.defineProperty(styles2, groupName, {
|
|
24851
|
+
value: group,
|
|
24852
|
+
enumerable: !1
|
|
24853
|
+
});
|
|
24854
|
+
}
|
|
24855
|
+
return Object.defineProperty(styles2, "codes", {
|
|
24856
|
+
value: codes,
|
|
24857
|
+
enumerable: !1
|
|
24858
|
+
}), styles2.color.close = "\x1B[39m", styles2.bgColor.close = "\x1B[49m", styles2.color.ansi = wrapAnsi162(), styles2.color.ansi256 = wrapAnsi2562(), styles2.color.ansi16m = wrapAnsi16m2(), styles2.bgColor.ansi = wrapAnsi162(10), styles2.bgColor.ansi256 = wrapAnsi2562(10), styles2.bgColor.ansi16m = wrapAnsi16m2(10), Object.defineProperties(styles2, {
|
|
24859
|
+
rgbToAnsi256: {
|
|
24860
|
+
value(red, green, blue) {
|
|
24861
|
+
return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
24862
|
+
},
|
|
24863
|
+
enumerable: !1
|
|
24864
|
+
},
|
|
24865
|
+
hexToRgb: {
|
|
24866
|
+
value(hex) {
|
|
24867
|
+
let matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
24868
|
+
if (!matches)
|
|
24869
|
+
return [0, 0, 0];
|
|
24870
|
+
let [colorString] = matches;
|
|
24871
|
+
colorString.length === 3 && (colorString = [...colorString].map((character) => character + character).join(""));
|
|
24872
|
+
let integer = Number.parseInt(colorString, 16);
|
|
24873
|
+
return [
|
|
24874
|
+
/* eslint-disable no-bitwise */
|
|
24875
|
+
integer >> 16 & 255,
|
|
24876
|
+
integer >> 8 & 255,
|
|
24877
|
+
integer & 255
|
|
24878
|
+
/* eslint-enable no-bitwise */
|
|
24879
|
+
];
|
|
24880
|
+
},
|
|
24881
|
+
enumerable: !1
|
|
24882
|
+
},
|
|
24883
|
+
hexToAnsi256: {
|
|
24884
|
+
value: (hex) => styles2.rgbToAnsi256(...styles2.hexToRgb(hex)),
|
|
24885
|
+
enumerable: !1
|
|
24886
|
+
},
|
|
24887
|
+
ansi256ToAnsi: {
|
|
24888
|
+
value(code) {
|
|
24889
|
+
if (code < 8)
|
|
24890
|
+
return 30 + code;
|
|
24891
|
+
if (code < 16)
|
|
24892
|
+
return 90 + (code - 8);
|
|
24893
|
+
let red, green, blue;
|
|
24894
|
+
if (code >= 232)
|
|
24895
|
+
red = ((code - 232) * 10 + 8) / 255, green = red, blue = red;
|
|
24896
|
+
else {
|
|
24897
|
+
code -= 16;
|
|
24898
|
+
let remainder = code % 36;
|
|
24899
|
+
red = Math.floor(code / 36) / 5, green = Math.floor(remainder / 6) / 5, blue = remainder % 6 / 5;
|
|
24900
|
+
}
|
|
24901
|
+
let value = Math.max(red, green, blue) * 2;
|
|
24902
|
+
if (value === 0)
|
|
24903
|
+
return 30;
|
|
24904
|
+
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
24905
|
+
return value === 2 && (result += 60), result;
|
|
24906
|
+
},
|
|
24907
|
+
enumerable: !1
|
|
24908
|
+
},
|
|
24909
|
+
rgbToAnsi: {
|
|
24910
|
+
value: (red, green, blue) => styles2.ansi256ToAnsi(styles2.rgbToAnsi256(red, green, blue)),
|
|
24911
|
+
enumerable: !1
|
|
24912
|
+
},
|
|
24913
|
+
hexToAnsi: {
|
|
24914
|
+
value: (hex) => styles2.ansi256ToAnsi(styles2.hexToAnsi256(hex)),
|
|
24915
|
+
enumerable: !1
|
|
24916
|
+
}
|
|
24917
|
+
}), styles2;
|
|
24918
|
+
}
|
|
24919
|
+
var ansiStyles2 = assembleStyles2(), ansi_styles_default2 = ansiStyles2;
|
|
24920
|
+
|
|
24626
24921
|
// ../../node_modules/.pnpm/slice-ansi@5.0.0/node_modules/slice-ansi/index.js
|
|
24627
24922
|
var astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/, ESCAPES2 = [
|
|
24628
24923
|
"\x1B",
|
|
@@ -24633,7 +24928,7 @@ var astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/, ESCAPES2 = [
|
|
|
24633
24928
|
for (let ansiCode of ansiCodes) {
|
|
24634
24929
|
let ansiCodeOrigin = ansiCode;
|
|
24635
24930
|
ansiCode.includes(";") && (ansiCode = ansiCode.split(";")[0][0] + "0");
|
|
24636
|
-
let item =
|
|
24931
|
+
let item = ansi_styles_default2.codes.get(Number.parseInt(ansiCode, 10));
|
|
24637
24932
|
if (item) {
|
|
24638
24933
|
let indexEscape = ansiCodes.indexOf(item.toString());
|
|
24639
24934
|
indexEscape === -1 ? output2.push(wrapAnsi2(isEscapes ? item : ansiCodeOrigin)) : ansiCodes.splice(indexEscape, 1);
|
|
@@ -24644,7 +24939,7 @@ var astralRegex = /^[\uD800-\uDBFF][\uDC00-\uDFFF]$/, ESCAPES2 = [
|
|
|
24644
24939
|
output2.push(wrapAnsi2(ansiCodeOrigin));
|
|
24645
24940
|
}
|
|
24646
24941
|
if (isEscapes && (output2 = output2.filter((element, index) => output2.indexOf(element) === index), endAnsiCode !== void 0)) {
|
|
24647
|
-
let fistEscapeCode = wrapAnsi2(
|
|
24942
|
+
let fistEscapeCode = wrapAnsi2(ansi_styles_default2.codes.get(Number.parseInt(endAnsiCode, 10)));
|
|
24648
24943
|
output2 = output2.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
|
|
24649
24944
|
}
|
|
24650
24945
|
return output2.join("");
|
|
@@ -24830,12 +25125,12 @@ var applyPositionStyles = (node, style) => {
|
|
|
24830
25125
|
}
|
|
24831
25126
|
}, applyGapStyles = (node, style) => {
|
|
24832
25127
|
"gap" in style && node.setGap(Yoga.GUTTER_ALL, style.gap ?? 0), "columnGap" in style && node.setGap(Yoga.GUTTER_COLUMN, style.columnGap ?? 0), "rowGap" in style && node.setGap(Yoga.GUTTER_ROW, style.rowGap ?? 0);
|
|
24833
|
-
},
|
|
25128
|
+
}, styles3 = (node, style = {}) => {
|
|
24834
25129
|
applyPositionStyles(node, style), applyMarginStyles(node, style), applyPaddingStyles(node, style), applyFlexStyles(node, style), applyDimensionStyles(node, style), applyDisplayStyles(node, style), applyBorderStyles(node, style), applyGapStyles(node, style);
|
|
24835
|
-
}, styles_default =
|
|
25130
|
+
}, styles_default = styles3;
|
|
24836
25131
|
|
|
24837
25132
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/reconciler.js
|
|
24838
|
-
if (
|
|
25133
|
+
if (process4.env.DEV === "true")
|
|
24839
25134
|
try {
|
|
24840
25135
|
await import("./devtools-LDCSRUXB.js");
|
|
24841
25136
|
} catch (error) {
|
|
@@ -24917,7 +25212,7 @@ var diff = (before, after) => {
|
|
|
24917
25212
|
unhideTextInstance(node, text) {
|
|
24918
25213
|
setTextNodeValue(node, text);
|
|
24919
25214
|
},
|
|
24920
|
-
getPublicInstance: (
|
|
25215
|
+
getPublicInstance: (instance) => instance,
|
|
24921
25216
|
hideInstance(node) {
|
|
24922
25217
|
node.yogaNode?.setDisplay(Yoga.DISPLAY_NONE);
|
|
24923
25218
|
},
|
|
@@ -25033,7 +25328,7 @@ init_cjs_shims();
|
|
|
25033
25328
|
|
|
25034
25329
|
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
25035
25330
|
init_cjs_shims();
|
|
25036
|
-
var
|
|
25331
|
+
var wrapAnsi163 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi2563 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`, wrapAnsi16m3 = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`, styles4 = {
|
|
25037
25332
|
modifier: {
|
|
25038
25333
|
reset: [0, 0],
|
|
25039
25334
|
// 21 isn't widely supported and 22 does the same thing
|
|
@@ -25092,24 +25387,24 @@ var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`, wrapAnsi25
|
|
|
25092
25387
|
bgCyanBright: [106, 49],
|
|
25093
25388
|
bgWhiteBright: [107, 49]
|
|
25094
25389
|
}
|
|
25095
|
-
},
|
|
25096
|
-
function
|
|
25390
|
+
}, modifierNames3 = Object.keys(styles4.modifier), foregroundColorNames3 = Object.keys(styles4.color), backgroundColorNames3 = Object.keys(styles4.bgColor), colorNames3 = [...foregroundColorNames3, ...backgroundColorNames3];
|
|
25391
|
+
function assembleStyles3() {
|
|
25097
25392
|
let codes = /* @__PURE__ */ new Map();
|
|
25098
|
-
for (let [groupName, group] of Object.entries(
|
|
25393
|
+
for (let [groupName, group] of Object.entries(styles4)) {
|
|
25099
25394
|
for (let [styleName, style] of Object.entries(group))
|
|
25100
|
-
|
|
25395
|
+
styles4[styleName] = {
|
|
25101
25396
|
open: `\x1B[${style[0]}m`,
|
|
25102
25397
|
close: `\x1B[${style[1]}m`
|
|
25103
|
-
}, group[styleName] =
|
|
25104
|
-
Object.defineProperty(
|
|
25398
|
+
}, group[styleName] = styles4[styleName], codes.set(style[0], style[1]);
|
|
25399
|
+
Object.defineProperty(styles4, groupName, {
|
|
25105
25400
|
value: group,
|
|
25106
25401
|
enumerable: !1
|
|
25107
25402
|
});
|
|
25108
25403
|
}
|
|
25109
|
-
return Object.defineProperty(
|
|
25404
|
+
return Object.defineProperty(styles4, "codes", {
|
|
25110
25405
|
value: codes,
|
|
25111
25406
|
enumerable: !1
|
|
25112
|
-
}),
|
|
25407
|
+
}), styles4.color.close = "\x1B[39m", styles4.bgColor.close = "\x1B[49m", styles4.color.ansi = wrapAnsi163(), styles4.color.ansi256 = wrapAnsi2563(), styles4.color.ansi16m = wrapAnsi16m3(), styles4.bgColor.ansi = wrapAnsi163(10), styles4.bgColor.ansi256 = wrapAnsi2563(10), styles4.bgColor.ansi16m = wrapAnsi16m3(10), Object.defineProperties(styles4, {
|
|
25113
25408
|
rgbToAnsi256: {
|
|
25114
25409
|
value(red, green, blue) {
|
|
25115
25410
|
return red === green && green === blue ? red < 8 ? 16 : red > 248 ? 231 : Math.round((red - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
@@ -25135,7 +25430,7 @@ function assembleStyles2() {
|
|
|
25135
25430
|
enumerable: !1
|
|
25136
25431
|
},
|
|
25137
25432
|
hexToAnsi256: {
|
|
25138
|
-
value: (hex) =>
|
|
25433
|
+
value: (hex) => styles4.rgbToAnsi256(...styles4.hexToRgb(hex)),
|
|
25139
25434
|
enumerable: !1
|
|
25140
25435
|
},
|
|
25141
25436
|
ansi256ToAnsi: {
|
|
@@ -25161,31 +25456,31 @@ function assembleStyles2() {
|
|
|
25161
25456
|
enumerable: !1
|
|
25162
25457
|
},
|
|
25163
25458
|
rgbToAnsi: {
|
|
25164
|
-
value: (red, green, blue) =>
|
|
25459
|
+
value: (red, green, blue) => styles4.ansi256ToAnsi(styles4.rgbToAnsi256(red, green, blue)),
|
|
25165
25460
|
enumerable: !1
|
|
25166
25461
|
},
|
|
25167
25462
|
hexToAnsi: {
|
|
25168
|
-
value: (hex) =>
|
|
25463
|
+
value: (hex) => styles4.ansi256ToAnsi(styles4.hexToAnsi256(hex)),
|
|
25169
25464
|
enumerable: !1
|
|
25170
25465
|
}
|
|
25171
|
-
}),
|
|
25466
|
+
}), styles4;
|
|
25172
25467
|
}
|
|
25173
|
-
var
|
|
25468
|
+
var ansiStyles3 = assembleStyles3(), ansi_styles_default3 = ansiStyles3;
|
|
25174
25469
|
|
|
25175
25470
|
// ../../node_modules/.pnpm/chalk@5.4.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
25176
25471
|
init_cjs_shims();
|
|
25177
|
-
import
|
|
25178
|
-
import
|
|
25472
|
+
import process5 from "node:process";
|
|
25473
|
+
import os2 from "node:os";
|
|
25179
25474
|
import tty from "node:tty";
|
|
25180
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args :
|
|
25475
|
+
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process5.argv) {
|
|
25181
25476
|
let prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--", position = argv.indexOf(prefix + flag), terminatorPosition = argv.indexOf("--");
|
|
25182
25477
|
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
25183
25478
|
}
|
|
25184
|
-
var { env } =
|
|
25479
|
+
var { env: env2 } = process5, flagForceColor;
|
|
25185
25480
|
hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never") ? flagForceColor = 0 : (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) && (flagForceColor = 1);
|
|
25186
25481
|
function envForceColor() {
|
|
25187
|
-
if ("FORCE_COLOR" in
|
|
25188
|
-
return
|
|
25482
|
+
if ("FORCE_COLOR" in env2)
|
|
25483
|
+
return env2.FORCE_COLOR === "true" ? 1 : env2.FORCE_COLOR === "false" ? 0 : env2.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env2.FORCE_COLOR, 10), 3);
|
|
25189
25484
|
}
|
|
25190
25485
|
function translateLevel(level) {
|
|
25191
25486
|
return level === 0 ? !1 : {
|
|
@@ -25207,33 +25502,33 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = !0 } = {}) {
|
|
|
25207
25502
|
if (hasFlag("color=256"))
|
|
25208
25503
|
return 2;
|
|
25209
25504
|
}
|
|
25210
|
-
if ("TF_BUILD" in
|
|
25505
|
+
if ("TF_BUILD" in env2 && "AGENT_NAME" in env2)
|
|
25211
25506
|
return 1;
|
|
25212
25507
|
if (haveStream && !streamIsTTY && forceColor === void 0)
|
|
25213
25508
|
return 0;
|
|
25214
25509
|
let min = forceColor || 0;
|
|
25215
|
-
if (
|
|
25510
|
+
if (env2.TERM === "dumb")
|
|
25216
25511
|
return min;
|
|
25217
|
-
if (
|
|
25218
|
-
let osRelease =
|
|
25512
|
+
if (process5.platform === "win32") {
|
|
25513
|
+
let osRelease = os2.release().split(".");
|
|
25219
25514
|
return Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586 ? Number(osRelease[2]) >= 14931 ? 3 : 2 : 1;
|
|
25220
25515
|
}
|
|
25221
|
-
if ("CI" in
|
|
25222
|
-
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in
|
|
25223
|
-
if ("TEAMCITY_VERSION" in
|
|
25224
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
|
25225
|
-
if (
|
|
25516
|
+
if ("CI" in env2)
|
|
25517
|
+
return ["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env2) ? 3 : ["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env2) || env2.CI_NAME === "codeship" ? 1 : min;
|
|
25518
|
+
if ("TEAMCITY_VERSION" in env2)
|
|
25519
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env2.TEAMCITY_VERSION) ? 1 : 0;
|
|
25520
|
+
if (env2.COLORTERM === "truecolor" || env2.TERM === "xterm-kitty")
|
|
25226
25521
|
return 3;
|
|
25227
|
-
if ("TERM_PROGRAM" in
|
|
25228
|
-
let version = Number.parseInt((
|
|
25229
|
-
switch (
|
|
25522
|
+
if ("TERM_PROGRAM" in env2) {
|
|
25523
|
+
let version = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
25524
|
+
switch (env2.TERM_PROGRAM) {
|
|
25230
25525
|
case "iTerm.app":
|
|
25231
25526
|
return version >= 3 ? 3 : 2;
|
|
25232
25527
|
case "Apple_Terminal":
|
|
25233
25528
|
return 2;
|
|
25234
25529
|
}
|
|
25235
25530
|
}
|
|
25236
|
-
return /-256(color)?$/i.test(
|
|
25531
|
+
return /-256(color)?$/i.test(env2.TERM) ? 2 : /^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env2.TERM) || "COLORTERM" in env2 ? 1 : min;
|
|
25237
25532
|
}
|
|
25238
25533
|
function createSupportsColor(stream2, options = {}) {
|
|
25239
25534
|
let level = _supportsColor(stream2, {
|
|
@@ -25277,7 +25572,7 @@ var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default, GENER
|
|
|
25277
25572
|
"ansi",
|
|
25278
25573
|
"ansi256",
|
|
25279
25574
|
"ansi16m"
|
|
25280
|
-
],
|
|
25575
|
+
], styles5 = /* @__PURE__ */ Object.create(null), applyOptions = (object, options = {}) => {
|
|
25281
25576
|
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3))
|
|
25282
25577
|
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
25283
25578
|
let colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
@@ -25291,36 +25586,36 @@ function createChalk(options) {
|
|
|
25291
25586
|
return chalkFactory(options);
|
|
25292
25587
|
}
|
|
25293
25588
|
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
25294
|
-
for (let [styleName, style] of Object.entries(
|
|
25295
|
-
|
|
25589
|
+
for (let [styleName, style] of Object.entries(ansi_styles_default3))
|
|
25590
|
+
styles5[styleName] = {
|
|
25296
25591
|
get() {
|
|
25297
25592
|
let builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
25298
25593
|
return Object.defineProperty(this, styleName, { value: builder }), builder;
|
|
25299
25594
|
}
|
|
25300
25595
|
};
|
|
25301
|
-
|
|
25596
|
+
styles5.visible = {
|
|
25302
25597
|
get() {
|
|
25303
25598
|
let builder = createBuilder(this, this[STYLER], !0);
|
|
25304
25599
|
return Object.defineProperty(this, "visible", { value: builder }), builder;
|
|
25305
25600
|
}
|
|
25306
25601
|
};
|
|
25307
|
-
var getModelAnsi = (model, level, type, ...arguments_) => model === "rgb" ? level === "ansi16m" ?
|
|
25602
|
+
var getModelAnsi = (model, level, type, ...arguments_) => model === "rgb" ? level === "ansi16m" ? ansi_styles_default3[type].ansi16m(...arguments_) : level === "ansi256" ? ansi_styles_default3[type].ansi256(ansi_styles_default3.rgbToAnsi256(...arguments_)) : ansi_styles_default3[type].ansi(ansi_styles_default3.rgbToAnsi(...arguments_)) : model === "hex" ? getModelAnsi("rgb", level, type, ...ansi_styles_default3.hexToRgb(...arguments_)) : ansi_styles_default3[type][model](...arguments_), usedModels = ["rgb", "hex", "ansi256"];
|
|
25308
25603
|
for (let model of usedModels) {
|
|
25309
|
-
|
|
25604
|
+
styles5[model] = {
|
|
25310
25605
|
get() {
|
|
25311
25606
|
let { level } = this;
|
|
25312
25607
|
return function(...arguments_) {
|
|
25313
|
-
let styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_),
|
|
25608
|
+
let styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default3.color.close, this[STYLER]);
|
|
25314
25609
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
25315
25610
|
};
|
|
25316
25611
|
}
|
|
25317
25612
|
};
|
|
25318
25613
|
let bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
25319
|
-
|
|
25614
|
+
styles5[bgModel] = {
|
|
25320
25615
|
get() {
|
|
25321
25616
|
let { level } = this;
|
|
25322
25617
|
return function(...arguments_) {
|
|
25323
|
-
let styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_),
|
|
25618
|
+
let styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default3.bgColor.close, this[STYLER]);
|
|
25324
25619
|
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
25325
25620
|
};
|
|
25326
25621
|
}
|
|
@@ -25328,7 +25623,7 @@ for (let model of usedModels) {
|
|
|
25328
25623
|
}
|
|
25329
25624
|
var proto = Object.defineProperties(() => {
|
|
25330
25625
|
}, {
|
|
25331
|
-
...
|
|
25626
|
+
...styles5,
|
|
25332
25627
|
level: {
|
|
25333
25628
|
enumerable: !0,
|
|
25334
25629
|
get() {
|
|
@@ -25364,7 +25659,7 @@ var proto = Object.defineProperties(() => {
|
|
|
25364
25659
|
`);
|
|
25365
25660
|
return lfIndex !== -1 && (string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex)), openAll + string + closeAll;
|
|
25366
25661
|
};
|
|
25367
|
-
Object.defineProperties(createChalk.prototype,
|
|
25662
|
+
Object.defineProperties(createChalk.prototype, styles5);
|
|
25368
25663
|
var chalk = createChalk(), chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
25369
25664
|
var source_default = chalk;
|
|
25370
25665
|
|
|
@@ -25834,24 +26129,24 @@ init_cjs_shims();
|
|
|
25834
26129
|
|
|
25835
26130
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
25836
26131
|
init_cjs_shims();
|
|
25837
|
-
import
|
|
26132
|
+
import process7 from "node:process";
|
|
25838
26133
|
|
|
25839
26134
|
// ../../node_modules/.pnpm/restore-cursor@4.0.0/node_modules/restore-cursor/index.js
|
|
25840
26135
|
init_cjs_shims();
|
|
25841
26136
|
var import_onetime = __toESM(require_onetime(), 1), import_signal_exit = __toESM(require_signal_exit(), 1);
|
|
25842
|
-
import
|
|
26137
|
+
import process6 from "node:process";
|
|
25843
26138
|
var restoreCursor = (0, import_onetime.default)(() => {
|
|
25844
26139
|
(0, import_signal_exit.default)(() => {
|
|
25845
|
-
|
|
26140
|
+
process6.stderr.write("\x1B[?25h");
|
|
25846
26141
|
}, { alwaysLast: !0 });
|
|
25847
26142
|
}), restore_cursor_default = restoreCursor;
|
|
25848
26143
|
|
|
25849
26144
|
// ../../node_modules/.pnpm/cli-cursor@4.0.0/node_modules/cli-cursor/index.js
|
|
25850
26145
|
var isHidden = !1, cliCursor = {};
|
|
25851
|
-
cliCursor.show = (writableStream =
|
|
26146
|
+
cliCursor.show = (writableStream = process7.stderr) => {
|
|
25852
26147
|
writableStream.isTTY && (isHidden = !1, writableStream.write("\x1B[?25h"));
|
|
25853
26148
|
};
|
|
25854
|
-
cliCursor.hide = (writableStream =
|
|
26149
|
+
cliCursor.hide = (writableStream = process7.stderr) => {
|
|
25855
26150
|
writableStream.isTTY && (restore_cursor_default(), isHidden = !0, writableStream.write("\x1B[?25l"));
|
|
25856
26151
|
};
|
|
25857
26152
|
cliCursor.toggle = (force, writableStream) => {
|
|
@@ -25883,7 +26178,7 @@ var instances = /* @__PURE__ */ new WeakMap(), instances_default = instances;
|
|
|
25883
26178
|
init_cjs_shims();
|
|
25884
26179
|
var import_react9 = __toESM(require_react(), 1);
|
|
25885
26180
|
import { EventEmitter as EventEmitter2 } from "node:events";
|
|
25886
|
-
import
|
|
26181
|
+
import process11 from "node:process";
|
|
25887
26182
|
|
|
25888
26183
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/AppContext.js
|
|
25889
26184
|
init_cjs_shims();
|
|
@@ -25898,9 +26193,9 @@ var AppContext_default = AppContext;
|
|
|
25898
26193
|
init_cjs_shims();
|
|
25899
26194
|
var import_react2 = __toESM(require_react(), 1);
|
|
25900
26195
|
import { EventEmitter } from "node:events";
|
|
25901
|
-
import
|
|
26196
|
+
import process8 from "node:process";
|
|
25902
26197
|
var StdinContext = (0, import_react2.createContext)({
|
|
25903
|
-
stdin:
|
|
26198
|
+
stdin: process8.stdin,
|
|
25904
26199
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
25905
26200
|
internal_eventEmitter: new EventEmitter(),
|
|
25906
26201
|
setRawMode() {
|
|
@@ -25915,9 +26210,9 @@ var StdinContext_default = StdinContext;
|
|
|
25915
26210
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/StdoutContext.js
|
|
25916
26211
|
init_cjs_shims();
|
|
25917
26212
|
var import_react3 = __toESM(require_react(), 1);
|
|
25918
|
-
import
|
|
26213
|
+
import process9 from "node:process";
|
|
25919
26214
|
var StdoutContext = (0, import_react3.createContext)({
|
|
25920
|
-
stdout:
|
|
26215
|
+
stdout: process9.stdout,
|
|
25921
26216
|
write() {
|
|
25922
26217
|
}
|
|
25923
26218
|
});
|
|
@@ -25927,9 +26222,9 @@ var StdoutContext_default = StdoutContext;
|
|
|
25927
26222
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/StderrContext.js
|
|
25928
26223
|
init_cjs_shims();
|
|
25929
26224
|
var import_react4 = __toESM(require_react(), 1);
|
|
25930
|
-
import
|
|
26225
|
+
import process10 from "node:process";
|
|
25931
26226
|
var StderrContext = (0, import_react4.createContext)({
|
|
25932
|
-
stderr:
|
|
26227
|
+
stderr: process10.stderr,
|
|
25933
26228
|
write() {
|
|
25934
26229
|
}
|
|
25935
26230
|
});
|
|
@@ -26140,7 +26435,7 @@ var tab = " ", shiftTab = "\x1B[Z", escape = "\x1B", App = class extends import_
|
|
|
26140
26435
|
value: (isEnabled) => {
|
|
26141
26436
|
let { stdin } = this.props;
|
|
26142
26437
|
if (!this.isRawModeSupported())
|
|
26143
|
-
throw stdin ===
|
|
26438
|
+
throw stdin === process11.stdin ? new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
26144
26439
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`) : new Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
26145
26440
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);
|
|
26146
26441
|
if (stdin.setEncoding("utf8"), isEnabled) {
|
|
@@ -26393,7 +26688,7 @@ Object.defineProperty(App, "displayName", {
|
|
|
26393
26688
|
});
|
|
26394
26689
|
|
|
26395
26690
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/ink.js
|
|
26396
|
-
var isCi =
|
|
26691
|
+
var isCi = process12.env.CI === "false" ? !1 : import_is_ci.default, noop = () => {
|
|
26397
26692
|
}, Ink = class {
|
|
26398
26693
|
constructor(options) {
|
|
26399
26694
|
Object.defineProperty(this, "options", {
|
|
@@ -26524,7 +26819,7 @@ var isCi = process11.env.CI === "false" ? !1 : import_is_ci.default, noop = () =
|
|
|
26524
26819
|
() => {
|
|
26525
26820
|
},
|
|
26526
26821
|
null
|
|
26527
|
-
), this.unsubscribeExit = (0, import_signal_exit2.default)(this.unmount, { alwaysLast: !1 }),
|
|
26822
|
+
), this.unsubscribeExit = (0, import_signal_exit2.default)(this.unmount, { alwaysLast: !1 }), process12.env.DEV === "true" && reconciler_default.injectIntoDevTools({
|
|
26528
26823
|
bundleType: 0,
|
|
26529
26824
|
// Reporting React DOM's version, not Ink's
|
|
26530
26825
|
// See https://github.com/facebook/react/issues/16666#issuecomment-532639905
|
|
@@ -26587,29 +26882,29 @@ var isCi = process11.env.CI === "false" ? !1 : import_is_ci.default, noop = () =
|
|
|
26587
26882
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/render.js
|
|
26588
26883
|
var render = (node, options) => {
|
|
26589
26884
|
let inkOptions = {
|
|
26590
|
-
stdout:
|
|
26591
|
-
stdin:
|
|
26592
|
-
stderr:
|
|
26885
|
+
stdout: process13.stdout,
|
|
26886
|
+
stdin: process13.stdin,
|
|
26887
|
+
stderr: process13.stderr,
|
|
26593
26888
|
debug: !1,
|
|
26594
26889
|
exitOnCtrlC: !0,
|
|
26595
26890
|
patchConsole: !0,
|
|
26596
26891
|
...getOptions(options)
|
|
26597
|
-
},
|
|
26598
|
-
return
|
|
26599
|
-
rerender:
|
|
26892
|
+
}, instance = getInstance(inkOptions.stdout, () => new Ink(inkOptions));
|
|
26893
|
+
return instance.render(node), {
|
|
26894
|
+
rerender: instance.render,
|
|
26600
26895
|
unmount() {
|
|
26601
|
-
|
|
26896
|
+
instance.unmount();
|
|
26602
26897
|
},
|
|
26603
|
-
waitUntilExit:
|
|
26898
|
+
waitUntilExit: instance.waitUntilExit,
|
|
26604
26899
|
cleanup: () => instances_default.delete(inkOptions.stdout),
|
|
26605
|
-
clear:
|
|
26900
|
+
clear: instance.clear
|
|
26606
26901
|
};
|
|
26607
26902
|
}, render_default = render, getOptions = (stdout = {}) => stdout instanceof Stream ? {
|
|
26608
26903
|
stdout,
|
|
26609
|
-
stdin:
|
|
26904
|
+
stdin: process13.stdin
|
|
26610
26905
|
} : stdout, getInstance = (stdout, createInstance) => {
|
|
26611
|
-
let
|
|
26612
|
-
return
|
|
26906
|
+
let instance = instances_default.get(stdout);
|
|
26907
|
+
return instance || (instance = createInstance(), instances_default.set(stdout, instance)), instance;
|
|
26613
26908
|
};
|
|
26614
26909
|
|
|
26615
26910
|
// ../../node_modules/.pnpm/ink@4.4.1_@types+react@17.0.2_react@18.3.1/node_modules/ink/build/components/Static.js
|
|
@@ -26876,20 +27171,20 @@ var measureElement = (node) => ({
|
|
|
26876
27171
|
|
|
26877
27172
|
// ../../node_modules/.pnpm/figures@5.0.0/node_modules/figures/index.js
|
|
26878
27173
|
init_cjs_shims();
|
|
26879
|
-
import
|
|
27174
|
+
import process15 from "node:process";
|
|
26880
27175
|
|
|
26881
27176
|
// ../../node_modules/.pnpm/escape-string-regexp@5.0.0/node_modules/escape-string-regexp/index.js
|
|
26882
27177
|
init_cjs_shims();
|
|
26883
27178
|
|
|
26884
27179
|
// ../../node_modules/.pnpm/is-unicode-supported@1.3.0/node_modules/is-unicode-supported/index.js
|
|
26885
27180
|
init_cjs_shims();
|
|
26886
|
-
import
|
|
27181
|
+
import process14 from "node:process";
|
|
26887
27182
|
function isUnicodeSupported() {
|
|
26888
|
-
return
|
|
27183
|
+
return process14.platform !== "win32" ? process14.env.TERM !== "linux" : !!process14.env.CI || !!process14.env.WT_SESSION || !!process14.env.TERMINUS_SUBLIME || process14.env.ConEmuTask === "{cmd::Cmder}" || process14.env.TERM_PROGRAM === "Terminus-Sublime" || process14.env.TERM_PROGRAM === "vscode" || process14.env.TERM === "xterm-256color" || process14.env.TERM === "alacritty" || process14.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
26889
27184
|
}
|
|
26890
27185
|
|
|
26891
27186
|
// ../../node_modules/.pnpm/figures@5.0.0/node_modules/figures/index.js
|
|
26892
|
-
var { platform } =
|
|
27187
|
+
var { platform } = process15, common = {
|
|
26893
27188
|
square: "\u2588",
|
|
26894
27189
|
squareDarkShade: "\u2593",
|
|
26895
27190
|
squareMediumShade: "\u2592",
|
|
@@ -27374,7 +27669,7 @@ var Stdout = class extends EventEmitter3 {
|
|
|
27374
27669
|
}, this.lastFrame = () => this._lastFrame, this.columns = options.columns ?? 80, this.rows = options.rows ?? 80;
|
|
27375
27670
|
}
|
|
27376
27671
|
}, renderString = (element, renderOptions) => {
|
|
27377
|
-
let columns = isUnitTest() ? 80 : process.stdout.columns, stdout = renderOptions?.stdout ?? new Stdout({ columns }),
|
|
27672
|
+
let columns = isUnitTest() ? 80 : process.stdout.columns, stdout = renderOptions?.stdout ?? new Stdout({ columns }), instance = render_default(element, {
|
|
27378
27673
|
stdout,
|
|
27379
27674
|
debug: !0,
|
|
27380
27675
|
exitOnCtrlC: !1,
|
|
@@ -27382,7 +27677,7 @@ var Stdout = class extends EventEmitter3 {
|
|
|
27382
27677
|
});
|
|
27383
27678
|
return {
|
|
27384
27679
|
output: stdout.lastFrame(),
|
|
27385
|
-
unmount:
|
|
27680
|
+
unmount: instance.unmount
|
|
27386
27681
|
};
|
|
27387
27682
|
};
|
|
27388
27683
|
function handleCtrlC(input, key, exit = () => {
|
|
@@ -27860,7 +28155,7 @@ function asHumanFriendlyArray(items) {
|
|
|
27860
28155
|
}
|
|
27861
28156
|
|
|
27862
28157
|
// ../cli-kit/dist/public/common/string.js
|
|
27863
|
-
var import_change_case = __toESM(require_dist16()
|
|
28158
|
+
var import_change_case = __toESM(require_dist16()), SAFE_RANDOM_BUSINESS_ADJECTIVES = [
|
|
27864
28159
|
"commercial",
|
|
27865
28160
|
"profitable",
|
|
27866
28161
|
"amortizable",
|
|
@@ -28636,6 +28931,9 @@ function SelectPrompt({ message, choices, infoTable, infoMessage, onSubmit, defa
|
|
|
28636
28931
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
28637
28932
|
init_cjs_shims();
|
|
28638
28933
|
|
|
28934
|
+
// ../cli-kit/dist/private/node/ui/components/LoadingBar.js
|
|
28935
|
+
init_cjs_shims();
|
|
28936
|
+
|
|
28639
28937
|
// ../cli-kit/dist/private/node/ui/components/TextAnimation.js
|
|
28640
28938
|
init_cjs_shims();
|
|
28641
28939
|
var import_react50 = __toESM(require_react(), 1), import_gradient_string = __toESM(require_gradient_string(), 1);
|
|
@@ -28672,14 +28970,31 @@ var TextAnimation = (0, import_react50.memo)(({ text, maxWidth }) => {
|
|
|
28672
28970
|
});
|
|
28673
28971
|
TextAnimation.displayName = "TextAnimation";
|
|
28674
28972
|
|
|
28973
|
+
// ../cli-kit/dist/private/node/ui/components/LoadingBar.js
|
|
28974
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
28975
|
+
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 }) => {
|
|
28976
|
+
let { twoThirds } = useLayout(), loadingBar = new Array(twoThirds).fill(loadingBarChar).join("");
|
|
28977
|
+
return (noColor ?? !shouldDisplayColors()) && (loadingBar = hillString.repeat(Math.ceil(twoThirds / hillString.length))), import_react51.default.createElement(
|
|
28978
|
+
Box_default,
|
|
28979
|
+
{ flexDirection: "column" },
|
|
28980
|
+
!noProgressBar && import_react51.default.createElement(TextAnimation, { text: loadingBar, maxWidth: twoThirds }),
|
|
28981
|
+
import_react51.default.createElement(
|
|
28982
|
+
Text,
|
|
28983
|
+
null,
|
|
28984
|
+
title,
|
|
28985
|
+
" ..."
|
|
28986
|
+
)
|
|
28987
|
+
);
|
|
28988
|
+
};
|
|
28989
|
+
|
|
28675
28990
|
// ../cli-kit/dist/private/node/ui/hooks/use-async-and-unmount.js
|
|
28676
28991
|
init_cjs_shims();
|
|
28677
|
-
var
|
|
28992
|
+
var import_react52 = __toESM(require_react(), 1);
|
|
28678
28993
|
function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
28679
28994
|
}, onRejected = () => {
|
|
28680
28995
|
} } = {}) {
|
|
28681
28996
|
let { exit: unmountInk } = use_app_default();
|
|
28682
|
-
(0,
|
|
28997
|
+
(0, import_react52.useEffect)(() => {
|
|
28683
28998
|
asyncFunction().then(() => {
|
|
28684
28999
|
onFulfilled(), unmountInk();
|
|
28685
29000
|
}).catch((error) => {
|
|
@@ -28688,8 +29003,18 @@ function useAsyncAndUnmount(asyncFunction, { onFulfilled = () => {
|
|
|
28688
29003
|
}, []);
|
|
28689
29004
|
}
|
|
28690
29005
|
|
|
29006
|
+
// ../cli-kit/dist/private/node/ui/hooks/use-exit-on-ctrl-c.js
|
|
29007
|
+
init_cjs_shims();
|
|
29008
|
+
function useExitOnCtrlC() {
|
|
29009
|
+
let { isRawModeSupported } = use_stdin_default();
|
|
29010
|
+
use_input_default((input, key) => {
|
|
29011
|
+
if (handleCtrlC(input, key), key.return)
|
|
29012
|
+
return null;
|
|
29013
|
+
}, { isActive: !!isRawModeSupported });
|
|
29014
|
+
}
|
|
29015
|
+
|
|
28691
29016
|
// ../cli-kit/dist/private/node/ui/components/Tasks.js
|
|
28692
|
-
var
|
|
29017
|
+
var import_react53 = __toESM(require_react(), 1), TasksState;
|
|
28693
29018
|
(function(TasksState2) {
|
|
28694
29019
|
TasksState2.Loading = "loading", TasksState2.Success = "success", TasksState2.Failure = "failure";
|
|
28695
29020
|
})(TasksState || (TasksState = {}));
|
|
@@ -28707,10 +29032,8 @@ async function runTask(task, ctx) {
|
|
|
28707
29032
|
}
|
|
28708
29033
|
var noop3 = () => {
|
|
28709
29034
|
};
|
|
28710
|
-
function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal, noColor }) {
|
|
28711
|
-
let
|
|
28712
|
-
(noColor ?? !shouldDisplayColors()) && (loadingBar = hillString.repeat(Math.ceil(twoThirds / hillString.length)));
|
|
28713
|
-
let [currentTask, setCurrentTask] = (0, import_react52.useState)(tasks[0]), [state, setState] = (0, import_react52.useState)(TasksState.Loading), ctx = (0, import_react52.useRef)({}), { isRawModeSupported } = use_stdin_default();
|
|
29035
|
+
function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal, noColor, noProgressBar = !1 }) {
|
|
29036
|
+
let [currentTask, setCurrentTask] = (0, import_react53.useState)(tasks[0]), [state, setState] = (0, import_react53.useState)(TasksState.Loading), ctx = (0, import_react53.useRef)({});
|
|
28714
29037
|
useAsyncAndUnmount(async () => {
|
|
28715
29038
|
for (let task of tasks) {
|
|
28716
29039
|
setCurrentTask(task);
|
|
@@ -28726,104 +29049,91 @@ function Tasks({ tasks, silent = isUnitTest(), onComplete = noop3, abortSignal,
|
|
|
28726
29049
|
onRejected: () => {
|
|
28727
29050
|
setState(TasksState.Failure);
|
|
28728
29051
|
}
|
|
28729
|
-
}),
|
|
28730
|
-
if (handleCtrlC(input, key), key.return)
|
|
28731
|
-
return null;
|
|
28732
|
-
}, { isActive: !!isRawModeSupported });
|
|
29052
|
+
}), useExitOnCtrlC();
|
|
28733
29053
|
let { isAborted } = useAbortSignal(abortSignal);
|
|
28734
|
-
return silent ? null : state === TasksState.Loading && !isAborted ?
|
|
28735
|
-
Box_default,
|
|
28736
|
-
{ flexDirection: "column" },
|
|
28737
|
-
import_react52.default.createElement(TextAnimation, { text: loadingBar, maxWidth: twoThirds }),
|
|
28738
|
-
import_react52.default.createElement(
|
|
28739
|
-
Text,
|
|
28740
|
-
null,
|
|
28741
|
-
currentTask.title,
|
|
28742
|
-
" ..."
|
|
28743
|
-
)
|
|
28744
|
-
) : null;
|
|
29054
|
+
return silent ? null : state === TasksState.Loading && !isAborted ? import_react53.default.createElement(LoadingBar, { title: currentTask.title, noColor, noProgressBar }) : null;
|
|
28745
29055
|
}
|
|
28746
29056
|
|
|
28747
29057
|
// ../cli-kit/dist/private/node/ui/components/TextPrompt.js
|
|
28748
29058
|
init_cjs_shims();
|
|
28749
|
-
var
|
|
29059
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
28750
29060
|
var TextPrompt = ({ message, onSubmit, validate, defaultValue = "", password = !1, allowEmpty = !1, emptyDisplayedValue = "(empty)", abortSignal, preview, initialAnswer = "" }) => {
|
|
28751
29061
|
if (password && defaultValue)
|
|
28752
29062
|
throw new Error("Can't use defaultValue with password");
|
|
28753
|
-
let validateAnswer = (0,
|
|
29063
|
+
let validateAnswer = (0, import_react54.useCallback)((value) => {
|
|
28754
29064
|
if (validate)
|
|
28755
29065
|
return validate(value);
|
|
28756
29066
|
if (value.length === 0 && !allowEmpty)
|
|
28757
29067
|
return "Type an answer to the prompt.";
|
|
28758
29068
|
}, [allowEmpty, validate]), { oneThird } = useLayout(), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
28759
29069
|
initialAnswer
|
|
28760
|
-
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, { exit: unmountInk } = use_app_default(), [error, setError] = (0,
|
|
29070
|
+
}), answerOrDefault = answer.length > 0 ? answer : defaultValue, displayEmptyValue = answerOrDefault === "", displayedAnswer = displayEmptyValue ? emptyDisplayedValue : answerOrDefault, { exit: unmountInk } = use_app_default(), [error, setError] = (0, import_react54.useState)(void 0), color = promptState === PromptState.Error ? "red" : "cyan", underline = new Array(oneThird - 3).fill("\u2594"), { isAborted } = useAbortSignal(abortSignal);
|
|
28761
29071
|
return use_input_default((input, key) => {
|
|
28762
29072
|
if (handleCtrlC(input, key), key.return) {
|
|
28763
29073
|
let error2 = validateAnswer(answerOrDefault);
|
|
28764
29074
|
error2 ? (setPromptState(PromptState.Error), setError(error2)) : setPromptState(PromptState.Submitted);
|
|
28765
29075
|
}
|
|
28766
|
-
}), (0,
|
|
29076
|
+
}), (0, import_react54.useEffect)(() => {
|
|
28767
29077
|
promptState === PromptState.Submitted && (onSubmit(answerOrDefault), unmountInk());
|
|
28768
|
-
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null :
|
|
29078
|
+
}, [answerOrDefault, onSubmit, promptState, unmountInk]), isAborted ? null : import_react54.default.createElement(
|
|
28769
29079
|
Box_default,
|
|
28770
29080
|
{ flexDirection: "column", marginBottom: 1, width: oneThird },
|
|
28771
|
-
|
|
29081
|
+
import_react54.default.createElement(
|
|
28772
29082
|
Box_default,
|
|
28773
29083
|
null,
|
|
28774
|
-
|
|
29084
|
+
import_react54.default.createElement(
|
|
28775
29085
|
Box_default,
|
|
28776
29086
|
{ marginRight: 2 },
|
|
28777
|
-
|
|
29087
|
+
import_react54.default.createElement(Text, null, "?")
|
|
28778
29088
|
),
|
|
28779
|
-
|
|
29089
|
+
import_react54.default.createElement(TokenizedText, { item: messageWithPunctuation(message) })
|
|
28780
29090
|
),
|
|
28781
|
-
promptState === PromptState.Submitted ?
|
|
29091
|
+
promptState === PromptState.Submitted ? import_react54.default.createElement(
|
|
28782
29092
|
Box_default,
|
|
28783
29093
|
null,
|
|
28784
|
-
|
|
29094
|
+
import_react54.default.createElement(
|
|
28785
29095
|
Box_default,
|
|
28786
29096
|
{ marginRight: 2 },
|
|
28787
|
-
|
|
29097
|
+
import_react54.default.createElement(Text, { color: "cyan" }, figures_default.tick)
|
|
28788
29098
|
),
|
|
28789
|
-
|
|
29099
|
+
import_react54.default.createElement(
|
|
28790
29100
|
Box_default,
|
|
28791
29101
|
{ flexGrow: 1 },
|
|
28792
|
-
|
|
29102
|
+
import_react54.default.createElement(Text, { color: "cyan", dimColor: displayEmptyValue }, password ? "*".repeat(answer.length) : displayedAnswer)
|
|
28793
29103
|
)
|
|
28794
|
-
) :
|
|
29104
|
+
) : import_react54.default.createElement(
|
|
28795
29105
|
Box_default,
|
|
28796
29106
|
{ flexDirection: "column" },
|
|
28797
|
-
|
|
29107
|
+
import_react54.default.createElement(
|
|
28798
29108
|
Box_default,
|
|
28799
29109
|
null,
|
|
28800
|
-
|
|
29110
|
+
import_react54.default.createElement(
|
|
28801
29111
|
Box_default,
|
|
28802
29112
|
{ marginRight: 2 },
|
|
28803
|
-
|
|
29113
|
+
import_react54.default.createElement(Text, { color }, ">")
|
|
28804
29114
|
),
|
|
28805
|
-
|
|
29115
|
+
import_react54.default.createElement(
|
|
28806
29116
|
Box_default,
|
|
28807
29117
|
{ flexGrow: 1 },
|
|
28808
|
-
|
|
29118
|
+
import_react54.default.createElement(TextInput, { value: answer, onChange: (answer2) => {
|
|
28809
29119
|
setAnswer(answer2), setPromptState(PromptState.Idle);
|
|
28810
29120
|
}, defaultValue, color, password })
|
|
28811
29121
|
)
|
|
28812
29122
|
),
|
|
28813
|
-
|
|
29123
|
+
import_react54.default.createElement(
|
|
28814
29124
|
Box_default,
|
|
28815
29125
|
{ marginLeft: 3 },
|
|
28816
|
-
|
|
29126
|
+
import_react54.default.createElement(Text, { color }, underline)
|
|
28817
29127
|
),
|
|
28818
|
-
promptState === PromptState.Error ?
|
|
29128
|
+
promptState === PromptState.Error ? import_react54.default.createElement(
|
|
28819
29129
|
Box_default,
|
|
28820
29130
|
{ marginLeft: 3 },
|
|
28821
|
-
|
|
29131
|
+
import_react54.default.createElement(Text, { color }, error)
|
|
28822
29132
|
) : null,
|
|
28823
|
-
promptState !== PromptState.Error && preview ?
|
|
29133
|
+
promptState !== PromptState.Error && preview ? import_react54.default.createElement(
|
|
28824
29134
|
Box_default,
|
|
28825
29135
|
{ marginLeft: 3 },
|
|
28826
|
-
|
|
29136
|
+
import_react54.default.createElement(TokenizedText, { item: preview(answerOrDefault) })
|
|
28827
29137
|
) : null
|
|
28828
29138
|
)
|
|
28829
29139
|
);
|
|
@@ -28834,7 +29144,7 @@ init_cjs_shims();
|
|
|
28834
29144
|
|
|
28835
29145
|
// ../cli-kit/dist/public/common/function.js
|
|
28836
29146
|
init_cjs_shims();
|
|
28837
|
-
var import_memoize = __toESM(require_memoize()), import_debounce = __toESM(require_debounce()), import_throttle2 = __toESM(require_throttle());
|
|
29147
|
+
var import_memoize = __toESM(require_memoize(), 1), import_debounce = __toESM(require_debounce(), 1), import_throttle2 = __toESM(require_throttle(), 1);
|
|
28838
29148
|
function debounce(func, wait, options) {
|
|
28839
29149
|
return (0, import_debounce.default)(func, wait, options);
|
|
28840
29150
|
}
|
|
@@ -28843,24 +29153,24 @@ function throttle2(func, wait, options) {
|
|
|
28843
29153
|
}
|
|
28844
29154
|
|
|
28845
29155
|
// ../cli-kit/dist/private/node/ui/components/AutocompletePrompt.js
|
|
28846
|
-
var
|
|
29156
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
28847
29157
|
var MIN_NUMBER_OF_ITEMS_FOR_SEARCH = 5;
|
|
28848
29158
|
function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, hasMorePages: initialHasMorePages = !1, abortSignal, infoMessage, groupOrder }) {
|
|
28849
|
-
let { exit: unmountInk } = use_app_default(), [searchTerm, setSearchTerm] = (0,
|
|
29159
|
+
let { exit: unmountInk } = use_app_default(), [searchTerm, setSearchTerm] = (0, import_react55.useState)(""), [searchResults, setSearchResults] = (0, import_react55.useState)(choices), canSearch = choices.length > MIN_NUMBER_OF_ITEMS_FOR_SEARCH, [hasMorePages, setHasMorePages] = (0, import_react55.useState)(initialHasMorePages), { promptState, setPromptState, answer, setAnswer } = usePrompt({
|
|
28850
29160
|
initialAnswer: void 0
|
|
28851
|
-
}), paginatedSearch = (0,
|
|
29161
|
+
}), paginatedSearch = (0, import_react55.useCallback)(async (term) => await search(term), [search]), submitAnswer = (0, import_react55.useCallback)((answer2) => {
|
|
28852
29162
|
promptState === PromptState.Idle && (setAnswer(answer2), setPromptState(PromptState.Submitted));
|
|
28853
29163
|
}, [promptState, setAnswer, setPromptState]);
|
|
28854
|
-
(0,
|
|
29164
|
+
(0, import_react55.useEffect)(() => {
|
|
28855
29165
|
promptState === PromptState.Submitted && answer && (setSearchTerm(""), unmountInk(), onSubmit(answer.value));
|
|
28856
29166
|
}, [answer, onSubmit, promptState, unmountInk]);
|
|
28857
|
-
let setLoadingWhenSlow = (0,
|
|
29167
|
+
let setLoadingWhenSlow = (0, import_react55.useRef)(), searchTermRef = (0, import_react55.useRef)("");
|
|
28858
29168
|
searchTermRef.current = searchTerm;
|
|
28859
|
-
let choicesRef = (0,
|
|
29169
|
+
let choicesRef = (0, import_react55.useRef)(choices);
|
|
28860
29170
|
choicesRef.current = choices;
|
|
28861
|
-
let initialHasPagesRef = (0,
|
|
29171
|
+
let initialHasPagesRef = (0, import_react55.useRef)(initialHasMorePages);
|
|
28862
29172
|
initialHasPagesRef.current = initialHasMorePages;
|
|
28863
|
-
let debounceSearch =
|
|
29173
|
+
let debounceSearch = import_react55.default.useMemo(() => throttle2((term) => {
|
|
28864
29174
|
setLoadingWhenSlow.current = setTimeout(() => {
|
|
28865
29175
|
setPromptState(PromptState.Loading);
|
|
28866
29176
|
}, 100), paginatedSearch(term).then((result) => {
|
|
@@ -28871,22 +29181,36 @@ function AutocompletePrompt({ message, choices, infoTable, onSubmit, search, has
|
|
|
28871
29181
|
clearTimeout(setLoadingWhenSlow.current);
|
|
28872
29182
|
});
|
|
28873
29183
|
}, 400, { leading: !0, trailing: !0 }), [paginatedSearch, setPromptState]);
|
|
28874
|
-
return
|
|
29184
|
+
return import_react55.default.createElement(PromptLayout, { message, state: promptState, infoTable, infoMessage, abortSignal, header: promptState !== PromptState.Submitted && canSearch ? import_react55.default.createElement(
|
|
28875
29185
|
Box_default,
|
|
28876
29186
|
{ marginLeft: 3 },
|
|
28877
|
-
|
|
29187
|
+
import_react55.default.createElement(TextInput, { value: searchTerm, onChange: (term) => {
|
|
28878
29188
|
setSearchTerm(term), term.length > 0 ? debounceSearch(term) : (debounceSearch.cancel(), setPromptState(PromptState.Idle), setSearchResults(choices));
|
|
28879
29189
|
}, placeholder: "Type to search..." })
|
|
28880
|
-
) : null, submittedAnswerLabel: answer?.label, input:
|
|
29190
|
+
) : null, submittedAnswerLabel: answer?.label, input: import_react55.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 }) });
|
|
28881
29191
|
}
|
|
28882
29192
|
|
|
29193
|
+
// ../cli-kit/dist/private/node/ui/components/SingleTask.js
|
|
29194
|
+
init_cjs_shims();
|
|
29195
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
29196
|
+
var SingleTask = ({ taskPromise, title, noColor }) => {
|
|
29197
|
+
let [isDone, setIsDone] = (0, import_react56.useState)(!1), { exit: unmountInk } = use_app_default();
|
|
29198
|
+
return useExitOnCtrlC(), (0, import_react56.useEffect)(() => {
|
|
29199
|
+
taskPromise.then(() => {
|
|
29200
|
+
setIsDone(!0), unmountInk();
|
|
29201
|
+
}).catch((error) => {
|
|
29202
|
+
setIsDone(!0), unmountInk(error);
|
|
29203
|
+
});
|
|
29204
|
+
}, [taskPromise, unmountInk]), isDone ? null : import_react56.default.createElement(LoadingBar, { title, noColor });
|
|
29205
|
+
};
|
|
29206
|
+
|
|
28883
29207
|
// ../cli-kit/dist/public/node/ui.js
|
|
28884
|
-
var
|
|
29208
|
+
var import_react57 = __toESM(require_react(), 1), defaultUIDebugOptions = {
|
|
28885
29209
|
skipTTYCheck: !1
|
|
28886
29210
|
};
|
|
28887
29211
|
async function renderConcurrent({ renderOptions, ...props }) {
|
|
28888
29212
|
let abortSignal = props.abortSignal ?? new AbortController().signal;
|
|
28889
|
-
return render2(
|
|
29213
|
+
return render2(import_react57.default.createElement(ConcurrentOutput, { ...props, abortSignal }), renderOptions);
|
|
28890
29214
|
}
|
|
28891
29215
|
function renderInfo(options) {
|
|
28892
29216
|
return alert({ ...options, type: "info" });
|
|
@@ -28901,12 +29225,12 @@ function renderError(options) {
|
|
|
28901
29225
|
return alert({ ...options, type: "error" });
|
|
28902
29226
|
}
|
|
28903
29227
|
function renderFatalError(error, { renderOptions } = {}) {
|
|
28904
|
-
return renderOnce(
|
|
29228
|
+
return renderOnce(import_react57.default.createElement(FatalError, { error }), { logLevel: "error", renderOptions });
|
|
28905
29229
|
}
|
|
28906
29230
|
async function renderSelectPrompt({ renderOptions, isConfirmationPrompt, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28907
29231
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28908
29232
|
let selectedValue;
|
|
28909
|
-
return await render2(
|
|
29233
|
+
return await render2(import_react57.default.createElement(SelectPrompt, { ...props, onSubmit: (value) => {
|
|
28910
29234
|
selectedValue = value;
|
|
28911
29235
|
} }), {
|
|
28912
29236
|
...renderOptions,
|
|
@@ -28950,7 +29274,7 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
28950
29274
|
};
|
|
28951
29275
|
return runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28952
29276
|
let selectedValue;
|
|
28953
|
-
return await render2(
|
|
29277
|
+
return await render2(import_react57.default.createElement(AutocompletePrompt, { ...newProps, onSubmit: (value) => {
|
|
28954
29278
|
selectedValue = value;
|
|
28955
29279
|
} }), {
|
|
28956
29280
|
...renderOptions,
|
|
@@ -28959,21 +29283,31 @@ async function renderAutocompletePrompt({ renderOptions, ...props }, uiDebugOpti
|
|
|
28959
29283
|
});
|
|
28960
29284
|
}
|
|
28961
29285
|
function renderTable({ renderOptions, ...props }) {
|
|
28962
|
-
return renderOnce(
|
|
29286
|
+
return renderOnce(import_react57.default.createElement(Table, { ...props }), { renderOptions });
|
|
28963
29287
|
}
|
|
28964
|
-
async function renderTasks(tasks, { renderOptions } = {}) {
|
|
29288
|
+
async function renderTasks(tasks, { renderOptions, noProgressBar } = {}) {
|
|
28965
29289
|
return new Promise((resolve, reject) => {
|
|
28966
|
-
render2(
|
|
29290
|
+
render2(import_react57.default.createElement(Tasks, { tasks, onComplete: resolve, noProgressBar }), {
|
|
28967
29291
|
...renderOptions,
|
|
28968
29292
|
exitOnCtrlC: !1
|
|
28969
29293
|
}).then(() => {
|
|
28970
29294
|
}).catch(reject);
|
|
28971
29295
|
});
|
|
28972
29296
|
}
|
|
29297
|
+
async function renderSingleTask({ title, taskPromise }, { renderOptions } = {}) {
|
|
29298
|
+
let promise = typeof taskPromise == "function" ? taskPromise() : taskPromise, [_renderResult, taskResult] = await Promise.all([
|
|
29299
|
+
render2(import_react57.default.createElement(SingleTask, { title, taskPromise: promise }), {
|
|
29300
|
+
...renderOptions,
|
|
29301
|
+
exitOnCtrlC: !1
|
|
29302
|
+
}),
|
|
29303
|
+
promise
|
|
29304
|
+
]);
|
|
29305
|
+
return taskResult;
|
|
29306
|
+
}
|
|
28973
29307
|
async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28974
29308
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28975
29309
|
let enteredText = "";
|
|
28976
|
-
return await render2(
|
|
29310
|
+
return await render2(import_react57.default.createElement(TextPrompt, { ...props, onSubmit: (value) => {
|
|
28977
29311
|
enteredText = value;
|
|
28978
29312
|
} }), {
|
|
28979
29313
|
...renderOptions,
|
|
@@ -28984,7 +29318,7 @@ async function renderTextPrompt({ renderOptions, ...props }, uiDebugOptions = de
|
|
|
28984
29318
|
async function renderDangerousConfirmationPrompt({ renderOptions, ...props }, uiDebugOptions = defaultUIDebugOptions) {
|
|
28985
29319
|
return throwInNonTTY({ message: props.message, stdin: renderOptions?.stdin }, uiDebugOptions), runWithTimer("cmd_all_timing_prompts_ms")(async () => {
|
|
28986
29320
|
let confirmed;
|
|
28987
|
-
return await render2(
|
|
29321
|
+
return await render2(import_react57.default.createElement(DangerousConfirmationPrompt, { ...props, onSubmit: (value) => {
|
|
28988
29322
|
confirmed = value;
|
|
28989
29323
|
} }), {
|
|
28990
29324
|
...renderOptions,
|
|
@@ -29117,9 +29451,9 @@ init_cjs_shims();
|
|
|
29117
29451
|
init_cjs_shims();
|
|
29118
29452
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
29119
29453
|
import { Buffer as Buffer4 } from "node:buffer";
|
|
29120
|
-
import
|
|
29454
|
+
import path3 from "node:path";
|
|
29121
29455
|
import childProcess from "node:child_process";
|
|
29122
|
-
import
|
|
29456
|
+
import process19 from "node:process";
|
|
29123
29457
|
|
|
29124
29458
|
// ../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
|
|
29125
29459
|
init_cjs_shims();
|
|
@@ -29131,8 +29465,8 @@ function stripFinalNewline(input) {
|
|
|
29131
29465
|
|
|
29132
29466
|
// ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
|
|
29133
29467
|
init_cjs_shims();
|
|
29134
|
-
import
|
|
29135
|
-
import
|
|
29468
|
+
import process16 from "node:process";
|
|
29469
|
+
import path2 from "node:path";
|
|
29136
29470
|
import { fileURLToPath } from "node:url";
|
|
29137
29471
|
|
|
29138
29472
|
// ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
@@ -29147,22 +29481,22 @@ function pathKey(options = {}) {
|
|
|
29147
29481
|
|
|
29148
29482
|
// ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
|
|
29149
29483
|
var npmRunPath = ({
|
|
29150
|
-
cwd: cwd3 =
|
|
29151
|
-
path: pathOption =
|
|
29484
|
+
cwd: cwd3 = process16.cwd(),
|
|
29485
|
+
path: pathOption = process16.env[pathKey()],
|
|
29152
29486
|
preferLocal = !0,
|
|
29153
|
-
execPath =
|
|
29487
|
+
execPath = process16.execPath,
|
|
29154
29488
|
addExecPath = !0
|
|
29155
29489
|
} = {}) => {
|
|
29156
|
-
let cwdString = cwd3 instanceof URL ? fileURLToPath(cwd3) : cwd3, cwdPath =
|
|
29157
|
-
return preferLocal && applyPreferLocal(result, cwdPath), addExecPath && applyExecPath(result, execPath, cwdPath), [...result, pathOption].join(
|
|
29490
|
+
let cwdString = cwd3 instanceof URL ? fileURLToPath(cwd3) : cwd3, cwdPath = path2.resolve(cwdString), result = [];
|
|
29491
|
+
return preferLocal && applyPreferLocal(result, cwdPath), addExecPath && applyExecPath(result, execPath, cwdPath), [...result, pathOption].join(path2.delimiter);
|
|
29158
29492
|
}, applyPreferLocal = (result, cwdPath) => {
|
|
29159
29493
|
let previous;
|
|
29160
29494
|
for (; previous !== cwdPath; )
|
|
29161
|
-
result.push(
|
|
29495
|
+
result.push(path2.join(cwdPath, "node_modules/.bin")), previous = cwdPath, cwdPath = path2.resolve(cwdPath, "..");
|
|
29162
29496
|
}, applyExecPath = (result, execPath, cwdPath) => {
|
|
29163
29497
|
let execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;
|
|
29164
|
-
result.push(
|
|
29165
|
-
}, npmRunPathEnv = ({ env: env3 =
|
|
29498
|
+
result.push(path2.resolve(cwdPath, execPathString, ".."));
|
|
29499
|
+
}, npmRunPathEnv = ({ env: env3 = process16.env, ...options } = {}) => {
|
|
29166
29500
|
env3 = { ...env3 };
|
|
29167
29501
|
let pathName = pathKey({ env: env3 });
|
|
29168
29502
|
return options.path = env3[pathName], env3[pathName] = npmRunPath(options), env3;
|
|
@@ -29217,7 +29551,7 @@ var onetime_default = onetime2;
|
|
|
29217
29551
|
|
|
29218
29552
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js
|
|
29219
29553
|
init_cjs_shims();
|
|
29220
|
-
import
|
|
29554
|
+
import process17 from "node:process";
|
|
29221
29555
|
|
|
29222
29556
|
// ../../node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
|
|
29223
29557
|
init_cjs_shims();
|
|
@@ -29581,7 +29915,7 @@ var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription,
|
|
|
29581
29915
|
timedOut,
|
|
29582
29916
|
isCanceled,
|
|
29583
29917
|
killed,
|
|
29584
|
-
parsed: { options: { timeout, cwd: cwd3 =
|
|
29918
|
+
parsed: { options: { timeout, cwd: cwd3 = process17.cwd() } }
|
|
29585
29919
|
}) => {
|
|
29586
29920
|
exitCode = exitCode === null ? void 0 : exitCode, signal = signal === null ? void 0 : signal;
|
|
29587
29921
|
let signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description, errorCode = error && error.code, execaMessage = `Command ${getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled })}: ${command}`, isError = Object.prototype.toString.call(error) === "[object Error]", shortMessage = isError ? `${execaMessage}
|
|
@@ -29611,7 +29945,7 @@ var aliases = ["stdin", "stdout", "stderr"], hasAlias = (options) => aliases.som
|
|
|
29611
29945
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js
|
|
29612
29946
|
init_cjs_shims();
|
|
29613
29947
|
var import_signal_exit3 = __toESM(require_signal_exit(), 1);
|
|
29614
|
-
import
|
|
29948
|
+
import os3 from "node:os";
|
|
29615
29949
|
var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5, spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
|
|
29616
29950
|
let killResult = kill(signal);
|
|
29617
29951
|
return setKillTimeout(kill, signal, options, killResult), killResult;
|
|
@@ -29622,7 +29956,7 @@ var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5, spawnedKill = (kill, signal = "SIGTERM
|
|
|
29622
29956
|
kill("SIGKILL");
|
|
29623
29957
|
}, timeout);
|
|
29624
29958
|
t.unref && t.unref();
|
|
29625
|
-
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== !1 && killResult, isSigterm = (signal) => signal ===
|
|
29959
|
+
}, shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== !1 && killResult, isSigterm = (signal) => signal === os3.constants.signals.SIGTERM || typeof signal == "string" && signal.toUpperCase() === "SIGTERM", getForceKillAfterTimeout = ({ forceKillAfterTimeout = !0 }) => {
|
|
29626
29960
|
if (forceKillAfterTimeout === !0)
|
|
29627
29961
|
return DEFAULT_FORCE_KILL_TIMEOUT;
|
|
29628
29962
|
if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0)
|
|
@@ -29800,18 +30134,18 @@ var parseExpression = (expression) => {
|
|
|
29800
30134
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js
|
|
29801
30135
|
init_cjs_shims();
|
|
29802
30136
|
import { debuglog } from "node:util";
|
|
29803
|
-
import
|
|
30137
|
+
import process18 from "node:process";
|
|
29804
30138
|
var verboseDefault = debuglog("execa").enabled, padField = (field, padding) => String(field).padStart(padding, "0"), getTimestamp = () => {
|
|
29805
30139
|
let date = /* @__PURE__ */ new Date();
|
|
29806
30140
|
return `${padField(date.getHours(), 2)}:${padField(date.getMinutes(), 2)}:${padField(date.getSeconds(), 2)}.${padField(date.getMilliseconds(), 3)}`;
|
|
29807
30141
|
}, logCommand = (escapedCommand, { verbose }) => {
|
|
29808
|
-
verbose &&
|
|
30142
|
+
verbose && process18.stderr.write(`[${getTimestamp()}] ${escapedCommand}
|
|
29809
30143
|
`);
|
|
29810
30144
|
};
|
|
29811
30145
|
|
|
29812
30146
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js
|
|
29813
30147
|
var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100, getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
|
29814
|
-
let env3 = extendEnv ? { ...
|
|
30148
|
+
let env3 = extendEnv ? { ...process19.env, ...envOption } : envOption;
|
|
29815
30149
|
return preferLocal ? npmRunPathEnv({ env: env3, cwd: localDir, execPath }) : env3;
|
|
29816
30150
|
}, handleArguments = (file, args, options = {}) => {
|
|
29817
30151
|
let parsed = import_cross_spawn.default._parse(file, args, options);
|
|
@@ -29821,8 +30155,8 @@ var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100, getEnv = ({ env: envOption, extendEnv,
|
|
|
29821
30155
|
stripFinalNewline: !0,
|
|
29822
30156
|
extendEnv: !0,
|
|
29823
30157
|
preferLocal: !1,
|
|
29824
|
-
localDir: options.cwd ||
|
|
29825
|
-
execPath:
|
|
30158
|
+
localDir: options.cwd || process19.cwd(),
|
|
30159
|
+
execPath: process19.execPath,
|
|
29826
30160
|
encoding: "utf8",
|
|
29827
30161
|
reject: !0,
|
|
29828
30162
|
cleanup: !0,
|
|
@@ -29830,7 +30164,7 @@ var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100, getEnv = ({ env: envOption, extendEnv,
|
|
|
29830
30164
|
windowsHide: !0,
|
|
29831
30165
|
verbose: verboseDefault,
|
|
29832
30166
|
...options
|
|
29833
|
-
}, options.env = getEnv(options), options.stdio = normalizeStdio(options),
|
|
30167
|
+
}, options.env = getEnv(options), options.stdio = normalizeStdio(options), process19.platform === "win32" && path3.basename(file, ".exe") === "cmd" && args.unshift("/q"), { file, args, options, parsed };
|
|
29834
30168
|
}, handleOutput = (options, value, error) => typeof value != "string" && !Buffer4.isBuffer(value) ? error === void 0 ? void 0 : "" : options.stripFinalNewline ? stripFinalNewline(value) : value;
|
|
29835
30169
|
function execa(file, args, options) {
|
|
29836
30170
|
let parsed = handleArguments(file, args, options), command = joinCommand(file, args), escapedCommand = getEscapedCommand(file, args);
|
|
@@ -30551,7 +30885,7 @@ var import_copy = __toESM(require_copy2(), 1), import_empty = __toESM(require_em
|
|
|
30551
30885
|
init_cjs_shims();
|
|
30552
30886
|
import fs3 from "node:fs";
|
|
30553
30887
|
import fsPromises from "node:fs/promises";
|
|
30554
|
-
import
|
|
30888
|
+
import path4 from "node:path";
|
|
30555
30889
|
import stream from "node:stream";
|
|
30556
30890
|
import { promisify as promisify2 } from "node:util";
|
|
30557
30891
|
|
|
@@ -30631,11 +30965,11 @@ function uniqueString() {
|
|
|
30631
30965
|
// ../../node_modules/.pnpm/temp-dir@3.0.0/node_modules/temp-dir/index.js
|
|
30632
30966
|
init_cjs_shims();
|
|
30633
30967
|
import { promises as fs2 } from "node:fs";
|
|
30634
|
-
import
|
|
30635
|
-
var temporaryDirectory = await fs2.realpath(
|
|
30968
|
+
import os4 from "node:os";
|
|
30969
|
+
var temporaryDirectory = await fs2.realpath(os4.tmpdir()), temp_dir_default = temporaryDirectory;
|
|
30636
30970
|
|
|
30637
30971
|
// ../../node_modules/.pnpm/tempy@3.1.0/node_modules/tempy/index.js
|
|
30638
|
-
var pipeline = promisify2(stream.pipeline), getPath = (prefix = "") =>
|
|
30972
|
+
var pipeline = promisify2(stream.pipeline), getPath = (prefix = "") => path4.join(temp_dir_default, prefix + uniqueString());
|
|
30639
30973
|
async function runTask2(temporaryPath, callback) {
|
|
30640
30974
|
try {
|
|
30641
30975
|
return await callback(temporaryPath);
|
|
@@ -30651,13 +30985,13 @@ var temporaryDirectoryTask = async (callback, options) => runTask2(temporaryDire
|
|
|
30651
30985
|
|
|
30652
30986
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
30653
30987
|
init_cjs_shims();
|
|
30654
|
-
import
|
|
30988
|
+
import path6 from "node:path";
|
|
30655
30989
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
30656
30990
|
|
|
30657
30991
|
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
30658
30992
|
init_cjs_shims();
|
|
30659
|
-
import
|
|
30660
|
-
import
|
|
30993
|
+
import process20 from "node:process";
|
|
30994
|
+
import path5 from "node:path";
|
|
30661
30995
|
import fs4, { promises as fsPromises2 } from "node:fs";
|
|
30662
30996
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
30663
30997
|
|
|
@@ -30783,7 +31117,7 @@ function checkType(type) {
|
|
|
30783
31117
|
}
|
|
30784
31118
|
var matchType = (type, stat) => stat[typeMappings[type]](), toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath;
|
|
30785
31119
|
async function locatePath(paths, {
|
|
30786
|
-
cwd: cwd3 =
|
|
31120
|
+
cwd: cwd3 = process20.cwd(),
|
|
30787
31121
|
type = "file",
|
|
30788
31122
|
allowSymlinks = !0,
|
|
30789
31123
|
concurrency,
|
|
@@ -30793,7 +31127,7 @@ async function locatePath(paths, {
|
|
|
30793
31127
|
let statFunction = allowSymlinks ? fsPromises2.stat : fsPromises2.lstat;
|
|
30794
31128
|
return pLocate(paths, async (path_) => {
|
|
30795
31129
|
try {
|
|
30796
|
-
let stat = await statFunction(
|
|
31130
|
+
let stat = await statFunction(path5.resolve(cwd3, path_));
|
|
30797
31131
|
return matchType(type, stat);
|
|
30798
31132
|
} catch {
|
|
30799
31133
|
return !1;
|
|
@@ -30807,7 +31141,7 @@ init_cjs_shims();
|
|
|
30807
31141
|
// ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
|
|
30808
31142
|
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath3(urlOrPath) : urlOrPath, findUpStop = Symbol("findUpStop");
|
|
30809
31143
|
async function findUpMultiple(name, options = {}) {
|
|
30810
|
-
let directory =
|
|
31144
|
+
let directory = path6.resolve(toPath2(options.cwd) || ""), { root } = path6.parse(directory), stopAt = path6.resolve(directory, options.stopAt || root), limit = options.limit || Number.POSITIVE_INFINITY, paths = [name].flat(), runMatcher = async (locateOptions) => {
|
|
30811
31145
|
if (typeof name != "function")
|
|
30812
31146
|
return locatePath(paths, locateOptions);
|
|
30813
31147
|
let foundPath = await name(locateOptions.cwd);
|
|
@@ -30815,9 +31149,9 @@ async function findUpMultiple(name, options = {}) {
|
|
|
30815
31149
|
}, matches = [];
|
|
30816
31150
|
for (; ; ) {
|
|
30817
31151
|
let foundPath = await runMatcher({ ...options, cwd: directory });
|
|
30818
|
-
if (foundPath === findUpStop || (foundPath && matches.push(
|
|
31152
|
+
if (foundPath === findUpStop || (foundPath && matches.push(path6.resolve(directory, foundPath)), directory === stopAt || matches.length >= limit))
|
|
30819
31153
|
break;
|
|
30820
|
-
directory =
|
|
31154
|
+
directory = path6.dirname(directory);
|
|
30821
31155
|
}
|
|
30822
31156
|
return matches;
|
|
30823
31157
|
}
|
|
@@ -31275,10 +31609,10 @@ var minimatch = (p, pattern, options = {}) => (assertValidPattern(pattern), !opt
|
|
|
31275
31609
|
}, qmarksTestNoExtDot = ([$0]) => {
|
|
31276
31610
|
let len = $0.length;
|
|
31277
31611
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
31278
|
-
}, defaultPlatform = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix",
|
|
31612
|
+
}, defaultPlatform = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", path7 = {
|
|
31279
31613
|
win32: { sep: "\\" },
|
|
31280
31614
|
posix: { sep: "/" }
|
|
31281
|
-
}, sep = defaultPlatform === "win32" ?
|
|
31615
|
+
}, sep = defaultPlatform === "win32" ? path7.win32.sep : path7.posix.sep;
|
|
31282
31616
|
minimatch.sep = sep;
|
|
31283
31617
|
var GLOBSTAR = Symbol("globstar **");
|
|
31284
31618
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -31806,255 +32140,6 @@ async function copyDirectoryContents(srcDir, destDir) {
|
|
|
31806
32140
|
await Promise.all(filesToCopy);
|
|
31807
32141
|
}
|
|
31808
32142
|
|
|
31809
|
-
// ../cli-kit/dist/private/node/constants.js
|
|
31810
|
-
init_cjs_shims();
|
|
31811
|
-
|
|
31812
|
-
// ../../node_modules/.pnpm/env-paths@3.0.0/node_modules/env-paths/index.js
|
|
31813
|
-
init_cjs_shims();
|
|
31814
|
-
import path7 from "node:path";
|
|
31815
|
-
import os4 from "node:os";
|
|
31816
|
-
import process20 from "node:process";
|
|
31817
|
-
var homedir = os4.homedir(), tmpdir = os4.tmpdir(), { env: env2 } = process20, macos = (name) => {
|
|
31818
|
-
let library = path7.join(homedir, "Library");
|
|
31819
|
-
return {
|
|
31820
|
-
data: path7.join(library, "Application Support", name),
|
|
31821
|
-
config: path7.join(library, "Preferences", name),
|
|
31822
|
-
cache: path7.join(library, "Caches", name),
|
|
31823
|
-
log: path7.join(library, "Logs", name),
|
|
31824
|
-
temp: path7.join(tmpdir, name)
|
|
31825
|
-
};
|
|
31826
|
-
}, windows = (name) => {
|
|
31827
|
-
let appData = env2.APPDATA || path7.join(homedir, "AppData", "Roaming"), localAppData = env2.LOCALAPPDATA || path7.join(homedir, "AppData", "Local");
|
|
31828
|
-
return {
|
|
31829
|
-
// Data/config/cache/log are invented by me as Windows isn't opinionated about this
|
|
31830
|
-
data: path7.join(localAppData, name, "Data"),
|
|
31831
|
-
config: path7.join(appData, name, "Config"),
|
|
31832
|
-
cache: path7.join(localAppData, name, "Cache"),
|
|
31833
|
-
log: path7.join(localAppData, name, "Log"),
|
|
31834
|
-
temp: path7.join(tmpdir, name)
|
|
31835
|
-
};
|
|
31836
|
-
}, linux = (name) => {
|
|
31837
|
-
let username2 = path7.basename(homedir);
|
|
31838
|
-
return {
|
|
31839
|
-
data: path7.join(env2.XDG_DATA_HOME || path7.join(homedir, ".local", "share"), name),
|
|
31840
|
-
config: path7.join(env2.XDG_CONFIG_HOME || path7.join(homedir, ".config"), name),
|
|
31841
|
-
cache: path7.join(env2.XDG_CACHE_HOME || path7.join(homedir, ".cache"), name),
|
|
31842
|
-
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
31843
|
-
log: path7.join(env2.XDG_STATE_HOME || path7.join(homedir, ".local", "state"), name),
|
|
31844
|
-
temp: path7.join(tmpdir, username2, name)
|
|
31845
|
-
};
|
|
31846
|
-
};
|
|
31847
|
-
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
31848
|
-
if (typeof name != "string")
|
|
31849
|
-
throw new TypeError(`Expected a string, got ${typeof name}`);
|
|
31850
|
-
return suffix && (name += `-${suffix}`), process20.platform === "darwin" ? macos(name) : process20.platform === "win32" ? windows(name) : linux(name);
|
|
31851
|
-
}
|
|
31852
|
-
|
|
31853
|
-
// ../cli-kit/dist/private/node/constants.js
|
|
31854
|
-
var identifier = "shopify-cli", cacheFolder = () => process.env.XDG_CACHE_HOME ? process.env.XDG_CACHE_HOME : envPaths(identifier).cache, logsFolder = () => envPaths(identifier).log, environmentVariables = {
|
|
31855
|
-
alwaysLogAnalytics: "SHOPIFY_CLI_ALWAYS_LOG_ANALYTICS",
|
|
31856
|
-
alwaysLogMetrics: "SHOPIFY_CLI_ALWAYS_LOG_METRICS",
|
|
31857
|
-
deviceAuth: "SHOPIFY_CLI_DEVICE_AUTH",
|
|
31858
|
-
enableCliRedirect: "SHOPIFY_CLI_ENABLE_CLI_REDIRECT",
|
|
31859
|
-
env: "SHOPIFY_CLI_ENV",
|
|
31860
|
-
firstPartyDev: "SHOPIFY_CLI_1P_DEV",
|
|
31861
|
-
noAnalytics: "SHOPIFY_CLI_NO_ANALYTICS",
|
|
31862
|
-
partnersToken: "SHOPIFY_CLI_PARTNERS_TOKEN",
|
|
31863
|
-
runAsUser: "SHOPIFY_RUN_AS_USER",
|
|
31864
|
-
serviceEnv: "SHOPIFY_SERVICE_ENV",
|
|
31865
|
-
skipCliRedirect: "SHOPIFY_CLI_SKIP_CLI_REDIRECT",
|
|
31866
|
-
spinInstance: "SPIN_INSTANCE",
|
|
31867
|
-
themeToken: "SHOPIFY_CLI_THEME_TOKEN",
|
|
31868
|
-
unitTest: "SHOPIFY_UNIT_TEST",
|
|
31869
|
-
verbose: "SHOPIFY_FLAG_VERBOSE",
|
|
31870
|
-
// Variables to detect if the CLI is running in a cloud environment
|
|
31871
|
-
codespaces: "CODESPACES",
|
|
31872
|
-
codespaceName: "CODESPACE_NAME",
|
|
31873
|
-
codespacePortForwardingDomain: "GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN",
|
|
31874
|
-
gitpod: "GITPOD_WORKSPACE_URL",
|
|
31875
|
-
cloudShell: "CLOUD_SHELL",
|
|
31876
|
-
spin: "SPIN",
|
|
31877
|
-
spinAppPort: "SERVER_PORT",
|
|
31878
|
-
spinAppHost: "SPIN_APP_HOST",
|
|
31879
|
-
organization: "SHOPIFY_CLI_ORGANIZATION",
|
|
31880
|
-
identityToken: "SHOPIFY_CLI_IDENTITY_TOKEN",
|
|
31881
|
-
refreshToken: "SHOPIFY_CLI_REFRESH_TOKEN",
|
|
31882
|
-
otelURL: "SHOPIFY_CLI_OTEL_EXPORTER_OTLP_ENDPOINT",
|
|
31883
|
-
themeKitAccessDomain: "SHOPIFY_CLI_THEME_KIT_ACCESS_DOMAIN",
|
|
31884
|
-
json: "SHOPIFY_FLAG_JSON",
|
|
31885
|
-
neverUsePartnersApi: "SHOPIFY_CLI_NEVER_USE_PARTNERS_API",
|
|
31886
|
-
skipNetworkLevelRetry: "SHOPIFY_CLI_SKIP_NETWORK_LEVEL_RETRY",
|
|
31887
|
-
maxRequestTimeForNetworkCalls: "SHOPIFY_CLI_MAX_REQUEST_TIME_FOR_NETWORK_CALLS"
|
|
31888
|
-
}, defaultThemeKitAccessDomain = "theme-kit-access.shopifyapps.com", systemEnvironmentVariables = {
|
|
31889
|
-
backendPort: "BACKEND_PORT"
|
|
31890
|
-
}, pathConstants = {
|
|
31891
|
-
executables: {
|
|
31892
|
-
dev: "/opt/dev/bin/dev"
|
|
31893
|
-
},
|
|
31894
|
-
directories: {
|
|
31895
|
-
cache: {
|
|
31896
|
-
path: () => cacheFolder(),
|
|
31897
|
-
vendor: {
|
|
31898
|
-
path: () => joinPath(cacheFolder(), "vendor"),
|
|
31899
|
-
binaries: () => joinPath(cacheFolder(), "vendor", "binaries")
|
|
31900
|
-
}
|
|
31901
|
-
}
|
|
31902
|
-
}
|
|
31903
|
-
}, sessionConstants = {
|
|
31904
|
-
expirationTimeMarginInMinutes: 4
|
|
31905
|
-
}, bugsnagApiKey = "9e1e6889176fd0c795d5c659225e0fae", reportingRateLimit = { limit: 300, timeout: { days: 1 } }, themeKitAccessDomain = process.env[environmentVariables.themeKitAccessDomain] ?? defaultThemeKitAccessDomain;
|
|
31906
|
-
|
|
31907
|
-
// ../cli-kit/dist/private/node/context/spin-cache.js
|
|
31908
|
-
init_cjs_shims();
|
|
31909
|
-
var cachedSpinFQDN;
|
|
31910
|
-
function getCachedSpinFqdn() {
|
|
31911
|
-
return cachedSpinFQDN;
|
|
31912
|
-
}
|
|
31913
|
-
function setCachedSpinFqdn(fqdn) {
|
|
31914
|
-
cachedSpinFQDN = fqdn;
|
|
31915
|
-
}
|
|
31916
|
-
|
|
31917
|
-
// ../cli-kit/dist/private/node/context/service.js
|
|
31918
|
-
init_cjs_shims();
|
|
31919
|
-
var Environment;
|
|
31920
|
-
(function(Environment2) {
|
|
31921
|
-
Environment2.Local = "local", Environment2.Production = "production", Environment2.Spin = "spin";
|
|
31922
|
-
})(Environment || (Environment = {}));
|
|
31923
|
-
function serviceEnvironment(env3 = process.env) {
|
|
31924
|
-
let value = env3[environmentVariables.serviceEnv];
|
|
31925
|
-
return value === "local" ? Environment.Local : value === "spin" || isSpin(env3) ? Environment.Spin : Environment.Production;
|
|
31926
|
-
}
|
|
31927
|
-
|
|
31928
|
-
// ../cli-kit/dist/public/node/context/spin.js
|
|
31929
|
-
var SpinInstanceNotFoundMessages = (spinInstance, error) => {
|
|
31930
|
-
let errorMessage = outputContent`${outputToken.genericShellCommand("spin")} yielded the following error trying to obtain the fully qualified domain name of the Spin instance:
|
|
31931
|
-
${error}
|
|
31932
|
-
`, nextSteps;
|
|
31933
|
-
return spinInstance && (nextSteps = `Make sure ${spinInstance} is the instance name and not a fully qualified domain name`), { errorMessage, nextSteps };
|
|
31934
|
-
}, spinFqdnFilePath = "/etc/spin/machine/fqdn";
|
|
31935
|
-
async function spinFqdn(env3 = process.env) {
|
|
31936
|
-
let spinFqdn2 = getCachedSpinFqdn();
|
|
31937
|
-
if (spinFqdn2)
|
|
31938
|
-
return spinFqdn2;
|
|
31939
|
-
if (await fileExists(spinFqdnFilePath))
|
|
31940
|
-
spinFqdn2 = await readFileSync3(spinFqdnFilePath).toString();
|
|
31941
|
-
else {
|
|
31942
|
-
let spinInstance = await instance(env3);
|
|
31943
|
-
spinFqdn2 = (await show(spinInstance, env3)).fqdn;
|
|
31944
|
-
}
|
|
31945
|
-
return setCachedSpinFqdn(spinFqdn2), spinFqdn2;
|
|
31946
|
-
}
|
|
31947
|
-
async function show(spinInstance, env3 = process.env) {
|
|
31948
|
-
let output2 = await captureOutput("spin", spinInstance === void 0 ? ["show", "--latest", "--json"] : ["show", "--json"], { env: env3 }), json = JSON.parse(output2);
|
|
31949
|
-
if (json.error) {
|
|
31950
|
-
let { errorMessage, nextSteps } = SpinInstanceNotFoundMessages(spinInstance, json.error);
|
|
31951
|
-
throw new AbortError(errorMessage, nextSteps);
|
|
31952
|
-
} else
|
|
31953
|
-
return json;
|
|
31954
|
-
}
|
|
31955
|
-
function isSpin(env3 = process.env) {
|
|
31956
|
-
return isTruthy(env3[environmentVariables.spin]);
|
|
31957
|
-
}
|
|
31958
|
-
function instance(env3 = process.env) {
|
|
31959
|
-
return env3[environmentVariables.spinInstance];
|
|
31960
|
-
}
|
|
31961
|
-
function isSpinEnvironment(env3 = process.env) {
|
|
31962
|
-
return serviceEnvironment(env3) === Environment.Spin;
|
|
31963
|
-
}
|
|
31964
|
-
function appPort(env3 = process.env) {
|
|
31965
|
-
let port = Number(env3[environmentVariables.spinAppPort]);
|
|
31966
|
-
return !isNaN(port) && port || void 0;
|
|
31967
|
-
}
|
|
31968
|
-
function appHost(env3 = process.env) {
|
|
31969
|
-
return env3[environmentVariables.spinAppHost];
|
|
31970
|
-
}
|
|
31971
|
-
var spinVariables = {
|
|
31972
|
-
partnersSpinService: "shopify--partners",
|
|
31973
|
-
manualCliSpinPortName: "CLI_EXTENSION_SERVER"
|
|
31974
|
-
};
|
|
31975
|
-
async function fetchSpinPort(service, portEnvName, basePath = "/run") {
|
|
31976
|
-
let spinVersionConfigurations = [
|
|
31977
|
-
{
|
|
31978
|
-
path: joinPath(basePath, "ports2", service, "custom", portEnvName),
|
|
31979
|
-
contentPattern: /\[{"internal":(\d+)}\]/
|
|
31980
|
-
},
|
|
31981
|
-
{
|
|
31982
|
-
path: joinPath(basePath, "ports", service, "proc", portEnvName),
|
|
31983
|
-
contentPattern: /(\d+)/
|
|
31984
|
-
}
|
|
31985
|
-
];
|
|
31986
|
-
for (let config of spinVersionConfigurations) {
|
|
31987
|
-
let fileContent;
|
|
31988
|
-
try {
|
|
31989
|
-
fileContent = await readFile(config.path);
|
|
31990
|
-
} catch {
|
|
31991
|
-
continue;
|
|
31992
|
-
}
|
|
31993
|
-
let match2 = config.contentPattern.exec(fileContent);
|
|
31994
|
-
if (match2?.[1] && !isNaN(parseInt(match2[1], 10)))
|
|
31995
|
-
return parseInt(match2[1], 10);
|
|
31996
|
-
}
|
|
31997
|
-
}
|
|
31998
|
-
|
|
31999
|
-
// ../cli-kit/dist/private/node/context/utilities.js
|
|
32000
|
-
init_cjs_shims();
|
|
32001
|
-
function isSet(variable) {
|
|
32002
|
-
return !(variable === void 0 || variable.trim() === "");
|
|
32003
|
-
}
|
|
32004
|
-
function getCIMetadata(envName, envs) {
|
|
32005
|
-
switch (envName) {
|
|
32006
|
-
case "bitbucket":
|
|
32007
|
-
return {
|
|
32008
|
-
branch: envs.BITBUCKET_BRANCH,
|
|
32009
|
-
build: envs.BITBUCKET_BUILD_NUMBER,
|
|
32010
|
-
commitSha: envs.BITBUCKET_COMMIT,
|
|
32011
|
-
run: envs.BITBUCKET_BUILD_NUMBER,
|
|
32012
|
-
url: `https://bitbucket.org/${envs.BITBUCKET_WORKSPACE}/${envs.BITBUCKET_REPO_SLUG}/pipelines/results/${envs.BITBUCKET_BUILD_NUMBER}`
|
|
32013
|
-
};
|
|
32014
|
-
case "circleci":
|
|
32015
|
-
return {
|
|
32016
|
-
actor: envs.CIRCLE_USERNAME,
|
|
32017
|
-
branch: envs.CIRCLE_BRANCH,
|
|
32018
|
-
build: envs.CIRCLE_BUILD_NUM,
|
|
32019
|
-
commitSha: envs.CIRCLE_SHA1,
|
|
32020
|
-
run: envs.CIRCLE_WORKFLOW_ID,
|
|
32021
|
-
url: envs.CIRCLE_BUILD_URL
|
|
32022
|
-
};
|
|
32023
|
-
case "github":
|
|
32024
|
-
return {
|
|
32025
|
-
actor: envs.GITHUB_ACTOR,
|
|
32026
|
-
attempt: envs.GITHUB_RUN_ATTEMPT,
|
|
32027
|
-
branch: envs.GITHUB_REF_NAME,
|
|
32028
|
-
build: envs.GITHUB_RUN_ID,
|
|
32029
|
-
commitSha: envs.GITHUB_SHA,
|
|
32030
|
-
run: envs.GITHUB_RUN_ID,
|
|
32031
|
-
runNumber: envs.GITHUB_RUN_NUMBER,
|
|
32032
|
-
url: `${envs.GITHUB_SERVER_URL}/${envs.GITHUB_REPOSITORY}/actions/runs/${envs.GITHUB_RUN_ID}`
|
|
32033
|
-
};
|
|
32034
|
-
case "gitlab":
|
|
32035
|
-
return {
|
|
32036
|
-
actor: envs.GITLAB_USER_LOGIN,
|
|
32037
|
-
branch: envs.CI_COMMIT_REF_NAME,
|
|
32038
|
-
build: envs.CI_PIPELINE_ID,
|
|
32039
|
-
commitSha: envs.CI_COMMIT_SHA,
|
|
32040
|
-
commitMessage: envs.CI_COMMIT_MESSAGE,
|
|
32041
|
-
run: envs.CI_RUNNER_ID,
|
|
32042
|
-
url: envs.CI_PIPELINE_URL
|
|
32043
|
-
};
|
|
32044
|
-
case "buildkite":
|
|
32045
|
-
return {
|
|
32046
|
-
branch: envs.BUILDKITE_BRANCH,
|
|
32047
|
-
build: envs.BUILDKITE_BUILD_NUMBER,
|
|
32048
|
-
commitSha: envs.BUILDKITE_COMMIT,
|
|
32049
|
-
commitMessage: envs.BUILDKITE_MESSAGE,
|
|
32050
|
-
run: envs.BUILDKITE_BUILD_NUMBER,
|
|
32051
|
-
url: envs.BUILDKITE_BUILD_URL
|
|
32052
|
-
};
|
|
32053
|
-
default:
|
|
32054
|
-
return {};
|
|
32055
|
-
}
|
|
32056
|
-
}
|
|
32057
|
-
|
|
32058
32143
|
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
32059
32144
|
init_cjs_shims();
|
|
32060
32145
|
function isInteractive({ stream: stream2 = process.stdout } = {}) {
|
|
@@ -32077,7 +32162,7 @@ function isVerbose(env3 = process.env) {
|
|
|
32077
32162
|
return isTruthy(env3[environmentVariables.verbose]) || process.argv.includes("--verbose");
|
|
32078
32163
|
}
|
|
32079
32164
|
async function isShopify(env3 = process.env) {
|
|
32080
|
-
return Object.prototype.hasOwnProperty.call(env3, environmentVariables.runAsUser) ? !isTruthy(env3[environmentVariables.runAsUser]) : await fileExists(pathConstants.executables.dev)
|
|
32165
|
+
return Object.prototype.hasOwnProperty.call(env3, environmentVariables.runAsUser) ? !isTruthy(env3[environmentVariables.runAsUser]) : await fileExists(pathConstants.executables.dev);
|
|
32081
32166
|
}
|
|
32082
32167
|
function isUnitTest(env3 = process.env) {
|
|
32083
32168
|
return isTruthy(env3[environmentVariables.unitTest]);
|
|
@@ -32110,7 +32195,7 @@ function themeToken(env3 = process.env) {
|
|
|
32110
32195
|
return env3[environmentVariables.themeToken];
|
|
32111
32196
|
}
|
|
32112
32197
|
function cloudEnvironment(env3 = process.env) {
|
|
32113
|
-
return isSet(env3[environmentVariables.codespaces]) ? { platform: "codespaces", editor: !0 } : isSet(env3[environmentVariables.gitpod]) ? { platform: "gitpod", editor: !0 } : isSet(env3[environmentVariables.cloudShell]) ? { platform: "cloudShell", editor: !0 } :
|
|
32198
|
+
return isSet(env3[environmentVariables.codespaces]) ? { platform: "codespaces", editor: !0 } : isSet(env3[environmentVariables.gitpod]) ? { platform: "gitpod", editor: !0 } : isSet(env3[environmentVariables.cloudShell]) ? { platform: "cloudShell", editor: !0 } : { platform: "localhost", editor: !1 };
|
|
32114
32199
|
}
|
|
32115
32200
|
async function hasGit() {
|
|
32116
32201
|
try {
|
|
@@ -32151,6 +32236,13 @@ function opentelemetryDomain(env3 = process.env) {
|
|
|
32151
32236
|
|
|
32152
32237
|
export {
|
|
32153
32238
|
isTruthy,
|
|
32239
|
+
envPaths,
|
|
32240
|
+
environmentVariables,
|
|
32241
|
+
systemEnvironmentVariables,
|
|
32242
|
+
sessionConstants,
|
|
32243
|
+
bugsnagApiKey,
|
|
32244
|
+
reportingRateLimit,
|
|
32245
|
+
themeKitAccessDomain,
|
|
32154
32246
|
require_eq,
|
|
32155
32247
|
require_root,
|
|
32156
32248
|
require_Symbol,
|
|
@@ -32243,14 +32335,6 @@ export {
|
|
|
32243
32335
|
matchGlob,
|
|
32244
32336
|
readdir,
|
|
32245
32337
|
copyDirectoryContents,
|
|
32246
|
-
envPaths,
|
|
32247
|
-
logsFolder,
|
|
32248
|
-
environmentVariables,
|
|
32249
|
-
systemEnvironmentVariables,
|
|
32250
|
-
sessionConstants,
|
|
32251
|
-
bugsnagApiKey,
|
|
32252
|
-
reportingRateLimit,
|
|
32253
|
-
themeKitAccessDomain,
|
|
32254
32338
|
treeKill,
|
|
32255
32339
|
mimicFunction,
|
|
32256
32340
|
require_signal_exit,
|
|
@@ -32266,15 +32350,6 @@ export {
|
|
|
32266
32350
|
terminalSupportsPrompting,
|
|
32267
32351
|
isCI,
|
|
32268
32352
|
isWsl,
|
|
32269
|
-
Environment,
|
|
32270
|
-
serviceEnvironment,
|
|
32271
|
-
spinFqdn,
|
|
32272
|
-
isSpin,
|
|
32273
|
-
isSpinEnvironment,
|
|
32274
|
-
appPort,
|
|
32275
|
-
appHost,
|
|
32276
|
-
spinVariables,
|
|
32277
|
-
fetchSpinPort,
|
|
32278
32353
|
isTerminalInteractive,
|
|
32279
32354
|
homeDirectory,
|
|
32280
32355
|
isDevelopment,
|
|
@@ -32341,6 +32416,7 @@ export {
|
|
|
32341
32416
|
import_ts_error,
|
|
32342
32417
|
AbortController,
|
|
32343
32418
|
AbortSignal,
|
|
32419
|
+
require_baseForOwn,
|
|
32344
32420
|
require_stacktracey,
|
|
32345
32421
|
createRuntimeMetadataContainer,
|
|
32346
32422
|
getAllPublicMetadata,
|
|
@@ -32356,7 +32432,6 @@ export {
|
|
|
32356
32432
|
TabularData,
|
|
32357
32433
|
Alert,
|
|
32358
32434
|
useAbortSignal,
|
|
32359
|
-
require_baseForOwn,
|
|
32360
32435
|
require_baseEach,
|
|
32361
32436
|
debounce,
|
|
32362
32437
|
renderConcurrent,
|
|
@@ -32370,6 +32445,7 @@ export {
|
|
|
32370
32445
|
renderAutocompletePrompt,
|
|
32371
32446
|
renderTable,
|
|
32372
32447
|
renderTasks,
|
|
32448
|
+
renderSingleTask,
|
|
32373
32449
|
renderTextPrompt,
|
|
32374
32450
|
renderDangerousConfirmationPrompt,
|
|
32375
32451
|
keypress,
|
|
@@ -32465,4 +32541,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
32465
32541
|
* LICENSE file in the root directory of this source tree.
|
|
32466
32542
|
*)
|
|
32467
32543
|
*/
|
|
32468
|
-
//# sourceMappingURL=chunk-
|
|
32544
|
+
//# sourceMappingURL=chunk-BPVVHBDS.js.map
|