blaze-performance-tester 1.1.15 → 1.1.16

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/cli.js CHANGED
@@ -1,10 +1,20 @@
1
1
  // cli.ts
2
2
  import path from "path";
3
- import { fileURLToPath, pathToFileURL } from "url";
3
+ import { fileURLToPath } from "url";
4
+ import { createRequire } from "module";
4
5
  var __filename = fileURLToPath(import.meta.url);
5
6
  var __dirname = path.dirname(__filename);
6
- var indexPath = path.resolve(__dirname, "../index.js");
7
- var { runBlazeCore } = await import(pathToFileURL(indexPath).href);
7
+ var require2 = createRequire(import.meta.url);
8
+ var nativeBinaryPath = path.resolve(__dirname, "../blaze.win32-x64-msvc.node");
9
+ var nativeBinding;
10
+ try {
11
+ nativeBinding = require2(nativeBinaryPath);
12
+ } catch (error) {
13
+ console.error(`\x1B[31m\u274C Failed to load native binary directly at: ${nativeBinaryPath}\x1B[0m`);
14
+ console.error(error);
15
+ process.exit(1);
16
+ }
17
+ var runBlazeCore = nativeBinding.runBlazeCore;
8
18
  var args = process.argv.slice(2);
9
19
  if (args.length < 3) {
10
20
  console.error("Usage: npx blaze-performance-tester <script-path> <vus> <duration-seconds>");
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blaze-performance-tester",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "A high-performance, multi-threaded load testing engine built with Rust and QuickJS.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",