add-ai-tools 1.2.5 → 1.2.6

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -556,7 +556,10 @@ var GitHubFetcher = class {
556
556
  async getDefaultBranch(owner, repo) {
557
557
  const url = `${this.baseApiUrl}/repos/${owner}/${repo}`;
558
558
  const response = await fetch(url, { headers: this.getHeaders() });
559
- if (!response.ok) return "main";
559
+ if (!response.ok) {
560
+ if (response.status === 404 && this.token) throw new GitHubApiError(`Repository not found: ${owner}/${repo}. Your token may not have access to this repo. Check token permissions or try: GITHUB_TOKEN=$(gh auth token) npx add-ai-tools`, 404, `${owner}/${repo}`);
561
+ return "main";
562
+ }
560
563
  return (await response.json()).default_branch || "main";
561
564
  }
562
565
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "add-ai-tools",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Universal AI agent resource installer CLI",
5
5
  "type": "module",
6
6
  "bin": {