@rivetkit/supabase 2.3.12-rc.3 → 2.3.12-rc.4
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/dist/mod.js +28 -10
- package/dist/mod.mjs +28 -10
- package/package.json +3 -3
package/dist/mod.js
CHANGED
|
@@ -519,7 +519,7 @@ function unsupportedFeature(feature) {
|
|
|
519
519
|
);
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
522
|
+
// ../rivetkit/dist/tsup/chunk-64DT44V2.js
|
|
523
523
|
var import_pino = require("pino");
|
|
524
524
|
|
|
525
525
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/external.js
|
|
@@ -13192,7 +13192,7 @@ var classic_default = external_exports;
|
|
|
13192
13192
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/index.js
|
|
13193
13193
|
var v4_default = classic_default;
|
|
13194
13194
|
|
|
13195
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
13195
|
+
// ../rivetkit/dist/tsup/chunk-64DT44V2.js
|
|
13196
13196
|
var cbor = __toESM(require("cbor-x"), 1);
|
|
13197
13197
|
var import_invariant = __toESM(require_invariant(), 1);
|
|
13198
13198
|
var getRivetEngine = () => getEnvUniversal("RIVET_ENGINE");
|
|
@@ -13362,7 +13362,7 @@ function noopNext() {
|
|
|
13362
13362
|
}
|
|
13363
13363
|
var package_default = {
|
|
13364
13364
|
name: "rivetkit",
|
|
13365
|
-
version: "2.3.12-rc.
|
|
13365
|
+
version: "2.3.12-rc.4",
|
|
13366
13366
|
description: "Lightweight libraries for building stateful actors on edge platforms",
|
|
13367
13367
|
license: "Apache-2.0",
|
|
13368
13368
|
keywords: [
|
|
@@ -14665,7 +14665,7 @@ function Config({ initialBufferLength = 1024, maxBufferLength = 1024 * 1024 * 32
|
|
|
14665
14665
|
};
|
|
14666
14666
|
}
|
|
14667
14667
|
|
|
14668
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
14668
|
+
// ../rivetkit/dist/tsup/chunk-BQ7YJ3PG.js
|
|
14669
14669
|
var config2 = /* @__PURE__ */ Config({});
|
|
14670
14670
|
function readWorkflowCbor(bc) {
|
|
14671
14671
|
return readData(bc);
|
|
@@ -14963,7 +14963,7 @@ function decodeWorkflowHistoryTransport(data) {
|
|
|
14963
14963
|
return decodeWorkflowHistory(toUint8Array(data));
|
|
14964
14964
|
}
|
|
14965
14965
|
|
|
14966
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
14966
|
+
// ../rivetkit/dist/tsup/chunk-DLQSZ6Q7.js
|
|
14967
14967
|
function flattenActionHandlers(actions) {
|
|
14968
14968
|
const flattened = /* @__PURE__ */ Object.create(null);
|
|
14969
14969
|
for (const { name, handler } of collectActionEntries(actions)) {
|
|
@@ -15045,6 +15045,7 @@ function formatActionPath(path2) {
|
|
|
15045
15045
|
return path2.length === 0 ? "actions" : `Action \`${path2.join(".")}\``;
|
|
15046
15046
|
}
|
|
15047
15047
|
var DEFAULT_SLEEP_GRACE_PERIOD = 15e3;
|
|
15048
|
+
var DEFAULT_MAX_ACTIONS = 128;
|
|
15048
15049
|
var ACTOR_CONTEXT_INTERNAL_SYMBOL = /* @__PURE__ */ Symbol(
|
|
15049
15050
|
"rivetkit.actor_context_internal"
|
|
15050
15051
|
);
|
|
@@ -15211,6 +15212,8 @@ var GlobalActorOptionsBaseSchema = external_exports.object({
|
|
|
15211
15212
|
name: external_exports.string().optional(),
|
|
15212
15213
|
/** Icon for the actor in the Inspector UI. Can be an emoji or FontAwesome icon name. */
|
|
15213
15214
|
icon: external_exports.string().optional(),
|
|
15215
|
+
/** Maximum number of action handlers that may be defined on this actor. */
|
|
15216
|
+
maxActions: external_exports.number().int().nonnegative().default(DEFAULT_MAX_ACTIONS),
|
|
15214
15217
|
/** Enables the experimental Actor Runtime Socket for this actor. */
|
|
15215
15218
|
enableActorRuntimeSocket: external_exports.boolean().default(false),
|
|
15216
15219
|
/**
|
|
@@ -15302,12 +15305,26 @@ var ActorConfigSchema = external_exports.object({
|
|
|
15302
15305
|
message: "Cannot define both 'vars' and 'createVars'",
|
|
15303
15306
|
path: ["vars"]
|
|
15304
15307
|
}
|
|
15305
|
-
)
|
|
15308
|
+
).superRefine((data, ctx) => {
|
|
15309
|
+
const actionCount = Object.keys(
|
|
15310
|
+
flattenActionHandlers(data.actions)
|
|
15311
|
+
).length;
|
|
15312
|
+
if (actionCount > data.options.maxActions) {
|
|
15313
|
+
ctx.addIssue({
|
|
15314
|
+
code: "custom",
|
|
15315
|
+
message: `Actor defines ${actionCount} actions, but maxActions is ${data.options.maxActions}`,
|
|
15316
|
+
path: ["actions"]
|
|
15317
|
+
});
|
|
15318
|
+
}
|
|
15319
|
+
});
|
|
15306
15320
|
var DocActorOptionsSchema = external_exports.object({
|
|
15307
15321
|
name: external_exports.string().optional().describe("Display name for the actor in the Inspector UI."),
|
|
15308
15322
|
icon: external_exports.string().optional().describe(
|
|
15309
15323
|
"Icon for the actor in the Inspector UI. Can be an emoji (e.g., '\u{1F680}') or FontAwesome icon name (e.g., 'rocket')."
|
|
15310
15324
|
),
|
|
15325
|
+
maxActions: external_exports.number().int().nonnegative().optional().describe(
|
|
15326
|
+
`Maximum number of action handlers that may be defined on this actor. Default: ${DEFAULT_MAX_ACTIONS}`
|
|
15327
|
+
),
|
|
15311
15328
|
enableActorRuntimeSocket: external_exports.boolean().optional().describe(
|
|
15312
15329
|
"Enables the experimental Actor Runtime Socket for this actor. Default: false"
|
|
15313
15330
|
),
|
|
@@ -15627,7 +15644,7 @@ var AsyncMutex = class {
|
|
|
15627
15644
|
}
|
|
15628
15645
|
};
|
|
15629
15646
|
|
|
15630
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15647
|
+
// ../rivetkit/dist/tsup/chunk-NVMHEG5J.js
|
|
15631
15648
|
function logger() {
|
|
15632
15649
|
return getLogger("actor-client");
|
|
15633
15650
|
}
|
|
@@ -15665,7 +15682,7 @@ async function importWebSocket() {
|
|
|
15665
15682
|
return webSocketPromise;
|
|
15666
15683
|
}
|
|
15667
15684
|
|
|
15668
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15685
|
+
// ../rivetkit/dist/tsup/chunk-O74736N5.js
|
|
15669
15686
|
var import_invariant2 = __toESM(require_invariant(), 1);
|
|
15670
15687
|
|
|
15671
15688
|
// ../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
|
|
@@ -15843,7 +15860,7 @@ function createVersionedDataHandler(config3) {
|
|
|
15843
15860
|
return new VersionedDataHandler(config3);
|
|
15844
15861
|
}
|
|
15845
15862
|
|
|
15846
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15863
|
+
// ../rivetkit/dist/tsup/chunk-O74736N5.js
|
|
15847
15864
|
var import_invariant3 = __toESM(require_invariant(), 1);
|
|
15848
15865
|
var import_invariant4 = __toESM(require_invariant(), 1);
|
|
15849
15866
|
var PATH_CONNECT = "/connect";
|
|
@@ -21608,7 +21625,7 @@ function apiActorToOutput(actor2) {
|
|
|
21608
21625
|
};
|
|
21609
21626
|
}
|
|
21610
21627
|
|
|
21611
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
21628
|
+
// ../rivetkit/dist/tsup/chunk-AF2VKCFA.js
|
|
21612
21629
|
var nativeStateTransactionOpeners = /* @__PURE__ */ new WeakMap();
|
|
21613
21630
|
var nativeStateTransactionClientBinders = /* @__PURE__ */ new WeakMap();
|
|
21614
21631
|
function registerNativeStateTransactionOpener(provider, opener) {
|
|
@@ -28692,6 +28709,7 @@ function buildActorConfig(definition, registryConfig, runtimeKind) {
|
|
|
28692
28709
|
return {
|
|
28693
28710
|
name: options.name,
|
|
28694
28711
|
icon: options.icon,
|
|
28712
|
+
maxActions: options.maxActions,
|
|
28695
28713
|
hasDatabase: true,
|
|
28696
28714
|
remoteSqlite: usesRemoteSqlite,
|
|
28697
28715
|
sqliteProfiling,
|
package/dist/mod.mjs
CHANGED
|
@@ -481,7 +481,7 @@ function unsupportedFeature(feature) {
|
|
|
481
481
|
);
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
484
|
+
// ../rivetkit/dist/tsup/chunk-64DT44V2.js
|
|
485
485
|
import {
|
|
486
486
|
pino,
|
|
487
487
|
stdTimeFunctions
|
|
@@ -13157,7 +13157,7 @@ var classic_default = external_exports;
|
|
|
13157
13157
|
// ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/index.js
|
|
13158
13158
|
var v4_default = classic_default;
|
|
13159
13159
|
|
|
13160
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
13160
|
+
// ../rivetkit/dist/tsup/chunk-64DT44V2.js
|
|
13161
13161
|
var import_invariant = __toESM(require_invariant(), 1);
|
|
13162
13162
|
import * as cbor from "cbor-x";
|
|
13163
13163
|
var getRivetEngine = () => getEnvUniversal("RIVET_ENGINE");
|
|
@@ -13327,7 +13327,7 @@ function noopNext() {
|
|
|
13327
13327
|
}
|
|
13328
13328
|
var package_default = {
|
|
13329
13329
|
name: "rivetkit",
|
|
13330
|
-
version: "2.3.12-rc.
|
|
13330
|
+
version: "2.3.12-rc.4",
|
|
13331
13331
|
description: "Lightweight libraries for building stateful actors on edge platforms",
|
|
13332
13332
|
license: "Apache-2.0",
|
|
13333
13333
|
keywords: [
|
|
@@ -14630,7 +14630,7 @@ function Config({ initialBufferLength = 1024, maxBufferLength = 1024 * 1024 * 32
|
|
|
14630
14630
|
};
|
|
14631
14631
|
}
|
|
14632
14632
|
|
|
14633
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
14633
|
+
// ../rivetkit/dist/tsup/chunk-BQ7YJ3PG.js
|
|
14634
14634
|
var config2 = /* @__PURE__ */ Config({});
|
|
14635
14635
|
function readWorkflowCbor(bc) {
|
|
14636
14636
|
return readData(bc);
|
|
@@ -14928,7 +14928,7 @@ function decodeWorkflowHistoryTransport(data) {
|
|
|
14928
14928
|
return decodeWorkflowHistory(toUint8Array(data));
|
|
14929
14929
|
}
|
|
14930
14930
|
|
|
14931
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
14931
|
+
// ../rivetkit/dist/tsup/chunk-DLQSZ6Q7.js
|
|
14932
14932
|
function flattenActionHandlers(actions) {
|
|
14933
14933
|
const flattened = /* @__PURE__ */ Object.create(null);
|
|
14934
14934
|
for (const { name, handler } of collectActionEntries(actions)) {
|
|
@@ -15010,6 +15010,7 @@ function formatActionPath(path2) {
|
|
|
15010
15010
|
return path2.length === 0 ? "actions" : `Action \`${path2.join(".")}\``;
|
|
15011
15011
|
}
|
|
15012
15012
|
var DEFAULT_SLEEP_GRACE_PERIOD = 15e3;
|
|
15013
|
+
var DEFAULT_MAX_ACTIONS = 128;
|
|
15013
15014
|
var ACTOR_CONTEXT_INTERNAL_SYMBOL = /* @__PURE__ */ Symbol(
|
|
15014
15015
|
"rivetkit.actor_context_internal"
|
|
15015
15016
|
);
|
|
@@ -15176,6 +15177,8 @@ var GlobalActorOptionsBaseSchema = external_exports.object({
|
|
|
15176
15177
|
name: external_exports.string().optional(),
|
|
15177
15178
|
/** Icon for the actor in the Inspector UI. Can be an emoji or FontAwesome icon name. */
|
|
15178
15179
|
icon: external_exports.string().optional(),
|
|
15180
|
+
/** Maximum number of action handlers that may be defined on this actor. */
|
|
15181
|
+
maxActions: external_exports.number().int().nonnegative().default(DEFAULT_MAX_ACTIONS),
|
|
15179
15182
|
/** Enables the experimental Actor Runtime Socket for this actor. */
|
|
15180
15183
|
enableActorRuntimeSocket: external_exports.boolean().default(false),
|
|
15181
15184
|
/**
|
|
@@ -15267,12 +15270,26 @@ var ActorConfigSchema = external_exports.object({
|
|
|
15267
15270
|
message: "Cannot define both 'vars' and 'createVars'",
|
|
15268
15271
|
path: ["vars"]
|
|
15269
15272
|
}
|
|
15270
|
-
)
|
|
15273
|
+
).superRefine((data, ctx) => {
|
|
15274
|
+
const actionCount = Object.keys(
|
|
15275
|
+
flattenActionHandlers(data.actions)
|
|
15276
|
+
).length;
|
|
15277
|
+
if (actionCount > data.options.maxActions) {
|
|
15278
|
+
ctx.addIssue({
|
|
15279
|
+
code: "custom",
|
|
15280
|
+
message: `Actor defines ${actionCount} actions, but maxActions is ${data.options.maxActions}`,
|
|
15281
|
+
path: ["actions"]
|
|
15282
|
+
});
|
|
15283
|
+
}
|
|
15284
|
+
});
|
|
15271
15285
|
var DocActorOptionsSchema = external_exports.object({
|
|
15272
15286
|
name: external_exports.string().optional().describe("Display name for the actor in the Inspector UI."),
|
|
15273
15287
|
icon: external_exports.string().optional().describe(
|
|
15274
15288
|
"Icon for the actor in the Inspector UI. Can be an emoji (e.g., '\u{1F680}') or FontAwesome icon name (e.g., 'rocket')."
|
|
15275
15289
|
),
|
|
15290
|
+
maxActions: external_exports.number().int().nonnegative().optional().describe(
|
|
15291
|
+
`Maximum number of action handlers that may be defined on this actor. Default: ${DEFAULT_MAX_ACTIONS}`
|
|
15292
|
+
),
|
|
15276
15293
|
enableActorRuntimeSocket: external_exports.boolean().optional().describe(
|
|
15277
15294
|
"Enables the experimental Actor Runtime Socket for this actor. Default: false"
|
|
15278
15295
|
),
|
|
@@ -15592,7 +15609,7 @@ var AsyncMutex = class {
|
|
|
15592
15609
|
}
|
|
15593
15610
|
};
|
|
15594
15611
|
|
|
15595
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15612
|
+
// ../rivetkit/dist/tsup/chunk-NVMHEG5J.js
|
|
15596
15613
|
function logger() {
|
|
15597
15614
|
return getLogger("actor-client");
|
|
15598
15615
|
}
|
|
@@ -15630,7 +15647,7 @@ async function importWebSocket() {
|
|
|
15630
15647
|
return webSocketPromise;
|
|
15631
15648
|
}
|
|
15632
15649
|
|
|
15633
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15650
|
+
// ../rivetkit/dist/tsup/chunk-O74736N5.js
|
|
15634
15651
|
var import_invariant2 = __toESM(require_invariant(), 1);
|
|
15635
15652
|
|
|
15636
15653
|
// ../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
|
|
@@ -15808,7 +15825,7 @@ function createVersionedDataHandler(config3) {
|
|
|
15808
15825
|
return new VersionedDataHandler(config3);
|
|
15809
15826
|
}
|
|
15810
15827
|
|
|
15811
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
15828
|
+
// ../rivetkit/dist/tsup/chunk-O74736N5.js
|
|
15812
15829
|
var import_invariant3 = __toESM(require_invariant(), 1);
|
|
15813
15830
|
var import_invariant4 = __toESM(require_invariant(), 1);
|
|
15814
15831
|
var PATH_CONNECT = "/connect";
|
|
@@ -21573,7 +21590,7 @@ function apiActorToOutput(actor2) {
|
|
|
21573
21590
|
};
|
|
21574
21591
|
}
|
|
21575
21592
|
|
|
21576
|
-
// ../rivetkit/dist/tsup/chunk-
|
|
21593
|
+
// ../rivetkit/dist/tsup/chunk-AF2VKCFA.js
|
|
21577
21594
|
var nativeStateTransactionOpeners = /* @__PURE__ */ new WeakMap();
|
|
21578
21595
|
var nativeStateTransactionClientBinders = /* @__PURE__ */ new WeakMap();
|
|
21579
21596
|
function registerNativeStateTransactionOpener(provider, opener) {
|
|
@@ -28657,6 +28674,7 @@ function buildActorConfig(definition, registryConfig, runtimeKind) {
|
|
|
28657
28674
|
return {
|
|
28658
28675
|
name: options.name,
|
|
28659
28676
|
icon: options.icon,
|
|
28677
|
+
maxActions: options.maxActions,
|
|
28660
28678
|
hasDatabase: true,
|
|
28661
28679
|
remoteSqlite: usesRemoteSqlite,
|
|
28662
28680
|
sqliteProfiling,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/supabase",
|
|
3
|
-
"version": "2.3.12-rc.
|
|
3
|
+
"version": "2.3.12-rc.4",
|
|
4
4
|
"description": "Supabase Edge Functions integration for RivetKit actors",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"check-edge-closure": "node ../../../scripts/ci/check-edge-native-closure.mjs"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@rivetkit/rivetkit-wasm": "2.3.12-rc.
|
|
42
|
+
"@rivetkit/rivetkit-wasm": "2.3.12-rc.4",
|
|
43
43
|
"cbor-x": "^1.6.0",
|
|
44
44
|
"pino": "^9.5.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@size-limit/file": "^11.1.6",
|
|
48
48
|
"@types/node": "^22.0.0",
|
|
49
|
-
"rivetkit": "2.3.12-rc.
|
|
49
|
+
"rivetkit": "2.3.12-rc.4",
|
|
50
50
|
"size-limit": "^11.1.6",
|
|
51
51
|
"tsup": "^8.4.0",
|
|
52
52
|
"typescript": "^5.5.2"
|