40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { AuthPlatformDef } from "./auth"
|
|
import { UIPlatformDef } from "./ui"
|
|
import { EnvironmentsPlatformDef } from "./environments"
|
|
import { CollectionsPlatformDef } from "./collections"
|
|
import { SettingsPlatformDef } from "./settings"
|
|
import { HistoryPlatformDef } from "./history"
|
|
import { TabStatePlatformDef } from "./tab"
|
|
import { AnalyticsPlatformDef } from "./analytics"
|
|
import { InterceptorsPlatformDef } from "./interceptors"
|
|
import { HoppModule } from "~/modules"
|
|
import { InspectorsPlatformDef } from "./inspectors"
|
|
import { Service } from "dioc"
|
|
|
|
export type PlatformDef = {
|
|
ui?: UIPlatformDef
|
|
addedHoppModules?: HoppModule[]
|
|
addedServices?: Array<typeof Service<unknown> & { ID: string }>
|
|
auth: AuthPlatformDef
|
|
analytics?: AnalyticsPlatformDef
|
|
sync: {
|
|
environments: EnvironmentsPlatformDef
|
|
collections: CollectionsPlatformDef
|
|
settings: SettingsPlatformDef
|
|
history: HistoryPlatformDef
|
|
tabState: TabStatePlatformDef
|
|
}
|
|
interceptors: InterceptorsPlatformDef
|
|
additionalInspectors?: InspectorsPlatformDef
|
|
platformFeatureFlags: {
|
|
exportAsGIST: boolean
|
|
hasTelemetry: boolean
|
|
}
|
|
}
|
|
|
|
export let platform: PlatformDef
|
|
|
|
export function setPlatformDef(def: PlatformDef) {
|
|
platform = def
|
|
}
|