feat(auth): expose app version in GET /api/auth/config#3803
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThe PR adds an ChangesApp Version Configuration and Exposure
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR exposes the running API/app version via the existing public GET /api/auth/config endpoint so the Vue frontend can display build info (e.g., footer).
Changes:
- Added
data.app.versionto the public config payload returned byauth.controller.getConfig(), resolving fromconfig.app.version→package.jsonversion →'dev'. - Added a development default
config.app.version(intended to be overridden viaDEVKIT_NODE_app_version). - Added an integration test asserting
data.app.versionis a non-empty string.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
modules/auth/controllers/auth.controller.js |
Adds app.version to the public config response returned by getConfig. |
modules/auth/tests/auth.integration.tests.js |
Adds integration coverage ensuring app.version is present and non-empty. |
config/defaults/development.config.js |
Adds app.version default value/documentation for env override. |
|
@coderabbitai full review |
Footer needs the running API version to display build info. Resolution: build-arg DEVKIT_NODE_app_version → config.app.version → package.json version → 'dev'.
5e10e63 to
93c623f
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3803 +/- ##
=======================================
Coverage 90.29% 90.30%
=======================================
Files 152 152
Lines 5038 5042 +4
Branches 1602 1604 +2
=======================================
+ Hits 4549 4553 +4
Misses 385 385
Partials 104 104
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Summary
version: ''toconfig/defaults/development.config.js(app block), overridden at build viaDEVKIT_NODE_app_versionenv varapp: { version }in the public block ofgetConfig(resolution: build-arg →package.jsonversion →'dev')data.app.versionis a non-empty stringWhy
Footer (Vue side) needs the running API version to display build info. This is the Node side of the cross-repo feature.
Part B of pierreb-devkit/Vue#4270
Scope
auth(controller, test),config/defaultslowValidation
npm run lintnpm testGuardrails check
.env*,secrets/**, keys, tokens)Notes for reviewers
versionis intentionally public (same exposure aspackage.jsonversion already in most build artifacts)DEVKIT_NODE_app_versionbuild-arg in their Docker builds to surface the real versionSummary by CodeRabbit
New Features
Tests