@rivetkit/rivetkit-napi 2.3.11-rc.8 → 2.3.11
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 +27 -1
- package/index.js +2 -1
- package/package.json +9 -9
package/index.d.ts
CHANGED
|
@@ -76,11 +76,29 @@ export interface JsInspectorTabEntry {
|
|
|
76
76
|
/** Set to true for HideBuiltin entries. */
|
|
77
77
|
hidden?: boolean
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Experimental SQLite profiling configuration. This entire configuration
|
|
81
|
+
* surface is subject to change without notice.
|
|
82
|
+
*/
|
|
83
|
+
export interface JsSqliteProfilingConfig {
|
|
84
|
+
enabled?: boolean
|
|
85
|
+
maxTrackedStatementFingerprints?: number
|
|
86
|
+
maxTrackedTransactionFingerprints?: number
|
|
87
|
+
maxPrometheusSeries?: number
|
|
88
|
+
maxStatementsPerTransactionTrace?: number
|
|
89
|
+
maxGetPagesRequestsPerTrace?: number
|
|
90
|
+
maxTransactionNameBytes?: number
|
|
91
|
+
slowOperationThresholdMs?: number
|
|
92
|
+
baselineSampleRate?: number
|
|
93
|
+
maxDiagnosticEventsPerMinute?: number
|
|
94
|
+
diagnosticEventQueueCapacity?: number
|
|
95
|
+
}
|
|
79
96
|
export interface JsActorConfig {
|
|
80
97
|
name?: string
|
|
81
98
|
icon?: string
|
|
82
99
|
hasDatabase?: boolean
|
|
83
100
|
remoteSqlite?: boolean
|
|
101
|
+
sqliteProfiling?: JsSqliteProfilingConfig
|
|
84
102
|
enableActorRuntimeSocket?: boolean
|
|
85
103
|
hasState?: boolean
|
|
86
104
|
canHibernateWebsocket?: boolean
|
|
@@ -299,6 +317,7 @@ export declare class ActorContext {
|
|
|
299
317
|
takePendingHibernationChanges(): Array<string>
|
|
300
318
|
dirtyHibernatableConns(): Array<ConnHandle>
|
|
301
319
|
saveState(payload: StateDeltaPayload): Promise<void>
|
|
320
|
+
beginStateTransaction(timeoutMs?: number | undefined | null): Promise<JsActorStateTransaction>
|
|
302
321
|
saveStateAndWorkflowBatch(writes: Array<WorkflowKvWritePayload>): Promise<void>
|
|
303
322
|
actorId(): string
|
|
304
323
|
name(): string
|
|
@@ -313,6 +332,7 @@ export declare class ActorContext {
|
|
|
313
332
|
aborted(): boolean
|
|
314
333
|
runHandlerActive(): boolean
|
|
315
334
|
restartRunHandler(): void
|
|
335
|
+
setRunWakeAt(timestampMs?: number | undefined | null): Promise<void>
|
|
316
336
|
beginKeepAwake(): number
|
|
317
337
|
endKeepAwake(regionId: number): void
|
|
318
338
|
keepAwake(promise: Promise<any>): void
|
|
@@ -358,7 +378,7 @@ export declare class JsNativeDatabase {
|
|
|
358
378
|
executeBatch(statements: Array<JsSqliteBatchStatement>): Promise<Array<NativeExecuteResult>>
|
|
359
379
|
exec(sql: string): Promise<QueryResult>
|
|
360
380
|
close(): Promise<void>
|
|
361
|
-
beginTransaction(timeoutMs?: number | undefined | null): Promise<JsSqliteTransaction>
|
|
381
|
+
beginTransaction(timeoutMs?: number | undefined | null, name?: string | undefined | null): Promise<JsSqliteTransaction>
|
|
362
382
|
}
|
|
363
383
|
export declare class JsSqliteTransaction {
|
|
364
384
|
execute(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<NativeExecuteResult>
|
|
@@ -366,6 +386,11 @@ export declare class JsSqliteTransaction {
|
|
|
366
386
|
commit(): Promise<void>
|
|
367
387
|
rollback(): Promise<void>
|
|
368
388
|
}
|
|
389
|
+
export declare class JsActorStateTransaction {
|
|
390
|
+
execute(sql: string, params?: Array<JsBindParam> | undefined | null): Promise<NativeExecuteResult>
|
|
391
|
+
commit(payload: StateDeltaPayload): Promise<void>
|
|
392
|
+
rollback(): Promise<void>
|
|
393
|
+
}
|
|
369
394
|
export declare class Kv {
|
|
370
395
|
get(key: Buffer): Promise<Buffer | null>
|
|
371
396
|
put(key: Buffer, value: Buffer): Promise<void>
|
|
@@ -383,6 +408,7 @@ export declare class Queue {
|
|
|
383
408
|
nextBatch(options?: JsQueueNextBatchOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Array<QueueMessage>>
|
|
384
409
|
waitForNames(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<QueueMessage>
|
|
385
410
|
waitForNamesAvailable(names: Array<string>, options?: JsQueueWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<void>
|
|
411
|
+
completePersisted(messageId: bigint, expectedName: string, response?: Buffer | undefined | null): Promise<boolean>
|
|
386
412
|
enqueueAndWait(name: string, body: Buffer, options?: JsQueueEnqueueAndWaitOptions | undefined | null, signal?: CancellationToken | undefined | null): Promise<Buffer | null>
|
|
387
413
|
tryNext(options?: JsQueueTryNextOptions | undefined | null): QueueMessage | null
|
|
388
414
|
tryNextBatch(options?: JsQueueTryNextBatchOptions | undefined | null): Array<QueueMessage>
|
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, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
|
|
313
|
+
const { ActorContext, decodeInspectorRequest, encodeInspectorResponse, NapiActorFactory, CancellationToken, ConnHandle, JsNativeDatabase, JsSqliteTransaction, JsActorStateTransaction, Kv, Queue, QueueMessage, CoreRegistry, Schedule, WebSocket } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.ActorContext = ActorContext
|
|
316
316
|
module.exports.decodeInspectorRequest = decodeInspectorRequest
|
|
@@ -320,6 +320,7 @@ module.exports.CancellationToken = CancellationToken
|
|
|
320
320
|
module.exports.ConnHandle = ConnHandle
|
|
321
321
|
module.exports.JsNativeDatabase = JsNativeDatabase
|
|
322
322
|
module.exports.JsSqliteTransaction = JsSqliteTransaction
|
|
323
|
+
module.exports.JsActorStateTransaction = JsActorStateTransaction
|
|
323
324
|
module.exports.Kv = Kv
|
|
324
325
|
module.exports.Queue = Queue
|
|
325
326
|
module.exports.QueueMessage = QueueMessage
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-napi",
|
|
3
|
-
"version": "2.3.11
|
|
3
|
+
"version": "2.3.11",
|
|
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.11
|
|
47
|
+
"@rivetkit/engine-envoy-protocol": "2.3.11"
|
|
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.11
|
|
56
|
-
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.11
|
|
57
|
-
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.11
|
|
58
|
-
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.11
|
|
59
|
-
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.11
|
|
60
|
-
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.11
|
|
61
|
-
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.11
|
|
55
|
+
"@rivetkit/rivetkit-napi-darwin-arm64": "2.3.11",
|
|
56
|
+
"@rivetkit/rivetkit-napi-darwin-x64": "2.3.11",
|
|
57
|
+
"@rivetkit/rivetkit-napi-linux-arm64-gnu": "2.3.11",
|
|
58
|
+
"@rivetkit/rivetkit-napi-linux-arm64-musl": "2.3.11",
|
|
59
|
+
"@rivetkit/rivetkit-napi-linux-x64-gnu": "2.3.11",
|
|
60
|
+
"@rivetkit/rivetkit-napi-linux-x64-musl": "2.3.11",
|
|
61
|
+
"@rivetkit/rivetkit-napi-win32-x64-msvc": "2.3.11"
|
|
62
62
|
}
|
|
63
63
|
}
|