tabletcommand-backend-models 5.36.2 → 5.36.3
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/models/monitor.js
CHANGED
@@ -42,6 +42,12 @@ async function MonitorModule(mongoose) {
|
|
42
42
|
type: String,
|
43
43
|
default: "",
|
44
44
|
},
|
45
|
+
// Manually incremented when a certain failure has occurred (status = "active")
|
46
|
+
// Currently, has no effect for "restored".
|
47
|
+
count: {
|
48
|
+
type: Number,
|
49
|
+
default: 1,
|
50
|
+
},
|
45
51
|
}, {
|
46
52
|
collection: "massive_monitor",
|
47
53
|
});
|
@@ -49,9 +55,6 @@ async function MonitorModule(mongoose) {
|
|
49
55
|
virtuals: true,
|
50
56
|
versionKey: false,
|
51
57
|
});
|
52
|
-
modelSchema.virtual("id").get(function () {
|
53
|
-
return this._id.toHexString();
|
54
|
-
});
|
55
58
|
modelSchema.plugin(mongooseLeanVirtuals);
|
56
59
|
modelSchema.set("autoIndex", false);
|
57
60
|
return (0, helpers_1.createModel)(mongoose, "Monitor", modelSchema);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../src/models/monitor.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../src/models/monitor.ts"],"names":[],"mappings":";;;AAAA,wCASoB;AACpB,+DAA+D;AAExD,KAAK,UAAU,aAAa,CAAC,QAAwB;IAC1D,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;IAEnC,MAAM,WAAW,GAAG,IAAA,sBAAY,EAAC,MAAM,EAAE;QACvC,GAAG,EAAE;YACH,IAAI,EAAE,KAAK,CAAC,QAAQ;YACpB,IAAI,EAAE,IAAI;SACX;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,IAAI;SACZ;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,gBAAgB,EAAE;YAChB,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACf;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;SACf;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,iCAAuB;SACjC;QACD,MAAM,EAAE;YACN,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,qBAAW;SACrB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,+EAA+E;QAC/E,2CAA2C;QAC3C,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,CAAC;SACX;KACF,EAAE;QACD,UAAU,EAAE,iBAAiB;KAC9B,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,CAAC,QAAQ,EAAE;QACxB,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,WAAW,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IACzC,WAAW,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IAEpC,OAAO,IAAA,qBAAW,EAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;AACvD,CAAC;AA1DD,sCA0DC;AAID,kBAAe,aAA2E,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/models/monitor.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,8BAA8B,EAC9B,+BAA+B,
|
1
|
+
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../src/models/monitor.ts"],"names":[],"mappings":";AAAA,OAAO,EAIL,8BAA8B,EAC9B,+BAA+B,EAC/B,cAAc,EACd,sBAAsB,EAEvB,MAAM,YAAY,CAAC;AAGpB,wBAAsB,aAAa,CAAC,QAAQ,EAAE,cAAc;;;;;;;;;;;;GA0D3D;AAED,MAAM,WAAW,OAAQ,SAAQ,8BAA8B,CAAC,OAAO,aAAa,CAAC;CAAI;AACzF,MAAM,WAAW,YAAa,SAAQ,+BAA+B,CAAC,OAAO,CAAC;CAAI;;AAClF,wBAA2F"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "tabletcommand-backend-models",
|
3
|
-
"version": "5.36.
|
3
|
+
"version": "5.36.3",
|
4
4
|
"description": "Tablet Command Backend Models",
|
5
5
|
"scripts": {
|
6
6
|
"build": "gulp build",
|
@@ -33,8 +33,8 @@
|
|
33
33
|
"@types/mongodb": "^3.6.20",
|
34
34
|
"@types/mongoose": "~5.10.5",
|
35
35
|
"@types/uuid": "~9.0.7",
|
36
|
-
"@typescript-eslint/eslint-plugin": "~6.19.
|
37
|
-
"@typescript-eslint/parser": "~6.19.
|
36
|
+
"@typescript-eslint/eslint-plugin": "~6.19.1",
|
37
|
+
"@typescript-eslint/parser": "~6.19.1",
|
38
38
|
"chai": "^4.3.10",
|
39
39
|
"cspell": "^7.3.9",
|
40
40
|
"del": "^6.1.1",
|
package/src/models/monitor.ts
CHANGED
@@ -4,7 +4,6 @@ import {
|
|
4
4
|
currentDate,
|
5
5
|
ItemTypeFromTypeSchemaFunction,
|
6
6
|
ModelTypeFromTypeSchemaFunction,
|
7
|
-
MongooseDocument,
|
8
7
|
MongooseModule,
|
9
8
|
ReplaceModelReturnType,
|
10
9
|
retrieveCurrentUnixTime,
|
@@ -51,6 +50,12 @@ export async function MonitorModule(mongoose: MongooseModule) {
|
|
51
50
|
type: String,
|
52
51
|
default: "",
|
53
52
|
},
|
53
|
+
// Manually incremented when a certain failure has occurred (status = "active")
|
54
|
+
// Currently, has no effect for "restored".
|
55
|
+
count: {
|
56
|
+
type: Number,
|
57
|
+
default: 1,
|
58
|
+
},
|
54
59
|
}, {
|
55
60
|
collection: "massive_monitor",
|
56
61
|
});
|
@@ -59,10 +64,6 @@ export async function MonitorModule(mongoose: MongooseModule) {
|
|
59
64
|
versionKey: false,
|
60
65
|
});
|
61
66
|
|
62
|
-
modelSchema.virtual("id").get(function(this: MongooseDocument) {
|
63
|
-
return this._id.toHexString();
|
64
|
-
});
|
65
|
-
|
66
67
|
modelSchema.plugin(mongooseLeanVirtuals);
|
67
68
|
modelSchema.set("autoIndex", false);
|
68
69
|
|