@syengup/friday-channel-next 0.0.14 → 0.0.15

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/install.js +10 -1
  2. package/install.sh +9 -1
  3. package/package.json +1 -1
package/install.js CHANGED
@@ -59,6 +59,15 @@ if (!PKG) {
59
59
  process.exit(1);
60
60
  }
61
61
 
62
+ // Auto-detect best registry (if npmjs.org is unreachable, use npmmirror)
63
+ let registryFlag = "";
64
+ try {
65
+ execSync('curl -s --connect-timeout 3 --max-time 5 https://registry.npmjs.org/ >/dev/null 2>&1');
66
+ } catch {
67
+ warn("Default registry unreachable, using https://registry.npmmirror.com");
68
+ registryFlag = "--registry=https://registry.npmmirror.com";
69
+ }
70
+
62
71
  if (!existsSync(OPENCLAW_CONFIG)) {
63
72
  err(`OpenClaw config not found at ${OPENCLAW_CONFIG}`);
64
73
  err("Make sure OpenClaw is installed and has been run at least once.");
@@ -94,7 +103,7 @@ process.chdir(PLUGIN_DIR);
94
103
  // --------------- install + build ---------------
95
104
 
96
105
  log("Installing dependencies...");
97
- execSync(`${PKG} install`, { stdio: "inherit" });
106
+ execSync(`${PKG} install ${registryFlag}`, { stdio: "inherit" });
98
107
 
99
108
  log("Building TypeScript...");
100
109
  execSync(`${PKG} run build`, { stdio: "inherit" });
package/install.sh CHANGED
@@ -39,6 +39,14 @@ else
39
39
  exit 1
40
40
  fi
41
41
 
42
+ # Auto-detect best registry (if npmjs.org is unreachable, use npmmirror)
43
+ if curl -s --connect-timeout 3 https://registry.npmjs.org/ >/dev/null 2>&1; then
44
+ REGISTRY=""
45
+ else
46
+ warn "Default registry unreachable, using https://registry.npmmirror.com"
47
+ REGISTRY="--registry=https://registry.npmmirror.com"
48
+ fi
49
+
42
50
  if [ ! -f "$OPENCLAW_CONFIG" ]; then
43
51
  err "OpenClaw config not found at $OPENCLAW_CONFIG"
44
52
  err "Make sure OpenClaw is installed and has been run at least once."
@@ -58,7 +66,7 @@ fi
58
66
  cd "$PLUGIN_DIR"
59
67
 
60
68
  log "Installing dependencies..."
61
- $PKG install
69
+ $PKG install $REGISTRY
62
70
 
63
71
  log "Building TypeScript..."
64
72
  $PKG run build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syengup/friday-channel-next",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "OpenClaw Friday Next Apple channel plugin",
5
5
  "type": "module",
6
6
  "files": [