@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.
@@ -16,4 +16,4 @@ export declare const parseLogMissingLookups: (data: string) => {
16
16
  termId: any;
17
17
  column: any;
18
18
  }[];
19
- export declare const groupLogsByModel: (data: string) => any;
19
+ export declare const groupLogsByModel: (type: NodeType, data: string) => any;
@@ -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
- exports.groupLogsByModel = function (data) {
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');
@@ -10,5 +10,8 @@ export declare class Reconciliation extends BaseModel {
10
10
  name: string;
11
11
  level?: ReconciliationLevel;
12
12
  details?: any;
13
- error?: string;
13
+ error?: {
14
+ message: string;
15
+ subMessages: string[];
16
+ };
14
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/api",
3
- "version": "0.9.34",
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": "^12.1.4",
37
- "@commitlint/config-conventional": "^12.1.4",
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": "^4.33.0",
66
- "@typescript-eslint/parser": "^4.33.0",
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",