@platforma-sdk/r-builder 0.0.3 → 0.0.5

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
@@ -2,7 +2,7 @@
2
2
  "name": "@platforma-sdk/r-builder",
3
3
  "description": "Build R run environment for Platforma",
4
4
  "type": "module",
5
- "version": "0.0.3",
5
+ "version": "0.0.5",
6
6
  "files": [
7
7
  "assets/",
8
8
  "scripts/"
@@ -8,7 +8,6 @@ import { fetch } from 'undici';
8
8
  import * as tar from 'tar';
9
9
  import winston from 'winston';
10
10
  import zlib from 'zlib';
11
- import xz from 'xz';
12
11
 
13
12
  import * as pkg from './pkg.js';
14
13
 
@@ -132,7 +131,16 @@ export async function download(logger, url, destination) {
132
131
 
133
132
  await pump();
134
133
  } else {
135
- await pipeline(response.body, writer);
134
+
135
+ return new Promise((resolve, reject) => {
136
+ pipeline(response.body, writer, (err) => {
137
+ if (err) {
138
+ reject(err);
139
+ } else {
140
+ resolve();
141
+ }
142
+ });
143
+ });
136
144
  }
137
145
  }
138
146