Skip to content

Commit ece7c74

Browse files
committed
fix: lint
1 parent 3449009 commit ece7c74

File tree

122 files changed

+806
-809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+806
-809
lines changed

api-strategy/src/context-call.interface.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface IApiCallStrategy {
2020
*/
2121
call<TOptData, TParams extends Record<string, any>, TResData>(
2222
path: string,
23-
options?: ICallOptions<TOptData, TParams>,
23+
options?: ICallOptions<TOptData, TParams>
2424
): Promise<IObjectWithData<TResData>>;
2525
/**
2626
* alias for call that retrieves data without side effects (read-only)
@@ -31,7 +31,7 @@ export interface IApiCallStrategy {
3131
*/
3232
get<TOptData, TParams extends Record<string, any>, TResData>(
3333
path: string,
34-
options?: ICallOptions<TOptData, TParams>,
34+
options?: ICallOptions<TOptData, TParams>
3535
): Promise<IObjectWithData<TResData>>;
3636
/**
3737
* alias for call that retrieves data with side effects (creation of a resource, etc.)
@@ -42,6 +42,6 @@ export interface IApiCallStrategy {
4242
*/
4343
post<TOptData, TParams extends Record<string, any>, TResData>(
4444
path: string,
45-
options?: ICallOptions<TOptData, TParams>,
45+
options?: ICallOptions<TOptData, TParams>
4646
): Promise<IObjectWithData<TResData>>;
4747
}

api-strategy/src/context-call.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface IApiCallService<Strategy extends IApiCallStrategy> {
88
}
99

