@devframes/hub 0.8.2 → 0.9.0-beta.10

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.
@@ -0,0 +1,11 @@
1
+ import { createDefineWrapperWithContext } from "devframe/rpc";
2
+ //#region src/define.ts
3
+ const defineHubRpcFunction = createDefineWrapperWithContext();
4
+ function defineCommand(command) {
5
+ return command;
6
+ }
7
+ function defineDockEntry(entry) {
8
+ return entry;
9
+ }
10
+ //#endregion
11
+ export { defineDockEntry as n, defineHubRpcFunction as r, defineCommand as t };
@@ -0,0 +1,221 @@
1
+ import "node:path";
2
+ import "node:fs/promises";
3
+ import { createServer } from "node:net";
4
+ import { networkInterfaces } from "node:os";
5
+ //#region ../../node_modules/.pnpm/get-port-please@3.2.0/node_modules/get-port-please/dist/index.mjs
6
+ const unsafePorts = /* @__PURE__ */ new Set([
7
+ 1,
8
+ 7,
9
+ 9,
10
+ 11,
11
+ 13,
12
+ 15,
13
+ 17,
14
+ 19,
15
+ 20,
16
+ 21,
17
+ 22,
18
+ 23,
19
+ 25,
20
+ 37,
21
+ 42,
22
+ 43,
23
+ 53,
24
+ 69,
25
+ 77,
26
+ 79,
27
+ 87,
28
+ 95,
29
+ 101,
30
+ 102,
31
+ 103,
32
+ 104,
33
+ 109,
34
+ 110,
35
+ 111,
36
+ 113,
37
+ 115,
38
+ 117,
39
+ 119,
40
+ 123,
41
+ 135,
42
+ 137,
43
+ 139,
44
+ 143,
45
+ 161,
46
+ 179,
47
+ 389,
48
+ 427,
49
+ 465,
50
+ 512,
51
+ 513,
52
+ 514,
53
+ 515,
54
+ 526,
55
+ 530,
56
+ 531,
57
+ 532,
58
+ 540,
59
+ 548,
60
+ 554,
61
+ 556,
62
+ 563,
63
+ 587,
64
+ 601,
65
+ 636,
66
+ 989,
67
+ 990,
68
+ 993,
69
+ 995,
70
+ 1719,
71
+ 1720,
72
+ 1723,
73
+ 2049,
74
+ 3659,
75
+ 4045,
76
+ 5060,
77
+ 5061,
78
+ 6e3,
79
+ 6566,
80
+ 6665,
81
+ 6666,
82
+ 6667,
83
+ 6668,
84
+ 6669,
85
+ 6697,
86
+ 10080
87
+ ]);
88
+ function isUnsafePort(port) {
89
+ return unsafePorts.has(port);
90
+ }
91
+ function isSafePort(port) {
92
+ return !isUnsafePort(port);
93
+ }
94
+ var GetPortError = class extends Error {
95
+ constructor(message, opts) {
96
+ super(message, opts);
97
+ this.message = message;
98
+ }
99
+ name = "GetPortError";
100
+ };
101
+ function _log(verbose, message) {
102
+ if (verbose) console.log(`[get-port] ${message}`);
103
+ }
104
+ function _generateRange(from, to) {
105
+ if (to < from) return [];
106
+ const r = [];
107
+ for (let index = from; index <= to; index++) r.push(index);
108
+ return r;
109
+ }
110
+ function _tryPort(port, host) {
111
+ return new Promise((resolve) => {
112
+ const server = createServer();
113
+ server.unref();
114
+ server.on("error", () => {
115
+ resolve(false);
116
+ });
117
+ server.listen({
118
+ port,
119
+ host
120
+ }, () => {
121
+ const { port: port2 } = server.address();
122
+ server.close(() => {
123
+ resolve(isSafePort(port2) && port2);
124
+ });
125
+ });
126
+ });
127
+ }
128
+ function _getLocalHosts(additional) {
129
+ const hosts = new Set(additional);
130
+ for (const _interface of Object.values(networkInterfaces())) for (const config of _interface || []) if (config.address && !config.internal && !config.address.startsWith("fe80::") && !config.address.startsWith("169.254")) hosts.add(config.address);
131
+ return [...hosts];
132
+ }
133
+ async function _findPort(ports, host) {
134
+ for (const port of ports) {
135
+ const r = await _tryPort(port, host);
136
+ if (r) return r;
137
+ }
138
+ }
139
+ function _fmtOnHost(hostname) {
140
+ return hostname ? `on host ${JSON.stringify(hostname)}` : "on any host";
141
+ }
142
+ const HOSTNAME_RE = /^(?!-)[\d.:A-Za-z-]{1,63}(?<!-)$/;
143
+ function _validateHostname(hostname, _public, verbose) {
144
+ if (hostname && !HOSTNAME_RE.test(hostname)) {
145
+ const fallbackHost = _public ? "0.0.0.0" : "127.0.0.1";
146
+ _log(verbose, `Invalid hostname: ${JSON.stringify(hostname)}. Using ${JSON.stringify(fallbackHost)} as fallback.`);
147
+ return fallbackHost;
148
+ }
149
+ return hostname;
150
+ }
151
+ async function getPort(_userOptions = {}) {
152
+ if (typeof _userOptions === "number" || typeof _userOptions === "string") _userOptions = { port: Number.parseInt(_userOptions + "") || 0 };
153
+ const _port = Number(_userOptions.port ?? process.env.PORT);
154
+ const _userSpecifiedAnyPort = Boolean(_userOptions.port || _userOptions.ports?.length || _userOptions.portRange?.length);
155
+ const options = {
156
+ random: _port === 0,
157
+ ports: [],
158
+ portRange: [],
159
+ alternativePortRange: _userSpecifiedAnyPort ? [] : [3e3, 3100],
160
+ verbose: false,
161
+ ..._userOptions,
162
+ port: _port,
163
+ host: _validateHostname(_userOptions.host ?? process.env.HOST, _userOptions.public, _userOptions.verbose)
164
+ };
165
+ if (options.random && !_userSpecifiedAnyPort) return getRandomPort(options.host);
166
+ const portsToCheck = [
167
+ options.port,
168
+ ...options.ports,
169
+ ..._generateRange(...options.portRange)
170
+ ].filter((port) => {
171
+ if (!port) return false;
172
+ if (!isSafePort(port)) {
173
+ _log(options.verbose, `Ignoring unsafe port: ${port}`);
174
+ return false;
175
+ }
176
+ return true;
177
+ });
178
+ if (portsToCheck.length === 0) portsToCheck.push(3e3);
179
+ let availablePort = await _findPort(portsToCheck, options.host);
180
+ if (!availablePort && options.alternativePortRange.length > 0) {
181
+ availablePort = await _findPort(_generateRange(...options.alternativePortRange), options.host);
182
+ if (portsToCheck.length > 0) {
183
+ let message = `Unable to find an available port (tried ${portsToCheck.join("-")} ${_fmtOnHost(options.host)}).`;
184
+ if (availablePort) message += ` Using alternative port ${availablePort}.`;
185
+ _log(options.verbose, message);
186
+ }
187
+ }
188
+ if (!availablePort && _userOptions.random !== false) {
189
+ availablePort = await getRandomPort(options.host);
190
+ if (availablePort) _log(options.verbose, `Using random port ${availablePort}`);
191
+ }
192
+ if (!availablePort) {
193
+ const triedRanges = [
194
+ options.port,
195
+ options.portRange.join("-"),
196
+ options.alternativePortRange.join("-")
197
+ ].filter(Boolean).join(", ");
198
+ throw new GetPortError(`Unable to find an available port ${_fmtOnHost(options.host)} (tried ${triedRanges})`);
199
+ }
200
+ return availablePort;
201
+ }
202
+ async function getRandomPort(host) {
203
+ const port = await checkPort(0, host);
204
+ if (port === false) throw new GetPortError(`Unable to find a random port ${_fmtOnHost(host)}`);
205
+ return port;
206
+ }
207
+ async function checkPort(port, host = process.env.HOST, verbose) {
208
+ if (!host) host = _getLocalHosts([void 0, "0.0.0.0"]);
209
+ if (!Array.isArray(host)) return _tryPort(port, host);
210
+ for (const _host of host) {
211
+ const _port = await _tryPort(port, _host);
212
+ if (_port === false) {
213
+ if (port < 1024 && verbose) _log(verbose, `Unable to listen to the privileged port ${port} ${_fmtOnHost(_host)}`);
214
+ return false;
215
+ }
216
+ if (port === 0 && _port !== 0) port = _port;
217
+ }
218
+ return port;
219
+ }
220
+ //#endregion
221
+ export { getPort };
@@ -0,0 +1,5 @@
1
+ import "./context-D5TJIHwp.mjs";
2
+ import "./settings-DfrRa9Wf.mjs";
3
+ import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
4
+ import { ConnectionMeta as ConnectionMeta$1, DevframeCapabilities, DevframeDiagnosticsHost, DevframeDiagnosticsLogger, DevframeHost as DevframeHost$1, DevframeNodeRpcSession, DevframeRpcClientFunctions, DevframeRpcServerFunctions, DevframeRpcSharedStates, DevframeViewHost, EventEmitter as EventEmitter$1, EventUnsubscribe, EventsMap, RpcBroadcastOptions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, RpcStreamingChannel, RpcStreamingChannelOptions, RpcStreamingHost } from "devframe/types";
5
+ export { RpcStreamingHost as S, RpcFunctionsHost as _, DevframeHost$1 as a, RpcStreamingChannel as b, DevframeRpcServerFunctions as c, EventEmitter$1 as d, EventUnsubscribe as f, RpcDefinitionsToFunctions as g, RpcDefinitionsFilter as h, DevframeDiagnosticsLogger as i, DevframeRpcSharedStates as l, RpcBroadcastOptions as m, DevframeCapabilities as n, DevframeNodeRpcSession as o, EventsMap as p, DevframeDiagnosticsHost as r, DevframeRpcClientFunctions as s, ConnectionMeta$1 as t, DevframeViewHost as u, RpcSharedStateGetOptions as v, RpcStreamingChannelOptions as x, RpcSharedStateHost as y };
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { A as DevframeViewLauncher, C as DevframeDocksHost, D as DevframeViewGroup, E as DevframeViewCustomRender, F as RemoteDockOptions, I as JsonRenderElement, L as JsonRenderSpec, M as FrameSubTabsConfig, N as NavTarget, O as DevframeViewIframe, P as RemoteConnectionInfo, R as JsonRenderer, S as DevframeDocksActiveState, T as DevframeViewBuiltin, _ as DevframeDockEntryBase, a as DevframeCommandEntry, b as DevframeDockEntryRegistry, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntry, h as DevframeDockEntriesGrouped, i as DevframeCommandBase, j as DevframeViewLauncherStatus, k as DevframeViewJsonRender, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryCategory, w as DevframeViewAction, x as DevframeDockUserEntry, y as DevframeDockEntryIcon } from "./settings-Byh48aCd.mjs";
2
- import { DEFAULT_CATEGORIES_ORDER } from "./constants.mjs";
3
- import { C as DevframeMessageShortcutInput, D as DevframeMessagesListDelta, E as DevframeMessagesLevelShortcuts, S as DevframeMessageLevel, T as DevframeMessagesHost, _ as DevframeMessageEntry, a as DevframeChildProcessOutput, b as DevframeMessageFilePosition, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, f as DevframeTerminalStatus, g as DevframeMessageElementPosition, h as DevframeMessageActivateAction, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, m as DevframeMessageAction, n as DevframeHubContext, o as DevframeChildProcessResult, p as DevframeTerminalsHost, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, v as DevframeMessageEntryFrom, w as DevframeMessagesClient, x as DevframeMessageHandle, y as DevframeMessageEntryInput } from "./context-BSgzLnsu.mjs";
4
- import { C as RpcStreamingChannel, E as Thenable, S as RpcSharedStateHost, T as RpcStreamingHost, _ as RpcBroadcastOptions, a as DevframeDiagnosticsLogger, b as RpcFunctionsHost, c as DevframeRpcClientFunctions, d as DevframeViewHost, f as EntriesToObject, g as PartialWithoutId, h as EventsMap, i as DevframeDiagnosticsHost, l as DevframeRpcServerFunctions, m as EventUnsubscribe, n as DevframeCapabilities, o as DevframeHost, p as EventEmitter, r as DevframeDiagnosticsDefinition, s as DevframeNodeRpcSession, t as ConnectionMeta, u as DevframeRpcSharedStates, v as RpcDefinitionsFilter, w as RpcStreamingChannelOptions, x as RpcSharedStateGetOptions, y as RpcDefinitionsToFunctions } from "./index-IzywMKfP.mjs";
1
+ import { C as DevframeMessageHandle, D as DevframeMessagesHost, E as DevframeMessagesClient, O as DevframeMessagesLevelShortcuts, S as DevframeMessageFilePosition, T as DevframeMessageShortcutInput, _ as DevframeMessageCommandAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageEntryFrom, c as DevframeChildProcessTerminalSession, d as DevframeTerminalSession, f as DevframeTerminalSessionBase, g as DevframeMessageActivateAction, h as DevframeMessageAction, k as DevframeMessagesListDelta, l as DevframePtyExecuteOptions, m as DevframeTerminalsHost, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalStatus, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyTerminalSession, v as DevframeMessageElementPosition, w as DevframeMessageLevel, x as DevframeMessageEntryInput, y as DevframeMessageEntry } from "./context-D5TJIHwp.mjs";
2
+ import { A as DevframeViewLauncher, C as DevframeDocksActiveState, D as DevframeViewCustomRender, E as DevframeViewBuiltin, F as RemoteDockOptions, M as FrameSubTabsConfig, N as NavTarget, O as DevframeViewGroup, P as RemoteConnectionInfo, S as DevframeDockUserEntry, T as DevframeViewAction, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, c as DevframeCommandShortcutOverrides, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntriesGrouped, h as DevframeDockBadgeVariant, i as DevframeCommandBase, j as DevframeViewLauncherStatus, k as DevframeViewIframe, l as DevframeCommandsHost, m as DevframeDockActivation, n as DevframeClientCommand, o as DevframeCommandHandle, p as ClientScriptEntry, r as DevframeCommandAgentOptions, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings, u as DevframeCommandsHostEvents, v as DevframeDockEntryBase, w as DevframeDocksHost, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "./settings-DfrRa9Wf.mjs";
3
+ import { S as RpcStreamingHost, _ as RpcFunctionsHost, a as DevframeHost, b as RpcStreamingChannel, c as DevframeRpcServerFunctions, d as EventEmitter, f as EventUnsubscribe, g as RpcDefinitionsToFunctions, h as RpcDefinitionsFilter, i as DevframeDiagnosticsLogger, l as DevframeRpcSharedStates, m as RpcBroadcastOptions, n as DevframeCapabilities, o as DevframeNodeRpcSession, p as EventsMap, r as DevframeDiagnosticsHost, s as DevframeRpcClientFunctions, t as ConnectionMeta, u as DevframeViewHost, v as RpcSharedStateGetOptions, x as RpcStreamingChannelOptions, y as RpcSharedStateHost } from "./index-coDmWngQ.mjs";
5
4
  import { WhenContext, WhenExpression } from "devframe/utils/when";
6
5
  //#region src/define.d.ts
7
6
  declare const defineHubRpcFunction: <NAME extends string, TYPE extends import("devframe/rpc").RpcFunctionType, ARGS extends any[], RETURN = void, const AS extends import("devframe/rpc").RpcArgsSchema | undefined = undefined, const RS extends import("devframe/rpc").RpcReturnSchema | undefined = undefined>(definition: import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>) => import("devframe/rpc").RpcFunctionDefinition<NAME, TYPE, ARGS, RETURN, AS, RS, DevframeHubContext>;
@@ -12,13 +11,5 @@ declare function defineDockEntry<const T extends DevframeDockUserEntry, const W
12
11
  when?: WhenExpression<WhenContext, W>;
13
12
  visibility?: WhenExpression<WhenContext, V>;
14
13
  }): T;
