tabletcommand-location 1.0.7 → 1.0.9

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/.eslintrc.js CHANGED
@@ -7,7 +7,8 @@ module.exports = {
7
7
  extends: [
8
8
  "eslint:recommended",
9
9
  "plugin:@typescript-eslint/recommended",
10
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
10
+ "plugin:@typescript-eslint/recommended-requiring-type-checking",
11
+ "plugin:security/recommended-legacy",
11
12
  ],
12
13
  ignorePatterns: [
13
14
  ".eslintrc.js",
package/build/store.js CHANGED
@@ -84,7 +84,9 @@ function store(departmentModel, locationModel, cadVehicleModel) {
84
84
  }
85
85
  const locationDelta = {};
86
86
  for (const [key, value] of Object.entries(updateObject)) {
87
+ // eslint-disable-next-line security/detect-object-injection
87
88
  if (JSON.stringify(value) !== JSON.stringify(locationRecord[key])) {
89
+ // eslint-disable-next-line security/detect-object-injection
88
90
  locationDelta[key] = value;
89
91
  }
90
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgC;AAQhC,oDAAuB;AAGvB,SAAgB,KAAK,CACnB,eAAgC,EAChC,aAA4B,EAC5B,eAAgC;IAEhC,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,uCAAuC,CAAC,CAAC;IAEnE,KAAK,UAAU,UAAU,CAAC,IAAqB,EAAE,YAAoB;QACnE,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY;SACb,CAAC;QACF,OAAO,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,CAAC;IAED,KAAK,UAAU,aAAa,CAAC,IAAyB,EAAE,YAAoB;QAC1E,MAAM,KAAK,GAAG;YACV,YAAY;YACZ,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;QACF,MAAM,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AC,KAAK,CAAC;QAE/B,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,SAAS,qBAAqB,CAAC,cAAuC,EAAE,YAAqC,EAAE,MAAY;QACzH,IAAI,CAAC,gBAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;YAC/B,OAAO,YAAY,CAAC;SACrB;QACD,MAAM,aAAa,GAA4B,EAAE,CAAC;QAClD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACvD,4DAA4D;YAC5D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE;gBACjE,4DAA4D;gBAC5D,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;aAC5B;SACF;QAED,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,SAAS,GAAG;YAChB,QAAQ;YACR,YAAY;YACZ,YAAY;YACZ,aAAa;YACb,YAAY;YACZ,YAAY;YACZ,QAAQ;YACR,OAAO;YACP,UAAU;SACX,CAAC;QACF,IAAI,gBAAC,CAAC,YAAY,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACrD,aAAa,CAAC,cAAc,GAAG,MAAM,CAAC,WAAW,EAAE,CAAC;SACrD;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,OAAO;QACH,UAAU;QACV,aAAa;QACb,cAAc;KACjB,CAAC;AACJ,CAAC;AAxHD,sBAwHC;AACD,kBAAe,KAAK,CAAC"}
@@ -1,7 +1,7 @@
1
- import { DepartmentModel, LocationModel, CADVehicleModel } from "tabletcommand-backend-models";
1
+ import { DepartmentModel, LocationModel, CADVehicleModel, Department } from "tabletcommand-backend-models";
2
2
  import { LocationPayload } from "./types";
3
3
  export declare function lib(departmentModel: DepartmentModel, locationModel: LocationModel, cadVehicleModel: CADVehicleModel): {
4
- processLocations: (department: Department, items: LocationPayload[] | null | undefined) => Promise<void | never[]>;
4
+ processLocations: (department: Partial<Department>, items: LocationPayload[] | null | undefined) => Promise<void | never[]>;
5
5
  };
6
6
  export default lib;
7
7
  export declare type LibModule = ReturnType<typeof lib>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,wBAAgB,GAAG,CACjB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe;sDAQwC,eAAe,EAAE,GAAG,IAAI,GAAG,SAAS;EAqC7G;AAED,eAAe,GAAG,CAAC;AACnB,oBAAY,SAAS,GAAG,UAAU,CAAC,OAAO,GAAG,CAAC,CAAC"}
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,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,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"}
@@ -1,8 +1,10 @@
1
+ /// <reference types="mongoose" />
2
+ import { Department, CADVehicle } from "tabletcommand-backend-models";
1
3
  import { LocationPayload } from "./types";
2
4
  import { StoreModule } from "./store";
3
5
  export declare function location(store: StoreModule): {
4
- processVehicle: (departmentExceptions: string[], item: LocationPayload, department: Department, atDate: Date) => Promise<any>;
5
- processItems: (department: Department, items: LocationPayload[], atDate: Date) => Promise<void>;
6
+ processVehicle: (departmentExceptions: string[], item: LocationPayload, department: Partial<Department>, atDate: Date) => Promise<import("mongoose").DocumentDefinition<CADVehicle> | null>;
7
+ processItems: (department: Partial<Department>, items: LocationPayload[], atDate: Date) => Promise<void>;
6
8
  };
7
9
  export default location;
8
10
  export declare type LocationModule = ReturnType<typeof location>;
@@ -1 +1 @@
1
- {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW;2CAmGW,MAAM,EAAE,QAAQ,eAAe,kCAA2C,IAAI;kDAqB9D,eAAe,EAAE,UAAU,IAAI;EA4BpG;AAED,eAAe,QAAQ,CAAC;AACxB,oBAAY,cAAc,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":";AACA,OAAO,EACL,UAAU,EAEV,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,wBAAgB,QAAQ,CAAC,KAAK,EAAE,WAAW;2CAmGW,MAAM,EAAE,QAAQ,eAAe,cAAc,QAAQ,UAAU,CAAC,UAAU,IAAI;+BAqB1F,QAAQ,UAAU,CAAC,SAAS,eAAe,EAAE,UAAU,IAAI;EA4BpG;AAED,eAAe,QAAQ,CAAC;AACxB,oBAAY,cAAc,GAAG,UAAU,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -1,9 +1,10 @@
1
- import { DepartmentModel, LocationModel, CADVehicleModel } from "tabletcommand-backend-models";
1
+ /// <reference types="mongoose" />
2
+ import { DepartmentModel, Location, LocationModel, CADVehicleModel, CADVehicle } from "tabletcommand-backend-models";
2
3
  import { LocationPayload } from "./types";
3
4
  export declare function store(departmentModel: DepartmentModel, locationModel: LocationModel, cadVehicleModel: CADVehicleModel): {
4
- getVehicle: (item: LocationPayload, departmentId: string) => Promise<any>;
5
- updateVehicle: (item: CADVehicle, departmentId: string) => Promise<any>;
6
- updateLocation: (item: Location, atDate: Date) => Promise<void>;
5
+ getVehicle: (item: LocationPayload, departmentId: string) => Promise<import("mongoose").DocumentDefinition<CADVehicle> | null>;
6
+ updateVehicle: (item: Partial<CADVehicle>, departmentId: string) => Promise<CADVehicle | null>;
7
+ updateLocation: (item: Partial<Location>, atDate: Date) => Promise<void>;
7
8
  };
8
9
  export default store;
9
10
  export declare type StoreModule = ReturnType<typeof store>;
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,aAAa,EACb,eAAe,EAEhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,KAAK,CACnB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe;uBAIA,eAAe,gBAAgB,MAAM;oDAQC,MAAM;6CAab,IAAI;EA0FpE;AACD,eAAe,KAAK,CAAC;AACrB,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":";AACA,OAAO,EACL,eAAe,EACf,QAAQ,EACR,aAAa,EACb,eAAe,EACf,UAAU,EACX,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAkB,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,wBAAgB,KAAK,CACnB,eAAe,EAAE,eAAe,EAChC,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,eAAe;uBAIA,eAAe,gBAAgB,MAAM;0BAQlC,QAAQ,UAAU,CAAC,gBAAgB,MAAM;2BAaxC,QAAQ,QAAQ,CAAC,UAAU,IAAI;EA4FpE;AACD,eAAe,KAAK,CAAC;AACrB,oBAAY,WAAW,GAAG,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC"}
@@ -1,14 +1,61 @@
1
+ import * as mongoose from "mongoose";
1
2
  import "mocha";
3
+ import { BackendModels, Agency, Department } from "tabletcommand-backend-models";
2
4
  export default function (modelsModule: typeof import("tabletcommand-backend-models")): {
3
- department: Department;
4
- agency: Agency;
5
+ department: Partial<Department>;
6
+ agency: Partial<Agency>;
5
7
  clearTestData: (mods: BackendModels) => Promise<void>;
6
8
  prepareTestData: (mods: BackendModels) => Promise<void>;
7
- before: () => Promise<BackendModels>;
9
+ before: () => Promise<{
10
+ ActionLog: import("tabletcommand-backend-models").ActionLogModel;
11
+ Agency: import("tabletcommand-backend-models").AgencyModel;
12
+ ArcGISGroup: import("tabletcommand-backend-models").ArcGISGroupModel;
13
+ Assignment: import("tabletcommand-backend-models").AssignmentModel;
14
+ Battalion: import("tabletcommand-backend-models").BattalionModel;
15
+ BeaconLog: import("tabletcommand-backend-models").BeaconLogModel;
16
+ CADIncident: import("tabletcommand-backend-models").CADIncidentModel;
17
+ CADIncidentBlock: import("tabletcommand-backend-models").CADIncidentBlockModel;
18
+ CADIncidentStream: import("tabletcommand-backend-models").CADIncidentStreamModel;
19
+ CADStatus: import("tabletcommand-backend-models").CADStatusModel;
20
+ CADStatusMap: import("tabletcommand-backend-models").CADStatusMapModel;
21
+ CADVehicle: import("tabletcommand-backend-models").CADVehicleModel;
22
+ CADVehicleStatus: import("tabletcommand-backend-models").CADVehicleStatusModel;
23
+ CADVehicleStatusHistory: import("tabletcommand-backend-models").CADVehicleStatusHistoryModel;
24
+ ChartDeviceStats: import("tabletcommand-backend-models").ChartDeviceStatsModel;
25
+ ChartIncident: import("tabletcommand-backend-models").ChartIncidentModel;
26
+ ChartManagedIncident: import("tabletcommand-backend-models").ChartManagedIncidentModel;
27
+ ChartUser: import("tabletcommand-backend-models").ChartUserModel;
28
+ Checklist: import("tabletcommand-backend-models").ChecklistModel;
29
+ ChecklistItem: import("tabletcommand-backend-models").ChecklistItemModel;
30
+ CSVImport: import("tabletcommand-backend-models").CSVImportModel;
31
+ Department: import("tabletcommand-backend-models").DepartmentModel;
32
+ DeviceMapping: import("tabletcommand-backend-models").DeviceMappingModel;
33
+ Esri: import("tabletcommand-backend-models").EsriModel;
34
+ GSTMapping: import("tabletcommand-backend-models").GSTMappingModel;
35
+ IncidentEvent: import("tabletcommand-backend-models").IncidentEventModel;
36
+ IncidentNotified: import("tabletcommand-backend-models").IncidentNotifiedModel;
37
+ IncidentTakeover: import("tabletcommand-backend-models").IncidentTakeoverModel;
38
+ JobLog: import("tabletcommand-backend-models").JobLogModel;
39
+ Location: import("tabletcommand-backend-models").LocationModel;
40
+ MailLog: import("tabletcommand-backend-models").MailLogModel;
41
+ ManagedIncident: import("tabletcommand-backend-models").ManagedIncidentModel;
42
+ Message: import("tabletcommand-backend-models").MessageModel;
43
+ Monitor: import("tabletcommand-backend-models").MonitorModel;
44
+ PersonnelImport: import("tabletcommand-backend-models").PersonnelImportModel;
45
+ RateLimit: import("tabletcommand-backend-models").RateLimitModel;
46
+ RemoteLog: import("tabletcommand-backend-models").RemoteLogModel;
47
+ Session: import("tabletcommand-backend-models").SessionModel;
48
+ SMTPUnhandled: import("tabletcommand-backend-models").SMTPUnhandledModel;
49
+ Template: import("tabletcommand-backend-models").TemplateModel;
50
+ User: import("tabletcommand-backend-models").UserModel;
51
+ UserDevice: import("tabletcommand-backend-models").UserDeviceModel;
52
+ UserRegistration: import("tabletcommand-backend-models").UserRegistrationModel;
53
+ ValidationReport: import("tabletcommand-backend-models").ValidationReportModel;
54
+ }>;
8
55
  beforeEach: () => Promise<void>;
9
56
  after: () => Promise<void>;
10
57
  afterEach: () => Promise<void>;
11
58
  getModels: () => BackendModels;
12
- getConnection: () => any;
59
+ getConnection: () => typeof mongoose;
13
60
  };
14
61
  //# sourceMappingURL=mock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/test/mock.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,CAAC;AAQf,MAAM,CAAC,OAAO,WAAW,YAAY,EAAE,cAAc,8BAA8B,CAAC;;;;;;;;;;;EAkJnF"}
1
+ {"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/test/mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,OAAO,CAAC;AAEf,OAAO,EACL,aAAa,EACb,MAAM,EACN,UAAU,EACX,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,OAAO,WAAW,YAAY,EAAE,cAAc,8BAA8B,CAAC;;;0BAkE/C,aAAa;4BAQX,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoD5B,aAAa;yBAIT,eAAe;EAgB1C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tabletcommand-location",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Tablet Command Location",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -14,34 +14,34 @@
14
14
  "dependencies": {
15
15
  "debug": "^4.3.4",
16
16
  "lodash": "~4.17.21",
17
- "tabletcommand-backend-models": "~5.35.2"
17
+ "tabletcommand-backend-models": "~5.36.12"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/chai": "^4.3.10",
20
+ "@types/chai": "^4.3.11",
21
21
  "@types/debug": "^4.1.12",
22
22
  "@types/express": "^4.17.21",
23
- "@types/lodash": "^4.14.201",
24
- "@types/mocha": "^10.0.4",
23
+ "@types/lodash": "^4.14.202",
24
+ "@types/mocha": "^10.0.6",
25
25
  "@types/mongodb": "~3.6.20",
26
26
  "@types/mongoose": "~5.10.5",
27
- "@types/node": "^20.9.2",
28
- "@types/uuid": "^9.0.7",
29
- "@typescript-eslint/eslint-plugin": "^6.11.0",
30
- "@typescript-eslint/parser": "^6.11.0",
27
+ "@types/node": "^20.11.17",
28
+ "@types/uuid": "^9.0.8",
29
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
30
+ "@typescript-eslint/parser": "^6.21.0",
31
31
  "bson": "~4.7.0",
32
32
  "chai": "^4.3.10",
33
33
  "cspell": "^7.3.8",
34
34
  "del": "^6.0.0",
35
- "eslint": "^8.54.0",
35
+ "eslint": "^8.56.0",
36
36
  "eslint-plugin-node": "^11.1.0",
37
37
  "eslint-plugin-promise": "^6.1.1",
38
- "eslint-plugin-security": "^1.7.1",
38
+ "eslint-plugin-security": "^2.1.0",
39
39
  "gulp": "^4.0.2",
40
40
  "gulp-shell": "^0.8.0",
41
- "mocha": "^10.2.0",
41
+ "mocha": "^10.3.0",
42
42
  "mongoose": "~5.10.19",
43
- "ts-node": "^10.9.1",
44
- "type-coverage": "^2.27.0",
43
+ "ts-node": "^10.9.2",
44
+ "type-coverage": "^2.27.1",
45
45
  "typescript": "~4.7.4"
46
46
  },
47
47
  "typeCoverage": {
package/src/store.ts CHANGED
@@ -98,7 +98,9 @@ export function store(
98
98
  }
99
99
  const locationDelta: Partial<LocationObject> = {};
100
100
  for (const [key, value] of Object.entries(updateObject)) {
101
+ // eslint-disable-next-line security/detect-object-injection
101
102
  if (JSON.stringify(value) !== JSON.stringify(locationRecord[key])) {
103
+ // eslint-disable-next-line security/detect-object-injection
102
104
  locationDelta[key] = value;
103
105
  }
104
106
  }