claude-devkit-cli 1.2.3 → 1.2.4
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
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"use strict";
|
|
12
12
|
|
|
13
13
|
const fs = require("fs");
|
|
14
|
+
const path = require("path");
|
|
14
15
|
|
|
15
16
|
// Patterns that indicate lazy placeholder comments (case-insensitive)
|
|
16
17
|
const PLACEHOLDER_PATTERNS = [
|
|
@@ -63,6 +64,10 @@ function main() {
|
|
|
63
64
|
process.exit(0);
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
// Skip files outside the project directory (e.g. ~/.claude/plans/)
|
|
68
|
+
const filePath = payload.tool_input?.file_path;
|
|
69
|
+
if (filePath && !path.resolve(filePath).startsWith(process.cwd())) process.exit(0);
|
|
70
|
+
|
|
66
71
|
const oldStr = payload.tool_input?.old_string;
|
|
67
72
|
const newStr = payload.tool_input?.new_string;
|
|
68
73
|
|
|
@@ -59,6 +59,10 @@ function main() {
|
|
|
59
59
|
const filePath = payload.tool_input?.file_path;
|
|
60
60
|
if (!filePath) process.exit(0);
|
|
61
61
|
|
|
62
|
+
// Skip files outside the project directory (e.g. ~/.claude/plans/)
|
|
63
|
+
const projectDir = process.cwd();
|
|
64
|
+
if (!path.resolve(filePath).startsWith(projectDir)) process.exit(0);
|
|
65
|
+
|
|
62
66
|
// Skip excluded patterns
|
|
63
67
|
if (matchesExclude(filePath)) process.exit(0);
|
|
64
68
|
|