@crowdin/app-project-module 0.83.0 → 0.84.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.
@@ -22,7 +22,7 @@ function handle(aiProvider) {
22
22
  context: req.crowdinContext,
23
23
  });
24
24
  const data = modelList.map((model) => {
25
- var _a, _b, _c, _d, _e;
25
+ var _a, _b, _c, _d, _e, _f;
26
26
  return ({
27
27
  id: model.id,
28
28
  supportsJsonMode: (_a = model.supportsJsonMode) !== null && _a !== void 0 ? _a : false,
@@ -30,6 +30,7 @@ function handle(aiProvider) {
30
30
  supportsStreaming: (_c = model.supportsStreaming) !== null && _c !== void 0 ? _c : false,
31
31
  supportsVision: (_d = model.supportsVision) !== null && _d !== void 0 ? _d : false,
32
32
  contextWindowLimit: (_e = model.contextWindowLimit) !== null && _e !== void 0 ? _e : exports.CONTEXT_WINDOW_LIMIT,
33
+ outputLimit: (_f = model.outputLimit) !== null && _f !== void 0 ? _f : exports.CONTEXT_WINDOW_LIMIT,
33
34
  });
34
35
  });
35
36
  res.send({ data });
@@ -45,6 +45,7 @@ export interface SupportedModels {
45
45
  supportsStreaming?: boolean;
46
46
  supportsVision?: boolean;
47
47
  contextWindowLimit?: number;
48
+ outputLimit?: number;
48
49
  }
49
50
  export interface ChatCompletionTool {
50
51
  type: 'function';
@@ -54,7 +54,8 @@ function webhookHandler(config, webhooks) {
54
54
  const crowdinId = domain && (0, lodash_isstring_1.default)(domain) ? domain : organizationId;
55
55
  const credentials = yield storage.getStorage().getCrowdinCredentials(crowdinId);
56
56
  if (!credentials) {
57
- throw new Error('Failed to find Crowdin credentials');
57
+ res.status(401).send({ error: 'Unable to load Crowdin credentials' });
58
+ return;
58
59
  }
59
60
  const hmac = crypto.createHmac('sha256', credentials.appSecret);
60
61
  hmac.update(req.body.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.83.0",
3
+ "version": "0.84.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",