@dominevo/addon-admin-ui 0.1.0 → 0.1.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/CHANGELOG.md +7 -0
- package/dist/assets/{Addons-B_GcPZgg.js → Addons-DXj_703d.js} +3 -3
- package/dist/assets/{AdminPage-Cy0Hlqrw.js → AdminPage-CA4Sxydy.js} +1 -1
- package/dist/assets/{AdminSectionedPage-Cyf_oaxf.js → AdminSectionedPage-3XsaKUPh.js} +1 -1
- package/dist/assets/{AiProfiles-BwmLsTsc.js → AiProfiles-BPuugVHP.js} +1 -1
- package/dist/assets/{Archive-CMb_EiSA.js → Archive-Cs7NaNc_.js} +1 -1
- package/dist/assets/{BootstrapSettingsForm-g-uhhdRB.js → BootstrapSettingsForm-B7n4Tn8W.js} +1 -1
- package/dist/assets/{Build-eZuH-uBL.js → Build-D7v3yZ31.js} +1 -1
- package/dist/assets/{Calendars-DDbpjPON.js → Calendars-5ikY87Kt.js} +1 -1
- package/dist/assets/{Cluster-Da9vleGf.js → Cluster-CMcu7Iqn.js} +1 -1
- package/dist/assets/{CompositionBlockEditor-B6d7pAgH.js → CompositionBlockEditor-BP9BOpRr.js} +2 -2
- package/dist/assets/{CompositionEditorPage-Bjhg5ty4.js → CompositionEditorPage-D_4Dx_8C.js} +1 -1
- package/dist/assets/{Data-CoPymLmU.js → Data-Dlx9uZ0Q.js} +1 -1
- package/dist/assets/DeviceDetail-DJXx7Dh3.js +1 -0
- package/dist/assets/{Devices-Clym16mI.js → Devices-DJd001mb.js} +1 -1
- package/dist/assets/EmbedDevicePage-Cxe3_S-n.js +1 -0
- package/dist/assets/EmbedPlayerPage-BKq1BRg_.js +1 -0
- package/dist/assets/{FormBuilder-IsyNJFZJ.js → FormBuilder-BjcOGVVa.js} +1 -1
- package/dist/assets/{History-Cxu6A7W4.js → History-CqTLHyoj.js} +1 -1
- package/dist/assets/{Identity-BdVuMade.js → Identity-CELdhZ4o.js} +1 -1
- package/dist/assets/{InstancesTable-D73WwV7t.js → InstancesTable-DVnHkIbJ.js} +1 -1
- package/dist/assets/{IntegrationDetail-1zQcDDrK.js → IntegrationDetail-BlopkLuy.js} +1 -1
- package/dist/assets/{Integrations-BnFUd4mG.js → Integrations-BOr-rN3Z.js} +1 -1
- package/dist/assets/{Integrations-BeYh1QBu.js → Integrations-C8TECl9Z.js} +1 -1
- package/dist/assets/{Jobs-S9NgHLBc.js → Jobs-DnObAnQR.js} +1 -1
- package/dist/assets/{Library-B9aczX77.js → Library-sG9Ie6Ay.js} +1 -1
- package/dist/assets/{Locations-YV2IEkCM.js → Locations-Dh63x-8T.js} +1 -1
- package/dist/assets/{Logs-D_rTJW5O.js → Logs-B3LPrdqh.js} +1 -1
- package/dist/assets/{MaskShapeCanvas-QeHdurNy.js → MaskShapeCanvas-T6ZNfW4J.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DqSgWBqG.js → MotionZonesSettings-B5KDfHoK.js} +1 -1
- package/dist/assets/{MyAccess-DIkZLp-T.js → MyAccess-WIUGe7rE.js} +1 -1
- package/dist/assets/{Network-Cnzu95Od.js → Network--neqNeoA.js} +1 -1
- package/dist/assets/{NewExportModal-Ci35Hza9.js → NewExportModal-D64AhGe8.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BrbWHDXZ.js → NodeAddonsSettingsPanel-Bc_UiSsk.js} +1 -1
- package/dist/assets/Notifications-I66jIXko.js +1 -0
- package/dist/assets/{Pipeline-qOg4XR2i.js → Pipeline-DX80qRVf.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-lyXsRvjs.js → PrivacyMaskSettings-CERwQtiu.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-3X1N_Zzg.js → SceneMonitorEditor-DxTYd8U2.js} +1 -1
- package/dist/assets/{SessionsList-BBLFllCq.js → SessionsList-BoOCsi8N.js} +1 -1
- package/dist/assets/{Showroom-Dt4sqjQ4.js → Showroom-Dkom3it5.js} +1 -1
- package/dist/assets/{StorageLocationsTable-tjGQ6sFA.js → StorageLocationsTable-CujqHG2j.js} +1 -1
- package/dist/assets/{System-Co-lErWN.js → System-PnjU9olQ.js} +1 -1
- package/dist/assets/{TemplateEditorDialog-C_wnE2XS.js → TemplateEditorDialog-B_8g2CrL.js} +1 -1
- package/dist/assets/{Terminal-GGV-4LpZ.js → Terminal-BVqOTvEA.js} +1 -1
- package/dist/assets/{TrainingProviders-CTKgh54Z.js → TrainingProviders-5e1QS5zN.js} +1 -1
- package/dist/assets/{Viewer-o-5Yx_Z-.js → Viewer-CyLueECm.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DET6LKET.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-Cc7iYWcG.js} +1 -1
- package/dist/assets/{ai-page.helpers-D3IdbvIN.js → ai-page.helpers-CiDsxXp3.js} +1 -1
- package/dist/assets/{assignment-candidates-BuZUcPHA.js → assignment-candidates-BfhoJg-T.js} +1 -1
- package/dist/assets/{auth-context-D7WimVyk.js → auth-context-CkfOTCG-.js} +1 -1
- package/dist/assets/{authed-media-CAMmxmIa.js → authed-media-C-zK1a1B.js} +1 -1
- package/dist/assets/{board-model-vUxvnXlS.js → board-model-BvqJSvTB.js} +1 -1
- package/dist/assets/{broker-oauth-popup-DoGeZWOR.js → broker-oauth-popup-B_GRcwxo.js} +1 -1
- package/dist/assets/{camera-block-model-wKfhIPM1.js → camera-block-model-QrJ_0XZY.js} +1 -1
- package/dist/assets/compat-muhdrMna.js +64 -0
- package/dist/assets/{device-integration-icon-DyMMisMz.js → device-integration-icon-D9fVWv4K.js} +1 -1
- package/dist/assets/device-picker-model-CYNi1aEm.js +1 -0
- package/dist/assets/{dist-cYE4Jx2-.js → dist-2ETbjdqB.js} +1 -1
- package/dist/assets/dist-B0ixn42U.js +1326 -0
- package/dist/assets/{format-Bo94cUyo.js → format-D43HvBR0.js} +1 -1
- package/dist/assets/{hostInit-BAJfwZtn.js → hostInit-BjOFEl3v.js} +1 -1
- package/dist/assets/{i18n-g8Fd49Vu.js → i18n-BHLBFC1-.js} +1 -1
- package/dist/assets/{icons-DFpDlM4_.js → icons-CNI0rnl8.js} +1 -1
- package/dist/assets/{index-BN3HzZ11.js → index-C1r-vzdu.js} +4 -4
- package/dist/assets/index-CyIIY_ZD.css +2 -0
- package/dist/assets/{linked-devices-model-BDA6pKP_.js → linked-devices-model-Dl4vHeXt.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-660bf7ef.js → mf-entry-bootstrap-0-64d22ef4.js} +2 -2
- package/dist/assets/mount-CYNi1aEm.js +1 -0
- package/dist/assets/{notification-rule-status-BcELEBcO.js → notification-rule-status-T3SwZb2I.js} +1 -1
- package/dist/assets/{player-overlays-CtaighPh.js → player-overlays-qzCoRsrQ.js} +1 -1
- package/dist/assets/remoteEntry-Dc97BJQ9.js +1 -0
- package/dist/assets/src-CJoX3s-1.js +1326 -0
- package/dist/assets/src-Cf1Uvi4o.js +289 -0
- package/dist/assets/{sso-popup-zoeFkFmc.js → sso-popup-CPavla3I.js} +1 -1
- package/dist/assets/{step-inspector-model-DX_ifTOn.js → step-inspector-model-CMrG9Xaa.js} +1 -1
- package/dist/assets/{use-scenes-feed-DGzhHlOE.js → use-scenes-feed-CosaOMpn.js} +1 -1
- package/dist/assets/{useAdminDeviceRemoval-Cgjyp11U.js → useAdminDeviceRemoval-bOibMOT6.js} +1 -1
- package/dist/assets/{useDevice-ukTZkHFj.js → useDevice-JbC1lVOL.js} +1 -1
- package/dist/assets/useEventInvalidation-CYNi1aEm.js +1 -0
- package/dist/assets/{useFaultTypeOptions-A-AeenGT.js → useFaultTypeOptions-BCjpEaI1.js} +1 -1
- package/dist/assets/{useNodeUrlSelection-DusZi3D9.js → useNodeUrlSelection-DBU1LRHP.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-MJWzvEFZ.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BZ1YRJXZ.js} +2 -2
- package/dist/index.html +17 -17
- package/dist/server/addon.js +154 -29
- package/package.json +8 -8
- package/dist/assets/DeviceDetail-CMMwA8Es.js +0 -1
- package/dist/assets/EmbedDevicePage-D75EmreE.js +0 -1
- package/dist/assets/EmbedPlayerPage-CWNw4o1J.js +0 -1
- package/dist/assets/Notifications-CkrjKG7-.js +0 -1
- package/dist/assets/__vite-browser-external-DIbVKiho.js +0 -64
- package/dist/assets/device-picker-model-xzrEHV_a.js +0 -1
- package/dist/assets/dist-Dk8KbW2q.js +0 -1327
- package/dist/assets/index-UUDT8A1I.css +0 -2
- package/dist/assets/mount-xzrEHV_a.js +0 -1
- package/dist/assets/remoteEntry-DThl5dZH.js +0 -1
- package/dist/assets/src-CLFOv5WF.js +0 -1327
- package/dist/assets/src-Nh32OK3s.js +0 -299
- package/dist/assets/useEventInvalidation-xzrEHV_a.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -4441,7 +4441,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
4441
4441
|
EventCategory["AddonLoadRecovered"] = "addon.load-recovered";
|
|
4442
4442
|
/**
|
|
4443
4443
|
* An addon is RUNNING although its installed package is below what the
|
|
4444
|
-
* running server requires (`
|
|
4444
|
+
* running server requires (`dominevo.requires.addons` of the server, or the
|
|
4445
4445
|
* addon's own `requires.server`). Raised once per streak by the unsupported-
|
|
4446
4446
|
* addon tracker, on the hub and on agents; AlertCenter turns it into one
|
|
4447
4447
|
* operator alert per node and package. The addon is never held back for it.
|
|
@@ -4929,7 +4929,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
4929
4929
|
*/
|
|
4930
4930
|
EventCategory["MetricsNodeResourcesSnapshot"] = "metrics.node-resources-snapshot";
|
|
4931
4931
|
/**
|
|
4932
|
-
* Periodic per-node process-tree snapshot (
|
|
4932
|
+
* Periodic per-node process-tree snapshot (dominevo-related pids
|
|
4933
4933
|
* with root / managed / system classification). Emitted ~0.2 Hz by
|
|
4934
4934
|
* the metrics-provider addon. Drives the Cluster → Processes tab
|
|
4935
4935
|
* without polling `metricsProvider.listNodeProcesses`.
|
|
@@ -5339,7 +5339,7 @@ function classifySecretWrite(incoming) {
|
|
|
5339
5339
|
if (isSecretClear(incoming)) return { kind: "clear" };
|
|
5340
5340
|
if (typeof incoming !== "string") return { kind: "keep" };
|
|
5341
5341
|
if (incoming.length === 0) return { kind: "keep" };
|
|
5342
|
-
if (incoming === "
|
|
5342
|
+
if (incoming === "__dominevo_redacted__" || incoming === LEGACY_DEVICE_REDACTION) return { kind: "keep" };
|
|
5343
5343
|
return {
|
|
5344
5344
|
kind: "set",
|
|
5345
5345
|
value: incoming
|
|
@@ -8104,26 +8104,6 @@ var BaseAddon = class {
|
|
|
8104
8104
|
} catch {}
|
|
8105
8105
|
}
|
|
8106
8106
|
/**
|
|
8107
|
-
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
8108
|
-
*
|
|
8109
|
-
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
8110
|
-
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
8111
|
-
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
8112
|
-
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
8113
|
-
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
8114
|
-
* whose real data dir differs (e.g. the macOS electron agent).
|
|
8115
|
-
*
|
|
8116
|
-
* `node:path`/`node:fs` are imported dynamically so the `@dominevo/types` root
|
|
8117
|
-
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
8118
|
-
*/
|
|
8119
|
-
async resolveModelsDir() {
|
|
8120
|
-
const { join } = await import("node:path");
|
|
8121
|
-
const { promises: fsp } = await import("node:fs");
|
|
8122
|
-
const dir = join(this.ctx.nodeDataDir, "models");
|
|
8123
|
-
await fsp.mkdir(dir, { recursive: true });
|
|
8124
|
-
return dir;
|
|
8125
|
-
}
|
|
8126
|
-
/**
|
|
8127
8107
|
* Access the runtime capability registry for in-process provider lookups.
|
|
8128
8108
|
* Returns null if the registry is not available (e.g. on agents).
|
|
8129
8109
|
* Used by addons that consume other capabilities directly (snapshot, stream-broker, enrichment).
|
|
@@ -8538,14 +8518,14 @@ function collectFieldKeys(fields) {
|
|
|
8538
8518
|
return collected;
|
|
8539
8519
|
}
|
|
8540
8520
|
/**
|
|
8541
|
-
* Normalize an `
|
|
8521
|
+
* Normalize an `IDominevoAddon.initialize()` return value into the
|
|
8542
8522
|
* `AddonInitResult` envelope. Arrays are wrapped into `{ providers }`;
|
|
8543
8523
|
* envelopes pass through; void stays void.
|
|
8544
8524
|
*
|
|
8545
8525
|
* Exported so the kernel boot path and the backend addon registry can
|
|
8546
8526
|
* share the same normalizer instead of duplicating the shim. Addons that
|
|
8547
8527
|
* extend `BaseAddon` already emit the envelope, so this helper is only a
|
|
8548
|
-
* safety net for direct `
|
|
8528
|
+
* safety net for direct `IDominevoAddon` implementations (mostly tests).
|
|
8549
8529
|
*/
|
|
8550
8530
|
function normalizeAddonInitResult(result) {
|
|
8551
8531
|
if (result == null) return;
|
|
@@ -8696,6 +8676,142 @@ var appSourceCapability = {
|
|
|
8696
8676
|
vocabulary: { notOperatorFacing: NOT_A_DEVICE.UI_PLUMBING }
|
|
8697
8677
|
};
|
|
8698
8678
|
//#endregion
|
|
8679
|
+
//#region src/lib/addon-pages-flatten.ts
|
|
8680
|
+
/**
|
|
8681
|
+
* Flatten the nested tRPC response into a flat AddonPageInfo, de-duplicating
|
|
8682
|
+
* by `(addonId, page.id)`.
|
|
8683
|
+
*
|
|
8684
|
+
* The hub aggregator already collapses pages reported by multiple nodes, but
|
|
8685
|
+
* `addon-pages-source` is a collection cap: an addon deployed on the hub-local
|
|
8686
|
+
* child AND a remote agent registers one provider per node, each reporting the
|
|
8687
|
+
* same addon id + page declaration. This frontend dedup is a defensive guard
|
|
8688
|
+
* (e.g. against a stale cached response served before a hub redeploy) so the
|
|
8689
|
+
* sidebar never renders the same page twice with duplicate React keys.
|
|
8690
|
+
*/
|
|
8691
|
+
function flattenPages(raw) {
|
|
8692
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8693
|
+
const seenPaths = /* @__PURE__ */ new Set();
|
|
8694
|
+
const owns = (item) => item.page.remoteName.includes(item.addonId.replace(/[^a-zA-Z0-9]+/g, "_"));
|
|
8695
|
+
const ordered = [...raw.filter(owns), ...raw.filter((item) => !owns(item))];
|
|
8696
|
+
const out = [];
|
|
8697
|
+
for (const item of ordered) {
|
|
8698
|
+
const key = `${item.addonId}::${item.page.id}`;
|
|
8699
|
+
if (seen.has(key)) continue;
|
|
8700
|
+
if (seenPaths.has(item.page.path)) continue;
|
|
8701
|
+
seen.add(key);
|
|
8702
|
+
seenPaths.add(item.page.path);
|
|
8703
|
+
out.push({
|
|
8704
|
+
id: item.page.id,
|
|
8705
|
+
addonId: item.addonId,
|
|
8706
|
+
label: item.page.label,
|
|
8707
|
+
icon: item.page.icon,
|
|
8708
|
+
path: item.page.path,
|
|
8709
|
+
remoteName: item.page.remoteName,
|
|
8710
|
+
bundle: item.page.bundle,
|
|
8711
|
+
bundleUrl: item.bundleUrl,
|
|
8712
|
+
...item.page.section !== void 0 ? { section: item.page.section } : {},
|
|
8713
|
+
...item.page.sectionLabel !== void 0 ? { sectionLabel: item.page.sectionLabel } : {}
|
|
8714
|
+
});
|
|
8715
|
+
}
|
|
8716
|
+
return out;
|
|
8717
|
+
}
|
|
8718
|
+
//#endregion
|
|
8719
|
+
//#region src/lib/addon-page-sections.ts
|
|
8720
|
+
var WELL_KNOWN_PAGE_SECTIONS = [
|
|
8721
|
+
"detection",
|
|
8722
|
+
"cluster",
|
|
8723
|
+
"administration"
|
|
8724
|
+
];
|
|
8725
|
+
function isWellKnown(section) {
|
|
8726
|
+
return WELL_KNOWN_PAGE_SECTIONS.includes(section);
|
|
8727
|
+
}
|
|
8728
|
+
function partitionAddonPages(pages) {
|
|
8729
|
+
const known = /* @__PURE__ */ new Map();
|
|
8730
|
+
const custom = /* @__PURE__ */ new Map();
|
|
8731
|
+
const ungrouped = [];
|
|
8732
|
+
for (const page of pages) {
|
|
8733
|
+
const section = page.section?.trim();
|
|
8734
|
+
if (section === void 0 || section.length === 0) {
|
|
8735
|
+
ungrouped.push(page);
|
|
8736
|
+
continue;
|
|
8737
|
+
}
|
|
8738
|
+
if (isWellKnown(section)) {
|
|
8739
|
+
const bucket = known.get(section) ?? [];
|
|
8740
|
+
bucket.push(page);
|
|
8741
|
+
known.set(section, bucket);
|
|
8742
|
+
continue;
|
|
8743
|
+
}
|
|
8744
|
+
const existing = custom.get(section);
|
|
8745
|
+
if (existing) existing.pages.push(page);
|
|
8746
|
+
else custom.set(section, {
|
|
8747
|
+
label: page.sectionLabel?.trim() || section,
|
|
8748
|
+
pages: [page]
|
|
8749
|
+
});
|
|
8750
|
+
}
|
|
8751
|
+
return {
|
|
8752
|
+
known,
|
|
8753
|
+
custom: [...custom.entries()].map(([id, entry]) => ({
|
|
8754
|
+
id,
|
|
8755
|
+
label: entry.label,
|
|
8756
|
+
pages: entry.pages
|
|
8757
|
+
})),
|
|
8758
|
+
ungrouped
|
|
8759
|
+
};
|
|
8760
|
+
}
|
|
8761
|
+
/** The id of the nav section a custom addon section becomes. */
|
|
8762
|
+
var CUSTOM_SECTION_PREFIX = "addon-section:";
|
|
8763
|
+
/** The id of the nav section the legacy "no section" pages become. */
|
|
8764
|
+
var UNGROUPED_PAGES_SECTION_ID = "addon-pages";
|
|
8765
|
+
function pageNavItem(page) {
|
|
8766
|
+
return {
|
|
8767
|
+
id: page.path,
|
|
8768
|
+
label: {
|
|
8769
|
+
key: `addonPage.${page.addonId}.${page.id}`,
|
|
8770
|
+
fallback: page.label
|
|
8771
|
+
},
|
|
8772
|
+
icon: page.icon,
|
|
8773
|
+
path: page.path,
|
|
8774
|
+
adminOnly: true
|
|
8775
|
+
};
|
|
8776
|
+
}
|
|
8777
|
+
/**
|
|
8778
|
+
* The admin sidebar's grouping of addon pages, as nav sections for the shell:
|
|
8779
|
+
* well-known `section` ids dock into the built-in section of that id, custom
|
|
8780
|
+
* ones become their own section, pages with no `section` join "Addon Pages".
|
|
8781
|
+
* Built-in sections come back untouched when no page targets them.
|
|
8782
|
+
*/
|
|
8783
|
+
function appendAddonPageNav(base, pages) {
|
|
8784
|
+
const parts = partitionAddonPages(pages);
|
|
8785
|
+
const docked = base.map((section) => {
|
|
8786
|
+
const extra = isWellKnown(section.id) ? parts.known.get(section.id) ?? [] : [];
|
|
8787
|
+
return extra.length === 0 ? section : {
|
|
8788
|
+
...section,
|
|
8789
|
+
items: [...section.items, ...extra.map(pageNavItem)]
|
|
8790
|
+
};
|
|
8791
|
+
});
|
|
8792
|
+
const custom = parts.custom.map((section) => ({
|
|
8793
|
+
id: `${CUSTOM_SECTION_PREFIX}${section.id}`,
|
|
8794
|
+
label: {
|
|
8795
|
+
key: `addonSection.${section.id}`,
|
|
8796
|
+
fallback: section.label
|
|
8797
|
+
},
|
|
8798
|
+
items: section.pages.map(pageNavItem)
|
|
8799
|
+
}));
|
|
8800
|
+
const ungrouped = parts.ungrouped.length === 0 ? [] : [{
|
|
8801
|
+
id: UNGROUPED_PAGES_SECTION_ID,
|
|
8802
|
+
label: {
|
|
8803
|
+
key: "nav.addonPages",
|
|
8804
|
+
fallback: "Addon Pages"
|
|
8805
|
+
},
|
|
8806
|
+
items: parts.ungrouped.map(pageNavItem)
|
|
8807
|
+
}];
|
|
8808
|
+
return [
|
|
8809
|
+
...docked,
|
|
8810
|
+
...custom,
|
|
8811
|
+
...ungrouped
|
|
8812
|
+
];
|
|
8813
|
+
}
|
|
8814
|
+
//#endregion
|
|
8699
8815
|
//#region src/lib/system-page-url.ts
|
|
8700
8816
|
/**
|
|
8701
8817
|
* The System page's address — the ONE builder for a link into one of its tabs.
|
|
@@ -8958,7 +9074,7 @@ function buildAdminNavManifest() {
|
|
|
8958
9074
|
//#endregion
|
|
8959
9075
|
//#region src/server/admin-app.ts
|
|
8960
9076
|
var ADMIN_APP_ID = "admin";
|
|
8961
|
-
function buildAdminApp() {
|
|
9077
|
+
function buildAdminApp(addonPages = []) {
|
|
8962
9078
|
return {
|
|
8963
9079
|
id: ADMIN_APP_ID,
|
|
8964
9080
|
label: {
|
|
@@ -8974,7 +9090,7 @@ function buildAdminApp() {
|
|
|
8974
9090
|
},
|
|
8975
9091
|
reach: { kind: "hub" },
|
|
8976
9092
|
adminOnly: true,
|
|
8977
|
-
nav: buildAdminNavManifest(),
|
|
9093
|
+
nav: appendAddonPageNav(buildAdminNavManifest(), flattenPages(addonPages)),
|
|
8978
9094
|
takesSharedSearch: true,
|
|
8979
9095
|
settings: null
|
|
8980
9096
|
};
|
|
@@ -8993,16 +9109,25 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
8993
9109
|
constructor() {
|
|
8994
9110
|
super({});
|
|
8995
9111
|
}
|
|
9112
|
+
/** Addon pages for the Shell drawer; a failed read leaves the built-in nav intact. */
|
|
9113
|
+
async readAddonPages() {
|
|
9114
|
+
try {
|
|
9115
|
+
return await this.ctx.api.addonPages.listPages.query();
|
|
9116
|
+
} catch (error) {
|
|
9117
|
+
this.ctx.logger.warn("addon pages unavailable — the Shell nav lists the built-in pages only", { meta: { error: error instanceof Error ? error.message : String(error) } });
|
|
9118
|
+
return [];
|
|
9119
|
+
}
|
|
9120
|
+
}
|
|
8996
9121
|
async onInitialize() {
|
|
8997
9122
|
return [{
|
|
8998
9123
|
capability: adminUiCapability,
|
|
8999
9124
|
provider: {
|
|
9000
9125
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
9001
|
-
getVersion: async () => ({ version: "0.1.
|
|
9126
|
+
getVersion: async () => ({ version: "0.1.1" })
|
|
9002
9127
|
}
|
|
9003
9128
|
}, {
|
|
9004
9129
|
capability: appSourceCapability,
|
|
9005
|
-
provider: { listApps: async () => [buildAdminApp()] }
|
|
9130
|
+
provider: { listApps: async () => [buildAdminApp(await this.readAddonPages())] }
|
|
9006
9131
|
}];
|
|
9007
9132
|
}
|
|
9008
9133
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dominevo/addon-admin-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Admin UI — Vite frontend build and server-side addon",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/dominevo/server.git",
|
|
10
10
|
"directory": "packages/addon-admin-ui"
|
|
11
11
|
},
|
|
12
|
-
"homepage": "https://
|
|
12
|
+
"homepage": "https://dominevo.app/docs",
|
|
13
13
|
"bugs": {
|
|
14
14
|
"url": "https://github.com/dominevo/server/issues"
|
|
15
15
|
},
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"dominevo": {
|
|
31
31
|
"displayName": "Admin UI",
|
|
32
32
|
"addons": [
|
|
33
33
|
{
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"requires": {
|
|
56
|
-
"server": ">=0.1.
|
|
56
|
+
"server": ">=0.1.1"
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@dominevo/types": "
|
|
71
|
+
"@dominevo/types": "*"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
|
-
"@dominevo/sdk": "
|
|
75
|
-
"@dominevo/types": "
|
|
76
|
-
"@dominevo/ui-library": "
|
|
74
|
+
"@dominevo/sdk": "*",
|
|
75
|
+
"@dominevo/types": "*",
|
|
76
|
+
"@dominevo/ui-library": "*",
|
|
77
77
|
"@module-federation/runtime": "^2.4.0",
|
|
78
78
|
"@module-federation/vite": "^1.16.9",
|
|
79
79
|
"@monaco-editor/react": "^4.7.0",
|