Skip to content

Commit

Permalink
refactor: folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Papooch committed Feb 18, 2023
1 parent 8f2277f commit 75d91a9
Show file tree
Hide file tree
Showing 9 changed files with 386 additions and 378 deletions.
716 changes: 362 additions & 354 deletions dependency-graph.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"test": "jest",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"depcruise": "npx depcruise src --include-only \"^src\" --config --output-type dot | dot -T svg | npx depcruise-wrap-stream-in-html > dependency-graph.html"
"depcruise": "npx depcruise src --include-only \"^src\" --exclude \"\\.spec\\.ts\" --config --output-type dot | dot -T svg | npx depcruise-wrap-stream-in-html > dependency-graph.html"
},
"peerDependencies": {
"@nestjs/common": "> 7.0.0 < 10",
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export * from './lib/cls-service-manager';
export * from './lib/cls.constants';
export * from './lib/cls.middleware';
export * from './lib/cls.interceptor';
export * from './lib/cls.guard';
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/use-cls.decorator';
export * from './lib/cls.module';
export * from './lib/cls.service';
export * from './lib/cls.decorators';
export * from './lib/cls.options';
export * from './lib/use-cls.decorator';
export { Terminal } from './types/terminal.type';
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
Inject,
Injectable,
} from '@nestjs/common';
import { ClsServiceManager } from './cls-service-manager';
import { CLS_GUARD_OPTIONS, CLS_ID } from './cls.constants';
import { ClsGuardOptions } from './cls.options';
import { ClsServiceManager } from '../cls-service-manager';
import { CLS_GUARD_OPTIONS, CLS_ID } from '../cls.constants';
import { ClsGuardOptions } from '../cls.options';

@Injectable()
export class ClsGuard implements CanActivate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
NestInterceptor,
} from '@nestjs/common';
import { Observable } from 'rxjs';
import { ClsServiceManager } from './cls-service-manager';
import { CLS_ID, CLS_INTERCEPTOR_OPTIONS } from './cls.constants';
import { ClsInterceptorOptions } from './cls.options';
import { ClsServiceManager } from '../cls-service-manager';
import { CLS_ID, CLS_INTERCEPTOR_OPTIONS } from '../cls.constants';
import { ClsInterceptorOptions } from '../cls.options';

@Injectable()
export class ClsInterceptor implements NestInterceptor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Inject, Injectable, NestMiddleware } from '@nestjs/common';
import { ClsServiceManager } from './cls-service-manager';
import { ClsServiceManager } from '../cls-service-manager';
import {
CLS_ID,
CLS_MIDDLEWARE_OPTIONS,
CLS_REQ,
CLS_RES,
} from './cls.constants';
import { ClsMiddlewareOptions } from './cls.options';
import { ClsService } from './cls.service';
} from '../cls.constants';
import { ClsMiddlewareOptions } from '../cls.options';
import { ClsService } from '../cls.service';

@Injectable()
export class ClsMiddleware implements NestMiddleware {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Injectable } from '@nestjs/common';
import { Test } from '@nestjs/testing';
import { CLS_ID } from './cls.constants';
import { ClsModule } from './cls.module';
import { ClsService } from './cls.service';
import { CLS_ID } from '../cls.constants';
import { ClsModule } from '../cls.module';
import { ClsService } from '../cls.service';
import { UseCls } from './use-cls.decorator';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'reflect-metadata';
import { ClsServiceManager } from './cls-service-manager';
import { CLS_ID } from './cls.constants';
import { ClsDecoratorOptions } from './cls.options';
import { ClsServiceManager } from '../cls-service-manager';
import { CLS_ID } from '../cls.constants';
import { ClsDecoratorOptions } from '../cls.options';

/**
* Wraps the decorated method in a CLS context.
Expand Down
6 changes: 3 additions & 3 deletions src/lib/cls.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ import {
CLS_REQ,
CLS_RES,
} from './cls.constants';
import { ClsGuard } from './cls.guard';
import { ClsInterceptor } from './cls.interceptor';
import { ClsGuard } from './cls-initializers/cls.guard';
import { ClsInterceptor } from './cls-initializers/cls.interceptor';
import {
ClsGuardOptions,
ClsInterceptorOptions,
ClsMiddlewareOptions,
ClsModuleAsyncOptions,
ClsModuleOptions,
} from './cls.options';
import { ClsMiddleware } from './cls.middleware';
import { ClsMiddleware } from './cls-initializers/cls.middleware';
import { ClsService } from './cls.service';
import { ProxyProviderManager } from './proxy-provider/proxy-provider-manager';
import { ClsModuleProxyProviderOptions } from './proxy-provider/proxy-provider.interfaces';
Expand Down

0 comments on commit 75d91a9

Please sign in to comment.