From bc91221c4c7511d9125de0414d9a71665b1ace91 Mon Sep 17 00:00:00 2001 From: Ken Sternberg Date: Fri, 5 Jan 2024 15:56:44 -0800 Subject: [PATCH] web: move the content of the application to a sub-folder and build it via lage **This commit** - Moves the content of the authentik web-ui to a subfolder, `packages/authentik` - Mirrors all of the commands from package.json in the root package, and mirrors them *again* in Lage, so that lage will run them all as-is. - Changes paths for things like sonarJS, Codespell, and such to find the correct sources of their content. - Update `glob` and `pseudolocale` versions; they were throwing exceptions. - Update Storybook-Vite's CSS import map function to be a little more readable. --- web/package-lock.json | 108 +++++----- web/package.json | 4 +- .../authentik/.storybook/css-import-maps.ts | 191 +++++++----------- web/packages/authentik/package.json | 1 + .../scripts/build-storybook-import-maps.ts | 20 +- .../authentik/xliff/pseudo-LOCALE.xlf | 46 +++++ 6 files changed, 196 insertions(+), 174 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index d923bdc89..f28fc3e10 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,6 +15,10 @@ "@manypkg/cli": "^0.21.1", "lage": "^2.7.9" }, + "devDependencies": { + "@types/glob": "^8.1.0", + "glob": "^10.3.10" + }, "engines": { "node": ">=20" }, @@ -4453,6 +4457,37 @@ } } }, + "node_modules/@rollup/plugin-commonjs/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@rollup/plugin-node-resolve": { "version": "15.2.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", @@ -5966,28 +6001,6 @@ "node": ">=14.14" } }, - "node_modules/@storybook/core-common/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dev": true, - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@storybook/core-common/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7765,12 +7778,12 @@ } }, "node_modules/@types/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w==", "dev": true, "dependencies": { - "@types/minimatch": "*", + "@types/minimatch": "^5.1.2", "@types/node": "*" } }, @@ -12505,19 +12518,22 @@ "dev": true }, "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=12" + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -12630,18 +12646,6 @@ "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -17731,6 +17735,16 @@ "node": ">=8.3" } }, + "node_modules/rollup-plugin-copy/node_modules/@types/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==", + "dev": true, + "dependencies": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, "node_modules/rollup-plugin-copy/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/web/package.json b/web/package.json index cdba39504..0343169bc 100644 --- a/web/package.json +++ b/web/package.json @@ -13,7 +13,7 @@ "rollup:watch": "lage rollup:watch", "build": "lage build", "build-proxy": "lage build-proxy", - "watch": "lage watch", + "watch": "lage watch --verbose", "lint": "lage lint", "lint:precommit": "lage lint:precommit", "lint:spelling": "lage lint:spelling", @@ -27,7 +27,7 @@ "pseudolocalize": "lage pseudolocalize", "tsc:execute": "lage tsc:execute", "tsc": "lage tsc", - "storybook": "lage storybook", + "storybook": "lage storybook --verbose", "storybook:build": "lage storybook:build", "storybook:build-import-map": "lage storybook:build-import-map", "storybook:build-import-map-script": "lage storybook:build-import-map-script", diff --git a/web/packages/authentik/.storybook/css-import-maps.ts b/web/packages/authentik/.storybook/css-import-maps.ts index 13b55284e..c26d48146 100644 --- a/web/packages/authentik/.storybook/css-import-maps.ts +++ b/web/packages/authentik/.storybook/css-import-maps.ts @@ -7,123 +7,74 @@ // Sometime around 2030 or so, the Javascript community may finally get its collective act together // and we'll have one unified way of doing this. I can only hope. -export const cssImportMaps = { - 'import AKGlobal from "@goauthentik/common/styles/authentik.css";': - 'import AKGlobal from "@goauthentik/common/styles/authentik.css?inline";', - 'import PFAlert from "@patternfly/patternfly/components/Alert/alert.css";': - 'import PFAlert from "@patternfly/patternfly/components/Alert/alert.css?inline";', - 'import PFAlertGroup from "@patternfly/patternfly/components/AlertGroup/alert-group.css";': - 'import PFAlertGroup from "@patternfly/patternfly/components/AlertGroup/alert-group.css?inline";', - 'import PFAvatar from "@patternfly/patternfly/components/Avatar/avatar.css";': - 'import PFAvatar from "@patternfly/patternfly/components/Avatar/avatar.css?inline";', - 'import PFBackdrop from "@patternfly/patternfly/components/Backdrop/backdrop.css";': - 'import PFBackdrop from "@patternfly/patternfly/components/Backdrop/backdrop.css?inline";', - 'import PFBackgroundImage from "@patternfly/patternfly/components/BackgroundImage/background-image.css";': - 'import PFBackgroundImage from "@patternfly/patternfly/components/BackgroundImage/background-image.css?inline";', - 'import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";': - 'import PFBanner from "@patternfly/patternfly/components/Banner/banner.css?inline";', - 'import PFBase from "@patternfly/patternfly/patternfly-base.css";': - 'import PFBase from "@patternfly/patternfly/patternfly-base.css?inline";', - 'import PFBrand from "@patternfly/patternfly/components/Brand/brand.css";': - 'import PFBrand from "@patternfly/patternfly/components/Brand/brand.css?inline";', - 'import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";': - 'import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css?inline";', - 'import PFButton from "@patternfly/patternfly/components/Button/button.css";': - 'import PFButton from "@patternfly/patternfly/components/Button/button.css?inline";', - 'import PFCard from "@patternfly/patternfly/components/Card/card.css";': - 'import PFCard from "@patternfly/patternfly/components/Card/card.css?inline";', - 'import PFCheck from "@patternfly/patternfly/components/Check/check.css";': - 'import PFCheck from "@patternfly/patternfly/components/Check/check.css?inline";', - 'import PFChip from "@patternfly/patternfly/components/Chip/chip.css";': - 'import PFChip from "@patternfly/patternfly/components/Chip/chip.css?inline";', - 'import PFChipGroup from "@patternfly/patternfly/components/ChipGroup/chip-group.css";': - 'import PFChipGroup from "@patternfly/patternfly/components/ChipGroup/chip-group.css?inline";', - 'import PFContent from "@patternfly/patternfly/components/Content/content.css";': - 'import PFContent from "@patternfly/patternfly/components/Content/content.css?inline";', - 'import PFDataList from "@patternfly/patternfly/components/DataList/data-list.css";': - 'import PFDataList from "@patternfly/patternfly/components/DataList/data-list.css?inline";', - 'import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";': - 'import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css?inline";', - 'import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css";': - 'import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css?inline";', - 'import PFDrawer from "@patternfly/patternfly/components/Drawer/drawer.css";': - 'import PFDrawer from "@patternfly/patternfly/components/Drawer/drawer.css?inline";', - 'import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css";': - 'import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css?inline";', - 'import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css";': - 'import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css?inline";', - 'import PFExpandableSection from "@patternfly/patternfly/components/ExpandableSection/expandable-section.css";': - 'import PFExpandableSection from "@patternfly/patternfly/components/ExpandableSection/expandable-section.css?inline";', - 'import PFFAIcons from "@patternfly/patternfly/base/patternfly-fa-icons.css";': - 'import PFFAIcons from "@patternfly/patternfly/base/patternfly-fa-icons.css?inline";', - 'import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css";': - 'import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css?inline";', - 'import PFForm from "@patternfly/patternfly/components/Form/form.css";': - 'import PFForm from "@patternfly/patternfly/components/Form/form.css?inline";', - 'import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";': - 'import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css?inline";', - 'import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css";': - 'import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css?inline";', - 'import PFGlobal from "@patternfly/patternfly/patternfly-base.css";': - 'import PFGlobal from "@patternfly/patternfly/patternfly-base.css?inline";', - 'import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";': - 'import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css?inline";', - 'import PFHint from "@patternfly/patternfly/components/Hint/hint.css";': - 'import PFHint from "@patternfly/patternfly/components/Hint/hint.css?inline";', - 'import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";': - 'import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css?inline";', - 'import PFLabel from "@patternfly/patternfly/components/Label/label.css";': - 'import PFLabel from "@patternfly/patternfly/components/Label/label.css?inline";', - 'import PFList from "@patternfly/patternfly/components/List/list.css";': - 'import PFList from "@patternfly/patternfly/components/List/list.css?inline";', - 'import PFLogin from "@patternfly/patternfly/components/Login/login.css";': - 'import PFLogin from "@patternfly/patternfly/components/Login/login.css?inline";', - 'import PFModalBox from "@patternfly/patternfly/components/ModalBox/modal-box.css";': - 'import PFModalBox from "@patternfly/patternfly/components/ModalBox/modal-box.css?inline";', - 'import PFNav from "@patternfly/patternfly/components/Nav/nav.css";': - 'import PFNav from "@patternfly/patternfly/components/Nav/nav.css?inline";', - 'import PFNotificationBadge from "@patternfly/patternfly/components/NotificationBadge/notification-badge.css";': - 'import PFNotificationBadge from "@patternfly/patternfly/components/NotificationBadge/notification-badge.css?inline";', - 'import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";': - 'import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css?inline";', - 'import PFPage from "@patternfly/patternfly/components/Page/page.css";': - 'import PFPage from "@patternfly/patternfly/components/Page/page.css?inline";', - 'import PFPagination from "@patternfly/patternfly/components/Pagination/pagination.css";': - 'import PFPagination from "@patternfly/patternfly/components/Pagination/pagination.css?inline";', - 'import PFProgressStepper from "@patternfly/patternfly/components/ProgressStepper/progress-stepper.css";': - 'import PFProgressStepper from "@patternfly/patternfly/components/ProgressStepper/progress-stepper.css?inline";', - 'import PFRadio from "@patternfly/patternfly/components/Radio/radio.css";': - 'import PFRadio from "@patternfly/patternfly/components/Radio/radio.css?inline";', - 'import PFSelect from "@patternfly/patternfly/components/Select/select.css";': - 'import PFSelect from "@patternfly/patternfly/components/Select/select.css?inline";', - 'import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css";': - 'import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css?inline";', - 'import PFSizing from "@patternfly/patternfly/utilities/Sizing/sizing.css";': - 'import PFSizing from "@patternfly/patternfly/utilities/Sizing/sizing.css?inline";', - 'import PFSpacing from "@patternfly/patternfly/utilities/Spacing/spacing.css";': - 'import PFSpacing from "@patternfly/patternfly/utilities/Spacing/spacing.css?inline";', - 'import PFSpinner from "@patternfly/patternfly/components/Spinner/spinner.css";': - 'import PFSpinner from "@patternfly/patternfly/components/Spinner/spinner.css?inline";', - 'import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css";': - 'import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css?inline";', - 'import PFSwitch from "@patternfly/patternfly/components/Switch/switch.css";': - 'import PFSwitch from "@patternfly/patternfly/components/Switch/switch.css?inline";', - 'import PFTable from "@patternfly/patternfly/components/Table/table.css";': - 'import PFTable from "@patternfly/patternfly/components/Table/table.css?inline";', - 'import PFTabs from "@patternfly/patternfly/components/Tabs/tabs.css";': - 'import PFTabs from "@patternfly/patternfly/components/Tabs/tabs.css?inline";', - 'import PFTitle from "@patternfly/patternfly/components/Title/title.css";': - 'import PFTitle from "@patternfly/patternfly/components/Title/title.css?inline";', - 'import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css";': - 'import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css?inline";', - 'import PFToolbar from "@patternfly/patternfly/components/Toolbar/toolbar.css";': - 'import PFToolbar from "@patternfly/patternfly/components/Toolbar/toolbar.css?inline";', - 'import PFTreeView from "@patternfly/patternfly/components/TreeView/tree-view.css";': - 'import PFTreeView from "@patternfly/patternfly/components/TreeView/tree-view.css?inline";', - 'import PFWizard from "@patternfly/patternfly/components/Wizard/wizard.css";': - 'import PFWizard from "@patternfly/patternfly/components/Wizard/wizard.css?inline";', - 'import ThemeDark from "@goauthentik/common/styles/theme-dark.css";': - 'import ThemeDark from "@goauthentik/common/styles/theme-dark.css?inline";', - 'import styles from "./LibraryPageImpl.css";': - 'import styles from "./LibraryPageImpl.css?inline";', -}; +const cssImportMapsBase = [ + 'import AKGlobal from "@goauthentik/common/styles/authentik.css";', + 'import PFAlert from "@patternfly/patternfly/components/Alert/alert.css";', + 'import PFAlertGroup from "@patternfly/patternfly/components/AlertGroup/alert-group.css";', + 'import PFAvatar from "@patternfly/patternfly/components/Avatar/avatar.css";', + 'import PFBackdrop from "@patternfly/patternfly/components/Backdrop/backdrop.css";', + 'import PFBackgroundImage from "@patternfly/patternfly/components/BackgroundImage/background-image.css";', + 'import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";', + 'import PFBase from "@patternfly/patternfly/patternfly-base.css";', + 'import PFBrand from "@patternfly/patternfly/components/Brand/brand.css";', + 'import PFBullseye from "@patternfly/patternfly/layouts/Bullseye/bullseye.css";', + 'import PFButton from "@patternfly/patternfly/components/Button/button.css";', + 'import PFCard from "@patternfly/patternfly/components/Card/card.css";', + 'import PFCheck from "@patternfly/patternfly/components/Check/check.css";', + 'import PFChip from "@patternfly/patternfly/components/Chip/chip.css";', + 'import PFChipGroup from "@patternfly/patternfly/components/ChipGroup/chip-group.css";', + 'import PFContent from "@patternfly/patternfly/components/Content/content.css";', + 'import PFDataList from "@patternfly/patternfly/components/DataList/data-list.css";', + 'import PFDescriptionList from "@patternfly/patternfly/components/DescriptionList/description-list.css";', + 'import PFDisplay from "@patternfly/patternfly/utilities/Display/display.css";', + 'import PFDrawer from "@patternfly/patternfly/components/Drawer/drawer.css";', + 'import PFDropdown from "@patternfly/patternfly/components/Dropdown/dropdown.css";', + 'import PFEmptyState from "@patternfly/patternfly/components/EmptyState/empty-state.css";', + 'import PFExpandableSection from "@patternfly/patternfly/components/ExpandableSection/expandable-section.css";', + 'import PFFAIcons from "@patternfly/patternfly/base/patternfly-fa-icons.css";', + 'import PFFlex from "@patternfly/patternfly/layouts/Flex/flex.css";', + 'import PFForm from "@patternfly/patternfly/components/Form/form.css";', + 'import PFFormControl from "@patternfly/patternfly/components/FormControl/form-control.css";', + 'import PFGallery from "@patternfly/patternfly/layouts/Gallery/gallery.css";', + 'import PFGlobal from "@patternfly/patternfly/patternfly-base.css";', + 'import PFGrid from "@patternfly/patternfly/layouts/Grid/grid.css";', + 'import PFHint from "@patternfly/patternfly/components/Hint/hint.css";', + 'import PFInputGroup from "@patternfly/patternfly/components/InputGroup/input-group.css";', + 'import PFLabel from "@patternfly/patternfly/components/Label/label.css";', + 'import PFList from "@patternfly/patternfly/components/List/list.css";', + 'import PFLogin from "@patternfly/patternfly/components/Login/login.css";', + 'import PFModalBox from "@patternfly/patternfly/components/ModalBox/modal-box.css";', + 'import PFNav from "@patternfly/patternfly/components/Nav/nav.css";', + 'import PFNotificationBadge from "@patternfly/patternfly/components/NotificationBadge/notification-badge.css";', + 'import PFNotificationDrawer from "@patternfly/patternfly/components/NotificationDrawer/notification-drawer.css";', + 'import PFPage from "@patternfly/patternfly/components/Page/page.css";', + 'import PFPagination from "@patternfly/patternfly/components/Pagination/pagination.css";', + 'import PFProgressStepper from "@patternfly/patternfly/components/ProgressStepper/progress-stepper.css";', + 'import PFRadio from "@patternfly/patternfly/components/Radio/radio.css";', + 'import PFSelect from "@patternfly/patternfly/components/Select/select.css";', + 'import PFSidebar from "@patternfly/patternfly/components/Sidebar/sidebar.css";', + 'import PFSizing from "@patternfly/patternfly/utilities/Sizing/sizing.css";', + 'import PFSpacing from "@patternfly/patternfly/utilities/Spacing/spacing.css";', + 'import PFSpinner from "@patternfly/patternfly/components/Spinner/spinner.css";', + 'import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css";', + 'import PFSwitch from "@patternfly/patternfly/components/Switch/switch.css";', + 'import PFTable from "@patternfly/patternfly/components/Table/table.css";', + 'import PFTabs from "@patternfly/patternfly/components/Tabs/tabs.css";', + 'import PFTitle from "@patternfly/patternfly/components/Title/title.css";', + 'import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css";', + 'import PFToolbar from "@patternfly/patternfly/components/Toolbar/toolbar.css";', + 'import PFTreeView from "@patternfly/patternfly/components/TreeView/tree-view.css";', + 'import PFWizard from "@patternfly/patternfly/components/Wizard/wizard.css";', + 'import ThemeDark from "@goauthentik/common/styles/theme-dark.css";', + 'import styles from "./LibraryPageImpl.css";', +]; + +type ImportMapType = Record; + +export const cssImportMaps = cssImportMapsBase.reduce( + (acc: ImportMapType, importLine: string) => ({ + ...acc, + [importLine]: importLine.replace(/.css/, ".css?inline"), + }), + {}, +); diff --git a/web/packages/authentik/package.json b/web/packages/authentik/package.json index e37a6dc68..c9c00461e 100644 --- a/web/packages/authentik/package.json +++ b/web/packages/authentik/package.json @@ -110,6 +110,7 @@ "eslint-plugin-lit": "^1.11.0", "eslint-plugin-sonarjs": "^0.23.0", "eslint-plugin-storybook": "^0.6.15", + "glob": "^10.3.10", "lit-analyzer": "^2.0.2", "npm-run-all": "^4.1.5", "prettier": "^3.1.1", diff --git a/web/packages/authentik/scripts/build-storybook-import-maps.ts b/web/packages/authentik/scripts/build-storybook-import-maps.ts index 121ad105f..abf204a01 100644 --- a/web/packages/authentik/scripts/build-storybook-import-maps.ts +++ b/web/packages/authentik/scripts/build-storybook-import-maps.ts @@ -30,7 +30,7 @@ function extractImportLinesFromFile(path: string) { return lines.filter((l) => import_re.test(l)); } -function createOneImportLine(line: string) { +function extractOneImportLine(line: string) { const importMatch = import_re.exec(line); if (!importMatch) { throw new Error("How did an unmatchable line get here?"); @@ -39,7 +39,7 @@ function createOneImportLine(line: string) { if (!importContent) { throw new Error("How did an unmatchable line get here!?"); } - return `'${importContent}";': '${importContent}?inline";',`; + return ` '${importContent}";',`; } const isSourceFile = /\.ts$/; @@ -73,9 +73,19 @@ const outputFile = ` // Sometime around 2030 or so, the Javascript community may finally get its collective act together // and we'll have one unified way of doing this. I can only hope. -export const cssImportMaps = { -${importLines.map(createOneImportLine).join("\n")} -}; +const cssImportMapsBase = [ +${importLines.map(extractOneImportLine).join("\n")} +]; + +type ImportMapType = Record; + +export const cssImportMaps = cssImportMapsBase.reduce( + (acc: ImportMapType, importLine: string) => ({ + ...acc, + [importLine]: importLine.replace(/.css/, ".css?inline"), + }), + {} +); `; fs.writeFileSync(path.join(__dirname, "..", ".storybook", "css-import-maps.ts"), outputFile, { diff --git a/web/packages/authentik/xliff/pseudo-LOCALE.xlf b/web/packages/authentik/xliff/pseudo-LOCALE.xlf index 7fd1fd51f..37a7ef1ae 100644 --- a/web/packages/authentik/xliff/pseudo-LOCALE.xlf +++ b/web/packages/authentik/xliff/pseudo-LOCALE.xlf @@ -7975,140 +7975,186 @@ Bindings to groups/users are checked against the user of the event. Event volume + Ēvēńţ vōĺũmē Require Outpost (flow can only be executed from an outpost). + Ŕēǫũĩŕē Ōũţƥōśţ (ƒĺōŵ ćàń ōńĺŷ ƀē ēxēćũţēď ƒŕōm àń ōũţƥōśţ). Connection settings. + Ćōńńēćţĩōń śēţţĩńĝś. Successfully updated endpoint. + Śũććēśśƒũĺĺŷ ũƥďàţēď ēńďƥōĩńţ. Successfully created endpoint. + Śũććēśśƒũĺĺŷ ćŕēàţēď ēńďƥōĩńţ. Protocol + Ƥŕōţōćōĺ RDP + ŔĎƤ SSH + ŚŚĤ VNC + VŃĆ Host + Ĥōśţ Hostname/IP to connect to. + Ĥōśţńàmē/ĨƤ ţō ćōńńēćţ ţō. Endpoint(s) + Ēńďƥōĩńţ(ś) Update Endpoint + Ũƥďàţē Ēńďƥōĩńţ These bindings control which users will have access to this endpoint. Users must also have access to the application. + Ţĥēśē ƀĩńďĩńĝś ćōńţŕōĺ ŵĥĩćĥ ũśēŕś ŵĩĺĺ ĥàvē àććēśś ţō ţĥĩś ēńďƥōĩńţ. Ũśēŕś mũśţ àĺśō ĥàvē àććēśś ţō ţĥē àƥƥĺĩćàţĩōń. Create Endpoint + Ćŕēàţē Ēńďƥōĩńţ RAC is in preview. + ŔÀĆ ĩś ĩń ƥŕēvĩēŵ. Update RAC Provider + Ũƥďàţē ŔÀĆ Ƥŕōvĩďēŕ Endpoints + Ēńďƥōĩńţś General settings + Ĝēńēŕàĺ śēţţĩńĝś RDP settings + ŔĎƤ śēţţĩńĝś Ignore server certificate + Ĩĝńōŕē śēŕvēŕ ćēŕţĩƒĩćàţē Enable wallpaper + Ēńàƀĺē ŵàĺĺƥàƥēŕ Enable font-smoothing + Ēńàƀĺē ƒōńţ-śmōōţĥĩńĝ Enable full window dragging + Ēńàƀĺē ƒũĺĺ ŵĩńďōŵ ďŕàĝĝĩńĝ Network binding + Ńēţŵōŕķ ƀĩńďĩńĝ No binding + Ńō ƀĩńďĩńĝ Bind ASN + ßĩńď ÀŚŃ Bind ASN and Network + ßĩńď ÀŚŃ àńď Ńēţŵōŕķ Bind ASN, Network and IP + ßĩńď ÀŚŃ, Ńēţŵōŕķ àńď ĨƤ Configure if sessions created by this stage should be bound to the Networks they were created in. + Ćōńƒĩĝũŕē ĩƒ śēśśĩōńś ćŕēàţēď ƀŷ ţĥĩś śţàĝē śĥōũĺď ƀē ƀōũńď ţō ţĥē Ńēţŵōŕķś ţĥēŷ ŵēŕē ćŕēàţēď ĩń. GeoIP binding + ĜēōĨƤ ƀĩńďĩńĝ Bind Continent + ßĩńď Ćōńţĩńēńţ Bind Continent and Country + ßĩńď Ćōńţĩńēńţ àńď Ćōũńţŕŷ Bind Continent, Country and City + ßĩńď Ćōńţĩńēńţ, Ćōũńţŕŷ àńď Ćĩţŷ Configure if sessions created by this stage should be bound to their GeoIP-based location + Ćōńƒĩĝũŕē ĩƒ śēśśĩōńś ćŕēàţēď ƀŷ ţĥĩś śţàĝē śĥōũĺď ƀē ƀōũńď ţō ţĥēĩŕ ĜēōĨƤ-ƀàśēď ĺōćàţĩōń RAC + ŔÀĆ Connection failed after attempts. + Ćōńńēćţĩōń ƒàĩĺēď àƒţēŕ àţţēmƥţś. Re-connecting in second(s). + Ŕē-ćōńńēćţĩńĝ ĩń śēćōńď(ś). Connecting... + Ćōńńēćţĩńĝ... Select endpoint to connect to + Śēĺēćţ ēńďƥōĩńţ ţō ćōńńēćţ ţō Connection expiry + Ćōńńēćţĩōń ēxƥĩŕŷ Determines how long a session lasts before being disconnected and requiring re-authorization. + Ďēţēŕmĩńēś ĥōŵ ĺōńĝ à śēśśĩōń ĺàśţś ƀēƒōŕē ƀēĩńĝ ďĩśćōńńēćţēď àńď ŕēǫũĩŕĩńĝ ŕē-àũţĥōŕĩźàţĩōń. Provider require enterprise. + Ƥŕōvĩďēŕ ŕēǫũĩŕē ēńţēŕƥŕĩśē. Learn more + Ĺēàŕń mōŕē Maximum concurrent connections + Màxĩmũm ćōńćũŕŕēńţ ćōńńēćţĩōńś Maximum concurrent allowed connections to this endpoint. Can be set to -1 to disable the limit. + Màxĩmũm ćōńćũŕŕēńţ àĺĺōŵēď ćōńńēćţĩōńś ţō ţĥĩś ēńďƥōĩńţ. Ćàń ƀē śēţ ţō -1 ţō ďĩśàƀĺē ţĥē ĺĩmĩţ.