rivetkit 2.3.10 → 2.3.11-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 +24 -6
- package/dist/browser/client.js +18 -4
- 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/agent-os/index.cjs +1 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.d.cts +24 -6
- package/dist/tsup/agent-os/index.d.ts +24 -6
- package/dist/tsup/agent-os/index.js +1 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-PCJSDS7N.cjs → chunk-57ZE43T5.cjs} +3 -3
- package/dist/tsup/{chunk-PCJSDS7N.cjs.map → chunk-57ZE43T5.cjs.map} +1 -1
- package/dist/tsup/{chunk-Q5H37KNQ.js → chunk-5FVMFSBH.js} +2 -2
- package/dist/tsup/{chunk-E6IEX6AP.js → chunk-5ZS22TOP.js} +3 -3
- package/dist/tsup/{chunk-XSPAARQ5.js → chunk-6ZPMYIZ6.js} +2 -2
- package/dist/tsup/{chunk-X7XY6NCU.js → chunk-ET2F6BXK.js} +6 -3
- package/dist/tsup/chunk-ET2F6BXK.js.map +1 -0
- package/dist/tsup/{chunk-INXPYXN6.cjs → chunk-JAQHV6LB.cjs} +7 -7
- package/dist/tsup/{chunk-INXPYXN6.cjs.map → chunk-JAQHV6LB.cjs.map} +1 -1
- package/dist/tsup/{chunk-G6XA2OSW.cjs → chunk-K4DNAIWT.cjs} +4 -4
- package/dist/tsup/{chunk-G6XA2OSW.cjs.map → chunk-K4DNAIWT.cjs.map} +1 -1
- package/dist/tsup/{chunk-6UHZLL6S.js → chunk-L4DYLD7P.js} +3 -3
- package/dist/tsup/{chunk-DPM73GAL.js → chunk-MMPE77KO.js} +20 -5
- package/dist/tsup/chunk-MMPE77KO.js.map +1 -0
- package/dist/tsup/{chunk-Z2ESFE5Z.cjs → chunk-TWNMQDZK.cjs} +6 -3
- package/dist/tsup/chunk-TWNMQDZK.cjs.map +1 -0
- package/dist/tsup/{chunk-LCWHS6K7.cjs → chunk-W2YEXCCJ.cjs} +156 -141
- package/dist/tsup/chunk-W2YEXCCJ.cjs.map +1 -0
- package/dist/tsup/{chunk-U2A3Y7OK.cjs → chunk-XEOPXHN2.cjs} +9 -9
- package/dist/tsup/{chunk-U2A3Y7OK.cjs.map → chunk-XEOPXHN2.cjs.map} +1 -1
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- 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-BRpVbJCD.d.ts → config-BKAMOHez.d.ts} +25 -7
- package/dist/tsup/{config-BobvQpex.d.cts → config-Caocy3Z9.d.cts} +25 -7
- package/dist/tsup/{context-Cj-DFyiy.d.ts → context-AfCExwbr.d.ts} +1 -1
- package/dist/tsup/{context-YEBNJrws.d.cts → context-D1_m5x1D.d.cts} +1 -1
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +2 -2
- package/dist/tsup/db/mod.js +1 -1
- package/dist/tsup/dynamic/mod.d.cts +1 -1
- package/dist/tsup/dynamic/mod.d.ts +1 -1
- package/dist/tsup/inspector/mod.cjs +4 -4
- package/dist/tsup/inspector/mod.js +3 -3
- package/dist/tsup/inspector-tab/mod.d.cts +2 -2
- package/dist/tsup/inspector-tab/mod.d.ts +2 -2
- package/dist/tsup/mod.cjs +187 -72
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +3 -3
- package/dist/tsup/mod.d.ts +3 -3
- package/dist/tsup/mod.js +129 -14
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +6 -6
- package/dist/tsup/workflow/mod.d.cts +3 -3
- package/dist/tsup/workflow/mod.d.ts +3 -3
- package/dist/tsup/workflow/mod.js +3 -3
- package/package.json +8 -8
- package/src/client/raw-utils.ts +3 -2
- package/src/common/encoding.ts +4 -1
- package/src/common/fetch-like.ts +49 -0
- package/src/registry/index.ts +117 -12
- package/src/registry/napi-runtime.ts +47 -0
- package/src/registry/native.ts +3 -2
- package/src/registry/runtime.ts +21 -0
- package/src/registry/wasm-runtime.ts +11 -0
- package/dist/tsup/chunk-DPM73GAL.js.map +0 -1
- package/dist/tsup/chunk-LCWHS6K7.cjs.map +0 -1
- package/dist/tsup/chunk-X7XY6NCU.js.map +0 -1
- package/dist/tsup/chunk-Z2ESFE5Z.cjs.map +0 -1
- /package/dist/tsup/{chunk-Q5H37KNQ.js.map → chunk-5FVMFSBH.js.map} +0 -0
- /package/dist/tsup/{chunk-E6IEX6AP.js.map → chunk-5ZS22TOP.js.map} +0 -0
- /package/dist/tsup/{chunk-XSPAARQ5.js.map → chunk-6ZPMYIZ6.js.map} +0 -0
- /package/dist/tsup/{chunk-6UHZLL6S.js.map → chunk-L4DYLD7P.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkK4DNAIWTcjs = require('./chunk-K4DNAIWT.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkTWNMQDZKcjs = require('./chunk-TWNMQDZK.cjs');
|
|
9
9
|
|
|
10
10
|
// src/workflow/inspector.ts
|
|
11
11
|
function createHistoryEmitter() {
|
|
@@ -37,7 +37,7 @@ function createWorkflowInspectorAdapter() {
|
|
|
37
37
|
};
|
|
38
38
|
const update = (snapshot) => {
|
|
39
39
|
const transportHistory = toWorkflowHistory(snapshot);
|
|
40
|
-
const next =
|
|
40
|
+
const next = _chunkK4DNAIWTcjs.encodeWorkflowHistoryTransport.call(void 0, transportHistory);
|
|
41
41
|
history = next;
|
|
42
42
|
emitter.emit(next);
|
|
43
43
|
};
|
|
@@ -53,7 +53,7 @@ function createWorkflowInspectorAdapter() {
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
function encodeCbor(value) {
|
|
56
|
-
return
|
|
56
|
+
return _chunkTWNMQDZKcjs.bufferToArrayBuffer.call(void 0, _chunkTWNMQDZKcjs.encodeCborCompat.call(void 0, value));
|
|
57
57
|
}
|
|
58
58
|
function encodeOptionalCbor(value) {
|
|
59
59
|
if (value === void 0) {
|
|
@@ -150,7 +150,7 @@ function toWorkflowEntryKind(kind) {
|
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
152
|
default:
|
|
153
|
-
|
|
153
|
+
_chunkTWNMQDZKcjs.assertUnreachable.call(void 0, kind);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function toWorkflowEntry(entry) {
|
|
@@ -173,7 +173,7 @@ function toWorkflowEntryStatus(status) {
|
|
|
173
173
|
case "exhausted":
|
|
174
174
|
return "EXHAUSTED" /* EXHAUSTED */;
|
|
175
175
|
default:
|
|
176
|
-
|
|
176
|
+
_chunkTWNMQDZKcjs.assertUnreachable.call(void 0, status);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
function toWorkflowSleepState(state) {
|
|
@@ -185,7 +185,7 @@ function toWorkflowSleepState(state) {
|
|
|
185
185
|
case "interrupted":
|
|
186
186
|
return "INTERRUPTED" /* INTERRUPTED */;
|
|
187
187
|
default:
|
|
188
|
-
|
|
188
|
+
_chunkTWNMQDZKcjs.assertUnreachable.call(void 0, state);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
function toWorkflowBranchStatusType(status) {
|
|
@@ -201,7 +201,7 @@ function toWorkflowBranchStatusType(status) {
|
|
|
201
201
|
case "cancelled":
|
|
202
202
|
return "CANCELLED" /* CANCELLED */;
|
|
203
203
|
default:
|
|
204
|
-
|
|
204
|
+
_chunkTWNMQDZKcjs.assertUnreachable.call(void 0, status);
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function toWorkflowBranchStatus(status) {
|
|
@@ -248,4 +248,4 @@ function toWorkflowHistory(snapshot) {
|
|
|
248
248
|
|
|
249
249
|
|
|
250
250
|
exports.createWorkflowInspectorAdapter = createWorkflowInspectorAdapter;
|
|
251
|
-
//# sourceMappingURL=chunk-
|
|
251
|
+
//# sourceMappingURL=chunk-XEOPXHN2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-U2A3Y7OK.cjs","../../src/workflow/inspector.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACYA,SAAS,oBAAA,CAAA,EAAuB;AAC/B,EAAA,MAAM,UAAA,kBAAY,IAAI,GAAA,CAAqB,CAAA;AAE3C,EAAA,OAAO;AAAA,IACN,EAAA,EAAI,CAAC,QAAA,EAAA,GAA8B;AAClC,MAAA,SAAA,CAAU,GAAA,CAAI,QAAQ,CAAA;AACtB,MAAA,OAAO,CAAA,EAAA,GAAM,SAAA,CAAU,MAAA,CAAO,QAAQ,CAAA;AAAA,IACvC,CAAA;AAAA,IACA,IAAA,EAAM,CAAC,OAAA,EAAA,GAA6C;AACnD,MAAA,IAAA,CAAA,MAAW,SAAA,GAAY,SAA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CAAQ,GAAA,CAAI,eAAe,CAAA;AAAA,IAC7C;AAAA,EACD,CAAA;AACD;AD9EA;AACA;AACE;AACF,wEAAC","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-U2A3Y7OK.cjs","sourcesContent":[null,"import type {\n\tBranchStatus,\n\tBranchStatusType,\n\tEntryKind,\n\tEntryStatus,\n\tLocation,\n\tSleepState,\n\tWorkflowEntryMetadataSnapshot,\n\tWorkflowHistoryEntry,\n\tWorkflowHistorySnapshot,\n\tWorkflowState,\n} from \"@rivetkit/workflow-engine\";\nimport type * as inspectorSchema from \"@/common/bare/generated/inspector/v4\";\nimport * as transport from \"@/common/bare/transport/v1\";\nimport type { JsonCompatValue } from \"@/common/encoding\";\nimport { encodeWorkflowHistoryTransport } from \"@/common/inspector-transport\";\nimport { encodeCborCompat } from \"@/serde\";\nimport { assertUnreachable, bufferToArrayBuffer } from \"@/utils\";\n\ntype HistoryListener = (history: inspectorSchema.WorkflowHistory) => void;\n\nfunction createHistoryEmitter() {\n\tconst listeners = new Set<HistoryListener>();\n\n\treturn {\n\t\ton: (listener: HistoryListener) => {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => listeners.delete(listener);\n\t\t},\n\t\temit: (history: inspectorSchema.WorkflowHistory) => {\n\t\t\tfor (const listener of listeners) {\n\t\t\t\tlistener(history);\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport interface WorkflowInspectorAdapter {\n\tgetHistory: () => inspectorSchema.WorkflowHistory | null;\n\tgetState: () => Promise<WorkflowState | null>;\n\tonHistoryUpdated: (\n\t\tlistener: (history: inspectorSchema.WorkflowHistory) => void,\n\t) => () => void;\n\treplayFromStep: (\n\t\tentryId?: string,\n\t) => Promise<inspectorSchema.WorkflowHistory | null>;\n}\n\nexport function createWorkflowInspectorAdapter(): {\n\tadapter: WorkflowInspectorAdapter;\n\tupdate: (snapshot: WorkflowHistorySnapshot) => void;\n\tsetGetState: (fn: () => Promise<WorkflowState | null>) => void;\n\tsetReplayFromStep: (\n\t\tfn: (\n\t\t\tentryId?: string,\n\t\t) => Promise<inspectorSchema.WorkflowHistory | null>,\n\t) => void;\n} {\n\tconst emitter = createHistoryEmitter();\n\tlet history: inspectorSchema.WorkflowHistory | null = null;\n\tlet getState: () => Promise<WorkflowState | null> = async () => null;\n\tlet replayFromStep: (\n\t\tentryId?: string,\n\t) => Promise<inspectorSchema.WorkflowHistory | null> = async () => {\n\t\tthrow new Error(\"Workflow replay controls are not initialized\");\n\t};\n\n\tconst adapter: WorkflowInspectorAdapter = {\n\t\tgetHistory: () => history,\n\t\tgetState: async () => await getState(),\n\t\tonHistoryUpdated: (listener) => emitter.on(listener),\n\t\treplayFromStep: async (entryId) => await replayFromStep(entryId),\n\t};\n\n\tconst update = (snapshot: WorkflowHistorySnapshot) => {\n\t\tconst transportHistory = toWorkflowHistory(snapshot);\n\t\tconst next = encodeWorkflowHistoryTransport(transportHistory);\n\t\thistory = next;\n\t\temitter.emit(next);\n\t};\n\n\treturn {\n\t\tadapter,\n\t\tupdate,\n\t\tsetGetState: (fn) => {\n\t\t\tgetState = fn;\n\t\t},\n\t\tsetReplayFromStep: (fn) => {\n\t\t\treplayFromStep = fn;\n\t\t},\n\t};\n}\n\nfunction encodeCbor(value: unknown): ArrayBuffer {\n\treturn bufferToArrayBuffer(encodeCborCompat(value as JsonCompatValue));\n}\n\nfunction encodeOptionalCbor(value: unknown): ArrayBuffer | null {\n\tif (value === undefined) {\n\t\treturn null;\n\t}\n\treturn encodeCbor(value);\n}\n\nfunction toU64(value: number): bigint {\n\treturn BigInt(Math.max(0, Math.floor(value)));\n}\n\nfunction toWorkflowLocation(location: Location): transport.WorkflowLocation {\n\treturn location.map((segment) => {\n\t\tif (typeof segment === \"number\") {\n\t\t\treturn { tag: \"WorkflowNameIndex\", val: segment };\n\t\t}\n\t\treturn {\n\t\t\ttag: \"WorkflowLoopIterationMarker\",\n\t\t\tval: {\n\t\t\t\tloop: segment.loop,\n\t\t\t\titeration: segment.iteration,\n\t\t\t},\n\t\t};\n\t});\n}\n\nfunction toWorkflowEntryKind(kind: EntryKind): transport.WorkflowEntryKind {\n\tswitch (kind.type) {\n\t\tcase \"step\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowStepEntry\",\n\t\t\t\tval: {\n\t\t\t\t\toutput: encodeOptionalCbor(kind.data.output),\n\t\t\t\t\terror: kind.data.error ?? null,\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"loop\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowLoopEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tstate: encodeCbor(kind.data.state),\n\t\t\t\t\titeration: kind.data.iteration,\n\t\t\t\t\toutput: encodeOptionalCbor(kind.data.output),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"sleep\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowSleepEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tdeadline: toU64(kind.data.deadline),\n\t\t\t\t\tstate: toWorkflowSleepState(kind.data.state),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"message\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowMessageEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tname: kind.data.name,\n\t\t\t\t\tmessageData: encodeCbor(kind.data.data),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"rollback_checkpoint\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRollbackCheckpointEntry\",\n\t\t\t\tval: { name: kind.data.name },\n\t\t\t};\n\t\tcase \"join\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowJoinEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tbranches: toWorkflowBranchStatusMap(kind.data.branches),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"race\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRaceEntry\",\n\t\t\t\tval: {\n\t\t\t\t\twinner: kind.data.winner ?? null,\n\t\t\t\t\tbranches: toWorkflowBranchStatusMap(kind.data.branches),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"removed\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRemovedEntry\",\n\t\t\t\tval: {\n\t\t\t\t\toriginalType: kind.data.originalType,\n\t\t\t\t\toriginalName: kind.data.originalName ?? null,\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"version_check\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowVersionCheckEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tresolved: kind.data.resolved,\n\t\t\t\t\tlatest: kind.data.latest,\n\t\t\t\t},\n\t\t\t};\n\t\tdefault:\n\t\t\tassertUnreachable(kind as never);\n\t}\n}\n\nfunction toWorkflowEntry(entry: WorkflowHistoryEntry): transport.WorkflowEntry {\n\treturn {\n\t\tid: entry.id,\n\t\tlocation: toWorkflowLocation(entry.location),\n\t\tkind: toWorkflowEntryKind(entry.kind),\n\t};\n}\n\nfunction toWorkflowEntryStatus(\n\tstatus: EntryStatus,\n): transport.WorkflowEntryStatus {\n\tswitch (status) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowEntryStatus.PENDING;\n\t\tcase \"running\":\n\t\t\treturn transport.WorkflowEntryStatus.RUNNING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowEntryStatus.COMPLETED;\n\t\tcase \"failed\":\n\t\t\treturn transport.WorkflowEntryStatus.FAILED;\n\t\tcase \"exhausted\":\n\t\t\treturn transport.WorkflowEntryStatus.EXHAUSTED;\n\t\tdefault:\n\t\t\tassertUnreachable(status as never);\n\t}\n}\n\nfunction toWorkflowSleepState(state: SleepState): transport.WorkflowSleepState {\n\tswitch (state) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowSleepState.PENDING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowSleepState.COMPLETED;\n\t\tcase \"interrupted\":\n\t\t\treturn transport.WorkflowSleepState.INTERRUPTED;\n\t\tdefault:\n\t\t\tassertUnreachable(state as never);\n\t}\n}\n\nfunction toWorkflowBranchStatusType(\n\tstatus: BranchStatusType,\n): transport.WorkflowBranchStatusType {\n\tswitch (status) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowBranchStatusType.PENDING;\n\t\tcase \"running\":\n\t\t\treturn transport.WorkflowBranchStatusType.RUNNING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowBranchStatusType.COMPLETED;\n\t\tcase \"failed\":\n\t\t\treturn transport.WorkflowBranchStatusType.FAILED;\n\t\tcase \"cancelled\":\n\t\t\treturn transport.WorkflowBranchStatusType.CANCELLED;\n\t\tdefault:\n\t\t\tassertUnreachable(status as never);\n\t}\n}\n\nfunction toWorkflowBranchStatus(\n\tstatus: BranchStatus,\n): transport.WorkflowBranchStatus {\n\treturn {\n\t\tstatus: toWorkflowBranchStatusType(status.status),\n\t\toutput: encodeOptionalCbor(status.output),\n\t\terror: status.error ?? null,\n\t};\n}\n\nfunction toWorkflowBranchStatusMap(\n\tbranches: Record<string, BranchStatus>,\n): ReadonlyMap<string, transport.WorkflowBranchStatus> {\n\treturn new Map(\n\t\tObject.entries(branches).map(([name, status]) => [\n\t\t\tname,\n\t\t\ttoWorkflowBranchStatus(status),\n\t\t]),\n\t);\n}\n\nfunction toWorkflowEntryMetadata(\n\tmetadata: WorkflowEntryMetadataSnapshot,\n): transport.WorkflowEntryMetadata {\n\tconst rollbackCompletedAt = (\n\t\tmetadata as WorkflowEntryMetadataSnapshot & {\n\t\t\trollbackCompletedAt?: number;\n\t\t}\n\t).rollbackCompletedAt;\n\tconst rollbackError = (\n\t\tmetadata as WorkflowEntryMetadataSnapshot & {\n\t\t\trollbackError?: string | null;\n\t\t}\n\t).rollbackError;\n\n\treturn {\n\t\tstatus: toWorkflowEntryStatus(metadata.status),\n\t\terror: metadata.error ?? null,\n\t\tattempts: metadata.attempts,\n\t\tlastAttemptAt: toU64(metadata.lastAttemptAt),\n\t\tcreatedAt: toU64(metadata.createdAt),\n\t\tcompletedAt:\n\t\t\tmetadata.completedAt === undefined\n\t\t\t\t? null\n\t\t\t\t: toU64(metadata.completedAt),\n\t\trollbackCompletedAt:\n\t\t\trollbackCompletedAt === undefined\n\t\t\t\t? null\n\t\t\t\t: toU64(rollbackCompletedAt),\n\t\trollbackError: rollbackError ?? null,\n\t};\n}\n\nfunction toWorkflowHistory(\n\tsnapshot: WorkflowHistorySnapshot,\n): transport.WorkflowHistory {\n\tconst entryMetadata = new Map<string, transport.WorkflowEntryMetadata>();\n\tfor (const [id, metadata] of snapshot.entryMetadata) {\n\t\tentryMetadata.set(id, toWorkflowEntryMetadata(metadata));\n\t}\n\n\treturn {\n\t\tnameRegistry: [...snapshot.nameRegistry],\n\t\tentries: snapshot.entries.map(toWorkflowEntry),\n\t\tentryMetadata,\n\t};\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-XEOPXHN2.cjs","../../src/workflow/inspector.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACYA,SAAS,oBAAA,CAAA,EAAuB;AAC/B,EAAA,MAAM,UAAA,kBAAY,IAAI,GAAA,CAAqB,CAAA;AAE3C,EAAA,OAAO;AAAA,IACN,EAAA,EAAI,CAAC,QAAA,EAAA,GAA8B;AAClC,MAAA,SAAA,CAAU,GAAA,CAAI,QAAQ,CAAA;AACtB,MAAA,OAAO,CAAA,EAAA,GAAM,SAAA,CAAU,MAAA,CAAO,QAAQ,CAAA;AAAA,IACvC,CAAA;AAAA,IACA,IAAA,EAAM,CAAC,OAAA,EAAA,GAA6C;AACnD,MAAA,IAAA,CAAA,MAAW,SAAA,GAAY,SAAA,EAAW;AACjC,QAAA,QAAA,CAAS,OAAO,CAAA;AAAA,MACjB;AAAA,IACD;AAAA,EACD,CAAA;AACD;AAaO,SAAS,8BAAA,CAAA,EASd;AACD,EAAA,MAAM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ivetkit/dist/tsup/chunk-XEOPXHN2.cjs","sourcesContent":[null,"import type {\n\tBranchStatus,\n\tBranchStatusType,\n\tEntryKind,\n\tEntryStatus,\n\tLocation,\n\tSleepState,\n\tWorkflowEntryMetadataSnapshot,\n\tWorkflowHistoryEntry,\n\tWorkflowHistorySnapshot,\n\tWorkflowState,\n} from \"@rivetkit/workflow-engine\";\nimport type * as inspectorSchema from \"@/common/bare/generated/inspector/v4\";\nimport * as transport from \"@/common/bare/transport/v1\";\nimport type { JsonCompatValue } from \"@/common/encoding\";\nimport { encodeWorkflowHistoryTransport } from \"@/common/inspector-transport\";\nimport { encodeCborCompat } from \"@/serde\";\nimport { assertUnreachable, bufferToArrayBuffer } from \"@/utils\";\n\ntype HistoryListener = (history: inspectorSchema.WorkflowHistory) => void;\n\nfunction createHistoryEmitter() {\n\tconst listeners = new Set<HistoryListener>();\n\n\treturn {\n\t\ton: (listener: HistoryListener) => {\n\t\t\tlisteners.add(listener);\n\t\t\treturn () => listeners.delete(listener);\n\t\t},\n\t\temit: (history: inspectorSchema.WorkflowHistory) => {\n\t\t\tfor (const listener of listeners) {\n\t\t\t\tlistener(history);\n\t\t\t}\n\t\t},\n\t};\n}\n\nexport interface WorkflowInspectorAdapter {\n\tgetHistory: () => inspectorSchema.WorkflowHistory | null;\n\tgetState: () => Promise<WorkflowState | null>;\n\tonHistoryUpdated: (\n\t\tlistener: (history: inspectorSchema.WorkflowHistory) => void,\n\t) => () => void;\n\treplayFromStep: (\n\t\tentryId?: string,\n\t) => Promise<inspectorSchema.WorkflowHistory | null>;\n}\n\nexport function createWorkflowInspectorAdapter(): {\n\tadapter: WorkflowInspectorAdapter;\n\tupdate: (snapshot: WorkflowHistorySnapshot) => void;\n\tsetGetState: (fn: () => Promise<WorkflowState | null>) => void;\n\tsetReplayFromStep: (\n\t\tfn: (\n\t\t\tentryId?: string,\n\t\t) => Promise<inspectorSchema.WorkflowHistory | null>,\n\t) => void;\n} {\n\tconst emitter = createHistoryEmitter();\n\tlet history: inspectorSchema.WorkflowHistory | null = null;\n\tlet getState: () => Promise<WorkflowState | null> = async () => null;\n\tlet replayFromStep: (\n\t\tentryId?: string,\n\t) => Promise<inspectorSchema.WorkflowHistory | null> = async () => {\n\t\tthrow new Error(\"Workflow replay controls are not initialized\");\n\t};\n\n\tconst adapter: WorkflowInspectorAdapter = {\n\t\tgetHistory: () => history,\n\t\tgetState: async () => await getState(),\n\t\tonHistoryUpdated: (listener) => emitter.on(listener),\n\t\treplayFromStep: async (entryId) => await replayFromStep(entryId),\n\t};\n\n\tconst update = (snapshot: WorkflowHistorySnapshot) => {\n\t\tconst transportHistory = toWorkflowHistory(snapshot);\n\t\tconst next = encodeWorkflowHistoryTransport(transportHistory);\n\t\thistory = next;\n\t\temitter.emit(next);\n\t};\n\n\treturn {\n\t\tadapter,\n\t\tupdate,\n\t\tsetGetState: (fn) => {\n\t\t\tgetState = fn;\n\t\t},\n\t\tsetReplayFromStep: (fn) => {\n\t\t\treplayFromStep = fn;\n\t\t},\n\t};\n}\n\nfunction encodeCbor(value: unknown): ArrayBuffer {\n\treturn bufferToArrayBuffer(encodeCborCompat(value as JsonCompatValue));\n}\n\nfunction encodeOptionalCbor(value: unknown): ArrayBuffer | null {\n\tif (value === undefined) {\n\t\treturn null;\n\t}\n\treturn encodeCbor(value);\n}\n\nfunction toU64(value: number): bigint {\n\treturn BigInt(Math.max(0, Math.floor(value)));\n}\n\nfunction toWorkflowLocation(location: Location): transport.WorkflowLocation {\n\treturn location.map((segment) => {\n\t\tif (typeof segment === \"number\") {\n\t\t\treturn { tag: \"WorkflowNameIndex\", val: segment };\n\t\t}\n\t\treturn {\n\t\t\ttag: \"WorkflowLoopIterationMarker\",\n\t\t\tval: {\n\t\t\t\tloop: segment.loop,\n\t\t\t\titeration: segment.iteration,\n\t\t\t},\n\t\t};\n\t});\n}\n\nfunction toWorkflowEntryKind(kind: EntryKind): transport.WorkflowEntryKind {\n\tswitch (kind.type) {\n\t\tcase \"step\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowStepEntry\",\n\t\t\t\tval: {\n\t\t\t\t\toutput: encodeOptionalCbor(kind.data.output),\n\t\t\t\t\terror: kind.data.error ?? null,\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"loop\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowLoopEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tstate: encodeCbor(kind.data.state),\n\t\t\t\t\titeration: kind.data.iteration,\n\t\t\t\t\toutput: encodeOptionalCbor(kind.data.output),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"sleep\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowSleepEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tdeadline: toU64(kind.data.deadline),\n\t\t\t\t\tstate: toWorkflowSleepState(kind.data.state),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"message\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowMessageEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tname: kind.data.name,\n\t\t\t\t\tmessageData: encodeCbor(kind.data.data),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"rollback_checkpoint\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRollbackCheckpointEntry\",\n\t\t\t\tval: { name: kind.data.name },\n\t\t\t};\n\t\tcase \"join\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowJoinEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tbranches: toWorkflowBranchStatusMap(kind.data.branches),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"race\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRaceEntry\",\n\t\t\t\tval: {\n\t\t\t\t\twinner: kind.data.winner ?? null,\n\t\t\t\t\tbranches: toWorkflowBranchStatusMap(kind.data.branches),\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"removed\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowRemovedEntry\",\n\t\t\t\tval: {\n\t\t\t\t\toriginalType: kind.data.originalType,\n\t\t\t\t\toriginalName: kind.data.originalName ?? null,\n\t\t\t\t},\n\t\t\t};\n\t\tcase \"version_check\":\n\t\t\treturn {\n\t\t\t\ttag: \"WorkflowVersionCheckEntry\",\n\t\t\t\tval: {\n\t\t\t\t\tresolved: kind.data.resolved,\n\t\t\t\t\tlatest: kind.data.latest,\n\t\t\t\t},\n\t\t\t};\n\t\tdefault:\n\t\t\tassertUnreachable(kind as never);\n\t}\n}\n\nfunction toWorkflowEntry(entry: WorkflowHistoryEntry): transport.WorkflowEntry {\n\treturn {\n\t\tid: entry.id,\n\t\tlocation: toWorkflowLocation(entry.location),\n\t\tkind: toWorkflowEntryKind(entry.kind),\n\t};\n}\n\nfunction toWorkflowEntryStatus(\n\tstatus: EntryStatus,\n): transport.WorkflowEntryStatus {\n\tswitch (status) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowEntryStatus.PENDING;\n\t\tcase \"running\":\n\t\t\treturn transport.WorkflowEntryStatus.RUNNING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowEntryStatus.COMPLETED;\n\t\tcase \"failed\":\n\t\t\treturn transport.WorkflowEntryStatus.FAILED;\n\t\tcase \"exhausted\":\n\t\t\treturn transport.WorkflowEntryStatus.EXHAUSTED;\n\t\tdefault:\n\t\t\tassertUnreachable(status as never);\n\t}\n}\n\nfunction toWorkflowSleepState(state: SleepState): transport.WorkflowSleepState {\n\tswitch (state) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowSleepState.PENDING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowSleepState.COMPLETED;\n\t\tcase \"interrupted\":\n\t\t\treturn transport.WorkflowSleepState.INTERRUPTED;\n\t\tdefault:\n\t\t\tassertUnreachable(state as never);\n\t}\n}\n\nfunction toWorkflowBranchStatusType(\n\tstatus: BranchStatusType,\n): transport.WorkflowBranchStatusType {\n\tswitch (status) {\n\t\tcase \"pending\":\n\t\t\treturn transport.WorkflowBranchStatusType.PENDING;\n\t\tcase \"running\":\n\t\t\treturn transport.WorkflowBranchStatusType.RUNNING;\n\t\tcase \"completed\":\n\t\t\treturn transport.WorkflowBranchStatusType.COMPLETED;\n\t\tcase \"failed\":\n\t\t\treturn transport.WorkflowBranchStatusType.FAILED;\n\t\tcase \"cancelled\":\n\t\t\treturn transport.WorkflowBranchStatusType.CANCELLED;\n\t\tdefault:\n\t\t\tassertUnreachable(status as never);\n\t}\n}\n\nfunction toWorkflowBranchStatus(\n\tstatus: BranchStatus,\n): transport.WorkflowBranchStatus {\n\treturn {\n\t\tstatus: toWorkflowBranchStatusType(status.status),\n\t\toutput: encodeOptionalCbor(status.output),\n\t\terror: status.error ?? null,\n\t};\n}\n\nfunction toWorkflowBranchStatusMap(\n\tbranches: Record<string, BranchStatus>,\n): ReadonlyMap<string, transport.WorkflowBranchStatus> {\n\treturn new Map(\n\t\tObject.entries(branches).map(([name, status]) => [\n\t\t\tname,\n\t\t\ttoWorkflowBranchStatus(status),\n\t\t]),\n\t);\n}\n\nfunction toWorkflowEntryMetadata(\n\tmetadata: WorkflowEntryMetadataSnapshot,\n): transport.WorkflowEntryMetadata {\n\tconst rollbackCompletedAt = (\n\t\tmetadata as WorkflowEntryMetadataSnapshot & {\n\t\t\trollbackCompletedAt?: number;\n\t\t}\n\t).rollbackCompletedAt;\n\tconst rollbackError = (\n\t\tmetadata as WorkflowEntryMetadataSnapshot & {\n\t\t\trollbackError?: string | null;\n\t\t}\n\t).rollbackError;\n\n\treturn {\n\t\tstatus: toWorkflowEntryStatus(metadata.status),\n\t\terror: metadata.error ?? null,\n\t\tattempts: metadata.attempts,\n\t\tlastAttemptAt: toU64(metadata.lastAttemptAt),\n\t\tcreatedAt: toU64(metadata.createdAt),\n\t\tcompletedAt:\n\t\t\tmetadata.completedAt === undefined\n\t\t\t\t? null\n\t\t\t\t: toU64(metadata.completedAt),\n\t\trollbackCompletedAt:\n\t\t\trollbackCompletedAt === undefined\n\t\t\t\t? null\n\t\t\t\t: toU64(rollbackCompletedAt),\n\t\trollbackError: rollbackError ?? null,\n\t};\n}\n\nfunction toWorkflowHistory(\n\tsnapshot: WorkflowHistorySnapshot,\n): transport.WorkflowHistory {\n\tconst entryMetadata = new Map<string, transport.WorkflowEntryMetadata>();\n\tfor (const [id, metadata] of snapshot.entryMetadata) {\n\t\tentryMetadata.set(id, toWorkflowEntryMetadata(metadata));\n\t}\n\n\treturn {\n\t\tnameRegistry: [...snapshot.nameRegistry],\n\t\tentries: snapshot.entries.map(toWorkflowEntry),\n\t\tentryMetadata,\n\t};\n}\n"]}
|
package/dist/tsup/client/mod.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJAQHV6LBcjs = require('../chunk-JAQHV6LB.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -8,11 +8,11 @@ var _chunkINXPYXN6cjs = require('../chunk-INXPYXN6.cjs');
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkW2YEXCCJcjs = require('../chunk-W2YEXCCJ.cjs');
|
|
12
12
|
require('../chunk-MYWZCDML.cjs');
|
|
13
13
|
require('../chunk-UEULFXUI.cjs');
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-
|
|
14
|
+
require('../chunk-57ZE43T5.cjs');
|
|
15
|
+
require('../chunk-TWNMQDZK.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -28,5 +28,5 @@ var _chunk4FC7TVS6cjs = require('../chunk-4FC7TVS6.cjs');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
exports.ActorClientError =
|
|
31
|
+
exports.ActorClientError = _chunkW2YEXCCJcjs.ActorClientError; exports.ActorConnDisposed = _chunkW2YEXCCJcjs.ActorConnDisposed; exports.ActorConnRaw = _chunkW2YEXCCJcjs.ActorConnRaw; exports.ActorError = _chunk4FC7TVS6cjs.RivetError; exports.ActorHandleRaw = _chunkW2YEXCCJcjs.ActorHandleRaw; exports.MalformedResponseMessage = _chunkW2YEXCCJcjs.MalformedResponseMessage; exports.ManagerError = _chunkW2YEXCCJcjs.ManagerError; exports.RivetError = _chunk4FC7TVS6cjs.RivetError; exports.UserError = _chunk4FC7TVS6cjs.UserError; exports.createClient = _chunkJAQHV6LBcjs.createClient;
|
|
32
32
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aC as Registry, a2 as Client } from '../config-
|
|
2
|
-
export {
|
|
1
|
+
import { aC as Registry, a2 as Client } from '../config-Caocy3Z9.cjs';
|
|
2
|
+
export { bh as ActorAccessor, bi as ActorActionFunction, bj as ActorActionOptions, bk as ActorConn, bl as ActorConnRaw, bm as ActorConnStatus, bn as ActorConnectOptions, v as ActorDefinition, bo as ActorGatewayOptions, bp as ActorHandle, bq as ActorHandleRaw, A as AnyActorDefinition, br as ClientRaw, bs as ConnectionStateCallback, bt as CreateOptions, bu as CreateRequest, bv as EventUnsubscribe, bw as ExtractActorsFromRegistry, bx as ExtractRegistryFromClient, by as GetOptions, bz as GetWithIdOptions, bA as QueryOptions, bB as Region, bC as StatusChangeCallback } from '../config-Caocy3Z9.cjs';
|
|
3
3
|
import { G as GetUpgradeWebSocket } from '../utils-DQDCphrl.cjs';
|
|
4
4
|
export { E as Encoding } from '../utils-DQDCphrl.cjs';
|
|
5
5
|
import z from 'zod/v4';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { aC as Registry, a2 as Client } from '../config-
|
|
2
|
-
export {
|
|
1
|
+
import { aC as Registry, a2 as Client } from '../config-BKAMOHez.js';
|
|
2
|
+
export { bh as ActorAccessor, bi as ActorActionFunction, bj as ActorActionOptions, bk as ActorConn, bl as ActorConnRaw, bm as ActorConnStatus, bn as ActorConnectOptions, v as ActorDefinition, bo as ActorGatewayOptions, bp as ActorHandle, bq as ActorHandleRaw, A as AnyActorDefinition, br as ClientRaw, bs as ConnectionStateCallback, bt as CreateOptions, bu as CreateRequest, bv as EventUnsubscribe, bw as ExtractActorsFromRegistry, bx as ExtractRegistryFromClient, by as GetOptions, bz as GetWithIdOptions, bA as QueryOptions, bB as Region, bC as StatusChangeCallback } from '../config-BKAMOHez.js';
|
|
3
3
|
import { G as GetUpgradeWebSocket } from '../utils-CV0akuDD.js';
|
|
4
4
|
export { E as Encoding } from '../utils-CV0akuDD.js';
|
|
5
5
|
import z from 'zod/v4';
|
package/dist/tsup/client/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-L4DYLD7P.js";
|
|
4
4
|
import {
|
|
5
5
|
ActorClientError,
|
|
6
6
|
ActorConnDisposed,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
ActorHandleRaw,
|
|
9
9
|
MalformedResponseMessage,
|
|
10
10
|
ManagerError
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-MMPE77KO.js";
|
|
12
12
|
import "../chunk-JI6GZ2C2.js";
|
|
13
13
|
import "../chunk-7AFZMFPQ.js";
|
|
14
|
-
import "../chunk-
|
|
15
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-5FVMFSBH.js";
|
|
15
|
+
import "../chunk-ET2F6BXK.js";
|
|
16
16
|
import {
|
|
17
17
|
RivetError,
|
|
18
18
|
UserError
|
package/dist/tsup/common/log.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkTWNMQDZKcjs = require('../chunk-TWNMQDZK.cjs');
|
|
11
11
|
require('../chunk-4FC7TVS6.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
@@ -18,5 +18,5 @@ require('../chunk-4FC7TVS6.cjs');
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
exports.LogLevelSchema =
|
|
21
|
+
exports.LogLevelSchema = _chunkTWNMQDZKcjs.LogLevelSchema; exports.configureBaseLogger = _chunkTWNMQDZKcjs.configureBaseLogger; exports.configureDefaultLogger = _chunkTWNMQDZKcjs.configureDefaultLogger; exports.getBaseLogger = _chunkTWNMQDZKcjs.getBaseLogger; exports.getIncludeTarget = _chunkTWNMQDZKcjs.getIncludeTarget; exports.getLogger = _chunkTWNMQDZKcjs.getLogger; exports.getPinoLevel = _chunkTWNMQDZKcjs.getPinoLevel; exports.makeDefaultLogger = _chunkTWNMQDZKcjs.makeDefaultLogger;
|
|
22
22
|
//# sourceMappingURL=log.cjs.map
|
package/dist/tsup/common/log.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunk57ZE43T5cjs = require('../chunk-57ZE43T5.cjs');
|
|
4
|
+
require('../chunk-TWNMQDZK.cjs');
|
|
5
5
|
require('../chunk-4FC7TVS6.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.importWebSocket =
|
|
8
|
+
exports.importWebSocket = _chunk57ZE43T5cjs.importWebSocket;
|
|
9
9
|
//# sourceMappingURL=websocket.cjs.map
|
|
@@ -795,6 +795,7 @@ interface RuntimeListenerConfig {
|
|
|
795
795
|
port: number;
|
|
796
796
|
host?: string;
|
|
797
797
|
publicDir?: string;
|
|
798
|
+
application?: RuntimeApplicationFetch;
|
|
798
799
|
}
|
|
799
800
|
interface RuntimeServerlessRequest {
|
|
800
801
|
method: string;
|
|
@@ -802,6 +803,15 @@ interface RuntimeServerlessRequest {
|
|
|
802
803
|
headers: Record<string, string>;
|
|
803
804
|
body: RuntimeBytes;
|
|
804
805
|
}
|
|
806
|
+
interface RuntimeApplicationResponse {
|
|
807
|
+
status: number;
|
|
808
|
+
headers: Record<string, string>;
|
|
809
|
+
body: RuntimeBytes;
|
|
810
|
+
}
|
|
811
|
+
type RuntimeApplicationFetch = (request: RuntimeServerlessRequest) => Promise<RuntimeApplicationResponse>;
|
|
812
|
+
interface RuntimeApplicationListenerConfig extends RuntimeListenerConfig {
|
|
813
|
+
application: RuntimeApplicationFetch;
|
|
814
|
+
}
|
|
805
815
|
interface RuntimeServerlessResponseHead {
|
|
806
816
|
status: number;
|
|
807
817
|
headers: Record<string, string>;
|
|
@@ -844,6 +854,7 @@ interface CoreRuntime {
|
|
|
844
854
|
registryActorStopThresholdMs?(registry: RegistryHandle): Promise<number | undefined>;
|
|
845
855
|
handleServerlessRequest(registry: RegistryHandle, req: RuntimeServerlessRequest, onStreamEvent: RuntimeServerlessStreamCallback, cancelToken: CancellationTokenHandle, config: RuntimeServeConfig): Promise<RuntimeServerlessResponseHead>;
|
|
846
856
|
serveListener(registry: RegistryHandle, listener: RuntimeListenerConfig, config: RuntimeServeConfig): Promise<void>;
|
|
857
|
+
serveApplicationListener(registry: RegistryHandle, listener: RuntimeApplicationListenerConfig, config: RuntimeServeConfig): Promise<void>;
|
|
847
858
|
registryHealth?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
848
859
|
registryMetadata?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
849
860
|
registryMetrics?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
@@ -954,6 +965,15 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
954
965
|
interface ServerlessHandler {
|
|
955
966
|
fetch: FetchHandler;
|
|
956
967
|
}
|
|
968
|
+
interface RegistryApplication {
|
|
969
|
+
fetch: FetchHandler;
|
|
970
|
+
}
|
|
971
|
+
interface RegistryListenOptions {
|
|
972
|
+
port?: number;
|
|
973
|
+
host?: string;
|
|
974
|
+
publicDir?: string;
|
|
975
|
+
application?: RegistryApplication;
|
|
976
|
+
}
|
|
957
977
|
interface RegistryRoutes {
|
|
958
978
|
health(): Promise<Response>;
|
|
959
979
|
metadata(): Promise<Response>;
|
|
@@ -1003,18 +1023,16 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1003
1023
|
* @param opts.host Address to bind. Defaults to `0.0.0.0`.
|
|
1004
1024
|
* @param opts.publicDir If set, serves static files from this directory
|
|
1005
1025
|
* as a fallback below the framework routes.
|
|
1026
|
+
* @param opts.application If set, handles requests that do not match a
|
|
1027
|
+
* framework route.
|
|
1006
1028
|
*
|
|
1007
1029
|
* @example
|
|
1008
1030
|
* ```ts
|
|
1009
1031
|
* await registry.listen();
|
|
1010
|
-
* await registry.listen({
|
|
1032
|
+
* await registry.listen({ application: app });
|
|
1011
1033
|
* ```
|
|
1012
1034
|
*/
|
|
1013
|
-
listen(opts?:
|
|
1014
|
-
port?: number;
|
|
1015
|
-
host?: string;
|
|
1016
|
-
publicDir?: string;
|
|
1017
|
-
}): Promise<void>;
|
|
1035
|
+
listen(opts?: RegistryListenOptions): Promise<void>;
|
|
1018
1036
|
/**
|
|
1019
1037
|
* Gracefully drains all live registries.
|
|
1020
1038
|
*
|
|
@@ -2412,4 +2430,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
2412
2430
|
}, z.core.$strip>>;
|
|
2413
2431
|
}, z.core.$strip>;
|
|
2414
2432
|
|
|
2415
|
-
export { BuiltinInspectorTabIdSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorLogger as F, type ActorOptions as G, type ActorOptionsInput as H, ActorOptionsSchema as I, type ActorQuery as J, type ActorQueue as K, type ActorSchedule as L, type MigrateContext as M, type ActorTypes as N, ActorsSchema as O, type AnyActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, type AnyClient as T, type AnyConn as U, type AnyStaticActorDefinition as V, type WakeContext as W, type AnyStaticActorInstance as X, type AuthIntent as Y, BUILTIN_INSPECTOR_TAB_IDS as Z, type BaseActorInstance as _, type ActionContext as a, type
|
|
2433
|
+
export { BuiltinInspectorTabIdSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorLogger as F, type ActorOptions as G, type ActorOptionsInput as H, ActorOptionsSchema as I, type ActorQuery as J, type ActorQueue as K, type ActorSchedule as L, type MigrateContext as M, type ActorTypes as N, ActorsSchema as O, type AnyActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, type AnyClient as T, type AnyConn as U, type AnyStaticActorDefinition as V, type WakeContext as W, type AnyStaticActorInstance as X, type AuthIntent as Y, BUILTIN_INSPECTOR_TAB_IDS as Z, type BaseActorInstance as _, type ActionContext as a, type WasmRuntimeConfig as a$, CONN_DRIVER_SYMBOL as a0, CONN_STATE_MANAGER_SYMBOL as a1, type Client as a2, type Conn as a3, type CronFire as a4, type CronJobInfo as a5, CustomInspectorTabEntrySchema as a6, DEFAULT_SLEEP_GRACE_PERIOD as a7, DocActorConfigSchema as a8, DocActorOptionsSchema as a9, RAW_STATE_SYMBOL as aA, RUN_FUNCTION_CONFIG_SYMBOL as aB, Registry as aC, type RegistryActors as aD, type RegistryApplication as aE, type RegistryConfig as aF, type RegistryConfigInput as aG, RegistryConfigSchema as aH, type RegistryDeps as aI, type RegistryListenOptions as aJ, type RegistryRoutes as aK, type RunConfig as aL, RunConfigSchema as aM, type RunInspectorConfig as aN, type RuntimeKind as aO, RuntimeKindSchema as aP, type ScheduledEventInfo as aQ, type ScheduledFireInfo as aR, type ServerlessHandler as aS, type SqliteBackend as aT, SqliteBackendSchema as aU, type SqliteConfig as aV, SqliteConfigSchema as aW, type TestConfig as aX, TestConfigSchema as aY, type Type as aZ, type WasmRuntimeBindings as a_, DocConfigurePoolSchema as aa, DocEnvoyConfigSchema as ab, DocRegistryConfigSchema as ac, DocServerlessConfigSchema as ad, DocSqliteConfigSchema as ae, type FetchHandler as af, type GlobalActorOptions as ag, type GlobalActorOptionsInput as ah, GlobalActorOptionsSchema as ai, HideInspectorTabEntrySchema as aj, InspectorTabEntrySchema as ak, type InspectorUnsubscribe as al, type InstanceActorOptions as am, type InstanceActorOptionsInput as an, InstanceActorOptionsSchema as ao, type QueueEnqueueAndWaitOptions as ap, type QueueFilterName as aq, type QueueIterOptions as ar, type QueueMessageOf as as, type QueueName as at, type QueueNextBatchOptions as au, type QueueNextOptions as av, type QueueResultMessageForName as aw, type QueueTryNextBatchOptions as ax, type QueueTryNextOptions as ay, type QueueWaitOptions as az, type BeforeActionResponseContext as b, WasmRuntimeConfigSchema as b0, type WasmRuntimeInitInput as b1, type WorkflowInspectorConfig as b2, actor as b3, buildActorNames as b4, createClientWithDriver as b5, disposeRunInspector as b6, event as b7, getRunFunction as b8, getRunInspectorConfig as b9, type QueryOptions as bA, type Region as bB, type StatusChangeCallback as bC, type InferEventArgs as bD, type InferSchemaMap as bE, getRunMetadata as ba, isStaticActorDefinition as bb, isStaticActorInstance as bc, lookupInRegistry as bd, queue as be, setup as bf, test as bg, type ActorAccessor as bh, type ActorActionFunction as bi, type ActorActionOptions as bj, type ActorConn as bk, ActorConnRaw as bl, type ActorConnStatus as bm, type ActorConnectOptions as bn, type ActorGatewayOptions as bo, type ActorHandle as bp, ActorHandleRaw as bq, ClientRaw as br, type ConnectionStateCallback as bs, type CreateOptions as bt, type CreateRequest as bu, type EventUnsubscribe as bv, type ExtractActorsFromRegistry as bw, type ExtractRegistryFromClient as bx, type GetOptions as by, type GetWithIdOptions as bz, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type ActionInputSchemas as l, type Actions as m, type ActorConfig as n, type ActorConfigInput as o, ActorConfigSchema as p, type ActorContext as q, type ActorContextOf as r, type ActorCron as s, type ActorCronEveryOptions as t, type ActorCronSetOptions as u, ActorDefinition as v, type ActorInspectorConfig as w, ActorInspectorConfigSchema as x, type ActorKey as y, type ActorKv as z };
|
|
@@ -795,6 +795,7 @@ interface RuntimeListenerConfig {
|
|
|
795
795
|
port: number;
|
|
796
796
|
host?: string;
|
|
797
797
|
publicDir?: string;
|
|
798
|
+
application?: RuntimeApplicationFetch;
|
|
798
799
|
}
|
|
799
800
|
interface RuntimeServerlessRequest {
|
|
800
801
|
method: string;
|
|
@@ -802,6 +803,15 @@ interface RuntimeServerlessRequest {
|
|
|
802
803
|
headers: Record<string, string>;
|
|
803
804
|
body: RuntimeBytes;
|
|
804
805
|
}
|
|
806
|
+
interface RuntimeApplicationResponse {
|
|
807
|
+
status: number;
|
|
808
|
+
headers: Record<string, string>;
|
|
809
|
+
body: RuntimeBytes;
|
|
810
|
+
}
|
|
811
|
+
type RuntimeApplicationFetch = (request: RuntimeServerlessRequest) => Promise<RuntimeApplicationResponse>;
|
|
812
|
+
interface RuntimeApplicationListenerConfig extends RuntimeListenerConfig {
|
|
813
|
+
application: RuntimeApplicationFetch;
|
|
814
|
+
}
|
|
805
815
|
interface RuntimeServerlessResponseHead {
|
|
806
816
|
status: number;
|
|
807
817
|
headers: Record<string, string>;
|
|
@@ -844,6 +854,7 @@ interface CoreRuntime {
|
|
|
844
854
|
registryActorStopThresholdMs?(registry: RegistryHandle): Promise<number | undefined>;
|
|
845
855
|
handleServerlessRequest(registry: RegistryHandle, req: RuntimeServerlessRequest, onStreamEvent: RuntimeServerlessStreamCallback, cancelToken: CancellationTokenHandle, config: RuntimeServeConfig): Promise<RuntimeServerlessResponseHead>;
|
|
846
856
|
serveListener(registry: RegistryHandle, listener: RuntimeListenerConfig, config: RuntimeServeConfig): Promise<void>;
|
|
857
|
+
serveApplicationListener(registry: RegistryHandle, listener: RuntimeApplicationListenerConfig, config: RuntimeServeConfig): Promise<void>;
|
|
847
858
|
registryHealth?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
848
859
|
registryMetadata?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
849
860
|
registryMetrics?(registry: RegistryHandle): Promise<RuntimeRegistryRouteResponse>;
|
|
@@ -954,6 +965,15 @@ type FetchHandler = (request: Request, ...args: any) => Response | Promise<Respo
|
|
|
954
965
|
interface ServerlessHandler {
|
|
955
966
|
fetch: FetchHandler;
|
|
956
967
|
}
|
|
968
|
+
interface RegistryApplication {
|
|
969
|
+
fetch: FetchHandler;
|
|
970
|
+
}
|
|
971
|
+
interface RegistryListenOptions {
|
|
972
|
+
port?: number;
|
|
973
|
+
host?: string;
|
|
974
|
+
publicDir?: string;
|
|
975
|
+
application?: RegistryApplication;
|
|
976
|
+
}
|
|
957
977
|
interface RegistryRoutes {
|
|
958
978
|
health(): Promise<Response>;
|
|
959
979
|
metadata(): Promise<Response>;
|
|
@@ -1003,18 +1023,16 @@ declare class Registry<A extends RegistryActors> {
|
|
|
1003
1023
|
* @param opts.host Address to bind. Defaults to `0.0.0.0`.
|
|
1004
1024
|
* @param opts.publicDir If set, serves static files from this directory
|
|
1005
1025
|
* as a fallback below the framework routes.
|
|
1026
|
+
* @param opts.application If set, handles requests that do not match a
|
|
1027
|
+
* framework route.
|
|
1006
1028
|
*
|
|
1007
1029
|
* @example
|
|
1008
1030
|
* ```ts
|
|
1009
1031
|
* await registry.listen();
|
|
1010
|
-
* await registry.listen({
|
|
1032
|
+
* await registry.listen({ application: app });
|
|
1011
1033
|
* ```
|
|
1012
1034
|
*/
|
|
1013
|
-
listen(opts?:
|
|
1014
|
-
port?: number;
|
|
1015
|
-
host?: string;
|
|
1016
|
-
publicDir?: string;
|
|
1017
|
-
}): Promise<void>;
|
|
1035
|
+
listen(opts?: RegistryListenOptions): Promise<void>;
|
|
1018
1036
|
/**
|
|
1019
1037
|
* Gracefully drains all live registries.
|
|
1020
1038
|
*
|
|
@@ -2412,4 +2430,4 @@ declare const DocActorConfigSchema: z.ZodObject<{
|
|
|
2412
2430
|
}, z.core.$strip>>;
|
|
2413
2431
|
}, z.core.$strip>;
|
|
2414
2432
|
|
|
2415
|
-
export { BuiltinInspectorTabIdSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorLogger as F, type ActorOptions as G, type ActorOptionsInput as H, ActorOptionsSchema as I, type ActorQuery as J, type ActorQueue as K, type ActorSchedule as L, type MigrateContext as M, type ActorTypes as N, ActorsSchema as O, type AnyActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, type AnyClient as T, type AnyConn as U, type AnyStaticActorDefinition as V, type WakeContext as W, type AnyStaticActorInstance as X, type AuthIntent as Y, BUILTIN_INSPECTOR_TAB_IDS as Z, type BaseActorInstance as _, type ActionContext as a, type
|
|
2433
|
+
export { BuiltinInspectorTabIdSchema as $, type AnyActorDefinition as A, type BaseActorDefinition as B, type ConnectContext as C, type DestroyContext as D, type EventSchemaConfig as E, type ActorLogger as F, type ActorOptions as G, type ActorOptionsInput as H, ActorOptionsSchema as I, type ActorQuery as J, type ActorQueue as K, type ActorSchedule as L, type MigrateContext as M, type ActorTypes as N, ActorsSchema as O, type AnyActorInstance as P, type QueueSchemaConfig as Q, type RequestContext as R, type SleepContext as S, type AnyClient as T, type AnyConn as U, type AnyStaticActorDefinition as V, type WakeContext as W, type AnyStaticActorInstance as X, type AuthIntent as Y, BUILTIN_INSPECTOR_TAB_IDS as Z, type BaseActorInstance as _, type ActionContext as a, type WasmRuntimeConfig as a$, CONN_DRIVER_SYMBOL as a0, CONN_STATE_MANAGER_SYMBOL as a1, type Client as a2, type Conn as a3, type CronFire as a4, type CronJobInfo as a5, CustomInspectorTabEntrySchema as a6, DEFAULT_SLEEP_GRACE_PERIOD as a7, DocActorConfigSchema as a8, DocActorOptionsSchema as a9, RAW_STATE_SYMBOL as aA, RUN_FUNCTION_CONFIG_SYMBOL as aB, Registry as aC, type RegistryActors as aD, type RegistryApplication as aE, type RegistryConfig as aF, type RegistryConfigInput as aG, RegistryConfigSchema as aH, type RegistryDeps as aI, type RegistryListenOptions as aJ, type RegistryRoutes as aK, type RunConfig as aL, RunConfigSchema as aM, type RunInspectorConfig as aN, type RuntimeKind as aO, RuntimeKindSchema as aP, type ScheduledEventInfo as aQ, type ScheduledFireInfo as aR, type ServerlessHandler as aS, type SqliteBackend as aT, SqliteBackendSchema as aU, type SqliteConfig as aV, SqliteConfigSchema as aW, type TestConfig as aX, TestConfigSchema as aY, type Type as aZ, type WasmRuntimeBindings as a_, DocConfigurePoolSchema as aa, DocEnvoyConfigSchema as ab, DocRegistryConfigSchema as ac, DocServerlessConfigSchema as ad, DocSqliteConfigSchema as ae, type FetchHandler as af, type GlobalActorOptions as ag, type GlobalActorOptionsInput as ah, GlobalActorOptionsSchema as ai, HideInspectorTabEntrySchema as aj, InspectorTabEntrySchema as ak, type InspectorUnsubscribe as al, type InstanceActorOptions as am, type InstanceActorOptionsInput as an, InstanceActorOptionsSchema as ao, type QueueEnqueueAndWaitOptions as ap, type QueueFilterName as aq, type QueueIterOptions as ar, type QueueMessageOf as as, type QueueName as at, type QueueNextBatchOptions as au, type QueueNextOptions as av, type QueueResultMessageForName as aw, type QueueTryNextBatchOptions as ax, type QueueTryNextOptions as ay, type QueueWaitOptions as az, type BeforeActionResponseContext as b, WasmRuntimeConfigSchema as b0, type WasmRuntimeInitInput as b1, type WorkflowInspectorConfig as b2, actor as b3, buildActorNames as b4, createClientWithDriver as b5, disposeRunInspector as b6, event as b7, getRunFunction as b8, getRunInspectorConfig as b9, type QueryOptions as bA, type Region as bB, type StatusChangeCallback as bC, type InferEventArgs as bD, type InferSchemaMap as bE, getRunMetadata as ba, isStaticActorDefinition as bb, isStaticActorInstance as bc, lookupInRegistry as bd, queue as be, setup as bf, test as bg, type ActorAccessor as bh, type ActorActionFunction as bi, type ActorActionOptions as bj, type ActorConn as bk, ActorConnRaw as bl, type ActorConnStatus as bm, type ActorConnectOptions as bn, type ActorGatewayOptions as bo, type ActorHandle as bp, ActorHandleRaw as bq, ClientRaw as br, type ConnectionStateCallback as bs, type CreateOptions as bt, type CreateRequest as bu, type EventUnsubscribe as bv, type ExtractActorsFromRegistry as bw, type ExtractRegistryFromClient as bx, type GetOptions as by, type GetWithIdOptions as bz, type BeforeConnectContext as c, type CreateConnStateContext as d, type CreateContext as e, type CreateVarsContext as f, type DisconnectContext as g, type RunContext as h, type StateChangeContext as i, type WebSocketContext as j, ACTOR_CONTEXT_INTERNAL_SYMBOL as k, type ActionInputSchemas as l, type Actions as m, type ActorConfig as n, type ActorConfigInput as o, ActorConfigSchema as p, type ActorContext as q, type ActorContextOf as r, type ActorCron as s, type ActorCronEveryOptions as t, type ActorCronSetOptions as u, ActorDefinition as v, type ActorInspectorConfig as w, ActorInspectorConfigSchema as x, type ActorKey as y, type ActorKv as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, F as ActorLogger, aq as QueueFilterName, av as QueueNextOptions, aw as QueueResultMessageForName, au as QueueNextBatchOptions, aC as Registry, a2 as Client,
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, F as ActorLogger, aq as QueueFilterName, av as QueueNextOptions, aw as QueueResultMessageForName, au as QueueNextBatchOptions, aC as Registry, a2 as Client, bD as InferEventArgs, bE as InferSchemaMap } from './config-BKAMOHez.js';
|
|
2
2
|
import { WorkflowContextInterface, StepConfig, TryStepResult, TryStepConfig, TryBlockResult, TryBlockConfig, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
3
3
|
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-BxOimoGX.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, F as ActorLogger, aq as QueueFilterName, av as QueueNextOptions, aw as QueueResultMessageForName, au as QueueNextBatchOptions, aC as Registry, a2 as Client,
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, h as RunContext, F as ActorLogger, aq as QueueFilterName, av as QueueNextOptions, aw as QueueResultMessageForName, au as QueueNextBatchOptions, aC as Registry, a2 as Client, bD as InferEventArgs, bE as InferSchemaMap } from './config-Caocy3Z9.cjs';
|
|
2
2
|
import { WorkflowContextInterface, StepConfig, TryStepResult, TryStepConfig, TryBlockResult, TryBlockConfig, LoopResult, LoopConfig, BranchConfig, BranchOutput, EntryKindType } from '@rivetkit/workflow-engine';
|
|
3
3
|
import { A as AnyDatabaseProvider, I as InferDatabaseClient } from './config-BxOimoGX.cjs';
|
|
4
4
|
|
package/dist/tsup/db/drizzle.cjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
var _chunkUEULFXUIcjs = require('../chunk-UEULFXUI.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkTWNMQDZKcjs = require('../chunk-TWNMQDZK.cjs');
|
|
10
10
|
require('../chunk-4FC7TVS6.cjs');
|
|
11
11
|
|
|
12
12
|
// src/db/drizzle.ts
|
|
@@ -159,7 +159,7 @@ function db({
|
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
161
|
manualTransactionWarned = true;
|
|
162
|
-
|
|
162
|
+
_chunkTWNMQDZKcjs.getLogger.call(void 0, "database").warn(
|
|
163
163
|
{ actorId: ctx.actorId },
|
|
164
164
|
"Manual cross-call SQLite transactions can interleave with other actor work. Use db.transaction() for coordinated transactions. Set warnOnManualTransactions: false in your db(...) configuration to disable this warning."
|
|
165
165
|
);
|
package/dist/tsup/db/drizzle.js
CHANGED
package/dist/tsup/db/mod.cjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
var _chunkUEULFXUIcjs = require('../chunk-UEULFXUI.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkTWNMQDZKcjs = require('../chunk-TWNMQDZK.cjs');
|
|
11
11
|
require('../chunk-4FC7TVS6.cjs');
|
|
12
12
|
|
|
13
13
|
// src/common/database/mod.ts
|
|
@@ -43,7 +43,7 @@ function db({
|
|
|
43
43
|
ensureOpen();
|
|
44
44
|
if (!transactionScoped && warnOnManualTransactions && !manualTransactionWarned && !hasMultipleStatements(query) && _chunkUEULFXUIcjs.isManualTransactionControl.call(void 0, query)) {
|
|
45
45
|
manualTransactionWarned = true;
|
|
46
|
-
|
|
46
|
+
_chunkTWNMQDZKcjs.getLogger.call(void 0, "database").warn(
|
|
47
47
|
{ actorId: ctx.actorId },
|
|
48
48
|
"Manual cross-call SQLite transactions can interleave with other actor work. Use db.transaction() for coordinated transactions. Set warnOnManualTransactions: false in your db(...) configuration to disable this warning."
|
|
49
49
|
);
|
package/dist/tsup/db/mod.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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 _chunkXEOPXHN2cjs = require('../chunk-XEOPXHN2.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
8
|
-
require('../chunk-
|
|
7
|
+
var _chunkK4DNAIWTcjs = require('../chunk-K4DNAIWT.cjs');
|
|
8
|
+
require('../chunk-TWNMQDZK.cjs');
|
|
9
9
|
require('../chunk-4FC7TVS6.cjs');
|
|
10
10
|
|
|
11
11
|
// src/common/bare/generated/inspector/v5.ts
|
|
@@ -795,5 +795,5 @@ function decodeToClient(bytes) {
|
|
|
795
795
|
|
|
796
796
|
|
|
797
797
|
|
|
798
|
-
exports.createWorkflowInspectorAdapter =
|
|
798
|
+
exports.createWorkflowInspectorAdapter = _chunkXEOPXHN2cjs.createWorkflowInspectorAdapter; exports.decodeToClient = decodeToClient; exports.decodeToServer = decodeToServer; exports.decodeWorkflowHistoryTransport = _chunkK4DNAIWTcjs.decodeWorkflowHistoryTransport; exports.encodeToClient = encodeToClient; exports.encodeToServer = encodeToServer; exports.encodeWorkflowHistoryTransport = _chunkK4DNAIWTcjs.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;
|
|
799
799
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWorkflowInspectorAdapter
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-5ZS22TOP.js";
|
|
4
4
|
import {
|
|
5
5
|
decodeWorkflowHistoryTransport,
|
|
6
6
|
encodeWorkflowHistoryTransport
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-6ZPMYIZ6.js";
|
|
8
|
+
import "../chunk-ET2F6BXK.js";
|
|
9
9
|
import "../chunk-ZZ3WBRPD.js";
|
|
10
10
|
|
|
11
11
|
// src/common/bare/generated/inspector/v5.ts
|