@cascade-flow/runner 0.2.3 → 0.2.5
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/README.md +25 -78
- package/dist/index.d.ts +1 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +203 -495
- package/dist/index.js.map +7 -7
- package/dist/validation.d.ts +27 -0
- package/dist/validation.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/validation.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Step validation - detects circular dependencies and other graph issues
|
|
3
3
|
*/
|
|
4
4
|
import type { LoadedStep } from "./types.ts";
|
|
5
|
+
import type { Backend } from "@cascade-flow/backend-interface";
|
|
5
6
|
/**
|
|
6
7
|
* Detects circular dependencies in the step dependency graph
|
|
7
8
|
* Uses depth-first search to find cycles
|
|
@@ -10,4 +11,30 @@ import type { LoadedStep } from "./types.ts";
|
|
|
10
11
|
* @throws Error if a cycle is detected
|
|
11
12
|
*/
|
|
12
13
|
export declare function detectCycles(steps: LoadedStep[]): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get all steps that depend on a given target step (directly or transitively)
|
|
16
|
+
*
|
|
17
|
+
* This builds a reverse dependency map and performs DFS to find all dependents.
|
|
18
|
+
* Used for rerun-from-step functionality to determine which steps need re-execution.
|
|
19
|
+
*
|
|
20
|
+
* @param targetStepId - The step ID to find dependents for
|
|
21
|
+
* @param allSteps - Array of all loaded steps in the workflow
|
|
22
|
+
* @returns Set of step IDs that depend on the target step (excluding the target itself)
|
|
23
|
+
*/
|
|
24
|
+
export declare function getAllDependents(targetStepId: string, allSteps: LoadedStep[]): Set<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Get parent workflow version and log any version differences
|
|
27
|
+
*
|
|
28
|
+
* Checks if the workflow structure has changed since the parent run
|
|
29
|
+
* and logs informational messages about version differences.
|
|
30
|
+
* Used for rerun-from-step functionality.
|
|
31
|
+
*
|
|
32
|
+
* @param workflowSlug - Workflow identifier
|
|
33
|
+
* @param parentRunId - Parent run ID to compare against
|
|
34
|
+
* @param currentVersionId - Current workflow version ID
|
|
35
|
+
* @param backend - Backend instance to load version info
|
|
36
|
+
* @param log - Optional log function for version info
|
|
37
|
+
* @returns Parent version ID
|
|
38
|
+
*/
|
|
39
|
+
export declare function validateWorkflowVersion(workflowSlug: string, parentRunId: string, currentVersionId: string, backend: Backend, log?: (msg: string) => void): Promise<string>;
|
|
13
40
|
//# sourceMappingURL=validation.d.ts.map
|
package/dist/validation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE/D;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAgBtD;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,UAAU,EAAE,GACrB,GAAG,CAAC,MAAM,CAAC,CA8Bb;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,MAAM,EACnB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAC1B,OAAO,CAAC,MAAM,CAAC,CA6BjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cascade-flow/runner",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"test:coverage": "bun test --coverage"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@cascade-flow/backend-filesystem": "0.2.
|
|
26
|
-
"@cascade-flow/backend-interface": "0.2.
|
|
27
|
-
"@cascade-flow/workflow": "0.2.
|
|
25
|
+
"@cascade-flow/backend-filesystem": "0.2.5",
|
|
26
|
+
"@cascade-flow/backend-interface": "0.2.3",
|
|
27
|
+
"@cascade-flow/workflow": "0.2.3",
|
|
28
28
|
"zod": "^4.1.12"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|