@crowdin/app-project-module 0.66.0 → 0.66.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.
@@ -467,18 +467,19 @@
467
467
  appComponent.setIntegrationFilesData(tree);
468
468
  } else if (tree.length) {
469
469
  appComponent.pushIntegrationFilesData(tree).then(() => {
470
- appIntegrationFiles.getSelected().then(selection => {
471
- selection = selection?.filter((node) => node);
472
- if (!selection?.length) {
473
- return;
474
- }
475
-
476
- const selectedIds = selection.map(({id}) => id.toString());
477
- tree.forEach((node) => {
478
- selectedIds.includes(node.parent_id.toString()) && selectedIds.push(node.id.toString());
470
+ if (parentId) {
471
+ appIntegrationFiles.getSelected().then(selection => {
472
+ const selectedIds = selection?.filter((node) => node).map(({id}) => id.toString());
473
+ if (!selectedIds?.length) {
474
+ return;
475
+ }
476
+ const filteredNodes = tree.filter((node) => selectedIds.includes(node.parent_id.toString()));
477
+ filteredNodes.forEach((node) => {
478
+ selectedIds.push(node.id);
479
+ });
480
+ appIntegrationFiles.setSelected(selectedIds);
479
481
  });
480
- appIntegrationFiles.setSelected(selectedIds);
481
- });
482
+ }
482
483
  });
483
484
  }
484
485
  {{#if integrationPagination}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.66.0",
3
+ "version": "0.66.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",
@@ -58,8 +58,8 @@
58
58
  "@types/express": "4.17.21",
59
59
  "@types/express-handlebars": "^5.3.1",
60
60
  "@types/jest": "^29.5.12",
61
- "@types/lodash.uniqby": "^4.7.9",
62
61
  "@types/lodash.get": "^4.4.9",
62
+ "@types/lodash.uniqby": "^4.7.9",
63
63
  "@types/node": "^16.18.101",
64
64
  "@types/node-cron": "^3.0.11",
65
65
  "@types/pg": "^8.11.6",
@@ -67,6 +67,7 @@
67
67
  "@types/uuid": "^9.0.7",
68
68
  "@typescript-eslint/eslint-plugin": "^2.3.1",
69
69
  "@typescript-eslint/parser": "^2.3.1",
70
+ "auto-changelog": "^2.5.0",
70
71
  "eslint": "^6.4.0",
71
72
  "eslint-config-prettier": "^6.3.0",
72
73
  "eslint-plugin-prettier": "^3.1.1",