@hestia-earth/api 0.21.6 → 0.21.8
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.
|
@@ -136,7 +136,7 @@ export declare const filepathSearch: (...parts: string[]) => {
|
|
|
136
136
|
};
|
|
137
137
|
export declare const fileExt: (path: string) => string;
|
|
138
138
|
export declare const fileToExt: (path: string, extension?: string) => string;
|
|
139
|
-
export declare const filenameWithoutExt: (
|
|
139
|
+
export declare const filenameWithoutExt: (filepath?: string) => string;
|
|
140
140
|
export declare const validPathChars = "A-Za-z\\d\\-_";
|
|
141
141
|
export declare const replaceInvalidChars: (value: string) => string;
|
|
142
142
|
export declare const normalizeFolder: (folder: string) => string;
|
|
@@ -157,21 +157,23 @@ var filepathSearch = function () {
|
|
|
157
157
|
};
|
|
158
158
|
exports.filepathSearch = filepathSearch;
|
|
159
159
|
var fileExt = function (path) {
|
|
160
|
-
var
|
|
160
|
+
var _a, _b;
|
|
161
|
+
var paths = (_b = (_a = path === null || path === void 0 ? void 0 : path.split('/')) === null || _a === void 0 ? void 0 : _a.pop()) === null || _b === void 0 ? void 0 : _b.split('.');
|
|
161
162
|
return paths.length > 1 ? paths.pop() : null;
|
|
162
163
|
};
|
|
163
164
|
exports.fileExt = fileExt;
|
|
164
165
|
var fileToExt = function (path, extension) {
|
|
165
166
|
if (extension === void 0) { extension = ''; }
|
|
166
167
|
return [
|
|
167
|
-
path.replace((0, exports.fileExt)(path), '').replace(/^\./g, '').replace(/\.$/g, ''),
|
|
168
|
-
(extension || '').replace(
|
|
168
|
+
path.replace(".".concat((0, exports.fileExt)(path)), '').replace(/^\./g, '').replace(/\.$/g, ''),
|
|
169
|
+
(extension || '').replace(/[.]/g, '')
|
|
169
170
|
].filter(Boolean).join('.');
|
|
170
171
|
};
|
|
171
172
|
exports.fileToExt = fileToExt;
|
|
172
|
-
var filenameWithoutExt = function (
|
|
173
|
-
if (
|
|
174
|
-
var
|
|
173
|
+
var filenameWithoutExt = function (filepath) {
|
|
174
|
+
if (filepath === void 0) { filepath = ''; }
|
|
175
|
+
var filename = (0, exports.filenameFromPath)(filepath);
|
|
176
|
+
var file = (0, exports.fileToExt)(filename, '');
|
|
175
177
|
return file.endsWith('.') ? file.substring(0, file.length - 1) : file;
|
|
176
178
|
};
|
|
177
179
|
exports.filenameWithoutExt = filenameWithoutExt;
|
package/envs/.master.env
ADDED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hestia-earth/api",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.8",
|
|
4
4
|
"description": "Hestia API definitions",
|
|
5
5
|
"main": "dist/models.js",
|
|
6
6
|
"typings": "dist/models.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "rm -rf build && tsc -p tsconfig.build.json",
|
|
9
9
|
"build:module": "rm -rf dist && tsc -p tsconfig.dist.json",
|
|
10
|
+
"build:lambdas": "rm -rf build && tsc -p tsconfig.lambdas.json",
|
|
10
11
|
"validate:jsonld": "hestia-validate-jsonld '' test/fixtures/nodes",
|
|
11
12
|
"start": "node index.js",
|
|
12
13
|
"dev": "ts-node-dev --respawn --rs dev.ts --files --ignore-watch node_modules",
|
|
@@ -42,8 +43,9 @@
|
|
|
42
43
|
"@hestia-earth/schema-convert": "^21.0.0",
|
|
43
44
|
"@hestia-earth/schema-validation": "^21.0.0",
|
|
44
45
|
"@mendeley/api": "^10.0.2",
|
|
45
|
-
"@sentry/node": "^7.
|
|
46
|
-
"@sentry/
|
|
46
|
+
"@sentry/node": "^7.61.1",
|
|
47
|
+
"@sentry/serverless": "^7.61.1",
|
|
48
|
+
"@sentry/tracing": "^7.61.1",
|
|
47
49
|
"@slack/web-api": "^6.7.0",
|
|
48
50
|
"@sokratis/passport-linkedin-oauth2": "^2.1.0",
|
|
49
51
|
"@types/chai": "^4.3.0",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hestia-earth/api-serverless",
|
|
3
|
+
"dependencies": {
|
|
4
|
+
"@sentry/serverless": "*",
|
|
5
|
+
"mongoose": "*",
|
|
6
|
+
"mongoose-bcrypt": "*"
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"serverless": "^3.32.2",
|
|
10
|
+
"serverless-deployment-bucket": "^1.6.0",
|
|
11
|
+
"serverless-offline": "^12.0.4"
|
|
12
|
+
}
|
|
13
|
+
}
|