Add bounded public member inspection through shared query scopes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { compileInspectionTemplates, type InspectionTemplate } from "./inspection.js";
|
||||
import path from "node:path";
|
||||
import { loadCheckedArtifactWorld } from "./receipts.js";
|
||||
import { contentArtifactUrl, loadArtifactWorld, type LoadedArtifactWorld } from "./files.js";
|
||||
@@ -24,6 +25,7 @@ export interface ExecutionGroupIdentity {
|
||||
readonly executionDigest: string;
|
||||
}
|
||||
export interface ClientContractCatalog {
|
||||
readonly inspections: readonly InspectionTemplate[];
|
||||
readonly resultInterfaces: Readonly<Record<string, readonly string[]>>;
|
||||
readonly operations: readonly PublicOperationContract[];
|
||||
readonly queries: readonly PublicQueryContract[];
|
||||
@@ -66,14 +68,17 @@ export function clientContractCatalog(
|
||||
.map((operation) => publicOperationContract(iface, operation)),
|
||||
),
|
||||
);
|
||||
const inspection = compileInspectionTemplates(plan);
|
||||
return {
|
||||
inspections: inspection.templates,
|
||||
resultInterfaces: Object.fromEntries(
|
||||
plan.definition.operations.map((operation) => [operation.key, resultInterfaces(plan, operation.key)]),
|
||||
),
|
||||
operations,
|
||||
queries: packages.flatMap((pkg) =>
|
||||
(pkg.checkedQueries ?? []).map((q) => publicQueryContract(pkg, q.declaration.id)),
|
||||
),
|
||||
queries: [
|
||||
...inspection.contracts,
|
||||
...packages.flatMap((pkg) => (pkg.checkedQueries ?? []).map((q) => publicQueryContract(pkg, q.declaration.id))),
|
||||
],
|
||||
components: installation.components.filter((c) => requestedPackages.includes(c.packageRevision)),
|
||||
moduleBindings: plan.definition.workspace.conformances.flatMap((c) =>
|
||||
(c.moduleBindings ?? [])
|
||||
|
||||
Reference in New Issue
Block a user