rivetkit 3.1.1-rc.1 → 3.1.2-rc.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.
- package/dist/browser/client.d.ts +41 -0
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-2IGAVNUL.js → chunk-5RE3IF3C.js} +2 -2
- package/dist/tsup/{chunk-5HIBMO55.js → chunk-7PUO5YRK.js} +3 -3
- package/dist/tsup/{chunk-LZD54EPS.js → chunk-DKVKYLXH.js} +4 -4
- package/dist/tsup/{chunk-WLFARJG2.cjs → chunk-GI3TPFCE.cjs} +2 -2
- package/dist/tsup/{chunk-WLFARJG2.cjs.map → chunk-GI3TPFCE.cjs.map} +1 -1
- package/dist/tsup/{chunk-BDAEZMRQ.js → chunk-J5ZNIJT3.js} +2 -2
- package/dist/tsup/{chunk-4TUVJYKQ.cjs → chunk-KOB3RR6D.cjs} +7 -7
- package/dist/tsup/{chunk-4TUVJYKQ.cjs.map → chunk-KOB3RR6D.cjs.map} +1 -1
- package/dist/tsup/{chunk-QBM464NJ.js → chunk-LNMODE5R.js} +2 -2
- package/dist/tsup/{chunk-6GQM5TX3.cjs → chunk-MM6QYEV7.cjs} +146 -146
- package/dist/tsup/{chunk-6GQM5TX3.cjs.map → chunk-MM6QYEV7.cjs.map} +1 -1
- package/dist/tsup/{chunk-XOU5GIVI.cjs → chunk-R2GD2TDD.cjs} +3 -3
- package/dist/tsup/{chunk-XOU5GIVI.cjs.map → chunk-R2GD2TDD.cjs.map} +1 -1
- package/dist/tsup/{chunk-TSSTKUHB.js → chunk-SPLLB6BX.js} +2 -2
- package/dist/tsup/{chunk-57I23ITV.cjs → chunk-TR5YB355.cjs} +3 -3
- package/dist/tsup/{chunk-57I23ITV.cjs.map → chunk-TR5YB355.cjs.map} +1 -1
- package/dist/tsup/{chunk-E3FNI5G7.cjs → chunk-TYNEZVC2.cjs} +3 -3
- package/dist/tsup/{chunk-E3FNI5G7.cjs.map → chunk-TYNEZVC2.cjs.map} +1 -1
- package/dist/tsup/{chunk-XA44EGFZ.cjs → chunk-VUFOIAKH.cjs} +10 -10
- package/dist/tsup/{chunk-XA44EGFZ.cjs.map → chunk-VUFOIAKH.cjs.map} +1 -1
- package/dist/tsup/{chunk-HB3RUCG5.js → chunk-WD6L6OTX.js} +2 -2
- package/dist/tsup/{chunk-HB3RUCG5.js.map → chunk-WD6L6OTX.js.map} +1 -1
- package/dist/tsup/{chunk-SQ4KBKBS.cjs → chunk-YPJ3QEDL.cjs} +4 -4
- package/dist/tsup/{chunk-SQ4KBKBS.cjs.map → chunk-YPJ3QEDL.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZIIQIZLQ.js → chunk-YT77YM32.js} +3 -3
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +3 -3
- package/dist/tsup/client/mod.d.ts +3 -3
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-BDdeBoxX.d.cts → config-CTGjM4A5.d.cts} +16 -1
- package/dist/tsup/{config-Ch-SMJ-n.d.ts → config-DLXQ_TVP.d.ts} +16 -1
- package/dist/tsup/{config-CBTr4IhE.d.ts → config-Df5jOcde.d.cts} +26 -0
- package/dist/tsup/{config-CBTr4IhE.d.cts → config-Df5jOcde.d.ts} +26 -0
- package/dist/tsup/{context-B-wRuYrf.d.ts → context-Dmz9Hd6K.d.ts} +2 -2
- package/dist/tsup/{context-NzsxAAoN.d.cts → context-S-Y75hj1.d.cts} +2 -2
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.d.cts +1 -1
- package/dist/tsup/db/drizzle.d.ts +1 -1
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.d.cts +2 -2
- package/dist/tsup/db/mod.d.ts +2 -2
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.d.cts +2 -2
- package/dist/tsup/dynamic/mod.d.ts +2 -2
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/inspector-tab/mod.d.cts +3 -3
- package/dist/tsup/inspector-tab/mod.d.ts +3 -3
- package/dist/tsup/mod.cjs +379 -120
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +4 -4
- package/dist/tsup/mod.d.ts +4 -4
- package/dist/tsup/mod.js +298 -39
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +2 -2
- package/dist/tsup/test/mod.d.ts +2 -2
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/unstable/migrations.d.cts +1 -1
- package/dist/tsup/unstable/migrations.d.ts +1 -1
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +7 -7
- package/dist/tsup/workflow/mod.d.cts +4 -4
- package/dist/tsup/workflow/mod.d.ts +4 -4
- package/dist/tsup/workflow/mod.js +4 -4
- package/package.json +9 -9
- package/src/common/database/config.ts +39 -0
- package/src/common/database/native-database.ts +230 -21
- package/src/registry/napi-runtime.ts +78 -0
- package/src/registry/native.ts +57 -17
- package/src/registry/runtime.ts +52 -0
- package/src/registry/wasm-runtime.ts +88 -0
- /package/dist/tsup/{chunk-2IGAVNUL.js.map → chunk-5RE3IF3C.js.map} +0 -0
- /package/dist/tsup/{chunk-5HIBMO55.js.map → chunk-7PUO5YRK.js.map} +0 -0
- /package/dist/tsup/{chunk-LZD54EPS.js.map → chunk-DKVKYLXH.js.map} +0 -0
- /package/dist/tsup/{chunk-BDAEZMRQ.js.map → chunk-J5ZNIJT3.js.map} +0 -0
- /package/dist/tsup/{chunk-QBM464NJ.js.map → chunk-LNMODE5R.js.map} +0 -0
- /package/dist/tsup/{chunk-TSSTKUHB.js.map → chunk-SPLLB6BX.js.map} +0 -0
- /package/dist/tsup/{chunk-ZIIQIZLQ.js.map → chunk-YT77YM32.js.map} +0 -0
package/dist/tsup/test/mod.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkKOB3RR6Dcjs = require('../chunk-KOB3RR6D.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkMM6QYEV7cjs = require('../chunk-MM6QYEV7.cjs');
|
|
7
7
|
require('../chunk-RTWH3AX3.cjs');
|
|
8
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-R2GD2TDD.cjs');
|
|
9
9
|
require('../chunk-KVFIONKQ.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-GI3TPFCE.cjs');
|
|
11
11
|
require('../chunk-MGI2VVF6.cjs');
|
|
12
12
|
|
|
13
13
|
// src/test/ready.ts
|
|
@@ -36,8 +36,8 @@ async function setupTest(c, registry) {
|
|
|
36
36
|
registry.config.noWelcome = true;
|
|
37
37
|
registry.start();
|
|
38
38
|
await waitForRegistryReady(registry);
|
|
39
|
-
const client =
|
|
40
|
-
...
|
|
39
|
+
const client = _chunkKOB3RR6Dcjs.createClient.call(void 0, {
|
|
40
|
+
..._chunkMM6QYEV7cjs.convertRegistryConfigToClientConfig.call(void 0, registry.parseConfig()),
|
|
41
41
|
disableMetadataLookup: false
|
|
42
42
|
});
|
|
43
43
|
c.onTestFinished(async () => {
|
package/dist/tsup/test/mod.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TestContext } from 'vitest';
|
|
2
|
-
import { aK as Registry, a8 as Client } from '../config-
|
|
2
|
+
import { aK as Registry, a8 as Client } from '../config-CTGjM4A5.cjs';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
-
import '../config-
|
|
4
|
+
import '../config-Df5jOcde.cjs';
|
|
5
5
|
import '@rivetkit/rivetkit-wasm';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'pino';
|
package/dist/tsup/test/mod.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TestContext } from 'vitest';
|
|
2
|
-
import { aK as Registry, a8 as Client } from '../config-
|
|
2
|
+
import { aK as Registry, a8 as Client } from '../config-DLXQ_TVP.js';
|
|
3
3
|
import 'zod/v4';
|
|
4
|
-
import '../config-
|
|
4
|
+
import '../config-Df5jOcde.js';
|
|
5
5
|
import '@rivetkit/rivetkit-wasm';
|
|
6
6
|
import 'zod';
|
|
7
7
|
import 'pino';
|
package/dist/tsup/test/mod.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YT77YM32.js";
|
|
4
4
|
import {
|
|
5
5
|
convertRegistryConfigToClientConfig
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-7PUO5YRK.js";
|
|
7
7
|
import "../chunk-A2CF6PFH.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-SPLLB6BX.js";
|
|
9
9
|
import "../chunk-JTHHCZCZ.js";
|
|
10
|
-
import "../chunk-
|
|
10
|
+
import "../chunk-WD6L6OTX.js";
|
|
11
11
|
import "../chunk-ZOVJDAOW.js";
|
|
12
12
|
|
|
13
13
|
// src/test/ready.ts
|
package/dist/tsup/utils.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkGI3TPFCEcjs = require('./chunk-GI3TPFCE.cjs');
|
|
23
23
|
require('./chunk-MGI2VVF6.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
@@ -42,5 +42,5 @@ require('./chunk-MGI2VVF6.cjs');
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
exports.EXTRA_ERROR_LOG =
|
|
45
|
+
exports.EXTRA_ERROR_LOG = _chunkGI3TPFCEcjs.EXTRA_ERROR_LOG; exports.SinglePromiseQueue = _chunkGI3TPFCEcjs.SinglePromiseQueue; exports.VERSION = _chunkGI3TPFCEcjs.VERSION; exports.arrayBuffersEqual = _chunkGI3TPFCEcjs.arrayBuffersEqual; exports.assertUnreachable = _chunkGI3TPFCEcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkGI3TPFCEcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkGI3TPFCEcjs.combineUrlPath; exports.dbg = _chunkGI3TPFCEcjs.dbg; exports.detectRuntime = _chunkGI3TPFCEcjs.detectRuntime; exports.getEnvUniversal = _chunkGI3TPFCEcjs.getEnvUniversal; exports.httpUserAgent = _chunkGI3TPFCEcjs.httpUserAgent; exports.interval = _chunkGI3TPFCEcjs.interval; exports.joinSignals = _chunkGI3TPFCEcjs.joinSignals; exports.jsonParseCompat = _chunkGI3TPFCEcjs.jsonParseCompat; exports.jsonStringifyCompat = _chunkGI3TPFCEcjs.jsonStringifyCompat; exports.promiseWithResolvers = _chunkGI3TPFCEcjs.promiseWithResolvers; exports.setLongTimeout = _chunkGI3TPFCEcjs.setLongTimeout; exports.sleep = _chunkGI3TPFCEcjs.sleep; exports.stringifyError = _chunkGI3TPFCEcjs.stringifyError; exports.toUint8Array = _chunkGI3TPFCEcjs.toUint8Array;
|
|
46
46
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/tsup/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2;
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var _chunkVUFOIAKHcjs = require('../chunk-VUFOIAKH.cjs');
|
|
4
|
+
require('../chunk-TYNEZVC2.cjs');
|
|
5
|
+
require('../chunk-YPJ3QEDL.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ var _chunkAQJFKHBKcjs = require('../chunk-AQJFKHBK.cjs');
|
|
|
13
13
|
var _chunkRTWH3AX3cjs = require('../chunk-RTWH3AX3.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkGI3TPFCEcjs = require('../chunk-GI3TPFCE.cjs');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
@@ -761,7 +761,7 @@ function workflow(fn, options = {}) {
|
|
|
761
761
|
function getWorkflowInspector(actorId) {
|
|
762
762
|
let workflowInspector = workflowInspectors.get(actorId);
|
|
763
763
|
if (!workflowInspector) {
|
|
764
|
-
workflowInspector =
|
|
764
|
+
workflowInspector = _chunkVUFOIAKHcjs.createWorkflowInspectorAdapter.call(void 0, );
|
|
765
765
|
workflowInspectors.set(actorId, workflowInspector);
|
|
766
766
|
}
|
|
767
767
|
return workflowInspector;
|
|
@@ -834,13 +834,13 @@ function workflow(fn, options = {}) {
|
|
|
834
834
|
if (shouldRethrowWorkflowError(error)) {
|
|
835
835
|
runCtx.log.error({
|
|
836
836
|
msg: "workflow run failed",
|
|
837
|
-
error:
|
|
837
|
+
error: _chunkGI3TPFCEcjs.stringifyError.call(void 0, error)
|
|
838
838
|
});
|
|
839
839
|
throw error;
|
|
840
840
|
}
|
|
841
841
|
runCtx.log.warn({
|
|
842
842
|
msg: "workflow failed and will sleep until woken",
|
|
843
|
-
error:
|
|
843
|
+
error: _chunkGI3TPFCEcjs.stringifyError.call(void 0, error)
|
|
844
844
|
});
|
|
845
845
|
} finally {
|
|
846
846
|
runCtx.abortSignal.removeEventListener("abort", onAbort);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
|
|
2
2
|
export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
|
|
3
|
-
import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-
|
|
4
|
-
import { A as AnyDatabaseProvider } from '../config-
|
|
5
|
-
import { d as WorkflowContext } from '../context-
|
|
6
|
-
export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-
|
|
3
|
+
import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-CTGjM4A5.cjs';
|
|
4
|
+
import { A as AnyDatabaseProvider } from '../config-Df5jOcde.cjs';
|
|
5
|
+
import { d as WorkflowContext } from '../context-S-Y75hj1.cjs';
|
|
6
|
+
export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-S-Y75hj1.cjs';
|
|
7
7
|
import 'zod/v4';
|
|
8
8
|
import '@rivetkit/rivetkit-wasm';
|
|
9
9
|
import 'zod';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { WorkflowErrorEvent } from '@rivetkit/workflow-engine';
|
|
2
2
|
export { Loop, TryBlockCatchKind, TryBlockConfig, TryBlockFailure, TryBlockResult, TryStepCatchKind, TryStepConfig, TryStepFailure, TryStepResult, WorkflowError, WorkflowErrorEvent } from '@rivetkit/workflow-engine';
|
|
3
|
-
import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-
|
|
4
|
-
import { A as AnyDatabaseProvider } from '../config-
|
|
5
|
-
import { d as WorkflowContext } from '../context-
|
|
6
|
-
export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-
|
|
3
|
+
import { E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext } from '../config-DLXQ_TVP.js';
|
|
4
|
+
import { A as AnyDatabaseProvider } from '../config-Df5jOcde.js';
|
|
5
|
+
import { d as WorkflowContext } from '../context-Dmz9Hd6K.js';
|
|
6
|
+
export { e as WorkflowBranchConfig, W as WorkflowBranchContextOf, a as WorkflowContextOf, f as WorkflowLoopConfig, b as WorkflowLoopContextOf, g as WorkflowStepConfig, h as WorkflowStepContext, c as WorkflowStepContextOf, i as WorkflowTryConfig, j as WorkflowTryStepConfig } from '../context-Dmz9Hd6K.js';
|
|
7
7
|
import 'zod/v4';
|
|
8
8
|
import '@rivetkit/rivetkit-wasm';
|
|
9
9
|
import 'zod';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkflowInspectorAdapter
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DKVKYLXH.js";
|
|
4
|
+
import "../chunk-J5ZNIJT3.js";
|
|
5
|
+
import "../chunk-5RE3IF3C.js";
|
|
6
6
|
import {
|
|
7
7
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
8
8
|
defineRunHandler
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "../chunk-A2CF6PFH.js";
|
|
14
14
|
import {
|
|
15
15
|
stringifyError
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-WD6L6OTX.js";
|
|
17
17
|
import {
|
|
18
18
|
RivetError,
|
|
19
19
|
isActorAbortedError
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rivetkit",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-rc.1",
|
|
4
4
|
"description": "Lightweight libraries for building stateful actors on edge platforms",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -211,15 +211,15 @@
|
|
|
211
211
|
"@hono/zod-openapi": "^1.1.5",
|
|
212
212
|
"@opentelemetry/api": "^1.1.0",
|
|
213
213
|
"@rivetkit/bare-ts": "^0.6.2",
|
|
214
|
-
"@rivetkit/engine-api-full": "3.1.
|
|
215
|
-
"@rivetkit/engine-cli": "3.1.
|
|
216
|
-
"@rivetkit/engine-envoy-protocol": "3.1.
|
|
214
|
+
"@rivetkit/engine-api-full": "3.1.2-rc.1",
|
|
215
|
+
"@rivetkit/engine-cli": "3.1.2-rc.1",
|
|
216
|
+
"@rivetkit/engine-envoy-protocol": "3.1.2-rc.1",
|
|
217
217
|
"@rivetkit/on-change": "6.0.1",
|
|
218
|
-
"@rivetkit/rivetkit-napi": "3.1.
|
|
219
|
-
"@rivetkit/rivetkit-wasm": "3.1.
|
|
220
|
-
"@rivetkit/traces": "3.1.
|
|
221
|
-
"@rivetkit/virtual-websocket": "3.1.
|
|
222
|
-
"@rivetkit/workflow-engine": "3.1.
|
|
218
|
+
"@rivetkit/rivetkit-napi": "3.1.2-rc.1",
|
|
219
|
+
"@rivetkit/rivetkit-wasm": "3.1.2-rc.1",
|
|
220
|
+
"@rivetkit/traces": "3.1.2-rc.1",
|
|
221
|
+
"@rivetkit/virtual-websocket": "3.1.2-rc.1",
|
|
222
|
+
"@rivetkit/workflow-engine": "3.1.2-rc.1",
|
|
223
223
|
"cbor-x": "^1.6.0",
|
|
224
224
|
"drizzle-orm": "0.45.2",
|
|
225
225
|
"hono": "^4.7.0",
|
|
@@ -133,7 +133,12 @@ export interface SqliteDatabase {
|
|
|
133
133
|
sql: string,
|
|
134
134
|
callback?: (row: unknown[], columns: string[]) => void,
|
|
135
135
|
): Promise<void>;
|
|
136
|
+
execSync?(
|
|
137
|
+
sql: string,
|
|
138
|
+
callback?: (row: unknown[], columns: string[]) => void,
|
|
139
|
+
): void;
|
|
136
140
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
141
|
+
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
137
142
|
executeBatch(
|
|
138
143
|
statements: SqliteBatchStatement[],
|
|
139
144
|
): Promise<SqliteExecuteResult[]>;
|
|
@@ -141,12 +146,31 @@ export interface SqliteDatabase {
|
|
|
141
146
|
timeoutMs?: number,
|
|
142
147
|
name?: string,
|
|
143
148
|
): Promise<SqliteTransactionDatabase>;
|
|
149
|
+
beginTransactionSync?(
|
|
150
|
+
timeoutMs?: number,
|
|
151
|
+
name?: string,
|
|
152
|
+
): SynchronousSqliteTransactionDatabase;
|
|
144
153
|
run(sql: string, params?: SqliteBindings): Promise<void>;
|
|
145
154
|
query(sql: string, params?: SqliteBindings): Promise<SqliteQueryResult>;
|
|
146
155
|
nativeMetrics?():
|
|
147
156
|
| SqliteNativeMetrics
|
|
148
157
|
| Promise<SqliteNativeMetrics | null>
|
|
149
158
|
| null;
|
|
159
|
+
/**
|
|
160
|
+
* Returns the ticket of the latest local commit. Synchronous writes return before they are
|
|
161
|
+
* durable; pass the ticket to `whenDurable` before releasing output that depends on them.
|
|
162
|
+
*/
|
|
163
|
+
commitTicket?(): number;
|
|
164
|
+
/**
|
|
165
|
+
* Resolves once the commit `ticket` names and every earlier commit are durable. Rejects with
|
|
166
|
+
* `sqlite.durability_failed` once the database broke and the actor is restarting.
|
|
167
|
+
*/
|
|
168
|
+
whenDurable?(ticket: number): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Restarts the owning actor from durable state. Every later write fails, including the final
|
|
171
|
+
* state save. For native database providers whose in-memory state can no longer be trusted.
|
|
172
|
+
*/
|
|
173
|
+
abortGeneration?(reason: string): void;
|
|
150
174
|
close(): Promise<void>;
|
|
151
175
|
}
|
|
152
176
|
|
|
@@ -155,11 +179,26 @@ export interface SqliteTransactionDatabase {
|
|
|
155
179
|
sql: string,
|
|
156
180
|
callback?: (row: unknown[], columns: string[]) => void,
|
|
157
181
|
): Promise<void>;
|
|
182
|
+
execSync?(
|
|
183
|
+
sql: string,
|
|
184
|
+
callback?: (row: unknown[], columns: string[]) => void,
|
|
185
|
+
): void;
|
|
158
186
|
execute(sql: string, params?: SqliteBindings): Promise<SqliteExecuteResult>;
|
|
187
|
+
executeSync?(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
159
188
|
commit(): Promise<void>;
|
|
160
189
|
rollback(): Promise<void>;
|
|
161
190
|
}
|
|
162
191
|
|
|
192
|
+
export type SynchronousSqliteTransactionDatabase = SqliteTransactionDatabase & {
|
|
193
|
+
execSync(
|
|
194
|
+
sql: string,
|
|
195
|
+
callback?: (row: unknown[], columns: string[]) => void,
|
|
196
|
+
): void;
|
|
197
|
+
executeSync(sql: string, params?: SqliteBindings): SqliteExecuteResult;
|
|
198
|
+
commitSync(): void;
|
|
199
|
+
rollbackSync(): void;
|
|
200
|
+
};
|
|
201
|
+
|
|
163
202
|
/**
|
|
164
203
|
* Provider for opening native databases from the active runtime.
|
|
165
204
|
*/
|