@mablhq/mabl-cli 1.43.1 → 1.43.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "1.43.1",
3
+ "version": "1.43.7",
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.2",
24
+ "@playwright/test": "1.27.1",
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.2",
69
+ "playwright-core": "1.27.1",
70
70
  "pluralize": "8.0.0",
71
71
  "pngjs": "6.0.0",
72
72
  "portfinder": "1.0.28",
@@ -120,13 +120,29 @@ class ExportRequestProvider {
120
120
  text: `Downloading export artifact to [${chalk.magenta.bold(outputFilename)}]`,
121
121
  }).start();
122
122
  const client = await basicApiClient_1.BasicApiClient.create();
123
- const response = await client.makeGetRequest(downloadUrl, undefined, {
123
+ const responseData = await client.makeGetRequest(downloadUrl, undefined, {
124
124
  headers: {
125
125
  Accept: 'application/zip',
126
126
  },
127
- responseType: 'arraybuffer',
127
+ responseType: 'stream',
128
+ });
129
+ const writer = fs.createWriteStream(outputFilename);
130
+ await new Promise((resolve, reject) => {
131
+ try {
132
+ responseData.pipe(writer);
133
+ writer.on('error', (err) => {
134
+ writer.close();
135
+ reject(err);
136
+ });
137
+ writer.on('finish', () => {
138
+ writer.close();
139
+ resolve();
140
+ });
141
+ }
142
+ catch (exception) {
143
+ reject(exception);
144
+ }
128
145
  });
129
- fs.writeFileSync(outputFilename, response);
130
146
  updateSpinnerSuccessStop(this.exportDownloadSpinner);
131
147
  return outputFilename;
132
148
  }