Complete prepared presentation build and runtime integration
This commit is contained in:
@@ -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)!
|
||||
|
||||
Reference in New Issue
Block a user