@mablhq/mabl-cli 1.13.21 → 1.13.28
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/basicApiClient.js +6 -6
- package/api/mablApiClientFactory.js +0 -8
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +3 -0
- package/browserLauncher/puppeteerBrowserLauncher/puppeteerBrowser.js +10 -0
- package/commands/applications/applications_cmds/list.js +5 -2
- package/commands/branches/branches_cmds/list.js +5 -2
- package/commands/config/config_cmds/get.js +5 -2
- package/commands/config/config_cmds/list.js +5 -2
- package/commands/credentials/credentials_cmds/list.js +5 -2
- package/commands/deploy/deploy_cmds/executionResultPresenter.js +5 -2
- package/commands/deploy/deploy_cmds/list.js +5 -2
- package/commands/environments/environments_cmds/list.js +5 -2
- package/commands/flows/flows_cmds/list.js +5 -2
- package/commands/plans/plans_cmds/list.js +5 -2
- package/commands/tests/testsUtil.js +3 -20
- package/commands/tests/tests_cmds/list.js +5 -2
- package/commands/tests/tests_cmds/trainer_cmds/trainerUtil.js +2 -2
- package/commands/workspaces/workspace_cmds/list.js +5 -2
- package/execution/index.js +1 -1
- package/execution/index.js.LICENSE.txt +0 -6
- package/mablscriptFind/index.js +1 -1
- package/package.json +3 -3
- package/resources/mablFind.js +1 -1
package/api/basicApiClient.js
CHANGED
|
@@ -32,11 +32,11 @@ const logUtils_1 = require("../util/logUtils");
|
|
|
32
32
|
const asyncUtil_1 = require("../util/asyncUtil");
|
|
33
33
|
const MABL_ENTITY_VERSION_HEADER = 'x-mabl-entity-version';
|
|
34
34
|
const DEFAULT_RETRYABLE_REQUEST_TIMEOUT_MILLISECONDS = 60000;
|
|
35
|
-
const
|
|
36
|
-
const DEFAULT_RETRIES = 5;
|
|
35
|
+
const DEFAULT_RETRIES = 10;
|
|
37
36
|
const DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS = DEFAULT_RETRYABLE_REQUEST_TIMEOUT_MILLISECONDS * DEFAULT_RETRIES;
|
|
38
|
-
const
|
|
39
|
-
const
|
|
37
|
+
const DEFAULT_NONRETRYABLE_REQUEST_TIMEOUT_MILLISECONDS = DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS;
|
|
38
|
+
const DEFAULT_MIN_RETRY_INTERVAL_MILLISECONDS = 1000;
|
|
39
|
+
const DEFAULT_MAX_RETRY_INTERVAL_MILLISECONDS = 10000;
|
|
40
40
|
var AuthType;
|
|
41
41
|
(function (AuthType) {
|
|
42
42
|
AuthType[AuthType["Bearer"] = 0] = "Bearer";
|
|
@@ -162,8 +162,8 @@ class BasicApiClient {
|
|
|
162
162
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
163
163
|
const retryOptions = {
|
|
164
164
|
retries: (_b = (_a = this.retryConfig) === null || _a === void 0 ? void 0 : _a.retryCount) !== null && _b !== void 0 ? _b : DEFAULT_RETRIES,
|
|
165
|
-
minTimeout: (_d = (_c = this.retryConfig) === null || _c === void 0 ? void 0 : _c.
|
|
166
|
-
maxTimeout: (_f = (_e = this.retryConfig) === null || _e === void 0 ? void 0 : _e.
|
|
165
|
+
minTimeout: (_d = (_c = this.retryConfig) === null || _c === void 0 ? void 0 : _c.minRetryIntervalMillis) !== null && _d !== void 0 ? _d : DEFAULT_MIN_RETRY_INTERVAL_MILLISECONDS,
|
|
166
|
+
maxTimeout: (_f = (_e = this.retryConfig) === null || _e === void 0 ? void 0 : _e.maxRetryIntervalMillis) !== null && _f !== void 0 ? _f : DEFAULT_MAX_RETRY_INTERVAL_MILLISECONDS,
|
|
167
167
|
maxRetryTime: (_h = (_g = this.retryConfig) === null || _g === void 0 ? void 0 : _g.maxRetryTimeMillis) !== null && _h !== void 0 ? _h : DEFAULT_MAX_TOTAL_RETRY_TIME_MILLISECONDS,
|
|
168
168
|
onRetry: (error) => {
|
|
169
169
|
this.debugLogger(`Retrying failed API request "${description}"`, error);
|
|
@@ -9,11 +9,6 @@ const authenticationProvider_1 = require("../providers/authenticationProvider");
|
|
|
9
9
|
const cliConfigProvider_1 = require("../providers/cliConfigProvider");
|
|
10
10
|
const basicApiClient_1 = require("./basicApiClient");
|
|
11
11
|
const chalk_1 = __importDefault(require("chalk"));
|
|
12
|
-
const RETRY_CONFIG = {
|
|
13
|
-
retryCount: 3,
|
|
14
|
-
minTimeoutMillis: 1000,
|
|
15
|
-
maxTimeoutMillis: 2000,
|
|
16
|
-
};
|
|
17
12
|
class MablApiClientFactory {
|
|
18
13
|
static createApiClientFromOptionalApiKey(apiKey) {
|
|
19
14
|
if (apiKey) {
|
|
@@ -44,7 +39,6 @@ class MablApiClientFactory {
|
|
|
44
39
|
token: opts.authToken,
|
|
45
40
|
proxyUrl: httpConfig.proxyHost,
|
|
46
41
|
sslVerify: httpConfig.sslVerify,
|
|
47
|
-
retryConfig: RETRY_CONFIG,
|
|
48
42
|
userAgentOverride: opts.userAgentOverride,
|
|
49
43
|
});
|
|
50
44
|
}
|
|
@@ -56,7 +50,6 @@ class MablApiClientFactory {
|
|
|
56
50
|
token: authConfig.accessToken,
|
|
57
51
|
proxyUrl: httpConfig.proxyHost,
|
|
58
52
|
sslVerify: httpConfig.sslVerify,
|
|
59
|
-
retryConfig: RETRY_CONFIG,
|
|
60
53
|
});
|
|
61
54
|
}
|
|
62
55
|
throw new Error('Please supply an API key or authenticate the mabl CLI tool');
|
|
@@ -74,7 +67,6 @@ class MablApiClientFactory {
|
|
|
74
67
|
token: accessToken,
|
|
75
68
|
proxyUrl: httpConfig.proxyHost,
|
|
76
69
|
sslVerify: httpConfig.sslVerify,
|
|
77
|
-
retryConfig: RETRY_CONFIG,
|
|
78
70
|
});
|
|
79
71
|
}
|
|
80
72
|
static throwUserAuthTypeError() {
|
|
@@ -53,6 +53,16 @@ class PuppeteerBrowser extends events_1.default {
|
|
|
53
53
|
this.browser.disconnect();
|
|
54
54
|
return Promise.resolve();
|
|
55
55
|
}
|
|
56
|
+
reconnect() {
|
|
57
|
+
const webSocketEndpoint = this.wsEndpoint();
|
|
58
|
+
if (!webSocketEndpoint) {
|
|
59
|
+
throw new Error(`No browser websocket endpoint configured or supplied for connection`);
|
|
60
|
+
}
|
|
61
|
+
return browserLauncher_1.BrowserLauncherFactory.createRunner(this.getRunnerType()).connect({
|
|
62
|
+
defaultDeviceDescriptor: undefined,
|
|
63
|
+
browserWSEndpoint: webSocketEndpoint,
|
|
64
|
+
}, this.getDownloadDirectory());
|
|
65
|
+
}
|
|
56
66
|
async newPage() {
|
|
57
67
|
return this.getOrCreatePage(await this.browser.newPage());
|
|
58
68
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
7
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
5
8
|
const util_1 = require("../../commandUtil/util");
|
|
6
|
-
const
|
|
9
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
7
10
|
const moment = require("moment");
|
|
8
11
|
const list_1 = require("../../commandUtil/list");
|
|
9
12
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
@@ -30,7 +33,7 @@ function printApplications(applications, output) {
|
|
|
30
33
|
loggingProvider_1.logger.info(js_yaml_1.dump(applications));
|
|
31
34
|
break;
|
|
32
35
|
default:
|
|
33
|
-
const table = new
|
|
36
|
+
const table = new cli_table3_1.default({
|
|
34
37
|
head: ['ID', 'Name', 'Created time'],
|
|
35
38
|
wordWrap: true,
|
|
36
39
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
|
-
const
|
|
7
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
5
8
|
const moment = require("moment");
|
|
6
9
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
7
10
|
const util_1 = require("../../commandUtil/util");
|
|
@@ -55,7 +58,7 @@ function printBranches(branches, output) {
|
|
|
55
58
|
loggingProvider_1.logger.info(js_yaml_1.dump(branches));
|
|
56
59
|
break;
|
|
57
60
|
default:
|
|
58
|
-
const table = new
|
|
61
|
+
const table = new cli_table3_1.default({
|
|
59
62
|
head: ['ID', 'Name', 'Status', 'Created'],
|
|
60
63
|
});
|
|
61
64
|
branches.forEach((branch) => {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const cliConfigProvider_1 = require("../../../providers/cliConfigProvider");
|
|
4
7
|
const set_1 = require("./set");
|
|
5
|
-
const
|
|
8
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
6
9
|
const list_1 = require("./list");
|
|
7
10
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
8
11
|
exports.command = `get <${set_1.configKeyCommandArg}>`;
|
|
@@ -16,7 +19,7 @@ exports.builder = (yargs) => {
|
|
|
16
19
|
exports.handler = getConfig;
|
|
17
20
|
function getConfig(parsed) {
|
|
18
21
|
const key = parsed['config-key'];
|
|
19
|
-
const table = new
|
|
22
|
+
const table = new cli_table3_1.default({
|
|
20
23
|
head: ['Config', 'Value', 'Details'],
|
|
21
24
|
});
|
|
22
25
|
let value;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.listConfig = exports.defaultTupleValue = void 0;
|
|
4
7
|
const cliConfigProvider_1 = require("../../../providers/cliConfigProvider");
|
|
5
|
-
const
|
|
8
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
6
9
|
const set_1 = require("./set");
|
|
7
10
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
8
11
|
exports.command = `list`;
|
|
@@ -10,7 +13,7 @@ exports.describe = 'List all user config values';
|
|
|
10
13
|
exports.handler = listConfig;
|
|
11
14
|
exports.defaultTupleValue = '---';
|
|
12
15
|
function listConfig() {
|
|
13
|
-
const table = new
|
|
16
|
+
const table = new cli_table3_1.default({
|
|
14
17
|
head: ['Config', 'Value', 'Details'],
|
|
15
18
|
colWidths: [null, 60],
|
|
16
19
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
7
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
5
8
|
const util_1 = require("../../commandUtil/util");
|
|
6
|
-
const
|
|
9
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
7
10
|
const moment = require("moment");
|
|
8
11
|
const list_1 = require("../../commandUtil/list");
|
|
9
12
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
@@ -30,7 +33,7 @@ function printCredentials(credentials, output) {
|
|
|
30
33
|
loggingProvider_1.logger.info(js_yaml_1.dump(credentials));
|
|
31
34
|
break;
|
|
32
35
|
default:
|
|
33
|
-
const table = new
|
|
36
|
+
const table = new cli_table3_1.default({
|
|
34
37
|
head: ['ID', 'Name', 'Description', 'Created time'],
|
|
35
38
|
wordWrap: true,
|
|
36
39
|
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ExecutionResultPresenter = void 0;
|
|
4
7
|
const change_case_1 = require("change-case");
|
|
5
8
|
const mablApi_1 = require("../../../mablApi");
|
|
6
9
|
const moment = require("moment");
|
|
7
|
-
const
|
|
10
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
8
11
|
const chalk = require('chalk');
|
|
9
12
|
const momentDurationFormatSetup = require('moment-duration-format');
|
|
10
13
|
momentDurationFormatSetup(moment);
|
|
@@ -25,7 +28,7 @@ class ExecutionResultPresenter {
|
|
|
25
28
|
if (columnWidth) {
|
|
26
29
|
tableConfig.colWidths = Array(columnLabels.length - 1).fill(columnWidth);
|
|
27
30
|
}
|
|
28
|
-
const table = new
|
|
31
|
+
const table = new cli_table3_1.default(tableConfig);
|
|
29
32
|
const finalExecutions = (_a = results === null || results === void 0 ? void 0 : results.executions) !== null && _a !== void 0 ? _a : [];
|
|
30
33
|
finalExecutions.forEach((summary) => {
|
|
31
34
|
var _a, _b, _c, _d, _e;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
|
-
const
|
|
7
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
5
8
|
const moment = require("moment");
|
|
6
9
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
7
10
|
const util_1 = require("../../commandUtil/util");
|
|
@@ -30,7 +33,7 @@ function printDeployments(deployments, output) {
|
|
|
30
33
|
loggingProvider_1.logger.info(js_yaml_1.dump(deployments));
|
|
31
34
|
break;
|
|
32
35
|
default:
|
|
33
|
-
const table = new
|
|
36
|
+
const table = new cli_table3_1.default({
|
|
34
37
|
head: ['ID', 'Time', 'Application/Env.', 'Pass', 'Fail', 'Total'],
|
|
35
38
|
});
|
|
36
39
|
deployments.forEach((deployment) => {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
7
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
5
8
|
const util_1 = require("../../commandUtil/util");
|
|
6
|
-
const
|
|
9
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
7
10
|
const moment = require("moment");
|
|
8
11
|
const list_1 = require("../../commandUtil/list");
|
|
9
12
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
@@ -30,7 +33,7 @@ function printEnvironments(environments, output) {
|
|
|
30
33
|
loggingProvider_1.logger.info(js_yaml_1.dump(environments));
|
|
31
34
|
break;
|
|
32
35
|
default:
|
|
33
|
-
const table = new
|
|
36
|
+
const table = new cli_table3_1.default({
|
|
34
37
|
head: ['ID', 'Name', 'Created time'],
|
|
35
38
|
wordWrap: true,
|
|
36
39
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
6
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
4
7
|
const moment = require("moment");
|
|
5
8
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
6
9
|
const util_1 = require("../../commandUtil/util");
|
|
@@ -42,7 +45,7 @@ async function listFlows(parsed) {
|
|
|
42
45
|
return flows.length;
|
|
43
46
|
}
|
|
44
47
|
function printFlows(flows) {
|
|
45
|
-
const table = new
|
|
48
|
+
const table = new cli_table3_1.default({
|
|
46
49
|
head: ['ID', 'Description', 'Created time'],
|
|
47
50
|
wordWrap: true,
|
|
48
51
|
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const constants_1 = require("../../constants");
|
|
4
7
|
const util_1 = require("../../commandUtil/util");
|
|
5
8
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
6
|
-
const
|
|
9
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
7
10
|
const moment = require("moment");
|
|
8
11
|
const loggingProvider_1 = require("../../../providers/logging/loggingProvider");
|
|
9
12
|
exports.command = 'list';
|
|
@@ -41,7 +44,7 @@ async function listPlans(parsed) {
|
|
|
41
44
|
return plans.length;
|
|
42
45
|
}
|
|
43
46
|
function printPlans(plans) {
|
|
44
|
-
const table = new
|
|
47
|
+
const table = new cli_table3_1.default({
|
|
45
48
|
head: ['ID', 'Name', 'Created time'],
|
|
46
49
|
wordWrap: true,
|
|
47
50
|
});
|
|
@@ -22,7 +22,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.toBasicHttpAuthenticationCredentials = exports.generateChromiumPreferencesFile = exports.logTestInfoIfPresent = exports.calculateTotalTimeSeconds = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.downloadUploadFile = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.createTrainingSession = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.setUpAuthTokenForExtension = exports.
|
|
25
|
+
exports.toBasicHttpAuthenticationCredentials = exports.generateChromiumPreferencesFile = exports.logTestInfoIfPresent = exports.calculateTotalTimeSeconds = exports.extractTestRunConfig = exports.pullDownTestRunConfig = exports.validateRunCommandWithLabels = exports.validateRunEditCommand = exports.downloadUploadFile = exports.sleep = exports.editTheTest = exports.runTheTest = exports.prepareTrainerForSplitPlayback = exports.createTrainingSession = exports.cleanUpInitialPages = exports.getExtensionBackgroundPageWithCliTool = exports.setUpAuthTokenForExtension = exports.createBrowserForExecutionEngine = exports.addExecutionEngineLaunchArgs = exports.createBrowser = exports.prepareChromePreferencesDirectory = exports.createBrowserWithAuthedExtension = exports.findChrome = exports.searchForChrome = exports.getFinalUrl = exports.getTempChromePrefDirectory = void 0;
|
|
26
26
|
const os = __importStar(require("os"));
|
|
27
27
|
const trainerUtil_1 = require("./tests_cmds/trainer_cmds/trainerUtil");
|
|
28
28
|
const fs = __importStar(require("fs-extra"));
|
|
@@ -37,7 +37,7 @@ const env_1 = require("../../env/env");
|
|
|
37
37
|
const axios_1 = __importDefault(require("axios"));
|
|
38
38
|
const httpUtil_1 = require("../../util/httpUtil");
|
|
39
39
|
const loggingProvider_1 = require("../../providers/logging/loggingProvider");
|
|
40
|
-
const
|
|
40
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
41
41
|
const logLineMessaging_1 = require("../../core/messaging/logLineMessaging");
|
|
42
42
|
const resourceUtil_1 = require("../../util/resourceUtil");
|
|
43
43
|
const mobileEmulationUtil_1 = require("./mobileEmulationUtil");
|
|
@@ -282,23 +282,6 @@ async function createBrowserForExecutionEngine(browserWidth, browserHeight, head
|
|
|
282
282
|
return maybeBrowser;
|
|
283
283
|
}
|
|
284
284
|
exports.createBrowserForExecutionEngine = createBrowserForExecutionEngine;
|
|
285
|
-
async function connectToExistingBrowser(port, browserHeight, browserWidth, currentDownloadPath, runnerType) {
|
|
286
|
-
const defaultDeviceDescriptor = {
|
|
287
|
-
width: browserWidth,
|
|
288
|
-
height: browserHeight,
|
|
289
|
-
};
|
|
290
|
-
const response = await axios_1.default.get(`http://localhost:${port}/json/version`);
|
|
291
|
-
const url = response.data.webSocketDebuggerUrl;
|
|
292
|
-
return connectToExistingBrowserWebsocket(url, currentDownloadPath, defaultDeviceDescriptor, runnerType);
|
|
293
|
-
}
|
|
294
|
-
exports.connectToExistingBrowser = connectToExistingBrowser;
|
|
295
|
-
function connectToExistingBrowserWebsocket(websocketEndpoint, currentDownloadPath, defaultDeviceDescriptor, runnerType) {
|
|
296
|
-
return browserLauncher_1.BrowserLauncherFactory.createRunner(runnerType).connect({
|
|
297
|
-
defaultDeviceDescriptor,
|
|
298
|
-
browserWSEndpoint: websocketEndpoint,
|
|
299
|
-
}, currentDownloadPath);
|
|
300
|
-
}
|
|
301
|
-
exports.connectToExistingBrowserWebsocket = connectToExistingBrowserWebsocket;
|
|
302
285
|
async function setUpAuthTokenForExtension(browser, accessToken) {
|
|
303
286
|
const backgroundPage = await browser.getExtensionBackgroundPage(trainerUtil_1.getTrainerId());
|
|
304
287
|
await backgroundPage.evaluate((token) => {
|
|
@@ -472,7 +455,7 @@ function handleExtensionMessage(message, trainingBrowser) {
|
|
|
472
455
|
break;
|
|
473
456
|
}
|
|
474
457
|
trainingSessionActions_1.TrainingEventEmitter.sessionSaved(trainedTestInfoMessage.test.id, trainedTestInfoMessage.test.invariant_id, trainedTestInfoMessage.branch, trainedTestInfoMessage.planId);
|
|
475
|
-
const table = new
|
|
458
|
+
const table = new cli_table3_1.default({
|
|
476
459
|
head: [chalk.yellow('Saved Test Info')],
|
|
477
460
|
wordWrap: true,
|
|
478
461
|
});
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
6
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
4
7
|
const moment = require("moment");
|
|
5
8
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
6
9
|
const util_1 = require("../../commandUtil/util");
|
|
@@ -72,7 +75,7 @@ async function listTests(parsed) {
|
|
|
72
75
|
return journeys.length;
|
|
73
76
|
}
|
|
74
77
|
function printTestsAsTable(tests) {
|
|
75
|
-
const table = new
|
|
78
|
+
const table = new cli_table3_1.default({
|
|
76
79
|
head: ['ID', 'Name', 'Created time'],
|
|
77
80
|
wordWrap: true,
|
|
78
81
|
});
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.checkForTrainerUpdate = exports.getTrainerVersion = exports.getTrainerId = exports.updateMablTrainer = exports.getMablTrainerExtensionPath = exports.getTrainerZipFile = exports.getTrainerManifestPath = exports.getTrainerUnzippedPath = exports.getTrainerPath = exports.LOCAL_TRAINER_ID = void 0;
|
|
7
7
|
const env_1 = require("../../../../env/env");
|
|
8
|
-
const
|
|
8
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
9
9
|
const httpUtil_1 = require("../../../../util/httpUtil");
|
|
10
10
|
const messaging_1 = require("../../../../core/messaging/messaging");
|
|
11
11
|
const envPaths = require('env-paths');
|
|
@@ -131,7 +131,7 @@ async function checkForTrainerUpdate() {
|
|
|
131
131
|
.then((checkSum) => {
|
|
132
132
|
const checkSumLatest = checkSum.match('md5=([^}]+)');
|
|
133
133
|
if (checkSumLatest && checkSumLatest[1] !== currentTrainerCheckSum) {
|
|
134
|
-
const table = new
|
|
134
|
+
const table = new cli_table3_1.default({
|
|
135
135
|
head: [chalk.yellow('Trainer Update Available')],
|
|
136
136
|
wordWrap: true,
|
|
137
137
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const js_yaml_1 = require("js-yaml");
|
|
4
7
|
const mablApiClientFactory_1 = require("../../../api/mablApiClientFactory");
|
|
5
|
-
const
|
|
8
|
+
const cli_table3_1 = __importDefault(require("cli-table3"));
|
|
6
9
|
const moment = require("moment");
|
|
7
10
|
const util_1 = require("../../commandUtil/util");
|
|
8
11
|
const interfaces_1 = require("../../commandUtil/interfaces");
|
|
@@ -43,7 +46,7 @@ function printWorkspaces(workspaces, output) {
|
|
|
43
46
|
loggingProvider_1.logger.info(js_yaml_1.dump(workspaces));
|
|
44
47
|
break;
|
|
45
48
|
default:
|
|
46
|
-
const table = new
|
|
49
|
+
const table = new cli_table3_1.default({
|
|
47
50
|
head: ['ID', 'Name', 'Created time'],
|
|
48
51
|
wordWrap: true,
|
|
49
52
|
});
|