Skip to content

Add direct wrapper tests for create-proofkit#165

Merged
eluce2 merged 14 commits intomainfrom
review-new-tests
Mar 18, 2026
Merged

Add direct wrapper tests for create-proofkit#165
eluce2 merged 14 commits intomainfrom
review-new-tests

Conversation

@eluce2
Copy link
Copy Markdown
Collaborator

@eluce2 eluce2 commented Mar 18, 2026

Add direct wrapper tests for create-proofkit

Agent-Id: agent-b0866404-cae3-459d-a9c5-f749470d81b4

Update lockfile for create-proofkit vitest dependency

Add hermetic scaffold contract tests for init

Agent-Id: agent-649fd397-82c3-4dbb-8ac0-ad442d855700
Linked-Note-Id: ed886a0e-b3a0-4496-93fa-5e922ca39a15

Add non-interactive failure-path coverage for init

Agent-Id: agent-a6ac7194-02f8-4467-a849-f2a56b55bb9f

Add non-interactive failure-path coverage for init

Agent-Id: agent-a6ac7194-02f8-4467-a849-f2a56b55bb9f
Linked-Note-Id: 0ea41863-ced8-400f-8042-5317ba6bc86c

Handle init post-codegen typegen failures with actionable errors

Separate CLI external smoke tests from contract tests

Agent-Id: agent-a559dbb7-21fc-41bc-aa42-db55cfdbb200

Coordinator

Agent-Id: agent-d969e5ba-941c-421b-af74-e9c40ca728f3

Summary by CodeRabbit

  • New Features

    • Revamped interactive CLI with init/add/remove/typegen/deploy/upgrade/menu flows, many generators/installers (pages, schemas, data sources, auth, email, TanStack Query), FileMaker onboarding and demo deployment, Vercel deploy support, and a registry-driven template installer with rich page templates.
  • Documentation

    • Added CLI README and assorted docs snippets.
  • Tests

    • Added CLI external integration smoke tests to release workflow.
  • Chores

    • CI workflow step labels updated; CLI major-version changes documented.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
proofkit-docs Ready Ready Preview Mar 18, 2026 10:32pm

Request Review

Copy link
Copy Markdown
Collaborator Author

eluce2 commented Mar 18, 2026

@eluce2 eluce2 marked this pull request as ready for review March 18, 2026 17:25
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 18, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 892e1530-764b-4003-ae62-3cd6e29d4e82

📥 Commits

Reviewing files that changed from the base of the PR and between 6dc028b and a5c9ea6.

