@achinet/nestjs-async 0.1.1 → 0.3.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/dist/asyncapi-document.builder.d.ts +1 -1
- package/dist/asyncapi-document.builder.js.map +1 -1
- package/dist/asyncapi.module.js +8 -5
- package/dist/asyncapi.module.js.map +1 -1
- package/dist/binding/asyncapi.kafka.interfaces.d.ts +1 -1
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js +3 -3
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-operation.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-pub.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-service.decorator.d.ts +1 -1
- package/dist/decorators/asyncapi-service.decorator.js +2 -2
- package/dist/decorators/asyncapi-service.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-sub.decorator.js.map +1 -1
- package/dist/explorers/asyncapi-class.explorer.js +1 -5
- package/dist/explorers/asyncapi-class.explorer.js.map +1 -1
- package/dist/explorers/asyncapi-operation.explorer.d.ts +1 -2
- package/dist/explorers/asyncapi-operation.explorer.js +2 -2
- package/dist/explorers/asyncapi-operation.explorer.js.map +1 -1
- package/dist/interface/asyncapi-common.interfaces.d.ts +1 -1
- package/dist/interface/asyncapi-server.interface.d.ts +1 -1
- package/dist/interface/asyncapi-template-options.interface.d.ts +2 -3
- package/dist/interface/index.d.ts +0 -1
- package/dist/interface/index.js +0 -1
- package/dist/interface/index.js.map +1 -1
- package/dist/services/asyncapi.explorer.d.ts +2 -4
- package/dist/services/asyncapi.explorer.js +8 -13
- package/dist/services/asyncapi.explorer.js.map +1 -1
- package/dist/services/asyncapi.generator.d.ts +4 -3
- package/dist/services/asyncapi.generator.js +72 -17
- package/dist/services/asyncapi.generator.js.map +1 -1
- package/dist/services/asyncapi.scanner.d.ts +1 -4
- package/dist/services/asyncapi.scanner.js +10 -31
- package/dist/services/asyncapi.scanner.js.map +1 -1
- package/dist/services/asyncapi.transformer.js.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/operation-object.factory.d.ts +2 -6
- package/dist/services/operation-object.factory.js +7 -14
- package/dist/services/operation-object.factory.js.map +1 -1
- package/dist/services/swagger-schema.factory.d.ts +6 -0
- package/dist/services/swagger-schema.factory.js +27 -0
- package/dist/services/swagger-schema.factory.js.map +1 -0
- package/dist/utils/decorator.utils.d.ts +2 -0
- package/dist/utils/decorator.utils.js +26 -0
- package/dist/utils/decorator.utils.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/{sample/felines/rto → utils}/index.js +2 -1
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/path.utils.d.ts +2 -0
- package/dist/utils/path.utils.js +8 -0
- package/dist/utils/path.utils.js.map +1 -0
- package/package.json +57 -37
- package/.prettierrc +0 -5
- package/CHANGELOG.md +0 -20
- package/dist/interface/generator-options.interface.d.ts +0 -22
- package/dist/interface/generator-options.interface.js +0 -3
- package/dist/interface/generator-options.interface.js.map +0 -1
- package/dist/sample/app.module.d.ts +0 -2
- package/dist/sample/app.module.js +0 -20
- package/dist/sample/app.module.js.map +0 -1
- package/dist/sample/common.d.ts +0 -3
- package/dist/sample/common.js +0 -40
- package/dist/sample/common.js.map +0 -1
- package/dist/sample/constants.d.ts +0 -12
- package/dist/sample/constants.js +0 -16
- package/dist/sample/constants.js.map +0 -1
- package/dist/sample/felines/class/cat.class.d.ts +0 -4
- package/dist/sample/felines/class/cat.class.js +0 -24
- package/dist/sample/felines/class/cat.class.js.map +0 -1
- package/dist/sample/felines/class/feline.class.d.ts +0 -19
- package/dist/sample/felines/class/feline.class.js +0 -20
- package/dist/sample/felines/class/feline.class.js.map +0 -1
- package/dist/sample/felines/class/index.d.ts +0 -5
- package/dist/sample/felines/class/index.js +0 -22
- package/dist/sample/felines/class/index.js.map +0 -1
- package/dist/sample/felines/class/lion.class.d.ts +0 -4
- package/dist/sample/felines/class/lion.class.js +0 -8
- package/dist/sample/felines/class/lion.class.js.map +0 -1
- package/dist/sample/felines/class/message.class.d.ts +0 -7
- package/dist/sample/felines/class/message.class.js +0 -28
- package/dist/sample/felines/class/message.class.js.map +0 -1
- package/dist/sample/felines/class/tiger.class.d.ts +0 -4
- package/dist/sample/felines/class/tiger.class.js +0 -8
- package/dist/sample/felines/class/tiger.class.js.map +0 -1
- package/dist/sample/felines/dto/create-feline.dto.d.ts +0 -4
- package/dist/sample/felines/dto/create-feline.dto.js +0 -28
- package/dist/sample/felines/dto/create-feline.dto.js.map +0 -1
- package/dist/sample/felines/dto/index.d.ts +0 -2
- package/dist/sample/felines/dto/index.js +0 -19
- package/dist/sample/felines/dto/index.js.map +0 -1
- package/dist/sample/felines/dto/journaling-data.dto.d.ts +0 -4
- package/dist/sample/felines/dto/journaling-data.dto.js +0 -8
- package/dist/sample/felines/dto/journaling-data.dto.js.map +0 -1
- package/dist/sample/felines/felines.constants.d.ts +0 -1
- package/dist/sample/felines/felines.constants.js +0 -5
- package/dist/sample/felines/felines.constants.js.map +0 -1
- package/dist/sample/felines/felines.controller.d.ts +0 -15
- package/dist/sample/felines/felines.controller.js +0 -101
- package/dist/sample/felines/felines.controller.js.map +0 -1
- package/dist/sample/felines/felines.gateway.d.ts +0 -16
- package/dist/sample/felines/felines.gateway.js +0 -90
- package/dist/sample/felines/felines.gateway.js.map +0 -1
- package/dist/sample/felines/felines.module.d.ts +0 -2
- package/dist/sample/felines/felines.module.js +0 -28
- package/dist/sample/felines/felines.module.js.map +0 -1
- package/dist/sample/felines/felines.service.d.ts +0 -8
- package/dist/sample/felines/felines.service.js +0 -33
- package/dist/sample/felines/felines.service.js.map +0 -1
- package/dist/sample/felines/rto/feline.rto.d.ts +0 -7
- package/dist/sample/felines/rto/feline.rto.js +0 -31
- package/dist/sample/felines/rto/feline.rto.js.map +0 -1
- package/dist/sample/felines/rto/index.d.ts +0 -1
- package/dist/sample/felines/rto/index.js.map +0 -1
- package/dist/sample/index.d.ts +0 -3
- package/dist/sample/index.js +0 -20
- package/dist/sample/index.js.map +0 -1
- package/dist/sample/main.d.ts +0 -1
- package/dist/sample/main.js +0 -30
- package/dist/sample/main.js.map +0 -1
- package/dist/src/asyncapi-document.builder.d.ts +0 -27
- package/dist/src/asyncapi-document.builder.js +0 -110
- package/dist/src/asyncapi-document.builder.js.map +0 -1
- package/dist/src/asyncapi.constants.d.ts +0 -6
- package/dist/src/asyncapi.constants.js +0 -11
- package/dist/src/asyncapi.constants.js.map +0 -1
- package/dist/src/asyncapi.module.d.ts +0 -8
- package/dist/src/asyncapi.module.js +0 -47
- package/dist/src/asyncapi.module.js.map +0 -1
- package/dist/src/binding/asyncapi.amqp.interfaces.d.ts +0 -38
- package/dist/src/binding/asyncapi.amqp.interfaces.js +0 -3
- package/dist/src/binding/asyncapi.amqp.interfaces.js.map +0 -1
- package/dist/src/binding/asyncapi.kafka.interfaces.d.ts +0 -21
- package/dist/src/binding/asyncapi.kafka.interfaces.js +0 -3
- package/dist/src/binding/asyncapi.kafka.interfaces.js.map +0 -1
- package/dist/src/binding/index.d.ts +0 -2
- package/dist/src/binding/index.js +0 -19
- package/dist/src/binding/index.js.map +0 -1
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js +0 -37
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-operation.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-operation.decorator.js +0 -9
- package/dist/src/decorators/asyncapi-operation.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-pub.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-pub.decorator.js +0 -10
- package/dist/src/decorators/asyncapi-pub.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-service.decorator.d.ts +0 -1
- package/dist/src/decorators/asyncapi-service.decorator.js +0 -9
- package/dist/src/decorators/asyncapi-service.decorator.js.map +0 -1
- package/dist/src/decorators/asyncapi-sub.decorator.d.ts +0 -2
- package/dist/src/decorators/asyncapi-sub.decorator.js +0 -10
- package/dist/src/decorators/asyncapi-sub.decorator.js.map +0 -1
- package/dist/src/decorators/index.d.ts +0 -4
- package/dist/src/decorators/index.js +0 -21
- package/dist/src/decorators/index.js.map +0 -1
- package/dist/src/explorers/asyncapi-class.explorer.d.ts +0 -5
- package/dist/src/explorers/asyncapi-class.explorer.js +0 -27
- package/dist/src/explorers/asyncapi-class.explorer.js.map +0 -1
- package/dist/src/explorers/asyncapi-operation.explorer.d.ts +0 -17
- package/dist/src/explorers/asyncapi-operation.explorer.js +0 -26
- package/dist/src/explorers/asyncapi-operation.explorer.js.map +0 -1
- package/dist/src/explorers/index.d.ts +0 -2
- package/dist/src/explorers/index.js +0 -19
- package/dist/src/explorers/index.js.map +0 -1
- package/dist/src/index.d.ts +0 -4
- package/dist/src/index.js +0 -21
- package/dist/src/index.js.map +0 -1
- package/dist/src/interface/asyncapi-common.interfaces.d.ts +0 -126
- package/dist/src/interface/asyncapi-common.interfaces.js +0 -3
- package/dist/src/interface/asyncapi-common.interfaces.js.map +0 -1
- package/dist/src/interface/asyncapi-document-options.interface.d.ts +0 -3
- package/dist/src/interface/asyncapi-document-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-document-options.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-message.interface.d.ts +0 -8
- package/dist/src/interface/asyncapi-message.interface.js +0 -3
- package/dist/src/interface/asyncapi-message.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-headers.interface.d.ts +0 -6
- package/dist/src/interface/asyncapi-operation-headers.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-headers.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-options-raw.interface.d.ts +0 -21
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-options.interface.d.ts +0 -8
- package/dist/src/interface/asyncapi-operation-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-options.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-operation-payload.interface.d.ts +0 -2
- package/dist/src/interface/asyncapi-operation-payload.interface.js +0 -3
- package/dist/src/interface/asyncapi-operation-payload.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-server.interface.d.ts +0 -10
- package/dist/src/interface/asyncapi-server.interface.js +0 -3
- package/dist/src/interface/asyncapi-server.interface.js.map +0 -1
- package/dist/src/interface/asyncapi-template-options.interface.d.ts +0 -7
- package/dist/src/interface/asyncapi-template-options.interface.js +0 -3
- package/dist/src/interface/asyncapi-template-options.interface.js.map +0 -1
- package/dist/src/interface/denormalized-doc-resolvers.interface.d.ts +0 -6
- package/dist/src/interface/denormalized-doc-resolvers.interface.js +0 -3
- package/dist/src/interface/denormalized-doc-resolvers.interface.js.map +0 -1
- package/dist/src/interface/denormalized-doc.interface.d.ts +0 -10
- package/dist/src/interface/denormalized-doc.interface.js +0 -3
- package/dist/src/interface/denormalized-doc.interface.js.map +0 -1
- package/dist/src/interface/generator-options.interface.d.ts +0 -22
- package/dist/src/interface/generator-options.interface.js +0 -3
- package/dist/src/interface/generator-options.interface.js.map +0 -1
- package/dist/src/interface/index.d.ts +0 -11
- package/dist/src/interface/index.js +0 -28
- package/dist/src/interface/index.js.map +0 -1
- package/dist/src/services/asyncapi.explorer.d.ts +0 -12
- package/dist/src/services/asyncapi.explorer.js +0 -69
- package/dist/src/services/asyncapi.explorer.js.map +0 -1
- package/dist/src/services/asyncapi.generator.d.ts +0 -6
- package/dist/src/services/asyncapi.generator.js +0 -68
- package/dist/src/services/asyncapi.generator.js.map +0 -1
- package/dist/src/services/asyncapi.scanner.d.ts +0 -14
- package/dist/src/services/asyncapi.scanner.js +0 -71
- package/dist/src/services/asyncapi.scanner.js.map +0 -1
- package/dist/src/services/asyncapi.transformer.d.ts +0 -4
- package/dist/src/services/asyncapi.transformer.js +0 -33
- package/dist/src/services/asyncapi.transformer.js.map +0 -1
- package/dist/src/services/index.d.ts +0 -4
- package/dist/src/services/index.js +0 -21
- package/dist/src/services/index.js.map +0 -1
- package/dist/src/services/operation-object.factory.d.ts +0 -9
- package/dist/src/services/operation-object.factory.js +0 -37
- package/dist/src/services/operation-object.factory.js.map +0 -1
- package/dist/test/configs/jest-base.config.d.ts +0 -3
- package/dist/test/configs/jest-base.config.js +0 -20
- package/dist/test/configs/jest-base.config.js.map +0 -1
- package/dist/test/configs/jest-e2e.config.d.ts +0 -3
- package/dist/test/configs/jest-e2e.config.js +0 -16
- package/dist/test/configs/jest-e2e.config.js.map +0 -1
- package/dist/test/express.e2e-spec.d.ts +0 -1
- package/dist/test/express.e2e-spec.js +0 -89
- package/dist/test/express.e2e-spec.js.map +0 -1
- package/dist/test/fastify.e2e-spec.d.ts +0 -1
- package/dist/test/fastify.e2e-spec.js +0 -57
- package/dist/test/fastify.e2e-spec.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/eslint.config.mjs +0 -21
- package/misc/references/ref.html +0 -303
- package/misc/references/ref.json +0 -1
- package/misc/references/ref.yaml +0 -292
- package/misc/take-snaphots.sh +0 -8
- package/sample/app.module.ts +0 -7
- package/sample/common.ts +0 -49
- package/sample/constants.ts +0 -12
- package/sample/felines/class/cat.class.ts +0 -9
- package/sample/felines/class/feline.class.ts +0 -29
- package/sample/felines/class/index.ts +0 -5
- package/sample/felines/class/lion.class.ts +0 -5
- package/sample/felines/class/message.class.ts +0 -17
- package/sample/felines/class/tiger.class.ts +0 -5
- package/sample/felines/dto/create-feline.dto.ts +0 -13
- package/sample/felines/dto/index.ts +0 -2
- package/sample/felines/dto/journaling-data.dto.ts +0 -5
- package/sample/felines/felines.constants.ts +0 -1
- package/sample/felines/felines.controller.ts +0 -76
- package/sample/felines/felines.gateway.ts +0 -76
- package/sample/felines/felines.module.ts +0 -15
- package/sample/felines/felines.service.ts +0 -24
- package/sample/felines/rto/feline.rto.ts +0 -17
- package/sample/felines/rto/index.ts +0 -1
- package/sample/index.ts +0 -3
- package/sample/main.ts +0 -34
- package/src/asyncapi-document.builder.ts +0 -172
- package/src/asyncapi.constants.ts +0 -8
- package/src/asyncapi.module.ts +0 -65
- package/src/binding/asyncapi.amqp.interfaces.ts +0 -48
- package/src/binding/asyncapi.kafka.interfaces.ts +0 -35
- package/src/binding/index.ts +0 -2
- package/src/decorators/asyncapi-operation-for-meta-key.decorator.ts +0 -58
- package/src/decorators/asyncapi-operation.decorator.ts +0 -7
- package/src/decorators/asyncapi-pub.decorator.ts +0 -11
- package/src/decorators/asyncapi-service.decorator.ts +0 -9
- package/src/decorators/asyncapi-sub.decorator.ts +0 -11
- package/src/decorators/index.ts +0 -4
- package/src/explorers/asyncapi-class.explorer.ts +0 -26
- package/src/explorers/asyncapi-operation.explorer.ts +0 -40
- package/src/explorers/index.ts +0 -2
- package/src/index.ts +0 -4
- package/src/interface/asyncapi-common.interfaces.ts +0 -169
- package/src/interface/asyncapi-document-options.interface.ts +0 -3
- package/src/interface/asyncapi-message.interface.ts +0 -10
- package/src/interface/asyncapi-operation-headers.interface.ts +0 -6
- package/src/interface/asyncapi-operation-options-raw.interface.ts +0 -23
- package/src/interface/asyncapi-operation-options.interface.ts +0 -10
- package/src/interface/asyncapi-operation-payload.interface.ts +0 -3
- package/src/interface/asyncapi-server.interface.ts +0 -11
- package/src/interface/asyncapi-template-options.interface.ts +0 -20
- package/src/interface/denormalized-doc-resolvers.interface.ts +0 -6
- package/src/interface/denormalized-doc.interface.ts +0 -6
- package/src/interface/generator-options.interface.ts +0 -21
- package/src/interface/index.ts +0 -12
- package/src/services/asyncapi.explorer.ts +0 -112
- package/src/services/asyncapi.generator.ts +0 -45
- package/src/services/asyncapi.scanner.ts +0 -105
- package/src/services/asyncapi.transformer.ts +0 -33
- package/src/services/index.ts +0 -4
- package/src/services/operation-object.factory.ts +0 -55
- package/test/__mocks__/@asyncapi/generator.js +0 -41
- package/test/configs/jest-base.config.ts +0 -19
- package/test/configs/jest-e2e.config.js +0 -7
- package/test/configs/jest-e2e.config.ts +0 -19
- package/test/configs/jest-swagger-plugin.js +0 -16
- package/test/express.e2e-spec.ts +0 -64
- package/test/fastify.e2e-spec.ts +0 -65
- package/tsconfig.build.json +0 -4
- package/tsconfig.json +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExternalDocumentationObject, SecuritySchemeObject } from '@nestjs/swagger
|
|
1
|
+
import { ExternalDocumentationObject, SecuritySchemeObject } from '@nestjs/swagger';
|
|
2
2
|
import { AsyncApiDocument, AsyncSecuritySchemeObject, AsyncServerObject } from './interface';
|
|
3
3
|
export declare class AsyncApiDocumentBuilder {
|
|
4
4
|
private readonly buildDocumentBase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-document.builder.js","sourceRoot":"","sources":["../src/asyncapi-document.builder.ts"],"names":[],"mappings":";;;AAKA,mCAAqD;
|
|
1
|
+
{"version":3,"file":"asyncapi-document.builder.js","sourceRoot":"","sources":["../src/asyncapi-document.builder.ts"],"names":[],"mappings":";;;AAKA,mCAAqD;AAGrD,MAAa,uBAAuB;IAApC;QACmB,sBAAiB,GAAG,GAAuC,EAAE,CAAC,CAAC;YAC9E,QAAQ,EAAE,OAAO;YACjB,IAAI,EAAE;gBACJ,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,EAAE;gBACf,OAAO,EAAE,OAAO;gBAChB,OAAO,EAAE,EAAE;aACZ;YACD,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,EAAE;SACf,CAAC,CAAC;QAEc,aAAQ,GAAuC,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAqJ3F,CAAC;IAnJQ,QAAQ,CAAC,KAAa;QAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACjC,OAAO,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nB,EAAE,EAAE,QAAQ,EACZ,IAAI,IACD,OAAO,EACV,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,YAAY,CACjB,UAAgC;QAC9B,IAAI,EAAE,MAAM;KACb,EACD,IAAI,GAAG,OAAO;QAEd,IAAI,CAAC,WAAW,CAAC,IAAI,kBACnB,MAAM,EAAE,OAAO,IACZ,OAAO,EACV,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,aAAa,CAClB,UAAU,GAAG,aAAa,EAC1B,UAAgC;QAC9B,IAAI,EAAE,QAAQ;KACf,EACD,YAAY,GAAG,QAAQ;QAEvB,IAAI,CAAC,WAAW,CAAC,YAAY,kBAC3B,EAAE,EAAE,QAAQ,EACZ,IAAI,EAAE,UAAU,IACb,OAAO,EACV,CAAC;QACH,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AAnKD,0DAmKC"}
|
package/dist/asyncapi.module.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.AsyncApiModule = void 0;
|
|
4
7
|
const common_1 = require("@nestjs/common");
|
|
5
|
-
const
|
|
6
|
-
const js_yaml_1 = require("js-yaml");
|
|
8
|
+
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
7
9
|
const services_1 = require("./services");
|
|
10
|
+
const utils_1 = require("./utils");
|
|
8
11
|
class AsyncApiModule {
|
|
9
12
|
static createDocument(app, config, options = {}) {
|
|
10
13
|
const asyncapiScanner = new services_1.AsyncapiScanner();
|
|
@@ -21,7 +24,7 @@ class AsyncApiModule {
|
|
|
21
24
|
}
|
|
22
25
|
static async setup(path, app, document, templateOptions) {
|
|
23
26
|
const httpAdapter = app.getHttpAdapter();
|
|
24
|
-
const finalPath = (0,
|
|
27
|
+
const finalPath = (0, utils_1.validatePath)(path);
|
|
25
28
|
const html = await this.composeHtml(document, templateOptions);
|
|
26
29
|
const yamlDocument = js_yaml_1.default.dump(document);
|
|
27
30
|
const jsonDocument = JSON.stringify(document);
|
|
@@ -29,11 +32,11 @@ class AsyncApiModule {
|
|
|
29
32
|
res.type('text/html');
|
|
30
33
|
res.send(html);
|
|
31
34
|
});
|
|
32
|
-
httpAdapter.get(finalPath
|
|
35
|
+
httpAdapter.get(`${finalPath}-json`, (req, res) => {
|
|
33
36
|
res.type('application/json');
|
|
34
37
|
res.send(jsonDocument);
|
|
35
38
|
});
|
|
36
|
-
httpAdapter.get(finalPath
|
|
39
|
+
httpAdapter.get(`${finalPath}-yaml`, (req, res) => {
|
|
37
40
|
res.type('text/yaml');
|
|
38
41
|
res.send(yamlDocument);
|
|
39
42
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi.module.js","sourceRoot":"","sources":["../src/asyncapi.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asyncapi.module.js","sourceRoot":"","sources":["../src/asyncapi.module.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAmF;AACnF,sDAA6B;AAE7B,yCAAgE;AAChE,mCAAuC;AAEvC,MAAa,cAAc;IAGlB,MAAM,CAAC,cAAc,CAC1B,GAA4B,EAC5B,MAA0C,EAC1C,UAAmC,EAAE;QAErC,MAAM,eAAe,GAAG,IAAI,0BAAe,EAAE,CAAC;QAC9C,MAAM,QAAQ,GAAG,eAAe,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAE/D,QAAQ,CAAC,UAAU,mCACd,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,GACzB,QAAQ,CAAC,UAAU,CACvB,CAAC;QAEF,uCACK,MAAM,GACN,QAAQ,EACX;IACJ,CAAC;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E,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YAChD,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACtB,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;;AAzDH,wCA0DC;AAzDyB,qBAAM,GAAG,IAAI,eAAM,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncApiOperationForMetaKey = AsyncApiOperationForMetaKey;
|
|
4
|
-
const
|
|
4
|
+
const utils_1 = require("../utils");
|
|
5
5
|
function makeHeaders(headers) {
|
|
6
6
|
return headers
|
|
7
7
|
? {
|
|
@@ -25,13 +25,13 @@ function AsyncApiOperationForMetaKey(metaKey, options) {
|
|
|
25
25
|
const transformedOptions = options.map((i) => {
|
|
26
26
|
const message = Array.isArray(i.message)
|
|
27
27
|
? {
|
|
28
|
-
oneOf: i.message.map((
|
|
28
|
+
oneOf: i.message.map((j, index) => makeMessage(j, `${methodName}#${index}`)),
|
|
29
29
|
}
|
|
30
30
|
: makeMessage(i.message, methodName);
|
|
31
31
|
const transformedOptionInstance = Object.assign(Object.assign({}, i), { message });
|
|
32
32
|
return transformedOptionInstance;
|
|
33
33
|
});
|
|
34
|
-
return (0,
|
|
34
|
+
return (0, utils_1.createMethodDecorator)(metaKey, transformedOptions)(target, propertyKey, descriptor);
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=asyncapi-operation-for-meta-key.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-operation-for-meta-key.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-operation-for-meta-key.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"asyncapi-operation-for-meta-key.decorator.js","sourceRoot":"","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,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,GAAG,UAAU,IAAI,KAAK,EAAE,CAAC,CAAC;iBAC7E;gBACH,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;YAEvC,MAAM,yBAAyB,mCAC1B,CAAC,KACJ,OAAO,GACR,CAAC;YAEF,OAAO,yBAAyB,CAAC;QACnC,CAAC,CAAC,CAAC;QAEH,OAAO,IAAA,6BAAqB,EAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC;IAC7F,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-operation.decorator.ts"],"names":[],"mappings":";;AAIA,
|
|
1
|
+
{"version":3,"file":"asyncapi-operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-operation.decorator.ts"],"names":[],"mappings":";;AAIA,8CAEC;AAND,8DAAmD;AAEnD,2GAA0F;AAE1F,SAAgB,iBAAiB,CAAC,GAAG,OAAmC;IACtE,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-pub.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-pub.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"asyncapi-pub.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-pub.decorator.ts"],"names":[],"mappings":";;AAIA,kCAMC;AAVD,8DAAmD;AAEnD,2GAA0F;AAE1F,SAAgB,WAAW,CAAC,GAAG,wBAA4D;IACzF,MAAM,OAAO,GAA+B,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAC3E,CAAC,KACJ,IAAI,EAAE,KAAK,IACX,CAAC,CAAC;IACJ,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function AsyncApi():
|
|
1
|
+
export declare function AsyncApi(): ClassDecorator & MethodDecorator;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncApi = AsyncApi;
|
|
4
|
-
const helpers_1 = require("@nestjs/swagger/dist/decorators/helpers");
|
|
5
4
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
6
|
function AsyncApi() {
|
|
7
|
-
return (0,
|
|
7
|
+
return (0, utils_1.createMixedDecorator)(asyncapi_constants_1.DECORATORS.AsyncApiClass, true);
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=asyncapi-service.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-service.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-service.decorator.ts"],"names":[],"mappings":";;AAMA,4BAEC;AARD,
|
|
1
|
+
{"version":3,"file":"asyncapi-service.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-service.decorator.ts"],"names":[],"mappings":";;AAMA,4BAEC;AARD,8DAAmD;AACnD,oCAAgD;AAKhD,SAAgB,QAAQ;IACtB,OAAO,IAAA,4BAAoB,EAAC,+BAAU,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-sub.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-sub.decorator.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"asyncapi-sub.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-sub.decorator.ts"],"names":[],"mappings":";;AAIA,kCAMC;AAVD,8DAAmD;AAEnD,2GAA0F;AAE1F,SAAgB,WAAW,CAAC,GAAG,wBAA4D;IACzF,MAAM,OAAO,GAA+B,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAC3E,CAAC,KACJ,IAAI,EAAE,KAAK,IACX,CAAC,CAAC;IACJ,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -11,11 +11,7 @@ try {
|
|
|
11
11
|
catch (_a) {
|
|
12
12
|
GATEWAY_METADATA = '__gateway__';
|
|
13
13
|
}
|
|
14
|
-
exports.asyncApiClassAnnotationLabels = [
|
|
15
|
-
asyncapi_constants_1.DECORATORS.AsyncApiClass,
|
|
16
|
-
constants_1.CONTROLLER_WATERMARK,
|
|
17
|
-
GATEWAY_METADATA,
|
|
18
|
-
];
|
|
14
|
+
exports.asyncApiClassAnnotationLabels = [asyncapi_constants_1.DECORATORS.AsyncApiClass, constants_1.CONTROLLER_WATERMARK, GATEWAY_METADATA];
|
|
19
15
|
const exploreAsyncapiClassMetadata = (metatype) => {
|
|
20
16
|
return Reflect.getMetadata(asyncapi_constants_1.DECORATORS.AsyncApiClass, metatype);
|
|
21
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-class.explorer.js","sourceRoot":"","sources":["../../src/explorers/asyncapi-class.explorer.ts"],"names":[],"mappings":";;;AACA,wDAAgE;AAChE,8DAAmD;AAEnD,IAAI,gBAAgB,CAAC;AACrB,IAAI,CAAC;IAEH,MAAM,WAAW,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC5D,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AAClD,CAAC;AAAC,WAAM,CAAC;IACP,gBAAgB,GAAG,aAAa,CAAC;AACnC,CAAC;AAEY,QAAA,6BAA6B,GAAG
|
|
1
|
+
{"version":3,"file":"asyncapi-class.explorer.js","sourceRoot":"","sources":["../../src/explorers/asyncapi-class.explorer.ts"],"names":[],"mappings":";;;AACA,wDAAgE;AAChE,8DAAmD;AAEnD,IAAI,gBAAgB,CAAC;AACrB,IAAI,CAAC;IAEH,MAAM,WAAW,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC5D,gBAAgB,GAAG,WAAW,CAAC,gBAAgB,CAAC;AAClD,CAAC;AAAC,WAAM,CAAC;IACP,gBAAgB,GAAG,aAAa,CAAC;AACnC,CAAC;AAEY,QAAA,6BAA6B,GAAG,CAAC,+BAAU,CAAC,aAAa,EAAE,gCAAoB,EAAE,gBAAgB,CAAC,CAAC;AAEzG,MAAM,4BAA4B,GAAG,CAAC,QAAuB,EAAE,EAAE;IACtE,OAAO,OAAO,CAAC,WAAW,CAAC,+BAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AACjE,CAAC,CAAC;AAFW,QAAA,4BAA4B,gCAEvC;AAEK,MAAM,yBAAyB,GAAG,CAAC,QAAuB,EAAE,EAAE;IACnE,OAAO,OAAO,CAAC,WAAW,CAAC,gCAAoB,EAAE,QAAQ,CAAC,CAAC;AAC7D,CAAC,CAAC;AAFW,QAAA,yBAAyB,6BAEpC;AAEK,MAAM,sBAAsB,GAAG,CAAC,QAAuB,EAAE,EAAE;IAChE,OAAO,OAAO,CAAC,WAAW,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC,CAAC;AAFW,QAAA,sBAAsB,0BAEjC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Type } from '@nestjs/common';
|
|
2
|
-
|
|
3
|
-
export declare const exploreAsyncApiOperationMetadata: (schemas: Record<string, SchemaObject>, _instance: object, _prototype: Type<unknown>, method: object) => {
|
|
2
|
+
export declare const exploreAsyncApiOperationMetadata: (models: Set<Function>, _instance: object, _prototype: Type<unknown>, method: object) => {
|
|
4
3
|
[x: string]: string | {
|
|
5
4
|
channel: undefined;
|
|
6
5
|
type: undefined;
|
|
@@ -4,7 +4,7 @@ exports.exploreAsyncApiOperationMetadata = void 0;
|
|
|
4
4
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
5
5
|
const services_1 = require("../services");
|
|
6
6
|
const operationObjectFactory = new services_1.OperationObjectFactory();
|
|
7
|
-
const exploreAsyncApiOperationMetadata = (
|
|
7
|
+
const exploreAsyncApiOperationMetadata = (models, _instance, _prototype, method) => {
|
|
8
8
|
const metadataOperations = Reflect.getMetadata(asyncapi_constants_1.DECORATORS.AsyncApiOperation, method);
|
|
9
9
|
const metadataSubs = Reflect.getMetadata(asyncapi_constants_1.DECORATORS.AsyncApiSub, method);
|
|
10
10
|
const metadataPubs = Reflect.getMetadata(asyncapi_constants_1.DECORATORS.AsyncApiPub, method);
|
|
@@ -15,7 +15,7 @@ const exploreAsyncApiOperationMetadata = (schemas, _instance, _prototype, method
|
|
|
15
15
|
];
|
|
16
16
|
return metadataCombined.map((option) => {
|
|
17
17
|
const { channel, type } = option;
|
|
18
|
-
const methodTypeData = Object.assign(Object.assign(Object.assign({}, option), operationObjectFactory.create(option, ['application/json'],
|
|
18
|
+
const methodTypeData = Object.assign(Object.assign(Object.assign({}, option), operationObjectFactory.create(option, ['application/json'], models)), { channel: undefined, type: undefined });
|
|
19
19
|
return {
|
|
20
20
|
channel,
|
|
21
21
|
[type]: methodTypeData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-operation.explorer.js","sourceRoot":"","sources":["../../src/explorers/asyncapi-operation.explorer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"asyncapi-operation.explorer.js","sourceRoot":"","sources":["../../src/explorers/asyncapi-operation.explorer.ts"],"names":[],"mappings":";;;AACA,8DAAmD;AAEnD,0CAAqD;AAErD,MAAM,sBAAsB,GAAG,IAAI,iCAAsB,EAAE,CAAC;AAErD,MAAM,gC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, ServerVariableObject } from '@nestjs/swagger
|
|
1
|
+
import { InfoObject, ReferenceObject, SchemaObject, ServerVariableObject } from '@nestjs/swagger';
|
|
2
2
|
import { AmqpChannelBinding, AmqpMessageBinding, AmqpOperationBinding, AmqpServerBinding, KafkaChannelBinding, KafkaMessageBinding, KafkaOperationBinding, KafkaServerBinding } from '../binding';
|
|
3
3
|
import { AsyncOperationPayload } from './asyncapi-operation-payload.interface';
|
|
4
4
|
import { AsyncServerObject } from './asyncapi-server.interface';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServerObject } from '@nestjs/swagger
|
|
1
|
+
import { ServerObject } from '@nestjs/swagger';
|
|
2
2
|
import { AmqpServerBinding, KafkaServerBinding } from '../binding';
|
|
3
3
|
import { AsyncServerVariableObject, SecurityObject } from './asyncapi-common.interfaces';
|
|
4
4
|
export interface AsyncServerObject extends Omit<ServerObject, 'variables'> {
|
|
@@ -7,5 +7,4 @@ export * from './asyncapi-document-options.interface';
|
|
|
7
7
|
export * from './asyncapi-server.interface';
|
|
8
8
|
export * from './denormalized-doc.interface';
|
|
9
9
|
export * from './denormalized-doc-resolvers.interface';
|
|
10
|
-
export * from './generator-options.interface';
|
|
11
10
|
export * from './asyncapi-operation-options-raw.interface';
|
package/dist/interface/index.js
CHANGED
|
@@ -23,6 +23,5 @@ __exportStar(require("./asyncapi-document-options.interface"), exports);
|
|
|
23
23
|
__exportStar(require("./asyncapi-server.interface"), exports);
|
|
24
24
|
__exportStar(require("./denormalized-doc.interface"), exports);
|
|
25
25
|
__exportStar(require("./denormalized-doc-resolvers.interface"), exports);
|
|
26
|
-
__exportStar(require("./generator-options.interface"), exports);
|
|
27
26
|
__exportStar(require("./asyncapi-operation-options-raw.interface"), exports);
|
|
28
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,wEAAsD;AACtD,yEAAuD;AACvD,yEAAuD;AACvD,yEAAuD;AACvD,wEAAsD;AACtD,8DAA4C;AAC5C,+DAA6C;AAC7C,yEAAuD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interface/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,wEAAsD;AACtD,yEAAuD;AACvD,yEAAuD;AACvD,yEAAuD;AACvD,wEAAsD;AACtD,8DAA4C;AAC5C,+DAA6C;AAC7C,yEAAuD;AAEvD,6EAA2D"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper';
|
|
2
|
-
import { SchemaObject } from '@nestjs/swagger/dist/interfaces/open-api-spec.interface';
|
|
3
2
|
import { DenormalizedDoc } from '../interface';
|
|
4
3
|
export declare class AsyncApiExplorer {
|
|
5
4
|
private readonly metadataScanner;
|
|
6
|
-
private readonly
|
|
7
|
-
private readonly schemaRefsStack;
|
|
5
|
+
private readonly models;
|
|
8
6
|
private operationIdFactory;
|
|
9
7
|
explorerAsyncapiServices(wrapper: InstanceWrapper, modulePath?: string, globalPrefix?: string, operationIdFactory?: (controllerKey: string, methodKey: string) => string): DenormalizedDoc[];
|
|
10
|
-
|
|
8
|
+
getModels(): Function[];
|
|
11
9
|
private generateDenormalizedDocument;
|
|
12
10
|
}
|
|
@@ -7,8 +7,7 @@ const explorers_1 = require("../explorers");
|
|
|
7
7
|
class AsyncApiExplorer {
|
|
8
8
|
constructor() {
|
|
9
9
|
this.metadataScanner = new core_1.MetadataScanner();
|
|
10
|
-
this.
|
|
11
|
-
this.schemaRefsStack = [];
|
|
10
|
+
this.models = new Set();
|
|
12
11
|
this.operationIdFactory = (controllerKey, methodKey) => controllerKey ? `${controllerKey}_${methodKey}` : methodKey;
|
|
13
12
|
}
|
|
14
13
|
explorerAsyncapiServices(wrapper, modulePath, globalPrefix, operationIdFactory) {
|
|
@@ -23,33 +22,29 @@ class AsyncApiExplorer {
|
|
|
23
22
|
}
|
|
24
23
|
const prototype = Object.getPrototypeOf(instance);
|
|
25
24
|
const documentResolvers = {
|
|
26
|
-
root: [
|
|
27
|
-
explorers_1.exploreAsyncapiClassMetadata,
|
|
28
|
-
explorers_1.exploreControllerMetadata,
|
|
29
|
-
explorers_1.exploreGatewayMetadata,
|
|
30
|
-
],
|
|
25
|
+
root: [explorers_1.exploreAsyncapiClassMetadata, explorers_1.exploreControllerMetadata, explorers_1.exploreGatewayMetadata],
|
|
31
26
|
security: [],
|
|
32
27
|
tags: [],
|
|
33
28
|
operations: [explorers_1.exploreAsyncApiOperationMetadata],
|
|
34
29
|
};
|
|
35
30
|
return this.generateDenormalizedDocument(metatype, prototype, instance, documentResolvers, modulePath, globalPrefix);
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return ret;
|
|
32
|
+
getModels() {
|
|
33
|
+
return [...this.models];
|
|
40
34
|
}
|
|
41
35
|
generateDenormalizedDocument(metatype, prototype, instance, documentResolvers, _modulePath, _globalPrefix) {
|
|
42
36
|
const denormalizedAsyncapiServices = this.metadataScanner.scanFromPrototype(instance, prototype, (name) => {
|
|
43
37
|
const targetCallback = prototype[name];
|
|
44
38
|
const methodMetadata = documentResolvers.root.reduce((_metadata, fn) => {
|
|
45
39
|
const serviceMetadata = fn(metatype);
|
|
46
|
-
const channels = documentResolvers.operations.reduce((
|
|
47
|
-
const
|
|
40
|
+
const channels = documentResolvers.operations.reduce((operationsParam, exploreOperationsMeta) => {
|
|
41
|
+
const operations = operationsParam;
|
|
42
|
+
const meta = exploreOperationsMeta(this.models, instance, prototype, targetCallback);
|
|
48
43
|
if (!meta) {
|
|
49
44
|
return operations;
|
|
50
45
|
}
|
|
51
46
|
meta.forEach((op) => {
|
|
52
|
-
if (
|
|
47
|
+
if (Object.prototype.hasOwnProperty.call(operations, op.channel)) {
|
|
53
48
|
operations[op.channel] = Object.assign(Object.assign({}, operations[op.channel]), op);
|
|
54
49
|
}
|
|
55
50
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi.explorer.js","sourceRoot":"","sources":["../../src/services/asyncapi.explorer.ts"],"names":[],"mappings":";;;AACA,uCAA+C;
|
|
1
|
+
{"version":3,"file":"asyncapi.explorer.js","sourceRoot":"","sources":["../../src/services/asyncapi.explorer.ts"],"names":[],"mappings":";;;AACA,uCAA+C;AAE/C,mCAAiC;AACjC,4CAMsB;AAGtB,MAAa,gBAAgB;IAA7B;QACmB,oBAAe,GAAG,IAAI,sBAAe,EAAE,CAAC;QAGxC,WAAM,GAAG,IAAI,GAAG,EAAY,CAAC;QAEtC,uBAAkB,GAAG,CAAC,aAAqB,EAAE,SAAiB,EAAE,EAAE,CACxE,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IAwFhE,CAAC;IAtFQ,wBAAwB,CAC7B,OAAwB,EACxB,UAAmB,EACnB,YAAqB,EACrB,kBAAyE;QAEzE,IAAI,kBAAkB,EAAE,CAAC;YACvB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC/C,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QACvC,IACE,CAAC,QAAQ;YACT,CAAC,QAAQ;YACT,CAAC,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yCAA6B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EACjG,CAAC;YACD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,iBAAiB,GAA6B;YAClD,IAAI,EAAE,CAAC,wCAA4B,EAAE,qCAAyB,EAAE,kCAAsB,CAAC;YACvF,QAAQ,E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O,CAAC,mCAAQ,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,GAAK,EAAE,CAAE,CAAC;wBAChE,CAAC;6BAAM,CAAC;4BACN,UAAU,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;wBAC9B,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,UAAU,CAAC;gBACpB,CAAC,EAAE,EAAE,CAAC,CAAC;gBAEP,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;oBAC7C,IAAI,kCAAO,eAAe,KAAE,IAAI,EAAE,OAAO,GAAE;oBAC3C,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC;iBAC9B,CAAC,CAAC,CAAC;YACN,CAAC,EAAE,EAAE,CAAC,CAAC;YACP,OAAO,cAAc,CAAC;QACxB,CAAC,CACF,CAAC;QAEF,OAAO,IAAA,gBAAO,EAAC,4BAA4B,CAAC,CAAC;IAC/C,CAAC;CACF;AA/FD,4CA+FC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AsyncApiDocument, AsyncApiTemplateOptions } from '../interface';
|
|
2
|
+
export declare const ASYNCAPI_SCHEMA_ELEMENT_ID = "asyncapi-schema";
|
|
2
3
|
export declare class AsyncapiGenerator {
|
|
3
|
-
readonly templateOptions
|
|
4
|
-
|
|
5
|
-
constructor(templateOptions?: AsyncApiTemplateOptions | undefined);
|
|
4
|
+
private readonly templateOptions;
|
|
5
|
+
constructor(templateOptions?: AsyncApiTemplateOptions);
|
|
6
6
|
generate(contract: AsyncApiDocument): Promise<string>;
|
|
7
|
+
private buildComponentConfig;
|
|
7
8
|
}
|
|
@@ -1,26 +1,81 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncapiGenerator = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
3
|
+
exports.AsyncapiGenerator = exports.ASYNCAPI_SCHEMA_ELEMENT_ID = void 0;
|
|
4
|
+
const promises_1 = require("fs/promises");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const path_1 = require("path");
|
|
7
|
+
exports.ASYNCAPI_SCHEMA_ELEMENT_ID = 'asyncapi-schema';
|
|
8
|
+
const DEFAULT_COMPONENT_CONFIG = {
|
|
9
|
+
show: { sidebar: true },
|
|
10
|
+
sidebar: { showOperations: 'byDefault' },
|
|
11
|
+
};
|
|
12
|
+
const SIDEBAR_ORGANIZATION = {
|
|
13
|
+
byTags: 'bySpecTags',
|
|
14
|
+
byTagsNoRoot: 'byOperationsTags',
|
|
15
|
+
};
|
|
16
|
+
const BASE_STYLES = 'body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;' +
|
|
17
|
+
'-webkit-font-smoothing:antialiased;line-height:1.5}';
|
|
18
|
+
let assetsPromise;
|
|
19
|
+
function loadStandaloneAssets() {
|
|
20
|
+
if (!assetsPromise) {
|
|
21
|
+
const root = (0, path_1.dirname)(require.resolve('@asyncapi/react-component/package.json'));
|
|
22
|
+
assetsPromise = Promise.all([
|
|
23
|
+
(0, promises_1.readFile)((0, path_1.join)(root, 'browser/standalone/index.js'), 'utf8'),
|
|
24
|
+
(0, promises_1.readFile)((0, path_1.join)(root, 'styles/default.min.css'), 'utf8'),
|
|
25
|
+
]).then(([script, styles]) => ({ script, styles }));
|
|
26
|
+
assetsPromise.catch(() => {
|
|
27
|
+
assetsPromise = undefined;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
return assetsPromise;
|
|
31
|
+
}
|
|
32
|
+
const escapeHtml = (value) => value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
33
|
+
const toScriptJson = (value) => JSON.stringify(value).replace(/</g, '\\u003c').replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
|
34
|
+
const escapeInline = (code, tag) => code.replace(new RegExp(`</${tag}`, 'gi'), `<\\/${tag}`);
|
|
7
35
|
class AsyncapiGenerator {
|
|
8
|
-
constructor(templateOptions) {
|
|
36
|
+
constructor(templateOptions = {}) {
|
|
9
37
|
this.templateOptions = templateOptions;
|
|
10
|
-
this.generator = new generator_1.default('@asyncapi/html-template', os_1.default.tmpdir(), {
|
|
11
|
-
forceWrite: true,
|
|
12
|
-
entrypoint: 'index.html',
|
|
13
|
-
output: 'string',
|
|
14
|
-
templateParams: Object.assign({ singleFile: true }, templateOptions),
|
|
15
|
-
});
|
|
16
38
|
}
|
|
17
39
|
async generate(contract) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
40
|
+
var _a, _b, _c, _d;
|
|
41
|
+
const { script, styles } = await loadStandaloneAssets();
|
|
42
|
+
const { baseHref, favicon } = this.templateOptions;
|
|
43
|
+
const title = `${(_b = (_a = contract.info) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'AsyncAPI'} ${(_d = (_c = contract.info) === null || _c === void 0 ? void 0 : _c.version) !== null && _d !== void 0 ? _d : ''} documentation`.trim();
|
|
44
|
+
return `<!DOCTYPE html>
|
|
45
|
+
<html lang="en">
|
|
46
|
+
<head>
|
|
47
|
+
<meta charset="UTF-8">
|
|
48
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
49
|
+
${baseHref ? `<base href="${escapeHtml(baseHref)}">` : ''}
|
|
50
|
+
<title>${escapeHtml(title)}</title>
|
|
51
|
+
<link rel="icon" href="${escapeHtml(favicon !== null && favicon !== void 0 ? favicon : 'data:,')}">
|
|
52
|
+
<style>${BASE_STYLES}</style>
|
|
53
|
+
<style>${escapeInline(styles, 'style')}</style>
|
|
54
|
+
</head>
|
|
55
|
+
<body>
|
|
56
|
+
<div id="asyncapi"></div>
|
|
57
|
+
<script type="application/json" id="${exports.ASYNCAPI_SCHEMA_ELEMENT_ID}">${toScriptJson(contract)}</script>
|
|
58
|
+
<script>${escapeInline(script, 'script')}</script>
|
|
59
|
+
<script>
|
|
60
|
+
AsyncApiStandalone.render(
|
|
61
|
+
{
|
|
62
|
+
schema: JSON.parse(document.getElementById('${exports.ASYNCAPI_SCHEMA_ELEMENT_ID}').textContent),
|
|
63
|
+
config: ${toScriptJson(this.buildComponentConfig())},
|
|
64
|
+
},
|
|
65
|
+
document.getElementById('asyncapi'),
|
|
66
|
+
);
|
|
67
|
+
</script>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
72
|
+
buildComponentConfig() {
|
|
73
|
+
const { sidebarOrganization, config } = this.templateOptions;
|
|
74
|
+
const merged = (0, lodash_1.merge)({}, DEFAULT_COMPONENT_CONFIG, config);
|
|
75
|
+
if (sidebarOrganization) {
|
|
76
|
+
merged.sidebar = Object.assign(Object.assign({}, merged.sidebar), { showOperations: SIDEBAR_ORGANIZATION[sidebarOrganization] });
|
|
77
|
+
}
|
|
78
|
+
return merged;
|
|
24
79
|
}
|
|
25
80
|
}
|
|
26
81
|
exports.AsyncapiGenerator = AsyncapiGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi.generator.js","sourceRoot":"","sources":["../../src/services/asyncapi.generator.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"asyncapi.generator.js","sourceRoot":"","sources":["../../src/services/asyncapi.generator.ts"],"names":[],"mappings":";;;AAAA,0CAAuC;AACvC,mCAA+B;AAC/B,+BAAqC;AASxB,QAAA,0BAA0B,GAAG,iBAAiB,CAAC;AAE5D,MAAM,wBAAwB,GAAG;IAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACvB,OAAO,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE;CACzC,CAAC;AAEF,MAAM,oBAAoB,GAAgF;IACxG,MAAM,E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M,GAAG,IAAA,cAAK,EAAC,EAAE,EAAE,wBAAwB,EAAE,MAAM,CAAC,CAAC;QAC3D,IAAI,mBAAmB,EAAE,CAAC;YACxB,MAAM,CAAC,OAAO,mCAAQ,MAAM,CAAC,OAAO,KAAE,cAAc,EAAE,oBAAoB,CAAC,mBAAmB,CAAC,GAAE,CAAC;QACpG,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAhDD,8CAgDC"}
|
|
@@ -3,12 +3,9 @@ import { AsyncApiDocument, AsyncApiDocumentOptions } from '../interface';
|
|
|
3
3
|
export declare class AsyncapiScanner {
|
|
4
4
|
private readonly transformer;
|
|
5
5
|
private readonly explorer;
|
|
6
|
-
private readonly
|
|
7
|
-
private readonly swaggerTypesMapper;
|
|
8
|
-
private readonly schemaObjectFactory;
|
|
6
|
+
private readonly schemaFactory;
|
|
9
7
|
scanApplication(app: INestApplicationContext, options: AsyncApiDocumentOptions): Omit<AsyncApiDocument, 'asyncapi' | 'info'>;
|
|
10
8
|
private scanModuleProviders;
|
|
11
9
|
private getModules;
|
|
12
10
|
private getGlobalPrefix;
|
|
13
|
-
private addExtraModels;
|
|
14
11
|
}
|
|
@@ -2,56 +2,40 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AsyncapiScanner = void 0;
|
|
4
4
|
const constants_1 = require("@nestjs/common/constants");
|
|
5
|
-
const model_properties_accessor_1 = require("@nestjs/swagger/dist/services/model-properties-accessor");
|
|
6
|
-
const schema_object_factory_1 = require("@nestjs/swagger/dist/services/schema-object-factory");
|
|
7
|
-
const swagger_types_mapper_1 = require("@nestjs/swagger/dist/services/swagger-types-mapper");
|
|
8
|
-
const strip_last_slash_util_1 = require("@nestjs/swagger/dist/utils/strip-last-slash.util");
|
|
9
5
|
const lodash_1 = require("lodash");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
10
7
|
const asyncapi_explorer_1 = require("./asyncapi.explorer");
|
|
11
8
|
const asyncapi_transformer_1 = require("./asyncapi.transformer");
|
|
9
|
+
const swagger_schema_factory_1 = require("./swagger-schema.factory");
|
|
12
10
|
class AsyncapiScanner {
|
|
13
11
|
constructor() {
|
|
14
12
|
this.transformer = new asyncapi_transformer_1.AsyncapiTransformer();
|
|
15
13
|
this.explorer = new asyncapi_explorer_1.AsyncApiExplorer();
|
|
16
|
-
this.
|
|
17
|
-
this.swaggerTypesMapper = new swagger_types_mapper_1.SwaggerTypesMapper();
|
|
18
|
-
this.schemaObjectFactory = new schema_object_factory_1.SchemaObjectFactory(this.modelPropertiesAccessor, this.swaggerTypesMapper);
|
|
14
|
+
this.schemaFactory = new swagger_schema_factory_1.SwaggerSchemaFactory();
|
|
19
15
|
}
|
|
20
16
|
scanApplication(app, options) {
|
|
21
17
|
const { deepScanRoutes, include: includedModules = [], extraModels = [], ignoreGlobalPrefix = false, operationIdFactory, } = options;
|
|
22
|
-
const container = app
|
|
18
|
+
const { container } = app;
|
|
23
19
|
const modules = this.getModules(container.getModules(), includedModules);
|
|
24
|
-
const globalPrefix = !ignoreGlobalPrefix
|
|
25
|
-
? (0, strip_last_slash_util_1.stripLastSlash)(this.getGlobalPrefix(app))
|
|
26
|
-
: '';
|
|
20
|
+
const globalPrefix = !ignoreGlobalPrefix ? (0, utils_1.stripLastSlash)(this.getGlobalPrefix(app)) : '';
|
|
27
21
|
const denormalizedChannels = modules.reduce((channels, { providers, metatype, imports, controllers }) => {
|
|
28
22
|
let allProviders = new Map([...providers, ...controllers]);
|
|
29
23
|
if (deepScanRoutes) {
|
|
30
24
|
const isGlobal = (module) => !container.isGlobalModule(module);
|
|
31
25
|
Array.from(imports.values())
|
|
32
26
|
.filter(isGlobal)
|
|
33
|
-
.map(({ providers: relatedProviders, controllers: relatedControllers
|
|
27
|
+
.map(({ providers: relatedProviders, controllers: relatedControllers }) => ({
|
|
34
28
|
relatedProviders,
|
|
35
29
|
relatedControllers,
|
|
36
30
|
}))
|
|
37
31
|
.forEach(({ relatedProviders, relatedControllers }) => {
|
|
38
|
-
allProviders = new Map([
|
|
39
|
-
...allProviders,
|
|
40
|
-
...relatedProviders,
|
|
41
|
-
...relatedControllers,
|
|
42
|
-
]);
|
|
32
|
+
allProviders = new Map([...allProviders, ...relatedProviders, ...relatedControllers]);
|
|
43
33
|
});
|
|
44
34
|
}
|
|
45
|
-
const path = metatype
|
|
46
|
-
|
|
47
|
-
: undefined;
|
|
48
|
-
return [
|
|
49
|
-
...channels,
|
|
50
|
-
...this.scanModuleProviders(allProviders, path, globalPrefix, operationIdFactory),
|
|
51
|
-
];
|
|
35
|
+
const path = metatype ? Reflect.getMetadata(constants_1.MODULE_PATH, metatype) : undefined;
|
|
36
|
+
return [...channels, ...this.scanModuleProviders(allProviders, path, globalPrefix, operationIdFactory)];
|
|
52
37
|
}, []);
|
|
53
|
-
const schemas = this.explorer.
|
|
54
|
-
this.addExtraModels(schemas, extraModels);
|
|
38
|
+
const schemas = this.schemaFactory.generate(app, [...this.explorer.getModels(), ...extraModels], options);
|
|
55
39
|
const normalizedChannels = this.transformer.normalizeChannels((0, lodash_1.flatten)(denormalizedChannels));
|
|
56
40
|
return Object.assign(Object.assign({}, normalizedChannels), { components: { schemas } });
|
|
57
41
|
}
|
|
@@ -72,11 +56,6 @@ class AsyncapiScanner {
|
|
|
72
56
|
const internalConfigRef = app.config;
|
|
73
57
|
return (internalConfigRef === null || internalConfigRef === void 0 ? void 0 : internalConfigRef.getGlobalPrefix()) || '';
|
|
74
58
|
}
|
|
75
|
-
addExtraModels(schemas, extraModels) {
|
|
76
|
-
extraModels.forEach((item) => {
|
|
77
|
-
this.schemaObjectFactory.exploreModelSchema(item, schemas);
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
59
|
}
|
|
81
60
|
exports.AsyncapiScanner = AsyncapiScanner;
|
|
82
61
|
//# sourceMappingURL=asyncapi.scanner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi.scanner.js","sourceRoot":"","sources":["../../src/services/asyncapi.scanner.ts"],"names":[],"mappings":";;;AACA,wDAAuD;
|
|
1
|
+
{"version":3,"file":"asyncapi.scanner.js","sourceRoot":"","sources":["../../src/services/asyncapi.scanner.ts"],"names":[],"mappings":";;;AACA,wDAAuD;AAIvD,mCAA0C;AAE1C,oCAA0C;AAC1C,2DAAuD;AACvD,iEAA6D;AAC7D,qEAAgE;AAEhE,MAAa,eAAe;IAA5B;QACmB,gBAAW,GAAG,IAAI,0CAAmB,EAAE,CAAC;QAExC,aAAQ,GAAG,IAAI,oCAAgB,EAAE,CAAC;QAElC,kBAAa,GAAG,IAAI,6CAAoB,EAAE,CAAC;IA0E9D,CAAC;IAxEQ,eAAe,CACpB,GAA4B,EAC5B,OAAgC;QAEhC,MAAM,EACJ,cAAc,EACd,OAAO,EAAE,eAAe,GAAG,EAAE,EAC7B,WAAW,GAAG,EAAE,EAChB,kBAAkB,GAAG,KAAK,EAC1B,kBAAkB,GACnB,GAAG,OAAO,CAAC;QAEZ,MAAM,EAAE,SAAS,EAAE,GAAG,GAAU,CAAC;QACjC,MAAM,OAAO,GAAa,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,eAAe,CAAC,CAAC;QACnF,MAAM,YAAY,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAA,sBAAc,EAAC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAE1F,MAAM,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE;YACtG,IAAI,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC;YAE3D,IAAI,cAAc,EAAE,CAAC;gBAEnB,MAAM,QAAQ,GAAG,CAAC,MAAiB,EAAE,EAAE,CAAC,CAAC,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ACrB,kBAAyE;QAEzE,MAAM,iBAAiB,GAAG,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,EAAE;YAC9E,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;YAC1G,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC,CAAC;QACtC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAA,gBAAO,EAAC,iBAAiB,CAAQ,CAAC;IAC3C,CAAC;IAEO,UAAU,CAAC,gBAAqC,EAAE,OAAmB;QAC3E,IAAI,CAAC,OAAO,IAAI,IAAA,gBAAO,EAAC,OAAO,CAAC,EAAE,CAAC;YACjC,OAAO,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,CAAC,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC;IAC5G,CAAC;IAEO,eAAe,CAAC,GAA4B;QAClD,MAAM,iBAAiB,GAAI,GAAW,CAAC,MAAM,CAAC;QAC9C,OAAO,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,eAAe,EAAE,KAAI,EAAE,CAAC;IACpD,CAAC;CACF;AA/ED,0CA+EC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi.transformer.js","sourceRoot":"","sources":["../../src/services/asyncapi.transformer.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"asyncapi.transformer.js","sourceRoot":"","sources":["../../src/services/asyncapi.transformer.ts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