@rivetkit/supabase 2.3.11-rc.2 → 2.3.11-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.
Files changed (3) hide show
  1. package/dist/mod.js +54 -43
  2. package/dist/mod.mjs +54 -43
  3. package/package.json +3 -3
package/dist/mod.js CHANGED
@@ -508,7 +508,7 @@ function unsupportedFeature(feature) {
508
508
  );
509
509
  }
510
510
 
511
- // ../rivetkit/dist/tsup/chunk-XWIXH7JF.js
511
+ // ../rivetkit/dist/tsup/chunk-7N4PSYCJ.js
512
512
  var import_pino = require("pino");
513
513
 
514
514
  // ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/classic/external.js
@@ -13181,7 +13181,7 @@ var classic_default = external_exports;
13181
13181
  // ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/index.js
13182
13182
  var v4_default = classic_default;
13183
13183
 
13184
- // ../rivetkit/dist/tsup/chunk-XWIXH7JF.js
13184
+ // ../rivetkit/dist/tsup/chunk-7N4PSYCJ.js
13185
13185
  var cbor = __toESM(require("cbor-x"), 1);
13186
13186
  var import_invariant = __toESM(require_invariant(), 1);
13187
13187
  var getRivetEngine = () => getEnvUniversal("RIVET_ENGINE");
@@ -13346,7 +13346,7 @@ function noopNext() {
13346
13346
  }
