@rivetkit/rivetkit-napi 2.3.9 → 2.3.10
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 +6 -26
- package/index.js +1 -3
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ export interface JsInspectorSnapshot {
|
|
|
44
44
|
export interface JsActorRuntimeSocketEndpointInfo {
|
|
45
45
|
path: string
|
|
46
46
|
}
|
|
47
|
+
export interface JsHttpResponse {
|
|
48
|
+
status?: number
|
|
49
|
+
headers?: Record<string, string>
|
|
50
|
+
body?: Buffer
|
|
51
|
+
}
|
|
47
52
|
export interface JsQueueSendResult {
|
|
48
53
|
status: string
|
|
49
54
|
response?: Buffer
|
|
@@ -141,12 +146,6 @@ export interface JsSqliteVfsMetrics {
|
|
|
141
146
|
writeBufferDirtyPages: number
|
|
142
147
|
dbSizePages: number
|
|
143
148
|
}
|
|
144
|
-
export interface JsHttpResponse {
|
|
145
|
-
status?: number
|
|
146
|
-
headers?: Record<string, string>
|
|
147
|
-
body?: Buffer
|
|
148
|
-
stream?: boolean
|
|
149
|
-
}
|
|
150
149
|
export interface JsQueueNextOptions {
|
|
151
150
|
names?: Array<string>
|
|
152
151
|
timeoutMs?: number
|
|
@@ -221,12 +220,6 @@ export interface JsServerlessResponseHead {
|
|
|
221
220
|
status: number
|
|
222
221
|
headers: Record<string, string>
|
|
223
222
|
}
|
|
224
|
-
export interface JsApplicationResponse {
|
|
225
|
-
status: number
|
|
226
|
-
headers: Record<string, string>
|
|
227
|
-
body?: Buffer
|
|
228
|
-
stream?: boolean
|
|
229
|
-
}
|
|
230
223
|
export interface JsRegistryRouteResponse {
|
|
231
224
|
status: number
|
|
232
225
|
headers: Record<string, string>
|
|
@@ -368,18 +361,6 @@ export declare class JsSqliteTransaction {
|
|
|
368
361
|
commit(): Promise<void>
|
|
369
362
|
rollback(): Promise<void>
|
|
370
363
|
}
|
|
371
|
-
/** JavaScript-facing writer for a streaming actor HTTP response. */
|
|
372
|
-
export declare class HttpResponseBodyStream {
|
|
373
|
-
cancelled(): Promise<void>
|
|
374
|
-
write(chunk: Buffer): Promise<void>
|
|
375
|
-
end(): Promise<void>
|
|
376
|
-
error(message: string): Promise<void>
|
|
377
|
-
}
|
|
378
|
-
/** JavaScript-facing reader for a streaming actor HTTP request. */
|
|
379
|
-
export declare class HttpRequestBodyStream {
|
|
380
|
-
read(): Promise<Buffer | null>
|
|
381
|
-
cancel(): Promise<void>
|
|
382
|
-
}
|
|
383
364
|
export declare class Kv {
|
|
384
365
|
get(key: Buffer): Promise<Buffer | null>
|
|
385
366
|
put(key: Buffer, value: Buffer): Promise<void>
|
|
@@ -435,8 +416,7 @@ export declare class CoreRegistry {
|
|
|
435
416
|
health(): Promise<JsRegistryRouteResponse>
|
|
436
417
|
metadata(): JsRegistryRouteResponse
|
|
437
418
|
metrics(): JsRegistryRouteResponse
|
|
438
|
-
|
|
439
|
-
serveListener(listener: JsListenerConfig, config: JsServeConfig, application?: (...args: any[]) => any | undefined | null): Promise<void>
|
|
419
|
+
serveListener(listener: JsListenerConfig, config: JsServeConfig): Promise<void>
|
|
440
420
|
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
441
421
|
}
|
|
442
422
|
export declare class Schedule {
|
package/index.js
CHANGED
|
@@ -310,7 +310,7 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { ActorContext, decodeInspectorRequest, encodeInspectorResponse, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, JsSqliteTransaction,
|
|
313
|
+
const { ActorContext, decodeInspectorRequest, encodeInspectorResponse, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, JsSqliteTransaction, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.ActorContext = ActorContext
|
|
316
316
|
module.exports.decodeInspectorRequest = decodeInspectorRequest
|
|
@@ -320,8 +320,6 @@ module.exports.CancellationToken = CancellationToken
|
|
|
320
320
|
module.exports.ConnHandle = ConnHandle
|
|
321
321
|
module.exports.JsNativeDatabase = JsNativeDatabase
|
|
322
322
|
module.exports.JsSqliteTransaction = JsSqliteTransaction
|
|
323
|
-
module.exports.HttpResponseBodyStream = HttpResponseBodyStream
|
|
324
|
-
module.exports.HttpRequestBodyStream = HttpRequestBodyStream
|
|
325
323
|
module.exports.Kv = Kv
|
|
326
324
|
module.exports.Queue = Queue
|
|
327
325
|
module.exports.QueueMessage = QueueMessage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
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",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@napi-rs/cli": "^2.18.4",
|
|
47
|
-
"@rivetkit/engine-envoy-protocol": "2.3.
|
|
47
|
+
"@rivetkit/engine-envoy-protocol": "2.3.10"
|
|
48
48
|
},
|
|
49
49
|
"optionalDependencies": {
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.
|
|
51
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.
|
|
55
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.
|
|
56
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.10",
|
|
51
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.10",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.10",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.10",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.10",
|
|
55
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.10",
|
|
56
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.10"
|
|
57
57
|
}
|
|
58
58
|
}
|