@agentuity/cli
Advanced tools
@@ -1,1 +0,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"} | ||
| {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAeA,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,CA+D9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"} |
+1
-1
| { | ||
| "name": "@agentuity/cli", | ||
| "version": "0.0.17", | ||
| "version": "0.0.18", | ||
| "type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.ts", |
| import { join, resolve } from 'node:path'; | ||
| import { existsSync, mkdirSync, mkdtempSync, renameSync, readdirSync, cpSync, rmSync } from 'node:fs'; | ||
| import { homedir, tmpdir } from 'node:os'; | ||
| import { | ||
| existsSync, | ||
| mkdirSync, | ||
| mkdtempSync, | ||
| renameSync, | ||
| readdirSync, | ||
| cpSync, | ||
| rmSync, | ||
| createReadStream, | ||
| } from 'node:fs'; | ||
| import { tmpdir } from 'node:os'; | ||
| import { finished } from 'node:stream/promises'; | ||
@@ -72,4 +81,6 @@ import { createGunzip } from 'node:zlib'; | ||
| const tempDir = mkdtempSync(join(tmpdir(), 'agentuity-')); | ||
| const tarballPath = join(tempDir, 'download.tar.gz'); | ||
| try { | ||
| // Download tarball to temp file | ||
| await downloadWithSpinner( | ||
@@ -83,18 +94,28 @@ { | ||
| async (stream) => { | ||
| // Extract only the template directory from tarball | ||
| const prefix = `sdk-${branch}/${templatePath}/`; | ||
| const extractor = extract(tempDir, { | ||
| filter: (name: string) => name.startsWith(prefix), | ||
| map: (header: Headers) => { | ||
| header.name = header.name.substring(prefix.length); | ||
| return header; | ||
| }, | ||
| }); | ||
| stream.pipe(createGunzip()).pipe(extractor); | ||
| await finished(extractor); | ||
| // Write stream to file | ||
| const chunks: Buffer[] = []; | ||
| for await (const chunk of stream) { | ||
| chunks.push(Buffer.from(chunk)); | ||
| } | ||
| await Bun.write(tarballPath, Buffer.concat(chunks)); | ||
| } | ||
| ); | ||
| await cleanup(tempDir, dest); | ||
| // Extract tarball | ||
| const extractDir = join(tempDir, 'extract'); | ||
| mkdirSync(extractDir, { recursive: true }); | ||
| const prefix = `sdk-${branch}/${templatePath}/`; | ||
| const extractor = extract(extractDir, { | ||
| filter: (name: string) => name.startsWith(prefix), | ||
| map: (header: Headers) => { | ||
| header.name = header.name.substring(prefix.length); | ||
| return header; | ||
| }, | ||
| }); | ||
| createReadStream(tarballPath).pipe(createGunzip()).pipe(extractor); | ||
| await finished(extractor); | ||
| await cleanup(extractDir, dest); | ||
| } finally { | ||
@@ -101,0 +122,0 @@ // Clean up temp directory |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 16 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 16 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
245064
0.15%5836
0.33%