2021-11-03 16:40:31 +00:00
|
|
|
import { User } from '~/lib/api/types';
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
WOODPECKER_USER: User | undefined;
|
|
|
|
WOODPECKER_DOCS: string | undefined;
|
|
|
|
WOODPECKER_VERSION: string | undefined;
|
|
|
|
WOODPECKER_CSRF: string | undefined;
|
2022-06-17 18:14:01 +00:00
|
|
|
WOODPECKER_FORGE: string | undefined;
|
2023-04-29 15:51:50 +00:00
|
|
|
WOODPECKER_ROOT_URL: string | undefined;
|
2023-08-03 00:42:30 +00:00
|
|
|
WOODPECKER_ENABLE_SWAGGER: boolean | undefined;
|
2021-11-03 16:40:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default () => ({
|
|
|
|
user: window.WOODPECKER_USER || null,
|
|
|
|
docs: window.WOODPECKER_DOCS || null,
|
|
|
|
version: window.WOODPECKER_VERSION,
|
|
|
|
csrf: window.WOODPECKER_CSRF || null,
|
2022-06-17 18:14:01 +00:00
|
|
|
forge: window.WOODPECKER_FORGE || null,
|
2023-04-29 15:51:50 +00:00
|
|
|
rootURL: window.WOODPECKER_ROOT_URL || null,
|
2023-08-03 00:42:30 +00:00
|
|
|
enableSwagger: window.WOODPECKER_ENABLE_SWAGGER || false,
|
2021-11-03 16:40:31 +00:00
|
|
|
});
|