Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Sep 17, 2025

Summary by CodeRabbit

  • New Features

    • Added a dedicated Prisma configuration file with a templated seed command and integrated generator support that ensures the file is included in linting.
  • Bug Fixes

    • Session cookie is now cleared using the same options used when setting it, preventing stale cookies.
  • Chores

    • Upgraded Prisma-related packages to 6.16.2.
    • Migrated seed setup from package scripts into the new Prisma configuration for example backends.
    • Registered the new config in project templates and metadata.
    • Added a changeset for a patch release.

@vercel
Copy link

vercel bot commented Sep 17, 2025

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

Project Deployment Preview Comments Updated (UTC)
baseplate-project-builder-web Ready Ready Preview Comment Sep 17, 2025 8:25pm

@changeset-bot
Copy link

changeset-bot bot commented Sep 17, 2025

🦋 Changeset detected

Latest commit: dad1c32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-queue Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/create-project Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/core-generators Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Sep 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Adds a Prisma config template and generator flow that emits prisma.config.mts, upgrades Prisma packages to 6.16.2 across generators and examples, moves seed command into the Prisma config rendering, includes the config in ESLint TS projects, and fixes cookie clearing to use consistent options.

Changes

Cohort / File(s) Summary
Changeset
.changeset/little-snakes-guess.md
Adds a patch changeset for @baseplate-dev/fastify-generators noting a Prisma upgrade.
Examples: blog-with-auth backend
examples/blog-with-auth/packages/backend/.templates-info.json, examples/blog-with-auth/packages/backend/baseplate/file-id-map.json, examples/blog-with-auth/packages/backend/eslint.config.mjs, examples/blog-with-auth/packages/backend/package.json, examples/blog-with-auth/packages/backend/prisma.config.mts
Registers prisma.config.mts in templates and file-id-map; appends it to ESLint TS default project files; bumps @prisma/client and prisma to 6.16.2; removes the package.json prisma seed; adds prisma.config.mts exporting migrations.seed and calling loadEnvFile().
Examples: blog-with-auth runtime fix
examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
When catching InvalidSessionError, clears the session cookie with the same COOKIE_OPTIONS used when setting it (calls reply.clearCookie(cookieName, COOKIE_OPTIONS)).
Examples: todo-with-auth0 backend
examples/todo-with-auth0/packages/backend/.templates-info.json, examples/todo-with-auth0/packages/backend/baseplate/file-id-map.json, examples/todo-with-auth0/packages/backend/eslint.config.mjs, examples/todo-with-auth0/packages/backend/package.json, examples/todo-with-auth0/packages/backend/prisma.config.mts
Mirrors blog changes: registers and maps prisma.config.mts, includes it in ESLint TS project files, bumps Prisma to 6.16.2, removes package.json prisma seed, and adds prisma.config.mts with migrations.seed and loadEnvFile() call.
Generators: fastify-generators (Prisma)
packages/fastify-generators/package.json, packages/fastify-generators/src/constants/fastify-packages.ts, packages/fastify-generators/src/generators/prisma/prisma/extractor.json, packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts, packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.mts
Bumps pinned Prisma versions (including @prisma/internals) to 6.16.2; adds a prisma-config template and template file; updates the Prisma generator to remove inline seed wiring, render prisma.config.mts with a TPL_SEED_COMMAND variable, and add an eslint build task that appends prisma.config.mts to ESLint TS default project files.
Snapshots / CI hints
examples/todo-with-auth0/packages/backend/.baseplate-snapshot/diffs/package.json.diff
Reflects Prisma upgrade to 6.16.2 and added sentry-testkit in snapshot diff.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant Gen as Prisma Generator
  participant Rend as Renderers
  participant FS as Filesystem / Project
  participant ESL as ESLint Config
  participant Prisma as Prisma CLI

  Dev->>Gen: run generator (build / seed)
  Gen->>Rend: renderers.prismaConfig({ TPL_SEED_COMMAND })
  Rend-->>FS: write `prisma.config.mts` (contains migrations.seed)
  Gen->>ESL: append `prisma.config.mts` to eslintConfig.tsDefaultProjectFiles

  Note over FS,Prisma: At migration/seed time
  Prisma->>FS: load `prisma.config.mts` (loadEnvFile() executed)
  FS-->>Prisma: provide { migrations.seed: "tsx ... src/prisma/seed.ts" }
  Prisma->>Prisma: execute seed command
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: Upgrade Prisma to 6.16.1" is concise and correctly highlights the primary intent (upgrading Prisma), but the diff and package updates in this PR show Prisma dependencies moved to 6.16.2 in multiple files, so the version in the title does not match the changeset. The title otherwise clearly describes the main change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7ac2ceb and dad1c32.

📒 Files selected for processing (2)
  • .changeset/little-snakes-guess.md (1 hunks)
  • examples/todo-with-auth0/packages/backend/.baseplate-snapshot/diffs/package.json.diff (1 hunks)

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Sep 17, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​prisma/​internals@​6.14.0 ⏵ 6.16.294 +110076 +297 +1100
Updated@​prisma/​client@​6.14.0 ⏵ 6.16.294 +110085 +297 +1100
Updatedprisma@​6.14.0 ⏵ 6.16.29410098 +197 +1100

View full report

Copy link

@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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
examples/todo-with-auth0/packages/backend/package.json (1)

7-8: Convert backend example to ESM

Package declares CommonJS; change to ESM and ensure TS + runtime are ESM-safe.

File: examples/todo-with-auth0/packages/backend/package.json (lines 7-8)

Apply:

-  "type": "commonjs",
+  "type": "module",

Verify:

  • examples/todo-with-auth0/packages/**/tsconfig*.json — set "module": "NodeNext" and "moduleResolution": "NodeNext".
  • Ensure runtime imports use .js extensions and use import type for type-only imports.
🧹 Nitpick comments (7)
.changeset/little-snakes-guess.md (1)

5-5: Align the version in Changeset with actual upgrade (6.16.2).

Repo changes bump Prisma-related packages to 6.16.2. Please update the description to avoid release-note drift.

Apply this diff:

-Upgrade Prisma to 6.16.1
+Upgrade Prisma to 6.16.2
examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts (1)

248-248: Safer cookie clearing: override/max‑age to zero (or omit it).

Passing COOKIE_OPTIONS as‑is also passes maxAge intended for setting, which can conflict with Expires when clearing; user agents give Max‑Age precedence. Explicitly set maxAge: 0 (or omit maxAge entirely) when clearing.

Apply this diff:

-        reply.clearCookie(cookieName, COOKIE_OPTIONS);
+        reply.clearCookie(cookieName, { ...COOKIE_OPTIONS, maxAge: 0 });

Note: MDN states Max-Age takes precedence over Expires; fastify/cookie added setting maxAge: 0 in clearCookie to address this, but being explicit here guards against regressions.

packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (1)

112-119: Avoid duplicate entries in ESLint tsDefaultProjectFiles.

If the generator runs twice, this may push duplicates. Guard with an includes check.

-      run({ eslintConfig }) {
-        eslintConfig.tsDefaultProjectFiles.push('prisma.config.mts');
-      },
+      run({ eslintConfig }) {
+        if (!eslintConfig.tsDefaultProjectFiles.includes('prisma.config.mts')) {
+          eslintConfig.tsDefaultProjectFiles.push('prisma.config.mts');
+        }
+      },
examples/todo-with-auth0/packages/backend/package.json (2)

109-115: Enforce pnpm 10+ via packageManager field.

Guideline asks to enforce via packageManager (in addition to engines/preinstall).

   "volta": {
     "node": "22.18.0"
-  }
+  },
+  "packageManager": "[email protected]"

51-52: Prisma versions upgraded to 6.16.2 but PR title says 6.16.1.

