rivetkit 3.1.2-rc.1 → 3.1.2-rc.2
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 +1 -27
- package/dist/browser/client.js +1 -1
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-TYNEZVC2.cjs → chunk-6BGQCMIF.cjs} +3 -3
- package/dist/tsup/{chunk-TYNEZVC2.cjs.map → chunk-6BGQCMIF.cjs.map} +1 -1
- package/dist/tsup/{chunk-DKVKYLXH.js → chunk-6MJSWO33.js} +4 -4
- package/dist/tsup/{chunk-J5ZNIJT3.js → chunk-6NHRZU52.js} +2 -2
- package/dist/tsup/{chunk-VUFOIAKH.cjs → chunk-A3N3LJC6.cjs} +10 -10
- package/dist/tsup/{chunk-VUFOIAKH.cjs.map → chunk-A3N3LJC6.cjs.map} +1 -1
- package/dist/tsup/{chunk-LNMODE5R.js → chunk-D2CCGHEJ.js} +4 -3
- package/dist/tsup/chunk-D2CCGHEJ.js.map +1 -0
- package/dist/tsup/{chunk-GI3TPFCE.cjs → chunk-DDF35AIK.cjs} +2 -2
- package/dist/tsup/{chunk-GI3TPFCE.cjs.map → chunk-DDF35AIK.cjs.map} +1 -1
- package/dist/tsup/{chunk-5RE3IF3C.js → chunk-I6P2AHO6.js} +2 -2
- package/dist/tsup/{chunk-7PUO5YRK.js → chunk-JGMXY4GD.js} +3 -3
- package/dist/tsup/{chunk-MM6QYEV7.cjs → chunk-L2XH4EXJ.cjs} +146 -146
- package/dist/tsup/{chunk-MM6QYEV7.cjs.map → chunk-L2XH4EXJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-R2GD2TDD.cjs → chunk-LBYX466L.cjs} +3 -3
- package/dist/tsup/{chunk-R2GD2TDD.cjs.map → chunk-LBYX466L.cjs.map} +1 -1
- package/dist/tsup/{chunk-SPLLB6BX.js → chunk-MRWI2HTU.js} +2 -2
- package/dist/tsup/{chunk-WD6L6OTX.js → chunk-MVOIZGVC.js} +2 -2
- package/dist/tsup/{chunk-WD6L6OTX.js.map → chunk-MVOIZGVC.js.map} +1 -1
- package/dist/tsup/{chunk-YT77YM32.js → chunk-N2SQDK2F.js} +3 -3
- package/dist/tsup/{chunk-KOB3RR6D.cjs → chunk-QJ7MIAFD.cjs} +7 -7
- package/dist/tsup/{chunk-KOB3RR6D.cjs.map → chunk-QJ7MIAFD.cjs.map} +1 -1
- package/dist/tsup/{chunk-TR5YB355.cjs → chunk-TAK6KRMJ.cjs} +5 -4
- package/dist/tsup/chunk-TAK6KRMJ.cjs.map +1 -0
- package/dist/tsup/{chunk-YPJ3QEDL.cjs → chunk-YAGP66QF.cjs} +4 -4
- package/dist/tsup/{chunk-YPJ3QEDL.cjs.map → chunk-YAGP66QF.cjs.map} +1 -1
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.d.cts +3 -3
- package/dist/tsup/client/mod.d.ts +3 -3
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/{config-CTGjM4A5.d.cts → config-BMGUEKMZ.d.cts} +2 -2
- package/dist/tsup/{config-Df5jOcde.d.ts → config-CBTr4IhE.d.cts} +0 -26
- package/dist/tsup/{config-Df5jOcde.d.cts → config-CBTr4IhE.d.ts} +0 -26
- package/dist/tsup/{config-DLXQ_TVP.d.ts → config-iBpXyITj.d.ts} +2 -2
- package/dist/tsup/{context-Dmz9Hd6K.d.ts → context-hyVakgnU.d.ts} +2 -2
- package/dist/tsup/{context-S-Y75hj1.d.cts → context-qfvLuF0P.d.cts} +2 -2
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.d.cts +1 -1
- package/dist/tsup/db/drizzle.d.ts +1 -1
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.d.cts +2 -2
- package/dist/tsup/db/mod.d.ts +2 -2
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/dynamic/mod.d.cts +2 -2
- package/dist/tsup/dynamic/mod.d.ts +2 -2
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/inspector-tab/mod.d.cts +3 -3
- package/dist/tsup/inspector-tab/mod.d.ts +3 -3
- package/dist/tsup/mod.cjs +119 -105
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.d.cts +4 -4
- package/dist/tsup/mod.d.ts +4 -4
- package/dist/tsup/mod.js +38 -24
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.d.cts +2 -2
- package/dist/tsup/test/mod.d.ts +2 -2
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/unstable/migrations.d.cts +1 -1
- package/dist/tsup/unstable/migrations.d.ts +1 -1
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +35 -27
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.d.cts +4 -4
- package/dist/tsup/workflow/mod.d.ts +4 -4
- package/dist/tsup/workflow/mod.js +32 -24
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +9 -9
- package/src/common/database/config.ts +41 -28
- package/src/common/database/mod.ts +3 -0
- package/src/common/database/native-database.ts +25 -13
- package/src/registry/napi-runtime.ts +2 -0
- package/src/registry/native.ts +19 -9
- package/src/registry/runtime.ts +1 -0
- package/src/registry/wasm-runtime.ts +3 -1
- package/src/workflow/driver.ts +29 -20
- package/dist/tsup/chunk-LNMODE5R.js.map +0 -1
- package/dist/tsup/chunk-TR5YB355.cjs.map +0 -1
- /package/dist/tsup/{chunk-DKVKYLXH.js.map → chunk-6MJSWO33.js.map} +0 -0
- /package/dist/tsup/{chunk-J5ZNIJT3.js.map → chunk-6NHRZU52.js.map} +0 -0
- /package/dist/tsup/{chunk-5RE3IF3C.js.map → chunk-I6P2AHO6.js.map} +0 -0
- /package/dist/tsup/{chunk-7PUO5YRK.js.map → chunk-JGMXY4GD.js.map} +0 -0
- /package/dist/tsup/{chunk-SPLLB6BX.js.map → chunk-MRWI2HTU.js.map} +0 -0
- /package/dist/tsup/{chunk-YT77YM32.js.map → chunk-N2SQDK2F.js.map} +0 -0
package/dist/tsup/mod.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-BMGUEKMZ.cjs';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-BMGUEKMZ.cjs';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-C6b0aYUM.cjs';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
|
-
import { A as AnyDatabaseProvider } from './config-
|
|
6
|
+
import { A as AnyDatabaseProvider } from './config-CBTr4IhE.cjs';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-3rsE0JvI.cjs';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-qfvLuF0P.cjs';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
package/dist/tsup/mod.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-
|
|
2
|
-
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-
|
|
1
|
+
import { A as AnyActorDefinition, B as BaseActorDefinition, E as EventSchemaConfig, Q as QueueSchemaConfig, a as ActionContext, b as BeforeActionResponseContext, c as BeforeConnectContext, C as ConnectContext, d as CreateConnStateContext, e as CreateContext, f as CreateVarsContext, D as DestroyContext, g as DisconnectContext, M as MigrateContext, R as RequestContext, h as RunContext, S as SleepContext, i as StateChangeContext, W as WakeContext, j as WebSocketContext } from './config-iBpXyITj.js';
|
|
2
|
+
export { k as ACTOR_CONTEXT_INTERNAL_SYMBOL, l as ActionInputSchemas, m as ActionSampleRates, n as ActionTraceSamplers, o as Actions, p as ActorConfig, q as ActorConfigInput, r as ActorConfigSchema, s as ActorContext, t as ActorContextOf, u as ActorCron, v as ActorCronEveryOptions, w as ActorCronSetOptions, x as ActorDefinition, y as ActorFork, z as ActorForkLink, F as ActorInspectorConfig, G as ActorInspectorConfigSchema, H as ActorKey, I as ActorKv, J as ActorLogger, K as ActorOptions, L as ActorOptionsInput, N as ActorOptionsSchema, O as ActorQuery, P as ActorQueue, T as ActorRun, U as ActorSchedule, V as ActorTracingOptions, X as ActorTypes, Y as ActorsSchema, Z as AnyActorInstance, _ as AnyClient, $ as AnyConn, a0 as AnyStaticActorDefinition, a1 as AnyStaticActorInstance, a2 as AuthIntent, a3 as BUILTIN_INSPECTOR_TAB_IDS, a4 as BaseActorInstance, a5 as BuiltinInspectorTabIdSchema, a6 as CONN_DRIVER_SYMBOL, a7 as CONN_STATE_MANAGER_SYMBOL, a8 as Client, a9 as Conn, aa as CronFire, ab as CronJobInfo, ac as CustomInspectorTabEntrySchema, ad as DEFAULT_SLEEP_GRACE_PERIOD, ae as DefineRunHandlerOptions, af as DocActorConfigSchema, ag as DocActorOptionsSchema, ah as DocConfigurePoolSchema, ai as DocEnvoyConfigSchema, aj as DocRegistryConfigSchema, ak as DocServerlessConfigSchema, al as DocSqliteConfigSchema, am as FetchHandler, an as GlobalActorOptions, ao as GlobalActorOptionsInput, ap as GlobalActorOptionsSchema, aq as HideInspectorTabEntrySchema, ar as InferEventArgs, as as InferSchemaMap, at as InspectorTabEntrySchema, au as InspectorUnsubscribe, av as InstanceActorOptions, aw as InstanceActorOptionsInput, ax as InstanceActorOptionsSchema, ay as QueueEnqueueAndWaitOptions, az as QueueFilterName, aA as QueueIterOptions, aB as QueueMessageOf, aC as QueueName, aD as QueueNextBatchOptions, aE as QueueNextOptions, aF as QueueResultMessageForName, aG as QueueTryNextBatchOptions, aH as QueueTryNextOptions, aI as QueueWaitOptions, aJ as RAW_STATE_SYMBOL, aK as Registry, aL as RegistryActors, aM as RegistryApplication, aN as RegistryConfig, aO as RegistryConfigInput, aP as RegistryConfigSchema, aQ as RegistryDeps, aR as RegistryListenOptions, aS as RegistryRoutes, aT as RunConfig, aU as RunConfigSchema, aV as RunControl, aW as RunInspectorConfig, aX as RunInspectorFactoryContext, aY as RunInspectorFactoryResult, aZ as RunInspectorKind, a_ as RunWithInactiveOptions, a$ as RuntimeKind, b0 as RuntimeKindSchema, b1 as ScheduledEventInfo, b2 as ScheduledFireInfo, b3 as ServerlessHandler, b4 as SqliteBackend, b5 as SqliteBackendSchema, b6 as SqliteConfig, b7 as SqliteConfigSchema, b8 as TestConfig, b9 as TestConfigSchema, ba as Type, bb as WasmRuntimeBindings, bc as WasmRuntimeConfig, bd as WasmRuntimeConfigSchema, be as WasmRuntimeInitInput, bf as WorkflowInspectorConfig, bg as WorkflowOutcome, bh as WorkflowSpan, bi as WorkflowStepOutcome, bj as WorkflowStepSpan, bk as actor, bl as buildActorNames, bm as createClientWithDriver, bn as defineRunHandler, bo as disposeRunInspector, bp as event, bq as getRunFunction, br as getRunInspectorConfig, bs as getRunMetadata, bt as isStaticActorDefinition, bu as isStaticActorInstance, bv as lookupInRegistry, bw as queue, bx as setup, by as test } from './config-iBpXyITj.js';
|
|
3
3
|
export { E as Encoding, t as toUint8Array } from './utils-C1O-SklO.js';
|
|
4
4
|
import { UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
5
5
|
export { RivetCloseEvent, RivetEvent, RivetMessageEvent, UniversalWebSocket } from '@rivetkit/virtual-websocket';
|
|
6
|
-
import { A as AnyDatabaseProvider } from './config-
|
|
6
|
+
import { A as AnyDatabaseProvider } from './config-CBTr4IhE.js';
|
|
7
7
|
export { R as ActorError, R as RivetError, a as RivetErrorLike, b as RivetErrorOptions, U as UserError, c as UserErrorOptions, n as noopNext } from './utils-3rsE0JvI.js';
|
|
8
8
|
import { WSContext } from 'hono/ws';
|
|
9
|
-
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-
|
|
9
|
+
export { W as WorkflowBranchContextOf, a as WorkflowContextOf, b as WorkflowLoopContextOf, c as WorkflowStepContextOf } from './context-hyVakgnU.js';
|
|
10
10
|
import 'zod/v4';
|
|
11
11
|
import '@rivetkit/rivetkit-wasm';
|
|
12
12
|
import 'zod';
|
package/dist/tsup/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeWorkflowHistoryTransport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I6P2AHO6.js";
|
|
4
4
|
import {
|
|
5
5
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
6
6
|
ActorConfigSchema,
|
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
runWithActorInvocationSpan,
|
|
36
36
|
tryParseEndpoint,
|
|
37
37
|
updateRunnerConfig
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-JGMXY4GD.js";
|
|
39
39
|
import {
|
|
40
40
|
makePrefixedKey,
|
|
41
41
|
removePrefixFromKey
|
|
42
42
|
} from "./chunk-A2CF6PFH.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-MRWI2HTU.js";
|
|
44
44
|
import {
|
|
45
45
|
bindNativeStateTransactionContext,
|
|
46
46
|
db,
|
|
47
47
|
registerNativeStateTransactionOpener
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-D2CCGHEJ.js";
|
|
49
49
|
import "./chunk-JTHHCZCZ.js";
|
|
50
50
|
import {
|
|
51
51
|
LogLevelSchema,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
parsePortEnv,
|
|
81
81
|
stringifyError,
|
|
82
82
|
toUint8Array
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-MVOIZGVC.js";
|
|
84
84
|
import {
|
|
85
85
|
INTERNAL_ERROR_CODE,
|
|
86
86
|
RivetError,
|
|
@@ -971,6 +971,7 @@ var DocRegistryConfigSchema = z3.object({
|
|
|
971
971
|
import { VirtualWebSocket as VirtualWebSocket2 } from "@rivetkit/virtual-websocket";
|
|
972
972
|
|
|
973
973
|
// src/common/database/native-database.ts
|
|
974
|
+
var EXECUTE_BATCH_TRANSACTION_NAME = "rivetkit-execute-batch";
|
|
974
975
|
function isSynchronousTransaction(transaction) {
|
|
975
976
|
const candidate = transaction;
|
|
976
977
|
return typeof candidate.commitSync === "function" && typeof candidate.rollbackSync === "function";
|
|
@@ -995,16 +996,18 @@ function toNativeBinding(arg) {
|
|
|
995
996
|
if (arg === null || arg === void 0) {
|
|
996
997
|
return { kind: "null" };
|
|
997
998
|
}
|
|
998
|
-
if (typeof arg === "bigint"
|
|
999
|
-
|
|
1000
|
-
if (!Number.isSafeInteger(value)) {
|
|
999
|
+
if (typeof arg === "bigint") {
|
|
1000
|
+
if (arg > BigInt(Number.MAX_SAFE_INTEGER) || arg < BigInt(Number.MIN_SAFE_INTEGER)) {
|
|
1001
1001
|
throw new RangeError(
|
|
1002
|
-
"SQLite
|
|
1002
|
+
"SQLite bigint bindings must be within the JavaScript safe integer range."
|
|
1003
1003
|
);
|
|
1004
1004
|
}
|
|
1005
|
-
return { kind: "int", intValue:
|
|
1005
|
+
return { kind: "int", intValue: Number(arg) };
|
|
1006
1006
|
}
|
|
1007
1007
|
if (typeof arg === "number") {
|
|
1008
|
+
if (Number.isInteger(arg)) {
|
|
1009
|
+
return { kind: "int", intValue: arg };
|
|
1010
|
+
}
|
|
1008
1011
|
return { kind: "float", floatValue: arg };
|
|
1009
1012
|
}
|
|
1010
1013
|
if (typeof arg === "string") {
|
|
@@ -1236,7 +1239,10 @@ function wrapJsNativeDatabase(database) {
|
|
|
1236
1239
|
let transaction;
|
|
1237
1240
|
try {
|
|
1238
1241
|
const results = database.executeBatch ? await database.executeBatch(nativeStatements) : await (async () => {
|
|
1239
|
-
transaction = await database.beginTransaction(
|
|
1242
|
+
transaction = await database.beginTransaction(
|
|
1243
|
+
void 0,
|
|
1244
|
+
EXECUTE_BATCH_TRANSACTION_NAME
|
|
1245
|
+
);
|
|
1240
1246
|
const transactionResults = [];
|
|
1241
1247
|
for (const statement of nativeStatements) {
|
|
1242
1248
|
transactionResults.push(
|
|
@@ -1300,7 +1306,7 @@ function wrapJsNativeDatabase(database) {
|
|
|
1300
1306
|
}
|
|
1301
1307
|
});
|
|
1302
1308
|
},
|
|
1303
|
-
async beginStateTransaction(timeoutMs, context) {
|
|
1309
|
+
async beginStateTransaction(timeoutMs, context, name) {
|
|
1304
1310
|
if (!database.beginStateTransaction) {
|
|
1305
1311
|
throw new Error("actor state transactions are not configured");
|
|
1306
1312
|
}
|
|
@@ -1309,7 +1315,8 @@ function wrapJsNativeDatabase(database) {
|
|
|
1309
1315
|
try {
|
|
1310
1316
|
transaction = await database.beginStateTransaction(
|
|
1311
1317
|
timeoutMs,
|
|
1312
|
-
context
|
|
1318
|
+
context,
|
|
1319
|
+
name
|
|
1313
1320
|
);
|
|
1314
1321
|
} catch (error) {
|
|
1315
1322
|
enrichNativeDatabaseError(database, error);
|
|
@@ -2135,9 +2142,10 @@ var NapiCoreRuntime = class {
|
|
|
2135
2142
|
actorSqlTransactionRollbackSync(transaction) {
|
|
2136
2143
|
asNativeSqlTransaction(transaction).rollbackSync();
|
|
2137
2144
|
}
|
|
2138
|
-
async actorBeginStateTransaction(ctx, timeoutMs) {
|
|
2145
|
+
async actorBeginStateTransaction(ctx, timeoutMs, name) {
|
|
2139
2146
|
return await this.#actorContextForOperation(ctx).beginStateTransaction(
|
|
2140
|
-
timeoutMs
|
|
2147
|
+
timeoutMs,
|
|
2148
|
+
name
|
|
2141
2149
|
);
|
|
2142
2150
|
}
|
|
2143
2151
|
async actorStateTransactionExecute(transaction, sql, params) {
|
|
@@ -3275,9 +3283,9 @@ var WasmCoreRuntime = class {
|
|
|
3275
3283
|
actorSqlTransactionRollbackSync(_transaction) {
|
|
3276
3284
|
synchronousSqliteUnavailable();
|
|
3277
3285
|
}
|
|
3278
|
-
async actorBeginStateTransaction(ctx, timeoutMs) {
|
|
3286
|
+
async actorBeginStateTransaction(ctx, timeoutMs, name) {
|
|
3279
3287
|
return await callWasm(
|
|
3280
|
-
() => asWasmActorContext(ctx).beginStateTransaction(timeoutMs)
|
|
3288
|
+
() => asWasmActorContext(ctx).beginStateTransaction(timeoutMs, name)
|
|
3281
3289
|
);
|
|
3282
3290
|
}
|
|
3283
3291
|
async actorStateTransactionExecute(transaction, sql, params) {
|
|
@@ -4006,7 +4014,7 @@ function getOrCreateNativeSqlDatabase(runtime, ctx) {
|
|
|
4006
4014
|
);
|
|
4007
4015
|
return createNativeSqlTransaction(runtime, transaction);
|
|
4008
4016
|
},
|
|
4009
|
-
beginStateTransaction: async (timeoutMs, context) => {
|
|
4017
|
+
beginStateTransaction: async (timeoutMs, context, name) => {
|
|
4010
4018
|
const scope = context;
|
|
4011
4019
|
if (!scope) {
|
|
4012
4020
|
throw new Error(
|
|
@@ -4015,7 +4023,8 @@ function getOrCreateNativeSqlDatabase(runtime, ctx) {
|
|
|
4015
4023
|
}
|
|
4016
4024
|
const transaction = await runtime.actorBeginStateTransaction(
|
|
4017
4025
|
ctx,
|
|
4018
|
-
timeoutMs
|
|
4026
|
+
timeoutMs,
|
|
4027
|
+
name
|
|
4019
4028
|
);
|
|
4020
4029
|
return {
|
|
4021
4030
|
exec: async () => {
|
|
@@ -5805,14 +5814,16 @@ var ActorContextHandleAdapter = class {
|
|
|
5805
5814
|
this.#runtime,
|
|
5806
5815
|
this.#ctx
|
|
5807
5816
|
);
|
|
5808
|
-
|
|
5817
|
+
if (usesSqliteDeferredCommits(this.#databaseProvider)) {
|
|
5818
|
+
await database.open();
|
|
5819
|
+
}
|
|
5809
5820
|
return database;
|
|
5810
5821
|
}
|
|
5811
5822
|
},
|
|
5812
|
-
async (timeoutMs, context) => await getOrCreateNativeSqlDatabase(
|
|
5823
|
+
async (timeoutMs, context, name) => await getOrCreateNativeSqlDatabase(
|
|
5813
5824
|
this.#runtime,
|
|
5814
5825
|
this.#ctx
|
|
5815
|
-
).beginStateTransaction(timeoutMs, context)
|
|
5826
|
+
).beginStateTransaction(timeoutMs, context, name)
|
|
5816
5827
|
)
|
|
5817
5828
|
});
|
|
5818
5829
|
runtimeState.databaseClient = {
|
|
@@ -6410,14 +6421,17 @@ function buildActorTracingConfig(actions, tracing) {
|
|
|
6410
6421
|
};
|
|
6411
6422
|
}
|
|
6412
6423
|
var SQLITE_DEFERRED_COMMITS = /* @__PURE__ */ Symbol.for("rivetkit.sqlite.deferredCommits");
|
|
6424
|
+
function usesSqliteDeferredCommits(databaseProvider) {
|
|
6425
|
+
return (databaseProvider == null ? void 0 : databaseProvider[SQLITE_DEFERRED_COMMITS]) === true;
|
|
6426
|
+
}
|
|
6413
6427
|
function buildActorConfig(definition, registryConfig, runtimeKind) {
|
|
6414
|
-
var _a
|
|
6428
|
+
var _a;
|
|
6415
6429
|
const config = definition.config;
|
|
6416
6430
|
const options = config.options ?? {};
|
|
6417
6431
|
const canHibernate = options.canHibernateWebSocket;
|
|
6418
6432
|
const usesRemoteSqlite = sqliteBackendForConfig(registryConfig) === "remote";
|
|
6419
6433
|
const sqliteProfiling = (_a = config.db) == null ? void 0 : _a.sqliteProfiling;
|
|
6420
|
-
const sqliteDeferredCommits = (
|
|
6434
|
+
const sqliteDeferredCommits = usesSqliteDeferredCommits(config.db);
|
|
6421
6435
|
return {
|
|
6422
6436
|
name: options.name,
|
|
6423
6437
|
icon: options.icon,
|