@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.
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-XUHEOC7Y.js → chunk-2QLHWTH2.js} +6 -6
  6. package/dist/{chunk-LSGITB3O.js → chunk-3FISNISV.js} +5 -5
  7. package/dist/{chunk-HVSHUE2B.js → chunk-3RC2RKM3.js} +7 -7
  8. package/dist/{chunk-WC5EDB4Z.js → chunk-3YEPOXGM.js} +1187 -141
  9. package/dist/{chunk-ELXP2SNA.js → chunk-46PV2PEO.js} +4 -4
  10. package/dist/{chunk-QHDQYVAG.js → chunk-4EIIOMWN.js} +10 -10
  11. package/dist/{chunk-LKMGT2DW.js → chunk-4GAP37VN.js} +413 -383
  12. package/dist/{chunk-SE3EASHO.js → chunk-4IW7EFIM.js} +8 -27
  13. package/dist/{chunk-RYFPG44L.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-5MLYI7UO.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-A7QWFDBY.js → chunk-A3FTU763.js} +2 -2
  24. package/dist/{chunk-MZX7G4LN.js → chunk-AWEC4VY2.js} +3 -3
  25. package/dist/{chunk-B2EZE3X5.js → chunk-BWQRWTAL.js} +3 -3
  26. package/dist/{chunk-3GXB4ZRP.js → chunk-CE4S2SGM.js} +10 -10
  27. package/dist/{chunk-U52M2SBG.js → chunk-D6TSY7WA.js} +216 -268
  28. package/dist/{chunk-UISDI2NJ.js → chunk-EGPAAR43.js} +3 -3
  29. package/dist/{chunk-L5BSIB4A.js → chunk-FI5G3SH7.js} +3 -3
  30. package/dist/{chunk-5OJ67VLD.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-O74JPOMN.js → chunk-ITUVFZZC.js} +6 -6
  34. package/dist/{chunk-6DIWINGB.js → chunk-JUTE5JAV.js} +3 -3
  35. package/dist/{chunk-3OKBQXPB.js → chunk-L55THCJ4.js} +5 -5
  36. package/dist/{chunk-AJVHCUVQ.js → chunk-LZQNLT7K.js} +4 -4
  37. package/dist/{chunk-R2VQQFNU.js → chunk-M5QR2TOD.js} +2 -2
  38. package/dist/{chunk-3AY5VBOI.js → chunk-MK3Q63EP.js} +15 -17
  39. package/dist/{chunk-66SSN4NK.js → chunk-QFZNYYRR.js} +2 -2
  40. package/dist/{chunk-ERCZ3NEG.js → chunk-RDV4E6WO.js} +2 -2
  41. package/dist/{chunk-ITXKKYMN.js → chunk-S2AX7DX2.js} +3 -3
  42. package/dist/{chunk-GH4DMIMI.js → chunk-TZEIYSCL.js} +3 -3
  43. package/dist/{chunk-XD3LXUGW.js → chunk-VBBBCVMH.js} +2 -2
  44. package/dist/{chunk-K2EOH7QQ.js → chunk-W5PA3XSC.js} +3 -3
  45. package/dist/{chunk-FPXVU77M.js → chunk-Y5U7QY26.js} +3 -3
  46. package/dist/chunk-YE3PUNUK.js +90 -0
  47. package/dist/{chunk-4K7TRR4V.js → chunk-YFNAWLQZ.js} +3 -3
  48. package/dist/chunk-YNNKYQTJ.js +309 -0
  49. package/dist/{chunk-GY37RRX5.js → chunk-YWLTM6FY.js} +4 -4
  50. package/dist/{chunk-A2DCUFP3.js → chunk-ZSOI4JOG.js} +2 -2
  51. package/dist/{chunk-BDQNCT7P.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-H4CDTFND.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-JLUD7HQX.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 +5853 -2950
  111. package/dist/{lib-XGN4IWQ3.js → lib-EAXRR46C.js} +2 -3
  112. package/dist/{local-Q5P3JTHB.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-JQCYAVNE.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-2P2WEBXY.js → ui-FDJIH2AF.js} +7 -8
  124. package/dist/{workerd-5QLA2QUA.js → workerd-DSSWQ3UN.js} +16 -18
  125. package/dist/{yaml-6GALFXQY.js → yaml-54MHMX7H.js} +6 -9
  126. package/oclif.manifest.json +134 -9
  127. package/package.json +7 -7
  128. package/dist/chunk-6OAKJOUE.js +0 -2238
  129. package/dist/chunk-EZQWZ57B.js +0 -53
@@ -0,0 +1,90 @@
1
+ import {
2
+ ThemeInitTests
3
+ } from "./chunk-6GVXTMUE.js";
4
+ import {
5
+ ThemePushTests
6
+ } from "./chunk-7A3EOLZ3.js";
7
+ import {
8
+ createDoctorContext
9
+ } from "./chunk-ITTNM7I4.js";
10
+ import {
11
+ outputInfo,
12
+ source_default
13
+ } from "./chunk-4GAP37VN.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-YE3PUNUK.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-3AY5VBOI.js";
3
+ } from "./chunk-MK3Q63EP.js";
4
4
  import {
5
5
  mkdir,
6
6
  outputInfo,
7
7
  rmdir,
8
8
  writeFile
9
- } from "./chunk-LKMGT2DW.js";
9
+ } from "./chunk-4GAP37VN.js";
10
10
  import {
11
11
  cwd,
12
12
  joinPath
@@ -118,4 +118,4 @@ export {
118
118
  writeCommandFlagInterface,
119
119
  writeCommandUsageExampleFile
120
120
  };
121
- //# sourceMappingURL=chunk-4K7TRR4V.js.map
121
+ //# sourceMappingURL=chunk-YFNAWLQZ.js.map
@@ -0,0 +1,309 @@
1
+ import {
2
+ captureCommandWithExitCode,
3
+ execCommand,
4
+ fileExists,
5
+ readFile
6
+ } from "./chunk-4GAP37VN.js";
7
+ import {
8
+ isAbsolutePath,
9
+ joinPath,
10
+ relativePath
11
+ } from "./chunk-EG6MBBEN.js";
12
+ import {
13
+ init_cjs_shims
14
+ } from "./chunk-PKR7KJ6P.js";
15
+
16
+ // ../cli-kit/dist/public/node/doctor/framework.js
17
+ init_cjs_shims();
18
+ var DoctorSuite = class {
19
+ constructor() {
20
+ this.assertions = [], this.registeredTests = [];
21
+ }
22
+ /**
23
+ * Run the entire test suite.
24
+ *
25
+ * @param context - The doctor context for this suite run.
26
+ */
27
+ async runSuite(context) {
28
+ this.context = context, this.registeredTests = [];
29
+ let results = [];
30
+ this.tests();
31
+ for (let registeredTest of this.registeredTests) {
32
+ this.assertions = [];
33
+ let startTime = Date.now();
34
+ try {
35
+ await registeredTest.fn(), results.push({
36
+ name: registeredTest.name,
37
+ status: this.hasFailures() ? "failed" : "passed",
38
+ duration: Date.now() - startTime,
39
+ assertions: [...this.assertions]
40
+ });
41
+ } catch (error) {
42
+ results.push({
43
+ name: registeredTest.name,
44
+ status: "failed",
45
+ duration: Date.now() - startTime,
46
+ assertions: [...this.assertions],
47
+ error: error instanceof Error ? error : new Error(String(error))
48
+ });
49
+ }
50
+ }
51
+ return results;
52
+ }
53
+ /**
54
+ * Register a test with a name and function.
55
+ *
56
+ * @param name - The test name.
57
+ * @param fn - The async test function.
58
+ */
59
+ test(name, fn) {
60
+ this.registeredTests.push({ name, fn });
61
+ }
62
+ /**
63
+ * Override this method to register tests using this.test().
64
+ */
65
+ tests() {
66
+ }
67
+ // ============================================
68
+ // Command execution
69
+ // ============================================
70
+ /**
71
+ * Run a CLI command and return the result.
72
+ *
73
+ * @param command - The CLI command to run.
74
+ * @param options - Optional cwd and env overrides.
75
+ * @example
76
+ * const result = await this.run('shopify theme init my-theme')
77
+ * const result = await this.run('shopify theme push --json')
78
+ */
79
+ async run(command, options) {
80
+ let cwd = options?.cwd ?? this.context.workingDirectory, result = await captureCommandWithExitCode(command, { cwd, env: options?.env });
81
+ return {
82
+ command,
83
+ exitCode: result.exitCode,
84
+ stdout: result.stdout,
85
+ stderr: result.stderr,
86
+ output: String(result.stdout) + String(result.stderr),
87
+ success: result.exitCode === 0
88
+ };
89
+ }
90
+ /**
91
+ * Run a command without capturing output (for interactive commands).
92
+ * Returns only success/failure.
93
+ *
94
+ * @param command - The CLI command to run.
95
+ * @param options - Optional cwd and env overrides.
96
+ */
97
+ async runInteractive(command, options) {
98
+ let cwd = options?.cwd ?? this.context.workingDirectory, exitCode = 0;
99
+ try {
100
+ await execCommand(command, { cwd, env: options?.env, stdin: "inherit" });
101
+ } catch {
102
+ exitCode = 1;
103
+ }
104
+ return {
105
+ command,
106
+ exitCode,
107
+ stdout: "",
108
+ stderr: "",
109
+ output: "",
110
+ success: exitCode === 0
111
+ };
112
+ }
113
+ // ============================================
114
+ // Assertions
115
+ // ============================================
116
+ /**
117
+ * Assert that a command succeeded (exit code 0).
118
+ *
119
+ * @param result - The command result to check.
120
+ * @param message - Optional custom assertion message.
121
+ */
122
+ assertSuccess(result, message) {
123
+ this.assertions.push({
124
+ description: message ?? `Command succeeded: ${result.command}`,
125
+ passed: result.success,
126
+ expected: "exit code 0",
127
+ actual: `exit code ${result.exitCode}`
128
+ });
129
+ }
130
+ /**
131
+ * Assert that a command failed with an error matching the pattern.
132
+ *
133
+ * @param result - The command result to check.
134
+ * @param pattern - Optional regex or string pattern to match against output.
135
+ * @param message - Optional custom assertion message.
136
+ */
137
+ assertError(result, pattern, message) {
138
+ let failed = !result.success;
139
+ if (pattern) {
140
+ let matches = (typeof pattern == "string" ? new RegExp(pattern) : pattern).test(result.output), actualValue;
141
+ failed ? matches ? actualValue = "matched" : actualValue = `output: ${result.output.slice(0, 200)}` : actualValue = "command succeeded", this.assertions.push({
142
+ description: message ?? `Command failed with expected error: ${pattern}`,
143
+ passed: failed && matches,
144
+ expected: `failure with error matching ${pattern}`,
145
+ actual: actualValue
146
+ });
147
+ } else
148
+ this.assertions.push({
149
+ description: message ?? `Command failed: ${result.command}`,
150
+ passed: failed,
151
+ expected: "non-zero exit code",
152
+ actual: `exit code ${result.exitCode}`
153
+ });
154
+ }
155
+ /**
156
+ * Assert that a file exists and optionally matches content.
157
+ *
158
+ * @param path - The file path to check.
159
+ * @param contentPattern - Optional regex or string to match file content.
160
+ * @param message - Optional custom assertion message.
161
+ */
162
+ async assertFile(path, contentPattern, message) {
163
+ let fullPath = isAbsolutePath(path) ? path : joinPath(this.context.workingDirectory, path), displayPath = relativePath(this.context.workingDirectory, fullPath);
164
+ if (!await fileExists(fullPath)) {
165
+ this.assertions.push({
166
+ description: message ?? `File exists: ${displayPath}`,
167
+ passed: !1,
168
+ expected: "file exists",
169
+ actual: "file not found"
170
+ });
171
+ return;
172
+ }
173
+ if (contentPattern) {
174
+ let content = await readFile(fullPath), matches = (typeof contentPattern == "string" ? new RegExp(contentPattern) : contentPattern).test(content);
175
+ this.assertions.push({
176
+ description: message ?? `File ${displayPath} matches ${contentPattern}`,
177
+ passed: matches,
178
+ expected: `content matching ${contentPattern}`,
179
+ actual: matches ? "matched" : `content: ${content.slice(0, 200)}...`
180
+ });
181
+ } else
182
+ this.assertions.push({
183
+ description: message ?? `File exists: ${displayPath}`,
184
+ passed: !0,
185
+ expected: "file exists",
186
+ actual: "file exists"
187
+ });
188
+ }
189
+ /**
190
+ * Assert that a file does not exist.
191
+ *
192
+ * @param path - The file path to check.
193
+ * @param message - Optional custom assertion message.
194
+ */
195
+ async assertNoFile(path, message) {
196
+ let fullPath = isAbsolutePath(path) ? path : joinPath(this.context.workingDirectory, path), displayPath = relativePath(this.context.workingDirectory, fullPath), exists = await fileExists(fullPath);
197
+ this.assertions.push({
198
+ description: message ?? `File does not exist: ${displayPath}`,
199
+ passed: !exists,
200
+ expected: "file does not exist",
201
+ actual: exists ? "file exists" : "file does not exist"
202
+ });
203
+ }
204
+ /**
205
+ * Assert that a directory exists.
206
+ *
207
+ * @param path - The directory path to check.
208
+ * @param message - Optional custom assertion message.
209
+ */
210
+ async assertDirectory(path, message) {
211
+ let fullPath = isAbsolutePath(path) ? path : joinPath(this.context.workingDirectory, path), displayPath = relativePath(this.context.workingDirectory, fullPath), exists = await fileExists(fullPath);
212
+ this.assertions.push({
213
+ description: message ?? `Directory exists: ${displayPath}`,
214
+ passed: exists,
215
+ expected: "directory exists",
216
+ actual: exists ? "directory exists" : "directory not found"
217
+ });
218
+ }
219
+ /**
220
+ * Assert that output contains a pattern.
221
+ *
222
+ * @param result - The command result to check.
223
+ * @param pattern - Regex or string pattern to match against output.
224
+ * @param message - Optional custom assertion message.
225
+ */
226
+ assertOutput(result, pattern, message) {
227
+ let matches = (typeof pattern == "string" ? new RegExp(pattern) : pattern).test(result.output);
228
+ this.assertions.push({
229
+ description: message ?? `Output matches ${pattern}`,
230
+ passed: matches,
231
+ expected: `output matching ${pattern}`,
232
+ actual: matches ? "matched" : `output: ${result.output.slice(0, 200)}`
233
+ });
234
+ }
235
+ /**
236
+ * Assert that output contains valid JSON and optionally validate it.
237
+ *
238
+ * @param result - The command result to parse.
239
+ * @param validator - Optional function to validate the parsed JSON.
240
+ * @param message - Optional custom assertion message.
241
+ */
242
+ assertJson(result, validator, message) {
243
+ try {
244
+ let json = JSON.parse(result.stdout);
245
+ if (validator) {
246
+ let valid = validator(json);
247
+ this.assertions.push({
248
+ description: message ?? "Output is valid JSON matching validator",
249
+ passed: valid,
250
+ expected: "valid JSON matching validator",
251
+ actual: valid ? "matched" : "validator returned false"
252
+ });
253
+ } else
254
+ this.assertions.push({
255
+ description: message ?? "Output is valid JSON",
256
+ passed: !0,
257
+ expected: "valid JSON",
258
+ actual: "valid JSON"
259
+ });
260
+ return json;
261
+ } catch {
262
+ this.assertions.push({
263
+ description: message ?? "Output is valid JSON",
264
+ passed: !1,
265
+ expected: "valid JSON",
266
+ actual: `invalid JSON: ${result.stdout.slice(0, 100)}`
267
+ });
268
+ return;
269
+ }
270
+ }
271
+ /**
272
+ * Assert a boolean condition.
273
+ *
274
+ * @param condition - The boolean condition to assert.
275
+ * @param message - The assertion description.
276
+ */
277
+ assert(condition, message) {
278
+ this.assertions.push({
279
+ description: message,
280
+ passed: condition,
281
+ expected: "true",
282
+ actual: String(condition)
283
+ });
284
+ }
285
+ /**
286
+ * Assert two values are equal.
287
+ *
288
+ * @param actual - The actual value.
289
+ * @param expected - The expected value.
290
+ * @param message - The assertion description.
291
+ */
292
+ assertEqual(actual, expected, message) {
293
+ this.assertions.push({
294
+ description: message,
295
+ passed: actual === expected,
296
+ expected: String(expected),
297
+ actual: String(actual)
298
+ });
299
+ }
300
+ hasFailures() {
301
+ return this.assertions.some((assertion) => !assertion.passed);
302
+ }
303
+ };
304
+ DoctorSuite.description = "Doctor test suite";
305
+
306
+ export {
307
+ DoctorSuite
308
+ };
309
+ //# sourceMappingURL=chunk-YNNKYQTJ.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  base_command_default
3
- } from "./chunk-3AY5VBOI.js";
3
+ } from "./chunk-MK3Q63EP.js";
4
4
  import {
5
5
  logout
6
- } from "./chunk-5OJ67VLD.js";
6
+ } from "./chunk-GQKM6ODQ.js";
7
7
  import {
8
8
  outputSuccess
9
- } from "./chunk-LKMGT2DW.js";
9
+ } from "./chunk-4GAP37VN.js";
10
10
  import {
11
11
  init_cjs_shims
12
12
  } from "./chunk-PKR7KJ6P.js";
