@crowdin/app-project-module 0.51.2 → 0.51.4

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.
@@ -1,5 +1,7 @@
1
1
  import { AxiosError } from 'axios';
2
- import { Config, CrowdinContextInfo, UnauthorizedConfig } from '../types';
2
+ import { Config, CrowdinClientRequest, CrowdinContextInfo, UnauthorizedConfig } from '../types';
3
+ import { IntegrationRequest } from '../modules/integration/types';
4
+ import { Request } from 'express';
3
5
  export type LogFunction = (message: string) => void;
4
6
  export type LogErrorFunction = (error: any) => void;
5
7
  export type LogContext = {
@@ -34,4 +36,5 @@ export declare function handleUserError({ action, error, crowdinId, clientId, }:
34
36
  crowdinId: string;
35
37
  clientId?: string;
36
38
  }): Promise<void>;
39
+ export declare function temporaryErrorDebug(msg: string, req: Request | IntegrationRequest | CrowdinClientRequest): void;
37
40
  export {};
@@ -32,7 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.handleUserError = exports.AppModuleAggregateError = exports.AppModuleError = exports.getErrorMessage = exports.isAxiosError = exports.logError = exports.log = exports.withContextError = exports.withContext = exports.prepareContext = exports.initialize = void 0;
35
+ exports.temporaryErrorDebug = exports.handleUserError = exports.AppModuleAggregateError = exports.AppModuleError = exports.getErrorMessage = exports.isAxiosError = exports.logError = exports.log = exports.withContextError = exports.withContext = exports.prepareContext = exports.initialize = void 0;
36
36
  const logsFormatter = __importStar(require("@crowdin/logs-formatter"));
37
37
  const storage_1 = require("../storage");
38
38
  let logConfig;
@@ -274,3 +274,8 @@ function handleUserError({ action, error, crowdinId, clientId, }) {
274
274
  });
275
275
  }
276
276
  exports.handleUserError = handleUserError;
277
+ function temporaryErrorDebug(msg, req) {
278
+ // eslint-disable-next-line no-console
279
+ console.log(msg, req.headers, Object.assign({ originalUrl: req.originalUrl }, req.query));
280
+ }
281
+ exports.temporaryErrorDebug = temporaryErrorDebug;
@@ -721,6 +721,8 @@
721
721
  const settingsModal = document.getElementById('settings-modal');
722
722
  const settingsSaveBtn = document.getElementById('settings-save-btn');
723
723
  let config = JSON.parse('{{{config}}}');
724
+ const newCrowdinFiles = config?.['new-crowdin-files'];
725
+ const newIntegrationFiles = config?.['new-integration-files'];
724
726
 
725
727
  function triggerEvent(el, type) {
726
728
  const e = document.createEvent('HTMLEvents');
@@ -932,7 +934,7 @@
932
934
  {{#if syncNewElements.integration}}
933
935
  syncData = e.detail;
934
936
  const isFolder = await hasFolder(e.detail);
935
- if (isFolder) {
937
+ if (isFolder && !newIntegrationFiles) {
936
938
  openScheduleModal('integration');
937
939
  return;
938
940
  }
@@ -960,7 +962,7 @@
960
962
  {{#if syncNewElements.crowdin}}
961
963
  syncData = e.detail;
962
964
  const isFolder = await hasFolder(e.detail);
963
- if (isFolder) {
965
+ if (isFolder && !newCrowdinFiles) {
964
966
  openScheduleModal('crowdin');
965
967
  return;
966
968
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.51.2",
3
+ "version": "0.51.4",
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",
@@ -32,20 +32,20 @@
32
32
  "node-cron": "^3.0.3",
33
33
  "pg": "^8.11.5",
34
34
  "redoc-express": "^2.1.0",
35
- "sqlite3": "^5.1.6",
35
+ "sqlite3": "^5.1.7",
36
36
  "swagger-jsdoc": "^6.2.8",
37
37
  "uuid": "^8.3.2"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@babel/preset-react": "^7.24.1",
41
- "@emotion/react": "^11.11.1",
41
+ "@emotion/react": "^11.11.4",
42
42
  "@emotion/styled": "^11.11.0",
43
- "@mui/icons-material": "^5.15.14",
44
- "@mui/material": "^5.15.14",
45
- "@rjsf/core": "^5.18.1",
46
- "@rjsf/mui": "^5.18.1",
47
- "@rjsf/utils": "^5.17.1",
48
- "@rjsf/validator-ajv8": "^5.18.1",
43
+ "@mui/icons-material": "^5.15.15",
44
+ "@mui/material": "^5.15.15",
45
+ "@rjsf/core": "^5.18.3",
46
+ "@rjsf/mui": "^5.18.3",
47
+ "@rjsf/utils": "^5.18.3",
48
+ "@rjsf/validator-ajv8": "^5.18.3",
49
49
  "@rollup/plugin-babel": "^6.0.4",
50
50
  "@rollup/plugin-commonjs": "^24.1.0",
51
51
  "@rollup/plugin-json": "^6.1.0",
@@ -71,7 +71,7 @@
71
71
  "jest": "^29.7.0",
72
72
  "jest-junit": "^15.0.0",
73
73
  "prettier": "^2.8.8",
74
- "react": "^18.2.0",
74
+ "react": "^18.3.1",
75
75
  "react-dom": "^18.2.0",
76
76
  "rollup": "^3.29.4",
77
77
  "ts-jest": "^29.1.1",