signalk-livedepth-plugin 0.3.16 → 0.3.18
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 +22 -0
- package/dist/plotterext/provider.d.ts +7 -3
- package/dist/plotterext/provider.d.ts.map +1 -1
- package/dist/plotterext/provider.js +29 -29
- package/dist/plotterext/provider.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/public/js/config.js +0 -65
- package/public/js/config.js.map +2 -2
- package/public/js/render-worker.js +2 -18
- package/public/js/render-worker.js.map +2 -2
- package/public/js/renderer.js +8 -128
- package/public/js/renderer.js.map +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to this project are documented here, newest first. The
|
|
|
4
4
|
format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
5
5
|
versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.3.18] - 2026-11-02
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **The layer now always draws the plugin's bathymetry grid.** The History API
|
|
12
|
+
is no longer offered as a depth source in the layer's settings; the source
|
|
13
|
+
selector and its history-only window/interval fields are gone. The separate
|
|
14
|
+
History import in the plugin's server settings is unchanged — that is what
|
|
15
|
+
seeds the grid. Settings saved with the old History source migrate
|
|
16
|
+
automatically.
|
|
17
|
+
|
|
18
|
+
## [0.3.17] - 2026-11-01
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **The extension no longer disappears after saving the plugin configuration.**
|
|
23
|
+
Saving stops and starts the plugin, and the server unregisters a plugin's
|
|
24
|
+
resource providers on stop. Registration was guarded by a module-level flag
|
|
25
|
+
that outlived the restart, so the extension dropped out of
|
|
26
|
+
`/signalk/v2/api/resources/plotterExtensions` even though depth collection
|
|
27
|
+
resumed. The provider is now registered on every start.
|
|
28
|
+
|
|
7
29
|
## [0.3.16] - 2026-11-01
|
|
8
30
|
|
|
9
31
|
### Added
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { ServerAPI } from "@signalk/server-api";
|
|
2
2
|
/** Offer the plotter extension: register the read-only `plotterExtensions`
|
|
3
|
-
* resource and mount the extension's pages.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* resource and mount the extension's pages. Register on every start — the
|
|
4
|
+
* server unregisters a plugin's resource providers when it stops, so the flag
|
|
5
|
+
* that used to guard this would leave the extension missing after a restart.
|
|
6
|
+
* Registration replaces the provider by type, so repeating it is safe. The
|
|
7
|
+
* static assets are mounted once; the server keeps the route across a restart.
|
|
8
|
+
* `isRunning` reflects the plugin's current state so the extension leaves when
|
|
9
|
+
* the plugin is disabled. */
|
|
6
10
|
export declare function registerPlotterExtension(app: ServerAPI, isRunning: () => boolean): void;
|
|
7
11
|
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/plotterext/provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/plotterext/provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAWrD;;;;;;;6BAO6B;AAC7B,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,MAAM,OAAO,GACvB,IAAI,CA6BN"}
|
|
@@ -2,40 +2,40 @@ import { createRequire } from "node:module";
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { ASSET_BASE, PLUGIN_ID, buildManifest } from "./manifest.js";
|
|
5
|
-
let registered = false;
|
|
6
5
|
let mounted = false;
|
|
7
6
|
/** Offer the plotter extension: register the read-only `plotterExtensions`
|
|
8
|
-
* resource and mount the extension's pages.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* resource and mount the extension's pages. Register on every start — the
|
|
8
|
+
* server unregisters a plugin's resource providers when it stops, so the flag
|
|
9
|
+
* that used to guard this would leave the extension missing after a restart.
|
|
10
|
+
* Registration replaces the provider by type, so repeating it is safe. The
|
|
11
|
+
* static assets are mounted once; the server keeps the route across a restart.
|
|
12
|
+
* `isRunning` reflects the plugin's current state so the extension leaves when
|
|
13
|
+
* the plugin is disabled. */
|
|
11
14
|
export function registerPlotterExtension(app, isRunning) {
|
|
12
15
|
const a = app;
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return buildManifest();
|
|
24
|
-
},
|
|
25
|
-
setResource: async () => {
|
|
26
|
-
throw new Error(`${PLUGIN_ID} is a read-only provider`);
|
|
27
|
-
},
|
|
28
|
-
deleteResource: async () => {
|
|
29
|
-
throw new Error(`${PLUGIN_ID} is a read-only provider`);
|
|
30
|
-
},
|
|
16
|
+
if (typeof a.registerResourceProvider === "function") {
|
|
17
|
+
a.registerResourceProvider({
|
|
18
|
+
type: "plotterExtensions",
|
|
19
|
+
methods: {
|
|
20
|
+
listResources: async () => isRunning() ? { [PLUGIN_ID]: buildManifest() } : {},
|
|
21
|
+
getResource: async (id) => {
|
|
22
|
+
if (!isRunning() || id !== PLUGIN_ID) {
|
|
23
|
+
throw new Error(`No such plotterExtensions resource: ${id}`);
|
|
24
|
+
}
|
|
25
|
+
return buildManifest();
|
|
31
26
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
27
|
+
setResource: async () => {
|
|
28
|
+
throw new Error(`${PLUGIN_ID} is a read-only provider`);
|
|
29
|
+
},
|
|
30
|
+
deleteResource: async () => {
|
|
31
|
+
throw new Error(`${PLUGIN_ID} is a read-only provider`);
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
a.debug(`${PLUGIN_ID}: plotter extension offered`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
a.debug(`${PLUGIN_ID}: server has no resource provider registry`);
|
|
39
39
|
}
|
|
40
40
|
mountAssets(a);
|
|
41
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/plotterext/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQrE,IAAI,
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../src/plotterext/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAQrE,IAAI,OAAO,GAAG,KAAK,CAAC;AAEpB;;;;;;;6BAO6B;AAC7B,MAAM,UAAU,wBAAwB,CACtC,GAAc,EACd,SAAwB;IAExB,MAAM,CAAC,GAAG,GAAmB,CAAC;IAE9B,IAAI,OAAO,CAAC,CAAC,wBAAwB,KAAK,UAAU,EAAE,CAAC;QACrD,CAAC,CAAC,wBAAwB,CAAC;YACzB,IAAI,EAAE,mBAAmB;YACzB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