@mablhq/mabl-cli 2.57.0 → 2.57.4

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.
@@ -612,6 +612,14 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
612
612
  }
613
613
  }
614
614
  async evaluateAiAssertion(workspaceId, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables) {
615
+ const requestUrl = `${this.baseApiUrl}/analysis/${workspaceId}/assertion/evaluate`;
616
+ return this.evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables);
617
+ }
618
+ async externalToolsAiAssertion(workspaceId, testRunId, screenshot, userPrompt, criteria, test, variables) {
619
+ const requestUrl = `${this.baseApiUrl}/externalTools/${workspaceId}/assertion/evaluate`;
620
+ return this.evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, undefined, criteria, test, variables);
621
+ }
622
+ async evaluateAiAssertionInternal(requestUrl, testRunId, screenshot, userPrompt, metaPrompt, criteria, test, variables) {
615
623
  try {
616
624
  const body = {
617
625
  test_run_id: testRunId,
@@ -627,10 +635,10 @@ class MablApiClient extends basicApiClient_1.BasicApiClient {
627
635
  meta_prompt: metaPrompt,
628
636
  };
629
637
  }
630
- return await this.makePostRequestWithRetries(`${this.baseApiUrl}/analysis/${workspaceId}/assertion/evaluate`, body, GENAI_RETRY_OPTIONS);
638
+ return await this.makePostRequestWithRetries(requestUrl, body, GENAI_RETRY_OPTIONS);
631
639
  }
632
640
  catch (error) {
633
- throw toApiError('Failed to evaluate the AI prompt assertion', error);
641
+ throw toApiError('Failed to evaluate the AI assertion', error);
634
642
  }
635
643
  }
636
644
  async createBranch(workspaceId, branchName) {
@@ -34,7 +34,6 @@ const mobileEmulationUtil_1 = require("../commands/tests/mobileEmulationUtil");
34
34
  const resourceUtil_1 = require("../util/resourceUtil");
35
35
  const browserEngine_1 = require("./browserEngine");
36
36
  const cliConfigProvider_1 = require("../providers/cliConfigProvider");
37
- const configKeys_1 = require("../commands/config/config_cmds/configKeys");
38
37
  const loggingProvider_1 = require("../providers/logging/loggingProvider");
39
38
  const chromeFinder = require('chrome-launcher/dist/chrome-finder');
40
39
  const launchUtils = require('chrome-launcher/dist/utils');
@@ -151,14 +150,14 @@ class ChromiumBrowserEngine {
151
150
  return preferences;
152
151
  }
153
152
  async findBrowserExecutable() {
154
- const existingLocation = await cliConfigProvider_1.CliConfigProvider.getConfigProperty(configKeys_1.configKeys.browserPath);
153
+ const existingLocation = await cliConfigProvider_1.CliConfigProvider.getConfigProperty(cliConfigProvider_1.BROWSER_CONFIG_KEY);
155
154
  if (typeof existingLocation === 'string' &&
156
155
  existingLocation &&
157
156
  fs.existsSync(existingLocation)) {
158
157
  return existingLocation;
159
158
  }
160
159
  const chromePath = this.searchForChrome();
161
- await cliConfigProvider_1.CliConfigProvider.setConfigProperty(configKeys_1.configKeys.browserPath, chromePath);
160
+ await cliConfigProvider_1.CliConfigProvider.setConfigProperty(cliConfigProvider_1.BROWSER_CONFIG_KEY, chromePath);
162
161
  return chromePath;
163
162
  }
164
163
  searchForChrome() {