mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-28 09:53:36 +00:00
fix(hooks): init command now fixes invalid schema and hook names
- Fixes $schema to correct URL - Removes invalid Start/End hooks (renamed to SessionStart/Stop) - Preserves other existing settings when merging Bumps to v0.1.43 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
6e9cb87493
commit
5e5841925a
2 changed files with 10 additions and 1 deletions
|
|
@ -2275,6 +2275,15 @@ hooksCmd.command('init').description('Initialize hooks in current project').opti
|
|||
if (fs.existsSync(settingsPath) && !opts.force) {
|
||||
try { settings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8')); } catch {}
|
||||
}
|
||||
// Fix schema if present
|
||||
if (settings.$schema) {
|
||||
settings.$schema = 'https://json.schemastore.org/claude-code-settings.json';
|
||||
}
|
||||
// Clean up invalid hook names
|
||||
if (settings.hooks) {
|
||||
if (settings.hooks.Start) { delete settings.hooks.Start; }
|
||||
if (settings.hooks.End) { delete settings.hooks.End; }
|
||||
}
|
||||
settings.hooks = settings.hooks || {};
|
||||
settings.hooks.PreToolUse = [
|
||||
{ matcher: 'Edit|Write|MultiEdit', hooks: [{ type: 'command', command: 'npx ruvector hooks pre-edit "$TOOL_INPUT_file_path"' }] },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ruvector",
|
||||
"version": "0.1.42",
|
||||
"version": "0.1.43",
|
||||
"description": "High-performance vector database for Node.js with automatic native/WASM fallback",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue