@rsdk/grpc.loader 4.0.0-next.8 → 4.0.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/CHANGELOG.md CHANGED
@@ -3,23 +3,76 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.0.0](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.19...v4.0.0) (2023-12-04)
7
+
8
+ **Note:** Version bump only for package @rsdk/grpc.loader
9
+
10
+ ## [4.0.0-next.19](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.18...v4.0.0-next.19) (2023-12-02)
11
+
12
+ **Note:** Version bump only for package @rsdk/grpc.loader
13
+
14
+ ## [4.0.0-next.18](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.17...v4.0.0-next.18) (2023-12-02)
15
+
16
+ **Note:** Version bump only for package @rsdk/grpc.loader
17
+
18
+ ## [4.0.0-next.17](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.16...v4.0.0-next.17) (2023-12-01)
19
+
20
+ **Note:** Version bump only for package @rsdk/grpc.loader
21
+
22
+ ## [4.0.0-next.16](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.15...v4.0.0-next.16) (2023-11-30)
23
+
24
+ **Note:** Version bump only for package @rsdk/grpc.loader
25
+
26
+ ## [4.0.0-next.15](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.14...v4.0.0-next.15) (2023-11-30)
27
+
28
+ ### Features
29
+
30
+ * added protocol detector ([#166](https://github.com/R-Vision/rsdk/issues/166)) ([f348995](https://github.com/R-Vision/rsdk/commit/f348995f29648c7392b7375c5b2001197d60eb36))
31
+
32
+ ## [4.0.0-next.14](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.13...v4.0.0-next.14) (2023-11-29)
33
+
34
+ **Note:** Version bump only for package @rsdk/grpc.loader
35
+
36
+ ## [4.0.0-next.13](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.12...v4.0.0-next.13) (2023-11-29)
37
+
38
+ **Note:** Version bump only for package @rsdk/grpc.loader
39
+
40
+ ## [4.0.0-next.12](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.11...v4.0.0-next.12) (2023-11-29)
41
+
42
+ **Note:** Version bump only for package @rsdk/grpc.loader
43
+
44
+ ## [4.0.0-next.11](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.10...v4.0.0-next.11) (2023-11-29)
45
+
46
+ **Note:** Version bump only for package @rsdk/grpc.loader
47
+
48
+ ## [4.0.0-next.10](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.9...v4.0.0-next.10) (2023-11-29)
49
+
50
+ **Note:** Version bump only for package @rsdk/grpc.loader
51
+
52
+ ## [4.0.0-next.9](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.8...v4.0.0-next.9) (2023-11-29)
53
+
54
+ **Note:** Version bump only for package @rsdk/grpc.loader
55
+
6
56
  ## [4.0.0-next.8](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.7...v4.0.0-next.8) (2023-11-29)
7
57
 
8
58
  ### Features
9
59
 
10
- * Kafka batch producer ([#150](https://github.com/R-Vision/rsdk/issues/150)) ([2faa2f4](https://github.com/R-Vision/rsdk/commit/2faa2f41ca0dbb6d8a92cbf0ab20cf5cefeaf4e9))
60
+ * Kafka batch
61
+ producer ([#150](https://github.com/R-Vision/rsdk/issues/150)) ([2faa2f4](https://github.com/R-Vision/rsdk/commit/2faa2f41ca0dbb6d8a92cbf0ab20cf5cefeaf4e9))
11
62
 
12
63
  ## [4.0.0-next.5](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.4...v4.0.0-next.5) (2023-11-13)
13
64
 
14
65
  ### Features
15
66
 
16
- * **PFM-126:** reflection added ([ffaaa99](https://github.com/R-Vision/rsdk/commit/ffaaa996e0a81f98be46b0b73badb59f3e680eac))
67
+ * **PFM-126:** reflection
68
+ added ([ffaaa99](https://github.com/R-Vision/rsdk/commit/ffaaa996e0a81f98be46b0b73badb59f3e680eac))
17
69
 
18
70
  ## [4.0.0-next.4](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.3...v4.0.0-next.4) (2023-11-12)
19
71
 
20
72
  ### Bug Fixes
21
73
 
22
- * some more peer dependencies ([3617dcb](https://github.com/R-Vision/rsdk/commit/3617dcbfdd08231e8f334ff35ac46eb99d810567))
74
+ * some more peer
75
+ dependencies ([3617dcb](https://github.com/R-Vision/rsdk/commit/3617dcbfdd08231e8f334ff35ac46eb99d810567))
23
76
 
24
77
  ## [4.0.0-next.2](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.1...v4.0.0-next.2) (2023-11-10)
25
78
 
@@ -57,13 +110,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
57
110
 
58
111
  ### Bug Fixes
59
112
 
60
- * **deps:** correctly peerDependencies ([349628f](https://github.com/R-Vision/rsdk/commit/349628f10da46a30d6c8b9f9387e010869318212))
113
+ * **deps:** correctly
114
+ peerDependencies ([349628f](https://github.com/R-Vision/rsdk/commit/349628f10da46a30d6c8b9f9387e010869318212))
61
115
 
62
116
  ## [3.0.1-next.0](https://github.com/R-Vision/rsdk/compare/v3.0.0...v3.0.1-next.0) (2023-08-07)
63
117
 
64
118
  ### Bug Fixes
65
119
 
66
- * **deps:** correctly peerDependencies ([7483e35](https://github.com/R-Vision/rsdk/commit/7483e3560b5cf23ebebe6149bd41ebb517821e99))
120
+ * **deps:** correctly
121
+ peerDependencies ([7483e35](https://github.com/R-Vision/rsdk/commit/7483e3560b5cf23ebebe6149bd41ebb517821e99))
67
122
 
68
123
  ## [3.0.0](https://github.com/R-Vision/rsdk/compare/v3.0.0-next.0...v3.0.0) (2023-08-04)
69
124
 
@@ -109,7 +164,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
109
164
 
110
165
  ### Bug Fixes
111
166
 
112
- * remove private dependencies from `peerDependencies` section ([0bce6ff](https://github.com/R-Vision/rsdk/commit/0bce6ffb5b699e2ed1dc9aca77cbdbf085267ff7))
167
+ * remove private dependencies from `peerDependencies`
168
+ section ([0bce6ff](https://github.com/R-Vision/rsdk/commit/0bce6ffb5b699e2ed1dc9aca77cbdbf085267ff7))
113
169
 
114
170
  ## 1.0.11 (2023-05-23)
115
171
 
@@ -119,7 +175,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
119
175
 
120
176
  ### Bug Fixes
121
177
 
122
- * add "access: public" to new packages ([04d5983](https://github.com/R-Vision/rsdk/commit/04d5983cfa3e97c5d8219e07208a0499a8c6bc83))
178
+ * add "access: public" to new
179
+ packages ([04d5983](https://github.com/R-Vision/rsdk/commit/04d5983cfa3e97c5d8219e07208a0499a8c6bc83))
123
180
 
124
181
  ## 1.0.9 (2023-05-21)
125
182
 
@@ -149,7 +206,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
149
206
 
150
207
  ### Bug Fixes
151
208
 
152
- * builtin make not private in npm ([50c83b6](https://github.com/R-Vision/rsdk/commit/50c83b6454f9a89f1e99d3b33a497ce2c029d8c6))
209
+ * builtin make not private in
210
+ npm ([50c83b6](https://github.com/R-Vision/rsdk/commit/50c83b6454f9a89f1e99d3b33a497ce2c029d8c6))
153
211
 
154
212
  ## 1.0.2 (2023-05-10)
155
213
 
@@ -1 +1 @@
1
- {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,SAAgB,QAAQ,CACtB,KAAwB,EACxB,MAA2C;IAE3C,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE;QACjC,sCAAsC;QACtC,oDAAoD;QACpD,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAE/C,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC/D,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;SAC/C;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAjBD,4BAiBC"}
1
+ {"version":3,"file":"loader.js","sourceRoot":"","sources":["../src/loader.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,SAAgB,QAAQ,CACtB,KAAwB,EACxB,MAA2C;IAE3C,MAAM,MAAM,GAA4B,EAAE,CAAC;IAE3C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QAClC,sCAAsC;QACtC,oDAAoD;QACpD,MAAM,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAE/C,KAAK,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;YAChE,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;QAChD,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAjBD,4BAiBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdk/grpc.loader",
3
- "version": "4.0.0-next.8",
3
+ "version": "4.0.0",
4
4
  "description": "Load generated ts code to nestjs and initialize microservice",
5
5
  "license": "Apache License 2.0",
6
6
  "publishConfig": {
@@ -20,7 +20,7 @@
20
20
  "@nestjs/microservices": "^10.0.0",
21
21
  "reflect-metadata": "^0.1.13"
22
22
  },
23
- "gitHead": "bae7c74fc8be068b8bd66b403d19e2b32cf092ec",
23
+ "gitHead": "e38e5b762d2c4aab277f0f65a5be5abcbccba8a8",
24
24
  "dependencies": {
25
25
  "rxjs": "^7.8.1"
26
26
  }
package/src/loader.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * CUSTOM PROTO "LOADER"
3
- *
3
+ *
4
4
  * Стандартный loader, который использует нест (@grpc/proto-loader) требует для работы
5
5
  * исходных .proto-файлов. Нам это не подходит, т.к. контракты мы храним в отдельных
6
6
  * репозиториях.
7
- *
7
+ *
8
8
  * Данный модуль, подсовывается несту, вместо @grpc/proto-loader.
9
- *
9
+ *
10
10
  * Как это работает:
11
- *
11
+ *
12
12
  * Для работы gRPC-транспорту неста нужны "определения"/"дефинишены" - они же definitions.
13
13
  * Определения представляют собой объект такого вида:
14
- *
14
+ *
15
15
  {
16
16
  'package1.v1.SomeService': {
17
17
  something: {
@@ -26,22 +26,22 @@
26
26
  },
27
27
  ...
28
28
  }
29
- *
29
+ *
30
30
  * Первый уровень ключей - <имя grpc-пакета>.<имя grpc-сервиса>.
31
31
  * Второй уровень - название gRPC метода (приведённое к camelCase)
32
- *
32
+ *
33
33
  * Подобные объекты генерируется из .proto-файлов при помощи библиотеки
34
34
  * @grpc/grpc-js, которую мы используем в нашем генераторе.
35
35
  * TODO: ссылку на репозиторий генератора
36
- *
36
+ *
37
37
  * Функция loadSync не предназначена для проброса этих дефинишенов напрямую.
38
38
  * Но объект передаваемый в поле loader попадёт в функцию без изменений.
39
39
  * Этим фактом мы и пользуемся для проброса массива объектов классы Package,
40
40
  * которые содержат всю необходимую информацию.
41
- *
41
+ *
42
42
  * Остаётся только смержить данные по всем пакетам в один объект и сделать правильные
43
43
  * ключи.
44
- *
44
+ *
45
45
  * NOTE: В первом аргументе, соответственно, будет undefined, поскольку поле protoPath
46
46
  * мы не передаём
47
47
  */
package/tsconfig.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
-
3
2
  "extends": "@rsdk/tsconfig/base.json",
4
3
  "compilerOptions": {
5
4
  "declaration": true,
6
5
  "outDir": "dist"
7
6
  },
8
- "include": ["src/**/*"],
9
- "exclude": ["node_modules", "dist", "test", "**/*.spec.ts", "**/*.test.ts", "**/*.spec.e2e.ts", "**/*.test.e2e.ts"]
7
+ "include": [
8
+ "src/**/*"
9
+ ],
10
+ "exclude": [
11
+ "node_modules",
12
+ "dist",
13
+ "test",
14
+ "**/*.spec.ts",
15
+ "**/*.test.ts",
16
+ "**/*.spec.e2e.ts",
17
+ "**/*.test.e2e.ts"
18
+ ]
10
19
  }