@rivetkit/rivetkit-napi 2.3.12-rc.4 → 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 -7
  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
@@ -119,7 +114,6 @@ export interface JsActorConfig {
119
114
  sleepGracePeriodMs?: number
120
115
  connectionLivenessTimeoutMs?: number
121
116
  connectionLivenessIntervalMs?: number
122
- maxActions?: number
123
117
  maxQueueSize?: number
124
118
  maxSchedules?: number
125
119
  maxQueueMessageSize?: number
@@ -165,6 +159,12 @@ export interface JsSqliteVfsMetrics {
165
159
  writeBufferDirtyPages: number
166
160
  dbSizePages: number
167
161
  }
162
+ export interface JsHttpResponse {
163
+ status?: number
164
+ headers?: Record<string, string>
165
+ body?: Buffer
166
+ stream?: boolean
167
+ }
168
168
  export interface JsQueueNextOptions {
169
169
  names?: Array<string>
170
170
  timeoutMs?: number
@@ -208,6 +208,8 @@ export interface JsServeConfig {
208
208
  namespace: string
209
209
  poolName: string
210
210
  engineBinaryPath?: string
211
+ startServices?: boolean
212
+ servicesBinaryPath?: string
211
213
  engineHost?: string
212
214
  enginePort?: number
213
215
  handleInspectorHttpInRuntime?: boolean
@@ -242,7 +244,8 @@ export interface JsServerlessResponseHead {
242
244
  export interface JsApplicationResponse {
243
245
  status: number
244
246
  headers: Record<string, string>
245
- body: Buffer
247
+ body?: Buffer
248
+ stream?: boolean
246
249
  }
247
250
  export interface JsRegistryRouteResponse {
248
251
  status: number
@@ -392,6 +395,18 @@ export declare class JsActorStateTransaction {
392
395
  commit(payload: StateDeltaPayload): Promise<void>
393
396
  rollback(): Promise<void>
394
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
+ }
395
410
  export declare class Kv {
396
411
  get(key: Buffer): Promise<Buffer | null>
397
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.4",
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.4"
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.4",
56
- "@rivetkit/rivetkit-napi-darwin-x64": "2.3.12-rc.4",
57
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.12-rc.4",
58
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.12-rc.4",
59
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.12-rc.4",
60
- "@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.12-rc.4",
61
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.12-rc.4"
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
  }