@mablhq/mabl-cli 1.21.7 → 1.22.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 +72 -53
- package/api/mablApiClientFactory.js +3 -3
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +1 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +77 -39
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +4 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +1 -1
- package/cli.js +2 -0
- package/commands/config/config_cmds/configKeys.js +12 -1
- package/commands/config/config_cmds/set.js +6 -0
- package/commands/constants.js +3 -2
- package/commands/flows/flows_cmds/export.js +1 -1
- package/commands/internal/internal.js +6 -0
- package/commands/link-agents/link-agents_cmds/list.js +131 -0
- package/commands/link-agents/link-agents_cmds/terminate.js +31 -0
- package/commands/tests/testsUtil.js +18 -2
- package/commands/tests/tests_cmds/export.js +1 -1
- package/core/messaging/messaging.js +11 -1
- package/domUtil/index.js +1 -1
- package/domUtil/index.js.LICENSE.txt +2 -2
- package/env/defaultEnv.js +2 -1
- package/env/dev.js +2 -1
- package/env/env.js +3 -1
- package/env/local.js +2 -1
- package/env/prod.js +2 -1
- package/execution/index.js +1 -1
- package/execution/index.js.LICENSE.txt +2 -2
- package/mablscript/steps/SyntheticStep.js +20 -0
- package/mablscriptFind/index.js +1 -1
- package/mablscriptFind/index.js.LICENSE.txt +2 -2
- package/package.json +1 -1
- package/providers/authenticationProvider.js +1 -1
- package/providers/cliConfigProvider.js +20 -8
- package/resources/mablFind.js +1 -1
- package/util/httpUtil.js +3 -2
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* @license Complex.js v2.
|
|
11
|
+
* @license Complex.js v2.1.1 12/05/2020
|
|
12
12
|
*
|
|
13
13
|
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
|
|
14
14
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
15
15
|
**/
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @license Fraction.js v4.
|
|
18
|
+
* @license Fraction.js v4.2.0 05/03/2022
|
|
19
19
|
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
20
20
|
*
|
|
21
21
|
* Copyright (c) 2021, Robert Eisele (robert@xarg.org)
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@ class AuthenticationProvider {
|
|
|
40
40
|
return authConfig;
|
|
41
41
|
}
|
|
42
42
|
async maybeRenewAuthentication(authConfig) {
|
|
43
|
-
if (!authConfig.refreshToken) {
|
|
43
|
+
if (!authConfig.refreshToken || authConfig.authType === types_1.AuthType.ApiKey) {
|
|
44
44
|
if (this.verbose) {
|
|
45
45
|
loggingProvider_1.logger.info(`Authentication refresh token ${chalk.red.bold('Not Found')}`);
|
|
46
46
|
}
|
|
@@ -136,6 +136,10 @@ class CliConfigProvider {
|
|
|
136
136
|
static async getWorkspace() {
|
|
137
137
|
return (await getAuthConfigFile()).get(WORKSPACE);
|
|
138
138
|
}
|
|
139
|
+
static async getProxyMode() {
|
|
140
|
+
const proxyMode = await this.getConfigProperty(configKeys_1.configKeys.proxyMode);
|
|
141
|
+
return (0, configKeys_1.isValidProxyMode)(proxyMode) ? proxyMode : 'mabl';
|
|
142
|
+
}
|
|
139
143
|
static getConfigProperty(key) {
|
|
140
144
|
return getValue(propertyKeyToStoredKey(key));
|
|
141
145
|
}
|
|
@@ -166,13 +170,6 @@ class CliConfigProvider {
|
|
|
166
170
|
const httpConfig = {
|
|
167
171
|
sslVerify: httpUtil_1.EXECUTION_ENGINE_SSL_VERIFY,
|
|
168
172
|
};
|
|
169
|
-
const proxyHostValue = await this.getConfigProperty(configKeys_1.configKeys.proxy);
|
|
170
|
-
if (proxyHostValue) {
|
|
171
|
-
if (typeof proxyHostValue !== 'string') {
|
|
172
|
-
throw new Error('Invalid proxy host value');
|
|
173
|
-
}
|
|
174
|
-
httpConfig.proxyHost = new URL(proxyHostValue);
|
|
175
|
-
}
|
|
176
173
|
const sslVerifyValue = await this.getConfigProperty(configKeys_1.configKeys.sslVerify);
|
|
177
174
|
if (sslVerifyValue !== undefined) {
|
|
178
175
|
if (typeof sslVerifyValue !== 'boolean') {
|
|
@@ -180,13 +177,28 @@ class CliConfigProvider {
|
|
|
180
177
|
}
|
|
181
178
|
httpConfig.sslVerify = sslVerifyValue;
|
|
182
179
|
}
|
|
180
|
+
const mablHttpConfig = { ...httpConfig };
|
|
181
|
+
const testHttpConfig = { ...httpConfig };
|
|
182
|
+
const proxyHostValue = await this.getConfigProperty(configKeys_1.configKeys.proxy);
|
|
183
|
+
const proxyMode = await this.getProxyMode();
|
|
184
|
+
if (proxyHostValue) {
|
|
185
|
+
if (typeof proxyHostValue !== 'string') {
|
|
186
|
+
throw new Error('Invalid proxy host value');
|
|
187
|
+
}
|
|
188
|
+
if (proxyMode === 'mabl' || proxyMode === 'all') {
|
|
189
|
+
mablHttpConfig.proxyHost = new URL(proxyHostValue);
|
|
190
|
+
}
|
|
191
|
+
if (proxyMode === 'test' || proxyMode === 'all') {
|
|
192
|
+
testHttpConfig.proxyHost = new URL(proxyHostValue);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
183
195
|
return {
|
|
184
196
|
authentication,
|
|
185
197
|
userId: config.get(USER_ID_NAME),
|
|
186
198
|
email: config.get(EMAIL_NAME),
|
|
187
199
|
userFullName: config.get(USER_FULL_NAME_NAME),
|
|
188
200
|
workspace: config.get(WORKSPACE),
|
|
189
|
-
http:
|
|
201
|
+
http: { mabl: mablHttpConfig, test: testHttpConfig },
|
|
190
202
|
};
|
|
191
203
|
}
|
|
192
204
|
static clearAuthConfig() {
|