@barnum/barnum 0.0.0-main-ef6df91f → 0.0.0-main-d605f564
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/artifacts/linux-arm64/barnum +0 -0
- package/artifacts/linux-x64/barnum +0 -0
- package/artifacts/macos-arm64/barnum +0 -0
- package/artifacts/macos-x64/barnum +0 -0
- package/artifacts/win-x64/barnum.exe +0 -0
- package/package.json +2 -1
- package/src/all.ts +79 -127
- package/src/ast.ts +265 -502
- package/src/bind.ts +65 -30
- package/src/builtins.ts +227 -134
- package/src/chain.ts +15 -6
- package/src/effect-id.ts +21 -6
- package/src/handler.ts +75 -32
- package/src/index.ts +11 -3
- package/src/pipe.ts +82 -113
- package/src/race.ts +58 -52
- package/src/run.ts +64 -23
- package/src/schema.ts +118 -0
- package/src/try-catch.ts +29 -30
- package/src/worker.ts +10 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barnum/barnum",
|
|
3
|
-
"version": "0.0.0-main-
|
|
3
|
+
"version": "0.0.0-main-d605f564",
|
|
4
4
|
"description": "Barnum workflow engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"sideEffects": false,
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@oxlint/binding-darwin-arm64": "^1.57.0",
|
|
45
|
+
"@types/json-schema": "^7.0.15",
|
|
45
46
|
"@types/node": "^25.5.0",
|
|
46
47
|
"oxlint": "^1.57.0",
|
|
47
48
|
"prettier": "^3.8.1",
|
package/src/all.ts
CHANGED
|
@@ -1,134 +1,86 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
type Action,
|
|
3
|
+
type Pipeable,
|
|
4
|
+
type TypedAction,
|
|
5
|
+
typedAction,
|
|
6
|
+
} from "./ast.js";
|
|
2
7
|
import { constant } from "./builtins.js";
|
|
3
8
|
|
|
4
9
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5
10
|
export function all(): TypedAction<any, []>;
|
|
6
|
-
export function all<In, O1,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
In,
|
|
15
|
-
|
|
16
|
-
>(
|
|
17
|
-
a1: Pipeable<In, O1
|
|
18
|
-
a2: Pipeable<In, O2
|
|
19
|
-
a3: Pipeable<In, O3
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
In,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
In,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
In,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
): TypedAction<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
In,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
a3: Pipeable<In, O3, R3>,
|
|
80
|
-
a4: Pipeable<In, O4, R4>,
|
|
81
|
-
a5: Pipeable<In, O5, R5>,
|
|
82
|
-
a6: Pipeable<In, O6, R6>,
|
|
83
|
-
a7: Pipeable<In, O7, R7>,
|
|
84
|
-
a8: Pipeable<In, O8, R8>,
|
|
85
|
-
): TypedAction<
|
|
86
|
-
In,
|
|
87
|
-
[O1, O2, O3, O4, O5, O6, O7, O8],
|
|
88
|
-
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8
|
|
89
|
-
>;
|
|
90
|
-
export function all<
|
|
91
|
-
In, O1, O2, O3, O4, O5, O6, O7, O8, O9,
|
|
92
|
-
R1 extends string, R2 extends string, R3 extends string,
|
|
93
|
-
R4 extends string, R5 extends string, R6 extends string,
|
|
94
|
-
R7 extends string, R8 extends string, R9 extends string,
|
|
95
|
-
>(
|
|
96
|
-
a1: Pipeable<In, O1, R1>,
|
|
97
|
-
a2: Pipeable<In, O2, R2>,
|
|
98
|
-
a3: Pipeable<In, O3, R3>,
|
|
99
|
-
a4: Pipeable<In, O4, R4>,
|
|
100
|
-
a5: Pipeable<In, O5, R5>,
|
|
101
|
-
a6: Pipeable<In, O6, R6>,
|
|
102
|
-
a7: Pipeable<In, O7, R7>,
|
|
103
|
-
a8: Pipeable<In, O8, R8>,
|
|
104
|
-
a9: Pipeable<In, O9, R9>,
|
|
105
|
-
): TypedAction<
|
|
106
|
-
In,
|
|
107
|
-
[O1, O2, O3, O4, O5, O6, O7, O8, O9],
|
|
108
|
-
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9
|
|
109
|
-
>;
|
|
110
|
-
export function all<
|
|
111
|
-
In, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10,
|
|
112
|
-
R1 extends string, R2 extends string, R3 extends string,
|
|
113
|
-
R4 extends string, R5 extends string, R6 extends string,
|
|
114
|
-
R7 extends string, R8 extends string, R9 extends string,
|
|
115
|
-
R10 extends string,
|
|
116
|
-
>(
|
|
117
|
-
a1: Pipeable<In, O1, R1>,
|
|
118
|
-
a2: Pipeable<In, O2, R2>,
|
|
119
|
-
a3: Pipeable<In, O3, R3>,
|
|
120
|
-
a4: Pipeable<In, O4, R4>,
|
|
121
|
-
a5: Pipeable<In, O5, R5>,
|
|
122
|
-
a6: Pipeable<In, O6, R6>,
|
|
123
|
-
a7: Pipeable<In, O7, R7>,
|
|
124
|
-
a8: Pipeable<In, O8, R8>,
|
|
125
|
-
a9: Pipeable<In, O9, R9>,
|
|
126
|
-
a10: Pipeable<In, O10, R10>,
|
|
127
|
-
): TypedAction<
|
|
128
|
-
In,
|
|
129
|
-
[O1, O2, O3, O4, O5, O6, O7, O8, O9, O10],
|
|
130
|
-
R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10
|
|
131
|
-
>;
|
|
11
|
+
export function all<In, O1>(a1: Pipeable<In, O1>): TypedAction<In, [O1]>;
|
|
12
|
+
export function all<In, O1, O2>(
|
|
13
|
+
a1: Pipeable<In, O1>,
|
|
14
|
+
a2: Pipeable<In, O2>,
|
|
15
|
+
): TypedAction<In, [O1, O2]>;
|
|
16
|
+
export function all<In, O1, O2, O3>(
|
|
17
|
+
a1: Pipeable<In, O1>,
|
|
18
|
+
a2: Pipeable<In, O2>,
|
|
19
|
+
a3: Pipeable<In, O3>,
|
|
20
|
+
): TypedAction<In, [O1, O2, O3]>;
|
|
21
|
+
export function all<In, O1, O2, O3, O4>(
|
|
22
|
+
a1: Pipeable<In, O1>,
|
|
23
|
+
a2: Pipeable<In, O2>,
|
|
24
|
+
a3: Pipeable<In, O3>,
|
|
25
|
+
a4: Pipeable<In, O4>,
|
|
26
|
+
): TypedAction<In, [O1, O2, O3, O4]>;
|
|
27
|
+
export function all<In, O1, O2, O3, O4, O5>(
|
|
28
|
+
a1: Pipeable<In, O1>,
|
|
29
|
+
a2: Pipeable<In, O2>,
|
|
30
|
+
a3: Pipeable<In, O3>,
|
|
31
|
+
a4: Pipeable<In, O4>,
|
|
32
|
+
a5: Pipeable<In, O5>,
|
|
33
|
+
): TypedAction<In, [O1, O2, O3, O4, O5]>;
|
|
34
|
+
export function all<In, O1, O2, O3, O4, O5, O6>(
|
|
35
|
+
a1: Pipeable<In, O1>,
|
|
36
|
+
a2: Pipeable<In, O2>,
|
|
37
|
+
a3: Pipeable<In, O3>,
|
|
38
|
+
a4: Pipeable<In, O4>,
|
|
39
|
+
a5: Pipeable<In, O5>,
|
|
40
|
+
a6: Pipeable<In, O6>,
|
|
41
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6]>;
|
|
42
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7>(
|
|
43
|
+
a1: Pipeable<In, O1>,
|
|
44
|
+
a2: Pipeable<In, O2>,
|
|
45
|
+
a3: Pipeable<In, O3>,
|
|
46
|
+
a4: Pipeable<In, O4>,
|
|
47
|
+
a5: Pipeable<In, O5>,
|
|
48
|
+
a6: Pipeable<In, O6>,
|
|
49
|
+
a7: Pipeable<In, O7>,
|
|
50
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7]>;
|
|
51
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8>(
|
|
52
|
+
a1: Pipeable<In, O1>,
|
|
53
|
+
a2: Pipeable<In, O2>,
|
|
54
|
+
a3: Pipeable<In, O3>,
|
|
55
|
+
a4: Pipeable<In, O4>,
|
|
56
|
+
a5: Pipeable<In, O5>,
|
|
57
|
+
a6: Pipeable<In, O6>,
|
|
58
|
+
a7: Pipeable<In, O7>,
|
|
59
|
+
a8: Pipeable<In, O8>,
|
|
60
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8]>;
|
|
61
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8, O9>(
|
|
62
|
+
a1: Pipeable<In, O1>,
|
|
63
|
+
a2: Pipeable<In, O2>,
|
|
64
|
+
a3: Pipeable<In, O3>,
|
|
65
|
+
a4: Pipeable<In, O4>,
|
|
66
|
+
a5: Pipeable<In, O5>,
|
|
67
|
+
a6: Pipeable<In, O6>,
|
|
68
|
+
a7: Pipeable<In, O7>,
|
|
69
|
+
a8: Pipeable<In, O8>,
|
|
70
|
+
a9: Pipeable<In, O9>,
|
|
71
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8, O9]>;
|
|
72
|
+
export function all<In, O1, O2, O3, O4, O5, O6, O7, O8, O9, O10>(
|
|
73
|
+
a1: Pipeable<In, O1>,
|
|
74
|
+
a2: Pipeable<In, O2>,
|
|
75
|
+
a3: Pipeable<In, O3>,
|
|
76
|
+
a4: Pipeable<In, O4>,
|
|
77
|
+
a5: Pipeable<In, O5>,
|
|
78
|
+
a6: Pipeable<In, O6>,
|
|
79
|
+
a7: Pipeable<In, O7>,
|
|
80
|
+
a8: Pipeable<In, O8>,
|
|
81
|
+
a9: Pipeable<In, O9>,
|
|
82
|
+
a10: Pipeable<In, O10>,
|
|
83
|
+
): TypedAction<In, [O1, O2, O3, O4, O5, O6, O7, O8, O9, O10]>;
|
|
132
84
|
export function all(...actions: Action[]): Action {
|
|
133
85
|
if (actions.length === 0) {
|
|
134
86
|
return constant([]);
|