rivetkit 2.3.0-rc.7 → 2.3.0-rc.8
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-G5HUSWP4.cjs → chunk-4BPKKZJO.cjs} +8 -8
- package/dist/tsup/{chunk-G5HUSWP4.cjs.map → chunk-4BPKKZJO.cjs.map} +1 -1
- package/dist/tsup/{chunk-CMV6N5OX.js → chunk-4JU3IPG2.js} +3 -3
- package/dist/tsup/{chunk-SJLPZEA3.cjs → chunk-6TQSSJ4F.cjs} +3 -3
- package/dist/tsup/{chunk-SJLPZEA3.cjs.map → chunk-6TQSSJ4F.cjs.map} +1 -1
- package/dist/tsup/{chunk-ZGPX6KAH.cjs → chunk-7HLFSAJP.cjs} +136 -136
- package/dist/tsup/{chunk-ZGPX6KAH.cjs.map → chunk-7HLFSAJP.cjs.map} +1 -1
- package/dist/tsup/{chunk-2H4ISA4Y.cjs → chunk-AWTPTUQ7.cjs} +10 -10
- package/dist/tsup/{chunk-2H4ISA4Y.cjs.map → chunk-AWTPTUQ7.cjs.map} +1 -1
- package/dist/tsup/{chunk-X6HIFXNK.cjs → chunk-BATTOVHF.cjs} +2 -2
- package/dist/tsup/{chunk-X6HIFXNK.cjs.map → chunk-BATTOVHF.cjs.map} +1 -1
- package/dist/tsup/{chunk-4DJMFOSU.js → chunk-D3T3ZBSY.js} +2 -2
- package/dist/tsup/{chunk-VJ4Y4WBT.js → chunk-EMFKMVJR.js} +4 -4
- package/dist/tsup/{chunk-HERL2VQ2.js → chunk-GBG63SUG.js} +2 -2
- package/dist/tsup/{chunk-HERL2VQ2.js.map → chunk-GBG63SUG.js.map} +1 -1
- package/dist/tsup/{chunk-FEOG44WH.cjs → chunk-HGW6PBWR.cjs} +5 -5
- package/dist/tsup/{chunk-FEOG44WH.cjs.map → chunk-HGW6PBWR.cjs.map} +1 -1
- package/dist/tsup/{chunk-4LTY5TOO.js → chunk-KY3CERZR.js} +2 -2
- package/dist/tsup/{chunk-55E7IR6D.cjs → chunk-OT7FF6GB.cjs} +4 -4
- package/dist/tsup/{chunk-55E7IR6D.cjs.map → chunk-OT7FF6GB.cjs.map} +1 -1
- package/dist/tsup/{chunk-VFIY6GWO.js → chunk-UZXQEGVJ.js} +4 -4
- package/dist/tsup/{chunk-52TPEKEC.js → chunk-VUGENVIK.js} +2 -2
- package/dist/tsup/client/mod.cjs +6 -6
- package/dist/tsup/client/mod.js +5 -5
- 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 +57 -57
- package/dist/tsup/mod.js +5 -5
- package/dist/tsup/test/mod.cjs +9 -9
- package/dist/tsup/test/mod.js +5 -5
- 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/dist/tsup/{chunk-CMV6N5OX.js.map → chunk-4JU3IPG2.js.map} +0 -0
- /package/dist/tsup/{chunk-4DJMFOSU.js.map → chunk-D3T3ZBSY.js.map} +0 -0
- /package/dist/tsup/{chunk-VJ4Y4WBT.js.map → chunk-EMFKMVJR.js.map} +0 -0
- /package/dist/tsup/{chunk-4LTY5TOO.js.map → chunk-KY3CERZR.js.map} +0 -0
- /package/dist/tsup/{chunk-VFIY6GWO.js.map → chunk-UZXQEGVJ.js.map} +0 -0
- /package/dist/tsup/{chunk-52TPEKEC.js.map → chunk-VUGENVIK.js.map} +0 -0
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk7HLFSAJPcjs = require('./chunk-7HLFSAJP.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkBATTOVHFcjs = require('./chunk-BATTOVHF.cjs');
|
|
10
10
|
|
|
11
11
|
// src/devtools-loader/log.ts
|
|
12
12
|
function logger() {
|
|
13
|
-
return
|
|
13
|
+
return _chunkBATTOVHFcjs.getLogger.call(void 0, "devtools");
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// src/devtools-loader/index.ts
|
|
17
|
-
var DEFAULT_DEVTOOLS_URL = (version =
|
|
17
|
+
var DEFAULT_DEVTOOLS_URL = (version = _chunkBATTOVHFcjs.VERSION) => `https://releases.rivet.dev/rivet/latest/devtools/mod.js?v=${version}`;
|
|
18
18
|
var scriptId = "rivetkit-devtools-script";
|
|
19
19
|
function injectDevtools(config) {
|
|
20
20
|
if (!window) {
|
|
@@ -35,15 +35,15 @@ function injectDevtools(config) {
|
|
|
35
35
|
// src/client/mod.ts
|
|
36
36
|
function createClient(endpointOrConfig) {
|
|
37
37
|
const configInput = endpointOrConfig === void 0 ? {} : typeof endpointOrConfig === "string" ? { endpoint: endpointOrConfig } : endpointOrConfig;
|
|
38
|
-
const config =
|
|
39
|
-
const driver = new (0,
|
|
38
|
+
const config = _chunk7HLFSAJPcjs.ClientConfigSchema.parse(configInput);
|
|
39
|
+
const driver = new (0, _chunk7HLFSAJPcjs.RemoteEngineControlClient)(config);
|
|
40
40
|
if (config.devtools) {
|
|
41
41
|
injectDevtools(config);
|
|
42
42
|
}
|
|
43
|
-
return
|
|
43
|
+
return _chunk7HLFSAJPcjs.createClientWithDriver.call(void 0, driver, config);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
exports.createClient = createClient;
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-4BPKKZJO.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-4BPKKZJO.cjs","../../src/devtools-loader/log.ts","../../src/devtools-loader/index.ts","../../src/client/mod.ts"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACRO,SAAS,MAAA,CAAA,EAAS;AACxB,EAAA,OAAO,yCAAA,UAAoB,CAAA;AAC5B;ADUA;AACA;AELA,IAAM,qBAAA,EAAuB,CAAC,QAAA,EAAU,yBAAA,EAAA,GACvC,CAAA,0DAAA,EAA6D,OAAO,CAAA,CAAA;AAEpD;AAEyC;AAC5C,EAAA;AACsD,IAAA;AAClE,IAAA;AACD,EAAA;AAEwC,EAAA;AACO,IAAA;AAClC,IAAA;AAEqD,IAAA;AAClD,IAAA;AACiB,IAAA;AACjC,EAAA;AAE0C,EAAA;AACb,EAAA;AAC9B;AFCuH;AACA;AGuB1G;AAMK,EAAA;AAEkC,EAAA;AAGA,EAAA;AAE9B,EAAA;AACC,IAAA;AACtB,EAAA;AAE+C,EAAA;AAChD;AH/BuH;AACA;AACA;AACA","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-4BPKKZJO.cjs","sourcesContent":[null,"import { getLogger } from \"@/common/log\";\n\nexport function logger() {\n\treturn getLogger(\"devtools\");\n}\n","import type { ClientConfigInput } from \"@/client/client\";\nimport { VERSION } from \"@/utils\";\nimport { logger } from \"./log\";\n\ndeclare global {\n\t// Injected via tsup config\n\t// biome-ignore lint/style/noVar: required for global declaration\n\tvar CUSTOM_RIVETKIT_DEVTOOLS_URL: string | undefined;\n}\n\nconst DEFAULT_DEVTOOLS_URL = (version = VERSION) =>\n\t`https://releases.rivet.dev/rivet/latest/devtools/mod.js?v=${version}`;\n\nconst scriptId = \"rivetkit-devtools-script\";\n\nexport function injectDevtools(config: ClientConfigInput) {\n\tif (!window) {\n\t\tlogger().warn(\"devtools not available outside browser environment\");\n\t\treturn;\n\t}\n\n\tif (!document.getElementById(scriptId)) {\n\t\tconst script = document.createElement(\"script\");\n\t\tscript.id = scriptId;\n\t\tscript.src =\n\t\t\tglobalThis.CUSTOM_RIVETKIT_DEVTOOLS_URL || DEFAULT_DEVTOOLS_URL();\n\t\tscript.async = true;\n\t\tdocument.head.appendChild(script);\n\t}\n\n\twindow.__rivetkit = window.__rivetkit || [];\n\twindow.__rivetkit.push(config);\n}\n","import { injectDevtools } from \"@/devtools-loader\";\nimport { RemoteEngineControlClient } from \"@/engine-client/mod\";\nimport type { Registry } from \"@/registry\";\nimport {\n\ttype Client,\n\ttype ClientConfigInput,\n\tcreateClientWithDriver,\n} from \"./client\";\nimport { ClientConfigSchema } from \"./config\";\n\nexport type { ActorDefinition, AnyActorDefinition } from \"@/actor/definition\";\nexport {\n\tActorClientError,\n\tActorConnDisposed,\n\tActorError,\n\tMalformedResponseMessage,\n\tManagerError,\n\tRivetError,\n\tUserError,\n} from \"@/client/errors\";\nexport type { CreateRequest } from \"@/client/query\";\nexport type { Encoding } from \"@/common/encoding\";\nexport type {\n\tActorActionFunction,\n\tActorActionOptions,\n\tActorConnectOptions,\n\tActorGatewayOptions,\n} from \"./actor-common\";\nexport type {\n\tActorConn,\n\tActorConnStatus,\n\tConnectionStateCallback,\n\tEventUnsubscribe,\n\tStatusChangeCallback,\n} from \"./actor-conn\";\nexport { ActorConnRaw } from \"./actor-conn\";\nexport type { ActorHandle } from \"./actor-handle\";\nexport { ActorHandleRaw } from \"./actor-handle\";\nexport type {\n\tActorAccessor,\n\tClient,\n\tClientConfigInput,\n\tClientRaw,\n\tCreateOptions,\n\tExtractActorsFromRegistry,\n\tExtractRegistryFromClient,\n\tGetOptions,\n\tGetWithIdOptions,\n\tQueryOptions,\n\tRegion,\n} from \"./client\";\n\n/**\n * Creates a client with the actor accessor proxy.\n */\nexport function createClient<A extends Registry<any>>(\n\tendpointOrConfig?: string | ClientConfigInput,\n): Client<A> {\n\t// Parse config\n\tconst configInput =\n\t\tendpointOrConfig === undefined\n\t\t\t? {}\n\t\t\t: typeof endpointOrConfig === \"string\"\n\t\t\t\t? { endpoint: endpointOrConfig }\n\t\t\t\t: endpointOrConfig;\n\tconst config = ClientConfigSchema.parse(configInput);\n\n\t// Create client\n\tconst driver = new RemoteEngineControlClient(config);\n\n\tif (config.devtools) {\n\t\tinjectDevtools(config);\n\t}\n\n\treturn createClientWithDriver<A>(driver, config);\n}\n"]}
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
ClientConfigSchema,
|
|
3
3
|
RemoteEngineControlClient,
|
|
4
4
|
createClientWithDriver
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EMFKMVJR.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
getLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GBG63SUG.js";
|
|
10
10
|
|
|
11
11
|
// src/devtools-loader/log.ts
|
|
12
12
|
function logger() {
|
|
@@ -46,4 +46,4 @@ function createClient(endpointOrConfig) {
|
|
|
46
46
|
export {
|
|
47
47
|
createClient
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-4JU3IPG2.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
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; } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkBATTOVHFcjs = require('./chunk-BATTOVHF.cjs');
|
|
4
4
|
|
|
5
5
|
// src/client/log.ts
|
|
6
6
|
function logger() {
|
|
7
|
-
return
|
|
7
|
+
return _chunkBATTOVHFcjs.getLogger.call(void 0, "actor-client");
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
// src/common/websocket.ts
|
|
@@ -46,4 +46,4 @@ async function importWebSocket() {
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
exports.logger = logger; exports.importWebSocket = importWebSocket;
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-6TQSSJ4F.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-6TQSSJ4F.cjs","../../src/client/log.ts","../../src/common/websocket.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACFO,SAAS,MAAA,CAAA,EAAS;AACxB,EAAA,OAAO,yCAAA,cAAwB,CAAA;AAChC;ADIA;AACA;AENA,IAAI,iBAAA,EAAqD,IAAA;AAEzD,MAAA,SAAsB,eAAA,CAAA,EAA6C;AAElE,EAAA,GAAA,CAAI,iBAAA,IAAqB,IAAA,EAAM;AAC9B,IAAA,OAAO,gBAAA;AAAA,EACR;AAGA,EAAA,iBAAA,EAAA,CAAoB,MAAA,CAAA,EAAA,GAAY;AAC/B,IAAA,IAAI,UAAA;AAEJ,IAAA,GAAA,CAAI,OAAO,UAAA,IAAc,WAAA,EAAa;AAErC,MAAA,WAAA,EAAa,SAAA;AAAA,IACd,EAAA,KAAO;AAEN,MAAA,IAAI;AACH,QAAA,MAAM,WAAA,EAAa,IAAA;AACnB,QAAA,MAAM,GAAA,EAAK,MAAM,4DAAA;AAAA;AAAA,UAAiC;AAAA,QAAA,GAAA;AAClD,QAAA,WAAA,EAAa,EAAA,CAAG,OAAA;AAChB,QAAA,MAAA,CAAO,CAAA,CAAE,KAAA,CAAM,0BAA0B,CAAA;AAAA,MAC1C,EAAA,UAAQ;AAEP,QAAA,WAAA,EAAa,MAAM,cAAc;AAAA,UAChC,WAAA,CAAA,EAAc;AACb,YAAA,MAAM,IAAI,KAAA;AAAA,cACT;AAAA,YACD,CAAA;AAAA,UACD;AAAA,QACD,CAAA;AACA,QAAA,MAAA,CAAO,CAAA,CAAE,KAAA,CAAM,sBAAsB,CAAA;AAAA,MACtC;AAAA,IACD;AAEA,IAAA,OAAO,UAAA;AAAA,EACR,CAAA,CAAA,CAAG,CAAA;AAEH,EAAA,OAAO,gBAAA;AACR;AFCA;AACA;AACE;AACA;AACF,mEAAC","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/rivetkit/dist/tsup/chunk-6TQSSJ4F.cjs","sourcesContent":[null,"import { getLogger } from \"@/common/log\";\n\nexport function logger() {\n\treturn getLogger(\"actor-client\");\n}\n","import { logger } from \"@/client/log\";\n\n// Global singleton promise that will be reused for subsequent calls\nlet webSocketPromise: Promise<typeof WebSocket> | null = null;\n\nexport async function importWebSocket(): Promise<typeof WebSocket> {\n\t// Return existing promise if we already started loading\n\tif (webSocketPromise !== null) {\n\t\treturn webSocketPromise;\n\t}\n\n\t// Create and store the promise\n\twebSocketPromise = (async () => {\n\t\tlet _WebSocket: typeof WebSocket;\n\n\t\tif (typeof WebSocket !== \"undefined\") {\n\t\t\t// Browser environment\n\t\t\t_WebSocket = WebSocket as unknown as typeof WebSocket;\n\t\t} else {\n\t\t\t// Node.js environment\n\t\t\ttry {\n\t\t\t\tconst moduleName = \"ws\";\n\t\t\t\tconst ws = await import(/* webpackIgnore: true */ moduleName);\n\t\t\t\t_WebSocket = ws.default as unknown as typeof WebSocket;\n\t\t\t\tlogger().debug(\"using websocket from npm\");\n\t\t\t} catch {\n\t\t\t\t// WS not available\n\t\t\t\t_WebSocket = class MockWebSocket {\n\t\t\t\t\tconstructor() {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t'WebSocket support requires installing the \"ws\" peer dependency.',\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} as unknown as typeof WebSocket;\n\t\t\t\tlogger().debug(\"using mock websocket\");\n\t\t\t}\n\t\t}\n\n\t\treturn _WebSocket;\n\t})();\n\n\treturn webSocketPromise;\n}\n"]}
|