InversifyJS
InversifyJS copied to clipboard
A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
CC @acald-creator @PodaruDragos @Jameskmonger In the Inversify Discord server, moving the inversify projects to a monorepo was being discussed. I find that these sorts of things usually benefit from a...
Moved here from https://github.com/inversify/inversify-express-utils/issues/155 --------- i've got this endpoint: ```typescript @httpGet('/') async getTheThing(@response() res: Response) { try { const fileStream = await this.storage.getTheThing(); res.setHeader('content-type', 'application/tar'); fileStream.pipe(res); } catch (error) {...
request-scoped dependency is not working in a singleton class. ## Expected Behavior Writing a test case to validate the behavior of a singleton class with a request-scoped dependency involves simulating...
I tried upgrading from inversify 5 to 6, and now I see all the .rebind in my system do not work properly. The entity being rebinded, but when consumed thought...
I want to inject a promise, not the value the promise resolves to. ## Expected Behavior ```ts const keyN = Symbol(); const keyP = Symbol(); container.bind(keyN).toDynamicValue(() => 42).inSingletonScope(); container.bind(keyP).toDynamicValue(() =>...
Used to work in inversify 5 ``` import { Container } from "inversify"; const container = new Container(); const s = Symbol('foo'); container.bind(s).toConstantValue(null); console.log(container.get(s)); ``` Produces: ``` /project/node_modules/inversify/lib/utils/binding_utils.js:62 throw new...
This code works without errors using inversify 5.1 but fails in inversify 6 ``` import { Container } from "inversify"; const container = new Container(); const s = Symbol('foo'); container.bind(s).toConstantValue(undefined);...
I used rollup for packing and the package was over 50 KB long, There's no other logic in my code ## Expected Behavior The size of the packed inclusion can...
I get the "Converting circular structure to JSON" error in my project, and I know it happens in one of my "res.send"s. But it doesn't happen every time the API...
## Expected Behavior post construct should act consistently for both async and sync post constructor functions ## Current Behavior it reshapes the errors of the synchronous post constructor while leaving...