@rsdk/grpc.loader 4.0.0-next.13 → 4.0.0-next.15

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,6 +3,16 @@
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-next.15](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.14...v4.0.0-next.15) (2023-11-30)
7
+
8
+ ### Features
9
+
10
+ * added protocol detector ([#166](https://github.com/R-Vision/rsdk/issues/166)) ([f348995](https://github.com/R-Vision/rsdk/commit/f348995f29648c7392b7375c5b2001197d60eb36))
11
+
12
+ ## [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)
13
+
14
+ **Note:** Version bump only for package @rsdk/grpc.loader
15
+
6
16
  ## [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)
7
17
 
8
18
  **Note:** Version bump only for package @rsdk/grpc.loader
@@ -27,19 +37,22 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
37
 
28
38
  ### Features
29
39
 
30
- * Kafka batch producer ([#150](https://github.com/R-Vision/rsdk/issues/150)) ([2faa2f4](https://github.com/R-Vision/rsdk/commit/2faa2f41ca0dbb6d8a92cbf0ab20cf5cefeaf4e9))
40
+ * Kafka batch
41
+ producer ([#150](https://github.com/R-Vision/rsdk/issues/150)) ([2faa2f4](https://github.com/R-Vision/rsdk/commit/2faa2f41ca0dbb6d8a92cbf0ab20cf5cefeaf4e9))
31
42
 
32
43
  ## [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)
33
44
 
34
45
  ### Features
35
46
 
36
- * **PFM-126:** reflection added ([ffaaa99](https://github.com/R-Vision/rsdk/commit/ffaaa996e0a81f98be46b0b73badb59f3e680eac))
47
+ * **PFM-126:** reflection
48
+ added ([ffaaa99](https://github.com/R-Vision/rsdk/commit/ffaaa996e0a81f98be46b0b73badb59f3e680eac))
37
49
 
38
50
  ## [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)
39
51
 
40
52
  ### Bug Fixes
41
53
 
42
- * some more peer dependencies ([3617dcb](https://github.com/R-Vision/rsdk/commit/3617dcbfdd08231e8f334ff35ac46eb99d810567))
54
+ * some more peer
55
+ dependencies ([3617dcb](https://github.com/R-Vision/rsdk/commit/3617dcbfdd08231e8f334ff35ac46eb99d810567))
43
56
 
44
57
  ## [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)
45
58
 
@@ -77,13 +90,15 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
77
90
 
78
91
  ### Bug Fixes
79
92
 
80
- * **deps:** correctly peerDependencies ([349628f](https://github.com/R-Vision/rsdk/commit/349628f10da46a30d6c8b9f9387e010869318212))
93
+ * **deps:** correctly
94
+ peerDependencies ([349628f](https://github.com/R-Vision/rsdk/commit/349628f10da46a30d6c8b9f9387e010869318212))
81
95
 
82
96
  ## [3.0.1-next.0](https://github.com/R-Vision/rsdk/compare/v3.0.0...v3.0.1-next.0) (2023-08-07)
83
97
 
84
98
  ### Bug Fixes
85
99
 
86
- * **deps:** correctly peerDependencies ([7483e35](https://github.com/R-Vision/rsdk/commit/7483e3560b5cf23ebebe6149bd41ebb517821e99))
100
+ * **deps:** correctly
101
+ peerDependencies ([7483e35](https://github.com/R-Vision/rsdk/commit/7483e3560b5cf23ebebe6149bd41ebb517821e99))
87
102
 
88
103
  ## [3.0.0](https://github.com/R-Vision/rsdk/compare/v3.0.0-next.0...v3.0.0) (2023-08-04)
89
104
 
@@ -129,7 +144,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
129
144
 
130
145
  ### Bug Fixes
131
146
 
132
- * remove private dependencies from `peerDependencies` section ([0bce6ff](https://github.com/R-Vision/rsdk/commit/0bce6ffb5b699e2ed1dc9aca77cbdbf085267ff7))
147
+ * remove private dependencies from `peerDependencies`
148
+ section ([0bce6ff](https://github.com/R-Vision/rsdk/commit/0bce6ffb5b699e2ed1dc9aca77cbdbf085267ff7))
133
149
 
134
150
  ## 1.0.11 (2023-05-23)
135
151
 
@@ -139,7 +155,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
139
155
 
140
156
  ### Bug Fixes
141
157
 
142
- * add "access: public" to new packages ([04d5983](https://github.com/R-Vision/rsdk/commit/04d5983cfa3e97c5d8219e07208a0499a8c6bc83))
158
+ * add "access: public" to new
159
+ packages ([04d5983](https://github.com/R-Vision/rsdk/commit/04d5983cfa3e97c5d8219e07208a0499a8c6bc83))
143
160
 
144
161
  ## 1.0.9 (2023-05-21)
145
162
 
@@ -169,7 +186,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
169
186
 
170
187
  ### Bug Fixes
171
188
 
172
- * builtin make not private in npm ([50c83b6](https://github.com/R-Vision/rsdk/commit/50c83b6454f9a89f1e99d3b33a497ce2c029d8c6))
189
+ * builtin make not private in
190
+ npm ([50c83b6](https://github.com/R-Vision/rsdk/commit/50c83b6454f9a89f1e99d3b33a497ce2c029d8c6))
173
191
 
174
192
  ## 1.0.2 (2023-05-10)
175
193
 
@@ -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.13",
3
+ "version": "4.0.0-next.15",
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": "3fe5f00eff1ac7155d8e42dbbbcbd8a6cfd75e93",
23
+ "gitHead": "8abd89d7800375749b024410dc3465ff40389277",
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
  }