web: all the basic commands are working: build, build types, lint source, lint lockfile, lint packagefile, lint types, lint spelling, format source, format package.
This commit is contained in:
@ -1,94 +1,93 @@
|
||||
# @goauthentik/common
|
||||
|
||||
The `common` package is a bit of a grab-bag of tools, utilities, and configuration details used
|
||||
throughout the Authentik front-end suite. Here, we'll try (emphasis on the *try*) to document what
|
||||
throughout the Authentik front-end suite. Here, we'll try (emphasis on the _try_) to document what
|
||||
each part does.
|
||||
|
||||
- `./api`
|
||||
- `./api`
|
||||
|
||||
The `./api` folder contains helpers and plug-ins for communicating with the Authentik API. Its
|
||||
The `./api` folder contains helpers and plug-ins for communicating with the Authentik API. Its
|
||||
primary purpose is to provide the default configuration details for establishing a channel to the
|
||||
API, as well as figuring out the default locale, branding information, and even the favicon. (See
|
||||
what I said about it being a grab-bag?) It has its own list of todos.
|
||||
API, as well as figuring out the default locale, branding information, and even the favicon. (See
|
||||
what I said about it being a grab-bag?) It has its own list of todos.
|
||||
|
||||
- `/helpers/plex`
|
||||
- `/helpers/plex`
|
||||
|
||||
Contains configuration tools and access for the Plex TV client. Used by all three primary
|
||||
interfaces, but again, not exactly a foundational tool.
|
||||
interfaces, but again, not exactly a foundational tool.
|
||||
|
||||
- `/helpers/webauthn`
|
||||
- `/helpers/webauthn`
|
||||
|
||||
Used entirely by the WebAuthn tools in the Flow interface.
|
||||
|
||||
- `/styles`:
|
||||
- `/styles`:
|
||||
|
||||
authentik's overrides for patternfly and dark mode.
|
||||
|
||||
TODO: Move this into its own package.
|
||||
|
||||
- `/ui`:
|
||||
- `/ui`:
|
||||
|
||||
Describes the schema of the UIConfig Attributes Object, which dictates certain details about UI
|
||||
behavior, such as the preliminary state of drawers, editors, and layouts. It also has an API call
|
||||
behavior, such as the preliminary state of drawers, editors, and layouts. It also has an API call
|
||||
to fetch that UIConfig object from the server.
|
||||
|
||||
- `/constants.ts`
|
||||
- `/constants.ts`
|
||||
|
||||
Another grab-bag of configuration details: event names, default classnames for setting some visual
|
||||
details, web socket message type tokens, and the localstorage key.
|
||||
|
||||
- `/enums.ts`
|
||||
- `/enums.ts`
|
||||
|
||||
Contains one thing: a mapping of generic UI sizing terms to specific classnames in the CSS.
|
||||
|
||||
- `./errors.ts`
|
||||
- `./errors.ts`
|
||||
|
||||
An error handling toolkit related to the `./api` above.
|
||||
|
||||
- `./events.ts`
|
||||
- `./events.ts`
|
||||
|
||||
An extension of the API's "Event" types to assist in reporting server-side events to the user. Has
|
||||
nothing to do with the browser's internal Event type. Used entirely within `./admin`, may be
|
||||
An extension of the API's "Event" types to assist in reporting server-side events to the user. Has
|
||||
nothing to do with the browser's internal Event type. Used entirely within `./admin`, may be
|
||||
suitable to being moved there.
|
||||
|
||||
- `./global.ts`
|
||||
- `./global.ts`
|
||||
|
||||
A single function that retrieves any global information for the UI from the `index.html` file in
|
||||
which it was invoked. Used by our Django application to preload configuration information.
|
||||
which it was invoked. Used by our Django application to preload configuration information.
|
||||
|
||||
- `./labels.ts`,
|
||||
- `./labels.ts`,
|
||||
|
||||
Maps a variety of API tokens to human-readable labels, including those for:
|
||||
- Events
|
||||
- Severities
|
||||
- User Types
|
||||
- Stage Intent
|
||||
|
||||
|
||||
- Events
|
||||
- Severities
|
||||
- User Types
|
||||
- Stage Intent
|
||||
|
||||
It might make more sense to move these closer to where they're used, if their use is local to a
|
||||
single interface or component.
|
||||
|
||||
- `./messages.ts`
|
||||
- `./messages.ts`
|
||||
|
||||
Contains one thing: a mapping of generic UI alert-level terms to specific classnames in the CSS.
|
||||
|
||||
- `./sentry.ts`
|
||||
- `./sentry.ts`
|
||||
|
||||
Sentry is an application monitoring package for finding code breakage. The Sentry configuration for
|
||||
all of our interfaces is kept here.
|
||||
|
||||
- `./users.ts`
|
||||
- `./users.ts`
|
||||
|
||||
Despite the plural name, this is entirely about getting the current user's configuration from the
|
||||
server. Used by all three major interfaces. Could probably be replaced by a context. (Possibly
|
||||
server. Used by all three major interfaces. Could probably be replaced by a context. (Possibly
|
||||
already has been.)
|
||||
|
||||
- `./utils.ts`
|
||||
- `./utils.ts`
|
||||
|
||||
The classic junk drawer of UI development. A few string functions, a few utilities from
|
||||
YouMightNotNeedLodash, a slugifier, some date handling utilities, that sort of thing.
|
||||
|
||||
- `./ws.ts`
|
||||
- `./ws.ts`
|
||||
|
||||
Sets up our web socket for receiving server-side events. Used by all three major interfaces.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user