everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 2.84 kB
Source Map (JSON)
{"version":3,"file":"composition-audit.cjs","names":["auditReleaseComposition","collectRemoteDescriptors","authoredRemoteKeys","readInstalledFrameworkVersion","findWorkspaceRoot"],"sources":["../../../src/services/resolution/composition-audit.ts"],"sourcesContent":["import type { BosConfigInput } from \"../../types\";\nimport { collectRemoteDescriptors } from \"../deploy/rollback\";\nimport { readInstalledFrameworkVersion } from \"../framework-version\";\nimport { walkRemotes } from \"../remotes\";\nimport { findWorkspaceRoot } from \"../workspace/workspace\";\nimport {\n auditReleaseComposition,\n authoredRemoteKeys,\n type CompositionAuditLine,\n} from \"./release-composition\";\nimport type { ResolutionSession } from \"./session\";\n\n/**\n * The one dev-boot chain-audit adapter: every consumer that audits a\n * resolution session's release plane (`bos dev`'s post-boot report, the\n * upgrade's owned-remote realignment) derives its inputs from here, so the\n * audit cannot fork into silently divergent copies.\n */\nexport {\n auditReleaseComposition,\n authoredRemoteKeys,\n type CompositionAuditLine,\n} from \"./release-composition\";\n\nexport const auditSessionComposition = (\n session: NonNullable<ResolutionSession>,\n options?: { fetchImpl?: typeof fetch },\n): Promise<CompositionAuditLine[]> =>\n auditReleaseComposition({\n remotes: collectRemoteDescriptors((session.config ?? {}) as BosConfigInput),\n authoredPaths: authoredRemoteKeys((session.rawConfig ?? {}) as Record<string, unknown>),\n localVersionOf: (name) =>\n readInstalledFrameworkVersion(findWorkspaceRoot(session.root)?.dir ?? session.root, name),\n provisionedRemotes: session.releaseComposition?.omitted,\n configRemotePaths: configRemotePathsOf(session.config),\n manifestRemotePaths: Object.keys(session.releaseManifest?.remotes ?? {}),\n pinnedReleaseVersion: session.releaseManifest?.frameworkVersion,\n ...(options?.fetchImpl ? { fetchImpl: options.fetchImpl } : {}),\n });\n\nconst configRemotePathsOf = (config: unknown): string[] => {\n if (!config || typeof config !== \"object\") return [];\n const paths: string[] = [];\n walkRemotes(config as Record<string, unknown>, ({ remote }) => paths.push(remote));\n return paths;\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,2BACX,SACA,YAEAA,oDAAwB;CACtB,SAASC,0CAA0B,QAAQ,UAAU,CAAC,CAAoB;CAC1E,eAAeC,+CAAoB,QAAQ,aAAa,CAAC,CAA6B;CACtF,iBAAiB,SACfC,wDAA8BC,oCAAkB,QAAQ,IAAI,CAAC,EAAE,OAAO,QAAQ,MAAM,IAAI;CAC1F,oBAAoB,QAAQ,oBAAoB;CAChD,mBAAmB,oBAAoB,QAAQ,MAAM;CACrD,qBAAqB,OAAO,KAAK,QAAQ,iBAAiB,WAAW,CAAC,CAAC;CACvE,sBAAsB,QAAQ,iBAAiB;CAC/C,GAAI,SAAS,YAAY,EAAE,WAAW,QAAQ,UAAU,IAAI,CAAC;AAC/D,CAAC;AAEH,MAAM,uBAAuB,WAA8B;CACzD,IAAI,CAAC,UAAU,OAAO,WAAW,UAAU,OAAO,CAAC;CACnD,MAAM,QAAkB,CAAC;CACzB,4BAAY,SAAoC,EAAE,aAAa,MAAM,KAAK,MAAM,CAAC;CACjF,OAAO;AACT"}