13347
13347
  var package_default = {
13348
13348
  name: "rivetkit",
13349
- version: "2.3.11-rc.2",
13349
+ version: "2.3.11-rc.4",
13350
13350
  description: "Lightweight libraries for building stateful actors on edge platforms",
13351
13351
  license: "Apache-2.0",
13352
13352
  keywords: [
@@ -14639,7 +14639,7 @@ function Config({ initialBufferLength = 1024, maxBufferLength = 1024 * 1024 * 32
14639
14639
  };
14640
14640
  }
14641
14641
 
14642
- // ../rivetkit/dist/tsup/chunk-NLAW2MIM.js
14642
+ // ../rivetkit/dist/tsup/chunk-I3OXZILZ.js
14643
14643
  var config2 = /* @__PURE__ */ Config({});
14644
14644
  function readWorkflowCbor(bc) {
14645
14645
  return readData(bc);
@@ -15484,35 +15484,7 @@ function removePrefixFromKey(prefixedKey) {
15484
15484
  return prefixedKey.slice(KEYS.KV.length);
15485
15485
  }
15486
15486
 
15487
- // ../rivetkit/dist/tsup/chunk-7AFZMFPQ.js
15488
- var MIGRATION_TRANSACTION_TIMEOUT_MS = 5 * 6e4;
15489
- var AsyncMutex = class {
15490
- #locked = false;
15491
- #waiting = [];
15492
- async acquire() {
15493
- while (this.#locked) {
15494
- await new Promise((resolve) => this.#waiting.push(resolve));
15495
- }
15496
- this.#locked = true;
15497
- }
15498
- release() {
15499
- this.#locked = false;
15500
- const next = this.#waiting.shift();
15501
- if (next) {
15502
- next();
15503
- }
15504
- }
15505
- async run(fn) {
15506
- await this.acquire();
15507
- try {
15508
- return await fn();
15509
- } finally {
15510
- this.release();
15511
- }
15512
- }
15513
- };
15514
-
15515
- // ../rivetkit/dist/tsup/chunk-RVJQMOAA.js
15487
+ // ../rivetkit/dist/tsup/chunk-S26YGW4T.js
15516
15488
  function logger() {
15517
15489
  return getLogger("actor-client");
15518
15490
  }
@@ -15550,7 +15522,35 @@ async function importWebSocket() {
15550
15522
  return webSocketPromise;
15551
15523
  }
15552
15524
 
15553
- // ../rivetkit/dist/tsup/chunk-XR2KF2ZA.js
15525
+ // ../rivetkit/dist/tsup/chunk-7AFZMFPQ.js
15526
+ var MIGRATION_TRANSACTION_TIMEOUT_MS = 5 * 6e4;
15527
+ var AsyncMutex = class {
15528
+ #locked = false;
15529
+ #waiting = [];
15530
+ async acquire() {
15531
+ while (this.#locked) {
15532
+ await new Promise((resolve) => this.#waiting.push(resolve));
15533
+ }
15534
+ this.#locked = true;
15535
+ }
15536
+ release() {
15537
+ this.#locked = false;
15538
+ const next = this.#waiting.shift();
15539
+ if (next) {
15540
+ next();
15541
+ }
15542
+ }
15543
+ async run(fn) {
15544
+ await this.acquire();
15545
+ try {
15546
+ return await fn();
15547
+ } finally {
15548
+ this.release();
15549
+ }
15550
+ }
15551
+ };
15552
+
15553
+ // ../rivetkit/dist/tsup/chunk-5KLTIO35.js
15554
15554
  var import_invariant2 = __toESM(require_invariant(), 1);
15555
15555
 
15556
15556
  // ../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
@@ -15728,7 +15728,7 @@ function createVersionedDataHandler(config3) {
15728
15728
  return new VersionedDataHandler(config3);
15729
15729
  }
15730
15730
 
15731
- // ../rivetkit/dist/tsup/chunk-XR2KF2ZA.js
15731
+ // ../rivetkit/dist/tsup/chunk-5KLTIO35.js
15732
15732
  var import_invariant3 = __toESM(require_invariant(), 1);
15733
15733
  var import_invariant4 = __toESM(require_invariant(), 1);
15734
15734
  var PATH_CONNECT = "/connect";
@@ -18347,7 +18347,8 @@ async function resolveGatewayTarget(driver, target) {
18347
18347
  name: target.getOrCreateForKey.name,
18348
18348
  key: target.getOrCreateForKey.key,
18349
18349
  input: target.getOrCreateForKey.input,
18350
- region: target.getOrCreateForKey.region
18350
+ region: target.getOrCreateForKey.region,
18351
+ poolName: target.getOrCreateForKey.poolName
18351
18352
  });
18352
18353
  return output.actorId;
18353
18354
  }
@@ -18356,7 +18357,8 @@ async function resolveGatewayTarget(driver, target) {
18356
18357
  name: target.create.name,
18357
18358
  key: target.create.key,
18358
18359
  input: target.create.input,
18359
- region: target.create.region
18360
+ region: target.create.region,
18361
+ poolName: target.create.poolName
18360
18362
  });
18361
18363
  return output.actorId;
18362
18364
  }
@@ -19060,7 +19062,8 @@ var ClientRaw = class {
19060
19062
  name,
19061
19063
  key: keyArray,
19062
19064
  input: opts == null ? void 0 : opts.createWithInput,
19063
- region: opts == null ? void 0 : opts.createInRegion
19065
+ region: opts == null ? void 0 : opts.createInRegion,
19066
+ poolName: opts == null ? void 0 : opts.poolName
19064
19067
  }
19065
19068
  };
19066
19069
  const handle = this.#createHandle(
@@ -21210,7 +21213,14 @@ var RemoteEngineControlClient = class {
21210
21213
  }
