@crvouga/mockingbird-service-easypost 1.6.0 → 1.7.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/CHANGELOG.md CHANGED
@@ -1,6 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-easypost
2
2
 
3
- ## 1.6.0 (2026-09-30)
3
+ ## 1.7.0 (2026-10-01)
4
+
5
+ ### Features
6
+
7
+ - record SQL timelines and serve the admin explorer ([8ced17a](https://github.com/crvouga/mockingbird/commit/8ced17ac398e386ef4e9d7e01fc7744c34b95d07))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 1.6.1 (2026-09-30)
14
+
15
+ ### Fixes and improvements
16
+
17
+ - keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
18
+ - size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
19
+ - keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
20
+
21
+ ## 1.6.0 (2026-09-29)
4
22
 
5
23
  ### Features
6
24
 
@@ -1917,6 +1917,167 @@ function faultPresetList(value) {
1917
1917
  })
1918
1918
  };
1919
1919
  }
1920
+ function mountSqlExplorer(root, api) {
1921
+ const cell = (value) => {
1922
+ if (value === null || value === void 0)
1923
+ return "";
1924
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1925
+ return String(value);
1926
+ }
1927
+ return JSON.stringify(value) ?? "";
1928
+ };
1929
+ root.replaceChildren();
1930
+ const layout = document.createElement("div");
1931
+ layout.className = "sql-layout";
1932
+ const tables = document.createElement("div");
1933
+ tables.className = "sql-tables";
1934
+ const stack = document.createElement("div");
1935
+ stack.className = "stack";
1936
+ const banner = document.createElement("p");
1937
+ banner.className = "banner";
1938
+ const grid = document.createElement("div");
1939
+ const input = document.createElement("textarea");
1940
+ input.className = "sql-input";
1941
+ input.spellcheck = false;
1942
+ input.placeholder = "SELECT * FROM ...";
1943
+ const actions = document.createElement("div");
1944
+ actions.className = "row-actions";
1945
+ const run = document.createElement("button");
1946
+ run.type = "button";
1947
+ run.textContent = "Run";
1948
+ actions.append(run);
1949
+ const result = document.createElement("pre");
1950
+ stack.append(banner, grid, input, actions, result);
1951
+ layout.append(tables, stack);
1952
+ root.append(layout);
1953
+ const showError = (error) => {
1954
+ banner.textContent = error instanceof Error ? error.message : String(error);
1955
+ banner.classList.add("show");
1956
+ };
1957
+ const clearError = () => {
1958
+ banner.textContent = "";
1959
+ banner.classList.remove("show");
1960
+ };
1961
+ const renderGrid = (columns, rows) => {
1962
+ grid.replaceChildren();
1963
+ if (columns.length === 0) {
1964
+ const empty = document.createElement("p");
1965
+ empty.className = "empty";
1966
+ empty.textContent = "No rows.";
1967
+ grid.append(empty);
1968
+ return;
1969
+ }
1970
+ const table = document.createElement("table");
1971
+ const head = document.createElement("thead");
1972
+ const headRow = document.createElement("tr");
1973
+ for (const column of columns) {
1974
+ const th = document.createElement("th");
1975
+ th.textContent = column;
1976
+ headRow.append(th);
1977
+ }
1978
+ head.append(headRow);
1979
+ const body = document.createElement("tbody");
1980
+ for (const row of rows) {
1981
+ const tr = document.createElement("tr");
1982
+ for (const column of columns) {
1983
+ const td = document.createElement("td");
1984
+ td.dataset.label = column;
1985
+ td.textContent = cell(row[column]);
1986
+ tr.append(td);
1987
+ }
1988
+ body.append(tr);
1989
+ }
1990
+ table.append(head, body);
1991
+ grid.append(table);
1992
+ };
1993
+ const rowsOf = (value) => {
1994
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1995
+ return [];
1996
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1997
+ };
1998
+ const columnsOf = (value, rows) => {
1999
+ if (isRecord2(value) && Array.isArray(value.columns)) {
2000
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
2001
+ if (named.length > 0)
2002
+ return named;
2003
+ }
2004
+ const first = rows[0];
2005
+ return first === void 0 ? [] : Object.keys(first);
2006
+ };
2007
+ let selected = "";
2008
+ const loadPage = async (schema, name) => {
2009
+ selected = `${schema}.${name}`;
2010
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
2011
+ const rows = rowsOf(page);
2012
+ renderGrid(columnsOf(page, rows), rows);
2013
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
2014
+ result.textContent = `${selected} \xB7 ${total} rows`;
2015
+ for (const button of tables.querySelectorAll("button")) {
2016
+ if (!(button instanceof HTMLButtonElement))
2017
+ continue;
2018
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
2019
+ }
2020
+ };
2021
+ const loadTables = async () => {
2022
+ const payload = await api.get("/sql/tables");
2023
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
2024
+ tables.replaceChildren();
2025
+ if (listed.length === 0) {
2026
+ const empty = document.createElement("p");
2027
+ empty.className = "empty";
2028
+ empty.textContent = "No tables.";
2029
+ tables.append(empty);
2030
+ return;
2031
+ }
2032
+ for (const item of listed) {
2033
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
2034
+ continue;
2035
+ const button = document.createElement("button");
2036
+ button.type = "button";
2037
+ button.dataset.schema = item.schema;
2038
+ button.dataset.table = item.name;
2039
+ button.textContent = `${item.schema}.${item.name}`;
2040
+ tables.append(button);
2041
+ }
2042
+ };
2043
+ tables.addEventListener("click", (event) => {
2044
+ const target = event.target;
2045
+ if (!(target instanceof Element))
2046
+ return;
2047
+ const button = target.closest("button");
2048
+ if (!(button instanceof HTMLButtonElement))
2049
+ return;
2050
+ const schema = button.dataset.schema;
2051
+ const name = button.dataset.table;
2052
+ if (schema === void 0 || name === void 0)
2053
+ return;
2054
+ clearError();
2055
+ loadPage(schema, name).catch(showError);
2056
+ });
2057
+ run.addEventListener("click", () => {
2058
+ const sql = input.value.trim();
2059
+ if (sql === "") {
2060
+ showError(new Error("Enter a statement"));
2061
+ return;
2062
+ }
2063
+ clearError();
2064
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
2065
+ const rows = rowsOf(payload);
2066
+ renderGrid(columnsOf(payload, rows), rows);
2067
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
2068
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
2069
+ result.textContent = `${count} rows${truncated}`;
2070
+ }).catch(showError);
2071
+ });
2072
+ const namespace = document.getElementById("namespace");
2073
+ if (namespace) {
2074
+ namespace.addEventListener("change", () => {
2075
+ clearError();
2076
+ loadTables().catch(showError);
2077
+ });
2078
+ }
2079
+ loadTables().catch(showError);
2080
+ }
1920
2081
  function bootAdmin(config) {
1921
2082
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1922
2083
  const sources = ["declared", "inferred", "mixed"];
@@ -2357,6 +2518,50 @@ function bootAdmin(config) {
2357
2518
  if (render)
2358
2519
  await render();
2359
2520
  }
2521
+ const delay = (ms) => new Promise((resolve) => {
2522
+ window.setTimeout(resolve, ms);
2523
+ });
2524
+ const confirmAction = async (button, pending, done, work) => {
2525
+ if (button.dataset.pending === "1")
2526
+ return;
2527
+ const label = button.textContent ?? "";
2528
+ const width = button.offsetWidth;
2529
+ button.dataset.pending = "1";
2530
+ button.classList.add("pressed");
2531
+ button.setAttribute("aria-busy", "true");
2532
+ button.style.minWidth = `${width}px`;
2533
+ button.textContent = pending;
2534
+ try {
2535
+ await work();
2536
+ button.textContent = done;
2537
+ await delay(1e3);
2538
+ } catch (error) {
2539
+ showError(error);
2540
+ } finally {
2541
+ button.textContent = label;
2542
+ button.style.minWidth = "";
2543
+ button.classList.remove("pressed");
2544
+ button.removeAttribute("aria-busy");
2545
+ delete button.dataset.pending;
2546
+ }
2547
+ };
2548
+ document.addEventListener("click", (event) => {
2549
+ const target = event.target;
2550
+ if (!(target instanceof Element))
2551
+ return;
2552
+ const button = target.closest("button");
2553
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2554
+ return;
2555
+ button.classList.add("pressed");
2556
+ const token = String(Date.now());
2557
+ button.dataset.press = token;
2558
+ window.setTimeout(() => {
2559
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2560
+ return;
2561
+ button.classList.remove("pressed");
2562
+ delete button.dataset.press;
2563
+ }, 450);
2564
+ });
2360
2565
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
2361
2566
  state.namespace = el("namespace", HTMLSelectElement).value;
2362
2567
  refresh().catch(showError);
@@ -2367,7 +2572,7 @@ function bootAdmin(config) {
2367
2572
  refresh().catch(showError);
2368
2573
  });
