Files
authentik/web/paths/node.js
Teffen Ellis 1b1be27f6a core, web: Vendored client follow-ups (#21174)
* core, web: Vendored client follow-ups

- Updated packages for use with TypeScript 6
- Fix search results including symlinks.

* Bump docker package.

* web: bump vite from 8.0.2 to 8.0.3 in /web

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@8.0.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 8.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix import declaration order.

* Fix live reload imports, package declarations.

* Tidy admin entrypoint.

* Rename.

* Fix import.

* Fix import.

* Update paths. Update Knip.

* Bump knip.

* Update esbuild.d.ts

Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>

* Bump.

* Re-enable deprecation warning.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com>
Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-26 18:33:24 +01:00

100 lines
2.8 KiB
JavaScript

/**
* @file Paths used by the web package.
*
* @runtime node
*/
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { DistDirectoryName } from "#paths";
const relativeDirname = dirname(fileURLToPath(import.meta.url));
//#region Base paths
/**
* @typedef {'@goauthentik/web'} WebPackageIdentifier
*/
/**
* The root of the web package.
*
* @runtime node
*/
export const PackageRoot = /** @type {WebPackageIdentifier} */ (resolve(relativeDirname, ".."));
/**
* Path to the web package's distribution directory.
*
* This is where the built files are located after running the build process.
*
* @runtime node
*/
export const DistDirectory = /** @type {`${WebPackageIdentifier}/${DistDirectoryName}`} */ (
resolve(PackageRoot, DistDirectoryName)
);
//#endregion
//#region Entry points
/**
* @typedef {{ in: string, out: string }} EntryPointTarget
*
* ESBuild entrypoint target.
* Matches the type defined in the ESBuild context.
*/
/**
* Entry points available for building.
*
* @satisfies {Record<string, EntryPointTarget>}
*
* @runtime node
*/
export const EntryPoint = /** @type {const} */ ({
Admin: {
in: resolve(PackageRoot, "src", "admin", "index.entrypoint.ts"),
out: resolve(DistDirectory, "admin", "AdminInterface"),
},
User: {
in: resolve(PackageRoot, "src", "user", "index.entrypoint.ts"),
out: resolve(DistDirectory, "user", "UserInterface"),
},
Flow: {
in: resolve(PackageRoot, "src", "flow", "index.entrypoint.ts"),
out: resolve(DistDirectory, "flow", "FlowInterface"),
},
StandaloneAPI: {
in: resolve(PackageRoot, "src", "standalone", "api-browser/index.entrypoint.ts"),
out: resolve(DistDirectory, "standalone", "api-browser", "index"),
},
StandaloneLoading: {
in: resolve(PackageRoot, "src", "standalone", "loading/index.entrypoint.ts"),
out: resolve(DistDirectory, "standalone", "loading", "index"),
},
RAC: {
in: resolve(PackageRoot, "src", "rac", "index.entrypoint.ts"),
out: resolve(DistDirectory, "rac", "index"),
},
Polyfill: {
in: resolve(PackageRoot, "src", "polyfill", "index.entrypoint.ts"),
out: resolve(DistDirectory, "poly"),
},
InterfaceStyles: {
in: resolve(PackageRoot, "src", "styles", "authentik", "interface.global.css"),
out: resolve(DistDirectory, "styles", "interface"),
},
StaticStyles: {
in: resolve(PackageRoot, "src", "styles", "authentik", "static.global.css"),
out: resolve(DistDirectory, "styles", "static"),
},
FlowsStyles: {
in: resolve(PackageRoot, "src", "styles", "authentik", "flows.global.css"),
out: resolve(DistDirectory, "styles", "flow"),
},
});
//#endregion