web: Move build observer. Prep.

This commit is contained in:
Teffen Ellis
2025-04-03 06:12:51 +02:00
parent ec49b2e0e0
commit a5bb22a66a
4 changed files with 5 additions and 6 deletions

View File

@ -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);
} }

View File

@ -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 {
/** /**

View File

@ -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);
} }

View File

@ -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);
} }