@wundr.io/cli 1.0.1 ā 1.0.3
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/ai/ai-service.d.ts +152 -0
- package/dist/ai/ai-service.d.ts.map +1 -0
- package/dist/ai/ai-service.js +430 -0
- package/dist/ai/ai-service.js.map +1 -0
- package/dist/ai/claude-client.d.ts +130 -0
- package/dist/ai/claude-client.d.ts.map +1 -0
- package/dist/ai/claude-client.js +340 -0
- package/dist/ai/claude-client.js.map +1 -0
- package/dist/ai/conversation-manager.d.ts +164 -0
- package/dist/ai/conversation-manager.d.ts.map +1 -0
- package/dist/ai/conversation-manager.js +614 -0
- package/dist/ai/conversation-manager.js.map +1 -0
- package/dist/ai/index.d.ts +5 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +8 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/cli.d.ts +36 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +192 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/ai.d.ts +89 -0
- package/dist/commands/ai.d.ts.map +1 -0
- package/dist/commands/ai.js +735 -0
- package/dist/commands/ai.js.map +1 -0
- package/dist/commands/alignment.d.ts +78 -0
- package/dist/commands/alignment.d.ts.map +1 -0
- package/dist/commands/alignment.js +817 -0
- package/dist/commands/alignment.js.map +1 -0
- package/dist/commands/analyze-optimized.d.ts +14 -0
- package/dist/commands/analyze-optimized.d.ts.map +1 -0
- package/dist/commands/analyze-optimized.js +440 -0
- package/dist/commands/analyze-optimized.js.map +1 -0
- package/dist/commands/analyze.d.ts +65 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +435 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/batch.d.ts +71 -0
- package/dist/commands/batch.d.ts.map +1 -0
- package/dist/commands/batch.js +738 -0
- package/dist/commands/batch.js.map +1 -0
- package/dist/commands/chat.d.ts +71 -0
- package/dist/commands/chat.d.ts.map +1 -0
- package/dist/commands/chat.js +674 -0
- package/dist/commands/chat.js.map +1 -0
- package/dist/commands/claude-init.d.ts +28 -0
- package/dist/commands/claude-init.d.ts.map +1 -0
- package/dist/commands/claude-init.js +591 -0
- package/dist/commands/claude-init.js.map +1 -0
- package/dist/commands/claude-setup.d.ts +119 -0
- package/dist/commands/claude-setup.d.ts.map +1 -0
- package/dist/commands/claude-setup.js +1073 -0
- package/dist/commands/claude-setup.js.map +1 -0
- package/dist/commands/computer-setup-commands.d.ts +53 -0
- package/dist/commands/computer-setup-commands.d.ts.map +1 -0
- package/dist/commands/computer-setup-commands.js +705 -0
- package/dist/commands/computer-setup-commands.js.map +1 -0
- package/dist/commands/computer-setup.d.ts +7 -0
- package/dist/commands/computer-setup.d.ts.map +1 -0
- package/dist/commands/computer-setup.js +849 -0
- package/dist/commands/computer-setup.js.map +1 -0
- package/dist/commands/create-command.d.ts +7 -0
- package/dist/commands/create-command.d.ts.map +1 -0
- package/dist/commands/create-command.js +158 -0
- package/dist/commands/create-command.js.map +1 -0
- package/dist/commands/create.d.ts +74 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +556 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dashboard.d.ts +91 -0
- package/dist/commands/dashboard.d.ts.map +1 -0
- package/dist/commands/dashboard.js +538 -0
- package/dist/commands/dashboard.js.map +1 -0
- package/dist/commands/govern.d.ts +70 -0
- package/dist/commands/govern.d.ts.map +1 -0
- package/dist/commands/govern.js +481 -0
- package/dist/commands/govern.js.map +1 -0
- package/dist/commands/governance.d.ts +17 -0
- package/dist/commands/governance.d.ts.map +1 -0
- package/dist/commands/governance.js +703 -0
- package/dist/commands/governance.js.map +1 -0
- package/dist/commands/guardian.d.ts +20 -0
- package/dist/commands/guardian.d.ts.map +1 -0
- package/dist/commands/guardian.js +597 -0
- package/dist/commands/guardian.js.map +1 -0
- package/dist/commands/init.d.ts +59 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +650 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/performance-optimizer.d.ts +30 -0
- package/dist/commands/performance-optimizer.d.ts.map +1 -0
- package/dist/commands/performance-optimizer.js +650 -0
- package/dist/commands/performance-optimizer.js.map +1 -0
- package/dist/commands/plugins.d.ts +87 -0
- package/dist/commands/plugins.d.ts.map +1 -0
- package/dist/commands/plugins.js +685 -0
- package/dist/commands/plugins.js.map +1 -0
- package/dist/commands/rag.d.ts +7 -0
- package/dist/commands/rag.d.ts.map +1 -0
- package/dist/commands/rag.js +748 -0
- package/dist/commands/rag.js.map +1 -0
- package/dist/commands/session.d.ts +41 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +441 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/setup.d.ts +29 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +397 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/test-init.d.ts +9 -0
- package/dist/commands/test-init.d.ts.map +1 -0
- package/dist/commands/test-init.js +222 -0
- package/dist/commands/test-init.js.map +1 -0
- package/dist/commands/test.d.ts +25 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +217 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/vp.d.ts +7 -0
- package/dist/commands/vp.d.ts.map +1 -0
- package/dist/commands/vp.js +571 -0
- package/dist/commands/vp.js.map +1 -0
- package/dist/commands/watch.d.ts +76 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +613 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/worktree.d.ts +63 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +774 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/context/context-manager.d.ts +155 -0
- package/dist/context/context-manager.d.ts.map +1 -0
- package/dist/context/context-manager.js +383 -0
- package/dist/context/context-manager.js.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +6 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/session-manager.d.ts +207 -0
- package/dist/context/session-manager.d.ts.map +1 -0
- package/dist/context/session-manager.js +686 -0
- package/dist/context/session-manager.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/interactive/interactive-mode.d.ts +76 -0
- package/dist/interactive/interactive-mode.d.ts.map +1 -0
- package/dist/interactive/interactive-mode.js +732 -0
- package/dist/interactive/interactive-mode.js.map +1 -0
- package/dist/nlp/command-mapper.d.ts +174 -0
- package/dist/nlp/command-mapper.d.ts.map +1 -0
- package/dist/nlp/command-mapper.js +624 -0
- package/dist/nlp/command-mapper.js.map +1 -0
- package/dist/nlp/command-parser.d.ts +106 -0
- package/dist/nlp/command-parser.d.ts.map +1 -0
- package/dist/nlp/command-parser.js +417 -0
- package/dist/nlp/command-parser.js.map +1 -0
- package/dist/nlp/index.d.ts +5 -0
- package/dist/nlp/index.d.ts.map +1 -0
- package/dist/nlp/index.js +8 -0
- package/dist/nlp/index.js.map +1 -0
- package/dist/nlp/intent-classifier.d.ts +59 -0
- package/dist/nlp/intent-classifier.d.ts.map +1 -0
- package/dist/nlp/intent-classifier.js +384 -0
- package/dist/nlp/intent-classifier.js.map +1 -0
- package/dist/nlp/intent-parser.d.ts +152 -0
- package/dist/nlp/intent-parser.d.ts.map +1 -0
- package/dist/nlp/intent-parser.js +744 -0
- package/dist/nlp/intent-parser.js.map +1 -0
- package/dist/plugins/plugin-manager.d.ts +120 -0
- package/dist/plugins/plugin-manager.d.ts.map +1 -0
- package/dist/plugins/plugin-manager.js +595 -0
- package/dist/plugins/plugin-manager.js.map +1 -0
- package/dist/types/index.d.ts +224 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/backup-rollback-manager.d.ts +72 -0
- package/dist/utils/backup-rollback-manager.d.ts.map +1 -0
- package/dist/utils/backup-rollback-manager.js +289 -0
- package/dist/utils/backup-rollback-manager.js.map +1 -0
- package/dist/utils/claude-config-installer.d.ts +94 -0
- package/dist/utils/claude-config-installer.d.ts.map +1 -0
- package/dist/utils/claude-config-installer.js +628 -0
- package/dist/utils/claude-config-installer.js.map +1 -0
- package/dist/utils/config-manager.d.ts +73 -0
- package/dist/utils/config-manager.d.ts.map +1 -0
- package/dist/utils/config-manager.js +339 -0
- package/dist/utils/config-manager.js.map +1 -0
- package/dist/utils/error-handler.d.ts +46 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +169 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/logger.d.ts +25 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +105 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +23 -4
- package/src/ai/ai-service.ts +22 -19
- package/src/ai/claude-client.ts +20 -16
- package/src/ai/conversation-manager.ts +37 -30
- package/src/cli.ts +42 -13
- package/src/commands/ai.ts +59 -57
- package/src/commands/alignment.ts +1212 -0
- package/src/commands/analyze-optimized.ts +70 -62
- package/src/commands/analyze.ts +22 -20
- package/src/commands/batch.ts +41 -38
- package/src/commands/chat.ts +37 -34
- package/src/commands/claude-init.ts +38 -30
- package/src/commands/claude-setup.ts +692 -97
- package/src/commands/computer-setup-commands.ts +45 -39
- package/src/commands/computer-setup.ts +474 -4
- package/src/commands/create-command.ts +7 -7
- package/src/commands/create.ts +36 -33
- package/src/commands/dashboard.ts +33 -28
- package/src/commands/govern.ts +34 -29
- package/src/commands/governance.ts +1005 -0
- package/src/commands/guardian.ts +887 -0
- package/src/commands/init.ts +112 -22
- package/src/commands/performance-optimizer.ts +48 -42
- package/src/commands/plugins.ts +35 -32
- package/src/commands/project-update.ts +1053 -0
- package/src/commands/rag.ts +904 -0
- package/src/commands/session.ts +631 -0
- package/src/commands/setup.ts +35 -31
- package/src/commands/test-init.ts +6 -5
- package/src/commands/test.ts +7 -6
- package/src/commands/vp.ts +762 -0
- package/src/commands/watch.ts +44 -33
- package/src/commands/worktree.ts +1057 -0
- package/src/context/context-manager.ts +15 -12
- package/src/context/session-manager.ts +51 -40
- package/src/index.ts +7 -6
- package/src/interactive/interactive-mode.ts +25 -18
- package/src/lib/conflict-resolution.ts +28 -0
- package/src/lib/merge-strategy.ts +28 -0
- package/src/lib/safety-mechanisms.ts +47 -0
- package/src/lib/state-detection.ts +28 -0
- package/src/nlp/command-mapper.ts +35 -30
- package/src/nlp/command-parser.ts +20 -17
- package/src/nlp/intent-classifier.ts +7 -7
- package/src/nlp/intent-parser.ts +61 -49
- package/src/plugins/plugin-manager.ts +27 -23
- package/src/types/index.ts +1 -1
- package/src/types/modules.d.ts +1 -0
- package/src/utils/backup-rollback-manager.ts +13 -11
- package/src/utils/claude-config-installer.ts +18 -16
- package/src/utils/config-manager.ts +12 -9
- package/src/utils/error-handler.ts +5 -3
- package/src/utils/logger.ts +35 -12
package/src/commands/setup.ts
CHANGED
|
@@ -3,21 +3,25 @@
|
|
|
3
3
|
* Provides the primary wundr setup commands that integrate with computer-setup
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { Command } from 'commander';
|
|
7
6
|
import chalk from 'chalk';
|
|
8
|
-
import ora from 'ora';
|
|
9
7
|
import inquirer from 'inquirer';
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
import { logger } from '../utils/logger';
|
|
13
|
-
// Note: Using relative path import due to workspace resolution issues in this monorepo setup
|
|
14
|
-
// The computer-setup package must be built first before building this CLI package
|
|
8
|
+
import ora from 'ora';
|
|
9
|
+
|
|
15
10
|
import {
|
|
16
|
-
SetupPlatform,
|
|
17
|
-
SetupProgress,
|
|
18
|
-
SetupResult,
|
|
19
11
|
RealSetupOrchestrator,
|
|
20
12
|
} from '../../../computer-setup/dist';
|
|
13
|
+
import { logger } from '../utils/logger';
|
|
14
|
+
|
|
15
|
+
import type {
|
|
16
|
+
SetupPlatform,
|
|
17
|
+
SetupProgress,
|
|
18
|
+
SetupResult} from '../../../computer-setup/dist';
|
|
19
|
+
import type { PluginManager } from '../plugins/plugin-manager';
|
|
20
|
+
import type { ConfigManager } from '../utils/config-manager';
|
|
21
|
+
|
|
22
|
+
// Note: Using relative path import due to workspace resolution issues in this monorepo setup
|
|
23
|
+
// The computer-setup package must be built first before building this CLI package
|
|
24
|
+
import type { Command } from 'commander';
|
|
21
25
|
|
|
22
26
|
export class SetupCommands {
|
|
23
27
|
private orchestrator: RealSetupOrchestrator;
|
|
@@ -26,7 +30,7 @@ export class SetupCommands {
|
|
|
26
30
|
constructor(
|
|
27
31
|
private program: Command,
|
|
28
32
|
private configManager: ConfigManager,
|
|
29
|
-
private pluginManager: PluginManager
|
|
33
|
+
private pluginManager: PluginManager,
|
|
30
34
|
) {
|
|
31
35
|
this.platform = this.detectPlatform();
|
|
32
36
|
this.orchestrator = new RealSetupOrchestrator(this.platform);
|
|
@@ -41,11 +45,11 @@ export class SetupCommands {
|
|
|
41
45
|
.option(
|
|
42
46
|
'-p, --profile <profile>',
|
|
43
47
|
'Use specific profile (frontend, backend, fullstack, devops)',
|
|
44
|
-
'fullstack'
|
|
48
|
+
'fullstack',
|
|
45
49
|
)
|
|
46
50
|
.option(
|
|
47
51
|
'--dry-run',
|
|
48
|
-
'Show what would be installed without making changes'
|
|
52
|
+
'Show what would be installed without making changes',
|
|
49
53
|
)
|
|
50
54
|
.option('--interactive', 'Run in interactive mode')
|
|
51
55
|
.action(async options => {
|
|
@@ -145,7 +149,7 @@ export class SetupCommands {
|
|
|
145
149
|
|
|
146
150
|
// Try different matching strategies
|
|
147
151
|
let profile = availableProfiles.find(
|
|
148
|
-
p => p.name.toLowerCase() === profileName.toLowerCase()
|
|
152
|
+
p => p.name.toLowerCase() === profileName.toLowerCase(),
|
|
149
153
|
);
|
|
150
154
|
|
|
151
155
|
if (!profile) {
|
|
@@ -155,7 +159,7 @@ export class SetupCommands {
|
|
|
155
159
|
p.name.toLowerCase().includes(profileName.toLowerCase()) ||
|
|
156
160
|
profileName
|
|
157
161
|
.toLowerCase()
|
|
158
|
-
.includes(p.name.toLowerCase().split(' ')[0])
|
|
162
|
+
.includes(p.name.toLowerCase().split(' ')[0]),
|
|
159
163
|
);
|
|
160
164
|
}
|
|
161
165
|
|
|
@@ -180,23 +184,23 @@ export class SetupCommands {
|
|
|
180
184
|
console.log(chalk.cyan('\nš Available profiles:'));
|
|
181
185
|
availableProfiles.forEach(p =>
|
|
182
186
|
console.log(
|
|
183
|
-
` ⢠${chalk.white(p.name)}: ${chalk.gray(p.description)}
|
|
184
|
-
)
|
|
187
|
+
` ⢠${chalk.white(p.name)}: ${chalk.gray(p.description)}`,
|
|
188
|
+
),
|
|
185
189
|
);
|
|
186
190
|
return;
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
console.log(
|
|
190
|
-
chalk.cyan(`\nš Selected Profile: ${chalk.white(profile.name)}`)
|
|
194
|
+
chalk.cyan(`\nš Selected Profile: ${chalk.white(profile.name)}`),
|
|
191
195
|
);
|
|
192
196
|
console.log(chalk.gray(`${profile.description}`));
|
|
193
197
|
console.log(
|
|
194
|
-
chalk.gray(`Estimated time: ${profile.estimatedTimeMinutes} minutes\n`)
|
|
198
|
+
chalk.gray(`Estimated time: ${profile.estimatedTimeMinutes} minutes\n`),
|
|
195
199
|
);
|
|
196
200
|
|
|
197
201
|
if (options.dryRun) {
|
|
198
202
|
console.log(
|
|
199
|
-
chalk.yellow('š DRY RUN - Showing what would be installed:\n')
|
|
203
|
+
chalk.yellow('š DRY RUN - Showing what would be installed:\n'),
|
|
200
204
|
);
|
|
201
205
|
console.log(chalk.cyan('Required tools:'));
|
|
202
206
|
profile.requiredTools.forEach(tool => console.log(` ā ${tool}`));
|
|
@@ -213,7 +217,7 @@ export class SetupCommands {
|
|
|
213
217
|
process.stdout.cursorTo(0);
|
|
214
218
|
const progressBar = this.createProgressBar(progress.percentage);
|
|
215
219
|
process.stdout.write(
|
|
216
|
-
`${progressBar} ${progress.percentage.toFixed(1)}% - ${progress.currentStep}
|
|
220
|
+
`${progressBar} ${progress.percentage.toFixed(1)}% - ${progress.currentStep}`,
|
|
217
221
|
);
|
|
218
222
|
};
|
|
219
223
|
|
|
@@ -227,7 +231,7 @@ export class SetupCommands {
|
|
|
227
231
|
parallel: false,
|
|
228
232
|
generateReport: true,
|
|
229
233
|
},
|
|
230
|
-
progressCallback
|
|
234
|
+
progressCallback,
|
|
231
235
|
);
|
|
232
236
|
|
|
233
237
|
console.log('\n'); // New line after progress
|
|
@@ -235,7 +239,7 @@ export class SetupCommands {
|
|
|
235
239
|
if (result.success) {
|
|
236
240
|
console.log(chalk.green('\nā
Setup completed successfully!'));
|
|
237
241
|
console.log(
|
|
238
|
-
chalk.gray(`Duration: ${Math.round(result.duration / 1000)}s\n`)
|
|
242
|
+
chalk.gray(`Duration: ${Math.round(result.duration / 1000)}s\n`),
|
|
239
243
|
);
|
|
240
244
|
|
|
241
245
|
this.showSetupSummary(result);
|
|
@@ -311,7 +315,7 @@ export class SetupCommands {
|
|
|
311
315
|
await this.runSetup({ profile: options.profile || 'fullstack' });
|
|
312
316
|
} else {
|
|
313
317
|
console.log(
|
|
314
|
-
chalk.cyan('\nš” Fix issues with: wundr setup:validate --fix')
|
|
318
|
+
chalk.cyan('\nš” Fix issues with: wundr setup:validate --fix'),
|
|
315
319
|
);
|
|
316
320
|
}
|
|
317
321
|
} else {
|
|
@@ -327,7 +331,7 @@ export class SetupCommands {
|
|
|
327
331
|
process.stdout.cursorTo(0);
|
|
328
332
|
const progressBar = this.createProgressBar(progress.percentage);
|
|
329
333
|
process.stdout.write(
|
|
330
|
-
`${progressBar} ${progress.percentage.toFixed(1)}% - ${progress.currentStep}
|
|
334
|
+
`${progressBar} ${progress.percentage.toFixed(1)}% - ${progress.currentStep}`,
|
|
331
335
|
);
|
|
332
336
|
};
|
|
333
337
|
|
|
@@ -388,7 +392,7 @@ export class SetupCommands {
|
|
|
388
392
|
try {
|
|
389
393
|
await this.runCommand(`git config --global user.name "${answers.name}"`);
|
|
390
394
|
await this.runCommand(
|
|
391
|
-
`git config --global user.email "${answers.email}"
|
|
395
|
+
`git config --global user.email "${answers.email}"`,
|
|
392
396
|
);
|
|
393
397
|
console.log(chalk.green('ā
Git configured'));
|
|
394
398
|
} catch (error) {
|
|
@@ -432,7 +436,7 @@ export class SetupCommands {
|
|
|
432
436
|
private showSetupSummary(result: SetupResult): void {
|
|
433
437
|
if (result.completedSteps.length > 0) {
|
|
434
438
|
console.log(
|
|
435
|
-
chalk.cyan(`šÆ Completed (${result.completedSteps.length}):`)
|
|
439
|
+
chalk.cyan(`šÆ Completed (${result.completedSteps.length}):`),
|
|
436
440
|
);
|
|
437
441
|
result.completedSteps
|
|
438
442
|
.slice(0, 5)
|
|
@@ -444,14 +448,14 @@ export class SetupCommands {
|
|
|
444
448
|
|
|
445
449
|
if (result.skippedSteps.length > 0) {
|
|
446
450
|
console.log(
|
|
447
|
-
chalk.yellow(`\nāļø Skipped (${result.skippedSteps.length}):`)
|
|
451
|
+
chalk.yellow(`\nāļø Skipped (${result.skippedSteps.length}):`),
|
|
448
452
|
);
|
|
449
453
|
result.skippedSteps
|
|
450
454
|
.slice(0, 3)
|
|
451
455
|
.forEach(step =>
|
|
452
456
|
console.log(
|
|
453
|
-
` āļø ${step.replace('install-', '')} (already installed)
|
|
454
|
-
)
|
|
457
|
+
` āļø ${step.replace('install-', '')} (already installed)`,
|
|
458
|
+
),
|
|
455
459
|
);
|
|
456
460
|
}
|
|
457
461
|
}
|
|
@@ -460,7 +464,7 @@ export class SetupCommands {
|
|
|
460
464
|
if (result.failedSteps.length > 0) {
|
|
461
465
|
console.log(chalk.red(`ā Failed (${result.failedSteps.length}):`));
|
|
462
466
|
result.failedSteps.forEach(step =>
|
|
463
|
-
console.log(` ā ${step.replace('install-', '')}`)
|
|
467
|
+
console.log(` ā ${step.replace('install-', '')}`),
|
|
464
468
|
);
|
|
465
469
|
}
|
|
466
470
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
2
3
|
import chalk from 'chalk';
|
|
4
|
+
import { Command } from 'commander';
|
|
3
5
|
import fs from 'fs-extra';
|
|
4
|
-
import path from 'path';
|
|
5
6
|
import inquirer from 'inquirer';
|
|
6
7
|
|
|
7
8
|
export class TestInitCommand {
|
|
@@ -70,7 +71,7 @@ export class TestInitCommand {
|
|
|
70
71
|
await fs.writeFile(configPath, config);
|
|
71
72
|
|
|
72
73
|
console.log(
|
|
73
|
-
chalk.green('\nā
Test configuration created: wundr-test.config.js')
|
|
74
|
+
chalk.green('\nā
Test configuration created: wundr-test.config.js'),
|
|
74
75
|
);
|
|
75
76
|
|
|
76
77
|
// Add package.json scripts
|
|
@@ -224,8 +225,8 @@ jobs:
|
|
|
224
225
|
|
|
225
226
|
console.log(
|
|
226
227
|
chalk.green(
|
|
227
|
-
'ā
Created GitHub Actions workflow: .github/workflows/wundr-tests.yml'
|
|
228
|
-
)
|
|
228
|
+
'ā
Created GitHub Actions workflow: .github/workflows/wundr-tests.yml',
|
|
229
|
+
),
|
|
229
230
|
);
|
|
230
231
|
}
|
|
231
232
|
}
|
package/src/commands/test.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Command } from 'commander';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
1
|
import { spawn } from 'child_process';
|
|
4
2
|
import path from 'path';
|
|
3
|
+
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { Command } from 'commander';
|
|
5
6
|
import fs from 'fs-extra';
|
|
6
7
|
import ora from 'ora';
|
|
7
8
|
|
|
@@ -133,7 +134,7 @@ export default defineConfig({
|
|
|
133
134
|
|
|
134
135
|
await fs.writeFile(
|
|
135
136
|
path.join(config.outputDir, 'playwright.config.ts'),
|
|
136
|
-
playwrightConfig
|
|
137
|
+
playwrightConfig,
|
|
137
138
|
);
|
|
138
139
|
}
|
|
139
140
|
|
|
@@ -190,7 +191,7 @@ export default defineConfig({
|
|
|
190
191
|
|
|
191
192
|
// Check for Jest or Vitest
|
|
192
193
|
const packageJson = await fs.readJson(
|
|
193
|
-
path.join(process.cwd(), 'package.json')
|
|
194
|
+
path.join(process.cwd(), 'package.json'),
|
|
194
195
|
);
|
|
195
196
|
|
|
196
197
|
if (packageJson.scripts?.test) {
|
|
@@ -234,11 +235,11 @@ export function createTestCommand(): Command {
|
|
|
234
235
|
.option(
|
|
235
236
|
'-t, --type <type>',
|
|
236
237
|
'Type of tests to run (ui, api, unit, all)',
|
|
237
|
-
'all'
|
|
238
|
+
'all',
|
|
238
239
|
)
|
|
239
240
|
.option(
|
|
240
241
|
'-b, --browser <browser>',
|
|
241
|
-
'Browser to use (chromium, firefox, webkit)'
|
|
242
|
+
'Browser to use (chromium, firefox, webkit)',
|
|
242
243
|
)
|
|
243
244
|
.option('--headed', 'Run tests in headed mode')
|
|
244
245
|
.option('--base-url <url>', 'Base URL for the application')
|