create-egregore 0.14.1 → 0.14.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.
Files changed (2) hide show
  1. package/lib/local.js +20 -8
  2. package/package.json +1 -1
package/lib/local.js CHANGED
@@ -644,17 +644,29 @@ async function localJoinFlow(orgArg, ui) {
644
644
  : `${orgLogin}-memory`;
645
645
  const managedRepos = config.repos || [];
646
646
 
647
- // 5b. Check access to memory repo (required) — may need invitation acceptance
648
- if (!(await repoExists(githubToken, orgLogin, memoryRepoName))) {
647
+ // 5b. Check access to ALL repos — open browser for any that need invitation acceptance
648
+ const allRepos = [repoName, memoryRepoName, ...managedRepos];
649
+ const inaccessible = [];
650
+ for (const repo of allRepos) {
651
+ if (!(await repoExists(githubToken, orgLogin, repo))) {
652
+ inaccessible.push(repo);
653
+ }
654
+ }
655
+ if (inaccessible.length > 0) {
649
656
  console.log("");
650
- ui.info("Accept the memory repo invitation in your browser.");
651
- openBrowser(`https://github.com/${orgLogin}/${memoryRepoName}`);
657
+ ui.info(`Accept ${inaccessible.length === 1 ? "the invitation" : `${inaccessible.length} invitations`} in your browser.`);
658
+ for (const repo of inaccessible) {
659
+ openBrowser(`https://github.com/${orgLogin}/${repo}`);
660
+ }
652
661
  await ui.prompt("Press Enter after accepting...");
653
662
 
654
- if (!(await repoExists(githubToken, orgLogin, memoryRepoName))) {
655
- ui.error(`Still can't access ${orgLogin}/${memoryRepoName}`);
656
- ui.error("Make sure the org admin has invited you to the memory repo.");
657
- process.exit(1);
663
+ // Retry — only block on main + memory, managed repos are best-effort
664
+ for (const repo of [repoName, memoryRepoName]) {
665
+ if (inaccessible.includes(repo) && !(await repoExists(githubToken, orgLogin, repo))) {
666
+ ui.error(`Still can't access ${orgLogin}/${repo}`);
667
+ ui.error("Make sure the org admin has set up Egregore and invited you.");
668
+ process.exit(1);
669
+ }
658
670
  }
659
671
  ui.success("Access confirmed");
660
672
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-egregore",
3
- "version": "0.14.1",
3
+ "version": "0.14.2",
4
4
  "description": "Set up Egregore for your team in one command",
5
5
  "license": "MIT",
6
6
  "bin": {