@rivetkit/rivetkit-napi 0.0.0-main.17e6a1a → 0.0.0-main.337772d
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/index.d.ts +22 -2
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export interface JsActorConfig {
|
|
|
51
51
|
name?: string
|
|
52
52
|
icon?: string
|
|
53
53
|
hasDatabase?: boolean
|
|
54
|
+
remoteSqlite?: boolean
|
|
54
55
|
hasState?: boolean
|
|
55
56
|
canHibernateWebsocket?: boolean
|
|
56
57
|
stateSaveIntervalMs?: number
|
|
@@ -92,6 +93,12 @@ export interface QueryResult {
|
|
|
92
93
|
columns: Array<string>
|
|
93
94
|
rows: Array<Array<any>>
|
|
94
95
|
}
|
|
96
|
+
export interface NativeExecuteResult {
|
|
97
|
+
columns: Array<string>
|
|
98
|
+
rows: Array<Array<any>>
|
|
99
|
+
changes: number
|
|
100
|
+
lastInsertRowId?: number
|
|
101
|
+
}
|
|
95
102
|
export interface JsSqliteVfsMetrics {
|
|
96
103
|
requestBuildNs: number
|
|
97
104
|
serializeNs: number
|
|
@@ -99,6 +106,11 @@ export interface JsSqliteVfsMetrics {
|
|
|
99
106
|
stateUpdateNs: number
|
|
100
107
|
totalNs: number
|
|
101
108
|
commitCount: number
|
|
109
|
+
pageCacheEntries: number
|
|
110
|
+
pageCacheWeightedSize: number
|
|
111
|
+
pageCacheCapacityPages: number
|
|
112
|
+
writeBufferDirtyPages: number
|
|
113
|
+
dbSizePages: number
|
|
102
114
|
}
|
|
103
115
|
export interface JsQueueNextOptions {
|
|
104
116
|
names?: Array<string>
|
|
@@ -162,6 +174,10 @@ export interface JsServerlessResponseHead {
|
|
|
162
174
|
status: number
|
|
163
175
|
headers: Record<string, string>
|
|
164
176
|
}
|
|
177
|
+
export interface JsRegistryDiagnostics {
|
|
178
|
+
mode: string
|
|
179
|
+
envoyActiveActorCount?: number
|
|
180
|
+
}
|
|
165
181
|
export interface JsServerlessStreamError {
|
|
166
182
|
group: string
|
|
167
183
|
code: string
|
|
@@ -212,6 +228,9 @@ export declare class ActorContext {
|
|
|
212
228
|
aborted(): boolean
|
|
213
229
|
runHandlerActive(): boolean
|
|
214
230
|
restartRunHandler(): void
|
|
231
|
+
beginKeepAwake(): number
|
|
232
|
+
endKeepAwake(regionId: number): void
|
|
233
|
+
keepAwake(promise: Promise<any>): void
|
|
215
234
|
beginWebsocketCallback(): number
|
|
216
235
|
endWebsocketCallback(regionId: number): void
|
|
217
236
|
abortSignal(): AbortSignal
|
|
@@ -221,7 +240,6 @@ export declare class ActorContext {
|
|
|
221
240
|
disconnectConns(predicate: (...args: any[]) => any): Promise<void>
|
|
222
241
|
broadcast(name: string, args: Buffer): void
|
|
223
242
|
waitUntil(promise: Promise<any>): void
|
|
224
|
-
keepAwake(promise: Promise<any>): Promise<any>
|
|
225
243
|
registerTask(promise: Promise<any>): void
|
|
226
244
|
runtimeState(): object
|
|
227
245
|
clearRuntimeState(): void
|
|
@@ -246,9 +264,10 @@ export declare class ConnHandle {
|
|
|
246
264
|
}
|
|
247
265
|
export declare class JsNativeDatabase {
|
|
248
266
|
takeLastKvError(): string | null
|
|
249
|
-
|
|
267
|
+
metrics(): JsSqliteVfsMetrics | null
|
|
250
268
|
run(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<ExecuteResult>
|
|
251
269
|
query(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<QueryResult>
|
|
270
|
+
execute(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<NativeExecuteResult>
|
|
252
271
|
exec(sql: string): Promise<QueryResult>
|
|
253
272
|
close(): Promise<void>
|
|
254
273
|
}
|
|
@@ -295,6 +314,7 @@ export declare class CoreRegistry {
|
|
|
295
314
|
* separately to avoid re-entrancy.
|
|
296
315
|
*/
|
|
297
316
|
shutdown(): Promise<void>
|
|
317
|
+
diagnostics(): Promise<JsRegistryDiagnostics>
|
|
298
318
|
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
299
319
|
}
|
|
300
320
|
export declare class Schedule {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "0.0.0-main.
|
|
3
|
+
"version": "0.0.0-main.337772d",
|
|
4
4
|
"description": "Native N-API addon for RivetKit providing envoy client and SQLite access",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "index.js",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@napi-rs/cli": "^2.18.4",
|
|
46
|
-
"@rivetkit/engine-envoy-protocol": "0.0.0-main.
|
|
46
|
+
"@rivetkit/engine-envoy-protocol": "0.0.0-main.337772d"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-main.
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-main.
|
|
51
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-main.
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-main.
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-main.
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-main.
|
|
55
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-main.
|
|
49
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-main.337772d",
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-main.337772d",
|
|
51
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-main.337772d",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-main.337772d",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-main.337772d",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-main.337772d",
|
|
55
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-main.337772d"
|
|
56
56
|
}
|
|
57
57
|
}
|