tabletcommand-location 1.1.0 → 1.1.2
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/build/index.js.map +1 -1
- package/definitions/index.d.ts +2 -1
- package/definitions/index.d.ts.map +1 -1
- package/definitions/types.d.ts +9 -9
- package/definitions/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +18 -6
- package/src/types.ts +17 -14
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAwC;AACxC,oDAAkC;AAOlC,oDAAuB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAwC;AACxC,oDAAkC;AAOlC,oDAAuB;AAcvB,SAAgB,GAAG,CACjB,eAAgC,EAChC,aAA4B,EAC5B,eAAgC;IAEhC,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,eAAe,EAAE,aAAa,EAAE,eAAe,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,IAAA,kBAAc,EAAC,KAAK,CAAC,CAAC;IACvC,8FAA8F;IAC9F,uCAAuC;IACvC,IAAI;IAEJ,KAAK,UAAU,gBAAgB,CAAC,UAA+B,EAAE,KAA2C;QAC1G,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QAC1B,IAAI;YACF,IAAI,gBAAC,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,gBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;gBAC3C,OAAO,EAAE,CAAC;aACX;YACD,IAAI,gBAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBAC1C,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC;aACjB;YACD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;YACtE,OAAO,MAAM,CAAC;SACf;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;YAC3C,MAAM,GAAG,CAAC;SACX;IACH,CAAC;IAED,iJAAiJ;IACjJ,UAAU;IACV,qDAAqD;IACrD,mBAAmB;IACnB,QAAQ;IACR,oDAAoD;IACpD,yBAAyB;IACzB,QAAQ;IACR,sFAAsF;IACtF,qBAAqB;IACrB,oBAAoB;IACpB,iBAAiB;IACjB,MAAM;IACN,IAAI;IAEJ,OAAO;QACL,kBAAkB;QAClB,gBAAgB;QAChB,wBAAwB;KACzB,CAAC;AACJ,CAAC;AAhDD,kBAgDC;AAED,kBAAe,GAAG,CAAC"}
|
package/definitions/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DepartmentModel, LocationModel, CADVehicleModel, Department } from "tabletcommand-backend-models";
|
|
2
|
-
import { LocationPayload } from "./types";
|
|
2
|
+
import { LocationKindType, LocationPayload, LocationSource } from "./types";
|
|
3
|
+
export { LocationKindType, LocationPayload, LocationSource, };
|
|
3
4
|
export declare function lib(departmentModel: DepartmentModel, locationModel: LocationModel, cadVehicleModel: CADVehicleModel): {
|
|
4
5
|
processLocations: (department: Partial<Department>, items: LocationPayload[] | null | undefined) => Promise<void | never[]>;
|
|
5
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,UAAU,EACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EACf,UAAU,EACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,cAAc,EACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,cAAc,GACf,CAAC;AAEF,wBAAgB,GAAG,CACjB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe;mCAQY,QAAQ,UAAU,CAAC,SAAS,eAAe,EAAE,GAAG,IAAI,GAAG,SAAS;EAqC7G;AAED,eAAe,GAAG,CAAC;AACnB,oBAAY,SAAS,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC"}
|
package/definitions/types.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Location } from "tabletcommand-backend-models";
|
|
1
|
+
import { Location, LocationKindType, LocationSource } from "tabletcommand-backend-models";
|
|
2
|
+
export { LocationKindType, LocationSource, };
|
|
2
3
|
export interface LocationPayload {
|
|
3
|
-
|
|
4
|
-
longitude: number | string;
|
|
5
|
-
vehicleId: string;
|
|
6
|
-
radioName: string;
|
|
4
|
+
altitude?: number;
|
|
7
5
|
avlTime: string;
|
|
8
|
-
speed?: number;
|
|
9
|
-
source: LocationSource;
|
|
10
6
|
kindType: LocationKindType;
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
radioName: string;
|
|
10
|
+
source: LocationSource;
|
|
11
|
+
speed?: number;
|
|
12
|
+
vehicleId: string;
|
|
11
13
|
}
|
|
12
14
|
export interface Vehicle {
|
|
13
15
|
departmentId: string;
|
|
@@ -34,6 +36,4 @@ export interface LocationDelta {
|
|
|
34
36
|
export declare type LocationObject = {
|
|
35
37
|
[P in keyof Location]: Location[P];
|
|
36
38
|
};
|
|
37
|
-
export declare type LocationSource = "CAD" | "FleetComplete" | "GST" | "Samsara" | "SkyMira" | "SkyTrack" | "Somewear" | "TC-Android" | "TC-iOS" | "TCMobile-Android" | "TCMobile-iOS" | "VehicleModem";
|
|
38
|
-
export declare type LocationKindType = "fixed-wing" | "helicopter" | "marine" | "person" | "vehicle";
|
|
39
39
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,cAAc,EACf,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,gBAAgB,EAChB,cAAc,GACf,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,IAAI,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,eAAe,GAAG;IAC5B,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,cAAc,GAAG;KAC1B,CAAC,IAAI,MAAM,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC;CACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tabletcommand-location",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Tablet Command Location",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"debug": "^4.3.5",
|
|
16
16
|
"lodash": "~4.17.21",
|
|
17
|
-
"tabletcommand-backend-models": "~5.38.
|
|
17
|
+
"tabletcommand-backend-models": "~5.38.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/chai": "^4.3.16",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"eslint-plugin-security": "^2.1.0",
|
|
39
39
|
"gulp": "^4.0.2",
|
|
40
40
|
"gulp-shell": "^0.8.0",
|
|
41
|
-
"mocha": "^10.
|
|
41
|
+
"mocha": "^10.5.0",
|
|
42
42
|
"mongoose": "~5.10.19",
|
|
43
43
|
"ts-node": "^10.9.2",
|
|
44
44
|
"type-coverage": "^2.29.0",
|
package/src/index.ts
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import locationModule from "./location";
|
|
2
2
|
import storeModule from "./store";
|
|
3
|
-
import {
|
|
4
|
-
DepartmentModel,
|
|
5
|
-
LocationModel,
|
|
6
|
-
CADVehicleModel,
|
|
7
|
-
Department,
|
|
3
|
+
import {
|
|
4
|
+
DepartmentModel,
|
|
5
|
+
LocationModel,
|
|
6
|
+
CADVehicleModel,
|
|
7
|
+
Department,
|
|
8
8
|
} from "tabletcommand-backend-models";
|
|
9
9
|
import _ from "lodash";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
LocationKindType,
|
|
12
|
+
LocationPayload,
|
|
13
|
+
LocationSource,
|
|
14
|
+
} from "./types";
|
|
15
|
+
|
|
16
|
+
// Export types to external projects
|
|
17
|
+
export {
|
|
18
|
+
LocationKindType,
|
|
19
|
+
LocationPayload,
|
|
20
|
+
LocationSource,
|
|
21
|
+
};
|
|
22
|
+
|
|
11
23
|
export function lib(
|
|
12
24
|
departmentModel: DepartmentModel,
|
|
13
25
|
locationModel: LocationModel,
|
package/src/types.ts
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Location,
|
|
3
|
+
LocationKindType,
|
|
4
|
+
LocationSource,
|
|
5
|
+
} from "tabletcommand-backend-models";
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
LocationKindType,
|
|
9
|
+
LocationSource,
|
|
10
|
+
};
|
|
2
11
|
|
|
3
12
|
export interface LocationPayload {
|
|
4
|
-
|
|
5
|
-
longitude: number | string;
|
|
6
|
-
vehicleId: string;
|
|
7
|
-
radioName: string;
|
|
13
|
+
altitude?: number;
|
|
8
14
|
avlTime: string;
|
|
9
|
-
speed?: number;
|
|
10
|
-
source: LocationSource;
|
|
11
15
|
kindType: LocationKindType;
|
|
16
|
+
latitude: number;
|
|
17
|
+
longitude: number;
|
|
18
|
+
radioName: string;
|
|
19
|
+
source: LocationSource;
|
|
20
|
+
speed?: number;
|
|
21
|
+
vehicleId: string;
|
|
12
22
|
}
|
|
13
23
|
|
|
14
24
|
export interface Vehicle {
|
|
@@ -39,10 +49,3 @@ export interface LocationDelta {
|
|
|
39
49
|
export type LocationObject = {
|
|
40
50
|
[P in keyof Location]: Location[P]
|
|
41
51
|
};
|
|
42
|
-
|
|
43
|
-
export type LocationSource =
|
|
44
|
-
"CAD" | "FleetComplete" | "GST" |
|
|
45
|
-
"Samsara" | "SkyMira" | "SkyTrack" | "Somewear" |
|
|
46
|
-
"TC-Android" | "TC-iOS" | "TCMobile-Android" | "TCMobile-iOS" |
|
|
47
|
-
"VehicleModem";
|
|
48
|
-
export type LocationKindType = "fixed-wing" | "helicopter" | "marine" | "person" | "vehicle";
|