everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 2.09 kB
Source Map (JSON)
{"version":3,"file":"deps.mjs","names":[],"sources":["../../../src/services/deploy/deps.ts"],"sourcesContent":["import { Context, Layer } from \"effect\";\nimport { fetchBosConfigFromFastKv, fetchConfigHistory } from \"../registry/fastkv\";\nimport { buildSourceArchive } from \"./source-archive\";\nimport { collectDistFiles, uploadBundle, uploadWorkspaceDist } from \"./storage\";\nimport type { StorageLegDeps } from \"./upload-leg\";\nimport {\n composeWorkspaceVersionManifest,\n readBuildReport,\n resolveSlotVersion,\n} from \"./version-manifest\";\n\n/**\n * The train's I/O surfaces as Context.Service tags (ticket #422): storage,\n * registry reads, and signing are injectable — tests provide fake layers,\n * the CLI composes the real ones in plugin.ts. The train core receives them\n * as a `TrainDeps` struct; `DeployTrainService.Live` resolves the tags.\n */\n\nexport class BundleStorage extends Context.Service<BundleStorage, StorageLegDeps>()(\n \"everything-dev/deploy/storage\",\n) {\n static readonly Live = Layer.succeed(\n this,\n BundleStorage.of({\n collectDistFiles,\n uploadWorkspaceDist,\n uploadBundle,\n resolveSlotVersion,\n readBuildReport,\n composeWorkspaceVersionManifest,\n buildSourceArchive,\n }),\n );\n}\n\nexport interface RegistryStoreShape {\n fetchConfig: typeof fetchBosConfigFromFastKv;\n fetchHistory: typeof fetchConfigHistory;\n}\n\nexport class RegistryStore extends Context.Service<RegistryStore, RegistryStoreShape>()(\n \"everything-dev/deploy/registry\",\n) {\n static readonly Live = Layer.succeed(\n this,\n RegistryStore.of({\n fetchConfig: fetchBosConfigFromFastKv,\n fetchHistory: fetchConfigHistory,\n }),\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,IAAa,gBAAb,MAAa,sBAAsB,QAAQ,QAAuC,CAAC,CACjF,+BACF,CAAC,CAAC;CACA,OAAgB,OAAO,MAAM,QAC3B,MACA,cAAc,GAAG;EACf;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CACH;AACF;AAOA,IAAa,gBAAb,MAAa,sBAAsB,QAAQ,QAA2C,CAAC,CACrF,gCACF,CAAC,CAAC;CACA,OAAgB,OAAO,MAAM,QAC3B,MACA,cAAc,GAAG;EACf,aAAa;EACb,cAAc;CAChB,CAAC,CACH;AACF"}