shotsweep 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/dist/cli.js +10 -11
  2. package/package.json +3 -4
package/dist/cli.js CHANGED
@@ -3,7 +3,7 @@ import { Command } from "commander";
3
3
  import { chromium } from "playwright";
4
4
  import { spawnSync } from "node:child_process";
5
5
  import { createRequire } from "node:module";
6
- import archiver from "archiver";
6
+ import JSZip from "jszip";
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
9
  import readline from "node:readline/promises";
@@ -831,16 +831,15 @@ Give a prioritized list of fixes.${shots.some((s) => /\(part \d+\/\d+\)/.test(s.
831
831
  `;
832
832
  fs.writeFileSync(path.join(outDir, "manifest.md"), md);
833
833
  }
834
- function zipDir(dir, zipPath) {
835
- return new Promise((resolve, reject) => {
836
- const output = fs.createWriteStream(zipPath);
837
- const archive = archiver("zip", { zlib: { level: 9 } });
838
- output.on("close", () => resolve());
839
- archive.on("error", reject);
840
- archive.pipe(output);
841
- archive.directory(dir, false);
842
- archive.finalize();
843
- });
834
+ async function zipDir(dir, zipPath) {
835
+ const zip = new JSZip();
836
+ for (const name of fs.readdirSync(dir)) {
837
+ const p = path.join(dir, name);
838
+ if (fs.statSync(p).isFile())
839
+ zip.file(name, fs.readFileSync(p));
840
+ }
841
+ const buf = await zip.generateAsync({ type: "nodebuffer", compression: "DEFLATE", compressionOptions: { level: 9 } });
842
+ fs.writeFileSync(zipPath, buf);
844
843
  }
845
844
  const CONFIG_TEMPLATE = {
846
845
  url: "http://localhost:3000",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shotsweep",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Capture every screen of your web app in one command and bundle it for AI review. Finds routes, closes popups, handles login, compresses images.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,15 +44,14 @@
44
44
  },
45
45
  "homepage": "https://github.com/Dhanush-VibeCoder/shotsweep#readme",
46
46
  "dependencies": {
47
- "archiver": "^7.0.1",
48
47
  "commander": "^12.1.0",
48
+ "jszip": "^3.10.2",
49
49
  "playwright": "^1.51.0",
50
50
  "sharp": "^0.33.5"
51
51
  },
52
52
  "devDependencies": {
53
- "@types/archiver": "^6.0.2",
54
53
  "@types/node": "^22.0.0",
55
54
  "tsx": "^4.19.0",
56
55
  "typescript": "^5.6.0"
57
56
  }
58
- }
57
+ }