-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: Change environment names from long format to short abbreviations #598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Change environment names from long format to short abbreviations #598
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: d00676d The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
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 |
WalkthroughThis change updates environment variable names for both Fastify and React generators to use shorter formats for environment values, switching from "development", "staging", and "production" to "dev", "stage", and "prod". It also adds a safeguard to prevent overwriting the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Generator (Fastify/React)
participant ConfigService
User->>Generator (Fastify/React): Initiate project generation
Generator (Fastify/React)->>ConfigService: Request environment config
ConfigService-->>Generator (Fastify/React): Provide env ("dev", "test", "stage", "prod")
Generator (Fastify/React)->>FileSystem: Write config files (.env, etc.)
Note right of Generator (Fastify/React): React generator skips overwrite if .env.development exists
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (19)
📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (3)`**/*.{ts,tsx}`: TypeScript with strict type checking Node 16 module resolution ...
📄 Source: CodeRabbit Inference Engine (CLAUDE.md) List of files the instruction was applied to:
`**/*`: Use kebab-case for file names
📄 Source: CodeRabbit Inference Engine (CLAUDE.md) List of files the instruction was applied to:
`{packages,plugins}/**/*.{ts,tsx}`: Use TypeScript with strict type checking ena...
📄 Source: CodeRabbit Inference Engine (.cursor/rules/code-style.mdc) List of files the instruction was applied to:
🧠 Learnings (2)📓 Common learningsplugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/utils/session-cookie.ts (3)🧬 Code Graph Analysis (2)plugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/services/user-session.service.ts (1)
plugins/plugin-auth/src/auth/core/generators/auth-module/templates/module/utils/session-cookie.ts (1)
🔇 Additional comments (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.ts(1 hunks)packages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
`**/*.{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 forsrc/)
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.jsextensions 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/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.tspackages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.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/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.tspackages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.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/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/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/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.tspackages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.ts
🧠 Learnings (3)
📓 Common learnings
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.
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
packages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts (5)
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: .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 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}/**/*.{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 **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported
packages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.ts (1)
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
🧬 Code Graph Analysis (2)
packages/fastify-generators/src/generators/yoga/yoga-plugin/templates/src/plugins/graphql/index.ts (1)
packages/fastify-generators/src/generators/core/config-service/templates/src/services/config.ts (1)
config(5-5)
packages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.ts (1)
packages/fastify-generators/src/generators/core/config-service/templates/src/services/config.ts (1)
config(5-5)
⏰ 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). (3)
- GitHub Check: Test E2E
- GitHub Check: Lint
- GitHub Check: test
🔇 Additional comments (1)
packages/fastify-generators/src/generators/core/error-handler-service/templates/src/plugins/error-handler.ts (1)
9-9: Consistent environment name change - looks good.The change from
'development'to'dev'is consistent with the refactoring objective and follows the same pattern as the GraphQL plugin file. TheIS_DEVELOPMENTconstant is appropriately used on line 44 to conditionally include original error details only in development mode, which maintains proper security practices.
Summary by CodeRabbit
Here are the updated release notes based on the provided changes: