Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Jul 4, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a Template Renderers plugin that automates the generation of simplified, type-safe template rendering APIs, reducing boilerplate and streamlining integration.
    • Added TypeScript-specific renderers, enabling easy and consistent template rendering with improved type safety.
  • Documentation

    • Added comprehensive documentation for the new Template Renderers plugin, including migration guides, usage examples, and configuration options.
  • Chores

    • Updated code review configuration to exclude generated files from review.
    • Centralized and exported file naming logic for generated templates.

@vercel
Copy link

vercel bot commented Jul 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baseplate-project-builder-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2025 1:52pm

@changeset-bot
Copy link

changeset-bot bot commented Jul 4, 2025

🦋 Changeset detected

Latest commit: a61ba02

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

This PR includes changesets to release 17 packages
Name Type
@baseplate-dev/core-generators Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/plugin-auth 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/code-morph Patch
@baseplate-dev/create-project Patch
@baseplate-dev/project-builder-lib 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 Jul 4, 2025

Walkthrough

A new Template Renderers plugin and supporting infrastructure were introduced to the code generation system, automating the creation of type-safe template rendering APIs and reducing manual boilerplate. The plugin integrates with the TypeScript extractor, generates renderers for templates and groups, and updates the Prisma generator to use the new API. Documentation and configuration updates accompany the changes.

Changes

File(s) Change Summary
.changeset/template-renderers-plugin.md
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md
Added documentation describing the Template Renderers plugin, its API, migration, and usage.
.coderabbit.yaml Updated code review config to exclude all generated directories from reviews.
packages/core-generators/src/renderers/extractor/plugins/index.ts Added export for templateRenderersPlugin.
packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts New module re-exporting from renderers-file.js and template-renderers.plugin.js.
packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts New module for generating the template-renderers.ts file and related exports.
packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts New plugin implementation for managing and generating template renderers.
packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts New TypeScript interfaces for template renderer task dependencies and entries.
packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts Refactored to export typed templates file name and export name helper; updated naming for consistency.
packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts New module for generating TypeScript template renderer entries from template metadata.
packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts Integrated templateRenderersPlugin and renderer generation into the TypeScript extractor.
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts Refactored to use the new renderers API for service and seed template rendering.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant PrismaGenerator
    participant Renderers
    participant TemplateRenderersPlugin
    participant TypeScriptExtractor

    User->>PrismaGenerator: Run generator
    PrismaGenerator->>Renderers: renderers.service.render(vars)
    Renderers->>TemplateRenderersPlugin: (auto-generated render function)
    TemplateRenderersPlugin->>TypeScriptExtractor: (integrated via plugin)
    TypeScriptExtractor->>Renderers: (render logic executes)
    Renderers-->>PrismaGenerator: Rendered file(s)
    PrismaGenerator-->>User: Generated service and seed files
Loading
sequenceDiagram
    participant TypeScriptExtractor
    participant TemplateRenderersPlugin
    participant RenderTsTemplateRenderers

    TypeScriptExtractor->>RenderTsTemplateRenderers: Generate renderer entries for templates
    RenderTsTemplateRenderers-->>TypeScriptExtractor: Renderer entries
    TypeScriptExtractor->>TemplateRenderersPlugin: addTemplateRenderer(generatorName, entry)
    TemplateRenderersPlugin->>TypeScriptExtractor: (afterWrite hook)
    TemplateRenderersPlugin->>FileSystem: writeRenderersFile(generatorName, entries, context)
    FileSystem-->>TemplateRenderersPlugin: template-renderers.ts written
Loading
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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

🧹 Nitpick comments (5)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (1)

6-23: Fix minor typo in JSDoc comment.

The interface structure is well-designed and follows TypeScript best practices.

  /**
-  * The name of the dependency task (will be de-duplicated)..
+  * The name of the dependency task (will be de-duplicated).
   */
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md (3)

116-116: Simplify wording for clarity.

-This plugin follows the exact same pattern as the typed templates system:
+This plugin follows the same pattern as the typed templates system:

177-177: Add language specification to code block.

-```
+```text

221-226: Fix grammar in numbered list.

-Follow the established pattern:
-
-1. Create a renderer function (e.g., `renderTextTemplateRenderers`)
-2. Define task dependencies and render functions for your template type
-3. Use the existing generic plugin - no changes needed
-4. Follow the same integration pattern in your template extractor
+Follow the established pattern:
+
+1. Create a renderer function (e.g., `renderTextTemplateRenderers`)
+2. Define task dependencies and render functions for your template type
+3. Use the existing generic plugin - no changes needed
+4. Use the same integration pattern in your template extractor
packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (1)

