web: Move build observer. Prep.
This commit is contained in:
@ -123,7 +123,7 @@ export class AdminInterface extends AuthenticatedInterface {
|
|||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
||||||
const { ESBuildObserver } = await import("@goauthentik/common/client");
|
const { ESBuildObserver } = await import("src/development/build-observer");
|
||||||
|
|
||||||
new ESBuildObserver(process.env.WATCHER_URL);
|
new ESBuildObserver(process.env.WATCHER_URL);
|
||||||
}
|
}
|
||||||
|
@ -17,13 +17,12 @@ type BuildEventListener<Data = unknown> = (event: MessageEvent<Data>) => void;
|
|||||||
*
|
*
|
||||||
* ```ts
|
* ```ts
|
||||||
* if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
* if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
||||||
* const { ESBuildObserver } = await import("@goauthentik/common/client");
|
* const { ESBuildObserver } = await import("@goauthentik/common/development/build-observer");
|
||||||
*
|
*
|
||||||
* new ESBuildObserver(process.env.WATCHER_URL);
|
* new ESBuildObserver(process.env.WATCHER_URL);
|
||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
}
|
*
|
||||||
|
|
||||||
*/
|
*/
|
||||||
export class ESBuildObserver extends EventSource {
|
export class ESBuildObserver extends EventSource {
|
||||||
/**
|
/**
|
@ -15,7 +15,7 @@ import "@goauthentik/flow/stages/password/PasswordStage";
|
|||||||
// end of stage import
|
// end of stage import
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
||||||
const { ESBuildObserver } = await import("@goauthentik/common/client");
|
const { ESBuildObserver } = await import("src/development/build-observer");
|
||||||
|
|
||||||
new ESBuildObserver(process.env.WATCHER_URL);
|
new ESBuildObserver(process.env.WATCHER_URL);
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ export class UserInterface extends AuthenticatedInterface {
|
|||||||
window.addEventListener(EVENT_WS_MESSAGE, this.fetchConfigurationDetails);
|
window.addEventListener(EVENT_WS_MESSAGE, this.fetchConfigurationDetails);
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
if (process.env.NODE_ENV === "development" && process.env.WATCHER_URL) {
|
||||||
const { ESBuildObserver } = await import("@goauthentik/common/client");
|
const { ESBuildObserver } = await import("src/development/build-observer");
|
||||||
|
|
||||||
new ESBuildObserver(process.env.WATCHER_URL);
|
new ESBuildObserver(process.env.WATCHER_URL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user