Build checked component artifacts and shared React session SDK (WI-09)
This commit is contained in:
@@ -56,7 +56,7 @@ export async function executionScaffold(
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in {
|
||||
quixosPackages.checkedArtifacts = { plan, generator, core, sharedRuntime, typescript, packageRevisionId }:
|
||||
(import (helpers + "/portable-artifacts.nix")) {
|
||||
(import (helpers + "/artifacts.nix")) {
|
||||
inherit pkgs plan core sharedRuntime typescript packageRevisionId;
|
||||
protocol = generator;
|
||||
src = ./.;
|
||||
|
||||
@@ -2692,6 +2692,15 @@ const compileCapabilityResourceSourceInternal = (
|
||||
externalInterfaces,
|
||||
revision: lowerPackage(state, context, options.source),
|
||||
};
|
||||
if (resource.revision.components?.length) {
|
||||
resource.revision.clientInterfaces = Object.fromEntries(
|
||||
imports.flatMap((entry) => {
|
||||
if (entry.kind !== "interface") return [];
|
||||
const contract = options.environment?.interfaces?.get(entry.binding);
|
||||
return contract && !contract.template ? [[entry.binding, contract.revisionId]] : [];
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (resource.kind === "interface") {
|
||||
|
||||
Reference in New Issue
Block a user