@signalk/tracks-plugin 3.0.0-beta.6 → 3.0.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.
@@ -24,7 +24,7 @@ export interface TrackQuery {
24
24
  * `timespan`/`timespanOffset` pair. Absent all of them, no window is applied
25
25
  * and the whole retained track is returned, as before.
26
26
  */
27
- export declare function parseTrackQuery(query: Record<string, unknown>, now?: number): TrackQuery;
27
+ export declare function parseTrackQuery(query: Record<string, unknown>, now?: number, alsoAllowed?: readonly string[]): TrackQuery;
28
28
  /**
29
29
  * Drop points closer together than `resolution` milliseconds, always keeping
30
30
  * the first and last so the track keeps its extent.
package/dist/utils.d.ts CHANGED
@@ -25,6 +25,25 @@ export declare function createInBounds(bounds: GeoBounds): (position: LatLngTupl
25
25
  * iterate the result.
26
26
  */
27
27
  export declare function splitAtAntimeridian(bounds: GeoBounds): GeoBounds[];
28
+ /**
29
+ * A query parameter was present but malformed.
30
+ *
31
+ * Distinct from absent: a filter nobody asked for is not an error, but one
32
+ * that cannot be honoured must not quietly widen the query. Carries its own
33
+ * message so the handler can hand it to the client, the way `TimeWindowError`
34
+ * already does for the time window.
35
+ */
36
+ export declare class QueryParameterError extends Error {
37
+ }
38
+ /**
39
+ * A well-formed query the server cannot currently answer.
40
+ *
41
+ * `radius` measures from the own vessel, so it needs a self position. Not
42
+ * having one is an outage, not a client mistake -- the same distinction the
43
+ * single-vessel route already draws for a history provider it cannot read.
44
+ */
45
+ export declare class SelfPositionUnavailableError extends Error {
46
+ }
28
47
  export declare function validateParameters(params: QueryParameters, defaultMaxRadius: number | undefined): TrackParams;
29
48
  export declare function createDistanceTo([lat1d, lon1d]: LatLngTuple, debug?: Debug): (d: LatLngTuple | null) => number;
30
49
  export declare function resolveContext(vesselId: string, selfContext?: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signalk/tracks-plugin",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0",
4
4
  "description": "Plugin to keep track of tracks of vessels",
5
5
  "type": "module",
6
6
  "exports": {
@@ -78,6 +78,7 @@
78
78
  "typescript": "^5.9.3",
79
79
  "typescript-eslint": "^8.66.0",
80
80
  "vite": "^8.2.2",
81
+ "vite-plugin-checker": "^0.14.5",
81
82
  "vite-plugin-dts": "^5.0.3",
82
83
  "vitest": "^5.0.0"
83
84
  }