rivetkit 0.0.0-sqlite-sync-3-0-0-release.14341d0 → 0.0.0-sqlite-sync-3-0-1-release.95f6e2d
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/browser/client.js +2 -2
- package/dist/browser/client.js.map +1 -1
- package/dist/browser/inspector/client.js +1 -1
- package/dist/browser/inspector/client.js.map +1 -1
- package/dist/tsup/{chunk-AIGW2SKA.js → chunk-2HWY7FZU.js} +2 -2
- package/dist/tsup/{chunk-2EQ2WCO7.js → chunk-62WFU3BQ.js} +7 -7
- package/dist/tsup/chunk-62WFU3BQ.js.map +1 -0
- package/dist/tsup/{chunk-4H2LT2WB.cjs → chunk-AQWZWR2P.cjs} +2 -2
- package/dist/tsup/{chunk-4H2LT2WB.cjs.map → chunk-AQWZWR2P.cjs.map} +1 -1
- package/dist/tsup/{chunk-PSIBTOAR.cjs → chunk-E4KDQJCR.cjs} +3 -3
- package/dist/tsup/{chunk-PSIBTOAR.cjs.map → chunk-E4KDQJCR.cjs.map} +1 -1
- package/dist/tsup/{chunk-PW6FYEIV.cjs → chunk-E6HKVCPA.cjs} +3 -3
- package/dist/tsup/{chunk-PW6FYEIV.cjs.map → chunk-E6HKVCPA.cjs.map} +1 -1
- package/dist/tsup/{chunk-NE5CUQRN.cjs → chunk-EQBUH25O.cjs} +145 -145
- package/dist/tsup/chunk-EQBUH25O.cjs.map +1 -0
- package/dist/tsup/{chunk-6ZJX3KXW.js → chunk-HQHTTJW5.js} +2 -2
- package/dist/tsup/{chunk-6ZJX3KXW.js.map → chunk-HQHTTJW5.js.map} +1 -1
- package/dist/tsup/{chunk-HU4F7H3F.cjs → chunk-M5SQGPRJ.cjs} +4 -4
- package/dist/tsup/{chunk-HU4F7H3F.cjs.map → chunk-M5SQGPRJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-XAY2HIZN.cjs → chunk-MYWNJP55.cjs} +10 -10
- package/dist/tsup/{chunk-XAY2HIZN.cjs.map → chunk-MYWNJP55.cjs.map} +1 -1
- package/dist/tsup/{chunk-OX5MX7TO.js → chunk-OWZ76NSH.js} +2 -2
- package/dist/tsup/{chunk-JNJEWQZL.js → chunk-QE5MTZHB.js} +3 -3
- package/dist/tsup/{chunk-WCVYMFWJ.js → chunk-QFZY2CK3.js} +4 -4
- package/dist/tsup/{chunk-X32L7FDD.js → chunk-QIIIRYN7.js} +2 -2
- package/dist/tsup/{chunk-WX3JS4XU.cjs → chunk-UHMB5FFB.cjs} +3 -3
- package/dist/tsup/{chunk-WX3JS4XU.cjs.map → chunk-UHMB5FFB.cjs.map} +1 -1
- package/dist/tsup/{chunk-6WYQ3NJI.cjs → chunk-VKXEBB3Z.cjs} +7 -7
- package/dist/tsup/{chunk-6WYQ3NJI.cjs.map → chunk-VKXEBB3Z.cjs.map} +1 -1
- package/dist/tsup/{chunk-SLICBKAU.js → chunk-ZMVYZ7ZI.js} +2 -2
- package/dist/tsup/client/mod.cjs +5 -5
- package/dist/tsup/client/mod.js +4 -4
- package/dist/tsup/common/log.cjs +2 -2
- package/dist/tsup/common/log.js +1 -1
- package/dist/tsup/common/websocket.cjs +3 -3
- package/dist/tsup/common/websocket.js +2 -2
- package/dist/tsup/db/drizzle.cjs +2 -2
- package/dist/tsup/db/drizzle.js +1 -1
- package/dist/tsup/db/mod.cjs +3 -3
- package/dist/tsup/db/mod.js +2 -2
- package/dist/tsup/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/inspector/workflow.cjs +4 -4
- package/dist/tsup/inspector/workflow.js +3 -3
- package/dist/tsup/mod.cjs +87 -87
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +7 -7
- package/dist/tsup/test/mod.cjs +6 -6
- package/dist/tsup/test/mod.js +4 -4
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/dist/tsup/workflow/mod.cjs +12 -9
- package/dist/tsup/workflow/mod.cjs.map +1 -1
- package/dist/tsup/workflow/mod.js +9 -6
- package/dist/tsup/workflow/mod.js.map +1 -1
- package/package.json +9 -9
- package/src/client/lifecycle-errors.ts +6 -1
- package/src/workflow/driver.ts +5 -3
- package/dist/tsup/chunk-2EQ2WCO7.js.map +0 -1
- package/dist/tsup/chunk-NE5CUQRN.cjs.map +0 -1
- /package/dist/tsup/{chunk-AIGW2SKA.js.map → chunk-2HWY7FZU.js.map} +0 -0
- /package/dist/tsup/{chunk-OX5MX7TO.js.map → chunk-OWZ76NSH.js.map} +0 -0
- /package/dist/tsup/{chunk-JNJEWQZL.js.map → chunk-QE5MTZHB.js.map} +0 -0
- /package/dist/tsup/{chunk-WCVYMFWJ.js.map → chunk-QFZY2CK3.js.map} +0 -0
- /package/dist/tsup/{chunk-X32L7FDD.js.map → chunk-QIIIRYN7.js.map} +0 -0
- /package/dist/tsup/{chunk-SLICBKAU.js.map → chunk-ZMVYZ7ZI.js.map} +0 -0
package/dist/tsup/mod.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } var _class; var _class2; var _class3;
|
|
2
2
|
|
|
3
|
+
var _chunkM5SQGPRJcjs = require('./chunk-M5SQGPRJ.cjs');
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
|
|
@@ -14,10 +15,9 @@
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
17
|
-
var _chunkHDVZ6YZGcjs = require('./chunk-HDVZ6YZG.cjs');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkHDVZ6YZGcjs = require('./chunk-HDVZ6YZG.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
@@ -35,18 +35,18 @@ var _chunkHU4F7H3Fcjs = require('./chunk-HU4F7H3F.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkEQBUH25Ocjs = require('./chunk-EQBUH25O.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkRTWH3AX3cjs = require('./chunk-RTWH3AX3.cjs');
|
|
43
|
-
require('./chunk-PSIBTOAR.cjs');
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
var
|
|
47
|
+
var _chunkUHMB5FFBcjs = require('./chunk-UHMB5FFB.cjs');
|
|
49
48
|
require('./chunk-KVFIONKQ.cjs');
|
|
49
|
+
require('./chunk-E4KDQJCR.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ require('./chunk-KVFIONKQ.cjs');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkAQWZWR2Pcjs = require('./chunk-AQWZWR2P.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
@@ -98,7 +98,7 @@ var _chunkMGI2VVF6cjs = require('./chunk-MGI2VVF6.cjs');
|
|
|
98
98
|
|
|
99
99
|
// src/actor/log.ts
|
|
100
100
|
function loggerWithoutContext() {
|
|
101
|
-
return
|
|
101
|
+
return _chunkAQWZWR2Pcjs.getLogger.call(void 0, "actor-runtime");
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// src/actor/definition.ts
|
|
@@ -240,7 +240,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
240
240
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
241
241
|
var _ws = require('hono/ws');
|
|
242
242
|
function logger() {
|
|
243
|
-
return
|
|
243
|
+
return _chunkAQWZWR2Pcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
244
244
|
}
|
|
245
245
|
var InlineWebSocketAdapter = class {
|
|
246
246
|
#handler;
|
|
@@ -392,7 +392,7 @@ var InlineWebSocketAdapter = class {
|
|
|
392
392
|
|
|
393
393
|
// src/registry/log.ts
|
|
394
394
|
function logger2() {
|
|
395
|
-
return
|
|
395
|
+
return _chunkAQWZWR2Pcjs.getLogger.call(void 0, "registry");
|
|
396
396
|
}
|
|
397
397
|
|
|
398
398
|
// src/serverless/configure.ts
|
|
@@ -438,8 +438,8 @@ async function configureServerlessPool(config) {
|
|
|
438
438
|
);
|
|
439
439
|
}
|
|
440
440
|
const customConfig = config.configurePool;
|
|
441
|
-
const clientConfig =
|
|
442
|
-
const dcsRes = await
|
|
441
|
+
const clientConfig = _chunkEQBUH25Ocjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
442
|
+
const dcsRes = await _chunkEQBUH25Ocjs.getDatacenters.call(void 0, clientConfig);
|
|
443
443
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
444
444
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
445
445
|
const headers = {
|
|
@@ -461,7 +461,7 @@ async function configureServerlessPool(config) {
|
|
|
461
461
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
462
462
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
463
463
|
};
|
|
464
|
-
await
|
|
464
|
+
await _chunkEQBUH25Ocjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
465
465
|
datacenters: Object.fromEntries(
|
|
466
466
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
467
467
|
)
|
|
@@ -478,7 +478,7 @@ async function configureServerlessPool(config) {
|
|
|
478
478
|
logger2().warn({
|
|
479
479
|
msg: "serverless pool configuration attempt failed",
|
|
480
480
|
attempts,
|
|
481
|
-
error:
|
|
481
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
|
|
482
482
|
});
|
|
483
483
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
484
484
|
}
|
|
@@ -486,7 +486,7 @@ async function configureServerlessPool(config) {
|
|
|
486
486
|
logger2().error({
|
|
487
487
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
488
488
|
attempts,
|
|
489
|
-
error:
|
|
489
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, lastError)
|
|
490
490
|
});
|
|
491
491
|
throw lastError;
|
|
492
492
|
}
|
|
@@ -497,10 +497,10 @@ var _zod = require('zod');
|
|
|
497
497
|
// src/registry/config/envoy.ts
|
|
498
498
|
var _v4 = require('zod/v4');
|
|
499
499
|
var EnvoyConfigSchema = _v4.z.object({
|
|
500
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
501
|
-
version: _v4.z.number().default(() => _nullishCoalesce(
|
|
500
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
501
|
+
version: _v4.z.number().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
|
|
502
502
|
// Deprecated.
|
|
503
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
503
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
504
504
|
nodeKey: _v4.z.string().optional()
|
|
505
505
|
});
|
|
506
506
|
|
|
@@ -538,7 +538,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
538
538
|
*
|
|
539
539
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
540
540
|
*/
|
|
541
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
541
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
542
542
|
/**
|
|
543
543
|
* Token that clients should use when connecting via the public endpoint.
|
|
544
544
|
*
|
|
@@ -546,7 +546,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
546
546
|
*
|
|
547
547
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
548
548
|
*/
|
|
549
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
549
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetPublicToken.call(void 0, ))))
|
|
550
550
|
// There is no publicNamespace config option because the frontend and backend
|
|
551
551
|
// cannot use different namespaces. The namespace is extracted from the
|
|
552
552
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -600,7 +600,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
600
600
|
* Runtime binding to use for RivetKit core.
|
|
601
601
|
* */
|
|
602
602
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
603
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
603
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetkitRuntime.call(void 0, )));
|
|
604
604
|
if (rawRuntime === void 0) {
|
|
605
605
|
return "auto";
|
|
606
606
|
}
|
|
@@ -637,7 +637,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
637
637
|
* */
|
|
638
638
|
logging: _zod.z.object({
|
|
639
639
|
baseLogger: _zod.z.custom().optional(),
|
|
640
|
-
level:
|
|
640
|
+
level: _chunkAQWZWR2Pcjs.LogLevelSchema.optional()
|
|
641
641
|
}).optional().default(() => ({})),
|
|
642
642
|
// MARK: Routing
|
|
643
643
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -655,9 +655,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
655
655
|
*
|
|
656
656
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
657
657
|
*/
|
|
658
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
659
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
660
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
658
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetEngine.call(void 0, ))), () => ( _chunkAQWZWR2Pcjs.getRivetEndpoint.call(void 0, )))),
|
|
659
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetToken.call(void 0, )))),
|
|
660
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkAQWZWR2Pcjs.getRivetNamespace.call(void 0, )))),
|
|
661
661
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
662
662
|
// MARK: Client
|
|
663
663
|
// TODO:
|
|
@@ -697,21 +697,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
697
697
|
*
|
|
698
698
|
* Starts the full Rust engine process locally.
|
|
699
699
|
*/
|
|
700
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
700
|
+
startEngine: _zod.z.boolean().default(() => _chunkAQWZWR2Pcjs.getRivetRunEngine.call(void 0, )),
|
|
701
701
|
/**
|
|
702
702
|
* @experimental
|
|
703
703
|
*
|
|
704
704
|
* Host to bind the spawned local engine process to.
|
|
705
705
|
*/
|
|
706
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
706
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkEQBUH25Ocjs.ENGINE_HOST))),
|
|
707
707
|
/**
|
|
708
708
|
* @experimental
|
|
709
709
|
*
|
|
710
710
|
* Port to bind the spawned local engine process to.
|
|
711
711
|
*/
|
|
712
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
712
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkEQBUH25Ocjs.ENGINE_PORT))),
|
|
713
713
|
/** @experimental */
|
|
714
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
714
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkAQWZWR2Pcjs.VERSION))),
|
|
715
715
|
/**
|
|
716
716
|
* Starts the first-party Services actor host when RivetKit manages
|
|
717
717
|
* a local engine. Disabled by default. Set RIVET_RUN_SERVICES=1
|
|
@@ -768,7 +768,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
768
768
|
}))
|
|
769
769
|
}).transform((config, ctx) => {
|
|
770
770
|
var _a, _b, _c;
|
|
771
|
-
const isDevEnv =
|
|
771
|
+
const isDevEnv = _chunkAQWZWR2Pcjs.isDev.call(void 0, );
|
|
772
772
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
773
773
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
774
774
|
ctx.addIssue({
|
|
@@ -778,7 +778,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
778
778
|
});
|
|
779
779
|
}
|
|
780
780
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
781
|
-
const parsedEndpoint = config.endpoint ?
|
|
781
|
+
const parsedEndpoint = config.endpoint ? _chunkEQBUH25Ocjs.tryParseEndpoint.call(void 0, ctx, {
|
|
782
782
|
endpoint: config.endpoint,
|
|
783
783
|
path: ["endpoint"],
|
|
784
784
|
namespace: config.namespace,
|
|
@@ -797,18 +797,18 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
797
797
|
path: ["configurePool"]
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
-
const localEngineEndpoint =
|
|
800
|
+
const localEngineEndpoint = _chunkEQBUH25Ocjs.buildEngineEndpoint.call(void 0,
|
|
801
801
|
config.engineHost,
|
|
802
802
|
config.enginePort
|
|
803
803
|
);
|
|
804
804
|
const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? localEngineEndpoint : void 0)));
|
|
805
|
-
const startServices = _nullishCoalesce(config.startServices, () => (
|
|
805
|
+
const startServices = _nullishCoalesce(config.startServices, () => ( _chunkAQWZWR2Pcjs.getRivetRunServices.call(void 0, )));
|
|
806
806
|
const validateServerlessEndpoint = Boolean(
|
|
807
807
|
config.startEngine || parsedEndpoint
|
|
808
808
|
);
|
|
809
809
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
810
|
-
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint &&
|
|
811
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
810
|
+
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkEQBUH25Ocjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
|
|
811
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkEQBUH25Ocjs.tryParseEndpoint.call(void 0, ctx, {
|
|
812
812
|
endpoint: config.serverless.publicEndpoint,
|
|
813
813
|
path: ["serverless", "publicEndpoint"]
|
|
814
814
|
}) : void 0;
|
|
@@ -913,7 +913,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
913
913
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
914
914
|
sqlite: DocSqliteConfigSchema,
|
|
915
915
|
logging: _zod.z.object({
|
|
916
|
-
level:
|
|
916
|
+
level: _chunkAQWZWR2Pcjs.LogLevelSchema.optional().describe(
|
|
917
917
|
"Log level for RivetKit. Default: 'warn'"
|
|
918
918
|
)
|
|
919
919
|
}).optional().describe("Logging configuration."),
|
|
@@ -1694,7 +1694,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1694
1694
|
if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
|
|
1695
1695
|
return ownerCtx;
|
|
1696
1696
|
}
|
|
1697
|
-
const applicationSpan =
|
|
1697
|
+
const applicationSpan = _chunkEQBUH25Ocjs.readActiveTraceHeaders.call(void 0, );
|
|
1698
1698
|
if (!applicationSpan) {
|
|
1699
1699
|
return active;
|
|
1700
1700
|
}
|
|
@@ -1898,7 +1898,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1898
1898
|
const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
|
|
1899
1899
|
return this.#invocationContext.run(
|
|
1900
1900
|
nativeCtx,
|
|
1901
|
-
() =>
|
|
1901
|
+
() => _chunkEQBUH25Ocjs.runWithActorInvocationSpan.call(void 0, span, run)
|
|
1902
1902
|
);
|
|
1903
1903
|
}
|
|
1904
1904
|
actorInvocationTraceContext(ctx) {
|
|
@@ -2317,8 +2317,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2317
2317
|
function buildNativeHttpRequest(init) {
|
|
2318
2318
|
var _a;
|
|
2319
2319
|
const headers = new Headers(init.headers);
|
|
2320
|
-
const originalUrl = headers.get(
|
|
2321
|
-
headers.delete(
|
|
2320
|
+
const originalUrl = headers.get(_chunkEQBUH25Ocjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2321
|
+
headers.delete(_chunkEQBUH25Ocjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2322
2322
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2323
2323
|
const method2 = init.method.toUpperCase();
|
|
2324
2324
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2397,7 +2397,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2397
2397
|
}
|
|
2398
2398
|
} catch (error) {
|
|
2399
2399
|
try {
|
|
2400
|
-
await stream.error(
|
|
2400
|
+
await stream.error(_chunkAQWZWR2Pcjs.stringifyError.call(void 0, error));
|
|
2401
2401
|
} catch (streamError) {
|
|
2402
2402
|
logger2().debug({
|
|
2403
2403
|
msg: "failed to report native http response stream error",
|
|
@@ -3687,7 +3687,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3687
3687
|
nativeError = error;
|
|
3688
3688
|
logger2().warn({
|
|
3689
3689
|
msg: "native runtime failed to load; falling back to wasm",
|
|
3690
|
-
error:
|
|
3690
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
|
|
3691
3691
|
});
|
|
3692
3692
|
}
|
|
3693
3693
|
try {
|
|
@@ -3696,7 +3696,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3696
3696
|
throw new (0, _chunkMGI2VVF6cjs.RivetError)(
|
|
3697
3697
|
"config",
|
|
3698
3698
|
"runtime_unavailable",
|
|
3699
|
-
`RivetKit could not load a core runtime. Native runtime: ${
|
|
3699
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunkAQWZWR2Pcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkAQWZWR2Pcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3700
3700
|
{
|
|
3701
3701
|
public: true,
|
|
3702
3702
|
statusCode: 500
|
|
@@ -3904,7 +3904,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3904
3904
|
}).catch((error) => {
|
|
3905
3905
|
logger2().warn({
|
|
3906
3906
|
msg: "deferred native sleep cleanup failed",
|
|
3907
|
-
error:
|
|
3907
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
|
|
3908
3908
|
});
|
|
3909
3909
|
});
|
|
3910
3910
|
return;
|
|
@@ -4094,10 +4094,10 @@ function decodeValue(value) {
|
|
|
4094
4094
|
if (!value || value.length === 0) {
|
|
4095
4095
|
return void 0;
|
|
4096
4096
|
}
|
|
4097
|
-
return
|
|
4097
|
+
return _chunkAQWZWR2Pcjs.decodeCborCompat.call(void 0, value);
|
|
4098
4098
|
}
|
|
4099
4099
|
function encodeValue(value) {
|
|
4100
|
-
return
|
|
4100
|
+
return _chunkAQWZWR2Pcjs.encodeCborCompat.call(void 0, value);
|
|
4101
4101
|
}
|
|
4102
4102
|
function normalizeArgs(value) {
|
|
4103
4103
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -4133,7 +4133,7 @@ function isStructuredBridgeError(error) {
|
|
|
4133
4133
|
return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
4134
4134
|
}
|
|
4135
4135
|
function encodeNativeCallbackError(error) {
|
|
4136
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
4136
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkAQWZWR2Pcjs.deconstructError.call(void 0, error, true);
|
|
4137
4137
|
const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
|
|
4138
4138
|
if (droppedMetadataCause !== void 0) {
|
|
4139
4139
|
logger2().warn(
|
|
@@ -4195,7 +4195,7 @@ function decodeWorkflowCbor(data) {
|
|
|
4195
4195
|
return null;
|
|
4196
4196
|
}
|
|
4197
4197
|
try {
|
|
4198
|
-
return
|
|
4198
|
+
return _chunkAQWZWR2Pcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
4199
4199
|
} catch (e3) {
|
|
4200
4200
|
return null;
|
|
4201
4201
|
}
|
|
@@ -4308,7 +4308,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
4308
4308
|
if (data === null) {
|
|
4309
4309
|
return null;
|
|
4310
4310
|
}
|
|
4311
|
-
const history =
|
|
4311
|
+
const history = _chunkM5SQGPRJcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
4312
4312
|
return jsonSafe({
|
|
4313
4313
|
nameRegistry: [...history.nameRegistry],
|
|
4314
4314
|
entries: history.entries.map((entry) => ({
|
|
@@ -4454,7 +4454,7 @@ var NativeConnAdapter = class {
|
|
|
4454
4454
|
},
|
|
4455
4455
|
(newValue) => {
|
|
4456
4456
|
assertCurrentState();
|
|
4457
|
-
|
|
4457
|
+
_chunkAQWZWR2Pcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4458
4458
|
}
|
|
4459
4459
|
);
|
|
4460
4460
|
}
|
|
@@ -4462,7 +4462,7 @@ var NativeConnAdapter = class {
|
|
|
4462
4462
|
var _a;
|
|
4463
4463
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4464
4464
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4465
|
-
|
|
4465
|
+
_chunkAQWZWR2Pcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4466
4466
|
this.#writeState(nextValue, { writeNative: true });
|
|
4467
4467
|
}
|
|
4468
4468
|
initializeState(value) {
|
|
@@ -5541,7 +5541,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5541
5541
|
},
|
|
5542
5542
|
(newValue) => {
|
|
5543
5543
|
assertCurrentState();
|
|
5544
|
-
|
|
5544
|
+
_chunkAQWZWR2Pcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5545
5545
|
}
|
|
5546
5546
|
);
|
|
5547
5547
|
}
|
|
@@ -5553,7 +5553,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5553
5553
|
}
|
|
5554
5554
|
this.#assertCanMutateState();
|
|
5555
5555
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5556
|
-
|
|
5556
|
+
_chunkAQWZWR2Pcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5557
5557
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5558
5558
|
}
|
|
5559
5559
|
initializeState(value) {
|
|
@@ -5767,7 +5767,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5767
5767
|
log: {
|
|
5768
5768
|
debug: (obj) => logger2().debug(obj)
|
|
5769
5769
|
},
|
|
5770
|
-
nativeDatabaseProvider:
|
|
5770
|
+
nativeDatabaseProvider: _chunkUHMB5FFBcjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5771
5771
|
{
|
|
5772
5772
|
open: async (requestedActorId) => {
|
|
5773
5773
|
void requestedActorId;
|
|
@@ -5792,7 +5792,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5792
5792
|
return this.#db;
|
|
5793
5793
|
}
|
|
5794
5794
|
#bindDatabaseClient(client) {
|
|
5795
|
-
return
|
|
5795
|
+
return _chunkUHMB5FFBcjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5796
5796
|
enter: async () => await this.#enterStateTransaction(),
|
|
5797
5797
|
exit: (scope) => this.#exitStateTransaction(
|
|
5798
5798
|
scope
|
|
@@ -5996,7 +5996,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5996
5996
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5997
5997
|
logger2().warn({
|
|
5998
5998
|
msg: "keepAwake promise rejected",
|
|
5999
|
-
error:
|
|
5999
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
|
|
6000
6000
|
});
|
|
6001
6001
|
}).then(() => null);
|
|
6002
6002
|
try {
|
|
@@ -6497,7 +6497,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6497
6497
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6498
6498
|
var _a;
|
|
6499
6499
|
const config = definition.config;
|
|
6500
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6500
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkUHMB5FFBcjs.db.call(void 0, )));
|
|
6501
6501
|
const actionHandlers = _chunkHDVZ6YZGcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6502
6502
|
const schemaConfig = {
|
|
6503
6503
|
actionInputSchemas: _chunkHDVZ6YZGcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6508,9 +6508,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6508
6508
|
events: config.events,
|
|
6509
6509
|
queues: config.queues
|
|
6510
6510
|
};
|
|
6511
|
-
const createClient = (ctx) =>
|
|
6512
|
-
new (0,
|
|
6513
|
-
|
|
6511
|
+
const createClient = (ctx) => _chunkEQBUH25Ocjs.createClientWithDriver.call(void 0,
|
|
6512
|
+
new (0, _chunkEQBUH25Ocjs.RemoteEngineControlClient)(
|
|
6513
|
+
_chunkEQBUH25Ocjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6514
6514
|
),
|
|
6515
6515
|
{
|
|
6516
6516
|
encoding: "bare",
|
|
@@ -6702,7 +6702,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6702
6702
|
400
|
|
6703
6703
|
);
|
|
6704
6704
|
}
|
|
6705
|
-
const cbor =
|
|
6705
|
+
const cbor = _chunkAQWZWR2Pcjs.encodeCborCompat.call(void 0,
|
|
6706
6706
|
_nullishCoalesce(body.body, () => ( null))
|
|
6707
6707
|
);
|
|
6708
6708
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -7299,7 +7299,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7299
7299
|
...request,
|
|
7300
7300
|
abortController: requestAbortController
|
|
7301
7301
|
});
|
|
7302
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
7302
|
+
const rawConnParams = handlerRequest.headers.get(_chunkEQBUH25Ocjs.HEADER_CONN_PARAMS);
|
|
7303
7303
|
let requestCtx;
|
|
7304
7304
|
let conn;
|
|
7305
7305
|
let removeRequestAbortListener;
|
|
@@ -7356,7 +7356,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7356
7356
|
requestCtx,
|
|
7357
7357
|
handlerRequest
|
|
7358
7358
|
);
|
|
7359
|
-
if (!
|
|
7359
|
+
if (!_chunkEQBUH25Ocjs.isResponseLike.call(void 0, response)) {
|
|
7360
7360
|
throw new Error(
|
|
7361
7361
|
"onRequest handler must return a Response"
|
|
7362
7362
|
);
|
|
@@ -7451,7 +7451,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7451
7451
|
var _a2;
|
|
7452
7452
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
7453
7453
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
7454
|
-
return history == null ? void 0 :
|
|
7454
|
+
return history == null ? void 0 : _chunkAQWZWR2Pcjs.toUint8Array.call(void 0, history);
|
|
7455
7455
|
}
|
|
7456
7456
|
) : void 0,
|
|
7457
7457
|
replayWorkflow: _chunkHDVZ6YZGcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -7465,7 +7465,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7465
7465
|
return void 0;
|
|
7466
7466
|
}
|
|
7467
7467
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
7468
|
-
return history == null ? void 0 :
|
|
7468
|
+
return history == null ? void 0 : _chunkAQWZWR2Pcjs.toUint8Array.call(void 0, history);
|
|
7469
7469
|
}
|
|
7470
7470
|
) : void 0,
|
|
7471
7471
|
actions: Object.fromEntries(
|
|
@@ -7602,7 +7602,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7602
7602
|
startServices: resolveServicesBinary && config.startServices,
|
|
7603
7603
|
handleInspectorHttpInRuntime: true,
|
|
7604
7604
|
serverlessBasePath: config.serverless.basePath,
|
|
7605
|
-
serverlessPackageVersion:
|
|
7605
|
+
serverlessPackageVersion: _chunkAQWZWR2Pcjs.VERSION,
|
|
7606
7606
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7607
7607
|
serverlessClientNamespace: config.publicNamespace,
|
|
7608
7608
|
serverlessClientToken: config.publicToken,
|
|
@@ -7615,11 +7615,11 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7615
7615
|
} catch (error) {
|
|
7616
7616
|
logger2().warn({
|
|
7617
7617
|
msg: "could not resolve a local engine binary; if a local engine must be spawned it will fail with engine.binary_unavailable \u2014 set RIVET_ENGINE_BINARY_PATH or install the @rivetkit/engine-cli platform package",
|
|
7618
|
-
error:
|
|
7618
|
+
error: _chunkAQWZWR2Pcjs.stringifyError.call(void 0, error)
|
|
7619
7619
|
});
|
|
7620
7620
|
}
|
|
7621
7621
|
if (resolveServicesBinary && config.startServices) {
|
|
7622
|
-
const servicesBinary =
|
|
7622
|
+
const servicesBinary = _chunkAQWZWR2Pcjs.getEnvUniversal.call(void 0, "RIVET_SERVICES_BINARY");
|
|
7623
7623
|
if (servicesBinary) {
|
|
7624
7624
|
serveConfig.servicesBinaryPath = servicesBinary;
|
|
7625
7625
|
} else {
|
|
@@ -7634,13 +7634,13 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7634
7634
|
serveConfig.engineHost = config.engineHost;
|
|
7635
7635
|
serveConfig.enginePort = config.enginePort;
|
|
7636
7636
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7637
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7637
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkAQWZWR2Pcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7638
7638
|
}
|
|
7639
7639
|
return serveConfig;
|
|
7640
7640
|
}
|
|
7641
7641
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7642
7642
|
var _a;
|
|
7643
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7643
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkAQWZWR2Pcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7644
7644
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7645
7645
|
}
|
|
7646
7646
|
if (runtime.kind === "napi") {
|
|
@@ -7712,7 +7712,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7712
7712
|
signal: abortController.signal
|
|
7713
7713
|
})
|
|
7714
7714
|
);
|
|
7715
|
-
if (!
|
|
7715
|
+
if (!_chunkEQBUH25Ocjs.isResponseLike.call(void 0, response)) {
|
|
7716
7716
|
throw new TypeError(
|
|
7717
7717
|
"registry.listen() application fetch must return a Response"
|
|
7718
7718
|
);
|
|
@@ -7762,7 +7762,7 @@ var Registry = class {
|
|
|
7762
7762
|
var _a;
|
|
7763
7763
|
this.#config = config;
|
|
7764
7764
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7765
|
-
|
|
7765
|
+
_chunkAQWZWR2Pcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7766
7766
|
}
|
|
7767
7767
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7768
7768
|
this.routes = {
|
|
@@ -7994,10 +7994,10 @@ var Registry = class {
|
|
|
7994
7994
|
if (!opts.application) {
|
|
7995
7995
|
rejectServerless();
|
|
7996
7996
|
}
|
|
7997
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7998
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7997
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkAQWZWR2Pcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7998
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkAQWZWR2Pcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7999
7999
|
const config = this.parseConfig();
|
|
8000
|
-
if (opts.application &&
|
|
8000
|
+
if (opts.application && _chunkAQWZWR2Pcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
8001
8001
|
if (config.runtime === "wasm") {
|
|
8002
8002
|
throw new Error(
|
|
8003
8003
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -8073,7 +8073,7 @@ var Registry = class {
|
|
|
8073
8073
|
return jsonRouteResponse(503, {
|
|
8074
8074
|
status: "not_started",
|
|
8075
8075
|
runtime: "rivetkit",
|
|
8076
|
-
version:
|
|
8076
|
+
version: _chunkAQWZWR2Pcjs.VERSION
|
|
8077
8077
|
});
|
|
8078
8078
|
}
|
|
8079
8079
|
const { runtime, registry } = configured;
|
|
@@ -8081,7 +8081,7 @@ var Registry = class {
|
|
|
8081
8081
|
return jsonRouteResponse(501, {
|
|
8082
8082
|
status: "unsupported",
|
|
8083
8083
|
runtime: "rivetkit",
|
|
8084
|
-
version:
|
|
8084
|
+
version: _chunkAQWZWR2Pcjs.VERSION
|
|
8085
8085
|
});
|
|
8086
8086
|
}
|
|
8087
8087
|
const response = await runtime.registryHealth(registry);
|
|
@@ -8156,14 +8156,14 @@ var Registry = class {
|
|
|
8156
8156
|
var _a;
|
|
8157
8157
|
if (!this.#runtimeServePromise) {
|
|
8158
8158
|
const configuredEnvoyVersion = (_a = this.#config.node) == null ? void 0 : _a.version;
|
|
8159
|
-
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" :
|
|
8159
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkAQWZWR2Pcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
|
|
8160
8160
|
logger2().info({
|
|
8161
8161
|
msg: "starting rivetkit envoy",
|
|
8162
|
-
rivetkitVersion:
|
|
8162
|
+
rivetkitVersion: _chunkAQWZWR2Pcjs.VERSION,
|
|
8163
8163
|
envoyVersion: config.node.version,
|
|
8164
8164
|
envoyVersionSource
|
|
8165
8165
|
});
|
|
8166
|
-
if (envoyVersionSource === "default" &&
|
|
8166
|
+
if (envoyVersionSource === "default" && _chunkAQWZWR2Pcjs.getNodeEnv.call(void 0, ) === "production") {
|
|
8167
8167
|
logger2().error({
|
|
8168
8168
|
msg: "node version defaulted because neither config.node.version nor RIVET_NODE_VERSION is set; actors will not drain automatically across deploys. See https://rivet.dev/docs/actors/versions",
|
|
8169
8169
|
envoyVersion: config.node.version,
|
|
@@ -8252,7 +8252,7 @@ var Registry = class {
|
|
|
8252
8252
|
const modeAPromise = this.#runtimeServeConfiguredPromise;
|
|
8253
8253
|
const modeBPromise = this.#runtimeServerlessPromise;
|
|
8254
8254
|
const runtimes = /* @__PURE__ */ new Set();
|
|
8255
|
-
const localDevSignal = signalDriven &&
|
|
8255
|
+
const localDevSignal = signalDriven && _chunkAQWZWR2Pcjs.getNodeEnv.call(void 0, ) !== "production" && config.engineSpawn && config.endpoint !== void 0 && _chunkEQBUH25Ocjs.isLocalEngineEndpoint.call(void 0, config.endpoint);
|
|
8256
8256
|
let gracePeriodMs = (_a = config.shutdown) == null ? void 0 : _a.gracePeriodMs;
|
|
8257
8257
|
if (gracePeriodMs === void 0) {
|
|
8258
8258
|
gracePeriodMs = localDevSignal ? LOCAL_DEV_SHUTDOWN_GRACE_PERIOD_MS : await _asyncNullishCoalesce(await this.#actorStopThresholdMs(
|
|
@@ -8364,7 +8364,7 @@ var Registry = class {
|
|
|
8364
8364
|
}
|
|
8365
8365
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
8366
8366
|
try {
|
|
8367
|
-
if (
|
|
8367
|
+
if (_chunkAQWZWR2Pcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8368
8368
|
return Promise.reject(
|
|
8369
8369
|
new Error(
|
|
8370
8370
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -8388,7 +8388,7 @@ var Registry = class {
|
|
|
8388
8388
|
if (!configuredRegistryPromise || !serveLifecyclePromise) {
|
|
8389
8389
|
throw new Error("registry envoy startup did not initialize");
|
|
8390
8390
|
}
|
|
8391
|
-
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 &&
|
|
8391
|
+
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 && _chunkEQBUH25Ocjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? LOCAL_ENGINE_READY_TIMEOUT_MS : REGISTRY_READY_TIMEOUT_MS;
|
|
8392
8392
|
let timeout;
|
|
8393
8393
|
const timeoutPromise = new Promise((_resolve, reject) => {
|
|
8394
8394
|
var _a;
|
|
@@ -8438,8 +8438,8 @@ var Registry = class {
|
|
|
8438
8438
|
* ```
|
|
8439
8439
|
*/
|
|
8440
8440
|
start() {
|
|
8441
|
-
if (
|
|
8442
|
-
const publicDir = _nullishCoalesce(
|
|
8441
|
+
if (_chunkAQWZWR2Pcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8442
|
+
const publicDir = _nullishCoalesce(_chunkAQWZWR2Pcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
8443
8443
|
this.listen({ publicDir }).catch((error) => {
|
|
8444
8444
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
8445
8445
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -8460,13 +8460,13 @@ var Registry = class {
|
|
|
8460
8460
|
};
|
|
8461
8461
|
console.log();
|
|
8462
8462
|
console.log(
|
|
8463
|
-
` RivetKit ${
|
|
8463
|
+
` RivetKit ${_chunkAQWZWR2Pcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
8464
8464
|
);
|
|
8465
8465
|
if (config.namespace !== "default") {
|
|
8466
8466
|
logLine("Namespace", config.namespace);
|
|
8467
8467
|
}
|
|
8468
8468
|
if (config.endpoint) {
|
|
8469
|
-
const endpointType = config.startEngine ||
|
|
8469
|
+
const endpointType = config.startEngine || _chunkEQBUH25Ocjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
|
|
8470
8470
|
logLine("Endpoint", `${config.endpoint} (${endpointType})`);
|
|
8471
8471
|
}
|
|
8472
8472
|
if (kind === "serverless" && config.publicEndpoint) {
|
|
@@ -8536,5 +8536,5 @@ function setup(input) {
|
|
|
8536
8536
|
|
|
8537
8537
|
|
|
8538
8538
|
|
|
8539
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
8539
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkEQBUH25Ocjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkMGI2VVF6cjs.RivetError; exports.ActorsSchema = ActorsSchema; exports.DocConfigurePoolSchema = DocConfigurePoolSchema; exports.DocEnvoyConfigSchema = DocEnvoyConfigSchema; exports.DocRegistryConfigSchema = DocRegistryConfigSchema; exports.DocServerlessConfigSchema = DocServerlessConfigSchema; exports.DocSqliteConfigSchema = DocSqliteConfigSchema; exports.InlineWebSocketAdapter = InlineWebSocketAdapter; exports.Registry = Registry; exports.RegistryConfigSchema = RegistryConfigSchema; exports.RivetError = _chunkMGI2VVF6cjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkMGI2VVF6cjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkEQBUH25Ocjs.createClientWithDriver; exports.defineRunHandler = _chunkHDVZ6YZGcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkAQWZWR2Pcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkAQWZWR2Pcjs.toUint8Array;
|
|
8540
8540
|
//# sourceMappingURL=mod.cjs.map
|