@nathapp/nestjs-microservices 1.0.0-rc.9 → 1.0.1
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/README.md +1 -1
- package/dist/adapter/adapter.interface.d.ts +179 -0
- package/dist/adapter/adapter.interface.js +3 -0
- package/dist/adapter/adapter.interface.js.map +1 -0
- package/dist/adapter/http-fetch-service.adapter.d.ts +17 -0
- package/dist/adapter/http-fetch-service.adapter.js +147 -0
- package/dist/adapter/http-fetch-service.adapter.js.map +1 -0
- package/dist/adapter/http-service.adapter.d.ts +9 -1
- package/dist/adapter/http-service.adapter.js +53 -12
- package/dist/adapter/http-service.adapter.js.map +1 -0
- package/dist/adapter/index.d.ts +4 -1
- package/dist/adapter/index.js +6 -1
- package/dist/adapter/index.js.map +1 -0
- package/dist/adapter/micro-service-adapter-factory.d.ts +4 -2
- package/dist/adapter/micro-service-adapter-factory.js +44 -1
- package/dist/adapter/micro-service-adapter-factory.js.map +1 -0
- package/dist/adapter/micro-service.adapter.d.ts +13 -12
- package/dist/adapter/micro-service.adapter.js +1 -0
- package/dist/adapter/micro-service.adapter.js.map +1 -0
- package/dist/adapter/nestjs-micro-service.adapter.d.ts +13 -0
- package/dist/adapter/nestjs-micro-service.adapter.js +32 -0
- package/dist/adapter/nestjs-micro-service.adapter.js.map +1 -0
- package/dist/client/base-grpc.service.d.ts +9 -0
- package/dist/client/base-grpc.service.js +14 -0
- package/dist/client/base-grpc.service.js.map +1 -0
- package/dist/client/closeable.interface.js +1 -0
- package/dist/client/closeable.interface.js.map +1 -0
- package/dist/client/constants.d.ts +2 -0
- package/dist/client/constants.js +6 -0
- package/dist/client/constants.js.map +1 -0
- package/dist/client/custom-client-rmq.d.ts +41 -0
- package/dist/client/custom-client-rmq.js +198 -0
- package/dist/client/custom-client-rmq.js.map +1 -0
- package/dist/client/index.d.ts +4 -1
- package/dist/client/index.js +8 -1
- package/dist/client/index.js.map +1 -0
- package/dist/client/jwt-client-grpc.proxy.d.ts +10 -0
- package/dist/client/jwt-client-grpc.proxy.js +132 -0
- package/dist/client/jwt-client-grpc.proxy.js.map +1 -0
- package/dist/client/service-client-factory.js +1 -0
- package/dist/client/service-client-factory.js.map +1 -0
- package/dist/client/service-client.d.ts +9 -3
- package/dist/client/service-client.js +8 -0
- package/dist/client/service-client.js.map +1 -0
- package/dist/constant/index.js +1 -0
- package/dist/constant/index.js.map +1 -0
- package/dist/constant/jwt-constant.js +1 -0
- package/dist/constant/jwt-constant.js.map +1 -0
- package/dist/constant/module-constant.js +1 -0
- package/dist/constant/module-constant.js.map +1 -0
- package/dist/decorator/index.d.ts +3 -2
- package/dist/decorator/index.js +8 -2
- package/dist/decorator/index.js.map +1 -0
- package/dist/decorator/micro-service.decorator.d.ts +2 -1
- package/dist/decorator/micro-service.decorator.js +22 -6
- package/dist/decorator/micro-service.decorator.js.map +1 -0
- package/dist/decorator/protobuf.decorator.d.ts +3 -0
- package/dist/decorator/protobuf.decorator.js +16 -0
- package/dist/decorator/protobuf.decorator.js.map +1 -0
- package/dist/enum/index.js +1 -0
- package/dist/enum/index.js.map +1 -0
- package/dist/enum/transport.enum.d.ts +8 -1
- package/dist/enum/transport.enum.js +10 -2
- package/dist/enum/transport.enum.js.map +1 -0
- package/dist/exception/app-rpc-exception.d.ts +5 -0
- package/dist/exception/app-rpc-exception.js +12 -0
- package/dist/exception/app-rpc-exception.js.map +1 -0
- package/dist/exception/index.d.ts +3 -0
- package/dist/exception/index.js +10 -0
- package/dist/exception/index.js.map +1 -0
- package/dist/exception/utils.d.ts +10 -0
- package/dist/exception/utils.js +41 -0
- package/dist/exception/utils.js.map +1 -0
- package/dist/external/grpc-options.interface.d.ts +16 -0
- package/dist/external/grpc-options.interface.js +3 -0
- package/dist/external/grpc-options.interface.js.map +1 -0
- package/dist/external/kafka.interface.d.ts +1119 -0
- package/dist/external/kafka.interface.js +78 -0
- package/dist/external/kafka.interface.js.map +1 -0
- package/dist/external/mqtt-client.interface.d.ts +30 -0
- package/dist/external/mqtt-client.interface.js +3 -0
- package/dist/external/mqtt-client.interface.js.map +1 -0
- package/dist/external/mqtt-options.interface.d.ts +54 -0
- package/dist/external/mqtt-options.interface.js +3 -0
- package/dist/external/mqtt-options.interface.js.map +1 -0
- package/dist/external/redis.interface.d.ts +52 -0
- package/dist/external/redis.interface.js +3 -0
- package/dist/external/redis.interface.js.map +1 -0
- package/dist/external/rmq-url.interface.d.ts +28 -0
- package/dist/external/rmq-url.interface.js +3 -0
- package/dist/external/rmq-url.interface.js.map +1 -0
- package/dist/filter/gprc-server.exception.filter.d.ts +6 -0
- package/dist/filter/gprc-server.exception.filter.js +22 -0
- package/dist/filter/gprc-server.exception.filter.js.map +1 -0
- package/dist/filter/index.d.ts +3 -0
- package/dist/filter/index.js +8 -0
- package/dist/filter/index.js.map +1 -0
- package/dist/filter/ms-global.exception.filter.d.ts +9 -0
- package/dist/filter/ms-global.exception.filter.js +40 -0
- package/dist/filter/ms-global.exception.filter.js.map +1 -0
- package/dist/guard/index.js +1 -0
- package/dist/guard/index.js.map +1 -0
- package/dist/guard/jwt-ms-auth.guard.js +3 -2
- package/dist/guard/jwt-ms-auth.guard.js.map +1 -0
- package/dist/guard/micro-service.guard.d.ts +4 -1
- package/dist/guard/micro-service.guard.js +33 -4
- package/dist/guard/micro-service.guard.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptor/grpc-to-http.interceptor.d.ts +6 -0
- package/dist/interceptor/grpc-to-http.interceptor.js +32 -0
- package/dist/interceptor/grpc-to-http.interceptor.js.map +1 -0
- package/dist/interceptor/http-to-grpc.interceptor.d.ts +5 -0
- package/dist/interceptor/http-to-grpc.interceptor.js +35 -0
- package/dist/interceptor/http-to-grpc.interceptor.js.map +1 -0
- package/dist/interceptor/index.d.ts +3 -0
- package/dist/interceptor/index.js +8 -0
- package/dist/interceptor/index.js.map +1 -0
- package/dist/module/index.d.ts +2 -2
- package/dist/module/index.js +3 -1
- package/dist/module/index.js.map +1 -0
- package/dist/module/micro-service-clients-module-factory.d.ts +9 -0
- package/dist/module/micro-service-clients-module-factory.js +16 -1
- package/dist/module/micro-service-clients-module-factory.js.map +1 -0
- package/dist/module/micro-service-clients-module.interface.js +1 -0
- package/dist/module/micro-service-clients-module.interface.js.map +1 -0
- package/dist/module/micro-service-clients.module.js +3 -2
- package/dist/module/micro-service-clients.module.js.map +1 -0
- package/dist/module/micro-service.module.d.ts +6 -1
- package/dist/module/micro-service.module.js +21 -6
- package/dist/module/micro-service.module.js.map +1 -0
- package/dist/server/custom-server-rmq.d.ts +27 -0
- package/dist/server/custom-server-rmq.js +160 -0
- package/dist/server/custom-server-rmq.js.map +1 -0
- package/dist/server/index.d.ts +3 -0
- package/dist/server/index.js +8 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/server-keepalive.d.ts +7 -0
- package/dist/server/server-keepalive.js +22 -0
- package/dist/server/server-keepalive.js.map +1 -0
- package/dist/strategy/index.js +1 -0
- package/dist/strategy/index.js.map +1 -0
- package/dist/strategy/microservice-jwt-strategy-provider.d.ts +4 -2
- package/dist/strategy/microservice-jwt-strategy-provider.js +2 -1
- package/dist/strategy/microservice-jwt-strategy-provider.js.map +1 -0
- package/dist/strategy/microservice-jwt.strategy.d.ts +1 -0
- package/dist/strategy/microservice-jwt.strategy.js +10 -4
- package/dist/strategy/microservice-jwt.strategy.js.map +1 -0
- package/package.json +62 -25
- package/.eslintrc.js +0 -24
package/package.json
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathapp/nestjs-microservices",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "nestjs-microservices",
|
|
5
5
|
"scripts": {
|
|
6
|
+
"clean": "rimraf dist/ .turbo/",
|
|
6
7
|
"build": "rimraf dist && tsc -p tsconfig.json",
|
|
7
8
|
"precommit": "lint-staged",
|
|
8
|
-
"test": "jest",
|
|
9
|
-
"test:
|
|
10
|
-
"test:
|
|
11
|
-
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
9
|
+
"test": "jest --config ./test/jest-test.json",
|
|
10
|
+
"test:cov": "jest --config ./test/jest-test.json --coverage",
|
|
11
|
+
"test:watch": "jest --config ./test/jest-test.json --watch",
|
|
12
12
|
"lint": "eslint -c .eslintrc.js"
|
|
13
13
|
},
|
|
14
|
-
"author": "",
|
|
14
|
+
"author": "William Khoo",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@
|
|
17
|
+
"@grpc/grpc-js": "^1.9.5",
|
|
18
|
+
"@grpc/proto-loader": "^0.7.10",
|
|
19
19
|
"@types/express": "^4.17.17",
|
|
20
|
-
"@types/
|
|
20
|
+
"@types/json-bigint": "^1.0.1",
|
|
21
21
|
"@types/passport-jwt": "^3.0.8",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"eslint
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
22
|
+
"amqp-connection-manager": "^4.1.14",
|
|
23
|
+
"amqplib": "^0.10.3",
|
|
24
|
+
"axios": "^1.6.8",
|
|
25
|
+
"eslint": "^8.57.0",
|
|
26
|
+
"ioredis": "^5.3.2",
|
|
27
|
+
"jest": "^29.5.0",
|
|
28
|
+
"kafkajs": "^2.2.4",
|
|
29
|
+
"mqtt": "^5.1.0",
|
|
30
|
+
"nats": "^2.17.0",
|
|
31
|
+
"typescript": "^5"
|
|
29
32
|
},
|
|
30
33
|
"types": "./index.d.ts",
|
|
31
34
|
"main": "index.js",
|
|
@@ -33,19 +36,53 @@
|
|
|
33
36
|
"lib": "lib"
|
|
34
37
|
},
|
|
35
38
|
"dependencies": {
|
|
36
|
-
"@nathapp/auth": "^1.0.1",
|
|
37
|
-
"@nathapp/nestjs-
|
|
38
|
-
"
|
|
39
|
-
"axios": "^1.4.0",
|
|
39
|
+
"@nathapp/nestjs-auth": "^1.0.1-rc.0",
|
|
40
|
+
"@nathapp/nestjs-common": "^1.0.2-rc.0",
|
|
41
|
+
"json-bigint": "^1.0.0",
|
|
40
42
|
"passport-jwt": "^4.0.1"
|
|
41
43
|
},
|
|
42
44
|
"peerDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@nestjs
|
|
45
|
-
"@nestjs
|
|
45
|
+
"@grpc/grpc-js": "*",
|
|
46
|
+
"@nathapp/nestjs-auth": "^1.0.1",
|
|
47
|
+
"@nathapp/nestjs-common": "^1.0.2",
|
|
48
|
+
"@nestjs/microservices": "^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
46
49
|
"@nestjs/passport": "^8.0.0 || ^9.0.0 || ^10.0.0",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
50
|
+
"axios": "*",
|
|
51
|
+
"amqp-connection-manager": "*",
|
|
52
|
+
"amqplib": "*",
|
|
53
|
+
"ioredis": "*",
|
|
54
|
+
"kafkajs": "*",
|
|
55
|
+
"mqtt": "*",
|
|
56
|
+
"nats": "*",
|
|
49
57
|
"rxjs": "*"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@grpc/grpc-js": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@nestjs/websockets": {
|
|
64
|
+
"optional": true
|
|
65
|
+
},
|
|
66
|
+
"kafkajs": {
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
"mqtt": {
|
|
70
|
+
"optional": true
|
|
71
|
+
},
|
|
72
|
+
"nats": {
|
|
73
|
+
"optional": true
|
|
74
|
+
},
|
|
75
|
+
"ioredis": {
|
|
76
|
+
"optional": true
|
|
77
|
+
},
|
|
78
|
+
"amqplib": {
|
|
79
|
+
"optional": true
|
|
80
|
+
},
|
|
81
|
+
"amqp-connection-manager": {
|
|
82
|
+
"optional": true
|
|
83
|
+
},
|
|
84
|
+
"axios": {
|
|
85
|
+
"optional": true
|
|
86
|
+
}
|
|
50
87
|
}
|
|
51
88
|
}
|
package/.eslintrc.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parser: '@typescript-eslint/parser',
|
|
3
|
-
parserOptions: {
|
|
4
|
-
project: 'tsconfig.json',
|
|
5
|
-
sourceType: 'module',
|
|
6
|
-
},
|
|
7
|
-
plugins: ['@typescript-eslint/eslint-plugin'],
|
|
8
|
-
extends: [
|
|
9
|
-
'plugin:@typescript-eslint/recommended',
|
|
10
|
-
'plugin:prettier/recommended',
|
|
11
|
-
],
|
|
12
|
-
root: true,
|
|
13
|
-
env: {
|
|
14
|
-
node: true,
|
|
15
|
-
jest: true,
|
|
16
|
-
},
|
|
17
|
-
ignorePatterns: ['.eslintrc.js'],
|
|
18
|
-
rules: {
|
|
19
|
-
'@typescript-eslint/interface-name-prefix': 'off',
|
|
20
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
21
|
-
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
22
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
23
|
-
},
|
|
24
|
-
};
|