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,55 +0,0 @@
|
|
|
1
|
-
import { U as DevframeRpcClientFunctions, W as DevframeRpcServerFunctions, d as DevframeNodeContext } from "./devframe-BuR6n9ZD.mjs";
|
|
2
|
-
import { BirpcGroup } from "birpc";
|
|
3
|
-
import { WebSocketServer } from "ws";
|
|
4
|
-
import { H3 } from "h3";
|
|
5
|
-
|
|
6
|
-
//#region src/node/server.d.ts
|
|
7
|
-
interface StartHttpAndWsOptions {
|
|
8
|
-
context: DevframeNodeContext;
|
|
9
|
-
host?: string;
|
|
10
|
-
port: number;
|
|
11
|
-
/**
|
|
12
|
-
* Optional h3 app to mount on. When omitted a fresh one is created;
|
|
13
|
-
* when provided, callers can add their own routes (static handlers,
|
|
14
|
-
* auth middleware, etc.) first.
|
|
15
|
-
*/
|
|
16
|
-
app?: H3;
|
|
17
|
-
/**
|
|
18
|
-
* When `false`, the RPC server is started without a trust handshake.
|
|
19
|
-
* Intended for single-user localhost tools where an auth round-trip
|
|
20
|
-
* would only get in the way. The Vite-flavoured auth layer in
|
|
21
|
-
* `@vitejs/devtools` already honors the equivalent
|
|
22
|
-
* `devtools.clientAuth` setting; devframe records the intent here so
|
|
23
|
-
* future auth plumbing can consult it without another API change.
|
|
24
|
-
*
|
|
25
|
-
* Default: `true`.
|
|
26
|
-
*/
|
|
27
|
-
auth?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Called once the WS server is bound so callers can mount static
|
|
30
|
-
* handlers whose origin depends on the resolved port, or print their
|
|
31
|
-
* own startup banner. Devframe does not print one itself.
|
|
32
|
-
*/
|
|
33
|
-
onReady?: (info: {
|
|
34
|
-
origin: string;
|
|
35
|
-
port: number;
|
|
36
|
-
app: H3;
|
|
37
|
-
}) => void | Promise<void>;
|
|
38
|
-
}
|
|
39
|
-
interface StartedServer {
|
|
40
|
-
/** Listening origin, e.g. `http://localhost:9999`. */
|
|
41
|
-
origin: string;
|
|
42
|
-
port: number;
|
|
43
|
-
app: H3;
|
|
44
|
-
wss: WebSocketServer;
|
|
45
|
-
rpcGroup: BirpcGroup<DevframeRpcClientFunctions, DevframeRpcServerFunctions, false>;
|
|
46
|
-
close: () => Promise<void>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Compose an h3 + WebSocket server for a devframe context. The RPC
|
|
50
|
-
* group is bound to `context.rpc.functions`; the WS endpoint lives on
|
|
51
|
-
* the same port as the HTTP server.
|
|
52
|
-
*/
|
|
53
|
-
declare function startHttpAndWs(options: StartHttpAndWsOptions): Promise<StartedServer>;
|
|
54
|
-
//#endregion
|
|
55
|
-
export { StartedServer as n, startHttpAndWs as r, StartHttpAndWsOptions as t };
|