@devframes/hub 0.10.0 → 1.0.0
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 +3 -3
- package/dist/client/index.mjs +49 -17
- package/dist/{constants-S3IJS9sb.d.mts → constants-29tNOFia.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/{context-BP1ZH_ly.d.mts → context-DaUV_lYb.d.mts} +1 -1
- package/dist/{index-URV9_F53.d.mts → index-xOE4RKeE.d.mts} +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/node/build.d.mts +1 -1
- package/dist/node/index.d.mts +2 -2
- package/dist/node/initiate.d.mts +2 -2
- package/dist/{settings-DTMICVqB.d.mts → settings-Dx8_shF9.d.mts} +6 -3
- package/dist/types/index.d.mts +3 -3
- package/package.json +5 -5
package/dist/client/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { k as DevframeMessagesClient, w as DevframeMessageEntryInput } from "../context-
|
|
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-
|
|
3
|
-
import "../index-
|
|
1
|
+
import { k as DevframeMessagesClient, w as DevframeMessageEntryInput } from "../context-DaUV_lYb.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-Dx8_shF9.mjs";
|
|
3
|
+
import "../index-xOE4RKeE.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";
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
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-BSPQmlA1.mjs";
|
|
2
2
|
import { a as resolveClientModuleSpecifier, n as stripRemoteConnectionFromUrl, r as clientScriptFailureHint, t as buildRemoteConnectionUrl } from "../remote-url-UClKLQ5_.mjs";
|
|
3
|
-
import { REMOTE_CONNECTION_KEY } from "devframe/constants";
|
|
3
|
+
import { DEVFRAME_EVENTS, REMOTE_CONNECTION_KEY } from "devframe/constants";
|
|
4
4
|
import { connectDevframe, getDevframeRpcClient, resolveWsUrl } from "devframe/client";
|
|
5
5
|
import { createEventEmitter } from "devframe/utils/events";
|
|
6
6
|
import { destr } from "destr";
|
|
@@ -626,7 +626,7 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
626
626
|
reconcileEntries();
|
|
627
627
|
disposers.push(docksState.on("updated", reconcileEntries));
|
|
628
628
|
const activateHandler = (activation) => {
|
|
629
|
-
if (activation?.dockId) switchEntry(activation.dockId);
|
|
629
|
+
if (activation?.dockId) switchEntry(activation.dockId).catch(() => {});
|
|
630
630
|
};
|
|
631
631
|
const existingActivate = rpc.client.definitions.get(DOCKS_ACTIVATE_EVENT);
|
|
632
632
|
if (existingActivate) {
|
|
@@ -647,14 +647,17 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
647
647
|
}
|
|
648
648
|
if (getDevframeClientContext()) console.warn("[@devframes/hub] A client context is already published on this page; replacing it. Boot createDevframeClientRuntime() once per page (e.g. HTML injection combined with a manual import boots it twice).");
|
|
649
649
|
setDevframeClientContext(context);
|
|
650
|
-
|
|
650
|
+
let disposed = false;
|
|
651
|
+
const loadedScripts = /* @__PURE__ */ new Map();
|
|
651
652
|
if (loadScriptsEnabled) {
|
|
652
653
|
loadClientScripts();
|
|
653
654
|
disposers.push(docksState.on("updated", loadClientScripts));
|
|
655
|
+
disposers.push(rpc.events.on(DEVFRAME_EVENTS.client.isTrustedUpdated, loadClientScripts));
|
|
654
656
|
}
|
|
655
657
|
return {
|
|
656
658
|
context,
|
|
657
659
|
dispose() {
|
|
660
|
+
disposed = true;
|
|
658
661
|
for (const off of disposers.splice(0)) off();
|
|
659
662
|
for (const disposeAdapter of frameNavAdapters.values()) disposeAdapter();
|
|
660
663
|
frameNavAdapters.clear();
|
|
@@ -746,7 +749,7 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
746
749
|
return selectedId;
|
|
747
750
|
},
|
|
748
751
|
set selectedId(id) {
|
|
749
|
-
switchEntry(id);
|
|
752
|
+
switchEntry(id).catch(() => {});
|
|
750
753
|
},
|
|
751
754
|
/**
|
|
752
755
|
* A mirror of the session field, so a persisting host reads and writes the
|
|
@@ -796,16 +799,29 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
796
799
|
}
|
|
797
800
|
};
|
|
798
801
|
}
|
|
802
|
+
async function preparePageScript(entry) {
|
|
803
|
+
if (!rpc.isTrusted) return false;
|
|
804
|
+
if (entry.type === "iframe" && entry.clientScript) await setupClientScript(entry.id, entry.clientScript);
|
|
805
|
+
return !disposed && rpc.isTrusted && entryToStateMap.get(entry.id)?.entryMeta === entry;
|
|
806
|
+
}
|
|
807
|
+
async function runActivationScript(entry) {
|
|
808
|
+
if (entry.type === "action") await setupClientScript(entry.id, entry.action, false);
|
|
809
|
+
else if (entry.type === "custom-render") await setupClientScript(entry.id, entry.renderer);
|
|
810
|
+
}
|
|
799
811
|
async function switchEntry(id) {
|
|
800
812
|
const next = id ?? null;
|
|
801
|
-
if (next === selectedId) return false;
|
|
813
|
+
if (next === selectedId && entryToStateMap.get(next ?? "")?.entryMeta.type !== "action") return false;
|
|
802
814
|
if (next !== null && !entryToStateMap.has(next)) return false;
|
|
815
|
+
const entry = entryToStateMap.get(next ?? "")?.entryMeta;
|
|
816
|
+
if (entry && loadScriptsEnabled && !rpc.isTrusted) return false;
|
|
817
|
+
if (entry?.type === "iframe" && entry.clientScript && loadScriptsEnabled && !await preparePageScript(entry)) return false;
|
|
803
818
|
const previous = selectedId;
|
|
804
819
|
selectedId = next;
|
|
805
820
|
panel.session.selectedDockId = next;
|
|
806
821
|
if (next === null || entryToStateMap.get(next)?.entryMeta.type !== "iframe") panel.session.selectedDockRoute = null;
|
|
807
822
|
if (previous) entryToStateMap.get(previous)?.events.emit("entry:deactivated");
|
|
808
823
|
if (next) entryToStateMap.get(next)?.events.emit("entry:activated");
|
|
824
|
+
if (entry && loadScriptsEnabled) await runActivationScript(entry);
|
|
809
825
|
return true;
|
|
810
826
|
}
|
|
811
827
|
function createCommandsContext() {
|
|
@@ -871,16 +887,30 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
871
887
|
}
|
|
872
888
|
});
|
|
873
889
|
}
|
|
874
|
-
function clientScriptOf(entry) {
|
|
875
|
-
return entry.action ?? entry.renderer ?? entry.clientScript;
|
|
876
|
-
}
|
|
877
890
|
function loadClientScripts() {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
}
|
|
891
|
+
if (disposed || !rpc.isTrusted) return;
|
|
892
|
+
for (const entry of currentEntries()) if (entry.type === "iframe") startEagerScript(entry.id, entry.clientScript);
|
|
893
|
+
else if (entry.type === "action") startEagerScript(entry.id, entry.action);
|
|
894
|
+
}
|
|
895
|
+
function startEagerScript(entryId, script) {
|
|
896
|
+
if (script?.eager) setupClientScript(entryId, script).catch(() => {});
|
|
897
|
+
}
|
|
898
|
+
/** Share eager and activation setup; explicit action invocations bypass the cache. */
|
|
899
|
+
function setupClientScript(entryId, script, cache = true) {
|
|
900
|
+
const key = JSON.stringify([
|
|
901
|
+
entryId,
|
|
902
|
+
script.importFrom,
|
|
903
|
+
script.importName ?? "default"
|
|
904
|
+
]);
|
|
905
|
+
const existing = loadedScripts.get(key);
|
|
906
|
+
if (cache && existing) return existing;
|
|
907
|
+
const promise = runClientScript(entryId, script);
|
|
908
|
+
if (!cache) return promise;
|
|
909
|
+
loadedScripts.set(key, promise);
|
|
910
|
+
promise.catch(() => {
|
|
911
|
+
if (loadedScripts.get(key) === promise) loadedScripts.delete(key);
|
|
912
|
+
});
|
|
913
|
+
return promise;
|
|
884
914
|
}
|
|
885
915
|
async function runClientScript(entryId, script) {
|
|
886
916
|
const specifier = resolveClientModuleSpecifier(script.importFrom, {
|
|
@@ -895,9 +925,11 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
895
925
|
/* turbopackIgnore: true */
|
|
896
926
|
specifier
|
|
897
927
|
))[script.importName ?? "default"];
|
|
898
|
-
if (typeof fn !== "function")
|
|
928
|
+
if (typeof fn !== "function") throw new Error(`[@devframes/hub] "${specifier}" exports no callable "${script.importName ?? "default"}"`);
|
|
899
929
|
const current = entryToStateMap.get(entryId);
|
|
900
|
-
if (!current) return;
|
|
930
|
+
if (!current || disposed) return;
|
|
931
|
+
/** Reject instead of caching skipped setup so re-authentication can retry it. */
|
|
932
|
+
if (!rpc.isTrusted) throw new Error("[@devframes/hub] RPC client is no longer trusted");
|
|
901
933
|
const messages = createMessagesClient(rpc, { defaults: { category: entryId } });
|
|
902
934
|
await fn({
|
|
903
935
|
...context,
|
|
@@ -905,8 +937,8 @@ async function createDevframeClientRuntime(options = {}) {
|
|
|
905
937
|
messages
|
|
906
938
|
});
|
|
907
939
|
} catch (error) {
|
|
908
|
-
loadedScripts.delete(entryId);
|
|
909
940
|
console.error(`[@devframes/hub] failed to load client script for "${entryId}" from ${specifier}${clientScriptFailureHint(script.importFrom, specifier)}`, error);
|
|
941
|
+
throw error;
|
|
910
942
|
}
|
|
911
943
|
}
|
|
912
944
|
}
|
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-29tNOFia.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 { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-
|
|
1
|
+
import { A as DevframeViewIframe, T as DevframeDocksHost, b as DevframeDockEntryIcon, l as DevframeCommandsHost, m as DevframeDockActivation } from "./settings-Dx8_shF9.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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./context-
|
|
2
|
-
import "./settings-
|
|
1
|
+
import "./context-DaUV_lYb.mjs";
|
|
2
|
+
import "./settings-Dx8_shF9.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 { A as DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "./context-
|
|
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-
|
|
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 DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "./context-DaUV_lYb.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-Dx8_shF9.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-xOE4RKeE.mjs";
|
|
4
4
|
import { WhenContext, WhenExpression } from "devframe/utils/when";
|
|
5
5
|
//#region src/define.d.ts
|
|
6
6
|
export 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>;
|
package/dist/node/build.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as DevframeHubContext, t as CreateHubContextOptions } from "../context-
|
|
1
|
+
import { n as DevframeHubContext, t as CreateHubContextOptions } from "../context-DaUV_lYb.mjs";
|
|
2
2
|
import { DevframeHubUi, DevframesInput, DockRendererRegistration } from "./initiate.mjs";
|
|
3
3
|
import { DevframeServiceInput, DevframeStorageScope } from "devframe/types";
|
|
4
4
|
//#region src/node/build.d.ts
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DevframeMessagesHost$1, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, _ as DevframeTerminalsHost$1, a as InstallDevframeOptions, h as DevframeTerminalSessionBase, i as createHubContext, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, r as HubMountedFrame, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, w as DevframeMessageEntryInput } from "../context-
|
|
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-
|
|
1
|
+
import { A as DevframeMessagesHost$1, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, _ as DevframeTerminalsHost$1, a as InstallDevframeOptions, h as DevframeTerminalSessionBase, i as createHubContext, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, r as HubMountedFrame, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, w as DevframeMessageEntryInput } from "../context-DaUV_lYb.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-Dx8_shF9.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/initiate.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-
|
|
2
|
-
import { r as DEVFRAMES_HUB_BASE } from "../constants-
|
|
1
|
+
import { a as InstallDevframeOptions, n as DevframeHubContext, t as CreateHubContextOptions } from "../context-DaUV_lYb.mjs";
|
|
2
|
+
import { r as DEVFRAMES_HUB_BASE } from "../constants-29tNOFia.mjs";
|
|
3
3
|
import { DevframeInstanceRecord } from "devframe/internal";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
5
5
|
import { AuthBannerFunction } from "devframe/recipes/interactive-auth";
|
|
@@ -230,6 +230,11 @@ interface DevframeDockEntryBase {
|
|
|
230
230
|
groupId?: string;
|
|
231
231
|
}
|
|
232
232
|
interface ClientScriptEntry {
|
|
233
|
+
/**
|
|
234
|
+
* Initialize after trust without waiting for dock activation.
|
|
235
|
+
* @default false
|
|
236
|
+
*/
|
|
237
|
+
eager?: boolean;
|
|
233
238
|
/**
|
|
234
239
|
* What to import: either a **URL the host serves** (a self-contained ES
|
|
235
240
|
* module, e.g. `/@fs/<abs path>` under Vite or a statically-mounted bundle
|
|
@@ -288,9 +293,7 @@ interface DevframeViewIframe extends DevframeDockEntryBase {
|
|
|
288
293
|
* share a `frameId` may live in one group, several groups, or none.
|
|
289
294
|
*/
|
|
290
295
|
frameId?: string;
|
|
291
|
-
/**
|
|
292
|
-
* Optional client script to import into the iframe
|
|
293
|
-
*/
|
|
296
|
+
/** Optional page script, initialized on activation or after trust when `eager: true`. */
|
|
294
297
|
clientScript?: ClientScriptEntry;
|
|
295
298
|
/**
|
|
296
299
|
* Soft-navigation target within a shared frame. Set on a **member** dock
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "../context-
|
|
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-
|
|
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 DevframeMessagesHost, C as DevframeMessageEntryFrom, D as DevframeMessageLevel, E as DevframeMessageHandle, M as DevframeMessagesListDelta, O as DevframeMessageShortcutInput, S as DevframeMessageEntry, T as DevframeMessageFilePosition, _ as DevframeTerminalsHost, b as DevframeMessageCommandAction, c as DevframeChildProcessResult, d as DevframePtyOutput, f as DevframePtyResult, g as DevframeTerminalStatus, h as DevframeTerminalSessionBase, j as DevframeMessagesLevelShortcuts, k as DevframeMessagesClient, l as DevframeChildProcessTerminalSession, m as DevframeTerminalSession, n as DevframeHubContext, o as DevframeChildProcessExecuteOptions, p as DevframePtyTerminalSession, s as DevframeChildProcessOutput, t as CreateHubContextOptions, u as DevframePtyExecuteOptions, v as DevframeMessageAction, w as DevframeMessageEntryInput, x as DevframeMessageElementPosition, y as DevframeMessageActivateAction } from "../context-DaUV_lYb.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-Dx8_shF9.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-xOE4RKeE.mjs";
|
|
4
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.
|
|
4
|
+
"version": "1.0.0",
|
|
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",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@devframes/agentic": "0.
|
|
39
|
-
"devframe": "0.
|
|
38
|
+
"@devframes/agentic": "1.0.0",
|
|
39
|
+
"devframe": "1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@devframes/agentic": {
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"zigpty": "^0.2.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@devframes/agentic": "0.
|
|
54
|
+
"@devframes/agentic": "1.0.0",
|
|
55
55
|
"@standard-schema/spec": "^1.1.0",
|
|
56
56
|
"@types/node": "^26.5.1",
|
|
57
|
-
"devframe": "0.
|
|
57
|
+
"devframe": "1.0.0",
|
|
58
58
|
"get-port-please": "^3.2.0",
|
|
59
59
|
"tsdown": "^0.23.0",
|
|
60
60
|
"valibot": "^1.5.0"
|