15
- /**
16
- * @deprecated json-render moved out of the hub into the opt-in
17
- * `@devframes/json-render` integration in 0.7. This identity helper is kept
18
- * so existing imports keep compiling — pass your spec directly to
19
- * `createJsonRenderView` (from `@devframes/json-render/node`) instead.
20
- * Removed in 0.8.
21
- */
22
- declare function defineJsonRenderSpec(spec: JsonRenderSpec): JsonRenderSpec;
23
14
  //#endregion
24
- export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, DEFAULT_CATEGORIES_ORDER, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandAgentOptions, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsDefinition, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockEntryRegistry, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageAction, type DevframeMessageActivateAction, type DevframeMessageElementPosition, type DevframeMessageEntry, type DevframeMessageEntryFrom, type DevframeMessageEntryInput, type DevframeMessageFilePosition, type DevframeMessageHandle, type DevframeMessageLevel, type DevframeMessageShortcutInput, type DevframeMessagesClient, type DevframeMessagesHost, type DevframeMessagesLevelShortcuts, type DevframeMessagesListDelta, type DevframeNodeRpcSession, type DevframePtyExecuteOptions, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewJsonRender, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EntriesToObject, type EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type JsonRenderElement, type JsonRenderSpec, type JsonRenderer, type NavTarget, type PartialWithoutId, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, type Thenable, defineCommand, defineDockEntry, defineHubRpcFunction, defineJsonRenderSpec };
15
+ export { type ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, type DevframeChildProcessExecuteOptions, type DevframeChildProcessOutput, type DevframeChildProcessResult, type DevframeChildProcessTerminalSession, type DevframeClientCommand, type DevframeCommandAgentOptions, type DevframeCommandBase, type DevframeCommandEntry, type DevframeCommandHandle, type DevframeCommandKeybinding, type DevframeCommandShortcutOverrides, type DevframeCommandsHost, type DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, type DevframeDockActivation, type DevframeDockBadgeVariant, type DevframeDockEntriesGrouped, type DevframeDockEntry, type DevframeDockEntryBase, type DevframeDockEntryCategory, type DevframeDockEntryIcon, type DevframeDockEntryRegistry, type DevframeDockUserEntry, type DevframeDocksActiveState, type DevframeDocksHost, type DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, type DevframeMessageAction, type DevframeMessageActivateAction, type DevframeMessageCommandAction, type DevframeMessageElementPosition, type DevframeMessageEntry, type DevframeMessageEntryFrom, type DevframeMessageEntryInput, type DevframeMessageFilePosition, type DevframeMessageHandle, type DevframeMessageLevel, type DevframeMessageShortcutInput, type DevframeMessagesClient, type DevframeMessagesHost, type DevframeMessagesLevelShortcuts, type DevframeMessagesListDelta, type DevframeNodeRpcSession, type DevframePtyExecuteOptions, type DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, type DevframeServerCommandEntry, type DevframeServerCommandInput, type DevframeTerminalSession, type DevframeTerminalSessionBase, type DevframeTerminalStatus, type DevframeTerminalsHost, type DevframeViewAction, type DevframeViewBuiltin, type DevframeViewCustomRender, type DevframeViewGroup, type DevframeViewHost, type DevframeViewIframe, type DevframeViewLauncher, type DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, type FrameSubTabsConfig, type NavTarget, type RemoteConnectionInfo, type RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost, defineCommand, defineDockEntry, defineHubRpcFunction };
package/dist/index.mjs CHANGED
@@ -1,3 +1,2 @@
1
- import { DEFAULT_CATEGORIES_ORDER } from "./constants.mjs";
2
- import { i as defineJsonRenderSpec, n as defineDockEntry, r as defineHubRpcFunction, t as defineCommand } from "./define-Pbx8dsKz.mjs";
3
- export { DEFAULT_CATEGORIES_ORDER, defineCommand, defineDockEntry, defineHubRpcFunction, defineJsonRenderSpec };
1
+ import { n as defineDockEntry, r as defineHubRpcFunction, t as defineCommand } from "./define-Ceekw2EO.mjs";
2
+ export { defineCommand, defineDockEntry, defineHubRpcFunction };
@@ -1,8 +1,6 @@
1
- import { C as DevframeDocksHost$1, O as DevframeViewIframe, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, g as DevframeDockEntry, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings, x as DevframeDockUserEntry } from "../settings-Byh48aCd.mjs";
2
- import { DEFAULT_CATEGORIES_ORDER } from "../constants.mjs";
3
- import { C as DevframeMessageShortcutInput, D as DevframeMessagesListDelta, T as DevframeMessagesHost$1, _ as DevframeMessageEntry, c as DevframePtyExecuteOptions, d as DevframeTerminalSessionBase, i as DevframeChildProcessExecuteOptions, l as DevframePtyTerminalSession, n as DevframeHubContext, p as DevframeTerminalsHost$1, r as createHubContext, s as DevframeChildProcessTerminalSession, t as CreateHubContextOptions, u as DevframeTerminalSession, x as DevframeMessageHandle, y as DevframeMessageEntryInput } from "../context-BSgzLnsu.mjs";
1
+ import { C as DevframeMessageHandle, D as DevframeMessagesHost$1, T as DevframeMessageShortcutInput, a as DevframeChildProcessExecuteOptions, c as DevframeChildProcessTerminalSession, d as DevframeTerminalSession, f as DevframeTerminalSessionBase, i as InstallDevframeOptions, k as DevframeMessagesListDelta, l as DevframePtyExecuteOptions, m as DevframeTerminalsHost$1, n as DevframeHubContext, r as createHubContext, t as CreateHubContextOptions, u as DevframePtyTerminalSession, x as DevframeMessageEntryInput, y as DevframeMessageEntry } from "../context-D5TJIHwp.mjs";
2
+ import { S as DevframeDockUserEntry, _ as DevframeDockEntry, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings, w as DevframeDocksHost$1 } from "../settings-DfrRa9Wf.mjs";
4
3
  import { RpcFunctionDefinitionAny } from "devframe/rpc";
