* web: fix esbuild issue with style sheets
Getting ESBuild, Lit, and Storybook to all agree on how to read and parse stylesheets is a serious
pain. This fix better identifies the value types (instances) being passed from various sources in
the repo to the three *different* kinds of style processors we're using (the native one, the
polyfill one, and whatever the heck Storybook does internally).
Falling back to using older CSS instantiating techniques one era at a time seems to do the trick.
It's ugly, but in the face of the aggressive styling we use to avoid Flashes of Unstyled Content
(FLoUC), it's the logic with which we're left.
In standard mode, the following warning appears on the console when running a Flow:
```
Autofocus processing was blocked because a document already has a focused element.
```
In compatibility mode, the following **error** appears on the console when running a Flow:
```
crawler-inject.js:1106 Uncaught TypeError: Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'.
at initDomMutationObservers (crawler-inject.js:1106:18)
at crawler-inject.js:1114:24
at Array.forEach (<anonymous>)
at initDomMutationObservers (crawler-inject.js:1114:10)
at crawler-inject.js:1549:1
initDomMutationObservers @ crawler-inject.js:1106
(anonymous) @ crawler-inject.js:1114
initDomMutationObservers @ crawler-inject.js:1114
(anonymous) @ crawler-inject.js:1549
```
Despite this error, nothing seems to be broken and flows work as anticipated.
* web: clean up a bit inside the promptform
Just something I did while researching Github Issue 5197.
140 lines
5.7 KiB
JSON
140 lines
5.7 KiB
JSON
{
|
|
"name": "@goauthentik/web",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"extract-locales": "lit-localize extract",
|
|
"build-locales": "node scripts/build-locales.mjs",
|
|
"build-locales:build": "lit-localize build",
|
|
"build-locales:repair": "prettier --write ./src/locale-codes.ts",
|
|
"esbuild:build": "node build.mjs",
|
|
"esbuild:build-proxy": "node build.mjs --proxy",
|
|
"esbuild:watch": "node build.mjs --watch",
|
|
"build": "run-s build-locales esbuild:build",
|
|
"build-proxy": "run-s build-locales esbuild:build-proxy",
|
|
"watch": "run-s build-locales esbuild:watch",
|
|
"lint": "cross-env NODE_OPTIONS='--max_old_space_size=65536' eslint . --max-warnings 0 --fix",
|
|
"lint:precommit": "cross-env NODE_OPTIONS='--max_old_space_size=65536' node scripts/eslint-precommit.mjs",
|
|
"lint:spelling": "node scripts/check-spelling.mjs",
|
|
"lit-analyse": "lit-analyzer src",
|
|
"precommit": "npm-run-all --parallel tsc lit-analyse lint:spelling --sequential lint:precommit prettier",
|
|
"prequick": "run-s tsc:execute lit-analyse lint:precommit lint:spelling",
|
|
"prettier-check": "prettier --check .",
|
|
"prettier": "prettier --write .",
|
|
"pseudolocalize": "node scripts/pseudolocalize.mjs",
|
|
"tsc:execute": "tsc --noEmit -p .",
|
|
"tsc": "run-s build-locales tsc:execute",
|
|
"storybook": "storybook dev -p 6006",
|
|
"storybook:build": "cross-env NODE_OPTIONS='--max_old_space_size=8192' storybook build",
|
|
"storybook:build-import-map": "node scripts/build-storybook-import-maps.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/lang-html": "^6.4.9",
|
|
"@codemirror/lang-javascript": "^6.2.2",
|
|
"@codemirror/lang-python": "^6.1.6",
|
|
"@codemirror/lang-xml": "^6.1.0",
|
|
"@codemirror/legacy-modes": "^6.4.0",
|
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
"@formatjs/intl-listformat": "^7.5.5",
|
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
|
"@goauthentik/api": "^2024.4.1-1714957644",
|
|
"@lit-labs/task": "^3.1.0",
|
|
"@lit/context": "^1.1.1",
|
|
"@lit/localize": "^0.12.1",
|
|
"@lit/reactive-element": "^2.0.4",
|
|
"@open-wc/lit-helpers": "^0.7.0",
|
|
"@patternfly/elements": "^3.0.1",
|
|
"@patternfly/patternfly": "^4.224.2",
|
|
"@sentry/browser": "^7.113.0",
|
|
"@webcomponents/webcomponentsjs": "^2.8.0",
|
|
"base64-js": "^1.5.1",
|
|
"chart.js": "^4.4.2",
|
|
"chartjs-adapter-moment": "^1.0.1",
|
|
"codemirror": "^6.0.1",
|
|
"construct-style-sheets-polyfill": "^3.1.0",
|
|
"core-js": "^3.37.0",
|
|
"country-flag-icons": "^1.5.11",
|
|
"fuse.js": "^7.0.0",
|
|
"guacamole-common-js": "^1.5.0",
|
|
"lit": "^3.1.3",
|
|
"md-front-matter": "^1.0.4",
|
|
"mermaid": "^10.9.0",
|
|
"rapidoc": "^9.3.4",
|
|
"showdown": "^2.1.0",
|
|
"style-mod": "^4.1.2",
|
|
"ts-pattern": "^5.1.1",
|
|
"webcomponent-qr-code": "^1.2.0",
|
|
"yaml": "^2.4.2"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.24.5",
|
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
"@babel/plugin-proposal-decorators": "^7.24.1",
|
|
"@babel/plugin-transform-private-methods": "^7.24.1",
|
|
"@babel/plugin-transform-private-property-in-object": "^7.24.5",
|
|
"@babel/plugin-transform-runtime": "^7.24.3",
|
|
"@babel/preset-env": "^7.24.5",
|
|
"@babel/preset-typescript": "^7.24.1",
|
|
"@hcaptcha/types": "^1.0.3",
|
|
"@jeysal/storybook-addon-css-user-preferences": "^0.2.0",
|
|
"@lit/localize-tools": "^0.7.2",
|
|
"@rollup/plugin-replace": "^5.0.5",
|
|
"@spotlightjs/spotlight": "^1.2.17",
|
|
"@storybook/addon-essentials": "^8.0.10",
|
|
"@storybook/addon-links": "^8.0.10",
|
|
"@storybook/api": "^7.6.17",
|
|
"@storybook/blocks": "^8.0.8",
|
|
"@storybook/manager-api": "^8.0.10",
|
|
"@storybook/web-components": "^8.0.10",
|
|
"@storybook/web-components-vite": "^8.0.10",
|
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
"@types/chart.js": "^2.9.41",
|
|
"@types/codemirror": "5.60.15",
|
|
"@types/grecaptcha": "^3.0.9",
|
|
"@types/guacamole-common-js": "1.5.2",
|
|
"@types/showdown": "^2.0.6",
|
|
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
"@typescript-eslint/parser": "^7.5.0",
|
|
"babel-plugin-macros": "^3.1.0",
|
|
"babel-plugin-tsconfig-paths": "^1.0.3",
|
|
"chokidar": "^3.6.0",
|
|
"cross-env": "^7.0.3",
|
|
"esbuild": "^0.20.2",
|
|
"eslint": "^8.57.0",
|
|
"eslint-config-google": "^0.14.0",
|
|
"eslint-plugin-custom-elements": "0.0.8",
|
|
"eslint-plugin-lit": "^1.11.0",
|
|
"eslint-plugin-sonarjs": "^0.25.1",
|
|
"eslint-plugin-storybook": "^0.8.0",
|
|
"github-slugger": "^2.0.0",
|
|
"glob": "^10.3.12",
|
|
"lit-analyzer": "^2.0.3",
|
|
"npm-run-all": "^4.1.5",
|
|
"prettier": "^3.2.5",
|
|
"pseudolocale": "^2.0.0",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.3.1",
|
|
"rollup-plugin-modify": "^3.0.0",
|
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
|
"storybook": "^8.0.10",
|
|
"storybook-addon-mock": "^5.0.0",
|
|
"ts-lit-plugin": "^2.0.2",
|
|
"tslib": "^2.6.2",
|
|
"turnstile-types": "^1.2.1",
|
|
"typescript": "^5.4.5",
|
|
"vite-tsconfig-paths": "^4.3.2"
|
|
},
|
|
"optionalDependencies": {
|
|
"@esbuild/darwin-arm64": "^0.20.1",
|
|
"@esbuild/linux-amd64": "^0.18.11",
|
|
"@esbuild/linux-arm64": "^0.20.1",
|
|
"@rollup/rollup-darwin-arm64": "4.17.2",
|
|
"@rollup/rollup-linux-arm64-gnu": "4.17.2",
|
|
"@rollup/rollup-linux-x64-gnu": "4.17.2"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
}
|