rivetkit 2.3.16-rc.3 → 2.3.17
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-PUA6HD6Q.js → chunk-365F3AJH.js} +2 -2
- package/dist/tsup/chunk-365F3AJH.js.map +1 -0
- package/dist/tsup/{chunk-SR2RDBBA.js → chunk-54CY6ZTO.js} +6 -6
- package/dist/tsup/{chunk-C2NJUAV7.js → chunk-5K4XQZ4P.js} +2 -2
- package/dist/tsup/{chunk-SXSPIMT7.cjs → chunk-5QUPJBNK.cjs} +10 -10
- package/dist/tsup/{chunk-SXSPIMT7.cjs.map → chunk-5QUPJBNK.cjs.map} +1 -1
- package/dist/tsup/{chunk-U4BMF572.js → chunk-ANYKGFOY.js} +3 -3
- package/dist/tsup/{chunk-ZUTYEAHU.cjs → chunk-CADMGXPE.cjs} +7 -7
- package/dist/tsup/{chunk-ZUTYEAHU.cjs.map → chunk-CADMGXPE.cjs.map} +1 -1
- package/dist/tsup/{chunk-76SYOT7O.cjs → chunk-FSGRCJWW.cjs} +3 -3
- package/dist/tsup/{chunk-76SYOT7O.cjs.map → chunk-FSGRCJWW.cjs.map} +1 -1
- package/dist/tsup/{chunk-C44Y427L.js → chunk-HQUDBHJW.js} +2 -2
- package/dist/tsup/{chunk-GKWGFIQN.js → chunk-L36VLPQE.js} +4 -4
- package/dist/tsup/{chunk-TE5JEFJ7.js → chunk-LZVD7MWW.js} +2 -2
- package/dist/tsup/{chunk-LXI6XABP.cjs → chunk-PSJA5LYU.cjs} +4 -4
- package/dist/tsup/{chunk-LXI6XABP.cjs.map → chunk-PSJA5LYU.cjs.map} +1 -1
- package/dist/tsup/{chunk-536GCPI4.js → chunk-RKROMB62.js} +2 -2
- package/dist/tsup/{chunk-S2ZOFC56.cjs → chunk-SXUM4ZDE.cjs} +3 -3
- package/dist/tsup/{chunk-S2ZOFC56.cjs.map → chunk-SXUM4ZDE.cjs.map} +1 -1
- package/dist/tsup/{chunk-RLDSKBCJ.cjs → chunk-VHHNO4U4.cjs} +139 -139
- package/dist/tsup/{chunk-RLDSKBCJ.cjs.map → chunk-VHHNO4U4.cjs.map} +1 -1
- package/dist/tsup/{chunk-QBSXKOJW.cjs → chunk-XMILQRW6.cjs} +3 -3
- package/dist/tsup/{chunk-QBSXKOJW.cjs.map → chunk-XMILQRW6.cjs.map} +1 -1
- package/dist/tsup/{chunk-4PXKZBV6.cjs → chunk-YB5P6IVA.cjs} +2 -2
- package/dist/tsup/chunk-YB5P6IVA.cjs.map +1 -0
- 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 +97 -79
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +24 -6
- package/dist/tsup/mod.js.map +1 -1
- 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 +8 -8
- package/src/registry/native.ts +27 -1
- package/src/registry/runtime.test.ts +74 -0
- package/dist/tsup/chunk-4PXKZBV6.cjs.map +0 -1
- package/dist/tsup/chunk-PUA6HD6Q.js.map +0 -1
- /package/dist/tsup/{chunk-SR2RDBBA.js.map → chunk-54CY6ZTO.js.map} +0 -0
- /package/dist/tsup/{chunk-C2NJUAV7.js.map → chunk-5K4XQZ4P.js.map} +0 -0
- /package/dist/tsup/{chunk-U4BMF572.js.map → chunk-ANYKGFOY.js.map} +0 -0
- /package/dist/tsup/{chunk-C44Y427L.js.map → chunk-HQUDBHJW.js.map} +0 -0
- /package/dist/tsup/{chunk-GKWGFIQN.js.map → chunk-L36VLPQE.js.map} +0 -0
- /package/dist/tsup/{chunk-TE5JEFJ7.js.map → chunk-LZVD7MWW.js.map} +0 -0
- /package/dist/tsup/{chunk-536GCPI4.js.map → chunk-RKROMB62.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 _chunkPSJA5LYUcjs = require('./chunk-PSJA5LYU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -28,18 +28,18 @@ var _chunk4KGXFC6Mcjs = require('./chunk-4KGXFC6M.cjs');
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
var
|
|
31
|
+
var _chunkVHHNO4U4cjs = require('./chunk-VHHNO4U4.cjs');
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkMYWZCDMLcjs = require('./chunk-MYWZCDML.cjs');
|
|
36
|
+
require('./chunk-SXUM4ZDE.cjs');
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
40
|
-
var
|
|
41
|
+
var _chunkXMILQRW6cjs = require('./chunk-XMILQRW6.cjs');
|
|
41
42
|
require('./chunk-KVFIONKQ.cjs');
|
|
42
|
-
require('./chunk-S2ZOFC56.cjs');
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
@@ -73,7 +73,7 @@ require('./chunk-S2ZOFC56.cjs');
|
|
|
73
73
|
|
|
74
74
|
|
|
75
75
|
|
|
76
|
-
var
|
|
76
|
+
var _chunkYB5P6IVAcjs = require('./chunk-YB5P6IVA.cjs');
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
|
|
@@ -89,7 +89,7 @@ var _chunk2JSYYH6Pcjs = require('./chunk-2JSYYH6P.cjs');
|
|
|
89
89
|
|
|
90
90
|
// src/actor/log.ts
|
|
91
91
|
function loggerWithoutContext() {
|
|
92
|
-
return
|
|
92
|
+
return _chunkYB5P6IVAcjs.getLogger.call(void 0, "actor-runtime");
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
// src/actor/definition.ts
|
|
@@ -229,7 +229,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
229
229
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
230
230
|
var _ws = require('hono/ws');
|
|
231
231
|
function logger() {
|
|
232
|
-
return
|
|
232
|
+
return _chunkYB5P6IVAcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
233
233
|
}
|
|
234
234
|
var InlineWebSocketAdapter = class {
|
|
235
235
|
#handler;
|
|
@@ -400,7 +400,7 @@ function isLocalEngineEndpoint(endpoint) {
|
|
|
400
400
|
|
|
401
401
|
// src/registry/log.ts
|
|
402
402
|
function logger2() {
|
|
403
|
-
return
|
|
403
|
+
return _chunkYB5P6IVAcjs.getLogger.call(void 0, "registry");
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
// src/serverless/configure.ts
|
|
@@ -446,8 +446,8 @@ async function configureServerlessPool(config) {
|
|
|
446
446
|
);
|
|
447
447
|
}
|
|
448
448
|
const customConfig = config.configurePool;
|
|
449
|
-
const clientConfig =
|
|
450
|
-
const dcsRes = await
|
|
449
|
+
const clientConfig = _chunkVHHNO4U4cjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
450
|
+
const dcsRes = await _chunkVHHNO4U4cjs.getDatacenters.call(void 0, clientConfig);
|
|
451
451
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
452
452
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
453
453
|
const headers = {
|
|
@@ -469,7 +469,7 @@ async function configureServerlessPool(config) {
|
|
|
469
469
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
470
470
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
471
471
|
};
|
|
472
|
-
await
|
|
472
|
+
await _chunkVHHNO4U4cjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
473
473
|
datacenters: Object.fromEntries(
|
|
474
474
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
475
475
|
)
|
|
@@ -486,7 +486,7 @@ async function configureServerlessPool(config) {
|
|
|
486
486
|
logger2().warn({
|
|
487
487
|
msg: "serverless pool configuration attempt failed",
|
|
488
488
|
attempts,
|
|
489
|
-
error:
|
|
489
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
490
490
|
});
|
|
491
491
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
492
492
|
}
|
|
@@ -494,7 +494,7 @@ async function configureServerlessPool(config) {
|
|
|
494
494
|
logger2().error({
|
|
495
495
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
496
496
|
attempts,
|
|
497
|
-
error:
|
|
497
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, lastError)
|
|
498
498
|
});
|
|
499
499
|
throw lastError;
|
|
500
500
|
}
|
|
@@ -506,20 +506,20 @@ var _zod = require('zod');
|
|
|
506
506
|
var _v4 = require('zod/v4');
|
|
507
507
|
var warnedMissingVersion = false;
|
|
508
508
|
var EnvoyConfigSchema = _v4.z.object({
|
|
509
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
509
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
510
510
|
version: _v4.z.number().default(() => {
|
|
511
|
-
const version =
|
|
511
|
+
const version = _chunkYB5P6IVAcjs.getRivetEnvoyVersion.call(void 0, );
|
|
512
512
|
if (version !== void 0) return version;
|
|
513
|
-
if (
|
|
513
|
+
if (_chunkYB5P6IVAcjs.getNodeEnv.call(void 0, ) === "production" && !warnedMissingVersion) {
|
|
514
514
|
warnedMissingVersion = true;
|
|
515
|
-
|
|
515
|
+
_chunkYB5P6IVAcjs.getLogger.call(void 0, "rivetkit").error(
|
|
516
516
|
"RIVET_ENVOY_VERSION is not set. Actors will not be versioned, which means they won't be drained on deploy. This is only needed when self-hosting or using a custom envoy (not needed for Rivet Compute). Set this as a build arg in your Dockerfile. See https://rivet.dev/docs/actors/versions"
|
|
517
517
|
);
|
|
518
518
|
}
|
|
519
519
|
return 1;
|
|
520
520
|
}),
|
|
521
521
|
// Deprecated.
|
|
522
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
522
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
523
523
|
envoyKey: _v4.z.string().optional()
|
|
524
524
|
});
|
|
525
525
|
|
|
@@ -557,7 +557,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
557
557
|
*
|
|
558
558
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
559
559
|
*/
|
|
560
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
560
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
561
561
|
/**
|
|
562
562
|
* Token that clients should use when connecting via the public endpoint.
|
|
563
563
|
*
|
|
@@ -565,7 +565,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
565
565
|
*
|
|
566
566
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
567
567
|
*/
|
|
568
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
568
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetPublicToken.call(void 0, ))))
|
|
569
569
|
// There is no publicNamespace config option because the frontend and backend
|
|
570
570
|
// cannot use different namespaces. The namespace is extracted from the
|
|
571
571
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -619,7 +619,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
619
619
|
* Runtime binding to use for RivetKit core.
|
|
620
620
|
* */
|
|
621
621
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
622
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
622
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetkitRuntime.call(void 0, )));
|
|
623
623
|
if (rawRuntime === void 0) {
|
|
624
624
|
return "auto";
|
|
625
625
|
}
|
|
@@ -656,7 +656,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
656
656
|
* */
|
|
657
657
|
logging: _zod.z.object({
|
|
658
658
|
baseLogger: _zod.z.custom().optional(),
|
|
659
|
-
level:
|
|
659
|
+
level: _chunkYB5P6IVAcjs.LogLevelSchema.optional()
|
|
660
660
|
}).optional().default(() => ({})),
|
|
661
661
|
// MARK: Routing
|
|
662
662
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -674,9 +674,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
674
674
|
*
|
|
675
675
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
676
676
|
*/
|
|
677
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
678
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
679
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
677
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetEngine.call(void 0, ))), () => ( _chunkYB5P6IVAcjs.getRivetEndpoint.call(void 0, )))),
|
|
678
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetToken.call(void 0, )))),
|
|
679
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkYB5P6IVAcjs.getRivetNamespace.call(void 0, )))),
|
|
680
680
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
681
681
|
// MARK: Client
|
|
682
682
|
// TODO:
|
|
@@ -716,21 +716,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
716
716
|
*
|
|
717
717
|
* Starts the full Rust engine process locally.
|
|
718
718
|
*/
|
|
719
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
719
|
+
startEngine: _zod.z.boolean().default(() => _chunkYB5P6IVAcjs.getRivetRunEngine.call(void 0, )),
|
|
720
720
|
/**
|
|
721
721
|
* @experimental
|
|
722
722
|
*
|
|
723
723
|
* Host to bind the spawned local engine process to.
|
|
724
724
|
*/
|
|
725
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
725
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetRunEngineHost.call(void 0, ), () => ( ENGINE_HOST))),
|
|
726
726
|
/**
|
|
727
727
|
* @experimental
|
|
728
728
|
*
|
|
729
729
|
* Port to bind the spawned local engine process to.
|
|
730
730
|
*/
|
|
731
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
731
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetRunEnginePort.call(void 0, ), () => ( ENGINE_PORT))),
|
|
732
732
|
/** @experimental */
|
|
733
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
733
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkYB5P6IVAcjs.VERSION))),
|
|
734
734
|
/**
|
|
735
735
|
* Starts the first-party Services actor host when RivetKit manages
|
|
736
736
|
* a local engine. Defaults to the local-engine decision. Set
|
|
@@ -784,7 +784,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
784
784
|
}))
|
|
785
785
|
}).transform((config, ctx) => {
|
|
786
786
|
var _a, _b, _c;
|
|
787
|
-
const isDevEnv =
|
|
787
|
+
const isDevEnv = _chunkYB5P6IVAcjs.isDev.call(void 0, );
|
|
788
788
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
789
789
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
790
790
|
ctx.addIssue({
|
|
@@ -794,7 +794,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
796
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
797
|
-
const parsedEndpoint = config.endpoint ?
|
|
797
|
+
const parsedEndpoint = config.endpoint ? _chunkVHHNO4U4cjs.tryParseEndpoint.call(void 0, ctx, {
|
|
798
798
|
endpoint: config.endpoint,
|
|
799
799
|
path: ["endpoint"],
|
|
800
800
|
namespace: config.namespace,
|
|
@@ -817,13 +817,13 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
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
|
-
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => (
|
|
820
|
+
const startServices = _nullishCoalesce(_nullishCoalesce(config.startServices, () => ( _chunkYB5P6IVAcjs.getRivetRunServices.call(void 0, ))), () => ( Boolean(endpoint && isLocalEngineEndpoint(endpoint))));
|
|
821
821
|
const validateServerlessEndpoint = Boolean(
|
|
822
822
|
config.startEngine || parsedEndpoint
|
|
823
823
|
);
|
|
824
824
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
825
825
|
const token = _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token));
|
|
826
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
826
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkVHHNO4U4cjs.tryParseEndpoint.call(void 0, ctx, {
|
|
827
827
|
endpoint: config.serverless.publicEndpoint,
|
|
828
828
|
path: ["serverless", "publicEndpoint"]
|
|
829
829
|
}) : void 0;
|
|
@@ -927,7 +927,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
927
927
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
928
928
|
sqlite: DocSqliteConfigSchema,
|
|
929
929
|
logging: _zod.z.object({
|
|
930
|
-
level:
|
|
930
|
+
level: _chunkYB5P6IVAcjs.LogLevelSchema.optional().describe(
|
|
931
931
|
"Log level for RivetKit. Default: 'warn'"
|
|
932
932
|
)
|
|
933
933
|
}).optional().describe("Logging configuration."),
|
|
@@ -2057,8 +2057,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2057
2057
|
function buildNativeHttpRequest(init) {
|
|
2058
2058
|
var _a;
|
|
2059
2059
|
const headers = new Headers(init.headers);
|
|
2060
|
-
const originalUrl = headers.get(
|
|
2061
|
-
headers.delete(
|
|
2060
|
+
const originalUrl = headers.get(_chunkVHHNO4U4cjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2061
|
+
headers.delete(_chunkVHHNO4U4cjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2062
2062
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2063
2063
|
const method2 = init.method.toUpperCase();
|
|
2064
2064
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2137,7 +2137,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2137
2137
|
}
|
|
2138
2138
|
} catch (error) {
|
|
2139
2139
|
try {
|
|
2140
|
-
await stream.error(
|
|
2140
|
+
await stream.error(_chunkYB5P6IVAcjs.stringifyError.call(void 0, error));
|
|
2141
2141
|
} catch (streamError) {
|
|
2142
2142
|
logger2().debug({
|
|
2143
2143
|
msg: "failed to report native http response stream error",
|
|
@@ -3345,10 +3345,28 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3345
3345
|
if (loaders.detectHost() === "edge-like") {
|
|
3346
3346
|
return (await loaders.loadWasm(config.wasm)).runtime;
|
|
3347
3347
|
}
|
|
3348
|
+
let nativeError;
|
|
3348
3349
|
try {
|
|
3349
3350
|
return (await loaders.loadNative()).runtime;
|
|
3350
|
-
} catch (
|
|
3351
|
+
} catch (error) {
|
|
3352
|
+
nativeError = error;
|
|
3353
|
+
logger2().warn({
|
|
3354
|
+
msg: "native runtime failed to load; falling back to wasm",
|
|
3355
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
3356
|
+
});
|
|
3357
|
+
}
|
|
3358
|
+
try {
|
|
3351
3359
|
return (await loaders.loadWasm(config.wasm)).runtime;
|
|
3360
|
+
} catch (wasmError) {
|
|
3361
|
+
throw new (0, _chunk2JSYYH6Pcjs.RivetError)(
|
|
3362
|
+
"config",
|
|
3363
|
+
"runtime_unavailable",
|
|
3364
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunkYB5P6IVAcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunkYB5P6IVAcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3365
|
+
{
|
|
3366
|
+
public: true,
|
|
3367
|
+
statusCode: 500
|
|
3368
|
+
}
|
|
3369
|
+
);
|
|
3352
3370
|
}
|
|
3353
3371
|
}
|
|
3354
3372
|
async function loadConfiguredRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
@@ -3537,7 +3555,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3537
3555
|
}).catch((error) => {
|
|
3538
3556
|
logger2().warn({
|
|
3539
3557
|
msg: "deferred native sleep cleanup failed",
|
|
3540
|
-
error:
|
|
3558
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
3541
3559
|
});
|
|
3542
3560
|
});
|
|
3543
3561
|
return;
|
|
@@ -3700,10 +3718,10 @@ function decodeValue(value) {
|
|
|
3700
3718
|
if (!value || value.length === 0) {
|
|
3701
3719
|
return void 0;
|
|
3702
3720
|
}
|
|
3703
|
-
return
|
|
3721
|
+
return _chunkYB5P6IVAcjs.decodeCborCompat.call(void 0, value);
|
|
3704
3722
|
}
|
|
3705
3723
|
function encodeValue(value) {
|
|
3706
|
-
return
|
|
3724
|
+
return _chunkYB5P6IVAcjs.encodeCborCompat.call(void 0, value);
|
|
3707
3725
|
}
|
|
3708
3726
|
function normalizeArgs(value) {
|
|
3709
3727
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -3739,7 +3757,7 @@ function isStructuredBridgeError(error) {
|
|
|
3739
3757
|
return _chunk2JSYYH6Pcjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
3740
3758
|
}
|
|
3741
3759
|
function encodeNativeCallbackError(error) {
|
|
3742
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
3760
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkYB5P6IVAcjs.deconstructError.call(void 0, error, true);
|
|
3743
3761
|
const bridgeError = new Error(_chunk2JSYYH6Pcjs.encodeBridgeRivetError.call(void 0, structuredError), {
|
|
3744
3762
|
cause: error instanceof Error ? error : void 0
|
|
3745
3763
|
});
|
|
@@ -3790,8 +3808,8 @@ function decodeWorkflowCbor(data) {
|
|
|
3790
3808
|
return null;
|
|
3791
3809
|
}
|
|
3792
3810
|
try {
|
|
3793
|
-
return
|
|
3794
|
-
} catch (
|
|
3811
|
+
return _chunkYB5P6IVAcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
3812
|
+
} catch (e4) {
|
|
3795
3813
|
return null;
|
|
3796
3814
|
}
|
|
3797
3815
|
}
|
|
@@ -3903,7 +3921,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
3903
3921
|
if (data === null) {
|
|
3904
3922
|
return null;
|
|
3905
3923
|
}
|
|
3906
|
-
const history =
|
|
3924
|
+
const history = _chunkPSJA5LYUcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
3907
3925
|
return jsonSafe({
|
|
3908
3926
|
nameRegistry: [...history.nameRegistry],
|
|
3909
3927
|
entries: history.entries.map((entry) => ({
|
|
@@ -4049,7 +4067,7 @@ var NativeConnAdapter = class {
|
|
|
4049
4067
|
},
|
|
4050
4068
|
(newValue) => {
|
|
4051
4069
|
assertCurrentState();
|
|
4052
|
-
|
|
4070
|
+
_chunkYB5P6IVAcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4053
4071
|
}
|
|
4054
4072
|
);
|
|
4055
4073
|
}
|
|
@@ -4057,7 +4075,7 @@ var NativeConnAdapter = class {
|
|
|
4057
4075
|
var _a;
|
|
4058
4076
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4059
4077
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4060
|
-
|
|
4078
|
+
_chunkYB5P6IVAcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4061
4079
|
this.#writeState(nextValue, { writeNative: true });
|
|
4062
4080
|
}
|
|
4063
4081
|
initializeState(value) {
|
|
@@ -5131,7 +5149,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5131
5149
|
},
|
|
5132
5150
|
(newValue) => {
|
|
5133
5151
|
assertCurrentState();
|
|
5134
|
-
|
|
5152
|
+
_chunkYB5P6IVAcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5135
5153
|
}
|
|
5136
5154
|
);
|
|
5137
5155
|
}
|
|
@@ -5143,7 +5161,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5143
5161
|
}
|
|
5144
5162
|
this.#assertCanMutateState();
|
|
5145
5163
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5146
|
-
|
|
5164
|
+
_chunkYB5P6IVAcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5147
5165
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5148
5166
|
}
|
|
5149
5167
|
initializeState(value) {
|
|
@@ -5327,7 +5345,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5327
5345
|
log: {
|
|
5328
5346
|
debug: (obj) => logger2().debug(obj)
|
|
5329
5347
|
},
|
|
5330
|
-
nativeDatabaseProvider:
|
|
5348
|
+
nativeDatabaseProvider: _chunkXMILQRW6cjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5331
5349
|
{
|
|
5332
5350
|
open: async (requestedActorId) => {
|
|
5333
5351
|
void requestedActorId;
|
|
@@ -5350,7 +5368,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5350
5368
|
return this.#db;
|
|
5351
5369
|
}
|
|
5352
5370
|
#bindDatabaseClient(client) {
|
|
5353
|
-
return
|
|
5371
|
+
return _chunkXMILQRW6cjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5354
5372
|
enter: async () => await this.#enterStateTransaction(),
|
|
5355
5373
|
exit: (scope) => this.#exitStateTransaction(
|
|
5356
5374
|
scope
|
|
@@ -5554,7 +5572,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5554
5572
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5555
5573
|
logger2().warn({
|
|
5556
5574
|
msg: "keepAwake promise rejected",
|
|
5557
|
-
error:
|
|
5575
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
5558
5576
|
});
|
|
5559
5577
|
}).then(() => null);
|
|
5560
5578
|
try {
|
|
@@ -6016,7 +6034,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6016
6034
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6017
6035
|
var _a;
|
|
6018
6036
|
const config = definition.config;
|
|
6019
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6037
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkXMILQRW6cjs.db.call(void 0, )));
|
|
6020
6038
|
const actionHandlers = _chunk4KGXFC6Mcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6021
6039
|
const schemaConfig = {
|
|
6022
6040
|
actionInputSchemas: _chunk4KGXFC6Mcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6027,9 +6045,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6027
6045
|
events: config.events,
|
|
6028
6046
|
queues: config.queues
|
|
6029
6047
|
};
|
|
6030
|
-
const createClient = () =>
|
|
6031
|
-
new (0,
|
|
6032
|
-
|
|
6048
|
+
const createClient = () => _chunkVHHNO4U4cjs.createClientWithDriver.call(void 0,
|
|
6049
|
+
new (0, _chunkVHHNO4U4cjs.RemoteEngineControlClient)(
|
|
6050
|
+
_chunkVHHNO4U4cjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6033
6051
|
),
|
|
6034
6052
|
{ encoding: "bare" }
|
|
6035
6053
|
);
|
|
@@ -6190,7 +6208,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6190
6208
|
let body;
|
|
6191
6209
|
try {
|
|
6192
6210
|
body = await jsRequest.json();
|
|
6193
|
-
} catch (
|
|
6211
|
+
} catch (e5) {
|
|
6194
6212
|
return errorResponse(
|
|
6195
6213
|
new (0, _chunk2JSYYH6Pcjs.RivetError)(
|
|
6196
6214
|
"actor",
|
|
@@ -6213,7 +6231,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6213
6231
|
400
|
|
6214
6232
|
);
|
|
6215
6233
|
}
|
|
6216
|
-
const cbor =
|
|
6234
|
+
const cbor = _chunkYB5P6IVAcjs.encodeCborCompat.call(void 0,
|
|
6217
6235
|
_nullishCoalesce(body.body, () => ( null))
|
|
6218
6236
|
);
|
|
6219
6237
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -6800,7 +6818,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6800
6818
|
...request,
|
|
6801
6819
|
abortController: requestAbortController
|
|
6802
6820
|
});
|
|
6803
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
6821
|
+
const rawConnParams = handlerRequest.headers.get(_chunkVHHNO4U4cjs.HEADER_CONN_PARAMS);
|
|
6804
6822
|
let requestCtx;
|
|
6805
6823
|
let conn;
|
|
6806
6824
|
let removeRequestAbortListener;
|
|
@@ -6855,7 +6873,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6855
6873
|
requestCtx,
|
|
6856
6874
|
handlerRequest
|
|
6857
6875
|
);
|
|
6858
|
-
if (!
|
|
6876
|
+
if (!_chunkVHHNO4U4cjs.isResponseLike.call(void 0, response)) {
|
|
6859
6877
|
throw new Error(
|
|
6860
6878
|
"onRequest handler must return a Response"
|
|
6861
6879
|
);
|
|
@@ -6948,7 +6966,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6948
6966
|
var _a2;
|
|
6949
6967
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
6950
6968
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
6951
|
-
return history == null ? void 0 :
|
|
6969
|
+
return history == null ? void 0 : _chunkYB5P6IVAcjs.toUint8Array.call(void 0, history);
|
|
6952
6970
|
}
|
|
6953
6971
|
) : void 0,
|
|
6954
6972
|
replayWorkflow: _chunk4KGXFC6Mcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -6962,7 +6980,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6962
6980
|
return void 0;
|
|
6963
6981
|
}
|
|
6964
6982
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
6965
|
-
return history == null ? void 0 :
|
|
6983
|
+
return history == null ? void 0 : _chunkYB5P6IVAcjs.toUint8Array.call(void 0, history);
|
|
6966
6984
|
}
|
|
6967
6985
|
) : void 0,
|
|
6968
6986
|
actions: Object.fromEntries(
|
|
@@ -7087,7 +7105,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7087
7105
|
startServices: resolveServicesBinary && config.startServices,
|
|
7088
7106
|
handleInspectorHttpInRuntime: true,
|
|
7089
7107
|
serverlessBasePath: config.serverless.basePath,
|
|
7090
|
-
serverlessPackageVersion:
|
|
7108
|
+
serverlessPackageVersion: _chunkYB5P6IVAcjs.VERSION,
|
|
7091
7109
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7092
7110
|
serverlessClientNamespace: config.publicNamespace,
|
|
7093
7111
|
serverlessClientToken: config.publicToken,
|
|
@@ -7100,7 +7118,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7100
7118
|
} catch (error) {
|
|
7101
7119
|
logger2().warn({
|
|
7102
7120
|
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",
|
|
7103
|
-
error:
|
|
7121
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
7104
7122
|
});
|
|
7105
7123
|
}
|
|
7106
7124
|
if (resolveServicesBinary && config.startServices) {
|
|
@@ -7110,20 +7128,20 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7110
7128
|
} catch (error) {
|
|
7111
7129
|
logger2().warn({
|
|
7112
7130
|
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",
|
|
7113
|
-
error:
|
|
7131
|
+
error: _chunkYB5P6IVAcjs.stringifyError.call(void 0, error)
|
|
7114
7132
|
});
|
|
7115
7133
|
}
|
|
7116
7134
|
}
|
|
7117
7135
|
serveConfig.engineHost = config.engineHost;
|
|
7118
7136
|
serveConfig.enginePort = config.enginePort;
|
|
7119
7137
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7120
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7138
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkYB5P6IVAcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7121
7139
|
}
|
|
7122
7140
|
return serveConfig;
|
|
7123
7141
|
}
|
|
7124
7142
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7125
7143
|
var _a;
|
|
7126
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7144
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkYB5P6IVAcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7127
7145
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7128
7146
|
}
|
|
7129
7147
|
if (runtime.kind === "napi") {
|
|
@@ -7190,7 +7208,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7190
7208
|
signal: abortController.signal
|
|
7191
7209
|
})
|
|
7192
7210
|
);
|
|
7193
|
-
if (!
|
|
7211
|
+
if (!_chunkVHHNO4U4cjs.isResponseLike.call(void 0, response)) {
|
|
7194
7212
|
throw new TypeError(
|
|
7195
7213
|
"registry.listen() application fetch must return a Response"
|
|
7196
7214
|
);
|
|
@@ -7240,7 +7258,7 @@ var Registry = class {
|
|
|
7240
7258
|
var _a;
|
|
7241
7259
|
this.#config = config;
|
|
7242
7260
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7243
|
-
|
|
7261
|
+
_chunkYB5P6IVAcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7244
7262
|
}
|
|
7245
7263
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7246
7264
|
this.routes = {
|
|
@@ -7466,10 +7484,10 @@ var Registry = class {
|
|
|
7466
7484
|
* ```
|
|
7467
7485
|
*/
|
|
7468
7486
|
async listen(opts = {}) {
|
|
7469
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7470
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7487
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunkYB5P6IVAcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7488
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunkYB5P6IVAcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7471
7489
|
const config = this.parseConfig();
|
|
7472
|
-
if (opts.application &&
|
|
7490
|
+
if (opts.application && _chunkYB5P6IVAcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
7473
7491
|
if (config.runtime === "wasm") {
|
|
7474
7492
|
throw new Error(
|
|
7475
7493
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -7545,7 +7563,7 @@ var Registry = class {
|
|
|
7545
7563
|
return jsonRouteResponse(503, {
|
|
7546
7564
|
status: "not_started",
|
|
7547
7565
|
runtime: "rivetkit",
|
|
7548
|
-
version:
|
|
7566
|
+
version: _chunkYB5P6IVAcjs.VERSION
|
|
7549
7567
|
});
|
|
7550
7568
|
}
|
|
7551
7569
|
const { runtime, registry } = configured;
|
|
@@ -7553,7 +7571,7 @@ var Registry = class {
|
|
|
7553
7571
|
return jsonRouteResponse(501, {
|
|
7554
7572
|
status: "unsupported",
|
|
7555
7573
|
runtime: "rivetkit",
|
|
7556
|
-
version:
|
|
7574
|
+
version: _chunkYB5P6IVAcjs.VERSION
|
|
7557
7575
|
});
|
|
7558
7576
|
}
|
|
7559
7577
|
const response = await runtime.registryHealth(registry);
|
|
@@ -7800,7 +7818,7 @@ var Registry = class {
|
|
|
7800
7818
|
);
|
|
7801
7819
|
}
|
|
7802
7820
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
7803
|
-
if (
|
|
7821
|
+
if (_chunkYB5P6IVAcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
7804
7822
|
return Promise.reject(
|
|
7805
7823
|
new Error(
|
|
7806
7824
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -7870,8 +7888,8 @@ var Registry = class {
|
|
|
7870
7888
|
* ```
|
|
7871
7889
|
*/
|
|
7872
7890
|
start() {
|
|
7873
|
-
if (
|
|
7874
|
-
const publicDir = _nullishCoalesce(
|
|
7891
|
+
if (_chunkYB5P6IVAcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
7892
|
+
const publicDir = _nullishCoalesce(_chunkYB5P6IVAcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
7875
7893
|
this.listen({ publicDir }).catch((error) => {
|
|
7876
7894
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
7877
7895
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -7892,7 +7910,7 @@ var Registry = class {
|
|
|
7892
7910
|
};
|
|
7893
7911
|
console.log();
|
|
7894
7912
|
console.log(
|
|
7895
|
-
` RivetKit ${
|
|
7913
|
+
` RivetKit ${_chunkYB5P6IVAcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
7896
7914
|
);
|
|
7897
7915
|
if (config.namespace !== "default") {
|
|
7898
7916
|
logLine("Namespace", config.namespace);
|
|
@@ -7968,5 +7986,5 @@ function setup(input) {
|
|
|
7968
7986
|
|
|
7969
7987
|
|
|
7970
7988
|
|
|
7971
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
7989
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkVHHNO4U4cjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunk2JSYYH6Pcjs.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 = _chunk2JSYYH6Pcjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunk2JSYYH6Pcjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkVHHNO4U4cjs.createClientWithDriver; exports.defineRunHandler = _chunk4KGXFC6Mcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkYB5P6IVAcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkYB5P6IVAcjs.toUint8Array;
|
|
7972
7990
|
//# sourceMappingURL=mod.cjs.map
|