Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

766 B
Raw Blame
import type { z } from "zod";
import type { registryConfigSchema } from "./schema";

export const REGISTRY_SCHEMA_URL = "https://registry.mercurjs.com/registry.json";
export const REGISTRY_ITEM_SCHEMA_URL = "https://registry.mercurjs.com/registry-item.json";

// Registry URL can be customized via environment variable
// Supports branch names: https://raw.githubusercontent.com/{owner}/{repo}/{branch}/packages/registry/registry
export const REGISTRY_URL =
  process.env.REGISTRY_URL ??
  "https://raw.githubusercontent.com/mercurjs/mercur/main/packages/registry/r";

// Built-in registries that are always available and cannot be overridden
export const BUILTIN_REGISTRIES: z.infer<typeof registryConfigSchema> = {
  "@mercurjs": `${REGISTRY_URL}/{name}.json`,
};