@revisium/core 2.0.0 → 2.1.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.
- package/dist/package.json +1 -1
- package/dist/src/__tests__/utils/prepareProject.js +2 -2
- package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
- package/dist/src/api/rest-api/row/dto/update-row.dto.d.ts +1 -0
- package/dist/src/api/rest-api/row/dto/update-row.dto.js +4 -0
- package/dist/src/api/rest-api/row/dto/update-row.dto.js.map +1 -1
- package/dist/src/api/rest-api/table/dto/create-row.dto.d.ts +1 -0
- package/dist/src/api/rest-api/table/dto/create-row.dto.js +4 -0
- package/dist/src/api/rest-api/table/dto/create-row.dto.js.map +1 -1
- package/dist/src/features/auth/google-oauth.service.js.map +1 -1
- package/dist/src/features/draft/commands/impl/api-create-row.command.d.ts +2 -0
- package/dist/src/features/draft/commands/impl/api-create-row.command.js.map +1 -1
- package/dist/src/features/draft/commands/impl/api-update-row.command.d.ts +2 -0
- package/dist/src/features/draft/commands/impl/api-update-row.command.js.map +1 -1
- package/dist/src/features/draft/commands/impl/create-row.command.d.ts +2 -0
- package/dist/src/features/draft/commands/impl/create-row.command.js.map +1 -1
- package/dist/src/features/draft/commands/impl/update-row.command.d.ts +2 -0
- package/dist/src/features/draft/commands/impl/update-row.command.js.map +1 -1
- package/dist/src/features/plugin/file/__tests__/file-restore.test-utils.d.ts +27 -0
- package/dist/src/features/plugin/file/__tests__/file-restore.test-utils.js +175 -0
- package/dist/src/features/plugin/file/__tests__/file-restore.test-utils.js.map +1 -0
- package/dist/src/features/plugin/file/consts.d.ts +6 -0
- package/dist/src/features/plugin/file/consts.js +11 -0
- package/dist/src/features/plugin/file/consts.js.map +1 -0
- package/dist/src/features/plugin/file/file-value.store.d.ts +1 -1
- package/dist/src/features/plugin/file/file-value.store.js +2 -2
- package/dist/src/features/plugin/file/file-value.store.js.map +1 -1
- package/dist/src/features/plugin/file/file.plugin.d.ts +0 -6
- package/dist/src/features/plugin/file/file.plugin.js +47 -46
- package/dist/src/features/plugin/file/file.plugin.js.map +1 -1
- package/dist/src/features/plugin/file/utils/fore-each-file.d.ts +3 -0
- package/dist/src/features/plugin/file/utils/fore-each-file.js +17 -0
- package/dist/src/features/plugin/file/utils/fore-each-file.js.map +1 -0
- package/dist/src/features/plugin/file/utils/validate-file-data-for-restore.d.ts +3 -0
- package/dist/src/features/plugin/file/utils/validate-file-data-for-restore.js +150 -0
- package/dist/src/features/plugin/file/utils/validate-file-data-for-restore.js.map +1 -0
- package/dist/src/features/plugin/file/utils/validate-file-id-uniqueness.d.ts +2 -0
- package/dist/src/features/plugin/file/utils/validate-file-id-uniqueness.js +18 -0
- package/dist/src/features/plugin/file/utils/validate-file-id-uniqueness.js.map +1 -0
- package/dist/src/features/plugin/types.d.ts +2 -0
- package/dist/src/infrastructure/health/health.controller.js +4 -4
- package/dist/src/infrastructure/health/health.controller.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -9,22 +9,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.FilePlugin =
|
|
12
|
+
exports.FilePlugin = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const config_1 = require("@nestjs/config");
|
|
15
15
|
const nanoid_1 = require("nanoid");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
16
|
+
const consts_1 = require("./consts");
|
|
17
|
+
const fore_each_file_1 = require("./utils/fore-each-file");
|
|
18
|
+
const validate_file_data_for_restore_1 = require("./utils/validate-file-data-for-restore");
|
|
18
19
|
const createJsonValueStore_1 = require("../../share/utils/schema/lib/createJsonValueStore");
|
|
19
|
-
const traverseValue_1 = require("../../share/utils/schema/lib/traverseValue");
|
|
20
|
-
const schema_types_1 = require("../../share/utils/schema/types/schema.types");
|
|
21
20
|
const s3_service_1 = require("../../../infrastructure/database/s3.service");
|
|
22
|
-
var FileStatus;
|
|
23
|
-
(function (FileStatus) {
|
|
24
|
-
FileStatus["ready"] = "ready";
|
|
25
|
-
FileStatus["error"] = "error";
|
|
26
|
-
FileStatus["uploaded"] = "uploaded";
|
|
27
|
-
})(FileStatus || (exports.FileStatus = FileStatus = {}));
|
|
28
21
|
let FilePlugin = class FilePlugin {
|
|
29
22
|
constructor(s3Service, configService) {
|
|
30
23
|
this.s3Service = s3Service;
|
|
@@ -35,36 +28,52 @@ let FilePlugin = class FilePlugin {
|
|
|
35
28
|
return this.s3Service.isAvailable;
|
|
36
29
|
}
|
|
37
30
|
async afterCreateRow(options) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
async afterUpdateRow(options) {
|
|
44
|
-
const previousFiles = new Map();
|
|
45
|
-
this.forEachFile(options.previousValueStore, (item) => {
|
|
46
|
-
previousFiles.set(item.fileId, item);
|
|
47
|
-
});
|
|
48
|
-
this.forEachFile(options.valueStore, (item) => {
|
|
49
|
-
const previousFile = previousFiles.get(item.fileId);
|
|
50
|
-
if (item.fileId) {
|
|
51
|
-
if (!previousFile) {
|
|
52
|
-
throw new Error(`File ${item.fileId} does not exist`);
|
|
53
|
-
}
|
|
54
|
-
item.checkImmutable(previousFile);
|
|
31
|
+
if (options.isRestore) {
|
|
32
|
+
(0, fore_each_file_1.forEachFile)(options.valueStore, (item) => {
|
|
33
|
+
(0, validate_file_data_for_restore_1.validateFileDataForRestore)(item, options.valueStore);
|
|
55
34
|
item.url = '';
|
|
56
|
-
}
|
|
57
|
-
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
(0, fore_each_file_1.forEachFile)(options.valueStore, (item) => {
|
|
58
39
|
item.ensureDefaults();
|
|
59
40
|
this.prepareReadyFile(item);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async afterUpdateRow(options) {
|
|
45
|
+
if (options.isRestore) {
|
|
46
|
+
(0, fore_each_file_1.forEachFile)(options.valueStore, (item) => {
|
|
47
|
+
(0, validate_file_data_for_restore_1.validateFileDataForRestore)(item, options.valueStore);
|
|
48
|
+
item.url = '';
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const previousFiles = new Map();
|
|
53
|
+
(0, fore_each_file_1.forEachFile)(options.previousValueStore, (item) => {
|
|
54
|
+
previousFiles.set(item.fileId, item);
|
|
55
|
+
});
|
|
56
|
+
(0, fore_each_file_1.forEachFile)(options.valueStore, (item) => {
|
|
57
|
+
const previousFile = previousFiles.get(item.fileId);
|
|
58
|
+
if (item.fileId) {
|
|
59
|
+
if (!previousFile) {
|
|
60
|
+
throw new Error(`File ${item.fileId} does not exist`);
|
|
61
|
+
}
|
|
62
|
+
item.checkImmutable(previousFile);
|
|
63
|
+
item.url = '';
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
item.ensureDefaults();
|
|
67
|
+
this.prepareReadyFile(item);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
async computeRows(options) {
|
|
64
73
|
for (const row of options.rows) {
|
|
65
74
|
const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
|
|
66
|
-
|
|
67
|
-
if (item.status === FileStatus.uploaded) {
|
|
75
|
+
(0, fore_each_file_1.forEachFile)(valueStore, (item) => {
|
|
76
|
+
if (item.status === consts_1.FileStatus.uploaded) {
|
|
68
77
|
item.url = this.getUrl(item.hash);
|
|
69
78
|
}
|
|
70
79
|
});
|
|
@@ -74,7 +83,7 @@ let FilePlugin = class FilePlugin {
|
|
|
74
83
|
async afterMigrateRows(options) {
|
|
75
84
|
for (const row of options.rows) {
|
|
76
85
|
const valueStore = (0, createJsonValueStore_1.createJsonValueStore)(options.schemaStore, '', row.data);
|
|
77
|
-
|
|
86
|
+
(0, fore_each_file_1.forEachFile)(valueStore, (item) => {
|
|
78
87
|
if (!item.fileId) {
|
|
79
88
|
item.ensureDefaults();
|
|
80
89
|
this.prepareReadyFile(item);
|
|
@@ -85,7 +94,7 @@ let FilePlugin = class FilePlugin {
|
|
|
85
94
|
}
|
|
86
95
|
async uploadFile({ valueStore, fileId, file, }) {
|
|
87
96
|
const files = [];
|
|
88
|
-
|
|
97
|
+
(0, fore_each_file_1.forEachFile)(valueStore, (item) => {
|
|
89
98
|
if (item.fileId === fileId) {
|
|
90
99
|
files.push(item);
|
|
91
100
|
}
|
|
@@ -103,17 +112,9 @@ let FilePlugin = class FilePlugin {
|
|
|
103
112
|
getPathname(hash) {
|
|
104
113
|
return encodeURI(`${hash}`);
|
|
105
114
|
}
|
|
106
|
-
forEachFile(valueStore, callback) {
|
|
107
|
-
(0, traverseValue_1.traverseValue)(valueStore, (item) => {
|
|
108
|
-
if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.File &&
|
|
109
|
-
item.type === schema_types_1.JsonSchemaTypeName.Object) {
|
|
110
|
-
callback(new file_value_store_1.FileValueStore(item));
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
115
|
prepareReadyFile(store) {
|
|
115
|
-
store.status = FileStatus.ready;
|
|
116
|
-
store.fileId = (0, nanoid_1.nanoid)();
|
|
116
|
+
store.status = consts_1.FileStatus.ready;
|
|
117
|
+
store.fileId = (0, nanoid_1.nanoid)(consts_1.ID_LENGTH);
|
|
117
118
|
}
|
|
118
119
|
};
|
|
119
120
|
exports.FilePlugin = FilePlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.plugin.js","sourceRoot":"","sources":["../../../../../src/features/plugin/file/file.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAC/C,mCAAg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AC5C,CAAC;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,IAAY;QACxB,OAAO,SAAS,CAAC,GAAG,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IAEM,WAAW,CAAC,IAAY;QAC7B,OAAO,SAAS,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAC9B,CAAC;IAEO,gBAAgB,CAAC,KAAqB;QAC5C,KAAK,CAAC,MAAM,GAAG,mBAAU,CAAC,KAAK,CAAC;QAChC,KAAK,CAAC,MAAM,GAAG,IAAA,eAAM,EAAC,kBAAS,CAAC,CAAC;IACnC,CAAC;CACF,CAAA;AA9IY,gCAAU;qBAAV,UAAU;IADtB,IAAA,mBAAU,GAAE;qCAKmB,sBAAS;QACtB,sBAAa;GALnB,UAAU,CA8ItB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forEachFile = void 0;
|
|
4
|
+
const schema_ids_consts_1 = require("../../../share/schema-ids.consts");
|
|
5
|
+
const traverseValue_1 = require("../../../share/utils/schema/lib/traverseValue");
|
|
6
|
+
const schema_types_1 = require("../../../share/utils/schema/types/schema.types");
|
|
7
|
+
const file_value_store_1 = require("../file-value.store");
|
|
8
|
+
const forEachFile = (valueStore, callback) => {
|
|
9
|
+
(0, traverseValue_1.traverseValue)(valueStore, (item) => {
|
|
10
|
+
if (item.schema.$ref === schema_ids_consts_1.SystemSchemaIds.File &&
|
|
11
|
+
item.type === schema_types_1.JsonSchemaTypeName.Object) {
|
|
12
|
+
callback(new file_value_store_1.FileValueStore(item));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
exports.forEachFile = forEachFile;
|
|
17
|
+
//# sourceMappingURL=fore-each-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fore-each-file.js","sourceRoot":"","sources":["../../../../../../src/features/plugin/file/utils/fore-each-file.ts"],"names":[],"mappings":";;;AAAA,wEAAuE;AACvE,iFAAkF;AAElF,iFAAwF;AACxF,0DAAqD;AAE9C,MAAM,WAAW,GAAG,CACzB,UAA0B,EAC1B,QAAyC,EACzC,EAAE;IACF,IAAA,6BAAa,EAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;QACjC,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAe,CAAC,IAAI;YACzC,IAAI,CAAC,IAAI,KAAK,iCAAkB,CAAC,MAAM,EACvC,CAAC;YACD,QAAQ,CAAC,IAAI,iCAAc,CAAC,IAAI,CAAC,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAZW,QAAA,WAAW,eAYtB"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFileDataForRestore = void 0;
|
|
4
|
+
const consts_1 = require("../consts");
|
|
5
|
+
const validate_file_id_uniqueness_1 = require("./validate-file-id-uniqueness");
|
|
6
|
+
const validateRequiredFileId = (fileId) => {
|
|
7
|
+
if (!fileId || fileId.trim() === '') {
|
|
8
|
+
throw new Error('fileId is required for restore mode');
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
const validateFileIdFormat = (fileId) => {
|
|
12
|
+
if (!/^[A-Za-z0-9_-]{21}$/.test(fileId)) {
|
|
13
|
+
throw new Error('Invalid fileId format - must be nanoid (21 URL-safe characters)');
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const validateFileStatus = (status) => {
|
|
17
|
+
if (!Object.values(consts_1.FileStatus).includes(status)) {
|
|
18
|
+
throw new Error(`Invalid file status: ${status}. Allowed values: ${Object.values(consts_1.FileStatus).join(', ')}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const validateHashFormat = (hash) => {
|
|
22
|
+
if (hash) {
|
|
23
|
+
if (hash.trim() === '') {
|
|
24
|
+
throw new Error('hash must be a non-empty string');
|
|
25
|
+
}
|
|
26
|
+
if (!/^[a-f0-9]{32}$|^[a-f0-9]{40}$|^[a-f0-9]{64}$|^[a-f0-9]{128}$/.test(hash)) {
|
|
27
|
+
throw new Error('Invalid hash format - must be MD5, SHA-1, SHA-256, or SHA-512');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const validateMimeTypeFormat = (mimeType) => {
|
|
32
|
+
if (mimeType) {
|
|
33
|
+
if (mimeType.trim() === '') {
|
|
34
|
+
throw new Error('mimeType must be a non-empty string');
|
|
35
|
+
}
|
|
36
|
+
if (mimeType.length > 100) {
|
|
37
|
+
throw new Error('mimeType too long - maximum 100 characters');
|
|
38
|
+
}
|
|
39
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9!#$&\-^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-^_.]*$/.test(mimeType)) {
|
|
40
|
+
throw new Error('Invalid mimeType format - must follow RFC 2046 specification');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const validateFileSize = (size) => {
|
|
45
|
+
if (!Number.isInteger(size) || size < 0) {
|
|
46
|
+
throw new Error('size must be a non-negative integer');
|
|
47
|
+
}
|
|
48
|
+
if (size > Number.MAX_SAFE_INTEGER) {
|
|
49
|
+
throw new Error('size too large - maximum value exceeded');
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const validateImageWidth = (width) => {
|
|
53
|
+
if (!Number.isInteger(width) || width < 0) {
|
|
54
|
+
throw new Error('width must be a non-negative integer');
|
|
55
|
+
}
|
|
56
|
+
if (width > 50000) {
|
|
57
|
+
throw new Error('width too large - maximum 50000 pixels');
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
const validateImageHeight = (height) => {
|
|
61
|
+
if (!Number.isInteger(height) || height < 0) {
|
|
62
|
+
throw new Error('height must be a non-negative integer');
|
|
63
|
+
}
|
|
64
|
+
if (height > 50000) {
|
|
65
|
+
throw new Error('height too large - maximum 50000 pixels');
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const validateFileExtension = (extension) => {
|
|
69
|
+
if (extension) {
|
|
70
|
+
if (extension.length === 0 || extension.length > 10) {
|
|
71
|
+
throw new Error('extension length must be between 1 and 10 characters');
|
|
72
|
+
}
|
|
73
|
+
if (!/^[a-zA-Z0-9]{1,10}$/.test(extension)) {
|
|
74
|
+
throw new Error('Invalid file extension - must be alphanumeric, 1-10 characters');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
const validateFileName = (fileName) => {
|
|
79
|
+
if (fileName) {
|
|
80
|
+
if (fileName.length > 255) {
|
|
81
|
+
throw new Error('fileName too long - maximum 255 characters');
|
|
82
|
+
}
|
|
83
|
+
const invalidChars = /[<>:"/\\|?*]/;
|
|
84
|
+
if (invalidChars.test(fileName)) {
|
|
85
|
+
throw new Error('fileName contains invalid characters');
|
|
86
|
+
}
|
|
87
|
+
for (let i = 0; i < fileName.length; i++) {
|
|
88
|
+
const code = fileName.charCodeAt(i);
|
|
89
|
+
if ((code >= 0 && code <= 31) || code === 127) {
|
|
90
|
+
throw new Error('fileName contains control characters');
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
const validateUrlFormat = (url) => {
|
|
96
|
+
if (url !== '') {
|
|
97
|
+
if (url.length > 2048) {
|
|
98
|
+
throw new Error('url too long - maximum 2048 characters');
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
new URL(url);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
throw new Error('Invalid url format');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const validateUploadedFileConsistency = (store) => {
|
|
109
|
+
if (store.status === consts_1.FileStatus.uploaded) {
|
|
110
|
+
if (!store.hash || store.hash.trim() === '') {
|
|
111
|
+
throw new Error('hash is required when status is uploaded');
|
|
112
|
+
}
|
|
113
|
+
if (!store.size || store.size <= 0) {
|
|
114
|
+
throw new Error('size must be greater than 0 when status is uploaded');
|
|
115
|
+
}
|
|
116
|
+
if (!store.mimeType || store.mimeType.trim() === '') {
|
|
117
|
+
throw new Error('mimeType is required when status is uploaded');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const validateImageDimensionsConsistency = (store) => {
|
|
122
|
+
if (store.mimeType.startsWith('image/')) {
|
|
123
|
+
if (store.width === 0 &&
|
|
124
|
+
store.height === 0 &&
|
|
125
|
+
store.status === consts_1.FileStatus.uploaded) {
|
|
126
|
+
throw new Error('Image dimensions must be set for uploaded images');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else if (store.width !== 0 || store.height !== 0) {
|
|
130
|
+
throw new Error('width and height must be 0 for non-image files');
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
const validateFileDataForRestore = (store, valueStore) => {
|
|
134
|
+
validateRequiredFileId(store.fileId);
|
|
135
|
+
validateFileIdFormat(store.fileId);
|
|
136
|
+
(0, validate_file_id_uniqueness_1.validateFileIdUniqueness)(store.fileId, valueStore);
|
|
137
|
+
validateFileStatus(store.status);
|
|
138
|
+
validateHashFormat(store.hash);
|
|
139
|
+
validateMimeTypeFormat(store.mimeType);
|
|
140
|
+
validateFileSize(store.size);
|
|
141
|
+
validateImageWidth(store.width);
|
|
142
|
+
validateImageHeight(store.height);
|
|
143
|
+
validateFileExtension(store.extension);
|
|
144
|
+
validateFileName(store.fileName);
|
|
145
|
+
validateUrlFormat(store.url);
|
|
146
|
+
validateUploadedFileConsistency(store);
|
|
147
|
+
validateImageDimensionsConsistency(store);
|
|
148
|
+
};
|
|
149
|
+
exports.validateFileDataForRestore = validateFileDataForRestore;
|
|
150
|
+
//# sourceMappingURL=validate-file-data-for-restore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-file-data-for-restore.js","sourceRoot":"","sources":["../../../../../../src/features/plugin/file/utils/validate-file-data-for-restore.ts"],"names":[],"mappings":";;;AAAA,sCAA6D;AAC7D,+EAAsG;AAOtG,MAAM,sBAAsB,GAAG,CAAC,MAA0B,EAAQ,EAAE;IAClE,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;IACzD,CAAC;AACH,CAAC,CAAC;AAKF,MAAM,oBAAoB,GAAG,CAAC,MAAc,EAAQ,EAAE;IACpD,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,iEAAiE,CAClE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAKF,MAAM,kBAAkB,GAAG,CAAC,MAAe,EAAQ,EAAE;IACnD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,mBAAU,CAAC,CAAC,QAAQ,CAAC,MAAoB,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAI,KAAK,CACb,wBAAwB,MAAM,qBAAqB,MAAM,CAAC,MAAM,CAAC,mBAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC1F,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAKF,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAQ,EAAE;IAChD,IAAI,IAAI,EAAE,CAAC;QACT,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QACD,IACE,CAAC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AiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7B,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACvC,kCAAkC,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAC;AAlBW,QAAA,0BAA0B,8BAkBrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateFileIdUniqueness = void 0;
|
|
4
|
+
const fore_each_file_1 = require("./fore-each-file");
|
|
5
|
+
const validateFileIdUniqueness = (fileId, valueStore) => {
|
|
6
|
+
const fileIds = [];
|
|
7
|
+
(0, fore_each_file_1.forEachFile)(valueStore, (item) => {
|
|
8
|
+
if (item.fileId && item.fileId.trim() !== '') {
|
|
9
|
+
fileIds.push(item.fileId);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
const duplicates = fileIds.filter((id, index) => fileIds.indexOf(id) !== index);
|
|
13
|
+
if (duplicates.includes(fileId)) {
|
|
14
|
+
throw new Error(`Duplicate fileId found: ${fileId}. FileId must be unique within a row`);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.validateFileIdUniqueness = validateFileIdUniqueness;
|
|
18
|
+
//# sourceMappingURL=validate-file-id-uniqueness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate-file-id-uniqueness.js","sourceRoot":"","sources":["../../../../../../src/features/plugin/file/utils/validate-file-id-uniqueness.ts"],"names":[],"mappings":";;;AAAA,qDAA4E;AAGrE,MAAM,wBAAwB,GAAG,CACtC,MAAc,EACd,UAA0B,EAC1B,EAAE;IACF,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,IAAA,4BAAW,EAAC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/B,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAC/B,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,KAAK,CAC7C,CAAC;IACF,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,2BAA2B,MAAM,sCAAsC,CACxE,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AApBW,QAAA,wBAAwB,4BAoBnC"}
|
|
@@ -6,12 +6,14 @@ export type AfterCreateRowOptions = {
|
|
|
6
6
|
tableId: string;
|
|
7
7
|
rowId: string;
|
|
8
8
|
data: Prisma.InputJsonValue;
|
|
9
|
+
isRestore?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export type AfterUpdateRowOptions = {
|
|
11
12
|
revisionId: string;
|
|
12
13
|
tableId: string;
|
|
13
14
|
rowId: string;
|
|
14
15
|
data: Prisma.InputJsonValue;
|
|
16
|
+
isRestore?: boolean;
|
|
15
17
|
};
|
|
16
18
|
export type ComputeRowsOptions = {
|
|
17
19
|
revisionId: string;
|
|
@@ -36,16 +36,16 @@ let HealthController = class HealthController {
|
|
|
36
36
|
};
|
|
37
37
|
exports.HealthController = HealthController;
|
|
38
38
|
__decorate([
|
|
39
|
-
(0, common_1.Get)('
|
|
40
|
-
(0, swagger_1.ApiOperation)({ operationId: '
|
|
39
|
+
(0, common_1.Get)('readiness'),
|
|
40
|
+
(0, swagger_1.ApiOperation)({ operationId: 'readiness' }),
|
|
41
41
|
(0, terminus_1.HealthCheck)(),
|
|
42
42
|
__metadata("design:type", Function),
|
|
43
43
|
__metadata("design:paramtypes", []),
|
|
44
44
|
__metadata("design:returntype", void 0)
|
|
45
45
|
], HealthController.prototype, "liveness", null);
|
|
46
46
|
__decorate([
|
|
47
|
-
(0, common_1.Get)('
|
|
48
|
-
(0, swagger_1.ApiOperation)({ operationId: '
|
|
47
|
+
(0, common_1.Get)('liveness'),
|
|
48
|
+
(0, swagger_1.ApiOperation)({ operationId: 'liveness' }),
|
|
49
49
|
(0, terminus_1.HealthCheck)(),
|
|
50
50
|
__metadata("design:type", Function),
|
|
51
51
|
__metadata("design:paramtypes", []),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../../../src/infrastructure/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6CAAwD;AACxD,+CAAmE;AAEnE,6DAAiF;AACjF,qDAAyE;AAIlE,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YACmB,MAA0B,EAC1B,MAAqB,EACrB,aAAgC;QAFhC,WAAM,GAAN,MAAM,CAAoB;QAC1B,WAAM,GAAN,MAAM,CAAe;QACrB,kBAAa,GAAb,aAAa,CAAmB;IAChD,CAAC;IAKJ,QAAQ;QACN,MAAM,UAAU,GAA8B;YAC5C,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;SAChC,CAAC;QAEF,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAKD,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/B,CAAC;CACF,CAAA;AA5BY,4CAAgB;AAU3B;IAHC,IAAA,YAAG,EAAC,
|
|
1
|
+
{"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../../../src/infrastructure/health/health.controller.ts"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