@rivetkit/rivetkit-napi 2.3.0-rc.8 → 2.3.0-rc.9
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 +7 -13
- 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
|
|
@@ -325,7 +317,9 @@ export declare class CoreRegistry {
|
|
|
325
317
|
*/
|
|
326
318
|
shutdown(): Promise<void>
|
|
327
319
|
actorStopThresholdMs(): Promise<number | null>
|
|
328
|
-
|
|
320
|
+
health(): Promise<JsRegistryRouteResponse>
|
|
321
|
+
metadata(): JsRegistryRouteResponse
|
|
322
|
+
metrics(): JsRegistryRouteResponse
|
|
329
323
|
handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
|
|
330
324
|
}
|
|
331
325
|
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": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.9",
|
|
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": "2.3.0-rc.
|
|
46
|
+
"@rivetkit/engine-envoy-protocol": "2.3.0-rc.9"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
49
|
-
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.0-rc.
|
|
50
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.0-rc.
|
|
51
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.0-rc.
|
|
52
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.0-rc.
|
|
53
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.0-rc.
|
|
54
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.0-rc.
|
|
55
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.0-rc.
|
|
49
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.0-rc.9",
|
|
50
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.0-rc.9",
|
|
51
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.0-rc.9",
|
|
52
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.0-rc.9",
|
|
53
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.0-rc.9",
|
|
54
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.0-rc.9",
|
|
55
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.0-rc.9"
|
|
56
56
|
}
|
|
57
57
|
}
|