rivetkit 3.0.6 → 3.0.7
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-WMAHPIFS.cjs → chunk-5A2KUC5L.cjs} +10 -10
- package/dist/tsup/{chunk-WMAHPIFS.cjs.map → chunk-5A2KUC5L.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZWNTOFM3.js → chunk-7OXC5BQF.js} +2 -2
- package/dist/tsup/{chunk-ZWNTOFM3.js.map → chunk-7OXC5BQF.js.map} +1 -1
- package/dist/tsup/{chunk-FERZDKVR.js → chunk-AY25XAXA.js} +3 -3
- package/dist/tsup/{chunk-6EH5WPVT.cjs → chunk-HKD7AH4Z.cjs} +144 -144
- package/dist/tsup/{chunk-6EH5WPVT.cjs.map → chunk-HKD7AH4Z.cjs.map} +1 -1
- package/dist/tsup/{chunk-NPA2A53S.cjs → chunk-K6WETGBW.cjs} +3 -3
- package/dist/tsup/{chunk-NPA2A53S.cjs.map → chunk-K6WETGBW.cjs.map} +1 -1
- package/dist/tsup/{chunk-5FQNTE3U.js → chunk-NMLZDHH2.js} +2 -2
- package/dist/tsup/{chunk-6HXQONU5.cjs → chunk-OEOODXVI.cjs} +4 -4
- package/dist/tsup/{chunk-6HXQONU5.cjs.map → chunk-OEOODXVI.cjs.map} +1 -1
- package/dist/tsup/{chunk-SAR7BMVU.js → chunk-QTCX5KN3.js} +2 -2
- package/dist/tsup/{chunk-CJSADDKT.js → chunk-RFJ4NNO3.js} +4 -4
- package/dist/tsup/{chunk-AETY7X4G.js → chunk-S6ZMUE7Q.js} +2 -2
- package/dist/tsup/{chunk-ZPTATOYB.cjs → chunk-U3CMQVMS.cjs} +3 -3
- package/dist/tsup/{chunk-ZPTATOYB.cjs.map → chunk-U3CMQVMS.cjs.map} +1 -1
- package/dist/tsup/{chunk-JU6RP3LW.cjs → chunk-VM4SXQOC.cjs} +3 -3
- package/dist/tsup/{chunk-JU6RP3LW.cjs.map → chunk-VM4SXQOC.cjs.map} +1 -1
- package/dist/tsup/{chunk-YNVGOPSK.cjs → chunk-WBUHPDDM.cjs} +2 -2
- package/dist/tsup/{chunk-YNVGOPSK.cjs.map → chunk-WBUHPDDM.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZJ2UXLEE.js → chunk-YMCG4FCB.js} +6 -6
- package/dist/tsup/{chunk-VNMBEXJH.js → chunk-YO4TJ56P.js} +2 -2
- package/dist/tsup/{chunk-NUCUZGIV.cjs → chunk-YTELGNB3.cjs} +7 -7
- package/dist/tsup/{chunk-NUCUZGIV.cjs.map → chunk-YTELGNB3.cjs.map} +1 -1
- 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-FERZDKVR.js.map → chunk-AY25XAXA.js.map} +0 -0
- /package/dist/tsup/{chunk-5FQNTE3U.js.map → chunk-NMLZDHH2.js.map} +0 -0
- /package/dist/tsup/{chunk-SAR7BMVU.js.map → chunk-QTCX5KN3.js.map} +0 -0
- /package/dist/tsup/{chunk-CJSADDKT.js.map → chunk-RFJ4NNO3.js.map} +0 -0
- /package/dist/tsup/{chunk-AETY7X4G.js.map → chunk-S6ZMUE7Q.js.map} +0 -0
- /package/dist/tsup/{chunk-ZJ2UXLEE.js.map → chunk-YMCG4FCB.js.map} +0 -0
- /package/dist/tsup/{chunk-VNMBEXJH.js.map → chunk-YO4TJ56P.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 _chunkOEOODXVIcjs = require('./chunk-OEOODXVI.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -35,18 +35,18 @@ var _chunkYWWDUC6Dcjs = require('./chunk-YWWDUC6D.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkHKD7AH4Zcjs = require('./chunk-HKD7AH4Z.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
var _chunkRTWH3AX3cjs = require('./chunk-RTWH3AX3.cjs');
|
|
43
|
-
require('./chunk-NPA2A53S.cjs');
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
|
|
47
46
|
|
|
48
|
-
var
|
|
47
|
+
var _chunkVM4SXQOCcjs = require('./chunk-VM4SXQOC.cjs');
|
|
49
48
|
require('./chunk-KVFIONKQ.cjs');
|
|
49
|
+
require('./chunk-K6WETGBW.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 _chunkWBUHPDDMcjs = require('./chunk-WBUHPDDM.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 _chunkWBUHPDDMcjs.getLogger.call(void 0, "actor-runtime");
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
// src/actor/definition.ts
|
|
@@ -255,7 +255,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
255
255
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
256
256
|
var _ws = require('hono/ws');
|
|
257
257
|
function logger() {
|
|
258
|
-
return
|
|
258
|
+
return _chunkWBUHPDDMcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
259
259
|
}
|
|
260
260
|
var InlineWebSocketAdapter = class {
|
|
261
261
|
#handler;
|
|
@@ -407,7 +407,7 @@ var InlineWebSocketAdapter = class {
|
|
|
407
407
|
|
|
408
408
|
// src/registry/log.ts
|
|
409
409
|
function logger2() {
|
|
410
|
-
return
|
|
410
|
+
return _chunkWBUHPDDMcjs.getLogger.call(void 0, "registry");
|
|
411
411
|
}
|
|
412
412
|
|
|
413
413
|
// src/serverless/configure.ts
|
|
@@ -453,8 +453,8 @@ async function configureServerlessPool(config) {
|
|
|
453
453
|
);
|
|
454
454
|
}
|
|
455
455
|
const customConfig = config.configurePool;
|
|
456
|
-
const clientConfig =
|
|
457
|
-
const dcsRes = await
|
|
456
|
+
const clientConfig = _chunkHKD7AH4Zcjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
457
|
+
const dcsRes = await _chunkHKD7AH4Zcjs.getDatacenters.call(void 0, clientConfig);
|
|
458
458
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
459
459
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
460
460
|
const headers = {
|
|
@@ -476,7 +476,7 @@ async function configureServerlessPool(config) {
|
|
|
476
476
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
477
477
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
478
478
|
};
|
|
479
|
-
await
|
|
479
|
+
await _chunkHKD7AH4Zcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
480
480
|
datacenters: Object.fromEntries(
|
|
481
481
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
482
482
|
)
|
|
@@ -493,7 +493,7 @@ async function configureServerlessPool(config) {
|
|
|
493
493
|
logger2().warn({
|
|
494
494
|
msg: "serverless pool configuration attempt failed",
|
|
495
495
|
attempts,
|
|
496
|
-
error:
|
|
496
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, error)
|
|
497
497
|
});
|
|
498
498
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
499
499
|
}
|
|
@@ -501,7 +501,7 @@ async function configureServerlessPool(config) {
|
|
|
501
501
|
logger2().error({
|
|
502
502
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
503
503
|
attempts,
|
|
504
|
-
error:
|
|
504
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, lastError)
|
|
505
505
|
});
|
|
506
506
|
throw lastError;
|
|
507
507
|
}
|
|
@@ -512,10 +512,10 @@ var _zod = require('zod');
|
|
|
512
512
|
// src/registry/config/envoy.ts
|
|
513
513
|
var _v4 = require('zod/v4');
|
|
514
514
|
var EnvoyConfigSchema = _v4.z.object({
|
|
515
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
516
|
-
version: _v4.z.number().default(() => _nullishCoalesce(
|
|
515
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
516
|
+
version: _v4.z.number().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
|
|
517
517
|
// Deprecated.
|
|
518
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
518
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
519
519
|
nodeKey: _v4.z.string().optional()
|
|
520
520
|
});
|
|
521
521
|
|
|
@@ -553,7 +553,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
553
553
|
*
|
|
554
554
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
555
555
|
*/
|
|
556
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
556
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
557
557
|
/**
|
|
558
558
|
* Token that clients should use when connecting via the public endpoint.
|
|
559
559
|
*
|
|
@@ -561,7 +561,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
561
561
|
*
|
|
562
562
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
563
563
|
*/
|
|
564
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
564
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetPublicToken.call(void 0, ))))
|
|
565
565
|
// There is no publicNamespace config option because the frontend and backend
|
|
566
566
|
// cannot use different namespaces. The namespace is extracted from the
|
|
567
567
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -615,7 +615,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
615
615
|
* Runtime binding to use for RivetKit core.
|
|
616
616
|
* */
|
|
617
617
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
618
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
618
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetkitRuntime.call(void 0, )));
|
|
619
619
|
if (rawRuntime === void 0) {
|
|
620
620
|
return "auto";
|
|
621
621
|
}
|
|
@@ -652,7 +652,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
652
652
|
* */
|
|
653
653
|
logging: _zod.z.object({
|
|
654
654
|
baseLogger: _zod.z.custom().optional(),
|
|
655
|
-
level:
|
|
655
|
+
level: _chunkWBUHPDDMcjs.LogLevelSchema.optional()
|
|
656
656
|
}).optional().default(() => ({})),
|
|
657
657
|
// MARK: Routing
|
|
658
658
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -670,9 +670,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
670
670
|
*
|
|
671
671
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
672
672
|
*/
|
|
673
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
674
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
675
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
673
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetEngine.call(void 0, ))), () => ( _chunkWBUHPDDMcjs.getRivetEndpoint.call(void 0, )))),
|
|
674
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetToken.call(void 0, )))),
|
|
675
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkWBUHPDDMcjs.getRivetNamespace.call(void 0, )))),
|
|
676
676
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
677
677
|
// MARK: Client
|
|
678
678
|
// TODO:
|
|
@@ -712,21 +712,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
712
712
|
*
|
|
713
713
|
* Starts the full Rust engine process locally.
|
|
714
714
|
*/
|
|
715
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
715
|
+
startEngine: _zod.z.boolean().default(() => _chunkWBUHPDDMcjs.getRivetRunEngine.call(void 0, )),
|
|
716
716
|
/**
|
|
717
717
|
* @experimental
|
|
718
718
|
*
|
|
719
719
|
* Host to bind the spawned local engine process to.
|
|
720
720
|
*/
|
|
721
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
721
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkHKD7AH4Zcjs.ENGINE_HOST))),
|
|
722
722
|
/**
|
|
723
723
|
* @experimental
|
|
724
724
|
*
|
|
725
725
|
* Port to bind the spawned local engine process to.
|
|
726
726
|
*/
|
|
727
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
727
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkHKD7AH4Zcjs.ENGINE_PORT))),
|
|
728
728
|
/** @experimental */
|
|
729
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
729
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkWBUHPDDMcjs.VERSION))),
|
|
730
730
|
/**
|
|
731
731
|
* Starts the first-party Services actor host when RivetKit manages
|
|
732
732
|
* a local engine. Enabled by default for a managed local Engine. Set
|
|
@@ -783,7 +783,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
783
783
|
}))
|
|
784
784
|
}).transform((config, ctx) => {
|
|
785
785
|
var _a, _b, _c;
|
|
786
|
-
const isDevEnv =
|
|
786
|
+
const isDevEnv = _chunkWBUHPDDMcjs.isDev.call(void 0, );
|
|
787
787
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
788
788
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
789
789
|
ctx.addIssue({
|
|
@@ -793,7 +793,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
793
793
|
});
|
|
794
794
|
}
|
|
795
795
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
796
|
-
const parsedEndpoint = config.endpoint ?
|
|
796
|
+
const parsedEndpoint = config.endpoint ? _chunkHKD7AH4Zcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
797
797
|
endpoint: config.endpoint,
|
|
798
798
|
path: ["endpoint"],
|
|
799
799
|
namespace: config.namespace,
|
|
@@ -812,19 +812,19 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
812
812
|
path: ["configurePool"]
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
|
-
const localEngineEndpoint =
|
|
815
|
+
const localEngineEndpoint = _chunkHKD7AH4Zcjs.buildEngineEndpoint.call(void 0,
|
|
816
816
|
config.engineHost,
|
|
817
817
|
config.enginePort
|
|
818
818
|
);
|
|
819
819
|
const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? localEngineEndpoint : void 0)));
|
|
820
820
|
const engineSpawn = !parsedEndpoint && Boolean(endpoint);
|
|
821
|
-
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => (
|
|
821
|
+
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkWBUHPDDMcjs.getRivetRunServices.call(void 0, ))), () => ( engineSpawn));
|
|
822
822
|
const validateServerlessEndpoint = Boolean(
|
|
823
823
|
config.startEngine || parsedEndpoint
|
|
824
824
|
);
|
|
825
825
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
826
|
-
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint &&
|
|
827
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
826
|
+
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkHKD7AH4Zcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
|
|
827
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkHKD7AH4Zcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
828
828
|
endpoint: config.serverless.publicEndpoint,
|
|
829
829
|
path: ["serverless", "publicEndpoint"]
|
|
830
830
|
}) : void 0;
|
|
@@ -929,7 +929,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
929
929
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
930
930
|
sqlite: DocSqliteConfigSchema,
|
|
931
931
|
logging: _zod.z.object({
|
|
932
|
-
level:
|
|
932
|
+
level: _chunkWBUHPDDMcjs.LogLevelSchema.optional().describe(
|
|
933
933
|
"Log level for RivetKit. Default: 'warn'"
|
|
934
934
|
)
|
|
935
935
|
}).optional().describe("Logging configuration."),
|
|
@@ -1569,7 +1569,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1569
1569
|
if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
|
|
1570
1570
|
return ownerCtx;
|
|
1571
1571
|
}
|
|
1572
|
-
const applicationSpan =
|
|
1572
|
+
const applicationSpan = _chunkHKD7AH4Zcjs.readActiveTraceHeaders.call(void 0, );
|
|
1573
1573
|
if (!applicationSpan) {
|
|
1574
1574
|
return active;
|
|
1575
1575
|
}
|
|
@@ -1782,7 +1782,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1782
1782
|
const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
|
|
1783
1783
|
return this.#invocationContext.run(
|
|
1784
1784
|
nativeCtx,
|
|
1785
|
-
() =>
|
|
1785
|
+
() => _chunkHKD7AH4Zcjs.runWithActorInvocationSpan.call(void 0, span, run)
|
|
1786
1786
|
);
|
|
1787
1787
|
}
|
|
1788
1788
|
actorInvocationTraceContext(ctx) {
|
|
@@ -2154,8 +2154,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2154
2154
|
function buildNativeHttpRequest(init) {
|
|
2155
2155
|
var _a;
|
|
2156
2156
|
const headers = new Headers(init.headers);
|
|
2157
|
-
const originalUrl = headers.get(
|
|
2158
|
-
headers.delete(
|
|
2157
|
+
const originalUrl = headers.get(_chunkHKD7AH4Zcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2158
|
+
headers.delete(_chunkHKD7AH4Zcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2159
2159
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2160
2160
|
const method2 = init.method.toUpperCase();
|
|
2161
2161
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2234,7 +2234,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2234
2234
|
}
|
|
2235
2235
|
} catch (error) {
|
|
2236
2236
|
try {
|
|
2237
|
-
await stream.error(
|
|
2237
|
+
await stream.error(_chunkWBUHPDDMcjs.stringifyError.call(void 0, error));
|
|
2238
2238
|
} catch (streamError) {
|
|
2239
2239
|
logger2().debug({
|
|
2240
2240
|
msg: "failed to report native http response stream error",
|
|
@@ -3462,7 +3462,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3462
3462
|
nativeError = error;
|
|
3463
3463
|
logger2().warn({
|
|
3464
3464
|
msg: "native runtime failed to load; falling back to wasm",
|
|
3465
|
-
error:
|
|
3465
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, error)
|
|
3466
3466
|
});
|
|
3467
3467
|
}
|
|
3468
3468
|
try {
|
|
@@ -3471,7 +3471,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3471
3471
|
throw new (0, _chunkMGI2VVF6cjs.RivetError)(
|
|
3472
3472
|
"config",
|
|
3473
3473
|
"runtime_unavailable",
|
|
3474
|
-
`RivetKit could not load a core runtime. Native runtime: ${
|
|
3474
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunkWBUHPDDMcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkWBUHPDDMcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3475
3475
|
{
|
|
3476
3476
|
public: true,
|
|
3477
3477
|
statusCode: 500
|
|
@@ -3679,7 +3679,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3679
3679
|
}).catch((error) => {
|
|
3680
3680
|
logger2().warn({
|
|
3681
3681
|
msg: "deferred native sleep cleanup failed",
|
|
3682
|
-
error:
|
|
3682
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, error)
|
|
3683
3683
|
});
|
|
3684
3684
|
});
|
|
3685
3685
|
return;
|
|
@@ -3851,10 +3851,10 @@ function decodeValue(value) {
|
|
|
3851
3851
|
if (!value || value.length === 0) {
|
|
3852
3852
|
return void 0;
|
|
3853
3853
|
}
|
|
3854
|
-
return
|
|
3854
|
+
return _chunkWBUHPDDMcjs.decodeCborCompat.call(void 0, value);
|
|
3855
3855
|
}
|
|
3856
3856
|
function encodeValue(value) {
|
|
3857
|
-
return
|
|
3857
|
+
return _chunkWBUHPDDMcjs.encodeCborCompat.call(void 0, value);
|
|
3858
3858
|
}
|
|
3859
3859
|
function normalizeArgs(value) {
|
|
3860
3860
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -3890,7 +3890,7 @@ function isStructuredBridgeError(error) {
|
|
|
3890
3890
|
return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
3891
3891
|
}
|
|
3892
3892
|
function encodeNativeCallbackError(error) {
|
|
3893
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
3893
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkWBUHPDDMcjs.deconstructError.call(void 0, error, true);
|
|
3894
3894
|
const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
|
|
3895
3895
|
if (droppedMetadataCause !== void 0) {
|
|
3896
3896
|
logger2().warn(
|
|
@@ -3952,7 +3952,7 @@ function decodeWorkflowCbor(data) {
|
|
|
3952
3952
|
return null;
|
|
3953
3953
|
}
|
|
3954
3954
|
try {
|
|
3955
|
-
return
|
|
3955
|
+
return _chunkWBUHPDDMcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
3956
3956
|
} catch (e3) {
|
|
3957
3957
|
return null;
|
|
3958
3958
|
}
|
|
@@ -4065,7 +4065,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
4065
4065
|
if (data === null) {
|
|
4066
4066
|
return null;
|
|
4067
4067
|
}
|
|
4068
|
-
const history =
|
|
4068
|
+
const history = _chunkOEOODXVIcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
4069
4069
|
return jsonSafe({
|
|
4070
4070
|
nameRegistry: [...history.nameRegistry],
|
|
4071
4071
|
entries: history.entries.map((entry) => ({
|
|
@@ -4211,7 +4211,7 @@ var NativeConnAdapter = class {
|
|
|
4211
4211
|
},
|
|
4212
4212
|
(newValue) => {
|
|
4213
4213
|
assertCurrentState();
|
|
4214
|
-
|
|
4214
|
+
_chunkWBUHPDDMcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4215
4215
|
}
|
|
4216
4216
|
);
|
|
4217
4217
|
}
|
|
@@ -4219,7 +4219,7 @@ var NativeConnAdapter = class {
|
|
|
4219
4219
|
var _a;
|
|
4220
4220
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4221
4221
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4222
|
-
|
|
4222
|
+
_chunkWBUHPDDMcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4223
4223
|
this.#writeState(nextValue, { writeNative: true });
|
|
4224
4224
|
}
|
|
4225
4225
|
initializeState(value) {
|
|
@@ -5293,7 +5293,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5293
5293
|
},
|
|
5294
5294
|
(newValue) => {
|
|
5295
5295
|
assertCurrentState();
|
|
5296
|
-
|
|
5296
|
+
_chunkWBUHPDDMcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5297
5297
|
}
|
|
5298
5298
|
);
|
|
5299
5299
|
}
|
|
@@ -5305,7 +5305,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5305
5305
|
}
|
|
5306
5306
|
this.#assertCanMutateState();
|
|
5307
5307
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5308
|
-
|
|
5308
|
+
_chunkWBUHPDDMcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5309
5309
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5310
5310
|
}
|
|
5311
5311
|
initializeState(value) {
|
|
@@ -5519,7 +5519,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5519
5519
|
log: {
|
|
5520
5520
|
debug: (obj) => logger2().debug(obj)
|
|
5521
5521
|
},
|
|
5522
|
-
nativeDatabaseProvider:
|
|
5522
|
+
nativeDatabaseProvider: _chunkVM4SXQOCcjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5523
5523
|
{
|
|
5524
5524
|
open: async (requestedActorId) => {
|
|
5525
5525
|
void requestedActorId;
|
|
@@ -5542,7 +5542,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5542
5542
|
return this.#db;
|
|
5543
5543
|
}
|
|
5544
5544
|
#bindDatabaseClient(client) {
|
|
5545
|
-
return
|
|
5545
|
+
return _chunkVM4SXQOCcjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5546
5546
|
enter: async () => await this.#enterStateTransaction(),
|
|
5547
5547
|
exit: (scope) => this.#exitStateTransaction(
|
|
5548
5548
|
scope
|
|
@@ -5746,7 +5746,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5746
5746
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5747
5747
|
logger2().warn({
|
|
5748
5748
|
msg: "keepAwake promise rejected",
|
|
5749
|
-
error:
|
|
5749
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, error)
|
|
5750
5750
|
});
|
|
5751
5751
|
}).then(() => null);
|
|
5752
5752
|
try {
|
|
@@ -6243,7 +6243,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6243
6243
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6244
6244
|
var _a;
|
|
6245
6245
|
const config = definition.config;
|
|
6246
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6246
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkVM4SXQOCcjs.db.call(void 0, )));
|
|
6247
6247
|
const actionHandlers = _chunkYWWDUC6Dcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6248
6248
|
const schemaConfig = {
|
|
6249
6249
|
actionInputSchemas: _chunkYWWDUC6Dcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6254,9 +6254,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6254
6254
|
events: config.events,
|
|
6255
6255
|
queues: config.queues
|
|
6256
6256
|
};
|
|
6257
|
-
const createClient = (ctx) =>
|
|
6258
|
-
new (0,
|
|
6259
|
-
|
|
6257
|
+
const createClient = (ctx) => _chunkHKD7AH4Zcjs.createClientWithDriver.call(void 0,
|
|
6258
|
+
new (0, _chunkHKD7AH4Zcjs.RemoteEngineControlClient)(
|
|
6259
|
+
_chunkHKD7AH4Zcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6260
6260
|
),
|
|
6261
6261
|
{
|
|
6262
6262
|
encoding: "bare",
|
|
@@ -6448,7 +6448,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6448
6448
|
400
|
|
6449
6449
|
);
|
|
6450
6450
|
}
|
|
6451
|
-
const cbor =
|
|
6451
|
+
const cbor = _chunkWBUHPDDMcjs.encodeCborCompat.call(void 0,
|
|
6452
6452
|
_nullishCoalesce(body.body, () => ( null))
|
|
6453
6453
|
);
|
|
6454
6454
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -7045,7 +7045,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7045
7045
|
...request,
|
|
7046
7046
|
abortController: requestAbortController
|
|
7047
7047
|
});
|
|
7048
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
7048
|
+
const rawConnParams = handlerRequest.headers.get(_chunkHKD7AH4Zcjs.HEADER_CONN_PARAMS);
|
|
7049
7049
|
let requestCtx;
|
|
7050
7050
|
let conn;
|
|
7051
7051
|
let removeRequestAbortListener;
|
|
@@ -7102,7 +7102,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7102
7102
|
requestCtx,
|
|
7103
7103
|
handlerRequest
|
|
7104
7104
|
);
|
|
7105
|
-
if (!
|
|
7105
|
+
if (!_chunkHKD7AH4Zcjs.isResponseLike.call(void 0, response)) {
|
|
7106
7106
|
throw new Error(
|
|
7107
7107
|
"onRequest handler must return a Response"
|
|
7108
7108
|
);
|
|
@@ -7197,7 +7197,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7197
7197
|
var _a2;
|
|
7198
7198
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
7199
7199
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
7200
|
-
return history == null ? void 0 :
|
|
7200
|
+
return history == null ? void 0 : _chunkWBUHPDDMcjs.toUint8Array.call(void 0, history);
|
|
7201
7201
|
}
|
|
7202
7202
|
) : void 0,
|
|
7203
7203
|
replayWorkflow: _chunkYWWDUC6Dcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -7211,7 +7211,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7211
7211
|
return void 0;
|
|
7212
7212
|
}
|
|
7213
7213
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
7214
|
-
return history == null ? void 0 :
|
|
7214
|
+
return history == null ? void 0 : _chunkWBUHPDDMcjs.toUint8Array.call(void 0, history);
|
|
7215
7215
|
}
|
|
7216
7216
|
) : void 0,
|
|
7217
7217
|
actions: Object.fromEntries(
|
|
@@ -7353,7 +7353,7 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7353
7353
|
startServices: resolveNativeBinaries && config.startServices,
|
|
7354
7354
|
handleInspectorHttpInRuntime: true,
|
|
7355
7355
|
serverlessBasePath: config.serverless.basePath,
|
|
7356
|
-
serverlessPackageVersion:
|
|
7356
|
+
serverlessPackageVersion: _chunkWBUHPDDMcjs.VERSION,
|
|
7357
7357
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7358
7358
|
serverlessClientNamespace: config.publicNamespace,
|
|
7359
7359
|
serverlessClientToken: config.publicToken,
|
|
@@ -7367,12 +7367,12 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7367
7367
|
} catch (error) {
|
|
7368
7368
|
logger2().warn({
|
|
7369
7369
|
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",
|
|
7370
|
-
error:
|
|
7370
|
+
error: _chunkWBUHPDDMcjs.stringifyError.call(void 0, error)
|
|
7371
7371
|
});
|
|
7372
7372
|
}
|
|
7373
7373
|
}
|
|
7374
7374
|
if (resolveNativeBinaries && config.startServices) {
|
|
7375
|
-
const servicesBinary =
|
|
7375
|
+
const servicesBinary = _chunkWBUHPDDMcjs.getEnvUniversal.call(void 0, "RIVET_SERVICES_BINARY");
|
|
7376
7376
|
if (servicesBinary) {
|
|
7377
7377
|
serveConfig.servicesBinaryPath = servicesBinary;
|
|
7378
7378
|
} else {
|
|
@@ -7387,13 +7387,13 @@ async function buildServeConfig(config, resolveNativeBinaries = true) {
|
|
|
7387
7387
|
serveConfig.engineHost = config.engineHost;
|
|
7388
7388
|
serveConfig.enginePort = config.enginePort;
|
|
7389
7389
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7390
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7390
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkWBUHPDDMcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7391
7391
|
}
|
|
7392
7392
|
return serveConfig;
|
|
7393
7393
|
}
|
|
7394
7394
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7395
7395
|
var _a;
|
|
7396
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7396
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkWBUHPDDMcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7397
7397
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7398
7398
|
}
|
|
7399
7399
|
if (runtime.kind === "napi") {
|
|
@@ -7466,7 +7466,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7466
7466
|
signal: abortController.signal
|
|
7467
7467
|
})
|
|
7468
7468
|
);
|
|
7469
|
-
if (!
|
|
7469
|
+
if (!_chunkHKD7AH4Zcjs.isResponseLike.call(void 0, response)) {
|
|
7470
7470
|
throw new TypeError(
|
|
7471
7471
|
"registry.listen() application fetch must return a Response"
|
|
7472
7472
|
);
|
|
@@ -7521,7 +7521,7 @@ var Registry = class {
|
|
|
7521
7521
|
var _a;
|
|
7522
7522
|
this.#config = config;
|
|
7523
7523
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7524
|
-
|
|
7524
|
+
_chunkWBUHPDDMcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7525
7525
|
}
|
|
7526
7526
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7527
7527
|
this.routes = {
|
|
@@ -7753,10 +7753,10 @@ var Registry = class {
|
|
|
7753
7753
|
if (!opts.application) {
|
|
7754
7754
|
rejectServerless();
|
|
7755
7755
|
}
|
|
7756
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7757
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7756
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkWBUHPDDMcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7757
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkWBUHPDDMcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7758
7758
|
const config = this.parseConfig();
|
|
7759
|
-
if (opts.application &&
|
|
7759
|
+
if (opts.application && _chunkWBUHPDDMcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
7760
7760
|
if (config.runtime === "wasm") {
|
|
7761
7761
|
throw new Error(
|
|
7762
7762
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -7832,7 +7832,7 @@ var Registry = class {
|
|
|
7832
7832
|
return jsonRouteResponse(503, {
|
|
7833
7833
|
status: "not_started",
|
|
7834
7834
|
runtime: "rivetkit",
|
|
7835
|
-
version:
|
|
7835
|
+
version: _chunkWBUHPDDMcjs.VERSION
|
|
7836
7836
|
});
|
|
7837
7837
|
}
|
|
7838
7838
|
const { runtime, registry } = configured;
|
|
@@ -7840,7 +7840,7 @@ var Registry = class {
|
|
|
7840
7840
|
return jsonRouteResponse(501, {
|
|
7841
7841
|
status: "unsupported",
|
|
7842
7842
|
runtime: "rivetkit",
|
|
7843
|
-
version:
|
|
7843
|
+
version: _chunkWBUHPDDMcjs.VERSION
|
|
7844
7844
|
});
|
|
7845
7845
|
}
|
|
7846
7846
|
const response = await runtime.registryHealth(registry);
|
|
@@ -7915,14 +7915,14 @@ var Registry = class {
|
|
|
7915
7915
|
var _a;
|
|
7916
7916
|
if (!this.#runtimeServePromise) {
|
|
7917
7917
|
const configuredEnvoyVersion = (_a = this.#config.node) == null ? void 0 : _a.version;
|
|
7918
|
-
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" :
|
|
7918
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunkWBUHPDDMcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
|
|
7919
7919
|
logger2().info({
|
|
7920
7920
|
msg: "starting rivetkit envoy",
|
|
7921
|
-
rivetkitVersion:
|
|
7921
|
+
rivetkitVersion: _chunkWBUHPDDMcjs.VERSION,
|
|
7922
7922
|
envoyVersion: config.node.version,
|
|
7923
7923
|
envoyVersionSource
|
|
7924
7924
|
});
|
|
7925
|
-
if (envoyVersionSource === "default" &&
|
|
7925
|
+
if (envoyVersionSource === "default" && _chunkWBUHPDDMcjs.getNodeEnv.call(void 0, ) === "production") {
|
|
7926
7926
|
logger2().error({
|
|
7927
7927
|
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",
|
|
7928
7928
|
envoyVersion: config.node.version,
|
|
@@ -8026,7 +8026,7 @@ var Registry = class {
|
|
|
8026
8026
|
const modeAPromise = this.#runtimeServeConfiguredPromise;
|
|
8027
8027
|
const modeBPromise = this.#runtimeServerlessPromise;
|
|
8028
8028
|
const runtimes = /* @__PURE__ */ new Set();
|
|
8029
|
-
const localDevSignal = signalDriven &&
|
|
8029
|
+
const localDevSignal = signalDriven && _chunkWBUHPDDMcjs.getNodeEnv.call(void 0, ) !== "production" && config.engineSpawn && config.endpoint !== void 0 && _chunkHKD7AH4Zcjs.isLocalEngineEndpoint.call(void 0, config.endpoint);
|
|
8030
8030
|
let gracePeriodMs = (_a = config.shutdown) == null ? void 0 : _a.gracePeriodMs;
|
|
8031
8031
|
if (gracePeriodMs === void 0) {
|
|
8032
8032
|
gracePeriodMs = localDevSignal ? LOCAL_DEV_SHUTDOWN_GRACE_PERIOD_MS : await _asyncNullishCoalesce(await this.#actorStopThresholdMs(
|
|
@@ -8138,7 +8138,7 @@ var Registry = class {
|
|
|
8138
8138
|
}
|
|
8139
8139
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
8140
8140
|
try {
|
|
8141
|
-
if (
|
|
8141
|
+
if (_chunkWBUHPDDMcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8142
8142
|
return Promise.reject(
|
|
8143
8143
|
new Error(
|
|
8144
8144
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -8162,7 +8162,7 @@ var Registry = class {
|
|
|
8162
8162
|
if (!configuredRegistryPromise || !serveLifecyclePromise) {
|
|
8163
8163
|
throw new Error("registry envoy startup did not initialize");
|
|
8164
8164
|
}
|
|
8165
|
-
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 &&
|
|
8165
|
+
const readyTimeoutMs = config.engineSpawn && config.endpoint !== void 0 && _chunkHKD7AH4Zcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? LOCAL_ENGINE_READY_TIMEOUT_MS : REGISTRY_READY_TIMEOUT_MS;
|
|
8166
8166
|
let timeout;
|
|
8167
8167
|
const timeoutPromise = new Promise((_resolve, reject) => {
|
|
8168
8168
|
var _a;
|
|
@@ -8212,8 +8212,8 @@ var Registry = class {
|
|
|
8212
8212
|
* ```
|
|
8213
8213
|
*/
|
|
8214
8214
|
start() {
|
|
8215
|
-
if (
|
|
8216
|
-
const publicDir = _nullishCoalesce(
|
|
8215
|
+
if (_chunkWBUHPDDMcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8216
|
+
const publicDir = _nullishCoalesce(_chunkWBUHPDDMcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
8217
8217
|
this.listen({ publicDir }).catch((error) => {
|
|
8218
8218
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
8219
8219
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -8329,13 +8329,13 @@ var Registry = class {
|
|
|
8329
8329
|
};
|
|
8330
8330
|
console.log();
|
|
8331
8331
|
console.log(
|
|
8332
|
-
` RivetKit ${
|
|
8332
|
+
` RivetKit ${_chunkWBUHPDDMcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
8333
8333
|
);
|
|
8334
8334
|
if (config.namespace !== "default") {
|
|
8335
8335
|
logLine("Namespace", config.namespace);
|
|
8336
8336
|
}
|
|
8337
8337
|
if (config.endpoint) {
|
|
8338
|
-
const endpointType = config.startEngine ||
|
|
8338
|
+
const endpointType = config.startEngine || _chunkHKD7AH4Zcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
|
|
8339
8339
|
logLine("Endpoint", `${config.endpoint} (${endpointType})`);
|
|
8340
8340
|
}
|
|
8341
8341
|
if (kind === "serverless" && config.publicEndpoint) {
|
|
@@ -8405,5 +8405,5 @@ function setup(input) {
|
|
|
8405
8405
|
|
|
8406
8406
|
|
|
8407
8407
|
|
|
8408
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
8408
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkHKD7AH4Zcjs.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 = _chunkHKD7AH4Zcjs.createClientWithDriver; exports.defineRunHandler = _chunkYWWDUC6Dcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkWBUHPDDMcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkWBUHPDDMcjs.toUint8Array;
|
|
8409
8409
|
//# sourceMappingURL=mod.cjs.map
|