devframe 1.3.1 → 1.3.2
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/{_shared-C61zPwIz.mjs → _shared-BGb9aDxr.mjs} +6 -9
- package/dist/{_shared-Cm4iD0L3.d.mts → _shared-CnKu5myY.d.mts} +2 -4
- package/dist/adapters/build.d.mts +3 -5
- package/dist/adapters/build.mjs +7 -8
- package/dist/adapters/cac.d.mts +1 -3
- package/dist/adapters/cac.mjs +5 -7
- package/dist/adapters/dev.d.mts +6 -8
- package/dist/adapters/dev.mjs +2 -2
- package/dist/adapters/embedded.d.mts +2 -4
- package/dist/adapters/embedded.mjs +1 -2
- package/dist/adapters/initiate.d.mts +9 -9
- package/dist/adapters/initiate.mjs +1 -2
- package/dist/adapters/mcp.d.mts +2 -2
- package/dist/adapters/mcp.mjs +1 -2
- package/dist/{agentic-C6SCkdtj.d.mts → agentic-CCstJ5yv.d.mts} +1 -3
- package/dist/{browser-agent-Pu-FLk6I.mjs → browser-agent-DmAotroz.mjs} +1 -2
- package/dist/{browser-agent-rpc-KH4HHvHf.mjs → browser-agent-rpc-CS80Sphv.mjs} +3 -5
- package/dist/cli/main.d.mts +1 -3
- package/dist/cli/main.mjs +3 -4
- package/dist/client/index.d.mts +6 -30
- package/dist/client/index.mjs +47 -72
- package/dist/{client-agent-iBkMYxqn.mjs → client-agent-qNMgDUev.mjs} +7 -12
- package/dist/constants.d.mts +1 -5
- package/dist/constants.mjs +2 -3
- package/dist/{context-D_jSSdME.mjs → context-BTxC4QrJ.mjs} +4 -5
- package/dist/{context-CAJ5V017.mjs → context-C5FcbWQi.mjs} +25 -41
- package/dist/{context-BGJi0ITA.d.mts → context-CsdPs3po.d.mts} +1 -3
- package/dist/{context-BNxFOPbX.d.mts → context-WxTq6kqb.d.mts} +7 -41
- package/dist/{crypto-token-TVbGGFuj.mjs → crypto-token-CUhPE_ei.mjs} +1 -2
- package/dist/{define-BLWPsH6y.mjs → define-C8h-fyD3.mjs} +1 -2
- package/dist/{dev-BKBjIpX3.mjs → dev-DaHYh5YK.mjs} +9 -11
- package/dist/{diagnostics-E_PvUPsA.mjs → diagnostics-DC1-WcvN.mjs} +2 -3
- package/dist/{dist-CO98PBnQ.mjs → dist-BWGpvt-z.mjs} +1 -2
- package/dist/{dist-CZXfGEkd.mjs → dist-DJydMELP.mjs} +3 -10
- package/dist/{events-0wDwalmL.mjs → events-qWCKwD8-.mjs} +1 -2
- package/dist/{handler-DmaAfpGq.mjs → handler-DkLlj3-B.mjs} +3 -5
- package/dist/{hash-DdPnc4k3.mjs → hash-DHqpWeMO.mjs} +4 -8
- package/dist/{host-h3-BROI6SQ4.mjs → host-h3-D1uj5EM8.mjs} +1 -2
- package/dist/{import-runtime-module-BzlEQ9PI.mjs → import-runtime-module-DsdqJ1gK.mjs} +2 -3
- package/dist/in-page-channel/index.d.mts +2 -12
- package/dist/in-page-channel/index.mjs +10 -16
- package/dist/{index-CeEtxDmK.d.mts → index-BIRF0E5l.d.mts} +0 -2
- package/dist/{index-Bia1vKjL.d.mts → index-BKu9BxcT.d.mts} +0 -2
- package/dist/{index-DuEm0sDH.d.mts → index-D0qrBkhO.d.mts} +1 -15
- package/dist/{index-CxJatyA1.d.mts → index-HMJPlexc.d.mts} +2 -6
- package/dist/index.d.mts +6 -8
- package/dist/index.mjs +3 -4
- package/dist/{instance-registry-C_4PpB6N.mjs → instance-registry-CmZfF5u3.mjs} +4 -10
- package/dist/{instance-shell-GihbmXoF.d.mts → instance-shell-Bujp0BhE.d.mts} +5 -9
- package/dist/{instance-shell-m4sY2oTG.mjs → instance-shell-Dk2SejFT.mjs} +38 -17
- package/dist/{interactive-auth-DdDxs3WF.mjs → interactive-auth-BURwIAvE.mjs} +6 -8
- package/dist/internal/index.d.mts +9 -29
- package/dist/internal/index.mjs +13 -15
- package/dist/{mcp-content-QImBQO8e.d.mts → mcp-content-CQQBt2An.d.mts} +1 -3
- package/dist/{mcp-content-DN3O212x.mjs → mcp-content-CqU8yaF7.mjs} +1 -2
- package/dist/{mrmime-40h5OOIp.mjs → mrmime-y_XyiVcd.mjs} +1 -2
- package/dist/node/auth.d.mts +2 -2
- package/dist/node/auth.mjs +2 -2
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +2 -6
- package/dist/node/index.mjs +2 -2
- package/dist/{nostics-DWvukRwa.d.mts → nostics-Dgwh7ytT.d.mts} +0 -2
- package/dist/{nostics-D0PvLZsn.mjs → nostics-InlX4tmd.mjs} +2 -4
- package/dist/{origin-DZit9g29.mjs → origin-Ck7mLbKU.mjs} +1 -2
- package/dist/{origin-CY6BBHOy.d.mts → origin-D5i7K_Zb.d.mts} +0 -2
- package/dist/recipes/interactive-auth.d.mts +3 -5
- package/dist/recipes/interactive-auth.mjs +1 -2
- package/dist/{remote-assets-eBvSKZMS.d.mts → remote-assets-5AQMHZnV.d.mts} +0 -2
- package/dist/{remote-assets-B-n83kUY.mjs → remote-assets-DhonNeo_.mjs} +5 -8
- package/dist/{revoke-CeQUo6KI.mjs → revoke-D6KA3vwr.mjs} +2 -3
- package/dist/{rolldown-runtime-B4iAMlE-.mjs → rolldown-runtime-DYf_mQCB.mjs} +2 -3
- package/dist/rpc/client.d.mts +2 -4
- package/dist/rpc/client.mjs +2 -3
- package/dist/rpc/dump.d.mts +3 -11
- package/dist/rpc/dump.mjs +1 -2
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +6 -8
- package/dist/rpc/server.d.mts +2 -4
- package/dist/rpc/server.mjs +2 -3
- package/dist/rpc/transports/sse-client.d.mts +1 -1
- package/dist/rpc/transports/sse-client.mjs +2 -3
- package/dist/rpc/transports/sse-server.d.mts +5 -7
- package/dist/rpc/transports/sse-server.mjs +4 -5
- package/dist/rpc/transports/ws-bun.d.mts +3 -5
- package/dist/rpc/transports/ws-bun.mjs +2 -3
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +2 -3
- package/dist/rpc/transports/ws-deno.d.mts +3 -5
- package/dist/rpc/transports/ws-deno.mjs +2 -3
- package/dist/rpc/transports/ws-server.d.mts +3 -3
- package/dist/rpc/transports/ws-server.mjs +5 -6
- package/dist/{rpc-core-BLc5hm9X.mjs → rpc-core-CDUizUQB.mjs} +4 -5
- package/dist/{rpc-core-CGTCla-R.d.mts → rpc-core-CFwyV10r.d.mts} +5 -7
- package/dist/{serialization-BhuOoL80.mjs → serialization-iiTQ7n21.mjs} +3 -5
- package/dist/{services-install-D5YUwFXW.mjs → services-install-DCuDzMJ-.mjs} +1 -2
- package/dist/{session-DPfj6zQG.mjs → session-BjvoLH3r.mjs} +1 -2
- package/dist/{session-r6PDixP6.d.mts → session-Y9R6tqg4.d.mts} +0 -2
- package/dist/{shared-state-Cc-Jrhma.mjs → shared-state-COV7NCbd.mjs} +4 -6
- package/dist/{sse-client-DNdscfu_.d.mts → sse-client-B2PrSz-H.d.mts} +2 -4
- package/dist/{state-W4wI6X5X.mjs → state-B_yjfeqo.mjs} +3 -5
- package/dist/{storage-CWI9PZ-5.mjs → storage-DpJ52UB_.mjs} +3 -5
- package/dist/{structured-clone-CbAV5rFI.mjs → structured-clone-B1N_XQvA.mjs} +2 -4
- package/dist/{structured-clone-CgtQ61SA.mjs → structured-clone-D1dOCZvc.mjs} +2 -4
- package/dist/{tool-input-CES3Pc4y.mjs → tool-input-CcCgJ8jq.mjs} +6 -12
- package/dist/types/index.d.mts +5 -5
- package/dist/{types-BmDbfHCx.d.mts → types-844OBepb.d.mts} +1 -5
- package/dist/utils/agent-tool-name.d.mts +1 -3
- package/dist/utils/agent-tool-name.mjs +1 -2
- package/dist/utils/colors.d.mts +1 -3
- package/dist/utils/colors.mjs +1 -2
- package/dist/utils/crypto-token.d.mts +1 -3
- package/dist/utils/crypto-token.mjs +1 -2
- package/dist/utils/debounce.d.mts +0 -2
- package/dist/utils/debounce.mjs +1 -2
- package/dist/utils/events.d.mts +2 -4
- package/dist/utils/events.mjs +1 -2
- package/dist/utils/get-port.d.mts +0 -2
- package/dist/utils/get-port.mjs +1 -2
- package/dist/utils/hash.d.mts +1 -3
- package/dist/utils/hash.mjs +1 -2
- package/dist/utils/launch-editor.d.mts +1 -3
- package/dist/utils/launch-editor.mjs +25 -37
- package/dist/utils/nanoid.d.mts +1 -3
- package/dist/utils/nanoid.mjs +1 -2
- package/dist/utils/nostics.d.mts +1 -1
- package/dist/utils/nostics.mjs +1 -2
- package/dist/utils/open.d.mts +1 -3
- package/dist/utils/open.mjs +1 -2
- package/dist/utils/origin.d.mts +1 -1
- package/dist/utils/origin.mjs +1 -2
- package/dist/utils/remote-assets.d.mts +2 -4
- package/dist/utils/remote-assets.mjs +1 -2
- package/dist/utils/serve-static.d.mts +2 -4
- package/dist/utils/serve-static.mjs +3 -4
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/shared-state.mjs +1 -2
- package/dist/utils/simple-schema.d.mts +1 -3
- package/dist/utils/simple-schema.mjs +1 -2
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/utils/streaming-channel.mjs +1 -2
- package/dist/utils/structured-clone.d.mts +1 -3
- package/dist/utils/structured-clone.mjs +1 -2
- package/dist/utils/url.d.mts +1 -3
- package/dist/utils/url.mjs +1 -2
- package/dist/utils/when.d.mts +1 -3
- package/dist/utils/when.mjs +2 -4
- package/dist/{validation-CMfDAti3.mjs → validation-Cjy1P58H.mjs} +7 -13
- package/dist/{wire-codec-B1W3zH3L.mjs → wire-codec-BdngvzfH.mjs} +3 -4
- package/dist/{write-DK7rBUN3.mjs → write-3miSvPaD.mjs} +10 -16
- package/dist/{ws-client-6Mrz6eC4.d.mts → ws-client-lqOeANcn.d.mts} +2 -4
- package/dist/{ws-server-y2R76aSW.d.mts → ws-server-CYHkeyA-.d.mts} +3 -5
- package/package.json +8 -8
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { a as RemoteAssetsStore } from "../remote-assets-
|
|
1
|
+
import { a as RemoteAssetsStore } from "../remote-assets-5AQMHZnV.mjs";
|
|
2
2
|
import { EventHandler, H3 } from "h3";
|
|
3
3
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
|
-
//#region src/utils/serve-static.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* What the static-serving engine accepts: a local directory, or a resolved
|
|
7
6
|
* {@link RemoteAssetsStore} back-proxy (from `devframe/utils/remote-assets`).
|
|
@@ -40,5 +39,4 @@ export declare function mountStaticHandler(app: H3, base: string, source: Servab
|
|
|
40
39
|
* Connect stack; avoids forcing the host package to depend on h3 just to
|
|
41
40
|
* adapt an event handler back into Node middleware.
|
|
42
41
|
*/
|
|
43
|
-
export declare function serveStaticNodeMiddleware(source: ServableAssets, options?: ServeStaticOptions): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void;
|
|
44
|
-
//#endregion
|
|
42
|
+
export declare function serveStaticNodeMiddleware(source: ServableAssets, options?: ServeStaticOptions): (req: IncomingMessage, res: ServerResponse, next?: (err?: Error) => void) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
1
|
+
import { t as lookup } from "../mrmime-y_XyiVcd.mjs";
|
|
2
|
+
import { t as DEVFRAME_EVENTS } from "../events-qWCKwD8-.mjs";
|
|
3
3
|
import { realpath, stat } from "node:fs/promises";
|
|
4
4
|
import { extname, join, normalize, resolve, sep } from "pathe";
|
|
5
5
|
import { createReadStream } from "node:fs";
|
|
6
6
|
import { Readable } from "node:stream";
|
|
7
7
|
import { H3, defineHandler } from "h3";
|
|
8
|
-
|
|
8
|
+
// src/utils/serve-static.ts
|
|
9
9
|
const HTML_EXTENSIONS = [".html", ".htm"];
|
|
10
10
|
/**
|
|
11
11
|
* The canonical (symlink-resolved) served root, falling back to the lexical
|
|
@@ -312,5 +312,4 @@ function remoteErrorPage(pkg, version, reason) {
|
|
|
312
312
|
</html>
|
|
313
313
|
`;
|
|
314
314
|
}
|
|
315
|
-
//#endregion
|
|
316
315
|
export { mountStaticHandler, serveStaticHandler, serveStaticNodeMiddleware };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-
|
|
1
|
+
import { A as SharedStateEvents, D as ImmutableObject, E as ImmutableMap, M as SharedStatePatch, N as createSharedState, O as ImmutableSet, T as ImmutableArray, j as SharedStateOptions, k as SharedState, w as Immutable } from "../context-WxTq6kqb.mjs";
|
|
2
2
|
export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createSharedState };
|
|
1
|
+
export { t as createSharedState } from "../shared-state-COV7NCbd.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as StandardSchemaV1 } from "../index-
|
|
2
|
-
//#region src/utils/simple-schema.d.ts
|
|
1
|
+
import { t as StandardSchemaV1 } from "../index-BIRF0E5l.mjs";
|
|
3
2
|
/**
|
|
4
3
|
* A tiny, zero-dependency [Standard Schema](https://standardschema.dev/)
|
|
5
4
|
* builder.
|
|
@@ -98,5 +97,4 @@ export declare const s: {
|
|
|
98
97
|
readonly nullable: typeof nullable;
|
|
99
98
|
readonly describe: typeof describe;
|
|
100
99
|
};
|
|
101
|
-
//#endregion
|
|
102
100
|
export type { StandardSchemaV1 };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/simple-schema.ts
|
|
2
2
|
function ok(value) {
|
|
3
3
|
return { value };
|
|
4
4
|
}
|
|
@@ -150,5 +150,4 @@ const s = {
|
|
|
150
150
|
nullable,
|
|
151
151
|
describe
|
|
152
152
|
};
|
|
153
|
-
//#endregion
|
|
154
153
|
export { array, boolean, describe, literal, nullType, nullable, number, object, optional, picklist, record, s, string, union, voidType };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-
|
|
1
|
+
import { C as createStreamSink, S as createStreamReader, _ as CreateStreamSinkOptions, b as StreamSink, g as CreateStreamReaderOptions, h as BufferedChunk, v as StreamErrorPayload, x as StreamSinkEvents, y as StreamReader } from "../context-WxTq6kqb.mjs";
|
|
2
2
|
export { BufferedChunk, CreateStreamReaderOptions, CreateStreamSinkOptions, StreamErrorPayload, StreamReader, StreamSink, StreamSinkEvents, createStreamReader, createStreamSink };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createEventEmitter } from "./events.mjs";
|
|
2
2
|
import { nanoid } from "./nanoid.mjs";
|
|
3
|
-
|
|
3
|
+
// src/utils/streaming-channel.ts
|
|
4
4
|
const DEFAULT_HIGH_WATER_MARK = 256;
|
|
5
5
|
var StreamClosedError = class extends Error {
|
|
6
6
|
name = "StreamClosedError";
|
|
@@ -254,5 +254,4 @@ function toErrorPayload(reason) {
|
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
//#endregion
|
|
258
257
|
export { createStreamReader, createStreamSink };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/structured-clone.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Serialize a structured-cloneable value (`Map`, `Set`, `Date`, `BigInt`,
|
|
4
3
|
* cycles, class instances, …) into a JSON-safe records array.
|
|
@@ -16,5 +15,4 @@ export declare function structuredCloneStringify(value: unknown): string;
|
|
|
16
15
|
/**
|
|
17
16
|
* Inverse of {@link structuredCloneStringify}.
|
|
18
17
|
*/
|
|
19
|
-
export declare function structuredCloneParse<T = unknown>(value: string): T;
|
|
20
|
-
//#endregion
|
|
18
|
+
export declare function structuredCloneParse<T = unknown>(value: string): T;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { structuredCloneDeserialize, structuredCloneParse, structuredCloneSerialize, structuredCloneStringify };
|
|
1
|
+
export { t as structuredCloneDeserialize, n as structuredCloneParse, r as structuredCloneSerialize, i as structuredCloneStringify } from "../structured-clone-D1dOCZvc.mjs";
|
package/dist/utils/url.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/utils/url.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* URL path-joining and slash-normalization helpers shared by the adapters,
|
|
4
3
|
* the RPC clients, and the hub's mount-path plumbing. In-house replacements
|
|
@@ -27,5 +26,4 @@ export declare function joinURL(base: string, ...segments: string[]): string;
|
|
|
27
26
|
*/
|
|
28
27
|
export declare function withBase(input: string, base: string): string;
|
|
29
28
|
/** Replaces (or adds) the protocol of `input`: `withProtocol(url, 'ws://')`. */
|
|
30
|
-
export declare function withProtocol(input: string, protocol: string): string;
|
|
31
|
-
//#endregion
|
|
29
|
+
export declare function withProtocol(input: string, protocol: string): string;
|
package/dist/utils/url.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/url.ts
|
|
2
2
|
/**
|
|
3
3
|
* URL path-joining and slash-normalization helpers shared by the adapters,
|
|
4
4
|
* the RPC clients, and the hub's mount-path plumbing. In-house replacements
|
|
@@ -54,5 +54,4 @@ function withProtocol(input, protocol) {
|
|
|
54
54
|
const match = input.match(PROTOCOL_RE);
|
|
55
55
|
return protocol + (match ? input.slice(match[0].length) : input);
|
|
56
56
|
}
|
|
57
|
-
//#endregion
|
|
58
57
|
export { cleanDoubleSlashes, joinURL, withBase, withLeadingSlash, withProtocol, withTrailingSlash, withoutLeadingSlash, withoutTrailingSlash };
|
package/dist/utils/when.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { WhenExpression as WhenExpression$1 } from "whenexpr";
|
|
2
|
-
//#region src/utils/when.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Context object for evaluating `when` expressions.
|
|
5
4
|
*
|
|
@@ -50,5 +49,4 @@ export declare function evaluateWhen<T extends object, const E extends string>(e
|
|
|
50
49
|
* Resolve a context value by key. Supports namespaced keys with `.` or `:`
|
|
51
50
|
* separators. Returns `undefined` for unknown keys.
|
|
52
51
|
*/
|
|
53
|
-
export declare function resolveContextValue<T extends Record<string, unknown>>(key: string, context: T): unknown;
|
|
54
|
-
//#endregion
|
|
52
|
+
export declare function resolveContextValue<T extends Record<string, unknown>>(key: string, context: T): unknown;
|
package/dist/utils/when.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/whenexpr@0.1.2/node_modules/whenexpr/dist/index.mjs
|
|
2
2
|
const OPS = [
|
|
3
3
|
"===",
|
|
4
4
|
"!==",
|
|
@@ -420,8 +420,7 @@ function resolve(key, ctx) {
|
|
|
420
420
|
value: void 0
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
|
-
|
|
424
|
-
//#region src/utils/when.ts
|
|
423
|
+
// src/utils/when.ts
|
|
425
424
|
/**
|
|
426
425
|
* Evaluate a when-clause expression string against a context object.
|
|
427
426
|
*
|
|
@@ -438,5 +437,4 @@ function evaluateWhen(expression, context, options) {
|
|
|
438
437
|
function resolveContextValue(key, context) {
|
|
439
438
|
return resolveContextValue$1(key, context);
|
|
440
439
|
}
|
|
441
|
-
//#endregion
|
|
442
440
|
export { evaluateWhen, resolveContextValue };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as diagnostics } from "./serialization-
|
|
1
|
+
import { r as diagnostics } from "./serialization-iiTQ7n21.mjs";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/_chunks/is-equal.mjs
|
|
4
4
|
function serialize(input) {
|
|
5
5
|
if (typeof input === "string") return `'${input}'`;
|
|
6
6
|
return new Serializer().serialize(input);
|
|
@@ -147,8 +147,7 @@ const Serializer = /*@__PURE__*/ (function() {
|
|
|
147
147
|
};
|
|
148
148
|
return Serializer;
|
|
149
149
|
})();
|
|
150
|
-
|
|
151
|
-
//#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/node/index.mjs
|
|
150
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/crypto/node/index.mjs
|
|
152
151
|
const fastHash = /*@__PURE__*/ (() => globalThis.process?.getBuiltinModule?.("crypto")?.hash)();
|
|
153
152
|
const algorithm = "sha256";
|
|
154
153
|
const encoding = "base64url";
|
|
@@ -157,21 +156,18 @@ function digest(data) {
|
|
|
157
156
|
const h = createHash(algorithm).update(data);
|
|
158
157
|
return globalThis.process?.versions?.webcontainer ? h.digest().toString(encoding) : h.digest(encoding);
|
|
159
158
|
}
|
|
160
|
-
|
|
161
|
-
//#region ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
|
|
159
|
+
// ../../node_modules/.pnpm/ohash@2.0.12/node_modules/ohash/dist/index.mjs
|
|
162
160
|
function hash$1(input) {
|
|
163
161
|
return digest(serialize(input));
|
|
164
162
|
}
|
|
165
|
-
|
|
166
|
-
//#region src/utils/hash.ts
|
|
163
|
+
// src/utils/hash.ts
|
|
167
164
|
/**
|
|
168
165
|
* Stable, deterministic hash of any structured-cloneable value.
|
|
169
166
|
*/
|
|
170
167
|
function hash(value) {
|
|
171
168
|
return hash$1(value);
|
|
172
169
|
}
|
|
173
|
-
|
|
174
|
-
//#region src/rpc/agent-json-serialization.ts
|
|
170
|
+
// src/rpc/agent-json-serialization.ts
|
|
175
171
|
/**
|
|
176
172
|
* Prevents using a coding-agent-exposed RPC function that is explicitly
|
|
177
173
|
* marked as non-serializable, and marks these functions as serializable by
|
|
@@ -183,8 +179,7 @@ function ensureAgentJsonSerializable(fnDef) {
|
|
|
183
179
|
if (fnDef.agent && fnDef.jsonSerializable === false) throw diagnostics.DF0019({ name: fnDef.name });
|
|
184
180
|
if (fnDef.agent && !fnDef.jsonSerializable) fnDef.jsonSerializable = true;
|
|
185
181
|
}
|
|
186
|
-
|
|
187
|
-
//#region src/rpc/validation.ts
|
|
182
|
+
// src/rpc/validation.ts
|
|
188
183
|
/**
|
|
189
184
|
* Validates RPC function definitions.
|
|
190
185
|
* Action and event functions cannot have dumps (side effects should not be cached).
|
|
@@ -212,5 +207,4 @@ function validateDefinitions(definitions) {
|
|
|
212
207
|
function validateDefinition(definition) {
|
|
213
208
|
validateDefinitions([definition]);
|
|
214
209
|
}
|
|
215
|
-
//#endregion
|
|
216
210
|
export { hash as i, validateDefinitions as n, ensureAgentJsonSerializable as r, validateDefinition as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import { n as
|
|
3
|
-
|
|
1
|
+
import { n as structuredCloneStringify, t as structuredCloneParse } from "./structured-clone-B1N_XQvA.mjs";
|
|
2
|
+
import { n as strictJsonStringify } from "./serialization-iiTQ7n21.mjs";
|
|
3
|
+
// src/rpc/wire-codec.ts
|
|
4
4
|
const EMPTY_WIRE_DEFS = /* @__PURE__ */ new Map();
|
|
5
5
|
/**
|
|
6
6
|
* Build the per-connection wire codec every live transport (WS server, WS
|
|
@@ -52,5 +52,4 @@ function peekRpcWireFrame(raw) {
|
|
|
52
52
|
return {};
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
//#endregion
|
|
56
55
|
export { peekRpcWireFrame as n, createRpcWireCodec as t };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { i as hash, n as validateDefinitions, r as ensureAgentJsonSerializable } from "./validation-
|
|
2
|
-
import { n as strictJsonStringify, r as diagnostics } from "./serialization-
|
|
3
|
-
import { t as getRpcHandler } from "./handler-
|
|
1
|
+
import { i as hash, n as validateDefinitions, r as ensureAgentJsonSerializable } from "./validation-Cjy1P58H.mjs";
|
|
2
|
+
import { n as strictJsonStringify, r as diagnostics } from "./serialization-iiTQ7n21.mjs";
|
|
3
|
+
import { t as getRpcHandler } from "./handler-DkLlj3-B.mjs";
|
|
4
4
|
import { DEVFRAME_RPC_DUMP_DIRNAME, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME } from "./constants.mjs";
|
|
5
|
-
import { n as structuredCloneStringify } from "./structured-clone-
|
|
5
|
+
import { n as structuredCloneStringify } from "./structured-clone-B1N_XQvA.mjs";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import { dirname, resolve } from "pathe";
|
|
8
|
-
|
|
8
|
+
// ../../node_modules/.pnpm/yocto-queue@1.2.2/node_modules/yocto-queue/index.js
|
|
9
9
|
var Node = class {
|
|
10
10
|
value;
|
|
11
11
|
next;
|
|
@@ -62,8 +62,7 @@ var Queue = class {
|
|
|
62
62
|
while (this.#head) yield this.dequeue();
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
//#region ../../node_modules/.pnpm/p-limit@7.3.3/node_modules/p-limit/index.js
|
|
65
|
+
// ../../node_modules/.pnpm/p-limit@7.3.3/node_modules/p-limit/index.js
|
|
67
66
|
function pLimit(concurrency) {
|
|
68
67
|
let rejectOnClear = false;
|
|
69
68
|
if (typeof concurrency === "object") ({concurrency, rejectOnClear = false} = concurrency);
|
|
@@ -141,8 +140,7 @@ function pLimit(concurrency) {
|
|
|
141
140
|
function validateConcurrency(concurrency) {
|
|
142
141
|
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
143
142
|
}
|
|
144
|
-
|
|
145
|
-
//#region src/rpc/dump/error.ts
|
|
143
|
+
// src/rpc/dump/error.ts
|
|
146
144
|
/**
|
|
147
145
|
* Normalize a thrown value into a plain object suitable for storage in
|
|
148
146
|
* a dump record. Preserves `message`, `name`, `cause`, and any own
|
|
@@ -192,8 +190,7 @@ function reviveDumpError(stored) {
|
|
|
192
190
|
function isPlainErrorShape(value) {
|
|
193
191
|
return typeof value === "object" && value !== null && typeof value.message === "string" && typeof value.name === "string";
|
|
194
192
|
}
|
|
195
|
-
|
|
196
|
-
//#region src/rpc/dump/collect.ts
|
|
193
|
+
// src/rpc/dump/collect.ts
|
|
197
194
|
function getDumpRecordKey(functionName, args) {
|
|
198
195
|
return `${functionName}---${hash(args)}`;
|
|
199
196
|
}
|
|
@@ -344,8 +341,7 @@ function createClientFromDump(store, options = {}) {
|
|
|
344
341
|
function getDefinitionsWithDumps(definitions) {
|
|
345
342
|
return definitions.filter((def) => def.dump !== void 0);
|
|
346
343
|
}
|
|
347
|
-
|
|
348
|
-
//#region src/rpc/dump/static.ts
|
|
344
|
+
// src/rpc/dump/static.ts
|
|
349
345
|
function makeDumpKey(name) {
|
|
350
346
|
return encodeURIComponent(name.replaceAll(":", "~"));
|
|
351
347
|
}
|
|
@@ -429,8 +425,7 @@ async function collectStaticRpcDump(definitions, context) {
|
|
|
429
425
|
files
|
|
430
426
|
};
|
|
431
427
|
}
|
|
432
|
-
|
|
433
|
-
//#region src/rpc/dump/write.ts
|
|
428
|
+
// src/rpc/dump/write.ts
|
|
434
429
|
/**
|
|
435
430
|
* Write a collected static RPC dump to disk: every sharded record file plus
|
|
436
431
|
* the `__rpc-dump/index.json` manifest, under `outDir`. Shared by the build
|
|
@@ -447,5 +442,4 @@ async function writeStaticRpcDump(dump, outDir, options = {}) {
|
|
|
447
442
|
}
|
|
448
443
|
await fs.writeFile(resolve(outDir, DEVFRAME_RPC_DUMP_MANIFEST_FILENAME), JSON.stringify(dump.manifest, null, 2), "utf-8");
|
|
449
444
|
}
|
|
450
|
-
//#endregion
|
|
451
445
|
export { getDefinitionsWithDumps as a, dumpFunctions as i, collectStaticRpcDump as n, reviveDumpError as o, createClientFromDump as r, serializeDumpError as s, writeStaticRpcDump as t };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as ChannelOptions } from "./index-
|
|
2
|
-
import { g as RpcFunctionDefinitionAny } from "./types-
|
|
3
|
-
//#region src/rpc/transports/ws-client.d.ts
|
|
1
|
+
import { a as ChannelOptions } from "./index-BKu9BxcT.mjs";
|
|
2
|
+
import { g as RpcFunctionDefinitionAny } from "./types-844OBepb.mjs";
|
|
4
3
|
interface WsRpcChannelOptions {
|
|
5
4
|
url: string;
|
|
6
5
|
onConnected?: (e: Event) => void;
|
|
@@ -26,5 +25,4 @@ interface WsRpcChannelOptions {
|
|
|
26
25
|
declare function createWsRpcChannel(options: WsRpcChannelOptions): ChannelOptions & {
|
|
27
26
|
close: () => void;
|
|
28
27
|
};
|
|
29
|
-
//#endregion
|
|
30
28
|
export { createWsRpcChannel as n, WsRpcChannelOptions as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as ChannelOptions, n as BirpcGroup } from "./index-
|
|
2
|
-
import { g as RpcFunctionDefinitionAny } from "./types-
|
|
3
|
-
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-
|
|
1
|
+
import { a as ChannelOptions, n as BirpcGroup } from "./index-BKu9BxcT.mjs";
|
|
2
|
+
import { g as RpcFunctionDefinitionAny } from "./types-844OBepb.mjs";
|
|
3
|
+
import { n as DevframeRpcConnection, t as DevframeNodeRpcSessionMeta } from "./session-Y9R6tqg4.mjs";
|
|
4
4
|
import { Hooks } from "crossws";
|
|
5
5
|
import { NodeAdapter } from "crossws/adapters/node";
|
|
6
6
|
import { Buffer } from "node:buffer";
|
|
@@ -8,7 +8,6 @@ import { IncomingMessage, Server } from "node:http";
|
|
|
8
8
|
import { Server as Server$1, ServerOptions } from "node:https";
|
|
9
9
|
import { AddressInfo } from "node:net";
|
|
10
10
|
import { Duplex } from "node:stream";
|
|
11
|
-
//#region src/rpc/transports/ws-server.d.ts
|
|
12
11
|
interface WsRpcTransportOptions {
|
|
13
12
|
/**
|
|
14
13
|
* Attach to an existing HTTP(S) server, sharing its port. Combine with
|
|
@@ -148,5 +147,4 @@ declare function createWsRpcPeerHooks<ClientFunctions extends object, ServerFunc
|
|
|
148
147
|
* and `close` (full deterministic teardown).
|
|
149
148
|
*/
|
|
150
149
|
declare function attachWsRpcTransport<ClientFunctions extends object, ServerFunctions extends object>(rpcGroup: BirpcGroup<ClientFunctions, ServerFunctions, false>, options?: WsRpcTransportOptions): WsRpcTransport;
|
|
151
|
-
//#endregion
|
|
152
150
|
export { attachWsRpcTransport as a, WsRpcTransportOptions as i, WsOriginRegistry as n, createWsOriginRegistry as o, WsRpcTransport as r, createWsRpcPeerHooks as s, CreateWsOriginRegistryOptions as t };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devframe",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.2",
|
|
5
5
|
"description": "Framework for building one portable devtool integration that runs in any viewer.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"skills"
|
|
78
78
|
],
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@devframes/agentic": "1.3.
|
|
80
|
+
"@devframes/agentic": "1.3.2",
|
|
81
81
|
"cac": "^7.0.0"
|
|
82
82
|
},
|
|
83
83
|
"peerDependenciesMeta": {
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"crossws": "^0.4.
|
|
93
|
-
"h3": "^2.0.
|
|
92
|
+
"crossws": "^0.4.17",
|
|
93
|
+
"h3": "^2.0.8",
|
|
94
94
|
"nostics": "^1.3.0",
|
|
95
95
|
"pathe": "^2.0.3"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@devframes/agentic": "1.3.
|
|
98
|
+
"@devframes/agentic": "1.3.2",
|
|
99
99
|
"@standard-schema/spec": "^1.1.0",
|
|
100
100
|
"birpc": "^4.2.0",
|
|
101
101
|
"cac": "^7.1.0",
|
|
102
102
|
"get-port-please": "^3.2.0",
|
|
103
|
-
"immer": "^11.2.
|
|
103
|
+
"immer": "^11.2.9",
|
|
104
104
|
"launch-editor": "^2.14.2",
|
|
105
105
|
"mlly": "^1.8.2",
|
|
106
106
|
"mrmime": "^2.0.1",
|
|
@@ -110,12 +110,12 @@
|
|
|
110
110
|
"perfect-debounce": "^2.1.0",
|
|
111
111
|
"structured-clone-es": "^2.0.1",
|
|
112
112
|
"tinyglobby": "^0.2.17",
|
|
113
|
-
"tsdown": "0.23.
|
|
113
|
+
"tsdown": "^0.23.4",
|
|
114
114
|
"typescript": "^6.0.3",
|
|
115
115
|
"ua-parser-modern": "^0.1.1",
|
|
116
116
|
"valibot": "^1.5.0",
|
|
117
117
|
"whenexpr": "^0.1.2",
|
|
118
|
-
"ws": "^8.22.
|
|
118
|
+
"ws": "^8.22.1"
|
|
119
119
|
},
|
|
120
120
|
"scripts": {
|
|
121
121
|
"build": "tsdown",
|