blaze-performance-tester 1.1.1 → 1.1.3
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 +5 -1
- package/dist/index.js +5 -0
- package/index.js +5 -0
- package/package.json +4 -3
package/dist/cli.js
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = path.dirname(__filename);
|
|
5
8
|
var require2 = createRequire(import.meta.url);
|
|
6
|
-
var
|
|
9
|
+
var indexPath = fs.existsSync(path.resolve(__dirname, "./index.js")) ? path.resolve(__dirname, "./index.js") : path.resolve(__dirname, "../index.js");
|
|
10
|
+
var nativeBinding = require2(indexPath);
|
|
7
11
|
var args = process.argv.slice(2);
|
|
8
12
|
if (args.length < 3) {
|
|
9
13
|
console.error("\x1B[31m\u274C Missing arguments!\x1B[0m");
|
package/dist/index.js
ADDED
package/index.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blaze-performance-tester",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
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",
|
|
@@ -13,13 +13,14 @@
|
|
|
13
13
|
"files": [
|
|
14
14
|
"dist",
|
|
15
15
|
"bin.js",
|
|
16
|
+
"index.js",
|
|
16
17
|
"blaze.win32-x64-msvc.node"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"prebuild": "node -e \"if (!fs.existsSync('dist')) fs.mkdirSync('dist')\"",
|
|
20
|
-
"build:rust": "napi build --platform --release --js
|
|
21
|
+
"build:rust": "napi build --platform --release --js index.js --dts index.d.ts",
|
|
21
22
|
"build:cli": "esbuild cli.ts --bundle --platform=node --format=esm --packages=external --outfile=dist/cli.js",
|
|
22
|
-
"postbuild": "node -e \"fs.copyFileSync('blaze.win32-x64-msvc.node', 'dist/blaze.win32-x64-msvc.node')\"",
|
|
23
|
+
"postbuild": "node -e \"fs.copyFileSync('blaze.win32-x64-msvc.node', 'dist/blaze.win32-x64-msvc.node'); fs.copyFileSync('index.js', 'dist/index.js')\"",
|
|
23
24
|
"build": "npm run build:rust && npm run build:cli && npm run postbuild"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|