Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async createEmbeddedArchiveFile(nupkgPath: string, dirToArchive: string) {
const embeddedArchiveFile = await this.packager.getTempFile("setup.zip")
await exec(path7za, compute7zCompressArgs("zip", {
isRegularFile: true,
compression: this.packager.compression,
}).concat(embeddedArchiveFile, "."), {
cwd: dirToArchive,
})
await exec(path7za, compute7zCompressArgs("zip", {
isRegularFile: true,
compression: "store" /* nupkg is already compressed */,
}).concat(embeddedArchiveFile, nupkgPath))
return embeddedArchiveFile
}
}