FluentCMS.Admin.Hosting reads Core through InternalsVisibleTo: a public seam for a package that serves a surface of its own

Aperta
#3,451 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start with src/FluentCMS.Core/FluentCMS.Core.csproj and admin/src/FluentCMS.Admin.Hosting/AdminHostingExtensions.cs to trace the internal members used by the hosting package. Read the related API types under Api/Common and DependencyInjection, then check the backend specification for where new public members should be documented. Done means the admin package compiles without Core's InternalsVisibleTo, the reference host retains its headers, limits, and startup refusals, and the public members are documented in both places.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:host type:feature

Problem

FluentCMS.Core names FluentCMS.Admin.Hosting in InternalsVisibleTo (src/FluentCMS.Core/FluentCMS.Core.csproj, line 37), and the package uses internal types of Core: FluentCmsSurfaceMetadata, FluentCmsEndpointMetadata and ContentSecurityPolicyMetadata (Api/Common), ApiPipelineState (Api/Common/ApiPipeline.cs), HostErrorCodes and FluentCmsOptions with AddFluentCmsOptions (DependencyInjection). It marks its endpoints as a surface of FluentCMS, sets the policy of the admin page, checks that the pipeline is configured, and binds its options with the host's error codes (admin/src/FluentCMS.Admin.Hosting/AdminHostingExtensions.cs, lines 19, 35, 58, 82 and 86). The package is released with A-47. A host that takes a later patch of Core with the same hosting package then fails at run time on a renamed internal member, with no word at restore (#3178).

Proposal

A small public surface in Core for a package that maps endpoints of its own under a FluentCMS host: marking a group as a surface with a name, a Content-Security-Policy for an endpoint, the check that UseFluentCms ran, and the binding of an options section with the host's refusal at start. Then drop the InternalsVisibleTo line. A third party that serves a page from a FluentCMS host needs the same.

Acceptance

  • FluentCMS.Admin.Hosting compiles with no InternalsVisibleTo from Core
  • The reference host serves the admin as before, with the same headers, limits and refusals at start
  • The new members are documented, and the backend specification names them

From the review of #3191 (#3178). Needed by A-47, which until then has the package depend on the exact version of FluentCMS.Core. Size: S.

Lingua principale
C#
Stelle
567
Fork
107
Merge medio
1h 19m
PR unite (30g)
353

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.