@crowdin/app-project-module 0.71.2 → 0.72.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.
package/out/modules/manifest.js
CHANGED
|
@@ -275,7 +275,7 @@ function handle(config) {
|
|
|
275
275
|
workflowStep.key = config.identifier + '-' + (0, util_3.getWorkflowStepKey)(workflowStep);
|
|
276
276
|
}
|
|
277
277
|
const uiModule = ((_a = workflowStep === null || workflowStep === void 0 ? void 0 : workflowStep.settingsUiModule) === null || _a === void 0 ? void 0 : _a.formSchema) || ((_b = workflowStep === null || workflowStep === void 0 ? void 0 : workflowStep.settingsUiModule) === null || _b === void 0 ? void 0 : _b.fileName);
|
|
278
|
-
modules['workflow-step-type'].push(Object.assign({ key: workflowStep.key, name: workflowStep.name || config.name, description: workflowStep.description || config.description, boundaries: workflowStep.boundaries, updateSettingsUrl: (0, util_3.getWorkflowStepUrl)('/settings', workflowStep), deleteSettingsUrl: (0, util_3.getWorkflowStepUrl)('/delete', workflowStep) }, (uiModule ? { url: (0, util_3.getWorkflowStepUrl)('/workflow-step', workflowStep) } : {})));
|
|
278
|
+
modules['workflow-step-type'].push(Object.assign(Object.assign(Object.assign({ key: workflowStep.key, name: workflowStep.name || config.name, description: workflowStep.description || config.description, boundaries: workflowStep.boundaries }, (workflowStep.editorMode ? { editorMode: workflowStep.editorMode } : {})), { updateSettingsUrl: (0, util_3.getWorkflowStepUrl)('/settings', workflowStep), deleteSettingsUrl: (0, util_3.getWorkflowStepUrl)('/delete', workflowStep) }), (uiModule ? { url: (0, util_3.getWorkflowStepUrl)('/workflow-step', workflowStep) } : {})));
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
const events = {
|
|
@@ -68,9 +68,7 @@ function webhookHandler(config, webhooks) {
|
|
|
68
68
|
const json = JSON.parse(req.body.toString());
|
|
69
69
|
for (const webhook of webhooks) {
|
|
70
70
|
if (webhook.key === moduleKey) {
|
|
71
|
-
|
|
72
|
-
yield webhook.callback({ credentials, event, client });
|
|
73
|
-
}
|
|
71
|
+
yield webhook.callback({ credentials, events: json.events, client });
|
|
74
72
|
}
|
|
75
73
|
}
|
|
76
74
|
}));
|
|
@@ -26,6 +26,10 @@ export interface WorkflowStepTypeModule extends ModuleKey {
|
|
|
26
26
|
* settings UI module
|
|
27
27
|
*/
|
|
28
28
|
settingsUiModule?: UiModule;
|
|
29
|
+
/**
|
|
30
|
+
* Editor mode that will be used in the editor for this module
|
|
31
|
+
*/
|
|
32
|
+
editorMode?: EditorMode;
|
|
29
33
|
/**
|
|
30
34
|
* input and output boundaries for the module
|
|
31
35
|
*/
|
|
@@ -54,4 +58,9 @@ export interface WorkflowStepTypeModule extends ModuleKey {
|
|
|
54
58
|
client: Crowdin;
|
|
55
59
|
}) => Promise<void>;
|
|
56
60
|
}
|
|
61
|
+
export declare enum EditorMode {
|
|
62
|
+
comfortable = "comfortable",
|
|
63
|
+
sideBySide = "side-by-side",
|
|
64
|
+
multilingual = "multilingual"
|
|
65
|
+
}
|
|
57
66
|
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditorMode = void 0;
|
|
4
|
+
var EditorMode;
|
|
5
|
+
(function (EditorMode) {
|
|
6
|
+
EditorMode["comfortable"] = "comfortable";
|
|
7
|
+
EditorMode["sideBySide"] = "side-by-side";
|
|
8
|
+
EditorMode["multilingual"] = "multilingual";
|
|
9
|
+
})(EditorMode = exports.EditorMode || (exports.EditorMode = {}));
|
package/package.json
CHANGED