@encore-os/eos-spec 0.9.0 → 0.12.0
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/bin/check-dist-fresh.js +2 -2
- package/bin/eos-spec.js +9 -0
- package/dist/commands/archive.js +1 -1
- package/dist/commands/archive.js.map +1 -1
- package/dist/commands/close-out.js +1 -1
- package/dist/commands/close-out.js.map +1 -1
- package/dist/commands/complete.js +81 -4
- package/dist/commands/complete.js.map +1 -1
- package/dist/commands/create.js +6 -6
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/funnel.js +7 -0
- package/dist/commands/funnel.js.map +1 -1
- package/dist/commands/next.d.ts +10 -4
- package/dist/commands/next.js +38 -12
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/proceed.d.ts +48 -0
- package/dist/commands/proceed.js +144 -0
- package/dist/commands/proceed.js.map +1 -0
- package/dist/commands/reconcile.js +7 -1
- package/dist/commands/reconcile.js.map +1 -1
- package/dist/commands/run.d.ts +7 -4
- package/dist/commands/run.js +18 -10
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/scorecard.d.ts +24 -0
- package/dist/commands/scorecard.js +49 -3
- package/dist/commands/scorecard.js.map +1 -1
- package/dist/commands/signoff.js +43 -2
- package/dist/commands/signoff.js.map +1 -1
- package/dist/commands/status.js +7 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/tasks.d.ts +7 -0
- package/dist/commands/tasks.js +13 -1
- package/dist/commands/tasks.js.map +1 -1
- package/dist/commands/walkthrough.js +10 -21
- package/dist/commands/walkthrough.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/completion-gate.d.ts +8 -7
- package/dist/lib/completion-gate.js +15 -10
- package/dist/lib/completion-gate.js.map +1 -1
- package/dist/lib/config.d.ts +10 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/coverage-gate.d.ts +43 -0
- package/dist/lib/coverage-gate.js +54 -0
- package/dist/lib/coverage-gate.js.map +1 -0
- package/dist/lib/events.d.ts +1 -0
- package/dist/lib/events.js +8 -1
- package/dist/lib/events.js.map +1 -1
- package/dist/lib/frontmatter.d.ts +1 -1
- package/dist/lib/frontmatter.js.map +1 -1
- package/dist/lib/funnel.d.ts +5 -0
- package/dist/lib/funnel.js +2 -1
- package/dist/lib/funnel.js.map +1 -1
- package/dist/lib/pipeline-map.d.ts +24 -0
- package/dist/lib/pipeline-map.js +45 -5
- package/dist/lib/pipeline-map.js.map +1 -1
- package/dist/lib/reconcile-core.d.ts +20 -3
- package/dist/lib/reconcile-core.js +16 -6
- package/dist/lib/reconcile-core.js.map +1 -1
- package/dist/lib/scorecard.d.ts +5 -0
- package/dist/lib/scorecard.js +1 -0
- package/dist/lib/scorecard.js.map +1 -1
- package/dist/lib/spec-pure.js +6 -0
- package/dist/lib/spec-pure.js.map +1 -1
- package/dist/lib/specs.d.ts +17 -0
- package/dist/lib/specs.js.map +1 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/lib/version.js.map +1 -1
- package/dist/lib/walkthrough-manifest-io.d.ts +15 -0
- package/dist/lib/walkthrough-manifest-io.js +30 -0
- package/dist/lib/walkthrough-manifest-io.js.map +1 -0
- package/dist/lib/with-event-log.js +17 -3
- package/dist/lib/with-event-log.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WalkthroughManifest } from './walkthrough-coverage.js';
|
|
2
|
+
/** Repo-relative path to a spec's walkthrough manifest (regenerated, gitignored). */
|
|
3
|
+
export declare function manifestPath(repoRoot: string, specId: string): string;
|
|
4
|
+
export type ManifestLoad = {
|
|
5
|
+
ok: true;
|
|
6
|
+
manifest: WalkthroughManifest;
|
|
7
|
+
path: string;
|
|
8
|
+
} | {
|
|
9
|
+
ok: false;
|
|
10
|
+
reason: 'missing' | 'invalid';
|
|
11
|
+
message: string;
|
|
12
|
+
path: string;
|
|
13
|
+
};
|
|
14
|
+
/** Load + parse a spec's manifest. Never throws: absent → `missing`, bad JSON → `invalid`. */
|
|
15
|
+
export declare function loadManifest(repoRoot: string, specId: string): ManifestLoad;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Filesystem IO for a spec's walkthrough manifest. FS-BOUND (node:fs) — shared by the
|
|
2
|
+
// `walkthrough` and `signoff` commands so their manifest read cannot diverge. NEVER
|
|
3
|
+
// re-export this from src/pure.ts: it reads the filesystem. The coverage predicate it
|
|
4
|
+
// feeds (`checkWalkthroughCoverage`) stays the pure leaf.
|
|
5
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
/** Repo-relative path to a spec's walkthrough manifest (regenerated, gitignored). */
|
|
8
|
+
export function manifestPath(repoRoot, specId) {
|
|
9
|
+
return join(repoRoot, 'docs', 'walkthroughs', specId.toLowerCase(), 'manifest.json');
|
|
10
|
+
}
|
|
11
|
+
/** Load + parse a spec's manifest. Never throws: absent → `missing`, bad JSON → `invalid`. */
|
|
12
|
+
export function loadManifest(repoRoot, specId) {
|
|
13
|
+
const path = manifestPath(repoRoot, specId);
|
|
14
|
+
if (!existsSync(path)) {
|
|
15
|
+
return { ok: false, reason: 'missing', path, message: `no manifest for ${specId}` };
|
|
16
|
+
}
|
|
17
|
+
try {
|
|
18
|
+
const manifest = JSON.parse(readFileSync(path, 'utf8'));
|
|
19
|
+
return { ok: true, manifest, path };
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
return {
|
|
23
|
+
ok: false,
|
|
24
|
+
reason: 'invalid',
|
|
25
|
+
path,
|
|
26
|
+
message: `manifest for ${specId} is not valid JSON (${err instanceof Error ? err.message : String(err)})`,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=walkthrough-manifest-io.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walkthrough-manif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-1,4 +1,17 @@
|
|
|
1
1
|
import { logEvent, RUN_ID, redactArgs } from './events.js';
|
|
2
|
+
import { getGlobalOptions } from './output.js';
|
|
3
|
+
/** Resolve the caller's `--repo-root` global override from the commander command so
|
|
4
|
+
* telemetry lands in the intended repo, not whatever git repo the invoking cwd is in
|
|
5
|
+
* (F-3). Never throws — a fake/absent command (tests, non-commander callers) falls
|
|
6
|
+
* back to undefined, which lets logEvent use its git-rev-parse default path. */
|
|
7
|
+
function repoRootFromCmd(cmd) {
|
|
8
|
+
try {
|
|
9
|
+
return getGlobalOptions(cmd).repoRoot;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
2
15
|
/** Wrap a commander action with event logging — records ms, ok, and (re-)throws on error.
|
|
3
16
|
* The wrapped action sees the same (options, cmd) signature.
|
|
4
17
|
*
|
|
@@ -18,6 +31,7 @@ export function withEventLog(commandName, action) {
|
|
|
18
31
|
return async (...args) => {
|
|
19
32
|
const cmd = args[args.length - 1];
|
|
20
33
|
const options = (args.length >= 2 ? args[args.length - 2] : {});
|
|
34
|
+
const repoRoot = repoRootFromCmd(cmd);
|
|
21
35
|
const start = Date.now();
|
|
22
36
|
const ts = new Date().toISOString();
|
|
23
37
|
const base = {
|
|
@@ -35,7 +49,7 @@ export function withEventLog(commandName, action) {
|
|
|
35
49
|
if (logged)
|
|
36
50
|
return;
|
|
37
51
|
logged = true;
|
|
38
|
-
logEvent({ ...base, ms: Date.now() - start, ok: code === 0 });
|
|
52
|
+
logEvent({ ...base, ms: Date.now() - start, ok: code === 0 }, { repoRoot });
|
|
39
53
|
};
|
|
40
54
|
process.once('exit', onExit);
|
|
41
55
|
try {
|
|
@@ -44,7 +58,7 @@ export function withEventLog(commandName, action) {
|
|
|
44
58
|
process.removeListener('exit', onExit);
|
|
45
59
|
if (!logged) {
|
|
46
60
|
logged = true;
|
|
47
|
-
logEvent({ ...base, ms: Date.now() - start, ok: true });
|
|
61
|
+
logEvent({ ...base, ms: Date.now() - start, ok: true }, { repoRoot });
|
|
48
62
|
}
|
|
49
63
|
}
|
|
50
64
|
catch (e) {
|
|
@@ -56,7 +70,7 @@ export function withEventLog(commandName, action) {
|
|
|
56
70
|
ms: Date.now() - start,
|
|
57
71
|
ok: false,
|
|
58
72
|
error: e instanceof Error ? e.message : String(e),
|
|
59
|
-
});
|
|
73
|
+
}, { repoRoot });
|
|
60
74
|
}
|
|
61
75
|
throw e;
|
|
62
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-event-log.js","sourceRoot":"","sources":["../../src/lib/with-event-log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"with-event-log.js","sourceRoot":"","sources":["../../src/lib/with-event-log.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C;;;iFAGiF;AACjF,SAAS,eAAe,CAAC,GAAY;IACnC,IAAI,CAAC;QACH,OAAO,gBAAgB,CAAC,GAAc,CAAC,CAAC,QAAQ,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAoC,WAAmB,EAAE,MAAiB;IACpG,8EAA8E;IAC9E,gFAAgF;IAChF,gFAAgF;IAChF,+EAA+E;IAC/E,iFAAiF;IACjF,6BAA6B;IAC7B,OAAO,KAAK,EAAE,GAAG,IAAe,EAAiB,EAAE;QACjD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAClC,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CA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d,QAAQ,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;YACxE,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,MAAM,GAAG,IAAI,CAAC;gBACd,QAAQ,CACN;oBACE,GAAG,IAAI;oBACP,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK;oBACtB,EAAE,EAAE,KAAK;oBACT,KAAK,EAAE,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;iBAClD,EACD,EAAE,QAAQ,EAAE,CACb,CAAC;YACJ,CAAC;YACD,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@encore-os/eos-spec",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Portable, config-driven spec-pipeline engine + quality harness. One canonical engine consumed as a library (with a client-safe /pure subpath) by every Encore-OS repo.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|