design-clone 1.0.0 → 1.0.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/bin/commands/init.js +40 -5
- package/bin/commands/verify.js +6 -6
- package/package.json +1 -1
package/bin/commands/init.js
CHANGED
|
@@ -107,12 +107,47 @@ export async function init(args) {
|
|
|
107
107
|
// Python dependencies
|
|
108
108
|
if (checks.python.ok) {
|
|
109
109
|
console.log('Installing Python dependencies...');
|
|
110
|
+
|
|
111
|
+
// Check if google-genai already installed
|
|
112
|
+
let alreadyInstalled = false;
|
|
110
113
|
try {
|
|
111
|
-
await exec('
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
await exec('python3 -c "import google.genai"');
|
|
115
|
+
alreadyInstalled = true;
|
|
116
|
+
console.log(' Python packages already available');
|
|
117
|
+
} catch {
|
|
118
|
+
// Need to install
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (!alreadyInstalled) {
|
|
122
|
+
const HOME = process.env.HOME || process.env.USERPROFILE || '';
|
|
123
|
+
const sharedVenvPip = path.join(HOME, '.claude/skills/.venv/bin/pip');
|
|
124
|
+
|
|
125
|
+
// Try installation methods in order of preference
|
|
126
|
+
const pipCommands = [
|
|
127
|
+
{ cmd: `"${sharedVenvPip}" install google-genai`, name: 'shared venv' },
|
|
128
|
+
{ cmd: 'pip3 install --user google-genai', name: 'pip3 --user' },
|
|
129
|
+
{ cmd: 'pip install --user google-genai', name: 'pip --user' }
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
let installed = false;
|
|
133
|
+
for (const { cmd, name } of pipCommands) {
|
|
134
|
+
try {
|
|
135
|
+
await exec(cmd);
|
|
136
|
+
console.log(` Python packages installed via ${name}`);
|
|
137
|
+
installed = true;
|
|
138
|
+
break;
|
|
139
|
+
} catch {
|
|
140
|
+
// Try next method
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (!installed) {
|
|
145
|
+
console.warn(' Warning: Could not install Python packages automatically');
|
|
146
|
+
console.warn(' Try one of these manually:');
|
|
147
|
+
console.warn(` ${sharedVenvPip} install google-genai`);
|
|
148
|
+
console.warn(' pip3 install --user google-genai');
|
|
149
|
+
console.warn(' pip3 install --break-system-packages google-genai');
|
|
150
|
+
}
|
|
116
151
|
}
|
|
117
152
|
}
|
|
118
153
|
}
|
package/bin/commands/verify.js
CHANGED
|
@@ -30,12 +30,12 @@ export async function verify() {
|
|
|
30
30
|
// Check required files
|
|
31
31
|
const requiredFiles = [
|
|
32
32
|
'SKILL.md',
|
|
33
|
-
'
|
|
34
|
-
'filter-css.js',
|
|
35
|
-
'analyze-structure.py',
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
33
|
+
'src/core/screenshot.js',
|
|
34
|
+
'src/core/filter-css.js',
|
|
35
|
+
'src/ai/analyze-structure.py',
|
|
36
|
+
'src/utils/browser.js',
|
|
37
|
+
'src/utils/env.js',
|
|
38
|
+
'src/utils/env.py',
|
|
39
39
|
'requirements.txt'
|
|
40
40
|
];
|
|
41
41
|
|
package/package.json
CHANGED