@activate-core/test-forge 0.9.2 → 0.9.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/cli/index.js CHANGED
@@ -69,6 +69,7 @@ function printUsage() {
69
69
  console.log(' testforge generate --basic Use the basic generator only');
70
70
  console.log(' testforge generate --force Regenerate everything');
71
71
  console.log(' testforge generate --journey <name> Generate just ONE journey');
72
+ console.log(' testforge generate --area <area> Generate a whole area (e.g. api)');
72
73
  console.log(' testforge discover Draft journey docs (asks: map or reference)');
73
74
  console.log(' testforge discover --journey <name> Draft just ONE journey doc');
74
75
  console.log(' testforge discover --reference <file|url> Base docs on a reference');
@@ -121,7 +122,7 @@ async function main() {
121
122
  console.log(useAI
122
123
  ? 'Generating tests with AI for changed journeys...\n'
123
124
  : 'Generating tests with the basic generator...\n');
124
- const results = await runGenerate('docs', useAI, force, flagValue('--journey'));
125
+ const results = await runGenerate('docs', useAI, force, flagValue('--journey'), flagValue('--area'));
125
126
  if (results.length === 0) {
126
127
  console.log('No journey files found in docs/. Add a .md file and try again.');
127
128
  }
@@ -197,7 +197,7 @@ function matchesJourney(file, journeyId, sel) {
197
197
  norm(stem).endsWith(`-${n}`) ||
198
198
  norm(stem).split('/').pop() === n);
199
199
  }
200
- export async function runGenerate(docsDir, useAI = true, force = false, only) {
200
+ export async function runGenerate(docsDir, useAI = true, force = false, only, areaOnly) {
201
201
  const files = findMarkdownFiles(docsDir);
202
202
  if (files.length === 0) {
203
203
  return [];
@@ -247,6 +247,9 @@ export async function runGenerate(docsDir, useAI = true, force = false, only) {
247
247
  // journeys in their own package instead of leaking into web/api.
248
248
  const area = file.split(/[\\/]/)[0] || undefined;
249
249
  const journey = parseJourney(markdown, area);
250
+ // --area <a>: only this area's journeys (e.g. do all of api first).
251
+ if (areaOnly && journey.area !== areaOnly)
252
+ continue;
250
253
  // --journey <x>: generate just the one matching journey.
251
254
  if (only && !matchesJourney(file, journey.id, only))
252
255
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.9.2",
3
+ "version": "0.9.3",
4
4
  "description": "AI-powered QA automation. Scans a project, drafts journey docs, and generates seeded Jest/Playwright tests. Works in any project, with any AI CLI.",
5
5
  "type": "module",
6
6
  "bin": {