This is essentially a codedump because there are too many interweaved changes for me to keep track of or separate into smaller, more comprehensible commits.
So, enjoy! This maelstrom of code, torrent of implementations, and other minor changes.
authenticators: Authenticator utilities are now provided. Most of them are reimplementations of functions found in `src/user.js`.
util-emails: Clarified the intended use case and the function purpose duplication for `validateEmail`.
v1-ApiError: API errors now have an `id` field that may in the future be used for localising error messages. Some documentation was also added.
mailer: The mailer is here! The equivalent of `src/mailer.js` has been implemented as `src/util/mailer.ts`, but with a few major differences: it uses Handlebars for templating, and minifies the results.
mailer-tests: Some tests were implemented for the mailer. More need to be made, but that can be done later.
prisma-SocialLookup: `SocialLookup` is now supported through adding a unique index on every field.
Awaitable: `Awaitable<T>` is a small global type that just means "anything that can be awaited. It's a counterpart to the default `Awaited` type, for when you want something that will be treated as an async value.
test-tsconfig: The `global.d.ts` file is now included by `backend`'s test tsconfig file. The same has not been done to `common` as it isn't necessary at the moment.
static-data: Static data is now loaded. For now only the logos are loaded, but more may be added in the future. The logos are loaded in a similar fashion to how locale-specific logos are.
keys: Keys can now be loaded. They aren't
locale-lastLoaded: `lastLoaded` allows code that uses locales to cache certain values until the locale is reloaded. Useful for hot-reloading locales.
locale-toJSON: The `Locale` class now has a generic `toJSON` implementation should that be necessary, provided by the new `toJSONGeneric` utility.
locale-logo: Locale-specific logos are now stored twice: once as the actual loaded data, and again as a URL. The `locale.logo` property resolves to the URL versions, whereas `locale.logoSource` resolves to the source data.
refreshLocaleDescriptionCaches: `refreshLocaleDescriptionCaches` allows reloading all derived values from the actual loaded data separately from loading everything again. Mainly used in test code but useful nonetheless.
getActiveLocaleDescriptions: The `activeLocaleDescriptions` array is now computed alongside the other cache values in `refreshLocaleDescriptionCaches`.
fallback-locales: Locales can now specify fallbacks. For now these fallbacks are global and not individually configurable, but the code has been written so that adding individual fallbacks will be simple.
dep/dependency-graph: `dependency-graph` was added as a library to prevent locale loading issues where they would be loaded out of order. It might be overkill at the moment, and *definitely* slows down start times, but it's very future-proof.
regex-not-global: Global regexs are stateful, which is bad.
email-validation: Email validation has been added. It does not do this according to specification, but according to a subset of industry standards. Subject to change.
user-login: The init route now checks if the identifier is an email or a username.
#prisma: Instead of using `.prisma/client` and `@prisma/client` (which re-exports `.prisma/client`, the rewrite now just uses the generated code directly through `#prisma` (see package.json and tsconfig.json).
inclusive: The `/inclusive` endpoint has started to be written. Right now the code is untested as I don't have sample data, but I'll test it soon enough.