4.1.0-beta.12 changelog
Published
Entries marked Breaking change a working bot; the migration guide says what to do about them. Every release of the line is in the changelog.
Minor Changes
#411
abaf630Thanks @l7aromeo! -@MeoCord({ themeFor })takes a class implementing the newThemeResolverinterface, so a theme can be looked up with the app's services, such as a user's saved choice in a database a provider connects. Itsguild()anduser()methods are optional and typed as the functions are. The class is resolved from the app's container like the cooldown store: it isn't listed inproviders, its constructor injects the app's services and providers, and it runsOnReadyandOnShutdownin dependency order. Its results are cached, timed out and logged as the functions' are, andThemeCacheclears them. In tests,fromAppbinds it,overrideProviderreplaces it or what it injects, andoverrideThemeFortakes a class too. See Theming.
Patch Changes
#412
c934277Thanks @l7aromeo! - A class whose constructor injects but which has no decorator is refused as the app is created, naming the class and the decorator to add, rather than with inversify'sFound unexpected missing metadata on type …error, at startup or, for a guard, at its first call. The advice is the class's own:@Controller()for a listed controller;@Guard(),@Interceptor(),@Catch()or@Pipe()for a guard, interceptor, filter or pipe, global or on a handler;@Service(), or a provider in@MeoCord({ providers })for a class from a package, for any other. Injecting one of MeoCord's classes an app makes itself, such asLoggeror an error, is refused saying how to make it instead. A subclass whose constructor takes its decorated base's types, a parameter with a default value and a rest parameter are created as before.