@shopify/cli 3.90.1 → 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.
Files changed (129) hide show
  1. package/dist/{acorn-45LE5Z2A.js → acorn-WDTBS4B3.js} +2 -2
  2. package/dist/{angular-Z5FPQPLR.js → angular-WLPEGHXZ.js} +4 -4
  3. package/dist/{babel-TRRZ6QQY.js → babel-LQYCV4NA.js} +2 -7
  4. package/dist/{brotli-2OKV26Y6.js → brotli-6CC7WD4Z.js} +1 -2
  5. package/dist/{chunk-CYPBBNM2.js → chunk-2QLHWTH2.js} +6 -6
  6. package/dist/{chunk-J2CFMYG5.js → chunk-3FISNISV.js} +5 -5
  7. package/dist/{chunk-KC6KOCJ5.js → chunk-3RC2RKM3.js} +7 -7
  8. package/dist/{chunk-WC5EDB4Z.js → chunk-3YEPOXGM.js} +1187 -141
  9. package/dist/{chunk-3AF66HDC.js → chunk-46PV2PEO.js} +4 -4
  10. package/dist/{chunk-ZZNQWJUM.js → chunk-4EIIOMWN.js} +10 -10
  11. package/dist/{chunk-5SJCPOBW.js → chunk-4GAP37VN.js} +414 -384
  12. package/dist/{chunk-6MYWZ7MP.js → chunk-4IW7EFIM.js} +8 -27
  13. package/dist/{chunk-TGDLXF4K.js → chunk-4KL3Z7UE.js} +2 -2
  14. package/dist/{chunk-EFOOQV72.js → chunk-56ELYGPH.js} +2 -2
  15. package/dist/chunk-5Q3T5CKP.js +39 -0
  16. package/dist/{chunk-WYVKPOTO.js → chunk-5TQLC3MT.js} +4 -4
  17. package/dist/chunk-5WZHH7DV.js +78 -0
  18. package/dist/chunk-6GVXTMUE.js +51 -0
  19. package/dist/{chunk-6ONJEX7Y.js → chunk-6NVYATES.js} +2 -2
  20. package/dist/chunk-6ZPH3IB4.js +28 -0
  21. package/dist/chunk-7A3EOLZ3.js +36 -0
  22. package/dist/{chunk-HMDWNGIV.js → chunk-A27P5CF7.js} +211 -103
  23. package/dist/{chunk-IEPPQIPW.js → chunk-A3FTU763.js} +2 -2
  24. package/dist/{chunk-JRFL7VGC.js → chunk-AWEC4VY2.js} +3 -3
  25. package/dist/{chunk-C5STUYKR.js → chunk-BWQRWTAL.js} +3 -3
  26. package/dist/{chunk-3GXB4ZRP.js → chunk-CE4S2SGM.js} +10 -10
  27. package/dist/{chunk-DOZD5WAI.js → chunk-D6TSY7WA.js} +216 -268
  28. package/dist/{chunk-UHBL2XEG.js → chunk-EGPAAR43.js} +3 -3
  29. package/dist/{chunk-X7CGUWBF.js → chunk-FI5G3SH7.js} +3 -3
  30. package/dist/{chunk-4BBQTKIZ.js → chunk-GQKM6ODQ.js} +27763 -25681
  31. package/dist/{chunk-GPKHDSF5.js → chunk-HTGTTXQL.js} +24 -26
  32. package/dist/chunk-ITTNM7I4.js +23 -0
  33. package/dist/{chunk-2TMOMDXO.js → chunk-ITUVFZZC.js} +6 -6
  34. package/dist/{chunk-PAU7LKSJ.js → chunk-JUTE5JAV.js} +3 -3
  35. package/dist/{chunk-HV4MPORZ.js → chunk-L55THCJ4.js} +5 -5
  36. package/dist/{chunk-SG2A4CTL.js → chunk-LZQNLT7K.js} +4 -4
  37. package/dist/{chunk-OTD3FRPC.js → chunk-M5QR2TOD.js} +2 -2
  38. package/dist/{chunk-3VKS4374.js → chunk-MK3Q63EP.js} +15 -17
  39. package/dist/{chunk-6ONJ77I7.js → chunk-QFZNYYRR.js} +2 -2
  40. package/dist/{chunk-RHYTM4FE.js → chunk-RDV4E6WO.js} +2 -2
  41. package/dist/{chunk-4TOZOCIV.js → chunk-S2AX7DX2.js} +3 -3
  42. package/dist/{chunk-H3SSAPRP.js → chunk-TZEIYSCL.js} +3 -3
  43. package/dist/{chunk-XD3LXUGW.js → chunk-VBBBCVMH.js} +2 -2
  44. package/dist/{chunk-SGU7BPE4.js → chunk-W5PA3XSC.js} +3 -3
  45. package/dist/{chunk-IYNLJNFT.js → chunk-Y5U7QY26.js} +3 -3
  46. package/dist/chunk-YE3PUNUK.js +90 -0
  47. package/dist/{chunk-7FIBLDM2.js → chunk-YFNAWLQZ.js} +3 -3
  48. package/dist/chunk-YNNKYQTJ.js +309 -0
  49. package/dist/{chunk-TIYR37XP.js → chunk-YWLTM6FY.js} +4 -4
  50. package/dist/{chunk-OZPZBNSB.js → chunk-ZSOI4JOG.js} +2 -2
  51. package/dist/{chunk-PUMWL67K.js → chunk-ZUHIUKPT.js} +3 -3
  52. package/dist/cli/commands/auth/login.js +13 -15
  53. package/dist/cli/commands/auth/login.test.js +15 -17
  54. package/dist/cli/commands/auth/logout.js +13 -15
  55. package/dist/cli/commands/auth/logout.test.js +16 -18
  56. package/dist/cli/commands/cache/clear.js +14 -15
  57. package/dist/cli/commands/debug/command-flags.js +13 -15
  58. package/dist/cli/commands/docs/generate.js +13 -15
  59. package/dist/cli/commands/docs/generate.test.js +14 -16
  60. package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
  61. package/dist/cli/commands/doctor-release/doctor-release.js +27 -0
  62. package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
  63. package/dist/cli/commands/doctor-release/theme/index.js +33 -0
  64. package/dist/cli/commands/help.js +13 -15
  65. package/dist/cli/commands/kitchen-sink/async.js +14 -16
  66. package/dist/cli/commands/kitchen-sink/async.test.js +15 -17
  67. package/dist/cli/commands/kitchen-sink/index.js +16 -18
  68. package/dist/cli/commands/kitchen-sink/index.test.js +19 -21
  69. package/dist/cli/commands/kitchen-sink/prompts.js +14 -16
  70. package/dist/cli/commands/kitchen-sink/prompts.test.js +15 -17
  71. package/dist/cli/commands/kitchen-sink/static.js +14 -16
  72. package/dist/cli/commands/kitchen-sink/static.test.js +15 -17
  73. package/dist/cli/commands/notifications/generate.js +14 -16
  74. package/dist/cli/commands/notifications/list.js +14 -16
  75. package/dist/cli/commands/search.js +14 -16
  76. package/dist/cli/commands/upgrade.js +14 -16
  77. package/dist/cli/commands/upgrade.test.js +1 -1
  78. package/dist/cli/commands/version.js +14 -16
  79. package/dist/cli/commands/version.test.js +15 -17
  80. package/dist/cli/services/commands/notifications.js +13 -13
  81. package/dist/cli/services/commands/search.js +7 -8
  82. package/dist/cli/services/commands/search.test.js +8 -9
  83. package/dist/cli/services/commands/version.js +8 -9
  84. package/dist/cli/services/commands/version.test.js +10 -11
  85. package/dist/cli/services/doctor-release/context.d.ts +16 -0
  86. package/dist/cli/services/doctor-release/context.js +9 -0
  87. package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
  88. package/dist/cli/services/doctor-release/theme/runner.js +24 -0
  89. package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
  90. package/dist/cli/services/doctor-release/theme/tests/init.js +21 -0
  91. package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
  92. package/dist/cli/services/doctor-release/theme/tests/push.js +21 -0
  93. package/dist/cli/services/kitchen-sink/async.js +7 -8
  94. package/dist/cli/services/kitchen-sink/prompts.js +7 -8
  95. package/dist/cli/services/kitchen-sink/static.js +7 -8
  96. package/dist/cli/services/upgrade.js +8 -9
  97. package/dist/cli/services/upgrade.test.js +10 -11
  98. package/dist/{custom-oclif-loader-RINU7HR3.js → custom-oclif-loader-NCJY2PN7.js} +7 -8
  99. package/dist/{del-E4LJOSMR.js → del-63DSU6FP.js} +7 -7
  100. package/dist/{devtools-D47L6HIC.js → devtools-4MXU7BNJ.js} +2 -2
  101. package/dist/{devtools-2SG3BFWJ.js → devtools-BAOTGU3O.js} +2 -2
  102. package/dist/{error-handler-CWNDOJLB.js → error-handler-IXWAFENZ.js} +11 -13
  103. package/dist/{estree-PY6WKTNG.js → estree-U57GTUKI.js} +14 -35
  104. package/dist/{flow-YN54TSCB.js → flow-CBPGBIW5.js} +2 -4
  105. package/dist/{glimmer-RMPUUUDS.js → glimmer-VWCK7UCR.js} +2 -6
  106. package/dist/{graphql-PPLVYWBL.js → graphql-2HHXB4VZ.js} +3 -5
  107. package/dist/hooks/postrun.js +12 -12
  108. package/dist/hooks/prerun.js +13 -13
  109. package/dist/{html-3U6QZZZ4.js → html-ST4I6M3K.js} +4 -6
  110. package/dist/index.js +5409 -2507
  111. package/dist/{lib-XGN4IWQ3.js → lib-EAXRR46C.js} +2 -3
  112. package/dist/{local-FQVEYJ4K.js → local-TYNIF77M.js} +9 -10
  113. package/dist/{markdown-RHRQTUMC.js → markdown-NVTT3U3H.js} +4 -13
  114. package/dist/{meriyah-7MIMHTWQ.js → meriyah-H6RUUN2F.js} +2 -9
  115. package/dist/{morph-37GC7LQM.js → morph-WMDG66QN.js} +68 -143
  116. package/dist/{multipart-parser-IYYNISJK.js → multipart-parser-WKKMXACL.js} +2 -2
  117. package/dist/{node-package-manager-XIE2HZEQ.js → node-package-manager-XAEBCALT.js} +8 -9
  118. package/dist/{npa-E675GQOI.js → npa-GRSJKUWS.js} +5 -7
  119. package/dist/{postcss-MSOPGY7M.js → postcss-LKRKUSYR.js} +4 -6
  120. package/dist/{prettier-2ITB6I34.js → prettier-YOC7I4QS.js} +29 -29
  121. package/dist/{source-map-UFUVQCYE.js → source-map-KSW2YKNC.js} +2 -2
  122. package/dist/tsconfig.tsbuildinfo +1 -1
  123. package/dist/{ui-UAEFJEFY.js → ui-FDJIH2AF.js} +7 -8
  124. package/dist/{workerd-EPURL4IC.js → workerd-DSSWQ3UN.js} +16 -18
  125. package/dist/{yaml-6GALFXQY.js → yaml-54MHMX7H.js} +6 -9
  126. package/oclif.manifest.json +127 -1
  127. package/package.json +7 -7
  128. package/dist/chunk-EZQWZ57B.js +0 -53
  129. package/dist/chunk-W65CJE3X.js +0 -2238