2369
2574
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
2370
- refresh().catch(showError);
2575
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
2371
2576
  });
2372
2577
  el("collections", HTMLElement).addEventListener("click", (event) => {
2373
2578
  const target = event.target;
@@ -2490,10 +2695,10 @@ function bootAdmin(config) {
2490
2695
  }).then(() => renderFaults()).catch(showError);
2491
2696
  });
2492
2697
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2493
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2698
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2494
2699
  });
2495
2700
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2496
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2701
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2497
2702
  });
2498
2703
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2499
2704
  const target = event.target;
@@ -2549,6 +2754,22 @@ function bootAdmin(config) {
2549
2754
  panel.script = value.script;
2550
2755
  return panel;
2551
2756
  };
2757
+ const decodeExtension = (value) => {
2758
+ if (!isRecord2(value))
2759
+ return void 0;
2760
+ if (value.kind === "sql") {
2761
+ return {
2762
+ kind: "sql",
2763
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2764
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2765
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2766
+ };
2767
+ }
2768
+ if (value.kind !== "panel")
2769
+ return void 0;
2770
+ const panel = decodePanel(value);
2771
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2772
+ };
2552
2773
  const mountPanels = (panels) => {
2553
2774
  const nav = el("nav", HTMLElement);
2554
2775
  const views = el("views", HTMLElement);
@@ -2602,15 +2823,57 @@ function bootAdmin(config) {
2602
2823
  return decoded === void 0 ? [] : [decoded];
2603
2824
  });
