@rivetkit/rivetkit-napi 0.0.0-pr.4702.d108c6a → 0.0.0-pr.4711.7747b75
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 +24 -5
- package/index.js +1 -5
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -73,10 +73,6 @@ export interface JsActorConfig {
|
|
|
73
73
|
preloadMaxWorkflowBytes?: number
|
|
74
74
|
preloadMaxConnectionsBytes?: number
|
|
75
75
|
}
|
|
76
|
-
export declare function pollCancelToken(id: bigint): boolean
|
|
77
|
-
export declare function registerNativeCancelToken(): bigint
|
|
78
|
-
export declare function cancelNativeCancelToken(id: bigint): void
|
|
79
|
-
export declare function dropNativeCancelToken(id: bigint): void
|
|
80
76
|
export interface JsBindParam {
|
|
81
77
|
kind: string
|
|
82
78
|
intValue?: number
|
|
@@ -134,6 +130,28 @@ export interface JsServeConfig {
|
|
|
134
130
|
poolName: string
|
|
135
131
|
engineBinaryPath?: string
|
|
136
132
|
handleInspectorHttpInRuntime?: boolean
|
|
133
|
+
serverlessBasePath?: string
|
|
134
|
+
serverlessPackageVersion: string
|
|
135
|
+
serverlessClientEndpoint?: string
|
|
136
|
+
serverlessClientNamespace?: string
|
|
137
|
+
serverlessClientToken?: string
|
|
138
|
+
serverlessValidateEndpoint: boolean
|
|
139
|
+
serverlessMaxStartPayloadBytes: number
|
|
140
|
+
}
|
|
141
|
+
export interface JsServerlessRequest {
|
|
142
|
+
method: string
|
|
143
|
+
url: string
|
|
144
|
+
headers: Record<string, string>
|
|
145
|
+
body: Buffer
|
|
146
|
+
}
|
|
147
|
+
export interface JsServerlessResponseHead {
|
|
148
|
+
status: number
|
|
149
|
+
headers: Record<string, string>
|
|
150
|
+
}
|
|
151
|
+
export interface JsServerlessStreamError {
|
|
152
|
+
group: string
|
|
153
|
+
code: string
|
|
154
|
+
message: string
|
|
137
155
|
}
|
|
138
156
|
/** Options for KV list operations. */
|
|
139
157
|
export interface JsKvListOptions {
|
|
@@ -236,7 +254,7 @@ export declare class Queue {
|
|
|
236
254
|
send(name: string, body: Buffer): Promise<QueueMessage>
|
|
237
255
|
next(options?: JsQueueNextOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage | null>
|
|
238
256
|
nextBatch(options?: JsQueueNextBatchOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Array<QueueMessage>>
|
|
239
|
-
waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null,
|
|
257
|
+
waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage>
|
|
240
258
|
waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null): Promise<void>
|
|
241
259
|
enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
|
|
242
260
|
tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
|
|
@@ -254,6 +272,7 @@ export declare class CoreRegistry {
|
|
|
254
272
|
constructor()
|
|
255
273
|
register(name: string, factory: NapiActorFactory): void
|
|
256
274
|
serve(config: JsServeConfig): Promise<void>
|
|
275
|
+
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
257
276
|
}
|
|
258
277
|
export declare class Schedule {
|
|
259
278
|
after(durationMs: number, actionName: string, args: Buffer): void
|
package/index.js
CHANGED
|
@@ -310,14 +310,10 @@ if (!nativeBinding) {
|
|
|
310
310
|
throw new Error(`Failed to load native binding`)
|
|
311
311
|
}
|
|
312
312
|
|
|
313
|
-
const { ActorContext, NapiActorFactory,
|
|
313
|
+
const { ActorContext, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.ActorContext = ActorContext
|
|
316
316
|
module.exports.NapiActorFactory = NapiActorFactory
|
|
317
|
-
module.exports.pollCancelToken = pollCancelToken
|
|
318
|
-
module.exports.registerNativeCancelToken = registerNativeCancelToken
|
|
319
|
-
module.exports.cancelNativeCancelToken = cancelNativeCancelToken
|
|
320
|
-
module.exports.dropNativeCancelToken = dropNativeCancelToken
|
|
321
317
|
module.exports.CancellationToken = CancellationToken
|
|
322
318
|
module.exports.ConnHandle = ConnHandle
|
|
323
319
|
module.exports.JsNativeDatabase = JsNativeDatabase
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "0.0.0-pr.
|
|
3
|
+
"version": "0.0.0-pr.4711.7747b75",
|
|
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-pr.
|
|
46
|
+
"@rivetkit/engine-envoy-protocol": "0.0.0-pr.4711.7747b75"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.
|
|
51
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.
|
|
55
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.
|
|
49
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.4711.7747b75",
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.4711.7747b75",
|
|
51
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.4711.7747b75",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.4711.7747b75",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.4711.7747b75",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.4711.7747b75",
|
|
55
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.4711.7747b75"
|
|
56
56
|
}
|
|
57
57
|
}
|