@shopify/cli 3.90.1 → 3.91.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.
Files changed (159) 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/assets/hydrogen/starter/.graphqlrc.ts +4 -2
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +172 -0
  5. package/dist/assets/hydrogen/starter/app/components/CartLineItem.tsx +67 -38
  6. package/dist/assets/hydrogen/starter/app/components/CartMain.tsx +45 -7
  7. package/dist/assets/hydrogen/starter/app/components/CartSummary.tsx +20 -38
  8. package/dist/assets/hydrogen/starter/app/components/MockShopNotice.tsx +20 -0
  9. package/dist/assets/hydrogen/starter/app/entry.client.tsx +2 -3
  10. package/dist/assets/hydrogen/starter/app/lib/fragments.ts +8 -0
  11. package/dist/assets/hydrogen/starter/app/routes/_index.tsx +4 -5
  12. package/dist/assets/hydrogen/starter/app/routes/account.addresses.tsx +12 -12
  13. package/dist/assets/hydrogen/starter/app/routes/account.tsx +4 -7
  14. package/dist/assets/hydrogen/starter/app/routes/account_.login.tsx +10 -0
  15. package/dist/assets/hydrogen/starter/app/routes/blogs.$blogHandle._index.tsx +2 -9
  16. package/dist/assets/hydrogen/starter/app/routes/blogs._index.tsx +1 -4
  17. package/dist/assets/hydrogen/starter/app/routes/cart.tsx +3 -11
  18. package/dist/assets/hydrogen/starter/app/routes/collections.all.tsx +1 -3
  19. package/dist/assets/hydrogen/starter/app/routes/pages.$handle.tsx +2 -8
  20. package/dist/assets/hydrogen/starter/app/routes/policies.$handle.tsx +1 -4
  21. package/dist/assets/hydrogen/starter/app/routes/policies._index.tsx +1 -1
  22. package/dist/assets/hydrogen/starter/app/routes/products.$handle.tsx +2 -9
  23. package/dist/assets/hydrogen/starter/app/routes/search.tsx +18 -12
  24. package/dist/assets/hydrogen/starter/app/styles/app.css +72 -1
  25. package/dist/assets/hydrogen/starter/eslint.config.js +1 -0
  26. package/dist/assets/hydrogen/starter/guides/predictiveSearch/predictiveSearch.md +3 -3
  27. package/dist/assets/hydrogen/starter/guides/search/search.md +1 -1
  28. package/dist/assets/hydrogen/starter/package.json +14 -13
  29. package/dist/assets/hydrogen/starter/server.ts +5 -7
  30. package/dist/assets/hydrogen/starter/storefrontapi.generated.d.ts +89 -0
  31. package/dist/{babel-TRRZ6QQY.js → babel-LQYCV4NA.js} +2 -7
  32. package/dist/{brotli-2OKV26Y6.js → brotli-6CC7WD4Z.js} +1 -2
  33. package/dist/{chunk-SGU7BPE4.js → chunk-2EQNSO7C.js} +3 -3
  34. package/dist/{chunk-PAU7LKSJ.js → chunk-2YAGQHB2.js} +3 -3
  35. package/dist/{chunk-OZPZBNSB.js → chunk-463KYFYO.js} +2 -2
  36. package/dist/{chunk-IEPPQIPW.js → chunk-54FE2FGU.js} +2 -2
  37. package/dist/{chunk-EFOOQV72.js → chunk-56ELYGPH.js} +2 -2
  38. package/dist/{chunk-6ONJ77I7.js → chunk-5JYQJQ2E.js} +2 -2
  39. package/dist/chunk-5ZDTGPNX.js +28 -0
  40. package/dist/{chunk-6ONJEX7Y.js → chunk-6NVYATES.js} +2 -2
  41. package/dist/chunk-77BDQRQW.js +90 -0
  42. package/dist/{chunk-HMDWNGIV.js → chunk-A27P5CF7.js} +211 -103
  43. package/dist/{chunk-4BBQTKIZ.js → chunk-A2CZGTAP.js} +27763 -25681
  44. package/dist/{chunk-TIYR37XP.js → chunk-ATQVKUJC.js} +4 -4
  45. package/dist/{chunk-3GXB4ZRP.js → chunk-CE4S2SGM.js} +10 -10
  46. package/dist/{chunk-WC5EDB4Z.js → chunk-CEUL3KX5.js} +1190 -144
  47. package/dist/{chunk-2TMOMDXO.js → chunk-DR5R5UTE.js} +6 -6
  48. package/dist/{chunk-IYNLJNFT.js → chunk-DUNGALP3.js} +3 -3
  49. package/dist/{chunk-TGDLXF4K.js → chunk-E44JKFB6.js} +2 -2
  50. package/dist/{chunk-5SJCPOBW.js → chunk-E4GUDBAR.js} +417 -387
  51. package/dist/{chunk-C5STUYKR.js → chunk-FKP67FZI.js} +3 -3
  52. package/dist/{chunk-ZZNQWJUM.js → chunk-HAG3HJ2V.js} +10 -10
  53. package/dist/{chunk-PUMWL67K.js → chunk-HOIU6WRE.js} +3 -3
  54. package/dist/{chunk-GPKHDSF5.js → chunk-HTGTTXQL.js} +24 -26
  55. package/dist/{chunk-3VKS4374.js → chunk-I23GZAC4.js} +15 -17
  56. package/dist/chunk-ITTNM7I4.js +23 -0
  57. package/dist/chunk-IUKBWIQY.js +39 -0
  58. package/dist/{chunk-H3SSAPRP.js → chunk-K45ALTZ7.js} +3 -3
  59. package/dist/chunk-K52ORY26.js +78 -0
  60. package/dist/{prettier-2ITB6I34.js → chunk-KV3364EL.js} +43 -42
  61. package/dist/{chunk-4TOZOCIV.js → chunk-LFMBIRVC.js} +3 -3
  62. package/dist/{chunk-OTD3FRPC.js → chunk-NYP3N62G.js} +2 -2
  63. package/dist/chunk-OIUDJFV2.js +309 -0
  64. package/dist/{chunk-HV4MPORZ.js → chunk-PCNR4TMY.js} +5 -5
  65. package/dist/{chunk-SG2A4CTL.js → chunk-QFO7QSBW.js} +4 -4
  66. package/dist/{chunk-UHBL2XEG.js → chunk-R622IPZN.js} +3 -3
  67. package/dist/{chunk-X7CGUWBF.js → chunk-RKFRXKFE.js} +3 -3
  68. package/dist/{chunk-WYVKPOTO.js → chunk-RLJICWO6.js} +4 -4
  69. package/dist/chunk-SJXHR42U.js +36 -0
  70. package/dist/{chunk-CYPBBNM2.js → chunk-SUFC4ISB.js} +6 -6
  71. package/dist/{chunk-3AF66HDC.js → chunk-SVV4RJVX.js} +4 -4
  72. package/dist/chunk-TH7ZYYDZ.js +20868 -0
  73. package/dist/{chunk-J2CFMYG5.js → chunk-TY5YKCUW.js} +5 -5
  74. package/dist/{chunk-XD3LXUGW.js → chunk-VBBBCVMH.js} +2 -2
  75. package/dist/chunk-VRUH5BDH.js +51 -0
  76. package/dist/{chunk-7FIBLDM2.js → chunk-VUYVHHZY.js} +3 -3
  77. package/dist/{chunk-KC6KOCJ5.js → chunk-WDYPK6VH.js} +7 -7
  78. package/dist/{chunk-JRFL7VGC.js → chunk-XDCBS7SY.js} +3 -3
  79. package/dist/{chunk-6MYWZ7MP.js → chunk-Z5FK5H2M.js} +8 -27
  80. package/dist/{chunk-RHYTM4FE.js → chunk-ZLV2A27J.js} +2 -2
  81. package/dist/cli/commands/auth/login.js +14 -16
  82. package/dist/cli/commands/auth/login.test.js +16 -18
  83. package/dist/cli/commands/auth/logout.js +14 -16
  84. package/dist/cli/commands/auth/logout.test.js +17 -19
  85. package/dist/cli/commands/cache/clear.js +15 -16
  86. package/dist/cli/commands/debug/command-flags.js +14 -16
  87. package/dist/cli/commands/docs/generate.js +14 -16
  88. package/dist/cli/commands/docs/generate.test.js +15 -17
  89. package/dist/cli/commands/doctor-release/doctor-release.d.ts +6 -0
  90. package/dist/cli/commands/doctor-release/doctor-release.js +27 -0
  91. package/dist/cli/commands/doctor-release/theme/index.d.ts +14 -0
  92. package/dist/cli/commands/doctor-release/theme/index.js +33 -0
  93. package/dist/cli/commands/help.js +14 -16
  94. package/dist/cli/commands/kitchen-sink/async.js +15 -17
  95. package/dist/cli/commands/kitchen-sink/async.test.js +16 -18
  96. package/dist/cli/commands/kitchen-sink/index.js +17 -19
  97. package/dist/cli/commands/kitchen-sink/index.test.js +20 -22
  98. package/dist/cli/commands/kitchen-sink/prompts.js +15 -17
  99. package/dist/cli/commands/kitchen-sink/prompts.test.js +16 -18
  100. package/dist/cli/commands/kitchen-sink/static.js +15 -17
  101. package/dist/cli/commands/kitchen-sink/static.test.js +16 -18
  102. package/dist/cli/commands/notifications/generate.js +15 -17
  103. package/dist/cli/commands/notifications/list.js +15 -17
  104. package/dist/cli/commands/search.js +15 -17
  105. package/dist/cli/commands/upgrade.js +15 -17
  106. package/dist/cli/commands/upgrade.test.js +1 -1
  107. package/dist/cli/commands/version.js +15 -17
  108. package/dist/cli/commands/version.test.js +16 -18
  109. package/dist/cli/services/commands/notifications.js +14 -14
  110. package/dist/cli/services/commands/search.js +8 -9
  111. package/dist/cli/services/commands/search.test.js +9 -10
  112. package/dist/cli/services/commands/version.js +9 -10
  113. package/dist/cli/services/commands/version.test.js +11 -12
  114. package/dist/cli/services/doctor-release/context.d.ts +16 -0
  115. package/dist/cli/services/doctor-release/context.js +9 -0
  116. package/dist/cli/services/doctor-release/theme/runner.d.ts +7 -0
  117. package/dist/cli/services/doctor-release/theme/runner.js +24 -0
  118. package/dist/cli/services/doctor-release/theme/tests/init.d.ts +11 -0
  119. package/dist/cli/services/doctor-release/theme/tests/init.js +21 -0
  120. package/dist/cli/services/doctor-release/theme/tests/push.d.ts +10 -0
  121. package/dist/cli/services/doctor-release/theme/tests/push.js +21 -0
  122. package/dist/cli/services/kitchen-sink/async.js +8 -9
  123. package/dist/cli/services/kitchen-sink/prompts.js +8 -9
  124. package/dist/cli/services/kitchen-sink/static.js +8 -9
  125. package/dist/cli/services/upgrade.js +9 -10
  126. package/dist/cli/services/upgrade.test.js +11 -12
  127. package/dist/{custom-oclif-loader-RINU7HR3.js → custom-oclif-loader-AAJZ7WBW.js} +8 -9
  128. package/dist/{del-E4LJOSMR.js → del-63DSU6FP.js} +7 -7
  129. package/dist/{devtools-D47L6HIC.js → devtools-4MXU7BNJ.js} +2 -2
  130. package/dist/{devtools-2SG3BFWJ.js → devtools-BAOTGU3O.js} +2 -2
  131. package/dist/{error-handler-CWNDOJLB.js → error-handler-GSQRFK57.js} +12 -14
  132. package/dist/{estree-PY6WKTNG.js → estree-U57GTUKI.js} +14 -35
  133. package/dist/{flow-YN54TSCB.js → flow-CBPGBIW5.js} +2 -4
  134. package/dist/{glimmer-RMPUUUDS.js → glimmer-VWCK7UCR.js} +2 -6
  135. package/dist/{graphql-PPLVYWBL.js → graphql-2HHXB4VZ.js} +3 -5
  136. package/dist/hooks/postrun.js +13 -13
  137. package/dist/hooks/prerun.js +14 -14
  138. package/dist/{html-3U6QZZZ4.js → html-ST4I6M3K.js} +4 -6
  139. package/dist/index.js +143537 -8573
  140. package/dist/{lib-XGN4IWQ3.js → lib-HAW436ZI.js} +3 -4
  141. package/dist/{local-FQVEYJ4K.js → local-GOP2BHNI.js} +10 -11
  142. package/dist/{markdown-RHRQTUMC.js → markdown-NVTT3U3H.js} +4 -13
  143. package/dist/{meriyah-7MIMHTWQ.js → meriyah-H6RUUN2F.js} +2 -9
  144. package/dist/{morph-37GC7LQM.js → morph-7WAMUK6I.js} +68 -143
  145. package/dist/{multipart-parser-IYYNISJK.js → multipart-parser-WKKMXACL.js} +2 -2
  146. package/dist/{node-package-manager-XIE2HZEQ.js → node-package-manager-W4R4DUTE.js} +9 -10
  147. package/dist/{npa-E675GQOI.js → npa-GRSJKUWS.js} +5 -7
  148. package/dist/{postcss-MSOPGY7M.js → postcss-LKRKUSYR.js} +4 -6
  149. package/dist/prettier-5ODD6NHV.js +36 -0
  150. package/dist/{source-map-UFUVQCYE.js → source-map-KSW2YKNC.js} +2 -2
  151. package/dist/tsconfig.tsbuildinfo +1 -1
  152. package/dist/{ui-UAEFJEFY.js → ui-VRLRLHWH.js} +8 -9
  153. package/dist/{workerd-EPURL4IC.js → workerd-AO3T6IIJ.js} +19 -22
  154. package/dist/{yaml-6GALFXQY.js → yaml-54MHMX7H.js} +6 -9
  155. package/oclif.manifest.json +128 -9
  156. package/package.json +8 -8
  157. package/dist/chunk-DOZD5WAI.js +0 -153039
  158. package/dist/chunk-EZQWZ57B.js +0 -53
  159. package/dist/chunk-W65CJE3X.js +0 -2238
