rivetkit 0.0.0-feat-sqlite-sync.18dce02 → 0.0.0-feat-sqlite-sync.32022a9
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-5OLUEVR4.cjs → chunk-2LRKNNQJ.cjs} +140 -140
- package/dist/tsup/{chunk-5OLUEVR4.cjs.map → chunk-2LRKNNQJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-7V7XONO4.cjs → chunk-4SIQMCXI.cjs} +7 -7
- package/dist/tsup/{chunk-7V7XONO4.cjs.map → chunk-4SIQMCXI.cjs.map} +1 -1
- package/dist/tsup/{chunk-Y65LBKWK.cjs → chunk-5LBUG2IK.cjs} +3 -3
- package/dist/tsup/{chunk-Y65LBKWK.cjs.map → chunk-5LBUG2IK.cjs.map} +1 -1
- package/dist/tsup/{chunk-C6DFTFDH.cjs → chunk-6BRDJRCZ.cjs} +2 -2
- package/dist/tsup/{chunk-C6DFTFDH.cjs.map → chunk-6BRDJRCZ.cjs.map} +1 -1
- package/dist/tsup/{chunk-52HQXSMQ.js → chunk-6VNQCLKF.js} +4 -4
- package/dist/tsup/{chunk-SMZVRN4A.cjs → chunk-6ZHUGY2E.cjs} +4 -4
- package/dist/tsup/{chunk-SMZVRN4A.cjs.map → chunk-6ZHUGY2E.cjs.map} +1 -1
- package/dist/tsup/{chunk-CH2DXUSV.cjs → chunk-7XBDAFGQ.cjs} +3 -3
- package/dist/tsup/{chunk-CH2DXUSV.cjs.map → chunk-7XBDAFGQ.cjs.map} +1 -1
- package/dist/tsup/{chunk-M334VZYU.js → chunk-BJGWUWNE.js} +3 -3
- package/dist/tsup/{chunk-OHSZYIQ2.js → chunk-EDJKDOI2.js} +2 -2
- package/dist/tsup/{chunk-AT6KBTSZ.js → chunk-HHALUH4L.js} +2 -2
- package/dist/tsup/{chunk-M4DBJOKU.js → chunk-IAVZH6HH.js} +2 -2
- package/dist/tsup/{chunk-3E3LWFAZ.js → chunk-M27XAZNI.js} +2 -2
- package/dist/tsup/{chunk-3E3LWFAZ.js.map → chunk-M27XAZNI.js.map} +1 -1
- package/dist/tsup/{chunk-S2WGWO6T.cjs → chunk-PMU5EDGT.cjs} +3 -3
- package/dist/tsup/{chunk-S2WGWO6T.cjs.map → chunk-PMU5EDGT.cjs.map} +1 -1
- package/dist/tsup/{chunk-7VZRBST6.js → chunk-UZ5O42HF.js} +2 -2
- package/dist/tsup/{chunk-I2SMBJA5.cjs → chunk-WE7D64FW.cjs} +10 -10
- package/dist/tsup/{chunk-I2SMBJA5.cjs.map → chunk-WE7D64FW.cjs.map} +1 -1
- package/dist/tsup/{chunk-CW3RLSJO.js → chunk-Z6IVW2Y5.js} +3 -3
- 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-52HQXSMQ.js.map → chunk-6VNQCLKF.js.map} +0 -0
- /package/dist/tsup/{chunk-M334VZYU.js.map → chunk-BJGWUWNE.js.map} +0 -0
- /package/dist/tsup/{chunk-OHSZYIQ2.js.map → chunk-EDJKDOI2.js.map} +0 -0
- /package/dist/tsup/{chunk-AT6KBTSZ.js.map → chunk-HHALUH4L.js.map} +0 -0
- /package/dist/tsup/{chunk-M4DBJOKU.js.map → chunk-IAVZH6HH.js.map} +0 -0
- /package/dist/tsup/{chunk-7VZRBST6.js.map → chunk-UZ5O42HF.js.map} +0 -0
- /package/dist/tsup/{chunk-CW3RLSJO.js.map → chunk-Z6IVW2Y5.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 _chunk6ZHUGY2Ecjs = require('./chunk-6ZHUGY2E.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -35,7 +35,7 @@ var _chunkHDVZ6YZGcjs = require('./chunk-HDVZ6YZG.cjs');
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
var
|
|
38
|
+
var _chunk2LRKNNQJcjs = require('./chunk-2LRKNNQJ.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 _chunkPMU5EDGTcjs = require('./chunk-PMU5EDGT.cjs');
|
|
48
48
|
require('./chunk-KVFIONKQ.cjs');
|
|
49
|
-
require('./chunk-
|
|
49
|
+
require('./chunk-5LBUG2IK.cjs');
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,7 +80,7 @@ require('./chunk-Y65LBKWK.cjs');
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
|
|
83
|
-
var
|
|
83
|
+
var _chunk6BRDJRCZcjs = require('./chunk-6BRDJRCZ.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 _chunk6BRDJRCZcjs.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 _chunk6BRDJRCZcjs.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 _chunk6BRDJRCZcjs.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 = _chunk2LRKNNQJcjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
441
|
+
const dcsRes = await _chunk2LRKNNQJcjs.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 _chunk2LRKNNQJcjs.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: _chunk6BRDJRCZcjs.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: _chunk6BRDJRCZcjs.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(_chunk6BRDJRCZcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
500
|
+
version: _v4.z.number().default(() => _nullishCoalesce(_chunk6BRDJRCZcjs.getRivetEnvoyVersion.call(void 0, ), () => ( 1))),
|
|
501
501
|
// Deprecated.
|
|
502
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
502
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunk6BRDJRCZcjs.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, () => ( _chunk6BRDJRCZcjs.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, () => ( _chunk6BRDJRCZcjs.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, () => ( _chunk6BRDJRCZcjs.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: _chunk6BRDJRCZcjs.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, () => ( _chunk6BRDJRCZcjs.getRivetEngine.call(void 0, ))), () => ( _chunk6BRDJRCZcjs.getRivetEndpoint.call(void 0, )))),
|
|
658
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk6BRDJRCZcjs.getRivetToken.call(void 0, )))),
|
|
659
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunk6BRDJRCZcjs.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(() => _chunk6BRDJRCZcjs.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(_chunk6BRDJRCZcjs.getRivetRunEngineHost.call(void 0, ), () => ( _chunk2LRKNNQJcjs.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(_chunk6BRDJRCZcjs.getRivetRunEnginePort.call(void 0, ), () => ( _chunk2LRKNNQJcjs.ENGINE_PORT))),
|
|
712
712
|
/** @experimental */
|
|
713
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
713
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunk6BRDJRCZcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunk6BRDJRCZcjs.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 = _chunk6BRDJRCZcjs.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 ? _chunk2LRKNNQJcjs.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 = _chunk2LRKNNQJcjs.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, () => ( _chunk6BRDJRCZcjs.getRivetRunServices.call(void 0, ))), () => ( Boolean(endpoint && _chunk2LRKNNQJcjs.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 && _chunk2LRKNNQJcjs.isLocalEngineEndpoint.call(void 0, endpoint) ? "default" : void 0)));
|
|
806
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunk2LRKNNQJcjs.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: _chunk6BRDJRCZcjs.LogLevelSchema.optional().describe(
|
|
911
911
|
"Log level for RivetKit. Default: 'warn'"
|
|
912
912
|
)
|
|
913
913
|
}).optional().describe("Logging configuration."),
|
|
@@ -1680,7 +1680,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1680
1680
|
if (!(active == null ? void 0 : active.sameActorInstance(ownerCtx))) {
|
|
1681
1681
|
return ownerCtx;
|
|
1682
1682
|
}
|
|
1683
|
-
const applicationSpan =
|
|
1683
|
+
const applicationSpan = _chunk2LRKNNQJcjs.readActiveTraceHeaders.call(void 0, );
|
|
1684
1684
|
if (!applicationSpan) {
|
|
1685
1685
|
return active;
|
|
1686
1686
|
}
|
|
@@ -1883,7 +1883,7 @@ var NapiCoreRuntime = (_class = class {
|
|
|
1883
1883
|
const span = (_a = nativeCtx.invocationTraceContext()) == null ? void 0 : _a.span;
|
|
1884
1884
|
return this.#invocationContext.run(
|
|
1885
1885
|
nativeCtx,
|
|
1886
|
-
() =>
|
|
1886
|
+
() => _chunk2LRKNNQJcjs.runWithActorInvocationSpan.call(void 0, span, run)
|
|
1887
1887
|
);
|
|
1888
1888
|
}
|
|
1889
1889
|
actorInvocationTraceContext(ctx) {
|
|
@@ -2302,8 +2302,8 @@ function runtimeBytesToArrayBuffer(value) {
|
|
|
2302
2302
|
function buildNativeHttpRequest(init) {
|
|
2303
2303
|
var _a;
|
|
2304
2304
|
const headers = new Headers(init.headers);
|
|
2305
|
-
const originalUrl = headers.get(
|
|
2306
|
-
headers.delete(
|
|
2305
|
+
const originalUrl = headers.get(_chunk2LRKNNQJcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2306
|
+
headers.delete(_chunk2LRKNNQJcjs.HEADER_ORIGINAL_REQUEST_URL);
|
|
2307
2307
|
const url = _nullishCoalesce(originalUrl, () => ( (init.uri.startsWith("http") ? init.uri : new URL(init.uri, "http://127.0.0.1").toString())));
|
|
2308
2308
|
const method2 = init.method.toUpperCase();
|
|
2309
2309
|
const bodyForbidden = method2 === "GET" || method2 === "HEAD";
|
|
@@ -2382,7 +2382,7 @@ async function pumpResponseBody(reader, stream) {
|
|
|
2382
2382
|
}
|
|
2383
2383
|
} catch (error) {
|
|
2384
2384
|
try {
|
|
2385
|
-
await stream.error(
|
|
2385
|
+
await stream.error(_chunk6BRDJRCZcjs.stringifyError.call(void 0, error));
|
|
2386
2386
|
} catch (streamError) {
|
|
2387
2387
|
logger2().debug({
|
|
2388
2388
|
msg: "failed to report native http response stream error",
|
|
@@ -3671,7 +3671,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3671
3671
|
nativeError = error;
|
|
3672
3672
|
logger2().warn({
|
|
3673
3673
|
msg: "native runtime failed to load; falling back to wasm",
|
|
3674
|
-
error:
|
|
3674
|
+
error: _chunk6BRDJRCZcjs.stringifyError.call(void 0, error)
|
|
3675
3675
|
});
|
|
3676
3676
|
}
|
|
3677
3677
|
try {
|
|
@@ -3680,7 +3680,7 @@ async function loadAutoRuntime(config, loaders = defaultRuntimeLoaders) {
|
|
|
3680
3680
|
throw new (0, _chunkMGI2VVF6cjs.RivetError)(
|
|
3681
3681
|
"config",
|
|
3682
3682
|
"runtime_unavailable",
|
|
3683
|
-
`RivetKit could not load a core runtime. Native runtime: ${
|
|
3683
|
+
`RivetKit could not load a core runtime. Native runtime: ${_chunk6BRDJRCZcjs.stringifyError.call(void 0, nativeError)} Wasm runtime: ${_chunk6BRDJRCZcjs.stringifyError.call(void 0, wasmError)}`,
|
|
3684
3684
|
{
|
|
3685
3685
|
public: true,
|
|
3686
3686
|
statusCode: 500
|
|
@@ -3874,7 +3874,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
3874
3874
|
}).catch((error) => {
|
|
3875
3875
|
logger2().warn({
|
|
3876
3876
|
msg: "deferred native sleep cleanup failed",
|
|
3877
|
-
error:
|
|
3877
|
+
error: _chunk6BRDJRCZcjs.stringifyError.call(void 0, error)
|
|
3878
3878
|
});
|
|
3879
3879
|
});
|
|
3880
3880
|
return;
|
|
@@ -4059,10 +4059,10 @@ function decodeValue(value) {
|
|
|
4059
4059
|
if (!value || value.length === 0) {
|
|
4060
4060
|
return void 0;
|
|
4061
4061
|
}
|
|
4062
|
-
return
|
|
4062
|
+
return _chunk6BRDJRCZcjs.decodeCborCompat.call(void 0, value);
|
|
4063
4063
|
}
|
|
4064
4064
|
function encodeValue(value) {
|
|
4065
|
-
return
|
|
4065
|
+
return _chunk6BRDJRCZcjs.encodeCborCompat.call(void 0, value);
|
|
4066
4066
|
}
|
|
4067
4067
|
function normalizeArgs(value) {
|
|
4068
4068
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -4098,7 +4098,7 @@ function isStructuredBridgeError(error) {
|
|
|
4098
4098
|
return _chunkMGI2VVF6cjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
4099
4099
|
}
|
|
4100
4100
|
function encodeNativeCallbackError(error) {
|
|
4101
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
4101
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunk6BRDJRCZcjs.deconstructError.call(void 0, error, true);
|
|
4102
4102
|
const { encoded, droppedMetadataCause } = _chunkMGI2VVF6cjs.encodeBridgeRivetError.call(void 0, structuredError);
|
|
4103
4103
|
if (droppedMetadataCause !== void 0) {
|
|
4104
4104
|
logger2().warn(
|
|
@@ -4160,7 +4160,7 @@ function decodeWorkflowCbor(data) {
|
|
|
4160
4160
|
return null;
|
|
4161
4161
|
}
|
|
4162
4162
|
try {
|
|
4163
|
-
return
|
|
4163
|
+
return _chunk6BRDJRCZcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
4164
4164
|
} catch (e3) {
|
|
4165
4165
|
return null;
|
|
4166
4166
|
}
|
|
@@ -4273,7 +4273,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
4273
4273
|
if (data === null) {
|
|
4274
4274
|
return null;
|
|
4275
4275
|
}
|
|
4276
|
-
const history =
|
|
4276
|
+
const history = _chunk6ZHUGY2Ecjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
4277
4277
|
return jsonSafe({
|
|
4278
4278
|
nameRegistry: [...history.nameRegistry],
|
|
4279
4279
|
entries: history.entries.map((entry) => ({
|
|
@@ -4419,7 +4419,7 @@ var NativeConnAdapter = class {
|
|
|
4419
4419
|
},
|
|
4420
4420
|
(newValue) => {
|
|
4421
4421
|
assertCurrentState();
|
|
4422
|
-
|
|
4422
|
+
_chunk6BRDJRCZcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4423
4423
|
}
|
|
4424
4424
|
);
|
|
4425
4425
|
}
|
|
@@ -4427,7 +4427,7 @@ var NativeConnAdapter = class {
|
|
|
4427
4427
|
var _a;
|
|
4428
4428
|
(_a = this.#assertCanMutateState) == null ? void 0 : _a.call(this);
|
|
4429
4429
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
4430
|
-
|
|
4430
|
+
_chunk6BRDJRCZcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
4431
4431
|
this.#writeState(nextValue, { writeNative: true });
|
|
4432
4432
|
}
|
|
4433
4433
|
initializeState(value) {
|
|
@@ -5506,7 +5506,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5506
5506
|
},
|
|
5507
5507
|
(newValue) => {
|
|
5508
5508
|
assertCurrentState();
|
|
5509
|
-
|
|
5509
|
+
_chunk6BRDJRCZcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
5510
5510
|
}
|
|
5511
5511
|
);
|
|
5512
5512
|
}
|
|
@@ -5518,7 +5518,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5518
5518
|
}
|
|
5519
5519
|
this.#assertCanMutateState();
|
|
5520
5520
|
const nextValue = unwrapWriteThroughProxy(value);
|
|
5521
|
-
|
|
5521
|
+
_chunk6BRDJRCZcjs.assertJsonCompatValue.call(void 0, nextValue);
|
|
5522
5522
|
this.#writeState(nextValue, { scheduleSave: true });
|
|
5523
5523
|
}
|
|
5524
5524
|
initializeState(value) {
|
|
@@ -5730,7 +5730,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5730
5730
|
log: {
|
|
5731
5731
|
debug: (obj) => logger2().debug(obj)
|
|
5732
5732
|
},
|
|
5733
|
-
nativeDatabaseProvider:
|
|
5733
|
+
nativeDatabaseProvider: _chunkPMU5EDGTcjs.registerNativeStateTransactionOpener.call(void 0,
|
|
5734
5734
|
{
|
|
5735
5735
|
open: async (requestedActorId) => {
|
|
5736
5736
|
void requestedActorId;
|
|
@@ -5755,7 +5755,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5755
5755
|
return this.#db;
|
|
5756
5756
|
}
|
|
5757
5757
|
#bindDatabaseClient(client) {
|
|
5758
|
-
return
|
|
5758
|
+
return _chunkPMU5EDGTcjs.bindNativeStateTransactionContext.call(void 0, client, {
|
|
5759
5759
|
enter: async () => await this.#enterStateTransaction(),
|
|
5760
5760
|
exit: (scope) => this.#exitStateTransaction(
|
|
5761
5761
|
scope
|
|
@@ -5959,7 +5959,7 @@ var ActorContextHandleAdapter = class {
|
|
|
5959
5959
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
5960
5960
|
logger2().warn({
|
|
5961
5961
|
msg: "keepAwake promise rejected",
|
|
5962
|
-
error:
|
|
5962
|
+
error: _chunk6BRDJRCZcjs.stringifyError.call(void 0, error)
|
|
5963
5963
|
});
|
|
5964
5964
|
}).then(() => null);
|
|
5965
5965
|
try {
|
|
@@ -6440,7 +6440,7 @@ function validateInspectorTabSource(tabId, resolved) {
|
|
|
6440
6440
|
function buildNativeFactory(runtime, registryConfig, definition) {
|
|
6441
6441
|
var _a;
|
|
6442
6442
|
const config = definition.config;
|
|
6443
|
-
const databaseProvider = _nullishCoalesce(config.db, () => (
|
|
6443
|
+
const databaseProvider = _nullishCoalesce(config.db, () => ( _chunkPMU5EDGTcjs.db.call(void 0, )));
|
|
6444
6444
|
const actionHandlers = _chunkHDVZ6YZGcjs.flattenActionHandlers.call(void 0, config.actions);
|
|
6445
6445
|
const schemaConfig = {
|
|
6446
6446
|
actionInputSchemas: _chunkHDVZ6YZGcjs.flattenActionInputSchemas.call(void 0,
|
|
@@ -6451,9 +6451,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6451
6451
|
events: config.events,
|
|
6452
6452
|
queues: config.queues
|
|
6453
6453
|
};
|
|
6454
|
-
const createClient = (ctx) =>
|
|
6455
|
-
new (0,
|
|
6456
|
-
|
|
6454
|
+
const createClient = (ctx) => _chunk2LRKNNQJcjs.createClientWithDriver.call(void 0,
|
|
6455
|
+
new (0, _chunk2LRKNNQJcjs.RemoteEngineControlClient)(
|
|
6456
|
+
_chunk2LRKNNQJcjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
6457
6457
|
),
|
|
6458
6458
|
{
|
|
6459
6459
|
encoding: "bare",
|
|
@@ -6645,7 +6645,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
6645
6645
|
400
|
|
6646
6646
|
);
|
|
6647
6647
|
}
|
|
6648
|
-
const cbor =
|
|
6648
|
+
const cbor = _chunk6BRDJRCZcjs.encodeCborCompat.call(void 0,
|
|
6649
6649
|
_nullishCoalesce(body.body, () => ( null))
|
|
6650
6650
|
);
|
|
6651
6651
|
const message = await runtime.actorQueueSend(ctx, name, cbor);
|
|
@@ -7242,7 +7242,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7242
7242
|
...request,
|
|
7243
7243
|
abortController: requestAbortController
|
|
7244
7244
|
});
|
|
7245
|
-
const rawConnParams = handlerRequest.headers.get(
|
|
7245
|
+
const rawConnParams = handlerRequest.headers.get(_chunk2LRKNNQJcjs.HEADER_CONN_PARAMS);
|
|
7246
7246
|
let requestCtx;
|
|
7247
7247
|
let conn;
|
|
7248
7248
|
let removeRequestAbortListener;
|
|
@@ -7299,7 +7299,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7299
7299
|
requestCtx,
|
|
7300
7300
|
handlerRequest
|
|
7301
7301
|
);
|
|
7302
|
-
if (!
|
|
7302
|
+
if (!_chunk2LRKNNQJcjs.isResponseLike.call(void 0, response)) {
|
|
7303
7303
|
throw new Error(
|
|
7304
7304
|
"onRequest handler must return a Response"
|
|
7305
7305
|
);
|
|
@@ -7394,7 +7394,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7394
7394
|
var _a2;
|
|
7395
7395
|
const { ctx } = unwrapTsfnPayload(error, payload);
|
|
7396
7396
|
const history = (_a2 = getNativeWorkflowInspector(ctx)) == null ? void 0 : _a2.getHistory();
|
|
7397
|
-
return history == null ? void 0 :
|
|
7397
|
+
return history == null ? void 0 : _chunk6BRDJRCZcjs.toUint8Array.call(void 0, history);
|
|
7398
7398
|
}
|
|
7399
7399
|
) : void 0,
|
|
7400
7400
|
replayWorkflow: _chunkHDVZ6YZGcjs.hasRunInspectorConfig.call(void 0, config.run) ? wrapNativeCallback(
|
|
@@ -7408,7 +7408,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
7408
7408
|
return void 0;
|
|
7409
7409
|
}
|
|
7410
7410
|
const history = await _asyncNullishCoalesce(await workflowInspector.replayFromStep(entryId), async () => ( null));
|
|
7411
|
-
return history == null ? void 0 :
|
|
7411
|
+
return history == null ? void 0 : _chunk6BRDJRCZcjs.toUint8Array.call(void 0, history);
|
|
7412
7412
|
}
|
|
7413
7413
|
) : void 0,
|
|
7414
7414
|
actions: Object.fromEntries(
|
|
@@ -7544,7 +7544,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7544
7544
|
startServices: resolveServicesBinary && config.startServices,
|
|
7545
7545
|
handleInspectorHttpInRuntime: true,
|
|
7546
7546
|
serverlessBasePath: config.serverless.basePath,
|
|
7547
|
-
serverlessPackageVersion:
|
|
7547
|
+
serverlessPackageVersion: _chunk6BRDJRCZcjs.VERSION,
|
|
7548
7548
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
7549
7549
|
serverlessClientNamespace: config.publicNamespace,
|
|
7550
7550
|
serverlessClientToken: config.publicToken,
|
|
@@ -7557,7 +7557,7 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7557
7557
|
} catch (error) {
|
|
7558
7558
|
logger2().warn({
|
|
7559
7559
|
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",
|
|
7560
|
-
error:
|
|
7560
|
+
error: _chunk6BRDJRCZcjs.stringifyError.call(void 0, error)
|
|
7561
7561
|
});
|
|
7562
7562
|
}
|
|
7563
7563
|
if (resolveServicesBinary && config.startServices) {
|
|
@@ -7567,20 +7567,20 @@ async function buildServeConfig(config, resolveServicesBinary = true) {
|
|
|
7567
7567
|
} catch (error) {
|
|
7568
7568
|
logger2().warn({
|
|
7569
7569
|
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",
|
|
7570
|
-
error:
|
|
7570
|
+
error: _chunk6BRDJRCZcjs.stringifyError.call(void 0, error)
|
|
7571
7571
|
});
|
|
7572
7572
|
}
|
|
7573
7573
|
}
|
|
7574
7574
|
serveConfig.engineHost = config.engineHost;
|
|
7575
7575
|
serveConfig.enginePort = config.enginePort;
|
|
7576
7576
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
7577
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
7577
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunk6BRDJRCZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
7578
7578
|
}
|
|
7579
7579
|
return serveConfig;
|
|
7580
7580
|
}
|
|
7581
7581
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
7582
7582
|
var _a;
|
|
7583
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
7583
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunk6BRDJRCZcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
7584
7584
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
7585
7585
|
}
|
|
7586
7586
|
if (runtime.kind === "napi") {
|
|
@@ -7647,7 +7647,7 @@ function createApplicationFetch(application, runtime) {
|
|
|
7647
7647
|
signal: abortController.signal
|
|
7648
7648
|
})
|
|
7649
7649
|
);
|
|
7650
|
-
if (!
|
|
7650
|
+
if (!_chunk2LRKNNQJcjs.isResponseLike.call(void 0, response)) {
|
|
7651
7651
|
throw new TypeError(
|
|
7652
7652
|
"registry.listen() application fetch must return a Response"
|
|
7653
7653
|
);
|
|
@@ -7697,7 +7697,7 @@ var Registry = class {
|
|
|
7697
7697
|
var _a;
|
|
7698
7698
|
this.#config = config;
|
|
7699
7699
|
if ((_a = config.logging) == null ? void 0 : _a.baseLogger) {
|
|
7700
|
-
|
|
7700
|
+
_chunk6BRDJRCZcjs.configureBaseLogger.call(void 0, config.logging.baseLogger);
|
|
7701
7701
|
}
|
|
7702
7702
|
this.#buildConfiguredRegistry = _nullishCoalesce((deps == null ? void 0 : deps.buildConfiguredRegistry), () => ( buildConfiguredRegistry));
|
|
7703
7703
|
this.routes = {
|
|
@@ -7923,10 +7923,10 @@ var Registry = class {
|
|
|
7923
7923
|
* ```
|
|
7924
7924
|
*/
|
|
7925
7925
|
async listen(opts = {}) {
|
|
7926
|
-
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => (
|
|
7927
|
-
const publicDir = _nullishCoalesce(opts.publicDir, () => (
|
|
7926
|
+
const port = _nullishCoalesce(_nullishCoalesce(opts.port, () => ( _chunk6BRDJRCZcjs.parsePortEnv.call(void 0, process.env.RIVET_PORT))), () => ( 3e3));
|
|
7927
|
+
const publicDir = _nullishCoalesce(opts.publicDir, () => ( _chunk6BRDJRCZcjs.getRivetkitPublicDir.call(void 0, )));
|
|
7928
7928
|
const config = this.parseConfig();
|
|
7929
|
-
if (opts.application &&
|
|
7929
|
+
if (opts.application && _chunk6BRDJRCZcjs.getRivetkitRuntimeMode.call(void 0, ) !== "serverless") {
|
|
7930
7930
|
if (config.runtime === "wasm") {
|
|
7931
7931
|
throw new Error(
|
|
7932
7932
|
"registry.listen() requires the native runtime; use an application-owned HTTP server with WebAssembly"
|
|
@@ -8002,7 +8002,7 @@ var Registry = class {
|
|
|
8002
8002
|
return jsonRouteResponse(503, {
|
|
8003
8003
|
status: "not_started",
|
|
8004
8004
|
runtime: "rivetkit",
|
|
8005
|
-
version:
|
|
8005
|
+
version: _chunk6BRDJRCZcjs.VERSION
|
|
8006
8006
|
});
|
|
8007
8007
|
}
|
|
8008
8008
|
const { runtime, registry } = configured;
|
|
@@ -8010,7 +8010,7 @@ var Registry = class {
|
|
|
8010
8010
|
return jsonRouteResponse(501, {
|
|
8011
8011
|
status: "unsupported",
|
|
8012
8012
|
runtime: "rivetkit",
|
|
8013
|
-
version:
|
|
8013
|
+
version: _chunk6BRDJRCZcjs.VERSION
|
|
8014
8014
|
});
|
|
8015
8015
|
}
|
|
8016
8016
|
const response = await runtime.registryHealth(registry);
|
|
@@ -8084,14 +8084,14 @@ var Registry = class {
|
|
|
8084
8084
|
var _a;
|
|
8085
8085
|
if (!this.#runtimeServePromise) {
|
|
8086
8086
|
const configuredEnvoyVersion = (_a = this.#config.envoy) == null ? void 0 : _a.version;
|
|
8087
|
-
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" :
|
|
8087
|
+
const envoyVersionSource = configuredEnvoyVersion !== void 0 ? "config" : _chunk6BRDJRCZcjs.getRivetEnvoyVersion.call(void 0, ) !== void 0 ? "environment" : "default";
|
|
8088
8088
|
logger2().info({
|
|
8089
8089
|
msg: "starting rivetkit envoy",
|
|
8090
|
-
rivetkitVersion:
|
|
8090
|
+
rivetkitVersion: _chunk6BRDJRCZcjs.VERSION,
|
|
8091
8091
|
envoyVersion: config.envoy.version,
|
|
8092
8092
|
envoyVersionSource
|
|
8093
8093
|
});
|
|
8094
|
-
if (envoyVersionSource === "default" &&
|
|
8094
|
+
if (envoyVersionSource === "default" && _chunk6BRDJRCZcjs.getNodeEnv.call(void 0, ) === "production") {
|
|
8095
8095
|
logger2().error({
|
|
8096
8096
|
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",
|
|
8097
8097
|
envoyVersion: config.envoy.version,
|
|
@@ -8282,7 +8282,7 @@ var Registry = class {
|
|
|
8282
8282
|
);
|
|
8283
8283
|
}
|
|
8284
8284
|
if (this.#runtimeReadyPromise) return this.#runtimeReadyPromise;
|
|
8285
|
-
if (
|
|
8285
|
+
if (_chunk6BRDJRCZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8286
8286
|
return Promise.reject(
|
|
8287
8287
|
new Error(
|
|
8288
8288
|
"registry.startAndWait() requires envoy runtime mode; serverless registries become ready per request"
|
|
@@ -8352,8 +8352,8 @@ var Registry = class {
|
|
|
8352
8352
|
* ```
|
|
8353
8353
|
*/
|
|
8354
8354
|
start() {
|
|
8355
|
-
if (
|
|
8356
|
-
const publicDir = _nullishCoalesce(
|
|
8355
|
+
if (_chunk6BRDJRCZcjs.getRivetkitRuntimeMode.call(void 0, ) === "serverless") {
|
|
8356
|
+
const publicDir = _nullishCoalesce(_chunk6BRDJRCZcjs.getRivetkitPublicDir.call(void 0, ), () => ( "/public"));
|
|
8357
8357
|
this.listen({ publicDir }).catch((error) => {
|
|
8358
8358
|
logger2().error({ error }, "auto-listen failed; exiting");
|
|
8359
8359
|
if (typeof process !== "undefined" && typeof process.exit === "function") {
|
|
@@ -8374,13 +8374,13 @@ var Registry = class {
|
|
|
8374
8374
|
};
|
|
8375
8375
|
console.log();
|
|
8376
8376
|
console.log(
|
|
8377
|
-
` RivetKit ${
|
|
8377
|
+
` RivetKit ${_chunk6BRDJRCZcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
8378
8378
|
);
|
|
8379
8379
|
if (config.namespace !== "default") {
|
|
8380
8380
|
logLine("Namespace", config.namespace);
|
|
8381
8381
|
}
|
|
8382
8382
|
if (config.endpoint) {
|
|
8383
|
-
const endpointType = config.startEngine ||
|
|
8383
|
+
const endpointType = config.startEngine || _chunk2LRKNNQJcjs.isLocalEngineEndpoint.call(void 0, config.endpoint) ? "local native" : "remote";
|
|
8384
8384
|
logLine("Endpoint", `${config.endpoint} (${endpointType})`);
|
|
8385
8385
|
}
|
|
8386
8386
|
if (kind === "serverless" && config.publicEndpoint) {
|
|
@@ -8450,5 +8450,5 @@ function setup(input) {
|
|
|
8450
8450
|
|
|
8451
8451
|
|
|
8452
8452
|
|
|
8453
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
8453
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunk2LRKNNQJcjs.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 = _chunk2LRKNNQJcjs.createClientWithDriver; exports.defineRunHandler = _chunkHDVZ6YZGcjs.defineRunHandler; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunk6BRDJRCZcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunk6BRDJRCZcjs.toUint8Array;
|
|
8454
8454
|
//# 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-UZ5O42HF.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-Z6IVW2Y5.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-HHALUH4L.js";
|
|
48
48
|
import "./chunk-JTHHCZCZ.js";
|
|
49
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-EDJKDOI2.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-M27XAZNI.js";
|
|
84
84
|
import {
|
|
85
85
|
INTERNAL_ERROR_CODE,
|
|
86
86
|
RivetError,
|