@rigstate/cli 0.6.3 → 0.6.8
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/dist/index.cjs +1381 -1088
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1379 -1079
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/daemon.ts +129 -0
- package/src/commands/env.ts +116 -112
- package/src/commands/idea.ts +78 -0
- package/src/commands/link.ts +79 -1
- package/src/commands/login.ts +46 -27
- package/src/commands/suggest.ts +67 -0
- package/src/commands/sync-rules.ts +77 -153
- package/src/commands/work.ts +168 -161
- package/src/daemon/file-watcher.ts +37 -14
- package/src/index.ts +3 -0
|
@@ -36,27 +36,50 @@ export function createFileWatcher(watchPath: string): FileWatcher {
|
|
|
36
36
|
const absolutePath = path.resolve(process.cwd(), watchPath);
|
|
37
37
|
|
|
38
38
|
watcher = chokidar.watch(absolutePath, {
|
|
39
|
-
ignored: (
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
ignored: (absolutePath) => {
|
|
40
|
+
// Get relative path for cleaner matching
|
|
41
|
+
const relPath = path.relative(process.cwd(), absolutePath);
|
|
42
|
+
|
|
43
|
+
// Common directories to ignore (exact matches on path segments)
|
|
44
|
+
const ignoredDirs = new Set([
|
|
45
|
+
'node_modules',
|
|
46
|
+
'.git',
|
|
47
|
+
'.next',
|
|
48
|
+
'.turbo',
|
|
49
|
+
'dist',
|
|
50
|
+
'build',
|
|
51
|
+
'.rigstate',
|
|
52
|
+
'coverage',
|
|
53
|
+
'.DS_Store',
|
|
54
|
+
'tmp',
|
|
55
|
+
'temp',
|
|
56
|
+
'vendor',
|
|
57
|
+
'.cache',
|
|
58
|
+
'public' // Usually static assets, not code
|
|
59
|
+
]);
|
|
60
|
+
|
|
61
|
+
// Check if any segment of the path matches an ignored directory
|
|
62
|
+
const segments = relPath.split(path.sep);
|
|
63
|
+
if (segments.some(s => ignoredDirs.has(s))) {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Ignore dotfiles (except .env maybe, but for now safe to ignore secret/config files)
|
|
68
|
+
// Actually, let's keep .cursorrules and similar if needed, but generally ignore hidden
|
|
69
|
+
// if (path.basename(absolutePath).startsWith('.') && !segments.some(s => s === '.cursor')) return true;
|
|
70
|
+
|
|
48
71
|
return false;
|
|
49
72
|
},
|
|
50
73
|
persistent: true,
|
|
51
74
|
ignoreInitial: true,
|
|
52
|
-
|
|
75
|
+
ignorePermissionErrors: true, // Don't crash on EPERM
|
|
76
|
+
depth: 20,
|
|
53
77
|
awaitWriteFinish: {
|
|
54
|
-
stabilityThreshold:
|
|
78
|
+
stabilityThreshold: 300,
|
|
55
79
|
pollInterval: 100
|
|
56
80
|
},
|
|
57
|
-
usePolling: false,
|
|
58
|
-
|
|
59
|
-
binaryInterval: 1000
|
|
81
|
+
usePolling: false,
|
|
82
|
+
atomic: true // Handle atomic writes (like vim/saving) better
|
|
60
83
|
});
|
|
61
84
|
|
|
62
85
|
watcher.on('change', (filePath: string) => {
|
package/src/index.ts
CHANGED
|
@@ -23,6 +23,8 @@ import { createOverrideCommand } from './commands/override.js';
|
|
|
23
23
|
import { checkVersion } from './utils/version.js';
|
|
24
24
|
import dotenv from 'dotenv';
|
|
25
25
|
|
|
26
|
+
import { createIdeaCommand } from './commands/idea.js';
|
|
27
|
+
|
|
26
28
|
// Load environment variables
|
|
27
29
|
dotenv.config();
|
|
28
30
|
|
|
@@ -52,6 +54,7 @@ program.addCommand(createMcpCommand());
|
|
|
52
54
|
program.addCommand(createNexusCommand());
|
|
53
55
|
program.addCommand(createSyncRulesCommand());
|
|
54
56
|
program.addCommand(createOverrideCommand());
|
|
57
|
+
program.addCommand(createIdeaCommand());
|
|
55
58
|
|
|
56
59
|
program.hook('preAction', async () => {
|
|
57
60
|
await checkVersion();
|