everything-dev
Version:
A consolidated product package for building Module Federation apps with oRPC APIs.
1 lines • 1.36 kB
Source Map (JSON)
{"version":3,"file":"published.cjs","names":["walkExtendsChain","resolveConfigComposableEntries","BosConfigSchema"],"sources":["../../../src/services/registry/published.ts"],"sourcesContent":["import { resolveConfigComposableEntries } from \"../../config\";\nimport type { BosConfig } from \"../../types\";\nimport { BosConfigSchema } from \"../../types\";\nimport { walkExtendsChain } from \"../resolution/session\";\n\nexport async function resolvePublishedConfig(\n account: string,\n gateway: string,\n registry?: string,\n): Promise<BosConfig | null> {\n try {\n const { config: merged } = await walkExtendsChain(`bos://${account}/${gateway}`, {\n env: \"production\",\n registry,\n visit: async () => {},\n });\n return resolveConfigComposableEntries(\n BosConfigSchema.parse(merged),\n process.cwd(),\n \"production\",\n );\n } catch (error) {\n if (error instanceof Error && error.message.startsWith(\"No config found\")) {\n return null;\n }\n throw error;\n }\n}\n"],"mappings":";;;;;AAKA,eAAsB,uBACpB,SACA,SACA,UAC2B;CAC3B,IAAI;EACF,MAAM,EAAE,QAAQ,WAAW,MAAMA,qDAAiB,SAAS,QAAQ,GAAG,WAAW;GAC/E,KAAK;GACL;GACA,OAAO,YAAY,CAAC;EACtB,CAAC;EACD,OAAOC,4CACLC,8BAAgB,MAAM,MAAM,GAC5B,QAAQ,IAAI,GACZ,YACF;CACF,SAAS,OAAO;EACd,IAAI,iBAAiB,SAAS,MAAM,QAAQ,WAAW,iBAAiB,GACtE,OAAO;EAET,MAAM;CACR;AACF"}