@nathapp/nestjs-app 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/app/app-factory.d.ts +12 -0
- package/dist/app/app-factory.js +45 -0
- package/dist/app/app-factory.js.map +1 -0
- package/dist/app/app.interface.d.ts +10 -0
- package/dist/app/app.interface.js +3 -0
- package/dist/app/app.interface.js.map +1 -0
- package/dist/app/index.d.ts +4 -0
- package/dist/app/index.js +8 -0
- package/dist/app/index.js.map +1 -0
- package/dist/app/nathapp.d.ts +110 -0
- package/dist/app/nathapp.js +333 -0
- package/dist/app/nathapp.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +6 -0
- package/package.json +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2018 KnowYourself
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# nestjs-app Library
|
|
2
|
+
|
|
3
|
+
# this package is aim for shorten and clean way to initialize nestjs applications.
|
|
4
|
+
|
|
5
|
+
1. for `.useAppGlobalGuards`. here is the following sequence to initial Jwt AuthGuard:
|
|
6
|
+
|
|
7
|
+
i. using `.setJwtAuthGuard` if specified
|
|
8
|
+
ii. using `JwtMsAuthGuard` if @nathapp/nestjs-microservices installed
|
|
9
|
+
iii. else using `JwtAuthGuard`
|
|
10
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { INestApplication } from "@nestjs/common";
|
|
2
|
+
import { NathApplication } from "./nathapp";
|
|
3
|
+
import { AbstractHttpAdapter } from "@nestjs/core";
|
|
4
|
+
import { ApplicationOptions, IEntryNestModule, NathApplicationOptions } from "./app.interface";
|
|
5
|
+
export declare class AppFactory {
|
|
6
|
+
static useApp(app: INestApplication, options?: NathApplicationOptions): NathApplication;
|
|
7
|
+
static createFastifyApp(module: IEntryNestModule, options?: ApplicationOptions): Promise<NathApplication>;
|
|
8
|
+
static createFastifyApp(module: IEntryNestModule, httpAdapter: AbstractHttpAdapter, options?: ApplicationOptions): Promise<NathApplication>;
|
|
9
|
+
static create<T extends INestApplication = INestApplication>(module: IEntryNestModule, options?: ApplicationOptions): Promise<NathApplication>;
|
|
10
|
+
static create<T extends INestApplication = INestApplication>(module: IEntryNestModule, httpAdapter: AbstractHttpAdapter, options?: ApplicationOptions): Promise<NathApplication>;
|
|
11
|
+
private static isHttpServer;
|
|
12
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppFactory = void 0;
|
|
4
|
+
const nathapp_1 = require("./nathapp");
|
|
5
|
+
const core_1 = require("@nestjs/core");
|
|
6
|
+
const load_package_util_1 = require("@nestjs/common/utils/load-package.util");
|
|
7
|
+
class AppFactory {
|
|
8
|
+
static useApp(app, options) {
|
|
9
|
+
return new nathapp_1.NathApplication(app, options);
|
|
10
|
+
}
|
|
11
|
+
static async createFastifyApp(module, serverOrOptions, options) {
|
|
12
|
+
const { FastifyAdapter, NestFastifyApplication } = (0, load_package_util_1.loadPackage)('@nestjs/platform-fastify', AppFactory.name, () => require('@nestjs/platform-fastify'));
|
|
13
|
+
const [httpServer, appOptions] = this.isHttpServer(serverOrOptions)
|
|
14
|
+
? [serverOrOptions, options]
|
|
15
|
+
: [new FastifyAdapter(), serverOrOptions];
|
|
16
|
+
const nestApp = await core_1.NestFactory.create(module, httpServer, appOptions);
|
|
17
|
+
const fastifyOptions = appOptions;
|
|
18
|
+
if (fastifyOptions && fastifyOptions.supportOAuth) {
|
|
19
|
+
const fastifyInstance = httpServer.getInstance();
|
|
20
|
+
fastifyInstance
|
|
21
|
+
.addHook('onRequest', async (req, res) => {
|
|
22
|
+
req.socket['encrypted'] = fastifyOptions.encryptSocket && fastifyOptions.encryptSocket;
|
|
23
|
+
})
|
|
24
|
+
.decorateReply('setHeader', function (name, value) {
|
|
25
|
+
this.header(name, value);
|
|
26
|
+
})
|
|
27
|
+
.decorateReply('end', function () {
|
|
28
|
+
this.send('');
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return this.useApp(nestApp, appOptions);
|
|
32
|
+
}
|
|
33
|
+
static async create(module, serverOrOptions, options) {
|
|
34
|
+
const [httpServer, appOptions] = this.isHttpServer(serverOrOptions)
|
|
35
|
+
? [serverOrOptions, options]
|
|
36
|
+
: [null, serverOrOptions];
|
|
37
|
+
const nestApp = await (httpServer ? core_1.NestFactory.create(module, httpServer, appOptions) : core_1.NestFactory.create(module, appOptions));
|
|
38
|
+
return this.useApp(nestApp, appOptions);
|
|
39
|
+
}
|
|
40
|
+
static isHttpServer(serverOrOptions) {
|
|
41
|
+
return !!(serverOrOptions && serverOrOptions.patch);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.AppFactory = AppFactory;
|
|
45
|
+
//# sourceMappingURL=app-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-factory.js","sourceRoot":"","sources":["../../lib/app/app-factory.ts"],"names":[],"mappings":";;;AACA,uCAA4C;AAC5C,uCAAgE;AAChE,8EAAqE;AAGrE,MAAa,UAAU;IAErB,MAAM,CAAC,MAAM,CAAC,GAAqB,EAAE,OAAgC;QACnE,OAAO,IAAI,yBAAe,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IASD,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,MAAwB,EACpD,eAA0D,EAC1D,OAA4B;QAC1B,MAAM,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,IAAA,+BAAW,EAAC,0BAA0B,EAAE,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC,CAAC;QAEvJ,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;YACnE,CAAC,CAAC,CAAC,eAAe,EAAE,OAAO,CAAC;YAC5B,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,EAAE,eAAe,CAAC,CAAC;QAC5C,MAAM,OAAO,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAgC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;QACxG,MAAM,cAAc,GAAG,UAA2C,CAAC;QAEnE,IAAG,cAAc,IAAI,cAAc,CAAC,YAAY,EAAE,CAAC;YAOjD,MAAM,eAAe,GAAG,UAAU,CAAC,WAAW,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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DynamicModule, ForwardReference, Type, NestApplicationOptions } from "@nestjs/common";
|
|
2
|
+
export type IEntryNestModule = Type<any> | DynamicModule | ForwardReference | Promise<IEntryNestModule>;
|
|
3
|
+
export interface FastifyNestApplicationOptions extends NestApplicationOptions {
|
|
4
|
+
supportOAuth?: boolean;
|
|
5
|
+
encryptSocket?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface NathApplicationOptions {
|
|
8
|
+
checkModuleAvailability?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ApplicationOptions = (FastifyNestApplicationOptions | NestApplicationOptions) & NathApplicationOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.interface.js","sourceRoot":"","sources":["../../lib/app/app.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AppFactory } from "./app-factory";
|
|
2
|
+
import { ApplicationOptions, FastifyNestApplicationOptions, NathApplicationOptions } from "./app.interface";
|
|
3
|
+
import { NathApplication } from "./nathapp";
|
|
4
|
+
export { AppFactory, NathApplication, NathApplicationOptions, ApplicationOptions, FastifyNestApplicationOptions };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NathApplication = exports.AppFactory = void 0;
|
|
4
|
+
const app_factory_1 = require("./app-factory");
|
|
5
|
+
Object.defineProperty(exports, "AppFactory", { enumerable: true, get: function () { return app_factory_1.AppFactory; } });
|
|
6
|
+
const nathapp_1 = require("./nathapp");
|
|
7
|
+
Object.defineProperty(exports, "NathApplication", { enumerable: true, get: function () { return nathapp_1.NathApplication; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/app/index.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAMzC,2FANO,wBAAU,OAMP;AAJZ,uCAA4C;AAK1C,gGALO,yBAAe,OAKP"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { PermissionProvider } from '@nathapp/nestjs-auth';
|
|
2
|
+
import { I18nValidationExceptionFilter } from '@nathapp/nestjs-common';
|
|
3
|
+
import { INestApplication, LogLevel, Logger, LoggerService, ShutdownSignal, ValidationPipeOptions, VersioningOptions } from '@nestjs/common';
|
|
4
|
+
import { CanActivate, DynamicModule, ExceptionFilter, GlobalPrefixOptions, HttpServer, INestApplicationContext, INestMicroservice, NestHybridApplicationOptions, NestInterceptor, PipeTransform, RouteInfo, SelectOptions, Type, WebSocketAdapter } from '@nestjs/common/interfaces';
|
|
5
|
+
import { CorsOptions, CorsOptionsDelegate } from '@nestjs/common/interfaces/external/cors-options.interface';
|
|
6
|
+
import { IAuthGuard } from '@nestjs/passport';
|
|
7
|
+
import { I18nValidationPipeOptions } from 'nestjs-i18n';
|
|
8
|
+
import { NathApplicationOptions } from './app.interface';
|
|
9
|
+
export declare class NathApplication {
|
|
10
|
+
private readonly app;
|
|
11
|
+
private readonly reflector;
|
|
12
|
+
private readonly httpAdapterHost;
|
|
13
|
+
private readonly i18nService;
|
|
14
|
+
private permissionGuard;
|
|
15
|
+
private permissionProvider;
|
|
16
|
+
private jwtAuthGuard;
|
|
17
|
+
private validationPipeOptions;
|
|
18
|
+
private validationExceptionFilter;
|
|
19
|
+
private readonly msPackage;
|
|
20
|
+
private readonly isFastifyApp;
|
|
21
|
+
private readonly configService;
|
|
22
|
+
private serverSecurityConfig;
|
|
23
|
+
private hasServerSecurityConfig;
|
|
24
|
+
private readonly serverHelmetPackage;
|
|
25
|
+
protected readonly logger: Logger;
|
|
26
|
+
constructor(app: INestApplication, options?: NathApplicationOptions);
|
|
27
|
+
init(): Promise<this>;
|
|
28
|
+
use(...args: any[]): this;
|
|
29
|
+
enableCors(options?: CorsOptions | CorsOptionsDelegate<any>): void;
|
|
30
|
+
enableVersioning(options?: VersioningOptions): this;
|
|
31
|
+
listen(port: number | string): Promise<any>;
|
|
32
|
+
listen(port: number | string, hostname: string): Promise<any>;
|
|
33
|
+
get isFastify(): boolean;
|
|
34
|
+
getUrl(): Promise<string>;
|
|
35
|
+
flushLogs(): this;
|
|
36
|
+
setGlobalPrefix(prefix: string, options?: GlobalPrefixOptions): this;
|
|
37
|
+
useWebSocketAdapter(adapter: WebSocketAdapter): this;
|
|
38
|
+
connectMicroservice<T extends object = any>(options: T, hybridOptions?: NestHybridApplicationOptions): INestMicroservice;
|
|
39
|
+
getNestApp<T extends INestApplication>(): T;
|
|
40
|
+
get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol): TResult;
|
|
41
|
+
get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, options: {
|
|
42
|
+
strict?: boolean;
|
|
43
|
+
each?: undefined | false;
|
|
44
|
+
}): TResult;
|
|
45
|
+
get<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, options: {
|
|
46
|
+
strict?: boolean;
|
|
47
|
+
each: true;
|
|
48
|
+
}): Array<TResult>;
|
|
49
|
+
getMicroservices(): INestMicroservice[];
|
|
50
|
+
getHttpServer(): any;
|
|
51
|
+
getHttpAdapter(): HttpServer;
|
|
52
|
+
startAllMicroservices(): Promise<this>;
|
|
53
|
+
useGlobalFilters(...filters: ExceptionFilter[]): this;
|
|
54
|
+
useGlobalPipes(...pipes: PipeTransform<any>[]): this;
|
|
55
|
+
useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
|
|
56
|
+
useGlobalGuards(...guards: CanActivate[]): this;
|
|
57
|
+
useServerSecurityConfig(): Promise<this>;
|
|
58
|
+
close(): Promise<void>;
|
|
59
|
+
registerMicroService<T extends object = any>(options: T, hybridOptions?: NestHybridApplicationOptions): this;
|
|
60
|
+
start(port?: number, hostname?: string, callback?: () => void): Promise<any>;
|
|
61
|
+
useAppGlobalPrefix(excludePaths?: string | RouteInfo[]): this;
|
|
62
|
+
setI18nValidationExceptionFilter(filter: I18nValidationExceptionFilter): this;
|
|
63
|
+
useAppGlobalFilters(...filters: ExceptionFilter[]): this;
|
|
64
|
+
setPermissionGuard(guard: CanActivate): this;
|
|
65
|
+
setPermissionProvider(permissionProvider: PermissionProvider): this;
|
|
66
|
+
setJwtAuthGuard(guard: IAuthGuard): this;
|
|
67
|
+
useAppGlobalGuards(...guards: CanActivate[]): this;
|
|
68
|
+
setValidationPipeOptions(options: ValidationPipeOptions | I18nValidationPipeOptions): this;
|
|
69
|
+
useAppGlobalPipes(...pipes: PipeTransform<any>[]): this;
|
|
70
|
+
useSwaggerUIOnDevOnly(info: {
|
|
71
|
+
name?: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
version?: string;
|
|
74
|
+
}, path?: string): this;
|
|
75
|
+
useSwaggerUIWithCondition(info: {
|
|
76
|
+
name?: string;
|
|
77
|
+
description?: string;
|
|
78
|
+
version?: string;
|
|
79
|
+
}, condition: boolean, path?: string): this;
|
|
80
|
+
useSwaggerUI(info: {
|
|
81
|
+
name?: string;
|
|
82
|
+
description?: string;
|
|
83
|
+
version?: string;
|
|
84
|
+
}, path?: string): this;
|
|
85
|
+
useLogger(logger: LoggerService | LogLevel[] | false): this;
|
|
86
|
+
enableShutdownHooks(signals?: ShutdownSignal[] | string[]): this;
|
|
87
|
+
private getJwtGuard;
|
|
88
|
+
private createPermissionGuard;
|
|
89
|
+
private loadMicroServicePackage;
|
|
90
|
+
private loadServerSecurityConfig;
|
|
91
|
+
private loadPlatformHelmet;
|
|
92
|
+
private registerPlatformHelmet;
|
|
93
|
+
resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol): Promise<TResult>;
|
|
94
|
+
resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, contextId?: {
|
|
95
|
+
id: number;
|
|
96
|
+
}): Promise<TResult>;
|
|
97
|
+
resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, contextId?: {
|
|
98
|
+
id: number;
|
|
99
|
+
}, options?: {
|
|
100
|
+
strict?: boolean;
|
|
101
|
+
each?: undefined | false;
|
|
102
|
+
}): Promise<TResult>;
|
|
103
|
+
resolve<TInput = any, TResult = TInput>(typeOrToken: Type<TInput> | Function | string | symbol, contextId?: {
|
|
104
|
+
id: number;
|
|
105
|
+
}, options?: {
|
|
106
|
+
strict?: boolean;
|
|
107
|
+
each: true;
|
|
108
|
+
}): Promise<Array<TResult>>;
|
|
109
|
+
select<T>(module: Type<T> | DynamicModule, options?: SelectOptions): INestApplicationContext;
|
|
110
|
+
}
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NathApplication = void 0;
|
|
4
|
+
const nestjs_auth_1 = require("@nathapp/nestjs-auth");
|
|
5
|
+
const nestjs_common_1 = require("@nathapp/nestjs-common");
|
|
6
|
+
const common_1 = require("@nestjs/common");
|
|
7
|
+
const core_1 = require("@nestjs/core");
|
|
8
|
+
const nestjs_i18n_1 = require("nestjs-i18n");
|
|
9
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
10
|
+
const config_1 = require("@nestjs/config");
|
|
11
|
+
class NathApplication {
|
|
12
|
+
constructor(app, options) {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
this.app = app;
|
|
15
|
+
this.hasServerSecurityConfig = false;
|
|
16
|
+
this.logger = new common_1.Logger(NathApplication.name);
|
|
17
|
+
this.reflector = app.get(core_1.Reflector);
|
|
18
|
+
this.httpAdapterHost = app.get(core_1.HttpAdapterHost);
|
|
19
|
+
this.isFastifyApp = ((_b = (_a = this.httpAdapterHost) === null || _a === void 0 ? void 0 : _a.httpAdapter) === null || _b === void 0 ? void 0 : _b.getType()) === 'fastify';
|
|
20
|
+
const { checkModuleAvailability = true } = options || {};
|
|
21
|
+
let isI18nModuleAvailable = true;
|
|
22
|
+
let isConfigModuleAvailable = true;
|
|
23
|
+
if (checkModuleAvailability) {
|
|
24
|
+
const modulesContainer = app.get(core_1.ModulesContainer);
|
|
25
|
+
const moduleRefs = [...modulesContainer.values()];
|
|
26
|
+
isI18nModuleAvailable = moduleRefs.some(ref => ref.metatype && ref.metatype.name === nestjs_i18n_1.I18nModule.name);
|
|
27
|
+
isConfigModuleAvailable = moduleRefs.some(ref => ref.metatype && ref.metatype.name === config_1.ConfigModule.name);
|
|
28
|
+
}
|
|
29
|
+
if (isI18nModuleAvailable) {
|
|
30
|
+
this.i18nService = app.get(nestjs_i18n_1.I18nService);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.logger.warn("i18nService is not available, please register i18n with I18nCoreModule.forRoot() if you want to use i18n features");
|
|
34
|
+
}
|
|
35
|
+
this.msPackage = this.loadMicroServicePackage();
|
|
36
|
+
if (isConfigModuleAvailable) {
|
|
37
|
+
this.configService = app.get(config_1.ConfigService);
|
|
38
|
+
this.loadServerSecurityConfig();
|
|
39
|
+
this.serverHelmetPackage = this.loadPlatformHelmet();
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
this.logger.warn("ConfigService is not available. you may ignore this warning if you are not using Server Security Config");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async init() {
|
|
46
|
+
await this.app.init();
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
use(...args) {
|
|
50
|
+
this.app.use(...args);
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
enableCors(options) {
|
|
54
|
+
this.app.enableCors(options);
|
|
55
|
+
}
|
|
56
|
+
enableVersioning(options) {
|
|
57
|
+
this.app.enableVersioning(options);
|
|
58
|
+
return this;
|
|
59
|
+
}
|
|
60
|
+
async listen(port, ...args) {
|
|
61
|
+
const hostname = args && args.length > 0 && typeof args[0] === 'string' ? args[0] : 'localhost';
|
|
62
|
+
this.logger.log(`Listening on ${hostname}:${port}`);
|
|
63
|
+
return this.app.listen(port, ...args);
|
|
64
|
+
}
|
|
65
|
+
get isFastify() {
|
|
66
|
+
return this.isFastifyApp;
|
|
67
|
+
}
|
|
68
|
+
getUrl() {
|
|
69
|
+
return this.app.getUrl();
|
|
70
|
+
}
|
|
71
|
+
flushLogs() {
|
|
72
|
+
this.app.flushLogs();
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
setGlobalPrefix(prefix, options) {
|
|
76
|
+
this.app.setGlobalPrefix(prefix, options);
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
useWebSocketAdapter(adapter) {
|
|
80
|
+
this.app.useWebSocketAdapter(adapter);
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
connectMicroservice(options, hybridOptions) {
|
|
84
|
+
return this.app.connectMicroservice(options, hybridOptions);
|
|
85
|
+
}
|
|
86
|
+
getNestApp() {
|
|
87
|
+
return this.app;
|
|
88
|
+
}
|
|
89
|
+
get(typeOrToken, options = { strict: false }) {
|
|
90
|
+
return this.app.get(typeOrToken, options);
|
|
91
|
+
}
|
|
92
|
+
getMicroservices() {
|
|
93
|
+
return this.app.getMicroservices();
|
|
94
|
+
}
|
|
95
|
+
getHttpServer() {
|
|
96
|
+
return this.app.getHttpServer();
|
|
97
|
+
}
|
|
98
|
+
getHttpAdapter() {
|
|
99
|
+
return this.getHttpAdapter();
|
|
100
|
+
}
|
|
101
|
+
async startAllMicroservices() {
|
|
102
|
+
await this.app.startAllMicroservices();
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
useGlobalFilters(...filters) {
|
|
106
|
+
this.app.useGlobalFilters(...filters);
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
useGlobalPipes(...pipes) {
|
|
110
|
+
this.app.useGlobalPipes(...pipes);
|
|
111
|
+
return this;
|
|
112
|
+
}
|
|
113
|
+
useGlobalInterceptors(...interceptors) {
|
|
114
|
+
this.app.useGlobalInterceptors(...interceptors);
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
useGlobalGuards(...guards) {
|
|
118
|
+
this.app.useGlobalGuards(...guards);
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
async useServerSecurityConfig() {
|
|
122
|
+
if (!this.hasServerSecurityConfig) {
|
|
123
|
+
this.logger.warn("Server Security Config is not available. Please provide server security config in your config file");
|
|
124
|
+
return this;
|
|
125
|
+
}
|
|
126
|
+
this.logger.log("Server Security Config is loaded");
|
|
127
|
+
const { useHelmet, useCors, corsOrigins, corsMethods, corsHeaders, corsCredentials } = this.serverSecurityConfig;
|
|
128
|
+
if (useCors) {
|
|
129
|
+
this.logger.log(`using Cors with Origin: ${corsOrigins}, Methods: ${corsMethods}, Headers: ${corsHeaders}, Credentials: ${corsCredentials}`);
|
|
130
|
+
this.enableCors({
|
|
131
|
+
origin: corsOrigins,
|
|
132
|
+
methods: corsMethods,
|
|
133
|
+
allowedHeaders: corsHeaders,
|
|
134
|
+
credentials: corsCredentials,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (useHelmet) {
|
|
138
|
+
await this.registerPlatformHelmet();
|
|
139
|
+
}
|
|
140
|
+
return this;
|
|
141
|
+
}
|
|
142
|
+
close() {
|
|
143
|
+
return this.app.close();
|
|
144
|
+
}
|
|
145
|
+
registerMicroService(options, hybridOptions) {
|
|
146
|
+
this.connectMicroservice(options, hybridOptions);
|
|
147
|
+
return this;
|
|
148
|
+
}
|
|
149
|
+
async start(port, hostname, callback) {
|
|
150
|
+
var _a;
|
|
151
|
+
if (((_a = this.app.getMicroservices()) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
152
|
+
await this.app.startAllMicroservices();
|
|
153
|
+
}
|
|
154
|
+
const host = hostname || process.env.SERVER_HOST || "0.0.0.0";
|
|
155
|
+
const args = [host];
|
|
156
|
+
if (callback) {
|
|
157
|
+
args.push(callback);
|
|
158
|
+
}
|
|
159
|
+
return this.listen(port || parseInt(process.env.SERVER_PORT) || 8080, ...args);
|
|
160
|
+
}
|
|
161
|
+
useAppGlobalPrefix(excludePaths) {
|
|
162
|
+
const paths = excludePaths || [];
|
|
163
|
+
return this.setGlobalPrefix(process.env.GLOBAL_PREFIX || '/', {
|
|
164
|
+
exclude: [
|
|
165
|
+
{ path: '/', method: common_1.RequestMethod.GET },
|
|
166
|
+
{ path: '/liveness', method: common_1.RequestMethod.GET },
|
|
167
|
+
{ path: '/readiness', method: common_1.RequestMethod.GET },
|
|
168
|
+
...paths
|
|
169
|
+
],
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
setI18nValidationExceptionFilter(filter) {
|
|
173
|
+
this.validationExceptionFilter = filter;
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
useAppGlobalFilters(...filters) {
|
|
177
|
+
var _a;
|
|
178
|
+
this.logger.log("boostraping with useAppGlobalFilters");
|
|
179
|
+
let globalFilter;
|
|
180
|
+
if ((_a = this.msPackage) === null || _a === void 0 ? void 0 : _a.MicroServiceGlobalExceptionFilter) {
|
|
181
|
+
this.logger.log("@nathapp/nestjs-microservices found. using MicroServiceGlobalExceptionFilter");
|
|
182
|
+
globalFilter = new this.msPackage.MicroServiceGlobalExceptionFilter(this.httpAdapterHost, this.i18nService);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
this.logger.log("No @nathapp/nestjs-microservices found. using GlobalExceptionsFilter");
|
|
186
|
+
globalFilter = new nestjs_common_1.GlobalExceptionsFilter(this.httpAdapterHost, this.i18nService);
|
|
187
|
+
}
|
|
188
|
+
let validationExceptionFilter = this.validationExceptionFilter;
|
|
189
|
+
if (this.i18nService && !validationExceptionFilter) {
|
|
190
|
+
this.logger.log("No I18nValidationExceptionFilter found. using DefaultI18nValidationExceptionFilter");
|
|
191
|
+
validationExceptionFilter = new nestjs_common_1.DefaultI18nValidationExceptionFilter(this.i18nService);
|
|
192
|
+
}
|
|
193
|
+
const allFilters = [
|
|
194
|
+
globalFilter,
|
|
195
|
+
];
|
|
196
|
+
if (validationExceptionFilter) {
|
|
197
|
+
this.logger.log(`using ValidationExceptionFilter: ${validationExceptionFilter.constructor.name}`);
|
|
198
|
+
allFilters.push(validationExceptionFilter);
|
|
199
|
+
}
|
|
200
|
+
allFilters.push(...filters);
|
|
201
|
+
return this.useGlobalFilters(...allFilters);
|
|
202
|
+
}
|
|
203
|
+
setPermissionGuard(guard) {
|
|
204
|
+
this.permissionGuard = guard;
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
setPermissionProvider(permissionProvider) {
|
|
208
|
+
this.permissionProvider = permissionProvider;
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
setJwtAuthGuard(guard) {
|
|
212
|
+
this.jwtAuthGuard = guard;
|
|
213
|
+
return this;
|
|
214
|
+
}
|
|
215
|
+
useAppGlobalGuards(...guards) {
|
|
216
|
+
this.logger.log("boostraping with useAppGlobalGuards");
|
|
217
|
+
const globalGuard = this.getJwtGuard();
|
|
218
|
+
if (!this.permissionGuard) {
|
|
219
|
+
this.permissionGuard = this.createPermissionGuard();
|
|
220
|
+
}
|
|
221
|
+
const allGuards = [globalGuard, this.permissionGuard, ...guards];
|
|
222
|
+
return this.useGlobalGuards(...allGuards);
|
|
223
|
+
}
|
|
224
|
+
setValidationPipeOptions(options) {
|
|
225
|
+
this.validationPipeOptions = options;
|
|
226
|
+
return this;
|
|
227
|
+
}
|
|
228
|
+
useAppGlobalPipes(...pipes) {
|
|
229
|
+
const options = Object.assign({}, { forbidUnknownValues: false, stopAtFirstError: true }, this.validationPipeOptions || {});
|
|
230
|
+
const defaultPipe = this.i18nService ? new nestjs_i18n_1.I18nValidationPipe(options) : new common_1.ValidationPipe(options);
|
|
231
|
+
this.app.useGlobalPipes(...[defaultPipe, ...pipes || []]);
|
|
232
|
+
return this;
|
|
233
|
+
}
|
|
234
|
+
useSwaggerUIOnDevOnly(info, path) {
|
|
235
|
+
const envName = process.env.ENV_NAME;
|
|
236
|
+
return this.useSwaggerUIWithCondition(info, envName !== 'production' && envName !== 'prod', path);
|
|
237
|
+
}
|
|
238
|
+
useSwaggerUIWithCondition(info, condition, path) {
|
|
239
|
+
if (condition) {
|
|
240
|
+
return this.useSwaggerUI(info, path);
|
|
241
|
+
}
|
|
242
|
+
return this;
|
|
243
|
+
}
|
|
244
|
+
useSwaggerUI(info, path) {
|
|
245
|
+
const { name, description, version } = info;
|
|
246
|
+
const config = new swagger_1.DocumentBuilder()
|
|
247
|
+
.setTitle(name)
|
|
248
|
+
.setDescription(description)
|
|
249
|
+
.setVersion(version)
|
|
250
|
+
.addBearerAuth()
|
|
251
|
+
.build();
|
|
252
|
+
const document = swagger_1.SwaggerModule.createDocument(this.app, config);
|
|
253
|
+
swagger_1.SwaggerModule.setup(path || 'swagger-ui.html', this.app, document);
|
|
254
|
+
return this;
|
|
255
|
+
}
|
|
256
|
+
useLogger(logger) {
|
|
257
|
+
this.app.useLogger(logger);
|
|
258
|
+
return this;
|
|
259
|
+
}
|
|
260
|
+
enableShutdownHooks(signals) {
|
|
261
|
+
this.app.enableShutdownHooks(signals);
|
|
262
|
+
return this;
|
|
263
|
+
}
|
|
264
|
+
getJwtGuard() {
|
|
265
|
+
var _a;
|
|
266
|
+
if (this.jwtAuthGuard) {
|
|
267
|
+
this.logger.log("using Custom JwtAuthGuard");
|
|
268
|
+
return this.jwtAuthGuard;
|
|
269
|
+
}
|
|
270
|
+
if ((_a = this.msPackage) === null || _a === void 0 ? void 0 : _a.JwtMsAuthGuard) {
|
|
271
|
+
this.logger.log("using JwtMsAuthGuard");
|
|
272
|
+
return new this.msPackage.JwtMsAuthGuard(this.reflector);
|
|
273
|
+
}
|
|
274
|
+
this.logger.log("using Default JwtAuthGuard");
|
|
275
|
+
return new nestjs_auth_1.JwtAuthGuard(this.reflector);
|
|
276
|
+
}
|
|
277
|
+
createPermissionGuard() {
|
|
278
|
+
if (this.permissionProvider) {
|
|
279
|
+
this.logger.log(`using Custom PermissionProvider: ${this.permissionProvider.constructor.name}`);
|
|
280
|
+
return new nestjs_auth_1.PermissionAuthGuard(this.reflector, this.permissionProvider);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
this.logger.log("using DefaultPermissionProvider");
|
|
284
|
+
return new nestjs_auth_1.PermissionAuthGuard(this.reflector, new nestjs_auth_1.DefaultPermissionProvider());
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
loadMicroServicePackage() {
|
|
288
|
+
try {
|
|
289
|
+
return require("@nathapp/nestjs-microservices");
|
|
290
|
+
}
|
|
291
|
+
catch (e) {
|
|
292
|
+
return null;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
loadServerSecurityConfig() {
|
|
296
|
+
this.serverSecurityConfig = this.configService.get(nestjs_common_1.SERVER_SECURITY_CFG);
|
|
297
|
+
if (this.serverSecurityConfig) {
|
|
298
|
+
this.hasServerSecurityConfig = true;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
loadPlatformHelmet() {
|
|
302
|
+
try {
|
|
303
|
+
return this.isFastifyApp ? require("@fastify/helmet") : require("helmet");
|
|
304
|
+
}
|
|
305
|
+
catch (e) {
|
|
306
|
+
return null;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
async registerPlatformHelmet() {
|
|
310
|
+
if (this.serverHelmetPackage) {
|
|
311
|
+
if (this.isFastifyApp) {
|
|
312
|
+
this.logger.log("registering Fastify Helmet");
|
|
313
|
+
await this.app.register(this.serverHelmetPackage);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
this.logger.log("registering Express Helmet");
|
|
317
|
+
this.app.use(this.serverHelmetPackage());
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
const packageName = this.isFastifyApp ? '@fastify/helmet' : 'helmet';
|
|
322
|
+
this.logger.warn(`Helmet is not available. Please install ${packageName}`);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
resolve(typeOrToken, contextId = (0, core_1.createContextId)(), options = { strict: false }) {
|
|
326
|
+
return this.app.resolve(typeOrToken, contextId, options);
|
|
327
|
+
}
|
|
328
|
+
select(module, options) {
|
|
329
|
+
return this.app.select(module, options);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
exports.NathApplication = NathApplication;
|
|
333
|
+
//# sourceMappingURL=nathapp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nathapp.js","sourceRoot":"","sources":["../../lib/app/nathapp.ts"],"names":[],"mappings":";;;AAAA,sDAAwH;AACxH,0DAAiL;AACjL,2CAA4K;AAG5K,uCAA6F;AAE7F,6CAAqG;AACrG,6CAAiE;AACjE,2CAA6D;AAO7D,MAAa,eAAe;IAmB1B,YAA6B,GAAqB,EAAE,OAAgC;;QAAvD,QAAG,GAAH,GAAG,CAAkB;QAL1C,4BAAuB,GAAY,KAAK,CAAC;QAG9B,WAAM,GAAG,IAAI,eAAM,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAG3D,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,gBAAS,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,GAAG,CAAC,sBAAe,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,CAAA,MAAA,MAAA,IAAI,CAAC,eAAe,0CAAE,WAAW,0CAAE,OAAO,EAAE,MAAK,SAAS,CAAC;QAE/E,MAAM,EAAE,uBAAuB,GAAG,IAAI,EAAE,GAAG,OAAO,IAAI,EAAE,CAAC;QACzD,IAAI,qBAAqB,GAAG,IAAI,CAAC;QACjC,IAAI,uBAAuB,GAAG,IAAI,CAAC;QAEnC,IAAG,uBAAuB,EAAE,CAAC;YAC3B,MAAM,gBAAgB,GAAG,GAAG,CAAC,GAAG,CAAC,uBAAgB,CAAC,CAAC;YACnD,MAAM,UAAU,GAAG,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;YAClD,qBAAqB,GAAG,UAAU,CAAC,IAAI,CAAC,GA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CAAC,mBAAmB,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;gBAC7C,MAAO,IAAI,CAAC,GAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAA;YAC5D,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;gBAC7C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,CAAC;YACrE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2CAA2C,WAAW,EAAE,CAAC,CAAA;QAC5E,CAAC;IACH,CAAC;IAmDM,OAAO,CACZ,WAA8D,EAC9D,SAAS,GAAG,IAAA,sBAAe,GAAE,EAC7B,UAA+B,EAAE,MAAM,EAAE,KAAK,EAAE;QAEhD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CACrB,WAAW,EACX,SAAS,EACT,OAAO,CACR,CAAC;IACJ,CAAC;IAMM,MAAM,CAAI,MAA+B,EAAE,OAAuB;QACvE,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAI,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;CAEF;AAvnBD,0CAunBC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./app";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./app"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist";
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nathapp/nestjs-app",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "this package is to shorten up nestjs app instantiate",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"clean": "rimraf dist/ .turbo/",
|
|
7
|
+
"build": "rimraf dist && tsc -p tsconfig.json",
|
|
8
|
+
"precommit": "lint-staged",
|
|
9
|
+
"test": "jest --config ./test/jest-test.json",
|
|
10
|
+
"test:cov": "jest --config ./test/jest-test.json --coverage",
|
|
11
|
+
"test:watch": "jest --config ./test/jest-test.json --watch",
|
|
12
|
+
"lint": "eslint -c .eslintrc.js"
|
|
13
|
+
},
|
|
14
|
+
"author": "William Khoo",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=16"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@nathapp/nestjs-cache": "^2.1.0",
|
|
21
|
+
"@nathapp/nestjs-microservices": "^2.1.0",
|
|
22
|
+
"eslint": "^8.57.0",
|
|
23
|
+
"typescript": "^5"
|
|
24
|
+
},
|
|
25
|
+
"types": "./index.d.ts",
|
|
26
|
+
"main": "index.js",
|
|
27
|
+
"directories": {
|
|
28
|
+
"lib": "lib"
|
|
29
|
+
},
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@nathapp/nestjs-auth": "^2.1.0",
|
|
32
|
+
"@nathapp/nestjs-common": "^2.1.0"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"@nathapp/auth": "^1.0.2",
|
|
36
|
+
"@nathapp/nestjs-auth": "^2.1.0",
|
|
37
|
+
"@nathapp/nestjs-cache": "^2.1.0",
|
|
38
|
+
"@nathapp/nestjs-common": "^2.1.0",
|
|
39
|
+
"@nathapp/nestjs-microservices": "^2.1.0",
|
|
40
|
+
"@nestjs/common": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
|
|
41
|
+
"@nestjs/config": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0",
|
|
42
|
+
"@nestjs/core": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
|
|
43
|
+
"@nestjs/passport": "^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0",
|
|
44
|
+
"@nestjs/swagger": "^7.1.1 || ^8.0.0 || ^11.0.0",
|
|
45
|
+
"cache-manager": ">=6",
|
|
46
|
+
"class-transformer": "*",
|
|
47
|
+
"class-validator": "*",
|
|
48
|
+
"rxjs": "*"
|
|
49
|
+
},
|
|
50
|
+
"peerDependenciesMeta": {
|
|
51
|
+
"@nathapp/nestjs-cache": {
|
|
52
|
+
"optional": true
|
|
53
|
+
},
|
|
54
|
+
"@nathapp/nestjs-microservices": {
|
|
55
|
+
"optional": true
|
|
56
|
+
},
|
|
57
|
+
"@nestjs/websockets": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"@nestjs/microservices": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@nestjs/platform-express": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"@nestjs/platform-fastify": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"cache-manager": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"helmet": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"@fastify/helmet": {
|
|
76
|
+
"optional": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|