Align title or versions to avoid confusion.

Would you like to retitle the PR to “Upgrade Prisma to 6.16.2”?

Also applies to: 99-100

packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.mts (1)

1-1: Avoid blanket // @ts-nocheck to keep template type-safe.

You’re already using satisfies PrismaConfig; let TS check it.

-// @ts-nocheck
+// Keep this file type-checked to validate it satisfies PrismaConfig
packages/fastify-generators/src/generators/prisma/prisma/extractor.json (1)

4-11: Add the generator field for consistency and predictable resolution.

Other templates here declare "generator": "@baseplate-dev/fastify-generators#prisma/prisma". Omitting it for prisma-config may work implicitly but is inconsistent and risks resolution edge cases.

Apply:

     "prisma-config": {
       "type": "ts",
       "fileOptions": { "kind": "singleton" },
+      "generator": "@baseplate-dev/fastify-generators#prisma/prisma",
       "importMapProviders": {},
       "pathRootRelativePath": "{package-root}/prisma.config.mts",
       "sourceFile": "package/prisma.config.mts",
       "variables": { "TPL_SEED_COMMAND": {} }
     },
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b208178 and 7ac2ceb.

⛔ Files ignored due to path filters (21)
  • examples/blog-with-auth/packages/backend/baseplate/generated/eslint.config.mjs is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/packages/backend/baseplate/generated/package.json is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/packages/backend/baseplate/generated/prisma.config.mts is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/packages/backend/baseplate/generated/src/modules/accounts/services/user-session.service.ts is excluded by !**/generated/**, !**/generated/**
  • examples/blog-with-auth/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • examples/todo-with-auth0/packages/backend/baseplate/generated/eslint.config.mjs is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/packages/backend/baseplate/generated/package.json is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/packages/backend/baseplate/generated/prisma.config.mts is excluded by !**/generated/**, !**/generated/**
  • examples/todo-with-auth0/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • packages/fastify-generators/src/generators/prisma/prisma/generated/template-paths.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma/generated/typed-templates.ts is excluded by !**/generated/**, !**/generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • tests/simple/packages/backend/baseplate/file-id-map.json is excluded by !tests/**
  • tests/simple/packages/backend/baseplate/generated/eslint.config.mjs is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/backend/baseplate/generated/package.json is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/backend/baseplate/generated/prisma.config.mts is excluded by !**/generated/**, !tests/**, !**/generated/**
  • tests/simple/packages/backend/eslint.config.mjs is excluded by !tests/**
  • tests/simple/packages/backend/package.json is excluded by !tests/**
  • tests/simple/packages/backend/prisma.config.mts is excluded by !tests/**
  • tests/simple/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !tests/**
📒 Files selected for processing (17)
  • .changeset/little-snakes-guess.md (1 hunks)
  • examples/blog-with-auth/packages/backend/.templates-info.json (1 hunks)
  • examples/blog-with-auth/packages/backend/baseplate/file-id-map.json (1 hunks)
  • examples/blog-with-auth/packages/backend/eslint.config.mjs (1 hunks)
  • examples/blog-with-auth/packages/backend/package.json (2 hunks)
  • examples/blog-with-auth/packages/backend/prisma.config.mts (1 hunks)
  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts (1 hunks)
  • examples/todo-with-auth0/packages/backend/.templates-info.json (1 hunks)
  • examples/todo-with-auth0/packages/backend/baseplate/file-id-map.json (1 hunks)
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs (1 hunks)
  • examples/todo-with-auth0/packages/backend/package.json (2 hunks)
  • examples/todo-with-auth0/packages/backend/prisma.config.mts (1 hunks)
  • packages/fastify-generators/package.json (1 hunks)
  • packages/fastify-generators/src/constants/fastify-packages.ts (1 hunks)
  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json (1 hunks)
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (4 hunks)
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.mts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

Use kebab-case for file names

Files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
  • examples/blog-with-auth/packages/backend/eslint.config.mjs
  • examples/blog-with-auth/packages/backend/package.json
  • packages/fastify-generators/package.json
  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
  • examples/todo-with-auth0/packages/backend/prisma.config.mts
  • examples/todo-with-auth0/packages/backend/baseplate/file-id-map.json
  • examples/todo-with-auth0/packages/backend/package.json
  • examples/blog-with-auth/packages/backend/baseplate/file-id-map.json
  • packages/fastify-generators/src/constants/fastify-packages.ts
  • examples/blog-with-auth/packages/backend/prisma.config.mts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.mts
examples/blog-with-auth/{package.json,packages/**/package.json}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

