@silicaclaw/cli 1.0.0-beta.31 → 1.0.0-beta.32

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 CHANGED
@@ -27,6 +27,8 @@ silicaclaw stop
27
27
  silicaclaw update
28
28
  ```
29
29
 
30
+ The installed `silicaclaw` command uses `~/.silicaclaw/npm-cache` by default, so it does not depend on a clean `~/.npm` cache.
31
+
30
32
  Default network path:
31
33
 
32
34
  - mode: `global-preview`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silicaclaw/cli",
3
- "version": "1.0.0-beta.31",
3
+ "version": "1.0.0-beta.32",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -122,6 +122,10 @@ function userEnvFile() {
122
122
  return resolve(homedir(), ".silicaclaw", "env.sh");
123
123
  }
124
124
 
125
+ function userNpmCacheDir() {
126
+ return resolve(homedir(), ".silicaclaw", "npm-cache");
127
+ }
128
+
125
129
  function ensureLineInFile(filePath, block) {
126
130
  try {
127
131
  const current = existsSync(filePath) ? readFileSync(filePath, "utf8") : "";
@@ -190,9 +194,11 @@ function installPersistentCommand() {
190
194
  const binDir = userShimDir();
191
195
  const shimPath = userShimPath();
192
196
  const envFile = userEnvFile();
197
+ const npmCacheDir = userNpmCacheDir();
193
198
  const envBlock = [
194
199
  "#!/usr/bin/env bash",
195
200
  'export PATH="$HOME/.silicaclaw/bin:$PATH"',
201
+ 'export npm_config_cache="$HOME/.silicaclaw/npm-cache"',
196
202
  "",
197
203
  ].join("\n");
198
204
  const rcBlock = [
@@ -202,12 +208,14 @@ function installPersistentCommand() {
202
208
  ].join("\n");
203
209
 
204
210
  mkdirSync(binDir, { recursive: true });
211
+ mkdirSync(npmCacheDir, { recursive: true });
205
212
  writeFileSync(envFile, envBlock, { encoding: "utf8", mode: 0o755 });
206
213
  writeFileSync(
207
214
  shimPath,
208
215
  [
209
216
  "#!/usr/bin/env bash",
210
217
  "set -euo pipefail",
218
+ 'export npm_config_cache="${npm_config_cache:-$HOME/.silicaclaw/npm-cache}"',
211
219
  'exec npx -y @silicaclaw/cli@beta "$@"',
212
220
  "",
213
221
  ].join("\n"),