@workglow/task-graph 0.0.125 → 0.0.126
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 +104 -12
- package/dist/browser.js +605 -771
- package/dist/browser.js.map +19 -20
- package/dist/bun.js +605 -767
- package/dist/bun.js.map +19 -20
- package/dist/node.js +605 -767
- package/dist/node.js.map +19 -20
- package/dist/task-graph/Conversions.d.ts.map +1 -1
- package/package.json +20 -11
- package/src/storage/README.md +51 -5
- package/dist/types.d.ts +0 -8
- package/dist/types.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Conversions.d.ts","sourceRoot":"","sources":["../../src/task-graph/Conversions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG,EAAE,CAAC,SAAS,SAAS,GAAG,GAAG,IAAI,CAC/E,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,eAAe,KACrB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpB,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,IAChF,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACX,UAAU,GACV,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"Conversions.d.ts","sourceRoot":"","sources":["../../src/task-graph/Conversions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,SAAS,GAAG,GAAG,EAAE,CAAC,SAAS,SAAS,GAAG,GAAG,IAAI,CAC/E,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,eAAe,KACrB,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAEpB,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,SAAS,GAAG,SAAS,EAAE,CAAC,SAAS,SAAS,GAAG,SAAS,IAChF,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAClB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GACX,UAAU,GACV,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AA2GpB,wBAAgB,UAAU,CAAC,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,SAAS,EACjE,GAAG,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAClB,MAAM,GAAE,GAAQ,GACf,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAuBtB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workglow/task-graph",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.126",
|
|
5
5
|
"description": "Task graph management for Workglow, providing DAG construction, execution planning, and workflow orchestration.",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"watch": "concurrently -c 'auto' 'bun:watch-*'",
|
|
@@ -22,10 +22,19 @@
|
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
|
-
"react-native":
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
"react-native": {
|
|
26
|
+
"types": "./dist/browser.d.ts",
|
|
27
|
+
"import": "./dist/browser.js"
|
|
28
|
+
},
|
|
29
|
+
"browser": {
|
|
30
|
+
"types": "./dist/browser.d.ts",
|
|
31
|
+
"import": "./dist/browser.js"
|
|
32
|
+
},
|
|
33
|
+
"bun": {
|
|
34
|
+
"types": "./dist/bun.d.ts",
|
|
35
|
+
"import": "./dist/bun.js"
|
|
36
|
+
},
|
|
37
|
+
"types": "./dist/node.d.ts",
|
|
29
38
|
"import": "./dist/node.js"
|
|
30
39
|
}
|
|
31
40
|
},
|
|
@@ -37,9 +46,9 @@
|
|
|
37
46
|
"access": "public"
|
|
38
47
|
},
|
|
39
48
|
"peerDependencies": {
|
|
40
|
-
"@workglow/job-queue": "0.0.
|
|
41
|
-
"@workglow/storage": "0.0.
|
|
42
|
-
"@workglow/util": "0.0.
|
|
49
|
+
"@workglow/job-queue": "0.0.126",
|
|
50
|
+
"@workglow/storage": "0.0.126",
|
|
51
|
+
"@workglow/util": "0.0.126"
|
|
43
52
|
},
|
|
44
53
|
"peerDependenciesMeta": {
|
|
45
54
|
"@workglow/job-queue": {
|
|
@@ -53,8 +62,8 @@
|
|
|
53
62
|
}
|
|
54
63
|
},
|
|
55
64
|
"devDependencies": {
|
|
56
|
-
"@workglow/job-queue": "0.0.
|
|
57
|
-
"@workglow/storage": "0.0.
|
|
58
|
-
"@workglow/util": "0.0.
|
|
65
|
+
"@workglow/job-queue": "0.0.126",
|
|
66
|
+
"@workglow/storage": "0.0.126",
|
|
67
|
+
"@workglow/util": "0.0.126"
|
|
59
68
|
}
|
|
60
69
|
}
|
package/src/storage/README.md
CHANGED
|
@@ -14,8 +14,25 @@ TaskOutputRepository is a repository for task caching. If a task has the same in
|
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
16
|
// Example usage
|
|
17
|
-
import {
|
|
18
|
-
|
|
17
|
+
import {
|
|
18
|
+
TaskOutputPrimaryKeyNames,
|
|
19
|
+
TaskOutputSchema,
|
|
20
|
+
TaskOutputTabularRepository,
|
|
21
|
+
} from "@workglow/task-graph";
|
|
22
|
+
import { SqliteTabularStorage } from "@workglow/storage";
|
|
23
|
+
import { Sqlite } from "@workglow/storage/sqlite";
|
|
24
|
+
|
|
25
|
+
await Sqlite.init();
|
|
26
|
+
|
|
27
|
+
const outputRepo = new TaskOutputTabularRepository({
|
|
28
|
+
tabularRepository: new SqliteTabularStorage(
|
|
29
|
+
":memory:",
|
|
30
|
+
"task_outputs",
|
|
31
|
+
TaskOutputSchema,
|
|
32
|
+
TaskOutputPrimaryKeyNames,
|
|
33
|
+
["createdAt"]
|
|
34
|
+
),
|
|
35
|
+
});
|
|
19
36
|
await outputRepo.saveOutput("MyTaskType", { param: "value" }, { result: "data" });
|
|
20
37
|
```
|
|
21
38
|
|
|
@@ -31,9 +48,38 @@ The `TaskGraphRepository` class provides:
|
|
|
31
48
|
|
|
32
49
|
```typescript
|
|
33
50
|
// Example usage
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
|
|
51
|
+
import {
|
|
52
|
+
TaskGraphPrimaryKeyNames,
|
|
53
|
+
TaskGraphSchema,
|
|
54
|
+
TaskGraphTabularRepository,
|
|
55
|
+
} from "@workglow/task-graph";
|
|
56
|
+
import {
|
|
57
|
+
FsFolderTabularStorage,
|
|
58
|
+
InMemoryTabularStorage,
|
|
59
|
+
SqliteTabularStorage,
|
|
60
|
+
} from "@workglow/storage";
|
|
61
|
+
import { Sqlite } from "@workglow/storage/sqlite";
|
|
62
|
+
|
|
63
|
+
const fsRepo = new TaskGraphTabularRepository({
|
|
64
|
+
tabularRepository: new FsFolderTabularStorage(
|
|
65
|
+
"./storage",
|
|
66
|
+
TaskGraphSchema,
|
|
67
|
+
TaskGraphPrimaryKeyNames
|
|
68
|
+
),
|
|
69
|
+
});
|
|
70
|
+
const memoryRepo = new TaskGraphTabularRepository({
|
|
71
|
+
tabularRepository: new InMemoryTabularStorage(TaskGraphSchema, TaskGraphPrimaryKeyNames),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
await Sqlite.init();
|
|
75
|
+
const sqliteRepo = new TaskGraphTabularRepository({
|
|
76
|
+
tabularRepository: new SqliteTabularStorage(
|
|
77
|
+
":memory:",
|
|
78
|
+
"task_graphs",
|
|
79
|
+
TaskGraphSchema,
|
|
80
|
+
TaskGraphPrimaryKeyNames
|
|
81
|
+
),
|
|
82
|
+
});
|
|
37
83
|
```
|
|
38
84
|
|
|
39
85
|
## Testing
|
package/dist/types.d.ts
DELETED
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,mCAAmC,CAAC"}
|