mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2026-05-30 08:15:38 +08:00
Replace shell-based install with in-process binary downloader
Fetches the platform-specific native binary directly — npm registry first (sha512-verified tarball, streamed through a minimal in-tree tar parser) with the Anthropic CDN as a fallback (sha256-verified raw binary). Writes to context.globalStorageUri/bin/claude[.exe] and auto-sets executable.path so there's no PATH, sudo, PowerShell execution-policy, npm EACCES, or Node-version failure modes left. Adds typed DownloaderError codes (UNSUPPORTED_PLATFORM / NETWORK / INTEGRITY / WRITE / CANCELLED / AGGREGATE) and threads source / version / npmCode / cdnCode into analytics so install failures are finally bucketable instead of collapsed under "the shell command failed". Error messages are scrubbed of user paths to keep analytics PII-free. Fixes a Windows path-with-spaces edge case by skipping cmd.exe shell wrapping when spawning claude with an absolute executable.path. Ships 28 tests: 24 unit (tar parser, platform detection, error helpers) and 4 integration that hit real npm + real CDN end-to-end. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "claude-code-chat",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "claude-code-chat",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
"devDependencies": {
|
||||
"@types/mocha": "^10.0.10",
|
||||
|
||||
Reference in New Issue
Block a user