@crowdin/app-project-module 0.22.0 → 0.22.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/README.md CHANGED
@@ -113,6 +113,13 @@ const configuration = {
113
113
  {
114
114
  id: '11',
115
115
  name: 'Folder from integratio2'
116
+ customContent: `<div style='color: red;'>Custom Folder name</div>`,
117
+ parentId: '1'
118
+ },
119
+ {
120
+ id: '1',
121
+ name: 'Branch from integratio',
122
+ nodeType: '2'
116
123
  },
117
124
  ];
118
125
  },
@@ -377,11 +377,15 @@ export interface File {
377
377
  name: string;
378
378
  type: SourceFilesModel.FileType;
379
379
  parentId?: string;
380
+ nodeType?: string;
381
+ customContent?: string;
380
382
  }
381
383
  export interface Folder {
382
384
  id: string;
383
385
  name: string;
384
386
  parentId?: string;
387
+ nodeType?: string;
388
+ customContent?: string;
385
389
  }
386
390
  export interface IntegrationRequest extends CrowdinClientRequest {
387
391
  integrationCredentials: any;
@@ -233,7 +233,7 @@ class MySQLStorage {
233
233
  updateMetadata(id, metadata) {
234
234
  return __awaiter(this, void 0, void 0, function* () {
235
235
  yield this.dbPromise;
236
- yield this.executeQuery(connection => connection.execute('UPDATE app_metadata SET data = ? WHERE id = ?', [id, JSON.stringify(metadata)]));
236
+ yield this.executeQuery(connection => connection.execute('UPDATE app_metadata SET data = ? WHERE id = ?', [JSON.stringify(metadata), id]));
237
237
  });
238
238
  }
239
239
  getMetadata(id) {
@@ -229,7 +229,7 @@ class PostgreStorage {
229
229
  updateMetadata(id, metadata) {
230
230
  return __awaiter(this, void 0, void 0, function* () {
231
231
  yield this.dbPromise;
232
- yield this.executeQuery(client => client.query('UPDATE app_metadata SET data = $1 WHERE id = $2', [id, JSON.stringify(metadata)]));
232
+ yield this.executeQuery(client => client.query('UPDATE app_metadata SET data = $1 WHERE id = $2', [JSON.stringify(metadata), id]));
233
233
  });
234
234
  }
235
235
  getMetadata(id) {
@@ -140,6 +140,9 @@ function applyDefaults(config, integration) {
140
140
  },
141
141
  ],
142
142
  },
143
+ {
144
+ label: "To avoid downloading partially translated files, we recommend enabling the 'Skip untranslated files' option in your Crowdin project.",
145
+ },
143
146
  ...fields,
144
147
  ];
145
148
  });
@@ -186,12 +186,13 @@
186
186
  parent_id: e.parentId ? e.parentId : '0',
187
187
  name: e.name,
188
188
  id: e.id,
189
+ customContent: e.customContent,
189
190
  };
190
191
  if (e.type) {
191
192
  item.type = e.type;
192
193
  item.node_type = fileType;
193
194
  } else {
194
- item.node_type = folderType;
195
+ item.node_type = e.nodeType || folderType;
195
196
  }
196
197
  return item;
197
198
  });
@@ -223,12 +224,13 @@
223
224
  parent_id: e.parentId ? e.parentId : '0',
224
225
  name: e.name,
225
226
  id: e.id,
227
+ customContent: e.customContent,
226
228
  };
227
229
  if (e.type) {
228
230
  item.type = e.type;
229
231
  item.node_type = fileType;
230
232
  } else {
231
- item.node_type = folderType;
233
+ item.node_type = e.nodeType || folderType;
232
234
  }
233
235
  return item;
234
236
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.22.0",
3
+ "version": "0.22.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",