@hanzlaa/rcode 3.4.12 → 3.4.14
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/cli/install.js +10 -10
- package/cli/postinstall.js +12 -13
- package/dist/rcode.js +3 -6
- package/package.json +1 -1
package/cli/install.js
CHANGED
|
@@ -1920,10 +1920,11 @@ async function install(opts) {
|
|
|
1920
1920
|
console.log('');
|
|
1921
1921
|
}
|
|
1922
1922
|
|
|
1923
|
-
// Count installed agents + commands dynamically (#190).
|
|
1924
|
-
// IDE
|
|
1925
|
-
//
|
|
1926
|
-
|
|
1923
|
+
// Count installed agents + commands dynamically (#190).
|
|
1924
|
+
// Prefer the 'claude' IDE paths for counting when claude is in the selected list —
|
|
1925
|
+
// that's what actually matters for Claude Code slash command availability.
|
|
1926
|
+
// Fall back to the first selected IDE only when claude isn't included.
|
|
1927
|
+
const primaryIde = opts.ides.includes('claude') ? 'claude' : opts.ides[0];
|
|
1927
1928
|
const idePaths = getPathsForIde(primaryIde, opts.target);
|
|
1928
1929
|
const agentsDir = idePaths.agentsDir;
|
|
1929
1930
|
const commandsDir = idePaths.commandsDir;
|
|
@@ -1933,12 +1934,11 @@ async function install(opts) {
|
|
|
1933
1934
|
agentCount = fs.readdirSync(agentsDir).filter(f => (f.startsWith('rihal-') || f.startsWith('rcode-')) && (f.endsWith('.md') || f.endsWith('.mdc'))).length;
|
|
1934
1935
|
}
|
|
1935
1936
|
if (fs.existsSync(commandsDir)) {
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
fs.rmSync(legacyColonDir, { recursive: true, force: true });
|
|
1937
|
+
// claude IDE names commands rihal-*.md; other IDEs use plain {name}.md inside a rihal/ subdir
|
|
1938
|
+
const commandFilter = primaryIde === 'claude'
|
|
1939
|
+
? f => f.startsWith('rihal-') && (f.endsWith('.md') || f.endsWith('.mdc'))
|
|
1940
|
+
: f => f.endsWith('.md') || f.endsWith('.mdc');
|
|
1941
|
+
commandCount = fs.readdirSync(commandsDir).filter(commandFilter).length;
|
|
1942
1942
|
}
|
|
1943
1943
|
} catch {}
|
|
1944
1944
|
|
package/cli/postinstall.js
CHANGED
|
@@ -49,18 +49,16 @@ const isGlobalInstall = (() => {
|
|
|
49
49
|
const globalTarget = path.join(os.homedir(), '.claude');
|
|
50
50
|
|
|
51
51
|
if (isGlobalInstall) {
|
|
52
|
-
//
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
})
|
|
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/dist/rcode.js
CHANGED
|
@@ -16415,7 +16415,7 @@ ${BLOCK}`);
|
|
|
16415
16415
|
console.log(dim(" To overwrite: re-run with --force-overwrite | To see full diffs: --show-diff"));
|
|
16416
16416
|
console.log("");
|
|
16417
16417
|
}
|
|
16418
|
-
const primaryIde = opts.ides[0];
|
|
16418
|
+
const primaryIde = opts.ides.includes("claude") ? "claude" : opts.ides[0];
|
|
16419
16419
|
const idePaths = getPathsForIde(primaryIde, opts.target);
|
|
16420
16420
|
const agentsDir = idePaths.agentsDir;
|
|
16421
16421
|
const commandsDir = idePaths.commandsDir;
|
|
@@ -16425,11 +16425,8 @@ ${BLOCK}`);
|
|
|
16425
16425
|
agentCount = fs2.readdirSync(agentsDir).filter((f) => (f.startsWith("rihal-") || f.startsWith("rcode-")) && (f.endsWith(".md") || f.endsWith(".mdc"))).length;
|
|
16426
16426
|
}
|
|
16427
16427
|
if (fs2.existsSync(commandsDir)) {
|
|
16428
|
-
|
|
16429
|
-
|
|
16430
|
-
const legacyColonDir = path2.join(opts.target, ".claude", "commands", "rihal");
|
|
16431
|
-
if (primaryIde === "claude" && fs2.existsSync(legacyColonDir)) {
|
|
16432
|
-
fs2.rmSync(legacyColonDir, { recursive: true, force: true });
|
|
16428
|
+
const commandFilter = primaryIde === "claude" ? (f) => f.startsWith("rihal-") && (f.endsWith(".md") || f.endsWith(".mdc")) : (f) => f.endsWith(".md") || f.endsWith(".mdc");
|
|
16429
|
+
commandCount = fs2.readdirSync(commandsDir).filter(commandFilter).length;
|
|
16433
16430
|
}
|
|
16434
16431
|
} catch {
|
|
16435
16432
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzlaa/rcode",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.14",
|
|
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": {
|