2026-08-21 16:33:23 +08:00

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.`);
}