⛔ Files ignored due to path filters (3)
  • packages/cli-old/template/fm-addon/ProofKitAuth/icon.png is excluded by !**/*.png
  • packages/cli-old/template/fm-addon/ProofKitAuth/icon@2x.png is excluded by !**/*.png
  • packages/cli-old/template/fm-addon/ProofKitAuth/preview.png is excluded by !**/*.png
📒 Files selected for processing (292)
  • .changeset/proofkit-cli-major-migration.md
  • .github/workflows/continuous-release.yml
  • .github/workflows/release.yml
  • AGENTS.md
  • apps/docs/src/app/(home)/page.tsx
  • apps/docs/src/components/AgentCommand.tsx
  • biome.json
  • btca.config.jsonc
  • packages/cli-old/.yarnrc.yml
  • packages/cli-old/CHANGELOG.md
  • packages/cli-old/README.md
  • packages/cli-old/index.d.ts
  • packages/cli-old/package.json
  • packages/cli-old/proofkit-cli-1.1.8.tgz
  • packages/cli-old/src/cli/add/auth.ts
  • packages/cli-old/src/cli/add/data-source/deploy-demo-file.ts
  • packages/cli-old/src/cli/add/data-source/filemaker.ts
  • packages/cli-old/src/cli/add/data-source/index.ts
  • packages/cli-old/src/cli/add/fmschema.ts
  • packages/cli-old/src/cli/add/index.ts
  • packages/cli-old/src/cli/add/page/index.ts
  • packages/cli-old/src/cli/add/page/post-install/table-infinite.ts
  • packages/cli-old/src/cli/add/page/post-install/table.ts
  • packages/cli-old/src/cli/add/page/templates.ts
  • packages/cli-old/src/cli/add/page/types.ts
  • packages/cli-old/src/cli/add/registry/getOptions.ts
  • packages/cli-old/src/cli/add/registry/http.ts
  • packages/cli-old/src/cli/add/registry/install.ts
  • packages/cli-old/src/cli/add/registry/listItems.ts
  • packages/cli-old/src/cli/add/registry/postInstall/handlebars.ts
  • packages/cli-old/src/cli/add/registry/postInstall/index.ts
  • packages/cli-old/src/cli/add/registry/postInstall/package-script.ts
  • packages/cli-old/src/cli/add/registry/postInstall/wrap-provider.ts
  • packages/cli-old/src/cli/add/registry/preflight.ts
  • packages/cli-old/src/cli/deploy/index.ts
  • packages/cli-old/src/cli/fmdapi.ts
  • packages/cli-old/src/cli/init.ts
  • packages/cli-old/src/cli/menu.ts
  • packages/cli-old/src/cli/ottofms.ts
  • packages/cli-old/src/cli/prompts.ts
  • packages/cli-old/src/cli/react-email.ts
  • packages/cli-old/src/cli/remove/data-source.ts
  • packages/cli-old/src/cli/remove/index.ts
  • packages/cli-old/src/cli/remove/page.ts
  • packages/cli-old/src/cli/remove/schema.ts
  • packages/cli-old/src/cli/tanstack-query.ts
  • packages/cli-old/src/cli/typegen/index.ts
  • packages/cli-old/src/cli/update/index.ts
  • packages/cli-old/src/cli/update/makeUpgradeCommand.ts
  • packages/cli-old/src/cli/utils.ts
  • packages/cli-old/src/consts.ts
  • packages/cli-old/src/generators/auth.ts
  • packages/cli-old/src/generators/fmdapi.ts
  • packages/cli-old/src/generators/route.ts
  • packages/cli-old/src/generators/tanstack-query.ts
  • packages/cli-old/src/globalOptions.ts
  • packages/cli-old/src/globals.d.ts
  • packages/cli-old/src/helpers/createProject.ts
  • packages/cli-old/src/helpers/fmHttp.ts
  • packages/cli-old/src/helpers/git.ts
  • packages/cli-old/src/helpers/installDependencies.ts
  • packages/cli-old/src/helpers/installPackages.ts
  • packages/cli-old/src/helpers/logNextSteps.ts
  • packages/cli-old/src/helpers/replaceText.ts
  • packages/cli-old/src/helpers/scaffoldProject.ts
  • packages/cli-old/src/helpers/selectBoilerplate.ts
  • packages/cli-old/src/helpers/setImportAlias.ts
  • packages/cli-old/src/helpers/shadcn-cli.ts
  • packages/cli-old/src/helpers/stealth-init.ts
  • packages/cli-old/src/helpers/version-fetcher.ts
  • packages/cli-old/src/index.ts
  • packages/cli-old/src/installers/auth-shared.ts
  • packages/cli-old/src/installers/better-auth.ts
  • packages/cli-old/src/installers/clerk.ts
  • packages/cli-old/src/installers/dependencyVersionMap.ts
  • packages/cli-old/src/installers/envVars.ts
  • packages/cli-old/src/installers/index.ts
  • packages/cli-old/src/installers/install-fm-addon.ts
  • packages/cli-old/src/installers/nextAuth.ts
  • packages/cli-old/src/installers/proofkit-auth.ts
  • packages/cli-old/src/installers/proofkit-webviewer.ts
  • packages/cli-old/src/installers/react-email.ts
  • packages/cli-old/src/state.ts
  • packages/cli-old/src/upgrades/cursorRules.ts
  • packages/cli-old/src/upgrades/index.ts
  • packages/cli-old/src/upgrades/shadcn.ts
  • packages/cli-old/src/utils/addPackageDependency.ts
  • packages/cli-old/src/utils/addToEnvs.ts
  • packages/cli-old/src/utils/formatting.ts
  • packages/cli-old/src/utils/getProofKitVersion.ts
  • packages/cli-old/src/utils/getUserPkgManager.ts
  • packages/cli-old/src/utils/isTTYError.ts
  • packages/cli-old/src/utils/logger.ts
  • packages/cli-old/src/utils/parseNameAndPath.ts
  • packages/cli-old/src/utils/parseSettings.ts
  • packages/cli-old/src/utils/proofkitReleaseChannel.ts
  • packages/cli-old/src/utils/removeTrailingSlash.ts
  • packages/cli-old/src/utils/renderTitle.ts
  • packages/cli-old/src/utils/renderVersionWarning.ts
  • packages/cli-old/src/utils/ts-morph.ts
  • packages/cli-old/src/utils/validateAppName.ts
  • packages/cli-old/src/utils/validateImportAlias.ts
  • packages/cli-old/template/extras/_cursor/conditional-rules/nextjs-framework.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/npm.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/pnpm.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/yarn.mdc
  • packages/cli-old/template/extras/_cursor/rules/cursor-rules.mdc
  • packages/cli-old/template/extras/_cursor/rules/filemaker-api.mdc
  • packages/cli-old/template/extras/_cursor/rules/troubleshooting-patterns.mdc
  • packages/cli-old/template/extras/_cursor/rules/ui-components.mdc
  • packages/cli-old/template/extras/config/drizzle-config-mysql.ts
  • packages/cli-old/template/extras/config/drizzle-config-postgres.ts
  • packages/cli-old/template/extras/config/drizzle-config-sqlite.ts
  • packages/cli-old/template/extras/config/fmschema.config.mjs
  • packages/cli-old/template/extras/config/get-query-client.ts
  • packages/cli-old/template/extras/config/postcss.config.cjs
  • packages/cli-old/template/extras/config/query-provider-vite.tsx
  • packages/cli-old/template/extras/config/query-provider.tsx
  • packages/cli-old/template/extras/emailProviders/none/email.tsx
  • packages/cli-old/template/extras/emailProviders/plunk/email.tsx
  • packages/cli-old/template/extras/emailProviders/plunk/service.ts
  • packages/cli-old/template/extras/emailProviders/resend/email.tsx
  • packages/cli-old/template/extras/emailProviders/resend/service.ts
  • packages/cli-old/template/extras/emailTemplates/auth-code.tsx
  • packages/cli-old/template/extras/emailTemplates/generic.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/profile-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/reset-password-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/forgot-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/login-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/reset-password-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/verify-email-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/signup-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/email-verification-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/resend-button.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/protect.tsx
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/redirect.tsx
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/use-user.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/user-menu.tsx
  • packages/cli-old/template/extras/fmaddon-auth/emails/auth-code.tsx
  • packages/cli-old/template/extras/fmaddon-auth/middleware.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/email-verification.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/encryption.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/index.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/password-reset.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/password.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/redirect.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/session.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/user.ts
  • packages/cli-old/template/extras/prisma/schema/base-planetscale.prisma
  • packages/cli-old/template/extras/prisma/schema/base.prisma
  • packages/cli-old/template/extras/prisma/schema/with-auth-planetscale.prisma
  • packages/cli-old/template/extras/prisma/schema/with-auth.prisma
  • packages/cli-old/template/extras/src/app/_components/post-tw.tsx
  • packages/cli-old/template/extras/src/app/_components/post.tsx
  • packages/cli-old/template/extras/src/app/api/auth/[...nextauth]/route.ts
  • packages/cli-old/template/extras/src/app/api/trpc/[trpc]/route.ts
  • packages/cli-old/template/extras/src/app/clerk-auth/layout.tsx
  • packages/cli-old/template/extras/src/app/clerk-auth/signin/[[...sign-in]]/page.tsx
  • packages/cli-old/template/extras/src/app/clerk-auth/signup/[[...sign-up]]/page.tsx
  • packages/cli-old/template/extras/src/app/layout/base.tsx
  • packages/cli-old/template/extras/src/app/layout/main-shell.tsx
  • packages/cli-old/template/extras/src/app/layout/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/layout/with-trpc.tsx
  • packages/cli-old/template/extras/src/app/layout/with-tw.tsx
  • packages/cli-old/template/extras/src/app/next-auth/layout.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signin/page.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signup/action.ts
  • packages/cli-old/template/extras/src/app/next-auth/signup/page.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signup/validation.ts
  • packages/cli-old/template/extras/src/app/page/base.tsx
  • packages/cli-old/template/extras/src/app/page/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/page/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/app/page/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/page/with-trpc.tsx
  • packages/cli-old/template/extras/src/app/page/with-tw.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/clerk-provider.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/user-menu-mobile.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/user-menu.tsx
  • packages/cli-old/template/extras/src/components/next-auth/next-auth-provider.tsx
  • packages/cli-old/template/extras/src/components/next-auth/user-menu-mobile.tsx
  • packages/cli-old/template/extras/src/components/next-auth/user-menu.tsx
  • packages/cli-old/template/extras/src/env/with-auth.ts
  • packages/cli-old/template/extras/src/env/with-clerk.ts
  • packages/cli-old/template/extras/src/index.module.css
  • packages/cli-old/template/extras/src/middleware/clerk.ts
  • packages/cli-old/template/extras/src/middleware/next-auth.ts
  • packages/cli-old/template/extras/src/pages/_app/base.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-trpc.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-tw.tsx
  • packages/cli-old/template/extras/src/pages/api/auth/[...nextauth].ts
  • packages/cli-old/template/extras/src/pages/api/trpc/[trpc].ts
  • packages/cli-old/template/extras/src/pages/index/base.tsx
  • packages/cli-old/template/extras/src/pages/index/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/index/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/pages/index/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/index/with-trpc.tsx
  • packages/cli-old/template/extras/src/pages/index/with-tw.tsx
  • packages/cli-old/template/extras/src/server/api/root.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/base.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth-drizzle.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth-prisma.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-drizzle.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-prisma.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/base.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-auth-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/base.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-auth-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-db.ts
  • packages/cli-old/template/extras/src/server/data/users.ts
  • packages/cli-old/template/extras/src/server/db/db-prisma-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/db-prisma.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-mysql.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-postgres.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-sqlite.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-mysql.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-postgres.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-sqlite.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-mysql.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-postgres.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-sqlite.ts
  • packages/cli-old/template/extras/src/server/next-auth/base.ts
  • packages/cli-old/template/extras/src/server/next-auth/password.ts
  • packages/cli-old/template/extras/src/server/next-auth/with-drizzle.ts
  • packages/cli-old/template/extras/src/server/next-auth/with-prisma.ts
  • packages/cli-old/template/extras/src/trpc/query-client.ts
  • packages/cli-old/template/extras/src/trpc/react.tsx
  • packages/cli-old/template/extras/src/trpc/server.ts
  • packages/cli-old/template/extras/src/utils/api.ts
  • packages/cli-old/template/extras/start-database/mysql.sh
  • packages/cli-old/template/extras/start-database/postgres.sh
  • packages/cli-old/template/fm-addon/ProofKitAuth/de.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/en.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/es.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/fr.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/info.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_de.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_en.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_es.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_fr.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_it.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ja.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ko.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_nl.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_pt.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_sv.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_zh.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/it.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/ja.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/ko.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/nl.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/pt.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/sv.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/template.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/zh.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/de.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/en.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/es.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/fr.xml

📝 Walkthrough

Walkthrough

Adds a new standalone CLI package under packages/cli-old with full init/add/remove/typegen/deploy/upgrade/menu command implementations, many installers/generators/templates (FileMaker/Otto, auth, pages, TRPC, DB, email), numerous helper utilities, CI workflow step relabeling and an added release smoke test, plus a changeset bump for the CLI.

Changes

Cohort / File(s) Summary
CI Workflows
/.github/workflows/continuous-release.yml, /.github/workflows/release.yml
Rename test steps to "Run Deterministic Contract Tests"; add "Run CLI External Integration Smoke Tests" step to release workflow.
Versioning / Changeset
.changeset/proofkit-cli-major-migration.md
Add changeset announcing a major version bump for @proofkit/cli.
New CLI Package Manifest & Types
packages/cli-old/package.json, packages/cli-old/.yarnrc.yml, packages/cli-old/CHANGELOG.md, packages/cli-old/README.md, packages/cli-old/index.d.ts
Introduce @proofkit/cli-old package manifest, yarn packageExtensions, changelog/README, and new public type declarations (route types).
CLI Entry, State & Options
packages/cli-old/src/index.ts, .../state.ts, .../globalOptions.ts, .../consts.ts, .../globals.d.ts
Add top-level CLI bootstrap, program state, global CLI options, runtime constants, and ambient version globals.
Top-level CLI Commands
packages/cli-old/src/cli/...
New command implementations: init, add (auth, page, schema, data-source, registry), remove, typegen, deploy (Vercel), update/upgrade, interactive menu, tanstack-query, and FileMaker/Otto integrations.
Generators & Registry/Post-install
packages/cli-old/src/generators/*, packages/cli-old/src/cli/add/registry/*
Add generators (fmdapi, auth, route, tanstack-query), registry HTTP client, install flow, Handlebars rendering, and post-install processors (env/script/provider wrappers).
Installers & Provider Integrations
packages/cli-old/src/installers/*
Add installers for Clerk, NextAuth, ProofKit auth, React Email, FM addon installer, AST/ts-morph injections, env helpers, and dependency version map.
Helpers, Scaffolding & Package Management
packages/cli-old/src/helpers/*, packages/cli-old/src/utils/*
Add project scaffolding, package install/exec helpers (with spinner UX), JSONC edits, ts-morph helpers, settings/env management, version utilities, and numerous small utilities.
Prompts, Cancellation & CLI Utils
packages/cli-old/src/cli/prompts.ts, packages/cli-old/src/cli/utils.ts
Unified prompt wrappers with cancel sentinel, abort handling, UserAbortedError, ensureProofKitProject and program state init.
Upgrades & Cursor Rules
packages/cli-old/src/upgrades/*, packages/cli-old/template/extras/_cursor/*
Add upgrade registry, available upgrade checks and runners (cursor rules, shadcn) and Cursor rule/template files.
Templates: extras (apps, TRPC, DB, email, components)
packages/cli-old/template/extras/**
Add extensive project templates: multiple app/layout variants, TRPC server/client scaffolds, Drizzle/Prisma schemas, email templates/providers, middleware, components, and example scripts.
Templates: FM Add-on (ProofKitAuth)
packages/cli-old/template/fm-addon/ProofKitAuth/**
Add ProofKitAuth FM add-on templates, many localization XMLs and info JSONs.
Various small files & formatting
biome.json, btca.config.jsonc, apps/docs/..., apps/docs/src/components/...
Minor formatting, import reorders, and small UI/text adjustments in docs and components.
Large-volume additions
packages/cli-old/src/**, packages/cli-old/template/**
Many new source files across CLI, generators, installers, helpers, utils, and templates—focus review on AST edits (ts-morph), JSONC edits, network/polling (Otto/Vercel/FM), filesystem-destructive ops (remove flows), and package install/exec logic.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User as User
  participant CLI as CLI
  participant Otto as OttoFMS
  participant FM as FileMaker Data API
  participant FS as Project FS

  User->>CLI: run "add data-source" (FileMaker)
  CLI->>Otto: open login URL / poll for token
  Otto-->>CLI: return auth token
  CLI->>Otto: start demo file deployment (optional)
  Otto-->>CLI: deployment status (poll until complete)
  CLI->>FM: request layouts via Data API (using API key)
  FM-->>CLI: layouts + metadata
  CLI->>FS: write settings/env, generate files, update config
  CLI->>FS: run codegen / install deps
  CLI-->>User: show success and next steps
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review-new-tests

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (6)
packages/cli/tests/init-scaffold-contract.test.ts (1)

26-34: Module-level synchronous I/O may cause confusing failures.

The cliPackageJson is read synchronously at module load time (line 33). If dist/index.js or package.json doesn't exist (e.g., before a build), the test file will fail to load with a cryptic error rather than a clear test failure message.

Consider moving this into beforeAll or using a lazy initialization pattern for clearer error reporting during test discovery.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/tests/init-scaffold-contract.test.ts` around lines 26 - 34, The
test reads cliPackageJson synchronously at module load (cliPackageJsonPath /
cliPackageJson / cliVersion), which can cause noisy failures; move the
readJsonFile call and cliVersion initialization into a beforeAll block (or
implement lazy initialization) so the file I/O runs during test setup and can
throw a clear test failure; update any references in the file to use the
initialized variable from beforeAll (or a getter) and ensure the variable is
declared at module scope (e.g., let cliPackageJson: PackageJsonShape | undefined
and let cliVersion = "") so tests can access the values after setup.
packages/cli/src/index.ts (2)

24-29: Duplicate helper function across files.

The getErrorMessage function is duplicated verbatim in packages/cli/src/cli/init.ts (lines 144-149). Consider extracting it to a shared utility module (e.g., ~/utils/errorUtils.ts) to avoid duplication.

♻️ Suggested refactor

Create a shared utility:

// packages/cli/src/utils/errorUtils.ts
export function getErrorMessage(error: unknown): string {
  if (error instanceof Error) {
    return error.message;
  }
  return String(error);
}

Then import in both index.ts and init.ts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/index.ts` around lines 24 - 29, Extract the duplicated
helper getErrorMessage into a single shared module (e.g., export function
getErrorMessage from a new utils module) and replace the inline implementations
in both index.ts and init.ts with imports of that function; specifically, create
a new module that exports getErrorMessage, update the callers (the
getErrorMessage references in index.ts and cli/init.ts) to import it, and remove
the duplicate local implementations to avoid verbatim duplication.

87-87: Redundant type assertion.

Inside the err instanceof Error branch, err is already narrowed to Error. The cast (err as Error & { cause?: unknown }) is unnecessary since Error.cause is a standard property in ES2022+.

♻️ Simplified access
-    const cause = (err as Error & { cause?: unknown }).cause;
+    const cause = err.cause;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/index.ts` at line 87, Inside the `err instanceof Error`
branch, remove the redundant type assertion and read the cause directly from the
narrowed error (replace `const cause = (err as Error & { cause?: unknown
}).cause;` with `const cause = err.cause;`), ensuring you still handle the
possibility that `cause` is undefined when using it elsewhere in the `index.ts`
error-handling logic.
packages/cli/src/cli/init.ts (2)

144-149: Duplicate helper function.

This getErrorMessage function is identical to the one in packages/cli/src/index.ts (lines 24-29). As noted earlier, consider extracting to a shared utility.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cli/init.ts` around lines 144 - 149, The duplicate
getErrorMessage function should be consolidated: remove the local
getErrorMessage in init.ts and import a single shared utility (e.g.,
error/getErrorMessage or a common utils module) used by
packages/cli/src/index.ts; update references in init.ts to call the imported
getErrorMessage, and ensure the shared module exports the function (preserve the
same signature getErrorMessage(error: unknown): string) so both index.ts and
init.ts use the common implementation.

371-384: The fallback to "browser" appears logically unnecessary but may be required for TypeScript type safety.

At line 380, state.appType cannot be undefined from a control flow perspective because:

  1. The code only executes inside if (shouldRunInitialCodegen) (line 374)
  2. shouldRunInitialCodegen requires state.appType === "webviewer" to be true (line 372)
  3. If that condition is true, state.appType is definitely "webviewer", not undefined

However, since state.appType is typed as "browser" | "webviewer" | undefined (state.ts line 10) and state is a mutable global object, TypeScript's type narrowing may not automatically infer that the variable cannot be undefined at this point. The nullish coalescing operator may be necessary to satisfy the type checker, even if it's not logically required.

If this fallback is purely for type safety, consider adding a comment explaining that. Alternatively, if type narrowing can be improved, the fallback could be removed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/src/cli/init.ts` around lines 371 - 384, The
createPostInitGenerationError call uses state.appType ?? "browser" even though
shouldRunInitialCodegen guarantees state.appType === "webviewer" at runtime;
this fallback is only for TypeScript type-safety. Either add a short comment
above that line stating the nullish coalescing is intentionally present to
satisfy the compiler (e.g., "fallback only for TS type narrowing; runtime value
is 'webviewer' because shouldRunInitialCodegen guarded it"), or remove the
fallback and adjust type narrowing so the compiler knows state.appType cannot be
undefined (e.g., refine the predicate that sets shouldRunInitialCodegen). Update
the code around dataSource, shouldRunInitialCodegen, state.appType,
runCodegenCommand, and createPostInitGenerationError accordingly.
packages/cli/tests/init-non-interactive-failures.test.ts (1)

63-78: Consider clarifying null status handling.

Line 69 checks failure.status === null, which typically indicates the process was killed by a signal rather than exiting normally. This is being treated the same as a numeric exit code. If intentional (e.g., to handle SIGTERM), a comment would help clarify; otherwise, you may want to handle signal-killed processes differently.

♻️ Suggested improvement
 const runInitExpectFailure = (args: string[], cwd = testDir) => {
   try {
     runInitCommand(args, cwd);
     throw new Error(`Expected init to fail, but it succeeded: ${args.join(" ")}`);
   } catch (error) {
     const failure = error as ExecFailure;
-    if (typeof failure.status === "number" || failure.status === null) {
+    // status is number for normal exit, null if killed by signal
+    if (failure.status !== undefined) {
       return {
         status: failure.status,
         stdout: toText(failure.stdout),
         stderr: toText(failure.stderr),
       };
     }
     throw error;
   }
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/tests/init-non-interactive-failures.test.ts` around lines 63 -
78, The helper runInitExpectFailure currently treats failure.status === null the
same as a numeric exit code, which obscures signal-killed processes; update
runInitExpectFailure to explicitly handle signal-terminated failures
(failure.status === null) by checking for failure.signal and returning a
distinct result (e.g., include signal name and set status to null) or
rethrowing, and add a brief comment in the function explaining that null status
means the child was terminated by a signal so future readers understand why it's
handled separately; locate this logic in runInitExpectFailure and adjust the
conditional that currently checks "typeof failure.status === 'number' ||
failure.status === null".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/cli/src/cli/init.ts`:
- Around line 144-149: The duplicate getErrorMessage function should be
consolidated: remove the local getErrorMessage in init.ts and import a single
shared utility (e.g., error/getErrorMessage or a common utils module) used by
packages/cli/src/index.ts; update references in init.ts to call the imported
getErrorMessage, and ensure the shared module exports the function (preserve the
same signature getErrorMessage(error: unknown): string) so both index.ts and
init.ts use the common implementation.
- Around line 371-384: The createPostInitGenerationError call uses state.appType
?? "browser" even though shouldRunInitialCodegen guarantees state.appType ===
"webviewer" at runtime; this fallback is only for TypeScript type-safety. Either
add a short comment above that line stating the nullish coalescing is
intentionally present to satisfy the compiler (e.g., "fallback only for TS type
narrowing; runtime value is 'webviewer' because shouldRunInitialCodegen guarded
it"), or remove the fallback and adjust type narrowing so the compiler knows
state.appType cannot be undefined (e.g., refine the predicate that sets
shouldRunInitialCodegen). Update the code around dataSource,
shouldRunInitialCodegen, state.appType, runCodegenCommand, and
createPostInitGenerationError accordingly.

In `@packages/cli/src/index.ts`:
- Around line 24-29: Extract the duplicated helper getErrorMessage into a single
shared module (e.g., export function getErrorMessage from a new utils module)
and replace the inline implementations in both index.ts and init.ts with imports
of that function; specifically, create a new module that exports
getErrorMessage, update the callers (the getErrorMessage references in index.ts
and cli/init.ts) to import it, and remove the duplicate local implementations to
avoid verbatim duplication.
- Line 87: Inside the `err instanceof Error` branch, remove the redundant type
assertion and read the cause directly from the narrowed error (replace `const
cause = (err as Error & { cause?: unknown }).cause;` with `const cause =
err.cause;`), ensuring you still handle the possibility that `cause` is
undefined when using it elsewhere in the `index.ts` error-handling logic.

In `@packages/cli/tests/init-non-interactive-failures.test.ts`:
- Around line 63-78: The helper runInitExpectFailure currently treats
failure.status === null the same as a numeric exit code, which obscures
signal-killed processes; update runInitExpectFailure to explicitly handle
signal-terminated failures (failure.status === null) by checking for
failure.signal and returning a distinct result (e.g., include signal name and
set status to null) or rethrowing, and add a brief comment in the function
explaining that null status means the child was terminated by a signal so future
readers understand why it's handled separately; locate this logic in
runInitExpectFailure and adjust the conditional that currently checks "typeof
failure.status === 'number' || failure.status === null".

In `@packages/cli/tests/init-scaffold-contract.test.ts`:
- Around line 26-34: The test reads cliPackageJson synchronously at module load
(cliPackageJsonPath / cliPackageJson / cliVersion), which can cause noisy
failures; move the readJsonFile call and cliVersion initialization into a
beforeAll block (or implement lazy initialization) so the file I/O runs during
test setup and can throw a clear test failure; update any references in the file
to use the initialized variable from beforeAll (or a getter) and ensure the
variable is declared at module scope (e.g., let cliPackageJson: PackageJsonShape
| undefined and let cliVersion = "") so tests can access the values after setup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2cccd35-6b8f-4c4c-b966-b96285bc0be8

📥 Commits

Reviewing files that changed from the base of the PR and between 44dbbf5 and 784476e.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (16)
  • .github/workflows/continuous-release.yml
  • .github/workflows/release.yml
  • packages/cli/package.json
  • packages/cli/src/cli/init.ts
  • packages/cli/src/index.ts
  • packages/cli/tests/browser-apps.smoke.test.ts
  • packages/cli/tests/init-non-interactive-failures.test.ts
  • packages/cli/tests/init-post-init-generation-errors.test.ts
  • packages/cli/tests/init-run-init-regression.test.ts
  • packages/cli/tests/init-scaffold-contract.test.ts
  • packages/cli/tests/test-utils.ts
  • packages/cli/vitest.config.ts
  • packages/cli/vitest.smoke.config.ts
  • packages/create-proofkit/package.json
  • packages/create-proofkit/tests/index.test.js
  • packages/create-proofkit/vitest.config.ts

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
packages/cli/template/vite-wv/src/routes/query-demo.tsx (1)

4-12: Extract the timeout delay and query key into named constants for clarity and stronger typing.

Line 5 uses a magic number 180 without context, and line 11 can use a const assertion to preserve literal typing.

♻️ Suggested refactor
+const CONNECTION_HINT_DELAY_MS = 180;
+const STARTER_CONNECTION_HINT_QUERY_KEY = ["starter-connection-hint"] as const;
+
 const getConnectionHint = async (): Promise<string> => {
-  await new Promise((resolve) => setTimeout(resolve, 180));
+  await new Promise((resolve) => setTimeout(resolve, CONNECTION_HINT_DELAY_MS));
   return "Use fmFetch or generated clients once your FileMaker file is ready.";
 };
 
 export function QueryDemoPage() {
   const hintQuery = useQuery({
-    queryKey: ["starter-connection-hint"],
+    queryKey: STARTER_CONNECTION_HINT_QUERY_KEY,
     queryFn: getConnectionHint,
   });

Per coding guidelines: "Use meaningful variable names instead of magic numbers - extract constants with descriptive names" and "Use const assertions (as const) for immutable values and literal types".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli/template/vite-wv/src/routes/query-demo.tsx` around lines 4 - 12,
Replace the magic number and inline query key by extracting them into named
constants: define a numeric constant (e.g., CONNECTION_HINT_DELAY_MS) and use it
in getConnectionHint instead of 180, and define the query key as a const
assertion (e.g., CONNECTION_HINT_QUERY_KEY = ["starter-connection-hint"] as
const) then pass CONNECTION_HINT_QUERY_KEY to useQuery inside QueryDemoPage;
this improves readability and preserves the literal type for the query key.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/new/src/utils/projectFiles.ts`:
- Around line 80-83: The current replaceTextInFiles implementation swallows all
fs.readdir errors by mapping them to undefined (childEntries) which hides real
IO/permission/race failures; wrap the fs.readdir(fullPath) call in a try-catch
inside replaceTextInFiles, and in the catch only suppress
directory-not-a-directory errors (check err.code === 'ENOTDIR' or similar) so
you treat that path as a non-directory, but rethrow any other errors
(permissions/IO) so they surface to the caller; keep references to childEntries,
fullPath and fs.readdir when making this change.

In `@packages/new/tests/integration.test.ts`:
- Line 204: The test currently asserts the install message by indexing
consoleTranscript.note[0]?.message which is brittle; change the assertion to
scan all notes for the message instead — use consoleTranscript.note.find(...) or
Array.prototype.some to check any note.message contains "npx
`@tanstack/intent`@latest install" and assert that is true; update the expect that
references consoleTranscript.note[0]?.message to assert existence via find/some
so ordering changes won't break the test.

---

Nitpick comments:
In `@packages/cli/template/vite-wv/src/routes/query-demo.tsx`:
- Around line 4-12: Replace the magic number and inline query key by extracting
them into named constants: define a numeric constant (e.g.,
CONNECTION_HINT_DELAY_MS) and use it in getConnectionHint instead of 180, and
define the query key as a const assertion (e.g., CONNECTION_HINT_QUERY_KEY =
["starter-connection-hint"] as const) then pass CONNECTION_HINT_QUERY_KEY to
useQuery inside QueryDemoPage; this improves readability and preserves the
literal type for the query key.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 984118f1-9ba6-4b04-8a2c-dc7fc013b023

📥 Commits

Reviewing files that changed from the base of the PR and between 784476e and 8e333df.

📒 Files selected for processing (14)
  • packages/cli/template/vite-wv/.claude/launch.json
  • packages/cli/template/vite-wv/AGENTS.md
  • packages/cli/template/vite-wv/CLAUDE.md
  • packages/cli/template/vite-wv/package.json
  • packages/cli/template/vite-wv/src/App.tsx
  • packages/cli/template/vite-wv/src/main.tsx
  • packages/cli/template/vite-wv/src/router.tsx
  • packages/cli/template/vite-wv/src/routes/query-demo.tsx
  • packages/new/src/consts.ts
  • packages/new/src/core/executeInitPlan.ts
  • packages/new/src/core/planInit.ts
  • packages/new/src/utils/projectFiles.ts
  • packages/new/tests/init-fixtures.ts
  • packages/new/tests/integration.test.ts
✅ Files skipped from review due to trivial changes (2)
  • packages/cli/template/vite-wv/AGENTS.md
  • packages/cli/template/vite-wv/CLAUDE.md

expect(routerFile).toContain("createHashHistory");
expect(mainFile).toContain("QueryClientProvider");
expect(queryDemoFile).toContain("TanStack Query is preconfigured");
expect(consoleTranscript.note[0]?.message).toContain("npx @tanstack/intent@latest install");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Avoid index-coupled assertion for console notes.

Line 204 assumes the target message is always at index 0; that makes the test brittle if note ordering changes.

Suggested resilient assertion
-    expect(consoleTranscript.note[0]?.message).toContain("npx `@tanstack/intent`@latest install");
+    expect(
+      consoleTranscript.note.some((entry) =>
+        entry.message.includes("npx `@tanstack/intent`@latest install"),
+      ),
+    ).toBe(true);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expect(consoleTranscript.note[0]?.message).toContain("npx @tanstack/intent@latest install");
expect(
consoleTranscript.note.some((entry) =>
entry.message.includes("npx `@tanstack/intent`@latest install"),
),
).toBe(true);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/new/tests/integration.test.ts` at line 204, The test currently
asserts the install message by indexing consoleTranscript.note[0]?.message which
is brittle; change the assertion to scan all notes for the message instead — use
consoleTranscript.note.find(...) or Array.prototype.some to check any
note.message contains "npx `@tanstack/intent`@latest install" and assert that is
true; update the expect that references consoleTranscript.note[0]?.message to
assert existence via find/some so ordering changes won't break the test.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (1)
packages/new/tests/integration.test.ts (1)

204-206: ⚠️ Potential issue | 🟡 Minor

Avoid order-coupled assertions for console notes.

Line 204–Line 206 assume the target message is always in consoleTranscript.note[0], which can become flaky if note ordering changes.

Suggested resilient assertion
-    expect(consoleTranscript.note[0]?.message).toContain("Have your agent run this in the new project");
-    expect(consoleTranscript.note[0]?.message).toContain("complete the interactive prompt");
-    expect(consoleTranscript.note[0]?.message).toContain("npx `@tanstack/intent`@latest install");
+    const nextStepsMessage = consoleTranscript.note.find((entry) => entry.title === "Next steps")?.message ?? "";
+    expect(nextStepsMessage).toContain("Have your agent run this in the new project");
+    expect(nextStepsMessage).toContain("complete the interactive prompt");
+    expect(nextStepsMessage).toContain("npx `@tanstack/intent`@latest install");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/new/tests/integration.test.ts` around lines 204 - 206, The
assertions assume the expected text appears at consoleTranscript.note[0], which
is brittle; instead iterate/search the consoleTranscript.note array (using its
note items' message property) to assert that at least one note contains each
substring. Update the assertions that reference
consoleTranscript.note[0]?.message to use a find/some on consoleTranscript.note
(or a helper like hasNoteWithMessage) to check for "Have your agent run this in
the new project", "complete the interactive prompt", and "npx
`@tanstack/intent`@latest install" so the test no longer relies on note ordering.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/new/tests/integration.test.ts`:
- Around line 204-206: The assertions assume the expected text appears at
consoleTranscript.note[0], which is brittle; instead iterate/search the
consoleTranscript.note array (using its note items' message property) to assert
that at least one note contains each substring. Update the assertions that
reference consoleTranscript.note[0]?.message to use a find/some on
consoleTranscript.note (or a helper like hasNoteWithMessage) to check for "Have
your agent run this in the new project", "complete the interactive prompt", and
"npx `@tanstack/intent`@latest install" so the test no longer relies on note
ordering.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ba66c469-baeb-4df5-9725-87f5c34c51a0

📥 Commits

Reviewing files that changed from the base of the PR and between 8e333df and 9607a21.

📒 Files selected for processing (2)
  • packages/new/src/core/executeInitPlan.ts
  • packages/new/tests/integration.test.ts

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/new/src/index.ts (1)

215-229: Duplicated error rendering logic can be consolidated.

Lines 218-224 have identical logic in both branches - extracting Cause.squash(cause) and printing the message. This can be simplified since both the failure && !isValidationError(failure) case and the !failure case do the same thing.

♻️ Proposed refactor to consolidate duplicate branches
 function renderFailure(cause: Cause.Cause<unknown>, showDebugDetails: boolean) {
   const failure = getOrUndefined(Cause.failureOption(cause));
 
-  if (failure && !isValidationError(failure)) {
-    const error = Cause.squash(cause);
-    console.error(error instanceof Error ? error.message : String(error));
-  } else if (!failure) {
+  // ValidationError is already rendered by `@effect/cli`, so skip it
+  const shouldPrintError = !failure || !isValidationError(failure);
+  if (shouldPrintError) {
     const error = Cause.squash(cause);
     console.error(error instanceof Error ? error.message : String(error));
   }
 
   if (showDebugDetails) {
     console.error(`\n[debug] ${Cause.pretty(cause)}`);
   }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/new/src/index.ts` around lines 215 - 229, In renderFailure, the
branches for "failure && !isValidationError(failure)" and "!failure" duplicate
the same logic; simplify by computing failure once (using
getOrUndefined(Cause.failureOption(cause))), then always call
Cause.squash(cause) and log the message unless you need special handling for
validation errors—i.e., replace the two duplicate branches with a single path
that checks isValidationError(failure) and otherwise computes error =
Cause.squash(cause) and console.error(error instanceof Error ? error.message :
String(error)); preserve the final showDebugDetails block that logs
Cause.pretty(cause).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/new/src/index.ts`:
- Around line 215-229: In renderFailure, the branches for "failure &&
!isValidationError(failure)" and "!failure" duplicate the same logic; simplify
by computing failure once (using getOrUndefined(Cause.failureOption(cause))),
then always call Cause.squash(cause) and log the message unless you need special
handling for validation errors—i.e., replace the two duplicate branches with a
single path that checks isValidationError(failure) and otherwise computes error
= Cause.squash(cause) and console.error(error instanceof Error ? error.message :
String(error)); preserve the final showDebugDetails block that logs
Cause.pretty(cause).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 80e549d2-3646-4b41-a413-08efbb812027

📥 Commits

Reviewing files that changed from the base of the PR and between 7934752 and 9b33ba4.

📒 Files selected for processing (2)
  • packages/new/src/index.ts
  • packages/new/tests/cli.test.ts

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 18, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@165

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@165

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@165

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@165

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmodata@165

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@165

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@165

commit: 6dc028b

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 16

Note

Due to the large number of review comments, Critical severity comments were prioritized as inline comments.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 159ab672-10b7-4d3f-8767-ea4f05ef36cc

📥 Commits

Reviewing files that changed from the base of the PR and between 7934752 and d0f3b97.

⛔ Files ignored due to path filters (4)
  • packages/cli-old/template/fm-addon/ProofKitAuth/icon.png is excluded by !**/*.png
  • packages/cli-old/template/fm-addon/ProofKitAuth/icon@2x.png is excluded by !**/*.png
  • packages/cli-old/template/fm-addon/ProofKitAuth/preview.png is excluded by !**/*.png
  • packages/cli-old/template/fm-addon/ProofKitWV/icon.png is excluded by !**/*.png
📒 Files selected for processing (291)
  • .changeset/proofkit-cli-major-migration.md
  • .github/workflows/continuous-release.yml
  • .github/workflows/release.yml
  • apps/docs/src/app/(home)/page.tsx
  • apps/docs/src/components/AgentCommand.tsx
  • biome.json
  • btca.config.jsonc
  • packages/cli-old/.yarnrc.yml
  • packages/cli-old/CHANGELOG.md
  • packages/cli-old/README.md
  • packages/cli-old/index.d.ts
  • packages/cli-old/package.json
  • packages/cli-old/proofkit-cli-1.1.8.tgz
  • packages/cli-old/src/cli/add/auth.ts
  • packages/cli-old/src/cli/add/data-source/deploy-demo-file.ts
  • packages/cli-old/src/cli/add/data-source/filemaker.ts
  • packages/cli-old/src/cli/add/data-source/index.ts
  • packages/cli-old/src/cli/add/fmschema.ts
  • packages/cli-old/src/cli/add/index.ts
  • packages/cli-old/src/cli/add/page/index.ts
  • packages/cli-old/src/cli/add/page/post-install/table-infinite.ts
  • packages/cli-old/src/cli/add/page/post-install/table.ts
  • packages/cli-old/src/cli/add/page/templates.ts
  • packages/cli-old/src/cli/add/page/types.ts
  • packages/cli-old/src/cli/add/registry/getOptions.ts
  • packages/cli-old/src/cli/add/registry/http.ts
  • packages/cli-old/src/cli/add/registry/install.ts
  • packages/cli-old/src/cli/add/registry/listItems.ts
  • packages/cli-old/src/cli/add/registry/postInstall/handlebars.ts
  • packages/cli-old/src/cli/add/registry/postInstall/index.ts
  • packages/cli-old/src/cli/add/registry/postInstall/package-script.ts
  • packages/cli-old/src/cli/add/registry/postInstall/wrap-provider.ts
  • packages/cli-old/src/cli/add/registry/preflight.ts
  • packages/cli-old/src/cli/deploy/index.ts
  • packages/cli-old/src/cli/fmdapi.ts
  • packages/cli-old/src/cli/init.ts
  • packages/cli-old/src/cli/menu.ts
  • packages/cli-old/src/cli/ottofms.ts
  • packages/cli-old/src/cli/prompts.ts
  • packages/cli-old/src/cli/react-email.ts
  • packages/cli-old/src/cli/remove/data-source.ts
  • packages/cli-old/src/cli/remove/index.ts
  • packages/cli-old/src/cli/remove/page.ts
  • packages/cli-old/src/cli/remove/schema.ts
  • packages/cli-old/src/cli/tanstack-query.ts
  • packages/cli-old/src/cli/typegen/index.ts
  • packages/cli-old/src/cli/update/index.ts
  • packages/cli-old/src/cli/update/makeUpgradeCommand.ts
  • packages/cli-old/src/cli/utils.ts
  • packages/cli-old/src/consts.ts
  • packages/cli-old/src/generators/auth.ts
  • packages/cli-old/src/generators/fmdapi.ts
  • packages/cli-old/src/generators/route.ts
  • packages/cli-old/src/generators/tanstack-query.ts
  • packages/cli-old/src/globalOptions.ts
  • packages/cli-old/src/globals.d.ts
  • packages/cli-old/src/helpers/createProject.ts
  • packages/cli-old/src/helpers/fmHttp.ts
  • packages/cli-old/src/helpers/git.ts
  • packages/cli-old/src/helpers/installDependencies.ts
  • packages/cli-old/src/helpers/installPackages.ts
  • packages/cli-old/src/helpers/logNextSteps.ts
  • packages/cli-old/src/helpers/replaceText.ts
  • packages/cli-old/src/helpers/scaffoldProject.ts
  • packages/cli-old/src/helpers/selectBoilerplate.ts
  • packages/cli-old/src/helpers/setImportAlias.ts
  • packages/cli-old/src/helpers/shadcn-cli.ts
  • packages/cli-old/src/helpers/stealth-init.ts
  • packages/cli-old/src/helpers/version-fetcher.ts
  • packages/cli-old/src/index.ts
  • packages/cli-old/src/installers/auth-shared.ts
  • packages/cli-old/src/installers/better-auth.ts
  • packages/cli-old/src/installers/clerk.ts
  • packages/cli-old/src/installers/dependencyVersionMap.ts
  • packages/cli-old/src/installers/envVars.ts
  • packages/cli-old/src/installers/index.ts
  • packages/cli-old/src/installers/install-fm-addon.ts
  • packages/cli-old/src/installers/nextAuth.ts
  • packages/cli-old/src/installers/proofkit-auth.ts
  • packages/cli-old/src/installers/proofkit-webviewer.ts
  • packages/cli-old/src/installers/react-email.ts
  • packages/cli-old/src/state.ts
  • packages/cli-old/src/upgrades/cursorRules.ts
  • packages/cli-old/src/upgrades/index.ts
  • packages/cli-old/src/upgrades/shadcn.ts
  • packages/cli-old/src/utils/addPackageDependency.ts
  • packages/cli-old/src/utils/addToEnvs.ts
  • packages/cli-old/src/utils/formatting.ts
  • packages/cli-old/src/utils/getProofKitVersion.ts
  • packages/cli-old/src/utils/getUserPkgManager.ts
  • packages/cli-old/src/utils/isTTYError.ts
  • packages/cli-old/src/utils/logger.ts
  • packages/cli-old/src/utils/parseNameAndPath.ts
  • packages/cli-old/src/utils/parseSettings.ts
  • packages/cli-old/src/utils/proofkitReleaseChannel.ts
  • packages/cli-old/src/utils/removeTrailingSlash.ts
  • packages/cli-old/src/utils/renderTitle.ts
  • packages/cli-old/src/utils/renderVersionWarning.ts
  • packages/cli-old/src/utils/ts-morph.ts
  • packages/cli-old/src/utils/validateAppName.ts
  • packages/cli-old/src/utils/validateImportAlias.ts
  • packages/cli-old/template/extras/_cursor/conditional-rules/nextjs-framework.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/npm.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/pnpm.mdc
  • packages/cli-old/template/extras/_cursor/conditional-rules/yarn.mdc
  • packages/cli-old/template/extras/_cursor/rules/cursor-rules.mdc
  • packages/cli-old/template/extras/_cursor/rules/filemaker-api.mdc
  • packages/cli-old/template/extras/_cursor/rules/troubleshooting-patterns.mdc
  • packages/cli-old/template/extras/_cursor/rules/ui-components.mdc
  • packages/cli-old/template/extras/config/drizzle-config-mysql.ts
  • packages/cli-old/template/extras/config/drizzle-config-postgres.ts
  • packages/cli-old/template/extras/config/drizzle-config-sqlite.ts
  • packages/cli-old/template/extras/config/fmschema.config.mjs
  • packages/cli-old/template/extras/config/get-query-client.ts
  • packages/cli-old/template/extras/config/postcss.config.cjs
  • packages/cli-old/template/extras/config/query-provider-vite.tsx
  • packages/cli-old/template/extras/config/query-provider.tsx
  • packages/cli-old/template/extras/emailProviders/none/email.tsx
  • packages/cli-old/template/extras/emailProviders/plunk/email.tsx
  • packages/cli-old/template/extras/emailProviders/plunk/service.ts
  • packages/cli-old/template/extras/emailProviders/resend/email.tsx
  • packages/cli-old/template/extras/emailProviders/resend/service.ts
  • packages/cli-old/template/extras/emailTemplates/auth-code.tsx
  • packages/cli-old/template/extras/emailTemplates/generic.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/profile-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/reset-password-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/(main)/auth/profile/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/forgot-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/forgot-password/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/login-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/login/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/reset-password-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/reset-password/verify-email/verify-email-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/signup/signup-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/email-verification-form.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/page.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/resend-button.tsx
  • packages/cli-old/template/extras/fmaddon-auth/app/auth/verify-email/schema.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/actions.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/protect.tsx
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/redirect.tsx
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/use-user.ts
  • packages/cli-old/template/extras/fmaddon-auth/components/auth/user-menu.tsx
  • packages/cli-old/template/extras/fmaddon-auth/emails/auth-code.tsx
  • packages/cli-old/template/extras/fmaddon-auth/middleware.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/email-verification.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/encryption.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/index.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/password-reset.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/password.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/redirect.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/session.ts
  • packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/user.ts
  • packages/cli-old/template/extras/prisma/schema/base-planetscale.prisma
  • packages/cli-old/template/extras/prisma/schema/base.prisma
  • packages/cli-old/template/extras/prisma/schema/with-auth-planetscale.prisma
  • packages/cli-old/template/extras/prisma/schema/with-auth.prisma
  • packages/cli-old/template/extras/src/app/_components/post-tw.tsx
  • packages/cli-old/template/extras/src/app/_components/post.tsx
  • packages/cli-old/template/extras/src/app/api/auth/[...nextauth]/route.ts
  • packages/cli-old/template/extras/src/app/api/trpc/[trpc]/route.ts
  • packages/cli-old/template/extras/src/app/clerk-auth/layout.tsx
  • packages/cli-old/template/extras/src/app/clerk-auth/signin/[[...sign-in]]/page.tsx
  • packages/cli-old/template/extras/src/app/clerk-auth/signup/[[...sign-up]]/page.tsx
  • packages/cli-old/template/extras/src/app/layout/base.tsx
  • packages/cli-old/template/extras/src/app/layout/main-shell.tsx
  • packages/cli-old/template/extras/src/app/layout/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/layout/with-trpc.tsx
  • packages/cli-old/template/extras/src/app/layout/with-tw.tsx
  • packages/cli-old/template/extras/src/app/next-auth/layout.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signin/page.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signup/action.ts
  • packages/cli-old/template/extras/src/app/next-auth/signup/page.tsx
  • packages/cli-old/template/extras/src/app/next-auth/signup/validation.ts
  • packages/cli-old/template/extras/src/app/page/base.tsx
  • packages/cli-old/template/extras/src/app/page/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/page/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/app/page/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/app/page/with-trpc.tsx
  • packages/cli-old/template/extras/src/app/page/with-tw.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/clerk-provider.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/user-menu-mobile.tsx
  • packages/cli-old/template/extras/src/components/clerk-auth/user-menu.tsx
  • packages/cli-old/template/extras/src/components/next-auth/next-auth-provider.tsx
  • packages/cli-old/template/extras/src/components/next-auth/user-menu-mobile.tsx
  • packages/cli-old/template/extras/src/components/next-auth/user-menu.tsx
  • packages/cli-old/template/extras/src/env/with-auth.ts
  • packages/cli-old/template/extras/src/env/with-clerk.ts
  • packages/cli-old/template/extras/src/index.module.css
  • packages/cli-old/template/extras/src/middleware/clerk.ts
  • packages/cli-old/template/extras/src/middleware/next-auth.ts
  • packages/cli-old/template/extras/src/pages/_app/base.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-auth.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-trpc.tsx
  • packages/cli-old/template/extras/src/pages/_app/with-tw.tsx
  • packages/cli-old/template/extras/src/pages/api/auth/[...nextauth].ts
  • packages/cli-old/template/extras/src/pages/api/trpc/[trpc].ts
  • packages/cli-old/template/extras/src/pages/index/base.tsx
  • packages/cli-old/template/extras/src/pages/index/with-auth-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/index/with-auth-trpc.tsx
  • packages/cli-old/template/extras/src/pages/index/with-trpc-tw.tsx
  • packages/cli-old/template/extras/src/pages/index/with-trpc.tsx
  • packages/cli-old/template/extras/src/pages/index/with-tw.tsx
  • packages/cli-old/template/extras/src/server/api/root.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/base.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth-drizzle.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth-prisma.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-drizzle.ts
  • packages/cli-old/template/extras/src/server/api/routers/post/with-prisma.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/base.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-auth-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/trpc-app/with-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/base.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-auth-db.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-auth.ts
  • packages/cli-old/template/extras/src/server/api/trpc-pages/with-db.ts
  • packages/cli-old/template/extras/src/server/data/users.ts
  • packages/cli-old/template/extras/src/server/db/db-prisma-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/db-prisma.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-mysql.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-postgres.ts
  • packages/cli-old/template/extras/src/server/db/index-drizzle/with-sqlite.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-mysql.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-postgres.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/base-sqlite.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-mysql.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-planetscale.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-postgres.ts
  • packages/cli-old/template/extras/src/server/db/schema-drizzle/with-auth-sqlite.ts
  • packages/cli-old/template/extras/src/server/next-auth/base.ts
  • packages/cli-old/template/extras/src/server/next-auth/password.ts
  • packages/cli-old/template/extras/src/server/next-auth/with-drizzle.ts
  • packages/cli-old/template/extras/src/server/next-auth/with-prisma.ts
  • packages/cli-old/template/extras/src/trpc/query-client.ts
  • packages/cli-old/template/extras/src/trpc/react.tsx
  • packages/cli-old/template/extras/src/trpc/server.ts
  • packages/cli-old/template/extras/src/utils/api.ts
  • packages/cli-old/template/extras/start-database/mysql.sh
  • packages/cli-old/template/extras/start-database/postgres.sh
  • packages/cli-old/template/fm-addon/ProofKitAuth/de.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/en.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/es.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/fr.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/info.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_de.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_en.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_es.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_fr.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_it.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ja.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ko.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_nl.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_pt.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_sv.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_zh.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/it.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/ja.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/ko.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/nl.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/pt.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/sv.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/template.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/zh.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/de.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/en.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/es.xml
  • packages/cli-old/template/fm-addon/ProofKitWV/fr.xml
✅ Files skipped from review due to trivial changes (16)
  • packages/cli-old/template/extras/src/index.module.css
  • packages/cli-old/template/fm-addon/ProofKitAuth/fr.xml
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_it.json
  • btca.config.jsonc
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_es.json
  • packages/cli-old/README.md
  • biome.json
  • packages/cli-old/template/extras/config/postcss.config.cjs
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_en.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_sv.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ja.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_pt.json
  • packages/cli-old/template/extras/_cursor/conditional-rules/nextjs-framework.mdc
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_fr.json
  • packages/cli-old/template/fm-addon/ProofKitAuth/info_ko.json
  • apps/docs/src/app/(home)/page.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/release.yml
  • .github/workflows/continuous-release.yml

Comment on lines +1 to +5
packageExtensions:
chalk@5.0.1:
dependencies:
"#ansi-styles": npm:ansi-styles@6.1.0
"#supports-color": npm:supports-color@9.2.2
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify packageExtensions syntax and chalk dependencies

# Check if ansi-styles@6.1.0 and supports-color@9.2.2 exist on npm
echo "=== Checking if specified versions exist on npm ==="
curl -s https://registry.npmjs.org/ansi-styles | jq -r '.versions | keys[] | select(. == "6.1.0")'
curl -s https://registry.npmjs.org/supports-color | jq -r '.versions | keys[] | select(. == "9.2.2")'

# Check chalk@5.0.1 actual dependencies
echo -e "\n=== Checking chalk@5.0.1 dependencies ==="
curl -s https://registry.npmjs.org/chalk/5.0.1 | jq '.dependencies, .peerDependencies'

# Check Yarn version in use
echo -e "\n=== Checking Yarn version ==="
fd -t f 'package.json' packages/cli-old --exec cat {} | jq -r '.packageManager // "not specified"'

Repository: proofgeist/proofkit

Length of output: 266


🌐 Web query:

Yarn packageExtensions syntax with subpath imports

💡 Result:

packageExtensions keys are package descriptors (<packageName>@<semverRange>), not module-specifier strings, so you can’t target a subpath import like react-dom/client (or lodash/fp) in the key. Yarn applies the extension to the package whose version matches the range. [1]

Correct syntax

# .yarnrc.yml
packageExtensions:
  react-dom@*:
    dependencies:
      scheduler: "^0.23.0"

  "@scope/pkg@^1.2.0":
    peerDependencies:
      react: "*"
    peerDependenciesMeta:
      react:
        optional: true

Each key is “a descriptor covering a semver range”; Yarn merges in dependencies, peerDependencies, and peerDependenciesMeta. [1][2]

How this relates to subpath imports

If some package is doing import "react-dom/client", the dependency it needs to list (and the one you can fix via packageExtensions) is still react-dom, because client is just a file/subpath inside that package (often governed by the package’s exports). packageExtensions won’t change whether a given subpath is exported; it only amends dependency metadata. [1]

Sources:
[1] Yarn .yarnrc.yml config docs (packageExtensions section) (documents.devdocs.io)
[2] Yarn configuration type for packageExtensions (yarnpkg.com)

Citations:


Remove the "#" prefix from dependency keys in packageExtensions — this syntax is invalid.

The keys "#ansi-styles" and "#supports-color" violate Yarn's packageExtensions schema. According to Yarn documentation, packageExtensions keys must be package descriptors in the format <packageName>@<semverRange>, not subpath import names with # prefixes.

The correct syntax is:

Corrected packageExtensions syntax
packageExtensions:
  ansi-styles@6.1.0:
    # ...
  supports-color@9.2.2:
    # ...

Or using semver ranges:

packageExtensions:
  ansi-styles@*:
    # ...
  supports-color@*:
    # ...

Additionally, chalk@5.0.1 lists no dependencies on npm, so these overrides may be unnecessary. Verify whether these packageExtensions additions are required or if they can be removed entirely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/.yarnrc.yml` around lines 1 - 5, The packageExtensions block
uses invalid keys "#ansi-styles" and "#supports-color"; replace those entries
under packageExtensions -> chalk@5.0.1 with valid package descriptors such as
ansi-styles@6.1.0 and supports-color@9.2.2 (or use semver ranges like
ansi-styles@* and supports-color@*) or remove the packageExtensions for
chalk@5.0.1 entirely if those dependency overrides are not required; update the
keys and/or remove the overrides so the packageExtensions schema uses proper
"<packageName>@<semverRange>" descriptors.

Comment on lines +378 to +410
while (fmsVersion === null) {
const serverUrl =
serverUrlToUse ??
abortIfCancel(
await p.text({
message: `What is the URL of your FileMaker Server?\n${chalk.cyan("TIP: You can copy any valid path on the server and paste it here.")}`,
validate: (value) => {
try {
// try to make sure the url is https
let normalizedValue = value;
if (!normalizedValue.startsWith("https://")) {
if (normalizedValue.startsWith("http://")) {
normalizedValue = normalizedValue.replace("http://", "https://");
} else {
normalizedValue = `https://${normalizedValue}`;
}
}

// try to make sure the url is valid
new URL(normalizedValue);
return;
} catch {
return "Please enter a valid URL";
}
},
}),
);

try {
url = new URL(serverUrl);
} catch {
p.log.error(`Invalid URL: ${serverUrl.toString()}`);
continue;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Normalize accepted server URLs before parsing them.

The prompt validator accepts example.com and http://... by rewriting them to HTTPS internally, but Line 407 still parses the original string. That makes accepted input fail on the next step, and if the bad value came from --server, the loop keeps retrying the same string forever.

Suggested fix
+function normalizeServerUrl(value: string): string {
+  if (value.startsWith("https://")) {
+    return value;
+  }
+  if (value.startsWith("http://")) {
+    return value.replace("http://", "https://");
+  }
+  return `https://${value}`;
+}
+
 async function getValidFileMakerServerUrl(defaultServerUrl?: string | undefined): Promise<{
   url: URL;
   fmsVersion: SemVer;
@@
-    const serverUrl =
+    const rawServerUrl =
       serverUrlToUse ??
       abortIfCancel(
         await p.text({
@@
         }),
       );
+    const serverUrl = normalizeServerUrl(rawServerUrl);
 
     try {
       url = new URL(serverUrl);
     } catch {
-      p.log.error(`Invalid URL: ${serverUrl.toString()}`);
+      p.log.error(`Invalid URL: ${serverUrl}`);
+      serverUrlToUse = undefined;
       continue;
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
while (fmsVersion === null) {
const serverUrl =
serverUrlToUse ??
abortIfCancel(
await p.text({
message: `What is the URL of your FileMaker Server?\n${chalk.cyan("TIP: You can copy any valid path on the server and paste it here.")}`,
validate: (value) => {
try {
// try to make sure the url is https
let normalizedValue = value;
if (!normalizedValue.startsWith("https://")) {
if (normalizedValue.startsWith("http://")) {
normalizedValue = normalizedValue.replace("http://", "https://");
} else {
normalizedValue = `https://${normalizedValue}`;
}
}
// try to make sure the url is valid
new URL(normalizedValue);
return;
} catch {
return "Please enter a valid URL";
}
},
}),
);
try {
url = new URL(serverUrl);
} catch {
p.log.error(`Invalid URL: ${serverUrl.toString()}`);
continue;
function normalizeServerUrl(value: string): string {
if (value.startsWith("https://")) {
return value;
}
if (value.startsWith("http://")) {
return value.replace("http://", "https://");
}
return `https://${value}`;
}
while (fmsVersion === null) {
const rawServerUrl =
serverUrlToUse ??
abortIfCancel(
await p.text({
message: `What is the URL of your FileMaker Server?\n${chalk.cyan("TIP: You can copy any valid path on the server and paste it here.")}`,
validate: (value) => {
try {
// try to make sure the url is https
let normalizedValue = value;
if (!normalizedValue.startsWith("https://")) {
if (normalizedValue.startsWith("http://")) {
normalizedValue = normalizedValue.replace("http://", "https://");
} else {
normalizedValue = `https://${normalizedValue}`;
}
}
// try to make sure the url is valid
new URL(normalizedValue);
return;
} catch {
return "Please enter a valid URL";
}
},
}),
);
const serverUrl = normalizeServerUrl(rawServerUrl);
try {
url = new URL(serverUrl);
} catch {
p.log.error(`Invalid URL: ${serverUrl}`);
serverUrlToUse = undefined;
continue;
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/src/cli/add/data-source/filemaker.ts` around lines 378 -
410, The validator currently normalizes input to HTTPS (normalizedValue) but the
code still parses the original serverUrl, causing valid inputs like
"example.com" or "http://..." to fail; fix this by applying the same
normalization logic to serverUrl before calling new URL(serverUrl) (and when
using serverUrlToUse from flags), i.e., compute a normalizedServerUrl that
ensures "https://" and is a valid URL (same steps as in the validator) and then
do url = new URL(normalizedServerUrl); update references to ensure the loop and
any --server path use the normalized value so the validator and parser behave
consistently.

Comment on lines +32 to +45
export const makeAddDataSourceCommand = () => {
const addDataSourceCommand = new Command("data");
addDataSourceCommand.description("Add a new data source to your project");
addDataSourceCommand.addOption(ciOption);
addDataSourceCommand.addOption(nonInteractiveOption);

addDataSourceCommand.hook("preAction", (_thisCommand, actionCommand) => {
initProgramState(actionCommand.opts());
const settings = ensureProofKitProject({ commandName: "add" });
actionCommand.setOptionValue("settings", settings);
});

// addDataSourceCommand.action();
return addDataSourceCommand;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Bind runAddDataSourceCommand before returning the subcommand.

makeAddDataSourceCommand() never registers an action, so proofkit add data will parse the command and then exit without running any workflow.

Minimal fix
 export const makeAddDataSourceCommand = () => {
   const addDataSourceCommand = new Command("data");
   addDataSourceCommand.description("Add a new data source to your project");
   addDataSourceCommand.addOption(ciOption);
   addDataSourceCommand.addOption(nonInteractiveOption);
@@
-  // addDataSourceCommand.action();
+  addDataSourceCommand.action(runAddDataSourceCommand);
   return addDataSourceCommand;
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/src/cli/add/data-source/index.ts` around lines 32 - 45, The
subcommand created in makeAddDataSourceCommand never registers its action, so
addDataSourceCommand should call .action(...) to attach the handler; locate
makeAddDataSourceCommand and add a line like
addDataSourceCommand.action(runAddDataSourceCommand) (or pass a bound wrapper if
runAddDataSourceCommand is a method needing context) before returning
addDataSourceCommand so the runAddDataSourceCommand function is executed when
the "proofkit add data" command runs.

Comment on lines +34 to +65
const data = await new Promise<WizardResponse>((resolve) => {
const pollingInterval = setInterval(() => {
axios
.get<{ response: WizardResponse }>(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.then((result) => {
resolve(result.data.response);
clearTimeout(timeout);
clearInterval(pollingInterval);
axios
.delete(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.catch(() => {
// Ignore cleanup errors
});
})
.catch(() => {
// noop - just try again
});
}, 500);

const timeout = setTimeout(() => {
clearInterval(pollingInterval);
loginSpinner.stop("Login timed out. No worries - it happens to the best of us.");
}, 180_000); // 3 minutes
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Timeout path never settles the login promise

Line 61–64 stops polling, but the promise created at Line 34 is never resolved/rejected on timeout. This leaves await hanging indefinitely.

🐛 Proposed fix
-  const data = await new Promise<WizardResponse>((resolve) => {
+  const data = await new Promise<WizardResponse>((resolve, reject) => {
@@
     const timeout = setTimeout(() => {
       clearInterval(pollingInterval);
       loginSpinner.stop("Login timed out. No worries - it happens to the best of us.");
+      reject(new Error("Login timed out after 3 minutes."));
     }, 180_000); // 3 minutes
   });
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const data = await new Promise<WizardResponse>((resolve) => {
const pollingInterval = setInterval(() => {
axios
.get<{ response: WizardResponse }>(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.then((result) => {
resolve(result.data.response);
clearTimeout(timeout);
clearInterval(pollingInterval);
axios
.delete(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.catch(() => {
// Ignore cleanup errors
});
})
.catch(() => {
// noop - just try again
});
}, 500);
const timeout = setTimeout(() => {
clearInterval(pollingInterval);
loginSpinner.stop("Login timed out. No worries - it happens to the best of us.");
}, 180_000); // 3 minutes
});
const data = await new Promise<WizardResponse>((resolve, reject) => {
const pollingInterval = setInterval(() => {
axios
.get<{ response: WizardResponse }>(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.then((result) => {
resolve(result.data.response);
clearTimeout(timeout);
clearInterval(pollingInterval);
axios
.delete(`${url.origin}/otto/api/cli/checkHash/${hash}`, {
headers: {
"Accept-Encoding": "deflate",
},
})
.catch(() => {
// Ignore cleanup errors
});
})
.catch(() => {
// noop - just try again
});
}, 500);
const timeout = setTimeout(() => {
clearInterval(pollingInterval);
loginSpinner.stop("Login timed out. No worries - it happens to the best of us.");
reject(new Error("Login timed out after 3 minutes."));
}, 180_000); // 3 minutes
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/src/cli/ottofms.ts` around lines 34 - 65, The promise
created for polling (the const data = await new
Promise<WizardResponse>((resolve) => { ... })) never settles on the timeout
path; modify the timeout handler to both stop the spinner and settle the promise
(call the promise's reject or resolve) so awaiting code won't hang: capture both
resolve and reject in the Promise constructor, and in the timeout callback
clearInterval(pollingInterval), stop the loginSpinner, and call reject(new
Error("Login timed out")) (or resolve with an appropriate error/timeout
response) and also perform the same cleanup delete call if needed; update
references inside the block (pollingInterval, timeout, loginSpinner,
resolve/reject) accordingly.

Comment on lines +102 to +106
if (dataSource?.type === "fm") {
// For FileMaker data sources, remove from fmschema.config.mjs
removeFromFmschemaConfig({
dataSourceName,
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Await the fmschema update before regenerating types.

removeFromFmschemaConfig(...) is async. Without await, Line 122 can run typegen against stale config, and any write failure becomes an unhandled rejection.

Suggested fix
-    removeFromFmschemaConfig({
+    await removeFromFmschemaConfig({
       dataSourceName,
     });
As per coding guidelines, "Always `await` promises in async functions - don't forget to use the return value".
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (dataSource?.type === "fm") {
// For FileMaker data sources, remove from fmschema.config.mjs
removeFromFmschemaConfig({
dataSourceName,
});
if (dataSource?.type === "fm") {
// For FileMaker data sources, remove from fmschema.config.mjs
await removeFromFmschemaConfig({
dataSourceName,
});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/src/cli/remove/data-source.ts` around lines 102 - 106, The
call to removeFromFmschemaConfig is asynchronous but currently not awaited, so
await removeFromFmschemaConfig({ dataSourceName }) inside the block where
dataSource?.type === "fm" (and ensure the enclosing function is async), before
invoking the subsequent type generation step (e.g., the typegen/regenerate call)
to avoid running typegen against stale config and to prevent unhandled
rejections; optionally wrap the await in a try/catch to surface/log errors from
removeFromFmschemaConfig.

@@ -0,0 +1,9 @@
/** @type {import("@proofkit/fmdapi/dist/utils/typegen/types.d.ts").GenerateSchemaOptions} */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if GenerateSchemaOptions is exported from the main package entry or a public subpath

# Search for exports of GenerateSchemaOptions in the fmdapi package
fd -t f "package.json" --full-path ".*fmdapi.*" --exec cat {} \; 2>/dev/null | jq -r '.exports // empty'

# Check if the type is re-exported from the main index
ast-grep --pattern 'export { $$$GenerateSchemaOptions$$$ }'

# Alternative: search for the type export declarations
rg -n "GenerateSchemaOptions" --type ts -g '!dist' -g '!node_modules'

Repository: proofgeist/proofkit

Length of output: 255


🏁 Script executed:

# Check the fmdapi package.json for exports field
cat packages/fmdapi/package.json | head -50

Repository: proofgeist/proofkit

Length of output: 1456


🏁 Script executed:

# Verify the actual structure of type files in fmdapi
fd -t f "types\." packages/fmdapi --exclude dist --exclude node_modules

Repository: proofgeist/proofkit

Length of output: 187


🏁 Script executed:

# Check if dist/ actually exists and where the type file is located
find packages/fmdapi -name "types.js" -o -name "types.d.ts" 2>/dev/null

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Find the typegen directory and files
find packages/fmdapi -path "*typegen*" -type f 2>/dev/null

Repository: proofgeist/proofkit

Length of output: 95


🏁 Script executed:

# Check the actual content of the typegen types file
find packages/fmdapi/src -path "*typegen*" -type f -exec cat {} \;

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Read the actual test file that's being imported
cat packages/fmdapi/tests/typegen.ts