31-35: Export the interface to follow project conventions.

According to the coding guidelines, all interfaces and types should be exported.

-interface RenderTsTemplateRenderersContext {
+export interface RenderTsTemplateRenderersContext {
   generatorPackageName: string;
   generatorName: string;
 }
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b6bc11f and a61ba02.

⛔ Files ignored due to path filters (70)
  • packages/core-generators/src/generators/node/eslint/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/core-generators/src/generators/node/eslint/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/core-generators/src/generators/node/ts-utils/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/core-generators/src/generators/node/ts-utils/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/core-generators/src/generators/node/vitest/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/core-generators/src/generators/node/vitest/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-context/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-context/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-plugin/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-plugin/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-roles/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/auth-roles/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/user-session-types/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/auth/user-session-types/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/bull/bull-mq/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/bull/bull-mq/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/bull/fastify-bull-board/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/bull/fastify-bull-board/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/app-module-setup/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/app-module-setup/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/app-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/app-module/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/axios/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/axios/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/config-service/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/config-service/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/error-handler-service/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/error-handler-service/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-graceful-shutdown/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-graceful-shutdown/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-health-check/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-health-check/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-redis/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-redis/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-sentry/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-sentry/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-server/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/fastify-server/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/logger-service/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/logger-service/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/request-context/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/request-context/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/request-service-context/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/request-service-context/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/service-context/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/core/service-context/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/email/fastify-postmark/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/email/fastify-postmark/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-auth/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-auth/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-scalar/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-scalar/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-sentry/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos-sentry/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/pothos/pothos/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma-utils/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma-utils/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/prisma/prisma/generated/index.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/stripe/fastify-stripe/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/stripe/fastify-stripe/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/vitest/prisma-vitest/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/vitest/prisma-vitest/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/yoga/yoga-plugin/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/fastify-generators/src/generators/yoga/yoga-plugin/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/fastify/auth0-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-auth/src/auth0/generators/fastify/auth0-module/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-storage/src/generators/fastify/storage-module/generated/index.ts is excluded by !**/generated/**, !**/generated/**
  • plugins/plugin-storage/src/generators/fastify/storage-module/generated/template-renderers.ts is excluded by !**/generated/**, !**/generated/**
📒 Files selected for processing (12)
  • .changeset/template-renderers-plugin.md (1 hunks)
  • .coderabbit.yaml (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/index.ts (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (1 hunks)
  • packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts (4 hunks)
  • packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (1 hunks)
  • packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts (5 hunks)
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
`**/*.{ts,tsx}`: TypeScript with strict type checking Node 16 module resolution ...

**/*.{ts,tsx}: TypeScript with strict type checking
Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
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/)
Order functions such that functions are placed below the variables/functions they use
If a particular interface or type is not exported, change the file so it is exported
Prefer using nullish coalescing operator (??) instead of logical or (||)
Use console.info/warn/error instead of console.log
Always use .js extensions in imports, even for TypeScript files
Specify explicit return types on all functions

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/core-generators/src/renderers/extractor/plugins/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts
  • packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts
  • packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts
`**/*`: Use kebab-case for file names

**/*: Use kebab-case for file names

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/core-generators/src/renderers/extractor/plugins/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts
  • packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts
  • packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts
`**/index.{ts,tsx}`: Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports

**/index.{ts,tsx}: Prefer barrel exports e.g. export * from './foo.js' instead of individual named exports

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/core-generators/src/renderers/extractor/plugins/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts
`{packages,plugins}/**/*.{ts,tsx}`: Use TypeScript with strict type checking ena...

{packages,plugins}/**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
All functions (excluding one-liner arrow functions) require explicit return types
Use camelCase for variables and functions
Use PascalCase for types and classes
Prefer functional programming patterns
Extract repeated components into distinct functions or components where applicable

📄 Source: CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

List of files the instruction was applied to:

  • packages/core-generators/src/renderers/extractor/plugins/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts
  • packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts
  • packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
  • packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts
  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts
  • packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts
`.changeset/*.md`: If you are adding a new feature or changing an existing feature, add a new Changeset in the `.changeset/` directory

.changeset/*.md: If you are adding a new feature or changing an existing feature, add a new Changeset in the .changeset/ directory

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • .changeset/template-renderers-plugin.md
`**/*.md`: Please use Mermaid documents instead of ASCII art diagrams

**/*.md: Please use Mermaid documents instead of ASCII art diagrams

📄 Source: CodeRabbit Inference Engine (CLAUDE.md)

List of files the instruction was applied to:

  • packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md
🧠 Learnings (12)
📓 Common learnings
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
packages/core-generators/src/renderers/extractor/plugins/index.ts (10)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/index.{ts,tsx} : Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: kingston
PR: halfdomelabs/baseplate#428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{unit,int}.test.ts : Always import vitest globals explicitly (describe, it, expect)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to plugins/*/**/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts (12)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/index.{ts,tsx} : Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: kingston
PR: halfdomelabs/baseplate#428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{unit,int}.test.ts : Always import vitest globals explicitly (describe, it, expect)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (10)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : All functions (excluding one-liner arrow functions) require explicit return types
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Specify explicit return types on all functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts (15)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use camelCase for variables and functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/index.{ts,tsx} : Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Use camelCase for variables/functions, PascalCase for types/classes
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.unit.test.ts : Unit tests use `.unit.test.ts` suffix
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{unit,int}.test.ts : Always import vitest globals explicitly (describe, it, expect)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to plugins/*/**/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always use `.js` extensions in imports, even for TypeScript files
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (16)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: kingston
PR: halfdomelabs/baseplate#505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/*": ["src/*"] to "@src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/*": ["src/*"] to "@src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-components/admin-components.generator.ts:55-61
Timestamp: 2025-05-05T06:35:13.300Z
Learning: In generators, paths should be merged with forward slashes (/) only since JavaScript generated files use POSIX style separators. The system handles conversion to Windows style separators at later stages when writing out files.
packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts (19)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to plugins/*/**/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`@src/` is the alias for `src/`)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use TypeScript with strict type checking enabled
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : TypeScript with strict type checking
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always use `.js` extensions in imports, even for TypeScript files
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : All functions (excluding one-liner arrow functions) require explicit return types
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Import test functions from 'vitest' (no globals)
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Sort imports by group: external libs first, then local imports
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Use PascalCase for types and classes
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-components/admin-components.generator.ts:55-61
Timestamp: 2025-05-05T06:35:13.300Z
Learning: In generators, paths should be merged with forward slashes (/) only since JavaScript generated files use POSIX style separators. The system handles conversion to Windows style separators at later stages when writing out files.
.changeset/template-renderers-plugin.md (6)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.tsx : Use ShadCN-based components from `@baseplate-dev/ui-components` instead of creating custom ones
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/ui-rules.mdc:0-0
Timestamp: 2025-06-30T11:52:33.318Z
Learning: Applies to *.{tsx},packages/project-builder-web/**,packages/ui-components/** : We use a rough analog of ShadCN components that can be imported from @baseplate-dev/ui-components
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts (7)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Extract common setup code into test helpers
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Node 16 module resolution - include file extensions in imports (`.js`)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md (5)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to plugins/*/**/*.tsx : In plugins, prefix all Tailwind classes with the plugin name (e.g., `auth-`, `storage-`)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts (4)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/index.{ts,tsx} : Prefer barrel exports e.g. `export * from './foo.js'` instead of individual named exports
packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (11)
Learnt from: kingston
PR: halfdomelabs/baseplate#571
File: packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts:102-106
Timestamp: 2025-06-11T18:31:22.247Z
Learning: For `templateExtractorBarrelExportPlugin.addGeneratedBarrelExport`, the generated barrel exports are written into `generated/index.ts`, therefore the `moduleSpecifier` must be specified relative to that file (e.g., `./typed-templates.js`), not the project root.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Extract repeated components into distinct functions or components where applicable
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-list/admin-crud-list.generator.ts:163-166
Timestamp: 2025-05-05T06:37:51.001Z
Learning: For certain templates in the codebase, the `importMapProviders` property is not explicitly required as the template extractor will automatically determine and infer the necessary import map providers.
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: plugins/baseplate-plugin-storage/src/generators/react/upload-components/upload-components.generator.ts:108-112
Timestamp: 2025-05-05T06:37:43.106Z
Learning: The template extractor in the baseplate codebase can automatically infer and determine the necessary import map providers for certain templates, making explicit specification of importMapProviders unnecessary in those cases.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : All functions (excluding one-liner arrow functions) require explicit return types
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Specify explicit return types on all functions
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.test.ts : Extract common setup code into test helpers
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T11:51:48.395Z
Learning: Applies to **/*.{ts,tsx} : Always include return types on top-level functions including React components (`React.ReactElement`)
Learnt from: kingston
PR: halfdomelabs/baseplate#521
File: packages/react-generators/src/generators/admin/admin-crud-edit/admin-crud-edit.generator.ts:90-94
Timestamp: 2025-05-05T06:36:50.687Z
Learning: In this codebase, import paths can include `.ts` extensions, and the `resolveModuleSpecifier` function will handle them appropriately. There's no need to strip file extensions before passing paths to functions like `TsCodeUtils.importFragment`.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-06-30T11:52:11.055Z
Learning: Applies to {packages,plugins}/**/*.{ts,tsx} : Prefer functional programming patterns
🧬 Code Graph Analysis (4)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (1)
packages/core-generators/src/renderers/typescript/fragments/types.ts (1)
  • TsCodeFragment (55-72)
packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts (3)
packages/utils/src/paths/posix-join.ts (1)
  • posixJoin (10-12)
packages/core-generators/src/renderers/extractor/utils/generated-template-file-names.ts (1)
  • getGeneratedTemplateConstantName (11-16)
packages/core-generators/src/utils/ts-paths.ts (1)
  • normalizeTsPathToJsPath (8-10)
packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts (3)
packages/core-generators/src/renderers/extractor/plugins/index.ts (1)
  • templateRenderersPlugin (6-6)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts (1)
  • templateRenderersPlugin (25-75)
packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (1)
  • renderTsTemplateRenderers (206-230)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts (7)
packages/utils/src/paths/posix-join.ts (1)
  • posixJoin (10-12)
packages/core-generators/src/renderers/extractor/utils/generated-template-file-names.ts (4)
  • getGeneratedTemplateInterfaceName (41-46)
  • getGeneratedTemplateExportName (26-31)
  • getGeneratedTemplateConstantName (11-16)
  • getGeneratedTemplateProviderName (48-53)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (2)
  • TemplateRendererEntry (29-46)
  • TemplateRendererTaskDependency (6-23)
packages/core-generators/src/renderers/typescript/utils/ts-code-utils.ts (2)
  • TsCodeUtils (85-580)
  • tsTemplate (583-583)
packages/core-generators/src/renderers/typescript/fragments/creators.ts (1)
  • tsCodeFragment (73-83)
packages/core-generators/src/renderers/typescript/imports/builder.ts (1)
  • tsImportBuilder (74-82)
packages/core-generators/src/renderers/typescript/renderers/file.ts (1)
  • renderTsCodeFileTemplate (150-190)
🪛 LanguageTool
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md

[style] ~116-~116: ‘exact same’ might be wordy. Consider a shorter alternative.
Context: ...lates` Pattern This plugin follows the exact same pattern as the typed templates system: ...

(EN_WORDINESS_PREMIUM_EXACT_SAME)


[grammar] ~225-~225: The verb “Follow” needs to be in the to-infinitive form.
Context: ...he existing generic plugin - no changes needed 4. Follow the same integration pattern in your te...

(MISSING_TO_BEFORE_A_VERB)

🪛 markdownlint-cli2 (0.17.2)
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md

177-177: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Lint
  • GitHub Check: Test E2E
🔇 Additional comments (24)
.coderabbit.yaml (1)

8-8: Exclusion pattern LGTM

'!**/generated/**' correctly excludes generated artifacts at any depth and is valid per schema. No further concerns.

packages/core-generators/src/renderers/extractor/plugins/index.ts (1)

6-6: LGTM! Clean addition to the plugin exports.

The export follows the established pattern and correctly uses the .js extension for Node 16 module resolution.

packages/core-generators/src/renderers/extractor/plugins/template-renderers/index.ts (1)

1-2: LGTM! Proper barrel export pattern.

The file correctly follows the coding guideline for index files to use export * syntax and includes proper .js extensions.

packages/core-generators/src/renderers/extractor/plugins/template-renderers/types.ts (2)

1-1: LGTM! Proper import structure.

The import correctly uses the #src/ path alias and .js extension following the coding guidelines.


29-46: LGTM! Well-structured interface design.

The TemplateRendererEntry interface is properly documented and uses appropriate types including TsCodeFragment for code representation.

packages/core-generators/src/renderers/extractor/plugins/typed-templates-file.ts (4)

17-17: LGTM! Good refactoring to export the constant.

Making the file name constant exportable enables reuse by other modules in the Template Renderers plugin.


35-37: LGTM! Excellent extraction of reusable logic.

The new function centralizes the export name generation logic with proper typing and follows the coding guideline for explicit return types.


74-74: LGTM! Consistent use of the new helper function.

Using the extracted getTypedTemplatesFileExportName function improves code maintainability and consistency.


102-102: LGTM! Proper use of the exported constant.

Using the GENERATED_TYPED_TEMPLATES_FILE_NAME constant ensures consistency across the codebase.

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

79-79: LGTM! Addition of renderers task dependency.

Adding the renderers task to the build tasks properly integrates with the new Template Renderers plugin architecture.


122-124: LGTM! Clean migration to the new renderers API.

The task dependencies have been simplified to use the new renderers provider, which encapsulates the previous complexity of managing separate typescriptFile and paths dependencies.


127-127: LGTM! Simplified template rendering call.

The migration from typescriptFile.renderTemplateFile to renderers.service.render demonstrates the improved API simplicity provided by the Template Renderers plugin.


130-135: LGTM! Proper use of render options.

The seed renderer call correctly includes the writeOptions with shouldNeverOverwrite: true, maintaining the intended behavior while using the new API.

packages/core-generators/src/renderers/typescript/extractor/ts-template-file-extractor.ts (1)

17-184: LGTM! Clean integration of the Template Renderers plugin.

The integration follows the established plugin pattern correctly, mirroring how other plugins like typedTemplatesFilePlugin are integrated. The implementation properly:

  • Adds the plugin to dependencies
  • Retrieves the plugin instance
  • Generates renderer entries using the TypeScript-specific function
  • Registers entries with the plugin
.changeset/template-renderers-plugin.md (1)

1-41: Excellent changeset documentation!

The changeset clearly explains the benefits of the new Template Renderers plugin with compelling before/after examples that demonstrate the 70-80% reduction in boilerplate code. The feature list is comprehensive and highlights all the key benefits.

packages/core-generators/src/renderers/extractor/plugins/template-renderers/template-renderers.plugin.ts (1)

1-75: Well-structured plugin implementation!

The plugin correctly:

  • Follows the established createTemplateExtractorPlugin pattern
  • Manages renderer entries per generator using a Map
  • Properly integrates with the barrel export plugin using the correct relative path (as per the learnings about generated/index.ts)
  • Includes appropriate configuration schema with skip option
packages/core-generators/src/renderers/extractor/plugins/template-renderers/renderers-file.ts (2)

82-110: Excellent error handling for duplicate dependencies!

The duplicate dependency detection using isEqual for deep comparison is well implemented. The error message provides clear context about the conflict, making debugging easier.


28-225: Solid implementation of renderer file generation!

The code properly:

  • Uses consistent naming conventions via the utility functions
  • Follows the template-based approach for file generation
  • Correctly builds TypeScript code fragments with proper imports
  • Handles the full lifecycle from task creation to file writing
packages/core-generators/src/renderers/extractor/plugins/template-renderers/README.md (1)

1-242: Comprehensive and well-structured documentation!

The README effectively explains the plugin's purpose, architecture, benefits, and migration path. The examples clearly demonstrate the significant reduction in boilerplate code, and the architectural explanation helps future contributors understand the extensibility model.

packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (5)

1-30: Imports are well-organized and follow conventions.

The imports are properly structured with type imports first, external libraries before local imports, and all local imports using the required .js extensions and #src/ alias.


36-53: Clean implementation of import map providers extraction.

The function correctly handles both single and multiple template configurations, properly deduplicates providers, and returns a well-formatted expression.


54-82: Well-structured task dependencies creation.

The function properly creates TypeScript task dependencies with conditional paths inclusion and clean filtering of undefined values.


206-231: Main renderer function is well-implemented.

The function properly separates grouped and ungrouped templates, uses appropriate utility functions, and returns a comprehensive array of renderer entries.


183-192: Confirm that paths is emitted as an identifier, not a string literal

The call to

TsCodeUtils.mergeFragmentsAsObjectPresorted({
  group: templatesExpression,
  paths: `paths`,
  importMapProviders: ,
  '...': 'options',
})

relies on a paths variable in the generated code matching

interface RenderTsTemplateGroupActionInputBase<T> {
  group: T;
  paths: { [K in keyof T]: string };
  
}

Please verify that:

  • A paths variable of the correct shape is declared or imported in the scope where this render function runs.
  • TsCodeUtils.mergeFragmentsAsObjectPresorted treats backtick-wrapped fragments as raw code (producing paths), not as a quoted string ("paths").

If either assumption is invalid, update
• packages/core-generators/src/renderers/typescript/extractor/render-ts-template-renderers.ts (lines 183–192)
to pass the actual paths object or adjust the fragment so it isn’t emitted as a literal.

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