@dudousxd/nestjs-durable-store-drizzle 0.1.0

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 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavB,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB3B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIxB,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmD,CAAC"}
package/dist/schema.js ADDED
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.durableSchema = exports.signalWaiters = exports.stepCheckpoints = exports.workflowRuns = void 0;
4
+ const sqlite_core_1 = require("drizzle-orm/sqlite-core");
5
+ // SQLite / libSQL schema for the durable tables. Timestamps and `wakeAt` are epoch-ms integers
6
+ // (SQLite has no native date type). Import these tables and pass them with your drizzle db.
7
+ exports.workflowRuns = (0, sqlite_core_1.sqliteTable)('durable_workflow_runs', {
8
+ id: (0, sqlite_core_1.text)('id').primaryKey(),
9
+ workflow: (0, sqlite_core_1.text)('workflow').notNull(),
10
+ workflowVersion: (0, sqlite_core_1.text)('workflow_version').notNull(),
11
+ status: (0, sqlite_core_1.text)('status').notNull(),
12
+ input: (0, sqlite_core_1.text)('input', { mode: 'json' }),
13
+ output: (0, sqlite_core_1.text)('output', { mode: 'json' }),
14
+ error: (0, sqlite_core_1.text)('error', { mode: 'json' }),
15
+ wakeAt: (0, sqlite_core_1.integer)('wake_at'),
16
+ lockedBy: (0, sqlite_core_1.text)('locked_by'),
17
+ lockedUntil: (0, sqlite_core_1.integer)('locked_until'),
18
+ createdAt: (0, sqlite_core_1.integer)('created_at').notNull(),
19
+ updatedAt: (0, sqlite_core_1.integer)('updated_at').notNull(),
20
+ });
21
+ exports.stepCheckpoints = (0, sqlite_core_1.sqliteTable)('durable_step_checkpoints', {
22
+ runId: (0, sqlite_core_1.text)('run_id').notNull(),
23
+ seq: (0, sqlite_core_1.integer)('seq').notNull(),
24
+ name: (0, sqlite_core_1.text)('name').notNull(),
25
+ kind: (0, sqlite_core_1.text)('kind').notNull(),
26
+ stepId: (0, sqlite_core_1.text)('step_id').notNull(),
27
+ status: (0, sqlite_core_1.text)('status').notNull(),
28
+ output: (0, sqlite_core_1.text)('output', { mode: 'json' }),
29
+ error: (0, sqlite_core_1.text)('error', { mode: 'json' }),
30
+ attempts: (0, sqlite_core_1.integer)('attempts').notNull(),
31
+ workerGroup: (0, sqlite_core_1.text)('worker_group'),
32
+ wakeAt: (0, sqlite_core_1.integer)('wake_at'),
33
+ startedAt: (0, sqlite_core_1.integer)('started_at').notNull(),
34
+ finishedAt: (0, sqlite_core_1.integer)('finished_at').notNull(),
35
+ }, (t) => [(0, sqlite_core_1.primaryKey)({ columns: [t.runId, t.seq] })]);
36
+ exports.signalWaiters = (0, sqlite_core_1.sqliteTable)('durable_signal_waiters', {
37
+ token: (0, sqlite_core_1.text)('token').primaryKey(),
38
+ runId: (0, sqlite_core_1.text)('run_id').notNull(),
39
+ seq: (0, sqlite_core_1.integer)('seq').notNull(),
40
+ });
41
+ exports.durableSchema = { workflowRuns: exports.workflowRuns, stepCheckpoints: exports.stepCheckpoints, signalWaiters: exports.signalWaiters };
42
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":";;;AAAA,yDAAiF;AAEjF,+FAA+F;AAC/F,4FAA4F;AAE/E,QAAA,YAAY,GAAG,IAAA,yBAAW,EAAC,uBAAuB,EAAE;IAC/D,EAAE,EAAE,IAAA,kBAAI,EAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,QAAQ,EAAE,IAAA,kBAAI,EAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACpC,eAAe,EAAE,IAAA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AC;IACxC,KAAK,EAAE,IAAA,kBAAI,EAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACtC,QAAQ,EAAE,IAAA,qBAAO,EAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACvC,WAAW,EAAE,IAAA,kBAAI,EAAC,cAAc,CAAC;IACjC,MAAM,EAAE,IAAA,qBAAO,EAAC,SAAS,CAAC;IAC1B,SAAS,EAAE,IAAA,qBAAO,EAAC,YAAY,CAAC,CAAC,OAAO,EAAE;IAC1C,UAAU,EAAE,IAAA,qBAAO,EAAC,aAAa,CAAC,CAAC,OAAO,EAAE;CAC7C,EACD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAA,wBAAU,EAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CACnD,CAAC;AAEW,QAAA,aAAa,GAAG,IAAA,yBAAW,EAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,IAAA,kBAAI,EAAC,OAAO,CAAC,CAAC,UAAU,EAAE;IACjC,KAAK,EAAE,IAAA,kBAAI,EAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;IAC/B,GAAG,EAAE,IAAA,qBAAO,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE;CAC9B,CAAC,CAAC;AAEU,QAAA,aAAa,GAAG,EAAE,YAAY,EAAZ,oBAAY,EAAE,eAAe,EAAf,uBAAe,EAAE,aAAa,EAAb,qBAAa,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@dudousxd/nestjs-durable-store-drizzle",
3
+ "version": "0.1.0",
4
+ "description": "Drizzle ORM (SQLite/libSQL) adapter for the nestjs-durable StateStore",
5
+ "license": "MIT",
6
+ "author": "Davide Carvalho",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/DavideCarvalho/nestjs-durable.git",
10
+ "directory": "packages/store-drizzle"
11
+ },
12
+ "type": "commonjs",
13
+ "main": "dist/index.js",
14
+ "types": "dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "peerDependencies": {
19
+ "@dudousxd/nestjs-durable-core": ">=0.1.0 <1.0.0",
20
+ "drizzle-orm": "^0.36.0 || ^0.37.0 || ^0.38.0 || ^0.39.0 || ^0.40.0 || ^0.41.0 || ^0.42.0 || ^0.43.0 || ^0.44.0"
21
+ },
22
+ "devDependencies": {
23
+ "@types/better-sqlite3": "7.6.11",
24
+ "better-sqlite3": "11.10.0",
25
+ "drizzle-orm": "0.44.7",
26
+ "typescript": "5.9.3",
27
+ "@dudousxd/nestjs-durable-core": "^0.1.0"
28
+ },
29
+ "scripts": {
30
+ "build": "tsc -p tsconfig.json",
31
+ "typecheck": "tsc -p tsconfig.json --noEmit"
32
+ }
33
+ }