omkit 0.0.10 → 0.0.11
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.
|
@@ -66,6 +66,7 @@ class ActionRun {
|
|
|
66
66
|
attach: (value) => this.attach(value),
|
|
67
67
|
proc: createProc(system.logs, system.signal, system.output.snapshots),
|
|
68
68
|
artifactsFolder: system.output.folder.artifacts(),
|
|
69
|
+
snapshot: (name, value) => system.output.snapshots.snapshot(name, value),
|
|
69
70
|
}, ...this.args))
|
|
70
71
|
.then((result) => {
|
|
71
72
|
const outcome = { ok: true, value: result };
|
|
@@ -86,6 +86,13 @@ export interface ActionContext<Events extends object, Handle = void> extends Sys
|
|
|
86
86
|
* beside `run.log`; the same folder is on the `spin` context.
|
|
87
87
|
*/
|
|
88
88
|
readonly artifactsFolder: string;
|
|
89
|
+
/**
|
|
90
|
+
* Capture a JSON snapshot into this run's output folder and drop a `[snapshot]`
|
|
91
|
+
* line on the timeline (under this action's path). The ergonomic shortcut for
|
|
92
|
+
* `ctx.output.snapshots.snapshot(…)`; the same convenience is on the `spin`
|
|
93
|
+
* context. Resolves with the snapshot's relative path.
|
|
94
|
+
*/
|
|
95
|
+
readonly snapshot: (name: string, value: unknown) => Promise<string>;
|
|
89
96
|
}
|
|
90
97
|
/** A constructed-but-not-yet-run action: what calling an `Action` produces. */
|
|
91
98
|
export interface ActionInstance<Result = unknown, Events extends object = NoEvents, Handle = void> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omkit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "A tiny runtime for developer workflows: typed actions that pass runtime capabilities and emit typed events, under one run and one shared log. The operational/runtime layer to tskb's knowledge layer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|