@goodandready/dsh-plugin-notify 0.4.2 → 0.4.3
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/lib/client.js +1 -7
- package/lib/index.js +4 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.4.3] - 2026-10-15
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- **Host event cleanup** (#59): Prune dead listener on non-existent host event `settings/updated` in `lib/index.js` (active settings updates remain reliably monitored via `settings/document-updated` and `loader/volatile-update`).
|
|
11
|
+
- **Client slot registration** (#59): Remove dead registration of non-existent client seat `settings.plugin.item` in `lib/client.js` (official plugin list page seat `plugins.item` and row config seat `plugins.row.config` handle settings cards).
|
|
12
|
+
- **Web push state path containment** (#59): Constrain custom `webPush.stateFile` paths by resolving relative paths against the DSH home directory instead of returning raw unconstrained strings.
|
|
13
|
+
|
|
7
14
|
## [0.4.2] - 2026-10-10
|
|
8
15
|
|
|
9
16
|
### Fixed
|
package/lib/client.js
CHANGED
|
@@ -895,19 +895,13 @@ window.__ModuleLoader__.load({
|
|
|
895
895
|
(props) => React.createElement(NotifyCard, { ...props, ctx }),
|
|
896
896
|
)
|
|
897
897
|
})
|
|
898
|
-
// Row seat
|
|
898
|
+
// Row seat fallback for older cores.
|
|
899
899
|
ctx.slots.inject('plugins.row.config', () => {
|
|
900
900
|
ctx.slots.register(
|
|
901
901
|
{ name: 'plugins.row.config', key: ROW_CONFIG_KEY, locale: NS, order: 40, inject: () => ({ ctx }) },
|
|
902
902
|
(props) => React.createElement(NotifyCard, { ...props, ctx }),
|
|
903
903
|
)
|
|
904
904
|
})
|
|
905
|
-
ctx.slots.inject('settings.plugin.item', () => {
|
|
906
|
-
ctx.slots.register(
|
|
907
|
-
{ name: 'settings.plugin.item', key: ROW_ID, locale: NS, order: 40, inject: () => ({ ctx }) },
|
|
908
|
-
(props) => React.createElement(NotifyCard, { ...props, ctx }),
|
|
909
|
-
)
|
|
910
|
-
})
|
|
911
905
|
} catch (e) {
|
|
912
906
|
console.warn('[dsh-plugin-notify] settings seats failed', e)
|
|
913
907
|
}
|
package/lib/index.js
CHANGED
|
@@ -344,10 +344,12 @@ export function generateVapidKeys() {
|
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
export function resolveStatePath(webPushConfig = {}) {
|
|
347
|
-
if (webPushConfig && typeof webPushConfig.stateFile === 'string' && webPushConfig.stateFile.trim())
|
|
348
|
-
return webPushConfig.stateFile.trim();
|
|
349
347
|
const home = (process.env.DSH_HOME && process.env.DSH_HOME.trim())
|
|
350
348
|
|| path.join(os.homedir(), '.dsh');
|
|
349
|
+
if (webPushConfig && typeof webPushConfig.stateFile === 'string' && webPushConfig.stateFile.trim()) {
|
|
350
|
+
const custom = webPushConfig.stateFile.trim();
|
|
351
|
+
return path.isAbsolute(custom) ? path.normalize(custom) : path.resolve(home, custom);
|
|
352
|
+
}
|
|
351
353
|
return path.join(home, 'plugin-notify-state.json');
|
|
352
354
|
}
|
|
353
355
|
|
|
@@ -793,7 +795,6 @@ export function apply(ctx, config = {}) {
|
|
|
793
795
|
if (typeof ctx.on === 'function') {
|
|
794
796
|
ctx.on('settings/document-updated', refreshSettings);
|
|
795
797
|
ctx.on('loader/volatile-update', refreshSettings);
|
|
796
|
-
ctx.on('settings/updated', refreshSettings);
|
|
797
798
|
}
|
|
798
799
|
if (typeof sctx.settings?.on === 'function') {
|
|
799
800
|
try { sctx.settings.on('update', refreshSettings); } catch { /* ignore */ }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-plugin-notify",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "DSH plugin: audio chimes, cross-session toasts, desktop push, IM webhooks, and web push (PWA) for turn completion, errors, and approvals.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|