ropilot 0.1.14 → 0.1.16
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/lib/setup.js +7 -20
- package/package.json +1 -1
package/lib/setup.js
CHANGED
|
@@ -221,21 +221,6 @@ async function installPlugin() {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
/**
|
|
225
|
-
* Install ropilot globally so it's available as a command
|
|
226
|
-
*/
|
|
227
|
-
function installGlobally() {
|
|
228
|
-
console.log('Installing ropilot globally...');
|
|
229
|
-
try {
|
|
230
|
-
execSync('npm install -g ropilot', { encoding: 'utf-8', stdio: 'inherit' });
|
|
231
|
-
console.log(' Installed successfully!');
|
|
232
|
-
return true;
|
|
233
|
-
} catch (err) {
|
|
234
|
-
console.error(' Failed to install globally. You may need to run with sudo or fix npm permissions.');
|
|
235
|
-
console.log(' Falling back to npx...');
|
|
236
|
-
return false;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
224
|
|
|
240
225
|
/**
|
|
241
226
|
* Download prompts from edge server
|
|
@@ -407,10 +392,6 @@ export async function init(providedApiKey = null) {
|
|
|
407
392
|
console.log('');
|
|
408
393
|
}
|
|
409
394
|
|
|
410
|
-
// Install ropilot globally
|
|
411
|
-
console.log('');
|
|
412
|
-
const globalInstallOk = installGlobally();
|
|
413
|
-
console.log('');
|
|
414
395
|
|
|
415
396
|
// Install Studio plugin
|
|
416
397
|
await installPlugin();
|
|
@@ -447,7 +428,13 @@ export async function update() {
|
|
|
447
428
|
process.exit(1);
|
|
448
429
|
}
|
|
449
430
|
|
|
450
|
-
await downloadPrompts(apiKey);
|
|
431
|
+
const pkg = await downloadPrompts(apiKey);
|
|
451
432
|
console.log('');
|
|
433
|
+
|
|
434
|
+
// Update project files too
|
|
435
|
+
console.log('Updating project files...');
|
|
436
|
+
setupProjectPrompts(pkg);
|
|
437
|
+
console.log('');
|
|
438
|
+
|
|
452
439
|
console.log('Update complete!');
|
|
453
440
|
}
|