fiscalia_bo-nest-helpers 1.1.37 → 1.1.39
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.
@@ -1,4 +1,5 @@
|
|
1
1
|
import { INestApplication } from '@nestjs/common';
|
2
|
+
import { SwaggerCustomOptions } from '@nestjs/swagger';
|
2
3
|
import { IPackageJson } from 'src/dto';
|
3
|
-
export declare const configSwagger: (app: INestApplication, packageJson: IPackageJson) => void;
|
4
|
+
export declare const configSwagger: (app: INestApplication, packageJson: IPackageJson, options?: SwaggerCustomOptions) => void;
|
4
5
|
export declare const printServerInitLog: (app: INestApplication, packageJson: IPackageJson, route?: string) => Promise<void>;
|
@@ -4,7 +4,7 @@ exports.printServerInitLog = exports.configSwagger = void 0;
|
|
4
4
|
const swagger_1 = require("@nestjs/swagger");
|
5
5
|
const package_json_helper_1 = require("./package-json.helper");
|
6
6
|
const chalk_1 = require("chalk");
|
7
|
-
const configSwagger = (app, packageJson) => {
|
7
|
+
const configSwagger = (app, packageJson, options = {}) => {
|
8
8
|
const config = new swagger_1.DocumentBuilder()
|
9
9
|
.setTitle((0, package_json_helper_1.nameParsePresentation)(packageJson.name))
|
10
10
|
.setVersion(packageJson.version)
|
@@ -14,16 +14,12 @@ const configSwagger = (app, packageJson) => {
|
|
14
14
|
.addBearerAuth()
|
15
15
|
.build();
|
16
16
|
const document = swagger_1.SwaggerModule.createDocument(app, config);
|
17
|
-
swagger_1.SwaggerModule.setup('api', app, document, {
|
18
|
-
customSiteTitle: (0, package_json_helper_1.nameParsePresentation)(packageJson.name),
|
19
|
-
customfavIcon: '../assets/images/favicon.ico',
|
20
|
-
customCss: `
|
17
|
+
swagger_1.SwaggerModule.setup('api', app, document, Object.assign({ customSiteTitle: (0, package_json_helper_1.nameParsePresentation)(packageJson.name), customfavIcon: '../assets/images/favicon.ico', customCss: `
|
21
18
|
.swagger-ui .topbar { display: none; }
|
22
19
|
.swagger-ui .info { margin: 20px 0;}
|
23
20
|
.swagger-ui .info hgroup.main { margin: 0 0 0;}
|
24
21
|
.title span { display: block; }
|
25
|
-
|
26
|
-
});
|
22
|
+
` }, options));
|
27
23
|
};
|
28
24
|
exports.configSwagger = configSwagger;
|
29
25
|
const printServerInitLog = async (app, packageJson, route = 'api') => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"swagger.helper.js","sourceRoot":"","sources":["../../src/helpers/swagger.helper.ts"],"names":[],"mappings":";;;AACA,
|
1
|
+
{"version":3,"file":"swagger.helper.js","sourceRoot":"","sources":["../../src/helpers/swagger.helper.ts"],"names":[],"mappings":";;;AACA,6CAAuF;AACvF,+DAA8D;AAE9D,iCAA6B;AAEtB,MAAM,aAAa,GAAG,CAC3B,GAAqB,EACrB,WAAyB,EACzB,UAAgC,EAAE,EAClC,EAAE;IACF,MAAM,MAAM,GAAG,IAAI,yBAAe,EAAE;SACjC,QAAQ,CAAC,IAAA,2CAAqB,EAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACjD,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC;SAC/B,cAAc,CAAC,WAAW,CAAC,WAAW,CAAC;SACvC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;SACnE,UAAU,CAAC,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;SAC1D,aAAa,EAAE;SACf,KAAK,EAAE,CAAC;IAEX,MAAM,QAAQ,GAAG,uBAAa,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC3D,uBAAa,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,kBACtC,eAAe,EAAE,IAAA,2CAAqB,EAAC,WAAW,CAAC,IAAI,CAAC,EACxD,aAAa,EAAE,8BAA8B,EAC7C,SAAS,EAAE;;;;;KAKV,IACE,OAAO,EACV,CAAC;AACL,CAAC,CAAC;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