Add checked query composition foundations for prepared presentations
Move React navigation query generation behind an explicit build frontend. Add checked result-dependent query bindings and pure composition evaluation, including one-snapshot server execution. Preserve the existing rendering path while the React manifest, worker preparation, and replica admission integration remain pending; see docs/PREPARED_PRESENTATIONS_PROGRESS.md.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { PackageQueryGenerator } from "../capability-language/assembly.js";
|
||||
import { presentationQueries } from "../bindings/presentation-queries.js";
|
||||
|
||||
/** Selected explicitly by the React build. Its output is checked as ordinary
|
||||
* Camino queries; no React identifiers are interpreted by package assembly. */
|
||||
export const generatePackageQueries: PackageQueryGenerator = async (input) => {
|
||||
const pkg = structuredClone(input.package);
|
||||
const before = new Set(pkg.queries?.map((query) => query.id));
|
||||
const documents = presentationQueries(pkg, input.interfaces);
|
||||
return { queries: (pkg.queries ?? []).filter((query) => !before.has(query.id)), documents };
|
||||
};
|
||||
Reference in New Issue
Block a user