@crowdin/app-project-module 1.12.0 → 1.13.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.d.ts +1 -1
- package/out/index.js +5 -5
- package/out/middlewares/export.d.ts +2 -0
- package/out/middlewares/export.js +39 -0
- package/out/modules/ai-provider/handlers/chat-completions.js +5 -1
- package/out/modules/ai-provider/handlers/get-model-list.js +7 -6
- package/out/modules/ai-provider/types.d.ts +25 -3
- package/out/modules/integration/handlers/integration-data.d.ts +1 -1
- package/out/modules/integration/handlers/invite-users.d.ts +1 -1
- package/out/modules/integration/handlers/job-cancel.d.ts +1 -1
- package/out/modules/integration/handlers/job-info.d.ts +1 -1
- package/out/modules/integration/handlers/job-list.d.ts +1 -1
- package/out/modules/integration/handlers/settings-schema.d.ts +1 -1
- package/out/modules/integration/handlers/settings.d.ts +1 -1
- package/out/modules/integration/handlers/sync-settings.d.ts +1 -1
- package/out/modules/integration/handlers/user-errors.d.ts +1 -1
- package/out/modules/integration/handlers/users.d.ts +1 -1
- package/out/modules/integration/util/cron.js +21 -6
- package/out/modules/integration/util/export.d.ts +3 -0
- package/out/modules/integration/util/export.js +19 -0
- package/out/modules/subscription-paid.d.ts +1 -1
- package/out/storage/export.d.ts +1 -0
- package/out/storage/export.js +2 -0
- package/out/util/export.d.ts +4 -0
- package/out/util/export.js +47 -0
- package/package.json +21 -1
package/out/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ClientConfig, Config, CrowdinAppUtilities, CrowdinMetadataStore } from
|
|
|
3
3
|
import express from './util/terminus-express';
|
|
4
4
|
import { getRequestCredentialsMasker, postRequestCredentialsMasker, maskKey } from './util/credentials-masker';
|
|
5
5
|
export { getRequestCredentialsMasker, postRequestCredentialsMasker, maskKey };
|
|
6
|
-
export
|
|
6
|
+
export * from './types';
|
|
7
7
|
export { Cron } from './util/cron';
|
|
8
8
|
export { express };
|
|
9
9
|
export declare const metadataStore: CrowdinMetadataStore;
|
package/out/index.js
CHANGED
|
@@ -32,6 +32,9 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
|
+
};
|
|
35
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -45,7 +48,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
48
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
49
|
};
|
|
47
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.metadataStore = exports.express = exports.
|
|
51
|
+
exports.metadataStore = exports.express = exports.maskKey = exports.postRequestCredentialsMasker = exports.getRequestCredentialsMasker = void 0;
|
|
49
52
|
exports.createApp = createApp;
|
|
50
53
|
exports.addCrowdinEndpoints = addCrowdinEndpoints;
|
|
51
54
|
const logsFormatter = __importStar(require("@crowdin/logs-formatter"));
|
|
@@ -106,10 +109,7 @@ const aiRequestProcessors = __importStar(require("./modules/ai-request-processor
|
|
|
106
109
|
const automationAction = __importStar(require("./modules/automation-action"));
|
|
107
110
|
const authGuard = __importStar(require("./modules/auth-guard"));
|
|
108
111
|
const subscription_1 = require("./util/subscription");
|
|
109
|
-
|
|
110
|
-
Object.defineProperty(exports, "ProjectPermissions", { enumerable: true, get: function () { return types_2.ProjectPermissions; } });
|
|
111
|
-
Object.defineProperty(exports, "Scope", { enumerable: true, get: function () { return types_2.Scope; } });
|
|
112
|
-
Object.defineProperty(exports, "UserPermissions", { enumerable: true, get: function () { return types_2.UserPermissions; } });
|
|
112
|
+
__exportStar(require("./types"), exports);
|
|
113
113
|
exports.metadataStore = {
|
|
114
114
|
getMetadata: (id) => {
|
|
115
115
|
return storage.getStorage().getMetadata(id);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.jsonResponse = exports.getToken = void 0;
|
|
37
|
+
var crowdin_client_1 = require("./crowdin-client");
|
|
38
|
+
Object.defineProperty(exports, "getToken", { enumerable: true, get: function () { return crowdin_client_1.getToken; } });
|
|
39
|
+
exports.jsonResponse = __importStar(require("./json-response"));
|
|
@@ -35,7 +35,10 @@ function handle(aiProvider) {
|
|
|
35
35
|
let message;
|
|
36
36
|
let data;
|
|
37
37
|
const chunks = [];
|
|
38
|
-
const { crowdinApiClient: client, crowdinContext: context, body: { messages, model, action, stream, tools, tool_choice: toolChoice, responseFormat: { type: responseFormatType
|
|
38
|
+
const { crowdinApiClient: client, crowdinContext: context, body: { messages, model, action, stream, tools, tool_choice: toolChoice, responseFormat: { type: responseFormatType, json_schema: jsonSchema } = {
|
|
39
|
+
type: undefined,
|
|
40
|
+
json_schema: undefined,
|
|
41
|
+
}, }, } = req;
|
|
39
42
|
isStream = !!stream;
|
|
40
43
|
const startStream = () => {
|
|
41
44
|
if (!res.headersSent) {
|
|
@@ -52,6 +55,7 @@ function handle(aiProvider) {
|
|
|
52
55
|
model,
|
|
53
56
|
action,
|
|
54
57
|
responseFormat: responseFormatType,
|
|
58
|
+
jsonSchema,
|
|
55
59
|
client,
|
|
56
60
|
context,
|
|
57
61
|
request: req,
|
|
@@ -23,15 +23,16 @@ function handle(aiProvider) {
|
|
|
23
23
|
context: req.crowdinContext,
|
|
24
24
|
});
|
|
25
25
|
const data = modelList.map((model) => {
|
|
26
|
-
var _a, _b, _c, _d, _e, _f;
|
|
26
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
27
27
|
return ({
|
|
28
28
|
id: model.id,
|
|
29
29
|
supportsJsonMode: (_a = model.supportsJsonMode) !== null && _a !== void 0 ? _a : false,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
supportsJsonSchema: (_b = model.supportsJsonSchema) !== null && _b !== void 0 ? _b : false,
|
|
31
|
+
supportsFunctionCalling: (_c = model.supportsFunctionCalling) !== null && _c !== void 0 ? _c : false,
|
|
32
|
+
supportsStreaming: (_d = model.supportsStreaming) !== null && _d !== void 0 ? _d : false,
|
|
33
|
+
supportsVision: (_e = model.supportsVision) !== null && _e !== void 0 ? _e : false,
|
|
34
|
+
contextWindowLimit: (_f = model.contextWindowLimit) !== null && _f !== void 0 ? _f : exports.CONTEXT_WINDOW_LIMIT,
|
|
35
|
+
outputLimit: (_g = model.outputLimit) !== null && _g !== void 0 ? _g : exports.CONTEXT_WINDOW_LIMIT,
|
|
35
36
|
});
|
|
36
37
|
});
|
|
37
38
|
res.send({ data });
|
|
@@ -17,11 +17,12 @@ export interface AiProviderModule extends Environments, ModuleKey {
|
|
|
17
17
|
/**
|
|
18
18
|
* processes a sequence of conversation messages and generates responses from the assistant
|
|
19
19
|
*/
|
|
20
|
-
chatCompletions: ({ messages, model, action, responseFormat, client, context, request, isStream, sendEvent, tools, toolChoice, }: {
|
|
20
|
+
chatCompletions: ({ messages, model, action, responseFormat, jsonSchema, client, context, request, isStream, sendEvent, tools, toolChoice, }: {
|
|
21
21
|
messages: ChatCompletionMessage[];
|
|
22
22
|
model: string;
|
|
23
23
|
action: string;
|
|
24
|
-
responseFormat
|
|
24
|
+
responseFormat?: ChatCompletionResponseFormat;
|
|
25
|
+
jsonSchema?: ChatCompletionJsonSchema;
|
|
25
26
|
client: Crowdin;
|
|
26
27
|
context: CrowdinContextInfo;
|
|
27
28
|
request: CrowdinClientRequest;
|
|
@@ -41,6 +42,7 @@ export interface AiProviderModule extends Environments, ModuleKey {
|
|
|
41
42
|
export interface SupportedModels {
|
|
42
43
|
id: string;
|
|
43
44
|
supportsJsonMode?: boolean;
|
|
45
|
+
supportsJsonSchema?: boolean;
|
|
44
46
|
supportsFunctionCalling?: boolean;
|
|
45
47
|
supportsStreaming?: boolean;
|
|
46
48
|
supportsVision?: boolean;
|
|
@@ -64,7 +66,7 @@ export interface ChatCompletionToolFunctionDeclaration {
|
|
|
64
66
|
* The parameters the functions accepts, described as a JSON Schema object.
|
|
65
67
|
* https://json-schema.org/understanding-json-schema/
|
|
66
68
|
*/
|
|
67
|
-
parameters?:
|
|
69
|
+
parameters?: Record<string, unknown>;
|
|
68
70
|
}
|
|
69
71
|
export interface AiToolChoice {
|
|
70
72
|
type: 'function';
|
|
@@ -75,6 +77,26 @@ export interface AiToolChoice {
|
|
|
75
77
|
name: string;
|
|
76
78
|
};
|
|
77
79
|
}
|
|
80
|
+
export interface ChatCompletionJsonSchema {
|
|
81
|
+
/**
|
|
82
|
+
* The name of the response format.
|
|
83
|
+
*/
|
|
84
|
+
name: string;
|
|
85
|
+
/**
|
|
86
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
87
|
+
*/
|
|
88
|
+
description?: string;
|
|
89
|
+
/**
|
|
90
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
91
|
+
* https://json-schema.org/understanding-json-schema/
|
|
92
|
+
*/
|
|
93
|
+
schema: Record<string, unknown>;
|
|
94
|
+
/**
|
|
95
|
+
* Whether to enable strict schema adherence when generating the output.
|
|
96
|
+
*/
|
|
97
|
+
strict?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export type ChatCompletionResponseFormat = 'text' | 'json_object' | 'json_schema';
|
|
78
100
|
export type ChatCompletionMessage = ChatCompletionSystemMessage | ChatCompletionUserMessage | ChatCompletionAssistantMessage | ChatCompletionToolMessage;
|
|
79
101
|
export interface ChatCompletionSystemMessage {
|
|
80
102
|
role: 'system';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
2
|
import { IntegrationLogic } from '../types';
|
|
3
|
-
export default function handle(integration: IntegrationLogic): (req: import("express").Request | import("
|
|
3
|
+
export default function handle(integration: IntegrationLogic): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
2
|
import { IntegrationLogic } from '../types';
|
|
3
|
-
export default function handle(integration: IntegrationLogic): (req: import("express").Request | import("
|
|
3
|
+
export default function handle(integration: IntegrationLogic): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Response } from 'express';
|
|
2
|
-
export default function handle(): (req: import("express").Request | import("
|
|
2
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Crowdin, { UsersModel } from '@crowdin/crowdin-api-client';
|
|
2
2
|
import { Response } from 'express';
|
|
3
3
|
export type ProjectMember = UsersModel.ProjectMember | UsersModel.EnterpriseProjectMember;
|
|
4
|
-
export default function handle(): (req: import("express").Request | import("
|
|
4
|
+
export default function handle(): (req: import("express").Request | import("../../..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
5
5
|
export declare function isManager({ client, projectId, memberId, }: {
|
|
6
6
|
client: Crowdin;
|
|
7
7
|
projectId: number;
|
|
@@ -306,6 +306,7 @@ function processSyncSettings(_a) {
|
|
|
306
306
|
onlyApproved,
|
|
307
307
|
onlyTranslated,
|
|
308
308
|
context,
|
|
309
|
+
integration,
|
|
309
310
|
});
|
|
310
311
|
filesToProcess = result.filteredFiles;
|
|
311
312
|
deletedFileIds = result.deletedFiles;
|
|
@@ -494,22 +495,36 @@ function getNewFoldersFile(folders, snapshotFiles) {
|
|
|
494
495
|
return files;
|
|
495
496
|
}
|
|
496
497
|
function getOnlyTranslatedOrApprovedFiles(_a) {
|
|
497
|
-
return __awaiter(this, arguments, void 0, function* ({ projectId, crowdinFiles, crowdinClient, onlyApproved, onlyTranslated, context, }) {
|
|
498
|
+
return __awaiter(this, arguments, void 0, function* ({ projectId, crowdinFiles, crowdinClient, onlyApproved, onlyTranslated, context, integration, }) {
|
|
498
499
|
const deletedFiles = [];
|
|
499
500
|
(0, logger_1.log)(`Filtering files to process only ${onlyApproved ? 'approved' : 'translated'} files`);
|
|
500
501
|
const filesInfo = yield Promise.all(Object.keys(crowdinFiles).map((fileId) => __awaiter(this, void 0, void 0, function* () {
|
|
502
|
+
var _a, _b, _c, _d, _e;
|
|
501
503
|
try {
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
.getFileProgress(
|
|
504
|
+
let info;
|
|
505
|
+
if (integration.getFileProgress) {
|
|
506
|
+
const progress = yield integration.getFileProgress({
|
|
507
|
+
projectId,
|
|
508
|
+
client: crowdinClient,
|
|
509
|
+
fileId: Number(fileId),
|
|
510
|
+
});
|
|
511
|
+
info = (_b = (_a = progress[Number(fileId)]) !== null && _a !== void 0 ? _a : progress[fileId]) !== null && _b !== void 0 ? _b : [];
|
|
512
|
+
}
|
|
513
|
+
else {
|
|
514
|
+
const res = yield crowdinClient.translationStatusApi
|
|
515
|
+
.withFetchAll()
|
|
516
|
+
.getFileProgress(projectId, Number(fileId));
|
|
517
|
+
info = res.data.map((e) => e.data);
|
|
518
|
+
}
|
|
505
519
|
return {
|
|
506
520
|
id: fileId,
|
|
507
|
-
info
|
|
521
|
+
info,
|
|
508
522
|
};
|
|
509
523
|
}
|
|
510
524
|
catch (e) {
|
|
511
525
|
delete crowdinFiles[fileId];
|
|
512
|
-
|
|
526
|
+
const status = (_e = (_d = (_c = e === null || e === void 0 ? void 0 : e.response) === null || _c === void 0 ? void 0 : _c.status) !== null && _d !== void 0 ? _d : e === null || e === void 0 ? void 0 : e.status) !== null && _e !== void 0 ? _e : e === null || e === void 0 ? void 0 : e.code;
|
|
527
|
+
if (status === 404) {
|
|
513
528
|
(0, logger_1.log)(`File ${fileId} not found in Crowdin (404), marking for removal from sync settings`);
|
|
514
529
|
deletedFiles.push(Number(fileId));
|
|
515
530
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./cron"), exports);
|
|
19
|
+
__exportStar(require("./defaults"), exports);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
|
-
export default function handle(): (req: Request | import("
|
|
2
|
+
export default function handle(): (req: Request | import("..").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Storage } from './';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.logger = exports.executeWithRetry = exports.decryptData = exports.encryptData = exports.extractBaseUrlFromRequest = exports.CodeError = exports.isAppFree = exports.prepareCrowdinClient = void 0;
|
|
37
|
+
var connection_1 = require("./connection");
|
|
38
|
+
Object.defineProperty(exports, "prepareCrowdinClient", { enumerable: true, get: function () { return connection_1.prepareCrowdinClient; } });
|
|
39
|
+
var subscription_1 = require("./subscription");
|
|
40
|
+
Object.defineProperty(exports, "isAppFree", { enumerable: true, get: function () { return subscription_1.isAppFree; } });
|
|
41
|
+
var _1 = require("./");
|
|
42
|
+
Object.defineProperty(exports, "CodeError", { enumerable: true, get: function () { return _1.CodeError; } });
|
|
43
|
+
Object.defineProperty(exports, "extractBaseUrlFromRequest", { enumerable: true, get: function () { return _1.extractBaseUrlFromRequest; } });
|
|
44
|
+
Object.defineProperty(exports, "encryptData", { enumerable: true, get: function () { return _1.encryptData; } });
|
|
45
|
+
Object.defineProperty(exports, "decryptData", { enumerable: true, get: function () { return _1.decryptData; } });
|
|
46
|
+
Object.defineProperty(exports, "executeWithRetry", { enumerable: true, get: function () { return _1.executeWithRetry; } });
|
|
47
|
+
exports.logger = __importStar(require("./logger"));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowdin/app-project-module",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.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",
|
|
@@ -24,6 +24,26 @@
|
|
|
24
24
|
"require": "./out/modules/*/types.js",
|
|
25
25
|
"import": "./out/modules/*/types.js",
|
|
26
26
|
"types": "./out/modules/*/types.d.ts"
|
|
27
|
+
},
|
|
28
|
+
"./storage": {
|
|
29
|
+
"require": "./out/storage/export.js",
|
|
30
|
+
"import": "./out/storage/export.js",
|
|
31
|
+
"types": "./out/storage/export.d.ts"
|
|
32
|
+
},
|
|
33
|
+
"./util": {
|
|
34
|
+
"require": "./out/util/export.js",
|
|
35
|
+
"import": "./out/util/export.js",
|
|
36
|
+
"types": "./out/util/export.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./middlewares": {
|
|
39
|
+
"require": "./out/middlewares/export.js",
|
|
40
|
+
"import": "./out/middlewares/export.js",
|
|
41
|
+
"types": "./out/middlewares/export.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./modules/integration/util": {
|
|
44
|
+
"require": "./out/modules/integration/util/export.js",
|
|
45
|
+
"import": "./out/modules/integration/util/export.js",
|
|
46
|
+
"types": "./out/modules/integration/util/export.d.ts"
|
|
27
47
|
}
|
|
28
48
|
},
|
|
29
49
|
"scripts": {
|