Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: move to wireit as the build runner language (goauthentik#10440)
* 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. * root: fix migrations missing using db_alias Signed-off-by: Marc 'risson' Schmitt <[email protected]> * more Signed-off-by: Marc 'risson' Schmitt <[email protected]> * web: add wireit as a dependency and move SFE into an independent package * web: make `sfe` a legitimite subpackage and use `wireit` to control the build - Move sfe to a `packages` subfolder: this is a more standard format for subpackages - `Move sfe/index.ts` to `sfe/src/index.ts`: this is a more standard layout for a package - Adjusted paths is `package.json` and `sfe/rollup.config.js` accordingly. - Add prettier and safety linting to `sfe`. - fix a naming issues in `build-locales`, highlighted by eslint - fix some minor linting issues is `build-locales` - add comments to `build-locales`, to make it clear what it does - updated the README and LICENSE files - start using `wireit` heavily as the task-runner definition language Primarily, to look professional and pave the way for future enhancements. Aside from the standardization and so forth, the primary goal here is to move our task runner to wireit. Wireit offers a number of intriguing abilities with respect to caching, building, and testing, such as an ability to `watch` our folders and files and automatically re-run the build when the relevant code changes, without having to rebuild the copied content or sub-packages such as `sfe`. The ability to pass in environment variables without needed `cross-env` makes code that required it much easier to read. Commands that take a long time can be prefixed with the environment variable `${NODE_RUNNER} `, which then would allow you to default to using `node`, but by setting `NODE_RUNNER` in your shell you could specify `bun` (or `deno`, maybe, but I haven't tested it with `deno`). `bun` runs the `eslint` pass in about three-quarters the time `node` takes. This commit exists primarily to ensure that the build runs as expected under CI, and the result is as expected under CI. Wireit was produced by Google and is used by Adobe Spectrum Components, Patternfly Components, Material Web, Red Hat Design, and the Lit-Element teams, so I'm confident that it's robust and reliable as a build runner. * Merge failed to account for this. * web: fix bad reference to lint command * Adding sfe to workspaces means its install is run automatically. * sfe build is now orchestrated by the web build process * web: slowly tracking down the old ways. * Trying to fix lit-analyze pass. * Still struggling with the build. * Monorepo, please. * Still trying to solve swc binding issue. * Reformat package.json so that scripts and wireit are closer to one another. * Use the right formatter for packagefiles. * Retarget dockerfile to have the right paths to sfe during build. * Comment to explain gitignore update. * Add lint correcting to package.json as well as package-lock * Restored lost package-lock.json * Updating the authentik version. * Trying to force version consistency. --------- Signed-off-by: Marc 'risson' Schmitt <[email protected]> Co-authored-by: Marc 'risson' Schmitt <[email protected]>
- Loading branch information