Use ESM only by setting "type": "module" in package.json

Files:

  • examples/blog-with-auth/packages/backend/package.json
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx}: TypeScript with strict type checking
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported

If a particular interface or type is not exported in a TypeScript file, modify the file to export it

Files:

  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
  • packages/fastify-generators/src/constants/fastify-packages.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

Node 16 module resolution - include file extensions in imports (.js)

Files:

  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
  • packages/fastify-generators/src/constants/fastify-packages.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
**/*.{ts,tsx,js}

📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
We use the prefer using nullish coalescing operator (??) ESLint rule instead of a logical or (||), as it is a safer operator
Use console.info/warn/error instead of console.log

Files:

  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
  • packages/fastify-generators/src/constants/fastify-packages.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
examples/blog-with-auth/packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)

examples/blog-with-auth/packages/**/src/**/*.{ts,tsx}: Always use .js extensions in import statements (even when importing from TypeScript files)
Use import type for type-only imports
Always specify explicit return types for all functions
Add JSDoc to all exported functions, interfaces, and classes (document parameters, return values, and fields)

Files:

  • examples/blog-with-auth/packages/backend/src/modules/accounts/services/user-session.service.ts
examples/todo-with-auth0/{package.json,packages/**/package.json}

📄 CodeRabbit inference engine (examples/todo-with-auth0/CLAUDE.md)

examples/todo-with-auth0/{package.json,packages/**/package.json}: Module system must be ESM only ("type": "module" in package.json)
Package manager is pnpm 10+ (enforce via packageManager field)
Node version 22+ with Volta pinned to 22.18.0

Files:

  • examples/todo-with-auth0/packages/backend/package.json
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

When adding or changing a feature, add a new Changeset in .changeset/ with patch bump frontmatter and a description

Files:

  • .changeset/little-snakes-guess.md
🧠 Learnings (20)
📚 Learning: 2025-07-07T18:24:17.522Z
Learnt from: kingston
PR: halfdomelabs/baseplate#592
File: plugins/plugin-auth/src/auth0/generators/react/auth0-hooks/templates/src/hooks/use-required-user-id.ts:1-2
Timestamp: 2025-07-07T18:24:17.522Z
Learning: Files under templates/** directories can use `// ts-nocheck` because they are templates meant for code generation, not direct type checking.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/extractor.json
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/{tsconfig*.json,packages/**/tsconfig*.json} : Use `moduleResolution: "NodeNext"` (ESM-aware resolution)

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
  • examples/blog-with-auth/packages/backend/prisma.config.mts
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/{tsconfig*.json,packages/**/tsconfig*.json} : Enable strict type checking (`"strict": true`)

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/{admin,backend}/src/**/*.{ts,tsx} : Use `import type` for type-only imports in TypeScript

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/packages/**/src/**/*.{ts,tsx} : Always use .js extensions in import statements (even when importing from TypeScript files)

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/packages/**/src/**/*.{ts,tsx} : Use `import type` for type-only imports

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/**/tsconfig*.json : Use TypeScript moduleResolution set to `NodeNext` (ESM)

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/packages/**/src/**/*.{ts,tsx} : Add JSDoc to all exported functions, interfaces, and classes (document parameters, return values, and fields)

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/{admin,backend}/src/**/*.{ts,tsx} : Always use .js extensions in import statements, even when importing from TypeScript files

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/{package.json,packages/**/package.json} : Use ESM only by setting `"type": "module"` in package.json

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Applies to examples/blog-with-auth/{tsconfig*.json,packages/**/tsconfig*.json} : Enable `isolatedModules: true`

