executable-stories-formatters 1.0.1 → 1.2.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/dist/adapters.cjs +105 -74
- package/dist/adapters.cjs.map +1 -1
- package/dist/adapters.d.cts +1 -183
- package/dist/adapters.d.ts +1 -183
- package/dist/adapters.js +105 -74
- package/dist/adapters.js.map +1 -1
- package/dist/cli.js +716 -207
- package/dist/cli.js.map +1 -1
- package/dist/index-Cfs2L3di.d.cts +628 -0
- package/dist/index-Cfs2L3di.d.ts +628 -0
- package/dist/index.cjs +267 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +915 -88
- package/dist/index.d.ts +915 -88
- package/dist/index.js +264 -214
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/schemas/explainer-v1.json +47 -0
- package/schemas/scenario-index-v1.json +5 -0
- package/templates/astro-thin/src/content.config.ts +11 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "executable-stories-formatters",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Cucumber-compatible report formats (HTML, Markdown, JUnit XML, Cucumber JSON) for executable-stories test results.",
|
|
5
5
|
"author": "Jag Reehal <jag@jagreehal.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -62,8 +62,7 @@
|
|
|
62
62
|
"yaml": "^2.9.0",
|
|
63
63
|
"react": "^19.2.7",
|
|
64
64
|
"react-dom": "^19.2.7",
|
|
65
|
-
"executable-stories-
|
|
66
|
-
"executable-stories-react": "0.2.1"
|
|
65
|
+
"executable-stories-react": "0.4.0"
|
|
67
66
|
},
|
|
68
67
|
"devDependencies": {
|
|
69
68
|
"@faker-js/faker": "^10.4.0",
|
|
@@ -75,7 +74,8 @@
|
|
|
75
74
|
"tsx": "^4.22.4",
|
|
76
75
|
"typescript": "~6.0.3",
|
|
77
76
|
"vitest": "^4.1.8",
|
|
78
|
-
"vitest-mock-extended": "^4.0.0"
|
|
77
|
+
"vitest-mock-extended": "^4.0.0",
|
|
78
|
+
"executable-stories-core": "0.18.1"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"embed-assets": "node scripts/embed-react-assets.mjs",
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://executable-stories.dev/schemas/explainer-v1.json",
|
|
4
|
+
"title": "Explainer provenance block v1",
|
|
5
|
+
"description": "The `explainer` frontmatter block that ties a hand-authored explainer document to the scenarios it explains. See the explain-change skill.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "scenarios"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1 },
|
|
10
|
+
"generated": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "ISO date the explainer was generated (YYYY-MM-DD)."
|
|
13
|
+
},
|
|
14
|
+
"runId": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "runId of the run the explainer was generated from."
|
|
17
|
+
},
|
|
18
|
+
"commit": { "type": "string", "description": "Commit sha the explainer explains." },
|
|
19
|
+
"branch": { "type": "string" },
|
|
20
|
+
"scenarios": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["id", "hash"],
|
|
26
|
+
"properties": {
|
|
27
|
+
"id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"minLength": 1,
|
|
30
|
+
"description": "Canonical scenario id (stable machine key)."
|
|
31
|
+
},
|
|
32
|
+
"title": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Scenario title at generation time; enables rename detection."
|
|
35
|
+
},
|
|
36
|
+
"hash": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"pattern": "^[0-9a-f]{16}$",
|
|
39
|
+
"description": "scenarioContentHash at generation time (16 hex chars of sha256 over title + step keywords/texts)."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"additionalProperties": true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": true
|
|
47
|
+
}
|
|
@@ -37,6 +37,11 @@
|
|
|
37
37
|
"properties": {
|
|
38
38
|
"id": { "type": "string" },
|
|
39
39
|
"title": { "type": "string" },
|
|
40
|
+
"hash": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"pattern": "^[0-9a-f]{16}$",
|
|
43
|
+
"description": "Content hash (title + step keywords/texts) for explainer provenance; excludes status. Always emitted since 1.x, optional in the schema so pre-hash v1 artifacts stay valid."
|
|
44
|
+
},
|
|
40
45
|
"status": { "$ref": "#/$defs/status" },
|
|
41
46
|
"feature": { "type": "string" },
|
|
42
47
|
"sourceFile": { "type": "string" },
|
|
@@ -10,12 +10,19 @@ import esConfig from '../executable-stories.config.mjs';
|
|
|
10
10
|
export const collections = {
|
|
11
11
|
// Hand-authored docs. `authoredDocsLoader` is a drop-in for Starlight's
|
|
12
12
|
// docsLoader that ALSO: auto-titles frontmatter-free markdown from its first
|
|
13
|
-
// H1,
|
|
14
|
-
//
|
|
13
|
+
// H1, rewrites relative `*.md` cross-links to their routes, and (because the
|
|
14
|
+
// shared config is passed as `explainers`) injects a fresh/stale banner into
|
|
15
|
+
// any doc carrying an `explainer` provenance block (explain-change skill) —
|
|
16
|
+
// with deep links to the cited scenarios' story pages.
|
|
15
17
|
docs: defineCollection({
|
|
16
|
-
loader: authoredDocsLoader({ path: 'src/content/docs' }),
|
|
18
|
+
loader: authoredDocsLoader({ path: 'src/content/docs', explainers: esConfig }),
|
|
17
19
|
schema: docsSchema({
|
|
18
|
-
extend: z.object({
|
|
20
|
+
extend: z.object({
|
|
21
|
+
verifiedBy: z.union([z.string(), z.array(z.string())]).optional(),
|
|
22
|
+
// Explainer provenance block — kept loose here (zod would otherwise
|
|
23
|
+
// strip it); `executable-stories check-explainers` validates strictly.
|
|
24
|
+
explainer: z.record(z.unknown()).optional(),
|
|
25
|
+
}),
|
|
19
26
|
}),
|
|
20
27
|
}),
|
|
21
28
|
// Generated scenarios (executable-stories) — in-memory, never written to disk.
|