@crowdin/app-project-module 0.75.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/app-test/integration/update-crowdin.js +2 -0
- package/out/app-test/integration/update-integration.js +2 -0
- package/out/modules/integration/handlers/crowdin-files.js +11 -1
- package/out/modules/integration/handlers/user-errors.js +2 -14
- package/out/modules/integration/types.d.ts +4 -2
- package/out/modules/integration/util/files.d.ts +7 -0
- package/out/modules/integration/util/files.js +44 -1
- package/out/modules/integration/util/job.js +33 -1
- package/out/modules/integration/util/types.d.ts +21 -0
- package/out/static/js/form.js +13 -13
- package/out/storage/index.d.ts +19 -1
- package/out/storage/index.js +38 -34
- package/out/storage/mysql.d.ts +17 -1
- package/out/storage/mysql.js +134 -117
- package/out/storage/postgre.d.ts +17 -1
- package/out/storage/postgre.js +154 -127
- package/out/storage/sqlite.d.ts +17 -1
- package/out/storage/sqlite.js +125 -115
- package/out/types.d.ts +1 -1
- package/out/types.js +1 -1
- package/out/util/index.d.ts +4 -0
- package/out/util/index.js +17 -1
- package/out/views/main.handlebars +39 -38
- package/package.json +8 -8
package/out/types.d.ts
CHANGED
package/out/types.js
CHANGED
|
@@ -70,5 +70,5 @@ var storageFiles;
|
|
|
70
70
|
(function (storageFiles) {
|
|
71
71
|
storageFiles["SQLITE"] = "app.sqlite";
|
|
72
72
|
storageFiles["SQLITE_BACKUP"] = "backup_app.sqlite";
|
|
73
|
-
storageFiles["
|
|
73
|
+
storageFiles["DUMP"] = "dump_table_%s.sql";
|
|
74
74
|
})(storageFiles = exports.storageFiles || (exports.storageFiles = {}));
|
package/out/util/index.d.ts
CHANGED
|
@@ -15,3 +15,7 @@ export declare function getPreviousDate(days: number): Date;
|
|
|
15
15
|
export declare function prepareFormDataMetadataId(req: CrowdinClientRequest, config: Config): Promise<string>;
|
|
16
16
|
export declare function validateEmail(email: string | number): boolean;
|
|
17
17
|
export declare function isApiRequest(req: Request, config: Config): boolean;
|
|
18
|
+
export declare function getFormattedDate({ date, userTimezone }: {
|
|
19
|
+
date: Date | number;
|
|
20
|
+
userTimezone: string | undefined;
|
|
21
|
+
}): string;
|
package/out/util/index.js
CHANGED
|
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
32
|
});
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.isApiRequest = exports.validateEmail = exports.prepareFormDataMetadataId = exports.getPreviousDate = exports.isJson = exports.isAuthorizedConfig = exports.getLogoUrl = exports.executeWithRetry = exports.decryptData = exports.encryptData = exports.runAsyncWrapper = exports.CodeError = void 0;
|
|
35
|
+
exports.getFormattedDate = exports.isApiRequest = exports.validateEmail = exports.prepareFormDataMetadataId = exports.getPreviousDate = exports.isJson = exports.isAuthorizedConfig = exports.getLogoUrl = exports.executeWithRetry = exports.decryptData = exports.encryptData = exports.runAsyncWrapper = exports.CodeError = void 0;
|
|
36
36
|
const crypto = __importStar(require("crypto-js"));
|
|
37
37
|
const storage_1 = require("../storage");
|
|
38
38
|
const types_1 = require("../types");
|
|
@@ -167,3 +167,19 @@ function isApiRequest(req, config) {
|
|
|
167
167
|
return !origin || !origin.includes(config.baseUrl);
|
|
168
168
|
}
|
|
169
169
|
exports.isApiRequest = isApiRequest;
|
|
170
|
+
// Format the date as 'MMM DD, YYYY HH:mm'
|
|
171
|
+
function getFormattedDate({ date, userTimezone }) {
|
|
172
|
+
if (!userTimezone) {
|
|
173
|
+
userTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
174
|
+
}
|
|
175
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
176
|
+
year: 'numeric',
|
|
177
|
+
month: 'short',
|
|
178
|
+
day: 'numeric',
|
|
179
|
+
hour: '2-digit',
|
|
180
|
+
minute: '2-digit',
|
|
181
|
+
hour12: false,
|
|
182
|
+
timeZone: userTimezone,
|
|
183
|
+
}).format(date);
|
|
184
|
+
}
|
|
185
|
+
exports.getFormattedDate = getFormattedDate;
|
|
@@ -296,20 +296,20 @@
|
|
|
296
296
|
{{/ifeq}}
|
|
297
297
|
{{#ifeq type "text"}}
|
|
298
298
|
<crowdin-input
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
299
|
+
id="{{key}}-settings"
|
|
300
|
+
label="{{label}}"
|
|
301
|
+
key="{{key}}"
|
|
302
|
+
with-fixed-height
|
|
303
|
+
{{#if helpText}}
|
|
304
|
+
help-text="{{helpText}}"
|
|
305
|
+
{{/if}}
|
|
306
|
+
{{#if helpTextHtml}}
|
|
307
|
+
help-text-html="{{helpTextHtml}}"
|
|
308
|
+
{{/if}}
|
|
309
|
+
{{#if dependencySettings}}
|
|
310
|
+
data-dependency="{{dependencySettings}}"
|
|
311
|
+
{{/if}}
|
|
312
|
+
value="{{#if defaultValue}}{{defaultValue}}{{/if}}"
|
|
313
313
|
>
|
|
314
314
|
</crowdin-input>
|
|
315
315
|
{{/ifeq}}
|
|
@@ -350,21 +350,21 @@
|
|
|
350
350
|
{{/ifeq}}
|
|
351
351
|
{{else}}
|
|
352
352
|
{{#if labelHtml}}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
353
|
+
<crowdin-p
|
|
354
|
+
{{#if dependencySettings}}
|
|
355
|
+
data-dependency="{{dependencySettings}}"
|
|
356
|
+
{{/if}}
|
|
357
|
+
>
|
|
358
|
+
{{{labelHtml}}}
|
|
359
|
+
</crowdin-p>
|
|
360
360
|
{{else}}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
361
|
+
<crowdin-p
|
|
362
|
+
{{#if dependencySettings}}
|
|
363
|
+
data-dependency="{{dependencySettings}}"
|
|
364
|
+
{{/if}}
|
|
365
|
+
>
|
|
366
|
+
{{label}}
|
|
367
|
+
</crowdin-p>
|
|
368
368
|
{{/if}}
|
|
369
369
|
{{/if}}
|
|
370
370
|
<div
|
|
@@ -391,19 +391,19 @@
|
|
|
391
391
|
body-overflow-unset
|
|
392
392
|
>
|
|
393
393
|
<crowdin-checkbox
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
394
|
+
id="selected-files"
|
|
395
|
+
name="selected-files"
|
|
396
|
+
label="Selected files"
|
|
397
|
+
class="hydrated"
|
|
398
|
+
onchange="onChangeAutoSynchronizationOptions(this)"
|
|
399
399
|
>
|
|
400
400
|
</crowdin-checkbox>
|
|
401
401
|
<crowdin-checkbox
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
402
|
+
id="new-files"
|
|
403
|
+
name="new-files"
|
|
404
|
+
label="New files"
|
|
405
|
+
class="hydrated"
|
|
406
|
+
onchange="onChangeAutoSynchronizationOptions(this)"
|
|
407
407
|
>
|
|
408
408
|
</crowdin-checkbox>
|
|
409
409
|
<div slot="footer">
|
|
@@ -510,6 +510,7 @@
|
|
|
510
510
|
if (e.type) {
|
|
511
511
|
item.type = e.type;
|
|
512
512
|
item.node_type = fileType;
|
|
513
|
+
item.failed = e.failed;
|
|
513
514
|
} else {
|
|
514
515
|
item.node_type = e.nodeType || folderType;
|
|
515
516
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowdin/app-project-module",
|
|
3
|
-
"version": "0.
|
|
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",
|