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

Abierto
#3,451 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
58/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
567
Forks
107
Merge medio
1 h 19 min
PR fusionados (30 d)
353

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluentcms/FluentCMS

Todos los issues de fluentcms/FluentCMS

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.