@achinet/nestjs-async 0.0.1 → 0.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/.eslintrc.js +31 -0
- package/CHANGELOG.md +6 -0
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js +1 -2
- package/dist/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-operation.decorator.js +1 -2
- package/dist/decorators/asyncapi-operation.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-pub.decorator.js +1 -2
- package/dist/decorators/asyncapi-pub.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-service.decorator.js +1 -2
- package/dist/decorators/asyncapi-service.decorator.js.map +1 -1
- package/dist/decorators/asyncapi-sub.decorator.js +1 -2
- package/dist/decorators/asyncapi-sub.decorator.js.map +1 -1
- package/dist/explorers/asyncapi-operation.explorer.d.ts +8 -8
- package/dist/sample/app.module.d.ts +2 -0
- package/dist/sample/app.module.js +20 -0
- package/dist/sample/app.module.js.map +1 -0
- package/dist/sample/common.d.ts +3 -0
- package/dist/sample/common.js +40 -0
- package/dist/sample/common.js.map +1 -0
- package/dist/sample/constants.d.ts +12 -0
- package/dist/sample/constants.js +16 -0
- package/dist/sample/constants.js.map +1 -0
- package/dist/sample/felines/class/cat.class.d.ts +4 -0
- package/dist/sample/felines/class/cat.class.js +24 -0
- package/dist/sample/felines/class/cat.class.js.map +1 -0
- package/dist/sample/felines/class/feline.class.d.ts +19 -0
- package/dist/sample/felines/class/feline.class.js +20 -0
- package/dist/sample/felines/class/feline.class.js.map +1 -0
- package/dist/sample/felines/class/index.d.ts +5 -0
- package/dist/sample/felines/class/index.js +22 -0
- package/dist/sample/felines/class/index.js.map +1 -0
- package/dist/sample/felines/class/lion.class.d.ts +4 -0
- package/dist/sample/felines/class/lion.class.js +8 -0
- package/dist/sample/felines/class/lion.class.js.map +1 -0
- package/dist/sample/felines/class/message.class.d.ts +7 -0
- package/dist/sample/felines/class/message.class.js +28 -0
- package/dist/sample/felines/class/message.class.js.map +1 -0
- package/dist/sample/felines/class/tiger.class.d.ts +4 -0
- package/dist/sample/felines/class/tiger.class.js +8 -0
- package/dist/sample/felines/class/tiger.class.js.map +1 -0
- package/dist/sample/felines/dto/create-feline.dto.d.ts +4 -0
- package/dist/sample/felines/dto/create-feline.dto.js +28 -0
- package/dist/sample/felines/dto/create-feline.dto.js.map +1 -0
- package/dist/sample/felines/dto/index.d.ts +2 -0
- package/dist/sample/felines/dto/index.js +19 -0
- package/dist/sample/felines/dto/index.js.map +1 -0
- package/dist/sample/felines/dto/journaling-data.dto.d.ts +4 -0
- package/dist/sample/felines/dto/journaling-data.dto.js +8 -0
- package/dist/sample/felines/dto/journaling-data.dto.js.map +1 -0
- package/dist/sample/felines/felines.constants.d.ts +1 -0
- package/dist/sample/felines/felines.constants.js +5 -0
- package/dist/sample/felines/felines.constants.js.map +1 -0
- package/dist/sample/felines/felines.controller.d.ts +15 -0
- package/dist/sample/felines/felines.controller.js +101 -0
- package/dist/sample/felines/felines.controller.js.map +1 -0
- package/dist/sample/felines/felines.gateway.d.ts +16 -0
- package/dist/sample/felines/felines.gateway.js +90 -0
- package/dist/sample/felines/felines.gateway.js.map +1 -0
- package/dist/sample/felines/felines.module.d.ts +2 -0
- package/dist/sample/felines/felines.module.js +28 -0
- package/dist/sample/felines/felines.module.js.map +1 -0
- package/dist/sample/felines/felines.service.d.ts +8 -0
- package/dist/sample/felines/felines.service.js +33 -0
- package/dist/sample/felines/felines.service.js.map +1 -0
- package/dist/sample/felines/rto/feline.rto.d.ts +7 -0
- package/dist/sample/felines/rto/feline.rto.js +31 -0
- package/dist/sample/felines/rto/feline.rto.js.map +1 -0
- package/dist/sample/felines/rto/index.d.ts +1 -0
- package/dist/sample/felines/rto/index.js +18 -0
- package/dist/sample/felines/rto/index.js.map +1 -0
- package/dist/sample/index.d.ts +3 -0
- package/dist/sample/index.js +20 -0
- package/dist/sample/index.js.map +1 -0
- package/dist/sample/main.d.ts +1 -0
- package/dist/sample/main.js +30 -0
- package/dist/sample/main.js.map +1 -0
- package/dist/src/asyncapi-document.builder.d.ts +27 -0
- package/dist/src/asyncapi-document.builder.js +110 -0
- package/dist/src/asyncapi-document.builder.js.map +1 -0
- package/dist/src/asyncapi.constants.d.ts +6 -0
- package/dist/src/asyncapi.constants.js +11 -0
- package/dist/src/asyncapi.constants.js.map +1 -0
- package/dist/src/asyncapi.module.d.ts +8 -0
- package/dist/src/asyncapi.module.js +47 -0
- package/dist/src/asyncapi.module.js.map +1 -0
- package/dist/src/binding/asyncapi.amqp.interfaces.d.ts +38 -0
- package/dist/src/binding/asyncapi.amqp.interfaces.js +3 -0
- package/dist/src/binding/asyncapi.amqp.interfaces.js.map +1 -0
- package/dist/src/binding/asyncapi.kafka.interfaces.d.ts +21 -0
- package/dist/src/binding/asyncapi.kafka.interfaces.js +3 -0
- package/dist/src/binding/asyncapi.kafka.interfaces.js.map +1 -0
- package/dist/src/binding/index.d.ts +2 -0
- package/dist/src/binding/index.js +19 -0
- package/dist/src/binding/index.js.map +1 -0
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.d.ts +2 -0
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js +37 -0
- package/dist/src/decorators/asyncapi-operation-for-meta-key.decorator.js.map +1 -0
- package/dist/src/decorators/asyncapi-operation.decorator.d.ts +2 -0
- package/dist/src/decorators/asyncapi-operation.decorator.js +9 -0
- package/dist/src/decorators/asyncapi-operation.decorator.js.map +1 -0
- package/dist/src/decorators/asyncapi-pub.decorator.d.ts +2 -0
- package/dist/src/decorators/asyncapi-pub.decorator.js +10 -0
- package/dist/src/decorators/asyncapi-pub.decorator.js.map +1 -0
- package/dist/src/decorators/asyncapi-service.decorator.d.ts +1 -0
- package/dist/src/decorators/asyncapi-service.decorator.js +9 -0
- package/dist/src/decorators/asyncapi-service.decorator.js.map +1 -0
- package/dist/src/decorators/asyncapi-sub.decorator.d.ts +2 -0
- package/dist/src/decorators/asyncapi-sub.decorator.js +10 -0
- package/dist/src/decorators/asyncapi-sub.decorator.js.map +1 -0
- package/dist/src/decorators/index.d.ts +4 -0
- package/dist/src/decorators/index.js +21 -0
- package/dist/src/decorators/index.js.map +1 -0
- package/dist/src/explorers/asyncapi-class.explorer.d.ts +5 -0
- package/dist/src/explorers/asyncapi-class.explorer.js +27 -0
- package/dist/src/explorers/asyncapi-class.explorer.js.map +1 -0
- package/dist/src/explorers/asyncapi-operation.explorer.d.ts +17 -0
- package/dist/src/explorers/asyncapi-operation.explorer.js +26 -0
- package/dist/src/explorers/asyncapi-operation.explorer.js.map +1 -0
- package/dist/src/explorers/index.d.ts +2 -0
- package/dist/src/explorers/index.js +19 -0
- package/dist/src/explorers/index.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +21 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/interface/asyncapi-common.interfaces.d.ts +126 -0
- package/dist/src/interface/asyncapi-common.interfaces.js +3 -0
- package/dist/src/interface/asyncapi-common.interfaces.js.map +1 -0
- package/dist/src/interface/asyncapi-document-options.interface.d.ts +3 -0
- package/dist/src/interface/asyncapi-document-options.interface.js +3 -0
- package/dist/src/interface/asyncapi-document-options.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-message.interface.d.ts +8 -0
- package/dist/src/interface/asyncapi-message.interface.js +3 -0
- package/dist/src/interface/asyncapi-message.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-operation-headers.interface.d.ts +6 -0
- package/dist/src/interface/asyncapi-operation-headers.interface.js +3 -0
- package/dist/src/interface/asyncapi-operation-headers.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-operation-options-raw.interface.d.ts +21 -0
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js +3 -0
- package/dist/src/interface/asyncapi-operation-options-raw.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-operation-options.interface.d.ts +8 -0
- package/dist/src/interface/asyncapi-operation-options.interface.js +3 -0
- package/dist/src/interface/asyncapi-operation-options.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-operation-payload.interface.d.ts +2 -0
- package/dist/src/interface/asyncapi-operation-payload.interface.js +3 -0
- package/dist/src/interface/asyncapi-operation-payload.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-server.interface.d.ts +10 -0
- package/dist/src/interface/asyncapi-server.interface.js +3 -0
- package/dist/src/interface/asyncapi-server.interface.js.map +1 -0
- package/dist/src/interface/asyncapi-template-options.interface.d.ts +7 -0
- package/dist/src/interface/asyncapi-template-options.interface.js +3 -0
- package/dist/src/interface/asyncapi-template-options.interface.js.map +1 -0
- package/dist/src/interface/denormalized-doc-resolvers.interface.d.ts +6 -0
- package/dist/src/interface/denormalized-doc-resolvers.interface.js +3 -0
- package/dist/src/interface/denormalized-doc-resolvers.interface.js.map +1 -0
- package/dist/src/interface/denormalized-doc.interface.d.ts +10 -0
- package/dist/src/interface/denormalized-doc.interface.js +3 -0
- package/dist/src/interface/denormalized-doc.interface.js.map +1 -0
- package/dist/src/interface/generator-options.interface.d.ts +22 -0
- package/dist/src/interface/generator-options.interface.js +3 -0
- package/dist/src/interface/generator-options.interface.js.map +1 -0
- package/dist/src/interface/index.d.ts +11 -0
- package/dist/src/interface/index.js +28 -0
- package/dist/src/interface/index.js.map +1 -0
- package/dist/src/services/asyncapi.explorer.d.ts +12 -0
- package/dist/src/services/asyncapi.explorer.js +69 -0
- package/dist/src/services/asyncapi.explorer.js.map +1 -0
- package/dist/src/services/asyncapi.generator.d.ts +6 -0
- package/dist/src/services/asyncapi.generator.js +68 -0
- package/dist/src/services/asyncapi.generator.js.map +1 -0
- package/dist/src/services/asyncapi.scanner.d.ts +14 -0
- package/dist/src/services/asyncapi.scanner.js +71 -0
- package/dist/src/services/asyncapi.scanner.js.map +1 -0
- package/dist/src/services/asyncapi.transformer.d.ts +4 -0
- package/dist/src/services/asyncapi.transformer.js +33 -0
- package/dist/src/services/asyncapi.transformer.js.map +1 -0
- package/dist/src/services/index.d.ts +4 -0
- package/dist/src/services/index.js +21 -0
- package/dist/src/services/index.js.map +1 -0
- package/dist/src/services/operation-object.factory.d.ts +9 -0
- package/dist/src/services/operation-object.factory.js +37 -0
- package/dist/src/services/operation-object.factory.js.map +1 -0
- package/dist/test/configs/jest-base.config.d.ts +3 -0
- package/dist/test/configs/jest-base.config.js +20 -0
- package/dist/test/configs/jest-base.config.js.map +1 -0
- package/dist/test/configs/jest-e2e.config.d.ts +3 -0
- package/dist/test/configs/jest-e2e.config.js +16 -0
- package/dist/test/configs/jest-e2e.config.js.map +1 -0
- package/dist/test/express.e2e-spec.d.ts +1 -0
- package/dist/test/express.e2e-spec.js +89 -0
- package/dist/test/express.e2e-spec.js.map +1 -0
- package/dist/test/fastify.e2e-spec.d.ts +1 -0
- package/dist/test/fastify.e2e-spec.js +57 -0
- package/dist/test/fastify.e2e-spec.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/misc/references/ref.html +303 -0
- package/misc/references/ref.json +1 -0
- package/misc/references/ref.yaml +292 -0
- package/misc/take-snaphots.sh +8 -0
- package/package.json +18 -11
- package/sample/app.module.ts +7 -0
- package/sample/common.ts +49 -0
- package/sample/constants.ts +12 -0
- package/sample/felines/class/cat.class.ts +9 -0
- package/sample/felines/class/feline.class.ts +29 -0
- package/sample/felines/class/index.ts +5 -0
- package/sample/felines/class/lion.class.ts +5 -0
- package/sample/felines/class/message.class.ts +17 -0
- package/sample/felines/class/tiger.class.ts +5 -0
- package/sample/felines/dto/create-feline.dto.ts +13 -0
- package/sample/felines/dto/index.ts +2 -0
- package/sample/felines/dto/journaling-data.dto.ts +5 -0
- package/sample/felines/felines.constants.ts +1 -0
- package/sample/felines/felines.controller.ts +76 -0
- package/sample/felines/felines.gateway.ts +76 -0
- package/sample/felines/felines.module.ts +15 -0
- package/sample/felines/felines.service.ts +24 -0
- package/sample/felines/rto/feline.rto.ts +17 -0
- package/sample/felines/rto/index.ts +1 -0
- package/sample/index.ts +3 -0
- package/sample/main.ts +34 -0
- package/src/asyncapi-document.builder.ts +5 -19
- package/src/asyncapi.module.ts +5 -16
- package/src/decorators/asyncapi-operation-for-meta-key.decorator.ts +4 -16
- package/src/decorators/asyncapi-operation.decorator.ts +1 -3
- package/src/decorators/asyncapi-pub.decorator.ts +6 -13
- package/src/decorators/asyncapi-sub.decorator.ts +6 -13
- package/src/explorers/asyncapi-class.explorer.ts +2 -6
- package/src/explorers/asyncapi-operation.explorer.ts +3 -12
- package/src/interface/asyncapi-common.interfaces.ts +1 -4
- package/src/interface/asyncapi-operation-options.interface.ts +2 -4
- package/src/interface/asyncapi-operation-payload.interface.ts +1 -5
- package/src/interface/asyncapi-server.interface.ts +1 -4
- package/src/interface/asyncapi-template-options.interface.ts +5 -5
- package/src/interface/denormalized-doc.interface.ts +1 -5
- package/src/services/asyncapi.explorer.ts +25 -34
- package/src/services/asyncapi.generator.ts +28 -16
- package/src/services/asyncapi.scanner.ts +39 -89
- package/src/services/asyncapi.transformer.ts +2 -8
- package/src/services/index.ts +0 -1
- package/test/__mocks__/@asyncapi/generator.js +41 -0
- package/test/configs/jest-base.config.ts +19 -0
- package/test/configs/jest-e2e.config.js +7 -0
- package/test/configs/jest-e2e.config.ts +19 -0
- package/test/configs/jest-swagger-plugin.js +16 -0
- package/test/express.e2e-spec.ts +64 -0
- package/test/fastify.e2e-spec.ts +65 -0
package/.eslintrc.js
CHANGED
|
@@ -6,4 +6,35 @@ module.exports = {
|
|
|
6
6
|
tsconfigRootDir: __dirname,
|
|
7
7
|
sourceType: 'module',
|
|
8
8
|
},
|
|
9
|
+
rules: {
|
|
10
|
+
'@typescript-eslint/ban-types': 'off',
|
|
11
|
+
'no-restricted-syntax': 'off',
|
|
12
|
+
'import/no-cycle': [
|
|
13
|
+
'warn',
|
|
14
|
+
{
|
|
15
|
+
maxDepth: 1, // opcional: ignora ciclos muy superficiales
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
'@typescript-eslint/no-unused-vars': [
|
|
19
|
+
'warn',
|
|
20
|
+
{
|
|
21
|
+
argsIgnorePattern: '^_',
|
|
22
|
+
varsIgnorePattern: '^_',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'import/no-extraneous-dependencies': [
|
|
26
|
+
'error',
|
|
27
|
+
{
|
|
28
|
+
devDependencies: [
|
|
29
|
+
'**/*.test.ts',
|
|
30
|
+
'**/*.spec.ts',
|
|
31
|
+
'**/test/**',
|
|
32
|
+
'**/tests/**',
|
|
33
|
+
'**/jest.config.ts',
|
|
34
|
+
'**/jest-*.config.ts',
|
|
35
|
+
'**/test/configs/**',
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
9
40
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncApiOperationForMetaKey =
|
|
3
|
+
exports.AsyncApiOperationForMetaKey = AsyncApiOperationForMetaKey;
|
|
4
4
|
const helpers_1 = require("@nestjs/swagger/dist/decorators/helpers");
|
|
5
5
|
function makeHeaders(headers) {
|
|
6
6
|
return headers
|
|
@@ -34,5 +34,4 @@ function AsyncApiOperationForMetaKey(metaKey, options) {
|
|
|
34
34
|
return (0, helpers_1.createMethodDecorator)(metaKey, transformedOptions)(target, propertyKey, descriptor);
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
exports.AsyncApiOperationForMetaKey = AsyncApiOperationForMetaKey;
|
|
38
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":"","sources":["../../src/decorators/asyncapi-operation-for-meta-key.decorator.ts"],"names":[],"mappings":";;AAuCA,kEA8BC;AArED,qEAAgF;AAShF,SAAS,WAAW,CAAC,OAAkC;IACrD,OAAO,OAAO;QACZ,CAAC,CAAC;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;iBAChC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;gBACtB,CAAC,GAAG,CAAC,kBACH,IAAI,EAAE,QAAQ,IACX,KAAK,CACT;aACF,CAAC,CAAC;iBACF,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iCAAM,GAAG,GAAK,CAAC,EAAG,EAAE,EAAE,CAAC;SAC9C;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,SAAS,WAAW,CAClB,OAA2B,EAC3B,WAAmB;IAEnB,uCACK,OAAO,KACV,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,WAAW,EACjC,OAAO,EAAE;YACP,IAAI,EAAE,OAAO,CAAC,OAAO;SACtB,EACD,OAAO,EAAE,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,IACrC;AACJ,CAAC;AAED,SAAgB,2BAA2B,CACzC,OAAe,EACf,OAAmC;IAEnC,OAAO,CAAC,MAAM,EAAE,WAA4B,EAAE,UAAU,EAAE,EAAE;QAC1D,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,IAAI,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAEvE,MAAM,kBAAkB,GAA2B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;YACnE,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;gBACtC,CAAC,CAAC;oBACE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAChC,WAAW,CAAC,CAAC,EAAE,GAAG,UAAU,IAAI,KAAK,EAAE,CAAC,CACzC;iBACF;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,+BAAqB,EAAC,OAAO,EAAE,kBAAkB,CAAC,CACvD,MAAM,EACN,WAAW,EACX,UAAU,CACX,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncApiOperation =
|
|
3
|
+
exports.AsyncApiOperation = AsyncApiOperation;
|
|
4
4
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
5
5
|
const asyncapi_operation_for_meta_key_decorator_1 = require("./asyncapi-operation-for-meta-key.decorator");
|
|
6
6
|
function AsyncApiOperation(...options) {
|
|
7
7
|
return (0, asyncapi_operation_for_meta_key_decorator_1.AsyncApiOperationForMetaKey)(asyncapi_constants_1.DECORATORS.AsyncApiOperation, options);
|
|
8
8
|
}
|
|
9
|
-
exports.AsyncApiOperation = AsyncApiOperation;
|
|
10
9
|
//# sourceMappingURL=asyncapi-operation.decorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asyncapi-operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-operation.decorator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asyncapi-operation.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-operation.decorator.ts"],"names":[],"mappings":";;AAIA,8CAIC;AARD,8DAAmD;AAEnD,2GAA0F;AAE1F,SAAgB,iBAAiB,CAC/B,GAAG,OAAmC;IAEtC,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncApiPub =
|
|
3
|
+
exports.AsyncApiPub = AsyncApiPub;
|
|
4
4
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
5
5
|
const asyncapi_operation_for_meta_key_decorator_1 = require("./asyncapi-operation-for-meta-key.decorator");
|
|
6
6
|
function AsyncApiPub(...specificOperationOptions) {
|
|
7
7
|
const options = specificOperationOptions.map((i) => (Object.assign(Object.assign({}, i), { type: 'pub' })));
|
|
8
8
|
return (0, asyncapi_operation_for_meta_key_decorator_1.AsyncApiOperationForMetaKey)(asyncapi_constants_1.DECORATORS.AsyncApiPub, options);
|
|
9
9
|
}
|
|
10
|
-
exports.AsyncApiPub = AsyncApiPub;
|
|
11
10
|
//# sourceMappingURL=asyncapi-pub.decorator.js.map
|
|
@@ -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":";;AAOA,kCAUC;AAjBD,8DAAmD;AAKnD,2GAA0F;AAE1F,SAAgB,WAAW,CACzB,GAAG,wBAA4D;IAE/D,MAAM,OAAO,GAA+B,wBAAwB,CAAC,GAAG,CACtE,CAAC,CAAC,EAAE,EAAE,CAAC,iCACF,CAAC,KACJ,IAAI,EAAE,KAAK,IACX,CACH,CAAC;IACF,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncApi =
|
|
3
|
+
exports.AsyncApi = AsyncApi;
|
|
4
4
|
const helpers_1 = require("@nestjs/swagger/dist/decorators/helpers");
|
|
5
5
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
6
6
|
function AsyncApi() {
|
|
7
7
|
return (0, helpers_1.createMixedDecorator)(asyncapi_constants_1.DECORATORS.AsyncApiClass, true);
|
|
8
8
|
}
|
|
9
|
-
exports.AsyncApi = AsyncApi;
|
|
10
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":"
|
|
1
|
+
{"version":3,"file":"asyncapi-service.decorator.js","sourceRoot":"","sources":["../../src/decorators/asyncapi-service.decorator.ts"],"names":[],"mappings":";;AAMA,4BAEC;AARD,qEAA+E;AAC/E,8DAAmD;AAKnD,SAAgB,QAAQ;IACtB,OAAO,IAAA,8BAAoB,EAAC,+BAAU,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;AAC9D,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncApiSub =
|
|
3
|
+
exports.AsyncApiSub = AsyncApiSub;
|
|
4
4
|
const asyncapi_constants_1 = require("../asyncapi.constants");
|
|
5
5
|
const asyncapi_operation_for_meta_key_decorator_1 = require("./asyncapi-operation-for-meta-key.decorator");
|
|
6
6
|
function AsyncApiSub(...specificOperationOptions) {
|
|
7
7
|
const options = specificOperationOptions.map((i) => (Object.assign(Object.assign({}, i), { type: 'sub' })));
|
|
8
8
|
return (0, asyncapi_operation_for_meta_key_decorator_1.AsyncApiOperationForMetaKey)(asyncapi_constants_1.DECORATORS.AsyncApiSub, options);
|
|
9
9
|
}
|
|
10
|
-
exports.AsyncApiSub = AsyncApiSub;
|
|
11
10
|
//# sourceMappingURL=asyncapi-sub.decorator.js.map
|
|
@@ -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":";;AAOA,kCAUC;AAjBD,8DAAmD;AAKnD,2GAA0F;AAE1F,SAAgB,WAAW,CACzB,GAAG,wBAA4D;IAE/D,MAAM,OAAO,GAA+B,wBAAwB,CAAC,GAAG,CACtE,CAAC,CAAC,EAAE,EAAE,CAAC,iCACF,CAAC,KACJ,IAAI,EAAE,KAAK,IACX,CACH,CAAC;IACF,OAAO,IAAA,uEAA2B,EAAC,+BAAU,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -4,14 +4,14 @@ export declare const exploreAsyncApiOperationMetadata: (schemas: Record<string,
|
|
|
4
4
|
[x: string]: string | {
|
|
5
5
|
channel: undefined;
|
|
6
6
|
type: undefined;
|
|
7
|
-
operationId?: string
|
|
8
|
-
summary?: string
|
|
9
|
-
description?: string
|
|
10
|
-
tags?: import("../interface").AsyncTagObject[]
|
|
11
|
-
externalDocs?: import("../interface").ExternalDocumentationObject
|
|
12
|
-
bindings?: Record<string, import("../binding").KafkaOperationBinding | import("../binding").AmqpOperationBinding
|
|
13
|
-
traits?: Record<string, import("../interface").AsyncOperationTraitObject
|
|
14
|
-
message?: import("../interface").AsyncOperationMessage
|
|
7
|
+
operationId?: string;
|
|
8
|
+
summary?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
tags?: import("../interface").AsyncTagObject[];
|
|
11
|
+
externalDocs?: import("../interface").ExternalDocumentationObject;
|
|
12
|
+
bindings?: Record<string, import("../binding").KafkaOperationBinding | import("../binding").AmqpOperationBinding>;
|
|
13
|
+
traits?: Record<string, import("../interface").AsyncOperationTraitObject>;
|
|
14
|
+
message?: import("../interface").AsyncOperationMessage;
|
|
15
15
|
};
|
|
16
16
|
channel: string;
|
|
17
17
|
}[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.AppModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const felines_module_1 = require("./felines/felines.module");
|
|
12
|
+
let AppModule = class AppModule {
|
|
13
|
+
};
|
|
14
|
+
exports.AppModule = AppModule;
|
|
15
|
+
exports.AppModule = AppModule = __decorate([
|
|
16
|
+
(0, common_1.Module)({
|
|
17
|
+
imports: [felines_module_1.FelinesModule],
|
|
18
|
+
})
|
|
19
|
+
], AppModule);
|
|
20
|
+
//# sourceMappingURL=app.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../sample/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6DAAyD;AAKlD,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,8BAAa,CAAC;KACzB,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeAsyncapiDocument = makeAsyncapiDocument;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const class_1 = require("./felines/class");
|
|
6
|
+
const felines_module_1 = require("./felines/felines.module");
|
|
7
|
+
const src_1 = require("../src");
|
|
8
|
+
async function makeAsyncapiDocument(app) {
|
|
9
|
+
const asyncApiServer = {
|
|
10
|
+
url: `ws://${constants_1.HOST}:${constants_1.PORT}`,
|
|
11
|
+
protocol: 'socket.io',
|
|
12
|
+
protocolVersion: '4',
|
|
13
|
+
description: 'Allows you to connect using the websocket protocol to our Socket.io server.',
|
|
14
|
+
security: [{ 'user-password': [] }],
|
|
15
|
+
variables: {
|
|
16
|
+
port: {
|
|
17
|
+
description: 'Secure connection (TLS) is available through port 443.',
|
|
18
|
+
default: '443',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
bindings: {},
|
|
22
|
+
};
|
|
23
|
+
const servers = Object.keys(constants_1.SERVER).map((i) => ({
|
|
24
|
+
name: constants_1.SERVER[i],
|
|
25
|
+
server: asyncApiServer,
|
|
26
|
+
}));
|
|
27
|
+
const asyncApiOptions = new src_1.AsyncApiDocumentBuilder()
|
|
28
|
+
.setTitle('Feline')
|
|
29
|
+
.setDescription('Feline server description here')
|
|
30
|
+
.setVersion('1.0')
|
|
31
|
+
.setDefaultContentType('application/json')
|
|
32
|
+
.addSecurity('user-password', { type: 'userPassword' })
|
|
33
|
+
.addServers(servers)
|
|
34
|
+
.build();
|
|
35
|
+
return src_1.AsyncApiModule.createDocument(app, asyncApiOptions, {
|
|
36
|
+
include: [felines_module_1.FelinesModule],
|
|
37
|
+
extraModels: [class_1.Cat, class_1.Lion, class_1.Tiger, class_1.Feline],
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../sample/common.ts"],"names":[],"mappings":";;AAWA,oDAqCC;AA/CD,2CAAiD;AACjD,2CAA2D;AAC3D,6DAAyD;AACzD,gCAKgB;AAET,KAAK,UAAU,oBAAoB,CACxC,GAA4B;IAE5B,MAAM,cAAc,GAAsB;QACxC,GAAG,EAAE,QAAQ,gBAAI,IAAI,gBAAI,EAAE;QAC3B,QAAQ,EAAE,WAAW;QACrB,eAAe,EAAE,GAAG;QACpB,WAAW,EACT,6EAA6E;QAC/E,QAAQ,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC;QACnC,SAAS,EAAE;YACT,IAAI,EAAE;gBACJ,WAAW,EAAE,wDAAwD;gBACrE,OAAO,EAAE,KAAK;aACf;SACF;QACD,QAAQ,EAAE,EAAE;KACb,CAAC;IAEF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,EAAE,kBAAM,CAAC,CAAC,CAAC;QACf,MAAM,EAAE,cAAc;KACvB,CAAC,CAAC,CAAC;IAEJ,MAAM,eAAe,GAAG,IAAI,6BAAuB,EAAE;SAClD,QAAQ,CAAC,QAAQ,CAAC;SAClB,cAAc,CAAC,gCAAgC,CAAC;SAChD,UAAU,CAAC,KAAK,CAAC;SACjB,qBAAqB,CAAC,kBAAkB,CAAC;SACzC,WAAW,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;SACtD,UAAU,CAAC,OAAO,CAAC;SACnB,KAAK,EAAE,CAAC;IAEX,OAAO,oBAAc,CAAC,cAAc,CAAC,GAAG,EAAE,eAAe,EAAE;QACzD,OAAO,EAAE,CAAC,8BAAa,CAAC;QACxB,WAAW,EAAE,CAAC,WAAG,EAAE,YAAI,EAAE,aAAK,EAAE,cAAM,CAAC;KACxC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const DOC_RELATIVE_PATH = "/async-api";
|
|
2
|
+
export declare const BOOTSTRAP = "Bootstrap";
|
|
3
|
+
export declare const PORT = 4001;
|
|
4
|
+
export declare const HOST = "0.0.0.0";
|
|
5
|
+
export declare const SERVER: {
|
|
6
|
+
europe: string;
|
|
7
|
+
asia: string;
|
|
8
|
+
northAmerica: string;
|
|
9
|
+
southAmerica: string;
|
|
10
|
+
africa: string;
|
|
11
|
+
australia: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SERVER = exports.HOST = exports.PORT = exports.BOOTSTRAP = exports.DOC_RELATIVE_PATH = void 0;
|
|
4
|
+
exports.DOC_RELATIVE_PATH = '/async-api';
|
|
5
|
+
exports.BOOTSTRAP = 'Bootstrap';
|
|
6
|
+
exports.PORT = 4001;
|
|
7
|
+
exports.HOST = '0.0.0.0';
|
|
8
|
+
exports.SERVER = {
|
|
9
|
+
europe: 'europe',
|
|
10
|
+
asia: 'asia',
|
|
11
|
+
northAmerica: 'north-america',
|
|
12
|
+
southAmerica: 'south-america',
|
|
13
|
+
africa: 'africa',
|
|
14
|
+
australia: 'australia',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../sample/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,SAAS,GAAG,WAAW,CAAC;AACxB,QAAA,IAAI,GAAG,IAAI,CAAC;AACZ,QAAA,IAAI,GAAG,SAAS,CAAC;AACjB,QAAA,MAAM,GAAG;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,eAAe;IAC7B,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;CACvB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Cat = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const feline_class_1 = require("./feline.class");
|
|
15
|
+
class Cat extends feline_class_1.Feline {
|
|
16
|
+
}
|
|
17
|
+
exports.Cat = Cat;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
example: 'Maine Coon',
|
|
21
|
+
}),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Cat.prototype, "breed", void 0);
|
|
24
|
+
//# sourceMappingURL=cat.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cat.class.js","sourceRoot":"","sources":["../../../../sample/felines/class/cat.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,iDAAwC;AAExC,MAAa,GAAI,SAAQ,qBAAM;CAK9B;AALD,kBAKC;AADC;IAHC,IAAA,qBAAW,EAAC;QACX,OAAO,EAAE,YAAY;KACtB,CAAC;;kCACY"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare enum PawsEnum {
|
|
2
|
+
left = "left",
|
|
3
|
+
right = "right"
|
|
4
|
+
}
|
|
5
|
+
declare enum GendersEnum {
|
|
6
|
+
male = "male",
|
|
7
|
+
female = "female"
|
|
8
|
+
}
|
|
9
|
+
export declare abstract class Feline {
|
|
10
|
+
id: number;
|
|
11
|
+
name: string;
|
|
12
|
+
age: number;
|
|
13
|
+
gender: GendersEnum;
|
|
14
|
+
dominantPaw: PawsEnum;
|
|
15
|
+
tags: string[];
|
|
16
|
+
birthDatetime: Date;
|
|
17
|
+
constructor(initializer: Record<string, unknown>);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Feline = void 0;
|
|
4
|
+
var PawsEnum;
|
|
5
|
+
(function (PawsEnum) {
|
|
6
|
+
PawsEnum["left"] = "left";
|
|
7
|
+
PawsEnum["right"] = "right";
|
|
8
|
+
})(PawsEnum || (PawsEnum = {}));
|
|
9
|
+
var GendersEnum;
|
|
10
|
+
(function (GendersEnum) {
|
|
11
|
+
GendersEnum["male"] = "male";
|
|
12
|
+
GendersEnum["female"] = "female";
|
|
13
|
+
})(GendersEnum || (GendersEnum = {}));
|
|
14
|
+
class Feline {
|
|
15
|
+
constructor(initializer) {
|
|
16
|
+
Object.assign(this, initializer);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Feline = Feline;
|
|
20
|
+
//# sourceMappingURL=feline.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feline.class.js","sourceRoot":"","sources":["../../../../sample/felines/class/feline.class.ts"],"names":[],"mappings":";;;AAAA,IAAK,QAGJ;AAHD,WAAK,QAAQ;IACX,yBAAa,CAAA;IACb,2BAAe,CAAA;AACjB,CAAC,EAHI,QAAQ,KAAR,QAAQ,QAGZ;AAED,IAAK,WAGJ;AAHD,WAAK,WAAW;IACd,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACnB,CAAC,EAHI,WAAW,KAAX,WAAW,QAGf;AAED,MAAsB,MAAM;IAe1B,YAAY,WAAoC;QAC9C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACnC,CAAC;CACF;AAlBD,wBAkBC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./feline.class"), exports);
|
|
18
|
+
__exportStar(require("./cat.class"), exports);
|
|
19
|
+
__exportStar(require("./lion.class"), exports);
|
|
20
|
+
__exportStar(require("./tiger.class"), exports);
|
|
21
|
+
__exportStar(require("./message.class"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sample/felines/class/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B;AAC/B,8CAA4B;AAC5B,+CAA6B;AAC7B,gDAA8B;AAC9B,kDAAgC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Lion = void 0;
|
|
4
|
+
const feline_class_1 = require("./feline.class");
|
|
5
|
+
class Lion extends feline_class_1.Feline {
|
|
6
|
+
}
|
|
7
|
+
exports.Lion = Lion;
|
|
8
|
+
//# sourceMappingURL=lion.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lion.class.js","sourceRoot":"","sources":["../../../../sample/felines/class/lion.class.ts"],"names":[],"mappings":";;;AAAA,iDAAwC;AAExC,MAAa,IAAK,SAAQ,qBAAM;CAE/B;AAFD,oBAEC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Message = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
class Message {
|
|
15
|
+
constructor(partialData) {
|
|
16
|
+
Object.assign(this, partialData);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.Message = Message;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, swagger_1.ApiProperty)({ format: 'uuid' }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Message.prototype, "correlationId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({ format: 'x.y.z', example: '1.0.1' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Message.prototype, "version", void 0);
|
|
28
|
+
//# sourceMappingURL=message.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.class.js","sourceRoot":"","sources":["../../../../sample/felines/class/message.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAE9C,MAAsB,OAAO;IAW3B,YAAY,WAAgC;QAC1C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IACnC,CAAC;CACF;AAdD,0BAcC;AAZC;IADC,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;;8CACV;AAGtB;IADC,IAAA,qBAAW,EAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;;wCACnC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Tiger = void 0;
|
|
4
|
+
const feline_class_1 = require("./feline.class");
|
|
5
|
+
class Tiger extends feline_class_1.Feline {
|
|
6
|
+
}
|
|
7
|
+
exports.Tiger = Tiger;
|
|
8
|
+
//# sourceMappingURL=tiger.class.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tiger.class.js","sourceRoot":"","sources":["../../../../sample/felines/class/tiger.class.ts"],"names":[],"mappings":";;;AAAA,iDAAwC;AAExC,MAAa,KAAM,SAAQ,qBAAM;CAEhC;AAFD,sBAEC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateFelineDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_1 = require("../class");
|
|
15
|
+
class CreateFelineDto extends class_1.Message {
|
|
16
|
+
}
|
|
17
|
+
exports.CreateFelineDto = CreateFelineDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, swagger_1.ApiProperty)({
|
|
20
|
+
oneOf: [
|
|
21
|
+
{ $ref: (0, swagger_1.getSchemaPath)(class_1.Cat) },
|
|
22
|
+
{ $ref: (0, swagger_1.getSchemaPath)(class_1.Lion) },
|
|
23
|
+
{ $ref: (0, swagger_1.getSchemaPath)(class_1.Tiger) },
|
|
24
|
+
],
|
|
25
|
+
}),
|
|
26
|
+
__metadata("design:type", class_1.Feline)
|
|
27
|
+
], CreateFelineDto.prototype, "payload", void 0);
|
|
28
|
+
//# sourceMappingURL=create-feline.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-feline.dto.js","sourceRoot":"","sources":["../../../../sample/felines/dto/create-feline.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA6D;AAC7D,oCAA6D;AAE7D,MAAa,eAAgB,SAAQ,eAAe;CASnD;AATD,0CASC;AADC;IAPC,IAAA,qBAAW,EAAC;QACX,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,WAAG,CAAC,EAAE;YAC5B,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,YAAI,CAAC,EAAE;YAC7B,EAAE,IAAI,EAAE,IAAA,uBAAa,EAAC,aAAK,CAAC,EAAE;SAC/B;KACF,CAAC;8BACO,cAAM;gDAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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("../class/message.class"), exports);
|
|
18
|
+
__exportStar(require("./create-feline.dto"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../sample/felines/dto/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,sDAAoC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.JournalingDataDto = void 0;
|
|
4
|
+
const class_1 = require("../class");
|
|
5
|
+
class JournalingDataDto extends class_1.Message {
|
|
6
|
+
}
|
|
7
|
+
exports.JournalingDataDto = JournalingDataDto;
|
|
8
|
+
//# sourceMappingURL=journaling-data.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"journaling-data.dto.js","sourceRoot":"","sources":["../../../../sample/felines/dto/journaling-data.dto.ts"],"names":[],"mappings":";;;AAAA,oCAAmC;AAEnC,MAAa,iBAAkB,SAAQ,eAAgC;CAEtE;AAFD,8CAEC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FELINES_MS = "FELINES_MS";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"felines.constants.js","sourceRoot":"","sources":["../../../sample/felines/felines.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ClientProxy } from '@nestjs/microservices';
|
|
2
|
+
import { CreateFelineDto } from './dto';
|
|
3
|
+
import { Feline } from '../../sample/felines/class';
|
|
4
|
+
import { JournalingDataDto } from '../../sample/felines/dto/journaling-data.dto';
|
|
5
|
+
import { FelinesService } from '../../sample/felines/felines.service';
|
|
6
|
+
export declare class FelinesController {
|
|
7
|
+
private readonly client;
|
|
8
|
+
private readonly felinesService;
|
|
9
|
+
private logger;
|
|
10
|
+
constructor(client: ClientProxy, felinesService: FelinesService);
|
|
11
|
+
journal(dataForJournaling: JournalingDataDto): Promise<void>;
|
|
12
|
+
createFeline(createFelineDto: CreateFelineDto): Promise<void>;
|
|
13
|
+
publishCreatedFeline(feline: Feline): import("rxjs").Observable<any>;
|
|
14
|
+
do(): Promise<void>;
|
|
15
|
+
}
|