UNPKG

@paroicms/connector

Version:

An API to help build management tools for ParoiCMS instances

50 lines (49 loc) 1.99 kB
import type { AppLoggerLevel } from "@paroicms/internal-server-lib"; import type { PluginStaticConfigurations } from "@paroicms/public-server-lib"; import type { JtDevAccountConf, JtFqdnSitePackConf, JtGoogleAuthConf, JtHttpRedirection, JtImageProcessorConf, JtPlatformAdminAccountConf, JtSingleSiteConf, JtSubDomainSitePackConf } from "../../typeonly/configuration-types.d.ts"; export type AppConf = SingleSiteAppConf | MultisiteAppConf; export interface AppConfBase { port: number; hostname?: string; publicProtocol: "http" | "https"; publicPort: number; adminUiPort: number; logLevel: "silent" | AppLoggerLevel; /** * Omit for stdout. */ logFile?: string; allowRobots: boolean; immutableAssets: boolean; cacheTimeToIdle: CacheDuration; clearCacheAfterStart?: boolean; clearImageCacheAfterStart?: boolean; graphqlDevTools?: boolean; generateMissingDatabases?: boolean; googleAuth?: GoogleAuthConf; imageProcessor: ImageProcessorConf; devAccount?: DevAccountConf; platformAdminAccounts?: PlatformAdminAccountConf[]; plugins: PluginStaticConfigurations; httpRedirections?: HttpRedirectionConf[]; } export type CacheDuration = `${number}d` | "disabled" | "infinite"; export interface SingleSiteAppConf extends AppConfBase { kind: "singleSite"; singleSite: SingleSiteConf; } export interface MultisiteAppConf extends AppConfBase { kind: "multisite"; platform: { dataDir: string; }; sitePacks: (FqdnSitePackConf | SubDomainSitePackConf)[]; } export type SingleSiteConf = JtSingleSiteConf; export type FqdnSitePackConf = JtFqdnSitePackConf; export type SubDomainSitePackConf = JtSubDomainSitePackConf; export type GoogleAuthConf = JtGoogleAuthConf; export type ImageProcessorConf = JtImageProcessorConf; export type DevAccountConf = JtDevAccountConf; export type PlatformAdminAccountConf = JtPlatformAdminAccountConf; export type HttpRedirectionConf = JtHttpRedirection;