@codernex/nexpress 1.0.2 → 1.0.4

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.
package/dist/index.js CHANGED
@@ -13,6 +13,8 @@ const __filename = fileURLToPath(import.meta.url);
13
13
  const __dirname = path.dirname(__filename);
14
14
  const homeDir = os.homedir();
15
15
  const acceptableArgs = ["--input", "--output", "--quality", "--help"];
16
+ const workerFileName = `image-processor${path.extname(__filename)}`;
17
+ const workerPath = path.join(__dirname, workerFileName);
16
18
  const args = process.argv.slice(2); // Use slice instead of splice
17
19
  const filteredArgs = args.filter((p) => {
18
20
  const [key] = p.split("=");
@@ -77,8 +79,9 @@ const allImages = fs.readdirSync(inputPath).filter((file) => {
77
79
  allImages.forEach((fileName) => {
78
80
  console.log("Processing:", fileName);
79
81
  const workerId = uuidV4();
80
- const worker = new Worker(path.join(__dirname, "image-processor.ts"), {
82
+ const worker = new Worker(workerPath, {
81
83
  // Use .js file
84
+ execArgv: process.execArgv,
82
85
  workerData: {
83
86
  input: path.join(inputPath, fileName),
84
87
  output: outputPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codernex/nexpress",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Multi-threaded image batch processor CLI",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/readme.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  A high-performance, multi-threaded command-line tool built with Node.js and TypeScript. It converts and compresses batches of images into efficient **WebP** format using worker threads for maximum speed.
4
4
 
5
+ <div align="center">
6
+ <img src="./screenshot.png" alt="NexPress CLI Demo" width="800" />
7
+ <p><em>Proof of Work: Reduced a 7.4MB raw image to just 0.19MB (~97% reduction)</em></p>
8
+ </div>
9
+
5
10
  ## 🚀 Features
6
11
 
7
12
  - **Multi-threaded Processing:** Uses Node.js `worker_threads` to process images in parallel, utilizing all available CPU cores.