fix(cli): address PR review feedback from miguel-heygen

- flushSync: use detached spawn + unref() instead of execFileSync,
  so process.exit() paths don't block up to 5s on slow networks
- showTelemetryNotice: persist notice flag BEFORE printing/tracking,
  so users are never tracked without having seen the disclosure
- Config dir: set mode 0o700 on ~/.hyperframes/ directory (was umask default)
- $ip: null comment: clarify this is belt-and-suspenders with server-side discard
- shouldTrack: update comment — phc_ prefix check is a safety net, not dead code
- env.ts: add comment explaining try/catch fail-safe defaults to production
- init.ts: consistently call trackInitTemplate after scaffoldProject in both paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
James
2026-03-25 23:15:34 +00:00
co-authored by Claude Opus 4.6
parent 6c88c56cd2
commit e52a19b8b4
4 changed files with 22 additions and 14 deletions
+1 -1
View File
@@ -500,8 +500,8 @@ export default defineCommand({
const templateId: TemplateId = templateResult;
// 4. Copy template and patch
trackInitTemplate(templateId);
scaffoldProject(destDir, name, templateId, localVideoName);
trackInitTemplate(templateId);
const files = readdirSync(destDir);
clack.note(files.map((f) => c.accent(f)).join("\n"), c.success(`Created ${name}/`));