UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

34 lines (32 loc) • 1.38 kB
import { fetchBosConfigFromFastKv, fetchConfigHistory } from "../registry/fastkv.mjs"; import { composeWorkspaceVersionManifest, readBuildReport, resolveSlotVersion } from "./version-manifest.mjs"; import { buildSourceArchive } from "./source-archive.mjs"; import { collectDistFiles, uploadBundle, uploadWorkspaceDist } from "./storage.mjs"; import { Context, Layer } from "effect"; //#region src/services/deploy/deps.ts /** * The train's I/O surfaces as Context.Service tags (ticket #422): storage, * registry reads, and signing are injectable — tests provide fake layers, * the CLI composes the real ones in plugin.ts. The train core receives them * as a `TrainDeps` struct; `DeployTrainService.Live` resolves the tags. */ var BundleStorage = class BundleStorage extends Context.Service()("everything-dev/deploy/storage") { static Live = Layer.succeed(this, BundleStorage.of({ collectDistFiles, uploadWorkspaceDist, uploadBundle, resolveSlotVersion, readBuildReport, composeWorkspaceVersionManifest, buildSourceArchive })); }; var RegistryStore = class RegistryStore extends Context.Service()("everything-dev/deploy/registry") { static Live = Layer.succeed(this, RegistryStore.of({ fetchConfig: fetchBosConfigFromFastKv, fetchHistory: fetchConfigHistory })); }; //#endregion export { BundleStorage, RegistryStore }; //# sourceMappingURL=deps.mjs.map