@@ -25,4 +25,4 @@ var Logout = class extends base_command_default {
25
25
  export {
26
26
  Logout
27
27
  };
28
- //# sourceMappingURL=chunk-GY37RRX5.js.map
28
+ //# sourceMappingURL=chunk-YWLTM6FY.js.map
@@ -7,7 +7,7 @@ import {
7
7
  renderSuccess,
8
8
  renderTable,
9
9
  renderWarning
10
- } from "./chunk-LKMGT2DW.js";
10
+ } from "./chunk-4GAP37VN.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-A2DCUFP3.js.map
206
+ //# sourceMappingURL=chunk-ZSOI4JOG.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  generate
3
- } from "./chunk-3OKBQXPB.js";
3
+ } from "./chunk-L55THCJ4.js";
4
4
  import {
5
5
  base_command_default
6
- } from "./chunk-3AY5VBOI.js";
6
+ } from "./chunk-MK3Q63EP.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-BDQNCT7P.js.map
28
+ //# sourceMappingURL=chunk-ZUHIUKPT.js.map
@@ -1,26 +1,24 @@
1
1
  import {
2
2
  Login
3
- } from "../../../chunk-O74JPOMN.js";
4
- import "../../../chunk-3AY5VBOI.js";
5
- import "../../../chunk-6OAKJOUE.js";
3
+ } from "../../../chunk-ITUVFZZC.js";
4
+ import "../../../chunk-MK3Q63EP.js";
5
+ import "../../../chunk-2QLHWTH2.js";
6
+ import "../../../chunk-GQKM6ODQ.js";
6
7
  import "../../../chunk-SHWOPMLQ.js";
