@crowdin/app-project-module 1.4.1 → 1.5.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.
@@ -43,25 +43,26 @@ function getTreeItems(integrationData) {
43
43
  }
44
44
  function getOneLevelFetchingFiles(integration, integrationCredentials, integrationSettings, parentFiles, client, projectId) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
- for (const file of parentFiles) {
47
- if (!file.type) {
48
- let childs = yield integration.getIntegrationFiles({
49
- credentials: integrationCredentials,
50
- client,
51
- projectId,
52
- settings: integrationSettings,
53
- parentId: file.id,
54
- search: '',
55
- page: 0,
56
- });
57
- childs = getTreeItems(childs);
58
- if (childs.length > 0) {
59
- const childFiles = yield getOneLevelFetchingFiles(integration, integrationCredentials, integrationSettings, childs, client, projectId);
60
- parentFiles = [...parentFiles, ...childFiles];
61
- }
62
- }
46
+ const folders = parentFiles.filter((file) => !file.type);
47
+ if (folders.length === 0) {
48
+ return parentFiles;
63
49
  }
64
- return parentFiles;
50
+ const childResults = yield Promise.all(folders.map((folder) => __awaiter(this, void 0, void 0, function* () {
51
+ const childs = getTreeItems(yield integration.getIntegrationFiles({
52
+ credentials: integrationCredentials,
53
+ client,
54
+ projectId,
55
+ settings: integrationSettings,
56
+ parentId: folder.id,
57
+ search: '',
58
+ page: 0,
59
+ }));
60
+ if (childs.length === 0) {
61
+ return [];
62
+ }
63
+ return getOneLevelFetchingFiles(integration, integrationCredentials, integrationSettings, childs, client, projectId);
64
+ })));
65
+ return [...parentFiles, ...childResults.flat()];
65
66
  });
66
67
  }
67
68
  function getIntegrationSnapshot(_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
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",
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@crowdin/crowdin-apps-functions": "^0.12.5",
23
- "@crowdin/logs-formatter": "^2.1.9",
23
+ "@crowdin/logs-formatter": "^2.1.10",
24
24
  "@godaddy/terminus": "^4.12.1",
25
25
  "ajv": "^8.17.1",
26
26
  "amqplib": "^0.10.9",
@@ -49,33 +49,21 @@
49
49
  }
50
50
  },
51
51
  "devDependencies": {
52
- "typescript": "^5.9.3",
53
- "auto-changelog": "^2.5.0",
54
52
  "@aws-sdk/client-s3": "^3.995.0",
55
53
  "@aws-sdk/s3-request-presigner": "^3.995.0",
54
+ "@cloudflare/workers-types": "^4.20260228.0",
55
+ "@eslint/eslintrc": "^3.3.3",
56
+ "@eslint/js": "^10.0.1",
57
+ "@monaco-editor/react": "^4.7.0",
56
58
  "@mui/material": "^7.3.8",
57
59
  "@rjsf/core": "^6.3.1",
58
60
  "@rjsf/mui": "^6.3.1",
59
61
  "@rjsf/validator-ajv8": "^6.3.1",
60
- "@monaco-editor/react": "^4.7.0",
61
- "rollup": "^4.59.0",
62
62
  "@rollup/plugin-commonjs": "^29.0.0",
63
63
  "@rollup/plugin-json": "^6.1.0",
64
64
  "@rollup/plugin-node-resolve": "^16.0.3",
65
65
  "@rollup/plugin-replace": "^6.0.3",
66
66
  "@rollup/plugin-typescript": "12.3.0",
67
- "eslint": "^10.0.1",
68
- "prettier": "^3.8.1",
69
- "eslint-config-prettier": "^10.1.8",
70
- "eslint-plugin-prettier": "^5.5.5",
71
- "@eslint/eslintrc": "^3.3.3",
72
- "@eslint/js": "^10.0.1",
73
- "@typescript-eslint/eslint-plugin": "^8.56.0",
74
- "@typescript-eslint/parser": "^8.56.0",
75
- "jest": "^30.2.0",
76
- "jest-junit": "^16.0.0",
77
- "ts-jest": "^29.4.6",
78
- "@cloudflare/workers-types": "^4.20260228.0",
79
67
  "@types/amqplib": "^0.10.7",
80
68
  "@types/better-sqlite3": "^7.6.13",
81
69
  "@types/cors": "^2.8.19",
@@ -86,7 +74,19 @@
86
74
  "@types/pg": "^8.16.0",
87
75
  "@types/react": "^18.3.18",
88
76
  "@types/react-dom": "^18.3.5",
89
- "@types/swagger-jsdoc": "^6.0.4"
77
+ "@types/swagger-jsdoc": "^6.0.4",
78
+ "@typescript-eslint/eslint-plugin": "^8.56.0",
79
+ "@typescript-eslint/parser": "^8.56.0",
80
+ "auto-changelog": "^2.5.0",
81
+ "eslint": "^10.0.1",
82
+ "eslint-config-prettier": "^10.1.8",
83
+ "eslint-plugin-prettier": "^5.5.5",
84
+ "jest": "^30.2.0",
85
+ "jest-junit": "^16.0.0",
86
+ "prettier": "^3.8.1",
87
+ "rollup": "^4.59.0",
88
+ "ts-jest": "^29.4.6",
89
+ "typescript": "^5.9.3"
90
90
  },
91
91
  "repository": {
92
92
  "type": "git",