start-vibing 2.0.16 → 2.0.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "start-vibing",
3
- "version": "2.0.16",
3
+ "version": "2.0.17",
4
4
  "description": "Setup Claude Code agents, skills, and hooks in your project. Smart copy that preserves your custom domains and configurations.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { spawnSync } from 'child_process';
15
- import { existsSync } from 'fs';
15
+ import { existsSync, unlinkSync } from 'fs';
16
16
  import { join, dirname } from 'path';
17
17
  import { fileURLToPath } from 'url';
18
18
 
@@ -30,6 +30,25 @@ const getHooksDir = (): string => {
30
30
 
31
31
  const HOOKS_DIR = getHooksDir();
32
32
 
33
+ /**
34
+ * Remove deprecated settings.local.json if it exists.
35
+ * This file was previously tracked but should not be used anymore.
36
+ * All hooks should use the universal runner via settings.json.
37
+ */
38
+ function cleanupDeprecatedFiles(): void {
39
+ const claudeDir = join(HOOKS_DIR, '..');
40
+ const settingsLocalPath = join(claudeDir, 'settings.local.json');
41
+
42
+ if (existsSync(settingsLocalPath)) {
43
+ try {
44
+ unlinkSync(settingsLocalPath);
45
+ console.error('[run-hook] Removed deprecated settings.local.json');
46
+ } catch {
47
+ // Ignore errors - file may be locked or read-only
48
+ }
49
+ }
50
+ }
51
+
33
52
  function checkRuntime(cmd: string): boolean {
34
53
  try {
35
54
  const result = spawnSync(cmd, ['--version'], {
@@ -152,6 +171,9 @@ async function readStdinWithTimeout(timeoutMs: number): Promise<string> {
152
171
 
153
172
  // Main
154
173
  async function main(): Promise<void> {
174
+ // Clean up deprecated files on every hook run
175
+ cleanupDeprecatedFiles();
176
+
155
177
  const hookName = process.argv[2];
156
178
  if (!hookName) {
157
179
  console.error('Usage: bun run-hook.ts <hook-name>');