@genesislcap/build-kit 14.340.0 → 14.340.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.
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/utils/archive.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe,GAAU,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,gBAAY,kBAYnF,CAAC"}
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/utils/archive.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,GAAU,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,gBAAY,kBAqBnF,CAAC"}
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.downloadTarball = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const node_fs_1 = require("node:fs");
6
+ const node_stream_1 = require("node:stream");
7
+ const promises_1 = require("node:stream/promises");
6
8
  const consola_1 = tslib_1.__importDefault(require("consola"));
7
- const download_tarball_1 = tslib_1.__importDefault(require("download-tarball"));
9
+ const tar_1 = require("tar");
8
10
  const tmp_1 = tslib_1.__importDefault(require("tmp"));
9
11
  const downloadTarball = (url_1, destination_1, ...args_1) => tslib_1.__awaiter(void 0, [url_1, destination_1, ...args_1], void 0, function* (url, destination, subPath = '') {
10
12
  const tmpDir = tmp_1.default.dirSync();
@@ -13,8 +15,13 @@ const downloadTarball = (url_1, destination_1, ...args_1) => tslib_1.__awaiter(v
13
15
  destination,
14
16
  url,
15
17
  });
16
- yield (0, download_tarball_1.default)({ url, dir: tmpDir.name });
18
+ // Download and extract tarball using native fetch + tar
19
+ const response = yield fetch(url);
20
+ if (!response.ok)
21
+ throw new Error(`Failed to download: ${response.statusText}`);
22
+ // Extract directly from the response stream
23
+ yield (0, promises_1.pipeline)(node_stream_1.Readable.fromWeb(response.body), (0, tar_1.extract)({ cwd: tmpDir.name }));
17
24
  const source = `${tmpDir.name}${subPath}`;
18
- (0, node_fs_1.cpSync)(`${source}`, destination, { recursive: true });
25
+ (0, node_fs_1.cpSync)(source, destination, { recursive: true });
19
26
  });
20
27
  exports.downloadTarball = downloadTarball;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/build-kit",
3
3
  "description": "Build utilities & types",
4
- "version": "14.340.0",
4
+ "version": "14.340.1",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -21,7 +21,6 @@
21
21
  "consola": "^3.0.2",
22
22
  "defu": "^6.1.2",
23
23
  "dotenv": "^16.4.5",
24
- "download-tarball": "2.0.0",
25
24
  "edit-json-file": "^1.7.0",
26
25
  "get-npm-tarball-url": "2.1.0",
27
26
  "giget": "1.1.3",
@@ -32,11 +31,12 @@
32
31
  "portfinder-sync": "^0.0.2",
33
32
  "pretty-ms": "^7.0.0",
34
33
  "rimraf": "^5.0.0",
34
+ "tar": "^7.4.3",
35
35
  "tmp": "0.2.1",
36
36
  "unparse-args": "^1.2.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@genesislcap/foundation-testing": "14.340.0",
39
+ "@genesislcap/foundation-testing": "14.340.1",
40
40
  "@types/http-proxy": "^1.17.8",
41
41
  "@types/node": "^22.10.2",
42
42
  "tsm": "^2.2.1",
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "56185a8a0835027cbe5ffd555d77feab75dd81c4"
54
+ "gitHead": "015b5150fa0edaeedd7712fc35c38328396c0119"
55
55
  }