Implement module registry for better seperation
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- eslint, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 1
- フォーク
- 0
- 平均マージ
- 3日 12時間
- マージ済み PR(30日)
- 31
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/cockpit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
stackabletech/cockpit#385 ·
メンテナーはふだん 3 日以内に返信
-
EPIC: Data Catalogオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
stackabletech/cockpit#441 ·
メンテナーはふだん 3 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
stackabletech/cockpit#439 ·
メンテナーはふだん 3 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
stackabletech/cockpit#428 ·
メンテナーはふだん 3 日以内に返信
-
Update to eslint 10オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
stackabletech/cockpit#427 ·
メンテナーはふだん 3 日以内に返信
stackabletech/cockpit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Azure/azure-functions-nodejs-extensions#180 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 2 日以内に返信
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
streaming-video-technology-alliance/common-media-library#611 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
prime-radiant-inc/evener#5901 ·
メンテナーはふだん 1 日以内に返信
-
area:frontend kind:bug priority:p3 ready
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信