@crowdin/app-project-module 1.2.1 → 1.3.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/app-test/integration/get-integration-files.js +1 -1
- package/out/app-test/integration/index.js +6 -6
- package/out/app-test/integration/mocks/crowdin-storage.d.ts +16 -16
- package/out/app-test/integration/mocks/mock-crowdin-api-client.js +17 -7
- package/out/app-test/integration/update-crowdin.js +1 -1
- package/out/app-test/integration/update-integration.js +1 -1
- package/out/app-test/util/index.js +1 -2
- package/out/index.js +23 -13
- package/out/middlewares/api-call.js +1 -1
- package/out/middlewares/auto-credentials-masker.js +2 -3
- package/out/middlewares/crowdin-client.d.ts +1 -2
- package/out/middlewares/crowdin-client.js +5 -6
- package/out/middlewares/integration-credentials.d.ts +1 -2
- package/out/middlewares/integration-credentials.js +18 -8
- package/out/middlewares/json-response.js +1 -1
- package/out/middlewares/render-ui-module.d.ts +1 -2
- package/out/middlewares/render-ui-module.js +1 -1
- package/out/middlewares/ui-module.d.ts +1 -2
- package/out/middlewares/ui-module.js +1 -1
- package/out/modules/about.js +2 -3
- package/out/modules/ai-prompt-provider/handlers/compile.d.ts +1 -2
- package/out/modules/ai-prompt-provider/handlers/compile.js +1 -1
- package/out/modules/ai-prompt-provider/index.js +1 -2
- package/out/modules/ai-prompt-provider/types.js +1 -1
- package/out/modules/ai-provider/handlers/chat-completions.d.ts +1 -2
- package/out/modules/ai-provider/handlers/chat-completions.js +2 -2
- package/out/modules/ai-provider/handlers/get-model-list.d.ts +1 -2
- package/out/modules/ai-provider/handlers/get-model-list.js +1 -1
- package/out/modules/ai-provider/index.js +1 -2
- package/out/modules/ai-provider/util/index.js +6 -6
- package/out/modules/ai-request-processors/handler.d.ts +1 -2
- package/out/modules/ai-request-processors/handler.js +1 -1
- package/out/modules/ai-request-processors/index.js +5 -5
- package/out/modules/ai-tools/handlers/tool-calls.d.ts +1 -2
- package/out/modules/ai-tools/handlers/tool-calls.js +1 -1
- package/out/modules/ai-tools/index.js +2 -3
- package/out/modules/ai-tools/util/index.js +4 -5
- package/out/modules/api/api.js +4 -5
- package/out/modules/api/index.js +1 -2
- package/out/modules/api/types.js +1 -1
- package/out/modules/auth-guard/handlers/verify.d.ts +1 -2
- package/out/modules/auth-guard/handlers/verify.js +1 -1
- package/out/modules/auth-guard/index.js +1 -2
- package/out/modules/automation-action/handlers/execute.d.ts +1 -2
- package/out/modules/automation-action/handlers/execute.js +1 -1
- package/out/modules/automation-action/handlers/input-schema.d.ts +1 -2
- package/out/modules/automation-action/handlers/input-schema.js +1 -1
- package/out/modules/automation-action/handlers/output-schema.d.ts +1 -2
- package/out/modules/automation-action/handlers/output-schema.js +1 -1
- package/out/modules/automation-action/handlers/validate-settings.d.ts +1 -2
- package/out/modules/automation-action/handlers/validate-settings.js +1 -1
- package/out/modules/automation-action/index.js +1 -2
- package/out/modules/automation-action/util/index.js +2 -3
- package/out/modules/automation-action/util/validate-input.js +1 -2
- package/out/modules/context-menu/index.js +1 -2
- package/out/modules/context-menu/types.js +2 -2
- package/out/modules/custom-mt/handlers/translate.d.ts +1 -2
- package/out/modules/custom-mt/handlers/translate.js +1 -1
- package/out/modules/custom-mt/index.js +1 -2
- package/out/modules/custom-mt/types.d.ts +0 -2
- package/out/modules/custom-spell-check/handlers/get-languages-list.d.ts +1 -2
- package/out/modules/custom-spell-check/handlers/get-languages-list.js +1 -1
- package/out/modules/custom-spell-check/handlers/spell-check.d.ts +1 -2
- package/out/modules/custom-spell-check/handlers/spell-check.js +1 -1
- package/out/modules/custom-spell-check/index.js +1 -2
- package/out/modules/editor-right-panel/index.js +1 -2
- package/out/modules/external-qa-check/handlers/validate.d.ts +1 -2
- package/out/modules/external-qa-check/handlers/validate.js +1 -1
- package/out/modules/external-qa-check/index.js +1 -2
- package/out/modules/file-processing/handlers/custom-file-format.d.ts +1 -2
- package/out/modules/file-processing/handlers/custom-file-format.js +9 -9
- package/out/modules/file-processing/handlers/file-download.d.ts +1 -2
- package/out/modules/file-processing/handlers/file-download.js +1 -1
- package/out/modules/file-processing/handlers/pre-post-process.d.ts +1 -2
- package/out/modules/file-processing/handlers/pre-post-process.js +1 -1
- package/out/modules/file-processing/handlers/translations-alignment.d.ts +1 -2
- package/out/modules/file-processing/handlers/translations-alignment.js +1 -1
- package/out/modules/file-processing/index.js +6 -7
- package/out/modules/file-processing/types.d.ts +0 -2
- package/out/modules/file-processing/types.js +1 -1
- package/out/modules/file-processing/util/defaults.js +18 -9
- package/out/modules/file-processing/util/files.d.ts +0 -2
- package/out/modules/file-processing/util/files.js +4 -4
- package/out/modules/form-data-display.d.ts +1 -2
- package/out/modules/form-data-display.js +18 -8
- package/out/modules/form-data-save.d.ts +1 -2
- package/out/modules/form-data-save.js +18 -8
- package/out/modules/install.d.ts +1 -2
- package/out/modules/install.js +2 -2
- package/out/modules/integration/handlers/crowdin-file-progress.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-file-progress.js +1 -1
- package/out/modules/integration/handlers/crowdin-files-target-languages.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-files-target-languages.js +1 -1
- package/out/modules/integration/handlers/crowdin-files.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-files.js +1 -1
- package/out/modules/integration/handlers/crowdin-project.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-project.js +1 -1
- package/out/modules/integration/handlers/crowdin-update.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-update.js +1 -1
- package/out/modules/integration/handlers/crowdin-webhook.d.ts +1 -2
- package/out/modules/integration/handlers/crowdin-webhook.js +2 -2
- package/out/modules/integration/handlers/integration-data.d.ts +1 -2
- package/out/modules/integration/handlers/integration-data.js +1 -1
- package/out/modules/integration/handlers/integration-login.d.ts +1 -2
- package/out/modules/integration/handlers/integration-login.js +1 -1
- package/out/modules/integration/handlers/integration-logout.d.ts +1 -2
- package/out/modules/integration/handlers/integration-logout.js +18 -8
- package/out/modules/integration/handlers/integration-update.d.ts +1 -2
- package/out/modules/integration/handlers/integration-update.js +1 -1
- package/out/modules/integration/handlers/integration-webhook.d.ts +1 -2
- package/out/modules/integration/handlers/integration-webhook.js +1 -1
- package/out/modules/integration/handlers/invite-users.d.ts +1 -2
- package/out/modules/integration/handlers/invite-users.js +1 -1
- package/out/modules/integration/handlers/job-cancel.d.ts +1 -2
- package/out/modules/integration/handlers/job-cancel.js +1 -1
- package/out/modules/integration/handlers/job-info-deprecated.d.ts +1 -2
- package/out/modules/integration/handlers/job-info-deprecated.js +1 -1
- package/out/modules/integration/handlers/job-info.d.ts +1 -2
- package/out/modules/integration/handlers/job-info.js +1 -1
- package/out/modules/integration/handlers/job-list.d.ts +1 -2
- package/out/modules/integration/handlers/job-list.js +1 -1
- package/out/modules/integration/handlers/main.d.ts +1 -2
- package/out/modules/integration/handlers/main.js +1 -1
- package/out/modules/integration/handlers/oauth-login.d.ts +1 -2
- package/out/modules/integration/handlers/oauth-login.js +1 -1
- package/out/modules/integration/handlers/oauth-polling.d.ts +1 -2
- package/out/modules/integration/handlers/oauth-polling.js +1 -1
- package/out/modules/integration/handlers/oauth-url.d.ts +1 -2
- package/out/modules/integration/handlers/oauth-url.js +1 -1
- package/out/modules/integration/handlers/settings-save.d.ts +1 -2
- package/out/modules/integration/handlers/settings-save.js +1 -1
- package/out/modules/integration/handlers/settings.d.ts +1 -2
- package/out/modules/integration/handlers/settings.js +1 -1
- package/out/modules/integration/handlers/subscription-info.js +1 -1
- package/out/modules/integration/handlers/sync-settings-save.d.ts +1 -2
- package/out/modules/integration/handlers/sync-settings-save.js +1 -1
- package/out/modules/integration/handlers/sync-settings.d.ts +1 -2
- package/out/modules/integration/handlers/sync-settings.js +1 -1
- package/out/modules/integration/handlers/user-errors.d.ts +1 -2
- package/out/modules/integration/handlers/user-errors.js +1 -1
- package/out/modules/integration/handlers/users.d.ts +1 -2
- package/out/modules/integration/handlers/users.js +4 -5
- package/out/modules/integration/index.js +1 -2
- package/out/modules/integration/types.js +4 -4
- package/out/modules/integration/util/cron.js +46 -37
- package/out/modules/integration/util/defaults.js +33 -24
- package/out/modules/integration/util/files.js +29 -30
- package/out/modules/integration/util/job.js +29 -20
- package/out/modules/integration/util/snapshot.js +7 -8
- package/out/modules/integration/util/types.js +3 -3
- package/out/modules/integration/util/webhooks.js +54 -44
- package/out/modules/manifest.js +1 -1
- package/out/modules/modal/index.js +1 -2
- package/out/modules/organization-menu/index.js +1 -2
- package/out/modules/organization-settings-menu/index.js +1 -2
- package/out/modules/profile-resources-menu/index.js +1 -2
- package/out/modules/profile-settings-menu/index.js +1 -2
- package/out/modules/project-menu/index.js +1 -2
- package/out/modules/project-menu-crowdsource/index.js +1 -2
- package/out/modules/project-reports/index.js +1 -2
- package/out/modules/project-tools/index.js +1 -2
- package/out/modules/status.d.ts +1 -2
- package/out/modules/status.js +1 -1
- package/out/modules/subscription-paid.d.ts +1 -2
- package/out/modules/subscription-paid.js +1 -1
- package/out/modules/uninstall.d.ts +1 -2
- package/out/modules/uninstall.js +1 -1
- package/out/modules/webhooks/handlers/webhook-handler.d.ts +1 -2
- package/out/modules/webhooks/handlers/webhook-handler.js +18 -9
- package/out/modules/webhooks/index.js +1 -2
- package/out/modules/workflow-step-type/handlers/delete-step.d.ts +1 -2
- package/out/modules/workflow-step-type/handlers/delete-step.js +18 -8
- package/out/modules/workflow-step-type/handlers/step-settings-save.d.ts +1 -2
- package/out/modules/workflow-step-type/handlers/step-settings-save.js +18 -8
- package/out/modules/workflow-step-type/index.js +1 -2
- package/out/modules/workflow-step-type/types.js +1 -1
- package/out/modules/workflow-step-type/util/index.js +2 -3
- package/out/static/ui/error.bundle.js +446 -379
- package/out/static/ui/error.bundle.js.map +1 -1
- package/out/static/ui/form.bundle.js +29793 -29989
- package/out/static/ui/form.bundle.js.map +1 -1
- package/out/static/ui/install.bundle.js +446 -379
- package/out/static/ui/install.bundle.js.map +1 -1
- package/out/static/ui/login.bundle.js +448 -379
- package/out/static/ui/login.bundle.js.map +1 -1
- package/out/static/ui/main.bundle.js +448 -379
- package/out/static/ui/main.bundle.js.map +1 -1
- package/out/static/ui/oauth.bundle.js +448 -379
- package/out/static/ui/oauth.bundle.js.map +1 -1
- package/out/storage/d1.d.ts +1 -1
- package/out/storage/d1.js +29 -27
- package/out/storage/index.d.ts +1 -1
- package/out/storage/index.js +25 -11
- package/out/storage/mysql.d.ts +1 -1
- package/out/storage/mysql.js +35 -33
- package/out/storage/postgre.d.ts +1 -1
- package/out/storage/postgre.js +46 -44
- package/out/storage/sqlite.d.ts +1 -1
- package/out/storage/sqlite.js +18 -16
- package/out/types.d.ts +0 -2
- package/out/types.js +8 -8
- package/out/util/connection.js +34 -25
- package/out/util/credentials-masker.d.ts +1 -2
- package/out/util/credentials-masker.js +3 -4
- package/out/util/cron.js +20 -10
- package/out/util/form-schema.js +2 -3
- package/out/util/index.js +38 -28
- package/out/util/jsx-renderer.js +2 -3
- package/out/util/logger.js +41 -31
- package/out/util/static-files.d.ts +0 -1
- package/out/util/static-files.js +2 -3
- package/out/util/subscription.js +11 -12
- package/out/views/FormPage.js +3 -3
- package/package.json +28 -33
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -35,7 +45,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
46
|
};
|
|
37
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
48
|
+
exports.HookEvents = void 0;
|
|
49
|
+
exports.registerWebhooks = registerWebhooks;
|
|
50
|
+
exports.unregisterWebhooks = unregisterWebhooks;
|
|
51
|
+
exports.unregisterAllCrowdinWebhooks = unregisterAllCrowdinWebhooks;
|
|
52
|
+
exports.prepareWebhookData = prepareWebhookData;
|
|
53
|
+
exports.updateCrowdinFromWebhookRequest = updateCrowdinFromWebhookRequest;
|
|
54
|
+
exports.listenQueueMessage = listenQueueMessage;
|
|
39
55
|
const logsFormatter = __importStar(require("@crowdin/logs-formatter"));
|
|
40
56
|
const crowdinAppFunctions = __importStar(require("@crowdin/crowdin-apps-functions"));
|
|
41
57
|
const amqplib_1 = __importDefault(require("amqplib"));
|
|
@@ -82,13 +98,13 @@ function makeCrowdinWebhookUrl({ config, crowdinContext, integration, }) {
|
|
|
82
98
|
const urlParam = encodedUrlParam({ config, integration, crowdinContext });
|
|
83
99
|
return (`${config.baseUrl}${((_a = integration.webhooks) === null || _a === void 0 ? void 0 : _a.crowdinWebhookUrl) ? integration.webhooks.crowdinWebhookUrl : '/api/crowdin/webhook'}` + `?${urlParam}`);
|
|
84
100
|
}
|
|
85
|
-
function registerWebhooks(
|
|
86
|
-
|
|
87
|
-
|
|
101
|
+
function registerWebhooks(_a) {
|
|
102
|
+
return __awaiter(this, arguments, void 0, function* ({ config, credentials, settings, client, crowdinContext, integration, }) {
|
|
103
|
+
var _b, _c;
|
|
88
104
|
const isWebhookSync = Number(settings.schedule) !== types_1.SyncSchedule.DISABLED;
|
|
89
105
|
const projectId = crowdinContext.jwtPayload.context.project_id;
|
|
90
106
|
const urlParam = encodedUrlParam({ config, integration, crowdinContext });
|
|
91
|
-
if ((
|
|
107
|
+
if ((_b = integration.webhooks) === null || _b === void 0 ? void 0 : _b.crowdinWebhooks) {
|
|
92
108
|
yield integration.webhooks.crowdinWebhooks({ client, projectId, available: isWebhookSync, settings });
|
|
93
109
|
}
|
|
94
110
|
else {
|
|
@@ -129,7 +145,7 @@ function registerWebhooks({ config, credentials, settings, client, crowdinContex
|
|
|
129
145
|
yield unregisterCrowdinWebhooks({ client, projectId, webhook });
|
|
130
146
|
}
|
|
131
147
|
}
|
|
132
|
-
if ((
|
|
148
|
+
if ((_c = integration.webhooks) === null || _c === void 0 ? void 0 : _c.integrationWebhooks) {
|
|
133
149
|
yield integration.webhooks.integrationWebhooks({
|
|
134
150
|
credentials,
|
|
135
151
|
urlParam,
|
|
@@ -139,11 +155,10 @@ function registerWebhooks({ config, credentials, settings, client, crowdinContex
|
|
|
139
155
|
}
|
|
140
156
|
});
|
|
141
157
|
}
|
|
142
|
-
|
|
143
|
-
function
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if ((_a = integration.webhooks) === null || _a === void 0 ? void 0 : _a.crowdinWebhooks) {
|
|
158
|
+
function unregisterWebhooks(_a) {
|
|
159
|
+
return __awaiter(this, arguments, void 0, function* ({ credentials, settings, client, config, crowdinContext, integration, }) {
|
|
160
|
+
var _b, _c;
|
|
161
|
+
if ((_b = integration.webhooks) === null || _b === void 0 ? void 0 : _b.crowdinWebhooks) {
|
|
147
162
|
yield integration.webhooks.crowdinWebhooks({
|
|
148
163
|
client,
|
|
149
164
|
projectId: crowdinContext.jwtPayload.context.project_id,
|
|
@@ -165,21 +180,20 @@ function unregisterWebhooks({ credentials, settings, client, config, crowdinCont
|
|
|
165
180
|
});
|
|
166
181
|
}
|
|
167
182
|
}
|
|
168
|
-
if ((
|
|
183
|
+
if ((_c = integration.webhooks) === null || _c === void 0 ? void 0 : _c.integrationWebhooks) {
|
|
169
184
|
const urlParam = encodedUrlParam({ config, integration, crowdinContext });
|
|
170
185
|
yield integration.webhooks.integrationWebhooks({ credentials, urlParam, available: false, settings });
|
|
171
186
|
}
|
|
172
187
|
});
|
|
173
188
|
}
|
|
174
|
-
|
|
175
|
-
function
|
|
176
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
function getCrowdinProjectWebhook(_a) {
|
|
190
|
+
return __awaiter(this, arguments, void 0, function* ({ client, name, projectId, }) {
|
|
177
191
|
const hooks = (yield client.webhooksApi.withFetchAll().listWebhooks(projectId)).data.map((e) => e.data);
|
|
178
192
|
return hooks.find((h) => h.name === name);
|
|
179
193
|
});
|
|
180
194
|
}
|
|
181
|
-
function getAllCrowdinProjectWebhooks(
|
|
182
|
-
return __awaiter(this,
|
|
195
|
+
function getAllCrowdinProjectWebhooks(_a) {
|
|
196
|
+
return __awaiter(this, arguments, void 0, function* ({ client, config, projectId, }) {
|
|
183
197
|
const hooks = (yield client.webhooksApi.withFetchAll().listWebhooks(projectId)).data.map((e) => e.data);
|
|
184
198
|
return hooks.filter((h) => h.name.startsWith(`${config.name} application hook `));
|
|
185
199
|
});
|
|
@@ -196,8 +210,8 @@ function createPayload(events) {
|
|
|
196
210
|
}
|
|
197
211
|
return payload;
|
|
198
212
|
}
|
|
199
|
-
function registerCrowdinWebhook(
|
|
200
|
-
return __awaiter(this,
|
|
213
|
+
function registerCrowdinWebhook(_a) {
|
|
214
|
+
return __awaiter(this, arguments, void 0, function* ({ client, config, crowdinContext, events, url, }) {
|
|
201
215
|
const name = `${config.name} application hook ${crowdinContext.jwtPayload.sub}`;
|
|
202
216
|
const payload = createPayload(events);
|
|
203
217
|
yield client.webhooksApi.addWebhook(crowdinContext.jwtPayload.context.project_id, {
|
|
@@ -210,8 +224,8 @@ function registerCrowdinWebhook({ client, config, crowdinContext, events, url, }
|
|
|
210
224
|
});
|
|
211
225
|
});
|
|
212
226
|
}
|
|
213
|
-
function updateCrowdinWebhooks(
|
|
214
|
-
return __awaiter(this,
|
|
227
|
+
function updateCrowdinWebhooks(_a) {
|
|
228
|
+
return __awaiter(this, arguments, void 0, function* ({ client, events, projectId, webhook, }) {
|
|
215
229
|
const payload = createPayload(events);
|
|
216
230
|
yield client.webhooksApi.editWebhook(projectId, webhook.id, [
|
|
217
231
|
{
|
|
@@ -227,13 +241,13 @@ function updateCrowdinWebhooks({ client, events, projectId, webhook, }) {
|
|
|
227
241
|
]);
|
|
228
242
|
});
|
|
229
243
|
}
|
|
230
|
-
function unregisterCrowdinWebhooks(
|
|
231
|
-
return __awaiter(this,
|
|
244
|
+
function unregisterCrowdinWebhooks(_a) {
|
|
245
|
+
return __awaiter(this, arguments, void 0, function* ({ client, projectId, webhook, }) {
|
|
232
246
|
yield client.webhooksApi.deleteWebhook(projectId, webhook.id);
|
|
233
247
|
});
|
|
234
248
|
}
|
|
235
|
-
function unregisterAllCrowdinWebhooks(
|
|
236
|
-
return __awaiter(this,
|
|
249
|
+
function unregisterAllCrowdinWebhooks(_a) {
|
|
250
|
+
return __awaiter(this, arguments, void 0, function* ({ config, crowdinId, integration, }) {
|
|
237
251
|
if (integration.webhooks) {
|
|
238
252
|
const crowdinCredentials = yield (0, storage_1.getStorage)().getCrowdinCredentials(crowdinId);
|
|
239
253
|
if (crowdinCredentials) {
|
|
@@ -258,9 +272,8 @@ function unregisterAllCrowdinWebhooks({ config, crowdinId, integration, }) {
|
|
|
258
272
|
}
|
|
259
273
|
});
|
|
260
274
|
}
|
|
261
|
-
|
|
262
|
-
function
|
|
263
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
function prepareWebhookData(_a) {
|
|
276
|
+
return __awaiter(this, arguments, void 0, function* ({ config, integration, provider, webhookUrlParam, }) {
|
|
264
277
|
let rootFolder = undefined;
|
|
265
278
|
let syncSettings = null;
|
|
266
279
|
let crowdinClient = null;
|
|
@@ -315,10 +328,9 @@ function prepareWebhookData({ config, integration, provider, webhookUrlParam, })
|
|
|
315
328
|
};
|
|
316
329
|
});
|
|
317
330
|
}
|
|
318
|
-
exports.prepareWebhookData = prepareWebhookData;
|
|
319
331
|
function updateCrowdinFromWebhookRequest(args) {
|
|
320
|
-
var _a, _b;
|
|
321
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
var _a, _b;
|
|
322
334
|
const { integration, webhookData, req } = args;
|
|
323
335
|
let filesToSync = [];
|
|
324
336
|
const { projectId, crowdinClient, preparedIntegrationCredentials, rootFolder, settings, syncSettings } = webhookData;
|
|
@@ -352,9 +364,8 @@ function updateCrowdinFromWebhookRequest(args) {
|
|
|
352
364
|
}
|
|
353
365
|
});
|
|
354
366
|
}
|
|
355
|
-
|
|
356
|
-
function
|
|
357
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
367
|
+
function listenQueueMessage(_a) {
|
|
368
|
+
return __awaiter(this, arguments, void 0, function* ({ config, integration, queueName, queueUrl, }) {
|
|
358
369
|
let reconnectAttempts = 0;
|
|
359
370
|
const connect = () => __awaiter(this, void 0, void 0, function* () {
|
|
360
371
|
try {
|
|
@@ -403,7 +414,6 @@ function listenQueueMessage({ config, integration, queueName, queueUrl, }) {
|
|
|
403
414
|
yield connect();
|
|
404
415
|
});
|
|
405
416
|
}
|
|
406
|
-
exports.listenQueueMessage = listenQueueMessage;
|
|
407
417
|
function consumer({ channel, config, integration, }) {
|
|
408
418
|
let messagesCounter = 0;
|
|
409
419
|
let webhooksInfo = {};
|
|
@@ -417,8 +427,8 @@ function consumer({ channel, config, integration, }) {
|
|
|
417
427
|
messagesToAck = [];
|
|
418
428
|
};
|
|
419
429
|
return function (msg) {
|
|
420
|
-
var _a;
|
|
421
430
|
return __awaiter(this, void 0, void 0, function* () {
|
|
431
|
+
var _a;
|
|
422
432
|
if (!msg) {
|
|
423
433
|
return;
|
|
424
434
|
}
|
|
@@ -497,8 +507,8 @@ function isRetryableError(error) {
|
|
|
497
507
|
}
|
|
498
508
|
return false;
|
|
499
509
|
}
|
|
500
|
-
function processMessages(
|
|
501
|
-
return __awaiter(this,
|
|
510
|
+
function processMessages(_a) {
|
|
511
|
+
return __awaiter(this, arguments, void 0, function* ({ channel, messagesToAck, webhooksData, webhooksInfo, }) {
|
|
502
512
|
try {
|
|
503
513
|
// Prepare all webhook data first
|
|
504
514
|
yield Promise.all(webhooksData);
|
package/out/modules/manifest.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = handle;
|
|
3
4
|
const types_1 = require("../types");
|
|
4
5
|
const util_1 = require("../util");
|
|
5
6
|
const subscription_1 = require("../util/subscription");
|
|
@@ -457,4 +458,3 @@ function handle(config) {
|
|
|
457
458
|
res.send(manifest);
|
|
458
459
|
};
|
|
459
460
|
}
|
|
460
|
-
exports.default = handle;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -27,4 +27,3 @@ function register({ config, app }) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -20,4 +20,3 @@ function register({ config, app }) {
|
|
|
20
20
|
app.use('/resources', (0, ui_module_1.default)({ config, allowUnauthorized }), (0, render_ui_module_1.default)(config.organizationMenu, config));
|
|
21
21
|
// END TEMPORARY CODE
|
|
22
22
|
}
|
|
23
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -20,4 +20,3 @@ function register({ config, app }) {
|
|
|
20
20
|
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized }), (0, render_ui_module_1.default)(config.organizationSettingsMenu, config));
|
|
21
21
|
// END TEMPORARY CODE
|
|
22
22
|
}
|
|
23
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -20,4 +20,3 @@ function register({ config, app }) {
|
|
|
20
20
|
app.use('/resources', (0, ui_module_1.default)({ config, allowUnauthorized }), (0, render_ui_module_1.default)(config.profileResourcesMenu, config));
|
|
21
21
|
// END TEMPORARY CODE
|
|
22
22
|
}
|
|
23
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -20,4 +20,3 @@ function register({ config, app }) {
|
|
|
20
20
|
app.use('/settings', (0, ui_module_1.default)({ config, allowUnauthorized }), (0, render_ui_module_1.default)(config.profileSettingsMenu, config));
|
|
21
21
|
// END TEMPORARY CODE
|
|
22
22
|
}
|
|
23
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -14,4 +14,3 @@ function register({ config, app }) {
|
|
|
14
14
|
const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
|
|
15
15
|
app.use('/project-menu', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectMenu.key }), (0, render_ui_module_1.default)(config.projectMenu, config));
|
|
16
16
|
}
|
|
17
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -14,4 +14,3 @@ function register({ config, app }) {
|
|
|
14
14
|
const allowUnauthorized = !(0, util_1.isAuthorizedConfig)(config);
|
|
15
15
|
app.use('/project-menu-crowdsource', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectMenuCrowdsource.key }), (0, render_ui_module_1.default)(config.projectMenuCrowdsource, config));
|
|
16
16
|
}
|
|
17
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -16,4 +16,3 @@ function register({ config, app }) {
|
|
|
16
16
|
app.use('/logo/reports', (0, util_2.serveLogo)(config, config.projectReports));
|
|
17
17
|
app.use('/reports', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectReports.key }), (0, render_ui_module_1.default)(config.projectReports, config));
|
|
18
18
|
}
|
|
19
|
-
exports.register = register;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
8
8
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
9
9
|
const util_1 = require("../../util");
|
|
@@ -16,4 +16,3 @@ function register({ config, app }) {
|
|
|
16
16
|
app.use('/logo/tools', (0, util_2.serveLogo)(config, config.projectTools));
|
|
17
17
|
app.use('/tools', (0, ui_module_1.default)({ config, allowUnauthorized, moduleType: config.projectTools.key }), (0, render_ui_module_1.default)(config.projectTools, config));
|
|
18
18
|
}
|
|
19
|
-
exports.register = register;
|
package/out/modules/status.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Request, Response } from 'express';
|
|
3
2
|
import { Config, UnauthorizedConfig } from '../types';
|
|
4
|
-
export default function handle(config: Config | UnauthorizedConfig): (req: Request
|
|
3
|
+
export default function handle(config: Config | UnauthorizedConfig): (req: Request | import("../types").CrowdinClientRequest, res: Response, next: Function) => void;
|
package/out/modules/status.js
CHANGED
|
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.default = handle;
|
|
15
16
|
const util_1 = require("../util");
|
|
16
17
|
const logger_1 = require("../util/logger");
|
|
17
18
|
const storage_1 = require("../storage");
|
|
@@ -80,4 +81,3 @@ function handle(config) {
|
|
|
80
81
|
}
|
|
81
82
|
}));
|
|
82
83
|
}
|
|
83
|
-
exports.default = handle;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Request, Response } from 'express';
|
|
3
|
-
export default function handle(): (req: Request
|
|
2
|
+
export default function handle(): (req: Request | import("../types").CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.default = handle;
|
|
12
13
|
const util_1 = require("../util");
|
|
13
14
|
const subscription_1 = require("../util/subscription");
|
|
14
15
|
const logger_1 = require("../util/logger");
|
|
@@ -20,4 +21,3 @@ function handle() {
|
|
|
20
21
|
res.status(204).end();
|
|
21
22
|
}));
|
|
22
23
|
}
|
|
23
|
-
exports.default = handle;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Request, Response } from 'express';
|
|
3
2
|
import { Config } from '../types';
|
|
4
|
-
export default function handle(config: Config): (req: Request
|
|
3
|
+
export default function handle(config: Config): (req: Request | import("../types").CrowdinClientRequest, res: Response, next: Function) => void;
|
package/out/modules/uninstall.js
CHANGED
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.default = handle;
|
|
12
13
|
const storage_1 = require("../storage");
|
|
13
14
|
const util_1 = require("../util");
|
|
14
15
|
const connection_1 = require("../util/connection");
|
|
@@ -59,4 +60,3 @@ function handle(config) {
|
|
|
59
60
|
res.status(204).end();
|
|
60
61
|
}));
|
|
61
62
|
}
|
|
62
|
-
exports.default = handle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Response } from 'express';
|
|
3
2
|
import { Config, CrowdinClientRequest } from '../../../types';
|
|
4
3
|
import { Webhook } from '../types';
|
|
5
|
-
export declare function webhookHandler(config: Config, webhooks: Webhook[]): (req: import("express").Request
|
|
4
|
+
export declare function webhookHandler(config: Config, webhooks: Webhook[]): (req: import("express").Request | CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,7 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
exports.webhookHandler =
|
|
45
|
+
exports.webhookHandler = webhookHandler;
|
|
36
46
|
const crypto = __importStar(require("node:crypto"));
|
|
37
47
|
const storage = __importStar(require("../../../storage"));
|
|
38
48
|
const util_1 = require("../../../util");
|
|
@@ -94,4 +104,3 @@ function webhookHandler(config, webhooks) {
|
|
|
94
104
|
}
|
|
95
105
|
}));
|
|
96
106
|
}
|
|
97
|
-
exports.webhookHandler = webhookHandler;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const json_response_1 = __importDefault(require("../../middlewares/json-response"));
|
|
8
8
|
const webhook_handler_1 = require("./handlers/webhook-handler");
|
|
9
9
|
function register({ config, app }) {
|
|
@@ -15,4 +15,3 @@ function register({ config, app }) {
|
|
|
15
15
|
app.post('/webhooks', json_response_1.default, (0, webhook_handler_1.webhookHandler)(config, webhooks));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
exports.register = register;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Response } from 'express';
|
|
3
2
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
3
|
import { WorkflowStepTypeModule } from '../types';
|
|
5
|
-
export default function handle(workflowStep: WorkflowStepTypeModule): (req: import("express").Request
|
|
4
|
+
export default function handle(workflowStep: WorkflowStepTypeModule): (req: import("express").Request | CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,6 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.default = handle;
|
|
35
46
|
const util_1 = require("../../../util");
|
|
36
47
|
const storage = __importStar(require("../../../storage"));
|
|
37
48
|
const logger_1 = require("../../../util/logger");
|
|
@@ -67,4 +78,3 @@ function handle(workflowStep) {
|
|
|
67
78
|
}
|
|
68
79
|
}));
|
|
69
80
|
}
|
|
70
|
-
exports.default = handle;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
/// <reference types="qs" />
|
|
2
1
|
import { Response } from 'express';
|
|
3
2
|
import { CrowdinClientRequest } from '../../../types';
|
|
4
3
|
import { WorkflowStepTypeModule } from '../types';
|
|
5
|
-
export default function handle(workflowStep: WorkflowStepTypeModule): (req: import("express").Request
|
|
4
|
+
export default function handle(workflowStep: WorkflowStepTypeModule): (req: import("express").Request | CrowdinClientRequest, res: Response, next: Function) => void;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
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
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -32,6 +42,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
32
42
|
});
|
|
33
43
|
};
|
|
34
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.default = handle;
|
|
35
46
|
const util_1 = require("../../../util");
|
|
36
47
|
const storage = __importStar(require("../../../storage"));
|
|
37
48
|
const logger_1 = require("../../../util/logger");
|
|
@@ -77,4 +88,3 @@ function handle(workflowStep) {
|
|
|
77
88
|
}
|
|
78
89
|
}));
|
|
79
90
|
}
|
|
80
|
-
exports.default = handle;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.register =
|
|
6
|
+
exports.register = register;
|
|
7
7
|
const ui_module_1 = __importDefault(require("../../middlewares/ui-module"));
|
|
8
8
|
const render_ui_module_1 = __importDefault(require("../../middlewares/render-ui-module"));
|
|
9
9
|
const util_1 = require("./util");
|
|
@@ -49,4 +49,3 @@ function register({ config, app }) {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
exports.register = register;
|
|
@@ -6,4 +6,4 @@ var EditorMode;
|
|
|
6
6
|
EditorMode["comfortable"] = "comfortable";
|
|
7
7
|
EditorMode["sideBySide"] = "side-by-side";
|
|
8
8
|
EditorMode["multilingual"] = "multilingual";
|
|
9
|
-
})(EditorMode
|
|
9
|
+
})(EditorMode || (exports.EditorMode = EditorMode = {}));
|