claude-phone-local 2.0.2 → 2.0.3
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { execSync } from 'child_process';
|
|
1
|
+
import { execSync, execFileSync } from 'child_process';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Check disk space availability
|
|
@@ -80,6 +80,34 @@ function getDiskSpace(platform) {
|
|
|
80
80
|
const availableKB = parseInt(parts[3], 10);
|
|
81
81
|
return availableKB * 1024; // Convert KB to bytes
|
|
82
82
|
}
|
|
83
|
+
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (platform.os === 'win32') {
|
|
88
|
+
// Check the drive the CLI's config directory (~/.claude-phone) lives on,
|
|
89
|
+
// since that's where the ./data volume actually gets written - not
|
|
90
|
+
// necessarily the same drive as the OS install.
|
|
91
|
+
const driveLetter = (process.env.USERPROFILE || process.env.HOMEDRIVE || 'C:')
|
|
92
|
+
.slice(0, 2)
|
|
93
|
+
.toUpperCase();
|
|
94
|
+
|
|
95
|
+
// wmic is deprecated but still present on every supported Windows
|
|
96
|
+
// release; avoids a PowerShell startup cost on every prereq check.
|
|
97
|
+
// execFileSync (argument array, no shell) - driveLetter is untrusted
|
|
98
|
+
// env-derived input, so it must not be interpolated into a shell string.
|
|
99
|
+
const output = execFileSync(
|
|
100
|
+
'wmic',
|
|
101
|
+
['logicaldisk', 'where', `DeviceID='${driveLetter}'`, 'get', 'FreeSpace', '/value'],
|
|
102
|
+
{ encoding: 'utf-8', stdio: 'pipe' }
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const match = output.match(/FreeSpace=(\d+)/);
|
|
106
|
+
if (match) {
|
|
107
|
+
return parseInt(match[1], 10);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return null;
|
|
83
111
|
}
|
|
84
112
|
|
|
85
113
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-phone-local",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Local/offline fork of NetworkChuck's claude-phone: talk to Claude Code over 3CX/SIP with faster-whisper STT + Piper TTS in one Docker container.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|