A reliable test for the extra code needed in analyzer, passing shellcheck
This commit is contained in:
18290
web/custom-elements.json
18290
web/custom-elements.json
File diff suppressed because it is too large
Load Diff
46913
web/package-lock.json
generated
46913
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
279
web/package.json
279
web/package.json
@ -1,141 +1,142 @@
|
|||||||
{
|
{
|
||||||
"name": "@goauthentik/web",
|
"name": "@goauthentik/web",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"extract-locales": "lit-localize extract",
|
"extract-locales": "lit-localize extract",
|
||||||
"build-locales": "node scripts/build-locales.mjs",
|
"build-locales": "node scripts/build-locales.mjs",
|
||||||
"build-locales:build": "lit-localize build",
|
"build-locales:build": "lit-localize build",
|
||||||
"build-locales:repair": "prettier --write ./src/locale-codes.ts",
|
"build-locales:repair": "prettier --write ./src/locale-codes.ts",
|
||||||
"esbuild:build": "node build.mjs",
|
"esbuild:build": "node build.mjs",
|
||||||
"esbuild:build-proxy": "node build.mjs --proxy",
|
"esbuild:build-proxy": "node build.mjs --proxy",
|
||||||
"esbuild:watch": "node build.mjs --watch",
|
"esbuild:watch": "node build.mjs --watch",
|
||||||
"build": "run-s build-locales esbuild:build",
|
"build": "run-s build-locales esbuild:build",
|
||||||
"build-proxy": "run-s build-locales esbuild:build-proxy",
|
"build-proxy": "run-s build-locales esbuild:build-proxy",
|
||||||
"watch": "run-s build-locales esbuild:watch",
|
"watch": "run-s build-locales esbuild:watch",
|
||||||
"lint": "cross-env NODE_OPTIONS='--max_old_space_size=65536' eslint . --max-warnings 0 --fix",
|
"lint": "cross-env NODE_OPTIONS='--max_old_space_size=65536' eslint . --max-warnings 0 --fix",
|
||||||
"lint:precommit": "bun scripts/eslint-precommit.mjs",
|
"lint:precommit": "bun scripts/eslint-precommit.mjs",
|
||||||
"lint:spelling": "node scripts/check-spelling.mjs",
|
"lint:spelling": "node scripts/check-spelling.mjs",
|
||||||
"lit-analyse": "lit-analyzer src",
|
"lit-analyse": "lit-analyzer src",
|
||||||
"precommit": "npm-run-all --parallel tsc lit-analyse lint:spelling --sequential lint:precommit prettier",
|
"postinstall": "bash scripts/patch-analyser.sh",
|
||||||
"prequick": "run-s tsc:execute lit-analyse lint:precommit lint:spelling",
|
"precommit": "npm-run-all --parallel tsc lit-analyse lint:spelling --sequential lint:precommit prettier",
|
||||||
"prettier-check": "prettier --check .",
|
"prequick": "run-s tsc:execute lit-analyse lint:precommit lint:spelling",
|
||||||
"prettier": "prettier --write .",
|
"prettier-check": "prettier --check .",
|
||||||
"pseudolocalize": "node scripts/pseudolocalize.mjs",
|
"prettier": "prettier --write .",
|
||||||
"tsc:execute": "tsc --noEmit -p .",
|
"pseudolocalize": "node scripts/pseudolocalize.mjs",
|
||||||
"tsc": "run-s build-locales tsc:execute",
|
"tsc:execute": "tsc --noEmit -p .",
|
||||||
"storybook": "storybook dev -p 6006",
|
"tsc": "run-s build-locales tsc:execute",
|
||||||
"storybook:build": "cross-env NODE_OPTIONS='--max_old_space_size=8192' storybook build",
|
"storybook": "storybook dev -p 6006",
|
||||||
"storybook:build-import-map": "node scripts/build-storybook-import-maps.mjs"
|
"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",
|
"dependencies": {
|
||||||
"@codemirror/lang-javascript": "^6.2.2",
|
"@codemirror/lang-html": "^6.4.9",
|
||||||
"@codemirror/lang-python": "^6.1.6",
|
"@codemirror/lang-javascript": "^6.2.2",
|
||||||
"@codemirror/lang-xml": "^6.1.0",
|
"@codemirror/lang-python": "^6.1.6",
|
||||||
"@codemirror/legacy-modes": "^6.4.0",
|
"@codemirror/lang-xml": "^6.1.0",
|
||||||
"@codemirror/theme-one-dark": "^6.1.2",
|
"@codemirror/legacy-modes": "^6.4.0",
|
||||||
"@formatjs/intl-listformat": "^7.5.7",
|
"@codemirror/theme-one-dark": "^6.1.2",
|
||||||
"@fortawesome/fontawesome-free": "^6.5.2",
|
"@formatjs/intl-listformat": "^7.5.7",
|
||||||
"@goauthentik/api": "^2024.4.2-1718378698",
|
"@fortawesome/fontawesome-free": "^6.5.2",
|
||||||
"@lit/context": "^1.1.2",
|
"@goauthentik/api": "^2024.4.2-1718378698",
|
||||||
"@lit/localize": "^0.12.1",
|
"@lit/context": "^1.1.2",
|
||||||
"@lit/reactive-element": "^2.0.4",
|
"@lit/localize": "^0.12.1",
|
||||||
"@lit/task": "^1.0.1",
|
"@lit/reactive-element": "^2.0.4",
|
||||||
"@open-wc/lit-helpers": "^0.7.0",
|
"@lit/task": "^1.0.1",
|
||||||
"@patternfly/elements": "^3.0.2",
|
"@open-wc/lit-helpers": "^0.7.0",
|
||||||
"@patternfly/patternfly": "^4.224.2",
|
"@patternfly/elements": "^3.0.2",
|
||||||
"@sentry/browser": "^8.9.2",
|
"@patternfly/patternfly": "^4.224.2",
|
||||||
"@webcomponents/webcomponentsjs": "^2.8.0",
|
"@sentry/browser": "^8.9.2",
|
||||||
"base64-js": "^1.5.1",
|
"@webcomponents/webcomponentsjs": "^2.8.0",
|
||||||
"chart.js": "^4.4.3",
|
"base64-js": "^1.5.1",
|
||||||
"chartjs-adapter-moment": "^1.0.1",
|
"chart.js": "^4.4.3",
|
||||||
"codemirror": "^6.0.1",
|
"chartjs-adapter-moment": "^1.0.1",
|
||||||
"construct-style-sheets-polyfill": "^3.1.0",
|
"codemirror": "^6.0.1",
|
||||||
"core-js": "^3.37.1",
|
"construct-style-sheets-polyfill": "^3.1.0",
|
||||||
"country-flag-icons": "^1.5.12",
|
"core-js": "^3.37.1",
|
||||||
"fuse.js": "^7.0.0",
|
"country-flag-icons": "^1.5.12",
|
||||||
"guacamole-common-js": "^1.5.0",
|
"fuse.js": "^7.0.0",
|
||||||
"lit": "^3.1.4",
|
"guacamole-common-js": "^1.5.0",
|
||||||
"md-front-matter": "^1.0.4",
|
"lit": "^3.1.4",
|
||||||
"mermaid": "^10.9.1",
|
"md-front-matter": "^1.0.4",
|
||||||
"rapidoc": "^9.3.4",
|
"mermaid": "^10.9.1",
|
||||||
"showdown": "^2.1.0",
|
"rapidoc": "^9.3.4",
|
||||||
"style-mod": "^4.1.2",
|
"showdown": "^2.1.0",
|
||||||
"ts-pattern": "^5.2.0",
|
"style-mod": "^4.1.2",
|
||||||
"webcomponent-qr-code": "^1.2.0",
|
"ts-pattern": "^5.2.0",
|
||||||
"yaml": "^2.4.5"
|
"webcomponent-qr-code": "^1.2.0",
|
||||||
},
|
"yaml": "^2.4.5"
|
||||||
"devDependencies": {
|
},
|
||||||
"@babel/core": "^7.24.7",
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
"@babel/core": "^7.24.7",
|
||||||
"@babel/plugin-proposal-decorators": "^7.24.7",
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||||
"@babel/plugin-transform-private-methods": "^7.24.7",
|
"@babel/plugin-proposal-decorators": "^7.24.7",
|
||||||
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
|
"@babel/plugin-transform-private-methods": "^7.24.7",
|
||||||
"@babel/plugin-transform-runtime": "^7.24.7",
|
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
|
||||||
"@babel/preset-env": "^7.24.7",
|
"@babel/plugin-transform-runtime": "^7.24.7",
|
||||||
"@babel/preset-typescript": "^7.24.7",
|
"@babel/preset-env": "^7.24.7",
|
||||||
"@changesets/cli": "^2.27.5",
|
"@babel/preset-typescript": "^7.24.7",
|
||||||
"@custom-elements-manifest/analyzer": "^0.10.2",
|
"@changesets/cli": "^2.27.5",
|
||||||
"@hcaptcha/types": "^1.0.3",
|
"@custom-elements-manifest/analyzer": "^0.10.2",
|
||||||
"@jeysal/storybook-addon-css-user-preferences": "^0.2.0",
|
"@hcaptcha/types": "^1.0.3",
|
||||||
"@lit/localize-tools": "^0.7.2",
|
"@jeysal/storybook-addon-css-user-preferences": "^0.2.0",
|
||||||
"@rollup/plugin-replace": "^5.0.7",
|
"@lit/localize-tools": "^0.7.2",
|
||||||
"@spotlightjs/spotlight": "^2.0.0",
|
"@rollup/plugin-replace": "^5.0.7",
|
||||||
"@storybook/addon-essentials": "^8.1.10",
|
"@spotlightjs/spotlight": "^2.0.0",
|
||||||
"@storybook/addon-links": "^8.1.10",
|
"@storybook/addon-essentials": "^8.1.10",
|
||||||
"@storybook/api": "^7.6.17",
|
"@storybook/addon-links": "^8.1.10",
|
||||||
"@storybook/blocks": "^8.0.8",
|
"@storybook/api": "^7.6.17",
|
||||||
"@storybook/manager-api": "^8.1.10",
|
"@storybook/blocks": "^8.0.8",
|
||||||
"@storybook/web-components": "^8.1.10",
|
"@storybook/manager-api": "^8.1.10",
|
||||||
"@storybook/web-components-vite": "^8.1.10",
|
"@storybook/web-components": "^8.1.10",
|
||||||
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
"@storybook/web-components-vite": "^8.1.10",
|
||||||
"@types/chart.js": "^2.9.41",
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
||||||
"@types/codemirror": "5.60.15",
|
"@types/chart.js": "^2.9.41",
|
||||||
"@types/grecaptcha": "^3.0.9",
|
"@types/codemirror": "5.60.15",
|
||||||
"@types/guacamole-common-js": "1.5.2",
|
"@types/grecaptcha": "^3.0.9",
|
||||||
"@types/showdown": "^2.0.6",
|
"@types/guacamole-common-js": "1.5.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
"@types/showdown": "^2.0.6",
|
||||||
"@typescript-eslint/parser": "^7.5.0",
|
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
||||||
"babel-plugin-macros": "^3.1.0",
|
"@typescript-eslint/parser": "^7.5.0",
|
||||||
"babel-plugin-tsconfig-paths": "^1.0.3",
|
"babel-plugin-macros": "^3.1.0",
|
||||||
"chokidar": "^3.6.0",
|
"babel-plugin-tsconfig-paths": "^1.0.3",
|
||||||
"cross-env": "^7.0.3",
|
"chokidar": "^3.6.0",
|
||||||
"esbuild": "^0.21.5",
|
"cross-env": "^7.0.3",
|
||||||
"eslint": "^8.57.0",
|
"esbuild": "^0.21.5",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-plugin-custom-elements": "0.0.8",
|
"eslint-config-google": "^0.14.0",
|
||||||
"eslint-plugin-lit": "^1.11.0",
|
"eslint-plugin-custom-elements": "0.0.8",
|
||||||
"eslint-plugin-sonarjs": "^0.25.1",
|
"eslint-plugin-lit": "^1.11.0",
|
||||||
"eslint-plugin-storybook": "^0.8.0",
|
"eslint-plugin-sonarjs": "^0.25.1",
|
||||||
"github-slugger": "^2.0.0",
|
"eslint-plugin-storybook": "^0.8.0",
|
||||||
"glob": "^10.4.1",
|
"github-slugger": "^2.0.0",
|
||||||
"lit-analyzer": "^2.0.3",
|
"glob": "^10.4.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"lit-analyzer": "^2.0.3",
|
||||||
"prettier": "^3.3.2",
|
"npm-run-all": "^4.1.5",
|
||||||
"pseudolocale": "^2.0.0",
|
"prettier": "^3.3.2",
|
||||||
"react": "^18.2.0",
|
"pseudolocale": "^2.0.0",
|
||||||
"react-dom": "^18.3.1",
|
"react": "^18.2.0",
|
||||||
"rollup-plugin-modify": "^3.0.0",
|
"react-dom": "^18.3.1",
|
||||||
"rollup-plugin-postcss-lit": "^2.1.0",
|
"rollup-plugin-modify": "^3.0.0",
|
||||||
"storybook": "^8.1.10",
|
"rollup-plugin-postcss-lit": "^2.1.0",
|
||||||
"storybook-addon-mock": "^5.0.0",
|
"storybook": "^8.1.10",
|
||||||
"ts-lit-plugin": "^2.0.2",
|
"storybook-addon-mock": "^5.0.0",
|
||||||
"tslib": "^2.6.3",
|
"ts-lit-plugin": "^2.0.2",
|
||||||
"turnstile-types": "^1.2.1",
|
"tslib": "^2.6.3",
|
||||||
"typescript": "^5.4.5",
|
"turnstile-types": "^1.2.1",
|
||||||
"vite-tsconfig-paths": "^4.3.2"
|
"typescript": "^5.4.5",
|
||||||
},
|
"vite-tsconfig-paths": "^4.3.2"
|
||||||
"optionalDependencies": {
|
},
|
||||||
"@esbuild/darwin-arm64": "^0.21.4",
|
"optionalDependencies": {
|
||||||
"@esbuild/linux-amd64": "^0.18.11",
|
"@esbuild/darwin-arm64": "^0.21.4",
|
||||||
"@esbuild/linux-arm64": "^0.21.4",
|
"@esbuild/linux-amd64": "^0.18.11",
|
||||||
"@rollup/rollup-darwin-arm64": "4.18.0",
|
"@esbuild/linux-arm64": "^0.21.4",
|
||||||
"@rollup/rollup-linux-arm64-gnu": "4.18.0",
|
"@rollup/rollup-darwin-arm64": "4.18.0",
|
||||||
"@rollup/rollup-linux-x64-gnu": "4.18.0"
|
"@rollup/rollup-linux-arm64-gnu": "4.18.0",
|
||||||
},
|
"@rollup/rollup-linux-x64-gnu": "4.18.0"
|
||||||
"engines": {
|
},
|
||||||
"node": ">=20"
|
"engines": {
|
||||||
}
|
"node": ">=20"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
web/scripts/patch-analyser.sh
Normal file
23
web/scripts/patch-analyser.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
TARGET="./node_modules/@custom-elements-manifest/analyzer/src/features/analyse-phase/creators/handlers.js"
|
||||||
|
|
||||||
|
# If the second question mark is not there in this test, put it there. The flags to grep ensure it
|
||||||
|
# will behave correctly on both MacOS and Linux by requiring it to use only the POSIX "basic"
|
||||||
|
# regular expression behavior.
|
||||||
|
#
|
||||||
|
|
||||||
|
if ! grep -GL 'node\.name?\.text?\.startsWith' "$TARGET" > /dev/null 2>&1; then
|
||||||
|
patch --forward -V none --no-backup-if-mismatch -p0 $TARGET <<EOF
|
||||||
|
--- a/packages/analyzer/src/features/analyse-phase/creators/handlers.js
|
||||||
|
+++ b/packages/analyzer/src/features/analyse-phase/creators/handlers.js
|
||||||
|
@@ -34,7 +34,7 @@ export function handleModifiers(doc, node) {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
- if (node.name?.text.startsWith('#')) {
|
||||||
|
+ if (node.name?.text?.startsWith('#')) {
|
||||||
|
doc.privacy = 'private';
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user