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:
@@ -5,10 +5,12 @@ import process from "node:process";
|
||||
import { bindingSchema } from "../bindings/index.js";
|
||||
import { compileCapabilityResourceRepository, type ResolvedCapabilityResource } from "./assembly.js";
|
||||
import { createGitCapabilityResolver } from "./git-resolver.js";
|
||||
import { loadQueryGenerator } from "./query-generator.js";
|
||||
|
||||
const usage = `usage: quixos-resource-compile --root DIRECTORY --kind interface|package|build
|
||||
--repository URL --commit GIT_REV --checkout-root DIRECTORY
|
||||
[--snapshot-map PATH] [--snapshot-only true] [--graph-out PATH] [--schema-out PATH]
|
||||
[--query-generator BUILD_MODULE_PATH]
|
||||
|
||||
Resolves a standalone resource's recursive dependency-lock graph, validates
|
||||
its interface.qx or package.qx manifest, and emits the checked resource as JSON.`;
|
||||
@@ -30,6 +32,7 @@ const parseArgs = (args: string[]) => {
|
||||
"--snapshot-only",
|
||||
"--graph-out",
|
||||
"--schema-out",
|
||||
"--query-generator",
|
||||
].includes(key) ||
|
||||
values.has(key)
|
||||
)
|
||||
@@ -65,6 +68,7 @@ const parseArgs = (args: string[]) => {
|
||||
snapshotOnly: values.get("--snapshot-only") === "true",
|
||||
graphOut: values.get("--graph-out"),
|
||||
schemaOut: values.get("--schema-out"),
|
||||
queryGenerator: values.get("--query-generator"),
|
||||
} as const;
|
||||
};
|
||||
|
||||
@@ -106,6 +110,7 @@ const main = async () => {
|
||||
commit: options.commit,
|
||||
},
|
||||
resolveResource,
|
||||
generateQueries: await loadQueryGenerator(options.queryGenerator),
|
||||
});
|
||||
if (options.graphOut) {
|
||||
await writeFile(
|
||||
|
||||
Reference in New Issue
Block a user