@testspectra/cli 1.0.38 → 1.0.40
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/commands/init.js
CHANGED
|
@@ -291,7 +291,7 @@ export async function initCommand(options = {}) {
|
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
293
|
// --- MONOREPO INTERACTIVE FLOW ---
|
|
294
|
-
if (templateName === "nx"
|
|
294
|
+
if (templateName === "nx") {
|
|
295
295
|
let chosenProjects = [];
|
|
296
296
|
if (options.force) {
|
|
297
297
|
chosenProjects = detectedProjects.map((p) => p.relPath);
|
|
@@ -314,6 +314,34 @@ export async function initCommand(options = {}) {
|
|
|
314
314
|
}
|
|
315
315
|
chosenProjects = projectChoices;
|
|
316
316
|
}
|
|
317
|
+
else {
|
|
318
|
+
// No packages auto-detected — ask user to manually enter feature names
|
|
319
|
+
p.log.warn(chalk.yellow("No feature packages found in workspace. You can enter feature names to scaffold."));
|
|
320
|
+
const featureNamesInput = await p.text({
|
|
321
|
+
message: "Enter feature module names (comma-separated), or leave blank to skip:",
|
|
322
|
+
placeholder: "auth, catalog, payment",
|
|
323
|
+
defaultValue: "",
|
|
324
|
+
});
|
|
325
|
+
if (p.isCancel(featureNamesInput)) {
|
|
326
|
+
p.cancel("Setup cancelled.");
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
const raw = featureNamesInput.trim();
|
|
330
|
+
if (raw) {
|
|
331
|
+
// Build relPaths from feature names using a sensible default location
|
|
332
|
+
const featureBaseInput = await p.text({
|
|
333
|
+
message: "Enter base directory for feature modules:",
|
|
334
|
+
placeholder: "packages/features",
|
|
335
|
+
defaultValue: "packages/features",
|
|
336
|
+
});
|
|
337
|
+
if (p.isCancel(featureBaseInput)) {
|
|
338
|
+
p.cancel("Setup cancelled.");
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const featureBase = featureBaseInput.trim() || "packages/features";
|
|
342
|
+
chosenProjects = raw.split(",").map((n) => `${featureBase}/${n.trim()}`).filter(Boolean);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
317
345
|
let e2eFolderName = "e2e";
|
|
318
346
|
let sharedTestingRelPath = "shared/testing";
|
|
319
347
|
if (!options.force) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testspectra/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "TestSpectra Zero-Config Cross-Platform Test Runner CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@clack/prompts": "^1.7.0",
|
|
24
|
-
"@testspectra/matchers": "^1.0.
|
|
24
|
+
"@testspectra/matchers": "^1.0.1",
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"commander": "^12.1.0",
|
|
27
27
|
"dotenv": "^16.4.5",
|