@crowdin/app-project-module 0.46.0 → 0.46.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/index.js CHANGED
@@ -141,7 +141,7 @@ function addCrowdinEndpoints(app, clientConfig) {
141
141
  contextMenuApp.register({ config, app });
142
142
  //other apps only work in authorized context
143
143
  if (!(0, util_1.isAuthorizedConfig)(config)) {
144
- return {};
144
+ return Object.assign({}, exports.metadataStore);
145
145
  }
146
146
  app.post('/installed', (0, install_1.default)(config));
147
147
  app.post('/uninstall', (0, uninstall_1.default)(config));
@@ -21,7 +21,9 @@ function handle(customSpellchecker) {
21
21
  res.send({ data });
22
22
  }
23
23
  catch (e) {
24
- req.logError(e);
24
+ if (req.logError) {
25
+ req.logError(e);
26
+ }
25
27
  res.send({ error: { message: (0, logger_1.getErrorMessage)(e) } });
26
28
  }
27
29
  }));
@@ -41,8 +41,8 @@ export interface CustomSpellcheckerModule extends Environments {
41
41
  * function to get list of supported languages that are supports by current spellchecker
42
42
  */
43
43
  getSupportedLanguage: ({ client, context, }: {
44
- client: Crowdin;
45
- context: CrowdinContextInfo;
44
+ client?: Crowdin;
45
+ context?: CrowdinContextInfo;
46
46
  }) => Promise<SupportedLanguage[]>;
47
47
  /**
48
48
  * function to check spelling
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.46.0",
3
+ "version": "0.46.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",