23 lines
608 B
TypeScript
23 lines
608 B
TypeScript
import { cliProduct } from "./cli";
|
|
import { desktopProduct } from "./desktop";
|
|
import { webProduct } from "./web";
|
|
|
|
import type { ProductDefinition, ProductId } from "./product";
|
|
|
|
export * from "./product";
|
|
export { sharedExtensions } from "./shared";
|
|
|
|
const products: Record<ProductId, ProductDefinition> = {
|
|
cli: cliProduct,
|
|
web: webProduct,
|
|
desktop: desktopProduct,
|
|
};
|
|
|
|
export function getProduct(id: string): ProductDefinition {
|
|
if (id === "cli" || id === "web" || id === "desktop") {
|
|
return products[id];
|
|
}
|
|
|
|
throw new Error(`Unknown product "${id}". Expected cli, web, or desktop.`);
|
|
}
|