@dunx/dashboard 3.2.0 → 3.2.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/ui.js +2 -3
- package/package.json +3 -3
package/dist/ui.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-66xm1dzm.js";
|
|
5
5
|
|
|
6
6
|
// src/html.ts
|
|
7
|
+
import { embedJson } from "@dunx/http/internal";
|
|
7
8
|
var BOOT = `
|
|
8
9
|
:root { color-scheme: light dark; }
|
|
9
10
|
html, body { margin: 0; padding: 0; background: #fff; }
|
|
@@ -16,12 +17,10 @@ html, body { margin: 0; padding: 0; background: #fff; }
|
|
|
16
17
|
.no-js { padding: 3rem 1.5rem; text-align: center;
|
|
17
18
|
font: 15px/1.6 ui-sans-serif, system-ui, sans-serif; }
|
|
18
19
|
`;
|
|
19
|
-
var escape = (value) => Bun.escapeHTML(value);
|
|
20
|
-
var embed = (model) => JSON.stringify(model).replaceAll("<", "\\u003c");
|
|
21
20
|
var META_ELEMENT_ID = "dunx-dashboard-meta";
|
|
22
21
|
var renderShell = (options, ui, favicon) => {
|
|
23
22
|
const title = `${options.title} dashboard`;
|
|
24
|
-
return '<!doctype html><html lang="en"><head><meta charset="utf-8">' + '<meta name="viewport" content="width=device-width, initial-scale=1">' + '<meta name="robots" content="noindex, nofollow">' + '<meta name="referrer" content="no-referrer">' + `<title>${
|
|
23
|
+
return '<!doctype html><html lang="en"><head><meta charset="utf-8">' + '<meta name="viewport" content="width=device-width, initial-scale=1">' + '<meta name="robots" content="noindex, nofollow">' + '<meta name="referrer" content="no-referrer">' + `<title>${Bun.escapeHTML(title)}</title>` + `<link rel="icon" type="image/svg+xml" href="${Bun.escapeHTML(favicon)}">` + `<style>${BOOT}</style></head><body><div id="root"></div>` + '<noscript><p class="no-js">This dashboard needs JavaScript. Every panel ' + `also answers as JSON under <code>${Bun.escapeHTML(options.path)}/api</code>.</p></noscript>` + `<script type="application/json" id="${META_ELEMENT_ID}">` + `${embedJson(metaOf(options))}</script>` + `<script>${ui}</script></body></html>`;
|
|
25
24
|
};
|
|
26
25
|
|
|
27
26
|
// src/ui-bundle.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dunx/dashboard",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "An opt-in operations page for a running dunx app: routes, the provider graph, gateways, config and runtime health, with bull-board mounted for the queues",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bull-board",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"@bull-board/api": "^8.6.0",
|
|
66
66
|
"@bull-board/bun": "^8.6.0",
|
|
67
67
|
"@bull-board/ui": "^8.6.0",
|
|
68
|
-
"@dunx/core": "^3.2.
|
|
69
|
-
"@dunx/http": "^3.2.
|
|
68
|
+
"@dunx/core": "^3.2.1",
|
|
69
|
+
"@dunx/http": "^3.2.1",
|
|
70
70
|
"@types/bun": ">=1.3.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependenciesMeta": {
|