vipcare 0.3.19 → 0.3.20
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/vip.js +7 -5
- package/package.json +1 -1
package/bin/vip.js
CHANGED
|
@@ -475,7 +475,7 @@ program.command('youtube-search')
|
|
|
475
475
|
// --- card ---
|
|
476
476
|
program.command('card')
|
|
477
477
|
.description('Generate and serve H5 baseball card page')
|
|
478
|
-
.option('-o, --output <path>', 'Output HTML file', '
|
|
478
|
+
.option('-o, --output <path>', 'Output HTML file', path.join(os.homedir(), '.vip', 'cards', 'index.html'))
|
|
479
479
|
.option('-p, --port <port>', 'Server port', '3000')
|
|
480
480
|
.option('-w, --watch', 'Watch profile files and auto-regenerate')
|
|
481
481
|
.option('--no-serve', 'Only generate, do not start server')
|
|
@@ -816,7 +816,7 @@ program.command('reset')
|
|
|
816
816
|
}
|
|
817
817
|
|
|
818
818
|
// Delete generated web files
|
|
819
|
-
const webDir = path.join(
|
|
819
|
+
const webDir = path.join(CONFIG_DIR, 'cards');
|
|
820
820
|
if (fs.existsSync(webDir)) {
|
|
821
821
|
const webFiles = fs.readdirSync(webDir).filter(f => f.endsWith('.html'));
|
|
822
822
|
for (const f of webFiles) fs.unlinkSync(path.join(webDir, f));
|
|
@@ -884,9 +884,11 @@ program.command('init')
|
|
|
884
884
|
try {
|
|
885
885
|
console.log(c.bold(c.cyan('\nWelcome to VIPCare!\n')));
|
|
886
886
|
|
|
887
|
-
const
|
|
888
|
-
const
|
|
889
|
-
const
|
|
887
|
+
const defaultHome = path.join(os.homedir(), '.vip');
|
|
888
|
+
const homeAnswer = await rl.question(`VIPCare home directory (all data stored here):\n (default: ${defaultHome}) > `);
|
|
889
|
+
const homeDir = (homeAnswer.trim() || defaultHome).replace(/^~/, os.homedir());
|
|
890
|
+
|
|
891
|
+
const profilesDir = path.join(homeDir, 'profiles');
|
|
890
892
|
|
|
891
893
|
console.log(`\n${c.cyan('AI backend preference:')}`);
|
|
892
894
|
console.log(' 1. Claude CLI (recommended)');
|