@rytejs/core 0.6.0 → 0.7.1

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.
@@ -0,0 +1,21 @@
1
+ import { a as WorkflowSnapshot } from './snapshot-D5iZubCz.cjs';
2
+
3
+ interface StoredWorkflow {
4
+ snapshot: WorkflowSnapshot;
5
+ version: number;
6
+ }
7
+ interface SaveOptions {
8
+ id: string;
9
+ snapshot: WorkflowSnapshot;
10
+ expectedVersion: number;
11
+ events?: Array<{
12
+ type: string;
13
+ data: unknown;
14
+ }>;
15
+ }
16
+ interface StoreAdapter {
17
+ load(id: string): Promise<StoredWorkflow | null>;
18
+ save(options: SaveOptions): Promise<void>;
19
+ }
20
+
21
+ export type { StoredWorkflow as S, StoreAdapter as a, SaveOptions as b };
@@ -0,0 +1,21 @@
1
+ import { a as WorkflowSnapshot } from './snapshot-D5iZubCz.js';
2
+
3
+ interface StoredWorkflow {
4
+ snapshot: WorkflowSnapshot;
5
+ version: number;
6
+ }
7
+ interface SaveOptions {
8
+ id: string;
9
+ snapshot: WorkflowSnapshot;
10
+ expectedVersion: number;
11
+ events?: Array<{
12
+ type: string;
13
+ data: unknown;
14
+ }>;
15
+ }
16
+ interface StoreAdapter {
17
+ load(id: string): Promise<StoredWorkflow | null>;
18
+ save(options: SaveOptions): Promise<void>;
19
+ }
20
+
21
+ export type { StoredWorkflow as S, StoreAdapter as a, SaveOptions as b };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rytejs/core",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Type-safe workflow engine with Zod validation and middleware pipelines",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,6 +9,21 @@
9
9
  "types": "./dist/index.d.ts",
10
10
  "import": "./dist/index.js",
11
11
  "require": "./dist/index.cjs"
12
+ },
13
+ "./store": {
14
+ "types": "./dist/store/index.d.ts",
15
+ "import": "./dist/store/index.js",
16
+ "require": "./dist/store/index.cjs"
17
+ },
18
+ "./reactor": {
19
+ "types": "./dist/reactor/index.d.ts",
20
+ "import": "./dist/reactor/index.js",
21
+ "require": "./dist/reactor/index.cjs"
22
+ },
23
+ "./executor": {
24
+ "types": "./dist/executor/index.d.ts",
25
+ "import": "./dist/executor/index.js",
26
+ "require": "./dist/executor/index.cjs"
12
27
  }
13
28
  },
14
29
  "main": "./dist/index.cjs",
@@ -36,13 +51,15 @@
36
51
  "zod": "^4.0.0"
37
52
  },
38
53
  "devDependencies": {
39
- "tsup": "^8.0.0",
40
- "typescript": "^5.7.0",
41
- "vitest": "^3.0.0",
42
- "zod": "^4.0.0"
54
+ "@types/better-sqlite3": "^7.6.13",
55
+ "better-sqlite3": "^12.8.0",
56
+ "tsup": "^8.5.0",
57
+ "typescript": "^5.9.0",
58
+ "vitest": "^4.0.0",
59
+ "zod": "^4.3.0"
43
60
  },
44
61
  "engines": {
45
- "node": ">=18"
62
+ "node": ">=20"
46
63
  },
47
64
  "scripts": {
48
65
  "build": "tsup",