21211
21214
  async getOrCreateWithKey(input) {
21212
21215
  await this.#metadataPromise;
21213
- const { name, key, input: actorInput, region, crashPolicy } = input;
21216
+ const {
21217
+ name,
21218
+ key,
21219
+ input: actorInput,
21220
+ region,
21221
+ crashPolicy,
21222
+ poolName
21223
+ } = input;
21214
21224
  logger2().info({
21215
21225
  msg: "getOrCreateWithKey: getting or creating actor via engine api",
21216
21226
  name,
@@ -21220,7 +21230,7 @@ var RemoteEngineControlClient = class {
21220
21230
  datacenter: region,
21221
21231
  name,
21222
21232
  key: serializeActorKey(key),
21223
- runner_name_selector: this.#config.poolName,
21233
+ runner_name_selector: poolName ?? this.#config.poolName,
21224
21234
  input: actorInput ? uint8ArrayToBase642(
21225
21235
  encodeCborCompat(actorInput)
21226
21236
  ) : void 0,
@@ -21240,14 +21250,15 @@ var RemoteEngineControlClient = class {
21240
21250
  key,
21241
21251
  input,
21242
21252
  region,
21243
- crashPolicy
21253
+ crashPolicy,
21254
+ poolName
21244
21255
  }) {
21245
21256
  await this.#metadataPromise;
21246
21257
  logger2().info({ msg: "creating actor via engine api", name, key });
21247
21258
  const result = await createActor(this.#config, {
21248
21259
  datacenter: region,
21249
21260
  name,
21250
- runner_name_selector: this.#config.poolName,
21261
+ runner_name_selector: poolName ?? this.#config.poolName,
21251
21262
  key: serializeActorKey(key),
21252
21263
  input: input ? uint8ArrayToBase642(encodeCborCompat(input)) : void 0,
21253
21264
  crash_policy: crashPolicy ?? "sleep"
@@ -21384,7 +21395,7 @@ var RemoteEngineControlClient = class {
21384
21395
  path2,
21385
21396
  this.#config.maxInputSize,
21386
21397
  void 0,
21387
- "getOrCreateForKey" in target ? this.#config.poolName : void 0,
21398
+ "getOrCreateForKey" in target ? target.getOrCreateForKey.poolName ?? this.#config.poolName : void 0,
21388
21399
  options
21389
21400
  );
21390
21401
  }
package/dist/mod.mjs CHANGED
@@ -471,7 +471,7 @@ function unsupportedFeature(feature) {
471
471
  );
472
472
  }
473
473
 
474
- // ../rivetkit/dist/tsup/chunk-XWIXH7JF.js
474
+ // ../rivetkit/dist/tsup/chunk-7N4PSYCJ.js
475
475
  import {
476
476
  pino,
477
477
  stdTimeFunctions
@@ -13147,7 +13147,7 @@ var classic_default = external_exports;
13147
13147
  // ../../../node_modules/.pnpm/zod@4.1.13/node_modules/zod/v4/index.js
13148
13148
  var v4_default = classic_default;
13149
13149
 
13150
- // ../rivetkit/dist/tsup/chunk-XWIXH7JF.js
13150
+ // ../rivetkit/dist/tsup/chunk-7N4PSYCJ.js
13151
13151
  var import_invariant = __toESM(require_invariant(), 1);
13152
13152
  import * as cbor from "cbor-x";
13153
13153
  var getRivetEngine = () => getEnvUniversal("RIVET_ENGINE");
@@ -13312,7 +13312,7 @@ function noopNext() {
13312
13312
  }
13313
13313
  var package_default = {
13314
13314
  name: "rivetkit",
13315
- version: "2.3.11-rc.2",
13315
+ version: "2.3.11-rc.4",
13316
13316
  description: "Lightweight libraries for building stateful actors on edge platforms",
13317
13317
  license: "Apache-2.0",
13318
13318
  keywords: [
@@ -14605,7 +14605,7 @@ function Config({ initialBufferLength = 1024, maxBufferLength = 1024 * 1024 * 32
14605
14605
  };
14606
14606
  }
14607
14607
 
14608
- // ../rivetkit/dist/tsup/chunk-NLAW2MIM.js
14608
+ // ../rivetkit/dist/tsup/chunk-I3OXZILZ.js
14609
14609
  var config2 = /* @__PURE__ */ Config({});
14610
14610
  function readWorkflowCbor(bc) {
14611
14611
  return readData(bc);
@@ -15450,35 +15450,7 @@ function removePrefixFromKey(prefixedKey) {
15450
15450
  return prefixedKey.slice(KEYS.KV.length);
15451
15451
  }
15452
15452
 
15453
- // ../rivetkit/dist/tsup/chunk-7AFZMFPQ.js
15454
- var MIGRATION_TRANSACTION_TIMEOUT_MS = 5 * 6e4;
15455
- var AsyncMutex = class {
15456
- #locked = false;
15457
- #waiting = [];
15458
- async acquire() {
15459
- while (this.#locked) {
15460
- await new Promise((resolve) => this.#waiting.push(resolve));
15461
- }
15462
- this.#locked = true;
15463
- }
15464
- release() {
15465
- this.#locked = false;
15466
- const next = this.#waiting.shift();
15467
- if (next) {
15468
- next();
15469
- }
15470
- }
15471
- async run(fn) {
15472
- await this.acquire();
15473
- try {
15474
- return await fn();
15475
- } finally {
15476
- this.release();
15477
- }
15478
- }
15479
- };
15480
-
15481
- // ../rivetkit/dist/tsup/chunk-RVJQMOAA.js
15453
+ // ../rivetkit/dist/tsup/chunk-S26YGW4T.js
15482
15454
  function logger() {
15483
15455
  return getLogger("actor-client");
15484
15456
  }
@@ -15516,7 +15488,35 @@ async function importWebSocket() {
15516
15488
  return webSocketPromise;
15517
15489
  }
15518
15490
 
15519
- // ../rivetkit/dist/tsup/chunk-XR2KF2ZA.js
15491
+ // ../rivetkit/dist/tsup/chunk-7AFZMFPQ.js
15492
+ var MIGRATION_TRANSACTION_TIMEOUT_MS = 5 * 6e4;
15493
+ var AsyncMutex = class {
15494
+ #locked = false;
15495
+ #waiting = [];
15496
+ async acquire() {
15497
+ while (this.#locked) {
15498
+ await new Promise((resolve) => this.#waiting.push(resolve));
15499
+ }
15500
+ this.#locked = true;
15501
+ }
15502
+ release() {
15503
+ this.#locked = false;
15504
+ const next = this.#waiting.shift();
15505
+ if (next) {
15506
+ next();
15507
+ }
15508
+ }
15509
+ async run(fn) {
15510
+ await this.acquire();
15511
+ try {
15512
+ return await fn();
15513
+ } finally {
15514
+ this.release();
15515
+ }
15516
+ }
15517
+ };
15518
+
15519
+ // ../rivetkit/dist/tsup/chunk-5KLTIO35.js
15520
15520
  var import_invariant2 = __toESM(require_invariant(), 1);
15521
15521
 
15522
15522
  // ../../../node_modules/.pnpm/p-retry@6.2.1/node_modules/p-retry/index.js
@@ -15694,7 +15694,7 @@ function createVersionedDataHandler(config3) {
15694
15694
  return new VersionedDataHandler(config3);
15695
15695
  }
15696
15696
 
15697
- // ../rivetkit/dist/tsup/chunk-XR2KF2ZA.js
15697
+ // ../rivetkit/dist/tsup/chunk-5KLTIO35.js
15698
15698
  var import_invariant3 = __toESM(require_invariant(), 1);
15699
15699
  var import_invariant4 = __toESM(require_invariant(), 1);
15700
15700
  var PATH_CONNECT = "/connect";
@@ -18313,7 +18313,8 @@ async function resolveGatewayTarget(driver, target) {
18313
18313
  name: target.getOrCreateForKey.name,
18314
18314
  key: target.getOrCreateForKey.key,
18315
18315
  input: target.getOrCreateForKey.input,
18316
- region: target.getOrCreateForKey.region
18316
+ region: target.getOrCreateForKey.region,
18317
+ poolName: target.getOrCreateForKey.poolName
18317
18318
  });
18318
18319
  return output.actorId;
18319
18320
  }
@@ -18322,7 +18323,8 @@ async function resolveGatewayTarget(driver, target) {
18322
18323
  name: target.create.name,
18323
18324
  key: target.create.key,
18324
18325
  input: target.create.input,
18325
- region: target.create.region
18326
+ region: target.create.region,
18327
+ poolName: target.create.poolName
18326
18328
  });
18327
18329
  return output.actorId;
18328
18330
  }
@@ -19026,7 +19028,8 @@ var ClientRaw = class {
19026
19028
  name,
19027
19029
  key: keyArray,
19028
19030
  input: opts == null ? void 0 : opts.createWithInput,
19029
- region: opts == null ? void 0 : opts.createInRegion
19031
+ region: opts == null ? void 0 : opts.createInRegion,
19032
+ poolName: opts == null ? void 0 : opts.poolName
19030
19033
  }
19031
19034
  };
19032
19035
  const handle = this.#createHandle(
@@ -21176,7 +21179,14 @@ var RemoteEngineControlClient = class {
21176
21179
  }
21177
21180
  async getOrCreateWithKey(input) {
21178
21181
  await this.#metadataPromise;
21179
- const { name, key, input: actorInput, region, crashPolicy } = input;
21182
+ const {
21183
+ name,
21184
+ key,
21185
+ input: actorInput,
21186
+ region,
21187
+ crashPolicy,
21188
+ poolName
21189
+ } = input;
21180
21190
  logger2().info({
21181
21191
  msg: "getOrCreateWithKey: getting or creating actor via engine api",
21182
21192
  name,
@@ -21186,7 +21196,7 @@ var RemoteEngineControlClient = class {
21186
21196
  datacenter: region,
21187
21197
  name,
21188
21198
  key: serializeActorKey(key),
21189
- runner_name_selector: this.#config.poolName,
21199
+ runner_name_selector: poolName ?? this.#config.poolName,
21190
21200
  input: actorInput ? uint8ArrayToBase642(
21191
21201
  encodeCborCompat(actorInput)
21192
21202
  ) : void 0,
@@ -21206,14 +21216,15 @@ var RemoteEngineControlClient = class {
21206
21216
  key,
21207
21217
  input,
21208
21218
  region,
21209
- crashPolicy
21219
+ crashPolicy,
21220
+ poolName
21210
21221
  }) {
21211
21222
  await this.#metadataPromise;
21212
21223
  logger2().info({ msg: "creating actor via engine api", name, key });
21213
21224
  const result = await createActor(this.#config, {
21214
21225
  datacenter: region,
21215
21226
  name,
21216
- runner_name_selector: this.#config.poolName,
21227
+ runner_name_selector: poolName ?? this.#config.poolName,
21217
21228
  key: serializeActorKey(key),
21218
21229
  input: input ? uint8ArrayToBase642(encodeCborCompat(input)) : void 0,
21219
21230
  crash_policy: crashPolicy ?? "sleep"
@@ -21350,7 +21361,7 @@ var RemoteEngineControlClient = class {
21350
21361
  path2,
21351
21362
  this.#config.maxInputSize,
21352
21363
  void 0,
21353
- "getOrCreateForKey" in target ? this.#config.poolName : void 0,
21364
+ "getOrCreateForKey" in target ? target.getOrCreateForKey.poolName ?? this.#config.poolName : void 0,
21354
21365
  options
21355
21366
  );
21356
21367
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/supabase",
3
- "version": "2.3.11-rc.2",
3
+ "version": "2.3.11-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.11-rc.2",
42
+ "@rivetkit/rivetkit-wasm": "2.3.11-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.11-rc.2",
49
+ "rivetkit": "2.3.11-rc.4",
50
50
  "size-limit": "^11.1.6",
51
51
  "tsup": "^8.4.0",
52
52
  "typescript": "^5.5.2"