5
- import { DevframeDefinition } from "devframe/types";
6
4
  import { SharedState } from "devframe/utils/shared-state";
7
5
  //#region src/node/host-commands.d.ts
8
6
  declare class DevframeCommandsHost implements DevframeCommandsHost$1 {
@@ -120,34 +118,6 @@ declare class DevframeTerminalsHost implements DevframeTerminalsHost$1 {
120
118
  startPtySession(executeOptions: DevframePtyExecuteOptions, terminal: Omit<DevframeTerminalSessionBase, 'status'>): Promise<DevframePtyTerminalSession>;
121
119
  }
122
120
  //#endregion
123
- //#region src/node/mount-devframe.d.ts
124
- interface MountDevframeOptions {
125
- /**
126
- * Mount path override. Defaults to `d.basePath` or `/__${d.id}/`.
127
- */
128
- base?: string;
129
- /**
130
- * Per-mount overrides for the auto-synthesized iframe dock entry. Use
131
- * this to customize the entry's `category`, override the icon, hide it
132
- * via `when` (or only its dock-bar button via `visibility`), etc. Takes
133
- * precedence over the definition's own {@link DevframeDefinition.dock}
134
- * defaults. Cannot change `id`, `type`, or `url` — those are derived from
135
- * the devframe definition.
136
- */
137
- dock?: Partial<Omit<DevframeViewIframe, 'id' | 'type' | 'url'>>;
138
- }
139
- /**
140
- * Framework-neutral primitive — mounts a {@link DevframeDefinition} as a
141
- * dock inside a hub-aware context: serves the devframe's SPA at the
142
- * resolved base path, synthesizes an iframe dock entry from the
143
- * definition's metadata, and runs the definition's `setup(ctx)`.
144
- *
145
- * Framework kits wrap this with their own plugin/middleware machinery —
146
- * e.g. `@vitejs/devtools-kit`'s `createPluginFromDevframe` returns a
147
- * Vite `Plugin` whose `devtools.setup` ultimately delegates here.
148
- */
149
- declare function mountDevframe(ctx: DevframeHubContext, d: DevframeDefinition, options?: MountDevframeOptions): Promise<void>;
150
- //#endregion
151
121
  //#region src/node/rpc-builtins.d.ts
152
122
  /**
153
123
  * `hub:commands:execute` — Invoke a registered server command by id. The
@@ -401,4 +371,4 @@ declare const builtinHubRpcDeclarations: readonly RpcFunctionDefinitionAny[];
401
371
  */
402
372
  declare function createSimpleClientScript(fn: string | ((ctx: any) => void)): ClientScriptEntry;
403
373
  //#endregion
404
- export { CreateHubContextOptions, DEFAULT_CATEGORIES_ORDER, DevframeCommandsHost, DevframeDocksHost, DevframeHubContext, DevframeMessagesHost, DevframeTerminalsHost, MountDevframeOptions, builtinHubRpcDeclarations, createHubContext, createSimpleClientScript, hubCommandsExecute, hubDocksActivate, hubMessagesAdd, hubMessagesClear, hubMessagesRemove, hubMessagesUpdate, hubTerminalsRemove, hubTerminalsResize, hubTerminalsRestart, hubTerminalsTerminate, hubTerminalsWrite, mountDevframe };
374
+ export { CreateHubContextOptions, DevframeCommandsHost, DevframeDocksHost, DevframeHubContext, DevframeMessagesHost, DevframeTerminalsHost, type InstallDevframeOptions, builtinHubRpcDeclarations, createHubContext, createSimpleClientScript, hubCommandsExecute, hubDocksActivate, hubMessagesAdd, hubMessagesClear, hubMessagesRemove, hubMessagesUpdate, hubTerminalsRemove, hubTerminalsResize, hubTerminalsRestart, hubTerminalsTerminate, hubTerminalsWrite };