Repository: proofgeist/proofkit

Length of output: 964


🏁 Script executed:

# Search for where GenerateSchemaOptions is actually defined
rg -n "GenerateSchemaOptions" packages/fmdapi --type ts --type js -A 5

Repository: proofgeist/proofkit

Length of output: 779


🏁 Script executed:

# Verify the actual dist structure for the built package
ls -la packages/fmdapi/dist/esm/ 2>/dev/null | head -20

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check if there's a utils.d.ts file and what it contains
cat packages/fmdapi/dist/esm/utils.d.ts 2>/dev/null | head -50

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Search for where typegen is actually exported from in src
cat packages/fmdapi/src/utils/typegen/index.js 2>/dev/null || cat packages/fmdapi/src/utils/typegen/index.ts 2>/dev/null

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Find all files in the typegen directory
find packages/fmdapi/src -path "*typegen*" -type f

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check what's in the utils directory
ls -la packages/fmdapi/src/utils/

Repository: proofgeist/proofkit

Length of output: 136


🏁 Script executed:

# Search for types.ts or types.js specifically
fd "types\.(ts|js)$" packages/fmdapi/src

Repository: proofgeist/proofkit

Length of output: 187


🏁 Script executed:

# List the actual structure of packages/fmdapi/src
ls -la packages/fmdapi/src/

