feat(cli): prioritize GitHub release download with fallback to bundled assets (#81)
- Add GitHubRateLimitError and GitHubDownloadError for better error handling - Detect rate limits (403 with remaining=0, 429) - Try downloading from GitHub releases first - Fall back to bundled assets on network error, rate limit, or download failure - Add --offline flag to skip GitHub download - Use GitHub auto-generated archive URL as fallback when no ZIP asset exists - Update CLI to v1.9.0 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,13 +12,14 @@ const program = new Command();
|
||||
program
|
||||
.name('uipro')
|
||||
.description('CLI to install UI/UX Pro Max skill for AI coding assistants')
|
||||
.version('1.5.0');
|
||||
.version('1.9.0');
|
||||
|
||||
program
|
||||
.command('init')
|
||||
.description('Install UI/UX Pro Max skill to current project')
|
||||
.option('-a, --ai <type>', `AI assistant type (${AI_TYPES.join(', ')})`)
|
||||
.option('-f, --force', 'Overwrite existing files')
|
||||
.option('-o, --offline', 'Skip GitHub download, use bundled assets only')
|
||||
.action(async (options) => {
|
||||
if (options.ai && !AI_TYPES.includes(options.ai)) {
|
||||
console.error(`Invalid AI type: ${options.ai}`);
|
||||
@@ -28,6 +29,7 @@ program
|
||||
await initCommand({
|
||||
ai: options.ai as AIType | undefined,
|
||||
force: options.force,
|
||||
offline: options.offline,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user