@mablhq/mabl-cli 1.41.4 → 1.43.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/basicApiClient.js +19 -4
- package/commands/tests/tests_cmds/create.js +1 -1
- package/core/execution/ApiTestUtils.js +41 -1
- package/core/trainer/openUtils.js +2 -2
- package/core/trainer/trainingSessions-types.js +35 -0
- package/core/trainer/trainingSessions.js +52 -34
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/http/MablHttpAgent.js +73 -0
- package/http/RequestFilteringHttpAgent.js +119 -0
- package/http/RequestSecurityError.js +9 -0
- package/{util/httpUtil.js → http/axiosProxyConfig.js} +3 -6
- package/http/httpUtil.js +54 -0
- package/http/requestInterceptor.js +187 -0
- package/mablscript/steps/SyntheticStep.js +1 -1
- package/mablscriptFind/index.js +1 -1
- package/observers/mockObserver.js +3 -0
- package/package.json +3 -3
- package/providers/authenticationProvider.js +2 -2
- package/providers/cliConfigProvider.js +1 -1
- package/providers/exportRequestProvider.js +8 -14
- package/resources/mablFind.js +1 -1
- package/util/encodingUtil.js +37 -0
- package/util/fileUploadUtil.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mablhq/newman-reporter-mabl-console": "0.1.0",
|
|
24
|
-
"@playwright/test": "1.25.
|
|
24
|
+
"@playwright/test": "1.25.2",
|
|
25
25
|
"@types/fs-extra": "8.1.1",
|
|
26
26
|
"@types/serve-handler": "6.1.0",
|
|
27
27
|
"@types/tmp": "0.2.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"newman": "5.3.2",
|
|
67
67
|
"open": "6.4.0",
|
|
68
68
|
"ora": "4.0.4",
|
|
69
|
-
"playwright-core": "1.25.
|
|
69
|
+
"playwright-core": "1.25.2",
|
|
70
70
|
"pluralize": "8.0.0",
|
|
71
71
|
"pngjs": "6.0.0",
|
|
72
72
|
"portfinder": "1.0.28",
|
|
@@ -13,7 +13,7 @@ const mablApiClientFactory_1 = require("../api/mablApiClientFactory");
|
|
|
13
13
|
const loggingProvider_1 = require("./logging/loggingProvider");
|
|
14
14
|
const pureUtil_1 = require("../util/pureUtil");
|
|
15
15
|
const OktaClient_1 = require("../auth/OktaClient");
|
|
16
|
-
const
|
|
16
|
+
const axiosProxyConfig_1 = require("../http/axiosProxyConfig");
|
|
17
17
|
const types_2 = require("./types");
|
|
18
18
|
const humanizeDuration = require('humanize-duration');
|
|
19
19
|
const inquirer = require('inquirer');
|
|
@@ -24,7 +24,7 @@ class AuthenticationProvider {
|
|
|
24
24
|
}
|
|
25
25
|
async getOktaClient() {
|
|
26
26
|
if (!this.oktaClient) {
|
|
27
|
-
const client = axios_1.default.create(await (0,
|
|
27
|
+
const client = axios_1.default.create(await (0, axiosProxyConfig_1.currentProxyConfig)());
|
|
28
28
|
this.oktaClient = new OktaClient_1.OktaClient(client);
|
|
29
29
|
}
|
|
30
30
|
return this.oktaClient;
|
|
@@ -32,7 +32,7 @@ const conf_1 = __importDefault(require("conf"));
|
|
|
32
32
|
const types_1 = require("./types");
|
|
33
33
|
const types_2 = require("../api/types");
|
|
34
34
|
const configKeys_1 = require("../commands/config/config_cmds/configKeys");
|
|
35
|
-
const httpUtil_1 = require("../
|
|
35
|
+
const httpUtil_1 = require("../http/httpUtil");
|
|
36
36
|
const crypto = __importStar(require("crypto"));
|
|
37
37
|
const loggingProvider_1 = require("./logging/loggingProvider");
|
|
38
38
|
const utilities_1 = require("../utilities");
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExportRequestProvider = void 0;
|
|
4
4
|
const mablApi_1 = require("../mablApi");
|
|
5
5
|
const loggingProvider_1 = require("./logging/loggingProvider");
|
|
6
|
-
const
|
|
6
|
+
const basicApiClient_1 = require("../api/basicApiClient");
|
|
7
7
|
const fs = require('fs');
|
|
8
8
|
const ora = require('ora');
|
|
9
9
|
const chalk = require('chalk');
|
|
@@ -119,20 +119,14 @@ class ExportRequestProvider {
|
|
|
119
119
|
prefixText: ' ',
|
|
120
120
|
text: `Downloading export artifact to [${chalk.magenta.bold(outputFilename)}]`,
|
|
121
121
|
}).start();
|
|
122
|
-
const
|
|
123
|
-
await
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
file.close(resolve);
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
catch (exception) {
|
|
133
|
-
reject(exception);
|
|
134
|
-
}
|
|
122
|
+
const client = await basicApiClient_1.BasicApiClient.create();
|
|
123
|
+
const response = await client.makeGetRequest(downloadUrl, undefined, {
|
|
124
|
+
headers: {
|
|
125
|
+
Accept: 'application/zip',
|
|
126
|
+
},
|
|
127
|
+
responseType: 'arraybuffer',
|
|
135
128
|
});
|
|
129
|
+
fs.writeFileSync(outputFilename, response);
|
|
136
130
|
updateSpinnerSuccessStop(this.exportDownloadSpinner);
|
|
137
131
|
return outputFilename;
|
|
138
132
|
}
|