create-egregore 0.8.0 → 0.8.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.
- package/lib/local.js +10 -37
- package/package.json +1 -1
package/lib/local.js
CHANGED
|
@@ -317,7 +317,7 @@ async function localFounderFlow(ui) {
|
|
|
317
317
|
if (newProjectRepo) {
|
|
318
318
|
// Re-prompt if name conflicts with core/memory repo
|
|
319
319
|
while (newProjectRepo === repoName || newProjectRepo === memoryRepoName) {
|
|
320
|
-
ui.warn(`"${newProjectRepo}"
|
|
320
|
+
ui.warn(`Your Egregore is already named "${newProjectRepo}". Pick a different name for your project repo (e.g. "${newProjectRepo}-app").`);
|
|
321
321
|
const retry = await ui.prompt("Repo name (or Enter to skip):");
|
|
322
322
|
if (!retry) { newProjectRepo = null; break; }
|
|
323
323
|
newProjectRepo = retry.trim().toLowerCase().replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
@@ -463,34 +463,7 @@ async function localFounderFlow(ui) {
|
|
|
463
463
|
registerInstance(repoName, orgName, egregoreDir);
|
|
464
464
|
const alias = await installShellAlias(egregoreDir, ui);
|
|
465
465
|
|
|
466
|
-
// 18.
|
|
467
|
-
console.log("");
|
|
468
|
-
ui.info("Want notifications? Set up a Telegram group:");
|
|
469
|
-
ui.info("");
|
|
470
|
-
ui.info(` 1. Create a Telegram group for your team`);
|
|
471
|
-
ui.info(` 2. Add the bot: ${ui.cyan("https://t.me/egregore_bot")}`);
|
|
472
|
-
ui.info(` 3. Paste the group invite link below`);
|
|
473
|
-
console.log("");
|
|
474
|
-
const telegramLink = await ui.prompt("Group invite link (Enter to skip):");
|
|
475
|
-
if (telegramLink) {
|
|
476
|
-
egreConfig.telegram_group_link = telegramLink;
|
|
477
|
-
// Update local egregore.json
|
|
478
|
-
fs.writeFileSync(path.join(egregoreDir, "egregore.json"), JSON.stringify(egreConfig, null, 2) + "\n");
|
|
479
|
-
// Push to remote so joiners see it
|
|
480
|
-
try {
|
|
481
|
-
await putFileContent(
|
|
482
|
-
githubToken,
|
|
483
|
-
githubOrg,
|
|
484
|
-
repoName,
|
|
485
|
-
"egregore.json",
|
|
486
|
-
JSON.stringify(egreConfig, null, 2) + "\n",
|
|
487
|
-
"Add Telegram group link",
|
|
488
|
-
);
|
|
489
|
-
} catch {}
|
|
490
|
-
ui.success("Telegram group link saved");
|
|
491
|
-
}
|
|
492
|
-
|
|
493
|
-
// 19. Optional invite
|
|
466
|
+
// 18. Optional invite
|
|
494
467
|
console.log("");
|
|
495
468
|
const invUsername = await ui.prompt("Invite a teammate? Enter their GitHub username (or press Enter to skip):");
|
|
496
469
|
if (invUsername) {
|
|
@@ -688,14 +661,7 @@ async function localJoinFlow(orgArg, ui) {
|
|
|
688
661
|
}
|
|
689
662
|
}
|
|
690
663
|
|
|
691
|
-
// 12.
|
|
692
|
-
if (config.telegram_group_link) {
|
|
693
|
-
console.log("");
|
|
694
|
-
ui.info("Join the team's Telegram group for notifications:");
|
|
695
|
-
ui.info(` ${ui.cyan(config.telegram_group_link)}`);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
// 13. Check for welcome note
|
|
664
|
+
// 12. Check for welcome note
|
|
699
665
|
const welcomeFile = path.join(memoryDir, "people", `${user.login}.md`);
|
|
700
666
|
if (fs.existsSync(welcomeFile)) {
|
|
701
667
|
try {
|
|
@@ -711,6 +677,13 @@ async function localJoinFlow(orgArg, ui) {
|
|
|
711
677
|
} catch {}
|
|
712
678
|
}
|
|
713
679
|
|
|
680
|
+
// 13. Show Telegram group link if configured
|
|
681
|
+
if (config.telegram_group_link) {
|
|
682
|
+
console.log("");
|
|
683
|
+
ui.info("Join the team's Telegram group:");
|
|
684
|
+
ui.info(` ${ui.cyan(config.telegram_group_link)}`);
|
|
685
|
+
}
|
|
686
|
+
|
|
714
687
|
// 14. Done
|
|
715
688
|
console.log("");
|
|
716
689
|
ui.success(`Joined ${ui.bold(orgName)}`);
|