Repository: proofgeist/proofkit

Length of output: 540


🏁 Script executed:

# Look at all files in packages/fmdapi/src recursively to understand structure
find packages/fmdapi/src -type f -name "*.ts" -o -name "*.js" | head -30

Repository: proofgeist/proofkit

Length of output: 632


🏁 Script executed:

# Check what the template file is trying to import - maybe the package doesn't have this type yet
cat packages/cli-old/template/extras/config/fmschema.config.mjs

Repository: proofgeist/proofkit

Length of output: 338


🏁 Script executed:

# Check if the typegen type even exists anywhere in the codebase
rg -r "type GenerateSchemaOptions" --type ts --type js

Repository: proofgeist/proofkit

Length of output: 459


🏁 Script executed:

# Check the utils.ts file to see what it exports
cat packages/fmdapi/src/utils.ts

Repository: proofgeist/proofkit

Length of output: 1309


🏁 Script executed:

# Check if there's a typegen feature at all
rg -r "typegen" --type ts --type js --type mjs packages/fmdapi

Repository: proofgeist/proofkit

Length of output: 90


🏁 Script executed:

# Search for typegen in the codebase properly
rg "typegen" packages/fmdapi -A 2 -B 2

Repository: proofgeist/proofkit

Length of output: 7831


🏁 Script executed:

