devframe 0.5.4 → 0.6.0-beta.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-CUFqO4kJ.mjs → _shared-bWRzeSa0.mjs} +2 -3
- package/dist/adapters/build.d.mts +1 -1
- package/dist/adapters/build.mjs +7 -7
- package/dist/adapters/cli.d.mts +1 -1
- package/dist/adapters/cli.mjs +2 -2
- package/dist/adapters/dev.d.mts +8 -2
- package/dist/adapters/dev.mjs +1 -1
- package/dist/adapters/embedded.d.mts +1 -1
- package/dist/adapters/mcp.d.mts +1 -1
- package/dist/adapters/mcp.mjs +4 -4
- package/dist/client/index.d.mts +148 -6
- package/dist/client/index.mjs +257 -44
- package/dist/constants.d.mts +17 -1
- package/dist/constants.mjs +17 -1
- package/dist/context-3x_bgBgZ.mjs +48 -0
- package/dist/{context-DTRcO_UH.d.mts → context-BEVByy_Z.d.mts} +1 -1
- package/dist/{dev-Cv43GfqM.mjs → dev-BaX8fLH2.mjs} +39 -13
- package/dist/{devframe-BuR6n9ZD.d.mts → devframe-D-gr9sBx.d.mts} +365 -15
- package/dist/{diagnostics-GitRGKbr.mjs → diagnostics-BXwBQmoN.mjs} +1 -1
- package/dist/{dump-9lKIJTLh.mjs → dump-DoXkj4ku.mjs} +1 -1
- package/dist/helpers/vite.d.mts +1 -1
- package/dist/helpers/vite.mjs +11 -11
- package/dist/{host-h3-Dgpgr1Ul.mjs → host-h3-C5SZlk03.mjs} +134 -6
- package/dist/{index-C7M1hnvL.d.mts → index-CxaPKDXX.d.mts} +2 -2
- package/dist/{index-DH2sBIwd.d.mts → index-DXHWuwJk.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/{launch-editor-BbNhtg7b.mjs → launch-editor-DPfltGA4.mjs} +88 -13
- package/dist/node/auth.d.mts +43 -23
- package/dist/node/auth.mjs +84 -37
- package/dist/node/hub-internals.d.mts +2 -2
- package/dist/node/hub-internals.mjs +2 -2
- package/dist/node/index.d.mts +22 -6
- package/dist/node/index.mjs +4 -4
- package/dist/recipes/open-helpers.d.mts +1 -1
- package/dist/recipes/open-helpers.mjs +3 -3
- package/dist/revoke-ENfxWkFK.mjs +79 -0
- package/dist/rpc/dump.d.mts +1 -1
- package/dist/rpc/dump.mjs +1 -1
- package/dist/rpc/index.d.mts +3 -3
- package/dist/rpc/index.mjs +4 -4
- package/dist/rpc/transports/ws-client.d.mts +1 -1
- package/dist/rpc/transports/ws-client.mjs +2 -2
- package/dist/rpc/transports/ws-server.d.mts +2 -2
- package/dist/rpc/transports/ws-server.mjs +154 -61
- package/dist/{serialization-BD_qXGjd.mjs → serialization-DpLXCy13.mjs} +1 -1
- package/dist/{server-BBaBJaUL.mjs → server-Dl6TU5LE.mjs} +19 -14
- package/dist/server-rX781kz-.d.mts +90 -0
- package/dist/{shared-state-u0y123fi.mjs → shared-state-D4PPieA0.mjs} +4 -4
- package/dist/{shared-state-BlBNYziY.mjs → storage-l2ezeend.mjs} +128 -6
- package/dist/types/index.d.mts +4 -4
- package/dist/{types-BkkQ0Txg.d.mts → types-DZEx4ffs.d.mts} +9 -1
- package/dist/utils/crypto-token.d.mts +24 -0
- package/dist/utils/crypto-token.mjs +45 -0
- package/dist/utils/events.d.mts +1 -1
- package/dist/utils/hash.mjs +1 -1
- package/dist/utils/launch-editor.mjs +1 -1
- package/dist/utils/open.mjs +1 -1
- package/dist/utils/scope.d.mts +11 -0
- package/dist/utils/scope.mjs +15 -0
- package/dist/utils/shared-state.d.mts +1 -1
- package/dist/utils/shared-state.mjs +1 -1
- package/dist/utils/streaming-channel.d.mts +1 -1
- package/dist/utils/structured-clone.mjs +1 -1
- package/dist/{ws-client-CVYX9niP.d.mts → ws-client-D0z0pOhn.d.mts} +1 -1
- package/dist/ws-server-Bc2wBHl-.d.mts +119 -0
- package/package.json +12 -7
- package/skills/devframe/SKILL.md +123 -23
- package/skills/devframe/templates/counter-devframe.ts +14 -4
- package/skills/devframe/templates/spa-devframe.ts +13 -3
- package/skills/devframe/templates/vite-client.ts +3 -2
- package/dist/context-DaKmhhHY.mjs +0 -164
- package/dist/revoke-CL0LSAN9.mjs +0 -803
- package/dist/server-wHlpcdZ9.d.mts +0 -55
- package/dist/utils/human-id.d.mts +0 -8
- package/dist/utils/human-id.mjs +0 -769
- package/dist/ws-server-C1LjmRnp.d.mts +0 -61
- /package/dist/{define-CW9gLnyG.mjs → define-BLWPsH6y.mjs} +0 -0
- /package/dist/{diagnostics-reporter-CBBZwoMv.mjs → diagnostics-reporter-CsIG85Q5.mjs} +0 -0
- /package/dist/{hash-bwOD8RgU.mjs → hash-DFc5WwhO.mjs} +0 -0
- /package/dist/{open-DiQn6zCH.mjs → open-Dusa2Zzd.mjs} +0 -0
- /package/dist/{structured-clone-PdCZwt7F.mjs → structured-clone-CeZOHvkd.mjs} +0 -0
- /package/dist/{structured-clone-jegjz0hM.mjs → structured-clone-XpHLZ8nr.mjs} +0 -0
- /package/dist/{transports-DTFoMUbE.mjs → transports-BmDVn4SF.mjs} +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { _ as RpcFunctionDefinitionAny } from "./types-BkkQ0Txg.mjs";
|
|
2
|
-
import { BirpcGroup, ChannelOptions } from "birpc";
|
|
3
|
-
import { IncomingMessage } from "node:http";
|
|
4
|
-
import { ServerOptions } from "node:https";
|
|
5
|
-
import { WebSocket, WebSocketServer } from "ws";
|
|
6
|
-
|
|
7
|
-
//#region src/rpc/transports/ws-server.d.ts
|
|
8
|
-
interface DevframeNodeRpcSessionMeta {
|
|
9
|
-
id: number;
|
|
10
|
-
ws?: WebSocket;
|
|
11
|
-
clientAuthToken?: string;
|
|
12
|
-
isTrusted?: boolean;
|
|
13
|
-
subscribedStates: Set<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Streams this session has subscribed to via
|
|
16
|
-
* `rpc.streaming.subscribe(channel, id)`. Tracked here for O(1) cleanup
|
|
17
|
-
* on disconnect; the wire format is `${channel}\x1F${id}`.
|
|
18
|
-
*/
|
|
19
|
-
subscribedStreams?: Set<string>;
|
|
20
|
-
/**
|
|
21
|
-
* Inbound streams this session is currently uploading to (via
|
|
22
|
-
* `rpc.streaming.upload(channel, id)`). Tracked for cleanup on
|
|
23
|
-
* disconnect; same wire format as `subscribedStreams`.
|
|
24
|
-
*/
|
|
25
|
-
uploadingStreams?: Set<string>;
|
|
26
|
-
}
|
|
27
|
-
interface WsRpcTransportOptions {
|
|
28
|
-
/** Attach to an existing WebSocketServer. When provided, `port`, `host`, and `https` are ignored. */
|
|
29
|
-
wss?: WebSocketServer;
|
|
30
|
-
/** Port for a newly-created WebSocketServer. */
|
|
31
|
-
port?: number;
|
|
32
|
-
/** Host for a newly-created WebSocketServer. Defaults to `localhost`. */
|
|
33
|
-
host?: string;
|
|
34
|
-
/** When set, a new https.Server is created and the WebSocketServer is attached to it. */
|
|
35
|
-
https?: ServerOptions;
|
|
36
|
-
/**
|
|
37
|
-
* RPC function definitions, used by the per-call wire serializer to
|
|
38
|
-
* dispatch between strict-JSON and structured-clone encoding based
|
|
39
|
-
* on each function's `jsonSerializable` flag.
|
|
40
|
-
*
|
|
41
|
-
* When omitted, all messages fall back to structured-clone — safe but
|
|
42
|
-
* loses dev-time validation for `jsonSerializable: true` declarations.
|
|
43
|
-
*/
|
|
44
|
-
definitions?: ReadonlyMap<string, Pick<RpcFunctionDefinitionAny, 'jsonSerializable'>>;
|
|
45
|
-
onConnected?: (ws: WebSocket, req: IncomingMessage, meta: DevframeNodeRpcSessionMeta) => void;
|
|
46
|
-
onDisconnected?: (ws: WebSocket, meta: DevframeNodeRpcSessionMeta) => void;
|
|
47
|
-
/** Override the default per-call serializer. Most callers should leave this unset. */
|
|
48
|
-
serialize?: ChannelOptions['serialize'];
|
|
49
|
-
/** Override the default per-call deserializer. Most callers should leave this unset. */
|
|
50
|
-
deserialize?: ChannelOptions['deserialize'];
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Attach a WebSocket transport to an existing RPC group. Either pass an
|
|
54
|
-
* existing `WebSocketServer` via `wss`, or let this helper create one from
|
|
55
|
-
* `port` / `host` / `https`.
|
|
56
|
-
*/
|
|
57
|
-
declare function attachWsRpcTransport<ClientFunctions extends object, ServerFunctions extends object>(rpcGroup: BirpcGroup<ClientFunctions, ServerFunctions, false>, options?: WsRpcTransportOptions): {
|
|
58
|
-
wss: WebSocketServer;
|
|
59
|
-
};
|
|
60
|
-
//#endregion
|
|
61
|
-
export { WsRpcTransportOptions as n, attachWsRpcTransport as r, DevframeNodeRpcSessionMeta as t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|