2604
2825
  mountPanels(panels);
2826
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2827
+ const decoded = decodeExtension(extension);
2828
+ return decoded === void 0 ? [] : [decoded];
2829
+ });
2830
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2831
+ mountPanels(extensionPanels);
2832
+ for (const extension of extensions) {
2833
+ if (extension.kind !== "sql")
2834
+ continue;
2835
+ const nav = el("nav", HTMLElement);
2836
+ const views = el("views", HTMLElement);
2837
+ const button = document.createElement("button");
2838
+ button.type = "button";
2839
+ button.dataset.view = extension.id;
2840
+ button.textContent = extension.title;
2841
+ nav.append(button);
2842
+ const section = document.createElement("section");
2843
+ section.className = "view";
2844
+ section.id = `view-${extension.id}`;
2845
+ section.hidden = true;
2846
+ const title = document.createElement("h2");
2847
+ title.textContent = extension.title;
2848
+ const lede = document.createElement("p");
2849
+ lede.className = "lede";
2850
+ lede.textContent = extension.description;
2851
+ const body = document.createElement("div");
2852
+ body.className = "panel-body";
2853
+ section.append(title, lede, body);
2854
+ views.append(section);
2855
+ mountSqlExplorer(body, panelApi);
2856
+ }
2605
2857
  return refresh();
