Conversation
- Vite/Rollup cannot resolve .d.ts files as runtime imports
- Renamed declaration file to regular .ts (content unchanged)
- File contains `declare global` + `export {}` which is valid in both formats
Fixes #285
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
polaz
added a commit
that referenced
this pull request
Feb 4, 2026
- Vite/Rollup cannot resolve .d.ts files as runtime imports
- Renamed declaration file to regular .ts (content unchanged)
- File contains `declare global` + `export {}` which is valid in both formats
Fixes #285
|
🎉 This PR is included in version 6.55.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
polaz
added a commit
that referenced
this pull request
Feb 4, 2026
* feat(dashboard): add Instance Health Dashboard on GET / endpoint - Add dashboard module with metrics collector, HTML template, and handler - Dashboard shows server info, registered instances, health status, sessions - Supports content negotiation: HTML for browsers, JSON for API clients - Add DASHBOARD_ENABLED config (default true, disable with =false) - Instances show health status (healthy/degraded/offline) based on metrics - HTML includes auto-refresh every 30 seconds - Safe for MCP clients - they use POST /mcp, not GET / - Add 44 unit tests for metrics, handler, and HTML template Closes #275 * fix(docs): rename gtag.d.ts to gtag.ts for Vite compatibility (#287) - Vite/Rollup cannot resolve .d.ts files as runtime imports - Renamed declaration file to regular .ts (content unchanged) - File contains `declare global` + `export {}` which is valid in both formats Fixes #285 * fix(dashboard): add error handling and safe URL parsing - Add try/catch in dashboardHandler for collectMetrics/renderDashboard failures - Add safe URL parsing in renderInstanceCard with fallback to raw URL - Use GITLAB_TOKEN config constant instead of direct process.env access * fix(dashboard): remove unused parameter and improve URL parsing - Remove unused lastSuccessfulRequestMs parameter from determineInstanceStatus - Add .js extension to dashboard import in server.ts - Add safe URL parsing for session hostnames in html-template.ts - Add comprehensive tests for collectMetrics function * test(dashboard): achieve 100% line coverage - Add tests for error handling in dashboardHandler - Add tests for getMetrics export function - Add tests for OAuth and token auth modes - Add tests for unknown status indicator - Add tests for invalid URL parsing fallbacks - Add tests for queue filling warning - Add tests for formatRelativeTime (hours, days) - Add tests for invalid URL in sessions byInstance Coverage: Lines 100%, Branches 92.85%
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gtag.d.tstogtag.tsfor Vite/Rollup compatibility.d.tsfiles as runtime imports during builddeclare global+export {}) is valid in both formatsRoot Cause
The
useGA4Tracking.tscomposable imports../types/gtagfor type augmentation. Sincegtag.d.tsis a TypeScript declaration file, Vite/Rollup cannot resolve it as a module at build time.Test Plan
yarn lintpassesyarn testpasses (4504 tests)yarn docs:buildsucceeds (previously failed with "Cannot resolve ../types/gtag")Fixes #285