nestjs-cls icon indicating copy to clipboard operation
nestjs-cls copied to clipboard

A continuation-local storage (async context) module compatible with NestJS's dependency injection.

Results 29 nestjs-cls issues
Sort by recently updated
recently updated
newest added

(relates to #18) Consider adding a `@UseCls()` method decorator to set up the context for a method automagically, when it is run outside of a request context. ```ts // This...

enhancement

If the project grows, we'll need contributing guidelines -> create a `CONTRIBUTING.md` file with steps.

maintenance

[Namespaces](https://github.com/Papooch/nestjs-cls#namespaces-experimental) are a remnant from the early implementation based on `cls-hooked`, but I've never found an useful application for them, therefore I've decided to remove them to clean up the...

This is still just an idea, but I think it's very much possible to use a [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) in combination of CLS to create a truly request-scoped providers in the Nest...

enhancement

I suggest adding additional sections to the README or FAQ: ### Performance concerns with AsyncLocalStorage? This question sometimes arises because of early concerns with async_hooks performance. See for example: https://github.com/iamolegga/nestjs-pino/issues/322...

documentation

Add github actions for automated testing and deployment to npm.

ci/cd

This PR adds the ability to specify default options for the `@Transactional` decorator, so that they don't need to be specified repeatedly.

I'd stayed away from using AsyncLocalStorage due to performance concerns for a while, but since Otel uses it anyway, using it for CLS shouldn't add any additional overhead. So... I...

stale

It might be possible to emulate the behavior of [Durable Providers](https://docs.nestjs.com/fundamentals/injection-scopes#durable-providers) with CLS as well, where we could retrieve the same context instance in multiple subsequent requests. A proper solution...

enhancement

Fixes #149 by using a Proxy object to avoid overiding descriptor.value inside the decorator.