@activate-core/test-forge 0.9.0 → 0.9.2

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.
@@ -4,4 +4,19 @@
4
4
  * Currently exposes the package version only.
5
5
  * Model, parser, and engines will be added in upcoming steps.
6
6
  */
7
- export const VERSION = '0.4.0';
7
+ import { readFileSync } from 'node:fs';
8
+ /**
9
+ * The package version, read from package.json at runtime so it never
10
+ * goes stale (a hardcoded constant kept printing an old version).
11
+ * package.json ships at the package root; this file is dist/core/.
12
+ */
13
+ function readVersion() {
14
+ try {
15
+ const pkg = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf-8'));
16
+ return pkg.version ?? '0.0.0';
17
+ }
18
+ catch {
19
+ return '0.0.0';
20
+ }
21
+ }
22
+ export const VERSION = readVersion();
@@ -347,6 +347,11 @@ export async function runGenerate(docsDir, useAI = true, force = false, only) {
347
347
  }
348
348
  }
349
349
  cache[file] = hash;
350
+ // Persist after EVERY journey so an interrupted run resumes cleanly:
351
+ // re-running `generate` (no --force) skips the journeys already done
352
+ // (cache hit) and only finishes the remaining ones — no wasted tokens
353
+ // redoing completed work.
354
+ saveCache(CACHE_PATH, cache);
350
355
  results.push({
351
356
  journeyName: journey.name,
352
357
  testDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@activate-core/test-forge",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
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": {