Implement module registry for better seperation
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- eslint, typescript
- Lĩnh vực
- backend, developer-experience, frontend
Hướng nghiên cứu
Start by reading the module setup in src/lib/modules/types.ts and src/lib/modules/index.ts, then trace the existing navigation and request handling through nav-items.ts, +layout.svelte, NavigationProgress, +layout.server.ts, and hooks.server.ts. Check how storage and Trino configuration and handleStorageConnection are currently loaded. Done means enabled modules alone initialize and handle their routes, disabled module routes return 404, and the specified unit and E2E cases pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Goal: Every module can be switched on and off independently with a feature flag
- Module contract. Add src/lib/modules/types.ts defining a CockpitModule: id, routePrefix, enabled, navigation entry, page title, optional init() and optional server handle. The registry lives in src/lib/modules/index.ts and is a static list.
- Move storage and Trino onto it.
- The sidebar (nav-items.ts), page titles (+layout.svelte), NavigationProgress and +layout.server.ts all read from the registry.
- hooks.server.ts returns 404 for routes of disabled modules and only runs a module's handle on its own routes. handleStorageConnection moves into the storage module.
- init runs init() only for enabled modules.
- Validate config only for enabled modules. The storage and Trino configs are no longer imported unconditionally. They're parsed in their module's init(), so an invalid variable stops the server only when that module is enabled.
- New STACKABLE_COCKPIT_TRINO_ENABLED flag
- Boundaries. An ESLint rule (import/no-restricted-paths) stops modules importing each other.
Tests
- Unit tests for the registry and hook logic.
- E2E: with a module disabled, pages and API return 404, it's missing from the sidebar, and the server starts even with invalid config for it. With it enabled, the existing flows still work.
Result: a new module becomes one module.ts entry plus its own folders. The central files only change for shared concerns.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của stackabletech/cockpit
-
Uploads greater then 6MiB failĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
stackabletech/cockpit#385 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
EPIC: Data CatalogĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
stackabletech/cockpit#441 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Admin configured S3 connectionsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
stackabletech/cockpit#439 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Update to sveltekit-superforms 3Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
stackabletech/cockpit#428 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Update to eslint 10Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
stackabletech/cockpit#427 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của stackabletech/cockpit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
WalletConnect/walletconnect-monorepo#7392 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Absenderzeile über dem Anschriftfeld wird bei Angeboten und Rechnungen am Ende abgeschnittenĐang mởfehler
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Azure/azure-functions-nodejs-extensions#180 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
laaielichter/Threesmith#28 ·
Maintainer thường phản hồi trong vòng 1 ngày