rivetkit 0.0.0-sqlite-profiling-compat.4a9a623 → 0.0.0-sqlite-sync-3-0-0-release.14341d0
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 +1317 -765
- package/dist/browser/client.js +1433 -692
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.d.ts +252 -129
- package/dist/browser/inspector/client.js +2042 -228
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/actor/errors.cjs +6 -2
- package/dist/tsup/actor/errors.cjs.map +1 -1
- package/dist/tsup/actor/errors.d.cts +1 -1
- package/dist/tsup/actor/errors.d.ts +1 -1
- package/dist/tsup/actor/errors.js +5 -1
- package/dist/tsup/agent-os/index.cjs +3 -2367
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +1 -2277
- package/dist/tsup/agent-os/index.d.ts +1 -2277
- package/dist/tsup/agent-os/index.js +3 -2367
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-AGDY6TKH.js → chunk-2EQ2WCO7.js} +1054 -364
- package/dist/tsup/chunk-2EQ2WCO7.js.map +1 -0
- package/dist/tsup/{chunk-7QKCGUTJ.cjs → chunk-4H2LT2WB.cjs} +444 -29
- package/dist/tsup/chunk-4H2LT2WB.cjs.map +1 -0
- package/dist/tsup/{chunk-XIX5DOZN.js → chunk-6FEYCVZC.js} +196 -20
- package/dist/tsup/chunk-6FEYCVZC.js.map +1 -0
- package/dist/tsup/{chunk-QAVN4QNO.cjs → chunk-6WYQ3NJI.cjs} +7 -7
- package/dist/tsup/chunk-6WYQ3NJI.cjs.map +1 -0
- package/dist/tsup/{chunk-75UE45DE.js → chunk-6ZJX3KXW.js} +436 -21
- package/dist/tsup/chunk-6ZJX3KXW.js.map +1 -0
- package/dist/tsup/{chunk-HXUEHHJF.js → chunk-A2CF6PFH.js} +19 -11
- package/dist/tsup/chunk-A2CF6PFH.js.map +1 -0
- package/dist/tsup/{chunk-RIT7N3TX.js → chunk-AIGW2SKA.js} +50 -3
- package/dist/tsup/chunk-AIGW2SKA.js.map +1 -0
- package/dist/tsup/{chunk-3MHDOUD7.cjs → chunk-HDVZ6YZG.cjs} +197 -21
- package/dist/tsup/chunk-HDVZ6YZG.cjs.map +1 -0
- package/dist/tsup/{chunk-2CICCOBL.cjs → chunk-HU4F7H3F.cjs} +52 -5
- package/dist/tsup/chunk-HU4F7H3F.cjs.map +1 -0
- package/dist/tsup/{chunk-4PX3ZKJR.js → chunk-JNJEWQZL.js} +3 -3
- package/dist/tsup/chunk-JNJEWQZL.js.map +1 -0
- package/dist/tsup/{chunk-JZ7TWV65.js → chunk-JTHHCZCZ.js} +24 -1
- package/dist/tsup/chunk-JTHHCZCZ.js.map +1 -0
- package/dist/tsup/{chunk-ZA7FLHKH.cjs → chunk-KVFIONKQ.cjs} +25 -2
- package/dist/tsup/chunk-KVFIONKQ.cjs.map +1 -0
- package/dist/tsup/{chunk-4FC7TVS6.cjs → chunk-MGI2VVF6.cjs} +39 -7
- package/dist/tsup/chunk-MGI2VVF6.cjs.map +1 -0
- package/dist/tsup/{chunk-NHUTYWKU.cjs → chunk-NE5CUQRN.cjs} +1173 -483
- package/dist/tsup/chunk-NE5CUQRN.cjs.map +1 -0
- package/dist/tsup/{chunk-IICIOTML.js → chunk-OX5MX7TO.js} +2 -2
- package/dist/tsup/{chunk-ND567FR5.cjs → chunk-PSIBTOAR.cjs} +3 -3
- package/dist/tsup/chunk-PSIBTOAR.cjs.map +1 -0
- package/dist/tsup/chunk-PW6FYEIV.cjs +14 -0
- package/dist/tsup/chunk-PW6FYEIV.cjs.map +1 -0
- package/dist/tsup/{chunk-VE2X4KMG.cjs → chunk-RTWH3AX3.cjs} +18 -10
- package/dist/tsup/chunk-RTWH3AX3.cjs.map +1 -0
- package/dist/tsup/chunk-SLICBKAU.js +14 -0
- package/dist/tsup/chunk-SLICBKAU.js.map +1 -0
- package/dist/tsup/{chunk-XFYEVYHG.js → chunk-WCVYMFWJ.js} +16 -9
- package/dist/tsup/chunk-WCVYMFWJ.js.map +1 -0
- package/dist/tsup/chunk-WX3JS4XU.cjs +243 -0
- package/dist/tsup/chunk-WX3JS4XU.cjs.map +1 -0
- package/dist/tsup/chunk-X32L7FDD.js +243 -0
- package/dist/tsup/chunk-X32L7FDD.js.map +1 -0
- package/dist/tsup/{chunk-2WMYYG4R.cjs → chunk-XAY2HIZN.cjs} +18 -11
- package/dist/tsup/chunk-XAY2HIZN.cjs.map +1 -0
- package/dist/tsup/{chunk-ZZ3WBRPD.js → chunk-ZOVJDAOW.js} +38 -6
- package/dist/tsup/chunk-ZOVJDAOW.js.map +1 -0
- package/dist/tsup/client/mod.cjs +8 -9
- package/dist/tsup/client/mod.cjs.map +1 -1
- package/dist/tsup/client/mod.d.cts +32 -6
- package/dist/tsup/client/mod.d.ts +32 -6
- package/dist/tsup/client/mod.js +7 -8
- package/dist/tsup/common/log.cjs +5 -3
- package/dist/tsup/common/log.cjs.map +1 -1
- package/dist/tsup/common/log.d.cts +5 -1
- package/dist/tsup/common/log.d.ts +5 -1
- package/dist/tsup/common/log.js +6 -4
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.cjs.map +1 -1
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{config-BR1Nn0QQ.d.ts → config-B4erdavw.d.ts} +571 -65
- package/dist/tsup/{config-B0LNDrLY.d.ts → config-BfG1qpYz.d.cts} +80 -14
- package/dist/tsup/{config-B0LNDrLY.d.cts → config-BfG1qpYz.d.ts} +80 -14
- package/dist/tsup/{config-tCvkwzyN.d.cts → config-DK144OAw.d.cts} +571 -65
- package/dist/tsup/{context-oc9zhA3x.d.ts → context-Cvnf3BRe.d.cts} +3 -2
- package/dist/tsup/{context-D4WDwf9m.d.cts → context-Oxi6YWcG.d.ts} +3 -2
- package/dist/tsup/db/drizzle.cjs +127 -67
- package/dist/tsup/db/drizzle.cjs.map +1 -1
- package/dist/tsup/db/drizzle.d.cts +8 -4
- package/dist/tsup/db/drizzle.d.ts +8 -4
- package/dist/tsup/db/drizzle.js +127 -67
- package/dist/tsup/db/drizzle.js.map +1 -1
- package/dist/tsup/db/mod.cjs +6 -126
- package/dist/tsup/db/mod.cjs.map +1 -1
- package/dist/tsup/db/mod.d.cts +8 -4
- package/dist/tsup/db/mod.d.ts +8 -4
- package/dist/tsup/db/mod.js +5 -125
- package/dist/tsup/db/mod.js.map +1 -1
- package/dist/tsup/dynamic/mod.cjs +2 -2
- package/dist/tsup/dynamic/mod.cjs.map +1 -1
- package/dist/tsup/dynamic/mod.d.cts +6 -4
- package/dist/tsup/dynamic/mod.d.ts +6 -4
- package/dist/tsup/dynamic/mod.js +1 -1
- package/dist/tsup/inspector/mod.cjs +47 -12
- package/dist/tsup/inspector/mod.cjs.map +1 -1
- package/dist/tsup/inspector/mod.d.cts +26 -136
- package/dist/tsup/inspector/mod.d.ts +26 -136
- package/dist/tsup/inspector/mod.js +46 -11
- package/dist/tsup/inspector/mod.js.map +1 -1
- package/dist/tsup/inspector/workflow.cjs +21 -0
- package/dist/tsup/inspector/workflow.cjs.map +1 -0
- package/dist/tsup/inspector/workflow.d.cts +144 -0
- package/dist/tsup/inspector/workflow.d.ts +144 -0
- package/dist/tsup/inspector/workflow.js +21 -0
- package/dist/tsup/inspector/workflow.js.map +1 -0
- package/dist/tsup/inspector-tab/mod.cjs +2 -13
- package/dist/tsup/inspector-tab/mod.cjs.map +1 -1
- package/dist/tsup/inspector-tab/mod.d.cts +9 -17
- package/dist/tsup/inspector-tab/mod.d.ts +9 -17
- package/dist/tsup/inspector-tab/mod.js +1 -12
- package/dist/tsup/inspector-tab/mod.js.map +1 -1
- package/dist/tsup/mod.cjs +2728 -611
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +9 -7
- package/dist/tsup/mod.d.ts +9 -7
- package/dist/tsup/mod.js +2645 -528
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +19 -17
- package/dist/tsup/test/mod.cjs.map +1 -1
- package/dist/tsup/test/mod.d.cts +6 -4
- package/dist/tsup/test/mod.d.ts +6 -4
- package/dist/tsup/test/mod.js +18 -16
- package/dist/tsup/test/mod.js.map +1 -1
- package/dist/tsup/unstable/migrations.cjs +101 -0
- package/dist/tsup/unstable/migrations.cjs.map +1 -0
- package/dist/tsup/unstable/migrations.d.cts +29 -0
- package/dist/tsup/unstable/migrations.d.ts +29 -0
- package/dist/tsup/unstable/migrations.js +101 -0
- package/dist/tsup/unstable/migrations.js.map +1 -0
- package/dist/tsup/{utils-CqDnC_PS.d.cts → utils-3rsE0JvI.d.cts} +25 -2
- package/dist/tsup/{utils-CqDnC_PS.d.ts → utils-3rsE0JvI.d.ts} +25 -2
- package/dist/tsup/utils-C1O-SklO.d.ts +162 -0
- package/dist/tsup/utils-C6b0aYUM.d.cts +162 -0
- package/dist/tsup/utils.cjs +7 -3
- package/dist/tsup/utils.cjs.map +1 -1
- package/dist/tsup/utils.d.cts +4 -147
- package/dist/tsup/utils.d.ts +4 -147
- package/dist/tsup/utils.js +6 -2
- package/dist/tsup/workflow/mod.cjs +260 -200
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +8 -6
- package/dist/tsup/workflow/mod.d.ts +8 -6
- package/dist/tsup/workflow/mod.js +249 -189
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +34 -14
- package/src/actor/actions.ts +155 -0
- package/src/actor/config.ts +403 -43
- package/src/actor/definition.ts +26 -7
- package/src/actor/errors.ts +87 -5
- package/src/actor/keys.ts +86 -0
- package/src/actor/mod.ts +15 -1
- package/src/actor/tracing.ts +28 -0
- package/src/agent-os/index.ts +5 -65
- package/src/client/actor-common.ts +8 -15
- package/src/client/actor-conn.ts +178 -25
- package/src/client/actor-handle.ts +180 -42
- package/src/client/actor-query.ts +8 -1
- package/src/client/auth.ts +37 -0
- package/src/client/client.ts +89 -21
- package/src/client/config.ts +27 -2
- package/src/client/errors.ts +2 -1
- package/src/client/lifecycle-errors.ts +29 -1
- package/src/client/mod.ts +9 -0
- package/src/client/outbound-telemetry.ts +66 -0
- package/src/client/query.ts +2 -0
- package/src/client/queue.ts +3 -0
- package/src/client/raw-utils.ts +37 -8
- package/src/client/resolve-gateway-target.ts +2 -0
- package/src/client/retry-budget.ts +78 -0
- package/src/client/token-provider.ts +93 -0
- package/src/client/utils.ts +16 -2
- package/src/common/actor-router-consts.ts +5 -0
- package/src/common/actor-telemetry-context.ts +19 -0
- package/src/common/bare/generated/actor-runtime-socket-protocol/v1.ts +848 -0
- package/src/common/bare/generated/inspector/v5.ts +1016 -0
- package/src/common/bare/generated/inspector/v6.ts +1367 -0
- package/src/common/bare/transport/v1.ts +36 -0
- package/src/common/database/config.ts +108 -15
- package/src/common/database/mod.ts +247 -76
- package/src/common/database/native-database.ts +433 -23
- package/src/common/database/shared.ts +24 -0
- package/src/common/encoding.ts +31 -21
- package/src/common/fetch-like.ts +63 -0
- package/src/common/inspector-transport.ts +12 -2
- package/src/common/log.ts +14 -8
- package/src/common/otel-context.ts +99 -0
- package/src/common/router.ts +1 -1
- package/src/common/utils.ts +7 -19
- package/src/db/drizzle.ts +182 -80
- package/src/db/mod.ts +2 -0
- package/src/dynamic/isolate-runtime.ts +0 -2
- package/src/engine-api/actors.ts +3 -3
- package/src/engine-client/actor-http-client.ts +29 -20
- package/src/engine-client/actor-websocket-client.ts +6 -3
- package/src/engine-client/api-endpoints.ts +72 -14
- package/src/engine-client/driver.ts +8 -15
- package/src/engine-client/mod.ts +248 -112
- package/src/inspector/client.browser.ts +134 -16
- package/src/inspector/mod.ts +1 -1
- package/src/inspector/workflow.ts +61 -0
- package/src/inspector-tab/mod.ts +1 -15
- package/src/registry/config/envoy.ts +2 -18
- package/src/registry/config/index.ts +54 -61
- package/src/registry/index.ts +324 -21
- package/src/registry/napi-runtime.ts +583 -39
- package/src/registry/native-http.ts +225 -0
- package/src/registry/native.ts +1365 -414
- package/src/registry/run-handler-coordinator.ts +219 -0
- package/src/registry/runtime.ts +372 -7
- package/src/registry/wasm-runtime.ts +490 -21
- package/src/registry/write-through-proxy.ts +101 -0
- package/src/test/mod.ts +1 -19
- package/src/test/ready.ts +22 -0
- package/src/unstable/migrations.ts +141 -0
- package/src/utils/env-vars.ts +15 -6
- package/src/utils/node.ts +44 -28
- package/src/utils.ts +3 -0
- package/src/workflow/context.ts +9 -27
- package/src/workflow/driver.ts +253 -116
- package/src/workflow/inspector.ts +23 -24
- package/src/workflow/mod.ts +50 -72
- package/dist/tsup/chunk-2CICCOBL.cjs.map +0 -1
- package/dist/tsup/chunk-2WMYYG4R.cjs.map +0 -1
- package/dist/tsup/chunk-3MHDOUD7.cjs.map +0 -1
- package/dist/tsup/chunk-4FC7TVS6.cjs.map +0 -1
- package/dist/tsup/chunk-4PX3ZKJR.js.map +0 -1
- package/dist/tsup/chunk-75UE45DE.js.map +0 -1
- package/dist/tsup/chunk-7QKCGUTJ.cjs.map +0 -1
- package/dist/tsup/chunk-AGDY6TKH.js.map +0 -1
- package/dist/tsup/chunk-HXUEHHJF.js.map +0 -1
- package/dist/tsup/chunk-JZ7TWV65.js.map +0 -1
- package/dist/tsup/chunk-ND567FR5.cjs.map +0 -1
- package/dist/tsup/chunk-NHUTYWKU.cjs.map +0 -1
- package/dist/tsup/chunk-QAVN4QNO.cjs.map +0 -1
- package/dist/tsup/chunk-RIT7N3TX.js.map +0 -1
- package/dist/tsup/chunk-RV5MAFDT.cjs +0 -382
- package/dist/tsup/chunk-RV5MAFDT.cjs.map +0 -1
- package/dist/tsup/chunk-VE2X4KMG.cjs.map +0 -1
- package/dist/tsup/chunk-XFYEVYHG.js.map +0 -1
- package/dist/tsup/chunk-XHGDS3DZ.js +0 -382
- package/dist/tsup/chunk-XHGDS3DZ.js.map +0 -1
- package/dist/tsup/chunk-XIX5DOZN.js.map +0 -1
- package/dist/tsup/chunk-ZA7FLHKH.cjs.map +0 -1
- package/dist/tsup/chunk-ZZ3WBRPD.js.map +0 -1
- package/src/actor/driver.ts +0 -141
- package/src/actor/instance/mod.ts +0 -2484
- package/src/actor/keys.test.ts +0 -275
- package/src/actor/utils.test.ts +0 -48
- package/src/agent-os/actor/cron.ts +0 -84
- package/src/agent-os/actor/db.ts +0 -54
- package/src/agent-os/actor/filesystem.ts +0 -131
- package/src/agent-os/actor/index.ts +0 -285
- package/src/agent-os/actor/network.ts +0 -58
- package/src/agent-os/actor/preview.ts +0 -190
- package/src/agent-os/actor/process.ts +0 -177
- package/src/agent-os/actor/session.ts +0 -518
- package/src/agent-os/actor/shell.ts +0 -60
- package/src/agent-os/config.ts +0 -79
- package/src/agent-os/fs/database-vfs.ts +0 -624
- package/src/agent-os/types.ts +0 -148
- package/src/client/test.ts +0 -44
- package/src/common/database/mod.test.ts +0 -137
- package/src/common/database/native-database.test.ts +0 -211
- package/src/common/inline-websocket-adapter.test.ts +0 -51
- package/src/drivers/engine/actor-driver.ts +0 -2473
- package/src/registry/process-metrics.ts +0 -250
- package/src/registry/runtime.test.ts +0 -50
- package/src/utils/endpoint-parser.test.ts +0 -206
- package/src/utils.test.ts +0 -34
- /package/dist/tsup/{chunk-IICIOTML.js.map → chunk-OX5MX7TO.js.map} +0 -0
package/dist/tsup/db/mod.js
CHANGED
|
@@ -1,129 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function hasMultipleStatements(query) {
|
|
8
|
-
const trimmed = query.trim().replace(/;+$/, "").trimEnd();
|
|
9
|
-
return trimmed.includes(";");
|
|
10
|
-
}
|
|
11
|
-
function db({
|
|
12
|
-
onMigrate,
|
|
13
|
-
profiling
|
|
14
|
-
} = {}) {
|
|
15
|
-
return {
|
|
16
|
-
sqliteProfiling: profiling,
|
|
17
|
-
createClient: async (ctx) => {
|
|
18
|
-
const nativeDatabaseProvider = ctx.nativeDatabaseProvider;
|
|
19
|
-
if (!nativeDatabaseProvider) {
|
|
20
|
-
throw new Error(
|
|
21
|
-
"native SQLite is required, but the current runtime did not provide a native database provider"
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
const db2 = await nativeDatabaseProvider.open(ctx.actorId);
|
|
25
|
-
let closed = false;
|
|
26
|
-
const ensureOpen = () => {
|
|
27
|
-
if (closed) {
|
|
28
|
-
throw new Error(
|
|
29
|
-
"Database is closed. This usually means a background timer (setInterval, setTimeout) or a stray promise is still running after the actor stopped. Use c.abortSignal to clean up timers before the actor shuts down."
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const client = {
|
|
34
|
-
execute: async (query, ...args) => {
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
|
-
ensureOpen();
|
|
37
|
-
const kvReadsBefore = ((_a = ctx.metrics) == null ? void 0 : _a.totalKvReads) ?? 0;
|
|
38
|
-
const kvWritesBefore = ((_b = ctx.metrics) == null ? void 0 : _b.totalKvWrites) ?? 0;
|
|
39
|
-
const start = performance.now();
|
|
40
|
-
try {
|
|
41
|
-
if (args.length > 0) {
|
|
42
|
-
const bindings = args.length === 1 && isSqliteBindingObject(args[0]) ? toSqliteBindings(args[0]) : toSqliteBindings(args);
|
|
43
|
-
const { rows, columns } = await db2.execute(
|
|
44
|
-
query,
|
|
45
|
-
bindings
|
|
46
|
-
);
|
|
47
|
-
return rows.map(
|
|
48
|
-
(row) => rowToObject(row, columns)
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
if (!hasMultipleStatements(query)) {
|
|
52
|
-
const { rows, columns } = await db2.execute(query);
|
|
53
|
-
return rows.map(
|
|
54
|
-
(row) => rowToObject(row, columns)
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
return await execMultiStatement(db2, query);
|
|
58
|
-
} finally {
|
|
59
|
-
const durationMs = performance.now() - start;
|
|
60
|
-
(_c = ctx.metrics) == null ? void 0 : _c.trackSql(query, durationMs);
|
|
61
|
-
if (ctx.metrics) {
|
|
62
|
-
const kvReads = ctx.metrics.totalKvReads - kvReadsBefore;
|
|
63
|
-
const kvWrites = ctx.metrics.totalKvWrites - kvWritesBefore;
|
|
64
|
-
(_d = ctx.log) == null ? void 0 : _d.debug({
|
|
65
|
-
msg: "sql query",
|
|
66
|
-
query: query.slice(0, 120),
|
|
67
|
-
durationMs,
|
|
68
|
-
kvReads,
|
|
69
|
-
kvWrites
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
close: async () => {
|
|
75
|
-
if (!closed) {
|
|
76
|
-
closed = true;
|
|
77
|
-
await db2.close();
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
nativeMetrics: () => {
|
|
81
|
-
var _a;
|
|
82
|
-
return ((_a = db2.nativeMetrics) == null ? void 0 : _a.call(db2)) ?? null;
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
return client;
|
|
86
|
-
},
|
|
87
|
-
onMigrate: async (client) => {
|
|
88
|
-
if (onMigrate) {
|
|
89
|
-
await withMigrationSavepoint(client, () => onMigrate(client));
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function rowToObject(row, columns) {
|
|
95
|
-
const rowObj = {};
|
|
96
|
-
for (let i = 0; i < columns.length; i++) {
|
|
97
|
-
rowObj[columns[i]] = row[i];
|
|
98
|
-
}
|
|
99
|
-
return rowObj;
|
|
100
|
-
}
|
|
101
|
-
async function execMultiStatement(db2, query) {
|
|
102
|
-
const results = [];
|
|
103
|
-
let columnNames = null;
|
|
104
|
-
await db2.exec(query, (row, columns) => {
|
|
105
|
-
if (!columnNames) {
|
|
106
|
-
columnNames = columns;
|
|
107
|
-
}
|
|
108
|
-
results.push(rowToObject(row, columnNames));
|
|
109
|
-
});
|
|
110
|
-
return results;
|
|
111
|
-
}
|
|
112
|
-
async function withMigrationSavepoint(client, callback) {
|
|
113
|
-
await client.execute("SAVEPOINT __rivet_on_migrate");
|
|
114
|
-
try {
|
|
115
|
-
const result = await callback();
|
|
116
|
-
await client.execute("RELEASE SAVEPOINT __rivet_on_migrate");
|
|
117
|
-
return result;
|
|
118
|
-
} catch (error) {
|
|
119
|
-
try {
|
|
120
|
-
await client.execute("ROLLBACK TO SAVEPOINT __rivet_on_migrate");
|
|
121
|
-
} finally {
|
|
122
|
-
await client.execute("RELEASE SAVEPOINT __rivet_on_migrate");
|
|
123
|
-
}
|
|
124
|
-
throw error;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
2
|
+
db
|
|
3
|
+
} from "../chunk-X32L7FDD.js";
|
|
4
|
+
import "../chunk-JTHHCZCZ.js";
|
|
5
|
+
import "../chunk-6ZJX3KXW.js";
|
|
6
|
+
import "../chunk-ZOVJDAOW.js";
|
|
127
7
|
export {
|
|
128
8
|
db
|
|
129
9
|
};
|
package/dist/tsup/db/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkHDVZ6YZGcjs = require('../chunk-HDVZ6YZG.cjs');
|
|
4
4
|
|
|
5
5
|
// src/dynamic/internal.ts
|
|
6
6
|
var DYNAMIC_ACTOR_DEFINITION_SYMBOL = /* @__PURE__ */ Symbol.for(
|
|
@@ -9,7 +9,7 @@ var DYNAMIC_ACTOR_DEFINITION_SYMBOL = /* @__PURE__ */ Symbol.for(
|
|
|
9
9
|
|
|
10
10
|
// src/dynamic/mod.ts
|
|
11
11
|
function dynamicActor(input) {
|
|
12
|
-
const config =
|
|
12
|
+
const config = _chunkHDVZ6YZGcjs.ActorConfigSchema.parse({
|
|
13
13
|
actions: {}
|
|
14
14
|
});
|
|
15
15
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/dynamic/mod.cjs","../../../src/dynamic/internal.ts","../../../src/dynamic/mod.ts"],"names":[],"mappings":"AAAA;AACE;AACF,yDAA8B;AAC9B;AACA;ACCO,IAAM,gCAAA,kBAAkC,MAAA,CAAO,GAAA;AAAA,EACrD;AACD,CAAA;ADCA;AACA;AEGO,SAAS,YAAA,CACf,KAAA,EACyB;AACzB,EAAA,MAAM,OAAA,EAAS,mCAAA,CAAkB,KAAA,CAAM;AAAA,IACtC,OAAA,EAAS,CAAC;AAAA,EACX,CAAC,CAAA;AAED,EAAA,OAAO;AAAA,IACN,CAAC,+BAA+B,CAAA,EAAG,IAAA;AAAA,IACnC,MAAA;AAAA,IACA,MAAA,EAAQ,KAAA,CAAM;AAAA,EACf,CAAA;AACD;AFJA;AACE;AACF,oCAAC","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/dynamic/mod.cjs","sourcesContent":[null,"import type {\n\tAnyActorDefinition,\n\tBaseActorDefinition,\n} from \"@/actor/definition\";\n\nexport const DYNAMIC_ACTOR_DEFINITION_SYMBOL = Symbol.for(\n\t\"rivetkit.dynamic_actor_definition\",\n);\n\nexport interface DynamicActorSource {\n\tsource: string;\n\tnodeProcess?: {\n\t\tmemoryLimit?: number;\n\t\tcpuTimeLimitMs?: number;\n\t};\n}\n\nexport interface DynamicActorLoadContext {\n\tkey: string[];\n\tclient(): Promise<any>;\n}\n\nexport type DynamicActorLoader = (\n\tc: DynamicActorLoadContext,\n) => DynamicActorSource | Promise<DynamicActorSource>;\n\nexport interface DynamicActorDefinition extends AnyActorDefinition {\n\treadonly [DYNAMIC_ACTOR_DEFINITION_SYMBOL]: true;\n\treadonly loader: DynamicActorLoader;\n}\n\nexport function isDynamicActorDefinition(\n\tdefinition: BaseActorDefinition<\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany,\n\t\tany\n\t>,\n): definition is DynamicActorDefinition {\n\treturn (\n\t\t(definition as Partial<DynamicActorDefinition>)[\n\t\t\tDYNAMIC_ACTOR_DEFINITION_SYMBOL\n\t\t] === true\n\t);\n}\n","import { ActorConfigSchema } from \"@/actor/config\";\nimport type { AnyActorDefinition } from \"@/actor/definition\";\nimport {\n\tDYNAMIC_ACTOR_DEFINITION_SYMBOL,\n\ttype DynamicActorDefinition,\n\ttype DynamicActorLoader,\n} from \"./internal\";\n\nexport interface DynamicActorConfig {\n\tload: DynamicActorLoader;\n}\n\nexport function dynamicActor(\n\tinput: DynamicActorConfig,\n): DynamicActorDefinition {\n\tconst config = ActorConfigSchema.parse({\n\t\tactions: {},\n\t}) as unknown as AnyActorDefinition[\"config\"];\n\n\treturn {\n\t\t[DYNAMIC_ACTOR_DEFINITION_SYMBOL]: true,\n\t\tconfig,\n\t\tloader: input.load,\n\t};\n}\n\nexport type {\n\tDynamicActorDefinition,\n\tDynamicActorLoadContext,\n\tDynamicActorLoader,\n\tDynamicActorSource,\n} from \"./internal\";\n"]}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { A as AnyActorDefinition } from '../config-
|
|
1
|
+
import { A as AnyActorDefinition } from '../config-DK144OAw.cjs';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
-
import '../config-
|
|
3
|
+
import '../config-BfG1qpYz.cjs';
|
|
4
4
|
import '@rivetkit/rivetkit-wasm';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import '@rivetkit/virtual-websocket';
|
|
8
|
+
import '../inspector/workflow.cjs';
|
|
8
9
|
import '@standard-schema/spec';
|
|
10
|
+
import '@rivetkit/engine-api-full';
|
|
11
|
+
import '../utils-C6b0aYUM.cjs';
|
|
9
12
|
import 'hono';
|
|
10
|
-
import '../utils.cjs';
|
|
11
|
-
import '../utils-CqDnC_PS.cjs';
|
|
13
|
+
import '../utils-3rsE0JvI.cjs';
|
|
12
14
|
import 'hono/utils/http-status';
|
|
13
15
|
|
|
14
16
|
declare const DYNAMIC_ACTOR_DEFINITION_SYMBOL: unique symbol;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { A as AnyActorDefinition } from '../config-
|
|
1
|
+
import { A as AnyActorDefinition } from '../config-B4erdavw.js';
|
|
2
2
|
import 'zod/v4';
|
|
3
|
-
import '../config-
|
|
3
|
+
import '../config-BfG1qpYz.js';
|
|
4
4
|
import '@rivetkit/rivetkit-wasm';
|
|
5
5
|
import 'zod';
|
|
6
6
|
import 'pino';
|
|
7
7
|
import '@rivetkit/virtual-websocket';
|
|
8
|
+
import '../inspector/workflow.js';
|
|
8
9
|
import '@standard-schema/spec';
|
|
10
|
+
import '@rivetkit/engine-api-full';
|
|
11
|
+
import '../utils-C1O-SklO.js';
|
|
9
12
|
import 'hono';
|
|
10
|
-
import '../utils.js';
|
|
11
|
-
import '../utils-CqDnC_PS.js';
|
|
13
|
+
import '../utils-3rsE0JvI.js';
|
|
12
14
|
import 'hono/utils/http-status';
|
|
13
15
|
|
|
14
16
|
declare const DYNAMIC_ACTOR_DEFINITION_SYMBOL: unique symbol;
|
package/dist/tsup/dynamic/mod.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXAY2HIZNcjs = require('../chunk-XAY2HIZN.cjs');
|
|
4
|
+
require('../chunk-PW6FYEIV.cjs');
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
var
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-4FC7TVS6.cjs');
|
|
8
|
+
var _chunkHU4F7H3Fcjs = require('../chunk-HU4F7H3F.cjs');
|
|
9
|
+
require('../chunk-4H2LT2WB.cjs');
|
|
10
|
+
require('../chunk-MGI2VVF6.cjs');
|
|
11
11
|
|
|
12
|
-
// src/common/bare/generated/inspector/
|
|
12
|
+
// src/common/bare/generated/inspector/v5.ts
|
|
13
13
|
var _barets = require('@rivetkit/bare-ts'); var bare = _interopRequireWildcard(_barets);
|
|
14
14
|
var DEFAULT_CONFIG = /* @__PURE__ */ bare.Config({});
|
|
15
15
|
function readState(bc) {
|
|
@@ -267,6 +267,20 @@ function writeConnection(bc, x) {
|
|
|
267
267
|
bare.writeString(bc, x.id);
|
|
268
268
|
bare.writeData(bc, x.details);
|
|
269
269
|
}
|
|
270
|
+
function readTabConfigEntry(bc) {
|
|
271
|
+
return {
|
|
272
|
+
id: bare.readString(bc),
|
|
273
|
+
label: read0(bc),
|
|
274
|
+
icon: read0(bc),
|
|
275
|
+
hidden: bare.readBool(bc)
|
|
276
|
+
};
|
|
277
|
+
}
|
|
278
|
+
function writeTabConfigEntry(bc, x) {
|
|
279
|
+
bare.writeString(bc, x.id);
|
|
280
|
+
write0(bc, x.label);
|
|
281
|
+
write0(bc, x.icon);
|
|
282
|
+
bare.writeBool(bc, x.hidden);
|
|
283
|
+
}
|
|
270
284
|
function read1(bc) {
|
|
271
285
|
const len = bare.readUintSafe(bc);
|
|
272
286
|
if (len === 0) {
|
|
@@ -319,6 +333,23 @@ function write4(bc, x) {
|
|
|
319
333
|
writeWorkflowHistory(bc, x);
|
|
320
334
|
}
|
|
321
335
|
}
|
|
336
|
+
function read5(bc) {
|
|
337
|
+
const len = bare.readUintSafe(bc);
|
|
338
|
+
if (len === 0) {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
341
|
+
const result = [readTabConfigEntry(bc)];
|
|
342
|
+
for (let i = 1; i < len; i++) {
|
|
343
|
+
result[i] = readTabConfigEntry(bc);
|
|
344
|
+
}
|
|
345
|
+
return result;
|
|
346
|
+
}
|
|
347
|
+
function write5(bc, x) {
|
|
348
|
+
bare.writeUintSafe(bc, x.length);
|
|
349
|
+
for (let i = 0; i < x.length; i++) {
|
|
350
|
+
writeTabConfigEntry(bc, x[i]);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
322
353
|
function readInit(bc) {
|
|
323
354
|
return {
|
|
324
355
|
connections: read1(bc),
|
|
@@ -328,7 +359,8 @@ function readInit(bc) {
|
|
|
328
359
|
isDatabaseEnabled: bare.readBool(bc),
|
|
329
360
|
queueSize: bare.readUint(bc),
|
|
330
361
|
workflowHistory: read4(bc),
|
|
331
|
-
isWorkflowEnabled: bare.readBool(bc)
|
|
362
|
+
isWorkflowEnabled: bare.readBool(bc),
|
|
363
|
+
tabConfig: read5(bc)
|
|
332
364
|
};
|
|
333
365
|
}
|
|
334
366
|
function writeInit(bc, x) {
|
|
@@ -340,6 +372,7 @@ function writeInit(bc, x) {
|
|
|
340
372
|
bare.writeUint(bc, x.queueSize);
|
|
341
373
|
write4(bc, x.workflowHistory);
|
|
342
374
|
bare.writeBool(bc, x.isWorkflowEnabled);
|
|
375
|
+
write5(bc, x.tabConfig);
|
|
343
376
|
}
|
|
344
377
|
function readConnectionsResponse(bc) {
|
|
345
378
|
return {
|
|
@@ -395,7 +428,7 @@ function writeQueueMessageSummary(bc, x) {
|
|
|
395
428
|
bare.writeString(bc, x.name);
|
|
396
429
|
bare.writeUint(bc, x.createdAtMs);
|
|
397
430
|
}
|
|
398
|
-
function
|
|
431
|
+
function read6(bc) {
|
|
399
432
|
const len = bare.readUintSafe(bc);
|
|
400
433
|
if (len === 0) {
|
|
401
434
|
return [];
|
|
@@ -406,7 +439,7 @@ function read5(bc) {
|
|
|
406
439
|
}
|
|
407
440
|
return result;
|
|
408
441
|
}
|
|
409
|
-
function
|
|
442
|
+
function write6(bc, x) {
|
|
410
443
|
bare.writeUintSafe(bc, x.length);
|
|
411
444
|
for (let i = 0; i < x.length; i++) {
|
|
412
445
|
writeQueueMessageSummary(bc, x[i]);
|
|
@@ -416,14 +449,14 @@ function readQueueStatus(bc) {
|
|
|
416
449
|
return {
|
|
417
450
|
size: bare.readUint(bc),
|
|
418
451
|
maxSize: bare.readUint(bc),
|
|
419
|
-
messages:
|
|
452
|
+
messages: read6(bc),
|
|
420
453
|
truncated: bare.readBool(bc)
|
|
421
454
|
};
|
|
422
455
|
}
|
|
423
456
|
function writeQueueStatus(bc, x) {
|
|
424
457
|
bare.writeUint(bc, x.size);
|
|
425
458
|
bare.writeUint(bc, x.maxSize);
|
|
426
|
-
|
|
459
|
+
write6(bc, x.messages);
|
|
427
460
|
bare.writeBool(bc, x.truncated);
|
|
428
461
|
}
|
|
429
462
|
function readQueueResponse(bc) {
|
|
@@ -761,5 +794,7 @@ function decodeToClient(bytes) {
|
|
|
761
794
|
|
|
762
795
|
|
|
763
796
|
|
|
764
|
-
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
exports.createWorkflowInspectorAdapter = _chunkXAY2HIZNcjs.createWorkflowInspectorAdapter; exports.decodeToClient = decodeToClient; exports.decodeToServer = decodeToServer; exports.decodeWorkflowHistoryTransport = _chunkHU4F7H3Fcjs.decodeWorkflowHistoryTransport; exports.encodeToClient = encodeToClient; exports.encodeToServer = encodeToServer; exports.encodeWorkflowHistoryTransport = _chunkHU4F7H3Fcjs.encodeWorkflowHistoryTransport; exports.readActionRequest = readActionRequest; exports.readActionResponse = readActionResponse; exports.readConnection = readConnection; exports.readConnectionsRequest = readConnectionsRequest; exports.readConnectionsResponse = readConnectionsResponse; exports.readConnectionsUpdated = readConnectionsUpdated; exports.readDatabaseSchemaRequest = readDatabaseSchemaRequest; exports.readDatabaseSchemaResponse = readDatabaseSchemaResponse; exports.readDatabaseTableRowsRequest = readDatabaseTableRowsRequest; exports.readDatabaseTableRowsResponse = readDatabaseTableRowsResponse; exports.readError = readError; exports.readInit = readInit; exports.readPatchStateRequest = readPatchStateRequest; exports.readQueueMessageSummary = readQueueMessageSummary; exports.readQueueRequest = readQueueRequest; exports.readQueueResponse = readQueueResponse; exports.readQueueStatus = readQueueStatus; exports.readQueueUpdated = readQueueUpdated; exports.readRpcsListRequest = readRpcsListRequest; exports.readRpcsListResponse = readRpcsListResponse; exports.readState = readState; exports.readStateRequest = readStateRequest; exports.readStateResponse = readStateResponse; exports.readStateUpdated = readStateUpdated; exports.readTabConfigEntry = readTabConfigEntry; exports.readToClient = readToClient; exports.readToClientBody = readToClientBody; exports.readToServer = readToServer; exports.readToServerBody = readToServerBody; exports.readTraceQueryRequest = readTraceQueryRequest; exports.readTraceQueryResponse = readTraceQueryResponse; exports.readWorkflowHistory = readWorkflowHistory; exports.readWorkflowHistoryRequest = readWorkflowHistoryRequest; exports.readWorkflowHistoryResponse = readWorkflowHistoryResponse; exports.readWorkflowHistoryUpdated = readWorkflowHistoryUpdated; exports.readWorkflowReplayRequest = readWorkflowReplayRequest; exports.readWorkflowReplayResponse = readWorkflowReplayResponse; exports.writeActionRequest = writeActionRequest; exports.writeActionResponse = writeActionResponse; exports.writeConnection = writeConnection; exports.writeConnectionsRequest = writeConnectionsRequest; exports.writeConnectionsResponse = writeConnectionsResponse; exports.writeConnectionsUpdated = writeConnectionsUpdated; exports.writeDatabaseSchemaRequest = writeDatabaseSchemaRequest; exports.writeDatabaseSchemaResponse = writeDatabaseSchemaResponse; exports.writeDatabaseTableRowsRequest = writeDatabaseTableRowsRequest; exports.writeDatabaseTableRowsResponse = writeDatabaseTableRowsResponse; exports.writeError = writeError; exports.writeInit = writeInit; exports.writePatchStateRequest = writePatchStateRequest; exports.writeQueueMessageSummary = writeQueueMessageSummary; exports.writeQueueRequest = writeQueueRequest; exports.writeQueueResponse = writeQueueResponse; exports.writeQueueStatus = writeQueueStatus; exports.writeQueueUpdated = writeQueueUpdated; exports.writeRpcsListRequest = writeRpcsListRequest; exports.writeRpcsListResponse = writeRpcsListResponse; exports.writeState = writeState; exports.writeStateRequest = writeStateRequest; exports.writeStateResponse = writeStateResponse; exports.writeStateUpdated = writeStateUpdated; exports.writeTabConfigEntry = writeTabConfigEntry; exports.writeToClient = writeToClient; exports.writeToClientBody = writeToClientBody; exports.writeToServer = writeToServer; exports.writeToServerBody = writeToServerBody; exports.writeTraceQueryRequest = writeTraceQueryRequest; exports.writeTraceQueryResponse = writeTraceQueryResponse; exports.writeWorkflowHistory = writeWorkflowHistory; exports.writeWorkflowHistoryRequest = writeWorkflowHistoryRequest; exports.writeWorkflowHistoryResponse = writeWorkflowHistoryResponse; exports.writeWorkflowHistoryUpdated = writeWorkflowHistoryUpdated; exports.writeWorkflowReplayRequest = writeWorkflowReplayRequest; exports.writeWorkflowReplayResponse = writeWorkflowReplayResponse;
|
|
765
800
|
//# sourceMappingURL=mod.cjs.map
|