@crvouga/mockingbird-service-otel 1.6.0 → 1.6.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 +9 -1
- package/dist/{chunk-P4R277MR.js → chunk-7NMCPJIF.js} +2 -2
- package/dist/{chunk-RBLBWTGH.js → chunk-7RKIGFVE.js} +89 -10
- package/dist/chunk-7RKIGFVE.js.map +7 -0
- package/dist/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/server.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-RBLBWTGH.js.map +0 -7
- /package/dist/{chunk-P4R277MR.js.map → chunk-7NMCPJIF.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Changelog — @crvouga/mockingbird-service-otel
|
|
2
2
|
|
|
3
|
-
## 1.6.
|
|
3
|
+
## 1.6.1 (2026-09-30)
|
|
4
|
+
|
|
5
|
+
### Fixes and improvements
|
|
6
|
+
|
|
7
|
+
- keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
|
|
8
|
+
- size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
|
|
9
|
+
- keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
|
|
10
|
+
|
|
11
|
+
## 1.6.0 (2026-09-29)
|
|
4
12
|
|
|
5
13
|
### Features
|
|
6
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7RKIGFVE.js";
|
|
4
4
|
|
|
5
5
|
// ../../adapters/node/dist/cli.js
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
@@ -367,4 +367,4 @@ export {
|
|
|
367
367
|
createServer2 as createServer,
|
|
368
368
|
serveTarget
|
|
369
369
|
};
|
|
370
|
-
//# sourceMappingURL=chunk-
|
|
370
|
+
//# sourceMappingURL=chunk-7NMCPJIF.js.map
|
|
@@ -2087,6 +2087,50 @@ function bootAdmin(config) {
|
|
|
2087
2087
|
if (render)
|
|
2088
2088
|
await render();
|
|
2089
2089
|
}
|
|
2090
|
+
const delay = (ms) => new Promise((resolve) => {
|
|
2091
|
+
window.setTimeout(resolve, ms);
|
|
2092
|
+
});
|
|
2093
|
+
const confirmAction = async (button, pending, done, work) => {
|
|
2094
|
+
if (button.dataset.pending === "1")
|
|
2095
|
+
return;
|
|
2096
|
+
const label = button.textContent ?? "";
|
|
2097
|
+
const width = button.offsetWidth;
|
|
2098
|
+
button.dataset.pending = "1";
|
|
2099
|
+
button.classList.add("pressed");
|
|
2100
|
+
button.setAttribute("aria-busy", "true");
|
|
2101
|
+
button.style.minWidth = `${width}px`;
|
|
2102
|
+
button.textContent = pending;
|
|
2103
|
+
try {
|
|
2104
|
+
await work();
|
|
2105
|
+
button.textContent = done;
|
|
2106
|
+
await delay(1e3);
|
|
2107
|
+
} catch (error) {
|
|
2108
|
+
showError(error);
|
|
2109
|
+
} finally {
|
|
2110
|
+
button.textContent = label;
|
|
2111
|
+
button.style.minWidth = "";
|
|
2112
|
+
button.classList.remove("pressed");
|
|
2113
|
+
button.removeAttribute("aria-busy");
|
|
2114
|
+
delete button.dataset.pending;
|
|
2115
|
+
}
|
|
2116
|
+
};
|
|
2117
|
+
document.addEventListener("click", (event) => {
|
|
2118
|
+
const target = event.target;
|
|
2119
|
+
if (!(target instanceof Element))
|
|
2120
|
+
return;
|
|
2121
|
+
const button = target.closest("button");
|
|
2122
|
+
if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
|
|
2123
|
+
return;
|
|
2124
|
+
button.classList.add("pressed");
|
|
2125
|
+
const token = String(Date.now());
|
|
2126
|
+
button.dataset.press = token;
|
|
2127
|
+
window.setTimeout(() => {
|
|
2128
|
+
if (button.dataset.press !== token || button.dataset.pending === "1")
|
|
2129
|
+
return;
|
|
2130
|
+
button.classList.remove("pressed");
|
|
2131
|
+
delete button.dataset.press;
|
|
2132
|
+
}, 450);
|
|
2133
|
+
});
|
|
2090
2134
|
el("namespace", HTMLSelectElement).addEventListener("change", () => {
|
|
2091
2135
|
state.namespace = el("namespace", HTMLSelectElement).value;
|
|
2092
2136
|
refresh().catch(showError);
|
|
@@ -2097,7 +2141,7 @@ function bootAdmin(config) {
|
|
|
2097
2141
|
refresh().catch(showError);
|
|
2098
2142
|
});
|
|
2099
2143
|
el("refresh", HTMLButtonElement).addEventListener("click", () => {
|
|
2100
|
-
refresh().catch(showError);
|
|
2144
|
+
confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
|
|
2101
2145
|
});
|
|
2102
2146
|
el("collections", HTMLElement).addEventListener("click", (event) => {
|
|
2103
2147
|
const target = event.target;
|
|
@@ -2220,10 +2264,10 @@ function bootAdmin(config) {
|
|
|
2220
2264
|
}).then(() => renderFaults()).catch(showError);
|
|
2221
2265
|
});
|
|
2222
2266
|
el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2223
|
-
api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
|
|
2267
|
+
confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
|
|
2224
2268
|
});
|
|
2225
2269
|
el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
|
|
2226
|
-
api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
|
|
2270
|
+
confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
|
|
2227
2271
|
});
|
|
2228
2272
|
el("route-list", HTMLElement).addEventListener("click", (event) => {
|
|
2229
2273
|
const target = event.target;
|
|
@@ -2338,9 +2382,13 @@ function bootAdmin(config) {
|
|
|
2338
2382
|
var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
|
|
2339
2383
|
var adminClientSource = (config) => {
|
|
2340
2384
|
const payload = JSON.stringify(config).replace(/</g, "\\u003c");
|
|
2385
|
+
const entry = bootAdmin.name;
|
|
2386
|
+
if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
|
|
2387
|
+
throw new Error("admin client cannot call its boot function");
|
|
2388
|
+
}
|
|
2341
2389
|
return `<script>
|
|
2342
2390
|
${clientPrelude}
|
|
2343
|
-
|
|
2391
|
+
${entry}(${payload});
|
|
2344
2392
|
</script>`;
|
|
2345
2393
|
};
|
|
2346
2394
|
|
|
@@ -2554,9 +2602,24 @@ var renderAdminDocument = (service) => {
|
|
|
2554
2602
|
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
|
2555
2603
|
label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
|
|
2556
2604
|
label.field input, label.field select, .controls input[type="password"] {
|
|
2557
|
-
background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2558
|
-
padding: 7px 8px; min-height: 36px;
|
|
2559
|
-
}
|
|
2605
|
+
background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
|
|
2606
|
+
padding: 7px 8px; min-height: 36px; line-height: 1.2;
|
|
2607
|
+
}
|
|
2608
|
+
/* A native menu ignores min-height, so Preset rendered about half as tall as
|
|
2609
|
+
the text fields in the same form. Paint it like those fields. */
|
|
2610
|
+
label.field select {
|
|
2611
|
+
-webkit-appearance: none; appearance: none;
|
|
2612
|
+
padding-right: 28px;
|
|
2613
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
|
|
2614
|
+
background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
|
|
2615
|
+
}
|
|
2616
|
+
.stack > .field > input,
|
|
2617
|
+
.stack > .field > select,
|
|
2618
|
+
.stack > .field > textarea,
|
|
2619
|
+
dialog .field > input,
|
|
2620
|
+
dialog .field > select,
|
|
2621
|
+
dialog .field > textarea { width: 100%; }
|
|
2622
|
+
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
|
|
2560
2623
|
.icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
|
|
2561
2624
|
border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
|
|
2562
2625
|
background: var(--bg-elev);
|
|
@@ -2564,6 +2627,14 @@ var renderAdminDocument = (service) => {
|
|
|
2564
2627
|
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
|
|
2565
2628
|
.btn-quiet { background: transparent; }
|
|
2566
2629
|
.btn-danger { color: var(--err); }
|
|
2630
|
+
/* Held after mouseup. Clearing an empty journal changes nothing on screen,
|
|
2631
|
+
so the press itself has to stay visible. */
|
|
2632
|
+
.icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
|
|
2633
|
+
.icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
|
|
2634
|
+
background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
|
|
2635
|
+
}
|
|
2636
|
+
.btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
|
|
2637
|
+
.btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
|
|
2567
2638
|
/* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
|
|
2568
2639
|
record or the full nav row would widen the page past the viewport. */
|
|
2569
2640
|
.layout {
|
|
@@ -2652,8 +2723,16 @@ var renderAdminDocument = (service) => {
|
|
|
2652
2723
|
input, select, textarea { font-size: 16px; }
|
|
2653
2724
|
.brand, .vendor, .controls { width: 100%; }
|
|
2654
2725
|
label.field, label.field select, label.field input { flex: 1; min-width: 0; }
|
|
2655
|
-
|
|
2726
|
+
/* The layout fills the screen. A single-column grid stretches every auto
|
|
2727
|
+
row, so the tab bar grew with the leftover height and the buttons floated
|
|
2728
|
+
in the middle of it. The bar stays one row; the page below takes the rest. */
|
|
2729
|
+
.layout {
|
|
2730
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2731
|
+
grid-template-rows: auto minmax(0, 1fr);
|
|
2732
|
+
align-content: start;
|
|
2733
|
+
}
|
|
2656
2734
|
nav.side {
|
|
2735
|
+
align-self: start; height: auto;
|
|
2657
2736
|
flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
|
|
2658
2737
|
border-right: 0; border-bottom: 1px solid var(--line);
|
|
2659
2738
|
padding: 8px;
|
|
@@ -3447,7 +3526,7 @@ var stateAdminRoutes = (routes) => {
|
|
|
3447
3526
|
};
|
|
3448
3527
|
|
|
3449
3528
|
// ../core/dist/version.js
|
|
3450
|
-
var PACKAGE_VERSION = true ? "1.6.
|
|
3529
|
+
var PACKAGE_VERSION = true ? "1.6.1" : UNRELEASED_VERSION;
|
|
3451
3530
|
|
|
3452
3531
|
// ../core/dist/webhooks.js
|
|
3453
3532
|
var json4 = (status, body) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } });
|
|
@@ -5790,4 +5869,4 @@ export {
|
|
|
5790
5869
|
OtelAPI,
|
|
5791
5870
|
adminRow
|
|
5792
5871
|
};
|
|
5793
|
-
//# sourceMappingURL=chunk-
|
|
5872
|
+
//# sourceMappingURL=chunk-7RKIGFVE.js.map
|