@peer-agent/cli 0.0.5 → 0.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.
- package/README.md +5 -3
- package/lib/install-binary.mjs +2 -2
- package/lib/platform.mjs +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -49,7 +49,8 @@ Press **Y** or **Enter** to confirm, or **N** / **Esc** to dismiss. Restart `pee
|
|
|
49
49
|
| Platform | Archive | Notes |
|
|
50
50
|
|----------|---------|-------|
|
|
51
51
|
| macOS arm64 | `peer-darwin-arm64.tar.gz` | First-class |
|
|
52
|
-
|
|
|
52
|
+
| Linux x64 | `peer-linux-x64.tar.gz` | First-class |
|
|
53
|
+
| other | — | recognized in the installer matrix; postinstall fails clearly until that Release asset ships |
|
|
53
54
|
|
|
54
55
|
## Environment variables
|
|
55
56
|
|
|
@@ -67,6 +68,7 @@ Inside this repository, `postinstall` **does not** download binaries by default
|
|
|
67
68
|
```bash
|
|
68
69
|
pnpm --filter @peer-agent/tui build
|
|
69
70
|
./apps/tui/dist/peer --version
|
|
71
|
+
node scripts/package-cli-archive.mjs linux-x64 # → cli-dist/peer-linux-x64.tar.gz
|
|
70
72
|
```
|
|
71
73
|
|
|
72
74
|
To force the installer path locally:
|
|
@@ -80,8 +82,8 @@ PEER_AGENT_FORCE_DOWNLOAD=1 node packages/npm-cli/scripts/postinstall.mjs
|
|
|
80
82
|
From the GitHub Release for the same version:
|
|
81
83
|
|
|
82
84
|
```bash
|
|
83
|
-
tar -xzf peer-darwin-arm64.tar.gz
|
|
84
|
-
export PATH="$PWD/peer-
|
|
85
|
+
tar -xzf peer-linux-x64.tar.gz # or peer-darwin-arm64.tar.gz on macOS arm64
|
|
86
|
+
export PATH="$PWD/peer-linux-x64:$PATH"
|
|
85
87
|
peer --version
|
|
86
88
|
```
|
|
87
89
|
|
package/lib/install-binary.mjs
CHANGED
|
@@ -87,7 +87,7 @@ export async function installBinary(options) {
|
|
|
87
87
|
if (!response.ok) {
|
|
88
88
|
throw new Error(
|
|
89
89
|
`Failed to download CLI archive (${response.status} ${response.statusText}): ${url}\n` +
|
|
90
|
-
|
|
90
|
+
`Check that this version published ${target.archive} on GitHub Releases.`,
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -159,7 +159,7 @@ function extractArchive(archivePath, extractDir, archiveName) {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
|
-
* Walk extract tree for peer + helper (archive may nest peer
|
|
162
|
+
* Walk extract tree for peer + helper (archive may nest peer-<platform>-<arch>/).
|
|
163
163
|
* @param {string} dir
|
|
164
164
|
* @returns {{ peer: string | null, helper: string | null }}
|
|
165
165
|
*/
|
package/lib/platform.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Map Node process.platform / process.arch to the GitHub Release CLI archive name.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* First-class Release assets: peer-darwin-arm64.tar.gz, peer-linux-x64.tar.gz.
|
|
5
|
+
* Other keys stay recognized so installers fail with a precise
|
|
6
|
+
* "not yet published" message instead of inventing a wrong URL.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/** @typedef {{ os: string, arch: string, archive: string, supported: boolean }} PlatformTarget */
|
|
@@ -31,7 +31,7 @@ const TARGETS = {
|
|
|
31
31
|
os: 'linux',
|
|
32
32
|
arch: 'x64',
|
|
33
33
|
archive: 'peer-linux-x64.tar.gz',
|
|
34
|
-
supported:
|
|
34
|
+
supported: true,
|
|
35
35
|
},
|
|
36
36
|
'win32-x64': {
|
|
37
37
|
os: 'win32',
|