7
- import "../../../chunk-XUHEOC7Y.js";
8
- import "../../../chunk-5OJ67VLD.js";
9
- import "../../../chunk-XD3LXUGW.js";
10
- import "../../../chunk-QHDQYVAG.js";
11
- import "../../../chunk-R2VQQFNU.js";
12
- import "../../../chunk-LKMGT2DW.js";
13
- import "../../../chunk-WC5EDB4Z.js";
14
- import "../../../chunk-HMDWNGIV.js";
8
+ import "../../../chunk-VBBBCVMH.js";
9
+ import "../../../chunk-4EIIOMWN.js";
10
+ import "../../../chunk-M5QR2TOD.js";
11
+ import "../../../chunk-4GAP37VN.js";
12
+ import "../../../chunk-6NVYATES.js";
13
+ import "../../../chunk-CTFDRWUN.js";
14
+ import "../../../chunk-7IK72W75.js";
15
+ import "../../../chunk-3YEPOXGM.js";
15
16
  import "../../../chunk-UMUTXITN.js";
16
17
  import "../../../chunk-KUJQ4AB6.js";
17
- import "../../../chunk-Q2H6D2MH.js";
18
18
  import "../../../chunk-G2ZZKGSV.js";
19
- import "../../../chunk-6ONJEX7Y.js";
20
19
  import "../../../chunk-UV5N2VL7.js";
