@shopify/cli 3.90.0 → 3.91.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/{acorn-45LE5Z2A.js → acorn-WDTBS4B3.js} +2 -2
- package/dist/{angular-Z5FPQPLR.js → angular-WLPEGHXZ.js} +4 -4
- package/dist/{babel-TRRZ6QQY.js → babel-LQYCV4NA.js} +2 -7
- package/dist/{brotli-2OKV26Y6.js → brotli-6CC7WD4Z.js} +1 -2
- package/dist/{chunk-XUHEOC7Y.js → chunk-2QLHWTH2.js} +6 -6
- package/dist/{chunk-LSGITB3O.js → chunk-3FISNISV.js} +5 -5
- package/dist/{chunk-HVSHUE2B.js → chunk-3RC2RKM3.js} +7 -7
- package/dist/{chunk-WC5EDB4Z.js → chunk-3YEPOXGM.js} +1187 -141
- package/dist/{chunk-ELXP2SNA.js → chunk-46PV2PEO.js} +4 -4
- package/dist/{chunk-QHDQYVAG.js → chunk-4EIIOMWN.js} +10 -10
- package/dist/{chunk-LKMGT2DW.js → chunk-4GAP37VN.js} +413 -383
- package/dist/{chunk-SE3EASHO.js → chunk-4IW7EFIM.js} +8 -27
- package/dist/{chunk-RYFPG44L.js → chunk-4KL3Z7UE.js} +2 -2
- package/dist/{chunk-EFOOQV72.js → chunk-56ELYGPH.js} +2 -2
- package/dist/chunk-5Q3T5CKP.js +39 -0
- package/dist/{chunk-5MLYI7UO.js → chunk-5TQLC3MT.js} +4 -4
- package/dist/chunk-5WZHH7DV.js +78 -0
- package/dist/chunk-6GVXTMUE.js +51 -0
- package/dist/{chunk-6ONJEX7Y.js → chunk-6NVYATES.js} +2 -2
- package/dist/chunk-6ZPH3IB4.js +28 -0
- package/dist/chunk-7A3EOLZ3.js +36 -0
- package/dist/{chunk-HMDWNGIV.js → chunk-A27P5CF7.js} +211 -103
- package/dist/{chunk-A7QWFDBY.js → chunk-A3FTU763.js} +2 -2
- package/dist/{chunk-MZX7G4LN.js → chunk-AWEC4VY2.js} +3 -3
- package/dist/{chunk-B2EZE3X5.js → chunk-BWQRWTAL.js} +3 -3
- package/dist/{chunk-3GXB4ZRP.js → chunk-CE4S2SGM.js} +10 -10
- package/dist/{chunk-U52M2SBG.js → chunk-D6TSY7WA.js} +216 -268
- package/dist/{chunk-UISDI2NJ.js → chunk-EGPAAR43.js} +3 -3
- package/dist/{chunk-L5BSIB4A.js → chunk-FI5G3SH7.js} +3 -3
- package/dist/{chunk-5OJ67VLD.js → chunk-GQKM6ODQ.js} +27763 -25681
- package/dist/{chunk-GPKHDSF5.js → chunk-HTGTTXQL.js} +24 -26
- package/dist/chunk-ITTNM7I4.js +23 -0
- package/dist/{chunk-O74JPOMN.js → chunk-ITUVFZZC.js} +6 -6
- package/dist/{chunk-6DIWINGB.js → chunk-JUTE5JAV.js} +3 -3
- package/dist/{chunk-3OKBQXPB.js → chunk-L55THCJ4.js} +5 -5
- package/dist/{chunk-AJVHCUVQ.js → chunk-LZQNLT7K.js} +4 -4
- package/dist/{chunk-R2VQQFNU.js → chunk-M5QR2TOD.js} +2 -2
- package/dist/{chunk-3AY5VBOI.js → chunk-MK3Q63EP.js} +15 -17
- package/dist/{chunk-66SSN4NK.js → chunk-QFZNYYRR.js} +2 -2
- package/dist/{chunk-ERCZ3NEG.js → chunk-RDV4E6WO.js} +2 -2
- package/dist/{chunk-ITXKKYMN.js → chunk-S2AX7DX2.js} +3 -3
- package/dist/{chunk-GH4DMIMI.js → chunk-TZEIYSCL.js} +3 -3
- package/dist/{chunk-XD3LXUGW.js → chunk-VBBBCVMH.js} +2 -2
- package/dist/{chunk-K2EOH7QQ.js → chunk-W5PA3XSC.js} +3 -3
- package/dist/{chunk-FPXVU77M.js → chunk-Y5U7QY26.js} +3 -3
- package/dist/chunk-YE3PUNUK.js +90 -0
- package/dist/{chunk-4K7TRR4V.js → chunk-YFNAWLQZ.js} +3 -3
- package/dist/chunk-YNNKYQTJ.js +309 -0
- package/dist/{chunk-GY37RRX5.js → chunk-YWLTM6FY.js} +4 -4
- package/dist/{chunk-A2DCUFP3.js → chunk-ZSOI4JOG.js} +2 -2
- package/dist/{chunk-BDQNCT7P.js → chunk-ZUHIUKPT.js} +3 -3
- package/dist/cli/commands/auth/login.js +13 -15
- package/dist/cli/commands/auth/login.test.js +15 -17
- package/dist/cli/commands/auth/logout.js +13 -15
- package/dist/cli/commands/auth/logout.test.js +16 -18
- package/dist/cli/commands/cache/clear.js +14 -15
- package/dist/cli/commands/debug/command-flags.js +13 -15
- package/dist/cli/commands/docs/generate.js +13 -15
- package/dist/cli/commands/docs/generate.test.js +14 -16
- package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
- package/dist/cli/commands/doctor-release/doctor-release.js +27 -0
- package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
- package/dist/cli/commands/doctor-release/theme/index.js +33 -0
- package/dist/cli/commands/help.js +13 -15
- package/dist/cli/commands/kitchen-sink/async.js +14 -16
- package/dist/cli/commands/kitchen-sink/async.test.js +15 -17
- package/dist/cli/commands/kitchen-sink/index.js +16 -18
- package/dist/cli/commands/kitchen-sink/index.test.js +19 -21
- package/dist/cli/commands/kitchen-sink/prompts.js +14 -16
- package/dist/cli/commands/kitchen-sink/prompts.test.js +15 -17
- package/dist/cli/commands/kitchen-sink/static.js +14 -16
- package/dist/cli/commands/kitchen-sink/static.test.js +15 -17
- package/dist/cli/commands/notifications/generate.js +14 -16
- package/dist/cli/commands/notifications/list.js +14 -16
- package/dist/cli/commands/search.js +14 -16
- package/dist/cli/commands/upgrade.js +14 -16
- package/dist/cli/commands/upgrade.test.js +1 -1
- package/dist/cli/commands/version.js +14 -16
- package/dist/cli/commands/version.test.js +15 -17
- package/dist/cli/services/commands/notifications.js +13 -13
- package/dist/cli/services/commands/search.js +7 -8
- package/dist/cli/services/commands/search.test.js +8 -9
- package/dist/cli/services/commands/version.js +8 -9
- package/dist/cli/services/commands/version.test.js +10 -11
- package/dist/cli/services/doctor-release/context.d.ts +16 -0
- package/dist/cli/services/doctor-release/context.js +9 -0
- package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
- package/dist/cli/services/doctor-release/theme/runner.js +24 -0
- package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
- package/dist/cli/services/doctor-release/theme/tests/init.js +21 -0
- package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
- package/dist/cli/services/doctor-release/theme/tests/push.js +21 -0
- package/dist/cli/services/kitchen-sink/async.js +7 -8
- package/dist/cli/services/kitchen-sink/prompts.js +7 -8
- package/dist/cli/services/kitchen-sink/static.js +7 -8
- package/dist/cli/services/upgrade.js +8 -9
- package/dist/cli/services/upgrade.test.js +10 -11
- package/dist/{custom-oclif-loader-H4CDTFND.js → custom-oclif-loader-NCJY2PN7.js} +7 -8
- package/dist/{del-E4LJOSMR.js → del-63DSU6FP.js} +7 -7
- package/dist/{devtools-D47L6HIC.js → devtools-4MXU7BNJ.js} +2 -2
- package/dist/{devtools-2SG3BFWJ.js → devtools-BAOTGU3O.js} +2 -2
- package/dist/{error-handler-JLUD7HQX.js → error-handler-IXWAFENZ.js} +11 -13
- package/dist/{estree-PY6WKTNG.js → estree-U57GTUKI.js} +14 -35
- package/dist/{flow-YN54TSCB.js → flow-CBPGBIW5.js} +2 -4
- package/dist/{glimmer-RMPUUUDS.js → glimmer-VWCK7UCR.js} +2 -6
- package/dist/{graphql-PPLVYWBL.js → graphql-2HHXB4VZ.js} +3 -5
- package/dist/hooks/postrun.js +12 -12
- package/dist/hooks/prerun.js +13 -13
- package/dist/{html-3U6QZZZ4.js → html-ST4I6M3K.js} +4 -6
- package/dist/index.js +5853 -2950
- package/dist/{lib-XGN4IWQ3.js → lib-EAXRR46C.js} +2 -3
- package/dist/{local-Q5P3JTHB.js → local-TYNIF77M.js} +9 -10
- package/dist/{markdown-RHRQTUMC.js → markdown-NVTT3U3H.js} +4 -13
- package/dist/{meriyah-7MIMHTWQ.js → meriyah-H6RUUN2F.js} +2 -9
- package/dist/{morph-37GC7LQM.js → morph-WMDG66QN.js} +68 -143
- package/dist/{multipart-parser-IYYNISJK.js → multipart-parser-WKKMXACL.js} +2 -2
- package/dist/{node-package-manager-JQCYAVNE.js → node-package-manager-XAEBCALT.js} +8 -9
- package/dist/{npa-E675GQOI.js → npa-GRSJKUWS.js} +5 -7
- package/dist/{postcss-MSOPGY7M.js → postcss-LKRKUSYR.js} +4 -6
- package/dist/{prettier-2ITB6I34.js → prettier-YOC7I4QS.js} +29 -29
- package/dist/{source-map-UFUVQCYE.js → source-map-KSW2YKNC.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/{ui-2P2WEBXY.js → ui-FDJIH2AF.js} +7 -8
- package/dist/{workerd-5QLA2QUA.js → workerd-DSSWQ3UN.js} +16 -18
- package/dist/{yaml-6GALFXQY.js → yaml-54MHMX7H.js} +6 -9
- package/oclif.manifest.json +134 -9
- package/package.json +7 -7
- package/dist/chunk-6OAKJOUE.js +0 -2238
- package/dist/chunk-EZQWZ57B.js +0 -53
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
base_command_default
|
|
3
|
-
} from "./chunk-3AY5VBOI.js";
|
|
4
1
|
import {
|
|
5
2
|
cacheClear
|
|
6
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4EIIOMWN.js";
|
|
7
4
|
import {
|
|
8
5
|
environmentVariables,
|
|
9
6
|
isTruthy
|
|
10
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4GAP37VN.js";
|
|
11
8
|
import {
|
|
12
9
|
require_lib
|
|
13
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-3YEPOXGM.js";
|
|
14
11
|
import {
|
|
15
12
|
__toESM,
|
|
16
13
|
init_cjs_shims
|
|
17
14
|
} from "./chunk-PKR7KJ6P.js";
|
|
18
15
|
|
|
19
|
-
// src/cli/commands/cache/clear.ts
|
|
20
|
-
init_cjs_shims();
|
|
21
|
-
|
|
22
16
|
// ../cli-kit/dist/public/node/cli.js
|
|
23
17
|
init_cjs_shims();
|
|
24
18
|
|
|
@@ -26,7 +20,7 @@ init_cjs_shims();
|
|
|
26
20
|
init_cjs_shims();
|
|
27
21
|
import { fileURLToPath } from "node:url";
|
|
28
22
|
async function launchCLI(options) {
|
|
29
|
-
let { errorHandler } = await import("./error-handler-
|
|
23
|
+
let { errorHandler } = await import("./error-handler-IXWAFENZ.js"), { isDevelopment } = await import("./local-TYNIF77M.js"), oclif = await import("./lib-EAXRR46C.js"), { ShopifyConfig } = await import("./custom-oclif-loader-NCJY2PN7.js");
|
|
30
24
|
isDevelopment() && (oclif.default.settings.debug = !0);
|
|
31
25
|
try {
|
|
32
26
|
let config = new ShopifyConfig({ root: fileURLToPath(options.moduleURL) });
|
|
@@ -41,7 +35,7 @@ var import_core = __toESM(require_lib());
|
|
|
41
35
|
async function exitIfOldNodeVersion(versions = process.versions) {
|
|
42
36
|
let nodeVersion = versions.node, nodeMajorVersion = Number(nodeVersion.split(".")[0]);
|
|
43
37
|
if (nodeMajorVersion < 18) {
|
|
44
|
-
let { renderError } = await import("./ui-
|
|
38
|
+
let { renderError } = await import("./ui-FDJIH2AF.js");
|
|
45
39
|
renderError({
|
|
46
40
|
headline: "Upgrade to a supported Node version now.",
|
|
47
41
|
body: [
|
|
@@ -68,7 +62,7 @@ async function runCLI(options, launchCLI2 = launchCLI, argv = process.argv, env
|
|
|
68
62
|
return setupEnvironmentVariables(options, argv, env), options.runInCreateMode && await addInitToArgvWhenRunningCreateCLI(options, argv), forceNoColor(argv, env), await exitIfOldNodeVersion(versions), launchCLI2({ moduleURL: options.moduleURL });
|
|
69
63
|
}
|
|
70
64
|
async function addInitToArgvWhenRunningCreateCLI(options, argv = process.argv) {
|
|
71
|
-
let { findUpAndReadPackageJson } = await import("./node-package-manager-
|
|
65
|
+
let { findUpAndReadPackageJson } = await import("./node-package-manager-XAEBCALT.js"), { moduleDirectory } = await import("./path-GB4VIEM6.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
|
|
72
66
|
if (argv.findIndex((arg) => arg.includes("init")) === -1) {
|
|
73
67
|
let initIndex2 = argv.findIndex((arg) => arg.match(new RegExp(`bin(\\/|\\\\)+(create-${name}|dev|run)`))) + 1;
|
|
74
68
|
argv.splice(initIndex2, 0, "init");
|
|
@@ -98,23 +92,10 @@ function clearCache() {
|
|
|
98
92
|
cacheClear();
|
|
99
93
|
}
|
|
100
94
|
|
|
101
|
-
// src/cli/commands/cache/clear.ts
|
|
102
|
-
var ClearCache = class extends base_command_default {
|
|
103
|
-
static {
|
|
104
|
-
this.description = "Clear the CLI cache, used to store some API responses and handle notifications status";
|
|
105
|
-
}
|
|
106
|
-
static {
|
|
107
|
-
this.hidden = !0;
|
|
108
|
-
}
|
|
109
|
-
async run() {
|
|
110
|
-
clearCache();
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
|
|
114
95
|
export {
|
|
115
96
|
runCLI,
|
|
116
97
|
globalFlags,
|
|
117
98
|
jsonFlag,
|
|
118
|
-
|
|
99
|
+
clearCache
|
|
119
100
|
};
|
|
120
|
-
//# sourceMappingURL=chunk-
|
|
101
|
+
//# sourceMappingURL=chunk-4IW7EFIM.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCollectedLogs,
|
|
3
3
|
collectedLogs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4GAP37VN.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-4KL3Z7UE.js.map
|
|
@@ -110,7 +110,7 @@ var require_ignore = __commonJS({
|
|
|
110
110
|
return Array.isArray(subject) ? subject : [subject];
|
|
111
111
|
}
|
|
112
112
|
var EMPTY = "", SPACE = " ", ESCAPE = "\\", REGEX_TEST_BLANK_LINE = /^\s+$/, REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/, REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/, REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/, REGEX_SPLITALL_CRLF = /\r?\n/g, REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/, SLASH = "/", TMP_KEY_IGNORE = "node-ignore";
|
|
113
|
-
typeof Symbol < "u" && (TMP_KEY_IGNORE = Symbol.for("node-ignore"));
|
|
113
|
+
typeof Symbol < "u" && (TMP_KEY_IGNORE = /* @__PURE__ */ Symbol.for("node-ignore"));
|
|
114
114
|
var KEY_IGNORE = TMP_KEY_IGNORE, define = (object, key, value) => Object.defineProperty(object, key, { value }), REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g, RETURN_FALSE = () => !1, sanitizeRange = (range) => range.replace(
|
|
115
115
|
REGEX_REGEXP_RANGE,
|
|
116
116
|
(match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY
|
|
@@ -598,4 +598,4 @@ export {
|
|
|
598
598
|
require_slash,
|
|
599
599
|
require_globby
|
|
600
600
|
};
|
|
601
|
-
//# sourceMappingURL=chunk-
|
|
601
|
+
//# sourceMappingURL=chunk-56ELYGPH.js.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
base_command_default
|
|
3
|
+
} from "./chunk-MK3Q63EP.js";
|
|
4
|
+
import {
|
|
5
|
+
canRunDoctorRelease,
|
|
6
|
+
renderInfo
|
|
7
|
+
} from "./chunk-4GAP37VN.js";
|
|
8
|
+
import {
|
|
9
|
+
init_cjs_shims
|
|
10
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
11
|
+
|
|
12
|
+
// src/cli/commands/doctor-release/doctor-release.ts
|
|
13
|
+
init_cjs_shims();
|
|
14
|
+
var DoctorRelease = class extends base_command_default {
|
|
15
|
+
static {
|
|
16
|
+
this.description = "Run CLI doctor-release tests";
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.hidden = !0;
|
|
20
|
+
}
|
|
21
|
+
async run() {
|
|
22
|
+
canRunDoctorRelease() && renderInfo({
|
|
23
|
+
headline: "Shopify CLI Doctor Release.",
|
|
24
|
+
body: [
|
|
25
|
+
"Available doctor-release commands:",
|
|
26
|
+
"",
|
|
27
|
+
" shopify doctor-release theme -e <environment> Run all theme command tests",
|
|
28
|
+
"",
|
|
29
|
+
"The -e/--environment flag is required to specify the store configuration.",
|
|
30
|
+
"Use --help with any command for more options."
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
DoctorRelease
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chunk-5Q3T5CKP.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
cliInstallCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Y5U7QY26.js";
|
|
4
4
|
import {
|
|
5
5
|
base_command_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MK3Q63EP.js";
|
|
7
7
|
import {
|
|
8
8
|
renderInfo
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-4GAP37VN.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-5TQLC3MT.js.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import {
|
|
2
|
+
runThemeDoctor
|
|
3
|
+
} from "./chunk-YE3PUNUK.js";
|
|
4
|
+
import {
|
|
5
|
+
globalFlags
|
|
6
|
+
} from "./chunk-4IW7EFIM.js";
|
|
7
|
+
import {
|
|
8
|
+
base_command_default
|
|
9
|
+
} from "./chunk-MK3Q63EP.js";
|
|
10
|
+
import {
|
|
11
|
+
canRunDoctorRelease
|
|
12
|
+
} from "./chunk-4GAP37VN.js";
|
|
13
|
+
import {
|
|
14
|
+
require_lib
|
|
15
|
+
} from "./chunk-3YEPOXGM.js";
|
|
16
|
+
import {
|
|
17
|
+
cwd,
|
|
18
|
+
resolvePath
|
|
19
|
+
} from "./chunk-EG6MBBEN.js";
|
|
20
|
+
import {
|
|
21
|
+
__toESM,
|
|
22
|
+
init_cjs_shims
|
|
23
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
24
|
+
|
|
25
|
+
// src/cli/commands/doctor-release/theme/index.ts
|
|
26
|
+
init_cjs_shims();
|
|
27
|
+
var import_core = __toESM(require_lib(), 1);
|
|
28
|
+
var DoctorReleaseTheme = class _DoctorReleaseTheme extends base_command_default {
|
|
29
|
+
static {
|
|
30
|
+
this.description = "Run all theme command doctor-release tests";
|
|
31
|
+
}
|
|
32
|
+
static {
|
|
33
|
+
this.hidden = !0;
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.flags = {
|
|
37
|
+
...globalFlags,
|
|
38
|
+
path: import_core.Flags.string({
|
|
39
|
+
char: "p",
|
|
40
|
+
description: "The path to run tests in. Defaults to current directory.",
|
|
41
|
+
env: "SHOPIFY_FLAG_PATH",
|
|
42
|
+
parse: async (input) => resolvePath(input),
|
|
43
|
+
default: async () => cwd()
|
|
44
|
+
}),
|
|
45
|
+
environment: import_core.Flags.string({
|
|
46
|
+
char: "e",
|
|
47
|
+
description: "The environment to use from shopify.theme.toml (required for store-connected tests).",
|
|
48
|
+
env: "SHOPIFY_FLAG_ENVIRONMENT",
|
|
49
|
+
required: !0
|
|
50
|
+
}),
|
|
51
|
+
store: import_core.Flags.string({
|
|
52
|
+
char: "s",
|
|
53
|
+
description: "Store URL (overrides environment).",
|
|
54
|
+
env: "SHOPIFY_FLAG_STORE"
|
|
55
|
+
}),
|
|
56
|
+
password: import_core.Flags.string({
|
|
57
|
+
description: "Password from Theme Access app (overrides environment).",
|
|
58
|
+
env: "SHOPIFY_FLAG_PASSWORD"
|
|
59
|
+
})
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
async run() {
|
|
63
|
+
if (!canRunDoctorRelease())
|
|
64
|
+
return;
|
|
65
|
+
let { flags } = await this.parse(_DoctorReleaseTheme);
|
|
66
|
+
(await runThemeDoctor({
|
|
67
|
+
path: flags.path,
|
|
68
|
+
environment: flags.environment,
|
|
69
|
+
store: flags.store,
|
|
70
|
+
password: flags.password
|
|
71
|
+
})).some((result) => result.status === "failed") && (process.exitCode = 1);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
DoctorReleaseTheme
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=chunk-5WZHH7DV.js.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DoctorSuite
|
|
3
|
+
} from "./chunk-YNNKYQTJ.js";
|
|
4
|
+
import {
|
|
5
|
+
getRandomName
|
|
6
|
+
} from "./chunk-4GAP37VN.js";
|
|
7
|
+
import {
|
|
8
|
+
joinPath
|
|
9
|
+
} from "./chunk-EG6MBBEN.js";
|
|
10
|
+
import {
|
|
11
|
+
init_cjs_shims
|
|
12
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
13
|
+
|
|
14
|
+
// src/cli/services/doctor-release/theme/tests/init.ts
|
|
15
|
+
init_cjs_shims();
|
|
16
|
+
var ThemeInitTests = class extends DoctorSuite {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.themeName = "";
|
|
20
|
+
this.themePath = "";
|
|
21
|
+
}
|
|
22
|
+
static {
|
|
23
|
+
this.description = "Tests the theme init command creates a valid theme structure";
|
|
24
|
+
}
|
|
25
|
+
tests() {
|
|
26
|
+
this.test("init creates theme directory", async () => {
|
|
27
|
+
this.themeName = `doctor-theme-${getRandomName("creative")}`, this.themePath = joinPath(this.context.workingDirectory, this.themeName);
|
|
28
|
+
let result = await this.runInteractive(
|
|
29
|
+
`shopify theme init ${this.themeName} --path ${this.context.workingDirectory}`
|
|
30
|
+
);
|
|
31
|
+
this.assertSuccess(result), this.context.themeName = this.themeName, this.context.themePath = this.themePath;
|
|
32
|
+
}), this.test("essential theme files exist", async () => {
|
|
33
|
+
let essentialFiles = ["layout/theme.liquid", "config/settings_schema.json", "templates/index.json"];
|
|
34
|
+
await Promise.all(essentialFiles.map((file) => this.assertFile(joinPath(this.themePath, file))));
|
|
35
|
+
}), this.test("theme directories exist", async () => {
|
|
36
|
+
let directories = ["sections", "snippets", "assets", "locales"];
|
|
37
|
+
await Promise.all(directories.map((dir) => this.assertDirectory(joinPath(this.themePath, dir))));
|
|
38
|
+
}), this.test("layout/theme.liquid has valid content", async () => {
|
|
39
|
+
await this.assertFile(
|
|
40
|
+
joinPath(this.themePath, "layout/theme.liquid"),
|
|
41
|
+
/<!doctype html>|<html|{{ content_for_header }}/i,
|
|
42
|
+
"layout/theme.liquid contains expected Liquid markup"
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export {
|
|
49
|
+
ThemeInitTests
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=chunk-6GVXTMUE.js.map
|
|
@@ -288,7 +288,7 @@ var require_graceful_fs = __commonJS({
|
|
|
288
288
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
|
|
289
289
|
init_cjs_shims();
|
|
290
290
|
var fs = __require("fs"), polyfills = require_polyfills(), legacy = require_legacy_streams(), clone = require_clone(), util = __require("util"), gracefulQueue, previousSymbol;
|
|
291
|
-
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = Symbol.for("graceful-fs.queue"), previousSymbol = Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
|
|
291
|
+
typeof Symbol == "function" && typeof Symbol.for == "function" ? (gracefulQueue = /* @__PURE__ */ Symbol.for("graceful-fs.queue"), previousSymbol = /* @__PURE__ */ Symbol.for("graceful-fs.previous")) : (gracefulQueue = "___graceful-fs.queue", previousSymbol = "___graceful-fs.previous");
|
|
292
292
|
function noop() {
|
|
293
293
|
}
|
|
294
294
|
function publishQueue(context, queue2) {
|
|
@@ -517,4 +517,4 @@ GFS4: `), console.error(m);
|
|
|
517
517
|
export {
|
|
518
518
|
require_graceful_fs
|
|
519
519
|
};
|
|
520
|
-
//# sourceMappingURL=chunk-
|
|
520
|
+
//# sourceMappingURL=chunk-6NVYATES.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
clearCache
|
|
3
|
+
} from "./chunk-4IW7EFIM.js";
|
|
4
|
+
import {
|
|
5
|
+
base_command_default
|
|
6
|
+
} from "./chunk-MK3Q63EP.js";
|
|
7
|
+
import {
|
|
8
|
+
init_cjs_shims
|
|
9
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
10
|
+
|
|
11
|
+
// src/cli/commands/cache/clear.ts
|
|
12
|
+
init_cjs_shims();
|
|
13
|
+
var ClearCache = class extends base_command_default {
|
|
14
|
+
static {
|
|
15
|
+
this.description = "Clear the CLI cache, used to store some API responses and handle notifications status";
|
|
16
|
+
}
|
|
17
|
+
static {
|
|
18
|
+
this.hidden = !0;
|
|
19
|
+
}
|
|
20
|
+
async run() {
|
|
21
|
+
clearCache();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export {
|
|
26
|
+
ClearCache
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-6ZPH3IB4.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DoctorSuite
|
|
3
|
+
} from "./chunk-YNNKYQTJ.js";
|
|
4
|
+
import {
|
|
5
|
+
init_cjs_shims
|
|
6
|
+
} from "./chunk-PKR7KJ6P.js";
|
|
7
|
+
|
|
8
|
+
// src/cli/services/doctor-release/theme/tests/push.ts
|
|
9
|
+
init_cjs_shims();
|
|
10
|
+
var ThemePushTests = class extends DoctorSuite {
|
|
11
|
+
static {
|
|
12
|
+
this.description = "Tests pushing a theme to the store creates an unpublished theme";
|
|
13
|
+
}
|
|
14
|
+
static {
|
|
15
|
+
this.requiresStore = !0;
|
|
16
|
+
}
|
|
17
|
+
tests() {
|
|
18
|
+
this.test("push creates unpublished theme", async () => {
|
|
19
|
+
if (!this.context.themePath) {
|
|
20
|
+
this.assert(!1, "Theme init did not complete successfully; themePath is missing in context");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let themeName = this.context.themeName ?? "doctor-theme", cmd = `shopify theme push --unpublished --json --path ${this.context.themePath} -t ${themeName}`;
|
|
24
|
+
this.context.environment && (cmd += ` -e ${this.context.environment}`), this.context.store && (cmd += ` -s ${this.context.store}`), this.context.password && (cmd += ` --password ${this.context.password}`);
|
|
25
|
+
let result = await this.run(cmd);
|
|
26
|
+
this.assertSuccess(result);
|
|
27
|
+
let json = this.assertJson(result, (data) => typeof data.theme?.id == "number");
|
|
28
|
+
json?.theme && (this.assert(typeof json.theme.id == "number", "Theme was created with a valid ID"), this.assertEqual(json.theme.role, "unpublished", "Theme role is unpublished"), this.assert(json.theme.editor_url.includes("/admin/themes/"), "Editor URL is provided"), this.assert(json.theme.preview_url.includes("preview_theme_id="), "Preview URL is provided"), this.context.themeId = String(json.theme.id), this.context.data.editorUrl = json.theme.editor_url, this.context.data.previewUrl = json.theme.preview_url);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
ThemePushTests
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=chunk-7A3EOLZ3.js.map
|