This documentation page is a work in progress.
export type RegistryConfig =
  | {
      local: RegistryConfigLocal;
    }
  | {
      git: RegistryConfigGit;
    };
export type RegistryConfigGit =
  | {
      url: RegistryConfigGitUrl;
      directory?: string;
      branch: string;
    }
  | {
      url: RegistryConfigGitUrl;
      directory?: string;
      tag: string;
    }
  | {
      url: RegistryConfigGitUrl;
      directory?: string;
      rev: string;
    };
/**
 * The URL to the git repository.
 *
 * If both HTTPS and SSH URL are provided, they will both be tried and use the
 * one that works.
 */
export type RegistryConfigGitUrl =
  | {
      https?: string;
      ssh?: string;
    }
  | string;

export interface Config {
  registries: {
    [k: string]: RegistryConfig;
  };
  modules: {
    [k: string]: ProjectModuleConfig;
  };
  runtime?: RuntimeConfig;
}
export interface RegistryConfigLocal {
  directory: string;
  /**
   * If true, this will be treated like an external registry. This is
   * important if multiple projects are using the same registry locally.
   *
   *  Modules from this directory will not be tested, formatted, linted, and
   *  generate Prisma migrations.
   */
  isExternal?: boolean;
}
export interface ProjectModuleConfig {
  /**
   * The name of the registry to fetch the module from.
   */
  registry?: string;
  /**
   * Overrides the name of the module to fetch inside the registry.
   */
  module?: string;
  /**
   * The config that configures how this module is ran at runtime.
   */
  config?: {
    [k: string]: any;
  };
  /**
   * Used to store data in a consistent location in case the module name
   * changes.
   *
   * This is used to construct the Postgres database schema and actor
   * identifiers.
   *
   * **IMPORTANT** Changing this will effectively unlink all data stored in
   * this module. Changing it back to the old value will restore the data.
   */
  storageAlias?: string;
}
export interface RuntimeConfig {
  cors?: CorsConfig;
}
/**
 * If this is null, only requests made from the same origin will be accepted
 */
export interface CorsConfig {
  /**
   * The origins that are allowed to make requests to the server.
   */
  origins: string[];
}