lightflow-engine 0.2.5 → 0.2.6
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/compat/api.d.ts +2 -0
- package/dist/compat/api.js +1 -0
- package/dist/compat/workflow.d.ts +1 -0
- package/dist/compat/workflow.js +3 -0
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/compat/api.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { Engine, type Store } from "../index.js";
|
|
|
14
14
|
export type VercelRunStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
15
15
|
export type VercelRun = {
|
|
16
16
|
runId: string;
|
|
17
|
+
/** Vercel's run handle exposes exists; ours always resolves from the DB. */
|
|
18
|
+
readonly exists: true;
|
|
17
19
|
/** Live getter: each access returns a FRESH promise snapshotting the
|
|
18
20
|
* current status ("pending"/"running" until terminal). Vercel's is a
|
|
19
21
|
* getter too (chat.test.ts mocks `get status()`), and entry-agents'
|
package/dist/compat/api.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { FatalError, CancelledError, sleep } from "../index.js";
|
|
11
11
|
export { getWorkflowMetadata } from "../compat/metadata.js";
|
|
12
|
+
export { workflowFetch as fetch } from "../compat/fetch.js";
|
|
12
13
|
export { workflowFetch } from "../compat/fetch.js";
|
|
13
14
|
/**
|
|
14
15
|
* Vercel's getWritable returns a web-standard WritableStream whose writes
|
package/dist/compat/workflow.js
CHANGED
|
@@ -12,6 +12,9 @@ import { step, registerStep, } from "../index.js";
|
|
|
12
12
|
import { current } from "../index.js";
|
|
13
13
|
export { FatalError, CancelledError, sleep } from "../index.js";
|
|
14
14
|
export { getWorkflowMetadata } from "../compat/metadata.js";
|
|
15
|
+
// Vercel exports the step-aware fetch under both names; entry-agents
|
|
16
|
+
// imports `fetch as workflowFetch` in some files and plain `fetch` in others.
|
|
17
|
+
export { workflowFetch as fetch } from "../compat/fetch.js";
|
|
15
18
|
export { workflowFetch } from "../compat/fetch.js";
|
|
16
19
|
/**
|
|
17
20
|
* Vercel's getWritable returns a web-standard WritableStream whose writes
|
package/dist/index.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface Store {
|
|
|
74
74
|
} | null>;
|
|
75
75
|
setStatus(runId: string, status: RunStatus, output?: unknown): Promise<void>;
|
|
76
76
|
}
|
|
77
|
-
type WorkflowFn = (...args:
|
|
77
|
+
type WorkflowFn = (...args: any[]) => Promise<unknown>;
|
|
78
78
|
export declare function registerWorkflow(id: string, fn: WorkflowFn): void;
|
|
79
79
|
export declare function registerStep(id: string, fn: (...a: unknown[]) => Promise<unknown>): void;
|
|
80
80
|
type Ctx = {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightflow-engine",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "A tiny durable workflow engine for Node.js and Postgres — with a Vercel Workflow drop-in compat layer.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|