refactor(core): derive catalog availability from integrations (#32272)

This commit is contained in:
Dax
2026-06-14 14:44:50 +02:00
committed by GitHub
parent 4810df0a71
commit 0cf3ee4406
29 changed files with 624 additions and 511 deletions
+6 -4
View File
@@ -28,8 +28,10 @@ const connections = Credential.layer.pipe(
Layer.provide(Database.layerFromPath(":memory:").pipe(Layer.fresh)),
Layer.provide(events),
)
const catalog = Catalog.layer.pipe(Layer.provide(Layer.mergeAll(events, locationLayer, plugins, policy, connections)))
const integrations = Integration.locationLayer.pipe(Layer.provide(events), Layer.provide(connections))
const catalog = Catalog.layer.pipe(
Layer.provide(Layer.mergeAll(events, locationLayer, plugins, policy, connections, integrations)),
)
const layer = Layer.mergeAll(
catalog.pipe(Layer.provide(connections)),
integrations,
@@ -61,11 +63,11 @@ describe("ModelsDevPlugin", () => {
id: Integration.ID.make("acme"),
name: "Acme",
methods: [
new Integration.KeyMethod({ type: "key" }),
new Integration.EnvMethod({
{ type: "key" },
{
type: "env",
names: ["ACME_API_KEY"],
}),
},
],
connections: [],
}),