1010
export function ContextCallServiceFactory<Strategy extends IApiCallStrategy>(
11-
defaultStrategy: Strategy,
11+
defaultStrategy: Strategy
1212
): ClassType<IApiCallService<Strategy>> {
1313
@Injectable()
1414
class ContextCallService {

api-strategy/src/context-event.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface IApiMessageService<Strategy extends IEventStrategy> {
88
}
99

1010
export function ContextEventServiceFactory<Strategy extends IEventStrategy>(
11-
defaultStrategy: Strategy,
11+
defaultStrategy: Strategy
1212
): ClassType<IApiMessageService<Strategy>> {
1313
@Injectable()
1414
class ContextEventService {

api-strategy/src/header-whitelist.helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const headerWhitelist = ['Authorization'];
22

33
export function filterHeaders(
44
headers: Record<string, string> | undefined,
5-
whitelist = headerWhitelist,
5+
whitelist = headerWhitelist
66
) {
77
return headers
88
? Object.entries(headers)

api-strategy/src/strategies/http-abstract-call.strategy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export interface IHttpCallStrategyOptions {
1212
// do not
1313
export interface HttpOptions<
1414
TData = string | object | Buffer | NodeJS.ReadableStream,
15-
TParams extends Record<string, any> = Record<string, any>,
15+
TParams extends Record<string, any> = Record<string, any>
1616
> {
1717
headers?: IncomingHttpHeaders | Record<string, string>;
1818
method?: HTTPMethods;
@@ -34,27 +34,27 @@ export interface IHttpCallStrategyResponse<T = any> {
3434
export interface IHttpCallStrategy extends IApiCallStrategy {
3535
call<TOptData, TParams extends Record<string, any>, TResData>(
3636
path: string,
37-
options?: HttpOptions<TOptData, TParams> | { method?: string },
37+
options?: HttpOptions<TOptData, TParams> | { method?: string }
3838
): Promise<IHttpCallStrategyResponse<TResData>>;
3939
get<TOptData, TParams extends Record<string, any>, TResData>(
4040
path: string,
41-
options?: HttpOptions<TOptData, TParams> | { method?: string },
41+
options?: HttpOptions<TOptData, TParams> | { method?: string }
4242
): Promise<IHttpCallStrategyResponse<TResData>>;
4343
post<TOptData, TParams extends Record<string, any>, TResData>(
4444
path: string,
45-
options?: HttpOptions<TOptData, TParams> | { method?: string },
45+
options?: HttpOptions<TOptData, TParams> | { method?: string }
4646
): Promise<IHttpCallStrategyResponse<TResData>>;
4747
}
4848

4949
export abstract class HttpAbstractStrategy implements IHttpCallStrategy {
5050
abstract call<TOptData, TParams extends Record<string, any>, TResData>(
5151
path: string,
52-
options?: HttpOptions<TOptData, TParams> | { method?: string },
52+
options?: HttpOptions<TOptData, TParams> | { method?: string }
5353
): Promise<IHttpCallStrategyResponse<TResData>>;
5454

5555
get<TOptData, TParams extends Record<string, any>, TResData>(
5656
path: string,
57-
options?: HttpOptions<TOptData, TParams> | { method?: string },
57+
options?: HttpOptions<TOptData, TParams> | { method?: string }
5858
): Promise<IHttpCallStrategyResponse<TResData>> {
5959
return this.call<TOptData, TParams, TResData>(path, {
6060
...options,
@@ -64,7 +64,7 @@ export abstract class HttpAbstractStrategy implements IHttpCallStrategy {
6464

6565
post<TOptData, TParams extends Record<string, any>, TResData>(
6666
path: string,
67-
options?: HttpOptions<TOptData, TParams> | { method?: string },
67+
options?: HttpOptions<TOptData, TParams> | { method?: string }
6868
): Promise<IHttpCallStrategyResponse<TResData>> {
6969
return this.call<TOptData, TParams, TResData>(path, {
7070
...options,

api-strategy/src/strategies/nest-http-call.strategy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ export class NestHttpCallStrategy extends HttpAbstractStrategy {
1515
protected readonly httpService: HttpService,
1616
protected readonly clsService: YalcGlobalClsService,
1717
private baseUrl = '',
18-
protected readonly options: IHttpCallStrategyOptions = {},
18+
protected readonly options: IHttpCallStrategyOptions = {}
1919
) {
2020
super();
2121
}
2222

2323
async call<TOptData, TParams extends Record<string, any>, TResData>(
2424
path: string,
25-
options?: HttpOptions<TOptData, TParams>,
25+
options?: HttpOptions<TOptData, TParams>
2626
): Promise<IHttpCallStrategyResponse<TResData>> {
2727
const clsHeaders = filterHeaders(
2828
this.clsService.get('headers'),
29-
this.options.headersWhitelist,
29+
this.options.headersWhitelist
3030
);
3131
const headers = {
3232
...clsHeaders,
@@ -77,7 +77,7 @@ export interface NestHttpCallStrategyProviderOptions {
7777
*/
7878
export const NestHttpCallStrategyProvider = (
7979
provide: string,
80-
options: NestHttpCallStrategyProviderOptions = {},
80+
options: NestHttpCallStrategyProviderOptions = {}
8181
) => ({
8282
provide,
8383
useFactory: (httpAdapter: HttpService, clsService: YalcGlobalClsService) => {
@@ -90,7 +90,7 @@ export const NestHttpCallStrategyProvider = (
9090
return new _options.NestHttpStrategy(
9191
httpAdapter,
9292
clsService,
93-
_options.baseUrl,
93+
_options.baseUrl
9494
);
9595
},
9696
inject: [HttpService, YalcGlobalClsService],

api-strategy/src/strategies/nest-local-call.strategy.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@ export class NestLocalCallStrategy extends HttpAbstractStrategy {
1919
protected readonly clsService: YalcGlobalClsService,
2020
protected readonly configService: AppConfigService,
2121
private baseUrl = '',
22-
protected readonly options: IHttpCallStrategyOptions = {},
22+
protected readonly options: IHttpCallStrategyOptions = {}
2323
) {
2424
super();
2525
}
2626

2727
async call<
2828
TOptData extends string | object | Buffer | NodeJS.ReadableStream,
2929
TParams extends Record<string, any>,
30-
TResData,
30+
TResData
3131
>(
3232
path: string,
33-
options?: HttpOptions<TOptData, TParams>,
33+
options?: HttpOptions<TOptData, TParams>
3434
): Promise<IHttpCallStrategyResponse<TResData>> {
3535
const instance: FastifyAdapter = this.adapterHost.httpAdapter.getInstance();
3636
const clsHeaders = filterHeaders(
3737
this.clsService.get('headers'),
38-
this.options.headersWhitelist,
38+
this.options.headersWhitelist
3939
);
4040
const headers = {
4141
...clsHeaders,
@@ -97,13 +97,13 @@ export interface NestLocalCallStrategyProviderOptions {
9797
*/
9898
export const NestLocalCallStrategyProvider = (
9999
provide: string,
100-
options: NestLocalCallStrategyProviderOptions = {},
100+
options: NestLocalCallStrategyProviderOptions = {}
101101
) => ({
102102
provide,
103103
useFactory: (
104104
httpAdapter: HttpAdapterHost,
105105
clsService: YalcGlobalClsService,
106-
configService: AppConfigService,
106+
configService: AppConfigService
107107
) => {
108108
const _options = {
109109
baseUrl: '',
@@ -115,7 +115,7 @@ export const NestLocalCallStrategyProvider = (
115115
httpAdapter,
116116
clsService,
117117
configService,
118-
_options.baseUrl,
118+
_options.baseUrl
119119
);
120120
},
121121
inject: [HttpAdapterHost, YalcGlobalClsService, MAIN_APP_CONFIG_SERVICE],

api-strategy/src/strategies/nest-local-event.strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export interface NestLocalEventStrategyProviderOptions {
2525
*/
2626
export const NestLocalEventStrategyProvider = (
2727
provide: string,
28-
options: NestLocalEventStrategyProviderOptions = {},
28+
options: NestLocalEventStrategyProviderOptions = {}
2929
) => ({
3030
provide,
3131
useFactory: (eventEmitter: EventEmitter2) => {

app/src/app-bootstrap-base.helper.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { YalcDefaultAppModule } from './base-app-module.helper.js';
1414
import { ICreateOptions, IGlobalOptions } from './app-bootstrap.helper.js';
1515

1616
export abstract class BaseAppBootstrap<
17-
TAppType extends NestFastifyApplication | INestApplicationContext,
17+
TAppType extends NestFastifyApplication | INestApplicationContext
1818
> {
1919
protected app?: TAppType;
2020
protected loggerService!: LoggerService;
@@ -23,12 +23,12 @@ export abstract class BaseAppBootstrap<
2323
constructor(
2424
protected appAlias: string,
2525
protected readonly appModule: Type<any>,
26-
options?: { globalsOptions?: IGlobalOptions },
26+
options?: { globalsOptions?: IGlobalOptions }
2727
) {
2828
this.module = YalcDefaultAppModule.forRoot(
2929
this.appAlias,
3030
[appModule, ...(options?.globalsOptions?.extraImports ?? [])],
31-
options?.globalsOptions,
31+
options?.globalsOptions
3232
);
3333
}
3434

app/src/app-bootstrap.helper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface IGlobalOptions {
4444
}
4545

4646
export class AppBootstrap<
47-
TGlobalOptions extends IGlobalOptions = IGlobalOptions,
47+
TGlobalOptions extends IGlobalOptions = IGlobalOptions
4848
> extends BaseAppBootstrap<NestFastifyApplication> {
4949
private fastifyInstance?: FastifyInstance;
5050
protected isSwaggerEnabled: boolean = false;
@@ -118,7 +118,7 @@ export class AppBootstrap<
118118
bufferLogs: false,
119119
abortOnError: options?.createOptions?.abortOnError ?? false,
120120
...(options?.createOptions ?? {}),
121-
},
121+
}
122122
);
123123
} catch (err) {
124124
// eslint-disable-next-line no-console
@@ -153,11 +153,11 @@ export class AppBootstrap<
153153
return new BadRequestException(errorMessages);
154154
},
155155
...(options?.validationPipeOptions ?? {}),
156-
}),
156+
})
157157
);
158158

159159
this.getApp().setGlobalPrefix(
160-
options?.apiPrefix ?? (this.getConf()?.apiPrefix || ''),
160+
options?.apiPrefix ?? (this.getConf()?.apiPrefix || '')
161161
);
162162

163163
await this.getApp().register(fastifyCookie as any, {});
@@ -175,7 +175,7 @@ export class AppBootstrap<
175175
this.setSwaggerEnabled(true);
176176
const document = SwaggerModule.createDocument(
177177
this.getApp(),
178-
this.buildSwaggerConfig().build(),
178+
this.buildSwaggerConfig().build()
179179
);
180180
SwaggerModule.setup('api', this.getApp(), document);
181181
}

0 commit comments

Comments
 (0)