@rg-dev/stdlib 1.0.13 → 1.0.14

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.
@@ -6093,8 +6093,12 @@ function downloadFile(url, destination, headers) {
6093
6093
  import_stream.Readable.fromWeb(body).pipe(dest);
6094
6094
  }
6095
6095
  dest.on("finish", () => resolve(destination));
6096
- dest.on("error", reject);
6096
+ dest.on("error", (e2) => {
6097
+ console.error("error downloading", url);
6098
+ reject(e2);
6099
+ });
6097
6100
  } catch (e2) {
6101
+ console.error("error downloading", url);
6098
6102
  reject(e2);
6099
6103
  }
6100
6104
  }
@@ -1,3 +1,3 @@
1
- declare function downloadFile(url: string, destination: string, headers: Record<string, any>): Promise<string>;
1
+ declare function downloadFile(url: string, destination: string, headers?: Record<string, any>): Promise<string>;
2
2
 
3
3
  export { downloadFile };
@@ -1,3 +1,3 @@
1
- declare function downloadFile(url: string, destination: string, headers: Record<string, any>): Promise<string>;
1
+ declare function downloadFile(url: string, destination: string, headers?: Record<string, any>): Promise<string>;
2
2
 
3
3
  export { downloadFile };
@@ -6094,8 +6094,12 @@ function downloadFile(url, destination, headers) {
6094
6094
  Readable.fromWeb(body).pipe(dest);
6095
6095
  }
6096
6096
  dest.on("finish", () => resolve(destination));
6097
- dest.on("error", reject);
6097
+ dest.on("error", (e2) => {
6098
+ console.error("error downloading", url);
6099
+ reject(e2);
6100
+ });
6098
6101
  } catch (e2) {
6102
+ console.error("error downloading", url);
6099
6103
  reject(e2);
6100
6104
  }
6101
6105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rg-dev/stdlib",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",