21
20
  import "../../../chunk-XE5EOEBL.js";
22
- import "../../../chunk-CTFDRWUN.js";
23
- import "../../../chunk-7IK72W75.js";
21
+ import "../../../chunk-Q2H6D2MH.js";
24
22
  import "../../../chunk-EG6MBBEN.js";
25
23
  import "../../../chunk-PKR7KJ6P.js";
26
24
  export {
@@ -1,36 +1,34 @@
1
1
  import {
2
2
  Login,
3
3
  promptSessionSelect
4
- } from "../../../chunk-O74JPOMN.js";
4
+ } from "../../../chunk-ITUVFZZC.js";
5
5
  import {
6
6
  mockAndCaptureOutput
7
- } from "../../../chunk-RYFPG44L.js";
7
+ } from "../../../chunk-4KL3Z7UE.js";
8
8
  import {
9
9
  describe,
10
10
  globalExpect,
11
11
  test,
12
12
  vi
13
- } from "../../../chunk-GPKHDSF5.js";
14
- import "../../../chunk-3AY5VBOI.js";
15
- import "../../../chunk-6OAKJOUE.js";
13
+ } from "../../../chunk-HTGTTXQL.js";
14
+ import "../../../chunk-MK3Q63EP.js";
15
+ import "../../../chunk-2QLHWTH2.js";
16
+ import "../../../chunk-GQKM6ODQ.js";
16
17
  import "../../../chunk-SHWOPMLQ.js";
