web: Vendor SFE Bootstrap (#19766)

* web: Vendor SFE Bootstrap

* codespell

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Teffen Ellis
2026-01-27 16:20:21 +01:00
committed by GitHub
parent c0774c8fef
commit bbac72f2d0
7 changed files with 13 additions and 43 deletions

View File

@@ -179,6 +179,7 @@ skip = [
"./gen-go-api", # Generated Go API
"./data", # Media files
"./media", # Legacy media files
"**vendored**" # Vendored files
]
dictionary = ".github/codespell-dictionary.txt,-"
ignore-words = ".github/codespell-words.txt"

View File

@@ -21,3 +21,4 @@ src/locales/
## Vendored files
*.min.js
*.min.css

34
web/package-lock.json generated
View File

@@ -13675,18 +13675,6 @@
"points-on-curve": "0.2.0"
}
},
"node_modules/popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==",
"deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1",
"license": "MIT",
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/possible-typed-array-names": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
@@ -17538,7 +17526,6 @@
"@swc/cli": "^0.7.10",
"@swc/core": "^1.15.10",
"base64-js": "^1.5.1",
"bootstrap": "^4.6.2",
"formdata-polyfill": "^2025.11.0",
"globby": "16.1.0",
"jquery": "^3.7.1",
@@ -17557,27 +17544,6 @@
"@swc/core-win32-ia32-msvc": "^1.15.3",
"@swc/core-win32-x64-msvc": "^1.15.3"
}
},
"packages/sfe/node_modules/bootstrap": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz",
"integrity": "sha512-51Bbp/Uxr9aTuy6ca/8FbFloBUJZLHwnhTcnjIeRn2suQWsWzcuJhGjKDB5eppVte/8oCdOL3VuwxvZDUggwGQ==",
"deprecated": "This version of Bootstrap is no longer supported. Please upgrade to the latest version.",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"license": "MIT",
"peerDependencies": {
"jquery": "1.9.1 - 3",
"popper.js": "^1.16.1"
}
}
}
}

View File

@@ -22,7 +22,6 @@
"@swc/cli": "^0.7.10",
"@swc/core": "^1.15.10",
"base64-js": "^1.5.1",
"bootstrap": "^4.6.2",
"formdata-polyfill": "^2025.11.0",
"globby": "16.1.0",
"jquery": "^3.7.1",

View File

@@ -16,7 +16,7 @@ export async function createConfig() {
const { resolvePackage, MonoRepoRoot } = await import("@goauthentik/core/paths/node");
const distDirectory = join(MonoRepoRoot, "web", "dist", "sfe");
const bootstrapDirectory = resolvePackage("bootstrap", import.meta);
const packageDirectory = resolvePackage("@goauthentik/web-sfe", import.meta);
/**
* @type {Plugin} A plugin to copy static assets.
@@ -26,15 +26,10 @@ export async function createConfig() {
buildEnd: async () => {
console.log("Copying static assets...");
const bootstrapCSSFilePath = join(
bootstrapDirectory,
"dist",
"css",
"bootstrap.min.css",
);
const bootstrapCSSFilePath = join(packageDirectory, "vendored", "bootstrap");
await fs.mkdir(distDirectory, { recursive: true });
await fs.copyFile(bootstrapCSSFilePath, join(distDirectory, "bootstrap.min.css"));
await fs.cp(bootstrapCSSFilePath, distDirectory, { recursive: true });
},
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long