@mablhq/mabl-cli 2.75.1 → 2.75.2
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/mablscript/MablStep.js
CHANGED
|
@@ -74,7 +74,7 @@ class MablStep extends MablAction_1.MablAction {
|
|
|
74
74
|
}
|
|
75
75
|
return `"${argument}"`;
|
|
76
76
|
}
|
|
77
|
-
toStepDescriptor(
|
|
77
|
+
toStepDescriptor() {
|
|
78
78
|
const formatted = {
|
|
79
79
|
names: this.actions.map((action) => action.getActionName()),
|
|
80
80
|
};
|
|
@@ -97,11 +97,11 @@ class MablStep extends MablAction_1.MablAction {
|
|
|
97
97
|
}
|
|
98
98
|
return result;
|
|
99
99
|
}
|
|
100
|
-
getFormattedStep(
|
|
100
|
+
getFormattedStep() {
|
|
101
101
|
const formatted = {};
|
|
102
102
|
formatted[this.getStepName()] =
|
|
103
103
|
this.annotationsAsYml();
|
|
104
|
-
const { actionCode, ...stepDescriptor } = this.toStepDescriptor(
|
|
104
|
+
const { actionCode, ...stepDescriptor } = this.toStepDescriptor();
|
|
105
105
|
Object.assign(formatted[this.getStepName()], stepDescriptor);
|
|
106
106
|
if (this.stepId()) {
|
|
107
107
|
formatted[this.getStepName()].id = this.stepId();
|
package/mablscript/MablStepV2.js
CHANGED
|
@@ -33,7 +33,7 @@ class MablStepV2 extends MablStep_1.MablStep {
|
|
|
33
33
|
toStepDescriptor() {
|
|
34
34
|
return this.descriptor;
|
|
35
35
|
}
|
|
36
|
-
getFormattedStep(
|
|
36
|
+
getFormattedStep() {
|
|
37
37
|
const { descriptorToActionMap, ...stepDescriptor } = this.toStepDescriptor();
|
|
38
38
|
const result = {
|
|
39
39
|
description: this.getDescription(),
|
|
@@ -102,7 +102,7 @@ function convertStepListToFlow(steps, flowType = mablApi_1.FlowTypeEnum.Mablscri
|
|
|
102
102
|
};
|
|
103
103
|
if (useJsonSteps) {
|
|
104
104
|
flow.json_steps = {
|
|
105
|
-
steps: steps.map((step) => step.getFormattedStep(
|
|
105
|
+
steps: steps.map((step) => step.getFormattedStep()),
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
else {
|
package/mablscript/importer.js
CHANGED
|
@@ -245,8 +245,8 @@ function loadMablScriptIntoSteps(parsedMablscript) {
|
|
|
245
245
|
return step;
|
|
246
246
|
});
|
|
247
247
|
}
|
|
248
|
-
function yamlifyTheLoadedSteps(translatedSteps
|
|
249
|
-
const steps = translatedSteps.map((step) => step.getFormattedStep(
|
|
248
|
+
function yamlifyTheLoadedSteps(translatedSteps) {
|
|
249
|
+
const steps = translatedSteps.map((step) => step.getFormattedStep());
|
|
250
250
|
return (0, js_yaml_1.dump)(steps);
|
|
251
251
|
}
|
|
252
252
|
const yamlMablscriptToObjectsStepV1Map = {};
|
|
@@ -507,7 +507,7 @@ function parseMablScriptIntoV2Step(script) {
|
|
|
507
507
|
const parsedMablscriptStep = parseMablScriptIntoSteps({
|
|
508
508
|
script,
|
|
509
509
|
});
|
|
510
|
-
const stepAsObject = parsedMablscriptStep[0].getFormattedStep(
|
|
510
|
+
const stepAsObject = parsedMablscriptStep[0].getFormattedStep();
|
|
511
511
|
let [parsedStep] = interpretStepsFromObjects([stepAsObject], true);
|
|
512
512
|
if (parsedStep.getStepName() === 'UnimplementedStep') {
|
|
513
513
|
[parsedStep] = interpretStepsFromObjects([stepAsObject], false);
|
|
@@ -17,9 +17,7 @@ class StepGroupStep extends MablStepV2_1.MablStepV2 {
|
|
|
17
17
|
return StepGroupStep.stepName;
|
|
18
18
|
}
|
|
19
19
|
toStepDescriptor() {
|
|
20
|
-
const steps = this.steps.map((step) => (
|
|
21
|
-
[step.getStepName()]: step.toStepDescriptor(true),
|
|
22
|
-
}));
|
|
20
|
+
const steps = this.steps.map((step) => step.getFormattedStep());
|
|
23
21
|
return {
|
|
24
22
|
steps,
|
|
25
23
|
intent: this.intent,
|