@crowdin/app-project-module 0.76.0 → 0.76.1
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/out/static/js/form.js +13 -13
- package/out/storage/index.js +1 -1
- package/out/storage/postgre.js +18 -9
- package/package.json +8 -8
package/out/storage/index.js
CHANGED
|
@@ -123,7 +123,7 @@ function createDumpForMigration(config) {
|
|
|
123
123
|
modifiedContent = modifiedContent.replace(/integer not null primary key autoincrement/gi, 'serial primary key');
|
|
124
124
|
modifiedContent = modifiedContent.replace(/varchar not null primary key/gi, 'varchar primary key');
|
|
125
125
|
// 6. Remove SQLite-specific function replace()
|
|
126
|
-
modifiedContent = modifiedContent.replace(/replace\s*\('([^']
|
|
126
|
+
modifiedContent = modifiedContent.replace(/replace\s*\(\s*'([^']*(?:'{2}[^']*)*)',\s*'\\n',\s*char\s*\(\s*10\s*\)\s*\)/gi, "'$1'");
|
|
127
127
|
fs_1.default.writeFileSync(dumpFilePath, modifiedContent, { encoding: 'utf8', flag: 'w' });
|
|
128
128
|
}
|
|
129
129
|
fs_1.default.renameSync(sqliteFilePath, backupFilePath);
|
package/out/storage/postgre.js
CHANGED
|
@@ -571,42 +571,51 @@ class PostgreStorage {
|
|
|
571
571
|
}
|
|
572
572
|
updateJob({ id, progress, status, info, data, attempt }) {
|
|
573
573
|
return __awaiter(this, void 0, void 0, function* () {
|
|
574
|
-
|
|
574
|
+
let parametersPointer = 1;
|
|
575
|
+
const updateFields = [`updated_at = $${parametersPointer}`];
|
|
575
576
|
const updateParams = [Date.now().toString()];
|
|
576
577
|
if (progress) {
|
|
577
|
-
|
|
578
|
+
parametersPointer++;
|
|
579
|
+
updateFields.push('progress = $' + parametersPointer);
|
|
578
580
|
updateParams.push(progress);
|
|
579
581
|
if (progress >= 100) {
|
|
580
|
-
|
|
582
|
+
parametersPointer++;
|
|
583
|
+
updateFields.push('finished_at = $' + parametersPointer);
|
|
581
584
|
updateParams.push(Date.now().toString());
|
|
582
585
|
}
|
|
583
586
|
}
|
|
584
587
|
if (status) {
|
|
585
|
-
|
|
588
|
+
parametersPointer++;
|
|
589
|
+
updateFields.push('status = $' + parametersPointer);
|
|
586
590
|
updateParams.push(status);
|
|
587
591
|
if ((!progress || progress <= 100) && [types_2.JobStatus.FAILED, types_2.JobStatus.CANCELED].includes(status)) {
|
|
588
|
-
|
|
592
|
+
parametersPointer++;
|
|
593
|
+
updateFields.push('finished_at = $' + parametersPointer);
|
|
589
594
|
updateParams.push(Date.now().toString());
|
|
590
595
|
}
|
|
591
596
|
}
|
|
592
597
|
if (data) {
|
|
593
|
-
|
|
598
|
+
parametersPointer++;
|
|
599
|
+
updateFields.push('data = $' + parametersPointer);
|
|
594
600
|
updateParams.push(data);
|
|
595
601
|
}
|
|
596
602
|
if (info) {
|
|
597
|
-
|
|
603
|
+
parametersPointer++;
|
|
604
|
+
updateFields.push('info = $' + parametersPointer);
|
|
598
605
|
updateParams.push(info);
|
|
599
606
|
}
|
|
600
607
|
if (attempt) {
|
|
601
|
-
|
|
608
|
+
parametersPointer++;
|
|
609
|
+
updateFields.push('attempt = $' + parametersPointer);
|
|
602
610
|
updateParams.push(attempt);
|
|
603
611
|
}
|
|
612
|
+
parametersPointer++;
|
|
604
613
|
updateParams.push(id);
|
|
605
614
|
yield this.dbPromise;
|
|
606
615
|
yield this.executeQuery((client) => client.query(`
|
|
607
616
|
UPDATE job
|
|
608
617
|
SET ${updateFields.join(', ')}
|
|
609
|
-
WHERE id = $${
|
|
618
|
+
WHERE id = $${parametersPointer}
|
|
610
619
|
`, updateParams));
|
|
611
620
|
});
|
|
612
621
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowdin/app-project-module",
|
|
3
|
-
"version": "0.76.
|
|
3
|
+
"version": "0.76.1",
|
|
4
4
|
"description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"types": "out/index.d.ts",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@babel/preset-react": "^7.24.7",
|
|
46
|
-
"@emotion/react": "^11.
|
|
47
|
-
"@emotion/styled": "^11.
|
|
48
|
-
"@mui/icons-material": "^5.16.
|
|
49
|
-
"@mui/material": "^5.16.
|
|
50
|
-
"@rjsf/core": "^5.
|
|
51
|
-
"@rjsf/mui": "^5.
|
|
46
|
+
"@emotion/react": "^11.14.0",
|
|
47
|
+
"@emotion/styled": "^11.14.0",
|
|
48
|
+
"@mui/icons-material": "^5.16.14",
|
|
49
|
+
"@mui/material": "^5.16.14",
|
|
50
|
+
"@rjsf/core": "^5.24.2",
|
|
51
|
+
"@rjsf/mui": "^5.24.2",
|
|
52
52
|
"@rjsf/utils": "^5.23.2",
|
|
53
|
-
"@rjsf/validator-ajv8": "^5.
|
|
53
|
+
"@rjsf/validator-ajv8": "^5.24.2",
|
|
54
54
|
"@rollup/plugin-babel": "^6.0.4",
|
|
55
55
|
"@rollup/plugin-commonjs": "^24.1.0",
|
|
56
56
|
"@rollup/plugin-json": "^6.1.0",
|