@@ -2024,12 +2024,7 @@ var Hs, Re, Ks, kt, R, Q, Dt, Js, Mt, be, Gs, Xs, Ys, Qs, Zs, ei, p, ri, Ft, ai,
2024
2024
  return i && u && this.raise(g.ImportTypeShorthandOnlyInPureImport, e), (i || u) && this.checkReservedType(e.local.name, e.local.loc.start, !0), l && !i && !u && this.checkReservedWord(e.local.name, e.loc.start, !0, !0), this.finishImportSpecifier(e, "ImportSpecifier");
2025
2025
  }
2026
2026
  parseBindingAtom() {
2027
- switch (this.state.type) {
2028
- case 78:
2029
- return this.parseIdentifier(!0);
2030
- default:
2031
- return super.parseBindingAtom();
2032
- }
2027
+ return this.state.type === 78 ? this.parseIdentifier(!0) : super.parseBindingAtom();
2033
2028
  }
2034
2029
  parseFunctionParams(e, s) {
2035
2030
  let i = e.kind;
@@ -7170,4 +7165,4 @@ export {
7170
7165
  Ks as default,
7171
7166
  ra as parsers
7172
7167
  };
7173
- //# sourceMappingURL=babel-TRRZ6QQY.js.map
7168
+ //# sourceMappingURL=babel-LQYCV4NA.js.map
@@ -136732,7 +136732,6 @@ var require_encode = __commonJS({
136732
136732
  } catch (k) {
136733
136733
  if (!(k instanceof y)) if (k == "SimulateInfiniteLoop") b.noExitRuntime = !0;
136734
136734
  else throw k && typeof k == "object" && k.stack && b.A("exception thrown: " + [k, k.stack]), k;
136735
- } finally {
136736
136735
  }
136737
136736
  };
136738
136737
  function Za(a) {
@@ -136806,4 +136805,4 @@ var require_brotli = __commonJS({
136806
136805
  }
136807
136806
  });
136808
136807
  export default require_brotli();
136809
- //# sourceMappingURL=brotli-2OKV26Y6.js.map
136808
+ //# sourceMappingURL=brotli-6CC7WD4Z.js.map
@@ -4,7 +4,7 @@ import {
4
4
  findUpAndReadPackageJson,
5
5
  getPackageManager,
6
6
  usesWorkspaces
7
- } from "./chunk-ZZNQWJUM.js";
7
+ } from "./chunk-HAG3HJ2V.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-5SJCPOBW.js";
18
+ } from "./chunk-E4GUDBAR.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-SGU7BPE4.js.map
142
+ //# sourceMappingURL=chunk-2EQNSO7C.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  versionService
3
- } from "./chunk-C5STUYKR.js";
3
+ } from "./chunk-FKP67FZI.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-3VKS4374.js";
6
+ } from "./chunk-I23GZAC4.js";
7
7
  import {
8
8
  init_cjs_shims
9
9
  } from "./chunk-PKR7KJ6P.js";
