6 Commits

Author SHA1 Message Date
tecc
7f45ea00df
feat(rewrite): Mailer (and mail utilities)!
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.
2024-04-17 04:57:08 +02:00
tecc
2c0746cb42
change(rewrite)!: Social lookup uniqueness and other small changes
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.
2024-04-17 04:57:07 +02:00
tecc
66168bcca3
feat(rewrite): Static data and key loading
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
2024-04-17 04:57:07 +02:00
tecc
990aabf6d8
feat(rewrite): Locale class toJSON + lastLoaded property, etc.
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`.
2024-04-17 04:57:07 +02:00
tecc
e3cbddf294
feat(locales): Fallback locales, translation keys
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.
2024-04-17 04:57:07 +02:00
tecc
d352a1c8d1
test(rewrite): Add tests to backend, update common test config 2024-04-17 04:57:06 +02:00