Applied to files:

  • examples/blog-with-auth/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/{package.json,packages/**/package.json} : Node version 22+ with Volta pinned to 22.18.0

Applied to files:

  • examples/blog-with-auth/packages/backend/package.json
  • examples/todo-with-auth0/packages/backend/package.json
📚 Learning: 2025-09-03T17:02:31.412Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:02:31.412Z
Learning: Use pnpm 10+ and Node 20+ (Volta pinned)

Applied to files:

  • examples/blog-with-auth/packages/backend/package.json
  • examples/todo-with-auth0/packages/backend/package.json
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/{packages/admin/src/{app,components,pages,hooks,services}/**/*.{ts,tsx},packages/backend/src/{modules,plugins,prisma,services,utils}/**/*.{ts,tsx}} : Add JSDoc to all exported functions, interfaces, and classes including descriptions, params, returns, and fields (exclude generated code)

Applied to files:

  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/**/tsconfig*.json : Enable strict type checking (`"strict": true`)

Applied to files:

  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/**/tsconfig*.json : Enable `isolatedModules` in TypeScript configuration

Applied to files:

  • examples/todo-with-auth0/packages/backend/eslint.config.mjs
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/{package.json,packages/**/package.json} : Package manager is pnpm 10+ (enforce via `packageManager` field)

Applied to files:

  • examples/todo-with-auth0/packages/backend/package.json
📚 Learning: 2025-09-03T17:03:33.250Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-09-03T17:03:33.250Z
Learning: Applies to examples/todo-with-auth0/packages/backend/**/schema.graphql : Backend must generate `schema.graphql` for the admin package to consume for code generation

Applied to files:

  • examples/todo-with-auth0/packages/backend/package.json
📚 Learning: 2025-07-12T19:56:08.559Z
Learnt from: kingston
PR: halfdomelabs/baseplate#606
File: plugins/plugin-auth/src/auth/core/generators/auth-apollo/auth-apollo.generator.ts:24-32
Timestamp: 2025-07-12T19:56:08.559Z
Learning: For generator functions and configuration object methods like those in createGeneratorTask, inferred return types are acceptable when the structure is clear from the implementation. ESLint rules handle enforcement of explicit return types where truly needed, so manual review for this is not necessary.

Applied to files:

  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
