rivetkit 2.3.0-rc.13 → 2.3.0-rc.15
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-BSPS6NSN.cjs → chunk-3XH56YLI.cjs} +5 -5
- package/dist/tsup/{chunk-BSPS6NSN.cjs.map → chunk-3XH56YLI.cjs.map} +1 -1
- package/dist/tsup/{chunk-ISDKSSYR.cjs → chunk-3ZLK5QPM.cjs} +4 -4
- package/dist/tsup/{chunk-ISDKSSYR.cjs.map → chunk-3ZLK5QPM.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZI5CNA2Z.js → chunk-4DU63P3H.js} +2 -2
- package/dist/tsup/{chunk-33YE6XCI.js → chunk-6DWQ4GIW.js} +4 -4
- package/dist/tsup/{chunk-KWABEUUA.cjs → chunk-FYLD6HMH.cjs} +7 -7
- package/dist/tsup/{chunk-KWABEUUA.cjs.map → chunk-FYLD6HMH.cjs.map} +1 -1
- package/dist/tsup/{chunk-E5CLYAUZ.cjs → chunk-HMYIDZL2.cjs} +141 -141
- package/dist/tsup/{chunk-E5CLYAUZ.cjs.map → chunk-HMYIDZL2.cjs.map} +1 -1
- package/dist/tsup/{chunk-EBWOJRCC.cjs → chunk-HW5L2LUK.cjs} +2 -2
- package/dist/tsup/{chunk-EBWOJRCC.cjs.map → chunk-HW5L2LUK.cjs.map} +1 -1
- package/dist/tsup/{chunk-7OR3CHD5.cjs → chunk-HYNXIWBZ.cjs} +10 -10
- package/dist/tsup/{chunk-7OR3CHD5.cjs.map → chunk-HYNXIWBZ.cjs.map} +1 -1
- package/dist/tsup/{chunk-T44AVAGW.js → chunk-MVW3IQKA.js} +2 -2
- package/dist/tsup/{chunk-HHNYEQD3.js → chunk-RR3TYP75.js} +3 -3
- package/dist/tsup/{chunk-7XQCARVY.cjs → chunk-TINIJ6FD.cjs} +3 -3
- package/dist/tsup/{chunk-7XQCARVY.cjs.map → chunk-TINIJ6FD.cjs.map} +1 -1
- package/dist/tsup/{chunk-TCXEM6PA.js → chunk-UFMCFSDS.js} +2 -2
- package/dist/tsup/{chunk-J72WHUBC.js → chunk-W2IEVMNI.js} +7 -7
- package/dist/tsup/{chunk-IOUSQVXI.js → chunk-Y2BCRVFQ.js} +2 -2
- package/dist/tsup/{chunk-IOUSQVXI.js.map → chunk-Y2BCRVFQ.js.map} +1 -1
- package/dist/tsup/client/mod.cjs +7 -7
- package/dist/tsup/client/mod.cjs.map +1 -1
- package/dist/tsup/client/mod.js +6 -6
- 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/inspector/mod.cjs +5 -5
- package/dist/tsup/inspector/mod.js +4 -4
- package/dist/tsup/mod.cjs +70 -65
- package/dist/tsup/mod.cjs.map +1 -1
- package/dist/tsup/mod.js +14 -9
- package/dist/tsup/mod.js.map +1 -1
- package/dist/tsup/test/mod.cjs +10 -10
- package/dist/tsup/test/mod.js +6 -6
- 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 +20 -3
- package/src/registry/runtime.ts +19 -3
- /package/dist/tsup/{chunk-ZI5CNA2Z.js.map → chunk-4DU63P3H.js.map} +0 -0
- /package/dist/tsup/{chunk-33YE6XCI.js.map → chunk-6DWQ4GIW.js.map} +0 -0
- /package/dist/tsup/{chunk-T44AVAGW.js.map → chunk-MVW3IQKA.js.map} +0 -0
- /package/dist/tsup/{chunk-HHNYEQD3.js.map → chunk-RR3TYP75.js.map} +0 -0
- /package/dist/tsup/{chunk-TCXEM6PA.js.map → chunk-UFMCFSDS.js.map} +0 -0
- /package/dist/tsup/{chunk-J72WHUBC.js.map → chunk-W2IEVMNI.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 _chunk3ZLK5QPMcjs = require('./chunk-3ZLK5QPM.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ var _chunkNIY3RSPXcjs = require('./chunk-NIY3RSPX.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkHMYIDZL2cjs = require('./chunk-HMYIDZL2.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
@@ -32,8 +32,9 @@ var _chunkVE2X4KMGcjs = require('./chunk-VE2X4KMG.cjs');
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var
|
|
36
|
-
require('./chunk-
|
|
35
|
+
var _chunk3XH56YLIcjs = require('./chunk-3XH56YLI.cjs');
|
|
36
|
+
require('./chunk-ZA7FLHKH.cjs');
|
|
37
|
+
require('./chunk-TINIJ6FD.cjs');
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
|
|
@@ -60,7 +61,7 @@ require('./chunk-7XQCARVY.cjs');
|
|
|
60
61
|
|
|
61
62
|
|
|
62
63
|
|
|
63
|
-
var
|
|
64
|
+
var _chunkHW5L2LUKcjs = require('./chunk-HW5L2LUK.cjs');
|
|
64
65
|
|
|
65
66
|
|
|
66
67
|
|
|
@@ -72,11 +73,10 @@ var _chunkEBWOJRCCcjs = require('./chunk-EBWOJRCC.cjs');
|
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
var _chunkKORQB2IRcjs = require('./chunk-KORQB2IR.cjs');
|
|
75
|
-
require('./chunk-ZA7FLHKH.cjs');
|
|
76
76
|
|
|
77
77
|
// src/actor/log.ts
|
|
78
78
|
function loggerWithoutContext() {
|
|
79
|
-
return
|
|
79
|
+
return _chunkHW5L2LUKcjs.getLogger.call(void 0, "actor-runtime");
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// src/actor/definition.ts
|
|
@@ -208,7 +208,7 @@ function validateSchemaSync(schemas, key, data) {
|
|
|
208
208
|
var _virtualwebsocket = require('@rivetkit/virtual-websocket');
|
|
209
209
|
var _ws = require('hono/ws');
|
|
210
210
|
function logger() {
|
|
211
|
-
return
|
|
211
|
+
return _chunkHW5L2LUKcjs.getLogger.call(void 0, "inline-websocket-adapter");
|
|
212
212
|
}
|
|
213
213
|
var InlineWebSocketAdapter = class {
|
|
214
214
|
#handler;
|
|
@@ -382,7 +382,7 @@ function isLocalEngineEndpoint(endpoint) {
|
|
|
382
382
|
|
|
383
383
|
// src/registry/log.ts
|
|
384
384
|
function logger2() {
|
|
385
|
-
return
|
|
385
|
+
return _chunkHW5L2LUKcjs.getLogger.call(void 0, "registry");
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
// src/serverless/configure.ts
|
|
@@ -428,8 +428,8 @@ async function configureServerlessPool(config) {
|
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
const customConfig = config.configurePool;
|
|
431
|
-
const clientConfig =
|
|
432
|
-
const dcsRes = await
|
|
431
|
+
const clientConfig = _chunkHMYIDZL2cjs.convertRegistryConfigToClientConfig.call(void 0, config);
|
|
432
|
+
const dcsRes = await _chunkHMYIDZL2cjs.getDatacenters.call(void 0, clientConfig);
|
|
433
433
|
const poolName = _nullishCoalesce(customConfig.name, () => ( "default"));
|
|
434
434
|
const serverlessToken = _nullishCoalesce(config.token, () => ( config.publicToken));
|
|
435
435
|
const headers = {
|
|
@@ -451,7 +451,7 @@ async function configureServerlessPool(config) {
|
|
|
451
451
|
metadata: _nullishCoalesce(customConfig.metadata, () => ( {})),
|
|
452
452
|
drain_on_version_upgrade: _nullishCoalesce(customConfig.drainOnVersionUpgrade, () => ( true))
|
|
453
453
|
};
|
|
454
|
-
await
|
|
454
|
+
await _chunkHMYIDZL2cjs.updateRunnerConfig.call(void 0, clientConfig, poolName, {
|
|
455
455
|
datacenters: Object.fromEntries(
|
|
456
456
|
dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig])
|
|
457
457
|
)
|
|
@@ -468,7 +468,7 @@ async function configureServerlessPool(config) {
|
|
|
468
468
|
logger2().warn({
|
|
469
469
|
msg: "serverless pool configuration attempt failed",
|
|
470
470
|
attempts,
|
|
471
|
-
error:
|
|
471
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
472
472
|
});
|
|
473
473
|
await sleep(CONFIGURE_RETRY_DELAY_MS);
|
|
474
474
|
}
|
|
@@ -476,7 +476,7 @@ async function configureServerlessPool(config) {
|
|
|
476
476
|
logger2().error({
|
|
477
477
|
msg: "failed to configure serverless pool, validate endpoint is configured correctly then restart this process",
|
|
478
478
|
attempts,
|
|
479
|
-
error:
|
|
479
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, lastError)
|
|
480
480
|
});
|
|
481
481
|
throw lastError;
|
|
482
482
|
}
|
|
@@ -484,7 +484,7 @@ async function configureServerlessPool(config) {
|
|
|
484
484
|
// src/utils/serve.ts
|
|
485
485
|
var _getport = require('get-port'); var _getport2 = _interopRequireDefault(_getport);
|
|
486
486
|
var serveStaticLoaderPromises = {};
|
|
487
|
-
async function crossPlatformServe(config, httpPort, app, runtime =
|
|
487
|
+
async function crossPlatformServe(config, httpPort, app, runtime = _chunkHW5L2LUKcjs.detectRuntime.call(void 0, )) {
|
|
488
488
|
logger2().debug({ msg: "detected runtime for serve", runtime });
|
|
489
489
|
switch (runtime) {
|
|
490
490
|
case "deno":
|
|
@@ -535,7 +535,7 @@ async function serveNode(config, httpPort, app) {
|
|
|
535
535
|
} catch (err) {
|
|
536
536
|
logger2().error({
|
|
537
537
|
msg: "failed to import @hono/node-server. please run 'npm install @hono/node-server @hono/node-ws'",
|
|
538
|
-
error:
|
|
538
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, err)
|
|
539
539
|
});
|
|
540
540
|
process.exit(1);
|
|
541
541
|
}
|
|
@@ -550,7 +550,7 @@ async function serveNode(config, httpPort, app) {
|
|
|
550
550
|
} catch (err) {
|
|
551
551
|
logger2().error({
|
|
552
552
|
msg: "failed to import @hono/node-ws. please run 'npm install @hono/node-server @hono/node-ws'",
|
|
553
|
-
error:
|
|
553
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, err)
|
|
554
554
|
});
|
|
555
555
|
process.exit(1);
|
|
556
556
|
}
|
|
@@ -581,7 +581,7 @@ async function serveDeno(config, httpPort, app) {
|
|
|
581
581
|
} catch (err) {
|
|
582
582
|
logger2().error({
|
|
583
583
|
msg: "failed to import hono/deno",
|
|
584
|
-
error:
|
|
584
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, err)
|
|
585
585
|
});
|
|
586
586
|
process.exit(1);
|
|
587
587
|
}
|
|
@@ -603,7 +603,7 @@ async function serveBun(config, httpPort, app) {
|
|
|
603
603
|
} catch (err) {
|
|
604
604
|
logger2().error({
|
|
605
605
|
msg: "failed to import hono/bun",
|
|
606
|
-
error:
|
|
606
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, err)
|
|
607
607
|
});
|
|
608
608
|
process.exit(1);
|
|
609
609
|
}
|
|
@@ -627,20 +627,20 @@ var _zod = require('zod');
|
|
|
627
627
|
var _v4 = require('zod/v4');
|
|
628
628
|
var warnedMissingVersion = false;
|
|
629
629
|
var EnvoyConfigSchema = _v4.z.object({
|
|
630
|
-
poolName: _v4.z.string().default(() => _nullishCoalesce(
|
|
630
|
+
poolName: _v4.z.string().default(() => _nullishCoalesce(_chunkHW5L2LUKcjs.getRivetPool.call(void 0, ), () => ( "default"))),
|
|
631
631
|
version: _v4.z.number().default(() => {
|
|
632
|
-
const version =
|
|
632
|
+
const version = _chunkHW5L2LUKcjs.getRivetEnvoyVersion.call(void 0, );
|
|
633
633
|
if (version !== void 0) return version;
|
|
634
|
-
if (
|
|
634
|
+
if (_chunkHW5L2LUKcjs.getNodeEnv.call(void 0, ) === "production" && !warnedMissingVersion) {
|
|
635
635
|
warnedMissingVersion = true;
|
|
636
|
-
|
|
636
|
+
_chunkHW5L2LUKcjs.getLogger.call(void 0, "rivetkit").error(
|
|
637
637
|
"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"
|
|
638
638
|
);
|
|
639
639
|
}
|
|
640
640
|
return 1;
|
|
641
641
|
}),
|
|
642
642
|
// Deprecated.
|
|
643
|
-
totalSlots: _v4.z.number().default(() => _nullishCoalesce(
|
|
643
|
+
totalSlots: _v4.z.number().default(() => _nullishCoalesce(_chunkHW5L2LUKcjs.getRivetTotalSlots.call(void 0, ), () => ( 1e5))),
|
|
644
644
|
envoyKey: _v4.z.string().optional()
|
|
645
645
|
});
|
|
646
646
|
|
|
@@ -678,7 +678,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
678
678
|
*
|
|
679
679
|
* Can also be set via RIVET_PUBLIC_ENDPOINT environment variable.
|
|
680
680
|
*/
|
|
681
|
-
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
681
|
+
publicEndpoint: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetPublicEndpoint.call(void 0, )))),
|
|
682
682
|
/**
|
|
683
683
|
* Token that clients should use when connecting via the public endpoint.
|
|
684
684
|
*
|
|
@@ -686,7 +686,7 @@ var ServerlessConfigSchema = _v4.z.object({
|
|
|
686
686
|
*
|
|
687
687
|
* Can also be specified in the publicEndpoint URL as `https://namespace:token@host`.
|
|
688
688
|
*/
|
|
689
|
-
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
689
|
+
publicToken: _v4.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetPublicToken.call(void 0, ))))
|
|
690
690
|
// There is no publicNamespace config option because the frontend and backend
|
|
691
691
|
// cannot use different namespaces. The namespace is extracted from the
|
|
692
692
|
// publicEndpoint URL auth syntax if provided.
|
|
@@ -740,7 +740,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
740
740
|
* Runtime binding to use for RivetKit core.
|
|
741
741
|
* */
|
|
742
742
|
runtime: RuntimeKindSchema.optional().transform((val, ctx) => {
|
|
743
|
-
const rawRuntime = _nullishCoalesce(val, () => (
|
|
743
|
+
const rawRuntime = _nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetkitRuntime.call(void 0, )));
|
|
744
744
|
if (rawRuntime === void 0) {
|
|
745
745
|
return "auto";
|
|
746
746
|
}
|
|
@@ -777,7 +777,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
777
777
|
* */
|
|
778
778
|
logging: _zod.z.object({
|
|
779
779
|
baseLogger: _zod.z.custom().optional(),
|
|
780
|
-
level:
|
|
780
|
+
level: _chunkHW5L2LUKcjs.LogLevelSchema.optional()
|
|
781
781
|
}).optional().default(() => ({})),
|
|
782
782
|
// MARK: Routing
|
|
783
783
|
// // This is a function to allow for lazy configuration of upgradeWebSocket on the
|
|
@@ -795,9 +795,9 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
795
795
|
*
|
|
796
796
|
* Can also be set via RIVET_ENDPOINT environment variables.
|
|
797
797
|
*/
|
|
798
|
-
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => (
|
|
799
|
-
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
800
|
-
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => (
|
|
798
|
+
endpoint: _zod.z.string().optional().transform((val) => _nullishCoalesce(_nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetEngine.call(void 0, ))), () => ( _chunkHW5L2LUKcjs.getRivetEndpoint.call(void 0, )))),
|
|
799
|
+
token: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetToken.call(void 0, )))),
|
|
800
|
+
namespace: _zod.z.string().optional().transform((val) => _nullishCoalesce(val, () => ( _chunkHW5L2LUKcjs.getRivetNamespace.call(void 0, )))),
|
|
801
801
|
headers: _zod.z.record(_zod.z.string(), _zod.z.string()).optional().default({}),
|
|
802
802
|
// MARK: Client
|
|
803
803
|
// TODO:
|
|
@@ -837,21 +837,21 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
837
837
|
*
|
|
838
838
|
* Starts the full Rust engine process locally.
|
|
839
839
|
*/
|
|
840
|
-
startEngine: _zod.z.boolean().default(() =>
|
|
840
|
+
startEngine: _zod.z.boolean().default(() => _chunkHW5L2LUKcjs.getRivetRunEngine.call(void 0, )),
|
|
841
841
|
/**
|
|
842
842
|
* @experimental
|
|
843
843
|
*
|
|
844
844
|
* Host to bind the spawned local engine process to.
|
|
845
845
|
*/
|
|
846
|
-
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
846
|
+
engineHost: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkHW5L2LUKcjs.getRivetRunEngineHost.call(void 0, ), () => ( ENGINE_HOST))),
|
|
847
847
|
/**
|
|
848
848
|
* @experimental
|
|
849
849
|
*
|
|
850
850
|
* Port to bind the spawned local engine process to.
|
|
851
851
|
*/
|
|
852
|
-
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(
|
|
852
|
+
enginePort: _zod.z.number().int().min(1).max(65535).optional().default(() => _nullishCoalesce(_chunkHW5L2LUKcjs.getRivetRunEnginePort.call(void 0, ), () => ( ENGINE_PORT))),
|
|
853
853
|
/** @experimental */
|
|
854
|
-
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(
|
|
854
|
+
engineVersion: _zod.z.string().optional().default(() => _nullishCoalesce(_chunkHW5L2LUKcjs.getRivetRunEngineVersion.call(void 0, ), () => ( _chunkHW5L2LUKcjs.VERSION))),
|
|
855
855
|
/**
|
|
856
856
|
* @experimental
|
|
857
857
|
*
|
|
@@ -899,7 +899,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
899
899
|
}))
|
|
900
900
|
}).transform((config, ctx) => {
|
|
901
901
|
var _a, _b, _c;
|
|
902
|
-
const isDevEnv =
|
|
902
|
+
const isDevEnv = _chunkHW5L2LUKcjs.isDev.call(void 0, );
|
|
903
903
|
const sqliteBackend = _nullishCoalesce(((_a = config.sqlite) == null ? void 0 : _a.backend), () => ( ((_b = config.test) == null ? void 0 : _b.sqliteBackend)));
|
|
904
904
|
if (config.runtime === "wasm" && sqliteBackend === "local") {
|
|
905
905
|
ctx.addIssue({
|
|
@@ -909,7 +909,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
911
|
const sqlite = config.runtime === "wasm" && config.sqlite === void 0 ? { backend: "remote" } : config.sqlite;
|
|
912
|
-
const parsedEndpoint = config.endpoint ?
|
|
912
|
+
const parsedEndpoint = config.endpoint ? _chunkHMYIDZL2cjs.tryParseEndpoint.call(void 0, ctx, {
|
|
913
913
|
endpoint: config.endpoint,
|
|
914
914
|
path: ["endpoint"],
|
|
915
915
|
namespace: config.namespace,
|
|
@@ -937,7 +937,7 @@ var RegistryConfigSchema = _zod.z.object({
|
|
|
937
937
|
);
|
|
938
938
|
const namespace = _nullishCoalesce(_nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.namespace), () => ( config.namespace)), () => ( "default"));
|
|
939
939
|
const token = _nullishCoalesce((parsedEndpoint == null ? void 0 : parsedEndpoint.token), () => ( config.token));
|
|
940
|
-
const parsedPublicEndpoint = config.serverless.publicEndpoint ?
|
|
940
|
+
const parsedPublicEndpoint = config.serverless.publicEndpoint ? _chunkHMYIDZL2cjs.tryParseEndpoint.call(void 0, ctx, {
|
|
941
941
|
endpoint: config.serverless.publicEndpoint,
|
|
942
942
|
path: ["serverless", "publicEndpoint"]
|
|
943
943
|
}) : void 0;
|
|
@@ -1065,7 +1065,7 @@ var DocRegistryConfigSchema = _zod.z.object({
|
|
|
1065
1065
|
noWelcome: _zod.z.boolean().optional().describe("Disable the welcome message on startup. Default: false"),
|
|
1066
1066
|
sqlite: DocSqliteConfigSchema,
|
|
1067
1067
|
logging: _zod.z.object({
|
|
1068
|
-
level:
|
|
1068
|
+
level: _chunkHW5L2LUKcjs.LogLevelSchema.optional().describe(
|
|
1069
1069
|
"Log level for RivetKit. Default: 'warn'"
|
|
1070
1070
|
)
|
|
1071
1071
|
}).optional().describe("Logging configuration."),
|
|
@@ -2701,7 +2701,7 @@ async function cleanupNativeSleepRuntimeState(runtime, ctx, afterTrackedWorkDrai
|
|
|
2701
2701
|
}).catch((error) => {
|
|
2702
2702
|
logger2().warn({
|
|
2703
2703
|
msg: "deferred native sleep cleanup failed",
|
|
2704
|
-
error:
|
|
2704
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
2705
2705
|
});
|
|
2706
2706
|
});
|
|
2707
2707
|
return;
|
|
@@ -2811,10 +2811,10 @@ function decodeValue(value) {
|
|
|
2811
2811
|
if (!value || value.length === 0) {
|
|
2812
2812
|
return void 0;
|
|
2813
2813
|
}
|
|
2814
|
-
return
|
|
2814
|
+
return _chunk3XH56YLIcjs.decodeCborCompat.call(void 0, value);
|
|
2815
2815
|
}
|
|
2816
2816
|
function encodeValue(value) {
|
|
2817
|
-
return
|
|
2817
|
+
return _chunk3XH56YLIcjs.encodeCborCompat.call(void 0, value);
|
|
2818
2818
|
}
|
|
2819
2819
|
function normalizeArgs(value) {
|
|
2820
2820
|
return Array.isArray(value) ? value : value === void 0 || value === null ? [] : [value];
|
|
@@ -2850,7 +2850,7 @@ function isStructuredBridgeError(error) {
|
|
|
2850
2850
|
return _chunkKORQB2IRcjs.isRivetErrorLike.call(void 0, error) && "__type" in error && (error.__type === "RivetError" || error.__type === "ActorError");
|
|
2851
2851
|
}
|
|
2852
2852
|
function encodeNativeCallbackError(error) {
|
|
2853
|
-
const structuredError = isStructuredBridgeError(error) ? error :
|
|
2853
|
+
const structuredError = isStructuredBridgeError(error) ? error : _chunkHW5L2LUKcjs.deconstructError.call(void 0, error, true);
|
|
2854
2854
|
const bridgeError = new Error(_chunkKORQB2IRcjs.encodeBridgeRivetError.call(void 0, structuredError), {
|
|
2855
2855
|
cause: error instanceof Error ? error : void 0
|
|
2856
2856
|
});
|
|
@@ -2900,7 +2900,7 @@ function decodeWorkflowCbor(data) {
|
|
|
2900
2900
|
return null;
|
|
2901
2901
|
}
|
|
2902
2902
|
try {
|
|
2903
|
-
return
|
|
2903
|
+
return _chunk3XH56YLIcjs.decodeCborCompat.call(void 0, new Uint8Array(data));
|
|
2904
2904
|
} catch (e4) {
|
|
2905
2905
|
return null;
|
|
2906
2906
|
}
|
|
@@ -3005,7 +3005,7 @@ function serializeWorkflowHistoryForJson(data) {
|
|
|
3005
3005
|
if (data === null) {
|
|
3006
3006
|
return null;
|
|
3007
3007
|
}
|
|
3008
|
-
const history =
|
|
3008
|
+
const history = _chunk3ZLK5QPMcjs.decodeWorkflowHistoryTransport.call(void 0, data);
|
|
3009
3009
|
return jsonSafe({
|
|
3010
3010
|
nameRegistry: [...history.nameRegistry],
|
|
3011
3011
|
entries: history.entries.map((entry) => ({
|
|
@@ -3146,12 +3146,12 @@ var NativeConnAdapter = class {
|
|
|
3146
3146
|
this.#writeState(nextValue, { writeNative: true });
|
|
3147
3147
|
},
|
|
3148
3148
|
(newValue) => {
|
|
3149
|
-
|
|
3149
|
+
_chunk3XH56YLIcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
3150
3150
|
}
|
|
3151
3151
|
);
|
|
3152
3152
|
}
|
|
3153
3153
|
set state(value) {
|
|
3154
|
-
|
|
3154
|
+
_chunk3XH56YLIcjs.assertJsonCompatValue.call(void 0, value);
|
|
3155
3155
|
this.#writeState(value, { writeNative: true });
|
|
3156
3156
|
}
|
|
3157
3157
|
initializeState(value) {
|
|
@@ -4101,7 +4101,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4101
4101
|
},
|
|
4102
4102
|
(newValue) => {
|
|
4103
4103
|
this.#assertCanMutateState();
|
|
4104
|
-
|
|
4104
|
+
_chunk3XH56YLIcjs.assertJsonCompatValue.call(void 0, newValue);
|
|
4105
4105
|
}
|
|
4106
4106
|
);
|
|
4107
4107
|
}
|
|
@@ -4112,7 +4112,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4112
4112
|
throw stateNotEnabledError();
|
|
4113
4113
|
}
|
|
4114
4114
|
this.#assertCanMutateState();
|
|
4115
|
-
|
|
4115
|
+
_chunk3XH56YLIcjs.assertJsonCompatValue.call(void 0, value);
|
|
4116
4116
|
this.#writeState(value, { scheduleSave: true });
|
|
4117
4117
|
}
|
|
4118
4118
|
initializeState(value) {
|
|
@@ -4377,7 +4377,7 @@ var ActorContextHandleAdapter = class {
|
|
|
4377
4377
|
const trackedPromise = Promise.resolve(promise).catch((error) => {
|
|
4378
4378
|
logger2().warn({
|
|
4379
4379
|
msg: "keepAwake promise rejected",
|
|
4380
|
-
error:
|
|
4380
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
4381
4381
|
});
|
|
4382
4382
|
}).then(() => null);
|
|
4383
4383
|
try {
|
|
@@ -4812,9 +4812,9 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
4812
4812
|
const actionHandlers = Object.fromEntries(
|
|
4813
4813
|
Object.entries(_nullishCoalesce(config.actions, () => ( {}))).map(([name, handler]) => [name, handler])
|
|
4814
4814
|
);
|
|
4815
|
-
const createClient = () =>
|
|
4816
|
-
new (0,
|
|
4817
|
-
|
|
4815
|
+
const createClient = () => _chunkHMYIDZL2cjs.createClientWithDriver.call(void 0,
|
|
4816
|
+
new (0, _chunkHMYIDZL2cjs.RemoteEngineControlClient)(
|
|
4817
|
+
_chunkHMYIDZL2cjs.convertRegistryConfigToClientConfig.call(void 0, registryConfig)
|
|
4818
4818
|
),
|
|
4819
4819
|
{ encoding: "bare" }
|
|
4820
4820
|
);
|
|
@@ -5532,7 +5532,7 @@ function buildNativeFactory(runtime, registryConfig, definition) {
|
|
|
5532
5532
|
new Response(null, { status: 404 })
|
|
5533
5533
|
);
|
|
5534
5534
|
}
|
|
5535
|
-
const rawConnParams = jsRequest.headers.get(
|
|
5535
|
+
const rawConnParams = jsRequest.headers.get(_chunkHMYIDZL2cjs.HEADER_CONN_PARAMS);
|
|
5536
5536
|
let requestCtx;
|
|
5537
5537
|
let conn;
|
|
5538
5538
|
try {
|
|
@@ -5759,27 +5759,32 @@ async function buildServeConfig(config) {
|
|
|
5759
5759
|
poolName: config.envoy.poolName,
|
|
5760
5760
|
handleInspectorHttpInRuntime: true,
|
|
5761
5761
|
serverlessBasePath: config.serverless.basePath,
|
|
5762
|
-
serverlessPackageVersion:
|
|
5762
|
+
serverlessPackageVersion: _chunkHW5L2LUKcjs.VERSION,
|
|
5763
5763
|
serverlessClientEndpoint: config.publicEndpoint,
|
|
5764
5764
|
serverlessClientNamespace: config.publicNamespace,
|
|
5765
5765
|
serverlessClientToken: config.publicToken,
|
|
5766
5766
|
serverlessValidateEndpoint: config.validateServerlessEndpoint,
|
|
5767
5767
|
serverlessMaxStartPayloadBytes: config.serverless.maxStartPayloadBytes
|
|
5768
5768
|
};
|
|
5769
|
-
|
|
5769
|
+
try {
|
|
5770
5770
|
const { getEnginePath } = await loadEngineCli();
|
|
5771
5771
|
serveConfig.engineBinaryPath = getEnginePath();
|
|
5772
|
-
|
|
5773
|
-
|
|
5772
|
+
} catch (error) {
|
|
5773
|
+
logger2().warn({
|
|
5774
|
+
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",
|
|
5775
|
+
error: _chunkHW5L2LUKcjs.stringifyError.call(void 0, error)
|
|
5776
|
+
});
|
|
5774
5777
|
}
|
|
5778
|
+
serveConfig.engineHost = config.engineHost;
|
|
5779
|
+
serveConfig.enginePort = config.enginePort;
|
|
5775
5780
|
if ((_a = config.test) == null ? void 0 : _a.enabled) {
|
|
5776
|
-
serveConfig.inspectorTestToken = _nullishCoalesce(
|
|
5781
|
+
serveConfig.inspectorTestToken = _nullishCoalesce(_chunkHW5L2LUKcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN"), () => ( "token"));
|
|
5777
5782
|
}
|
|
5778
5783
|
return serveConfig;
|
|
5779
5784
|
}
|
|
5780
5785
|
async function buildRegistryWithRuntime(config, runtime) {
|
|
5781
5786
|
var _a;
|
|
5782
|
-
if (((_a = config.test) == null ? void 0 : _a.enabled) &&
|
|
5787
|
+
if (((_a = config.test) == null ? void 0 : _a.enabled) && _chunkHW5L2LUKcjs.getEnvUniversal.call(void 0, "_RIVET_TEST_INSPECTOR_TOKEN") === void 0) {
|
|
5783
5788
|
trySetProcessEnv("_RIVET_TEST_INSPECTOR_TOKEN", "token");
|
|
5784
5789
|
}
|
|
5785
5790
|
const registry = runtime.createRegistry();
|
|
@@ -6055,7 +6060,7 @@ var Registry = class {
|
|
|
6055
6060
|
async listen(opts = {}) {
|
|
6056
6061
|
const port = _nullishCoalesce(opts.port, () => ( 3e3));
|
|
6057
6062
|
const config = this.parseConfig();
|
|
6058
|
-
const runtime =
|
|
6063
|
+
const runtime = _chunkHW5L2LUKcjs.detectRuntime.call(void 0, );
|
|
6059
6064
|
const app = new (0, _hono.Hono)();
|
|
6060
6065
|
if (opts.publicDir) {
|
|
6061
6066
|
const serveStatic = await loadRuntimeServeStatic(runtime);
|
|
@@ -6073,7 +6078,7 @@ var Registry = class {
|
|
|
6073
6078
|
return jsonRouteResponse(503, {
|
|
6074
6079
|
status: "not_started",
|
|
6075
6080
|
runtime: "rivetkit",
|
|
6076
|
-
version:
|
|
6081
|
+
version: _chunkHW5L2LUKcjs.VERSION
|
|
6077
6082
|
});
|
|
6078
6083
|
}
|
|
6079
6084
|
const { runtime, registry } = configured;
|
|
@@ -6081,7 +6086,7 @@ var Registry = class {
|
|
|
6081
6086
|
return jsonRouteResponse(501, {
|
|
6082
6087
|
status: "unsupported",
|
|
6083
6088
|
runtime: "rivetkit",
|
|
6084
|
-
version:
|
|
6089
|
+
version: _chunkHW5L2LUKcjs.VERSION
|
|
6085
6090
|
});
|
|
6086
6091
|
}
|
|
6087
6092
|
const response = await runtime.registryHealth(registry);
|
|
@@ -6327,7 +6332,7 @@ var Registry = class {
|
|
|
6327
6332
|
};
|
|
6328
6333
|
console.log();
|
|
6329
6334
|
console.log(
|
|
6330
|
-
` RivetKit ${
|
|
6335
|
+
` RivetKit ${_chunkHW5L2LUKcjs.VERSION} (Engine - ${kind === "serverless" ? "Serverless" : "Serverful"})`
|
|
6331
6336
|
);
|
|
6332
6337
|
if (config.namespace !== "default") {
|
|
6333
6338
|
logLine("Namespace", config.namespace);
|
|
@@ -6395,5 +6400,5 @@ function setup(input) {
|
|
|
6395
6400
|
|
|
6396
6401
|
|
|
6397
6402
|
|
|
6398
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
6403
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunkHMYIDZL2cjs.ALLOWED_PUBLIC_HEADERS; exports.ActorDefinition = ActorDefinition; exports.ActorError = _chunkKORQB2IRcjs.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 = _chunkKORQB2IRcjs.RivetError; exports.RuntimeKindSchema = RuntimeKindSchema; exports.SqliteBackendSchema = SqliteBackendSchema; exports.SqliteConfigSchema = SqliteConfigSchema; exports.TestConfigSchema = TestConfigSchema; exports.UserError = _chunkKORQB2IRcjs.UserError; exports.WasmRuntimeConfigSchema = WasmRuntimeConfigSchema; exports.actor = actor; exports.buildActorNames = buildActorNames; exports.createClientWithDriver = _chunkHMYIDZL2cjs.createClientWithDriver; exports.event = event; exports.isStaticActorDefinition = isStaticActorDefinition; exports.isStaticActorInstance = isStaticActorInstance; exports.lookupInRegistry = lookupInRegistry; exports.noopNext = _chunkHW5L2LUKcjs.noopNext; exports.queue = queue; exports.setup = setup; exports.toUint8Array = _chunkHW5L2LUKcjs.toUint8Array;
|
|
6399
6404
|
//# sourceMappingURL=mod.cjs.map
|