17
- import "../../../chunk-XUHEOC7Y.js";
18
- import "../../../chunk-5OJ67VLD.js";
19
- import "../../../chunk-XD3LXUGW.js";
20
- import "../../../chunk-QHDQYVAG.js";
21
- import "../../../chunk-R2VQQFNU.js";
22
- import "../../../chunk-LKMGT2DW.js";
23
- import "../../../chunk-WC5EDB4Z.js";
24
- import "../../../chunk-HMDWNGIV.js";
18
+ import "../../../chunk-VBBBCVMH.js";
19
+ import "../../../chunk-4EIIOMWN.js";
20
+ import "../../../chunk-M5QR2TOD.js";
21
+ import "../../../chunk-4GAP37VN.js";
22
+ import "../../../chunk-6NVYATES.js";
23
+ import "../../../chunk-CTFDRWUN.js";
24
+ import "../../../chunk-7IK72W75.js";
25
+ import "../../../chunk-3YEPOXGM.js";
25
26
  import "../../../chunk-UMUTXITN.js";
26
27
  import "../../../chunk-KUJQ4AB6.js";
27
- import "../../../chunk-Q2H6D2MH.js";
28
28
  import "../../../chunk-G2ZZKGSV.js";
29
- import "../../../chunk-6ONJEX7Y.js";
30
29
  import "../../../chunk-UV5N2VL7.js";
