rivetkit 2.0.27 → 2.0.29-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/schemas/file-system-driver/v3.ts +167 -0
- package/dist/tsup/actor/errors.cjs +2 -2
- package/dist/tsup/actor/errors.js +1 -1
- package/dist/tsup/{chunk-TJ2PJ5C7.cjs → chunk-2Q6FJITJ.cjs} +3 -3
- package/dist/tsup/{chunk-TJ2PJ5C7.cjs.map → chunk-2Q6FJITJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-GUH2PNPG.js → chunk-5RN6O2RW.js} +3 -3
- package/dist/tsup/{chunk-F3SQLO3X.cjs → chunk-AJ36VBHL.cjs} +13 -12
- package/dist/tsup/chunk-AJ36VBHL.cjs.map +1 -0
- package/dist/tsup/{chunk-4GJQDTAG.cjs → chunk-BAEMOCS7.cjs} +666 -342
- package/dist/tsup/chunk-BAEMOCS7.cjs.map +1 -0
- package/dist/tsup/chunk-CGIRSKRW.js +891 -0
- package/dist/tsup/chunk-CGIRSKRW.js.map +1 -0
- package/dist/tsup/{chunk-BBTOBXEO.js → chunk-CHPLLKNL.js} +579 -103
- package/dist/tsup/chunk-CHPLLKNL.js.map +1 -0
- package/dist/tsup/{chunk-D7A47BVR.js → chunk-EU7VV5PU.js} +2 -2
- package/dist/tsup/{chunk-2NNICHGY.js → chunk-EVQJYFFP.js} +2 -2
- package/dist/tsup/{chunk-C3UREFUI.js → chunk-HXWPIIEM.js} +15 -6
- package/dist/tsup/chunk-HXWPIIEM.js.map +1 -0
- package/dist/tsup/chunk-IRGPMCKQ.cjs +129 -0
- package/dist/tsup/chunk-IRGPMCKQ.cjs.map +1 -0
- package/dist/tsup/{chunk-QC4AE54W.cjs → chunk-J3M5ATO5.cjs} +3 -3
- package/dist/tsup/{chunk-QC4AE54W.cjs.map → chunk-J3M5ATO5.cjs.map} +1 -1
- package/dist/tsup/{chunk-DRJCTDDT.cjs → chunk-J74MGKP5.cjs} +20 -11
- package/dist/tsup/chunk-J74MGKP5.cjs.map +1 -0
- package/dist/tsup/{chunk-XJMYGATE.cjs → chunk-MAQSR26X.cjs} +8 -3
- package/dist/tsup/chunk-MAQSR26X.cjs.map +1 -0
- package/dist/tsup/{chunk-XNKWXMIT.cjs → chunk-MG2TWYPF.cjs} +794 -318
- package/dist/tsup/chunk-MG2TWYPF.cjs.map +1 -0
- package/dist/tsup/{chunk-LQOCWGP6.js → chunk-P2RZJPYI.js} +1 -1
- package/dist/tsup/{chunk-XU4GGB6J.js → chunk-QKDCNAPW.js} +504 -181
- package/dist/tsup/chunk-QKDCNAPW.js.map +1 -0
- package/dist/tsup/{chunk-G7YZSSWV.cjs → chunk-QT7PPLSB.cjs} +6 -6
- package/dist/tsup/{chunk-G7YZSSWV.cjs.map → chunk-QT7PPLSB.cjs.map} +1 -1
- package/dist/tsup/{chunk-VRZNWBDK.js → chunk-SDJFBUFE.js} +45 -46
- package/dist/tsup/chunk-SDJFBUFE.js.map +1 -0
- package/dist/tsup/chunk-SE37OCA2.cjs +891 -0
- package/dist/tsup/chunk-SE37OCA2.cjs.map +1 -0
- package/dist/tsup/{chunk-6F2NCX7R.js → chunk-WUFUT7CZ.js} +2 -2
- package/dist/tsup/{chunk-LZADH4QA.cjs → chunk-XVBIJET6.cjs} +10 -10
- package/dist/tsup/{chunk-LZADH4QA.cjs.map → chunk-XVBIJET6.cjs.map} +1 -1
- package/dist/tsup/{chunk-KSQQU7NC.js → chunk-YJXB7BPR.js} +8 -7
- package/dist/tsup/chunk-YJXB7BPR.js.map +1 -0
- package/dist/tsup/client/mod.cjs +9 -9
- package/dist/tsup/client/mod.d.cts +3 -2
- package/dist/tsup/client/mod.d.ts +3 -2
- package/dist/tsup/client/mod.js +8 -8
- package/dist/tsup/common/log.cjs +3 -3
- package/dist/tsup/common/log.d.cts +9 -1
- package/dist/tsup/common/log.d.ts +9 -1
- package/dist/tsup/common/log.js +2 -2
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{config-Bo-blHpJ.d.ts → config-CcMdKDv9.d.ts} +301 -899
- package/dist/tsup/{config-BRDYDraU.d.cts → config-DxlmiJS1.d.cts} +301 -899
- package/dist/tsup/driver-helpers/mod.cjs +5 -5
- package/dist/tsup/driver-helpers/mod.d.cts +2 -1
- package/dist/tsup/driver-helpers/mod.d.ts +2 -1
- package/dist/tsup/driver-helpers/mod.js +4 -4
- package/dist/tsup/driver-test-suite/mod.cjs +74 -74
- package/dist/tsup/driver-test-suite/mod.d.cts +2 -1
- package/dist/tsup/driver-test-suite/mod.d.ts +2 -1
- package/dist/tsup/driver-test-suite/mod.js +11 -11
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.d.cts +5 -4
- package/dist/tsup/inspector/mod.d.ts +5 -4
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +10 -10
- package/dist/tsup/mod.d.cts +3 -2
- package/dist/tsup/mod.d.ts +3 -2
- package/dist/tsup/mod.js +9 -9
- package/dist/tsup/test/mod.cjs +12 -11
- package/dist/tsup/test/mod.cjs.map +1 -1
- package/dist/tsup/test/mod.d.cts +2 -6
- package/dist/tsup/test/mod.d.ts +2 -6
- package/dist/tsup/test/mod.js +11 -10
- package/dist/tsup/utils.cjs +3 -3
- package/dist/tsup/utils.js +2 -2
- package/package.json +7 -6
- package/src/actor/config.ts +21 -20
- package/src/actor/conn/mod.ts +5 -1
- package/src/actor/instance/connection-manager.ts +5 -1
- package/src/actor/instance/event-manager.ts +5 -1
- package/src/actor/instance/state-manager.ts +19 -3
- package/src/actor/protocol/old.ts +3 -0
- package/src/actor/protocol/serde.ts +5 -1
- package/src/actor/router-endpoints.ts +2 -0
- package/src/client/actor-conn.ts +2 -0
- package/src/client/actor-handle.ts +3 -0
- package/src/client/config.ts +1 -1
- package/src/client/utils.ts +4 -1
- package/src/common/router.ts +5 -1
- package/src/driver-helpers/utils.ts +8 -2
- package/src/drivers/engine/config.ts +6 -3
- package/src/drivers/file-system/global-state.ts +46 -1
- package/src/drivers/file-system/manager.ts +4 -0
- package/src/inspector/config.ts +1 -2
- package/src/manager/driver.ts +4 -0
- package/src/manager/router-schema.ts +7 -7
- package/src/manager/router.ts +4 -4
- package/src/registry/run-config.ts +9 -5
- package/src/remote-manager-driver/actor-http-client.ts +1 -1
- package/src/remote-manager-driver/api-utils.ts +2 -0
- package/src/schemas/actor-persist/versioned.ts +126 -54
- package/src/schemas/client-protocol/versioned.ts +173 -42
- package/src/schemas/file-system-driver/mod.ts +1 -1
- package/src/schemas/file-system-driver/versioned.ts +129 -45
- package/src/serde.ts +9 -2
- package/src/test/config.ts +13 -12
- package/src/test/mod.ts +56 -82
- package/dist/tsup/chunk-2TZH6VO6.cjs +0 -514
- package/dist/tsup/chunk-2TZH6VO6.cjs.map +0 -1
- package/dist/tsup/chunk-4GJQDTAG.cjs.map +0 -1
- package/dist/tsup/chunk-5YDKTW6Y.js +0 -514
- package/dist/tsup/chunk-5YDKTW6Y.js.map +0 -1
- package/dist/tsup/chunk-BBTOBXEO.js.map +0 -1
- package/dist/tsup/chunk-C3UREFUI.js.map +0 -1
- package/dist/tsup/chunk-DRJCTDDT.cjs.map +0 -1
- package/dist/tsup/chunk-F3SQLO3X.cjs.map +0 -1
- package/dist/tsup/chunk-FYZLEH57.cjs +0 -130
- package/dist/tsup/chunk-FYZLEH57.cjs.map +0 -1
- package/dist/tsup/chunk-KSQQU7NC.js.map +0 -1
- package/dist/tsup/chunk-VRZNWBDK.js.map +0 -1
- package/dist/tsup/chunk-XJMYGATE.cjs.map +0 -1
- package/dist/tsup/chunk-XNKWXMIT.cjs.map +0 -1
- package/dist/tsup/chunk-XU4GGB6J.js.map +0 -1
- package/src/common/versioned-data.ts +0 -95
- /package/dist/tsup/{chunk-GUH2PNPG.js.map → chunk-5RN6O2RW.js.map} +0 -0
- /package/dist/tsup/{chunk-D7A47BVR.js.map → chunk-EU7VV5PU.js.map} +0 -0
- /package/dist/tsup/{chunk-2NNICHGY.js.map → chunk-EVQJYFFP.js.map} +0 -0
- /package/dist/tsup/{chunk-LQOCWGP6.js.map → chunk-P2RZJPYI.js.map} +0 -0
- /package/dist/tsup/{chunk-6F2NCX7R.js.map → chunk-WUFUT7CZ.js.map} +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z__default, { z } from 'zod';
|
|
2
2
|
import { Env, Context, Hono } from 'hono';
|
|
3
3
|
import { Logger } from 'pino';
|
|
4
4
|
import { GetUpgradeWebSocket } from './utils.js';
|
|
5
|
+
import { VersionedDataHandler } from 'vbare';
|
|
5
6
|
import * as nanoevents from 'nanoevents';
|
|
6
|
-
import
|
|
7
|
+
import z$1 from 'zod/v4';
|
|
7
8
|
|
|
8
9
|
interface RivetEvent {
|
|
9
10
|
type: string;
|
|
@@ -75,120 +76,66 @@ type DatabaseProvider<DB extends {
|
|
|
75
76
|
onMigrate: (client: DB) => void | Promise<void>;
|
|
76
77
|
};
|
|
77
78
|
|
|
78
|
-
declare const ActorsSchema: z.ZodRecord<z.ZodString, z.
|
|
79
|
+
declare const ActorsSchema: z.ZodRecord<z.ZodString, z.ZodCustom<ActorDefinition<any, any, any, any, any, any, any>, ActorDefinition<any, any, any, any, any, any, any>>>;
|
|
79
80
|
type RegistryActors = z.infer<typeof ActorsSchema>;
|
|
80
81
|
/** Base config used for the actor config across all platforms. */
|
|
81
82
|
declare const RegistryConfigSchema: z.ZodObject<{
|
|
82
|
-
use: z.ZodRecord<z.ZodString, z.
|
|
83
|
-
/**
|
|
84
|
-
* Test configuration.
|
|
85
|
-
*
|
|
86
|
-
* DO NOT MANUALLY ENABLE. THIS IS USED INTERNALLY.
|
|
87
|
-
* @internal
|
|
88
|
-
**/
|
|
83
|
+
use: z.ZodRecord<z.ZodString, z.ZodCustom<AnyActorDefinition, AnyActorDefinition>>;
|
|
89
84
|
test: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
90
85
|
enabled: z.ZodBoolean;
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
}, {
|
|
94
|
-
enabled: boolean;
|
|
95
|
-
}>>>;
|
|
96
|
-
}, "strip", z.ZodTypeAny, {
|
|
97
|
-
use: Record<string, AnyActorDefinition>;
|
|
98
|
-
test: {
|
|
99
|
-
enabled: boolean;
|
|
100
|
-
};
|
|
101
|
-
}, {
|
|
102
|
-
use: Record<string, AnyActorDefinition>;
|
|
103
|
-
test?: {
|
|
104
|
-
enabled: boolean;
|
|
105
|
-
} | undefined;
|
|
106
|
-
}>;
|
|
86
|
+
}, z.core.$strip>>>;
|
|
87
|
+
}, z.core.$strip>;
|
|
107
88
|
type RegistryConfig = z.infer<typeof RegistryConfigSchema>;
|
|
108
89
|
type RegistryConfigInput<A extends RegistryActors> = Omit<z.input<typeof RegistryConfigSchema>, "use"> & {
|
|
109
90
|
use: A;
|
|
110
91
|
};
|
|
111
92
|
|
|
112
93
|
declare const DriverConfigSchema: z.ZodObject<{
|
|
113
|
-
/** Machine-readable name to identify this driver by. */
|
|
114
94
|
name: z.ZodString;
|
|
115
|
-
manager: z.
|
|
116
|
-
actor: z.
|
|
117
|
-
},
|
|
118
|
-
name: string;
|
|
119
|
-
actor: ActorDriverBuilder;
|
|
120
|
-
manager: ManagerDriverBuilder;
|
|
121
|
-
}, {
|
|
122
|
-
name: string;
|
|
123
|
-
actor: ActorDriverBuilder;
|
|
124
|
-
manager: ManagerDriverBuilder;
|
|
125
|
-
}>;
|
|
95
|
+
manager: z.ZodCustom<ManagerDriverBuilder, ManagerDriverBuilder>;
|
|
96
|
+
actor: z.ZodCustom<ActorDriverBuilder, ActorDriverBuilder>;
|
|
97
|
+
}, z.core.$strip>;
|
|
126
98
|
type DriverConfig = z.infer<typeof DriverConfigSchema>;
|
|
127
|
-
/** Base config used for the actor config across all platforms. */
|
|
128
99
|
declare const RunnerConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
129
100
|
driver: z.ZodOptional<z.ZodObject<{
|
|
130
|
-
/** Machine-readable name to identify this driver by. */
|
|
131
101
|
name: z.ZodString;
|
|
132
|
-
manager: z.
|
|
133
|
-
actor: z.
|
|
134
|
-
},
|
|
135
|
-
name: string;
|
|
136
|
-
actor: ActorDriverBuilder;
|
|
137
|
-
manager: ManagerDriverBuilder;
|
|
138
|
-
}, {
|
|
139
|
-
name: string;
|
|
140
|
-
actor: ActorDriverBuilder;
|
|
141
|
-
manager: ManagerDriverBuilder;
|
|
142
|
-
}>>;
|
|
102
|
+
manager: z.ZodCustom<ManagerDriverBuilder, ManagerDriverBuilder>;
|
|
103
|
+
actor: z.ZodCustom<ActorDriverBuilder, ActorDriverBuilder>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
143
105
|
maxIncomingMessageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
144
106
|
inspector: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
145
107
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
|
|
146
108
|
actor: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
147
109
|
manager: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
manager: boolean;
|
|
151
|
-
}, {
|
|
152
|
-
actor?: boolean | undefined;
|
|
153
|
-
manager?: boolean | undefined;
|
|
154
|
-
}>]>>>;
|
|
155
|
-
token: z.ZodDefault<z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>>>;
|
|
110
|
+
}, z.core.$strip>]>>>;
|
|
111
|
+
token: z.ZodDefault<z.ZodOptional<z.ZodCustom<() => string, () => string>>>;
|
|
156
112
|
defaultEndpoint: z.ZodOptional<z.ZodString>;
|
|
157
|
-
},
|
|
158
|
-
enabled: boolean | {
|
|
159
|
-
actor: boolean;
|
|
160
|
-
manager: boolean;
|
|
161
|
-
};
|
|
162
|
-
token: (...args: unknown[]) => string;
|
|
163
|
-
defaultEndpoint?: string | undefined;
|
|
164
|
-
}, {
|
|
165
|
-
enabled?: boolean | {
|
|
166
|
-
actor?: boolean | undefined;
|
|
167
|
-
manager?: boolean | undefined;
|
|
168
|
-
} | undefined;
|
|
169
|
-
token?: ((...args: unknown[]) => string) | undefined;
|
|
170
|
-
defaultEndpoint?: string | undefined;
|
|
171
|
-
}>>>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
172
114
|
disableDefaultServer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
173
115
|
defaultServerPort: z.ZodDefault<z.ZodNumber>;
|
|
174
116
|
runEngine: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
175
117
|
runEngineVersion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
176
118
|
overrideServerAddress: z.ZodOptional<z.ZodString>;
|
|
177
119
|
disableActorDriver: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
178
|
-
runnerKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<
|
|
120
|
+
runnerKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
121
|
+
serverless: "serverless";
|
|
122
|
+
normal: "normal";
|
|
123
|
+
}>>>;
|
|
179
124
|
basePath: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
180
125
|
noWelcome: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
181
126
|
logging: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
182
|
-
baseLogger: z.ZodOptional<z.
|
|
183
|
-
level: z.ZodOptional<z.ZodEnum<
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
127
|
+
baseLogger: z.ZodOptional<z.ZodCustom<Logger, Logger>>;
|
|
128
|
+
level: z.ZodOptional<z.ZodEnum<{
|
|
129
|
+
error: "error";
|
|
130
|
+
trace: "trace";
|
|
131
|
+
fatal: "fatal";
|
|
132
|
+
warn: "warn";
|
|
133
|
+
info: "info";
|
|
134
|
+
debug: "debug";
|
|
135
|
+
silent: "silent";
|
|
136
|
+
}>>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
autoConfigureServerless: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
192
139
|
url: z.ZodOptional<z.ZodString>;
|
|
193
140
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
194
141
|
maxRunners: z.ZodOptional<z.ZodNumber>;
|
|
@@ -197,133 +144,22 @@ declare const RunnerConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
197
144
|
runnersMargin: z.ZodOptional<z.ZodNumber>;
|
|
198
145
|
slotsPerRunner: z.ZodOptional<z.ZodNumber>;
|
|
199
146
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
200
|
-
},
|
|
201
|
-
|
|
202
|
-
headers?: Record<string, string> | undefined;
|
|
203
|
-
url?: string | undefined;
|
|
204
|
-
maxRunners?: number | undefined;
|
|
205
|
-
minRunners?: number | undefined;
|
|
206
|
-
requestLifespan?: number | undefined;
|
|
207
|
-
runnersMargin?: number | undefined;
|
|
208
|
-
slotsPerRunner?: number | undefined;
|
|
209
|
-
}, {
|
|
210
|
-
metadata?: Record<string, unknown> | undefined;
|
|
211
|
-
headers?: Record<string, string> | undefined;
|
|
212
|
-
url?: string | undefined;
|
|
213
|
-
maxRunners?: number | undefined;
|
|
214
|
-
minRunners?: number | undefined;
|
|
215
|
-
requestLifespan?: number | undefined;
|
|
216
|
-
runnersMargin?: number | undefined;
|
|
217
|
-
slotsPerRunner?: number | undefined;
|
|
218
|
-
}>]>>;
|
|
219
|
-
} & {
|
|
220
|
-
runnerKey: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
147
|
+
}, z.core.$strip>]>>;
|
|
148
|
+
runnerKey: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
221
149
|
totalSlots: z.ZodDefault<z.ZodNumber>;
|
|
222
|
-
endpoint: z.
|
|
223
|
-
token: z.
|
|
150
|
+
endpoint: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
151
|
+
token: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
224
152
|
namespace: z.ZodDefault<z.ZodString>;
|
|
225
153
|
runnerName: z.ZodDefault<z.ZodString>;
|
|
226
|
-
encoding: z.ZodDefault<z.ZodEnum<
|
|
154
|
+
encoding: z.ZodDefault<z.ZodEnum<{
|
|
155
|
+
json: "json";
|
|
156
|
+
cbor: "cbor";
|
|
157
|
+
bare: "bare";
|
|
158
|
+
}>>;
|
|
227
159
|
headers: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
228
|
-
getUpgradeWebSocket: z.ZodOptional<z.
|
|
160
|
+
getUpgradeWebSocket: z.ZodOptional<z.ZodCustom<GetUpgradeWebSocket, GetUpgradeWebSocket>>;
|
|
229
161
|
disableMetadataLookup: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
230
|
-
},
|
|
231
|
-
encoding: "json" | "cbor" | "bare";
|
|
232
|
-
namespace: string;
|
|
233
|
-
runnerName: string;
|
|
234
|
-
headers: Record<string, string>;
|
|
235
|
-
disableMetadataLookup: boolean;
|
|
236
|
-
inspector: {
|
|
237
|
-
enabled: boolean | {
|
|
238
|
-
actor: boolean;
|
|
239
|
-
manager: boolean;
|
|
240
|
-
};
|
|
241
|
-
token: (...args: unknown[]) => string;
|
|
242
|
-
defaultEndpoint?: string | undefined;
|
|
243
|
-
};
|
|
244
|
-
totalSlots: number;
|
|
245
|
-
maxIncomingMessageSize: number;
|
|
246
|
-
disableDefaultServer: boolean;
|
|
247
|
-
defaultServerPort: number;
|
|
248
|
-
runEngine: boolean;
|
|
249
|
-
runEngineVersion: string;
|
|
250
|
-
disableActorDriver: boolean;
|
|
251
|
-
runnerKind: "serverless" | "normal";
|
|
252
|
-
basePath: string;
|
|
253
|
-
noWelcome: boolean;
|
|
254
|
-
logging: {
|
|
255
|
-
level?: "error" | "trace" | "fatal" | "warn" | "info" | "debug" | "silent" | undefined;
|
|
256
|
-
baseLogger?: Logger | undefined;
|
|
257
|
-
};
|
|
258
|
-
driver?: {
|
|
259
|
-
name: string;
|
|
260
|
-
actor: ActorDriverBuilder;
|
|
261
|
-
manager: ManagerDriverBuilder;
|
|
262
|
-
} | undefined;
|
|
263
|
-
endpoint?: string | undefined;
|
|
264
|
-
token?: string | undefined;
|
|
265
|
-
getUpgradeWebSocket?: GetUpgradeWebSocket | undefined;
|
|
266
|
-
runnerKey?: string | undefined;
|
|
267
|
-
overrideServerAddress?: string | undefined;
|
|
268
|
-
autoConfigureServerless?: boolean | {
|
|
269
|
-
metadata?: Record<string, unknown> | undefined;
|
|
270
|
-
headers?: Record<string, string> | undefined;
|
|
271
|
-
url?: string | undefined;
|
|
272
|
-
maxRunners?: number | undefined;
|
|
273
|
-
minRunners?: number | undefined;
|
|
274
|
-
requestLifespan?: number | undefined;
|
|
275
|
-
runnersMargin?: number | undefined;
|
|
276
|
-
slotsPerRunner?: number | undefined;
|
|
277
|
-
} | undefined;
|
|
278
|
-
}, {
|
|
279
|
-
encoding?: "json" | "cbor" | "bare" | undefined;
|
|
280
|
-
driver?: {
|
|
281
|
-
name: string;
|
|
282
|
-
actor: ActorDriverBuilder;
|
|
283
|
-
manager: ManagerDriverBuilder;
|
|
284
|
-
} | undefined;
|
|
285
|
-
endpoint?: string | undefined;
|
|
286
|
-
token?: string | undefined;
|
|
287
|
-
namespace?: string | undefined;
|
|
288
|
-
runnerName?: string | undefined;
|
|
289
|
-
headers?: Record<string, string> | undefined;
|
|
290
|
-
getUpgradeWebSocket?: GetUpgradeWebSocket | undefined;
|
|
291
|
-
disableMetadataLookup?: boolean | undefined;
|
|
292
|
-
inspector?: {
|
|
293
|
-
enabled?: boolean | {
|
|
294
|
-
actor?: boolean | undefined;
|
|
295
|
-
manager?: boolean | undefined;
|
|
296
|
-
} | undefined;
|
|
297
|
-
token?: ((...args: unknown[]) => string) | undefined;
|
|
298
|
-
defaultEndpoint?: string | undefined;
|
|
299
|
-
} | undefined;
|
|
300
|
-
runnerKey?: string | undefined;
|
|
301
|
-
totalSlots?: number | undefined;
|
|
302
|
-
maxIncomingMessageSize?: number | undefined;
|
|
303
|
-
disableDefaultServer?: boolean | undefined;
|
|
304
|
-
defaultServerPort?: number | undefined;
|
|
305
|
-
runEngine?: boolean | undefined;
|
|
306
|
-
runEngineVersion?: string | undefined;
|
|
307
|
-
overrideServerAddress?: string | undefined;
|
|
308
|
-
disableActorDriver?: boolean | undefined;
|
|
309
|
-
runnerKind?: "serverless" | "normal" | undefined;
|
|
310
|
-
basePath?: string | undefined;
|
|
311
|
-
noWelcome?: boolean | undefined;
|
|
312
|
-
logging?: {
|
|
313
|
-
level?: "error" | "trace" | "fatal" | "warn" | "info" | "debug" | "silent" | undefined;
|
|
314
|
-
baseLogger?: Logger | undefined;
|
|
315
|
-
} | undefined;
|
|
316
|
-
autoConfigureServerless?: boolean | {
|
|
317
|
-
metadata?: Record<string, unknown> | undefined;
|
|
318
|
-
headers?: Record<string, string> | undefined;
|
|
319
|
-
url?: string | undefined;
|
|
320
|
-
maxRunners?: number | undefined;
|
|
321
|
-
minRunners?: number | undefined;
|
|
322
|
-
requestLifespan?: number | undefined;
|
|
323
|
-
runnersMargin?: number | undefined;
|
|
324
|
-
slotsPerRunner?: number | undefined;
|
|
325
|
-
} | undefined;
|
|
326
|
-
}>>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
327
163
|
type RunnerConfig = z.infer<typeof RunnerConfigSchema>;
|
|
328
164
|
type RunnerConfigInput = z.input<typeof RunnerConfigSchema>;
|
|
329
165
|
|
|
@@ -387,6 +223,10 @@ interface ActorOutput {
|
|
|
387
223
|
name: string;
|
|
388
224
|
key: ActorKey;
|
|
389
225
|
createTs?: number;
|
|
226
|
+
startTs?: number | null;
|
|
227
|
+
connectableTs?: number | null;
|
|
228
|
+
sleepTs?: number | null;
|
|
229
|
+
destroyTs?: number | null;
|
|
390
230
|
}
|
|
391
231
|
|
|
392
232
|
type ActorDriverBuilder = (registryConfig: RegistryConfig, runConfig: RunnerConfig, managerDriver: ManagerDriver, inlineClient: AnyClient) => ActorDriver;
|
|
@@ -581,27 +421,13 @@ declare class ActorDefinition<S, CP, CS, V, I, DB extends AnyDatabaseProvider, R
|
|
|
581
421
|
}
|
|
582
422
|
declare function lookupInRegistry(registryConfig: RegistryConfig, name: string): AnyActorDefinition;
|
|
583
423
|
|
|
584
|
-
type MigrationFn<TFrom, TTo> = (data: TFrom) => TTo;
|
|
585
|
-
interface VersionedDataConfig<T> {
|
|
586
|
-
currentVersion: number;
|
|
587
|
-
migrations: Map<number, MigrationFn<any, any>>;
|
|
588
|
-
serializeVersion: (data: T) => Uint8Array;
|
|
589
|
-
deserializeVersion: (bytes: Uint8Array) => T;
|
|
590
|
-
}
|
|
591
|
-
declare class VersionedDataHandler<T> {
|
|
592
|
-
private config;
|
|
593
|
-
constructor(config: VersionedDataConfig<T>);
|
|
594
|
-
serializeWithEmbeddedVersion(data: T): Uint8Array;
|
|
595
|
-
deserializeWithEmbeddedVersion(bytes: Uint8Array): T;
|
|
596
|
-
serialize(data: T, version: number): Uint8Array;
|
|
597
|
-
deserialize(bytes: Uint8Array, version: number): T;
|
|
598
|
-
private embedVersion;
|
|
599
|
-
private extractVersion;
|
|
600
|
-
}
|
|
601
|
-
|
|
602
424
|
/** Data that's been serialized. */
|
|
603
425
|
type OutputData = string | Uint8Array;
|
|
604
|
-
declare const EncodingSchema: z.ZodEnum<
|
|
426
|
+
declare const EncodingSchema: z.ZodEnum<{
|
|
427
|
+
json: "json";
|
|
428
|
+
cbor: "cbor";
|
|
429
|
+
bare: "bare";
|
|
430
|
+
}>;
|
|
605
431
|
/**
|
|
606
432
|
* Encoding used to communicate between the client & actor.
|
|
607
433
|
*/
|
|
@@ -611,134 +437,44 @@ type Encoding = z.infer<typeof EncodingSchema>;
|
|
|
611
437
|
*/
|
|
612
438
|
declare class CachedSerializer<TBare, TJson, T = TBare> {
|
|
613
439
|
#private;
|
|
614
|
-
constructor(data: T, versionedDataHandler: VersionedDataHandler<TBare>, zodSchema: z.ZodType<TJson>, toJson: (value: T) => TJson, toBare: (value: T) => TBare);
|
|
440
|
+
constructor(data: T, versionedDataHandler: VersionedDataHandler<TBare>, version: number, zodSchema: z.ZodType<TJson>, toJson: (value: T) => TJson, toBare: (value: T) => TBare);
|
|
615
441
|
get rawData(): T;
|
|
616
442
|
serialize(encoding: Encoding): OutputData;
|
|
617
443
|
}
|
|
618
444
|
|
|
619
|
-
declare const ActorKeySchema: z.ZodArray<z.ZodString
|
|
445
|
+
declare const ActorKeySchema: z.ZodArray<z.ZodString>;
|
|
620
446
|
type ActorKey = z.infer<typeof ActorKeySchema>;
|
|
621
447
|
declare const CreateRequestSchema: z.ZodObject<{
|
|
622
448
|
name: z.ZodString;
|
|
623
|
-
key: z.ZodArray<z.ZodString
|
|
449
|
+
key: z.ZodArray<z.ZodString>;
|
|
624
450
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
625
451
|
region: z.ZodOptional<z.ZodString>;
|
|
626
|
-
},
|
|
627
|
-
|
|
628
|
-
key: string[];
|
|
629
|
-
input?: unknown;
|
|
630
|
-
region?: string | undefined;
|
|
631
|
-
}, {
|
|
632
|
-
name: string;
|
|
633
|
-
key: string[];
|
|
634
|
-
input?: unknown;
|
|
635
|
-
region?: string | undefined;
|
|
636
|
-
}>;
|
|
637
|
-
declare const ActorQuerySchema: z.ZodUnion<[z.ZodObject<{
|
|
452
|
+
}, z.core.$strip>;
|
|
453
|
+
declare const ActorQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
638
454
|
getForId: z.ZodObject<{
|
|
639
455
|
name: z.ZodString;
|
|
640
456
|
actorId: z.ZodString;
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
name: string;
|
|
644
|
-
}, {
|
|
645
|
-
actorId: string;
|
|
646
|
-
name: string;
|
|
647
|
-
}>;
|
|
648
|
-
}, "strip", z.ZodTypeAny, {
|
|
649
|
-
getForId: {
|
|
650
|
-
actorId: string;
|
|
651
|
-
name: string;
|
|
652
|
-
};
|
|
653
|
-
}, {
|
|
654
|
-
getForId: {
|
|
655
|
-
actorId: string;
|
|
656
|
-
name: string;
|
|
657
|
-
};
|
|
658
|
-
}>, z.ZodObject<{
|
|
457
|
+
}, z.core.$strip>;
|
|
458
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
659
459
|
getForKey: z.ZodObject<{
|
|
660
460
|
name: z.ZodString;
|
|
661
|
-
key: z.ZodArray<z.ZodString
|
|
662
|
-
},
|
|
663
|
-
|
|
664
|
-
key: string[];
|
|
665
|
-
}, {
|
|
666
|
-
name: string;
|
|
667
|
-
key: string[];
|
|
668
|
-
}>;
|
|
669
|
-
}, "strip", z.ZodTypeAny, {
|
|
670
|
-
getForKey: {
|
|
671
|
-
name: string;
|
|
672
|
-
key: string[];
|
|
673
|
-
};
|
|
674
|
-
}, {
|
|
675
|
-
getForKey: {
|
|
676
|
-
name: string;
|
|
677
|
-
key: string[];
|
|
678
|
-
};
|
|
679
|
-
}>, z.ZodObject<{
|
|
461
|
+
key: z.ZodArray<z.ZodString>;
|
|
462
|
+
}, z.core.$strip>;
|
|
463
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
680
464
|
getOrCreateForKey: z.ZodObject<{
|
|
681
465
|
name: z.ZodString;
|
|
682
|
-
key: z.ZodArray<z.ZodString
|
|
466
|
+
key: z.ZodArray<z.ZodString>;
|
|
683
467
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
684
468
|
region: z.ZodOptional<z.ZodString>;
|
|
685
|
-
},
|
|
686
|
-
|
|
687
|
-
key: string[];
|
|
688
|
-
input?: unknown;
|
|
689
|
-
region?: string | undefined;
|
|
690
|
-
}, {
|
|
691
|
-
name: string;
|
|
692
|
-
key: string[];
|
|
693
|
-
input?: unknown;
|
|
694
|
-
region?: string | undefined;
|
|
695
|
-
}>;
|
|
696
|
-
}, "strip", z.ZodTypeAny, {
|
|
697
|
-
getOrCreateForKey: {
|
|
698
|
-
name: string;
|
|
699
|
-
key: string[];
|
|
700
|
-
input?: unknown;
|
|
701
|
-
region?: string | undefined;
|
|
702
|
-
};
|
|
703
|
-
}, {
|
|
704
|
-
getOrCreateForKey: {
|
|
705
|
-
name: string;
|
|
706
|
-
key: string[];
|
|
707
|
-
input?: unknown;
|
|
708
|
-
region?: string | undefined;
|
|
709
|
-
};
|
|
710
|
-
}>, z.ZodObject<{
|
|
469
|
+
}, z.core.$strip>;
|
|
470
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
711
471
|
create: z.ZodObject<{
|
|
712
472
|
name: z.ZodString;
|
|
713
|
-
key: z.ZodArray<z.ZodString
|
|
473
|
+
key: z.ZodArray<z.ZodString>;
|
|
714
474
|
input: z.ZodOptional<z.ZodUnknown>;
|
|
715
475
|
region: z.ZodOptional<z.ZodString>;
|
|
716
|
-
},
|
|
717
|
-
|
|
718
|
-
key: string[];
|
|
719
|
-
input?: unknown;
|
|
720
|
-
region?: string | undefined;
|
|
721
|
-
}, {
|
|
722
|
-
name: string;
|
|
723
|
-
key: string[];
|
|
724
|
-
input?: unknown;
|
|
725
|
-
region?: string | undefined;
|
|
726
|
-
}>;
|
|
727
|
-
}, "strip", z.ZodTypeAny, {
|
|
728
|
-
create: {
|
|
729
|
-
name: string;
|
|
730
|
-
key: string[];
|
|
731
|
-
input?: unknown;
|
|
732
|
-
region?: string | undefined;
|
|
733
|
-
};
|
|
734
|
-
}, {
|
|
735
|
-
create: {
|
|
736
|
-
name: string;
|
|
737
|
-
key: string[];
|
|
738
|
-
input?: unknown;
|
|
739
|
-
region?: string | undefined;
|
|
740
|
-
};
|
|
741
|
-
}>]>;
|
|
476
|
+
}, z.core.$strip>;
|
|
477
|
+
}, z.core.$strip>]>;
|
|
742
478
|
type ActorQuery = z.infer<typeof ActorQuerySchema>;
|
|
743
479
|
/**
|
|
744
480
|
* Interface representing a request to create a actor.
|
|
@@ -963,41 +699,22 @@ type ActorHandle<AD extends AnyActorDefinition> = Omit<ActorHandleRaw, "connect"
|
|
|
963
699
|
resolve(): Promise<string>;
|
|
964
700
|
} & ActorDefinitionActions<AD>;
|
|
965
701
|
|
|
966
|
-
declare const ClientConfigSchema:
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
headers:
|
|
977
|
-
getUpgradeWebSocket:
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
namespace: string;
|
|
983
|
-
runnerName: string;
|
|
984
|
-
headers: Record<string, string>;
|
|
985
|
-
disableMetadataLookup: boolean;
|
|
986
|
-
endpoint?: string | undefined;
|
|
987
|
-
token?: string | undefined;
|
|
988
|
-
getUpgradeWebSocket?: GetUpgradeWebSocket | undefined;
|
|
989
|
-
}, {
|
|
990
|
-
encoding?: "json" | "cbor" | "bare" | undefined;
|
|
991
|
-
endpoint?: string | undefined;
|
|
992
|
-
token?: string | undefined;
|
|
993
|
-
namespace?: string | undefined;
|
|
994
|
-
runnerName?: string | undefined;
|
|
995
|
-
headers?: Record<string, string> | undefined;
|
|
996
|
-
getUpgradeWebSocket?: GetUpgradeWebSocket | undefined;
|
|
997
|
-
disableMetadataLookup?: boolean | undefined;
|
|
998
|
-
}>;
|
|
999
|
-
type ClientConfig = z$1.infer<typeof ClientConfigSchema>;
|
|
1000
|
-
type ClientConfigInput = z$1.input<typeof ClientConfigSchema>;
|
|
702
|
+
declare const ClientConfigSchema: z__default.ZodObject<{
|
|
703
|
+
endpoint: z__default.ZodPipe<z__default.ZodOptional<z__default.ZodString>, z__default.ZodTransform<string | undefined, string | undefined>>;
|
|
704
|
+
token: z__default.ZodPipe<z__default.ZodOptional<z__default.ZodString>, z__default.ZodTransform<string | undefined, string | undefined>>;
|
|
705
|
+
namespace: z__default.ZodDefault<z__default.ZodString>;
|
|
706
|
+
runnerName: z__default.ZodDefault<z__default.ZodString>;
|
|
707
|
+
encoding: z__default.ZodDefault<z__default.ZodEnum<{
|
|
708
|
+
json: "json";
|
|
709
|
+
cbor: "cbor";
|
|
710
|
+
bare: "bare";
|
|
711
|
+
}>>;
|
|
712
|
+
headers: z__default.ZodDefault<z__default.ZodOptional<z__default.ZodRecord<z__default.ZodString, z__default.ZodString>>>;
|
|
713
|
+
getUpgradeWebSocket: z__default.ZodOptional<z__default.ZodCustom<GetUpgradeWebSocket, GetUpgradeWebSocket>>;
|
|
714
|
+
disableMetadataLookup: z__default.ZodDefault<z__default.ZodOptional<z__default.ZodBoolean>>;
|
|
715
|
+
}, z__default.core.$strip>;
|
|
716
|
+
type ClientConfig = z__default.infer<typeof ClientConfigSchema>;
|
|
717
|
+
type ClientConfigInput = z__default.input<typeof ClientConfigSchema>;
|
|
1001
718
|
|
|
1002
719
|
/** Extract the actor registry from the registry definition. */
|
|
1003
720
|
type ExtractActorsFromRegistry<A extends Registry<any>> = A extends Registry<infer Actors> ? Actors : never;
|
|
@@ -1186,8 +903,8 @@ type Client<A extends Registry<any>> = ClientRaw & {
|
|
|
1186
903
|
type AnyClient = Client<Registry<any>>;
|
|
1187
904
|
declare function createClientWithDriver<A extends Registry<any>>(driver: ManagerDriver, config: ClientConfig): Client<A>;
|
|
1188
905
|
|
|
1189
|
-
declare const ActorId:
|
|
1190
|
-
type ActorId =
|
|
906
|
+
declare const ActorId: z$1.core.$ZodBranded<z$1.ZodString, "ActorId">;
|
|
907
|
+
type ActorId = z$1.infer<typeof ActorId>;
|
|
1191
908
|
declare enum ActorFeature {
|
|
1192
909
|
Logs = "logs",
|
|
1193
910
|
Config = "config",
|
|
@@ -1199,207 +916,207 @@ declare enum ActorFeature {
|
|
|
1199
916
|
EventsMonitoring = "events-monitoring",
|
|
1200
917
|
Database = "database"
|
|
1201
918
|
}
|
|
1202
|
-
declare const ActorSchema:
|
|
1203
|
-
id:
|
|
1204
|
-
name:
|
|
1205
|
-
key:
|
|
1206
|
-
tags:
|
|
1207
|
-
region:
|
|
1208
|
-
createdAt:
|
|
1209
|
-
startedAt:
|
|
1210
|
-
destroyedAt:
|
|
1211
|
-
features:
|
|
1212
|
-
},
|
|
1213
|
-
type Actor =
|
|
1214
|
-
declare const ActorLogEntry:
|
|
1215
|
-
level:
|
|
1216
|
-
message:
|
|
1217
|
-
timestamp:
|
|
1218
|
-
metadata:
|
|
1219
|
-
},
|
|
1220
|
-
type ActorLogEntry =
|
|
1221
|
-
declare const OperationSchema:
|
|
1222
|
-
op:
|
|
1223
|
-
path:
|
|
1224
|
-
},
|
|
1225
|
-
op:
|
|
1226
|
-
path:
|
|
1227
|
-
value:
|
|
1228
|
-
},
|
|
1229
|
-
op:
|
|
1230
|
-
path:
|
|
1231
|
-
value:
|
|
1232
|
-
},
|
|
1233
|
-
op:
|
|
1234
|
-
path:
|
|
1235
|
-
from:
|
|
1236
|
-
},
|
|
1237
|
-
op:
|
|
1238
|
-
path:
|
|
1239
|
-
from:
|
|
1240
|
-
},
|
|
1241
|
-
op:
|
|
1242
|
-
path:
|
|
1243
|
-
value:
|
|
1244
|
-
},
|
|
1245
|
-
type Operation =
|
|
1246
|
-
declare const PatchSchema:
|
|
1247
|
-
op:
|
|
1248
|
-
path:
|
|
1249
|
-
},
|
|
1250
|
-
op:
|
|
1251
|
-
path:
|
|
1252
|
-
value:
|
|
1253
|
-
},
|
|
1254
|
-
op:
|
|
1255
|
-
path:
|
|
1256
|
-
value:
|
|
1257
|
-
},
|
|
1258
|
-
op:
|
|
1259
|
-
path:
|
|
1260
|
-
from:
|
|
1261
|
-
},
|
|
1262
|
-
op:
|
|
1263
|
-
path:
|
|
1264
|
-
from:
|
|
1265
|
-
},
|
|
1266
|
-
op:
|
|
1267
|
-
path:
|
|
1268
|
-
value:
|
|
1269
|
-
},
|
|
1270
|
-
type Patch =
|
|
1271
|
-
declare const ConnectionSchema:
|
|
1272
|
-
params:
|
|
1273
|
-
id:
|
|
1274
|
-
stateEnabled:
|
|
1275
|
-
state:
|
|
1276
|
-
auth:
|
|
1277
|
-
},
|
|
1278
|
-
type Connection =
|
|
1279
|
-
declare const RealtimeEventSchema:
|
|
1280
|
-
type:
|
|
1281
|
-
name:
|
|
1282
|
-
args:
|
|
1283
|
-
connId:
|
|
1284
|
-
},
|
|
1285
|
-
type:
|
|
1286
|
-
eventName:
|
|
1287
|
-
args:
|
|
1288
|
-
},
|
|
1289
|
-
type:
|
|
1290
|
-
eventName:
|
|
1291
|
-
connId:
|
|
1292
|
-
},
|
|
1293
|
-
type:
|
|
1294
|
-
eventName:
|
|
1295
|
-
connId:
|
|
1296
|
-
},
|
|
1297
|
-
type:
|
|
1298
|
-
eventName:
|
|
1299
|
-
args:
|
|
1300
|
-
connId:
|
|
1301
|
-
},
|
|
1302
|
-
type RealtimeEvent =
|
|
1303
|
-
declare const RecordedRealtimeEventSchema:
|
|
1304
|
-
type:
|
|
1305
|
-
name:
|
|
1306
|
-
args:
|
|
1307
|
-
connId:
|
|
1308
|
-
},
|
|
1309
|
-
type:
|
|
1310
|
-
eventName:
|
|
1311
|
-
args:
|
|
1312
|
-
},
|
|
1313
|
-
type:
|
|
1314
|
-
eventName:
|
|
1315
|
-
connId:
|
|
1316
|
-
},
|
|
1317
|
-
type:
|
|
1318
|
-
eventName:
|
|
1319
|
-
connId:
|
|
1320
|
-
},
|
|
1321
|
-
type:
|
|
1322
|
-
eventName:
|
|
1323
|
-
args:
|
|
1324
|
-
connId:
|
|
1325
|
-
},
|
|
1326
|
-
id:
|
|
1327
|
-
timestamp:
|
|
1328
|
-
},
|
|
1329
|
-
type RecordedRealtimeEvent =
|
|
1330
|
-
declare const DatabaseQuerySchema:
|
|
1331
|
-
sql:
|
|
1332
|
-
args:
|
|
1333
|
-
},
|
|
1334
|
-
type DatabaseQuery =
|
|
1335
|
-
declare const TableSchema:
|
|
1336
|
-
schema:
|
|
1337
|
-
name:
|
|
1338
|
-
type:
|
|
919
|
+
declare const ActorSchema: z$1.ZodObject<{
|
|
920
|
+
id: z$1.core.$ZodBranded<z$1.ZodString, "ActorId">;
|
|
921
|
+
name: z$1.ZodString;
|
|
922
|
+
key: z$1.ZodArray<z$1.ZodString>;
|
|
923
|
+
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
924
|
+
region: z$1.ZodOptional<z$1.ZodString>;
|
|
925
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
926
|
+
startedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
927
|
+
destroyedAt: z$1.ZodOptional<z$1.ZodString>;
|
|
928
|
+
features: z$1.ZodOptional<z$1.ZodArray<z$1.ZodEnum<typeof ActorFeature>>>;
|
|
929
|
+
}, z$1.core.$strip>;
|
|
930
|
+
type Actor = z$1.infer<typeof ActorSchema>;
|
|
931
|
+
declare const ActorLogEntry: z$1.ZodObject<{
|
|
932
|
+
level: z$1.ZodString;
|
|
933
|
+
message: z$1.ZodString;
|
|
934
|
+
timestamp: z$1.ZodString;
|
|
935
|
+
metadata: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
|
|
936
|
+
}, z$1.core.$strip>;
|
|
937
|
+
type ActorLogEntry = z$1.infer<typeof ActorLogEntry>;
|
|
938
|
+
declare const OperationSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
939
|
+
op: z$1.ZodLiteral<"remove">;
|
|
940
|
+
path: z$1.ZodString;
|
|
941
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
942
|
+
op: z$1.ZodLiteral<"add">;
|
|
943
|
+
path: z$1.ZodString;
|
|
944
|
+
value: z$1.ZodUnknown;
|
|
945
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
946
|
+
op: z$1.ZodLiteral<"replace">;
|
|
947
|
+
path: z$1.ZodString;
|
|
948
|
+
value: z$1.ZodUnknown;
|
|
949
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
950
|
+
op: z$1.ZodLiteral<"move">;
|
|
951
|
+
path: z$1.ZodString;
|
|
952
|
+
from: z$1.ZodString;
|
|
953
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
954
|
+
op: z$1.ZodLiteral<"copy">;
|
|
955
|
+
path: z$1.ZodString;
|
|
956
|
+
from: z$1.ZodString;
|
|
957
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
958
|
+
op: z$1.ZodLiteral<"test">;
|
|
959
|
+
path: z$1.ZodString;
|
|
960
|
+
value: z$1.ZodUnknown;
|
|
961
|
+
}, z$1.core.$strip>], "op">;
|
|
962
|
+
type Operation = z$1.infer<typeof OperationSchema>;
|
|
963
|
+
declare const PatchSchema: z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
964
|
+
op: z$1.ZodLiteral<"remove">;
|
|
965
|
+
path: z$1.ZodString;
|
|
966
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
967
|
+
op: z$1.ZodLiteral<"add">;
|
|
968
|
+
path: z$1.ZodString;
|
|
969
|
+
value: z$1.ZodUnknown;
|
|
970
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
971
|
+
op: z$1.ZodLiteral<"replace">;
|
|
972
|
+
path: z$1.ZodString;
|
|
973
|
+
value: z$1.ZodUnknown;
|
|
974
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
975
|
+
op: z$1.ZodLiteral<"move">;
|
|
976
|
+
path: z$1.ZodString;
|
|
977
|
+
from: z$1.ZodString;
|
|
978
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
979
|
+
op: z$1.ZodLiteral<"copy">;
|
|
980
|
+
path: z$1.ZodString;
|
|
981
|
+
from: z$1.ZodString;
|
|
982
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
983
|
+
op: z$1.ZodLiteral<"test">;
|
|
984
|
+
path: z$1.ZodString;
|
|
985
|
+
value: z$1.ZodUnknown;
|
|
986
|
+
}, z$1.core.$strip>], "op">>;
|
|
987
|
+
type Patch = z$1.infer<typeof PatchSchema>;
|
|
988
|
+
declare const ConnectionSchema: z$1.ZodObject<{
|
|
989
|
+
params: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
|
|
990
|
+
id: z$1.ZodString;
|
|
991
|
+
stateEnabled: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
992
|
+
state: z$1.ZodOptional<z$1.ZodAny>;
|
|
993
|
+
auth: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
|
|
994
|
+
}, z$1.core.$strip>;
|
|
995
|
+
type Connection = z$1.infer<typeof ConnectionSchema>;
|
|
996
|
+
declare const RealtimeEventSchema: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
997
|
+
type: z$1.ZodLiteral<"action">;
|
|
998
|
+
name: z$1.ZodString;
|
|
999
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1000
|
+
connId: z$1.ZodString;
|
|
1001
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1002
|
+
type: z$1.ZodLiteral<"broadcast">;
|
|
1003
|
+
eventName: z$1.ZodString;
|
|
1004
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1005
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1006
|
+
type: z$1.ZodLiteral<"subscribe">;
|
|
1007
|
+
eventName: z$1.ZodString;
|
|
1008
|
+
connId: z$1.ZodString;
|
|
1009
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1010
|
+
type: z$1.ZodLiteral<"unsubscribe">;
|
|
1011
|
+
eventName: z$1.ZodString;
|
|
1012
|
+
connId: z$1.ZodString;
|
|
1013
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1014
|
+
type: z$1.ZodLiteral<"event">;
|
|
1015
|
+
eventName: z$1.ZodString;
|
|
1016
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1017
|
+
connId: z$1.ZodString;
|
|
1018
|
+
}, z$1.core.$strip>], "type">;
|
|
1019
|
+
type RealtimeEvent = z$1.infer<typeof RealtimeEventSchema>;
|
|
1020
|
+
declare const RecordedRealtimeEventSchema: z$1.ZodIntersection<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1021
|
+
type: z$1.ZodLiteral<"action">;
|
|
1022
|
+
name: z$1.ZodString;
|
|
1023
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1024
|
+
connId: z$1.ZodString;
|
|
1025
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1026
|
+
type: z$1.ZodLiteral<"broadcast">;
|
|
1027
|
+
eventName: z$1.ZodString;
|
|
1028
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1029
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1030
|
+
type: z$1.ZodLiteral<"subscribe">;
|
|
1031
|
+
eventName: z$1.ZodString;
|
|
1032
|
+
connId: z$1.ZodString;
|
|
1033
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1034
|
+
type: z$1.ZodLiteral<"unsubscribe">;
|
|
1035
|
+
eventName: z$1.ZodString;
|
|
1036
|
+
connId: z$1.ZodString;
|
|
1037
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1038
|
+
type: z$1.ZodLiteral<"event">;
|
|
1039
|
+
eventName: z$1.ZodString;
|
|
1040
|
+
args: z$1.ZodArray<z$1.ZodAny>;
|
|
1041
|
+
connId: z$1.ZodString;
|
|
1042
|
+
}, z$1.core.$strip>], "type">, z$1.ZodObject<{
|
|
1043
|
+
id: z$1.ZodString;
|
|
1044
|
+
timestamp: z$1.ZodNumber;
|
|
1045
|
+
}, z$1.core.$strip>>;
|
|
1046
|
+
type RecordedRealtimeEvent = z$1.infer<typeof RecordedRealtimeEventSchema>;
|
|
1047
|
+
declare const DatabaseQuerySchema: z$1.ZodObject<{
|
|
1048
|
+
sql: z$1.ZodString;
|
|
1049
|
+
args: z$1.ZodArray<z$1.ZodUnion<[z$1.ZodString, z$1.ZodNumber]>>;
|
|
1050
|
+
}, z$1.core.$strip>;
|
|
1051
|
+
type DatabaseQuery = z$1.infer<typeof DatabaseQuerySchema>;
|
|
1052
|
+
declare const TableSchema: z$1.ZodObject<{
|
|
1053
|
+
schema: z$1.ZodString;
|
|
1054
|
+
name: z$1.ZodString;
|
|
1055
|
+
type: z$1.ZodEnum<{
|
|
1339
1056
|
table: "table";
|
|
1340
1057
|
view: "view";
|
|
1341
1058
|
}>;
|
|
1342
|
-
},
|
|
1343
|
-
type Table =
|
|
1344
|
-
declare const TablesSchema:
|
|
1345
|
-
schema:
|
|
1346
|
-
name:
|
|
1347
|
-
type:
|
|
1059
|
+
}, z$1.core.$strip>;
|
|
1060
|
+
type Table = z$1.infer<typeof TableSchema>;
|
|
1061
|
+
declare const TablesSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1062
|
+
schema: z$1.ZodString;
|
|
1063
|
+
name: z$1.ZodString;
|
|
1064
|
+
type: z$1.ZodEnum<{
|
|
1348
1065
|
table: "table";
|
|
1349
1066
|
view: "view";
|
|
1350
1067
|
}>;
|
|
1351
|
-
},
|
|
1352
|
-
type Tables =
|
|
1353
|
-
declare const ColumnSchema:
|
|
1354
|
-
cid:
|
|
1355
|
-
name:
|
|
1356
|
-
type:
|
|
1357
|
-
notnull:
|
|
1358
|
-
dflt_value:
|
|
1359
|
-
pk:
|
|
1360
|
-
},
|
|
1361
|
-
type Column =
|
|
1362
|
-
declare const ColumnsSchema:
|
|
1363
|
-
cid:
|
|
1364
|
-
name:
|
|
1365
|
-
type:
|
|
1366
|
-
notnull:
|
|
1367
|
-
dflt_value:
|
|
1368
|
-
pk:
|
|
1369
|
-
},
|
|
1370
|
-
type Columns =
|
|
1371
|
-
declare const ForeignKeySchema:
|
|
1372
|
-
id:
|
|
1373
|
-
table:
|
|
1374
|
-
from:
|
|
1375
|
-
to:
|
|
1376
|
-
},
|
|
1377
|
-
type ForeignKey =
|
|
1378
|
-
declare const ForeignKeysSchema:
|
|
1379
|
-
id:
|
|
1380
|
-
table:
|
|
1381
|
-
from:
|
|
1382
|
-
to:
|
|
1383
|
-
},
|
|
1384
|
-
type ForeignKeys =
|
|
1385
|
-
declare const BuildSchema:
|
|
1386
|
-
name:
|
|
1387
|
-
createdAt:
|
|
1388
|
-
tags:
|
|
1389
|
-
},
|
|
1390
|
-
type Build =
|
|
1391
|
-
declare const BuildsSchema:
|
|
1392
|
-
name:
|
|
1393
|
-
createdAt:
|
|
1394
|
-
tags:
|
|
1395
|
-
},
|
|
1396
|
-
type Builds =
|
|
1397
|
-
declare const CreateActorSchema:
|
|
1398
|
-
name:
|
|
1399
|
-
key:
|
|
1400
|
-
input:
|
|
1401
|
-
},
|
|
1402
|
-
type CreateActor =
|
|
1068
|
+
}, z$1.core.$strip>>;
|
|
1069
|
+
type Tables = z$1.infer<typeof TablesSchema>;
|
|
1070
|
+
declare const ColumnSchema: z$1.ZodObject<{
|
|
1071
|
+
cid: z$1.ZodNumber;
|
|
1072
|
+
name: z$1.ZodString;
|
|
1073
|
+
type: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<"blob" | "integer" | "text" | "real" | "numeric" | "serial", string>>;
|
|
1074
|
+
notnull: z$1.ZodCoercedBoolean<unknown>;
|
|
1075
|
+
dflt_value: z$1.ZodNullable<z$1.ZodString>;
|
|
1076
|
+
pk: z$1.ZodNullable<z$1.ZodCoercedBoolean<unknown>>;
|
|
1077
|
+
}, z$1.core.$strip>;
|
|
1078
|
+
type Column = z$1.infer<typeof ColumnSchema>;
|
|
1079
|
+
declare const ColumnsSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1080
|
+
cid: z$1.ZodNumber;
|
|
1081
|
+
name: z$1.ZodString;
|
|
1082
|
+
type: z$1.ZodPipe<z$1.ZodString, z$1.ZodTransform<"blob" | "integer" | "text" | "real" | "numeric" | "serial", string>>;
|
|
1083
|
+
notnull: z$1.ZodCoercedBoolean<unknown>;
|
|
1084
|
+
dflt_value: z$1.ZodNullable<z$1.ZodString>;
|
|
1085
|
+
pk: z$1.ZodNullable<z$1.ZodCoercedBoolean<unknown>>;
|
|
1086
|
+
}, z$1.core.$strip>>;
|
|
1087
|
+
type Columns = z$1.infer<typeof ColumnsSchema>;
|
|
1088
|
+
declare const ForeignKeySchema: z$1.ZodObject<{
|
|
1089
|
+
id: z$1.ZodNumber;
|
|
1090
|
+
table: z$1.ZodString;
|
|
1091
|
+
from: z$1.ZodString;
|
|
1092
|
+
to: z$1.ZodString;
|
|
1093
|
+
}, z$1.core.$strip>;
|
|
1094
|
+
type ForeignKey = z$1.infer<typeof ForeignKeySchema>;
|
|
1095
|
+
declare const ForeignKeysSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1096
|
+
id: z$1.ZodNumber;
|
|
1097
|
+
table: z$1.ZodString;
|
|
1098
|
+
from: z$1.ZodString;
|
|
1099
|
+
to: z$1.ZodString;
|
|
1100
|
+
}, z$1.core.$strip>>;
|
|
1101
|
+
type ForeignKeys = z$1.infer<typeof ForeignKeysSchema>;
|
|
1102
|
+
declare const BuildSchema: z$1.ZodObject<{
|
|
1103
|
+
name: z$1.ZodString;
|
|
1104
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
1105
|
+
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1106
|
+
}, z$1.core.$strip>;
|
|
1107
|
+
type Build = z$1.infer<typeof BuildSchema>;
|
|
1108
|
+
declare const BuildsSchema: z$1.ZodArray<z$1.ZodObject<{
|
|
1109
|
+
name: z$1.ZodString;
|
|
1110
|
+
createdAt: z$1.ZodOptional<z$1.ZodString>;
|
|
1111
|
+
tags: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodString>>;
|
|
1112
|
+
}, z$1.core.$strip>>;
|
|
1113
|
+
type Builds = z$1.infer<typeof BuildsSchema>;
|
|
1114
|
+
declare const CreateActorSchema: z$1.ZodObject<{
|
|
1115
|
+
name: z$1.ZodString;
|
|
1116
|
+
key: z$1.ZodArray<z$1.ZodString>;
|
|
1117
|
+
input: z$1.ZodAny;
|
|
1118
|
+
}, z$1.core.$strip>;
|
|
1119
|
+
type CreateActor = z$1.infer<typeof CreateActorSchema>;
|
|
1403
1120
|
|
|
1404
1121
|
interface ActorInspectorAccessors {
|
|
1405
1122
|
isStateEnabled: () => Promise<boolean>;
|
|
@@ -1957,27 +1674,27 @@ interface ActorTypes<TState, TConnParams, TConnState, TVars, TInput, TDatabase e
|
|
|
1957
1674
|
input?: TInput;
|
|
1958
1675
|
database?: TDatabase;
|
|
1959
1676
|
}
|
|
1960
|
-
declare const ActorConfigSchema: z.
|
|
1961
|
-
onCreate: z.ZodOptional<z.
|
|
1962
|
-
onDestroy: z.ZodOptional<z.
|
|
1963
|
-
onWake: z.ZodOptional<z.
|
|
1964
|
-
onSleep: z.ZodOptional<z.
|
|
1965
|
-
onStateChange: z.ZodOptional<z.
|
|
1966
|
-
onBeforeConnect: z.ZodOptional<z.
|
|
1967
|
-
onConnect: z.ZodOptional<z.
|
|
1968
|
-
onDisconnect: z.ZodOptional<z.
|
|
1969
|
-
onBeforeActionResponse: z.ZodOptional<z.
|
|
1970
|
-
onRequest: z.ZodOptional<z.
|
|
1971
|
-
onWebSocket: z.ZodOptional<z.
|
|
1972
|
-
actions: z.ZodDefault<z.ZodRecord<z.ZodString, z.
|
|
1677
|
+
declare const ActorConfigSchema: z.ZodObject<{
|
|
1678
|
+
onCreate: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1679
|
+
onDestroy: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1680
|
+
onWake: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1681
|
+
onSleep: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1682
|
+
onStateChange: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1683
|
+
onBeforeConnect: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1684
|
+
onConnect: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1685
|
+
onDisconnect: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1686
|
+
onBeforeActionResponse: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1687
|
+
onRequest: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1688
|
+
onWebSocket: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1689
|
+
actions: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>>;
|
|
1973
1690
|
state: z.ZodOptional<z.ZodAny>;
|
|
1974
|
-
createState: z.ZodOptional<z.
|
|
1691
|
+
createState: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1975
1692
|
connState: z.ZodOptional<z.ZodAny>;
|
|
1976
|
-
createConnState: z.ZodOptional<z.
|
|
1693
|
+
createConnState: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1977
1694
|
vars: z.ZodOptional<z.ZodAny>;
|
|
1978
1695
|
db: z.ZodOptional<z.ZodAny>;
|
|
1979
|
-
createVars: z.ZodOptional<z.
|
|
1980
|
-
options: z.
|
|
1696
|
+
createVars: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
|
|
1697
|
+
options: z.ZodPrefault<z.ZodObject<{
|
|
1981
1698
|
createVarsTimeout: z.ZodDefault<z.ZodNumber>;
|
|
1982
1699
|
createConnStateTimeout: z.ZodDefault<z.ZodNumber>;
|
|
1983
1700
|
onConnectTimeout: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1990,324 +1707,9 @@ declare const ActorConfigSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObj
|
|
|
1990
1707
|
connectionLivenessInterval: z.ZodDefault<z.ZodNumber>;
|
|
1991
1708
|
noSleep: z.ZodDefault<z.ZodBoolean>;
|
|
1992
1709
|
sleepTimeout: z.ZodDefault<z.ZodNumber>;
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
* WebSockets using actions/events are hibernatable by default.
|
|
1997
|
-
*
|
|
1998
|
-
* @experimental
|
|
1999
|
-
**/
|
|
2000
|
-
canHibernateWebSocket: z.ZodDefault<z.ZodUnion<[z.ZodBoolean, z.ZodFunction<z.ZodTuple<[z.ZodType<Request, z.ZodTypeDef, Request>], z.ZodUnknown>, z.ZodBoolean>]>>;
|
|
2001
|
-
}, "strict", z.ZodTypeAny, {
|
|
2002
|
-
createVarsTimeout: number;
|
|
2003
|
-
createConnStateTimeout: number;
|
|
2004
|
-
onConnectTimeout: number;
|
|
2005
|
-
onSleepTimeout: number;
|
|
2006
|
-
onDestroyTimeout: number;
|
|
2007
|
-
stateSaveInterval: number;
|
|
2008
|
-
actionTimeout: number;
|
|
2009
|
-
waitUntilTimeout: number;
|
|
2010
|
-
connectionLivenessTimeout: number;
|
|
2011
|
-
connectionLivenessInterval: number;
|
|
2012
|
-
noSleep: boolean;
|
|
2013
|
-
sleepTimeout: number;
|
|
2014
|
-
canHibernateWebSocket: boolean | ((args_0: Request, ...args: unknown[]) => boolean);
|
|
2015
|
-
}, {
|
|
2016
|
-
createVarsTimeout?: number | undefined;
|
|
2017
|
-
createConnStateTimeout?: number | undefined;
|
|
2018
|
-
onConnectTimeout?: number | undefined;
|
|
2019
|
-
onSleepTimeout?: number | undefined;
|
|
2020
|
-
onDestroyTimeout?: number | undefined;
|
|
2021
|
-
stateSaveInterval?: number | undefined;
|
|
2022
|
-
actionTimeout?: number | undefined;
|
|
2023
|
-
waitUntilTimeout?: number | undefined;
|
|
2024
|
-
connectionLivenessTimeout?: number | undefined;
|
|
2025
|
-
connectionLivenessInterval?: number | undefined;
|
|
2026
|
-
noSleep?: boolean | undefined;
|
|
2027
|
-
sleepTimeout?: number | undefined;
|
|
2028
|
-
canHibernateWebSocket?: boolean | ((args_0: Request, ...args: unknown[]) => boolean) | undefined;
|
|
2029
|
-
}>>;
|
|
2030
|
-
}, "strict", z.ZodTypeAny, {
|
|
2031
|
-
options: {
|
|
2032
|
-
createVarsTimeout: number;
|
|
2033
|
-
createConnStateTimeout: number;
|
|
2034
|
-
onConnectTimeout: number;
|
|
2035
|
-
onSleepTimeout: number;
|
|
2036
|
-
onDestroyTimeout: number;
|
|
2037
|
-
stateSaveInterval: number;
|
|
2038
|
-
actionTimeout: number;
|
|
2039
|
-
waitUntilTimeout: number;
|
|
2040
|
-
connectionLivenessTimeout: number;
|
|
2041
|
-
connectionLivenessInterval: number;
|
|
2042
|
-
noSleep: boolean;
|
|
2043
|
-
sleepTimeout: number;
|
|
2044
|
-
canHibernateWebSocket: boolean | ((args_0: Request, ...args: unknown[]) => boolean);
|
|
2045
|
-
};
|
|
2046
|
-
actions: Record<string, (...args: unknown[]) => unknown>;
|
|
2047
|
-
state?: any;
|
|
2048
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2049
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2050
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2051
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2052
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2053
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2054
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2055
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2056
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2057
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2058
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2059
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2060
|
-
connState?: any;
|
|
2061
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2062
|
-
vars?: any;
|
|
2063
|
-
db?: any;
|
|
2064
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2065
|
-
}, {
|
|
2066
|
-
options?: {
|
|
2067
|
-
createVarsTimeout?: number | undefined;
|
|
2068
|
-
createConnStateTimeout?: number | undefined;
|
|
2069
|
-
onConnectTimeout?: number | undefined;
|
|
2070
|
-
onSleepTimeout?: number | undefined;
|
|
2071
|
-
onDestroyTimeout?: number | undefined;
|
|
2072
|
-
stateSaveInterval?: number | undefined;
|
|
2073
|
-
actionTimeout?: number | undefined;
|
|
2074
|
-
waitUntilTimeout?: number | undefined;
|
|
2075
|
-
connectionLivenessTimeout?: number | undefined;
|
|
2076
|
-
connectionLivenessInterval?: number | undefined;
|
|
2077
|
-
noSleep?: boolean | undefined;
|
|
2078
|
-
sleepTimeout?: number | undefined;
|
|
2079
|
-
canHibernateWebSocket?: boolean | ((args_0: Request, ...args: unknown[]) => boolean) | undefined;
|
|
2080
|
-
} | undefined;
|
|
2081
|
-
state?: any;
|
|
2082
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2083
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2084
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2085
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2086
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2087
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2088
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2089
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2090
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2091
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2092
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2093
|
-
actions?: Record<string, (...args: unknown[]) => unknown> | undefined;
|
|
2094
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2095
|
-
connState?: any;
|
|
2096
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2097
|
-
vars?: any;
|
|
2098
|
-
db?: any;
|
|
2099
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2100
|
-
}>, {
|
|
2101
|
-
options: {
|
|
2102
|
-
createVarsTimeout: number;
|
|
2103
|
-
createConnStateTimeout: number;
|
|
2104
|
-
onConnectTimeout: number;
|
|
2105
|
-
onSleepTimeout: number;
|
|
2106
|
-
onDestroyTimeout: number;
|
|
2107
|
-
stateSaveInterval: number;
|
|
2108
|
-
actionTimeout: number;
|
|
2109
|
-
waitUntilTimeout: number;
|
|
2110
|
-
connectionLivenessTimeout: number;
|
|
2111
|
-
connectionLivenessInterval: number;
|
|
2112
|
-
noSleep: boolean;
|
|
2113
|
-
sleepTimeout: number;
|
|
2114
|
-
canHibernateWebSocket: boolean | ((args_0: Request, ...args: unknown[]) => boolean);
|
|
2115
|
-
};
|
|
2116
|
-
actions: Record<string, (...args: unknown[]) => unknown>;
|
|
2117
|
-
state?: any;
|
|
2118
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2119
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2120
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2121
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2122
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2123
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2124
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2125
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2126
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2127
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2128
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2129
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2130
|
-
connState?: any;
|
|
2131
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2132
|
-
vars?: any;
|
|
2133
|
-
db?: any;
|
|
2134
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2135
|
-
}, {
|
|
2136
|
-
options?: {
|
|
2137
|
-
createVarsTimeout?: number | undefined;
|
|
2138
|
-
createConnStateTimeout?: number | undefined;
|
|
2139
|
-
onConnectTimeout?: number | undefined;
|
|
2140
|
-
onSleepTimeout?: number | undefined;
|
|
2141
|
-
onDestroyTimeout?: number | undefined;
|
|
2142
|
-
stateSaveInterval?: number | undefined;
|
|
2143
|
-
actionTimeout?: number | undefined;
|
|
2144
|
-
waitUntilTimeout?: number | undefined;
|
|
2145
|
-
connectionLivenessTimeout?: number | undefined;
|
|
2146
|
-
connectionLivenessInterval?: number | undefined;
|
|
2147
|
-
noSleep?: boolean | undefined;
|
|
2148
|
-
sleepTimeout?: number | undefined;
|
|
2149
|
-
canHibernateWebSocket?: boolean | ((args_0: Request, ...args: unknown[]) => boolean) | undefined;
|
|
2150
|
-
} | undefined;
|
|
2151
|
-
state?: any;
|
|
2152
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2153
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2154
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2155
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2156
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2157
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2158
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2159
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2160
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2161
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2162
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2163
|
-
actions?: Record<string, (...args: unknown[]) => unknown> | undefined;
|
|
2164
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2165
|
-
connState?: any;
|
|
2166
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2167
|
-
vars?: any;
|
|
2168
|
-
db?: any;
|
|
2169
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2170
|
-
}>, {
|
|
2171
|
-
options: {
|
|
2172
|
-
createVarsTimeout: number;
|
|
2173
|
-
createConnStateTimeout: number;
|
|
2174
|
-
onConnectTimeout: number;
|
|
2175
|
-
onSleepTimeout: number;
|
|
2176
|
-
onDestroyTimeout: number;
|
|
2177
|
-
stateSaveInterval: number;
|
|
2178
|
-
actionTimeout: number;
|
|
2179
|
-
waitUntilTimeout: number;
|
|
2180
|
-
connectionLivenessTimeout: number;
|
|
2181
|
-
connectionLivenessInterval: number;
|
|
2182
|
-
noSleep: boolean;
|
|
2183
|
-
sleepTimeout: number;
|
|
2184
|
-
canHibernateWebSocket: boolean | ((args_0: Request, ...args: unknown[]) => boolean);
|
|
2185
|
-
};
|
|
2186
|
-
actions: Record<string, (...args: unknown[]) => unknown>;
|
|
2187
|
-
state?: any;
|
|
2188
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2189
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2190
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2191
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2192
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2193
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2194
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2195
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2196
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2197
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2198
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2199
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2200
|
-
connState?: any;
|
|
2201
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2202
|
-
vars?: any;
|
|
2203
|
-
db?: any;
|
|
2204
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2205
|
-
}, {
|
|
2206
|
-
options?: {
|
|
2207
|
-
createVarsTimeout?: number | undefined;
|
|
2208
|
-
createConnStateTimeout?: number | undefined;
|
|
2209
|
-
onConnectTimeout?: number | undefined;
|
|
2210
|
-
onSleepTimeout?: number | undefined;
|
|
2211
|
-
onDestroyTimeout?: number | undefined;
|
|
2212
|
-
stateSaveInterval?: number | undefined;
|
|
2213
|
-
actionTimeout?: number | undefined;
|
|
2214
|
-
waitUntilTimeout?: number | undefined;
|
|
2215
|
-
connectionLivenessTimeout?: number | undefined;
|
|
2216
|
-
connectionLivenessInterval?: number | undefined;
|
|
2217
|
-
noSleep?: boolean | undefined;
|
|
2218
|
-
sleepTimeout?: number | undefined;
|
|
2219
|
-
canHibernateWebSocket?: boolean | ((args_0: Request, ...args: unknown[]) => boolean) | undefined;
|
|
2220
|
-
} | undefined;
|
|
2221
|
-
state?: any;
|
|
2222
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2223
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2224
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2225
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2226
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2227
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2228
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2229
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2230
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2231
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2232
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2233
|
-
actions?: Record<string, (...args: unknown[]) => unknown> | undefined;
|
|
2234
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2235
|
-
connState?: any;
|
|
2236
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2237
|
-
vars?: any;
|
|
2238
|
-
db?: any;
|
|
2239
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2240
|
-
}>, {
|
|
2241
|
-
options: {
|
|
2242
|
-
createVarsTimeout: number;
|
|
2243
|
-
createConnStateTimeout: number;
|
|
2244
|
-
onConnectTimeout: number;
|
|
2245
|
-
onSleepTimeout: number;
|
|
2246
|
-
onDestroyTimeout: number;
|
|
2247
|
-
stateSaveInterval: number;
|
|
2248
|
-
actionTimeout: number;
|
|
2249
|
-
waitUntilTimeout: number;
|
|
2250
|
-
connectionLivenessTimeout: number;
|
|
2251
|
-
connectionLivenessInterval: number;
|
|
2252
|
-
noSleep: boolean;
|
|
2253
|
-
sleepTimeout: number;
|
|
2254
|
-
canHibernateWebSocket: boolean | ((args_0: Request, ...args: unknown[]) => boolean);
|
|
2255
|
-
};
|
|
2256
|
-
actions: Record<string, (...args: unknown[]) => unknown>;
|
|
2257
|
-
state?: any;
|
|
2258
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2259
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2260
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2261
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2262
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2263
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2264
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2265
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2266
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2267
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2268
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2269
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2270
|
-
connState?: any;
|
|
2271
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2272
|
-
vars?: any;
|
|
2273
|
-
db?: any;
|
|
2274
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2275
|
-
}, {
|
|
2276
|
-
options?: {
|
|
2277
|
-
createVarsTimeout?: number | undefined;
|
|
2278
|
-
createConnStateTimeout?: number | undefined;
|
|
2279
|
-
onConnectTimeout?: number | undefined;
|
|
2280
|
-
onSleepTimeout?: number | undefined;
|
|
2281
|
-
onDestroyTimeout?: number | undefined;
|
|
2282
|
-
stateSaveInterval?: number | undefined;
|
|
2283
|
-
actionTimeout?: number | undefined;
|
|
2284
|
-
waitUntilTimeout?: number | undefined;
|
|
2285
|
-
connectionLivenessTimeout?: number | undefined;
|
|
2286
|
-
connectionLivenessInterval?: number | undefined;
|
|
2287
|
-
noSleep?: boolean | undefined;
|
|
2288
|
-
sleepTimeout?: number | undefined;
|
|
2289
|
-
canHibernateWebSocket?: boolean | ((args_0: Request, ...args: unknown[]) => boolean) | undefined;
|
|
2290
|
-
} | undefined;
|
|
2291
|
-
state?: any;
|
|
2292
|
-
onCreate?: ((...args: unknown[]) => unknown) | undefined;
|
|
2293
|
-
onDestroy?: ((...args: unknown[]) => unknown) | undefined;
|
|
2294
|
-
onWake?: ((...args: unknown[]) => unknown) | undefined;
|
|
2295
|
-
onSleep?: ((...args: unknown[]) => unknown) | undefined;
|
|
2296
|
-
onStateChange?: ((...args: unknown[]) => unknown) | undefined;
|
|
2297
|
-
onBeforeConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2298
|
-
onConnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2299
|
-
onDisconnect?: ((...args: unknown[]) => unknown) | undefined;
|
|
2300
|
-
onBeforeActionResponse?: ((...args: unknown[]) => unknown) | undefined;
|
|
2301
|
-
onRequest?: ((...args: unknown[]) => unknown) | undefined;
|
|
2302
|
-
onWebSocket?: ((...args: unknown[]) => unknown) | undefined;
|
|
2303
|
-
actions?: Record<string, (...args: unknown[]) => unknown> | undefined;
|
|
2304
|
-
createState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2305
|
-
connState?: any;
|
|
2306
|
-
createConnState?: ((...args: unknown[]) => unknown) | undefined;
|
|
2307
|
-
vars?: any;
|
|
2308
|
-
db?: any;
|
|
2309
|
-
createVars?: ((...args: unknown[]) => unknown) | undefined;
|
|
2310
|
-
}>;
|
|
1710
|
+
canHibernateWebSocket: z.ZodDefault<z.ZodUnion<readonly [z.ZodBoolean, z.ZodCustom<(request: Request) => boolean, (request: Request) => boolean>]>>;
|
|
1711
|
+
}, z.core.$strict>>;
|
|
1712
|
+
}, z.core.$strict>;
|
|
2311
1713
|
type CreateState<TState, TConnParams, TConnState, TVars, TInput, TDatabase> = {
|
|
2312
1714
|
state: TState;
|
|
2313
1715
|
} | {
|