2606
2858
  }).catch(showError);
2607
2859
  }
2608
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2860
+ var clientPrelude = [
2861
+ isRecord2,
2862
+ mountAdminBrand,
2863
+ startAdminBrand,
2864
+ faultPresetList,
2865
+ mountSqlExplorer,
2866
+ bootAdmin
2867
+ ].map((fn) => fn.toString()).join("\n");
2609
2868
  var adminClientSource = (config) => {
2610
2869
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2870
+ const entry = bootAdmin.name;
2871
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2872
+ throw new Error("admin client cannot call its boot function");
2873
+ }
2611
2874
  return `<script>
2612
2875
  ${clientPrelude}
2613
- bootAdmin(${payload});
2876
+ ${entry}(${payload});
2614
2877
  </script>`;
2615
2878
  };
2616
2879
 
@@ -2651,19 +2914,33 @@ var STANDARD_ADMIN_ROUTES = [
2651
2914
  "GET /ui/manifest"
2652
2915
  ];
2653
2916
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2917
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2918
+ var checkPanel = (panel, seen, label) => {
2919
+ if (!PANEL_ID.test(panel.id)) {
2920
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2921
+ }
2922
+ if (RESERVED_VIEWS.has(panel.id)) {
2923
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2924
+ }
2925
+ if (seen.has(panel.id))
2926
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2927
+ seen.add(panel.id);
2928
+ if (panel.title.trim() === "")
2929
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2930
+ };
2654
2931
  var assertAdminUi = (ui) => {
2655
- if (!ui?.panels)
2932
+ if (!ui)
2656
2933
  return;
2657
2934
  const seen = /* @__PURE__ */ new Set();
2658
- for (const panel of ui.panels) {
2659
- if (!PANEL_ID.test(panel.id)) {
2660
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2935
+ for (const panel of ui.panels ?? [])
2936
+ checkPanel(panel, seen, "admin panel");
2937
+ for (const extension of ui.extensions ?? []) {
2938
+ if (extension.kind === "panel") {
2939
+ checkPanel(extension, seen, "admin extension");
2940
+ continue;
2661
2941
  }
2662
- if (seen.has(panel.id))
2663
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2664
- seen.add(panel.id);
2665
- if (panel.title.trim() === "")
2666
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2942
+ const id = extension.id ?? "sql";
2943
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2667
2944
  }
2668
2945
  };
2669
2946
 
@@ -2824,9 +3101,24 @@ var renderAdminDocument = (service) => {
2824
3101
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2825
3102
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2826
3103
  label.field input, label.field select, .controls input[type="password"] {
2827
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2828
- padding: 7px 8px; min-height: 36px;
2829
- }
3104
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
3105
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
3106
+ }
3107
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
3108
+ the text fields in the same form. Paint it like those fields. */
3109
+ label.field select {
3110
+ -webkit-appearance: none; appearance: none;
3111
+ padding-right: 28px;
3112
+ 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");
3113
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
3114
+ }
3115
+ .stack > .field > input,
3116
+ .stack > .field > select,
3117
+ .stack > .field > textarea,
3118
+ dialog .field > input,
3119
+ dialog .field > select,
3120
+ dialog .field > textarea { width: 100%; }
3121
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2830
3122
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2831
3123
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2832
3124
  background: var(--bg-elev);
@@ -2834,6 +3126,14 @@ var renderAdminDocument = (service) => {
2834
3126
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2835
3127
  .btn-quiet { background: transparent; }
2836
3128
  .btn-danger { color: var(--err); }
3129
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
3130
+ so the press itself has to stay visible. */
3131
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
3132
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
3133
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
3134
+ }
3135
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
3136
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2837
3137
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2838
3138
  record or the full nav row would widen the page past the viewport. */
2839
3139
  .layout {
@@ -2874,6 +3174,12 @@ var renderAdminDocument = (service) => {
2874
3174
  border-radius: 999px; padding: 4px 8px;
2875
3175
  }
2876
3176
  .chip i { color: var(--faint); font-style: normal; }
3177
+ .sql-layout {
3178
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
3179
+ }
3180
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
3181
+ .sql-tables button { text-align: left; }
3182
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2877
3183
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2878
3184
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2879
3185
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2922,14 +3228,22 @@ var renderAdminDocument = (service) => {
2922
3228
  input, select, textarea { font-size: 16px; }
2923
3229
  .brand, .vendor, .controls { width: 100%; }
2924
3230
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2925
- .layout { grid-template-columns: minmax(0, 1fr); }
3231
+ /* The layout fills the screen. A single-column grid stretches every auto
3232
+ row, so the tab bar grew with the leftover height and the buttons floated
3233
+ in the middle of it. The bar stays one row; the page below takes the rest. */
3234
+ .layout {
3235
+ grid-template-columns: minmax(0, 1fr);
3236
+ grid-template-rows: auto minmax(0, 1fr);
3237
+ align-content: start;
3238
+ }
2926
3239
  nav.side {
3240
+ align-self: start; height: auto;
2927
3241
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2928
3242
  border-right: 0; border-bottom: 1px solid var(--line);
2929
3243
  padding: 8px;
2930
3244
  }
2931
3245
  nav.side button { white-space: nowrap; flex: none; }
2932
- .split { grid-template-columns: minmax(0, 1fr); }
3246
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2933
3247
  main { padding: 14px; }
2934
3248
  table, thead, tbody, tr, th, td { display: block; }
2935
3249
  thead { display: none; }
@@ -3100,6 +3414,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
3100
3414
  status: 200,
3101
3415
  headers: { "content-type": "application/json; charset=utf-8" }
3102
3416
  });
3417
+ var describeExtension = (extension) => {
3418
+ if (extension.kind === "sql") {
3419
+ return {
3420
+ kind: "sql",
3421
+ id: extension.id ?? "sql",
3422
+ title: extension.title ?? "SQL",
3423
+ ...extension.description !== void 0 ? { description: extension.description } : {}
3424
+ };
3425
+ }
3426
+ return {
3427
+ kind: "panel",
3428
+ id: extension.id,
3429
+ title: extension.title,
3430
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3431
+ html: extension.html,
3432
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3433
+ };
3434
+ };
3103
3435
  var adminUiRoutes = (service, ui) => {
3104
3436
  const shell = () => renderAdminDocument(service);
3105
3437
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -3114,7 +3446,8 @@ var adminUiRoutes = (service, ui) => {
3114
3446
  ...panel.description !== void 0 ? { description: panel.description } : {},
3115
3447
  html: panel.html,
3116
3448
  ...panel.script !== void 0 ? { script: panel.script } : {}
3117
- }))
3449
+ })),
3450
+ extensions: (ui?.extensions ?? []).map(describeExtension)
3118
3451
  })
3119
3452
  };
3120
3453
  };
@@ -3791,7 +4124,7 @@ var stateAdminRoutes = (routes) => {
3791
4124
  };
3792
4125
 
3793
4126
  // ../core/dist/version.js
3794
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
4127
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3795
4128
 
3796
4129
  // ../core/dist/webhooks.js
3797
4130
  var json4 = (status, body) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } });
@@ -4896,4 +5229,4 @@ export {
4896
5229
  isTrackerStatus,
4897
5230
  EasyPostAPI
4898
5231
  };
4899
- //# sourceMappingURL=chunk-EVFM6BRF.js.map
5232
+ //# sourceMappingURL=chunk-HGVOY2M6.js.map