@@ -1,24 +1,18 @@
1
- import {
2
- base_command_default
3
- } from "./chunk-3VKS4374.js";
4
1
  import {
5
2
  cacheClear
6
- } from "./chunk-ZZNQWJUM.js";
3
+ } from "./chunk-4EIIOMWN.js";
7
4
  import {
8
5
  environmentVariables,
9
6
  isTruthy
10
- } from "./chunk-5SJCPOBW.js";
7
+ } from "./chunk-4GAP37VN.js";
11
8
  import {
12
9
  require_lib
13
- } from "./chunk-WC5EDB4Z.js";
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-CWNDOJLB.js"), { isDevelopment } = await import("./local-FQVEYJ4K.js"), oclif = await import("./lib-XGN4IWQ3.js"), { ShopifyConfig } = await import("./custom-oclif-loader-RINU7HR3.js");
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-UAEFJEFY.js");
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-XIE2HZEQ.js"), { moduleDirectory } = await import("./path-GB4VIEM6.js"), name = (await findUpAndReadPackageJson(moduleDirectory(options.moduleURL))).content.name.replace("@shopify/create-", "");
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
- ClearCache
99
+ clearCache
119
100
  };
120
- //# sourceMappingURL=chunk-6MYWZ7MP.js.map
101
+ //# sourceMappingURL=chunk-4IW7EFIM.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearCollectedLogs,
3
3
  collectedLogs
4
- } from "./chunk-5SJCPOBW.js";
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-TGDLXF4K.js.map
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-EFOOQV72.js.map
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-IYNLJNFT.js";
3
+ } from "./chunk-Y5U7QY26.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-3VKS4374.js";
6
+ } from "./chunk-MK3Q63EP.js";
7
7
  import {
8
8
  renderInfo
9
- } from "./chunk-5SJCPOBW.js";
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-WYVKPOTO.js.map
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-6ONJEX7Y.js.map
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