@shopify/cli 3.75.4 → 3.76.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/dist/{chunk-IROHTJ5D.js → chunk-3Q5TSFEN.js} +6 -6
- package/dist/{chunk-CBIPUP4Q.js → chunk-3THHNKSL.js} +3 -3
- package/dist/{chunk-Y3V7CDDP.js → chunk-4OD4TP6T.js} +4 -4
- package/dist/{chunk-NNHELYN3.js → chunk-4SFWD6RY.js} +3 -3
- package/dist/{chunk-VIMSAJBK.js → chunk-5TZDSORY.js} +93 -163
- package/dist/{chunk-3FPXLCF5.js → chunk-6KV6OKFB.js} +3 -3
- package/dist/{chunk-2OX7ESM2.js → chunk-6TPMZTXG.js} +6 -6
- package/dist/{chunk-VH3W76GN.js → chunk-742MYXOA.js} +3 -3
- package/dist/{chunk-LWZVD7VH.js → chunk-7UIQNXWE.js} +3 -3
- package/dist/{chunk-7DV7FO6D.js → chunk-A44GEDKW.js} +7 -6
- package/dist/{chunk-KRPDLCMT.js → chunk-ACGZSEHA.js} +11 -11
- package/dist/{chunk-4IY25QPC.js → chunk-BJG7ZRQ2.js} +3 -3
- package/dist/{chunk-EFDLFMUG.js → chunk-DFFXOFLT.js} +2 -2
- package/dist/{chunk-WHYTGJJU.js → chunk-EHL6XSBG.js} +10 -9
- package/dist/{chunk-QGAHQAXG.js → chunk-EJU7LVJW.js} +3 -3
- package/dist/{chunk-TPUB2CUK.js → chunk-FUA76K3T.js} +2 -2
- package/dist/{chunk-OSDKLELI.js → chunk-FZT5AGA5.js} +4 -4
- package/dist/{chunk-R2KFJZQF.js → chunk-IROPFRNN.js} +36 -15
- package/dist/{chunk-EPSGPKFO.js → chunk-JBS4NEJX.js} +5 -5
- package/dist/{chunk-ARR2ZV5X.js → chunk-LTIYNGCV.js} +3 -3
- package/dist/{chunk-IAFN3BTU.js → chunk-LUCMIGZJ.js} +2 -2
- package/dist/{chunk-V4FD5VKG.js → chunk-LXQWZFLX.js} +74 -11
- package/dist/{chunk-LRTITZPZ.js → chunk-MVZ4LGIM.js} +2 -2
- package/dist/{chunk-7DRESMZH.js → chunk-PDQLM7DM.js} +3 -3
- package/dist/{chunk-R6ST4Q4K.js → chunk-RB5K7TGA.js} +2 -2
- package/dist/{chunk-WCTQ65EF.js → chunk-RDHYYXFE.js} +3 -3
- package/dist/{chunk-R27Y5T4H.js → chunk-T2LQCR7X.js} +2 -2
- package/dist/{chunk-HV2KH53A.js → chunk-UAZUB5EV.js} +3 -3
- package/dist/{chunk-3CB5D2ZO.js → chunk-ULBY4CUT.js} +2 -2
- package/dist/{chunk-DFK6H6Q2.js → chunk-VX5SZCUI.js} +59 -19
- package/dist/{chunk-O5UY3K6F.js → chunk-W6WCETMJ.js} +4 -4
- package/dist/{chunk-37RGPUOL.js → chunk-WOG2LQ3X.js} +3 -3
- package/dist/{chunk-LH3QC4DP.js → chunk-WWI2QVFK.js} +4 -3
- package/dist/{chunk-DLW5TTAO.js → chunk-ZQU7DVLN.js} +3 -3
- package/dist/cli/commands/auth/logout.js +11 -12
- package/dist/cli/commands/auth/logout.test.js +12 -13
- package/dist/cli/commands/cache/clear.js +10 -11
- package/dist/cli/commands/debug/command-flags.js +10 -11
- package/dist/cli/commands/docs/generate.js +10 -11
- package/dist/cli/commands/docs/generate.test.js +10 -11
- package/dist/cli/commands/help.js +10 -11
- package/dist/cli/commands/kitchen-sink/async.js +11 -12
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/index.js +13 -14
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -14
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -12
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.js +11 -12
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -12
- package/dist/cli/commands/notifications/generate.js +11 -12
- package/dist/cli/commands/notifications/list.js +11 -12
- package/dist/cli/commands/search.js +11 -12
- package/dist/cli/commands/upgrade.js +11 -12
- package/dist/cli/commands/version.js +11 -12
- package/dist/cli/commands/version.test.js +11 -12
- package/dist/cli/services/commands/notifications.js +6 -6
- package/dist/cli/services/commands/search.js +2 -2
- package/dist/cli/services/commands/search.test.js +2 -2
- package/dist/cli/services/commands/version.js +3 -3
- package/dist/cli/services/commands/version.test.js +4 -4
- package/dist/cli/services/kitchen-sink/async.js +2 -2
- package/dist/cli/services/kitchen-sink/prompts.js +2 -2
- package/dist/cli/services/kitchen-sink/static.js +2 -2
- package/dist/cli/services/upgrade.js +3 -3
- package/dist/cli/services/upgrade.test.js +5 -7
- package/dist/{custom-oclif-loader-24E7DVTH.js → custom-oclif-loader-BXHJERI2.js} +2 -2
- package/dist/{error-handler-7V7HCPFM.js → error-handler-FV3FJ3VW.js} +8 -9
- package/dist/hooks/postrun.js +8 -8
- package/dist/hooks/prerun.js +10 -8
- package/dist/index.js +7214 -6859
- package/dist/{local-WHLQPZNS.js → local-PMOJBQT6.js} +2 -2
- package/dist/{node-AJELTNRR.js → node-5MJ6ATKS.js} +12 -13
- package/dist/{node-package-manager-KULBOPYH.js → node-package-manager-FZRL3EQB.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-B4IIF7YO.js → ui-5VMS7DNB.js} +2 -2
- package/dist/{workerd-PWW3BB6B.js → workerd-JHDITYBC.js} +12 -13
- package/oclif.manifest.json +46 -22
- package/package.json +6 -6
- package/dist/chunk-VTTVH23Q.js +0 -63
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
errorHandler,
|
|
3
3
|
registerCleanBugsnagErrorsFromWithinPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3Q5TSFEN.js";
|
|
5
5
|
import {
|
|
6
6
|
setCurrentCommandId,
|
|
7
7
|
showNotificationsIfNeeded
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IROPFRNN.js";
|
|
9
9
|
import {
|
|
10
10
|
AbortError,
|
|
11
11
|
addPublicMetadata,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
renderWarning,
|
|
23
23
|
terminalSupportsPrompting,
|
|
24
24
|
underscore
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-LXQWZFLX.js";
|
|
26
26
|
import {
|
|
27
27
|
cwd
|
|
28
28
|
} from "./chunk-57Q6OQG4.js";
|
|
@@ -1552,7 +1552,7 @@ var import_core = __toESM(require_lib()), BaseCommand = class extends import_cor
|
|
|
1552
1552
|
}
|
|
1553
1553
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1554
1554
|
async init() {
|
|
1555
|
-
return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id
|
|
1555
|
+
return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), isDevelopment() || await registerCleanBugsnagErrorsFromWithinPlugins(this.config), this.showNpmFlagWarning(), await showNotificationsIfNeeded(), super.init();
|
|
1556
1556
|
}
|
|
1557
1557
|
// NPM creates an environment variable for every flag passed to a script.
|
|
1558
1558
|
// This function checks for the presence of any of the available CLI flags
|
|
@@ -1594,17 +1594,17 @@ This flag is required in non-interactive terminal environments, such as a CI env
|
|
|
1594
1594
|
}
|
|
1595
1595
|
async resultWithEnvironment(originalResult, options, argv) {
|
|
1596
1596
|
let flags = originalResult.flags, environmentsFileName = this.environmentsFilename();
|
|
1597
|
-
if (!flags.environment || !environmentsFileName)
|
|
1597
|
+
if (!flags.environment?.length || !environmentsFileName || flags.environment.length > 1)
|
|
1598
1598
|
return originalResult;
|
|
1599
|
-
let environment = await loadEnvironment(flags.environment, environmentsFileName, { from: flags.path });
|
|
1599
|
+
let environment = await loadEnvironment(flags.environment[0], environmentsFileName, { from: flags.path });
|
|
1600
1600
|
if (!environment)
|
|
1601
1601
|
return originalResult;
|
|
1602
1602
|
let noDefaultsResult = await super.parse(noDefaultsOptions(options), argv), result = await super.parse(options, [
|
|
1603
1603
|
// Need to specify argv default because we're merging with argsFromEnvironment.
|
|
1604
|
-
...argv
|
|
1604
|
+
...argv ?? this.argv,
|
|
1605
1605
|
...argsFromEnvironment(environment, options, noDefaultsResult)
|
|
1606
1606
|
]);
|
|
1607
|
-
return reportEnvironmentApplication(noDefaultsResult.flags, result.flags, flags.environment, environment), result;
|
|
1607
|
+
return reportEnvironmentApplication(noDefaultsResult.flags, result.flags, flags.environment[0], environment), result;
|
|
1608
1608
|
}
|
|
1609
1609
|
};
|
|
1610
1610
|
BaseCommand.baseFlags = {};
|
|
@@ -1660,6 +1660,7 @@ var base_command_default = BaseCommand;
|
|
|
1660
1660
|
export {
|
|
1661
1661
|
decodeToml,
|
|
1662
1662
|
encodeToml,
|
|
1663
|
+
loadEnvironment,
|
|
1663
1664
|
base_command_default
|
|
1664
1665
|
};
|
|
1665
|
-
//# sourceMappingURL=chunk-
|
|
1666
|
+
//# sourceMappingURL=chunk-EHL6XSBG.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asyncTasks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ULBY4CUT.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EHL6XSBG.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var KitchenSinkAsync = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
KitchenSinkAsync
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-EJU7LVJW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EHL6XSBG.js";
|
|
4
4
|
import {
|
|
5
5
|
require_lib
|
|
6
6
|
} from "./chunk-VSKRQ3JT.js";
|
|
@@ -43,4 +43,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
|
|
|
43
43
|
export {
|
|
44
44
|
HelpCommand
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-FUA76K3T.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cliInstallCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LTIYNGCV.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EHL6XSBG.js";
|
|
7
7
|
import {
|
|
8
8
|
renderInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LXQWZFLX.js";
|
|
10
10
|
import {
|
|
11
11
|
init_cjs_shims
|
|
12
12
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -34,4 +34,4 @@ var Upgrade = class extends base_command_default {
|
|
|
34
34
|
export {
|
|
35
35
|
Upgrade
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-FZT5AGA5.js.map
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetch,
|
|
3
3
|
z
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-W6WCETMJ.js";
|
|
5
5
|
import {
|
|
6
6
|
CLI_KIT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DFFXOFLT.js";
|
|
8
8
|
import {
|
|
9
9
|
cacheRetrieve,
|
|
10
|
-
cacheRetrieveOrRepopulate,
|
|
11
10
|
cacheStore,
|
|
12
11
|
versionSatisfies
|
|
13
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WWI2QVFK.js";
|
|
14
13
|
import {
|
|
15
14
|
AbortSilentError,
|
|
15
|
+
exec,
|
|
16
16
|
isTruthy,
|
|
17
17
|
jsonOutputEnabled,
|
|
18
18
|
outputDebug,
|
|
19
19
|
renderError,
|
|
20
20
|
renderInfo,
|
|
21
21
|
renderWarning
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-LXQWZFLX.js";
|
|
23
23
|
import {
|
|
24
24
|
init_cjs_shims
|
|
25
25
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -41,7 +41,7 @@ function setCurrentCommandId(commandId) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
// ../cli-kit/dist/public/node/notifications-system.js
|
|
44
|
-
var URL = "https://cdn.shopify.com/static/cli/notifications.json",
|
|
44
|
+
var URL = "https://cdn.shopify.com/static/cli/notifications.json", EMPTY_CACHE_MESSAGE = "Cache is empty";
|
|
45
45
|
function url() {
|
|
46
46
|
return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL ?? URL;
|
|
47
47
|
}
|
|
@@ -65,7 +65,7 @@ var NotificationSchema = z.object({
|
|
|
65
65
|
}), NotificationsSchema = z.object({ notifications: z.array(NotificationSchema) });
|
|
66
66
|
async function showNotificationsIfNeeded(currentSurfaces, environment = process.env) {
|
|
67
67
|
try {
|
|
68
|
-
if (skipNotifications(environment))
|
|
68
|
+
if (skipNotifications(environment) || jsonOutputEnabled(environment))
|
|
69
69
|
return;
|
|
70
70
|
let notifications = await getNotifications(), commandId = getCurrentCommandId(), notificationsToShow = filterNotifications(notifications.notifications, commandId, currentSurfaces);
|
|
71
71
|
outputDebug(`Notifications to show: ${notificationsToShow.length}`), await renderNotifications(notificationsToShow);
|
|
@@ -73,13 +73,14 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
|
|
|
73
73
|
if (error.message === "abort")
|
|
74
74
|
throw new AbortSilentError();
|
|
75
75
|
let errorMessage = `Error retrieving notifications: ${error.message}`;
|
|
76
|
-
outputDebug(errorMessage)
|
|
77
|
-
|
|
76
|
+
if (outputDebug(errorMessage), error.message === EMPTY_CACHE_MESSAGE)
|
|
77
|
+
return;
|
|
78
|
+
let { sendErrorToBugsnag } = await import("./error-handler-FV3FJ3VW.js");
|
|
78
79
|
await sendErrorToBugsnag(errorMessage, "unexpected_error");
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
function skipNotifications(environment) {
|
|
82
|
-
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST)
|
|
82
|
+
function skipNotifications(environment = process.env) {
|
|
83
|
+
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST);
|
|
83
84
|
}
|
|
84
85
|
async function renderNotifications(notifications) {
|
|
85
86
|
notifications.slice(0, 2).forEach((notification) => {
|
|
@@ -105,15 +106,33 @@ async function renderNotifications(notifications) {
|
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
async function getNotifications() {
|
|
108
|
-
let cacheKey = `notifications-${url()}`, rawNotifications =
|
|
109
|
+
let cacheKey = `notifications-${url()}`, rawNotifications = cacheRetrieve(cacheKey)?.value;
|
|
110
|
+
if (!rawNotifications)
|
|
111
|
+
throw new Error(EMPTY_CACHE_MESSAGE);
|
|
112
|
+
let notifications = JSON.parse(rawNotifications);
|
|
109
113
|
return NotificationsSchema.parse(notifications);
|
|
110
114
|
}
|
|
111
115
|
async function fetchNotifications() {
|
|
112
|
-
outputDebug("
|
|
116
|
+
outputDebug("Fetching notifications...");
|
|
113
117
|
let response = await fetch(url(), { signal: AbortSignal.timeout(3 * 1e3) });
|
|
114
118
|
if (response.status !== 200)
|
|
115
119
|
throw new Error(`Failed to fetch notifications: ${response.statusText}`);
|
|
116
|
-
|
|
120
|
+
let rawNotifications = await response.text(), notifications = JSON.parse(rawNotifications), result = NotificationsSchema.parse(notifications);
|
|
121
|
+
return await cacheNotifications(rawNotifications), result;
|
|
122
|
+
}
|
|
123
|
+
async function cacheNotifications(notifications) {
|
|
124
|
+
cacheStore(`notifications-${url()}`, notifications), outputDebug(`Notifications from ${url()} stored in the cache`);
|
|
125
|
+
}
|
|
126
|
+
function fetchNotificationsInBackground(currentCommand, argv = process.argv, environment = process.env) {
|
|
127
|
+
if (skipNotifications(environment))
|
|
128
|
+
return;
|
|
129
|
+
let command = "shopify", args = ["notifications", "list"];
|
|
130
|
+
if (argv[0] && argv[0] !== "shopify") {
|
|
131
|
+
command = argv[0];
|
|
132
|
+
let indexValue = currentCommand.split(":")[0] ?? "", index = argv.indexOf(indexValue);
|
|
133
|
+
index > 0 && args.unshift(...argv.slice(1, index));
|
|
134
|
+
}
|
|
135
|
+
exec(command, args, { background: !0, env: { ...process.env, SHOPIFY_CLI_NO_ANALYTICS: "1" } });
|
|
117
136
|
}
|
|
118
137
|
function filterNotifications(notifications, commandId, currentSurfaces, today = new Date((/* @__PURE__ */ new Date()).setUTCHours(0, 0, 0, 0)), currentVersion = CLI_KIT_VERSION) {
|
|
119
138
|
return notifications.filter((notification) => filterByVersion(notification, currentVersion)).filter((notifications2) => filterByDate(notifications2, today)).filter((notification) => filterByCommand(notification, commandId)).filter((notification) => filterBySurface(notification, commandId, currentSurfaces)).filter((notification) => filterByFrequency(notification));
|
|
@@ -160,6 +179,8 @@ export {
|
|
|
160
179
|
setCurrentCommandId,
|
|
161
180
|
showNotificationsIfNeeded,
|
|
162
181
|
getNotifications,
|
|
182
|
+
fetchNotifications,
|
|
183
|
+
fetchNotificationsInBackground,
|
|
163
184
|
stringifyFilters
|
|
164
185
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
186
|
+
//# sourceMappingURL=chunk-IROPFRNN.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prompts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RB5K7TGA.js";
|
|
4
4
|
import {
|
|
5
5
|
staticService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-T2LQCR7X.js";
|
|
7
7
|
import {
|
|
8
8
|
asyncTasks
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ULBY4CUT.js";
|
|
10
10
|
import {
|
|
11
11
|
base_command_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EHL6XSBG.js";
|
|
13
13
|
import {
|
|
14
14
|
init_cjs_shims
|
|
15
15
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -34,4 +34,4 @@ var KitchenSinkAll = class extends base_command_default {
|
|
|
34
34
|
export {
|
|
35
35
|
KitchenSinkAll
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-JBS4NEJX.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
packageManagerFromUserAgent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WWI2QVFK.js";
|
|
4
4
|
import {
|
|
5
5
|
currentProcessIsGlobal,
|
|
6
6
|
inferPackageManagerForGlobalCLI,
|
|
7
7
|
outputContent,
|
|
8
8
|
outputToken
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LXQWZFLX.js";
|
|
10
10
|
import {
|
|
11
11
|
init_cjs_shims
|
|
12
12
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
cliInstallCommand,
|
|
26
26
|
getOutputUpdateCLIReminder
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-LTIYNGCV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCollectedLogs,
|
|
3
3
|
collectedLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXQWZFLX.js";
|
|
5
5
|
import {
|
|
6
6
|
init_cjs_shims
|
|
7
7
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -33,4 +33,4 @@ function mockAndCaptureOutput() {
|
|
|
33
33
|
export {
|
|
34
34
|
mockAndCaptureOutput
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-LUCMIGZJ.js.map
|
|
@@ -23777,14 +23777,14 @@ var homedir = os3.homedir(), tmpdir2 = os3.tmpdir(), { env } = process3, macos =
|
|
|
23777
23777
|
temp: path5.join(tmpdir2, name)
|
|
23778
23778
|
};
|
|
23779
23779
|
}, linux = (name) => {
|
|
23780
|
-
let
|
|
23780
|
+
let username2 = path5.basename(homedir);
|
|
23781
23781
|
return {
|
|
23782
23782
|
data: path5.join(env.XDG_DATA_HOME || path5.join(homedir, ".local", "share"), name),
|
|
23783
23783
|
config: path5.join(env.XDG_CONFIG_HOME || path5.join(homedir, ".config"), name),
|
|
23784
23784
|
cache: path5.join(env.XDG_CACHE_HOME || path5.join(homedir, ".cache"), name),
|
|
23785
23785
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
23786
23786
|
log: path5.join(env.XDG_STATE_HOME || path5.join(homedir, ".local", "state"), name),
|
|
23787
|
-
temp: path5.join(tmpdir2,
|
|
23787
|
+
temp: path5.join(tmpdir2, username2, name)
|
|
23788
23788
|
};
|
|
23789
23789
|
};
|
|
23790
23790
|
function envPaths(name, { suffix = "nodejs" } = {}) {
|
|
@@ -23941,6 +23941,9 @@ function buildProcessTree(parentPid, tree, pidsToProcess, spawnChildProcessesLis
|
|
|
23941
23941
|
ps.on("close", onClose);
|
|
23942
23942
|
}
|
|
23943
23943
|
|
|
23944
|
+
// ../cli-kit/dist/public/node/os.js
|
|
23945
|
+
init_cjs_shims();
|
|
23946
|
+
|
|
23944
23947
|
// ../../node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js
|
|
23945
23948
|
init_cjs_shims();
|
|
23946
23949
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
@@ -24780,17 +24783,74 @@ function create$(options) {
|
|
|
24780
24783
|
}
|
|
24781
24784
|
var $ = create$();
|
|
24782
24785
|
|
|
24786
|
+
// ../cli-kit/dist/public/node/os.js
|
|
24787
|
+
import { userInfo as osUserInfo } from "os";
|
|
24788
|
+
async function username(platform2 = process.platform) {
|
|
24789
|
+
outputDebug(outputContent`Obtaining user name...`);
|
|
24790
|
+
let environmentVariable = getEnvironmentVariable();
|
|
24791
|
+
if (environmentVariable)
|
|
24792
|
+
return environmentVariable;
|
|
24793
|
+
let userInfoUsername = getUsernameFromOsUserInfo();
|
|
24794
|
+
if (userInfoUsername)
|
|
24795
|
+
return userInfoUsername;
|
|
24796
|
+
try {
|
|
24797
|
+
if (platform2 === "win32") {
|
|
24798
|
+
let { stdout } = await execa("whoami");
|
|
24799
|
+
return cleanWindowsCommand(stdout);
|
|
24800
|
+
}
|
|
24801
|
+
let { stdout: userId } = await execa("id", ["-u"]);
|
|
24802
|
+
try {
|
|
24803
|
+
let { stdout } = await execa("id", ["-un", userId]);
|
|
24804
|
+
return stdout;
|
|
24805
|
+
} catch {
|
|
24806
|
+
}
|
|
24807
|
+
return makeUsernameFromId(userId);
|
|
24808
|
+
} catch {
|
|
24809
|
+
return null;
|
|
24810
|
+
}
|
|
24811
|
+
}
|
|
24812
|
+
function platformAndArch(platform2 = process.platform, arch = process.arch) {
|
|
24813
|
+
let archString;
|
|
24814
|
+
return arch === "x64" ? archString = "amd64" : arch === "ia32" ? archString = "386" : archString = arch, { platform: platform2.match(/^win.+/) ? "windows" : platform2, arch: archString };
|
|
24815
|
+
}
|
|
24816
|
+
function getEnvironmentVariable() {
|
|
24817
|
+
let { env: env3 } = process;
|
|
24818
|
+
return env3.SUDO_USER || env3.C9_USER || env3.LOGNAME || env3.USER || env3.LNAME || env3.USERNAME;
|
|
24819
|
+
}
|
|
24820
|
+
function getUsernameFromOsUserInfo() {
|
|
24821
|
+
try {
|
|
24822
|
+
return osUserInfo().username;
|
|
24823
|
+
} catch {
|
|
24824
|
+
return null;
|
|
24825
|
+
}
|
|
24826
|
+
}
|
|
24827
|
+
function cleanWindowsCommand(value) {
|
|
24828
|
+
return value.replace(/^.*\\/, "");
|
|
24829
|
+
}
|
|
24830
|
+
function makeUsernameFromId(userId) {
|
|
24831
|
+
return `no-username-${userId}`;
|
|
24832
|
+
}
|
|
24833
|
+
|
|
24783
24834
|
// ../cli-kit/dist/public/node/system.js
|
|
24784
24835
|
var import_which = __toESM(require_lib2());
|
|
24785
24836
|
async function openURL(url) {
|
|
24786
|
-
|
|
24837
|
+
let externalOpen = await import("./open-BHIF7E3E.js");
|
|
24838
|
+
try {
|
|
24839
|
+
return await externalOpen.default(url), !0;
|
|
24840
|
+
} catch {
|
|
24841
|
+
return !1;
|
|
24842
|
+
}
|
|
24787
24843
|
}
|
|
24788
24844
|
async function captureOutput(command, args, options) {
|
|
24789
24845
|
return (await buildExec(command, args, options)).stdout;
|
|
24790
24846
|
}
|
|
24791
24847
|
async function exec2(command, args, options) {
|
|
24848
|
+
if (options) {
|
|
24849
|
+
let runningOnWindows = platformAndArch().platform === "windows";
|
|
24850
|
+
options.background = runningOnWindows ? !1 : options.background;
|
|
24851
|
+
}
|
|
24792
24852
|
let commandProcess = buildExec(command, args, options);
|
|
24793
|
-
options?.stderr && options.stderr !== "inherit" && commandProcess.stderr?.pipe(options.stderr, { end: !1 }), options?.stdout && options.stdout !== "inherit" && commandProcess.stdout?.pipe(options.stdout, { end: !1 });
|
|
24853
|
+
options?.background && commandProcess.unref(), options?.stderr && options.stderr !== "inherit" && commandProcess.stderr?.pipe(options.stderr, { end: !1 }), options?.stdout && options.stdout !== "inherit" && commandProcess.stdout?.pipe(options.stdout, { end: !1 });
|
|
24794
24854
|
let aborted = !1;
|
|
24795
24855
|
options?.signal?.addEventListener("abort", () => {
|
|
24796
24856
|
let pid = commandProcess.pid;
|
|
@@ -24818,16 +24878,18 @@ function buildExec(command, args, options) {
|
|
|
24818
24878
|
env: env3,
|
|
24819
24879
|
cwd: executionCwd,
|
|
24820
24880
|
input: options?.input,
|
|
24821
|
-
stdio: options?.stdio,
|
|
24881
|
+
stdio: options?.background ? "ignore" : options?.stdio,
|
|
24822
24882
|
stdin: options?.stdin,
|
|
24823
24883
|
stdout: options?.stdout === "inherit" ? "inherit" : void 0,
|
|
24824
24884
|
stderr: options?.stderr === "inherit" ? "inherit" : void 0,
|
|
24825
24885
|
// Setting this to false makes it possible to kill the main process
|
|
24826
24886
|
// and all its sub-processes with Ctrl+C on Windows
|
|
24827
|
-
windowsHide: !1
|
|
24887
|
+
windowsHide: !1,
|
|
24888
|
+
detached: options?.background,
|
|
24889
|
+
cleanup: !options?.background
|
|
24828
24890
|
});
|
|
24829
24891
|
return outputDebug(`
|
|
24830
|
-
Running system process:
|
|
24892
|
+
Running system process${options?.background ? " in background" : ""}:
|
|
24831
24893
|
\xB7 Command: ${command} ${args.join(" ")}
|
|
24832
24894
|
\xB7 Working directory: ${executionCwd}
|
|
24833
24895
|
`), commandProcess;
|
|
@@ -29440,7 +29502,7 @@ function errorMessageImpliesEnvironmentIssue(message) {
|
|
|
29440
29502
|
|
|
29441
29503
|
// ../cli-kit/dist/public/node/abort.js
|
|
29442
29504
|
init_cjs_shims();
|
|
29443
|
-
var import_node_abort_controller = __toESM(require_node_abort_controller()
|
|
29505
|
+
var import_node_abort_controller = __toESM(require_node_abort_controller()), AbortController = class extends import_node_abort_controller.AbortController {
|
|
29444
29506
|
}, AbortSignal = class extends import_node_abort_controller.AbortSignal {
|
|
29445
29507
|
};
|
|
29446
29508
|
|
|
@@ -29471,7 +29533,7 @@ function createRuntimeMetadataContainer(defaultPublicMetadata = {}) {
|
|
|
29471
29533
|
try {
|
|
29472
29534
|
await getAndSet();
|
|
29473
29535
|
} catch (error) {
|
|
29474
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
29536
|
+
let { sendErrorToBugsnag } = await import("./error-handler-FV3FJ3VW.js");
|
|
29475
29537
|
await sendErrorToBugsnag(error, "unexpected_error");
|
|
29476
29538
|
}
|
|
29477
29539
|
}, durationStack = [];
|
|
@@ -31270,8 +31332,9 @@ export {
|
|
|
31270
31332
|
npmRunPathEnv,
|
|
31271
31333
|
mimicFunction,
|
|
31272
31334
|
require_get_stream,
|
|
31273
|
-
execa,
|
|
31274
31335
|
execaSync,
|
|
31336
|
+
username,
|
|
31337
|
+
platformAndArch,
|
|
31275
31338
|
openURL,
|
|
31276
31339
|
captureOutput,
|
|
31277
31340
|
exec2 as exec,
|
|
@@ -31476,4 +31539,4 @@ react-reconciler/cjs/react-reconciler-constants.development.js:
|
|
|
31476
31539
|
* LICENSE file in the root directory of this source tree.
|
|
31477
31540
|
*)
|
|
31478
31541
|
*/
|
|
31479
|
-
//# sourceMappingURL=chunk-
|
|
31542
|
+
//# sourceMappingURL=chunk-LXQWZFLX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openURL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LXQWZFLX.js";
|
|
4
4
|
import {
|
|
5
5
|
init_cjs_shims
|
|
6
6
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -15,4 +15,4 @@ async function searchService(query) {
|
|
|
15
15
|
export {
|
|
16
16
|
searchService
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-MVZ4LGIM.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
findUpAndReadPackageJson,
|
|
5
5
|
getPackageManager,
|
|
6
6
|
usesWorkspaces
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WWI2QVFK.js";
|
|
8
8
|
import {
|
|
9
9
|
AbortError,
|
|
10
10
|
exec,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
outputSuccess,
|
|
16
16
|
outputToken,
|
|
17
17
|
outputWarn
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LXQWZFLX.js";
|
|
19
19
|
import {
|
|
20
20
|
dirname,
|
|
21
21
|
joinPath,
|
|
@@ -139,4 +139,4 @@ function usingPackageManager({ env } = { env: process.env }) {
|
|
|
139
139
|
export {
|
|
140
140
|
upgrade
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=chunk-
|
|
142
|
+
//# sourceMappingURL=chunk-PDQLM7DM.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
renderDangerousConfirmationPrompt,
|
|
6
6
|
renderSelectPrompt,
|
|
7
7
|
renderTextPrompt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LXQWZFLX.js";
|
|
9
9
|
import {
|
|
10
10
|
init_cjs_shims
|
|
11
11
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -175,4 +175,4 @@ async function prompts() {
|
|
|
175
175
|
export {
|
|
176
176
|
prompts
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-RB5K7TGA.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EHL6XSBG.js";
|
|
4
4
|
import {
|
|
5
5
|
renderTable,
|
|
6
6
|
renderText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LXQWZFLX.js";
|
|
8
8
|
import {
|
|
9
9
|
require_lib
|
|
10
10
|
} from "./chunk-VSKRQ3JT.js";
|
|
@@ -83,4 +83,4 @@ var import_core = __toESM(require_lib(), 1), CommandFlags = class _CommandFlags
|
|
|
83
83
|
export {
|
|
84
84
|
CommandFlags
|
|
85
85
|
};
|
|
86
|
-
//# sourceMappingURL=chunk-
|
|
86
|
+
//# sourceMappingURL=chunk-RDHYYXFE.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
renderSuccess,
|
|
8
8
|
renderTable,
|
|
9
9
|
renderWarning
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LXQWZFLX.js";
|
|
11
11
|
import {
|
|
12
12
|
init_cjs_shims
|
|
13
13
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -203,4 +203,4 @@ async function staticService() {
|
|
|
203
203
|
export {
|
|
204
204
|
staticService
|
|
205
205
|
};
|
|
206
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# sourceMappingURL=chunk-T2LQCR7X.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
list
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-A44GEDKW.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EHL6XSBG.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var List = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
List
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-UAZUB5EV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderConcurrent,
|
|
3
3
|
renderTasks
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LXQWZFLX.js";
|
|
5
5
|
import {
|
|
6
6
|
init_cjs_shims
|
|
7
7
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -43,4 +43,4 @@ async function asyncTasks() {
|
|
|
43
43
|
export {
|
|
44
44
|
asyncTasks
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-ULBY4CUT.js.map
|