@shopify/cli 3.86.1 → 3.87.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 +2 -1
- package/dist/assets/dev-console/extensions/dev-console/assets/index-0hw3R_TS.css +1 -0
- package/dist/assets/dev-console/index.html +2 -2
- package/dist/{chunk-KCMYZRDH.js → chunk-23Q74MWH.js} +5 -5
- package/dist/{chunk-4WBTBFNC.js → chunk-2UUMQCBY.js} +4 -4
- package/dist/{chunk-GNW7DUJ5.js → chunk-4QID2NII.js} +2 -2
- package/dist/{chunk-SQNWVF3V.js → chunk-6AZR3EEJ.js} +2 -2
- package/dist/{chunk-UB7QY2VF.js → chunk-6LIAGQFX.js} +3 -3
- package/dist/{chunk-AAHIUMCI.js → chunk-76WLOUWP.js} +3 -3
- package/dist/{chunk-TDSRWKL2.js → chunk-7ZPVVRUW.js} +6 -6
- package/dist/{chunk-B7H344JI.js → chunk-CKTUCT5O.js} +115 -96
- package/dist/{chunk-HUR6MF6D.js → chunk-CXQE3TGJ.js} +8 -8
- package/dist/{chunk-A5RXDG36.js → chunk-EU2KBN47.js} +7 -7
- package/dist/chunk-EZQWZ57B.js +53 -0
- package/dist/{chunk-MZWHWEIR.js → chunk-F243634J.js} +2 -2
- package/dist/{chunk-4MSYMXAX.js → chunk-GPKHDSF5.js} +2 -2
- package/dist/{chunk-PBZI5MOK.js → chunk-GWTUHQYO.js} +60 -186
- package/dist/{chunk-YRJLM3MZ.js → chunk-H7NW53OX.js} +2 -2
- package/dist/{chunk-AM4QB5OM.js → chunk-HMDWNGIV.js} +100 -206
- package/dist/{chunk-K45JWD7H.js → chunk-ITSXRFLE.js} +24 -7
- package/dist/chunk-JDEWPBGH.js +80 -0
- package/dist/{chunk-NAPXIWWP.js → chunk-JOBZ2ZJ4.js} +6 -6
- package/dist/{chunk-J6JPAWCE.js → chunk-K4JH57B7.js} +2 -2
- package/dist/{chunk-IPWP4QG4.js → chunk-K6IFMHN3.js} +5 -5
- package/dist/{chunk-2WTSZOXI.js → chunk-KDVEMQGZ.js} +3 -3
- package/dist/{chunk-AXMPBUZL.js → chunk-KFQPNPET.js} +3 -3
- package/dist/{chunk-2LK4JXAI.js → chunk-KT66WYZX.js} +28 -16
- package/dist/{chunk-6FH6AJI5.js → chunk-KUJQ4AB6.js} +103 -2
- package/dist/{chunk-QZSPMSF2.js → chunk-LY3CTHXO.js} +18 -6
- package/dist/{chunk-6VIQUXXO.js → chunk-N77BK2FR.js} +2 -2
- package/dist/{chunk-RQD77XVF.js → chunk-NAE7XFUQ.js} +3 -3
- package/dist/{chunk-CZE7TCFI.js → chunk-NECMGZD4.js} +3 -3
- package/dist/{chunk-E7SRX5ME.js → chunk-O3BBUFCD.js} +4 -4
- package/dist/{chunk-PANEHHGV.js → chunk-OIHYAA4J.js} +21 -8
- package/dist/{chunk-52OB52S5.js → chunk-QDR4INV2.js} +5 -5
- package/dist/{chunk-PPM7JU6X.js → chunk-QTFNL7OD.js} +3 -3
- package/dist/{chunk-ZKG22PUU.js → chunk-R7WD7S7O.js} +4 -4
- package/dist/{chunk-VGDJLENI.js → chunk-SOTV4GZS.js} +3 -3
- package/dist/{chunk-X2YIODUW.js → chunk-VLBE545G.js} +15 -1237
- package/dist/{chunk-NOHJOQVR.js → chunk-W5QPQW34.js} +3 -3
- package/dist/{chunk-F2V6FX7R.js → chunk-WM77PTR2.js} +4 -4
- package/dist/{chunk-AU6C5SPW.js → chunk-YFIY3MUW.js} +8 -8
- package/dist/{chunk-J4HWHB57.js → chunk-YPKPNNA3.js} +3 -3
- package/dist/{chunk-YXTZTRRV.js → chunk-ZZV5YBHG.js} +4 -4
- package/dist/cli/commands/auth/login.js +15 -12
- package/dist/cli/commands/auth/login.test.js +17 -14
- package/dist/cli/commands/auth/logout.js +15 -12
- package/dist/cli/commands/auth/logout.test.js +17 -14
- package/dist/cli/commands/cache/clear.js +15 -12
- package/dist/cli/commands/debug/command-flags.js +15 -12
- package/dist/cli/commands/docs/generate.js +15 -12
- package/dist/cli/commands/docs/generate.test.js +16 -13
- package/dist/cli/commands/help.js +15 -12
- package/dist/cli/commands/kitchen-sink/async.js +16 -13
- package/dist/cli/commands/kitchen-sink/async.test.js +17 -14
- package/dist/cli/commands/kitchen-sink/index.js +18 -15
- package/dist/cli/commands/kitchen-sink/index.test.js +19 -16
- package/dist/cli/commands/kitchen-sink/prompts.js +16 -13
- package/dist/cli/commands/kitchen-sink/prompts.test.js +17 -14
- package/dist/cli/commands/kitchen-sink/static.js +16 -13
- package/dist/cli/commands/kitchen-sink/static.test.js +17 -14
- package/dist/cli/commands/notifications/generate.js +16 -13
- package/dist/cli/commands/notifications/list.js +16 -13
- package/dist/cli/commands/search.js +16 -13
- package/dist/cli/commands/upgrade.js +16 -13
- package/dist/cli/commands/upgrade.test.js +1 -1
- package/dist/cli/commands/version.js +16 -13
- package/dist/cli/commands/version.test.js +17 -14
- package/dist/cli/services/commands/notifications.js +11 -8
- package/dist/cli/services/commands/search.js +7 -4
- package/dist/cli/services/commands/search.test.js +8 -5
- package/dist/cli/services/commands/version.js +8 -5
- package/dist/cli/services/commands/version.test.js +10 -7
- package/dist/cli/services/kitchen-sink/async.js +7 -4
- package/dist/cli/services/kitchen-sink/prompts.js +7 -4
- package/dist/cli/services/kitchen-sink/static.js +7 -4
- package/dist/cli/services/upgrade.js +8 -5
- package/dist/cli/services/upgrade.test.js +10 -7
- package/dist/{custom-oclif-loader-IB5J422L.js → custom-oclif-loader-YCPEUXTV.js} +17 -10
- package/dist/{del-DIPVIUR3.js → del-E4LJOSMR.js} +6 -6
- package/dist/{error-handler-CU4DBAA4.js → error-handler-RCQ5H3D3.js} +13 -10
- package/dist/hooks/postrun.js +13 -71
- package/dist/hooks/prerun.js +12 -9
- package/dist/{http-proxy-node16-K5X7BUK5.js → http-proxy-node16-VGGP6PLA.js} +5 -5
- package/dist/index.js +2749 -1601
- package/dist/{lib-EMZRCLCJ.js → lib-G7Q5M6VX.js} +4 -3
- package/dist/{local-PYV7PNUD.js → local-7QIKYPL5.js} +7 -4
- package/dist/{magic-string.es-UZAAPNRE.js → magic-string.es-S5HKFBJX.js} +5 -6
- package/dist/{morph-EGK76SED.js → morph-37GC7LQM.js} +16 -20
- package/dist/{node-package-manager-BCGA26RH.js → node-package-manager-OLHLHWTL.js} +8 -5
- package/dist/{npa-LHT53SWR.js → npa-E675GQOI.js} +5 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-7POT36Q5.js → ui-GVWDQSOR.js} +7 -4
- package/dist/{workerd-UA5IB4IF.js → workerd-PYYL5AYY.js} +17 -16
- package/oclif.manifest.json +95 -127
- package/package.json +8 -8
- package/dist/assets/dev-console/extensions/dev-console/assets/index-BteeGmYf.css +0 -1
- package/dist/chunk-IWFYXDPH.js +0 -109
- /package/dist/assets/dev-console/extensions/dev-console/assets/{index-Cj8WCHlM.js → index-C12jKScn.js} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
errorHandler,
|
|
3
3
|
registerCleanBugsnagErrorsFromWithinPlugins
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YFIY3MUW.js";
|
|
5
5
|
import {
|
|
6
6
|
setCurrentCommandId,
|
|
7
7
|
showNotificationsIfNeeded
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-JOBZ2ZJ4.js";
|
|
9
9
|
import {
|
|
10
10
|
hashString
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OIHYAA4J.js";
|
|
12
12
|
import {
|
|
13
13
|
AbortError,
|
|
14
14
|
addPublicMetadata,
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
renderWarning,
|
|
25
25
|
terminalSupportsPrompting,
|
|
26
26
|
underscore
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-GWTUHQYO.js";
|
|
28
28
|
import {
|
|
29
29
|
require_lib
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VLBE545G.js";
|
|
31
31
|
import {
|
|
32
32
|
cwd
|
|
33
33
|
} from "./chunk-EG6MBBEN.js";
|
|
@@ -1564,7 +1564,7 @@ var import_core = __toESM(require_lib()), BaseCommand = class extends import_cor
|
|
|
1564
1564
|
return error.skipOclifErrorHandling = !0, await errorHandler(error, this.config), import_core.Errors.handle(error);
|
|
1565
1565
|
}
|
|
1566
1566
|
async init() {
|
|
1567
|
-
return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), isDevelopment() || await registerCleanBugsnagErrorsFromWithinPlugins(this.config), this.showNpmFlagWarning(), await showNotificationsIfNeeded(), super.init();
|
|
1567
|
+
return this.exitWithTimestampWhenEnvVariablePresent(), setCurrentCommandId(this.id ?? ""), isDevelopment() || await registerCleanBugsnagErrorsFromWithinPlugins(this.config), await removeDuplicatedPlugins(this.config), this.showNpmFlagWarning(), await showNotificationsIfNeeded(), super.init();
|
|
1568
1568
|
}
|
|
1569
1569
|
// NPM creates an environment variable for every flag passed to a script.
|
|
1570
1570
|
// This function checks for the presence of any of the available CLI flags
|
|
@@ -1683,6 +1683,23 @@ function argsFromEnvironment(environment, options, noDefaultsResult) {
|
|
|
1683
1683
|
function commandSupportsFlag(flags, flagName) {
|
|
1684
1684
|
return !!flags && Object.prototype.hasOwnProperty.call(flags, flagName);
|
|
1685
1685
|
}
|
|
1686
|
+
async function removeDuplicatedPlugins(config) {
|
|
1687
|
+
let plugins = Array.from(config.plugins.values()), bundlePlugins = ["@shopify/app", "@shopify/plugin-cloudflare"], pluginsToRemove = plugins.filter((plugin) => bundlePlugins.includes(plugin.name));
|
|
1688
|
+
if (pluginsToRemove.length > 0) {
|
|
1689
|
+
let commandsToRun = pluginsToRemove.map((plugin) => ` - shopify plugins remove ${plugin.name}`).join(`
|
|
1690
|
+
`);
|
|
1691
|
+
renderWarning({
|
|
1692
|
+
headline: `Unsupported plugins detected: ${pluginsToRemove.map((plugin) => plugin.name).join(", ")}`,
|
|
1693
|
+
body: [
|
|
1694
|
+
"They are already included in the CLI and installing them as custom plugins can cause conflicts.",
|
|
1695
|
+
`You can fix it by running:
|
|
1696
|
+
${commandsToRun}`
|
|
1697
|
+
]
|
|
1698
|
+
});
|
|
1699
|
+
}
|
|
1700
|
+
let filteredPlugins = plugins.filter((plugin) => !bundlePlugins.includes(plugin.name));
|
|
1701
|
+
config.plugins = new Map(filteredPlugins.map((plugin) => [plugin.name, plugin]));
|
|
1702
|
+
}
|
|
1686
1703
|
var base_command_default = BaseCommand;
|
|
1687
1704
|
|
|
1688
1705
|
export {
|
|
@@ -1692,4 +1709,4 @@ export {
|
|
|
1692
1709
|
noDefaultsOptions,
|
|
1693
1710
|
base_command_default
|
|
1694
1711
|
};
|
|
1695
|
-
//# sourceMappingURL=chunk-
|
|
1712
|
+
//# sourceMappingURL=chunk-ITSXRFLE.js.map
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
reportAnalyticsEvent
|
|
3
|
+
} from "./chunk-EU2KBN47.js";
|
|
4
|
+
import {
|
|
5
|
+
getNextDeprecationDate
|
|
6
|
+
} from "./chunk-KT66WYZX.js";
|
|
7
|
+
import {
|
|
8
|
+
addSensitiveMetadata,
|
|
9
|
+
getAllSensitiveMetadata,
|
|
10
|
+
outputDebug,
|
|
11
|
+
renderWarning
|
|
12
|
+
} from "./chunk-GWTUHQYO.js";
|
|
13
|
+
import {
|
|
14
|
+
init_cjs_shims
|
|
15
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
16
|
+
|
|
17
|
+
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
18
|
+
init_cjs_shims();
|
|
19
|
+
|
|
20
|
+
// ../cli-kit/dist/public/node/hooks/deprecations.js
|
|
21
|
+
init_cjs_shims();
|
|
22
|
+
var postrun = (Command) => {
|
|
23
|
+
let nextDeprecationDate = getNextDeprecationDate();
|
|
24
|
+
if (nextDeprecationDate) {
|
|
25
|
+
let forThemes = Command.id.includes("theme");
|
|
26
|
+
renderUpgradeWarning(nextDeprecationDate, forThemes);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
function renderUpgradeWarning(upgradeByDate, forThemes) {
|
|
30
|
+
let headline = `Upgrade to the latest CLI version by ${new Intl.DateTimeFormat("default", {
|
|
31
|
+
year: "numeric",
|
|
32
|
+
month: "long",
|
|
33
|
+
day: "numeric"
|
|
34
|
+
}).format(upgradeByDate)}.`;
|
|
35
|
+
renderWarning({
|
|
36
|
+
headline,
|
|
37
|
+
body: "This command requires an upgrade to continue working as intended.",
|
|
38
|
+
nextSteps: [["Run", { command: "upgrade" }, "to", {
|
|
39
|
+
link: {
|
|
40
|
+
label: "upgrade Shopify CLI",
|
|
41
|
+
url: forThemes ? "https://shopify.dev/docs/themes/tools/cli#upgrade-shopify-cli" : "https://shopify.dev/docs/apps/tools/cli#upgrade-shopify-cli"
|
|
42
|
+
}
|
|
43
|
+
}]]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ../cli-kit/dist/public/node/hooks/postrun.js
|
|
48
|
+
var postRunHookCompleted = !1;
|
|
49
|
+
function postRunHookHasCompleted() {
|
|
50
|
+
return postRunHookCompleted;
|
|
51
|
+
}
|
|
52
|
+
var hook = async ({ config, Command }) => {
|
|
53
|
+
await detectStopCommand(Command), await reportAnalyticsEvent({ config, exitMode: "ok" }), postrun(Command);
|
|
54
|
+
let command = Command.id.replace(/:/g, " ");
|
|
55
|
+
outputDebug(`Completed command ${command}`), postRunHookCompleted = !0;
|
|
56
|
+
};
|
|
57
|
+
async function detectStopCommand(commandClass) {
|
|
58
|
+
let currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
59
|
+
if (commandClass && Object.prototype.hasOwnProperty.call(commandClass, "analyticsStopCommand")) {
|
|
60
|
+
let stopCommand = commandClass.analyticsStopCommand();
|
|
61
|
+
if (stopCommand) {
|
|
62
|
+
let { commandStartOptions } = getAllSensitiveMetadata();
|
|
63
|
+
if (!commandStartOptions)
|
|
64
|
+
return;
|
|
65
|
+
await addSensitiveMetadata(() => ({
|
|
66
|
+
commandStartOptions: {
|
|
67
|
+
...commandStartOptions,
|
|
68
|
+
startTime: currentTime,
|
|
69
|
+
startCommand: stopCommand
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export {
|
|
77
|
+
postRunHookHasCompleted,
|
|
78
|
+
hook
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=chunk-JDEWPBGH.js.map
|
|
@@ -2,15 +2,15 @@ import {
|
|
|
2
2
|
fetch,
|
|
3
3
|
jsonOutputEnabled,
|
|
4
4
|
z
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OIHYAA4J.js";
|
|
6
6
|
import {
|
|
7
7
|
cacheRetrieve,
|
|
8
8
|
cacheStore,
|
|
9
9
|
versionSatisfies
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LY3CTHXO.js";
|
|
11
11
|
import {
|
|
12
12
|
CLI_KIT_VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-6AZR3EEJ.js";
|
|
14
14
|
import {
|
|
15
15
|
AbortSilentError,
|
|
16
16
|
exec,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
renderError,
|
|
20
20
|
renderInfo,
|
|
21
21
|
renderWarning
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GWTUHQYO.js";
|
|
23
23
|
import {
|
|
24
24
|
init_cjs_shims
|
|
25
25
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -87,7 +87,7 @@ async function showNotificationsIfNeeded(currentSurfaces, environment = process.
|
|
|
87
87
|
throw new AbortSilentError();
|
|
88
88
|
let errorMessage = `Error showing notifications: ${error.message}`;
|
|
89
89
|
outputDebug(errorMessage);
|
|
90
|
-
let { sendErrorToBugsnag } = await import("./error-handler-
|
|
90
|
+
let { sendErrorToBugsnag } = await import("./error-handler-RCQ5H3D3.js");
|
|
91
91
|
await sendErrorToBugsnag(errorMessage, "unexpected_error");
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -200,4 +200,4 @@ export {
|
|
|
200
200
|
fetchNotificationsInBackground,
|
|
201
201
|
stringifyFilters
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=chunk-
|
|
203
|
+
//# sourceMappingURL=chunk-JOBZ2ZJ4.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCollectedLogs,
|
|
3
3
|
collectedLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GWTUHQYO.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-K4JH57B7.js.map
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
fetchNotifications,
|
|
3
3
|
getNotifications,
|
|
4
4
|
stringifyFilters
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-JOBZ2ZJ4.js";
|
|
6
6
|
import {
|
|
7
7
|
randomUUID
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OIHYAA4J.js";
|
|
9
9
|
import {
|
|
10
10
|
CLI_KIT_VERSION
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6AZR3EEJ.js";
|
|
12
12
|
import {
|
|
13
13
|
outputInfo,
|
|
14
14
|
renderSelectPrompt,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
renderTable,
|
|
17
17
|
renderTextPrompt,
|
|
18
18
|
writeFile
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-GWTUHQYO.js";
|
|
20
20
|
import {
|
|
21
21
|
init_cjs_shims
|
|
22
22
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -103,4 +103,4 @@ export {
|
|
|
103
103
|
generate,
|
|
104
104
|
list
|
|
105
105
|
};
|
|
106
|
-
//# sourceMappingURL=chunk-
|
|
106
|
+
//# sourceMappingURL=chunk-K6IFMHN3.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
generate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K6IFMHN3.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ITSXRFLE.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var Generate = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
Generate
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-KDVEMQGZ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
prompts
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N77BK2FR.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ITSXRFLE.js";
|
|
7
7
|
import {
|
|
8
8
|
init_cjs_shims
|
|
9
9
|
} from "./chunk-PKR7KJ6P.js";
|
|
@@ -25,4 +25,4 @@ var KitchenSinkPrompts = class extends base_command_default {
|
|
|
25
25
|
export {
|
|
26
26
|
KitchenSinkPrompts
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-KFQPNPET.js.map
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
sanitizedHeadersOutput,
|
|
19
19
|
shopifyFetch,
|
|
20
20
|
z
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OIHYAA4J.js";
|
|
22
22
|
import {
|
|
23
23
|
cacheRetrieveOrRepopulate,
|
|
24
24
|
getCurrentSessionId,
|
|
@@ -30,10 +30,10 @@ import {
|
|
|
30
30
|
setCurrentSessionId,
|
|
31
31
|
setSessions,
|
|
32
32
|
timeIntervalToMilliseconds
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LY3CTHXO.js";
|
|
34
34
|
import {
|
|
35
35
|
CLI_KIT_VERSION
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-6AZR3EEJ.js";
|
|
37
37
|
import {
|
|
38
38
|
AbortError,
|
|
39
39
|
BugError,
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
sessionConstants,
|
|
97
97
|
stringifyMessage,
|
|
98
98
|
themeToken
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-GWTUHQYO.js";
|
|
100
100
|
import {
|
|
101
101
|
cwd
|
|
102
102
|
} from "./chunk-EG6MBBEN.js";
|
|
@@ -3672,11 +3672,18 @@ async function requestDeviceAuthorization(scopes) {
|
|
|
3672
3672
|
method: "POST",
|
|
3673
3673
|
headers: { "Content-type": "application/x-www-form-urlencoded" },
|
|
3674
3674
|
body: convertRequestToParams(queryParams)
|
|
3675
|
-
}),
|
|
3675
|
+
}), responseText;
|
|
3676
3676
|
try {
|
|
3677
|
-
|
|
3677
|
+
responseText = await response.text();
|
|
3678
3678
|
} catch {
|
|
3679
|
-
throw new BugError(
|
|
3679
|
+
throw new BugError(`Failed to read response from authorization service (HTTP ${response.status}). Network or streaming error occurred.`, "Check your network connection and try again.");
|
|
3680
|
+
}
|
|
3681
|
+
let jsonResult;
|
|
3682
|
+
try {
|
|
3683
|
+
jsonResult = JSON.parse(responseText);
|
|
3684
|
+
} catch {
|
|
3685
|
+
let errorMessage = buildAuthorizationParseErrorMessage(response, responseText);
|
|
3686
|
+
throw new BugError(errorMessage);
|
|
3680
3687
|
}
|
|
3681
3688
|
if (outputDebug(outputContent`Received device authorization code: ${outputToken.json(jsonResult)}`), !jsonResult.device_code || !jsonResult.verification_uri_complete)
|
|
3682
3689
|
throw new BugError("Failed to start authorization process");
|
|
@@ -3712,15 +3719,12 @@ async function pollForDeviceAuthorization(code, interval = 5) {
|
|
|
3712
3719
|
return;
|
|
3713
3720
|
}
|
|
3714
3721
|
case "slow_down":
|
|
3715
|
-
currentIntervalInSeconds += 5;
|
|
3716
|
-
|
|
3717
|
-
startPolling();
|
|
3718
|
-
return;
|
|
3719
|
-
}
|
|
3722
|
+
currentIntervalInSeconds += 5, startPolling();
|
|
3723
|
+
return;
|
|
3720
3724
|
case "access_denied":
|
|
3721
3725
|
case "expired_token":
|
|
3722
3726
|
case "unknown_failure":
|
|
3723
|
-
reject(
|
|
3727
|
+
reject(new Error(`Device authorization failed: ${error}`));
|
|
3724
3728
|
}
|
|
3725
3729
|
}, startPolling = () => {
|
|
3726
3730
|
setTimeout(onPoll, currentIntervalInSeconds * 1e3);
|
|
@@ -3731,6 +3735,10 @@ async function pollForDeviceAuthorization(code, interval = 5) {
|
|
|
3731
3735
|
function convertRequestToParams(queryParams) {
|
|
3732
3736
|
return Object.entries(queryParams).map(([key, value]) => value && `${key}=${value}`).filter((hasValue) => !!hasValue).join("&");
|
|
3733
3737
|
}
|
|
3738
|
+
function buildAuthorizationParseErrorMessage(response, responseText) {
|
|
3739
|
+
let errorMessage = `Received invalid response from authorization service (HTTP ${response.status}).`;
|
|
3740
|
+
return response.status >= 500 ? errorMessage += " The service may be experiencing issues." : response.status >= 400 && (errorMessage += " The request may be malformed or unauthorized."), responseText.trim().startsWith("<!DOCTYPE") || responseText.trim().startsWith("<html") ? errorMessage += " Received HTML instead of JSON - the service endpoint may have changed." : responseText.trim() === "" ? errorMessage += " Received empty response body." : errorMessage += " Response could not be parsed as valid JSON.", `${errorMessage} If this issue persists, please contact support at https://help.shopify.com`;
|
|
3741
|
+
}
|
|
3734
3742
|
|
|
3735
3743
|
// ../cli-kit/dist/private/node/api/rest.js
|
|
3736
3744
|
init_cjs_shims();
|
|
@@ -4421,7 +4429,7 @@ function tokenRequestErrorHandler({ error, store: store2 }) {
|
|
|
4421
4429
|
let invalidTargetErrorMessage = `You are not authorized to use the CLI to develop in the provided store${store2 ? `: ${store2}` : "."}`;
|
|
4422
4430
|
return error === "invalid_grant" ? new InvalidGrantError() : error === "invalid_request" ? new InvalidRequestError() : error === "invalid_target" ? new InvalidTargetError(invalidTargetErrorMessage, "", [
|
|
4423
4431
|
"Ensure you have logged in to the store using the Shopify admin at least once.",
|
|
4424
|
-
"Ensure you are the store owner, or have a staff account if you are attempting to log in to a
|
|
4432
|
+
"Ensure you are the store owner, or have a staff account if you are attempting to log in to a dev store.",
|
|
4425
4433
|
"Ensure you are using the permanent store domain, not a vanity domain."
|
|
4426
4434
|
]) : new AbortError(error);
|
|
4427
4435
|
}
|
|
@@ -4585,9 +4593,13 @@ async function getEnvironmentData(config) {
|
|
|
4585
4593
|
}
|
|
4586
4594
|
async function getSensitiveEnvironmentData(config) {
|
|
4587
4595
|
return {
|
|
4588
|
-
env_plugin_installed_all: JSON.stringify(getPluginNames(config))
|
|
4596
|
+
env_plugin_installed_all: JSON.stringify(getPluginNames(config)),
|
|
4597
|
+
env_shopify_variables: JSON.stringify(getShopifyEnvironmentVariables())
|
|
4589
4598
|
};
|
|
4590
4599
|
}
|
|
4600
|
+
function getShopifyEnvironmentVariables() {
|
|
4601
|
+
return Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith("SHOPIFY_")));
|
|
4602
|
+
}
|
|
4591
4603
|
function getPluginNames(config) {
|
|
4592
4604
|
return [...config.plugins.keys()].sort().filter((plugin) => !plugin.startsWith("@oclif/"));
|
|
4593
4605
|
}
|
|
@@ -4659,4 +4671,4 @@ export {
|
|
|
4659
4671
|
getEnvironmentData,
|
|
4660
4672
|
getSensitiveEnvironmentData
|
|
4661
4673
|
};
|
|
4662
|
-
//# sourceMappingURL=chunk-
|
|
4674
|
+
//# sourceMappingURL=chunk-KT66WYZX.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
require_balanced_match
|
|
3
|
+
} from "./chunk-XE5EOEBL.js";
|
|
1
4
|
import {
|
|
2
5
|
__commonJS,
|
|
3
6
|
__require,
|
|
@@ -1333,9 +1336,107 @@ var require_source_map_support = __commonJS({
|
|
|
1333
1336
|
}
|
|
1334
1337
|
});
|
|
1335
1338
|
|
|
1339
|
+
// ../../node_modules/.pnpm/brace-expansion@2.0.2/node_modules/brace-expansion/index.js
|
|
1340
|
+
var require_brace_expansion = __commonJS({
|
|
1341
|
+
"../../node_modules/.pnpm/brace-expansion@2.0.2/node_modules/brace-expansion/index.js"(exports, module) {
|
|
1342
|
+
init_cjs_shims();
|
|
1343
|
+
var balanced = require_balanced_match();
|
|
1344
|
+
module.exports = expandTop;
|
|
1345
|
+
var escSlash = "\0SLASH" + Math.random() + "\0", escOpen = "\0OPEN" + Math.random() + "\0", escClose = "\0CLOSE" + Math.random() + "\0", escComma = "\0COMMA" + Math.random() + "\0", escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
1346
|
+
function numeric(str) {
|
|
1347
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
1348
|
+
}
|
|
1349
|
+
function escapeBraces(str) {
|
|
1350
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
1351
|
+
}
|
|
1352
|
+
function unescapeBraces(str) {
|
|
1353
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
1354
|
+
}
|
|
1355
|
+
function parseCommaParts(str) {
|
|
1356
|
+
if (!str)
|
|
1357
|
+
return [""];
|
|
1358
|
+
var parts = [], m = balanced("{", "}", str);
|
|
1359
|
+
if (!m)
|
|
1360
|
+
return str.split(",");
|
|
1361
|
+
var pre = m.pre, body = m.body, post = m.post, p = pre.split(",");
|
|
1362
|
+
p[p.length - 1] += "{" + body + "}";
|
|
1363
|
+
var postParts = parseCommaParts(post);
|
|
1364
|
+
return post.length && (p[p.length - 1] += postParts.shift(), p.push.apply(p, postParts)), parts.push.apply(parts, p), parts;
|
|
1365
|
+
}
|
|
1366
|
+
function expandTop(str) {
|
|
1367
|
+
return str ? (str.substr(0, 2) === "{}" && (str = "\\{\\}" + str.substr(2)), expand(escapeBraces(str), !0).map(unescapeBraces)) : [];
|
|
1368
|
+
}
|
|
1369
|
+
function embrace(str) {
|
|
1370
|
+
return "{" + str + "}";
|
|
1371
|
+
}
|
|
1372
|
+
function isPadded(el) {
|
|
1373
|
+
return /^-?0\d/.test(el);
|
|
1374
|
+
}
|
|
1375
|
+
function lte(i, y) {
|
|
1376
|
+
return i <= y;
|
|
1377
|
+
}
|
|
1378
|
+
function gte(i, y) {
|
|
1379
|
+
return i >= y;
|
|
1380
|
+
}
|
|
1381
|
+
function expand(str, isTop) {
|
|
1382
|
+
var expansions = [], m = balanced("{", "}", str);
|
|
1383
|
+
if (!m) return [str];
|
|
1384
|
+
var pre = m.pre, post = m.post.length ? expand(m.post, !1) : [""];
|
|
1385
|
+
if (/\$$/.test(m.pre))
|
|
1386
|
+
for (var k = 0; k < post.length; k++) {
|
|
1387
|
+
var expansion = pre + "{" + m.body + "}" + post[k];
|
|
1388
|
+
expansions.push(expansion);
|
|
1389
|
+
}
|
|
1390
|
+
else {
|
|
1391
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body), isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body), isSequence = isNumericSequence || isAlphaSequence, isOptions = m.body.indexOf(",") >= 0;
|
|
1392
|
+
if (!isSequence && !isOptions)
|
|
1393
|
+
return m.post.match(/,(?!,).*\}/) ? (str = m.pre + "{" + m.body + escClose + m.post, expand(str)) : [str];
|
|
1394
|
+
var n;
|
|
1395
|
+
if (isSequence)
|
|
1396
|
+
n = m.body.split(/\.\./);
|
|
1397
|
+
else if (n = parseCommaParts(m.body), n.length === 1 && (n = expand(n[0], !1).map(embrace), n.length === 1))
|
|
1398
|
+
return post.map(function(p) {
|
|
1399
|
+
return m.pre + n[0] + p;
|
|
1400
|
+
});
|
|
1401
|
+
var N;
|
|
1402
|
+
if (isSequence) {
|
|
1403
|
+
var x = numeric(n[0]), y = numeric(n[1]), width = Math.max(n[0].length, n[1].length), incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1, test = lte, reverse = y < x;
|
|
1404
|
+
reverse && (incr *= -1, test = gte);
|
|
1405
|
+
var pad = n.some(isPadded);
|
|
1406
|
+
N = [];
|
|
1407
|
+
for (var i = x; test(i, y); i += incr) {
|
|
1408
|
+
var c;
|
|
1409
|
+
if (isAlphaSequence)
|
|
1410
|
+
c = String.fromCharCode(i), c === "\\" && (c = "");
|
|
1411
|
+
else if (c = String(i), pad) {
|
|
1412
|
+
var need = width - c.length;
|
|
1413
|
+
if (need > 0) {
|
|
1414
|
+
var z = new Array(need + 1).join("0");
|
|
1415
|
+
i < 0 ? c = "-" + z + c.slice(1) : c = z + c;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
N.push(c);
|
|
1419
|
+
}
|
|
1420
|
+
} else {
|
|
1421
|
+
N = [];
|
|
1422
|
+
for (var j = 0; j < n.length; j++)
|
|
1423
|
+
N.push.apply(N, expand(n[j], !1));
|
|
1424
|
+
}
|
|
1425
|
+
for (var j = 0; j < N.length; j++)
|
|
1426
|
+
for (var k = 0; k < post.length; k++) {
|
|
1427
|
+
var expansion = pre + N[j] + post[k];
|
|
1428
|
+
(!isTop || isSequence || expansion) && expansions.push(expansion);
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
return expansions;
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
});
|
|
1435
|
+
|
|
1336
1436
|
export {
|
|
1337
1437
|
require_source_map,
|
|
1338
1438
|
require_buffer_from,
|
|
1339
|
-
require_source_map_support
|
|
1439
|
+
require_source_map_support,
|
|
1440
|
+
require_brace_expansion
|
|
1340
1441
|
};
|
|
1341
|
-
//# sourceMappingURL=chunk-
|
|
1442
|
+
//# sourceMappingURL=chunk-KUJQ4AB6.js.map
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
runWithTimer,
|
|
21
21
|
unixFileIsOwnedByCurrentUser,
|
|
22
22
|
writeFile
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GWTUHQYO.js";
|
|
24
24
|
import {
|
|
25
25
|
require_semver
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-HMDWNGIV.js";
|
|
27
27
|
import {
|
|
28
28
|
dirname,
|
|
29
29
|
joinPath
|
|
@@ -9964,6 +9964,18 @@ async function runWithRateLimit(options, config = cliKitStore()) {
|
|
|
9964
9964
|
return config.set("cache", cache), !0;
|
|
9965
9965
|
}
|
|
9966
9966
|
|
|
9967
|
+
// ../cli-kit/dist/public/common/json.js
|
|
9968
|
+
init_cjs_shims();
|
|
9969
|
+
function parseJSON(jsonString, context) {
|
|
9970
|
+
try {
|
|
9971
|
+
return JSON.parse(jsonString);
|
|
9972
|
+
} catch (error) {
|
|
9973
|
+
let errorMessage = error instanceof Error ? error.message : String(error), contextMessage = context ? ` from ${context}` : "";
|
|
9974
|
+
throw new AbortError(`Failed to parse JSON${contextMessage}.
|
|
9975
|
+
${errorMessage}`);
|
|
9976
|
+
}
|
|
9977
|
+
}
|
|
9978
|
+
|
|
9967
9979
|
// ../../node_modules/.pnpm/latest-version@7.0.0/node_modules/latest-version/index.js
|
|
9968
9980
|
init_cjs_shims();
|
|
9969
9981
|
|
|
@@ -13708,7 +13720,7 @@ async function latestVersion(packageName, options) {
|
|
|
13708
13720
|
}
|
|
13709
13721
|
|
|
13710
13722
|
// ../cli-kit/dist/public/node/node-package-manager.js
|
|
13711
|
-
var import_semver3 = __toESM(require_semver()
|
|
13723
|
+
var import_semver3 = __toESM(require_semver()), yarnLockfile = "yarn.lock", npmLockfile = "package-lock.json", pnpmLockfile = "pnpm-lock.yaml", bunLockfile = "bun.lockb", pnpmWorkspaceFile = "pnpm-workspace.yaml", lockfiles = [yarnLockfile, pnpmLockfile, npmLockfile, bunLockfile], lockfilesByManager = {
|
|
13712
13724
|
yarn: yarnLockfile,
|
|
13713
13725
|
npm: npmLockfile,
|
|
13714
13726
|
pnpm: pnpmLockfile,
|
|
@@ -13811,7 +13823,7 @@ function versionSatisfies(version, requirements) {
|
|
|
13811
13823
|
async function readAndParsePackageJson(packageJsonPath) {
|
|
13812
13824
|
if (!await fileExists(packageJsonPath))
|
|
13813
13825
|
throw new PackageJsonNotFoundError(dirname(packageJsonPath));
|
|
13814
|
-
return
|
|
13826
|
+
return parseJSON(await readFile(packageJsonPath), packageJsonPath);
|
|
13815
13827
|
}
|
|
13816
13828
|
async function addNPMDependenciesIfNeeded(dependencies, options) {
|
|
13817
13829
|
outputDebug(outputContent`Adding the following dependencies if needed:
|
|
@@ -13918,7 +13930,7 @@ function argumentsToAddDependenciesWithBun(dependencies, type) {
|
|
|
13918
13930
|
async function findUpAndReadPackageJson(fromDirectory) {
|
|
13919
13931
|
let packageJsonPath = await findPathUp("package.json", { cwd: fromDirectory, type: "file" });
|
|
13920
13932
|
if (packageJsonPath) {
|
|
13921
|
-
let packageJson2 =
|
|
13933
|
+
let packageJson2 = parseJSON(await readFile(packageJsonPath), packageJsonPath);
|
|
13922
13934
|
return { path: packageJsonPath, content: packageJson2 };
|
|
13923
13935
|
} else
|
|
13924
13936
|
throw new FindUpAndReadPackageJsonNotFoundError(fromDirectory);
|
|
@@ -14023,4 +14035,4 @@ deep-extend/lib/deep-extend.js:
|
|
|
14023
14035
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
14024
14036
|
*)
|
|
14025
14037
|
*/
|
|
14026
|
-
//# sourceMappingURL=chunk-
|
|
14038
|
+
//# sourceMappingURL=chunk-LY3CTHXO.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
renderDangerousConfirmationPrompt,
|
|
6
6
|
renderSelectPrompt,
|
|
7
7
|
renderTextPrompt
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GWTUHQYO.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-N77BK2FR.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
base_command_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ITSXRFLE.js";
|
|
4
4
|
import {
|
|
5
5
|
require_lib
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VLBE545G.js";
|
|
7
7
|
import {
|
|
8
8
|
__toESM,
|
|
9
9
|
init_cjs_shims
|
|
@@ -46,4 +46,4 @@ var HelpCommand = class _HelpCommand extends base_command_default {
|
|
|
46
46
|
export {
|
|
47
47
|
HelpCommand
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-NAE7XFUQ.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asyncTasks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F243634J.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ITSXRFLE.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-NECMGZD4.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
searchService
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4QID2NII.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ITSXRFLE.js";
|
|
7
7
|
import {
|
|
8
8
|
require_lib
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VLBE545G.js";
|
|
10
10
|
import {
|
|
11
11
|
__toESM,
|
|
12
12
|
init_cjs_shims
|
|
@@ -48,4 +48,4 @@ var import_core = __toESM(require_lib(), 1), Search = class _Search extends base
|
|
|
48
48
|
export {
|
|
49
49
|
Search
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-O3BBUFCD.js.map
|