📚 Learning: 2025-09-16T15:10:21.336Z
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: AGENTS.md:0-0
Timestamp: 2025-09-16T15:10:21.336Z
Learning: Applies to .changeset/*.md : When adding or changing a feature, add a new Changeset in `.changeset/` with patch bump frontmatter and a description

Applied to files:

  • .changeset/little-snakes-guess.md
🧬 Code graph analysis (1)
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (4)
packages/sync/src/generators/generators.ts (1)
  • createGeneratorTask (196-204)
packages/core-generators/src/generators/node/eslint/eslint.generator.ts (1)
  • eslintConfigProvider (51-51)
packages/fastify-generators/src/generators/core/fastify/fastify.generator.ts (1)
  • fastifyOutputProvider (90-91)
packages/utils/src/string/quot.ts (1)
  • quot (6-8)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Lint Examples (todo-with-auth0)
  • GitHub Check: Verify Sync (blog-with-auth)
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: test
  • GitHub Check: Test E2E
  • GitHub Check: Lint
🔇 Additional comments (17)
packages/fastify-generators/package.json (1)

52-52: LGTM: @prisma/internals bumped to 6.16.2.

Matches the constants and example apps.

examples/blog-with-auth/packages/backend/package.json (1)

47-47: LGTM: Prisma deps moved to 6.16.2.

Deps/devDeps are consistent with the upgrade.

Also applies to: 82-82

packages/fastify-generators/src/constants/fastify-packages.ts (1)

40-41: LGTM: FASTIFY_PACKAGES synced to 6.16.2.

Keeps generator outputs aligned with example apps.

packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (3)

183-191: Cross‑platform sanity check for the seed command string.

We wrap the full command with single quotes via quot(...). Since Prisma runs the string via a shell, please verify this works on Windows shells as well (PowerShell/cmd). If not, consider emitting a platform‑neutral array command (cmd + args) if Prisma config supports it, or switch to double‑quoted JSON‑escaped strings.


5-5: Imports look good.

Adding eslintConfigProvider and quot is appropriate for the new tasks and templating.

Also applies to: 22-22


128-128: Seed task dependency trim looks good.

Removing nodeProvider from seed is fine since the command is now rendered into prisma.config.mts.

examples/todo-with-auth0/packages/backend/eslint.config.mjs (1)

37-40: Good call adding prisma.config.mts to the default TS project.

This ensures ESLint type-aware rules cover the Prisma config file.

examples/blog-with-auth/packages/backend/eslint.config.mjs (1)

37-40: Including prisma.config.mts in TS default project looks right.

Keeps type-aware linting on the Prisma config.

examples/blog-with-auth/packages/backend/baseplate/file-id-map.json (1)

72-73: Mapping for prisma-config → prisma.config.mts looks correct.

No issues spotted.

examples/todo-with-auth0/packages/backend/baseplate/file-id-map.json (1)

112-113: Added prisma-config mapping is consistent with the new template.

Looks good.

examples/todo-with-auth0/packages/backend/.templates-info.json (1)

14-18: Template entry for prisma.config.mts is wired correctly.

Generator, template name, and instanceData align with usage.

examples/blog-with-auth/packages/backend/.templates-info.json (1)

14-18: Prisma config template registered correctly.

Matches the file-id-map and ESLint updates.

packages/fastify-generators/src/generators/prisma/prisma/templates/package/prisma.config.mts (2)

6-6: Confirm side effects of loadEnvFile().

Top-level loadEnvFile() is fine for CLI usage; verify it doesn’t conflict with any existing env loading in consumers.


8-12: Ensure TPL_SEED_COMMAND renders a valid Prisma seed value.

Prisma expects a string command (or supported handler). Confirm generator quotes/escapes the inserted value correctly.

examples/blog-with-auth/packages/backend/prisma.config.mts (1)

1-11: Same as the other config: looks good; verify versions and exceptions.

Mirror the checks for PrismaConfig availability, Node loadEnvFile support, tsx flag support, and confirm the prisma.config.mts filename is an allowed exception to kebab-case.

Use the same verification script from the sibling file.

packages/fastify-generators/src/generators/prisma/prisma/extractor.json (1)

1-33: Template registration otherwise looks sound.

Paths, variables, and singleton semantics align with the new prisma.config.mts flow.

examples/todo-with-auth0/packages/backend/prisma.config.mts (1)

1-11: LGTM — verify Prisma/tsx/Node and add .seed.env ignore

  • PrismaConfig/migrations.seed — both backends use [email protected] (examples/blog-with-auth/packages/backend/package.json, examples/todo-with-auth0/packages/backend/package.json). Verify in your IDE/tsc that [email protected] exposes PrismaConfig with migrations.seed; adjust types or pin if not.
  • loadEnvFile() — engine constraints found: example packages require ^22.18.0; root/packages use ^22.0.0. Ensure CI/runtime target Node >=22.18.0 if relying on process.loadEnvFile().
  • tsx flags — backends use [email protected]. Confirm that version supports --env-file-if-exists and pin/update tsx or change the seed command if it does not.
  • Filename exception — prisma.config.mts is a Prisma-standard filename; allow it as a kebab-case exception in your guidelines or document the exception.
  • .seed.env not ignored — no explicit .seed.env entry found in .gitignore; add it if the file contains secrets.

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.

2 participants