-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/transaction-propagation
- Loading branch information
Showing
25 changed files
with
451 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
export * from './lib/cls-service-manager'; | ||
export * from './lib/cls.constants'; | ||
export * from './lib/cls-initializers/cls.middleware'; | ||
export * from './lib/cls-initializers/cls.interceptor'; | ||
export * from './lib/cls-initializers/cls.guard'; | ||
export * from './lib/cls-initializers/cls.interceptor'; | ||
export * from './lib/cls-initializers/cls.middleware'; | ||
export * from './lib/cls-initializers/use-cls.decorator'; | ||
export * from './lib/cls-initializers/utils/context-cls-store-map'; | ||
export * from './lib/cls-service-manager'; | ||
export * from './lib/cls.constants'; | ||
export * from './lib/cls.module'; | ||
export * from './lib/cls.service'; | ||
export * from './lib/cls.decorators'; | ||
export * from './lib/cls.options'; | ||
export * from './lib/cls.service'; | ||
export * from './lib/inject-cls.decorator'; | ||
export * from './lib/plugin/cls-plugin.interface'; | ||
export * from './utils/copy-method-metadata'; | ||
export * from './lib/proxy-provider/injectable-proxy.decorator'; | ||
export * from './lib/proxy-provider/proxy-provider.exceptions'; | ||
export * from './lib/proxy-provider/proxy-provider.interfaces'; | ||
export { Terminal } from './types/terminal.type'; | ||
export * from './utils/copy-method-metadata'; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Inject } from '@nestjs/common'; | ||
import { ClsService } from './cls.service'; | ||
|
||
/** | ||
* Use to explicitly inject the ClsService | ||
*/ | ||
export function InjectCls() { | ||
return Inject(ClsService); | ||
} |
23 changes: 23 additions & 0 deletions
23
packages/core/src/lib/proxy-provider/injectable-proxy.decorator.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Injectable, SetMetadata } from '@nestjs/common'; | ||
import { CLS_PROXY_METADATA_KEY } from './proxy-provider.constants'; | ||
|
||
export type InjectableProxyMetadata = { | ||
/** | ||
* If true, accessing any property on this provider while it is unresolved will throw an exception. | ||
* | ||
* Otherwise, the application behaves as if accessing a property on an empty object. | ||
* | ||
* Default: false | ||
* | ||
* Note - setting this option again in the forRootAsync method will override the value set in the decorator. | ||
*/ | ||
strict?: boolean; | ||
}; | ||
|
||
/** | ||
* Mark a Proxy provider with this decorator to distinguish it from regular NestJS singleton providers | ||
*/ | ||
export function InjectableProxy(options: InjectableProxyMetadata = {}) { | ||
return (target: any) => | ||
Injectable()(SetMetadata(CLS_PROXY_METADATA_KEY, options)(target)); | ||
} |
Oops, something went wrong.