@mablhq/mabl-cli 1.42.7 → 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.
@@ -28,6 +28,9 @@ class FakeObserver {
28
28
  observeAfter() {
29
29
  return Promise.resolve();
30
30
  }
31
+ observeFlow() {
32
+ return Promise.resolve();
33
+ }
31
34
  onPageCreated(_page, _pageId) {
32
35
  return Promise.resolve();
33
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "1.42.7",
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",
@@ -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 https = require('https');
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 file = fs.createWriteStream(outputFilename);
123
- await new Promise((resolve, reject) => {
124
- try {
125
- https.get(downloadUrl, (response) => {
126
- response.pipe(file);
127
- file.on('finish', () => {
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
  }