web/NPM Workspaces: Prep ESBuild plugin for publish. (#14552)

* web: Prep ESBuild plugin for publish.

* prettier-config: Update deps.

* eslint-config: Update deps.

* docusaurus-config: Update deps.

* docs: Update deps.

* docs: Enable linter.

* docs: Lint.

* web/sfe: Clean up types. Prep for monorepo.

* esbuild-plugin-live-reload: Update deps.

* web: Tidy ESLint, script commands.

* web: Fix logs.

* web: Lint.

* web: Split compile check from cached version.
This commit is contained in:
Teffen Ellis
2025-05-21 22:09:33 +02:00
committed by GitHub
parent f48496b2cf
commit 614740a4ff
43 changed files with 7478 additions and 5935 deletions

View File

@ -10,7 +10,6 @@ import { DistDirectory, DistDirectoryName, EntryPoint, PackageRoot } from "#path
import { NodeEnvironment } from "@goauthentik/core/environment/node";
import { MonoRepoRoot, resolvePackage } from "@goauthentik/core/paths/node";
import { readBuildIdentifier } from "@goauthentik/core/version/node";
import { liveReloadPlugin } from "@goauthentik/esbuild-plugin-live-reload/plugin";
import { deepmerge } from "deepmerge-ts";
import esbuild from "esbuild";
import copy from "esbuild-plugin-copy";
@ -145,13 +144,17 @@ async function doWatch() {
console.groupEnd();
const buildOptions = createESBuildOptions({
entryPoints,
plugins: [
const developmentPlugins = await import("@goauthentik/esbuild-plugin-live-reload/plugin")
.then(({ liveReloadPlugin }) => [
liveReloadPlugin({
relativeRoot: PackageRoot,
}),
],
])
.catch(() => []);
const buildOptions = createESBuildOptions({
entryPoints,
plugins: developmentPlugins,
});
const buildContext = await esbuild.context(buildOptions);
@ -162,7 +165,7 @@ async function doWatch() {
const httpURL = new URL("http://localhost");
httpURL.port = process.env.COMPOSE_PORT_HTTP ?? "9000";
const httpsURL = new URL("http://localhost");
const httpsURL = new URL("https://localhost");
httpsURL.port = process.env.COMPOSE_PORT_HTTPS ?? "9443";
console.log(`\n${logPrefix} 🚀 Server running\n\n`);
@ -236,7 +239,6 @@ await cleanDistDirectory()
.then(() =>
delegateCommand()
.then(() => {
console.log("Build complete");
process.exit(0);
})
.catch((error) => {