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.
.gitignore: It's just a nuisance to developer experience when you include `.idea`. A non-insignificant amount of time I spend fiddling with git is only to remove .idea files.
.idea: .idea will be left alone since I don't want to screw over someone's configurations. I just won't be committing those changes.
nuxt.config.ts: `__dirname` would not be calculated correctly for Windows, but now it should. I feel like I've fixed this exact issue before in this exact situation before but :|.
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.
- calls pnpm in case no bin file is found (e.g. for run-file)
- uses exec to replace shell, so that no additional child process is created
- cds into the repository in case relative files are referenced