Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@caido-community/dev",
"version": "0.1.0",
"version": "0.1.1",
"description": "Development tools for building Caido plugins",
"type": "module",
"exports": {
Expand Down
22 changes: 13 additions & 9 deletions src/bundle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,17 @@ export async function bundlePackage(options: {
// Write zip file to dist directory
const zipPath = path.join(distDir, "plugin_package.zip");
const zipFile = await fs.open(zipPath, "w");
zip
.generateNodeStream({
type: "nodebuffer",
streamFiles: true,
})
.pipe(zipFile.createWriteStream())
.on("finish", () => {
logSuccess("Plugin package zip file created successfully");
});
await new Promise<void>((resolve, reject) => {
zip
.generateNodeStream({
type: "nodebuffer",
streamFiles: true,
})
.pipe(zipFile.createWriteStream())
.on("finish", () => {
logSuccess("Plugin package zip file created successfully");
resolve();
})
.on("error", reject);
});
}