31
30
  import "../../../chunk-XE5EOEBL.js";
32
- import "../../../chunk-CTFDRWUN.js";
33
- import "../../../chunk-7IK72W75.js";
31
+ import "../../../chunk-Q2H6D2MH.js";
34
32
  import "../../../chunk-EG6MBBEN.js";
35
33
  import {
36
34
  init_cjs_shims
@@ -1,26 +1,24 @@
1
1
  import {
2
2
  Logout
3
- } from "../../../chunk-GY37RRX5.js";
4
- import "../../../chunk-3AY5VBOI.js";
5
- import "../../../chunk-6OAKJOUE.js";
3
+ } from "../../../chunk-YWLTM6FY.js";
4
+ import "../../../chunk-MK3Q63EP.js";
5
+ import "../../../chunk-2QLHWTH2.js";
6
+ import "../../../chunk-GQKM6ODQ.js";
6
7
  import "../../../chunk-SHWOPMLQ.js";
7
- import "../../../chunk-XUHEOC7Y.js";
8
- import "../../../chunk-5OJ67VLD.js";
9
- import "../../../chunk-XD3LXUGW.js";
10
- import "../../../chunk-QHDQYVAG.js";
11
- import "../../../chunk-R2VQQFNU.js";
12
- import "../../../chunk-LKMGT2DW.js";
13
- import "../../../chunk-WC5EDB4Z.js";
14
- import "../../../chunk-HMDWNGIV.js";
8
+ import "../../../chunk-VBBBCVMH.js";
9
+ import "../../../chunk-4EIIOMWN.js";
10
+ import "../../../chunk-M5QR2TOD.js";
11
+ import "../../../chunk-4GAP37VN.js";
12
+ import "../../../chunk-6NVYATES.js";
13
+ import "../../../chunk-CTFDRWUN.js";
14
+ import "../../../chunk-7IK72W75.js";
15
+ import "../../../chunk-3YEPOXGM.js";
15
16
  import "../../../chunk-UMUTXITN.js";
