@rivetkit/rivetkit-napi 0.0.0-2-3-0-rc-rollback.f0e199e → 0.0.0-codex-rivetkit-rust-preview-publish.99f44e9
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 +9 -14
- package/index.js +1 -10
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -174,24 +174,16 @@ export interface JsServerlessResponseHead {
|
|
|
174
174
|
status: number
|
|
175
175
|
headers: Record<string, string>
|
|
176
176
|
}
|
|
177
|
-
export interface
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
export interface JsRegistryRouteResponse {
|
|
178
|
+
status: number
|
|
179
|
+
headers: Record<string, string>
|
|
180
|
+
body: Buffer
|
|
180
181
|
}
|
|
181
182
|
export interface JsServerlessStreamError {
|
|
182
183
|
group: string
|
|
183
184
|
code: string
|
|
184
185
|
message: string
|
|
185
186
|
}
|
|
186
|
-
export declare function jsSetEventloopLagQuantile(quantile: string, seconds: number): void
|
|
187
|
-
export declare function jsSetEventloopUtilization(value: number): void
|
|
188
|
-
export declare function jsSetEventloopHeartbeatTsMs(epochMs: number): void
|
|
189
|
-
export declare function jsAddProcessCpuSeconds(mode: string, seconds: number): void
|
|
190
|
-
export declare function jsSetProcessResidentMemoryBytes(bytes: number): void
|
|
191
|
-
export declare function jsSetHeapBytes(state: string, bytes: number): void
|
|
192
|
-
export declare function jsObserveGcDuration(kind: string, seconds: number): void
|
|
193
|
-
export declare function jsSetActiveHandles(count: number): void
|
|
194
|
-
export declare function jsSetActiveRequests(count: number): void
|
|
195
187
|
/** Options for KV list operations. */
|
|
196
188
|
export interface JsKvListOptions {
|
|
197
189
|
reverse?: boolean
|
|
@@ -250,6 +242,7 @@ export declare class ActorContext {
|
|
|
250
242
|
broadcast(name: string, args: Buffer): void
|
|
251
243
|
waitUntil(promise: Promise<any>): void
|
|
252
244
|
waitForTrackedShutdownWork(): Promise<boolean>
|
|
245
|
+
waitForTrackedShutdownWorkUnbounded(): Promise<void>
|
|
253
246
|
registerTask(promise: Promise<any>): void
|
|
254
247
|
runtimeState(): object
|
|
255
248
|
clearRuntimeState(): void
|
|
@@ -297,7 +290,7 @@ export declare class Queue {
|
|
|
297
290
|
next(options?: JsQueueNextOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage | null>
|
|
298
291
|
nextBatch(options?: JsQueueNextBatchOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Array<QueueMessage>>
|
|
299
292
|
waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage>
|
|
300
|
-
waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null): Promise<void>
|
|
293
|
+
waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<void>
|
|
301
294
|
enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
|
|
302
295
|
tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
|
|
303
296
|
tryNextBatch(options?: JsQueueTryNextBatchOptions | undefined | null): Array<QueueMessage>
|
|
@@ -325,7 +318,9 @@ export declare class CoreRegistry {
|
|
|
325
318
|
*/
|
|
326
319
|
shutdown(): Promise<void>
|
|
327
320
|
actorStopThresholdMs(): Promise<number | null>
|
|
328
|
-
|
|
321
|
+
health(): Promise<JsRegistryRouteResponse>
|
|
322
|
+
metadata(): JsRegistryRouteResponse
|
|
323
|
+
metrics(): JsRegistryRouteResponse
|
|
329
324
|
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
330
325
|
}
|
|
331
326
|
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, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, Kv, Queue, QueueMessage, CoreRegistry,
|
|
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
|
|
@@ -321,14 +321,5 @@ module.exports.Kv = Kv
|
|
|
321
321
|
module.exports.Queue = Queue
|
|
322
322
|
module.exports.QueueMessage = QueueMessage
|
|
323
323
|
module.exports.CoreRegistry = CoreRegistry
|
|
324
|
-
module.exports.jsSetEventloopLagQuantile = jsSetEventloopLagQuantile
|
|
325
|
-
module.exports.jsSetEventloopUtilization = jsSetEventloopUtilization
|
|
326
|
-
module.exports.jsSetEventloopHeartbeatTsMs = jsSetEventloopHeartbeatTsMs
|
|
327
|
-
module.exports.jsAddProcessCpuSeconds = jsAddProcessCpuSeconds
|
|
328
|
-
module.exports.jsSetProcessResidentMemoryBytes = jsSetProcessResidentMemoryBytes
|
|
329
|
-
module.exports.jsSetHeapBytes = jsSetHeapBytes
|
|
330
|
-
module.exports.jsObserveGcDuration = jsObserveGcDuration
|
|
331
|
-
module.exports.jsSetActiveHandles = jsSetActiveHandles
|
|
332
|
-
module.exports.jsSetActiveRequests = jsSetActiveRequests
|
|
333
324
|
module.exports.Schedule = Schedule
|
|
334
325
|
module.exports.WebSocket = WebSocket
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
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-
|
|
46
|
+
"@rivetkit/engine-envoy-protocol": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-
|
|
51
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-
|
|
55
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-
|
|
49
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
51
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9",
|
|
55
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-codex-rivetkit-rust-preview-publish.99f44e9"
|
|
56
56
|
}
|
|
57
57
|
}
|