@rivetkit/rivetkit-napi 0.0.0-pr.4882.e847a5c → 0.0.0-pr.4931.24d1999

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 (2) hide show
  1. package/index.d.ts +19 -1
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -51,6 +51,7 @@ export interface JsActorConfig {
51
51
  name?: string
52
52
  icon?: string
53
53
  hasDatabase?: boolean
54
+ remoteSqlite?: boolean
54
55
  hasState?: boolean
55
56
  canHibernateWebsocket?: boolean
56
57
  stateSaveIntervalMs?: number
@@ -92,6 +93,12 @@ export interface QueryResult {
92
93
  columns: Array<string>
93
94
  rows: Array<Array<any>>
94
95
  }
96
+ export interface NativeExecuteResult {
97
+ columns: Array<string>
98
+ rows: Array<Array<any>>
99
+ changes: number
100
+ lastInsertRowId?: number
101
+ }
95
102
  export interface JsSqliteVfsMetrics {
96
103
  requestBuildNs: number
97
104
  serializeNs: number
@@ -99,6 +106,11 @@ export interface JsSqliteVfsMetrics {
99
106
  stateUpdateNs: number
100
107
  totalNs: number
101
108
  commitCount: number
109
+ pageCacheEntries: number
110
+ pageCacheWeightedSize: number
111
+ pageCacheCapacityPages: number
112
+ writeBufferDirtyPages: number
113
+ dbSizePages: number
102
114
  }
103
115
  export interface JsQueueNextOptions {
104
116
  names?: Array<string>
@@ -162,6 +174,10 @@ export interface JsServerlessResponseHead {
162
174
  status: number
163
175
  headers: Record<string, string>
164
176
  }
177
+ export interface JsRegistryDiagnostics {
178
+ mode: string
179
+ envoyActiveActorCount?: number
180
+ }
165
181
  export interface JsServerlessStreamError {
166
182
  group: string
167
183
  code: string
@@ -246,9 +262,10 @@ export declare class ConnHandle {
246
262
  }
247
263
  export declare class JsNativeDatabase {
248
264
  takeLastKvError(): string | null
249
- getSqliteVfsMetrics(): JsSqliteVfsMetrics | null
265
+ metrics(): JsSqliteVfsMetrics | null
250
266
  run(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<ExecuteResult>
251
267
  query(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<QueryResult>
268
+ execute(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<NativeExecuteResult>
252
269
  exec(sql: string): Promise<QueryResult>
253
270
  close(): Promise<void>
254
271
  }
@@ -295,6 +312,7 @@ export declare class CoreRegistry {
295
312
  * separately to avoid re-entrancy.
296
313
  */
297
314
  shutdown(): Promise<void>
315
+ diagnostics(): Promise<JsRegistryDiagnostics>
298
316
  handleServerlessRequest(req: JsServerlessRequest, onStreamEvent: (...args: any[]) => any, cancelToken: CancellationToken, config: JsServeConfig): Promise<JsServerlessResponseHead>
299
317
  }
300
318
  export declare class Schedule {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-napi",
3
- "version": "0.0.0-pr.4882.e847a5c",
3
+ "version": "0.0.0-pr.4931.24d1999",
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.4882.e847a5c"
46
+ "@rivetkit/engine-envoy-protocol": "0.0.0-pr.4931.24d1999"
47
47
  },
48
48
  "optionalDependencies": {
49
- "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.4882.e847a5c",
50
- "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.4882.e847a5c",
51
- "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.4882.e847a5c",
52
- "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.4882.e847a5c",
53
- "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.4882.e847a5c",
54
- "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.4882.e847a5c",
55
- "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.4882.e847a5c"
49
+ "@rivetkit/rivetkit-napi-darwin-arm64": "0.0.0-pr.4931.24d1999",
50
+ "@rivetkit/rivetkit-napi-darwin-x64": "0.0.0-pr.4931.24d1999",
51
+ "@rivetkit/rivetkit-napi-linux-arm64-gnu": "0.0.0-pr.4931.24d1999",
52
+ "@rivetkit/rivetkit-napi-linux-arm64-musl": "0.0.0-pr.4931.24d1999",
53
+ "@rivetkit/rivetkit-napi-linux-x64-gnu": "0.0.0-pr.4931.24d1999",
54
+ "@rivetkit/rivetkit-napi-linux-x64-musl": "0.0.0-pr.4931.24d1999",
55
+ "@rivetkit/rivetkit-napi-win32-x64-msvc": "0.0.0-pr.4931.24d1999"
56
56
  }
57
57
  }