16
17
  import "../../../chunk-KUJQ4AB6.js";
17
- import "../../../chunk-Q2H6D2MH.js";
18
18
  import "../../../chunk-G2ZZKGSV.js";
19
- import "../../../chunk-6ONJEX7Y.js";
20
19
  import "../../../chunk-UV5N2VL7.js";
21
20
  import "../../../chunk-XE5EOEBL.js";
22
- import "../../../chunk-CTFDRWUN.js";
23
- import "../../../chunk-7IK72W75.js";
21
+ import "../../../chunk-Q2H6D2MH.js";
24
22
  import "../../../chunk-EG6MBBEN.js";
25
23
  import "../../../chunk-PKR7KJ6P.js";
26
24
  export {
@@ -1,37 +1,35 @@
1
1
  import {
2
2
  mockAndCaptureOutput
3
- } from "../../../chunk-RYFPG44L.js";
3
+ } from "../../../chunk-4KL3Z7UE.js";
4
4
  import {
5
5
  Logout
6
- } from "../../../chunk-GY37RRX5.js";
6
+ } from "../../../chunk-YWLTM6FY.js";
7
7
  import {
8
8
  describe,
9
9
  globalExpect,
10
10
  test,
11
11
  vi
12
- } from "../../../chunk-GPKHDSF5.js";
13
- import "../../../chunk-3AY5VBOI.js";
14
- import "../../../chunk-6OAKJOUE.js";
15
- import "../../../chunk-SHWOPMLQ.js";
16
- import "../../../chunk-XUHEOC7Y.js";
12
+ } from "../../../chunk-HTGTTXQL.js";
13
+ import "../../../chunk-MK3Q63EP.js";
14
+ import "../../../chunk-2QLHWTH2.js";
17
15
  import {
18
16
  logout
19
- } from "../../../chunk-5OJ67VLD.js";
20
- import "../../../chunk-XD3LXUGW.js";
21
- import "../../../chunk-QHDQYVAG.js";
22
- import "../../../chunk-R2VQQFNU.js";
23
- import "../../../chunk-LKMGT2DW.js";
24
- import "../../../chunk-WC5EDB4Z.js";
25
- import "../../../chunk-HMDWNGIV.js";
17
+ } from "../../../chunk-GQKM6ODQ.js";
18
+ import "../../../chunk-SHWOPMLQ.js";
19
+ import "../../../chunk-VBBBCVMH.js";
20
+ import "../../../chunk-4EIIOMWN.js";
21
+ import "../../../chunk-M5QR2TOD.js";
22
+ import "../../../chunk-4GAP37VN.js";
23
+ import "../../../chunk-6NVYATES.js";
24
+ import "../../../chunk-CTFDRWUN.js";
25
+ import "../../../chunk-7IK72W75.js";
26
+ import "../../../chunk-3YEPOXGM.js";
26
27
  import "../../../chunk-UMUTXITN.js";
27
28
  import "../../../chunk-KUJQ4AB6.js";
28
- import "../../../chunk-Q2H6D2MH.js";
29
29
  import "../../../chunk-G2ZZKGSV.js";
30
- import "../../../chunk-6ONJEX7Y.js";
31
30
  import "../../../chunk-UV5N2VL7.js";
32
31
  import "../../../chunk-XE5EOEBL.js";
33
- import "../../../chunk-CTFDRWUN.js";
34
- import "../../../chunk-7IK72W75.js";
32
+ import "../../../chunk-Q2H6D2MH.js";
35
33
  import "../../../chunk-EG6MBBEN.js";
36
34
  import {
37
35
  init_cjs_shims