@crowdin/app-project-module 0.82.1 → 0.84.0

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.
@@ -2,7 +2,7 @@ import { IntegrationConfig, IntegrationCredentials, IntegrationFilesSnapshot, In
2
2
  import { Config, CrowdinCredentials, UnauthorizedConfig } from '../types';
3
3
  import { CreateJobParams, GetActiveJobsParams, GetJobParams, GetFileTranslationCacheByLanguageParams, Job, TranslationCache, UpdateJobParams, UpdateTranslationCacheParams, GetFileTranslationCache, UnsyncedFiles, GetUnsyncedFiles } from '../modules/integration/util/types';
4
4
  import { UserErrors } from './types';
5
- declare const TABLES: {
5
+ export declare const TABLES: {
6
6
  crowdin_credentials: string;
7
7
  integration_credentials: string;
8
8
  sync_settings: string;
@@ -82,4 +82,3 @@ export interface Storage {
82
82
  }
83
83
  export declare function initialize(config: Config | UnauthorizedConfig): Promise<void>;
84
84
  export declare function getStorage(): Storage;
85
- export {};
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.getStorage = exports.initialize = void 0;
39
+ exports.getStorage = exports.initialize = exports.TABLES = void 0;
40
40
  const types_1 = require("../types");
41
41
  const logger_1 = require("../util/logger");
42
42
  const mysql_1 = require("./mysql");
@@ -46,7 +46,7 @@ const path_1 = __importStar(require("path"));
46
46
  const fs_1 = __importDefault(require("fs"));
47
47
  const child_process_1 = require("child_process");
48
48
  const util = __importStar(require("node:util"));
49
- const TABLES = {
49
+ exports.TABLES = {
50
50
  crowdin_credentials: 'crowdin_credentials',
51
51
  integration_credentials: 'integration_credentials',
52
52
  sync_settings: 'sync_settings',
@@ -102,7 +102,7 @@ function createDumpForMigration(config) {
102
102
  return;
103
103
  }
104
104
  (0, logger_1.log)('Creating dump for migration from SQLite to PostgreSQL');
105
- for (const tableName in TABLES) {
105
+ for (const tableName in exports.TABLES) {
106
106
  (0, logger_1.log)(`Creating dump for table ${tableName}`);
107
107
  const dumpFileName = util.format(types_1.storageFiles.DUMP, tableName);
108
108
  const dumpFilePath = path_1.default.join(config.dbFolder, dumpFileName);
package/out/types.d.ts CHANGED
@@ -183,6 +183,14 @@ export interface ClientConfig extends ImagePath {
183
183
  * Configuration to log everything that are happening in the app
184
184
  */
185
185
  logger?: Logger;
186
+ /**
187
+ * Enable status page with optional db and filesystem checks
188
+ */
189
+ enableStatusPage?: {
190
+ database?: boolean;
191
+ filesystem?: boolean;
192
+ rateLimit?: number;
193
+ };
186
194
  /**
187
195
  * Configuration of app pricing
188
196
  */
@@ -246,6 +254,10 @@ export interface ClientConfig extends ImagePath {
246
254
  * workflow step modules
247
255
  */
248
256
  workflowStepType?: WorkflowStepTypeModule | WorkflowStepTypeModule[];
257
+ /**
258
+ * property that tells backend that AiProvider and AiPromptProvider modules can cooperate only with each one
259
+ */
260
+ restrictAiToSameApp: boolean;
249
261
  }
250
262
  export interface Environments {
251
263
  environments?: Environment | Environment[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.82.1",
3
+ "version": "0.84.0",
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",
@@ -29,6 +29,7 @@
29
29
  "crypto-js": "^4.2.0",
30
30
  "express": "^4.21.2",
31
31
  "express-handlebars": "^5.3.5",
32
+ "express-rate-limit": "^7.5.0",
32
33
  "lodash.get": "^4.4.2",
33
34
  "lodash.isstring": "^4.0.1",
34
35
  "lodash.snakecase": "^4.1.1",