web/api: Fix Hoisted exports across entrypoints. Update Axios. (#14089)
* web/api: Fix issue where hoisted exports across entrypoints do not order. * web/api: Override OpenAPI transitive dep.
This commit is contained in:
		@ -1,4 +1,5 @@
 | 
			
		||||
import {
 | 
			
		||||
    CSRFHeaderName,
 | 
			
		||||
    CSRFMiddleware,
 | 
			
		||||
    EventMiddleware,
 | 
			
		||||
    LoggingMiddleware,
 | 
			
		||||
@ -8,6 +9,10 @@ import { globalAK } from "@goauthentik/common/global";
 | 
			
		||||
 | 
			
		||||
import { Config, Configuration, CoreApi, CurrentBrand, RootApi } from "@goauthentik/api";
 | 
			
		||||
 | 
			
		||||
// HACK: Workaround for ESBuild not being able to hoist import statement across entrypoints.
 | 
			
		||||
// This can be removed after ESBuild uses a single build context for all entrypoints.
 | 
			
		||||
export { CSRFHeaderName };
 | 
			
		||||
 | 
			
		||||
let globalConfigPromise: Promise<Config> | undefined = Promise.resolve(globalAK().config);
 | 
			
		||||
export function config(): Promise<Config> {
 | 
			
		||||
    if (!globalConfigPromise) {
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,7 @@
 | 
			
		||||
import { CSRFHeaderName } from "@goauthentik/common/api/middleware";
 | 
			
		||||
// sort-imports-ignore
 | 
			
		||||
import "rapidoc";
 | 
			
		||||
 | 
			
		||||
import { CSRFHeaderName } from "@goauthentik/common/api/config";
 | 
			
		||||
import { EVENT_THEME_CHANGE } from "@goauthentik/common/constants";
 | 
			
		||||
import { globalAK } from "@goauthentik/common/global";
 | 
			
		||||
import { first, getCookie } from "@goauthentik/common/utils";
 | 
			
		||||
@ -6,7 +9,6 @@ import { Interface } from "@goauthentik/elements/Interface";
 | 
			
		||||
import "@goauthentik/elements/ak-locale-context";
 | 
			
		||||
import { DefaultBrand } from "@goauthentik/elements/sidebar/SidebarBrand";
 | 
			
		||||
import { themeImage } from "@goauthentik/elements/utils/images";
 | 
			
		||||
import "rapidoc";
 | 
			
		||||
 | 
			
		||||
import { msg } from "@lit/localize";
 | 
			
		||||
import { CSSResult, TemplateResult, css, html } from "lit";
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user