@rivetkit/rivetkit-napi 2.3.12-rc.3 → 2.3.12

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.
Files changed (3) hide show
  1. package/index.d.ts +22 -6
  2. package/index.js +3 -1
  3. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -44,11 +44,6 @@ 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
- }
52
47
  export interface JsQueueSendResult {
53
48
  status: string
54
49
  response?: Buffer
@@ -164,6 +159,12 @@ export interface JsSqliteVfsMetrics {
164
159
  writeBufferDirtyPages: number
165
160
  dbSizePages: number
166
161
  }
162
+ export interface JsHttpResponse {
163
+ status?: number
164
+ headers?: Record<string, string>
165
+ body?: Buffer
166
+ stream?: boolean
167
+ }
167
168
  export interface JsQueueNextOptions {
168
169
  names?: Array<string>
169
170
  timeoutMs?: number
@@ -207,6 +208,8 @@ export interface JsServeConfig {
207
208
  namespace: string
208
209
  poolName: string
209
210
  engineBinaryPath?: string
211
+ startServices?: boolean
212
+ servicesBinaryPath?: string
210
213
  engineHost?: string
211
214
  enginePort?: number
212
215
  handleInspectorHttpInRuntime?: boolean
@@ -241,7 +244,8 @@ export interface JsServerlessResponseHead {
241
244
  export interface JsApplicationResponse {
242
245
  status: number
243
246
  headers: Record<string, string>
244
- body: Buffer
247
+ body?: Buffer
248
+ stream?: boolean
245
249
  }
246
250
  export interface JsRegistryRouteResponse {
247
251
  status: number
@@ -391,6 +395,18 @@ export declare class JsActorStateTransaction {
391
395
  commit(payload: StateDeltaPayload): Promise<void>
392
396
  rollback(): Promise<void>
393
397
  }
398
+ /** JavaScript-facing writer for a streaming actor HTTP response. */
399
+ export declare class HttpResponseBodyStream {
400
+ cancelled(): Promise<void>
401
+ write(chunk: Buffer): Promise<void>
402
+ end(): Promise<void>
403
+ error(message: string): Promise<void>
404
+ }
405
+ /** JavaScript-facing reader for a streaming actor HTTP request. */
406
+ export declare class HttpRequestBodyStream {
407
+ read(): Promise<Buffer | null>
408
+ cancel(): Promise<void>
409
+ }
394
410
  export declare class Kv {
395
411
  get(key: Buffer): Promise<Buffer | null>
396
412
  put(key: Buffer, value: Buffer): Promise<void>
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, JsActorStateTransaction, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
313
+ const { ActorContext, decodeInspectorRequest, encodeInspectorResponse, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, JsSqliteTransaction, JsActorStateTransaction, HttpResponseBodyStream, HttpRequestBodyStream, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
314
314
 
315
315
  module.exports.ActorContext = ActorContext
316
316
  module.exports.decodeInspectorRequest = decodeInspectorRequest
@@ -321,6 +321,8 @@ module.exports.ConnHandle = ConnHandle
321
321
  module.exports.JsNativeDatabase = JsNativeDatabase
322
322
  module.exports.JsSqliteTransaction = JsSqliteTransaction
323
323
  module.exports.JsActorStateTransaction = JsActorStateTransaction
324
+ module.exports.HttpResponseBodyStream = HttpResponseBodyStream
325
+ module.exports.HttpRequestBodyStream = HttpRequestBodyStream
324
326
  module.exports.Kv = Kv
325
327
  module.exports.Queue = Queue
326
328
  module.exports.QueueMessage = QueueMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-napi",
3
- "version": "2.3.12-rc.3",
3
+ "version": "2.3.12",
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,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@napi-rs/cli": "^2.18.4",
47
- "@rivetkit/engine-envoy-protocol": "2.3.12-rc.3"
47
+ "@rivetkit/engine-envoy-protocol": "2.3.12"
48
48
  },
49
49
  "repository": {
50
50
  "type": "git",
@@ -52,12 +52,12 @@
52
52
  "directory": "rivetkit-typescript/packages/rivetkit-napi"
53
53
  },
54
54
  "optionalDependencies": {
55
- "@rivetkit/rivetkit-napi-darwin-arm64": "2.3.12-rc.3",
56
- "@rivetkit/rivetkit-napi-darwin-x64": "2.3.12-rc.3",
57
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.12-rc.3",
58
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.12-rc.3",
59
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.12-rc.3",
60
- "@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.12-rc.3",
61
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.12-rc.3"
55
+ "@rivetkit/rivetkit-napi-darwin-arm64": "2.3.12",
56
+ "@rivetkit/rivetkit-napi-darwin-x64": "2.3.12",
57
+ "@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.12",
58
+ "@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.12",
59
+ "@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.12",
60
+ "@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.12",
61
+ "@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.12"
62
62
  }
63
63
  }