rivetkit 3.0.4 → 3.0.5
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 +1 -1
- 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-3WZJFRCB.cjs → chunk-4QY3LBN6.cjs} +3 -3
- package/dist/tsup/{chunk-3WZJFRCB.cjs.map → chunk-4QY3LBN6.cjs.map} +1 -1
- package/dist/tsup/{chunk-SVEL5ZO3.cjs → chunk-BY6YFH2K.cjs} +2 -2
- package/dist/tsup/{chunk-SVEL5ZO3.cjs.map → chunk-BY6YFH2K.cjs.map} +1 -1
- package/dist/tsup/{chunk-UYBLHHFG.cjs → chunk-D3VCNACM.cjs} +7 -7
- package/dist/tsup/{chunk-UYBLHHFG.cjs.map → chunk-D3VCNACM.cjs.map} +1 -1
- package/dist/tsup/{chunk-T5Z3FG5Y.cjs → chunk-DL7PKMEP.cjs} +3 -3
- package/dist/tsup/{chunk-T5Z3FG5Y.cjs.map → chunk-DL7PKMEP.cjs.map} +1 -1
- package/dist/tsup/{chunk-L3LCIZBH.js → chunk-EC72YM63.js} +2 -2
- package/dist/tsup/{chunk-SIVNBXKO.js → chunk-MVJLQPWC.js} +2 -2
- package/dist/tsup/{chunk-IIB4ZPZI.js → chunk-NEGCEZM6.js} +2 -2
- package/dist/tsup/{chunk-IIB4ZPZI.js.map → chunk-NEGCEZM6.js.map} +1 -1
- package/dist/tsup/{chunk-4L27QRHE.cjs → chunk-NHB4KDZL.cjs} +3 -3
- package/dist/tsup/{chunk-4L27QRHE.cjs.map → chunk-NHB4KDZL.cjs.map} +1 -1
- package/dist/tsup/{chunk-F5VDYHOA.js → chunk-NNKSJSMR.js} +3 -3
- package/dist/tsup/{chunk-NXAFFMGH.cjs → chunk-NSDT2GWM.cjs} +144 -144
- package/dist/tsup/{chunk-NXAFFMGH.cjs.map → chunk-NSDT2GWM.cjs.map} +1 -1
- package/dist/tsup/{chunk-UTNZZOMF.cjs → chunk-STFQQWYY.cjs} +4 -4
- package/dist/tsup/{chunk-UTNZZOMF.cjs.map → chunk-STFQQWYY.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZT7GZRFQ.js → chunk-VJROJMLX.js} +4 -4
- package/dist/tsup/{chunk-LW57U7VQ.cjs → chunk-WIL6MWU4.cjs} +10 -10
- package/dist/tsup/{chunk-LW57U7VQ.cjs.map → chunk-WIL6MWU4.cjs.map} +1 -1
- package/dist/tsup/{chunk-NRTL2RDM.js → chunk-WNURZU2P.js} +2 -2
- package/dist/tsup/{chunk-2PHT2DGL.js → chunk-XILB6EBK.js} +6 -6
- package/dist/tsup/{chunk-4YUA7CTJ.js → chunk-YPAJANQG.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 +86 -86
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +5 -5
- 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 +7 -7
- package/dist/tsup/workflow/mod.js +4 -4
- package/package.json +9 -9
- /package/dist/tsup/{chunk-L3LCIZBH.js.map → chunk-EC72YM63.js.map} +0 -0
- /package/dist/tsup/{chunk-SIVNBXKO.js.map → chunk-MVJLQPWC.js.map} +0 -0
- /package/dist/tsup/{chunk-F5VDYHOA.js.map → chunk-NNKSJSMR.js.map} +0 -0
- /package/dist/tsup/{chunk-ZT7GZRFQ.js.map → chunk-VJROJMLX.js.map} +0 -0
- /package/dist/tsup/{chunk-NRTL2RDM.js.map → chunk-WNURZU2P.js.map} +0 -0
- /package/dist/tsup/{chunk-2PHT2DGL.js.map → chunk-XILB6EBK.js.map} +0 -0
- /package/dist/tsup/{chunk-4YUA7CTJ.js.map → chunk-YPAJANQG.js.map} +0 -0
package/dist/tsup/mod.cjs
CHANGED
|
@@ -1,6 +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
|
|
3
|
+
var _chunkSTFQQWYYcjs = require('./chunk-STFQQWYY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -35,18 +35,18 @@ var _chunkINFADXXIcjs = require('./chunk-INFADXXI.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkNSDT2GWMcjs = require('./chunk-NSDT2GWM.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkRTWH3AX3cjs = require('./chunk-RTWH3AX3.cjs');
|
|
43
|
+
require('./chunk-NHB4KDZL.cjs');
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
|
|
47
|
-
var
|
|
48
|
+
var _chunkDL7PKMEPcjs = require('./chunk-DL7PKMEP.cjs');
|
|
48
49
|
require('./chunk-KVFIONKQ.cjs');
|
|
49
|
-
require('./chunk-4L27QRHE.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ require('./chunk-4L27QRHE.cjs');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunkBY6YFH2Kcjs = require('./chunk-BY6YFH2K.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 _chunkBY6YFH2Kcjs.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 _chunkBY6YFH2Kcjs.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 _chunkBY6YFH2Kcjs.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 = _chunkNSDT2GWMcjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
442
|
+
const dcsRes = await _chunkNSDT2GWMcjs.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 _chunkNSDT2GWMcjs.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: _chunkBY6YFH2Kcjs.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: _chunkBY6YFH2Kcjs.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(_chunkBY6YFH2Kcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
501
|
+
version: _v4.z.number().default(() => _nullishCoalesce(_chunkBY6YFH2Kcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
|
|
502
502
|
// Deprecated.
|
|
503
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
503
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkBY6YFH2Kcjs.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, () => ( _chunkBY6YFH2Kcjs.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, () => ( _chunkBY6YFH2Kcjs.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, () => ( _chunkBY6YFH2Kcjs.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: _chunkBY6YFH2Kcjs.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, () => ( _chunkBY6YFH2Kcjs.getRivetEngine.call(void 0, ))), () => ( _chunkBY6YFH2Kcjs.getRivetEndpoint.call(void 0, )))),
|
|
659
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkBY6YFH2Kcjs.getRivetToken.call(void 0, )))),
|
|
660
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkBY6YFH2Kcjs.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(() => _chunkBY6YFH2Kcjs.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(_chunkBY6YFH2Kcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkNSDT2GWMcjs.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(_chunkBY6YFH2Kcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkNSDT2GWMcjs.ENGINE_PORT))),
|
|
713
713
|
/** @experimental */
|
|
714
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
714
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkBY6YFH2Kcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkBY6YFH2Kcjs.VERSION))),
|
|
715
715
|
/**
|
|
716
716
|
* Starts the first-party Services actor host when RivetKit manages
|
|
717
717
|
* a local engine. Enabled by default for a managed local Engine. Set
|
|
@@ -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 = _chunkBY6YFH2Kcjs.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 ? _chunkNSDT2GWMcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
782
782
|
endpoint: config.endpoint,
|
|
783
783
|
path: ["endpoint"],
|
|
784
784
|
namespace: config.namespace,
|
|
@@ -797,19 +797,19 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
797
797
|
path: ["configurePool"]
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
|
-
const localEngineEndpoint =
|
|
800
|
+
const localEngineEndpoint = _chunkNSDT2GWMcjs.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
805
|
const engineSpawn = !parsedEndpoint && Boolean(endpoint);
|
|
806
|
-
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => (
|
|
806
|
+
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkBY6YFH2Kcjs.getRivetRunServices.call(void 0, ))), () => ( engineSpawn));
|
|
807
807
|
const validateServerlessEndpoint = Boolean(
|
|
808
808
|
config.startEngine || parsedEndpoint
|
|
809
809
|
);
|
|
810
810
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
811
|
-
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint &&
|
|
812
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
811
|
+
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkNSDT2GWMcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
|
|
812
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkNSDT2GWMcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
813
813
|
endpoint: config.serverless.publicEndpoint,
|
|
814
814
|
path: ["serverless", "publicEndpoint"]
|
|
815
815
|
}) : void 0;
|
|
@@ -914,7 +914,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
914
914
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
915
915
|
sqlite: DocSqliteConfigSchema,
|
|
916
916
|
logging: _zod.z.object({
|
|
917
|
-
level:
|
|
917
|
+
level: _chunkBY6YFH2Kcjs.LogLevelSchema.optional().describe(
|
|
918
918
|
"Log level for RivetKit. Default: 'warn'"
|
|
919
919
|
)
|
|
920
920
|
}).optional().describe("Logging configuration."),
|
|
@@ -1554,7 +1554,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1554
1554
|
if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
|
|
1555
1555
|
return ownerCtx;
|
|
1556
1556
|
}
|
|
1557
|
-
const applicationSpan =
|
|
1557
|
+
const applicationSpan = _chunkNSDT2GWMcjs.readActiveTraceHeaders.call(void 0, );
|
|
1558
1558
|
if (!applicationSpan) {
|
|
1559
1559
|
return active;
|
|
1560
1560
|
}
|
|
@@ -1767,7 +1767,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1767
1767
|
const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
|
|
1768
1768
|
return this.#invocationContext.run(
|
|
1769
1769
|
nativeCtx,
|
|
1770
|
-
() =>
|
|
1770
|
+
() => _chunkNSDT2GWMcjs.runWithActorInvocationSpan.call(void 0, span, run)
|
|
1771
1771
|
);
|
|
1772
1772
|
}
|
|
1773
1773
|
actorInvocationTraceContext(ctx) {
|
|
@@ -2142,8 +2142,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2142
2142
|
function buildNativeHttpRequest(init) {
|
|
2143
2143
|
var _a;
|
|
2144
2144
|
const headers = new Headers(init.headers);
|
|
2145
|
-
const originalUrl = headers.get(
|
|
2146
|
-
headers.delete(
|
|
2145
|
+
const originalUrl = headers.get(_chunkNSDT2GWMcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2146
|
+
headers.delete(_chunkNSDT2GWMcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2147
2147
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2148
2148
|
const method2 = init.method.toUpperCase();
|
|
2149
2149
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2222,7 +2222,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
} catch (error) {
|
|
2224
2224
|
try {
|
|
2225
|
-
await stream.error(
|
|
2225
|
+
await stream.error(_chunkBY6YFH2Kcjs.stringifyError.call(void 0, error));
|
|
2226
2226
|
} catch (streamError) {
|
|
2227
2227
|
logger2().debug({
|
|
2228
2228
|
msg: "failed to report native http response stream error",
|
|
@@ -3461,7 +3461,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3461
3461
|
nativeError = error;
|
|
3462
3462
|
logger2().warn({
|
|
3463
3463
|
msg: "native runtime failed to load; falling back to wasm",
|
|
3464
|
-
error:
|
|
3464
|
+
error: _chunkBY6YFH2Kcjs.stringifyError.call(void 0, error)
|
|
3465
3465
|
});
|
|
3466
3466
|
}
|
|
3467
3467
|
try {
|
|
@@ -3470,7 +3470,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3470
3470
|
throw new (0, _chunkMGI2VVF6cjs.RivetError)(
|
|
3471
3471
|
"config",
|
|
3472
3472
|
"runtime_unavailable",
|
|
3473
|
-
`RivetKit could not load a core runtime. Native runtime: ${
|
|
3473
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunkBY6YFH2Kcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkBY6YFH2Kcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3474
3474
|
{
|
|
3475
3475
|
public: true,
|
|
3476
3476
|
statusCode: 500
|
|
@@ -3678,7 +3678,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3678
3678
|
}).catch((error) => {
|
|
3679
3679
|
logger2().warn({
|
|
3680
3680
|
msg: "deferred native sleep cleanup failed",
|
|
3681
|
-
error:
|
|
3681
|
+
error: _chunkBY6YFH2Kcjs.stringifyError.call(void 0, error)
|
|
3682
3682
|
});
|
|
3683
3683
|
});
|
|
3684
3684
|
return;
|
|
@@ -3850,10 +3850,10 @@ function decodeValue(value) {
|
|
|
3850
3850
|
if (!value || value.length === 0) {
|
|
3851
3851
|
return void 0;
|
|
3852
3852
|
}
|
|
3853
|
-
return
|
|
3853
|
+
return _chunkBY6YFH2Kcjs.decodeCborCompat.call(void 0, value);
|
|
3854
3854
|
}
|
|
3855
3855
|
function encodeValue(value) {
|
|
3856
|
-
return
|
|
3856
|
+
return _chunkBY6YFH2Kcjs.encodeCborCompat.call(void 0, value);
|
|
3857
3857
|
}
|
|
3858
3858
|
function normalizeArgs(value) {
|
|
3859
3859
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -3889,7 +3889,7 @@ function isStructuredBridgeError(error) {
|
|
|
3889
3889
|
return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
3890
3890
|
}
|
|
3891
3891
|
function encodeNativeCallbackError(error) {
|
|
3892
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
3892
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkBY6YFH2Kcjs.deconstructError.call(void 0, error, true);
|
|
3893
3893
|
const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
|
|
3894
3894
|
if (droppedMetadataCause !== void 0) {
|
|
3895
3895
|
logger2().warn(
|
|
@@ -3951,7 +3951,7 @@ function decodeWorkflowCbor(data) {
|
|
|
3951
3951
|
return null;
|
|
3952
3952
|
}
|
|
3953
3953
|
try {
|
|
3954
|
-
return
|
|
3954
|
+
return _chunkBY6YFH2Kcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
3955
3955
|
} catch (e3) {
|
|
3956
3956
|
return null;
|
|
3957
3957
|
}
|
|
@@ -4064,7 +4064,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
4064
4064
|
if (data === null) {
|
|
4065
4065
|
return null;
|
|
4066
4066
|
}
|
|
4067
|
-
const history =
|
|
4067
|
+
const history = _chunkSTFQQWYYcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
4068
4068
|
return jsonSafe({
|
|
4069
4069
|
nameRegistry: [...history.nameRegistry],
|
|
4070
4070
|
entries: history.entries.map((entry) => ({
|
|
@@ -4210,7 +4210,7 @@ var NativeConnAdapter = class {
|
|
|
4210
4210
|
},
|
|
4211
4211
|
(newValue) => {
|
|
4212
4212
|
assertCurrentState();
|
|
4213
|
-
|
|
4213
|
+
_chunkBY6YFH2Kcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4214
4214
|
}
|
|
4215
4215
|
);
|
|
4216
4216
|
}
|
|
@@ -4218,7 +4218,7 @@ var NativeConnAdapter = class {
|
|
|
4218
4218
|
var _a;
|
|
4219
4219
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4220
4220
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4221
|
-
|
|
4221
|
+
_chunkBY6YFH2Kcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4222
4222
|
this.#writeState(nextValue, { writeNative: true });
|
|
4223
4223
|
}
|
|
4224
4224
|
initializeState(value) {
|
|
@@ -5297,7 +5297,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5297
5297
|
},
|
|
5298
5298
|
(newValue) => {
|
|
5299
5299
|
assertCurrentState();
|
|
5300
|
-
|
|
5300
|
+
_chunkBY6YFH2Kcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5301
5301
|
}
|
|
5302
5302
|
);
|
|
5303
5303
|
}
|
|
@@ -5309,7 +5309,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5309
5309
|
}
|
|
5310
5310
|
this.#assertCanMutateState();
|
|
5311
5311
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5312
|
-
|
|
5312
|
+
_chunkBY6YFH2Kcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5313
5313
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5314
5314
|
}
|
|
5315
5315
|
initializeState(value) {
|
|
@@ -5523,7 +5523,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5523
5523
|
log: {
|
|
5524
5524
|
debug: (obj) => logger2().debug(obj)
|
|
5525
5525
|
},
|
|
5526
|
-
nativeDatabaseProvider:
|
|
5526
|
+
nativeDatabaseProvider: _chunkDL7PKMEPcjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5527
5527
|
{
|
|
5528
5528
|
open: async (requestedActorId) => {
|
|
5529
5529
|
void requestedActorId;
|
|
@@ -5546,7 +5546,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5546
5546
|
return this.#db;
|
|
5547
5547
|
}
|
|
5548
5548
|
#bindDatabaseClient(client) {
|
|
5549
|
-
return
|
|
5549
|
+
return _chunkDL7PKMEPcjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5550
5550
|
enter: async () => await this.#enterStateTransaction(),
|
|
5551
5551
|
exit: (scope) => this.#exitStateTransaction(
|
|
5552
5552
|
scope
|
|
@@ -5750,7 +5750,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5750
5750
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5751
5751
|
logger2().warn({
|
|
5752
5752
|
msg: "keepAwake promise rejected",
|
|
5753
|
-
error:
|
|
5753
|
+
error: _chunkBY6YFH2Kcjs.stringifyError.call(void 0, error)
|
|
5754
5754
|
});
|
|
5755
5755
|
}).then(() => null);
|
|
5756
5756
|
try {
|
|
@@ -6248,7 +6248,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6248
6248
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6249
6249
|
var _a;
|
|
6250
6250
|
const config = definition.config;
|
|
6251
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6251
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkDL7PKMEPcjs.db.call(void 0, )));
|
|
6252
6252
|
const actionHandlers = _chunkINFADXXIcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6253
6253
|
const schemaConfig = {
|
|
6254
6254
|
actionInputSchemas: _chunkINFADXXIcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6259,9 +6259,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6259
6259
|
events: config.events,
|
|
6260
6260
|
queues: config.queues
|
|
6261
6261
|
};
|
|
6262
|
-
const createClient = (ctx) =>
|
|
6263
|
-
new (0,
|
|
6264
|
-
|
|
6262
|
+
const createClient = (ctx) => _chunkNSDT2GWMcjs.createClientWithDriver.call(void 0,
|
|
6263
|
+
new (0, _chunkNSDT2GWMcjs.RemoteEngineControlClient)(
|
|
6264
|
+
_chunkNSDT2GWMcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6265
6265
|
),
|
|
6266
6266
|
{
|
|
6267
6267
|
encoding: "bare",
|
|
@@ -6453,7 +6453,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6453
6453
|
400
|
|
6454
6454
|
);
|
|
6455
6455
|
}
|
|
6456
|
-
const cbor =
|
|
6456
|
+
const cbor = _chunkBY6YFH2Kcjs.encodeCborCompat.call(void 0,
|
|
6457
6457
|
_nullishCoalesce(body.body, () => ( null))
|
|
6458
6458
|
);
|
|
6459
6459
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -7050,7 +7050,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7050
7050
|
...request,
|
|
7051
7051
|
abortController: requestAbortController
|
|
7052
7052
|
});
|
|
7053
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
7053
|
+
const rawConnParams = handlerRequest.headers.get(_chunkNSDT2GWMcjs.HEADER_CONN_PARAMS);
|
|
7054
7054
|
let requestCtx;
|
|
7055
7055
|
let conn;
|
|
7056
7056
|
let removeRequestAbortListener;
|
|
@@ -7107,7 +7107,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7107
7107
|
requestCtx,
|
|
7108
7108
|
handlerRequest
|
|
7109
7109
|
);
|
|
7110
|
-
if (!
|
|
7110
|
+
if (!_chunkNSDT2GWMcjs.isResponseLike.call(void 0, response)) {
|
|
7111
7111
|
throw new Error(
|
|
7112
7112
|
"onRequest handler must return a Response"
|
|
7113
7113
|
);
|
|
@@ -7202,7 +7202,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7202
7202
|
var _a2;
|
|
7203
7203
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
7204
7204
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
7205
|
-
return history == null ? void 0 :
|
|
7205
|
+
return history == null ? void 0 : _chunkBY6YFH2Kcjs.toUint8Array.call(void 0, history);
|
|
7206
7206
|
}
|
|
7207
7207
|
) : void 0,
|
|
7208
7208
|
replayWorkflow: _chunkINFADXXIcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -7216,7 +7216,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7216
7216
|
return void 0;
|
|
7217
7217
|
}
|
|
7218
7218
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
7219
|
-
return history == null ? void 0 :
|
|
7219
|
+
return history == null ? void 0 : _chunkBY6YFH2Kcjs.toUint8Array.call(void 0, history);
|
|
7220
7220
|
}
|
|
7221
7221
|
) : void 0,
|
|
7222
7222
|
actions: Object.fromEntries(
|
|
@@ -7358,7 +7358,7 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7358
7358
|
startServices: resolveNativeBinaries && config.startServices,
|
|
7359
7359
|
handleInspectorHttpInRuntime: true,
|
|
7360
7360
|
serverlessBasePath: config.serverless.basePath,
|
|
7361
|
-
serverlessPackageVersion:
|
|
7361
|
+
serverlessPackageVersion: _chunkBY6YFH2Kcjs.VERSION,
|
|
7362
7362
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7363
7363
|
serverlessClientNamespace: config.publicNamespace,
|
|
7364
7364
|
serverlessClientToken: config.publicToken,
|
|
@@ -7372,12 +7372,12 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7372
7372
|
} catch (error) {
|
|
7373
7373
|
logger2().warn({
|
|
7374
7374
|
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",
|
|
7375
|
-
error:
|
|
7375
|
+
error: _chunkBY6YFH2Kcjs.stringifyError.call(void 0, error)
|
|
7376
7376
|
});
|
|
7377
7377
|
}
|
|
7378
7378
|
}
|
|
7379
7379
|
if (resolveNativeBinaries && config.startServices) {
|
|
7380
|
-
const servicesBinary =
|
|
7380
|
+
const servicesBinary = _chunkBY6YFH2Kcjs.getEnvUniversal.call(void 0, "RIVET_SERVICES_BINARY");
|
|
7381
7381
|
if (servicesBinary) {
|
|
7382
7382
|
serveConfig.servicesBinaryPath = servicesBinary;
|
|
7383
7383
|
} else {
|
|
@@ -7392,13 +7392,13 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7392
7392
|
serveConfig.engineHost = config.engineHost;
|
|
7393
7393
|
serveConfig.enginePort = config.enginePort;
|
|
7394
7394
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7395
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7395
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkBY6YFH2Kcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7396
7396
|
}
|
|
7397
7397
|
return serveConfig;
|
|
7398
7398
|
}
|
|
7399
7399
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7400
7400
|
var _a;
|
|
7401
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7401
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkBY6YFH2Kcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7402
7402
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7403
7403
|
}
|
|
7404
7404
|
if (runtime.kind === "napi") {
|
|
@@ -7471,7 +7471,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7471
7471
|
signal: abortController.signal
|
|
7472
7472
|
})
|
|
7473
7473
|
);
|
|
7474
|
-
if (!
|
|
7474
|
+
if (!_chunkNSDT2GWMcjs.isResponseLike.call(void 0, response)) {
|
|
7475
7475
|
throw new TypeError(
|
|
7476
7476
|
"registry.listen() application fetch must return a Response"
|
|
7477
7477
|
);
|
|
@@ -7526,7 +7526,7 @@ var Registry = class {
|
|
|
7526
7526
|
var _a;
|
|
7527
7527
|
this.#config = config;
|
|
7528
7528
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7529
|
-
|
|
7529
|
+
_chunkBY6YFH2Kcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7530
7530
|
}
|
|
7531
7531
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7532
7532
|
this.routes = {
|
|
@@ -7758,10 +7758,10 @@ var Registry = class {
|
|
|
7758
7758
|
if (!opts.application) {
|
|
7759
7759
|
rejectServerless();
|
|
7760
7760
|
}
|
|
7761
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7762
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7761
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkBY6YFH2Kcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7762
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkBY6YFH2Kcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7763
7763
|
const config = this.parseConfig();
|
|
7764
|
-
if (opts.application &&
|
|
7764
|
+
if (opts.application && _chunkBY6YFH2Kcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
7765
7765
|
if (config.runtime === "wasm") {
|
|
7766
7766
|
throw new Error(
|
|
7767
7767
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -7837,7 +7837,7 @@ var Registry = class {
|
|
|
7837
7837
|
return jsonRouteResponse(503, {
|
|
7838
7838
|
status: "not_started",
|
|
7839
7839
|
runtime: "rivetkit",
|
|
7840
|
-
version:
|
|
7840
|
+
version: _chunkBY6YFH2Kcjs.VERSION
|
|
7841
7841
|
});
|
|
7842
7842
|
}
|
|
7843
7843
|
const { runtime, registry } = configured;
|
|
@@ -7845,7 +7845,7 @@ var Registry = class {
|
|
|
7845
7845
|
return jsonRouteResponse(501, {
|
|
7846
7846
|
status: "unsupported",
|
|
7847
7847
|
runtime: "rivetkit",
|
|
7848
|
-
version:
|
|
7848
|
+
version: _chunkBY6YFH2Kcjs.VERSION
|
|
7849
7849
|
});
|
|
7850
7850
|
}
|
|
7851
7851
|
const response = await runtime.registryHealth(registry);
|
|
@@ -7920,14 +7920,14 @@ var Registry = class {
|
|
|
7920
7920
|
var _a;
|
|
7921
7921
|
if (!this.#runtimeServePromise) {
|
|
7922
7922
|
const configuredEnvoyVersion = (_a = this.#config.node) == null ? void 0 : _a.version;
|
|
7923
|
-
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" :
|
|
7923
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkBY6YFH2Kcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
|
|
7924
7924
|
logger2().info({
|
|
7925
7925
|
msg: "starting rivetkit envoy",
|
|
7926
|
-
rivetkitVersion:
|
|
7926
|
+
rivetkitVersion: _chunkBY6YFH2Kcjs.VERSION,
|
|
7927
7927
|
envoyVersion: config.node.version,
|
|
7928
7928
|
envoyVersionSource
|
|
7929
7929
|
});
|
|
7930
|
-
if (envoyVersionSource === "default" &&
|
|
7930
|
+
if (envoyVersionSource === "default" && _chunkBY6YFH2Kcjs.getNodeEnv.call(void 0, ) === "production") {
|
|
7931
7931
|
logger2().error({
|
|
7932
7932
|
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",
|
|
7933
7933
|
envoyVersion: config.node.version,
|
|
@@ -8031,7 +8031,7 @@ var Registry = class {
|
|
|
8031
8031
|
const modeAPromise = this.#runtimeServeConfiguredPromise;
|
|
8032
8032
|
const modeBPromise = this.#runtimeServerlessPromise;
|
|
8033
8033
|
const runtimes = /* @__PURE__ */ new Set();
|
|
8034
|
-
const localDevSignal = signalDriven &&
|
|
8034
|
+
const localDevSignal = signalDriven && _chunkBY6YFH2Kcjs.getNodeEnv.call(void 0, ) !== "production" && config.engineSpawn && config.endpoint !== void 0 && _chunkNSDT2GWMcjs.isLocalEngineEndpoint.call(void 0, config.endpoint);
|
|
8035
8035
|
let gracePeriodMs = (_a = config.shutdown) == null ? void 0 : _a.gracePeriodMs;
|
|
8036
8036
|
if (gracePeriodMs === void 0) {
|
|
8037
8037
|
gracePeriodMs = localDevSignal ? LOCAL_DEV_SHUTDOWN_GRACE_PERIOD_MS : await _asyncNullishCoalesce(await this.#actorStopThresholdMs(
|
|
@@ -8143,7 +8143,7 @@ var Registry = class {
|
|
|
8143
8143
|
}
|
|
8144
8144
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
8145
8145
|
try {
|
|
8146
|
-
if (
|
|
8146
|
+
if (_chunkBY6YFH2Kcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8147
8147
|
return Promise.reject(
|
|
8148
8148
|
new Error(
|
|
8149
8149
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -8167,7 +8167,7 @@ var Registry = class {
|
|
|
8167
8167
|
if (!configuredRegistryPromise || !serveLifecyclePromise) {
|
|
8168
8168
|
throw new Error("registry envoy startup did not initialize");
|
|
8169
8169
|
}
|
|
8170
|
-
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 &&
|
|
8170
|
+
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 && _chunkNSDT2GWMcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? LOCAL_ENGINE_READY_TIMEOUT_MS : REGISTRY_READY_TIMEOUT_MS;
|
|
8171
8171
|
let timeout;
|
|
8172
8172
|
const timeoutPromise = new Promise((_resolve, reject) => {
|
|
8173
8173
|
var _a;
|
|
@@ -8217,8 +8217,8 @@ var Registry = class {
|
|
|
8217
8217
|
* ```
|
|
8218
8218
|
*/
|
|
8219
8219
|
start() {
|
|
8220
|
-
if (
|
|
8221
|
-
const publicDir = _nullishCoalesce(
|
|
8220
|
+
if (_chunkBY6YFH2Kcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8221
|
+
const publicDir = _nullishCoalesce(_chunkBY6YFH2Kcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
8222
8222
|
this.listen({ publicDir }).catch((error) => {
|
|
8223
8223
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
8224
8224
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -8334,13 +8334,13 @@ var Registry = class {
|
|
|
8334
8334
|
};
|
|
8335
8335
|
console.log();
|
|
8336
8336
|
console.log(
|
|
8337
|
-
` RivetKit ${
|
|
8337
|
+
` RivetKit ${_chunkBY6YFH2Kcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
8338
8338
|
);
|
|
8339
8339
|
if (config.namespace !== "default") {
|
|
8340
8340
|
logLine("Namespace", config.namespace);
|
|
8341
8341
|
}
|
|
8342
8342
|
if (config.endpoint) {
|
|
8343
|
-
const endpointType = config.startEngine ||
|
|
8343
|
+
const endpointType = config.startEngine || _chunkNSDT2GWMcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
|
|
8344
8344
|
logLine("Endpoint", `${config.endpoint} (${endpointType})`);
|
|
8345
8345
|
}
|
|
8346
8346
|
if (kind === "serverless" && config.publicEndpoint) {
|
|
@@ -8410,5 +8410,5 @@ function setup(input) {
|
|
|
8410
8410
|
|
|
8411
8411
|
|
|
8412
8412
|
|
|
8413
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
8413
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkNSDT2GWMcjs.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 = _chunkNSDT2GWMcjs.createClientWithDriver; exports.defineRunHandler = _chunkINFADXXIcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkBY6YFH2Kcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkBY6YFH2Kcjs.toUint8Array;
|
|
8414
8414
|
//# sourceMappingURL=mod.cjs.map
|