@devframes/hub 0.9.7 → 0.9.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/client/index.d.mts +11 -4
- package/dist/client/index.mjs +42 -3
- package/dist/{constants-DrF61GFx.mjs → constants-D1zicoJ4.mjs} +5 -4
- package/dist/{constants-C5t0DeZ0.d.mts → constants-DJrPlLi0.d.mts} +8 -5
- package/dist/constants.d.mts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{context-D5JSW_X5.d.mts → context-BJFGlcf8.d.mts} +24 -2
- package/dist/{context-C3hUUCC1.mjs → context-DYUkd3il.mjs} +94 -17
- package/dist/{index-DhxIxS-Q.d.mts → index-OpSX0dK5.d.mts} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.mjs +2 -2
- package/dist/node/initiate.d.mts +2 -2
- package/dist/node/initiate.mjs +2 -2
- package/dist/{settings-D7whfcx2.d.mts → settings-DwxCyeI6.d.mts} +6 -1
- package/dist/types/index.d.mts +4 -4
- package/package.json +6 -6
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../index-
|
|
1
|
+
import { C as DevframeMessageEntryInput, O as DevframeMessagesClient } from "../context-BJFGlcf8.mjs";
|
|
2
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, F as RemoteConnectionInfo, P as NavTarget, S as DevframeDockPanelState, _ as DevframeDockEntry, a as DevframeCommandEntry, b as DevframeDockEntryIcon, g as DevframeDockEntriesGrouped, n as DevframeClientCommand, p as ClientScriptEntry, s as DevframeCommandKeybinding, t as DevframeDocksUserSettings } from "../settings-DwxCyeI6.mjs";
|
|
3
|
+
import "../index-OpSX0dK5.mjs";
|
|
4
4
|
import { DevframeClientRpcHost, DevframeConnection, DevframeConnectionStatus, DevframeRpcClient, DevframeRpcClientOptions, DevframeRpcContext, RpcClientEvents, RpcClientEvents as RpcClientEvents$1 } from "devframe/client";
|
|
5
5
|
import { EventEmitter } from "devframe/types";
|
|
6
6
|
import { SharedState } from "devframe/utils/shared-state";
|
|
@@ -260,7 +260,14 @@ interface WhenClauseContext {
|
|
|
260
260
|
readonly context: WhenContext;
|
|
261
261
|
}
|
|
262
262
|
type DevframeClientContext = DocksContext;
|
|
263
|
+
interface DocksPanelEvents {
|
|
264
|
+
'panel:state:changed': (panelState: DevframeDockPanelState) => void;
|
|
265
|
+
}
|
|
263
266
|
interface DocksPanelContext {
|
|
267
|
+
/** The current panel state snapshot. */
|
|
268
|
+
readonly state: DevframeDockPanelState;
|
|
269
|
+
/** Subscribe to panel state changes after the current snapshot. */
|
|
270
|
+
readonly events: EventEmitter<DocksPanelEvents>;
|
|
264
271
|
store: DockPanelStorage;
|
|
265
272
|
/**
|
|
266
273
|
* Per-tab session UI state — whether the panel is open, which dock is
|
|
@@ -758,4 +765,4 @@ declare function parseRemoteConnection(input?: string): RemoteConnectionInfo | n
|
|
|
758
765
|
*/
|
|
759
766
|
declare function connectRemoteDevframe(options?: ConnectRemoteDevframeOptions): Promise<DevframeRpcClient>;
|
|
760
767
|
//#endregion
|
|
761
|
-
export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, CreateDockRenderersContextOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DevframeClientRuntime, DevframeClientRuntimeOptions, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererManifest, DockRendererMountOptions, DockRendererMountResult, DockRenderersContext, DockSessionStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameLocationHistory, FrameLocationTarget, FrameLocationWindow, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WatchFrameLocationOptions, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientHost, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
|
|
768
|
+
export { CLIENT_CONTEXT_KEY, CommandsContext, ConnectRemoteDevframeOptions, CreateDockRenderersContextOptions, DevframeClientContext, DevframeClientHost, DevframeClientHostOptions, type DevframeClientRpcHost, DevframeClientRuntime, DevframeClientRuntimeOptions, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DockRegistration, DockRenderer, DockRendererInstance, DockRendererManifest, DockRendererMountOptions, DockRendererMountResult, DockRenderersContext, DockSessionStorage, DocksConnectionContext, DocksContext, DocksEntriesContext, DocksPanelContext, DocksPanelEvents, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, FrameLocationHistory, FrameLocationTarget, FrameLocationWindow, FrameNavClient, FrameNavClientOptions, FrameNavEnvelope, FrameNavFrameMessage, FrameNavHostMessage, FrameNavHostPayload, FrameNavListenTarget, FrameTab, MessagesClientOptions, type RpcClientEvents, WatchFrameLocationOptions, WhenClauseContext, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientHost, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, t as DEFAULT_CATEGORIES_ORDER } from "../constants-
|
|
1
|
+
import { i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, t as DEFAULT_CATEGORIES_ORDER } from "../constants-D1zicoJ4.mjs";
|
|
2
2
|
import { a as resolveClientModuleSpecifier, n as stripRemoteConnectionFromUrl, r as clientScriptFailureHint, t as buildRemoteConnectionUrl } from "../remote-url-Bgc7gtsP.mjs";
|
|
3
3
|
import { REMOTE_CONNECTION_KEY } from "devframe/constants";
|
|
4
4
|
import { connectDevframe, getDevframeRpcClient, resolveWsUrl } from "devframe/client";
|
|
@@ -833,11 +833,50 @@ function createPanelContext(clientType) {
|
|
|
833
833
|
position: "right",
|
|
834
834
|
inactiveTimeout: 0
|
|
835
835
|
};
|
|
836
|
+
let open = clientType === "standalone";
|
|
837
|
+
let selectedDockId = null;
|
|
838
|
+
const events = createEventEmitter();
|
|
839
|
+
let panelStateChangePending = false;
|
|
840
|
+
function createDockPanelState() {
|
|
841
|
+
const panelState = { state: open ? "open" : "closed" };
|
|
842
|
+
if (selectedDockId !== null) panelState.selectedDockId = selectedDockId;
|
|
843
|
+
return panelState;
|
|
844
|
+
}
|
|
845
|
+
let previousPanelState = createDockPanelState();
|
|
846
|
+
function schedulePanelStateChange() {
|
|
847
|
+
if (panelStateChangePending) return;
|
|
848
|
+
panelStateChangePending = true;
|
|
849
|
+
queueMicrotask(() => {
|
|
850
|
+
panelStateChangePending = false;
|
|
851
|
+
const panelState = createDockPanelState();
|
|
852
|
+
if (panelState.state === previousPanelState.state && panelState.selectedDockId === previousPanelState.selectedDockId) return;
|
|
853
|
+
previousPanelState = panelState;
|
|
854
|
+
events.emit(HUB_EVENTS.client.docksPanelStateChanged, panelState);
|
|
855
|
+
});
|
|
856
|
+
}
|
|
836
857
|
return {
|
|
858
|
+
get state() {
|
|
859
|
+
return createDockPanelState();
|
|
860
|
+
},
|
|
861
|
+
events,
|
|
837
862
|
store,
|
|
838
863
|
session: {
|
|
839
|
-
open
|
|
840
|
-
|
|
864
|
+
get open() {
|
|
865
|
+
return open;
|
|
866
|
+
},
|
|
867
|
+
set open(nextOpen) {
|
|
868
|
+
if (nextOpen === open) return;
|
|
869
|
+
open = nextOpen;
|
|
870
|
+
schedulePanelStateChange();
|
|
871
|
+
},
|
|
872
|
+
get selectedDockId() {
|
|
873
|
+
return selectedDockId;
|
|
874
|
+
},
|
|
875
|
+
set selectedDockId(nextSelectedDockId) {
|
|
876
|
+
if (nextSelectedDockId === selectedDockId) return;
|
|
877
|
+
selectedDockId = nextSelectedDockId;
|
|
878
|
+
schedulePanelStateChange();
|
|
879
|
+
},
|
|
841
880
|
selectedDockRoute: null
|
|
842
881
|
},
|
|
843
882
|
isDragging: false,
|
|
@@ -11,10 +11,9 @@ import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash } from "ufo";
|
|
|
11
11
|
* both places in the same change, and reference `HUB_EVENTS.*` from call sites
|
|
12
12
|
* instead of re-typing a literal.
|
|
13
13
|
*
|
|
14
|
-
* The `.events` EventEmitter maps
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* declarations mirror this map and move with it.
|
|
14
|
+
* The `.events` EventEmitter maps and RPC augmentation interfaces declare these
|
|
15
|
+
* same names as type-level keys (a literal is unavoidable in a type position);
|
|
16
|
+
* those declarations mirror this map and move with it.
|
|
18
17
|
*/
|
|
19
18
|
const HUB_EVENTS = {
|
|
20
19
|
/**
|
|
@@ -47,6 +46,8 @@ const HUB_EVENTS = {
|
|
|
47
46
|
terminalsRestart: "hub:terminals:restart",
|
|
48
47
|
terminalsRemove: "hub:terminals:remove"
|
|
49
48
|
},
|
|
49
|
+
/** Client-context events emitted inside the host page. */
|
|
50
|
+
client: { docksPanelStateChanged: "panel:state:changed" },
|
|
50
51
|
/** Broadcast notifications the server pushes to clients (server → client), `devframe:` prefix. */
|
|
51
52
|
broadcast: {
|
|
52
53
|
docksActivate: "devframe:docks:activate",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as DevframeDocksUserSettings } from "./settings-
|
|
1
|
+
import { t as DevframeDocksUserSettings } from "./settings-DwxCyeI6.mjs";
|
|
2
2
|
//#region src/events.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* Centralized registry of every event, broadcast, RPC method, shared-state
|
|
@@ -11,10 +11,9 @@ import { t as DevframeDocksUserSettings } from "./settings-D7whfcx2.mjs";
|
|
|
11
11
|
* both places in the same change, and reference `HUB_EVENTS.*` from call sites
|
|
12
12
|
* instead of re-typing a literal.
|
|
13
13
|
*
|
|
14
|
-
* The `.events` EventEmitter maps
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* declarations mirror this map and move with it.
|
|
14
|
+
* The `.events` EventEmitter maps and RPC augmentation interfaces declare these
|
|
15
|
+
* same names as type-level keys (a literal is unavoidable in a type position);
|
|
16
|
+
* those declarations mirror this map and move with it.
|
|
18
17
|
*/
|
|
19
18
|
declare const HUB_EVENTS: {
|
|
20
19
|
/**
|
|
@@ -47,6 +46,10 @@ declare const HUB_EVENTS: {
|
|
|
47
46
|
readonly terminalsRestart: "hub:terminals:restart";
|
|
48
47
|
readonly terminalsRemove: "hub:terminals:remove";
|
|
49
48
|
};
|
|
49
|
+
/** Client-context events emitted inside the host page. */
|
|
50
|
+
readonly client: {
|
|
51
|
+
readonly docksPanelStateChanged: "panel:state:changed";
|
|
52
|
+
};
|
|
50
53
|
/** Broadcast notifications the server pushes to clients (server → client), `devframe:` prefix. */
|
|
51
54
|
readonly broadcast: {
|
|
52
55
|
readonly docksActivate: "devframe:docks:activate";
|
package/dist/constants.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-
|
|
1
|
+
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-DJrPlLi0.mjs";
|
|
2
2
|
export * from "devframe/constants";
|
|
3
3
|
export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DEVFRAMES_HUB_BASE, DOCK_RENDERERS_STATE_KEY, HUB_EVENTS, normalizeHubBase };
|
package/dist/constants.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-
|
|
1
|
+
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS, r as DEVFRAMES_HUB_BASE, t as DEFAULT_CATEGORIES_ORDER } from "./constants-D1zicoJ4.mjs";
|
|
2
2
|
export * from "devframe/constants";
|
|
3
3
|
export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS, DEVFRAMES_HUB_BASE, DOCK_RENDERERS_STATE_KEY, HUB_EVENTS, normalizeHubBase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-DwxCyeI6.mjs";
|
|
2
2
|
import { CreateHostContextOptions } from "devframe/node";
|
|
3
3
|
import { DevframeDefinition, DevframeHost, DevframeNodeContext, EventEmitter } from "devframe/types";
|
|
4
4
|
import { ChildProcess } from "node:child_process";
|
|
@@ -351,6 +351,23 @@ interface DevframePtyExecuteOptions {
|
|
|
351
351
|
/** Initial row count. Default: 24. */
|
|
352
352
|
rows?: number;
|
|
353
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* The settled outcome of a {@link DevframePtyTerminalSession} run. PTYs merge
|
|
356
|
+
* stdout and stderr into one terminal output stream, so the captured text is
|
|
357
|
+
* exposed as a single `output` value.
|
|
358
|
+
*/
|
|
359
|
+
interface DevframePtyOutput {
|
|
360
|
+
output: string;
|
|
361
|
+
exitCode: number | undefined;
|
|
362
|
+
signal: number | undefined;
|
|
363
|
+
}
|
|
364
|
+
/** A live handle on the current PTY run's merged output and process state. */
|
|
365
|
+
interface DevframePtyResult extends PromiseLike<DevframePtyOutput> {
|
|
366
|
+
readonly pid: number | undefined;
|
|
367
|
+
/** `undefined` while the process is running or after a signal kill. */
|
|
368
|
+
readonly exitCode: number | undefined;
|
|
369
|
+
readonly killed: boolean;
|
|
370
|
+
}
|
|
354
371
|
interface DevframePtyTerminalSession extends DevframeTerminalSession {
|
|
355
372
|
type: 'pty';
|
|
356
373
|
interactive: true;
|
|
@@ -361,6 +378,11 @@ interface DevframePtyTerminalSession extends DevframeTerminalSession {
|
|
|
361
378
|
resize: (cols: number, rows: number) => void;
|
|
362
379
|
/** Current foreground process name, when the backend can resolve it. */
|
|
363
380
|
getProcessName: () => string | undefined;
|
|
381
|
+
/**
|
|
382
|
+
* Get a live handle on the current run's outcome. Call it again after
|
|
383
|
+
* `restart()` to track the new run.
|
|
384
|
+
*/
|
|
385
|
+
getResult: () => DevframePtyResult;
|
|
364
386
|
terminate: () => Promise<void>;
|
|
365
387
|
/** Throws `DF8206` once the session's output stream has closed (after a natural exit or `terminate()`) — drop it with `ctx.terminals.remove(session)` and start a fresh session instead. */
|
|
366
388
|
restart: () => Promise<void>;
|
|
@@ -496,4 +518,4 @@ interface CreateHubContextOptions extends CreateHostContextOptions {}
|
|
|
496
518
|
*/
|
|
497
519
|
declare function createHubContext(options: CreateHubContextOptions): Promise<DevframeHubContext>;
|
|
498
520
|
//#endregion
|
|
499
|
-
export {
|
|
521
|
+
export { DevframeMessagesLevelShortcuts as A, DevframeMessageEntryInput as C, DevframeMessageShortcutInput as D, DevframeMessageLevel as E, DevframeMessagesClient as O, DevframeMessageEntryFrom as S, DevframeMessageHandle as T, DevframeMessageAction as _, DevframeChildProcessExecuteOptions as a, DevframeMessageElementPosition as b, DevframeChildProcessTerminalSession as c, DevframePtyResult as d, DevframePtyTerminalSession as f, DevframeTerminalsHost as g, DevframeTerminalStatus as h, InstallDevframeOptions as i, DevframeMessagesListDelta as j, DevframeMessagesHost as k, DevframePtyExecuteOptions as l, DevframeTerminalSessionBase as m, DevframeHubContext as n, DevframeChildProcessOutput as o, DevframeTerminalSession as p, createHubContext as r, DevframeChildProcessResult as s, CreateHubContextOptions as t, DevframePtyOutput as u, DevframeMessageActivateAction as v, DevframeMessageFilePosition as w, DevframeMessageEntry as x, DevframeMessageCommandAction as y };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { r as defineHubRpcFunction } from "./define-Ceekw2EO.mjs";
|
|
2
|
-
import { n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS } from "./constants-
|
|
2
|
+
import { n as DEFAULT_STATE_USER_SETTINGS, o as HUB_EVENTS } from "./constants-D1zicoJ4.mjs";
|
|
3
3
|
import { i as isBareModuleSpecifier, t as buildRemoteConnectionUrl } from "./remote-url-Bgc7gtsP.mjs";
|
|
4
|
+
import { joinURL, withTrailingSlash } from "ufo";
|
|
4
5
|
import { createEventEmitter } from "devframe/utils/events";
|
|
5
6
|
import { createHostContext, createStorage } from "devframe/node";
|
|
6
7
|
import { getInternalContext, resolveBasePath } from "devframe/node/hub-internals";
|
|
7
8
|
import { debounce } from "perfect-debounce";
|
|
8
|
-
import { coerceAgentPositionalArgs } from "devframe/internal";
|
|
9
|
+
import { coerceAgentPositionalArgs, resolveClientAssets } from "devframe/internal";
|
|
9
10
|
import { defineDiagnostics } from "devframe/utils/nostics";
|
|
10
|
-
import { join, resolve } from "pathe";
|
|
11
|
+
import { basename, dirname, isAbsolute, join, resolve } from "pathe";
|
|
11
12
|
import { nanoid } from "devframe/utils/nanoid";
|
|
12
13
|
import process from "node:process";
|
|
13
|
-
import {
|
|
14
|
+
import { existsSync } from "node:fs";
|
|
14
15
|
//#region src/node/diagnostics.ts
|
|
15
16
|
const diagnostics = defineDiagnostics({
|
|
16
17
|
docsBase: "https://devfra.me/errors",
|
|
@@ -770,6 +771,8 @@ var DevframeTerminalsHost = class {
|
|
|
770
771
|
const rows = executeOptions.rows ?? 24;
|
|
771
772
|
let controller;
|
|
772
773
|
let pty;
|
|
774
|
+
let currentResult;
|
|
775
|
+
let killCurrentRun;
|
|
773
776
|
let runId = 0;
|
|
774
777
|
let streamClosed = false;
|
|
775
778
|
let session;
|
|
@@ -797,14 +800,14 @@ var DevframeTerminalsHost = class {
|
|
|
797
800
|
controller = _controller;
|
|
798
801
|
},
|
|
799
802
|
cancel() {
|
|
800
|
-
|
|
803
|
+
killCurrentRun?.();
|
|
801
804
|
pty = void 0;
|
|
802
805
|
closeStream();
|
|
803
806
|
}
|
|
804
807
|
});
|
|
805
808
|
const spawnPty = () => {
|
|
806
809
|
const currentRun = ++runId;
|
|
807
|
-
const
|
|
810
|
+
const ptyProcess = spawn(executeOptions.command, executeOptions.args ?? [], {
|
|
808
811
|
name: PTY_TERM_NAME,
|
|
809
812
|
cols,
|
|
810
813
|
rows,
|
|
@@ -817,16 +820,58 @@ var DevframeTerminalsHost = class {
|
|
|
817
820
|
...executeOptions.env ?? {}
|
|
818
821
|
}
|
|
819
822
|
});
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
+
const outputChunks = [];
|
|
824
|
+
let killed = false;
|
|
825
|
+
let settled = false;
|
|
826
|
+
let settledExitCode;
|
|
827
|
+
let resolveOutput;
|
|
828
|
+
const outputPromise = new Promise((resolve) => {
|
|
829
|
+
resolveOutput = resolve;
|
|
830
|
+
});
|
|
831
|
+
const settle = (exitCode, signal) => {
|
|
832
|
+
if (settled) return;
|
|
833
|
+
settled = true;
|
|
834
|
+
killed ||= signal !== 0;
|
|
835
|
+
settledExitCode = killed ? void 0 : exitCode;
|
|
836
|
+
resolveOutput({
|
|
837
|
+
output: outputChunks.join(""),
|
|
838
|
+
exitCode: settledExitCode,
|
|
839
|
+
signal: signal === 0 ? void 0 : signal
|
|
840
|
+
});
|
|
841
|
+
};
|
|
842
|
+
ptyProcess.onData((data) => {
|
|
843
|
+
const text = typeof data === "string" ? data : data.toString("utf8");
|
|
844
|
+
outputChunks.push(text);
|
|
845
|
+
if (!streamClosed && currentRun === runId) controller?.enqueue(text);
|
|
823
846
|
});
|
|
824
|
-
|
|
847
|
+
ptyProcess.onExit(({ exitCode, signal }) => {
|
|
848
|
+
settle(exitCode, signal);
|
|
825
849
|
if (currentRun !== runId) return;
|
|
826
850
|
closeStream();
|
|
827
|
-
|
|
851
|
+
/**
|
|
852
|
+
* Killed runs and clean exits are stopped. Only a non-killed non-zero exit
|
|
853
|
+
* code is a crash, matching the child-process path.
|
|
854
|
+
*/
|
|
855
|
+
markStatus(!killed && exitCode !== 0 ? "error" : "stopped");
|
|
828
856
|
});
|
|
829
|
-
|
|
857
|
+
currentResult = {
|
|
858
|
+
get pid() {
|
|
859
|
+
return ptyProcess.pid;
|
|
860
|
+
},
|
|
861
|
+
get exitCode() {
|
|
862
|
+
return killed ? void 0 : ptyProcess.exitCode ?? settledExitCode;
|
|
863
|
+
},
|
|
864
|
+
get killed() {
|
|
865
|
+
return killed;
|
|
866
|
+
},
|
|
867
|
+
then: (onfulfilled, onrejected) => outputPromise.then(onfulfilled, onrejected)
|
|
868
|
+
};
|
|
869
|
+
killCurrentRun = () => {
|
|
870
|
+
if (ptyProcess.exitCode !== null) return;
|
|
871
|
+
killed = true;
|
|
872
|
+
ptyProcess.kill();
|
|
873
|
+
};
|
|
874
|
+
return ptyProcess;
|
|
830
875
|
};
|
|
831
876
|
try {
|
|
832
877
|
pty = spawnPty();
|
|
@@ -862,16 +907,27 @@ var DevframeTerminalsHost = class {
|
|
|
862
907
|
return;
|
|
863
908
|
}
|
|
864
909
|
},
|
|
910
|
+
getResult: () => currentResult,
|
|
865
911
|
terminate: async () => {
|
|
866
|
-
|
|
912
|
+
killCurrentRun?.();
|
|
867
913
|
pty = void 0;
|
|
868
914
|
closeStream();
|
|
869
915
|
markStatus("stopped");
|
|
870
916
|
},
|
|
871
917
|
restart: async () => {
|
|
872
918
|
if (streamClosed) throw diagnostics.DF8206({ id: terminal.id });
|
|
873
|
-
|
|
874
|
-
|
|
919
|
+
killCurrentRun?.();
|
|
920
|
+
killCurrentRun = void 0;
|
|
921
|
+
pty = void 0;
|
|
922
|
+
try {
|
|
923
|
+
pty = spawnPty();
|
|
924
|
+
} catch (error) {
|
|
925
|
+
markStatus("error");
|
|
926
|
+
throw diagnostics.DF8203({
|
|
927
|
+
command: executeOptions.command,
|
|
928
|
+
reason: error instanceof Error ? error.message : String(error)
|
|
929
|
+
});
|
|
930
|
+
}
|
|
875
931
|
markStatus("running");
|
|
876
932
|
}
|
|
877
933
|
};
|
|
@@ -894,6 +950,22 @@ function nextAvailableDockId(views, baseId) {
|
|
|
894
950
|
return `${baseId}-${n}`;
|
|
895
951
|
}
|
|
896
952
|
/**
|
|
953
|
+
* When a dock's `clientScript.importFrom` is an absolute filesystem path, serve
|
|
954
|
+
* its directory under `<base>__page-script/` and rewrite `importFrom` to that
|
|
955
|
+
* URL. A URL or bare specifier (not existing on disk) passes through untouched.
|
|
956
|
+
*/
|
|
957
|
+
async function resolvePageScriptClientScript(ctx, clientScript, base) {
|
|
958
|
+
if (!clientScript?.importFrom) return clientScript;
|
|
959
|
+
const { importFrom } = clientScript;
|
|
960
|
+
if (!isAbsolute(importFrom) || !existsSync(importFrom)) return clientScript;
|
|
961
|
+
const scriptBase = withTrailingSlash(joinURL(base, "__page-script"));
|
|
962
|
+
await ctx.host.mountStatic(scriptBase, dirname(importFrom));
|
|
963
|
+
return {
|
|
964
|
+
...clientScript,
|
|
965
|
+
importFrom: joinURL(scriptBase, basename(importFrom))
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
897
969
|
* Framework-neutral primitive backing {@link DevframeHubContext.install} —
|
|
898
970
|
* installs a {@link DevframeDefinition} as a dock inside a hub-aware context:
|
|
899
971
|
* serves the devframe's SPA at the resolved base path, synthesizes an iframe
|
|
@@ -936,6 +1008,12 @@ async function prepareDevframe(ctx, d, options = {}) {
|
|
|
936
1008
|
id,
|
|
937
1009
|
basePath: void 0
|
|
938
1010
|
}, "hosted"));
|
|
1011
|
+
const dockDefaults = {
|
|
1012
|
+
...d.dock,
|
|
1013
|
+
...options.dock
|
|
1014
|
+
};
|
|
1015
|
+
const clientScript = await resolvePageScriptClientScript(ctx, dockDefaults.clientScript, base);
|
|
1016
|
+
if (clientScript) dockDefaults.clientScript = clientScript;
|
|
939
1017
|
const clientAssets = resolveClientAssets(d);
|
|
940
1018
|
if (clientAssets) {
|
|
941
1019
|
if (ctx.host.mountConnectionMeta) await ctx.host.mountConnectionMeta(base);
|
|
@@ -951,8 +1029,7 @@ async function prepareDevframe(ctx, d, options = {}) {
|
|
|
951
1029
|
id,
|
|
952
1030
|
title: d.name,
|
|
953
1031
|
icon: d.icon,
|
|
954
|
-
...
|
|
955
|
-
...options.dock,
|
|
1032
|
+
...dockDefaults,
|
|
956
1033
|
type: "iframe",
|
|
957
1034
|
url: base
|
|
958
1035
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./context-
|
|
2
|
-
import "./settings-
|
|
1
|
+
import "./context-BJFGlcf8.mjs";
|
|
2
|
+
import "./settings-DwxCyeI6.mjs";
|
|
3
3
|
import { RpcDefinitionsFilter, RpcDefinitionsToFunctions } from "devframe/rpc";
|
|
4
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
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,6 +1,6 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { A as
|
|
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-
|
|
1
|
+
import { A as DevframeMessagesLevelShortcuts, C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, E as DevframeMessageLevel, O as DevframeMessagesClient, S as DevframeMessageEntryFrom, T as DevframeMessageHandle, _ as DevframeMessageAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageElementPosition, c as DevframeChildProcessTerminalSession, d as DevframePtyResult, f as DevframePtyTerminalSession, g as DevframeTerminalsHost, h as DevframeTerminalStatus, j as DevframeMessagesListDelta, k as DevframeMessagesHost, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalSession, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyOutput, v as DevframeMessageActivateAction, w as DevframeMessageFilePosition, x as DevframeMessageEntry, y as DevframeMessageCommandAction } from "./context-BJFGlcf8.mjs";
|
|
2
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, S as DevframeDockPanelState, T as DevframeDocksHost, _ 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 DevframeViewLauncher, k as DevframeViewGroup, 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 DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "./settings-DwxCyeI6.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-OpSX0dK5.mjs";
|
|
4
4
|
import { WhenContext, WhenExpression } from "devframe/utils/when";
|
|
5
5
|
//#region src/define.d.ts
|
|
6
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,4 +12,4 @@ declare function defineDockEntry<const T extends DevframeDockUserEntry, const W
|
|
|
12
12
|
visibility?: WhenExpression<WhenContext, V>;
|
|
13
13
|
}): T;
|
|
14
14
|
//#endregion
|
|
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 };
|
|
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 DevframeDockPanelState, 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 DevframePtyOutput, type DevframePtyResult, 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/node/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import {
|
|
1
|
+
import { C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, T as DevframeMessageHandle, a as DevframeChildProcessExecuteOptions, c as DevframeChildProcessTerminalSession, f as DevframePtyTerminalSession, g as DevframeTerminalsHost$1, i as InstallDevframeOptions, j as DevframeMessagesListDelta, k as DevframeMessagesHost$1, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, p as DevframeTerminalSession, r as createHubContext, t as CreateHubContextOptions, x as DevframeMessageEntry } from "../context-BJFGlcf8.mjs";
|
|
2
|
+
import { C as DevframeDockUserEntry, T as DevframeDocksHost$1, _ as DevframeDockEntry, d as DevframeServerCommandEntry, f as DevframeServerCommandInput, l as DevframeCommandsHost$1, o as DevframeCommandHandle, p as ClientScriptEntry, t as DevframeDocksUserSettings } from "../settings-DwxCyeI6.mjs";
|
|
3
3
|
import { RpcFunctionDefinitionAny } from "devframe/rpc";
|
|
4
4
|
import { SharedState } from "devframe/utils/shared-state";
|
|
5
5
|
//#region src/node/host-commands.d.ts
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as DevframeDocksHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeMessagesHost, h as DevframeTerminalsHost, i as hubDocksActivate, l as hubTerminalsRemove, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize, v as DevframeCommandsHost } from "../context-
|
|
1
|
+
import { _ as DevframeDocksHost, a as hubMessagesAdd, c as hubMessagesUpdate, d as hubTerminalsRestart, f as hubTerminalsTerminate, g as DevframeMessagesHost, h as DevframeTerminalsHost, i as hubDocksActivate, l as hubTerminalsRemove, n as builtinHubRpcDeclarations, o as hubMessagesClear, p as hubTerminalsWrite, r as hubCommandsExecute, s as hubMessagesRemove, t as createHubContext, u as hubTerminalsResize, v as DevframeCommandsHost } from "../context-DYUkd3il.mjs";
|
|
2
2
|
import "ufo";
|
|
3
3
|
import "pathe";
|
|
4
4
|
import "node:process";
|
|
5
|
-
import { builtinModules } from "node:module";
|
|
6
5
|
import "node:fs";
|
|
6
|
+
import { builtinModules } from "node:module";
|
|
7
7
|
import "node:url";
|
|
8
8
|
import assert from "node:assert";
|
|
9
9
|
import "node:path";
|
package/dist/node/initiate.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-
|
|
2
|
-
import { r as DEVFRAMES_HUB_BASE } from "../constants-
|
|
1
|
+
import { i as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-BJFGlcf8.mjs";
|
|
2
|
+
import { r as DEVFRAMES_HUB_BASE } from "../constants-DJrPlLi0.mjs";
|
|
3
3
|
import { DevframeInstanceRecord } from "devframe/internal";
|
|
4
4
|
import { ConnectionMeta, DevframeDefinition, DevframeServiceInput, DevframeSseOptions, DevframeStorageScope, DevframeWsOptions, McpRouteOptions } from "devframe/types";
|
|
5
5
|
import { DevframeAuthHandler } from "devframe/node/auth";
|
package/dist/node/initiate.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, r as DEVFRAMES_HUB_BASE } from "../constants-
|
|
1
|
+
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY, r as DEVFRAMES_HUB_BASE } from "../constants-D1zicoJ4.mjs";
|
|
2
2
|
import { a as resolveClientModuleSpecifier } from "../remote-url-Bgc7gtsP.mjs";
|
|
3
|
-
import { m as prepareDevframe, t as createHubContext, y as diagnostics } from "../context-
|
|
3
|
+
import { m as prepareDevframe, t as createHubContext, y as diagnostics } from "../context-DYUkd3il.mjs";
|
|
4
4
|
import { joinURL, withTrailingSlash, withoutLeadingSlash } from "ufo";
|
|
5
5
|
import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME, DEVFRAME_MCP_ROUTE, DEVFRAME_WS_ROUTE } from "devframe/constants";
|
|
6
6
|
import { createH3DevframeHost, createInstanceShell, importRuntimeModule, resolveInstanceRegister } from "devframe/internal";
|
|
@@ -27,6 +27,11 @@ interface DevframeDocksHost {
|
|
|
27
27
|
*/
|
|
28
28
|
activate: (dockId: string, params?: Record<string, unknown>) => void;
|
|
29
29
|
}
|
|
30
|
+
/** Current state of one dock panel in a host page. */
|
|
31
|
+
interface DevframeDockPanelState {
|
|
32
|
+
state: 'open' | 'closed' | 'hidden';
|
|
33
|
+
selectedDockId?: string;
|
|
34
|
+
}
|
|
30
35
|
/**
|
|
31
36
|
* A request to switch the active dock. `params` is an opaque, serializable
|
|
32
37
|
* bag the target dock interprets — the terminals dock reads `params.sessionId`
|
|
@@ -630,4 +635,4 @@ interface DevframeDocksUserSettings {
|
|
|
630
635
|
commandShortcuts: DevframeCommandShortcutOverrides;
|
|
631
636
|
}
|
|
632
637
|
//#endregion
|
|
633
|
-
export {
|
|
638
|
+
export { DevframeViewIframe as A, DevframeDockUserEntry as C, DevframeViewBuiltin as D, DevframeViewAction as E, RemoteConnectionInfo as F, RemoteDockOptions as I, DevframeViewLauncherStatus as M, FrameSubTabsConfig as N, DevframeViewCustomRender as O, NavTarget as P, DevframeDockPanelState as S, DevframeDocksHost as T, DevframeDockEntry as _, DevframeCommandEntry as a, DevframeDockEntryIcon as b, DevframeCommandShortcutOverrides as c, DevframeServerCommandEntry as d, DevframeServerCommandInput as f, DevframeDockEntriesGrouped as g, DevframeDockBadgeVariant as h, DevframeCommandBase as i, DevframeViewLauncher as j, DevframeViewGroup as k, DevframeCommandsHost as l, DevframeDockActivation as m, DevframeClientCommand as n, DevframeCommandHandle as o, ClientScriptEntry as p, DevframeCommandAgentOptions as r, DevframeCommandKeybinding as s, DevframeDocksUserSettings as t, DevframeCommandsHostEvents as u, DevframeDockEntryBase as v, DevframeDocksActiveState as w, DevframeDockEntryRegistry as x, DevframeDockEntryCategory as y };
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { A as
|
|
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-
|
|
4
|
-
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
|
|
1
|
+
import { A as DevframeMessagesLevelShortcuts, C as DevframeMessageEntryInput, D as DevframeMessageShortcutInput, E as DevframeMessageLevel, O as DevframeMessagesClient, S as DevframeMessageEntryFrom, T as DevframeMessageHandle, _ as DevframeMessageAction, a as DevframeChildProcessExecuteOptions, b as DevframeMessageElementPosition, c as DevframeChildProcessTerminalSession, d as DevframePtyResult, f as DevframePtyTerminalSession, g as DevframeTerminalsHost, h as DevframeTerminalStatus, j as DevframeMessagesListDelta, k as DevframeMessagesHost, l as DevframePtyExecuteOptions, m as DevframeTerminalSessionBase, n as DevframeHubContext, o as DevframeChildProcessOutput, p as DevframeTerminalSession, s as DevframeChildProcessResult, t as CreateHubContextOptions, u as DevframePtyOutput, v as DevframeMessageActivateAction, w as DevframeMessageFilePosition, x as DevframeMessageEntry, y as DevframeMessageCommandAction } from "../context-BJFGlcf8.mjs";
|
|
2
|
+
import { A as DevframeViewIframe, C as DevframeDockUserEntry, D as DevframeViewBuiltin, E as DevframeViewAction, F as RemoteConnectionInfo, I as RemoteDockOptions, M as DevframeViewLauncherStatus, N as FrameSubTabsConfig, O as DevframeViewCustomRender, P as NavTarget, S as DevframeDockPanelState, T as DevframeDocksHost, _ 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 DevframeViewLauncher, k as DevframeViewGroup, 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 DevframeDocksActiveState, x as DevframeDockEntryRegistry, y as DevframeDockEntryCategory } from "../settings-DwxCyeI6.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-OpSX0dK5.mjs";
|
|
4
|
+
export { ClientScriptEntry, type ConnectionMeta, type CreateHubContextOptions, type DevframeCapabilities, DevframeChildProcessExecuteOptions, DevframeChildProcessOutput, DevframeChildProcessResult, DevframeChildProcessTerminalSession, DevframeClientCommand, DevframeCommandAgentOptions, DevframeCommandBase, DevframeCommandEntry, DevframeCommandHandle, DevframeCommandKeybinding, DevframeCommandShortcutOverrides, DevframeCommandsHost, DevframeCommandsHostEvents, type DevframeDiagnosticsHost, type DevframeDiagnosticsLogger, DevframeDockActivation, DevframeDockBadgeVariant, DevframeDockEntriesGrouped, DevframeDockEntry, DevframeDockEntryBase, DevframeDockEntryCategory, DevframeDockEntryIcon, DevframeDockEntryRegistry, DevframeDockPanelState, DevframeDockUserEntry, DevframeDocksActiveState, DevframeDocksHost, DevframeDocksUserSettings, type DevframeHost, type DevframeHubContext, DevframeMessageAction, DevframeMessageActivateAction, DevframeMessageCommandAction, DevframeMessageElementPosition, DevframeMessageEntry, DevframeMessageEntryFrom, DevframeMessageEntryInput, DevframeMessageFilePosition, DevframeMessageHandle, DevframeMessageLevel, DevframeMessageShortcutInput, DevframeMessagesClient, DevframeMessagesHost, DevframeMessagesLevelShortcuts, DevframeMessagesListDelta, type DevframeNodeRpcSession, DevframePtyExecuteOptions, DevframePtyOutput, DevframePtyResult, DevframePtyTerminalSession, type DevframeRpcClientFunctions, type DevframeRpcServerFunctions, type DevframeRpcSharedStates, DevframeServerCommandEntry, DevframeServerCommandInput, DevframeTerminalSession, DevframeTerminalSessionBase, DevframeTerminalStatus, DevframeTerminalsHost, DevframeViewAction, DevframeViewBuiltin, DevframeViewCustomRender, DevframeViewGroup, type DevframeViewHost, DevframeViewIframe, DevframeViewLauncher, DevframeViewLauncherStatus, type EventEmitter, type EventUnsubscribe, type EventsMap, FrameSubTabsConfig, NavTarget, RemoteConnectionInfo, RemoteDockOptions, type RpcBroadcastOptions, type RpcDefinitionsFilter, type RpcDefinitionsToFunctions, type RpcFunctionsHost, type RpcSharedStateGetOptions, type RpcSharedStateHost, type RpcStreamingChannel, type RpcStreamingChannelOptions, type RpcStreamingHost };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devframes/hub",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.8",
|
|
5
5
|
"description": "Hub layer that orchestrates devframe docks, terminals, messages, and commands on any host.",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"devframe": "0.9.
|
|
37
|
+
"devframe": "0.9.8"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@standard-schema/spec": "^1.1.0",
|
|
41
41
|
"destr": "^2.0.5",
|
|
42
|
-
"h3": "^2.0.1-rc.
|
|
42
|
+
"h3": "^2.0.1-rc.29",
|
|
43
43
|
"pathe": "^2.0.3",
|
|
44
44
|
"perfect-debounce": "^2.1.0",
|
|
45
45
|
"tinyexec": "^1.3.0",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
"zigpty": "^0.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^26.
|
|
50
|
+
"@types/node": "^26.4.0",
|
|
51
|
+
"devframe": "0.9.8",
|
|
51
52
|
"get-port-please": "^3.2.0",
|
|
52
53
|
"mlly": "^1.8.2",
|
|
53
54
|
"tsdown": "^0.22.14",
|
|
54
|
-
"valibot": "^1.4.2"
|
|
55
|
-
"devframe": "0.9.7"
|
|
55
|
+
"valibot": "^1.4.2"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsdown",
|