| ... | ... | @@ -322,31 +322,6 @@ function validateBundledClientAssets(clientDir: string) { |
| 322 | 322 | }); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | | function resolveCatalogDependencies( |
| 326 | | dependencies: Record<string, unknown>, |
| 327 | | catalog: Record<string, unknown>, |
| 328 | | dependencySourceLabel: string, |
| 329 | | ): Record<string, unknown> { |
| 330 | | return Object.fromEntries( |
| 331 | | Object.entries(dependencies).map(([dependencyName, spec]) => { |
| 332 | | if (typeof spec !== "string" || !spec.startsWith("catalog:")) { |
| 333 | | return [dependencyName, spec]; |
| 334 | | } |
| 335 | | |
| 336 | | const catalogKey = spec.slice("catalog:".length).trim(); |
| 337 | | const lookupKey = catalogKey.length > 0 ? catalogKey : dependencyName; |
| 338 | | const resolvedSpec = catalog[lookupKey]; |
| 339 | | if (typeof resolvedSpec !== "string" || resolvedSpec.length === 0) { |
| 340 | | throw new BuildScriptError({ |
| 341 | | message: `Unable to resolve '${spec}' for ${dependencySourceLabel} dependency '${dependencyName}'. Expected key '${lookupKey}' in root workspace catalog.`, |
| 342 | | }); |
| 343 | | } |
| 344 | | |
| 345 | | return [dependencyName, resolvedSpec]; |
| 346 | | }), |
| 347 | | ); |
| 348 | | } |
| 349 | | |
| 350 | 325 | function resolveDesktopRuntimeDependencies( |
| 351 | 326 | dependencies: Record<string, unknown> | undefined, |
| 352 | 327 | catalog: Record<string, unknown>, |