@mablhq/mabl-cli 2.37.7 → 2.41.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/api/mablApiClient.js +8 -0
- package/browserEngines/chromiumBrowserEngine.js +4 -0
- package/cli.js +1 -1
- package/commands/constants.js +3 -3
- package/commands/environments/environments_cmds/build-files.js +5 -0
- package/commands/environments/environments_cmds/build-files_cmds/add.js +73 -0
- package/commands/environments/environments_cmds/build-files_cmds/list.js +54 -0
- package/commands/environments/environments_cmds/build-files_cmds/update.js +71 -0
- package/commands/mobile-build-files/mobile-build-files.js +5 -0
- package/commands/{app-files/app-files_cmds → mobile-build-files/mobile-build-files_cmds}/delete.js +4 -4
- package/commands/{app-files/app-files_cmds → mobile-build-files/mobile-build-files_cmds}/download.js +5 -5
- package/commands/{app-files/app-files_cmds → mobile-build-files/mobile-build-files_cmds}/list.js +2 -2
- package/commands/{app-files/app-files_cmds/create.js → mobile-build-files/mobile-build-files_cmds/upload.js} +12 -10
- package/commands/tests/tests_cmds/run-mobile.js +12 -11
- package/core/execution/ApiTestUtils.js +8 -3
- package/core/messaging/messaging.js +14 -2
- package/execution/index.js +2 -2
- package/index.d.ts +35 -2
- package/mablApi/index.js +1 -1
- package/mablscript/steps/IfConditionStep.js +26 -7
- package/package.json +3 -3
- package/upload/index.js +1 -1
- package/util/analytics-events.js +13 -0
- package/util/analytics.js +34 -4
- package/commands/app-files/app-files.js +0 -5
|
@@ -67,6 +67,13 @@ class IfConditionStep extends MablStep_1.MablStep {
|
|
|
67
67
|
details.conditionOptions = this.conditionAction.hasOptionsAtInstantiation
|
|
68
68
|
? optionalConditionOptions
|
|
69
69
|
: undefined;
|
|
70
|
+
if (this.conditionAction.conditionDescriptor.conditionType ===
|
|
71
|
+
ConditionDescriptor_1.ConditionType.AIPrompt) {
|
|
72
|
+
details.userPrompt =
|
|
73
|
+
this.conditionAction.conditionDescriptor.userPrompt;
|
|
74
|
+
details.metaPrompt =
|
|
75
|
+
this.conditionAction.conditionDescriptor.metaPrompt;
|
|
76
|
+
}
|
|
70
77
|
}
|
|
71
78
|
if (this.primaryAction instanceof GetVariableValue_1.GetVariableValue) {
|
|
72
79
|
details.variableName = this.substituteMablscriptVariable(this.primaryAction.variable);
|
|
@@ -125,16 +132,28 @@ class IfConditionStep extends MablStep_1.MablStep {
|
|
|
125
132
|
}
|
|
126
133
|
if (stepArgs.condition) {
|
|
127
134
|
const conditionType = ConditionDescriptor_1.AssertionStepNameToField[stepArgs.condition];
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
if (conditionType === 'ai_prompt') {
|
|
136
|
+
actions.push(new ConditionAction_1.ConditionAction(this.getConditionActionNameForConditionType(conditionType), [stepArgs.userPrompt, stepArgs.metaPrompt]));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
actions.push(new ConditionAction_1.ConditionAction(this.getConditionActionNameForConditionType(conditionType), [
|
|
140
|
+
ConditionDescriptor_1.AssertionStepNameToField[stepArgs.condition],
|
|
141
|
+
stepArgs.conditionValue,
|
|
142
|
+
stepArgs.conditionOptions,
|
|
143
|
+
]));
|
|
144
|
+
}
|
|
135
145
|
}
|
|
136
146
|
return actions;
|
|
137
147
|
}
|
|
148
|
+
static getConditionActionNameForConditionType(conditionType) {
|
|
149
|
+
if (conditionType === 'present' || conditionType === 'not_present') {
|
|
150
|
+
return 'evaluate_presence';
|
|
151
|
+
}
|
|
152
|
+
else if (conditionType === 'ai_prompt') {
|
|
153
|
+
return 'evaluate_ai_prompt';
|
|
154
|
+
}
|
|
155
|
+
return 'evaluate_condition';
|
|
156
|
+
}
|
|
138
157
|
static fromYaml(_stepName, stepArgs) {
|
|
139
158
|
const actions = IfConditionStep.getActionsFromYamlForCondition(stepArgs);
|
|
140
159
|
const step = new IfConditionStep('conditional_if', [], actions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"open": "6.4.0",
|
|
78
78
|
"ora": "4.0.4",
|
|
79
79
|
"pixelmatch": "5.3.0",
|
|
80
|
-
"playwright": "1.
|
|
81
|
-
"playwright-core": "1.
|
|
80
|
+
"playwright": "1.46.1",
|
|
81
|
+
"playwright-core": "1.46.1",
|
|
82
82
|
"pluralize": "8.0.0",
|
|
83
83
|
"pngjs": "6.0.0",
|
|
84
84
|
"portfinder": "1.0.28",
|