rivetkit 2.3.22 → 2.3.23
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/agent-os/index.cjs +1 -1
- package/dist/tsup/agent-os/index.cjs.map +1 -1
- package/dist/tsup/agent-os/index.js +1 -1
- package/dist/tsup/agent-os/index.js.map +1 -1
- package/dist/tsup/{chunk-BDKVTNJF.cjs → chunk-3Y7MKDLZ.cjs} +2 -2
- package/dist/tsup/{chunk-BDKVTNJF.cjs.map → chunk-3Y7MKDLZ.cjs.map} +1 -1
- package/dist/tsup/{chunk-DE2IFYJK.js → chunk-674WU4L6.js} +2 -2
- package/dist/tsup/{chunk-DE2IFYJK.js.map → chunk-674WU4L6.js.map} +1 -1
- package/dist/tsup/{chunk-QXBNHJH5.js → chunk-7ZDC4XEA.js} +4 -4
- package/dist/tsup/{chunk-GINS4O73.js → chunk-CIWSGFQG.js} +2 -2
- package/dist/tsup/{chunk-GZZNJGXY.cjs → chunk-CRZJ74SA.cjs} +3 -3
- package/dist/tsup/{chunk-GZZNJGXY.cjs.map → chunk-CRZJ74SA.cjs.map} +1 -1
- package/dist/tsup/{chunk-QOQA4JPN.cjs → chunk-FVVRY42Y.cjs} +7 -7
- package/dist/tsup/{chunk-QOQA4JPN.cjs.map → chunk-FVVRY42Y.cjs.map} +1 -1
- package/dist/tsup/{chunk-HEY27WZX.cjs → chunk-GZKR7ORE.cjs} +140 -140
- package/dist/tsup/{chunk-HEY27WZX.cjs.map → chunk-GZKR7ORE.cjs.map} +1 -1
- package/dist/tsup/{chunk-RIPVNPR6.js → chunk-HO6UA2RJ.js} +2 -2
- package/dist/tsup/{chunk-LUMROGNM.cjs → chunk-JLM6TML2.cjs} +3 -3
- package/dist/tsup/{chunk-LUMROGNM.cjs.map → chunk-JLM6TML2.cjs.map} +1 -1
- package/dist/tsup/{chunk-47FSGXYN.js → chunk-KC3T3MMB.js} +2 -2
- package/dist/tsup/{chunk-VD47X7KQ.js → chunk-LKNGMRIT.js} +3 -3
- package/dist/tsup/{chunk-4DTWJFIZ.js → chunk-UV5AN6YV.js} +3 -3
- package/dist/tsup/{chunk-WLRGUAMW.cjs → chunk-VJNX5RCS.cjs} +4 -4
- package/dist/tsup/{chunk-WLRGUAMW.cjs.map → chunk-VJNX5RCS.cjs.map} +1 -1
- package/dist/tsup/{chunk-WMNXGH25.cjs → chunk-XUCVB6BD.cjs} +3 -3
- package/dist/tsup/{chunk-WMNXGH25.cjs.map → chunk-XUCVB6BD.cjs.map} +1 -1
- package/dist/tsup/{chunk-XZBDVEQN.js → chunk-Z3Z5EOSP.js} +2 -2
- package/dist/tsup/{chunk-KEAUN5F5.cjs → chunk-Z7QK4HTR.cjs} +10 -10
- package/dist/tsup/{chunk-KEAUN5F5.cjs.map → chunk-Z7QK4HTR.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 +84 -84
- 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-QXBNHJH5.js.map → chunk-7ZDC4XEA.js.map} +0 -0
- /package/dist/tsup/{chunk-GINS4O73.js.map → chunk-CIWSGFQG.js.map} +0 -0
- /package/dist/tsup/{chunk-RIPVNPR6.js.map → chunk-HO6UA2RJ.js.map} +0 -0
- /package/dist/tsup/{chunk-47FSGXYN.js.map → chunk-KC3T3MMB.js.map} +0 -0
- /package/dist/tsup/{chunk-VD47X7KQ.js.map → chunk-LKNGMRIT.js.map} +0 -0
- /package/dist/tsup/{chunk-4DTWJFIZ.js.map → chunk-UV5AN6YV.js.map} +0 -0
- /package/dist/tsup/{chunk-XZBDVEQN.js.map → chunk-Z3Z5EOSP.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 _chunkVJNX5RCScjs = require('./chunk-VJNX5RCS.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ var _chunkNWCAIWHLcjs = require('./chunk-NWCAIWHL.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunkGZKR7OREcjs = require('./chunk-GZKR7ORE.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
@@ -44,9 +44,9 @@ var _chunkMYWZCDMLcjs = require('./chunk-MYWZCDML.cjs');
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunkJLM6TML2cjs = require('./chunk-JLM6TML2.cjs');
|
|
48
48
|
require('./chunk-KVFIONKQ.cjs');
|
|
49
|
-
require('./chunk-
|
|
49
|
+
require('./chunk-CRZJ74SA.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ require('./chunk-GZZNJGXY.cjs');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunk3Y7MKDLZcjs = require('./chunk-3Y7MKDLZ.cjs');
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
|
|
@@ -97,7 +97,7 @@ var _chunkMGI2VVF6cjs = require('./chunk-MGI2VVF6.cjs');
|
|
|
97
97
|
|
|
98
98
|
// src/actor/log.ts
|
|
99
99
|
function loggerWithoutContext() {
|
|
100
|
-
return
|
|
100
|
+
return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "actor-runtime");
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
// src/actor/definition.ts
|
|
@@ -239,7 +239,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
239
239
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
240
240
|
var _ws = require('hono/ws');
|
|
241
241
|
function logger() {
|
|
242
|
-
return
|
|
242
|
+
return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
243
243
|
}
|
|
244
244
|
var InlineWebSocketAdapter = class {
|
|
245
245
|
#handler;
|
|
@@ -391,7 +391,7 @@ var InlineWebSocketAdapter = class {
|
|
|
391
391
|
|
|
392
392
|
// src/registry/log.ts
|
|
393
393
|
function logger2() {
|
|
394
|
-
return
|
|
394
|
+
return _chunk3Y7MKDLZcjs.getLogger.call(void 0, "registry");
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
// src/serverless/configure.ts
|
|
@@ -437,8 +437,8 @@ async function configureServerlessPool(config) {
|
|
|
437
437
|
);
|
|
438
438
|
}
|
|
439
439
|
const customConfig = config.configurePool;
|
|
440
|
-
const clientConfig =
|
|
441
|
-
const dcsRes = await
|
|
440
|
+
const clientConfig = _chunkGZKR7OREcjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
441
|
+
const dcsRes = await _chunkGZKR7OREcjs.getDatacenters.call(void 0, clientConfig);
|
|
442
442
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
443
443
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
444
444
|
const headers = {
|
|
@@ -460,7 +460,7 @@ async function configureServerlessPool(config) {
|
|
|
460
460
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
461
461
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
462
462
|
};
|
|
463
|
-
await
|
|
463
|
+
await _chunkGZKR7OREcjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
464
464
|
datacenters: Object.fromEntries(
|
|
465
465
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
466
466
|
)
|
|
@@ -477,7 +477,7 @@ async function configureServerlessPool(config) {
|
|
|
477
477
|
logger2().warn({
|
|
478
478
|
msg: "serverless pool configuration attempt failed",
|
|
479
479
|
attempts,
|
|
480
|
-
error:
|
|
480
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
481
481
|
});
|
|
482
482
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
483
483
|
}
|
|
@@ -485,7 +485,7 @@ async function configureServerlessPool(config) {
|
|
|
485
485
|
logger2().error({
|
|
486
486
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
487
487
|
attempts,
|
|
488
|
-
error:
|
|
488
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, lastError)
|
|
489
489
|
});
|
|
490
490
|
throw lastError;
|
|
491
491
|
}
|
|
@@ -496,10 +496,10 @@ var _zod = require('zod');
|
|
|
496
496
|
// src/registry/config/envoy.ts
|
|
497
497
|
var _v4 = require('zod/v4');
|
|
498
498
|
var EnvoyConfigSchema = _v4.z.object({
|
|
499
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
500
|
-
version: _v4.z.number().default(() => _nullishCoalesce(
|
|
499
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
500
|
+
version: _v4.z.number().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
|
|
501
501
|
// Deprecated.
|
|
502
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
502
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
503
503
|
envoyKey: _v4.z.string().optional()
|
|
504
504
|
});
|
|
505
505
|
|
|
@@ -537,7 +537,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
537
537
|
*
|
|
538
538
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
539
539
|
*/
|
|
540
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
540
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
541
541
|
/**
|
|
542
542
|
* Token that clients should use when connecting via the public endpoint.
|
|
543
543
|
*
|
|
@@ -545,7 +545,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
545
545
|
*
|
|
546
546
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
547
547
|
*/
|
|
548
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
548
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetPublicToken.call(void 0, ))))
|
|
549
549
|
// There is no publicNamespace config option because the frontend and backend
|
|
550
550
|
// cannot use different namespaces. The namespace is extracted from the
|
|
551
551
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -599,7 +599,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
599
599
|
* Runtime binding to use for RivetKit core.
|
|
600
600
|
* */
|
|
601
601
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
602
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
602
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetkitRuntime.call(void 0, )));
|
|
603
603
|
if (rawRuntime === void 0) {
|
|
604
604
|
return "auto";
|
|
605
605
|
}
|
|
@@ -636,7 +636,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
636
636
|
* */
|
|
637
637
|
logging: _zod.z.object({
|
|
638
638
|
baseLogger: _zod.z.custom().optional(),
|
|
639
|
-
level:
|
|
639
|
+
level: _chunk3Y7MKDLZcjs.LogLevelSchema.optional()
|
|
640
640
|
}).optional().default(() => ({})),
|
|
641
641
|
// MARK: Routing
|
|
642
642
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -654,9 +654,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
654
654
|
*
|
|
655
655
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
656
656
|
*/
|
|
657
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
658
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
659
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
657
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetEngine.call(void 0, ))), () => ( _chunk3Y7MKDLZcjs.getRivetEndpoint.call(void 0, )))),
|
|
658
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetToken.call(void 0, )))),
|
|
659
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk3Y7MKDLZcjs.getRivetNamespace.call(void 0, )))),
|
|
660
660
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
661
661
|
// MARK: Client
|
|
662
662
|
// TODO:
|
|
@@ -696,21 +696,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
696
696
|
*
|
|
697
697
|
* Starts the full Rust engine process locally.
|
|
698
698
|
*/
|
|
699
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
699
|
+
startEngine: _zod.z.boolean().default(() => _chunk3Y7MKDLZcjs.getRivetRunEngine.call(void 0, )),
|
|
700
700
|
/**
|
|
701
701
|
* @experimental
|
|
702
702
|
*
|
|
703
703
|
* Host to bind the spawned local engine process to.
|
|
704
704
|
*/
|
|
705
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
705
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunkGZKR7OREcjs.ENGINE_HOST))),
|
|
706
706
|
/**
|
|
707
707
|
* @experimental
|
|
708
708
|
*
|
|
709
709
|
* Port to bind the spawned local engine process to.
|
|
710
710
|
*/
|
|
711
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
711
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunkGZKR7OREcjs.ENGINE_PORT))),
|
|
712
712
|
/** @experimental */
|
|
713
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
713
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunk3Y7MKDLZcjs.VERSION))),
|
|
714
714
|
/**
|
|
715
715
|
* Starts the first-party Services actor host when RivetKit manages
|
|
716
716
|
* a local engine. Defaults to the local-engine decision. Set
|
|
@@ -764,7 +764,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
764
764
|
}))
|
|
765
765
|
}).transform((config, ctx) => {
|
|
766
766
|
var _a, _b, _c;
|
|
767
|
-
const isDevEnv =
|
|
767
|
+
const isDevEnv = _chunk3Y7MKDLZcjs.isDev.call(void 0, );
|
|
768
768
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
769
769
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
770
770
|
ctx.addIssue({
|
|
@@ -774,7 +774,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
774
774
|
});
|
|
775
775
|
}
|
|
776
776
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
777
|
-
const parsedEndpoint = config.endpoint ?
|
|
777
|
+
const parsedEndpoint = config.endpoint ? _chunkGZKR7OREcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
778
778
|
endpoint: config.endpoint,
|
|
779
779
|
path: ["endpoint"],
|
|
780
780
|
namespace: config.namespace,
|
|
@@ -792,18 +792,18 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
792
792
|
message: "configurePool requires either endpoint or startEngine"
|
|
793
793
|
});
|
|
794
794
|
}
|
|
795
|
-
const localEngineEndpoint =
|
|
795
|
+
const localEngineEndpoint = _chunkGZKR7OREcjs.buildEngineEndpoint.call(void 0,
|
|
796
796
|
config.engineHost,
|
|
797
797
|
config.enginePort
|
|
798
798
|
);
|
|
799
799
|
const endpoint = config.startEngine ? localEngineEndpoint : _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.endpoint), () => ( (isDevEnv ? localEngineEndpoint : void 0)));
|
|
800
|
-
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => (
|
|
800
|
+
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunk3Y7MKDLZcjs.getRivetRunServices.call(void 0, ))), () => ( Boolean(endpoint && _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, endpoint))));
|
|
801
801
|
const validateServerlessEndpoint = Boolean(
|
|
802
802
|
config.startEngine || parsedEndpoint
|
|
803
803
|
);
|
|
804
804
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
805
|
-
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint &&
|
|
806
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
805
|
+
const token = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token)), () => ( (endpoint && _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
|
|
806
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkGZKR7OREcjs.tryParseEndpoint.call(void 0, ctx, {
|
|
807
807
|
endpoint: config.serverless.publicEndpoint,
|
|
808
808
|
path: ["serverless", "publicEndpoint"]
|
|
809
809
|
}) : void 0;
|
|
@@ -907,7 +907,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
907
907
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
908
908
|
sqlite: DocSqliteConfigSchema,
|
|
909
909
|
logging: _zod.z.object({
|
|
910
|
-
level:
|
|
910
|
+
level: _chunk3Y7MKDLZcjs.LogLevelSchema.optional().describe(
|
|
911
911
|
"Log level for RivetKit. Default: 'warn'"
|
|
912
912
|
)
|
|
913
913
|
}).optional().describe("Logging configuration."),
|
|
@@ -1537,7 +1537,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1537
1537
|
if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
|
|
1538
1538
|
return ownerCtx;
|
|
1539
1539
|
}
|
|
1540
|
-
const applicationSpan =
|
|
1540
|
+
const applicationSpan = _chunkGZKR7OREcjs.readActiveTraceHeaders.call(void 0, );
|
|
1541
1541
|
if (!applicationSpan) {
|
|
1542
1542
|
return active;
|
|
1543
1543
|
}
|
|
@@ -1740,7 +1740,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1740
1740
|
const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
|
|
1741
1741
|
return this.#invocationContext.run(
|
|
1742
1742
|
nativeCtx,
|
|
1743
|
-
() =>
|
|
1743
|
+
() => _chunkGZKR7OREcjs.runWithActorInvocationSpan.call(void 0, span, run)
|
|
1744
1744
|
);
|
|
1745
1745
|
}
|
|
1746
1746
|
actorInvocationTraceContext(ctx) {
|
|
@@ -2115,8 +2115,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2115
2115
|
function buildNativeHttpRequest(init) {
|
|
2116
2116
|
var _a;
|
|
2117
2117
|
const headers = new Headers(init.headers);
|
|
2118
|
-
const originalUrl = headers.get(
|
|
2119
|
-
headers.delete(
|
|
2118
|
+
const originalUrl = headers.get(_chunkGZKR7OREcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2119
|
+
headers.delete(_chunkGZKR7OREcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2120
2120
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2121
2121
|
const method2 = init.method.toUpperCase();
|
|
2122
2122
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2195,7 +2195,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
} catch (error) {
|
|
2197
2197
|
try {
|
|
2198
|
-
await stream.error(
|
|
2198
|
+
await stream.error(_chunk3Y7MKDLZcjs.stringifyError.call(void 0, error));
|
|
2199
2199
|
} catch (streamError) {
|
|
2200
2200
|
logger2().debug({
|
|
2201
2201
|
msg: "failed to report native http response stream error",
|
|
@@ -3433,7 +3433,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3433
3433
|
nativeError = error;
|
|
3434
3434
|
logger2().warn({
|
|
3435
3435
|
msg: "native runtime failed to load; falling back to wasm",
|
|
3436
|
-
error:
|
|
3436
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
3437
3437
|
});
|
|
3438
3438
|
}
|
|
3439
3439
|
try {
|
|
@@ -3442,7 +3442,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3442
3442
|
throw new (0, _chunkMGI2VVF6cjs.RivetError)(
|
|
3443
3443
|
"config",
|
|
3444
3444
|
"runtime_unavailable",
|
|
3445
|
-
`RivetKit could not load a core runtime. Native runtime: ${
|
|
3445
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunk3Y7MKDLZcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunk3Y7MKDLZcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3446
3446
|
{
|
|
3447
3447
|
public: true,
|
|
3448
3448
|
statusCode: 500
|
|
@@ -3636,7 +3636,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3636
3636
|
}).catch((error) => {
|
|
3637
3637
|
logger2().warn({
|
|
3638
3638
|
msg: "deferred native sleep cleanup failed",
|
|
3639
|
-
error:
|
|
3639
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
3640
3640
|
});
|
|
3641
3641
|
});
|
|
3642
3642
|
return;
|
|
@@ -3799,10 +3799,10 @@ function decodeValue(value) {
|
|
|
3799
3799
|
if (!value || value.length === 0) {
|
|
3800
3800
|
return void 0;
|
|
3801
3801
|
}
|
|
3802
|
-
return
|
|
3802
|
+
return _chunk3Y7MKDLZcjs.decodeCborCompat.call(void 0, value);
|
|
3803
3803
|
}
|
|
3804
3804
|
function encodeValue(value) {
|
|
3805
|
-
return
|
|
3805
|
+
return _chunk3Y7MKDLZcjs.encodeCborCompat.call(void 0, value);
|
|
3806
3806
|
}
|
|
3807
3807
|
function normalizeArgs(value) {
|
|
3808
3808
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -3838,7 +3838,7 @@ function isStructuredBridgeError(error) {
|
|
|
3838
3838
|
return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
3839
3839
|
}
|
|
3840
3840
|
function encodeNativeCallbackError(error) {
|
|
3841
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
3841
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunk3Y7MKDLZcjs.deconstructError.call(void 0, error, true);
|
|
3842
3842
|
const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
|
|
3843
3843
|
if (droppedMetadataCause !== void 0) {
|
|
3844
3844
|
logger2().warn(
|
|
@@ -3900,7 +3900,7 @@ function decodeWorkflowCbor(data) {
|
|
|
3900
3900
|
return null;
|
|
3901
3901
|
}
|
|
3902
3902
|
try {
|
|
3903
|
-
return
|
|
3903
|
+
return _chunk3Y7MKDLZcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
3904
3904
|
} catch (e3) {
|
|
3905
3905
|
return null;
|
|
3906
3906
|
}
|
|
@@ -4013,7 +4013,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
4013
4013
|
if (data === null) {
|
|
4014
4014
|
return null;
|
|
4015
4015
|
}
|
|
4016
|
-
const history =
|
|
4016
|
+
const history = _chunkVJNX5RCScjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
4017
4017
|
return jsonSafe({
|
|
4018
4018
|
nameRegistry: [...history.nameRegistry],
|
|
4019
4019
|
entries: history.entries.map((entry) => ({
|
|
@@ -4159,7 +4159,7 @@ var NativeConnAdapter = class {
|
|
|
4159
4159
|
},
|
|
4160
4160
|
(newValue) => {
|
|
4161
4161
|
assertCurrentState();
|
|
4162
|
-
|
|
4162
|
+
_chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4163
4163
|
}
|
|
4164
4164
|
);
|
|
4165
4165
|
}
|
|
@@ -4167,7 +4167,7 @@ var NativeConnAdapter = class {
|
|
|
4167
4167
|
var _a;
|
|
4168
4168
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4169
4169
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4170
|
-
|
|
4170
|
+
_chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4171
4171
|
this.#writeState(nextValue, { writeNative: true });
|
|
4172
4172
|
}
|
|
4173
4173
|
initializeState(value) {
|
|
@@ -5246,7 +5246,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5246
5246
|
},
|
|
5247
5247
|
(newValue) => {
|
|
5248
5248
|
assertCurrentState();
|
|
5249
|
-
|
|
5249
|
+
_chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5250
5250
|
}
|
|
5251
5251
|
);
|
|
5252
5252
|
}
|
|
@@ -5258,7 +5258,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5258
5258
|
}
|
|
5259
5259
|
this.#assertCanMutateState();
|
|
5260
5260
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5261
|
-
|
|
5261
|
+
_chunk3Y7MKDLZcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5262
5262
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5263
5263
|
}
|
|
5264
5264
|
initializeState(value) {
|
|
@@ -5470,7 +5470,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5470
5470
|
log: {
|
|
5471
5471
|
debug: (obj) => logger2().debug(obj)
|
|
5472
5472
|
},
|
|
5473
|
-
nativeDatabaseProvider:
|
|
5473
|
+
nativeDatabaseProvider: _chunkJLM6TML2cjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5474
5474
|
{
|
|
5475
5475
|
open: async (requestedActorId) => {
|
|
5476
5476
|
void requestedActorId;
|
|
@@ -5493,7 +5493,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5493
5493
|
return this.#db;
|
|
5494
5494
|
}
|
|
5495
5495
|
#bindDatabaseClient(client) {
|
|
5496
|
-
return
|
|
5496
|
+
return _chunkJLM6TML2cjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5497
5497
|
enter: async () => await this.#enterStateTransaction(),
|
|
5498
5498
|
exit: (scope) => this.#exitStateTransaction(
|
|
5499
5499
|
scope
|
|
@@ -5697,7 +5697,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5697
5697
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5698
5698
|
logger2().warn({
|
|
5699
5699
|
msg: "keepAwake promise rejected",
|
|
5700
|
-
error:
|
|
5700
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
5701
5701
|
});
|
|
5702
5702
|
}).then(() => null);
|
|
5703
5703
|
try {
|
|
@@ -6175,7 +6175,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6175
6175
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6176
6176
|
var _a;
|
|
6177
6177
|
const config = definition.config;
|
|
6178
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6178
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkJLM6TML2cjs.db.call(void 0, )));
|
|
6179
6179
|
const actionHandlers = _chunkNWCAIWHLcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6180
6180
|
const schemaConfig = {
|
|
6181
6181
|
actionInputSchemas: _chunkNWCAIWHLcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6186,9 +6186,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6186
6186
|
events: config.events,
|
|
6187
6187
|
queues: config.queues
|
|
6188
6188
|
};
|
|
6189
|
-
const createClient = (ctx) =>
|
|
6190
|
-
new (0,
|
|
6191
|
-
|
|
6189
|
+
const createClient = (ctx) => _chunkGZKR7OREcjs.createClientWithDriver.call(void 0,
|
|
6190
|
+
new (0, _chunkGZKR7OREcjs.RemoteEngineControlClient)(
|
|
6191
|
+
_chunkGZKR7OREcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6192
6192
|
),
|
|
6193
6193
|
{
|
|
6194
6194
|
encoding: "bare",
|
|
@@ -6380,7 +6380,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6380
6380
|
400
|
|
6381
6381
|
);
|
|
6382
6382
|
}
|
|
6383
|
-
const cbor =
|
|
6383
|
+
const cbor = _chunk3Y7MKDLZcjs.encodeCborCompat.call(void 0,
|
|
6384
6384
|
_nullishCoalesce(body.body, () => ( null))
|
|
6385
6385
|
);
|
|
6386
6386
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -6977,7 +6977,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6977
6977
|
...request,
|
|
6978
6978
|
abortController: requestAbortController
|
|
6979
6979
|
});
|
|
6980
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
6980
|
+
const rawConnParams = handlerRequest.headers.get(_chunkGZKR7OREcjs.HEADER_CONN_PARAMS);
|
|
6981
6981
|
let requestCtx;
|
|
6982
6982
|
let conn;
|
|
6983
6983
|
let removeRequestAbortListener;
|
|
@@ -7034,7 +7034,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7034
7034
|
requestCtx,
|
|
7035
7035
|
handlerRequest
|
|
7036
7036
|
);
|
|
7037
|
-
if (!
|
|
7037
|
+
if (!_chunkGZKR7OREcjs.isResponseLike.call(void 0, response)) {
|
|
7038
7038
|
throw new Error(
|
|
7039
7039
|
"onRequest handler must return a Response"
|
|
7040
7040
|
);
|
|
@@ -7129,7 +7129,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7129
7129
|
var _a2;
|
|
7130
7130
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
7131
7131
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
7132
|
-
return history == null ? void 0 :
|
|
7132
|
+
return history == null ? void 0 : _chunk3Y7MKDLZcjs.toUint8Array.call(void 0, history);
|
|
7133
7133
|
}
|
|
7134
7134
|
) : void 0,
|
|
7135
7135
|
replayWorkflow: _chunkNWCAIWHLcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -7143,7 +7143,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7143
7143
|
return void 0;
|
|
7144
7144
|
}
|
|
7145
7145
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
7146
|
-
return history == null ? void 0 :
|
|
7146
|
+
return history == null ? void 0 : _chunk3Y7MKDLZcjs.toUint8Array.call(void 0, history);
|
|
7147
7147
|
}
|
|
7148
7148
|
) : void 0,
|
|
7149
7149
|
actions: Object.fromEntries(
|
|
@@ -7279,7 +7279,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7279
7279
|
startServices: resolveServicesBinary && config.startServices,
|
|
7280
7280
|
handleInspectorHttpInRuntime: true,
|
|
7281
7281
|
serverlessBasePath: config.serverless.basePath,
|
|
7282
|
-
serverlessPackageVersion:
|
|
7282
|
+
serverlessPackageVersion: _chunk3Y7MKDLZcjs.VERSION,
|
|
7283
7283
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7284
7284
|
serverlessClientNamespace: config.publicNamespace,
|
|
7285
7285
|
serverlessClientToken: config.publicToken,
|
|
@@ -7292,7 +7292,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7292
7292
|
} catch (error) {
|
|
7293
7293
|
logger2().warn({
|
|
7294
7294
|
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",
|
|
7295
|
-
error:
|
|
7295
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
7296
7296
|
});
|
|
7297
7297
|
}
|
|
7298
7298
|
if (resolveServicesBinary && config.startServices) {
|
|
@@ -7302,20 +7302,20 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7302
7302
|
} catch (error) {
|
|
7303
7303
|
logger2().warn({
|
|
7304
7304
|
msg: "could not resolve the Services binary; a local engine will fail with services.binary_unavailable \u2014 set RIVET_RUN_SERVICES=0 to disable Services or RIVET_SERVICES_BINARY to a local rivet-services binary",
|
|
7305
|
-
error:
|
|
7305
|
+
error: _chunk3Y7MKDLZcjs.stringifyError.call(void 0, error)
|
|
7306
7306
|
});
|
|
7307
7307
|
}
|
|
7308
7308
|
}
|
|
7309
7309
|
serveConfig.engineHost = config.engineHost;
|
|
7310
7310
|
serveConfig.enginePort = config.enginePort;
|
|
7311
7311
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7312
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7312
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunk3Y7MKDLZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7313
7313
|
}
|
|
7314
7314
|
return serveConfig;
|
|
7315
7315
|
}
|
|
7316
7316
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7317
7317
|
var _a;
|
|
7318
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7318
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunk3Y7MKDLZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7319
7319
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7320
7320
|
}
|
|
7321
7321
|
if (runtime.kind === "napi") {
|
|
@@ -7382,7 +7382,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7382
7382
|
signal: abortController.signal
|
|
7383
7383
|
})
|
|
7384
7384
|
);
|
|
7385
|
-
if (!
|
|
7385
|
+
if (!_chunkGZKR7OREcjs.isResponseLike.call(void 0, response)) {
|
|
7386
7386
|
throw new TypeError(
|
|
7387
7387
|
"registry.listen() application fetch must return a Response"
|
|
7388
7388
|
);
|
|
@@ -7432,7 +7432,7 @@ var Registry = class {
|
|
|
7432
7432
|
var _a;
|
|
7433
7433
|
this.#config = config;
|
|
7434
7434
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7435
|
-
|
|
7435
|
+
_chunk3Y7MKDLZcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7436
7436
|
}
|
|
7437
7437
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7438
7438
|
this.routes = {
|
|
@@ -7658,10 +7658,10 @@ var Registry = class {
|
|
|
7658
7658
|
* ```
|
|
7659
7659
|
*/
|
|
7660
7660
|
async listen(opts = {}) {
|
|
7661
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7662
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7661
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunk3Y7MKDLZcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7662
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunk3Y7MKDLZcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7663
7663
|
const config = this.parseConfig();
|
|
7664
|
-
if (opts.application &&
|
|
7664
|
+
if (opts.application && _chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
7665
7665
|
if (config.runtime === "wasm") {
|
|
7666
7666
|
throw new Error(
|
|
7667
7667
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -7737,7 +7737,7 @@ var Registry = class {
|
|
|
7737
7737
|
return jsonRouteResponse(503, {
|
|
7738
7738
|
status: "not_started",
|
|
7739
7739
|
runtime: "rivetkit",
|
|
7740
|
-
version:
|
|
7740
|
+
version: _chunk3Y7MKDLZcjs.VERSION
|
|
7741
7741
|
});
|
|
7742
7742
|
}
|
|
7743
7743
|
const { runtime, registry } = configured;
|
|
@@ -7745,7 +7745,7 @@ var Registry = class {
|
|
|
7745
7745
|
return jsonRouteResponse(501, {
|
|
7746
7746
|
status: "unsupported",
|
|
7747
7747
|
runtime: "rivetkit",
|
|
7748
|
-
version:
|
|
7748
|
+
version: _chunk3Y7MKDLZcjs.VERSION
|
|
7749
7749
|
});
|
|
7750
7750
|
}
|
|
7751
7751
|
const response = await runtime.registryHealth(registry);
|
|
@@ -7819,14 +7819,14 @@ var Registry = class {
|
|
|
7819
7819
|
var _a;
|
|
7820
7820
|
if (!this.#runtimeServePromise) {
|
|
7821
7821
|
const configuredEnvoyVersion = (_a = this.#config.envoy) == null ? void 0 : _a.version;
|
|
7822
|
-
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" :
|
|
7822
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunk3Y7MKDLZcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
|
|
7823
7823
|
logger2().info({
|
|
7824
7824
|
msg: "starting rivetkit envoy",
|
|
7825
|
-
rivetkitVersion:
|
|
7825
|
+
rivetkitVersion: _chunk3Y7MKDLZcjs.VERSION,
|
|
7826
7826
|
envoyVersion: config.envoy.version,
|
|
7827
7827
|
envoyVersionSource
|
|
7828
7828
|
});
|
|
7829
|
-
if (envoyVersionSource === "default" &&
|
|
7829
|
+
if (envoyVersionSource === "default" && _chunk3Y7MKDLZcjs.getNodeEnv.call(void 0, ) === "production") {
|
|
7830
7830
|
logger2().error({
|
|
7831
7831
|
msg: "envoy version defaulted because neither config.envoy.version nor RIVET_ENVOY_VERSION is set; actors will not drain automatically across deploys. See https://rivet.dev/docs/actors/versions",
|
|
7832
7832
|
envoyVersion: config.envoy.version,
|
|
@@ -8017,7 +8017,7 @@ var Registry = class {
|
|
|
8017
8017
|
);
|
|
8018
8018
|
}
|
|
8019
8019
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
8020
|
-
if (
|
|
8020
|
+
if (_chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8021
8021
|
return Promise.reject(
|
|
8022
8022
|
new Error(
|
|
8023
8023
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -8087,8 +8087,8 @@ var Registry = class {
|
|
|
8087
8087
|
* ```
|
|
8088
8088
|
*/
|
|
8089
8089
|
start() {
|
|
8090
|
-
if (
|
|
8091
|
-
const publicDir = _nullishCoalesce(
|
|
8090
|
+
if (_chunk3Y7MKDLZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8091
|
+
const publicDir = _nullishCoalesce(_chunk3Y7MKDLZcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
8092
8092
|
this.listen({ publicDir }).catch((error) => {
|
|
8093
8093
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
8094
8094
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -8109,13 +8109,13 @@ var Registry = class {
|
|
|
8109
8109
|
};
|
|
8110
8110
|
console.log();
|
|
8111
8111
|
console.log(
|
|
8112
|
-
` RivetKit ${
|
|
8112
|
+
` RivetKit ${_chunk3Y7MKDLZcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
8113
8113
|
);
|
|
8114
8114
|
if (config.namespace !== "default") {
|
|
8115
8115
|
logLine("Namespace", config.namespace);
|
|
8116
8116
|
}
|
|
8117
8117
|
if (config.endpoint) {
|
|
8118
|
-
const endpointType = config.startEngine ||
|
|
8118
|
+
const endpointType = config.startEngine || _chunkGZKR7OREcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
|
|
8119
8119
|
logLine("Endpoint", `${config.endpoint} (${endpointType})`);
|
|
8120
8120
|
}
|
|
8121
8121
|
if (kind === "serverless" && config.publicEndpoint) {
|
|
@@ -8185,5 +8185,5 @@ function setup(input) {
|
|
|
8185
8185
|
|
|
8186
8186
|
|
|
8187
8187
|
|
|
8188
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
8188
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkGZKR7OREcjs.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 = _chunkGZKR7OREcjs.createClientWithDriver; exports.defineRunHandler = _chunkNWCAIWHLcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunk3Y7MKDLZcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunk3Y7MKDLZcjs.toUint8Array;
|
|
8189
8189
|
//# sourceMappingURL=mod.cjs.map
|
package/dist/tsup/mod.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decodeWorkflowHistoryTransport
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z3Z5EOSP.js";
|
|
4
4
|
import {
|
|
5
5
|
ACTOR_CONTEXT_INTERNAL_SYMBOL,
|
|
6
6
|
ActorConfigSchema,
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
runWithActorInvocationSpan,
|
|
36
36
|
tryParseEndpoint,
|
|
37
37
|
updateRunnerConfig
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-LKNGMRIT.js";
|
|
39
39
|
import {
|
|
40
40
|
makePrefixedKey,
|
|
41
41
|
removePrefixFromKey
|
|
@@ -44,9 +44,9 @@ import {
|
|
|
44
44
|
bindNativeStateTransactionContext,
|
|
45
45
|
db,
|
|
46
46
|
registerNativeStateTransactionOpener
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HO6UA2RJ.js";
|
|
48
48
|
import "./chunk-JTHHCZCZ.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-KC3T3MMB.js";
|
|
50
50
|
import {
|
|
51
51
|
LogLevelSchema,
|
|
52
52
|
VERSION,
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
80
80
|
parsePortEnv,
|
|
81
81
|
stringifyError,
|
|
82
82
|
toUint8Array
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-674WU4L6.js";
|
|
84
84
|
import {
|
|
85
85
|
INTERNAL_ERROR_CODE,
|
|
86
86
|
RivetError,
|