@xyo-network/location-payload-plugin 4.1.1 → 5.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.
@@ -1,51 +1,7 @@
1
- import { Payload } from '@xyo-network/payload-model';
2
- import * as _xyo_network_payload_plugin from '@xyo-network/payload-plugin';
3
-
4
- type GeographicCoordinateSystemLocationSchema = 'network.xyo.location.gcs';
5
- declare const GeographicCoordinateSystemLocationSchema: GeographicCoordinateSystemLocationSchema;
6
- type QuadkeyLocationSchema = 'network.xyo.location.quadkey';
7
- declare const QuadkeyLocationSchema: QuadkeyLocationSchema;
8
- type LocationSchema = 'network.xyo.location';
9
- declare const LocationSchema: LocationSchema;
10
-
11
- interface GeographicCoordinateSystemLocation {
12
- accuracy?: number;
13
- altitude?: number;
14
- altitudeAccuracy?: number;
15
- latitude: number;
16
- longitude: number;
17
- }
18
- interface QuadkeyLocation {
19
- altitude?: number;
20
- altitudeAccuracy?: number;
21
- quadkey: string;
22
- }
23
- type Location = GeographicCoordinateSystemLocation | QuadkeyLocation;
24
- type GeographicCoordinateSystemLocationPayload = Payload<GeographicCoordinateSystemLocation, GeographicCoordinateSystemLocationSchema>;
25
- type QuadkeyLocationPayload = Payload<QuadkeyLocation, QuadkeyLocationSchema>;
26
- type LocationPayload = Payload<Location>;
27
-
28
- type LocationHeadingSchema = 'network.xyo.location.heading';
29
- declare const LocationHeadingSchema: LocationHeadingSchema;
30
-
31
- type Acceleration = {
32
- acceleration: number;
33
- };
34
- type Heading = {
35
- heading: number;
36
- };
37
- type Speed = {
38
- speed: number;
39
- };
40
- type Velocity = Heading & Speed;
41
- type Motion = Velocity & Partial<Acceleration>;
42
- type LocationHeading = Motion | Heading;
43
- type LocationHeadingPayload = Payload<LocationHeading, LocationHeadingSchema>;
44
-
45
- declare const LocationPayloadPlugin: () => _xyo_network_payload_plugin.PayloadPlugin<LocationPayload>;
46
-
47
- type CurrentLocationSchema = 'network.xyo.location.current';
48
- declare const CurrentLocationSchema: CurrentLocationSchema;
49
-
50
- export { CurrentLocationSchema, GeographicCoordinateSystemLocationSchema, LocationHeadingSchema, LocationPayloadPlugin, LocationSchema, QuadkeyLocationSchema, LocationPayloadPlugin as default };
51
- export type { Acceleration, GeographicCoordinateSystemLocation, GeographicCoordinateSystemLocationPayload, Heading, Location, LocationHeading, LocationHeadingPayload, LocationPayload, Motion, QuadkeyLocation, QuadkeyLocationPayload, Speed, Velocity };
1
+ export * from './GeographicCoordinateSystemLocationPayload.ts';
2
+ export * from './GeographicCoordinateSystemLocationSchema.ts';
3
+ export * from './HeadingPayload.ts';
4
+ export * from './HeadingSchema.ts';
5
+ export { LocationPayloadPlugin as default, LocationPayloadPlugin } from './Plugin.ts';
6
+ export * from './Schema.ts';
7
+ //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/location-payload-plugin",
3
- "version": "4.1.1",
3
+ "version": "5.0.0",
4
4
  "description": "Typescript/Javascript Plugins for XYO Platform",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -28,15 +28,18 @@
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
+ "files": [
32
+ "dist",
33
+ "src"
34
+ ],
31
35
  "dependencies": {
32
- "@xyo-network/payload-model": "^4.1.7",
33
- "@xyo-network/payload-plugin": "^4.1.7"
36
+ "@xyo-network/payload-model": "^5.0.0",
37
+ "@xyo-network/payload-plugin": "^5.0.0"
34
38
  },
35
39
  "devDependencies": {
36
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.24",
37
- "@xylabs/tsconfig": "^7.0.0-rc.24",
38
- "@xylabs/vitest-extended": "^4.13.23",
39
- "knip": "^5.62.0",
40
+ "@xylabs/ts-scripts-yarn3": "^7.0.2",
41
+ "@xylabs/tsconfig": "^7.0.2",
42
+ "@xylabs/vitest-extended": "^5.0.0",
40
43
  "typescript": "^5.8.3",
41
44
  "vitest": "^3.2.4"
42
45
  },
@@ -0,0 +1,16 @@
1
+ import '@xylabs/vitest-extended'
2
+
3
+ import { PayloadPluginResolver } from '@xyo-network/payload-plugin'
4
+ import {
5
+ describe, expect, test,
6
+ } from 'vitest'
7
+
8
+ import { LocationPayloadPlugin } from '../Plugin.ts'
9
+
10
+ describe('LocationPlugin', () => {
11
+ test('Add to Resolver', () => {
12
+ const plugin = LocationPayloadPlugin()
13
+ const resolver = new PayloadPluginResolver().register(plugin)
14
+ expect(resolver.resolve(plugin.schema)).toBeObject()
15
+ })
16
+ })
package/typedoc.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "$schema": "https://typedoc.org/schema.json",
3
- "entryPoints": ["./src/index.ts"],
4
- "tsconfig": "./tsconfig.typedoc.json"
5
- }
package/xy.config.ts DELETED
@@ -1,10 +0,0 @@
1
- import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
- const config: XyTsupConfig = {
3
- compile: {
4
- browser: {},
5
- neutral: { src: true },
6
- node: {},
7
- },
8
- }
9
-
10
- export default config