@hestia-earth/api 0.26.13 → 0.26.15
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/esm/files/model/model.js
CHANGED
|
@@ -13,6 +13,7 @@ export var SupportedExtensions;
|
|
|
13
13
|
SupportedExtensions["draft"] = "txt";
|
|
14
14
|
SupportedExtensions["pdf"] = "pdf";
|
|
15
15
|
SupportedExtensions["md"] = "md";
|
|
16
|
+
SupportedExtensions["docx"] = "docx";
|
|
16
17
|
})(SupportedExtensions || (SupportedExtensions = {}));
|
|
17
18
|
export const studyExtensions = [SupportedExtensions.pdf];
|
|
18
19
|
export const supplementaryExtensions = [
|
|
@@ -20,7 +21,8 @@ export const supplementaryExtensions = [
|
|
|
20
21
|
SupportedExtensions.xlsx,
|
|
21
22
|
SupportedExtensions.xls,
|
|
22
23
|
SupportedExtensions.csv,
|
|
23
|
-
SupportedExtensions.md
|
|
24
|
+
SupportedExtensions.md,
|
|
25
|
+
SupportedExtensions.docx
|
|
24
26
|
];
|
|
25
27
|
const maxFileSizeExt = {
|
|
26
28
|
[SupportedExtensions.csv]: maxFileSize,
|
|
@@ -29,7 +31,8 @@ const maxFileSizeExt = {
|
|
|
29
31
|
[SupportedExtensions.draft]: maxFileSize,
|
|
30
32
|
[SupportedExtensions.json]: maxFileSize,
|
|
31
33
|
[SupportedExtensions.pdf]: maxFileSize / 2,
|
|
32
|
-
[SupportedExtensions.md]: maxFileSize
|
|
34
|
+
[SupportedExtensions.md]: maxFileSize,
|
|
35
|
+
[SupportedExtensions.docx]: maxFileSize / 2
|
|
33
36
|
};
|
|
34
37
|
export const maxFileSizeByFile = (filename) => maxFileSizeExt[fileExt(filename).replace('.', '')];
|
|
35
38
|
export const finalFormatExtensions = [SupportedExtensions.json, SupportedExtensions.csv];
|
package/files/model/model.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export declare enum SupportedExtensions {
|
|
|
12
12
|
json = "json",
|
|
13
13
|
draft = "txt",
|
|
14
14
|
pdf = "pdf",
|
|
15
|
-
md = "md"
|
|
15
|
+
md = "md",
|
|
16
|
+
docx = "docx"
|
|
16
17
|
}
|
|
17
18
|
export declare const studyExtensions: SupportedExtensions[];
|
|
18
19
|
export declare const supplementaryExtensions: SupportedExtensions[];
|
package/files/model/model.js
CHANGED
|
@@ -18,6 +18,7 @@ var SupportedExtensions;
|
|
|
18
18
|
SupportedExtensions["draft"] = "txt";
|
|
19
19
|
SupportedExtensions["pdf"] = "pdf";
|
|
20
20
|
SupportedExtensions["md"] = "md";
|
|
21
|
+
SupportedExtensions["docx"] = "docx";
|
|
21
22
|
})(SupportedExtensions || (exports.SupportedExtensions = SupportedExtensions = {}));
|
|
22
23
|
exports.studyExtensions = [SupportedExtensions.pdf];
|
|
23
24
|
exports.supplementaryExtensions = [
|
|
@@ -25,7 +26,8 @@ exports.supplementaryExtensions = [
|
|
|
25
26
|
SupportedExtensions.xlsx,
|
|
26
27
|
SupportedExtensions.xls,
|
|
27
28
|
SupportedExtensions.csv,
|
|
28
|
-
SupportedExtensions.md
|
|
29
|
+
SupportedExtensions.md,
|
|
30
|
+
SupportedExtensions.docx
|
|
29
31
|
];
|
|
30
32
|
const maxFileSizeExt = {
|
|
31
33
|
[SupportedExtensions.csv]: exports.maxFileSize,
|
|
@@ -34,7 +36,8 @@ const maxFileSizeExt = {
|
|
|
34
36
|
[SupportedExtensions.draft]: exports.maxFileSize,
|
|
35
37
|
[SupportedExtensions.json]: exports.maxFileSize,
|
|
36
38
|
[SupportedExtensions.pdf]: exports.maxFileSize / 2,
|
|
37
|
-
[SupportedExtensions.md]: exports.maxFileSize
|
|
39
|
+
[SupportedExtensions.md]: exports.maxFileSize,
|
|
40
|
+
[SupportedExtensions.docx]: exports.maxFileSize / 2
|
|
38
41
|
};
|
|
39
42
|
const maxFileSizeByFile = (filename) => maxFileSizeExt[(0, exports.fileExt)(filename).replace('.', '')];
|
|
40
43
|
exports.maxFileSizeByFile = maxFileSizeByFile;
|