Complete prepared presentation build and runtime integration

This commit is contained in:
Timothy J. Aveni
2026-09-27 18:51:05 -07:00
parent fdb7cd3f6f
commit b499298299
13 changed files with 1013 additions and 38 deletions
+10
View File
@@ -138,6 +138,8 @@ export interface InstalledComponent {
readonly exportName: string;
readonly styles: readonly string[];
readonly compatibility: ComponentArtifact["compatibility"];
/** Owned and interpreted by the React artifact consumer. */
readonly preparation?: unknown;
readonly sharedModules: Readonly<Record<keyof ComponentArtifact["sharedModules"], string>>;
}
/** Build-time validation uses the compiler selected by the Nix derivation. */
@@ -208,6 +210,14 @@ function assembleExecutionInstallation(
routes[url] ??= { path: path.join(root, file.path), mediaType: file.mediaType };
}
components.push({
...(() => {
const pkg = plan.definition.workspace.packageImports.find((entry) => entry.revisionId === revision);
const artifact = pkg?.buildArtifacts?.["org.quixos.react.preparation/1"] as
| { modules: { module: string }[] }
| undefined;
const preparation = artifact?.modules.find((entry) => entry.module === component.id);
return preparation ? { preparation } : {};
})(),
role: (() => {
const module = plan.definition.packages
.find((p) => p.revision === revision)!