@hanzlaa/rcode 3.4.12 → 3.4.13

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 (2) hide show
  1. package/cli/postinstall.js +12 -13
  2. package/package.json +1 -1
@@ -49,18 +49,16 @@ const isGlobalInstall = (() => {
49
49
  const globalTarget = path.join(os.homedir(), '.claude');
50
50
 
51
51
  if (isGlobalInstall) {
52
- // Run the global install in the background so npm output isn't blocked
53
- const { install } = require('./install.js');
54
- install({
55
- target: globalTarget,
56
- ides: ['claude'],
57
- ide: 'claude',
58
- yes: true,
59
- noPrompt: true,
60
- commitPlanning: false,
61
- global: true, // signal: skip per-project artifacts (STATE.md, ROADMAP.md, .planning/)
62
- silent: false,
63
- }).then((code) => {
52
+ // Spawn dist/rcode.js (fully bundled no devDep requires) to do the global
53
+ // install. Calling cli/install.js directly fails in global npm installs because
54
+ // devDependencies (picocolors, semver, etc.) are not installed for global packages.
55
+ const { spawn } = require('child_process');
56
+ const distCli = path.join(__dirname, '..', 'dist', 'rcode.js');
57
+ const child = spawn(process.execPath, [distCli, 'install', '--global', '--yes', '--no-prompt'], {
58
+ stdio: 'inherit',
59
+ env: { ...process.env },
60
+ });
61
+ child.on('close', (code) => {
64
62
  if (code === 0) {
65
63
  console.log(`\n✓ Rihal commands + skills installed globally → ${globalTarget}`);
66
64
  console.log(' All /rihal-* commands are now available in every project.\n');
@@ -68,7 +66,8 @@ if (isGlobalInstall) {
68
66
  console.warn(`\n⚠ Global auto-install exited with code ${code}. Run 'rcode install' manually if needed.\n`);
69
67
  }
70
68
  printWelcome();
71
- }).catch((err) => {
69
+ });
70
+ child.on('error', (err) => {
72
71
  console.warn(`\n⚠ Global auto-install failed: ${err.message}`);
73
72
  console.warn(' Run "rcode install" manually to set up rihal commands.\n');
74
73
  printWelcome();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzlaa/rcode",
3
- "version": "3.4.12",
3
+ "version": "3.4.13",
4
4
  "description": "rcode — the memory bank for AI-driven SaaS teams. Persistent project context, distinctive engineering personas, and phase-based workflows. Built by Rihal. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {