@shopify/cli 3.76.1 → 3.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RDHYYXFE.js → chunk-3ARIMAIR.js} +3 -3
- package/dist/{chunk-EHL6XSBG.js → chunk-4BPRKRYD.js} +4 -4
- package/dist/{chunk-WWI2QVFK.js → chunk-5ZMRZCPZ.js} +2 -2
- package/dist/{chunk-T2LQCR7X.js → chunk-6ZKE2WPK.js} +2 -2
- package/dist/{chunk-FZT5AGA5.js → chunk-74V7KQLD.js} +4 -4
- package/dist/{chunk-LUCMIGZJ.js → chunk-7IKFEU6I.js} +2 -2
- package/dist/{chunk-JBS4NEJX.js → chunk-ACSVNEID.js} +5 -5
- package/dist/{chunk-PDQLM7DM.js → chunk-AUBRXAVZ.js} +3 -3
- package/dist/{chunk-6TPMZTXG.js → chunk-AW7SZYGV.js} +7 -7
- package/dist/{chunk-ACGZSEHA.js → chunk-AZ33PIX2.js} +7 -7
- package/dist/{chunk-MVZ4LGIM.js → chunk-CBLCYLJO.js} +2 -2
- package/dist/{chunk-DFFXOFLT.js → chunk-DHO2PUCK.js} +2 -2
- package/dist/{chunk-IROPFRNN.js → chunk-FJAIUBHO.js} +34 -18
- package/dist/{chunk-ZQU7DVLN.js → chunk-GPICPOCE.js} +8 -5
- package/dist/{chunk-W6WCETMJ.js → chunk-IX7XAR6F.js} +143 -28
- package/dist/{chunk-LXQWZFLX.js → chunk-J3C7BGUW.js} +22 -10
- package/dist/{chunk-ULBY4CUT.js → chunk-MYIEKIZR.js} +2 -2
- package/dist/{chunk-RB5K7TGA.js → chunk-NHMQOM7T.js} +2 -2
- package/dist/{chunk-3THHNKSL.js → chunk-NZVJ77WD.js} +3 -3
- package/dist/{chunk-742MYXOA.js → chunk-O5U2T7LH.js} +6 -3
- package/dist/{chunk-FUA76K3T.js → chunk-PHWPEUZI.js} +5 -2
- package/dist/{chunk-3Q5TSFEN.js → chunk-QVZW3IVL.js} +7 -7
- package/dist/{chunk-LTIYNGCV.js → chunk-RA5UDHSI.js} +3 -3
- package/dist/{chunk-4OD4TP6T.js → chunk-RWT677FV.js} +4 -4
- package/dist/{chunk-5TZDSORY.js → chunk-S3PY2ULH.js} +213 -120
- package/dist/{chunk-7UIQNXWE.js → chunk-SO33Y5TT.js} +3 -3
- package/dist/{chunk-6KV6OKFB.js → chunk-U7E5RRYF.js} +3 -3
- package/dist/{chunk-VX5SZCUI.js → chunk-V5G4FJZH.js} +14 -12
- package/dist/{chunk-4SFWD6RY.js → chunk-VTEM2QWG.js} +3 -3
- package/dist/{chunk-A44GEDKW.js → chunk-WN6OLVLP.js} +4 -4
- package/dist/{chunk-BJG7ZRQ2.js → chunk-YL7TDFFA.js} +3 -3
- package/dist/{chunk-EJU7LVJW.js → chunk-YXR557PE.js} +3 -3
- package/dist/chunk-ZKUNCSWD.js +52 -0
- package/dist/{chunk-WOG2LQ3X.js → chunk-ZVNHCLRN.js} +3 -3
- package/dist/cli/commands/auth/logout.js +11 -11
- package/dist/cli/commands/auth/logout.test.js +12 -12
- package/dist/cli/commands/cache/clear.js +10 -10
- package/dist/cli/commands/debug/command-flags.js +10 -10
- package/dist/cli/commands/docs/generate.js +10 -10
- package/dist/cli/commands/docs/generate.test.js +10 -10
- package/dist/cli/commands/help.d.ts +1 -0
- package/dist/cli/commands/help.js +10 -10
- package/dist/cli/commands/kitchen-sink/async.js +11 -11
- package/dist/cli/commands/kitchen-sink/async.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/index.js +13 -13
- package/dist/cli/commands/kitchen-sink/index.test.js +13 -13
- package/dist/cli/commands/kitchen-sink/prompts.js +11 -11
- package/dist/cli/commands/kitchen-sink/prompts.test.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.js +11 -11
- package/dist/cli/commands/kitchen-sink/static.test.js +11 -11
- package/dist/cli/commands/notifications/generate.js +11 -11
- package/dist/cli/commands/notifications/list.d.ts +3 -0
- package/dist/cli/commands/notifications/list.js +11 -11
- package/dist/cli/commands/search.d.ts +1 -0
- package/dist/cli/commands/search.js +11 -11
- package/dist/cli/commands/upgrade.js +11 -11
- package/dist/cli/commands/version.js +11 -11
- package/dist/cli/commands/version.test.js +11 -11
- 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 +4 -4
- package/dist/configs/all.yml +39 -3
- package/dist/configs/recommended.yml +36 -0
- package/dist/configs/theme-app-extension.yml +3 -3
- package/dist/{custom-oclif-loader-BXHJERI2.js → custom-oclif-loader-TE6EUPGI.js} +2 -2
- package/dist/data/filters.json +270 -327
- package/dist/data/latest.json +1 -1
- package/dist/data/objects.json +1482 -3709
- package/dist/data/preset.json +6 -0
- package/dist/data/preset_blocks.json +6 -0
- package/dist/data/setting.json +167 -50
- package/dist/data/tags.json +45 -101
- package/dist/{error-handler-FV3FJ3VW.js → error-handler-WC4XSLZQ.js} +8 -8
- package/dist/hooks/postrun.js +6 -6
- package/dist/hooks/prerun.js +8 -8
- package/dist/index.js +5451 -2314
- package/dist/{local-PMOJBQT6.js → local-7Q5JCU62.js} +2 -2
- package/dist/{node-5MJ6ATKS.js → node-MNEYEH5U.js} +12 -12
- package/dist/{node-package-manager-FZRL3EQB.js → node-package-manager-3SFTB3BW.js} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-5VMS7DNB.js → ui-NMP2SY3G.js} +2 -2
- package/dist/{workerd-JHDITYBC.js → workerd-NN737W52.js} +12 -12
- package/oclif.manifest.json +32 -19
- package/package.json +6 -6
- package/dist/chunk-UAZUB5EV.js +0 -28
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4BPRKRYD.js";
|
|
4
4
|
import {
|
|
5
5
|
renderTable,
|
|
6
6
|
renderText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-J3C7BGUW.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-3ARIMAIR.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
errorHandler,
|
|
3
3
|
registerCleanBugsnagErrorsFromWithinPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QVZW3IVL.js";
|
|
5
5
|
import {
|
|
6
6
|
setCurrentCommandId,
|
|
7
7
|
showNotificationsIfNeeded
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FJAIUBHO.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-J3C7BGUW.js";
|
|
26
26
|
import {
|
|
27
27
|
cwd
|
|
28
28
|
} from "./chunk-57Q6OQG4.js";
|
|
@@ -1663,4 +1663,4 @@ export {
|
|
|
1663
1663
|
loadEnvironment,
|
|
1664
1664
|
base_command_default
|
|
1665
1665
|
};
|
|
1666
|
-
//# sourceMappingURL=chunk-
|
|
1666
|
+
//# sourceMappingURL=chunk-4BPRKRYD.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
require_get_stream,
|
|
22
22
|
runWithTimer,
|
|
23
23
|
writeFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-J3C7BGUW.js";
|
|
25
25
|
import {
|
|
26
26
|
dirname,
|
|
27
27
|
joinPath
|
|
@@ -13749,4 +13749,4 @@ deep-extend/lib/deep-extend.js:
|
|
|
13749
13749
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
13750
13750
|
*)
|
|
13751
13751
|
*/
|
|
13752
|
-
//# sourceMappingURL=chunk-
|
|
13752
|
+
//# sourceMappingURL=chunk-5ZMRZCPZ.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
renderSuccess,
|
|
8
8
|
renderTable,
|
|
9
9
|
renderWarning
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J3C7BGUW.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-6ZKE2WPK.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cliInstallCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RA5UDHSI.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4BPRKRYD.js";
|
|
7
7
|
import {
|
|
8
8
|
renderInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J3C7BGUW.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-74V7KQLD.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCollectedLogs,
|
|
3
3
|
collectedLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-J3C7BGUW.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-7IKFEU6I.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prompts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NHMQOM7T.js";
|
|
4
4
|
import {
|
|
5
5
|
staticService
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6ZKE2WPK.js";
|
|
7
7
|
import {
|
|
8
8
|
asyncTasks
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MYIEKIZR.js";
|
|
10
10
|
import {
|
|
11
11
|
base_command_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4BPRKRYD.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-ACSVNEID.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
findUpAndReadPackageJson,
|
|
5
5
|
getPackageManager,
|
|
6
6
|
usesWorkspaces
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-5ZMRZCPZ.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-J3C7BGUW.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-AUBRXAVZ.js.map
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
getEnvironmentData,
|
|
3
3
|
getLastSeenUserIdAfterAuth,
|
|
4
4
|
getSensitiveEnvironmentData
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S3PY2ULH.js";
|
|
6
6
|
import {
|
|
7
7
|
fetch
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IX7XAR6F.js";
|
|
9
9
|
import {
|
|
10
10
|
CLI_KIT_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DHO2PUCK.js";
|
|
12
12
|
import {
|
|
13
13
|
runWithRateLimit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5ZMRZCPZ.js";
|
|
15
15
|
import {
|
|
16
16
|
alwaysLogAnalytics,
|
|
17
17
|
alwaysLogMetrics,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
outputDebug,
|
|
29
29
|
outputToken,
|
|
30
30
|
reportingRateLimit
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-J3C7BGUW.js";
|
|
32
32
|
import {
|
|
33
33
|
__commonJS,
|
|
34
34
|
__esm,
|
|
@@ -15486,7 +15486,7 @@ async function publishMonorailEvent(schemaId, publicData, sensitiveData) {
|
|
|
15486
15486
|
publishedCommandNames.add(commandName);
|
|
15487
15487
|
}
|
|
15488
15488
|
try {
|
|
15489
|
-
let currentTime = (/* @__PURE__ */ new Date()).getTime(), payload = { ...publicData, ...sensitiveData }, body = JSON.stringify({ schema_id: schemaId, payload }), headers = buildHeaders(currentTime), response = await fetch(url, { method: "POST", body, headers });
|
|
15489
|
+
let currentTime = (/* @__PURE__ */ new Date()).getTime(), payload = { ...publicData, ...sensitiveData }, body = JSON.stringify({ schema_id: schemaId, payload }), headers = buildHeaders(currentTime), response = await fetch(url, { method: "POST", body, headers }, "non-blocking");
|
|
15490
15490
|
return response.status === 200 ? (outputDebug(outputContent`Analytics event sent: ${outputToken.json(sanitizePayload(payload))}`), { type: "ok" }) : (outputDebug(`Failed to report usage analytics: ${response.statusText}`), { type: "error", message: response.statusText });
|
|
15491
15491
|
} catch (error) {
|
|
15492
15492
|
let message = "Failed to report usage analytics";
|
|
@@ -15930,4 +15930,4 @@ export {
|
|
|
15930
15930
|
requestIdsCollection,
|
|
15931
15931
|
reportAnalyticsEvent
|
|
15932
15932
|
};
|
|
15933
|
-
//# sourceMappingURL=chunk-
|
|
15933
|
+
//# sourceMappingURL=chunk-AW7SZYGV.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4BPRKRYD.js";
|
|
4
4
|
import {
|
|
5
5
|
cacheClear
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5ZMRZCPZ.js";
|
|
7
7
|
import {
|
|
8
8
|
environmentVariables,
|
|
9
9
|
isTruthy
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J3C7BGUW.js";
|
|
11
11
|
import {
|
|
12
12
|
require_lib
|
|
13
13
|
} from "./chunk-VSKRQ3JT.js";
|
|
@@ -26,7 +26,7 @@ init_cjs_shims();
|
|
|
26
26
|
init_cjs_shims();
|
|
27
27
|
import { fileURLToPath } from "node:url";
|
|
28
28
|
async function launchCLI(options) {
|
|
29
|
-
let { errorHandler } = await import("./error-handler-
|
|
29
|
+
let { errorHandler } = await import("./error-handler-WC4XSLZQ.js"), { isDevelopment } = await import("./local-7Q5JCU62.js"), oclif = await import("./lib-SGEWXU7Z.js"), { ShopifyConfig } = await import("./custom-oclif-loader-TE6EUPGI.js");
|
|
30
30
|
isDevelopment() && (oclif.default.settings.debug = !0);
|
|
31
31
|
try {
|
|
32
32
|
let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
|
|
@@ -41,7 +41,7 @@ var import_core = __toESM(require_lib());
|
|
|
41
41
|
async function exitIfOldNodeVersion(versions = process.versions) {
|
|
42
42
|
let nodeVersion = versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
43
43
|
if (nodeMajorVersion < 18) {
|
|
44
|
-
let { renderError } = await import("./ui-
|
|
44
|
+
let { renderError } = await import("./ui-NMP2SY3G.js");
|
|
45
45
|
renderError({
|
|
46
46
|
headline: "Upgrade to a supported Node version now.",
|
|
47
47
|
body: [
|
|
@@ -68,7 +68,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
|
|
|
68
68
|
return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions), launchCLI2({ moduleURL: options.moduleURL });
|
|
69
69
|
}
|
|
70
70
|
async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
|
|
71
|
-
let { findUpAndReadPackageJson } = await import("./node-package-manager-
|
|
71
|
+
let { findUpAndReadPackageJson } = await import("./node-package-manager-3SFTB3BW.js"), { moduleDirectory } = await import("./path-2K5HIMHZ.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
|
|
72
72
|
if (argv.findIndex((arg) => arg.includes("init")) === -1) {
|
|
73
73
|
let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
|
|
74
74
|
argv.splice(initIndex2, 0, "init");
|
|
@@ -117,4 +117,4 @@ export {
|
|
|
117
117
|
jsonFlag,
|
|
118
118
|
ClearCache
|
|
119
119
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
120
|
+
//# sourceMappingURL=chunk-AZ33PIX2.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
openURL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J3C7BGUW.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-CBLCYLJO.js.map
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
|
|
5
5
|
// ../cli-kit/dist/public/common/version.js
|
|
6
6
|
init_cjs_shims();
|
|
7
|
-
var CLI_KIT_VERSION = "3.
|
|
7
|
+
var CLI_KIT_VERSION = "3.77.0";
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
CLI_KIT_VERSION
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=chunk-
|
|
12
|
+
//# sourceMappingURL=chunk-DHO2PUCK.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
fetch,
|
|
3
3
|
z
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IX7XAR6F.js";
|
|
5
5
|
import {
|
|
6
6
|
CLI_KIT_VERSION
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DHO2PUCK.js";
|
|
8
8
|
import {
|
|
9
9
|
cacheRetrieve,
|
|
10
10
|
cacheStore,
|
|
11
11
|
versionSatisfies
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5ZMRZCPZ.js";
|
|
13
13
|
import {
|
|
14
14
|
AbortSilentError,
|
|
15
15
|
exec,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
renderError,
|
|
20
20
|
renderInfo,
|
|
21
21
|
renderWarning
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-J3C7BGUW.js";
|
|
23
23
|
import {
|
|
24
24
|
init_cjs_shims
|
|
25
25
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -41,7 +41,15 @@ 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", EMPTY_CACHE_MESSAGE = "Cache is empty"
|
|
44
|
+
var URL = "https://cdn.shopify.com/static/cli/notifications.json", EMPTY_CACHE_MESSAGE = "Cache is empty", COMMANDS_TO_SKIP = [
|
|
45
|
+
"notifications:list",
|
|
46
|
+
"notifications:generate",
|
|
47
|
+
"init",
|
|
48
|
+
"app:init",
|
|
49
|
+
"theme:init",
|
|
50
|
+
"hydrogen:init",
|
|
51
|
+
"cache:clear"
|
|
52
|
+
];
|
|
45
53
|
function url() {
|
|
46
54
|
return process.env.SHOPIFY_CLI_NOTIFICATIONS_URL ?? URL;
|
|
47
55
|
}
|
|
@@ -65,22 +73,26 @@ var NotificationSchema = z.object({
|
|
|
65
73
|
}), NotificationsSchema = z.object({ notifications: z.array(NotificationSchema) });
|
|
66
74
|
async function showNotificationsIfNeeded(currentSurfaces, environment = process.env) {
|
|
67
75
|
try {
|
|
68
|
-
|
|
76
|
+
let commandId = getCurrentCommandId();
|
|
77
|
+
if (skipNotifications(commandId, environment) || jsonOutputEnabled(environment))
|
|
69
78
|
return;
|
|
70
|
-
let notifications = await getNotifications(),
|
|
79
|
+
let notifications = await getNotifications(), notificationsToShow = filterNotifications(notifications.notifications, commandId, currentSurfaces);
|
|
71
80
|
outputDebug(`Notifications to show: ${notificationsToShow.length}`), await renderNotifications(notificationsToShow);
|
|
72
81
|
} catch (error) {
|
|
82
|
+
if (error.message === EMPTY_CACHE_MESSAGE) {
|
|
83
|
+
outputDebug("Notifications to show: 0 (Cache is empty)");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
73
86
|
if (error.message === "abort")
|
|
74
87
|
throw new AbortSilentError();
|
|
75
|
-
let errorMessage = `Error
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
let { sendErrorToBugsnag } = await import("./error-handler-FV3FJ3VW.js");
|
|
88
|
+
let errorMessage = `Error showing notifications: ${error.message}`;
|
|
89
|
+
outputDebug(errorMessage);
|
|
90
|
+
let { sendErrorToBugsnag } = await import("./error-handler-WC4XSLZQ.js");
|
|
79
91
|
await sendErrorToBugsnag(errorMessage, "unexpected_error");
|
|
80
92
|
}
|
|
81
93
|
}
|
|
82
|
-
function skipNotifications(environment = process.env) {
|
|
83
|
-
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST);
|
|
94
|
+
function skipNotifications(currentCommand, environment = process.env) {
|
|
95
|
+
return isTruthy(environment.CI) || isTruthy(environment.SHOPIFY_UNIT_TEST) || COMMANDS_TO_SKIP.includes(currentCommand);
|
|
84
96
|
}
|
|
85
97
|
async function renderNotifications(notifications) {
|
|
86
98
|
notifications.slice(0, 2).forEach((notification) => {
|
|
@@ -113,8 +125,12 @@ async function getNotifications() {
|
|
|
113
125
|
return NotificationsSchema.parse(notifications);
|
|
114
126
|
}
|
|
115
127
|
async function fetchNotifications() {
|
|
116
|
-
outputDebug("Fetching
|
|
117
|
-
let response = await fetch(url(),
|
|
128
|
+
outputDebug("Fetching notifications...");
|
|
129
|
+
let response = await fetch(url(), void 0, {
|
|
130
|
+
useNetworkLevelRetry: !1,
|
|
131
|
+
useAbortSignal: !0,
|
|
132
|
+
timeoutMs: 3 * 1e3
|
|
133
|
+
});
|
|
118
134
|
if (response.status !== 200)
|
|
119
135
|
throw new Error(`Failed to fetch notifications: ${response.statusText}`);
|
|
120
136
|
let rawNotifications = await response.text(), notifications = JSON.parse(rawNotifications), result = NotificationsSchema.parse(notifications);
|
|
@@ -124,9 +140,9 @@ async function cacheNotifications(notifications) {
|
|
|
124
140
|
cacheStore(`notifications-${url()}`, notifications), outputDebug(`Notifications from ${url()} stored in the cache`);
|
|
125
141
|
}
|
|
126
142
|
function fetchNotificationsInBackground(currentCommand, argv = process.argv, environment = process.env) {
|
|
127
|
-
if (skipNotifications(environment))
|
|
143
|
+
if (skipNotifications(currentCommand, environment))
|
|
128
144
|
return;
|
|
129
|
-
let command = "shopify", args = ["notifications", "list"];
|
|
145
|
+
let command = "shopify", args = ["notifications", "list", "--ignore-errors"];
|
|
130
146
|
if (argv[0] && argv[0] !== "shopify") {
|
|
131
147
|
command = argv[0];
|
|
132
148
|
let indexValue = currentCommand.split(":")[0] ?? "", index = argv.indexOf(indexValue);
|
|
@@ -183,4 +199,4 @@ export {
|
|
|
183
199
|
fetchNotificationsInBackground,
|
|
184
200
|
stringifyFilters
|
|
185
201
|
};
|
|
186
|
-
//# sourceMappingURL=chunk-
|
|
202
|
+
//# sourceMappingURL=chunk-FJAIUBHO.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4BPRKRYD.js";
|
|
4
4
|
import {
|
|
5
5
|
mkdir,
|
|
6
6
|
outputInfo,
|
|
7
7
|
rmdir,
|
|
8
8
|
writeFile
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-J3C7BGUW.js";
|
|
10
10
|
import {
|
|
11
11
|
cwd,
|
|
12
12
|
joinPath
|
|
@@ -103,9 +103,12 @@ ${flagsDetails}
|
|
|
103
103
|
}
|
|
104
104
|
async function writeCommandUsageExampleFile(command, { fileName, commandName }) {
|
|
105
105
|
let usage = "", hasFlags = command.flags && Object.keys(command.flags).length > 0;
|
|
106
|
-
typeof command.usage == "string" ? usage = command.usage : Array.isArray(command.usage) ? usage = command.usage.join(`
|
|
106
|
+
typeof command.usage == "string" ? usage = prependShopify(command.usage) : Array.isArray(command.usage) ? usage = command.usage.map((usage2) => prependShopify(usage2)).join(`
|
|
107
107
|
|
|
108
|
-
`) : usage =
|
|
108
|
+
`) : usage = `${prependShopify(commandName)}${hasFlags ? " [flags]" : ""}`, await mkdir(`${docsPath}/examples`), await writeFile(`${docsPath}/examples/${fileName}.example.sh`, usage);
|
|
109
|
+
}
|
|
110
|
+
function prependShopify(command) {
|
|
111
|
+
return command.startsWith("shopify ") ? command : `shopify ${command}`;
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
export {
|
|
@@ -115,4 +118,4 @@ export {
|
|
|
115
118
|
writeCommandFlagInterface,
|
|
116
119
|
writeCommandUsageExampleFile
|
|
117
120
|
};
|
|
118
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-GPICPOCE.js.map
|