@goodandready/dsh-dsml-artifact-guard 0.2.10 → 0.2.11
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 +6 -0
- package/lib/index.js +13 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.2.11] - 2026-10-15
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Settings Policy Owner Attribution**: passed `ctx.fiber` as the owner argument to `ctx.settings.configure({ auto: false }, ctx.fiber)`, ensuring settings policy correctly attributes to the plugin fiber and suppresses generic duplicate form generation (#62).
|
|
14
|
+
- **Live Configuration Updates via Volatile Event**: subscribed to `loader/volatile-update` in `apply()`, allowing live settings mutations saved in the Web UI card to take effect in place without requiring a server restart (#62).
|
|
15
|
+
|
|
10
16
|
## [0.2.10] - 2026-10-07
|
|
11
17
|
|
|
12
18
|
### Removed
|
package/lib/index.js
CHANGED
|
@@ -172,16 +172,24 @@ export function apply(ctx, initialConfig = {}) {
|
|
|
172
172
|
|
|
173
173
|
let getConfig = () => (typeof initialConfig?.get === 'function' ? unwrapConfig(initialConfig) : activeConfig);
|
|
174
174
|
|
|
175
|
-
// Live config subscription from the plugin fiber
|
|
175
|
+
// Live config subscription from the plugin fiber (re-read volatile entries on loader/volatile-update)
|
|
176
176
|
if (typeof ctx.on === 'function') {
|
|
177
|
-
|
|
178
|
-
activeConfig = unwrapConfig(nextConfig);
|
|
179
|
-
}
|
|
177
|
+
const syncConfig = (nextConfig) => {
|
|
178
|
+
activeConfig = unwrapConfig(nextConfig || initialConfig);
|
|
179
|
+
};
|
|
180
|
+
ctx.effect(() => {
|
|
181
|
+
const unsubVolatile = ctx.on('loader/volatile-update', () => syncConfig());
|
|
182
|
+
const unsubConfig = ctx.on('config', (nextConfig) => syncConfig(nextConfig));
|
|
183
|
+
return () => {
|
|
184
|
+
if (typeof unsubVolatile === 'function') unsubVolatile();
|
|
185
|
+
if (typeof unsubConfig === 'function') unsubConfig();
|
|
186
|
+
};
|
|
187
|
+
}, 'dsh-dsml-artifact-guard: live config');
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
// DSH 0.1.7 SettingsForms: suppress generic duplicate form, custom card mounts in plugins seat
|
|
183
191
|
if (ctx.settings && typeof ctx.settings.configure === 'function') {
|
|
184
|
-
ctx.effect(() => ctx.settings.configure({ auto: false }), 'dsh-dsml-artifact-guard: settings policy');
|
|
192
|
+
ctx.effect(() => ctx.settings.configure({ auto: false }, ctx.fiber), 'dsh-dsml-artifact-guard: settings policy');
|
|
185
193
|
}
|
|
186
194
|
// Register one-click updater endpoint
|
|
187
195
|
if (ctx.webServer && typeof ctx.webServer.register === 'function') {
|