@apexacc/cli 1.5.82 → 1.5.84

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.
Files changed (3) hide show
  1. package/apex.cjs +8 -4
  2. package/bin/apex +1 -2
  3. package/package.json +2 -2
package/apex.cjs CHANGED
@@ -13,23 +13,27 @@ const BIN_PATH = join(BIN_DIR, isWin ? 'apex.exe' : 'apex')
13
13
 
14
14
  function getPlatformTarget() {
15
15
  const p = process.platform, a = process.arch
16
- if (p === 'linux' && a === 'x64') return 'linux-x64'
17
16
  if (p === 'darwin' && a === 'arm64') return 'darwin-arm64'
18
17
  if (p === 'darwin' && a === 'x64') return 'darwin-x64'
19
18
  if (p === 'win32' && a === 'x64') return 'windows-x64'
20
- throw new Error(`Unsupported: ${p}-${a}`)
19
+ throw new Error(`Unsupported platform: ${p}-${a}. Currently supported: macOS (arm64, x64), Windows (x64).`)
21
20
  }
22
21
 
23
22
  function download(url, dest) {
24
23
  return new Promise((resolve, reject) => {
25
24
  const file = createWriteStream(dest)
25
+ const cleanup = (err) => {
26
+ file.close()
27
+ try { require('fs').unlinkSync(dest) } catch {}
28
+ reject(err)
29
+ }
26
30
  const req = (u) => {
27
31
  https.get(u, { headers: { 'User-Agent': 'apex-installer' } }, (res) => {
28
32
  if (res.statusCode === 301 || res.statusCode === 302) { req(res.headers.location); return }
29
- if (res.statusCode !== 200) { reject(new Error(`HTTP ${res.statusCode}`)); return }
33
+ if (res.statusCode !== 200) { cleanup(new Error(`HTTP ${res.statusCode}`)); return }
30
34
  res.pipe(file)
31
35
  file.on('finish', () => { file.close(); resolve() })
32
- }).on('error', reject)
36
+ }).on('error', cleanup)
33
37
  }
34
38
  req(url)
35
39
  })
package/bin/apex CHANGED
@@ -13,11 +13,10 @@ const BIN_PATH = join(BIN_DIR, isWin ? 'apex.exe' : 'apex')
13
13
 
14
14
  function getPlatformTarget() {
15
15
  const p = process.platform, a = process.arch
16
- if (p === 'linux' && a === 'x64') return 'linux-x64'
17
16
  if (p === 'darwin' && a === 'arm64') return 'darwin-arm64'
18
17
  if (p === 'darwin' && a === 'x64') return 'darwin-x64'
19
18
  if (p === 'win32' && a === 'x64') return 'windows-x64'
20
- throw new Error(`Unsupported: ${p}-${a}`)
19
+ throw new Error(`Unsupported platform: ${p}-${a}. Currently supported: macOS (arm64, x64), Windows (x64).`)
21
20
  }
22
21
 
23
22
  function download(url, dest) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexacc/cli",
3
- "version": "1.5.82",
3
+ "version": "1.5.84",
4
4
  "description": "Apex Copilot CLI — AI advisor for Web3 founders",
5
5
  "homepage": "https://arena.apexaccs.org/dashboard/pilot",
6
6
  "author": "Apex Foundation",
@@ -77,5 +77,5 @@
77
77
  "README.md"
78
78
  ],
79
79
  "peerDependencies": {},
80
- "releaseVersion": "1.5.82"
80
+ "releaseVersion": "1.5.84"
81
81
  }