@hestia-earth/api 0.9.34 → 0.9.35-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.
|
@@ -96,10 +96,16 @@ exports.parseLogMissingLookups = function (data) {
|
|
|
96
96
|
var messages = lines.map(parseMessage).filter(function (v) { return Object.keys(v).length > 1; });
|
|
97
97
|
return utils_1.unique(messages.map(parseLookup));
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
var filterByType = function (expectedType, _a) {
|
|
100
|
+
var type = _a.type;
|
|
101
|
+
return !type ||
|
|
102
|
+
type === expectedType ||
|
|
103
|
+
Object.values(schema_1.SchemaType).filter(function (t) { return !schema_1.isTypeNode(t); }).includes(type);
|
|
104
|
+
};
|
|
105
|
+
exports.groupLogsByModel = function (type, data) {
|
|
100
106
|
return data.split('\n')
|
|
101
107
|
.map(parseMessage)
|
|
102
|
-
.filter(function (v) { return !!(v === null || v === void 0 ? void 0 : v.term) && !!(v === null || v === void 0 ? void 0 : v.model); })
|
|
108
|
+
.filter(function (v) { return !!(v === null || v === void 0 ? void 0 : v.term) && !!(v === null || v === void 0 ? void 0 : v.model) && filterByType(type, v); })
|
|
103
109
|
.reduce(function (group, _a) {
|
|
104
110
|
var logger = _a.logger, term = _a.term, model = _a.model, key = _a.key, should_run = _a.should_run, input = _a.input, property = _a.property, log = __rest(_a, ["logger", "term", "model", "key", "should_run", "input", "property"]);
|
|
105
111
|
var isOrchestrator = logger.includes('orchestrator');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/api",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.35-0",
|
|
4
4
|
"description": "Hestia API definitions",
|
|
5
5
|
"main": "dist/models.js",
|
|
6
6
|
"typings": "dist/models.d.ts",
|
|
@@ -33,9 +33,10 @@
|
|
|
33
33
|
"@hestia-earth/schema": "^7.6.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@commitlint/cli": "^
|
|
37
|
-
"@commitlint/config-conventional": "^
|
|
36
|
+
"@commitlint/cli": "^16.2.4",
|
|
37
|
+
"@commitlint/config-conventional": "^16.2.4",
|
|
38
38
|
"@elastic/elasticsearch": "7.13.0",
|
|
39
|
+
"@hestia-earth/eslint-config": "0.0.3",
|
|
39
40
|
"@hestia-earth/json-schema": "^7.6.1",
|
|
40
41
|
"@hestia-earth/schema-convert": "^7.6.1",
|
|
41
42
|
"@hestia-earth/schema-validation": "^7.6.1",
|
|
@@ -62,8 +63,8 @@
|
|
|
62
63
|
"@types/request": "^2.48.8",
|
|
63
64
|
"@types/request-promise-native": "^1.0.18",
|
|
64
65
|
"@types/winston": "^2.4.4",
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
66
|
-
"@typescript-eslint/parser": "^
|
|
66
|
+
"@typescript-eslint/eslint-plugin": "^5.23.0",
|
|
67
|
+
"@typescript-eslint/parser": "^5.23.0",
|
|
67
68
|
"aws-sdk": "^2.1092.0",
|
|
68
69
|
"axios": "^0.21.4",
|
|
69
70
|
"body-parser": "^1.19.2",
|