UNPKG

952 BPlain TextView Raw
1import { Endpoints, setup as internalSetup } from './setup/internal'
2
3
4type UnknownObject =
5 { [key: string]: unknown }
6
7
8/**
9 * Toggle debug mode.
10 *
11 * Only adds a few `console.log`s at this moment.
12 */
13export function debug({ enabled }: { enabled: boolean }): boolean {
14 internalSetup.debug = enabled
15 return internalSetup.debug
16}
17
18
19/**
20 * Override endpoints.
21 *
22 * You can override each of these,
23 * no need to provide them all here.
24 *
25 * `api` Location of the Fission API
26 * (default `https://runfission.com`)
27 * `lobby` Location of the authentication lobby.
28 * (default `https://auth.fission.codes`)
29 * `user` User's domain to use, will be prefixed by username.
30 * (default `fission.name`)
31 */
32export function endpoints(e: Partial<Endpoints>): Endpoints {
33 internalSetup.endpoints = { ...internalSetup.endpoints, ...e }
34 return { ...internalSetup.endpoints }
35}
36
37export { setDependencies } from './setup/dependencies'