Implement module registry for better seperation
I maintainer di solito rispondono entro 3 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- eslint, typescript
- Ambito
- backend, developer-experience, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 1
- Fork
- 0
- Merge medio
- 3g 12h
- PR unite (30g)
- 31
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stackabletech/cockpit
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
stackabletech/cockpit#385 ·
I maintainer di solito rispondono entro 3 giorni
-
EPIC: Data CatalogAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
stackabletech/cockpit#441 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
stackabletech/cockpit#439 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
stackabletech/cockpit#428 ·
I maintainer di solito rispondono entro 3 giorni
-
Update to eslint 10Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
stackabletech/cockpit#427 ·
I maintainer di solito rispondono entro 3 giorni
Tutte le issue di stackabletech/cockpit
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Azure/azure-functions-nodejs-extensions#180 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 2 giorni
-
iso-bmff: add IsoBoxReadView.readUint64 and IsoBoxWriteView.writeUint64 for exact 64-bit fieldsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
streaming-video-technology-alliance/common-media-library#611 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
prime-radiant-inc/evener#5901 ·
I maintainer di solito rispondono entro 1 giorno
-
area:frontend kind:bug priority:p3 ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno