claude-code-templates 1.3.5 → 1.3.7
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 +2 -2
- package/src/file-operations.js +8 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test": "./test-commands.sh",
|
|
15
15
|
"test:detailed": "./test-detailed.sh",
|
|
16
16
|
"test:react": "make test-react",
|
|
17
|
-
"test:vue": "make test-vue",
|
|
17
|
+
"test:vue": "make test-vue",
|
|
18
18
|
"test:node": "make test-node",
|
|
19
19
|
"test:all": "make test",
|
|
20
20
|
"dev:link": "npm link",
|
package/src/file-operations.js
CHANGED
|
@@ -159,11 +159,14 @@ async function runPostInstallationValidation(targetDir, templateConfig) {
|
|
|
159
159
|
// Prepare validation prompt for Claude
|
|
160
160
|
const validationPrompt = createValidationPrompt(templateConfig);
|
|
161
161
|
|
|
162
|
-
// Run claude command with validation prompt
|
|
163
|
-
|
|
162
|
+
// Run claude command with validation prompt as a task
|
|
163
|
+
// Escape quotes in the prompt and create proper shell command
|
|
164
|
+
const escapedPrompt = validationPrompt.replace(/"/g, '\\"');
|
|
165
|
+
const claudeCommand = `claude "${escapedPrompt}"`;
|
|
166
|
+
|
|
167
|
+
const claudeProcess = spawn('sh', ['-c', claudeCommand], {
|
|
164
168
|
cwd: targetDir,
|
|
165
|
-
stdio: 'inherit'
|
|
166
|
-
shell: true
|
|
169
|
+
stdio: 'inherit'
|
|
167
170
|
});
|
|
168
171
|
|
|
169
172
|
claudeProcess.on('error', (error) => {
|
|
@@ -192,28 +195,8 @@ async function runPostInstallationValidation(targetDir, templateConfig) {
|
|
|
192
195
|
function createValidationPrompt(templateConfig) {
|
|
193
196
|
const language = templateConfig.language || 'unknown';
|
|
194
197
|
const framework = templateConfig.framework || 'none';
|
|
195
|
-
const commandCount = templateConfig.selectedCommands ? templateConfig.selectedCommands.length : 0;
|
|
196
|
-
const hookCount = templateConfig.selectedHooks ? templateConfig.selectedHooks.length : 0;
|
|
197
|
-
const mcpCount = templateConfig.selectedMCPs ? templateConfig.selectedMCPs.length : 0;
|
|
198
198
|
|
|
199
|
-
return `Please review
|
|
200
|
-
|
|
201
|
-
Configuration Summary:
|
|
202
|
-
- Language: ${language}
|
|
203
|
-
- Framework: ${framework}
|
|
204
|
-
- Commands installed: ${commandCount}
|
|
205
|
-
- Automation hooks: ${hookCount}
|
|
206
|
-
- MCP servers: ${mcpCount}
|
|
207
|
-
|
|
208
|
-
Please check:
|
|
209
|
-
1. Review the CLAUDE.md file and verify it matches the project requirements
|
|
210
|
-
2. Check .claude/settings.json for proper automation hook configuration
|
|
211
|
-
3. Verify .claude/commands/ contains the expected command files
|
|
212
|
-
4. Check .mcp.json for proper MCP server configuration
|
|
213
|
-
5. Ensure all configurations are appropriate for this ${language} project${framework !== 'none' ? ` using ${framework}` : ''}
|
|
214
|
-
6. Suggest any optimizations or improvements for this specific project setup
|
|
215
|
-
|
|
216
|
-
If everything looks good, provide a brief summary of the installation. If you find any issues or have suggestions for improvements, please let me know.`;
|
|
199
|
+
return `Please review the Claude Code Templates configuration that was just installed. Read and validate these specific files: CLAUDE.md, .claude/settings.json, .claude/commands/ directory contents, and .mcp.json. This is a ${language}${framework !== 'none' ? ` ${framework}` : ''} project. Confirm the configuration is correct and suggest any improvements for this specific setup.`;
|
|
217
200
|
}
|
|
218
201
|
|
|
219
202
|
async function processSettingsFile(sourcePath, destPath, templateConfig) {
|