@multiplayer-app/cli 2.0.5 → 2.0.6

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.
@@ -0,0 +1,7 @@
1
+
2
+ 
3
+ > @multiplayer-app/cli@2.0.5 build /Users/dima/Projects/multiplayer-debugger-javascript/packages/cli
4
+ > bun build src/index.tsx --compile --outfile dist/multiplayer-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/x64/') --sourcemap=none
5
+
6
+ [219ms] bundle 908 modules
7
+ [319ms] compile dist/multiplayer-darwin-arm64
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ import { execFileSync } from 'child_process'
3
+ import { existsSync } from 'fs'
4
+ import { fileURLToPath } from 'url'
5
+ import path from 'path'
6
+
7
+ const PLATFORM_MAP = { darwin: 'darwin', linux: 'linux', win32: 'windows' }
8
+ const ARCH_MAP = { x64: 'x64', arm64: 'arm64' }
9
+
10
+ const platform = PLATFORM_MAP[process.platform]
11
+ const arch = ARCH_MAP[process.arch]
12
+
13
+ if (!platform || !arch) {
14
+ process.stderr.write(`Unsupported platform: ${process.platform}-${process.arch}\n`)
15
+ process.exit(1)
16
+ }
17
+
18
+ const pkgName = `@multiplayer-app/cli-${platform}-${arch}`
19
+ const binName = process.platform === 'win32' ? 'multiplayer.exe' : 'multiplayer'
20
+
21
+ // Walk up from this file looking for the binary in node_modules
22
+ function findBinary() {
23
+ if (process.env.MULTIPLAYER_BIN_PATH) return process.env.MULTIPLAYER_BIN_PATH
24
+
25
+ let dir = path.dirname(fileURLToPath(import.meta.url))
26
+ while (true) {
27
+ const candidate = path.join(dir, 'node_modules', pkgName, binName)
28
+ if (existsSync(candidate)) return candidate
29
+ const parent = path.dirname(dir)
30
+ if (parent === dir) break
31
+ dir = parent
32
+ }
33
+
34
+ // Fallback: sibling dist/ for local dev
35
+ const devBin = path.join(path.dirname(fileURLToPath(import.meta.url)), '..', 'dist', `${platform}-${arch}`, binName)
36
+ if (existsSync(devBin)) return devBin
37
+
38
+ return null
39
+ }
40
+
41
+ const bin = findBinary()
42
+ if (!bin) {
43
+ process.stderr.write(
44
+ `Could not find binary for ${platform}-${arch}.\n` +
45
+ `Try reinstalling: npm install -g @multiplayer-app/cli\n`
46
+ )
47
+ process.exit(1)
48
+ }
49
+
50
+ execFileSync(bin, process.argv.slice(2), { stdio: 'inherit' })
package/package.json CHANGED
@@ -1,24 +1,38 @@
1
1
  {
2
2
  "name": "@multiplayer-app/cli",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Multiplayer CLI",
5
+ "type": "module",
5
6
  "bin": {
6
- "multiplayer": "./dist/index.js"
7
+ "multiplayer": "./bin/multiplayer.js"
7
8
  },
8
9
  "scripts": {
9
- "build": "bun build src/index.tsx --compile --outfile dist/index.js --sourcemap=none",
10
- "start": "bun dist/index.js",
10
+ "build": "bun run scripts/build.ts",
11
+ "publish": "bun run scripts/publish.ts",
11
12
  "dev": "bun src/index.tsx",
12
13
  "typecheck": "tsc --noEmit",
13
- "lint": "eslint src/**/*.ts --config eslint.config.js",
14
- "prepublishOnly": "npm run build"
14
+ "lint": "eslint src/**/*.ts --config eslint.config.js"
15
+ },
16
+ "optionalDependencies": {
17
+ "@multiplayer-app/cli-darwin-arm64": "2.0.5",
18
+ "@multiplayer-app/cli-darwin-x64": "2.0.5",
19
+ "@multiplayer-app/cli-linux-x64": "2.0.5",
20
+ "@multiplayer-app/cli-linux-arm64": "2.0.5",
21
+ "@multiplayer-app/cli-windows-x64": "2.0.5",
22
+ "@multiplayer-app/cli-windows-arm64": "2.0.5"
15
23
  },
16
24
  "license": "MIT",
17
25
  "devDependencies": {
18
26
  "@anthropic-ai/claude-agent-sdk": "0.2.89",
19
27
  "@anthropic-ai/sdk": "^0.78.0",
20
- "@opentui/core": "0.1.93",
21
- "@opentui/react": "0.1.93",
28
+ "@opentui/core": "0.1.96",
29
+ "@opentui/core-darwin-arm64": "0.1.96",
30
+ "@opentui/core-darwin-x64": "0.1.96",
31
+ "@opentui/core-linux-x64": "0.1.96",
32
+ "@opentui/core-linux-arm64": "0.1.96",
33
+ "@opentui/core-win32-x64": "0.1.96",
34
+ "@opentui/core-win32-arm64": "0.1.96",
35
+ "@opentui/react": "0.1.96",
22
36
  "@sindresorhus/tsconfig": "^8.1.0",
23
37
  "@types/jsonwebtoken": "^9.0.10",
24
38
  "@types/node": "25.5.0",
package/dist/index.js DELETED
Binary file