@agentuity/cli 0.0.16 → 0.0.17

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":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoD9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"}
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmD9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/cli",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import { join, resolve } from 'node:path';
2
2
  import { existsSync, mkdirSync, mkdtempSync, renameSync, readdirSync, cpSync, rmSync } from 'node:fs';
3
3
  import { homedir, tmpdir } from 'node:os';
4
- import { pipeline } from 'node:stream/promises';
4
+ import { finished } from 'node:stream/promises';
5
5
  import { createGunzip } from 'node:zlib';
6
6
  import { extract, type Headers } from 'tar-fs';
7
7
  import type { Logger } from '../../logger';
@@ -81,17 +81,16 @@ export async function downloadTemplate(options: DownloadOptions): Promise<void>
81
81
  async (stream) => {
82
82
  // Extract only the template directory from tarball
83
83
  const prefix = `sdk-${branch}/${templatePath}/`;
84
- await pipeline(
85
- stream,
86
- createGunzip(),
87
- extract(tempDir, {
88
- filter: (name: string) => name.startsWith(prefix),
89
- map: (header: Headers) => {
90
- header.name = header.name.substring(prefix.length);
91
- return header;
92
- },
93
- })
94
- );
84
+ const extractor = extract(tempDir, {
85
+ filter: (name: string) => name.startsWith(prefix),
86
+ map: (header: Headers) => {
87
+ header.name = header.name.substring(prefix.length);
88
+ return header;
89
+ },
90
+ });
91
+
92
+ stream.pipe(createGunzip()).pipe(extractor);
93
+ await finished(extractor);
95
94
  }
96
95
  );
97
96