executable-stories-formatters 0.7.0 → 0.7.1
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.d.cts +1 -1
- package/dist/adapters.d.ts +1 -1
- package/dist/cli.js +307 -98
- package/dist/cli.js.map +1 -1
- package/dist/{index-BndkylIV.d.cts → index-C0OOaaiK.d.cts} +19 -2
- package/dist/{index-BndkylIV.d.ts → index-C0OOaaiK.d.ts} +19 -2
- package/dist/index.cjs +242 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -4
- package/dist/index.d.ts +34 -4
- package/dist/index.js +240 -71
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/schemas/raw-run.schema.json +35 -12
- package/skills/formatters-cli/SKILL.md +41 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "executable-stories-formatters",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
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",
|
|
@@ -164,8 +164,21 @@
|
|
|
164
164
|
},
|
|
165
165
|
"tickets": {
|
|
166
166
|
"type": "array",
|
|
167
|
-
"items": {
|
|
168
|
-
|
|
167
|
+
"items": {
|
|
168
|
+
"oneOf": [
|
|
169
|
+
{ "type": "string" },
|
|
170
|
+
{
|
|
171
|
+
"type": "object",
|
|
172
|
+
"properties": {
|
|
173
|
+
"id": { "type": "string" },
|
|
174
|
+
"url": { "type": "string" }
|
|
175
|
+
},
|
|
176
|
+
"required": ["id"],
|
|
177
|
+
"additionalProperties": false
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"description": "Ticket/issue references. Each item is either a string ID or an object with id and optional url."
|
|
169
182
|
},
|
|
170
183
|
"meta": {
|
|
171
184
|
"type": "object",
|
|
@@ -250,7 +263,8 @@
|
|
|
250
263
|
"properties": {
|
|
251
264
|
"kind": { "const": "note" },
|
|
252
265
|
"text": { "type": "string" },
|
|
253
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
266
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
267
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
254
268
|
},
|
|
255
269
|
"required": ["kind", "text", "phase"],
|
|
256
270
|
"additionalProperties": false
|
|
@@ -264,7 +278,8 @@
|
|
|
264
278
|
"type": "array",
|
|
265
279
|
"items": { "type": "string" }
|
|
266
280
|
},
|
|
267
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
281
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
282
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
268
283
|
},
|
|
269
284
|
"required": ["kind", "names", "phase"],
|
|
270
285
|
"additionalProperties": false
|
|
@@ -276,7 +291,8 @@
|
|
|
276
291
|
"kind": { "const": "kv" },
|
|
277
292
|
"label": { "type": "string" },
|
|
278
293
|
"value": {},
|
|
279
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
294
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
295
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
280
296
|
},
|
|
281
297
|
"required": ["kind", "label", "value", "phase"],
|
|
282
298
|
"additionalProperties": false
|
|
@@ -289,7 +305,8 @@
|
|
|
289
305
|
"label": { "type": "string" },
|
|
290
306
|
"content": { "type": "string" },
|
|
291
307
|
"lang": { "type": "string" },
|
|
292
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
308
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
309
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
293
310
|
},
|
|
294
311
|
"required": ["kind", "label", "content", "phase"],
|
|
295
312
|
"additionalProperties": false
|
|
@@ -311,7 +328,8 @@
|
|
|
311
328
|
"items": { "type": "string" }
|
|
312
329
|
}
|
|
313
330
|
},
|
|
314
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
331
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
332
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
315
333
|
},
|
|
316
334
|
"required": ["kind", "label", "columns", "rows", "phase"],
|
|
317
335
|
"additionalProperties": false
|
|
@@ -323,7 +341,8 @@
|
|
|
323
341
|
"kind": { "const": "link" },
|
|
324
342
|
"label": { "type": "string" },
|
|
325
343
|
"url": { "type": "string" },
|
|
326
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
344
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
345
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
327
346
|
},
|
|
328
347
|
"required": ["kind", "label", "url", "phase"],
|
|
329
348
|
"additionalProperties": false
|
|
@@ -335,7 +354,8 @@
|
|
|
335
354
|
"kind": { "const": "section" },
|
|
336
355
|
"title": { "type": "string" },
|
|
337
356
|
"markdown": { "type": "string" },
|
|
338
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
357
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
358
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
339
359
|
},
|
|
340
360
|
"required": ["kind", "title", "markdown", "phase"],
|
|
341
361
|
"additionalProperties": false
|
|
@@ -347,7 +367,8 @@
|
|
|
347
367
|
"kind": { "const": "mermaid" },
|
|
348
368
|
"code": { "type": "string" },
|
|
349
369
|
"title": { "type": "string" },
|
|
350
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
370
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
371
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
351
372
|
},
|
|
352
373
|
"required": ["kind", "code", "phase"],
|
|
353
374
|
"additionalProperties": false
|
|
@@ -359,7 +380,8 @@
|
|
|
359
380
|
"kind": { "const": "screenshot" },
|
|
360
381
|
"path": { "type": "string" },
|
|
361
382
|
"alt": { "type": "string" },
|
|
362
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
383
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
384
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
363
385
|
},
|
|
364
386
|
"required": ["kind", "path", "phase"],
|
|
365
387
|
"additionalProperties": false
|
|
@@ -371,7 +393,8 @@
|
|
|
371
393
|
"kind": { "const": "custom" },
|
|
372
394
|
"type": { "type": "string" },
|
|
373
395
|
"data": {},
|
|
374
|
-
"phase": { "$ref": "#/$defs/DocPhase" }
|
|
396
|
+
"phase": { "$ref": "#/$defs/DocPhase" },
|
|
397
|
+
"children": { "type": "array", "items": { "$ref": "#/$defs/DocEntry" }, "description": "Nested child doc entries for grouping." }
|
|
375
398
|
},
|
|
376
399
|
"required": ["kind", "type", "data", "phase"],
|
|
377
400
|
"additionalProperties": false
|
|
@@ -128,8 +128,49 @@ const cucumberJson = new CucumberJsonFormatter().formatToString(canonical);
|
|
|
128
128
|
# Machine output
|
|
129
129
|
--json-summary # Print JSON summary to stdout
|
|
130
130
|
--emit-canonical path.json # Write canonical JSON
|
|
131
|
+
|
|
132
|
+
# Asset Bundling
|
|
133
|
+
--asset-mode none|copy # Asset bundling strategy (default: none)
|
|
134
|
+
--allow-missing-assets # Warn on missing assets instead of failing
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Asset Bundling
|
|
138
|
+
|
|
139
|
+
Use `--asset-mode copy` to produce a portable report directory. All locally-referenced assets
|
|
140
|
+
(Playwright videos, screenshots, attachment files) are copied into an `assets/` subdirectory
|
|
141
|
+
and HTML paths are rewritten.
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
executable-stories format raw-run.json --format html --output-dir report --asset-mode copy
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Output:
|
|
148
|
+
```
|
|
149
|
+
report/
|
|
150
|
+
test-results.html # paths rewritten to assets/
|
|
151
|
+
assets/
|
|
152
|
+
video-3f2c1a7b.webm
|
|
153
|
+
step-1-91ab22de.png
|
|
131
154
|
```
|
|
132
155
|
|
|
156
|
+
### GitHub Actions usage
|
|
157
|
+
|
|
158
|
+
```yaml
|
|
159
|
+
- run: npx executable-stories format .executable-stories/raw-run.json --format html --output-dir report --asset-mode copy
|
|
160
|
+
- uses: actions/upload-artifact@v4
|
|
161
|
+
with:
|
|
162
|
+
name: test-report
|
|
163
|
+
path: report/
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Options
|
|
167
|
+
|
|
168
|
+
| Flag | Description |
|
|
169
|
+
|------|-------------|
|
|
170
|
+
| `--asset-mode none` | Default. No asset bundling. |
|
|
171
|
+
| `--asset-mode copy` | Copy local assets to `assets/`, rewrite paths. |
|
|
172
|
+
| `--allow-missing-assets` | Warn on missing assets instead of failing. |
|
|
173
|
+
|
|
133
174
|
### Validation
|
|
134
175
|
|
|
135
176
|
```typescript
|