@codihaus/claude-skills 1.6.0 → 1.6.2

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": "@codihaus/claude-skills",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Claude Code skills for software development workflow",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -41,6 +41,7 @@ import {
41
41
 
42
42
  export async function init(options) {
43
43
  const projectPath = process.cwd();
44
+ let globalDeps = null; // Declare at function level for later use
44
45
 
45
46
  console.log(chalk.bold('\nšŸš€ Claude Skills Initialization\n'));
46
47
  console.log(chalk.gray(`Project: ${projectPath}\n`));
@@ -48,7 +49,7 @@ export async function init(options) {
48
49
  // Step 1: Check global dependencies
49
50
  if (!options.noDeps) {
50
51
  const spinner = ora('Checking system dependencies...').start();
51
- const globalDeps = await checkGlobalDeps();
52
+ globalDeps = await checkGlobalDeps();
52
53
  spinner.stop();
53
54
 
54
55
  printDepsReport(globalDeps);
@@ -78,16 +79,22 @@ export async function init(options) {
78
79
 
79
80
  // Offer to install missing Python packages (only if Python is installed)
80
81
  const missingPython = globalDeps.python?.filter(p => !p.installed) || [];
81
- if (hasPython && hasPip && missingPython.length > 0 && !options.yes) {
82
- const { installPython } = await inquirer.prompt([{
83
- type: 'confirm',
84
- name: 'installPython',
85
- message: `Install missing Python packages (${missingPython.map(p => p.name).join(', ')})? (will try --user first, then sudo if needed)`,
86
- default: true
87
- }]);
88
-
89
- if (installPython) {
82
+ if (hasPython && hasPip && missingPython.length > 0) {
83
+ if (options.yes) {
84
+ // Auto-install when --yes flag is used
85
+ console.log(chalk.cyan(`\nAuto-installing Python packages: ${missingPython.map(p => p.name).join(', ')}`));
90
86
  await installPythonDeps(missingPython);
87
+ } else {
88
+ const { installPython } = await inquirer.prompt([{
89
+ type: 'confirm',
90
+ name: 'installPython',
91
+ message: `Install missing Python packages (${missingPython.map(p => p.name).join(', ')})? (will try --user first, then sudo if needed)`,
92
+ default: true
93
+ }]);
94
+
95
+ if (installPython) {
96
+ await installPythonDeps(missingPython);
97
+ }
91
98
  }
92
99
  } else if (missingPython.length > 0 && (!hasPython || !hasPip)) {
93
100
  console.log(chalk.yellow('\nāš ļø Python packages are needed but Python/pip is not available.'));