squads-cli 0.4.5 → 0.4.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.
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -544,6 +544,29 @@ async function confirm(question, defaultYes = true) {
|
|
|
544
544
|
});
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
+
async function promptEmail() {
|
|
548
|
+
const rl = createInterface({
|
|
549
|
+
input: process.stdin,
|
|
550
|
+
output: process.stdout
|
|
551
|
+
});
|
|
552
|
+
return new Promise((resolve) => {
|
|
553
|
+
rl.question(` ${chalk.dim("\u{1F4EC} Get product updates? (optional, Enter to skip):")} `, (answer) => {
|
|
554
|
+
rl.close();
|
|
555
|
+
const email = answer.trim();
|
|
556
|
+
if (!email) {
|
|
557
|
+
resolve(null);
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
561
|
+
if (emailRegex.test(email)) {
|
|
562
|
+
resolve(email);
|
|
563
|
+
} else {
|
|
564
|
+
console.log(chalk.dim(" Invalid email, skipping..."));
|
|
565
|
+
resolve(null);
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
}
|
|
547
570
|
function commandExists(cmd) {
|
|
548
571
|
try {
|
|
549
572
|
execSync2(`which ${cmd}`, { stdio: "ignore" });
|
|
@@ -1101,6 +1124,15 @@ squads goal list # View goals
|
|
|
1101
1124
|
console.log(chalk.dim(" \u2022 .claude/settings.json - Claude Code hooks"));
|
|
1102
1125
|
console.log(chalk.dim(" \u2022 CLAUDE.md - Agent instructions"));
|
|
1103
1126
|
console.log();
|
|
1127
|
+
const email = await promptEmail();
|
|
1128
|
+
if (email) {
|
|
1129
|
+
await track(Events.CLI_INIT, {
|
|
1130
|
+
event: "email_capture",
|
|
1131
|
+
email
|
|
1132
|
+
});
|
|
1133
|
+
console.log(chalk.dim(` \u2713 We'll send updates to ${email}`));
|
|
1134
|
+
console.log();
|
|
1135
|
+
}
|
|
1104
1136
|
console.log(chalk.bold(" \u{1F449} Try it now:"));
|
|
1105
1137
|
console.log();
|
|
1106
1138
|
console.log(` ${chalk.yellow.bold("squads status")}`);
|