@lakutata/nats 2.3.0 → 3.0.0-beta.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/LICENSE +23 -0
- package/README.md +288 -25
- package/dist/cjs/codecs/JSONCodec.d.ts +32 -0
- package/dist/cjs/codecs/JSONCodec.js +44 -0
- package/dist/cjs/codecs/MessagePackCodec.d.ts +22 -0
- package/dist/cjs/codecs/MessagePackCodec.js +35 -0
- package/dist/cjs/components/NATS.d.ts +376 -0
- package/dist/cjs/components/NATS.js +772 -0
- package/dist/cjs/entrypoints/NatsServiceEntrypoint.d.ts +102 -0
- package/dist/cjs/entrypoints/NatsServiceEntrypoint.js +127 -0
- package/dist/cjs/exceptions/NatsBadRequestException.d.ts +11 -0
- package/dist/cjs/exceptions/NatsBadRequestException.js +18 -0
- package/dist/cjs/exceptions/NatsBulkException.d.ts +19 -0
- package/dist/cjs/exceptions/NatsBulkException.js +26 -0
- package/dist/cjs/exceptions/NatsForbiddenException.d.ts +11 -0
- package/dist/cjs/exceptions/NatsForbiddenException.js +18 -0
- package/dist/cjs/exceptions/NatsInternalServerException.d.ts +12 -0
- package/dist/cjs/exceptions/NatsInternalServerException.js +19 -0
- package/dist/cjs/exceptions/NatsNoRespondersAvailableException.d.ts +12 -0
- package/dist/cjs/exceptions/NatsNoRespondersAvailableException.js +19 -0
- package/dist/cjs/exceptions/NatsNotFoundException.d.ts +11 -0
- package/dist/cjs/exceptions/NatsNotFoundException.js +18 -0
- package/dist/cjs/exceptions/NatsRequestTimeoutException.d.ts +11 -0
- package/dist/cjs/exceptions/NatsRequestTimeoutException.js +18 -0
- package/dist/cjs/exports/Nats.d.ts +18 -0
- package/dist/cjs/exports/Nats.js +39 -0
- package/dist/cjs/interfaces/NatsClientOptions.d.ts +106 -0
- package/dist/{lib → cjs/lib}/ServiceEventCodec.d.ts +0 -1
- package/dist/{lib → cjs/lib}/ServiceEventCodec.js +19 -9
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/providers/ServiceProxy.d.ts +210 -0
- package/dist/cjs/providers/ServiceProxy.js +274 -0
- package/dist/cjs/types/SubscribeOptions.d.ts +33 -0
- package/dist/esm/codecs/JSONCodec.js +41 -0
- package/dist/esm/codecs/MessagePackCodec.js +32 -0
- package/dist/esm/components/NATS.js +767 -0
- package/dist/esm/entrypoints/NatsServiceEntrypoint.js +123 -0
- package/dist/esm/exceptions/NatsBadRequestException.js +14 -0
- package/dist/esm/exceptions/NatsBulkException.js +22 -0
- package/dist/esm/exceptions/NatsForbiddenException.js +14 -0
- package/dist/esm/exceptions/NatsInternalServerException.js +15 -0
- package/dist/esm/exceptions/NatsNoRespondersAvailableException.js +15 -0
- package/dist/esm/exceptions/NatsNotFoundException.js +14 -0
- package/dist/esm/exceptions/NatsRequestTimeoutException.js +14 -0
- package/dist/esm/exports/Nats.js +15 -0
- package/dist/esm/interfaces/NatsClientOptions.js +1 -0
- package/dist/esm/lib/ServiceEventCodec.js +21 -0
- package/dist/esm/providers/ServiceProxy.js +270 -0
- package/dist/esm/types/SubscribeOptions.js +1 -0
- package/dist/types/codecs/JSONCodec.d.ts +32 -0
- package/dist/types/codecs/MessagePackCodec.d.ts +22 -0
- package/dist/types/components/NATS.d.ts +376 -0
- package/dist/types/entrypoints/NatsServiceEntrypoint.d.ts +102 -0
- package/dist/types/exceptions/NatsBadRequestException.d.ts +11 -0
- package/dist/types/exceptions/NatsBulkException.d.ts +19 -0
- package/dist/types/exceptions/NatsForbiddenException.d.ts +11 -0
- package/dist/types/exceptions/NatsInternalServerException.d.ts +12 -0
- package/dist/types/exceptions/NatsNoRespondersAvailableException.d.ts +12 -0
- package/dist/types/exceptions/NatsNotFoundException.d.ts +11 -0
- package/dist/types/exceptions/NatsRequestTimeoutException.d.ts +11 -0
- package/dist/types/exports/Nats.d.ts +18 -0
- package/dist/types/interfaces/NatsClientOptions.d.ts +106 -0
- package/dist/types/lib/ServiceEventCodec.d.ts +9 -0
- package/dist/types/providers/ServiceProxy.d.ts +210 -0
- package/dist/types/types/SubscribeOptions.d.ts +33 -0
- package/package.json +42 -33
- package/CHANGELOG.md +0 -288
- package/dist/CommonExports.d.ts +0 -19
- package/dist/CommonExports.d.ts.map +0 -1
- package/dist/CommonExports.js +0 -35
- package/dist/codecs/JSONCodec.d.ts +0 -3
- package/dist/codecs/JSONCodec.d.ts.map +0 -1
- package/dist/codecs/JSONCodec.js +0 -15
- package/dist/codecs/MessagePackCodec.d.ts +0 -3
- package/dist/codecs/MessagePackCodec.d.ts.map +0 -1
- package/dist/codecs/MessagePackCodec.js +0 -16
- package/dist/components/NATS.d.ts +0 -252
- package/dist/components/NATS.d.ts.map +0 -1
- package/dist/components/NATS.js +0 -564
- package/dist/entrypoints/SetupNatsServiceEntrypoint.d.ts +0 -8
- package/dist/entrypoints/SetupNatsServiceEntrypoint.d.ts.map +0 -1
- package/dist/entrypoints/SetupNatsServiceEntrypoint.js +0 -41
- package/dist/exceptions/NatsBadRequestException.d.ts +0 -7
- package/dist/exceptions/NatsBadRequestException.d.ts.map +0 -1
- package/dist/exceptions/NatsBadRequestException.js +0 -13
- package/dist/exceptions/NatsBulkException.d.ts +0 -11
- package/dist/exceptions/NatsBulkException.d.ts.map +0 -1
- package/dist/exceptions/NatsBulkException.js +0 -17
- package/dist/exceptions/NatsForbiddenException.d.ts +0 -7
- package/dist/exceptions/NatsForbiddenException.d.ts.map +0 -1
- package/dist/exceptions/NatsForbiddenException.js +0 -13
- package/dist/exceptions/NatsInternalServerException.d.ts +0 -7
- package/dist/exceptions/NatsInternalServerException.d.ts.map +0 -1
- package/dist/exceptions/NatsInternalServerException.js +0 -13
- package/dist/exceptions/NatsNoRespondersAvailableException.d.ts +0 -7
- package/dist/exceptions/NatsNoRespondersAvailableException.d.ts.map +0 -1
- package/dist/exceptions/NatsNoRespondersAvailableException.js +0 -13
- package/dist/exceptions/NatsNotFoundException.d.ts +0 -7
- package/dist/exceptions/NatsNotFoundException.d.ts.map +0 -1
- package/dist/exceptions/NatsNotFoundException.js +0 -13
- package/dist/exceptions/NatsRequestTimeoutException.d.ts +0 -7
- package/dist/exceptions/NatsRequestTimeoutException.d.ts.map +0 -1
- package/dist/exceptions/NatsRequestTimeoutException.js +0 -13
- package/dist/exceptions/ServiceInvokeException.d.ts +0 -6
- package/dist/exceptions/ServiceInvokeException.d.ts.map +0 -1
- package/dist/exceptions/ServiceInvokeException.js +0 -11
- package/dist/interfaces/NatsClientOptions.d.ts +0 -26
- package/dist/interfaces/NatsClientOptions.d.ts.map +0 -1
- package/dist/lib/ServiceEventCodec.d.ts.map +0 -1
- package/dist/lib/ServiceResponseCodec.d.ts +0 -22
- package/dist/lib/ServiceResponseCodec.d.ts.map +0 -1
- package/dist/lib/ServiceResponseCodec.js +0 -50
- package/dist/providers/ServiceProxy.d.ts +0 -85
- package/dist/providers/ServiceProxy.d.ts.map +0 -1
- package/dist/providers/ServiceProxy.js +0 -124
- package/dist/types/SubscribeOptions.d.ts +0 -12
- package/dist/types/SubscribeOptions.d.ts.map +0 -1
- package/docs/large-payload-design.md +0 -199
- package/tsconfig.json +0 -8
- /package/dist/{interfaces → cjs/interfaces}/NatsClientOptions.js +0 -0
- /package/dist/{types → cjs/types}/SubscribeOptions.js +0 -0
package/CHANGELOG.md
DELETED
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [2.3.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.2.2...@lakutata/nats@2.3.0) (2026-07-05)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* **nats:** pass concrete subject to subscribe callback ([de30954](https://github.com/lakutata/lakutata-packages/commit/de30954fde54f0c73b6b4db786c63d4bb199b5da))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## [2.2.2](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.2.1...@lakutata/nats@2.2.2) (2026-06-22)
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
### Bug Fixes
|
|
21
|
-
|
|
22
|
-
* **nats:** never send replicas to object store by default ([af35db3](https://github.com/lakutata/lakutata-packages/commit/af35db304029e8473b62d3430c78ce0b0a1c8d4d))
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## [2.2.1](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.2.0...@lakutata/nats@2.2.1) (2026-06-22)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
33
|
-
* **nats:** do not send replicas field to object store by default ([4a05d8b](https://github.com/lakutata/lakutata-packages/commit/4a05d8bd50e689b4b594ccef3f9fada62f788049))
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# [2.2.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.1.0...@lakutata/nats@2.2.0) (2026-06-21)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Features
|
|
43
|
-
|
|
44
|
-
* **nats:** update gitHead hash in package.json ([d1826a8](https://github.com/lakutata/lakutata-packages/commit/d1826a825492971f47c1d860360cab980733dea5))
|
|
45
|
-
* **nats:** update gitHead hash in package.json ([d936b72](https://github.com/lakutata/lakutata-packages/commit/d936b7289cccf1bf6d567fb99b7557d87da66f5f))
|
|
46
|
-
* **nats:** update gitHead hash in package.json ([4f25418](https://github.com/lakutata/lakutata-packages/commit/4f2541873b9dc5630a7788138b6541ae97da51a8)), closes [#2](https://github.com/lakutata/lakutata-packages/issues/2) [#3](https://github.com/lakutata/lakutata-packages/issues/3) [#7](https://github.com/lakutata/lakutata-packages/issues/7)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
# [2.1.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.0.1...@lakutata/nats@2.1.0) (2026-06-21)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
### Features
|
|
56
|
-
|
|
57
|
-
* **nats:** add bulk data transfer and service proxy retry ([107ad48](https://github.com/lakutata/lakutata-packages/commit/107ad48219857f7f7e13dcfd728d1f92438f10a9)), closes [#2](https://github.com/lakutata/lakutata-packages/issues/2) [#3](https://github.com/lakutata/lakutata-packages/issues/3) [#7](https://github.com/lakutata/lakutata-packages/issues/7)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## [2.0.1](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@2.0.0...@lakutata/nats@2.0.1) (2026-03-02)
|
|
64
|
-
|
|
65
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
# [2.0.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.6.2...@lakutata/nats@2.0.0) (2026-03-02)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Code Refactoring
|
|
75
|
-
|
|
76
|
-
* **nats:** remove Task provider and simplify NATS component ([7eb57ac](https://github.com/lakutata/lakutata-packages/commit/7eb57ac4f7b89c1619a3042cbaca8869c0a8f8d2))
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
### BREAKING CHANGES
|
|
80
|
-
|
|
81
|
-
* **nats:** Task provider and related exports have been removed. Applications using the Task functionality will need to implement their own task management solution.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
## [1.6.2](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.6.1...@lakutata/nats@1.6.2) (2026-01-17)
|
|
88
|
-
|
|
89
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## [1.6.1](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.6.0...@lakutata/nats@1.6.1) (2026-01-17)
|
|
96
|
-
|
|
97
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
# [1.6.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.5.2...@lakutata/nats@1.6.0) (2026-01-16)
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
### Features
|
|
107
|
-
|
|
108
|
-
* **nats:** add task provider and update NATS component ([3ec7114](https://github.com/lakutata/lakutata-packages/commit/3ec7114af0aed0e548728339b44d21bc42e0e210))
|
|
109
|
-
* **nats:** add Task provider to CommonExports ([ad07ee9](https://github.com/lakutata/lakutata-packages/commit/ad07ee9cff6306bbc77ccc9ce1fa3c025df04ee5))
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
## [1.5.2](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.5.1...@lakutata/nats@1.5.2) (2026-01-11)
|
|
116
|
-
|
|
117
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
## [1.5.1](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.5.0...@lakutata/nats@1.5.1) (2025-12-28)
|
|
124
|
-
|
|
125
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
# [1.5.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.4.0...@lakutata/nats@1.5.0) (2025-12-27)
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
### Features
|
|
135
|
-
|
|
136
|
-
* **nats:** export MessagePackCodec in CommonExports ([b22f0d0](https://github.com/lakutata/lakutata-packages/commit/b22f0d0480bbbe5b6e83b7f481e4f5ce4fc06e15))
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
# [1.4.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.12...@lakutata/nats@1.4.0) (2025-12-27)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
### Features
|
|
146
|
-
|
|
147
|
-
* **nats:** add MessagePack codec and update dependencies ([9e229a9](https://github.com/lakutata/lakutata-packages/commit/9e229a98c74b77393c3dca26cc812564f49a326c))
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## [1.3.12](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.11...@lakutata/nats@1.3.12) (2025-12-13)
|
|
154
|
-
|
|
155
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
## [1.3.11](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.10...@lakutata/nats@1.3.11) (2025-12-13)
|
|
162
|
-
|
|
163
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
## [1.3.10](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.9...@lakutata/nats@1.3.10) (2025-12-13)
|
|
170
|
-
|
|
171
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
## [1.3.9](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.8...@lakutata/nats@1.3.9) (2025-12-13)
|
|
178
|
-
|
|
179
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
## [1.3.8](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.7...@lakutata/nats@1.3.8) (2025-12-13)
|
|
186
|
-
|
|
187
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
## [1.3.7](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.6...@lakutata/nats@1.3.7) (2025-12-13)
|
|
194
|
-
|
|
195
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
## [1.3.6](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.5...@lakutata/nats@1.3.6) (2025-12-13)
|
|
202
|
-
|
|
203
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
## [1.3.5](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.4...@lakutata/nats@1.3.5) (2025-12-13)
|
|
210
|
-
|
|
211
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
## [1.3.4](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.3...@lakutata/nats@1.3.4) (2025-12-13)
|
|
218
|
-
|
|
219
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
## [1.3.3](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.3...@lakutata/nats@1.3.3) (2025-12-13)
|
|
226
|
-
|
|
227
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
## [1.3.3](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.2...@lakutata/nats@1.3.3) (2025-12-13)
|
|
234
|
-
|
|
235
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
## [1.3.2](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.1...@lakutata/nats@1.3.2) (2025-11-23)
|
|
242
|
-
|
|
243
|
-
**Note:** Version bump only for package @lakutata/nats
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
## [1.3.1](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.3.0...@lakutata/nats@1.3.1) (2025-11-10)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
### Bug Fixes
|
|
253
|
-
|
|
254
|
-
* **nats:** add default timeout for service proxy invocation ([d3f13ec](https://github.com/lakutata/lakutata-packages/commit/d3f13ec0884083e6ae162d1e89241cfad3a3680a))
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
# [1.3.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.2.0...@lakutata/nats@1.3.0) (2025-10-16)
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
### Features
|
|
264
|
-
|
|
265
|
-
* **nats:** add service event system with pub/sub capabilities ([0dbc85a](https://github.com/lakutata/lakutata-packages/commit/0dbc85af81a37ddf21912fc520023928224ab0ee))
|
|
266
|
-
* **nats:** implement service proxy and error handling ([4b9c806](https://github.com/lakutata/lakutata-packages/commit/4b9c8068c3071c9ccc0076d581f82d418cd9711f))
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
# [1.2.0](https://github.com/lakutata/lakutata-packages/compare/@lakutata/nats@1.1.0...@lakutata/nats@1.2.0) (2025-10-14)
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
### Features
|
|
276
|
-
|
|
277
|
-
* **nats:** add iterator support for NATS subscriptions ([8877dc2](https://github.com/lakutata/lakutata-packages/commit/8877dc2b238a2f7e49bcef516ec452f5423df8f7))
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
# 1.1.0 (2025-09-27)
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
### Features
|
|
287
|
-
|
|
288
|
-
* **nats:** implement JSON codec for message serialization ([422e56e](https://github.com/lakutata/lakutata-packages/commit/422e56e672172ad2aafde80457e5495f40d4a792))
|
package/dist/CommonExports.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export { SetupNatsServiceEntrypoint } from './entrypoints/SetupNatsServiceEntrypoint';
|
|
2
|
-
export { ServiceProxy, BuildServiceProxy, type BuildServiceProxyOptions } from './providers/ServiceProxy';
|
|
3
|
-
export { RetentionPolicy } from 'nats';
|
|
4
|
-
export { NATS, buildNatsClientOptions } from './components/NATS';
|
|
5
|
-
export { JSONCodec } from './codecs/JSONCodec';
|
|
6
|
-
export { MessagePackCodec } from './codecs/MessagePackCodec';
|
|
7
|
-
export { StringCodec } from 'nats';
|
|
8
|
-
export type { SubscribeOptions } from './types/SubscribeOptions';
|
|
9
|
-
export type { Subscription, Codec } from 'nats';
|
|
10
|
-
export type { NatsClientOptions } from './interfaces/NatsClientOptions';
|
|
11
|
-
export { NatsBadRequestException } from './exceptions/NatsBadRequestException';
|
|
12
|
-
export { NatsForbiddenException } from './exceptions/NatsForbiddenException';
|
|
13
|
-
export { NatsInternalServerException } from './exceptions/NatsInternalServerException';
|
|
14
|
-
export { NatsNoRespondersAvailableException } from './exceptions/NatsNoRespondersAvailableException';
|
|
15
|
-
export { NatsNotFoundException } from './exceptions/NatsNotFoundException';
|
|
16
|
-
export { NatsRequestTimeoutException } from './exceptions/NatsRequestTimeoutException';
|
|
17
|
-
export { ServiceInvokeException } from './exceptions/ServiceInvokeException';
|
|
18
|
-
export { NatsBulkException } from './exceptions/NatsBulkException';
|
|
19
|
-
//# sourceMappingURL=CommonExports.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CommonExports.d.ts","sourceRoot":"","sources":["../src/CommonExports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,0BAA0B,EAAC,MAAM,0CAA0C,CAAA;AACnF,OAAO,EAAC,YAAY,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAC,MAAM,0BAA0B,CAAA;AACvG,OAAO,EAAC,eAAe,EAAC,MAAM,MAAM,CAAA;AACpC,OAAO,EAAC,IAAI,EAAE,sBAAsB,EAAC,MAAM,mBAAmB,CAAA;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,MAAM,CAAA;AAChC,YAAY,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAA;AAC9D,YAAY,EAAC,YAAY,EAAE,KAAK,EAAC,MAAM,MAAM,CAAA;AAC7C,YAAY,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAA;AACrE,OAAO,EAAC,uBAAuB,EAAC,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAA;AACpF,OAAO,EAAC,kCAAkC,EAAC,MAAM,iDAAiD,CAAA;AAClG,OAAO,EAAC,qBAAqB,EAAC,MAAM,oCAAoC,CAAA;AACxE,OAAO,EAAC,2BAA2B,EAAC,MAAM,0CAA0C,CAAA;AACpF,OAAO,EAAC,sBAAsB,EAAC,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAA"}
|
package/dist/CommonExports.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NatsBulkException = exports.ServiceInvokeException = exports.NatsRequestTimeoutException = exports.NatsNotFoundException = exports.NatsNoRespondersAvailableException = exports.NatsInternalServerException = exports.NatsForbiddenException = exports.NatsBadRequestException = exports.StringCodec = exports.MessagePackCodec = exports.JSONCodec = exports.buildNatsClientOptions = exports.NATS = exports.RetentionPolicy = exports.BuildServiceProxy = exports.ServiceProxy = exports.SetupNatsServiceEntrypoint = void 0;
|
|
4
|
-
var SetupNatsServiceEntrypoint_1 = require("./entrypoints/SetupNatsServiceEntrypoint");
|
|
5
|
-
Object.defineProperty(exports, "SetupNatsServiceEntrypoint", { enumerable: true, get: function () { return SetupNatsServiceEntrypoint_1.SetupNatsServiceEntrypoint; } });
|
|
6
|
-
var ServiceProxy_1 = require("./providers/ServiceProxy");
|
|
7
|
-
Object.defineProperty(exports, "ServiceProxy", { enumerable: true, get: function () { return ServiceProxy_1.ServiceProxy; } });
|
|
8
|
-
Object.defineProperty(exports, "BuildServiceProxy", { enumerable: true, get: function () { return ServiceProxy_1.BuildServiceProxy; } });
|
|
9
|
-
var nats_1 = require("nats");
|
|
10
|
-
Object.defineProperty(exports, "RetentionPolicy", { enumerable: true, get: function () { return nats_1.RetentionPolicy; } });
|
|
11
|
-
var NATS_1 = require("./components/NATS");
|
|
12
|
-
Object.defineProperty(exports, "NATS", { enumerable: true, get: function () { return NATS_1.NATS; } });
|
|
13
|
-
Object.defineProperty(exports, "buildNatsClientOptions", { enumerable: true, get: function () { return NATS_1.buildNatsClientOptions; } });
|
|
14
|
-
var JSONCodec_1 = require("./codecs/JSONCodec");
|
|
15
|
-
Object.defineProperty(exports, "JSONCodec", { enumerable: true, get: function () { return JSONCodec_1.JSONCodec; } });
|
|
16
|
-
var MessagePackCodec_1 = require("./codecs/MessagePackCodec");
|
|
17
|
-
Object.defineProperty(exports, "MessagePackCodec", { enumerable: true, get: function () { return MessagePackCodec_1.MessagePackCodec; } });
|
|
18
|
-
var nats_2 = require("nats");
|
|
19
|
-
Object.defineProperty(exports, "StringCodec", { enumerable: true, get: function () { return nats_2.StringCodec; } });
|
|
20
|
-
var NatsBadRequestException_1 = require("./exceptions/NatsBadRequestException");
|
|
21
|
-
Object.defineProperty(exports, "NatsBadRequestException", { enumerable: true, get: function () { return NatsBadRequestException_1.NatsBadRequestException; } });
|
|
22
|
-
var NatsForbiddenException_1 = require("./exceptions/NatsForbiddenException");
|
|
23
|
-
Object.defineProperty(exports, "NatsForbiddenException", { enumerable: true, get: function () { return NatsForbiddenException_1.NatsForbiddenException; } });
|
|
24
|
-
var NatsInternalServerException_1 = require("./exceptions/NatsInternalServerException");
|
|
25
|
-
Object.defineProperty(exports, "NatsInternalServerException", { enumerable: true, get: function () { return NatsInternalServerException_1.NatsInternalServerException; } });
|
|
26
|
-
var NatsNoRespondersAvailableException_1 = require("./exceptions/NatsNoRespondersAvailableException");
|
|
27
|
-
Object.defineProperty(exports, "NatsNoRespondersAvailableException", { enumerable: true, get: function () { return NatsNoRespondersAvailableException_1.NatsNoRespondersAvailableException; } });
|
|
28
|
-
var NatsNotFoundException_1 = require("./exceptions/NatsNotFoundException");
|
|
29
|
-
Object.defineProperty(exports, "NatsNotFoundException", { enumerable: true, get: function () { return NatsNotFoundException_1.NatsNotFoundException; } });
|
|
30
|
-
var NatsRequestTimeoutException_1 = require("./exceptions/NatsRequestTimeoutException");
|
|
31
|
-
Object.defineProperty(exports, "NatsRequestTimeoutException", { enumerable: true, get: function () { return NatsRequestTimeoutException_1.NatsRequestTimeoutException; } });
|
|
32
|
-
var ServiceInvokeException_1 = require("./exceptions/ServiceInvokeException");
|
|
33
|
-
Object.defineProperty(exports, "ServiceInvokeException", { enumerable: true, get: function () { return ServiceInvokeException_1.ServiceInvokeException; } });
|
|
34
|
-
var NatsBulkException_1 = require("./exceptions/NatsBulkException");
|
|
35
|
-
Object.defineProperty(exports, "NatsBulkException", { enumerable: true, get: function () { return NatsBulkException_1.NatsBulkException; } });
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"JSONCodec.d.ts","sourceRoot":"","sources":["../../src/codecs/JSONCodec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAE1B,wBAAgB,SAAS,IAAI,KAAK,CAAC,GAAG,CAAC,CAUtC"}
|
package/dist/codecs/JSONCodec.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JSONCodec = void 0;
|
|
4
|
-
function JSONCodec() {
|
|
5
|
-
return {
|
|
6
|
-
encode(d) {
|
|
7
|
-
return Buffer.from(JSON.stringify([d]));
|
|
8
|
-
},
|
|
9
|
-
decode(a) {
|
|
10
|
-
const [res] = JSON.parse(Buffer.from(a).toString());
|
|
11
|
-
return res;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
exports.JSONCodec = JSONCodec;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessagePackCodec.d.ts","sourceRoot":"","sources":["../../src/codecs/MessagePackCodec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAG1B,wBAAgB,gBAAgB,IAAI,KAAK,CAAC,GAAG,CAAC,CAU7C"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessagePackCodec = void 0;
|
|
4
|
-
const helper_1 = require("lakutata/helper");
|
|
5
|
-
function MessagePackCodec() {
|
|
6
|
-
return {
|
|
7
|
-
encode(d) {
|
|
8
|
-
return helper_1.MessagePack.encode(JSON.parse(JSON.stringify([d])));
|
|
9
|
-
},
|
|
10
|
-
decode(a) {
|
|
11
|
-
const [res] = helper_1.MessagePack.decode(a);
|
|
12
|
-
return res;
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
exports.MessagePackCodec = MessagePackCodec;
|
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { Application, Component, ComponentOptionsBuilder } from 'lakutata';
|
|
2
|
-
import { type Codec, Subscription, type ObjectStoreStatus } from 'nats';
|
|
3
|
-
import { SubscribeOptions } from '../types/SubscribeOptions';
|
|
4
|
-
import { NatsClientOptions } from '../interfaces/NatsClientOptions';
|
|
5
|
-
export declare const buildNatsClientOptions: ComponentOptionsBuilder<NatsClientOptions>;
|
|
6
|
-
export declare class NATS extends Component {
|
|
7
|
-
#private;
|
|
8
|
-
/**
|
|
9
|
-
* Application instance
|
|
10
|
-
* @protected
|
|
11
|
-
*/
|
|
12
|
-
protected readonly app: Application;
|
|
13
|
-
/**
|
|
14
|
-
* NATS servers
|
|
15
|
-
* @protected
|
|
16
|
-
*/
|
|
17
|
-
protected readonly servers: string | string[];
|
|
18
|
-
/**
|
|
19
|
-
* NATS message codec
|
|
20
|
-
* @protected
|
|
21
|
-
*/
|
|
22
|
-
protected readonly codec: Codec<unknown>;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the number of milliseconds the client should wait for a server
|
|
25
|
-
* handshake to be established
|
|
26
|
-
* @protected
|
|
27
|
-
*/
|
|
28
|
-
protected readonly timeout?: number;
|
|
29
|
-
/**
|
|
30
|
-
* Set to a client authentication token. Note that these tokens are
|
|
31
|
-
* a specific authentication strategy on the nats-server
|
|
32
|
-
* @protected
|
|
33
|
-
*/
|
|
34
|
-
protected readonly token?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Sets the username for a client connection
|
|
37
|
-
* @protected
|
|
38
|
-
*/
|
|
39
|
-
protected readonly user?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Sets the password for a client connection
|
|
42
|
-
* @protected
|
|
43
|
-
*/
|
|
44
|
-
protected readonly pass?: string;
|
|
45
|
-
/**
|
|
46
|
-
* When set to `true` the client will print protocol messages that it receives
|
|
47
|
-
* or sends to the server
|
|
48
|
-
* @protected
|
|
49
|
-
*/
|
|
50
|
-
protected readonly debug?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Sets the maximum count of ping commands that can be awaiting a response
|
|
53
|
-
* before rasing a stale connection status notification and initiating a reconnect
|
|
54
|
-
* @protected
|
|
55
|
-
*/
|
|
56
|
-
protected readonly maxPingOut?: number;
|
|
57
|
-
/**
|
|
58
|
-
* Sets the maximum count of per-server reconnect attempts before giving up.
|
|
59
|
-
* Set to `-1` to never give up
|
|
60
|
-
*
|
|
61
|
-
* @default 10
|
|
62
|
-
* @protected
|
|
63
|
-
*/
|
|
64
|
-
protected readonly maxReconnectAttempts?: number;
|
|
65
|
-
/**
|
|
66
|
-
* Sets the client name. When set, the server monitoring pages will display
|
|
67
|
-
* this name when referring to this client
|
|
68
|
-
* @protected
|
|
69
|
-
*/
|
|
70
|
-
protected readonly name?: string;
|
|
71
|
-
/**
|
|
72
|
-
* When set to true, messages published by this client will not match
|
|
73
|
-
* this client's subscriptions, so the client is guaranteed to never
|
|
74
|
-
* receive self-published messages on a subject that it is listening on
|
|
75
|
-
* @protected
|
|
76
|
-
*/
|
|
77
|
-
protected readonly noEcho?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* If set to true, the client will not randomize its server connection list
|
|
80
|
-
* @protected
|
|
81
|
-
*/
|
|
82
|
-
protected readonly noRandomize?: boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Sets the number of milliseconds between client initiated ping commands
|
|
85
|
-
*
|
|
86
|
-
* @default 2 minutes.
|
|
87
|
-
* @protected
|
|
88
|
-
*/
|
|
89
|
-
protected readonly pingInterval?: number;
|
|
90
|
-
/**
|
|
91
|
-
* When set to true, the server will attempt to reconnect so long as doesn't prevent it
|
|
92
|
-
*
|
|
93
|
-
* @default true
|
|
94
|
-
* @protected
|
|
95
|
-
*/
|
|
96
|
-
protected readonly reconnect?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* 是否启用 bulk 大数据旁路:启用后启动时建第二条独立连接 + 准备 Object Store。
|
|
99
|
-
* @default true
|
|
100
|
-
* @protected
|
|
101
|
-
*/
|
|
102
|
-
protected readonly bulk?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* bulk Object Store bucket 名,默认 lkt-bulk-${name}。
|
|
105
|
-
* @protected
|
|
106
|
-
*/
|
|
107
|
-
protected readonly bulkBucket?: string;
|
|
108
|
-
/**
|
|
109
|
-
* bulk 对象 TTL(毫秒),默认 5 分钟。
|
|
110
|
-
* @protected
|
|
111
|
-
*/
|
|
112
|
-
protected readonly bulkTTL?: number;
|
|
113
|
-
/**
|
|
114
|
-
* bulk bucket 副本数。默认【不下发】此字段,由 server 用其默认单副本;仅在显式配置时才下发。
|
|
115
|
-
* 重要:绝不能加 .default(),否则字段恒有值、会被无条件下发,在严格校验的 NATS server 上
|
|
116
|
-
* 触发 "invalid json: unknown field replicas" 导致启动失败(2.2.1 曾因加了 default 而修复无效)。
|
|
117
|
-
* @protected
|
|
118
|
-
*/
|
|
119
|
-
protected readonly bulkReplicas?: number;
|
|
120
|
-
/**
|
|
121
|
-
* Service event subscription map
|
|
122
|
-
* @protected
|
|
123
|
-
*/
|
|
124
|
-
protected readonly serviceEventSubscriptionMap: Map<string, Map<(...args: any[]) => void, Subscription>>;
|
|
125
|
-
/**
|
|
126
|
-
* Initializer
|
|
127
|
-
* @protected
|
|
128
|
-
*/
|
|
129
|
-
protected init(): Promise<void>;
|
|
130
|
-
/**
|
|
131
|
-
* Destroyer
|
|
132
|
-
* @protected
|
|
133
|
-
*/
|
|
134
|
-
protected destroy(): Promise<void>;
|
|
135
|
-
/**
|
|
136
|
-
* 优雅停机:drain 停止接收新消息、把 in-flight 处理完、flush 出站后再关闭,
|
|
137
|
-
* 这样 K8s 滚动升级/缩容时正在处理的请求不被硬切断;drain 失败兜底强制关闭。
|
|
138
|
-
* @param conn
|
|
139
|
-
* @private
|
|
140
|
-
*/
|
|
141
|
-
private drainConnection;
|
|
142
|
-
/**
|
|
143
|
-
* Publishes the specified data to the specified subject.
|
|
144
|
-
* @param subject
|
|
145
|
-
* @param payload
|
|
146
|
-
*/
|
|
147
|
-
publish(subject: string, payload: any): void;
|
|
148
|
-
/**
|
|
149
|
-
* Publishes a request with specified data in the specified subject expecting a
|
|
150
|
-
* response before timeout milliseconds. The api returns a
|
|
151
|
-
* Promise that resolves when the first response to the request is received. If
|
|
152
|
-
* there are no responders (a subscription) listening on the request subject,
|
|
153
|
-
* the request will fail as soon as the server processes it
|
|
154
|
-
* @param subject
|
|
155
|
-
* @param payload
|
|
156
|
-
* @param timeout
|
|
157
|
-
*/
|
|
158
|
-
request(subject: string, payload?: any, timeout?: number): Promise<any>;
|
|
159
|
-
/**
|
|
160
|
-
* Subscribe expresses interest in the specified subject. The subject may
|
|
161
|
-
* have wildcards. Messages are delivered to the callback.
|
|
162
|
-
* If the subscription receives request, the callback return's value will respond to requester
|
|
163
|
-
* @param subject
|
|
164
|
-
* @param callback receives (data, subject) — `subject` is the concrete subject the message
|
|
165
|
-
* arrived on, letting wildcard subscribers read routing tokens (e.g. an id embedded in the
|
|
166
|
-
* subject) without the publisher having to duplicate them into the payload.
|
|
167
|
-
* @param subscribeOptions
|
|
168
|
-
*/
|
|
169
|
-
subscribe(subject: string, callback: (data: any, subject: string) => any | Promise<any>, subscribeOptions?: SubscribeOptions): Subscription;
|
|
170
|
-
/**
|
|
171
|
-
* 安全地发出 error 事件:仅在存在监听器时发出。
|
|
172
|
-
* Node EventEmitter 在没有 'error' 监听器时 emit('error') 会抛出,
|
|
173
|
-
* 在异步回调里那会变成 unhandled rejection,所以这里加监听器守卫。
|
|
174
|
-
* @param error
|
|
175
|
-
* @protected
|
|
176
|
-
*/
|
|
177
|
-
protected emitError(error: any): void;
|
|
178
|
-
/**
|
|
179
|
-
* 是否启用了 bulk 旁路(连接 + Object Store 均就绪)
|
|
180
|
-
*/
|
|
181
|
-
get bulkEnabled(): boolean;
|
|
182
|
-
/**
|
|
183
|
-
* 走 bulk 的字节阈值 = server max_payload × 0.9(从连接 info 自动读,跟随集群配置)
|
|
184
|
-
*/
|
|
185
|
-
get bulkThreshold(): number;
|
|
186
|
-
/**
|
|
187
|
-
* server 是否支持消息 header(从连接 info)
|
|
188
|
-
*/
|
|
189
|
-
get headersSupported(): boolean;
|
|
190
|
-
/**
|
|
191
|
-
* 把一块字节存入 Object Store,返回 objId(供引用中转)。
|
|
192
|
-
* @param bytes
|
|
193
|
-
*/
|
|
194
|
-
putBulk(bytes: Uint8Array): Promise<string>;
|
|
195
|
-
/**
|
|
196
|
-
* 从 Object Store 取回一块字节。
|
|
197
|
-
* @param objId
|
|
198
|
-
*/
|
|
199
|
-
getBulk(objId: string): Promise<Uint8Array>;
|
|
200
|
-
/**
|
|
201
|
-
* 删除 Object Store 中的对象(用完即清,失败由 TTL 兜底)。
|
|
202
|
-
* @param objId
|
|
203
|
-
*/
|
|
204
|
-
deleteBulk(objId: string): Promise<void>;
|
|
205
|
-
/**
|
|
206
|
-
* 返回 bulk Object Store 的运行时状态(bucket/ttl/replicas/storage/size 等);未启用 bulk 返回 undefined。
|
|
207
|
-
*/
|
|
208
|
-
bulkStatus(): Promise<ObjectStoreStatus | undefined>;
|
|
209
|
-
/**
|
|
210
|
-
* 打包待发送 payload:编码后若对端支持中转且超阈值,存入 Object Store 改发小引用。
|
|
211
|
-
* @param payload
|
|
212
|
-
* @param peerSupportsBulk 对端是否支持引用中转(不支持只能直传)
|
|
213
|
-
* @private
|
|
214
|
-
*/
|
|
215
|
-
private packPayload;
|
|
216
|
-
/**
|
|
217
|
-
* 解包收到的字节:若是引用,从 Object Store 取回真实字节再解码(取回后即删,失败靠 TTL 兜底)。
|
|
218
|
-
* @param bytes
|
|
219
|
-
* @param isRef
|
|
220
|
-
* @private
|
|
221
|
-
*/
|
|
222
|
-
private unpackPayload;
|
|
223
|
-
/**
|
|
224
|
-
* Emit service event
|
|
225
|
-
* @param eventName
|
|
226
|
-
* @param args
|
|
227
|
-
*/
|
|
228
|
-
emitServiceEvent(eventName: string, ...args: any[]): this;
|
|
229
|
-
/**
|
|
230
|
-
* On service event
|
|
231
|
-
* @param serviceId
|
|
232
|
-
* @param eventName
|
|
233
|
-
* @param listener
|
|
234
|
-
* @param onlySingleClientReceived
|
|
235
|
-
*/
|
|
236
|
-
onServiceEvent(serviceId: string, eventName: string, listener: (...args: any[]) => void, onlySingleClientReceived?: boolean): this;
|
|
237
|
-
/**
|
|
238
|
-
* Once service event
|
|
239
|
-
* @param serviceId
|
|
240
|
-
* @param eventName
|
|
241
|
-
* @param listener
|
|
242
|
-
*/
|
|
243
|
-
onceServiceEvent(serviceId: string, eventName: string, listener: (...args: any[]) => void): this;
|
|
244
|
-
/**
|
|
245
|
-
* Off server events
|
|
246
|
-
* @param serviceId
|
|
247
|
-
* @param eventName
|
|
248
|
-
* @param listener
|
|
249
|
-
*/
|
|
250
|
-
offServiceEvent(serviceId: string, eventName: string, listener?: (...args: any[]) => void): this;
|
|
251
|
-
}
|
|
252
|
-
//# sourceMappingURL=NATS.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NATS.d.ts","sourceRoot":"","sources":["../../src/components/NATS.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,WAAW,EACX,SAAS,EAET,uBAAuB,EAE1B,MAAM,UAAU,CAAA;AAEjB,OAAO,EAAC,KAAK,KAAK,EAAgC,YAAY,EAAwC,KAAK,iBAAiB,EAAwB,MAAM,MAAM,CAAA;AAChK,OAAO,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAA;AAQ1D,OAAO,EAAC,iBAAiB,EAAC,MAAM,iCAAiC,CAAA;AASjE,eAAO,MAAM,sBAAsB,EAA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