@multiplayer-app/cli
Advanced tools
| > @multiplayer-app/cli@2.0.5 build /Users/dima/Projects/multiplayer-debugger-javascript/packages/cli | ||
| > bun build src/index.tsx --compile --outfile dist/multiplayer-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/x64/') --sourcemap=none | ||
| [0m[2m[[1m219ms[0m[2m][0m [32mbundle[0m 908 modules | ||
| [0m[2m[[1m319ms[0m[2m][0m [32mcompile[0m [1m[34mdist/multiplayer-darwin-arm64[0m |
| #!/usr/bin/env node | ||
| import { execFileSync } from 'child_process' | ||
| import { existsSync } from 'fs' | ||
| import { fileURLToPath } from 'url' | ||
| import path from 'path' | ||
| const PLATFORM_MAP = { darwin: 'darwin', linux: 'linux', win32: 'windows' } | ||
| const ARCH_MAP = { x64: 'x64', arm64: 'arm64' } | ||
| const platform = PLATFORM_MAP[process.platform] | ||
| const arch = ARCH_MAP[process.arch] | ||
| if (!platform || !arch) { | ||
| process.stderr.write(`Unsupported platform: ${process.platform}-${process.arch}\n`) | ||
| process.exit(1) | ||
| } | ||
| const pkgName = `@multiplayer-app/cli-${platform}-${arch}` | ||
| const binName = process.platform === 'win32' ? 'multiplayer.exe' : 'multiplayer' | ||
| // Walk up from this file looking for the binary in node_modules | ||
| function findBinary() { | ||
| if (process.env.MULTIPLAYER_BIN_PATH) return process.env.MULTIPLAYER_BIN_PATH | ||
| let dir = path.dirname(fileURLToPath(import.meta.url)) | ||
| while (true) { | ||
| const candidate = path.join(dir, 'node_modules', pkgName, binName) | ||
| if (existsSync(candidate)) return candidate | ||
| const parent = path.dirname(dir) | ||
| if (parent === dir) break | ||
| dir = parent | ||
| } | ||
| // Fallback: sibling dist/ for local dev | ||
| const devBin = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'dist', `${platform}-${arch}`, binName) | ||
| if (existsSync(devBin)) return devBin | ||
| return null | ||
| } | ||
| const bin = findBinary() | ||
| if (!bin) { | ||
| process.stderr.write( | ||
| `Could not find binary for ${platform}-${arch}.\n` + | ||
| `Try reinstalling: npm install -g @multiplayer-app/cli\n` | ||
| ) | ||
| process.exit(1) | ||
| } | ||
| execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' }) |
+22
-8
| { | ||
| "name": "@multiplayer-app/cli", | ||
| "version": "2.0.5", | ||
| "version": "2.0.6", | ||
| "description": "Multiplayer CLI", | ||
| "type": "module", | ||
| "bin": { | ||
| "multiplayer": "./dist/index.js" | ||
| "multiplayer": "./bin/multiplayer.js" | ||
| }, | ||
| "scripts": { | ||
| "build": "bun build src/index.tsx --compile --outfile dist/index.js --sourcemap=none", | ||
| "start": "bun dist/index.js", | ||
| "build": "bun run scripts/build.ts", | ||
| "publish": "bun run scripts/publish.ts", | ||
| "dev": "bun src/index.tsx", | ||
| "typecheck": "tsc --noEmit", | ||
| "lint": "eslint src/**/*.ts --config eslint.config.js", | ||
| "prepublishOnly": "npm run build" | ||
| "lint": "eslint src/**/*.ts --config eslint.config.js" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@multiplayer-app/cli-darwin-arm64": "2.0.5", | ||
| "@multiplayer-app/cli-darwin-x64": "2.0.5", | ||
| "@multiplayer-app/cli-linux-x64": "2.0.5", | ||
| "@multiplayer-app/cli-linux-arm64": "2.0.5", | ||
| "@multiplayer-app/cli-windows-x64": "2.0.5", | ||
| "@multiplayer-app/cli-windows-arm64": "2.0.5" | ||
| }, | ||
| "license": "MIT", | ||
@@ -20,4 +28,10 @@ "devDependencies": { | ||
| "@anthropic-ai/sdk": "^0.78.0", | ||
| "@opentui/core": "0.1.93", | ||
| "@opentui/react": "0.1.93", | ||
| "@opentui/core": "0.1.96", | ||
| "@opentui/core-darwin-arm64": "0.1.96", | ||
| "@opentui/core-darwin-x64": "0.1.96", | ||
| "@opentui/core-linux-x64": "0.1.96", | ||
| "@opentui/core-linux-arm64": "0.1.96", | ||
| "@opentui/core-win32-x64": "0.1.96", | ||
| "@opentui/core-win32-arm64": "0.1.96", | ||
| "@opentui/react": "0.1.96", | ||
| "@sindresorhus/tsconfig": "^8.1.0", | ||
@@ -24,0 +38,0 @@ "@types/jsonwebtoken": "^9.0.10", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Yes
NaN14127
-99.98%6
Infinity%26
30%173
-84.73%4
300%2
100%