@@ -22,4 +22,4 @@ var Version = class extends base_command_default {
22
22
  export {
23
23
  Version
24
24
  };
25
- //# sourceMappingURL=chunk-PAU7LKSJ.js.map
25
+ //# sourceMappingURL=chunk-2YAGQHB2.js.map
@@ -7,7 +7,7 @@ import {
7
7
  renderSuccess,
8
8
  renderTable,
9
9
  renderWarning
10
- } from "./chunk-5SJCPOBW.js";
10
+ } from "./chunk-E4GUDBAR.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-OZPZBNSB.js.map
206
+ //# sourceMappingURL=chunk-463KYFYO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  openURL
3
- } from "./chunk-5SJCPOBW.js";
3
+ } from "./chunk-E4GUDBAR.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-IEPPQIPW.js.map
18
+ //# sourceMappingURL=chunk-54FE2FGU.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
@@ -5,7 +5,7 @@ import {
5
5
  renderDangerousConfirmationPrompt,
6
6
  renderSelectPrompt,
7
7
  renderTextPrompt
8
- } from "./chunk-5SJCPOBW.js";
8
+ } from "./chunk-E4GUDBAR.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-6ONJ77I7.js.map
178
+ //# sourceMappingURL=chunk-5JYQJQ2E.js.map
@@ -0,0 +1,28 @@
1
+ import {
2
+ clearCache
3
+ } from "./chunk-Z5FK5H2M.js";
4
+ import {
5
+ base_command_default
6
+ } from "./chunk-I23GZAC4.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-5ZDTGPNX.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,90 @@
1
+ import {
2
+ ThemeInitTests
3
+ } from "./chunk-VRUH5BDH.js";
4
+ import {
5
+ ThemePushTests
6
+ } from "./chunk-SJXHR42U.js";
7
+ import {
8
+ createDoctorContext
9
+ } from "./chunk-ITTNM7I4.js";
10
+ import {
11
+ outputInfo,
12
+ source_default
13
+ } from "./chunk-E4GUDBAR.js";
14
+ import {
15
+ relativizePath
16
+ } from "./chunk-EG6MBBEN.js";
17
+ import {
18
+ init_cjs_shims
19
+ } from "./chunk-PKR7KJ6P.js";
20
+
21
+ // src/cli/services/doctor-release/theme/runner.ts
22
+ init_cjs_shims();
23
+
24
+ // ../cli-kit/dist/public/node/doctor/reporter.js
25
+ init_cjs_shims();
26
+ var log = (message) => outputInfo(message), reporterBasePath;
27
+ function initReporter(basePath) {
28
+ reporterBasePath = basePath;
29
+ }
30
+ function truncatePaths(text) {
31
+ if (!reporterBasePath)
32
+ return text;
33
+ let absolutePathPattern = /\/[^\s,)]+/g;
34
+ return text.replace(absolutePathPattern, (path) => relativizePath(path, reporterBasePath));
35
+ }
36
+ function reportSuiteStart(suiteName, description) {
37
+ log(""), log(source_default.bold(source_default.cyan(`Suite: ${suiteName}`))), log(source_default.dim(description));
38
+ }
39
+ function reportTestStart(testName) {
40
+ log(source_default.bold(source_default.blue(`Running: ${testName}`)));
41
+ }
42
+ function reportTestResult(result) {
43
+ let durationStr = `(${(result.duration / 1e3).toFixed(2)}s)`;
44
+ if (result.status === "passed") {
45
+ log(source_default.bold(source_default.green(`PASSED: ${result.name} ${source_default.dim(durationStr)}`)));
46
+ for (let line of formatAssertions(result.assertions))
47
+ log(line);
48
+ } else if (result.status === "failed") {
49
+ log(source_default.red(`FAILED: ${result.name} ${source_default.dim(durationStr)}`));
50
+ for (let line of formatAssertions(result.assertions))
51
+ log(line);
52
+ result.error && log(source_default.red(` Error: ${truncatePaths(result.error.message)}`));
53
+ } else
54
+ log(source_default.yellow(`SKIPPED: ${result.name}`));
55
+ }
56
+ function reportSummary(results) {
57
+ let passed = results.filter((result) => result.status === "passed").length, failed = results.filter((result) => result.status === "failed").length, skipped = results.filter((result) => result.status === "skipped").length, total = results.length, totalDuration = results.reduce((sum, result) => sum + result.duration, 0);
58
+ log(""), log(source_default.bold("\u2500".repeat(40))), failed > 0 ? log(source_default.red(source_default.bold(`Doctor Complete: ${failed}/${total} tests failed`))) : log(source_default.green(source_default.bold(`Doctor Complete: ${passed}/${total} tests passed`))), log(` Passed: ${source_default.green(String(passed))}`), log(` Failed: ${source_default.red(String(failed))}`), skipped > 0 && log(` Skipped: ${source_default.yellow(String(skipped))}`), log(` Total time: ${source_default.dim(`${(totalDuration / 1e3).toFixed(2)}s`)}`);
59
+ }
60
+ function formatAssertions(assertions) {
61
+ return assertions.map((assertion) => {
62
+ if (assertion.passed)
63
+ return source_default.green(` [OK] ${assertion.description}`);
64
+ {
65
+ let details = ` (expected: ${assertion.expected}, actual: ${assertion.actual})`;
66
+ return source_default.red(` [FAIL] ${assertion.description}${details}`);
67
+ }
68
+ });
69
+ }
70
+
71
+ // src/cli/services/doctor-release/theme/runner.ts
72
+ var themeSuites = [ThemeInitTests, ThemePushTests];
73
+ async function runThemeDoctor(options) {
74
+ let results = [], context = createDoctorContext(options);
75
+ initReporter(context.workingDirectory);
76
+ for (let SuiteClass of themeSuites) {
77
+ let suite = new SuiteClass(), description = SuiteClass.description ?? "Test suite";
78
+ reportSuiteStart(SuiteClass.name, description);
79
+ let suiteResults = await suite.runSuite(context);
80
+ for (let result of suiteResults)
81
+ if (reportTestStart(result.name), reportTestResult(result), results.push(result), result.status === "failed")
82
+ return reportSummary(results), results;
83
+ }
84
+ return reportSummary(results), results;
85
+ }
86
+
87
+ export {
88
+ runThemeDoctor
89
+ };
90
+ //# sourceMappingURL=chunk-77BDQRQW.js.map