# Check the cli-old directory to understand the template structure
find packages/cli-old -type f -name "*.ts" -o -name "*.js" -o -name "*.mjs" | head -20

Repository: proofgeist/proofkit

Length of output: 1081


🏁 Script executed:

# Look for any typegen references in the entire repository
rg "GenerateSchemaOptions\|typegen" --type ts --type js

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check if typegen is a separate package in the monorepo
ls -la packages/ | grep -i typegen

Repository: proofgeist/proofkit

Length of output: 119


🏁 Script executed:

# Look at the cli-old add fmschema command to understand what the template should be
cat packages/cli-old/src/cli/add/fmschema.ts

Repository: proofgeist/proofkit

Length of output: 7212


🏁 Script executed:

# Check if there's a separate typegen package
find packages -maxdepth 1 -type d | sort

Repository: proofgeist/proofkit

Length of output: 234


🏁 Script executed:

# Check the typegen package structure
ls -la packages/typegen/src

Repository: proofgeist/proofkit

Length of output: 941


🏁 Script executed:

# Look for the GenerateSchemaOptions type in the typegen package
rg "GenerateSchemaOptions" packages/typegen --type ts --type js -B 2 -A 5

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check the typegen package.json for exports
cat packages/typegen/package.json | grep -A 30 '"exports"'

