@devframes/hub 0.9.20 → 0.10.1
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/{assemble-C_sd1y1C.mjs → assemble-CMhUmA7k.mjs} +3 -4
- package/dist/client/index.d.mts +3 -9
- package/dist/client/index.mjs +51 -21
- package/dist/{constants-Bz4yclHo.d.mts → constants-29tNOFia.d.mts} +1 -1
- package/dist/{constants-Da23JxCZ.mjs → constants-BSPQmlA1.mjs} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/constants.mjs +1 -1
- package/dist/{context-BqvN40CU.mjs → context-D8hVUxvy.mjs} +5 -9
- package/dist/{context-BmHQp89a.d.mts → context-DaUV_lYb.d.mts} +1 -1
- package/dist/{index-Dv8iu9St.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/build.mjs +5 -5
- package/dist/node/index.d.mts +2 -2
- package/dist/node/index.mjs +3 -5500
- package/dist/node/initiate.d.mts +5 -6
- package/dist/node/initiate.mjs +8 -8
- package/dist/{settings-CWHPzCWS.d.mts → settings-Dx8_shF9.d.mts} +83 -4
- package/dist/types/index.d.mts +3 -3
- package/package.json +11 -7
- package/dist/{dist-BP3CGpgZ.mjs → dist-Q6-t0oIv.mjs} +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as resolveClientModuleSpecifier } from "./remote-url-UClKLQ5_.mjs";
|
|
2
|
-
import { v as prepareDevframe, y as diagnostics } from "./context-
|
|
3
|
-
import { joinURL, withTrailingSlash } from "
|
|
2
|
+
import { v as prepareDevframe, y as diagnostics } from "./context-D8hVUxvy.mjs";
|
|
3
|
+
import { joinURL, withTrailingSlash } from "devframe/utils/url";
|
|
4
4
|
import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME, DEVFRAME_MCP_ROUTE, DEVFRAME_WS_ROUTE } from "devframe/constants";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { resolve } from "pathe";
|
|
@@ -80,12 +80,11 @@ function renderClientImportsModule(ctx) {
|
|
|
80
80
|
* filenames and route-pattern characters. Returns the deferred setup thunks;
|
|
81
81
|
* each mounted frame is recorded on `ctx.frames`.
|
|
82
82
|
*/
|
|
83
|
-
async function mountDevframes(ctx, devframes, base
|
|
83
|
+
async function mountDevframes(ctx, devframes, base) {
|
|
84
84
|
const setups = [];
|
|
85
85
|
for (const { devframe: def, dock } of devframes) {
|
|
86
86
|
if (RESERVED_HUB_PATHS.includes(def.id)) throw diagnostics.DF8000({ id: def.id });
|
|
87
87
|
if (!/^[\w.-]+$/.test(def.id)) throw diagnostics.DF8004({ id: def.id });
|
|
88
|
-
if (!hubMcpEnabled && def.cli?.mcp) diagnostics.DF8005({ id: def.id });
|
|
89
88
|
const frameBase = withTrailingSlash(joinURL(base, def.id));
|
|
90
89
|
const run = await prepareDevframe(ctx, def, {
|
|
91
90
|
base: frameBase,
|
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";
|
|
@@ -724,12 +724,6 @@ export interface DevframeClientRuntime {
|
|
|
724
724
|
* runtime is what gives plugin client scripts a live host context to run in.
|
|
725
725
|
*/
|
|
726
726
|
export declare function createDevframeClientRuntime(options?: DevframeClientRuntimeOptions): Promise<DevframeClientRuntime>;
|
|
727
|
-
/** @deprecated Renamed; use {@link DevframeClientRuntimeOptions}. */
|
|
728
|
-
export type DevframeClientHostOptions = DevframeClientRuntimeOptions;
|
|
729
|
-
/** @deprecated Renamed; use {@link DevframeClientRuntime}. */
|
|
730
|
-
export type DevframeClientHost = DevframeClientRuntime;
|
|
731
|
-
/** @deprecated Renamed; use {@link createDevframeClientRuntime}. */
|
|
732
|
-
export declare const createDevframeClientHost: typeof createDevframeClientRuntime;
|
|
733
727
|
//#endregion
|
|
734
728
|
//#region src/client/messages.d.ts
|
|
735
729
|
export interface MessagesClientOptions {
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-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
|
}
|
|
@@ -989,8 +1021,6 @@ function groupByCategory(entries, categoryOrder) {
|
|
|
989
1021
|
}
|
|
990
1022
|
return [...groups.entries()].sort(([a], [b]) => (categoryOrder[a] ?? 0) - (categoryOrder[b] ?? 0));
|
|
991
1023
|
}
|
|
992
|
-
/** @deprecated Renamed; use {@link createDevframeClientRuntime}. */
|
|
993
|
-
const createDevframeClientHost = createDevframeClientRuntime;
|
|
994
1024
|
//#endregion
|
|
995
1025
|
//#region src/client/remote.ts
|
|
996
1026
|
function base64UrlDecode(value) {
|
|
@@ -1117,4 +1147,4 @@ async function connectRemoteDevframe(options = {}) {
|
|
|
1117
1147
|
});
|
|
1118
1148
|
}
|
|
1119
1149
|
//#endregion
|
|
1120
|
-
export { CLIENT_CONTEXT_KEY, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe,
|
|
1150
|
+
export { CLIENT_CONTEXT_KEY, FRAME_NAV_CHANNEL, FRAME_NAV_VERSION, attachFrameNavClient, buildRemoteDevframeUrl, clientScriptFailureHint, connectRemoteDevframe, createDevframeClientRuntime, createDockRenderersContext, createMessagesClient, getDevframeClientContext, parseRemoteConnection, resolveClientModuleSpecifier, resolveDockIcon, resolveDockUrl, setDevframeClientContext, stripRemoteConnectionFromUrl, watchFrameLocation };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash } from "
|
|
1
|
+
import { cleanDoubleSlashes, withLeadingSlash, withTrailingSlash } from "devframe/utils/url";
|
|
2
2
|
//#region src/events.ts
|
|
3
3
|
/**
|
|
4
4
|
* Centralized registry of every event, broadcast, RPC method, shared-state
|
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 };
|
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-BSPQmlA1.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,16 +1,16 @@
|
|
|
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-BSPQmlA1.mjs";
|
|
3
3
|
import { i as isBareModuleSpecifier, t as buildRemoteConnectionUrl } from "./remote-url-UClKLQ5_.mjs";
|
|
4
|
-
import { joinURL, withTrailingSlash } from "
|
|
4
|
+
import { joinURL, withTrailingSlash } from "devframe/utils/url";
|
|
5
5
|
import { createEventEmitter } from "devframe/utils/events";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import process from "node:process";
|
|
8
|
-
import {
|
|
8
|
+
import { toolInputToCommandArgs } from "devframe/internal";
|
|
9
9
|
import { basename, dirname, isAbsolute, join, resolve } from "pathe";
|
|
10
10
|
import { defineDiagnostics } from "devframe/utils/nostics";
|
|
11
11
|
import { getInternalContext, resolveBasePath } from "devframe/node/hub-internals";
|
|
12
12
|
import { createHostContext, createStorage } from "devframe/node";
|
|
13
|
-
import { debounce } from "
|
|
13
|
+
import { debounce } from "devframe/utils/debounce";
|
|
14
14
|
import { nanoid } from "devframe/utils/nanoid";
|
|
15
15
|
//#region src/node/diagnostics.ts
|
|
16
16
|
/**
|
|
@@ -43,10 +43,6 @@ const diagnostics = defineDiagnostics({
|
|
|
43
43
|
why: (p) => `Devframe id "${p.id}" is not a mountable URL segment, and the hub mounts each frame at \`<base><id>/\`.`,
|
|
44
44
|
fix: "Ids become route segments, so they may only contain letters, digits, `_`, `-`, and `.`; `:` and `*` are route-pattern markers to the underlying router, and `/` would escape the segment. Set a route-safe `id` on the definition (e.g. `my_plugin` instead of `my:plugin`)."
|
|
45
45
|
},
|
|
46
|
-
DF8005: {
|
|
47
|
-
why: (p) => `Devframe "${p.id}" requests an MCP route, but the hub's aggregate MCP is off (\`mcp: false\`), so its tools are not exposed over MCP.`,
|
|
48
|
-
fix: "A hub exposes one aggregate MCP endpoint over every mounted devframe, so per-devframe `mcp` settings are ignored. Drop `mcp: false` from `initHub` (the `'auto'` default mounts the aggregate route once agent tools exist) to surface this devframe's tools, or drop `mcp` from the devframe to silence this warning."
|
|
49
|
-
},
|
|
50
46
|
DF8006: {
|
|
51
47
|
why: (p) => `A static hub build writes each mount either under its base ("${p.base}") or as an absolute-path sibling of it, but "${p.urlBase}" is neither.`,
|
|
52
48
|
fix: "buildHub maps a mount under the hub base into its `outDir`, and any other mount to the deploy root (`outDir`'s parent) by its absolute path. Give the mount an absolute base (starting with `/`) so it resolves to one of those."
|
|
@@ -166,7 +162,7 @@ async function resolvePageScriptClientScript(ctx, clientScript, base) {
|
|
|
166
162
|
* definition ships client assets.
|
|
167
163
|
*/
|
|
168
164
|
async function serveDevframeAssets(ctx, d, id, base) {
|
|
169
|
-
const clientAssets =
|
|
165
|
+
const clientAssets = d.clientAssets;
|
|
170
166
|
if (!clientAssets) return;
|
|
171
167
|
if (ctx.host.mountConnectionMeta) await ctx.host.mountConnectionMeta(base);
|
|
172
168
|
else diagnostics.DF8106({
|
|
@@ -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/build.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY } from "../constants-
|
|
2
|
-
import { t as createHubContext, y as diagnostics } from "../context-
|
|
3
|
-
import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-
|
|
4
|
-
import { joinURL } from "
|
|
1
|
+
import { a as normalizeHubBase, i as DOCK_RENDERERS_STATE_KEY } from "../constants-BSPQmlA1.mjs";
|
|
2
|
+
import { t as createHubContext, y as diagnostics } from "../context-D8hVUxvy.mjs";
|
|
3
|
+
import { i as resolveRendererRegistrations, n as renderClientImportsModule, r as resolveDevframesInput, t as mountDevframes } from "../assemble-CMhUmA7k.mjs";
|
|
4
|
+
import { joinURL } from "devframe/utils/url";
|
|
5
5
|
import { DEVFRAME_CONNECTION_META_FILENAME, DEVFRAME_DOCK_IMPORTS_FILENAME } from "devframe/constants";
|
|
6
6
|
import { existsSync } from "node:fs";
|
|
7
7
|
import fs from "node:fs/promises";
|
|
@@ -100,7 +100,7 @@ async function createAndMountContext(options, base, cwd) {
|
|
|
100
100
|
});
|
|
101
101
|
const devframes = await resolveDevframesInput(options.devframes ?? []);
|
|
102
102
|
for (const input of options.services ?? []) ctx.services.install(input);
|
|
103
|
-
const setups = await mountDevframes(ctx, devframes, base
|
|
103
|
+
const setups = await mountDevframes(ctx, devframes, base);
|
|
104
104
|
await ctx.services.ready();
|
|
105
105
|
for (const run of setups) await run();
|
|
106
106
|
return ctx;
|
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
|