@yadsh/dsh-plugin-log-ui 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-plugins contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # @yadsh/dsh-plugin-log-ui
2
+
3
+ Settings UI for [`@yadsh/dsh-plugin-log`](https://github.com/xarleyn/dsh-plugins/tree/main/packages/plugin-log). The
4
+ plugin adds a **Plugin logging** card under **Settings → Plugins → Plugin
5
+ Configuration**.
6
+
7
+ The card discovers active logger consumers automatically and provides:
8
+
9
+ - a default logging level;
10
+ - per-plugin level overrides;
11
+ - `text` or `json` file output;
12
+ - live application to already-running and newly registered loggers.
13
+
14
+ The default format is `text`, producing lines such as:
15
+
16
+ ```text
17
+ 2026-08-30T12:34:56.789Z WARN [dsh-example/worker] example.retry attempt=2
18
+ ```
19
+
20
+ Settings are stored under the `plugin-log` namespace in the configured DSH
21
+ settings provider.
22
+
23
+ ## Development
24
+
25
+ ```bash
26
+ pnpm --filter @yadsh/dsh-plugin-log-ui check
27
+ ```
28
+
29
+ ## License
30
+
31
+ MIT
@@ -0,0 +1,4 @@
1
+ # The DSH plugin manager discovers this bundle through package.json.
2
+ - insert:
3
+ - id: dsh-plugin-log-ui
4
+ name: "@yadsh/dsh-plugin-log-ui"
@@ -0,0 +1,114 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import pluginLogUiRemote from "@yadsh/dsh-plugin-log-ui/remote";
3
+ import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
4
+ import { styles } from "./styles.js";
5
+ import { bindSettingsExternalStore } from "./settings-store.js";
6
+ const SETTINGS_NAMESPACE = "plugin-log";
7
+ const REFRESH_INTERVAL_MS = 2_000;
8
+ const LEVELS = [
9
+ "trace",
10
+ "debug",
11
+ "info",
12
+ "warn",
13
+ "error",
14
+ "fatal",
15
+ "silent",
16
+ ];
17
+ function errorText(error) {
18
+ if (error instanceof Error)
19
+ return error.message;
20
+ if (typeof error === "string")
21
+ return error;
22
+ return "Could not update plugin logging settings.";
23
+ }
24
+ function LevelOptions({ inherit }) {
25
+ return (_jsxs(_Fragment, { children: [inherit !== undefined ? _jsxs("option", { value: "", children: ["Inherit default (", inherit, ")"] }) : null, LEVELS.map((level) => (_jsx("option", { value: level, children: level === "silent" ? "silent (off)" : level }, level)))] }));
26
+ }
27
+ function ChevronDown() {
28
+ return (_jsx("svg", { className: "dsh-plugin-card__chevron", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "m3.5 5.25 3.5 3.5 3.5-3.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }) }));
29
+ }
30
+ function PluginLogSettingsCard({ scope, inspect }) {
31
+ const settingsStore = useMemo(() => bindSettingsExternalStore(scope), [scope]);
32
+ const settings = useSyncExternalStore(settingsStore.subscribe, settingsStore.getSnapshot, settingsStore.getSnapshot);
33
+ const [open, setOpen] = useState(false);
34
+ const [snapshot, setSnapshot] = useState({ consumers: [] });
35
+ const [error, setError] = useState(null);
36
+ const [saving, setSaving] = useState(false);
37
+ const config = settings.value;
38
+ const defaultLevel = config?.defaultLevel ?? "info";
39
+ const format = config?.format ?? "text";
40
+ const levels = config?.levels ?? {};
41
+ const writable = settings.status === "ready" && settings.writable;
42
+ const refresh = useCallback(async () => {
43
+ try {
44
+ const result = await inspect();
45
+ if (result.ok) {
46
+ setSnapshot(result.value);
47
+ setError(null);
48
+ }
49
+ else {
50
+ setError(errorText(result.error));
51
+ }
52
+ }
53
+ catch (cause) {
54
+ setError(errorText(cause));
55
+ }
56
+ }, [inspect]);
57
+ useEffect(() => {
58
+ void refresh();
59
+ const timer = window.setInterval(() => void refresh(), REFRESH_INTERVAL_MS);
60
+ return () => window.clearInterval(timer);
61
+ }, [refresh]);
62
+ const write = useCallback(async (field, value) => {
63
+ setSaving(true);
64
+ setError(null);
65
+ try {
66
+ await scope.set(field, value);
67
+ await refresh();
68
+ }
69
+ catch (cause) {
70
+ setError(errorText(cause));
71
+ }
72
+ finally {
73
+ setSaving(false);
74
+ }
75
+ }, [refresh, scope]);
76
+ const setOverride = useCallback((pluginId, level) => {
77
+ const next = { ...levels };
78
+ if (level === "")
79
+ delete next[pluginId];
80
+ else
81
+ next[pluginId] = level;
82
+ void write("levels", next);
83
+ }, [levels, write]);
84
+ if (settings.status === "unavailable")
85
+ return null;
86
+ return (_jsxs("li", { className: `dsh-plugin-card${open ? " dsh-plugin-card--open" : ""}`, children: [_jsxs("button", { type: "button", className: "dsh-plugin-card__header", "aria-expanded": open, "aria-label": `${open ? "Hide" : "Show"} settings: Plugin logging`, onClick: () => setOpen(!open), children: [_jsxs("span", { className: "dsh-plugin-card__head-text", children: [_jsx("span", { className: "dsh-plugin-card__name", children: "Plugin logging" }), _jsx("span", { className: "dsh-plugin-card__description", children: "Levels and readable file output for registered server plugins." })] }), _jsxs("span", { className: "dsh-plugin-card__badge", children: [snapshot.consumers.length, " active"] }), _jsx(ChevronDown, {})] }), open ? (_jsxs("div", { className: "dsh-plugin-card__body plu-body", children: [error !== null ? _jsx("p", { className: "plu-error", role: "status", children: error }) : null, !writable ? _jsx("p", { className: "plu-status", children: "Settings are read-only for this connection." }) : null, _jsxs("section", { className: "plu-section", children: [_jsx("h3", { children: "Defaults" }), _jsxs("div", { className: "plu-grid", children: [_jsxs("label", { className: "plu-field", children: [_jsx("span", { children: "Default level" }), _jsx("select", { className: "plu-select", value: defaultLevel, disabled: !writable || saving, onChange: (event) => void write("defaultLevel", event.currentTarget.value), children: _jsx(LevelOptions, {}) })] }), _jsxs("label", { className: "plu-field", children: [_jsx("span", { children: "File format" }), _jsxs("select", { className: "plu-select", value: format, disabled: !writable || saving, onChange: (event) => void write("format", event.currentTarget.value), children: [_jsx("option", { value: "text", children: "Text \u2014 readable lines" }), _jsx("option", { value: "json", children: "JSON \u2014 NDJSON records" })] })] })] }), _jsx("p", { className: "plu-hint", children: "Changes apply live. A format switch affects new lines; an existing daily file can contain both formats until rotation." })] }), _jsxs("section", { className: "plu-section", children: [_jsx("h3", { children: "Registered plugins" }), snapshot.consumers.length === 0 ? (_jsx("p", { className: "plu-empty", children: "No active plugin logger consumers yet." })) : (_jsx("div", { className: "plu-list", children: snapshot.consumers.map((consumer) => (_jsxs("div", { className: "plu-row", children: [_jsxs("div", { className: "plu-plugin", children: [_jsx("code", { children: consumer.pluginId }), _jsxs("span", { children: [consumer.instances, " instance", consumer.instances === 1 ? "" : "s", " \u00B7 active: ", consumer.level, " \u00B7 ", consumer.format] })] }), _jsx("select", { className: "plu-select", "aria-label": `Log level for ${consumer.pluginId}`, value: levels[consumer.pluginId] ?? "", disabled: !writable || saving, onChange: (event) => setOverride(consumer.pluginId, event.currentTarget.value), children: _jsx(LevelOptions, { inherit: defaultLevel }) })] }, consumer.pluginId))) }))] })] })) : null] }));
87
+ }
88
+ export const inject = ["slots", "settingsScope", "remote"];
89
+ export async function apply(ctx) {
90
+ const remote = ctx.remote;
91
+ const disposeRemote = await remote.$mount(pluginLogUiRemote);
92
+ await ctx.inject(["remote.pluginLogUi"], (remoteCtx) => {
93
+ const mountedRemote = remoteCtx.remote;
94
+ const inspector = mountedRemote.pluginLogUi;
95
+ const scope = remoteCtx.settingsScope.bind({
96
+ namespace: SETTINGS_NAMESPACE,
97
+ });
98
+ const style = document.createElement("style");
99
+ style.dataset.plugin = "dsh-plugin-log-ui";
100
+ style.textContent = styles;
101
+ document.head.append(style);
102
+ const disposeSlot = remoteCtx.slots.inject("settings.plugin.item", () => remoteCtx.slots.register({
103
+ name: "settings.plugin.item",
104
+ key: SETTINGS_NAMESPACE,
105
+ inject: () => ({ scope, inspect: () => inspector.inspect() }),
106
+ }, PluginLogSettingsCard));
107
+ return () => {
108
+ disposeSlot();
109
+ style.remove();
110
+ };
111
+ });
112
+ return disposeRemote;
113
+ }
114
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.tsx"],"names":[],"mappings":";AAMA,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAOxF,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,kBAAkB,GAAG,YAAY,CAAC;AACxC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAClC,MAAM,MAAM,GAAqC;IAC/C,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;CACT,CAAC;AAkBF,SAAS,SAAS,C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CAAC,MAAM,EAAE,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * React calls external-store callbacks as plain functions. SettingsScope's
3
+ * methods use their receiver, so forwarding them directly loses `this` and
4
+ * crashes while reading the internal store.
5
+ */
6
+ export function bindSettingsExternalStore(scope) {
7
+ return {
8
+ subscribe: (listener) => scope.subscribe(listener),
9
+ getSnapshot: () => scope.getSnapshot(),
10
+ };
11
+ }
12
+ //# sourceMappingURL=settings-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-store.js","sourceRoot":"","sources":["../../src/client/settings-store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAY,KAGpD;IAIC,OAAO;QACL,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;QAClD,WAAW,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE;KACvC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ export const styles = `
2
+ .dsh-plugin-card{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-3);border-radius:12px;list-style:none;transition:border-color .16s,background .16s}
3
+ .dsh-plugin-card:hover{border-color:var(--dsw-alias-label-dimmed)}
4
+ .dsh-plugin-card--open{background:var(--dsw-alias-bg-layer-2);border-color:var(--dsw-alias-label-dimmed)}
5
+ .dsh-plugin-card__header{appearance:none;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer;background:0 0;border:0;border-radius:12px;align-items:center;gap:12px;padding:14px 16px;display:flex}
6
+ .dsh-plugin-card__header:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px}
7
+ .dsh-plugin-card__head-text{flex-direction:column;flex:1;gap:4px;min-width:0;display:flex}
8
+ .dsh-plugin-card__name{color:var(--dsw-alias-label-primary);font-size:15px;font-weight:600;line-height:1.4}
9
+ .dsh-plugin-card__description{color:var(--dsw-alias-label-tertiary);font-size:13px;line-height:1.5}
10
+ .dsh-plugin-card__badge{white-space:nowrap;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}
11
+ .dsh-plugin-card__chevron{width:14px;height:14px;color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .16s}
12
+ .dsh-plugin-card--open .dsh-plugin-card__chevron{transform:rotate(180deg)}
13
+ .dsh-plugin-card__body{border-top:1px solid var(--dsw-alias-border-l2);margin:0 16px;padding-bottom:8px}
14
+ .plu-body{padding-top:16px;display:flex;flex-direction:column;gap:18px}
15
+ .plu-section{display:flex;flex-direction:column;gap:10px}.plu-section h3{margin:0;font-size:13px;color:var(--dsw-alias-label-primary)}
16
+ .plu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.plu-field{display:flex;flex-direction:column;gap:6px}.plu-field>span{font-size:12px;font-weight:500;color:var(--dsw-alias-label-secondary)}
17
+ .plu-select{box-sizing:border-box;width:100%;height:34px;padding:0 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px}.plu-select:focus{outline:none;border-color:var(--dsw-alias-border-brand)}.plu-select:disabled{opacity:.55}
18
+ .plu-hint,.plu-status,.plu-empty{margin:0;font-size:12px;line-height:1.5;color:var(--dsw-alias-label-tertiary)}.plu-error{margin:0;padding:9px 10px;border-radius:8px;background:var(--dsw-alias-bg-error);color:var(--dsw-alias-label-error);font-size:12px}
19
+ .plu-list{display:flex;flex-direction:column;border-top:1px solid var(--dsw-alias-border-l2)}.plu-row{display:grid;grid-template-columns:minmax(150px,1fr) minmax(150px,220px);gap:14px;align-items:center;padding:12px 0;border-bottom:1px solid var(--dsw-alias-border-l2)}
20
+ .plu-plugin{min-width:0}.plu-plugin code{display:block;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:var(--dsw-alias-label-primary)}.plu-plugin span{display:block;margin-top:3px;font-size:11px;color:var(--dsw-alias-label-tertiary)}
21
+ @media(max-width:720px){.plu-grid{grid-template-columns:1fr}.plu-row{grid-template-columns:1fr}}
22
+ `;
23
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/client/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBrB,CAAC"}