@mablhq/mabl-cli 2.50.0 → 2.51.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/README.md +0 -13
- package/api/mablApiClient.js +12 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +1 -1
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +2 -12
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +1 -1
- package/cli.js +1 -0
- package/commands/databases/databases.js +5 -0
- package/commands/databases/databases_cmds/list.js +64 -0
- package/commands/environments/environments_cmds/urls_cmds/add.js +5 -5
- package/commands/tests/tests_cmds/export.js +3 -3
- package/commands/tests/tests_cmds/import_cmds/import_playwright.js +2 -2
- package/commands/tests/tests_cmds/import_cmds/import_selenium.js +2 -2
- package/commands/tests/tests_cmds/run.js +1 -3
- package/core/execution/ApiTestUtils.js +155 -20
- package/core/util.js +3 -0
- package/execution/index.js +3 -3
- package/mablApi/index.js +1 -1
- package/mablscript/diffing/diffingUtil.js +7 -7
- package/package.json +3 -3
- package/upload/index.js +1 -1
|
@@ -43,15 +43,15 @@ function convertOperationValue(op) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function parseFlowIntoStepList(flow) {
|
|
46
|
-
if (flow.flow_type === mablApi_1.
|
|
46
|
+
if (flow.flow_type === mablApi_1.FlowTypeEnum.Mobile) {
|
|
47
47
|
return (0, importer_1.interpretStepsFromObjectsInFlow)(flow, true);
|
|
48
48
|
}
|
|
49
49
|
return (0, importer_1.parseMablScriptIntoSteps)(flow);
|
|
50
50
|
}
|
|
51
51
|
function convertFlowToStepList(flow, flowConfig) {
|
|
52
52
|
if (!flow.reusable &&
|
|
53
|
-
(flow.flow_type === mablApi_1.
|
|
54
|
-
flow.flow_type === mablApi_1.
|
|
53
|
+
(flow.flow_type === mablApi_1.FlowTypeEnum.Mablscript ||
|
|
54
|
+
flow.flow_type === mablApi_1.FlowTypeEnum.Mobile)) {
|
|
55
55
|
return parseFlowIntoStepList(flow);
|
|
56
56
|
}
|
|
57
57
|
const evaluateFlowStep = new EvaluateFlowStep_1.EvaluateFlowStep(EvaluateFlowStep_1.EvaluateFlowStep.mablScriptStepNames[0], [{ invariant_id: flow === null || flow === void 0 ? void 0 : flow.invariant_id }, flowConfig], []);
|
|
@@ -61,7 +61,7 @@ function convertFlowToStepList(flow, flowConfig) {
|
|
|
61
61
|
return [evaluateFlowStep];
|
|
62
62
|
}
|
|
63
63
|
exports.convertFlowToStepList = convertFlowToStepList;
|
|
64
|
-
function convertStepListToFlow(steps, flowType = mablApi_1.
|
|
64
|
+
function convertStepListToFlow(steps, flowType = mablApi_1.FlowTypeEnum.Mablscript) {
|
|
65
65
|
if (steps.length > 1 && steps.some((step) => (0, EvaluateFlowStep_1.isEvaluateFlowStep)(step))) {
|
|
66
66
|
throw new Error('EvaluateFlow step(s) cannot be combined with other steps in a flow');
|
|
67
67
|
}
|
|
@@ -84,10 +84,10 @@ function convertStepListToFlow(steps, flowType = mablApi_1.Flow.FlowTypeEnum.Mab
|
|
|
84
84
|
return annotations;
|
|
85
85
|
}, {});
|
|
86
86
|
const flow = {
|
|
87
|
-
json_steps: flowType === mablApi_1.
|
|
87
|
+
json_steps: flowType === mablApi_1.FlowTypeEnum.Mobile
|
|
88
88
|
? { steps: steps.map((step) => step.getFormattedStep(true)) }
|
|
89
89
|
: undefined,
|
|
90
|
-
script: flowType === mablApi_1.
|
|
90
|
+
script: flowType === mablApi_1.FlowTypeEnum.Mablscript
|
|
91
91
|
? addTrailingNewline((0, importer_1.mablscriptTheLoadedSteps)(steps))
|
|
92
92
|
: undefined,
|
|
93
93
|
script_description: steps.map(getStepDescription).join('\n'),
|
|
@@ -107,7 +107,7 @@ function flattenTestFlowsIntoSteps(flows, flowConfigs) {
|
|
|
107
107
|
return flows.flatMap((flow, index) => convertFlowToStepList(flow, flowConfigs === null || flowConfigs === void 0 ? void 0 : flowConfigs[index]));
|
|
108
108
|
}
|
|
109
109
|
exports.flattenTestFlowsIntoSteps = flattenTestFlowsIntoSteps;
|
|
110
|
-
function constructTestFlowsFromSteps(steps, flowType = mablApi_1.
|
|
110
|
+
function constructTestFlowsFromSteps(steps, flowType = mablApi_1.FlowTypeEnum.Mablscript) {
|
|
111
111
|
const flowSteps = [];
|
|
112
112
|
let chunk = [];
|
|
113
113
|
for (const step of steps) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.51.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"open": "6.4.0",
|
|
77
77
|
"ora": "4.0.4",
|
|
78
78
|
"pixelmatch": "5.3.0",
|
|
79
|
-
"playwright": "1.
|
|
80
|
-
"playwright-core": "1.
|
|
79
|
+
"playwright": "1.48.1",
|
|
80
|
+
"playwright-core": "1.48.1",
|
|
81
81
|
"pluralize": "8.0.0",
|
|
82
82
|
"pngjs": "6.0.0",
|
|
83
83
|
"portfinder": "1.0.28",
|