Repository: proofgeist/proofkit

Length of output: 709


🏁 Script executed:

# Check what's exported from `@proofkit/typegen/config`
cat packages/typegen/src/types.ts | head -50

Repository: proofgeist/proofkit

Length of output: 2070


🏁 Script executed:

# Verify if GenerateSchemaOptions is exported
rg "export.*GenerateSchemaOptions" packages/typegen/src/types.ts

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Read more of the types.ts file to find GenerateSchemaOptions
cat packages/typegen/src/types.ts | grep -A 10 "GenerateSchemaOptions\|export type\|export const"

Repository: proofgeist/proofkit

Length of output: 2340


🏁 Script executed:

# Search for GenerateSchemaOptions in all of typegen
rg "GenerateSchemaOptions" packages/typegen

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check the index.ts to see what's being exported
cat packages/typegen/src/index.ts

Repository: proofgeist/proofkit

Length of output: 411


🏁 Script executed:

# Double-check: search for GenerateSchemaOptions type definition
rg "type GenerateSchemaOptions\|interface GenerateSchemaOptions" --type ts --type js

Repository: proofgeist/proofkit

Length of output: 45


🏁 Script executed:

# Check what the test file is actually trying to do and if that import is valid
ls -la packages/fmdapi/src/utils/ 2>/dev/null || echo "No utils directory in fmdapi/src"

