@hestia-earth/api 0.9.26 → 0.9.27-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/dev.ts +3 -0
- package/dist/nodes/model/model.d.ts +5 -1
- package/dist/nodes/model/model.js +13 -14
- package/package.json +13 -11
package/dev.ts
ADDED
|
@@ -11,5 +11,9 @@ export declare const allowedDataStates: (type: SchemaType | NodeType) => DataSta
|
|
|
11
11
|
export declare const pathWithState: (type: SchemaType | NodeType, id: string, dataState?: DataState) => string;
|
|
12
12
|
export declare const nodeTypeToParam: (type: NodeType) => string;
|
|
13
13
|
export declare const paramToNodeType: (type: string) => NodeType;
|
|
14
|
-
export declare const parseLogMissingLookups: (data: string) =>
|
|
14
|
+
export declare const parseLogMissingLookups: (data: string) => {
|
|
15
|
+
filename: string;
|
|
16
|
+
termId: any;
|
|
17
|
+
column: any;
|
|
18
|
+
}[];
|
|
15
19
|
export declare const groupLogsByModel: (data: string) => any;
|
|
@@ -76,18 +76,17 @@ var parseFilename = function (filepath) {
|
|
|
76
76
|
return model_1.fileToExt(filename, ext);
|
|
77
77
|
};
|
|
78
78
|
var missingLookupPrefix = 'Missing lookup';
|
|
79
|
+
var parseLookup = function (_a) {
|
|
80
|
+
var column = _a.column, termid = _a.termid, _b = missingLookupPrefix, missingLookup = _a[_b];
|
|
81
|
+
return ({
|
|
82
|
+
filename: parseFilename(missingLookup), termId: termid,
|
|
83
|
+
column: column
|
|
84
|
+
});
|
|
85
|
+
};
|
|
79
86
|
exports.parseLogMissingLookups = function (data) {
|
|
80
87
|
var lines = data.split('\n').filter(function (log) { return log.includes(missingLookupPrefix); });
|
|
81
88
|
var messages = lines.map(parseMessage).filter(function (v) { return Object.keys(v).length > 1; });
|
|
82
|
-
|
|
83
|
-
var _b = missingLookupPrefix, path = _a[_b], termId = _a.termid, column = _a.column;
|
|
84
|
-
return JSON.stringify({ filename: parseFilename(path), termId: termId, column: column });
|
|
85
|
-
});
|
|
86
|
-
return utils_1.unique(lookups).map(function (v) { return JSON.parse(v); });
|
|
87
|
-
};
|
|
88
|
-
var addMissingLookup = function (_a) {
|
|
89
|
-
var column = _a.column, termid = _a.termid, missingLookup = _a["Missing lookup"];
|
|
90
|
-
return missingLookup ? { filename: parseFilename(missingLookup), termId: termid, column: column } : null;
|
|
89
|
+
return utils_1.unique(messages.map(parseLookup));
|
|
91
90
|
};
|
|
92
91
|
exports.groupLogsByModel = function (data) {
|
|
93
92
|
return data.split('\n')
|
|
@@ -98,7 +97,7 @@ exports.groupLogsByModel = function (data) {
|
|
|
98
97
|
var term = _a.term, model = _a.model, key = _a.key, should_run = _a.should_run, log = __rest(_a, ["term", "model", "key", "should_run"]);
|
|
99
98
|
var modelKey = key || model;
|
|
100
99
|
group[term] = group[term] || {};
|
|
101
|
-
group[term][modelKey] = group[term][modelKey] || {};
|
|
100
|
+
group[term][modelKey] = group[term][modelKey] || { isKey: !!key };
|
|
102
101
|
if (typeof should_run !== 'undefined') {
|
|
103
102
|
group[term][modelKey] = __assign(__assign(__assign({}, group[term][modelKey]), log), { shouldRun: should_run === 'True' });
|
|
104
103
|
}
|
|
@@ -106,10 +105,10 @@ exports.groupLogsByModel = function (data) {
|
|
|
106
105
|
var requirements = log.requirements, logData = __rest(log, ["requirements"]);
|
|
107
106
|
group[term][modelKey].requirements = __assign(__assign({}, (group[term][modelKey].requirements || {})), logData);
|
|
108
107
|
}
|
|
109
|
-
else if (
|
|
110
|
-
group[term][modelKey].missingLookups = __spreadArrays((group[term][modelKey].missingLookups || []), [
|
|
111
|
-
|
|
112
|
-
]);
|
|
108
|
+
else if (missingLookupPrefix in log) {
|
|
109
|
+
group[term][modelKey].missingLookups = utils_1.unique(__spreadArrays((group[term][modelKey].missingLookups || []), [
|
|
110
|
+
parseLookup(log)
|
|
111
|
+
]));
|
|
113
112
|
}
|
|
114
113
|
else {
|
|
115
114
|
group[term][modelKey].logs = __assign(__assign({}, (group[term][modelKey].logs || {})), log);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/api",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.27-3",
|
|
4
4
|
"description": "Hestia API definitions",
|
|
5
5
|
"main": "dist/models.js",
|
|
6
6
|
"typings": "dist/models.d.ts",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"build:module": "rm -rf dist && tsc -p tsconfig.dist.json",
|
|
10
10
|
"validate:jsonld": "hestia-validate-jsonld '' test",
|
|
11
11
|
"start": "node index.js",
|
|
12
|
+
"dev": "ts-node-dev --respawn --rs dev.ts",
|
|
12
13
|
"watch": "tsc --watch",
|
|
13
14
|
"lint": "eslint \"src/**/*.ts\"",
|
|
14
15
|
"lint:fix": "npm run lint -- --fix",
|
|
@@ -37,11 +38,11 @@
|
|
|
37
38
|
"@elastic/elasticsearch": "7.13.0",
|
|
38
39
|
"@hestia-earth/schema-convert": "^7.0.0",
|
|
39
40
|
"@hestia-earth/schema-validation": "^7.0.0",
|
|
40
|
-
"@hestia-earth/utils": "^0.10.
|
|
41
|
+
"@hestia-earth/utils": "^0.10.4",
|
|
41
42
|
"@mendeley/api": "^10.0.2",
|
|
42
|
-
"@sentry/node": "^6.
|
|
43
|
-
"@sentry/tracing": "^6.
|
|
44
|
-
"@slack/web-api": "^6.
|
|
43
|
+
"@sentry/node": "^6.17.4",
|
|
44
|
+
"@sentry/tracing": "^6.17.4",
|
|
45
|
+
"@slack/web-api": "^6.6.0",
|
|
45
46
|
"@sokratis/passport-linkedin-oauth2": "^2.1.0",
|
|
46
47
|
"@types/chai": "^4.3.0",
|
|
47
48
|
"@types/compression": "^1.7.2",
|
|
@@ -55,18 +56,18 @@
|
|
|
55
56
|
"@types/mongoose": "^5.11.97",
|
|
56
57
|
"@types/morgan": "^1.9.3",
|
|
57
58
|
"@types/multer": "^1.4.7",
|
|
58
|
-
"@types/node": "^14.18.
|
|
59
|
+
"@types/node": "^14.18.10",
|
|
59
60
|
"@types/orientjs": "^3.0.12",
|
|
60
61
|
"@types/request": "^2.48.8",
|
|
61
62
|
"@types/request-promise-native": "^1.0.18",
|
|
62
63
|
"@types/winston": "^2.4.4",
|
|
63
64
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
64
65
|
"@typescript-eslint/parser": "^4.33.0",
|
|
65
|
-
"aws-sdk": "^2.
|
|
66
|
+
"aws-sdk": "^2.1067.0",
|
|
66
67
|
"axios": "^0.21.4",
|
|
67
68
|
"body-parser": "^1.19.1",
|
|
68
69
|
"capitalize": "^2.0.4",
|
|
69
|
-
"chai": "^4.3.
|
|
70
|
+
"chai": "^4.3.6",
|
|
70
71
|
"compression": "^1.7.4",
|
|
71
72
|
"cors": "^2.8.4",
|
|
72
73
|
"dotenv": "^6.0.0",
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
"lodash.get": "^4.4.2",
|
|
82
83
|
"lodash.orderby": "^4.6.0",
|
|
83
84
|
"lodash.pick": "^4.4.0",
|
|
84
|
-
"mocha": "^9.
|
|
85
|
+
"mocha": "^9.2.0",
|
|
85
86
|
"mocha-prepare": "^0.1.0",
|
|
86
87
|
"mongoose": "^5.13.14",
|
|
87
88
|
"mongoose-bcrypt": "^1.9.0",
|
|
@@ -103,12 +104,13 @@
|
|
|
103
104
|
"standard-version": "^9.3.2",
|
|
104
105
|
"supertest": "^3.4.2",
|
|
105
106
|
"swagger-jsdoc": "^4.3.2",
|
|
106
|
-
"swagger-ui-dist": "^4.1
|
|
107
|
+
"swagger-ui-dist": "^4.4.1",
|
|
107
108
|
"swagger-ui-express": "^4.3.0",
|
|
108
109
|
"ts-node": "^8.10.2",
|
|
110
|
+
"ts-node-dev": "^1.1.8",
|
|
109
111
|
"typescript": "^3.9.10",
|
|
110
112
|
"uid-generator": "^2.0.0",
|
|
111
|
-
"winston": "^3.
|
|
113
|
+
"winston": "^3.5.1"
|
|
112
114
|
},
|
|
113
115
|
"husky": {
|
|
114
116
|
"hooks": {
|