@leeguoo/mailbox-cli
Advanced tools
+12
-1
@@ -42,2 +42,11 @@ #!/usr/bin/env node | ||
| let launcherVersion = ""; | ||
| try { | ||
| // eslint-disable-next-line import/no-dynamic-require, global-require | ||
| const launcherPkg = require(path.join(__dirname, "..", "package.json")); | ||
| launcherVersion = launcherPkg && launcherPkg.version ? String(launcherPkg.version) : ""; | ||
| } catch { | ||
| launcherVersion = ""; | ||
| } | ||
| const mod = _requirePlatformPackage(pkg); | ||
@@ -50,3 +59,5 @@ const binaryPath = mod && mod.binaryPath; | ||
| const args = process.argv.slice(2); | ||
| const r = spawnSync(binaryPath, args, { stdio: "inherit" }); | ||
| const env = { ...process.env }; | ||
| if (launcherVersion) env.MAILBOX_CLI_VERSION = launcherVersion; | ||
| const r = spawnSync(binaryPath, args, { stdio: "inherit", env }); | ||
| if (typeof r.status === "number") process.exit(r.status); | ||
@@ -53,0 +64,0 @@ process.exit(1); |
+4
-4
| { | ||
| "name": "@leeguoo/mailbox-cli", | ||
| "version": "2.0.7", | ||
| "version": "2.0.8", | ||
| "description": "Mailbox CLI (binary distribution)", | ||
@@ -37,6 +37,6 @@ "keywords": [ | ||
| "optionalDependencies": { | ||
| "@leeguoo/mailbox-cli-darwin-arm64": "2.0.7", | ||
| "@leeguoo/mailbox-cli-darwin-x64": "2.0.7", | ||
| "@leeguoo/mailbox-cli-linux-x64-gnu": "2.0.7" | ||
| "@leeguoo/mailbox-cli-darwin-arm64": "2.0.8", | ||
| "@leeguoo/mailbox-cli-darwin-x64": "2.0.8", | ||
| "@leeguoo/mailbox-cli-linux-x64-gnu": "2.0.8" | ||
| } | ||
| } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
2985
16.74%54
22.73%4
100%