@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/watch.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import { watch, FSWatcher } from 'chokidar';
|
|
3
|
-
import fs from 'fs-extra';
|
|
1
|
+
|
|
4
2
|
import path from 'path';
|
|
3
|
+
|
|
5
4
|
import chalk from 'chalk';
|
|
5
|
+
import { watch } from 'chokidar';
|
|
6
|
+
import fs from 'fs-extra';
|
|
6
7
|
import YAML from 'yaml';
|
|
7
|
-
|
|
8
|
-
import { PluginManager } from '../plugins/plugin-manager';
|
|
9
|
-
import { logger } from '../utils/logger';
|
|
8
|
+
|
|
10
9
|
import { errorHandler } from '../utils/error-handler';
|
|
11
|
-
import {
|
|
10
|
+
import { logger } from '../utils/logger';
|
|
11
|
+
|
|
12
|
+
import type { PluginManager } from '../plugins/plugin-manager';
|
|
13
|
+
import type { WatchConfig, WatchCommand } from '../types';
|
|
14
|
+
import type { ConfigManager } from '../utils/config-manager';
|
|
15
|
+
import type { FSWatcher } from 'chokidar';
|
|
16
|
+
import type { Command } from 'commander';
|
|
12
17
|
|
|
13
18
|
/**
|
|
14
19
|
* Watch commands for real-time monitoring
|
|
@@ -20,7 +25,7 @@ export class WatchCommands {
|
|
|
20
25
|
constructor(
|
|
21
26
|
private program: Command,
|
|
22
27
|
private configManager: ConfigManager,
|
|
23
|
-
private pluginManager: PluginManager
|
|
28
|
+
private pluginManager: PluginManager,
|
|
24
29
|
) {
|
|
25
30
|
this.registerCommands();
|
|
26
31
|
}
|
|
@@ -102,7 +107,7 @@ export class WatchCommands {
|
|
|
102
107
|
.option(
|
|
103
108
|
'--framework <framework>',
|
|
104
109
|
'test framework (jest, mocha, vitest)',
|
|
105
|
-
'jest'
|
|
110
|
+
'jest',
|
|
106
111
|
)
|
|
107
112
|
.option('--coverage', 'run with coverage')
|
|
108
113
|
.option('--changed-only', 'run tests for changed files only')
|
|
@@ -137,7 +142,7 @@ export class WatchCommands {
|
|
|
137
142
|
.option(
|
|
138
143
|
'--type <type>',
|
|
139
144
|
'analysis type (quality, deps, security)',
|
|
140
|
-
'quality'
|
|
145
|
+
'quality',
|
|
141
146
|
)
|
|
142
147
|
.option('--threshold <threshold>', 'quality threshold')
|
|
143
148
|
.action(async options => {
|
|
@@ -185,7 +190,7 @@ export class WatchCommands {
|
|
|
185
190
|
'WUNDR_WATCH_START_FAILED',
|
|
186
191
|
'Failed to start watching',
|
|
187
192
|
{ patterns, options },
|
|
188
|
-
true
|
|
193
|
+
true,
|
|
189
194
|
);
|
|
190
195
|
}
|
|
191
196
|
}
|
|
@@ -220,7 +225,7 @@ export class WatchCommands {
|
|
|
220
225
|
'WUNDR_WATCH_STOP_FAILED',
|
|
221
226
|
'Failed to stop watching',
|
|
222
227
|
{ name },
|
|
223
|
-
true
|
|
228
|
+
true,
|
|
224
229
|
);
|
|
225
230
|
}
|
|
226
231
|
}
|
|
@@ -243,7 +248,7 @@ export class WatchCommands {
|
|
|
243
248
|
Patterns: config.patterns.join(', '),
|
|
244
249
|
Commands: config.commands.length,
|
|
245
250
|
Debounce: `${config.debounce || 300}ms`,
|
|
246
|
-
})
|
|
251
|
+
}),
|
|
247
252
|
);
|
|
248
253
|
|
|
249
254
|
console.table(watchData);
|
|
@@ -252,7 +257,7 @@ export class WatchCommands {
|
|
|
252
257
|
'WUNDR_WATCH_LIST_FAILED',
|
|
253
258
|
'Failed to list watches',
|
|
254
259
|
{},
|
|
255
|
-
true
|
|
260
|
+
true,
|
|
256
261
|
);
|
|
257
262
|
}
|
|
258
263
|
}
|
|
@@ -276,7 +281,7 @@ export class WatchCommands {
|
|
|
276
281
|
console.log(`Commands: ${config.commands.length}`);
|
|
277
282
|
console.log(`Debounce: ${config.debounce || 300}ms`);
|
|
278
283
|
console.log(
|
|
279
|
-
`Watched Paths: ${Object.keys(watcher.getWatched()).length}
|
|
284
|
+
`Watched Paths: ${Object.keys(watcher.getWatched()).length}`,
|
|
280
285
|
);
|
|
281
286
|
} else {
|
|
282
287
|
console.log(chalk.blue('\nAll Watches Status:'));
|
|
@@ -292,7 +297,7 @@ export class WatchCommands {
|
|
|
292
297
|
'WUNDR_WATCH_STATUS_FAILED',
|
|
293
298
|
'Failed to show watch status',
|
|
294
299
|
{ name },
|
|
295
|
-
true
|
|
300
|
+
true,
|
|
296
301
|
);
|
|
297
302
|
}
|
|
298
303
|
}
|
|
@@ -321,7 +326,7 @@ export class WatchCommands {
|
|
|
321
326
|
process.cwd(),
|
|
322
327
|
'.wundr',
|
|
323
328
|
'watch',
|
|
324
|
-
`${name}.yaml
|
|
329
|
+
`${name}.yaml`,
|
|
325
330
|
);
|
|
326
331
|
await fs.ensureDir(path.dirname(configPath));
|
|
327
332
|
await fs.writeFile(configPath, YAML.stringify(config));
|
|
@@ -332,7 +337,7 @@ export class WatchCommands {
|
|
|
332
337
|
'WUNDR_WATCH_CONFIG_CREATE_FAILED',
|
|
333
338
|
'Failed to create watch configuration',
|
|
334
339
|
{ name, options },
|
|
335
|
-
true
|
|
340
|
+
true,
|
|
336
341
|
);
|
|
337
342
|
}
|
|
338
343
|
}
|
|
@@ -352,7 +357,7 @@ export class WatchCommands {
|
|
|
352
357
|
'WUNDR_WATCH_CONFIG_LOAD_FAILED',
|
|
353
358
|
'Failed to load watch configuration',
|
|
354
359
|
{ file },
|
|
355
|
-
true
|
|
360
|
+
true,
|
|
356
361
|
);
|
|
357
362
|
}
|
|
358
363
|
}
|
|
@@ -378,7 +383,7 @@ export class WatchCommands {
|
|
|
378
383
|
'WUNDR_WATCH_CONFIG_SAVE_FAILED',
|
|
379
384
|
'Failed to save watch configuration',
|
|
380
385
|
{ name, file },
|
|
381
|
-
true
|
|
386
|
+
true,
|
|
382
387
|
);
|
|
383
388
|
}
|
|
384
389
|
}
|
|
@@ -409,7 +414,7 @@ export class WatchCommands {
|
|
|
409
414
|
'WUNDR_WATCH_TEST_FAILED',
|
|
410
415
|
'Failed to start test watcher',
|
|
411
416
|
{ options },
|
|
412
|
-
true
|
|
417
|
+
true,
|
|
413
418
|
);
|
|
414
419
|
}
|
|
415
420
|
}
|
|
@@ -440,7 +445,7 @@ export class WatchCommands {
|
|
|
440
445
|
'WUNDR_WATCH_BUILD_FAILED',
|
|
441
446
|
'Failed to start build watcher',
|
|
442
447
|
{ options },
|
|
443
|
-
true
|
|
448
|
+
true,
|
|
444
449
|
);
|
|
445
450
|
}
|
|
446
451
|
}
|
|
@@ -471,7 +476,7 @@ export class WatchCommands {
|
|
|
471
476
|
'WUNDR_WATCH_LINT_FAILED',
|
|
472
477
|
'Failed to start lint watcher',
|
|
473
478
|
{ options },
|
|
474
|
-
true
|
|
479
|
+
true,
|
|
475
480
|
);
|
|
476
481
|
}
|
|
477
482
|
}
|
|
@@ -502,7 +507,7 @@ export class WatchCommands {
|
|
|
502
507
|
'WUNDR_WATCH_ANALYSIS_FAILED',
|
|
503
508
|
'Failed to start analysis watcher',
|
|
504
509
|
{ options },
|
|
505
|
-
true
|
|
510
|
+
true,
|
|
506
511
|
);
|
|
507
512
|
}
|
|
508
513
|
}
|
|
@@ -513,11 +518,11 @@ export class WatchCommands {
|
|
|
513
518
|
private setupWatchHandlers(
|
|
514
519
|
watcher: FSWatcher,
|
|
515
520
|
config: WatchConfig,
|
|
516
|
-
name: string
|
|
521
|
+
name: string,
|
|
517
522
|
): void {
|
|
518
523
|
const executeCommands = async (eventType: string, filePath: string) => {
|
|
519
524
|
const relevantCommands = config.commands.filter(
|
|
520
|
-
cmd => cmd.trigger === eventType || cmd.trigger === 'change'
|
|
525
|
+
cmd => cmd.trigger === eventType || cmd.trigger === 'change',
|
|
521
526
|
);
|
|
522
527
|
|
|
523
528
|
for (const cmd of relevantCommands) {
|
|
@@ -552,7 +557,9 @@ export class WatchCommands {
|
|
|
552
557
|
}
|
|
553
558
|
|
|
554
559
|
private shouldExecuteCommand(cmd: WatchCommand, filePath: string): boolean {
|
|
555
|
-
if (!cmd.condition)
|
|
560
|
+
if (!cmd.condition) {
|
|
561
|
+
return true;
|
|
562
|
+
}
|
|
556
563
|
|
|
557
564
|
// Implement condition checking logic
|
|
558
565
|
switch (cmd.condition) {
|
|
@@ -571,7 +578,7 @@ export class WatchCommands {
|
|
|
571
578
|
|
|
572
579
|
private async executeWatchCommand(
|
|
573
580
|
cmd: WatchCommand,
|
|
574
|
-
filePath: string
|
|
581
|
+
filePath: string,
|
|
575
582
|
): Promise<void> {
|
|
576
583
|
try {
|
|
577
584
|
logger.info(`Executing: ${cmd.command}`);
|
|
@@ -607,7 +614,7 @@ export class WatchCommands {
|
|
|
607
614
|
|
|
608
615
|
private createWatchConfigFromOptions(
|
|
609
616
|
patterns: string[],
|
|
610
|
-
options: any
|
|
617
|
+
options: any,
|
|
611
618
|
): WatchConfig {
|
|
612
619
|
return {
|
|
613
620
|
patterns: patterns.length > 0 ? patterns : ['**/*'],
|
|
@@ -644,7 +651,7 @@ export class WatchCommands {
|
|
|
644
651
|
|
|
645
652
|
private async startWatchingWithConfig(
|
|
646
653
|
name: string,
|
|
647
|
-
config: WatchConfig
|
|
654
|
+
config: WatchConfig,
|
|
648
655
|
): Promise<void> {
|
|
649
656
|
const watcher = watch(config.patterns, {
|
|
650
657
|
ignored: config.ignore || [],
|
|
@@ -728,11 +735,15 @@ export class WatchCommands {
|
|
|
728
735
|
}
|
|
729
736
|
|
|
730
737
|
private getTestCommand(framework: string, options: any): string {
|
|
731
|
-
const baseCmd = framework === 'npm' ?
|
|
738
|
+
const baseCmd = framework === 'npm' ? 'npm test' : `npx ${framework}`;
|
|
732
739
|
const flags: string[] = [];
|
|
733
740
|
|
|
734
|
-
if (options.coverage)
|
|
735
|
-
|
|
741
|
+
if (options.coverage) {
|
|
742
|
+
flags.push('--coverage');
|
|
743
|
+
}
|
|
744
|
+
if (options.changedOnly) {
|
|
745
|
+
flags.push('--changedSince=HEAD');
|
|
746
|
+
}
|
|
736
747
|
|
|
737
748
|
return `${baseCmd} ${flags.join(' ')}`;
|
|
738
749
|
}
|