Repository: proofgeist/proofkit

Length of output: 95


🏁 Script executed:

# Verify the actual template file again to confirm what it's trying to import
cat -n packages/cli-old/template/extras/config/fmschema.config.mjs

Repository: proofgeist/proofkit

Length of output: 401


🏁 Script executed:

# Check if there's a TypegenConfig type or similar that should be used
rg "export type.*Config" packages/typegen/src/types.ts

Repository: proofgeist/proofkit

Length of output: 216


🏁 Script executed:

# Verify the cli-old add fmschema command to see what it's actually using
cat packages/cli-old/src/cli/add/fmschema.ts | grep -i "import.*typegen\|ValueListsOptions"

Repository: proofgeist/proofkit

Length of output: 194


🏁 Script executed:

# Check if the test file is even in the repo or part of tests that should exist
git ls-files packages/fmdapi/tests/typegen.ts 2>/dev/null || echo "File may not be tracked"

Repository: proofgeist/proofkit

Length of output: 95


Use correct type from @proofkit/typegen package.

The import path @proofkit/fmdapi/dist/utils/typegen/types.d.ts does not exist, and GenerateSchemaOptions is not exported from fmdapi. The correct type is TypegenConfig from @proofkit/typegen/config:

Corrected JSDoc annotation
/** `@type` {import("@proofkit/typegen/config").TypegenConfig} */
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/template/extras/config/fmschema.config.mjs` at line 1,
Replace the incorrect JSDoc type import that references GenerateSchemaOptions
from a non-existent `@proofkit/fmdapi` path: change the annotation to use the
correct exported type TypegenConfig from `@proofkit/typegen/config` (i.e., update
the JSDoc to import("@proofkit/typegen/config").TypegenConfig) so the file uses
the proper TypegenConfig symbol instead of GenerateSchemaOptions.

import { AuthCodeEmail } from "@/emails/auth-code";
import { render } from "@react-email/render";

import { plunk } from "../services/plunk";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the actual location of plunk service and verify import paths

# Find all plunk service files
echo "=== Plunk service file locations ==="
fd -t f "service.ts" --full-path ".*plunk.*"

# Check the directory structure under emailProviders
echo ""
echo "=== Directory structure under emailProviders ==="
fd . packages/cli-old/template/extras/emailProviders --type d

# Check if there's a services folder
echo ""
echo "=== Looking for services folder ==="
fd -t d "services" packages/cli-old/template/extras/

Repository: proofgeist/proofkit

Length of output: 465


🏁 Script executed:

#!/bin/bash
# List all files in the plunk directory
echo "=== Files in plunk directory ==="
ls -la packages/cli-old/template/extras/emailProviders/plunk/

# Check the full file contents of email.tsx to see the imports and context
echo ""
echo "=== Content of email.tsx ==="
cat packages/cli-old/template/extras/emailProviders/plunk/email.tsx

Repository: proofgeist/proofkit

Length of output: 935


🏁 Script executed:

#!/bin/bash
# Check what's exported from service.ts
echo "=== Content of service.ts ==="
cat packages/cli-old/template/extras/emailProviders/plunk/service.ts

Repository: proofgeist/proofkit

Length of output: 213


Fix incorrect import path for plunk service.

The import import { plunk } from "../services/plunk" references a non-existent directory. The service.ts file is in the same directory as email.tsx. Change to:

import { plunk } from "./service";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/template/extras/emailProviders/plunk/email.tsx` at line 4,
The import at the top of email.tsx is pointing to a non-existent
../services/plunk; update the import to reference the local service file
(service.ts) instead. Replace the incorrect import statement that references
plunk with one that imports plunk from "./service" so symbols used in this file
(plunk) resolve to the service.ts implementation in the same directory.

@@ -0,0 +1,24 @@
import { AuthCodeEmail } from "@/emails/auth-code";

import { resend } from "../services/resend";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check the actual location of resend service

# Find all resend service files
echo "=== Resend service file locations ==="
fd -t f "service.ts" --full-path ".*resend.*"

# List all files under emailProviders to understand structure
echo ""
echo "=== All files under emailProviders ==="
fd . packages/cli-old/template/extras/emailProviders -t f

Repository: proofgeist/proofkit

Length of output: 578


Fix incorrect import path for Resend service module.

The import import { resend } from "../services/resend"; resolves to a non-existent directory. The service file is located in the same directory as email.tsx, not in a services/ subdirectory. Change to import { resend } from "./service";.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/template/extras/emailProviders/resend/email.tsx` at line 3,
The import in email.tsx for the Resend service is pointing to a non-existent
../services/resend; update the import to the correct local module path where the
service actually lives (change the import for the resend symbol in email.tsx to
import from "./service") so that the resend export is resolved from the same
directory as email.tsx.

Comment on lines +1 to +2
import { Session } from "@/server/auth/utils/session";
import { User } from "@/server/auth/utils/user";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify value-vs-type imports in the hook and inspect referenced session/user modules.
set -euo pipefail

echo "==> use-user.ts imports"
sed -n '1,30p' packages/cli-old/template/extras/fmaddon-auth/components/auth/use-user.ts

echo
echo "==> Candidate session/user modules under fmaddon-auth"
fd '^(session|user)\.ts$' packages/cli-old/template/extras/fmaddon-auth | while read -r f; do
  echo "--- $f"
  sed -n '1,120p' "$f"
done

Repository: proofgeist/proofkit

Length of output: 7580


Use type-only imports for Session and User in this client component.

These are used only as types in the UseUserResult definition. Without import type, the value imports can pull server-side modules into the client bundle, breaking the client/server boundary.

✅ Suggested fix
-import { Session } from "@/server/auth/utils/session";
-import { User } from "@/server/auth/utils/user";
+import type { Session } from "@/server/auth/utils/session";
+import type { User } from "@/server/auth/utils/user";
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/cli-old/template/extras/fmaddon-auth/components/auth/use-user.ts`
around lines 1 - 2, Change the imports of Session and User to type-only imports
so the client component doesn't pull server code into the bundle: replace the
current value imports of Session and User with type imports (i.e., use `import
type { Session }` and `import type { User }`) where they are only used in the
UseUserResult type in use-user.ts.

Comment on lines +36 to +40
export async function createEmailVerificationRequest(
id_user: string,
email: string
): Promise<TemailVerification> {
deleteUserEmailVerificationRequest(id_user);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Await the old-request delete before creating the new one.

Right now deletion runs concurrently with insertion. If the delete resolves late, it can remove the freshly created request or leave duplicate rows behind.

Suggested fix
 export async function createEmailVerificationRequest(
   id_user: string,
   email: string
 ): Promise<TemailVerification> {
-  deleteUserEmailVerificationRequest(id_user);
+  await deleteUserEmailVerificationRequest(id_user);
   const idBytes = new Uint8Array(20);
   crypto.getRandomValues(idBytes);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export async function createEmailVerificationRequest(
id_user: string,
email: string
): Promise<TemailVerification> {
deleteUserEmailVerificationRequest(id_user);
export async function createEmailVerificationRequest(
id_user: string,
email: string
): Promise<TemailVerification> {
await deleteUserEmailVerificationRequest(id_user);
const idBytes = new Uint8Array(20);
crypto.getRandomValues(idBytes);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/cli-old/template/extras/fmaddon-auth/server/auth/utils/email-verification.ts`
around lines 36 - 40, The deletion of any previous verification request is
currently fired but not awaited in createEmailVerificationRequest, which can
race with the new insertion; update createEmailVerificationRequest to await the
call to deleteUserEmailVerificationRequest(id_user) before proceeding to
create/insert the new TemailVerification so the old request is removed
deterministically and duplicates cannot occur.

Copy link
Copy Markdown
Collaborator Author

eluce2 commented Mar 18, 2026

Merge activity

  • Mar 18, 10:28 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 18, 10:32 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 18, 10:33 PM UTC: @eluce2 merged this pull request with Graphite.

@eluce2 eluce2 changed the base branch from codex/proofkit-new-scaffold to graphite-base/165 March 18, 2026 22:29
@eluce2 eluce2 changed the base branch from graphite-base/165 to main March 18, 2026 22:30
@eluce2 eluce2 force-pushed the review-new-tests branch from 6dc028b to a5c9ea6 Compare March 18, 2026 22:31
@eluce2 eluce2 merged commit d3c7979 into main Mar 18, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant