Repository navigation
Release v4.72.0
A rendered Cratis application can now render a ui profile that names a custom runtime package: the application approves the package with Scene's approved package set, and the generated frontend installs, loads and renders it.
Added
CratisRendering.CreateProfile(..., approvedPackages)carries an approved package set in the render profile asapproved-packages.jsonand generates the frontend that installs and loads it: one extrapackage.jsondependency per package,.frontend/approvedPackages.ts(literal imports, package style sheets,loadApprovedComponents()over Scene'sloadApprovedPackages) and amain.tsxthat awaits it before the first render. An application with no approved packages plans byte-for-byte what it planned before. Admission regenerates the whole frontend from the document and refuses a profile that differs (STAGE-CRATIS-001). See Custom runtime packages. (part of #236)CratisRendering.ShippedPackages,ShippedPackageNamesandCatalogWith(set): the catalog aui profileresolves against is the packages the target ships plus the approved ones, so an approved package's layouts, themes, dependencies and version ranges are checked by the same planner. (part of #236)CratisBackendApplicationScaffoldRequest.WithApprovedPackagesrefuses a package that reuses a shipped package name or an npm package the scaffold already installs. (part of #236)- The Stage
Apptakes apackageCatalog, so an authoredcomponent Acme.Charts.chart(or a bare name only an approved package declares) resolves to the key the package registers its component under instead of rendering "Unresolved component". (part of #237)
Changed
- Rendered applications and the live Stage use Scene 4.20.0 (
@cratis/scene.*andCratis.Scene.*), which publishes the approved package set loader. (part of #236) Verification/generated-react-browser/run.shruns another scenario script whenSTAGE_GENERATED_REACT_SCENARIOnames one, so a rendered application with a custom package can be held to its own assertions. (part of #236)