@ti-engine/core 1.7.1 → 1.8.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 +393 -377
- package/LICENSE.md +321 -321
- package/README.md +599 -597
- package/bin/localization/labels.json +122 -122
- package/bin/settings.json +41 -41
- package/bin/start-instance.js +164 -164
- package/components/auditing.js +191 -191
- package/components/connection-observer.js +72 -72
- package/components/definitions.types.js +248 -248
- package/components/exchange/default/default-message-exchange.js +136 -136
- package/components/exchange/default/default-message-receiver.js +101 -101
- package/components/exchange/default/default-message-sender.js +100 -100
- package/components/exchange/message-dispatcher.js +168 -168
- package/components/exchange/message-exchange.js +449 -449
- package/components/exchange/message-handler.js +235 -235
- package/components/exchange/message-memory-cache.js +190 -190
- package/components/exchange/message-observer.js +126 -126
- package/components/exchange/message-receiver.js +181 -181
- package/components/exchange/message-sender.js +143 -143
- package/components/exchange/message-tracer.js +212 -212
- package/components/service-caller.js +370 -370
- package/components/service-consumer.js +131 -131
- package/components/service-executor.js +278 -278
- package/components/service-instance.js +316 -316
- package/components/service-provider.js +251 -251
- package/integrations/redis-integration.js +591 -591
- package/package.json +89 -89
- package/utils/cache.js +772 -772
- package/utils/config.js +103 -103
- package/utils/exceptions.js +368 -368
- package/utils/localization.js +298 -298
- package/utils/logger.js +82 -82
- package/utils/tools.js +632 -632
package/CHANGELOG.md
CHANGED
|
@@ -1,378 +1,394 @@
|
|
|
1
|
-
# ti-engine changelog
|
|
2
|
-
|
|
3
|
-
This document contains the list of changes made to the framework. The format is based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
|
4
|
-
|
|
5
|
-
## Version 1.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* build(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
* build(deps): update `
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
* build(deps): update
|
|
53
|
-
|
|
54
|
-
## Version 1.
|
|
55
|
-
|
|
56
|
-
*
|
|
57
|
-
|
|
58
|
-
## Version 1.4.
|
|
59
|
-
|
|
60
|
-
* build(deps): update `@dotenvx/dotenvx` from ^1.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* build(deps)
|
|
83
|
-
|
|
84
|
-
## Version 1.
|
|
85
|
-
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* build(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
* feat(
|
|
112
|
-
* fix(start instance):
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
|
|
125
|
-
## Version 1.3.
|
|
126
|
-
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
|
|
153
|
-
## Version 1.3.
|
|
154
|
-
|
|
155
|
-
*
|
|
156
|
-
* feat(
|
|
157
|
-
*
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
*
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
|
|
169
|
-
## Version 1.3.
|
|
170
|
-
|
|
171
|
-
*
|
|
172
|
-
* feat(
|
|
173
|
-
*
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
* feat(
|
|
188
|
-
* feat(
|
|
189
|
-
* feat(
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
* feat(
|
|
202
|
-
* feat(
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* fix(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
* feat(
|
|
215
|
-
* feat(
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
*
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
*
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
*
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
*
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
* feat(
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* fix(message
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
* feat(
|
|
268
|
-
* feat(
|
|
269
|
-
*
|
|
270
|
-
* fix(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
* feat(
|
|
276
|
-
* feat(
|
|
277
|
-
* feat(
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
* feat(
|
|
282
|
-
* feat(
|
|
283
|
-
* feat(
|
|
284
|
-
*
|
|
285
|
-
* fix(
|
|
286
|
-
* fix(
|
|
287
|
-
*
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
*
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
*
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
* feat(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
*
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
* feat(
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
* feat(
|
|
340
|
-
* feat(
|
|
341
|
-
* feat(
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
*
|
|
349
|
-
*
|
|
350
|
-
*
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
* feat(
|
|
355
|
-
* feat(
|
|
356
|
-
* feat(
|
|
357
|
-
*
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
*
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
* build(npm): update npm dependencies to their latest versions
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
* feat(
|
|
371
|
-
* feat(
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
1
|
+
# ti-engine changelog
|
|
2
|
+
|
|
3
|
+
This document contains the list of changes made to the framework. The format is based on the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
|
|
4
|
+
|
|
5
|
+
## Version 1.8.0
|
|
6
|
+
|
|
7
|
+
`ioredis` 6 makes RESP3 its default wire protocol. The framework does not set the `protocol` option, so this changes how every `core` connection talks to Redis without a line of framework code changing — and the suite here never touches a live Redis, so a green test run says nothing about it either way. It was checked against a real server rather than assumed: for every command the framework issues — `hgetall`, `smembers`, `hget`, `get`, `brpop`, the same commands through the generic `call()` path used for RedisJSON, and again inside `multi` — RESP3 and RESP2 return **identical** JavaScript values, because `ioredis` maps the new protocol's map and set types back to the objects and arrays it always returned. No consumer code changes.
|
|
8
|
+
|
|
9
|
+
The cost is the Redis floor. `ioredis` negotiates with a `HELLO 3` on connect and **throws** when the server cannot answer it — there is no fallback to RESP2 — so a server older than 6.0 now fails to connect instead of working as it did before.
|
|
10
|
+
|
|
11
|
+
* build(deps)!: update `ioredis` from ^5.11.1 to ^6.0.0. **BREAKING**: raises the minimum Redis version from 5.0.14 to **6.0**, because `ioredis` 6 defaults to RESP3 and refuses a server that cannot negotiate it. A deployment pinned to Redis 5 must upgrade the server; a consumer that needs the old wire protocol for another reason can pass `protocol: 2` in its Redis options
|
|
12
|
+
* docs(core): correct the documented Redis prerequisite from 5.0.14 to 6.0 and record why the floor moved
|
|
13
|
+
* build(release): bump package version from `1.7.2` to `1.8.0`
|
|
14
|
+
|
|
15
|
+
## Version 1.7.2
|
|
16
|
+
|
|
17
|
+
No functional change — the framework code is what `1.7.1` shipped. The version exists to exercise the automated npm publish that replaced the release-triggered workflow, and to prove this package's own trusted publisher configuration on npmjs.com: OIDC trust is granted per package, so it is only ever validated by an actual publish of that package.
|
|
18
|
+
|
|
19
|
+
* build(release): bump package version from `1.7.1` to `1.7.2`
|
|
20
|
+
|
|
21
|
+
## Version 1.7.1
|
|
22
|
+
|
|
23
|
+
* fix(exchange): preserve a configured-but-falsy `securityHashKey` — only a truly absent (`null`/`undefined`) value falls back to the empty key, so a configured `0`/`false` is no longer silently downgraded to the insecure empty-key path (PR #83, CodeRabbit)
|
|
24
|
+
* build(release): bump package version from `1.7.0` to `1.7.1`
|
|
25
|
+
|
|
26
|
+
## Version 1.7.0
|
|
27
|
+
|
|
28
|
+
* refactor(core)!: load the `.env` file via native `process.loadEnvFile` instead of `@dotenvx/dotenvx`
|
|
29
|
+
* build(deps)!: remove the `@dotenvx/dotenvx` dependency — core now has three runtime dependencies (`ioredis`, `lodash`, `node-schedule`)
|
|
30
|
+
* build(core)!: raise the minimum Node.js version to `>=20.12.0` (required for `process.loadEnvFile`)
|
|
31
|
+
|
|
32
|
+
> The native loader matches the prior behavior: a missing `.env` file is tolerated (ENOENT is ignored, as with the previous `quiet: true`) and existing environment variables are not overridden. The `--env` / `--env-file` / `--dotenv` / `--dotenv-path` / `-e` CLI aliases for choosing the env-file path are unchanged. Encrypted `.env` files (a dotenvx-only feature this framework never used) are not supported. Consumers on Node 20.0–20.11 must upgrade to Node ≥ 20.12.
|
|
33
|
+
|
|
34
|
+
## Version 1.6.1
|
|
35
|
+
|
|
36
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.73.1 to ^1.75.1
|
|
37
|
+
* build(deps): remove `zeromq` as optional dependency
|
|
38
|
+
|
|
39
|
+
## Version 1.6.0
|
|
40
|
+
|
|
41
|
+
* refactor(exchange)!: replace the blake2 keyed hash with native `node:crypto` HMAC-SHA256 in the message integrity check
|
|
42
|
+
* build(deps)!: remove the `blake2` native addon dependency (no longer builds on Node 26; replaced by the built-in `node:crypto`)
|
|
43
|
+
* fix(exchange): use a constant-time comparison for the message security hash
|
|
44
|
+
* fix(exchange): ship an empty default `securityHashKey` and warn (once) when the security hash is enabled with a missing/default key
|
|
45
|
+
* test(exchange): add the first core test suite — message-hash determinism, tamper detection, and the constant-time comparison
|
|
46
|
+
|
|
47
|
+
> **BREAKING (wire):** the message security hash changes from keyed-BLAKE2b (128 hex) to HMAC-SHA256 (64 hex). Old and new core versions produce mutually incompatible hashes. When upgrading across this version with `securityHashEnabled=true`, redeploy all services together — recommended order: set `securityHashEnabled=false` everywhere → deploy the new core to all services → re-enable. HMAC also accepts keys of any length (custom keys >64 bytes that previously failed under blake2b now work). The default `securityHashKey` is now empty: set `TI_MESSAGE_EXCHANGE_SECURITY_HASH_KEY` in any real deployment, otherwise tamper protection is ineffective.
|
|
48
|
+
|
|
49
|
+
## Version 1.5.1
|
|
50
|
+
|
|
51
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.66.0 to ^1.73.1
|
|
52
|
+
* build(deps): update `ioredis` from ^5.10.1 to ^5.11.1
|
|
53
|
+
|
|
54
|
+
## Version 1.5.0
|
|
55
|
+
|
|
56
|
+
* feat(exceptions): add `E_APP_RESOURCE_ALREADY_EXISTS` (5006) for resource-creation conflicts; intended to be raised with HTTP `409`
|
|
57
|
+
|
|
58
|
+
## Version 1.4.6
|
|
59
|
+
|
|
60
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.65.0 to ^1.66.0
|
|
61
|
+
|
|
62
|
+
## Version 1.4.5
|
|
63
|
+
|
|
64
|
+
* feat(cache): add array-based path support to all `*JSON` methods — passing an array of strings as `path` treats each element as a literal key name using bracket notation, preventing misinterpretation of key names containing dots or other JSONPath special characters
|
|
65
|
+
|
|
66
|
+
## Version 1.4.4
|
|
67
|
+
|
|
68
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.60.0 to ^1.65.0
|
|
69
|
+
|
|
70
|
+
## Version 1.4.3
|
|
71
|
+
|
|
72
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.59.1 to ^1.60.0
|
|
73
|
+
|
|
74
|
+
## Version 1.4.2
|
|
75
|
+
|
|
76
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.55.1 to ^1.59.1
|
|
77
|
+
* build(deps): update `ioredis` from ^5.10.0 to ^5.10.1
|
|
78
|
+
* build(deps): update `lodash` from ^4.17.23 to ^4.18.1
|
|
79
|
+
|
|
80
|
+
## Version 1.4.1
|
|
81
|
+
|
|
82
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.54.1 to ^1.55.1
|
|
83
|
+
|
|
84
|
+
## Version 1.4.0
|
|
85
|
+
|
|
86
|
+
* feat(redis integration): implement support for `JSON.MERGE` and `JSON.MGET` commands
|
|
87
|
+
* feat(cache): add `editJSON` method
|
|
88
|
+
* feat(cache): implement consistent RedisJSON path handling and uniform error wrapping
|
|
89
|
+
* feat(exceptions): add new standardized exception code `E_GEN_NOT_IMPLEMENTED` to use for cases where a feature is not yet implemented
|
|
90
|
+
* feat(exceptions): add new optional, flexible parameter `httpCode` to the `raise` method
|
|
91
|
+
* refactor(exceptions)!: rename the exception class from `Exception` to `TiException` in all referred places
|
|
92
|
+
* refactor(definitions): move all object definitions to a new `definitions.types.js` file
|
|
93
|
+
* refactor(gcloud integration)!: remove file `gcloud-integration.js` and all related functionality (as it was obsolete and a security vulnerability)
|
|
94
|
+
* fix(cache): fix a bug where RedisJSON methods would return `E_GEN_FEATURE_UNSUPPORTED` error while discarding the details of that error
|
|
95
|
+
* fix(config): fix the ENV `TI_LOCALIZATION_LABELS_PATH` to properly support multiple paths to label files
|
|
96
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.52.0 to ^1.54.1
|
|
97
|
+
* build(deps): update `ioredis` from ^5.9.2 to ^5.10.0
|
|
98
|
+
* build(deps)!: remove `@google-cloud/error-reporting`
|
|
99
|
+
|
|
100
|
+
## Version 1.3.14
|
|
101
|
+
|
|
102
|
+
* build(deps): update `@dotenvx/dotenvx` from ^1.51.1 to ^1.52.0
|
|
103
|
+
* build(deps): update `blake2` from ^5.0.0 to ^5.0.1
|
|
104
|
+
* build(deps): update `ioredis` from ^5.8.2 to ^5.9.2
|
|
105
|
+
* build(deps): update `lodash` from ^4.17.21 to ^4.17.23
|
|
106
|
+
* build(engines): update Node.js requirement from >=18.0.0 to >=20.0.0
|
|
107
|
+
|
|
108
|
+
## Version 1.3.13
|
|
109
|
+
|
|
110
|
+
* feat(exceptions): add new exception code `E_GEN_UNALLOWED_OVERRIDE` (1009) for detecting attempts to override protected or private methods/properties
|
|
111
|
+
* feat(auditing): enhance console data formatting with recursive, depth-limited formatting (max depth: 5), circular reference detection and handling, improved readability for nested objects and multi-line strings, and proper indentation and prefixing for structured output
|
|
112
|
+
* fix(start instance): modified `start-instance.js` to initialize serviceConfig as undefined instead of an empty object when `TI_INSTANCE_CONFIG` environment variable is not provided
|
|
113
|
+
* build(npm): update npm dependencies to their latest versions
|
|
114
|
+
|
|
115
|
+
## Version 1.3.12
|
|
116
|
+
|
|
117
|
+
* feat(exceptions): add new exception code `E_COM_SERVICE_EXEC_FAILED`
|
|
118
|
+
* feat(localization): add new public method `getAllLabels`
|
|
119
|
+
* feat(localization): use new `deepFreeze` method to freeze all label trees
|
|
120
|
+
* feat(tools): add new public method `deepFreeze` for freezing an object and all its sub-objects recursively
|
|
121
|
+
* feat(config): use new `deepFreeze` method to freeze all configuration settings
|
|
122
|
+
* docs: add more information about the `localization` module in `README.md` file
|
|
123
|
+
* build(npm): update npm dependencies to their latest versions
|
|
124
|
+
|
|
125
|
+
## Version 1.3.11
|
|
126
|
+
|
|
127
|
+
* feat(tools): add `arrayUniques` method to the tools module that helps extract only the unique array values
|
|
128
|
+
* fix(start instance): fix `undefined` instance ID in the log message about starting the instance
|
|
129
|
+
|
|
130
|
+
## Version 1.3.10
|
|
131
|
+
|
|
132
|
+
* chore: fix various minor issues reported by the linter
|
|
133
|
+
* build(npm): add more information and options to the `package.json` file
|
|
134
|
+
* docs: add some JSDoc descriptions to classes and methods
|
|
135
|
+
|
|
136
|
+
## Version 1.3.9
|
|
137
|
+
|
|
138
|
+
* feat(exceptions): add new exception code `E_GEN_NOT_INITIALIZED`
|
|
139
|
+
* docs: fix image links in the `README.md` file
|
|
140
|
+
|
|
141
|
+
## Version 1.3.8
|
|
142
|
+
|
|
143
|
+
* fix(tester): fix the relative paths of various files in the tester service. The configuration now assumes that the working directory is the root of the tester package instead of the repository itself
|
|
144
|
+
* build(npm): update npm dependencies to their latest versions
|
|
145
|
+
* docs: fix some outdated information in the `README.md` file and add some more details
|
|
146
|
+
|
|
147
|
+
## Version 1.3.7
|
|
148
|
+
|
|
149
|
+
* feat(exceptions): add new exception code `E_SEC_UNRECOGNIZED_AUTH_METHOD`
|
|
150
|
+
* fix(config): fix potential issue with `TI_GCLOUD_ENABLED` parsing as boolean
|
|
151
|
+
* docs: adjust some of the JSDoc descriptions and definitions
|
|
152
|
+
|
|
153
|
+
## Version 1.3.6
|
|
154
|
+
|
|
155
|
+
* feat(exceptions): add new exception code `E_GEN_INVALID_ARGUMENT_TYPE`
|
|
156
|
+
* feat(exceptions): add public enum with all HTTP codes exported as `httpCode` and typedef `TiHttpCode`. Use it as the type for the `httpCode` exception property
|
|
157
|
+
* feat(tools): add `description` property to enum objects
|
|
158
|
+
* feat(tools): add `contains` property to enum objects
|
|
159
|
+
* feat(tools)!: change enum factory behavior to create a copy of the seed object instead of modifying it (may break code relying on seed object mutation)
|
|
160
|
+
* refactor(exceptions): invalid `httpCode` inputs are coerced to `undefined`; `Exception.asJSON` includes `httpCode` only when defined
|
|
161
|
+
* refactor(tools): deprecate method `getEnumName` in favor of `enum.name`; removal planned for 1.4.0
|
|
162
|
+
* refactor(tools)!: remove method `createCSVFile` as it is unnecessary for the framework's operation. It also eliminates the dependency from `fs-extra` package
|
|
163
|
+
* refactor(tools)!: disallow reserved keys as enum names; make enum properties non-enumerable and freeze the enum object to enforce immutability (may affect code relying on enumeration/extension)
|
|
164
|
+
* fix(tools): fix a bug in the `RetryPolicy` class that caused the `maxAttempts` property to be ignored
|
|
165
|
+
* build(npm): update npm dependencies to their latest versions
|
|
166
|
+
* build(npm): remove `fs-extra` package as it is not used by the framework
|
|
167
|
+
* build(npm)!: bump the minimum supported Node.js version to 18.0.0
|
|
168
|
+
|
|
169
|
+
## Version 1.3.5
|
|
170
|
+
|
|
171
|
+
* fix(redis integration): fix a duplicated log entry on connection ready event if multiple observers are registered
|
|
172
|
+
* feat(service caller)!: change log level of error result in `process` method from `ERROR` to `DEBUG`. Implementers are expected to handle this and decide if the error should be propagated further or not
|
|
173
|
+
* docs: update and fix various issues with the `README.md` file
|
|
174
|
+
|
|
175
|
+
## Version 1.3.4
|
|
176
|
+
|
|
177
|
+
* fix(service instance): fix the way `ServiceConfiguration` is propagated via child classes and remove unnecessary defaults. Also update the relevant JSDoc
|
|
178
|
+
|
|
179
|
+
## Version 1.3.3
|
|
180
|
+
|
|
181
|
+
* feat(exceptions): add new parameter `includeData` to `Exception.asJSON` method which allows the exclusion of the data parameter from the returned JSON
|
|
182
|
+
* feat(exceptions): remove several excessive exception codes that were unlikely to be used
|
|
183
|
+
* fix(localization): add several missing exception labels
|
|
184
|
+
|
|
185
|
+
## Version 1.3.2
|
|
186
|
+
|
|
187
|
+
* feat(exceptions): add a set of new exception codes for the needs of any wrapping `web-server` standard communication
|
|
188
|
+
* feat(exception)!: change the default prefix path for exception labels to `system.exceptions.`
|
|
189
|
+
* feat(localization): add an Enum list of all language codes based on ISO 639-1 standard
|
|
190
|
+
* feat(localization): add an option to the `getLabel` method to provide the language code to use for localization. If not provided, the system will use the language code from the `localization.language` setting
|
|
191
|
+
* feat(localization)!: change the default structure of system labels from `labels.general.[...]` to `system.[...]`
|
|
192
|
+
* refactor(localization): add typedefs and JSDoc structure for the objects used in localization
|
|
193
|
+
* refactor(exceptions): refactor and fix various JSDoc descriptions
|
|
194
|
+
* refactor(auditing): change the type name of `LogEntry` to `TiLogEntry` and fix some JSDoc descriptions
|
|
195
|
+
* fix(exceptions): fix an issue which caused the exception to disregard the `description` value sent in the constructor and use the default one instead
|
|
196
|
+
* fix(config): fix an issue with the `TI_LOCALIZATION_LABELS_PATH` variable not respecting that the underlying setting expected an array. Now it is expected to be a single path and it will be wrapped into an array automatically
|
|
197
|
+
* fix(auditing): fix a potential problem with setting the log entry reporter from an ENV variable; instead, the system will now use the `ServiceInstance.instanceID` property
|
|
198
|
+
|
|
199
|
+
## Version 1.3.1
|
|
200
|
+
|
|
201
|
+
* feat(service caller): refactor the entire service call execution flow for clarity and better performance
|
|
202
|
+
* feat(service caller): create a new private class `ServiceCallProcessor` to handle individual service calls in a contained scope
|
|
203
|
+
* feat(message observer): add new property `priority` to the message observer class. It is used to determine the order in which the observers are notified about the messages
|
|
204
|
+
* feat(message observer)!: change method `onMessage` to now return the message it received. This allows for the message to be modified before it is passed to the next observer based on `priority`
|
|
205
|
+
* feat(message handler)!: change method `onMessage` to `notifyMessageObservers` for clarity. It now implements the `MessageObserver` functionality for prioritization and message modification
|
|
206
|
+
* fix(service caller): fix an issue which did not allow for a service call to be marked as completed thus being entered into the trace log as still pending
|
|
207
|
+
* fix(redis integration): remove hardcoded `#retryMaxAttempts` value in `#setupClient` method
|
|
208
|
+
* fix(redis integration): fix an issue which was setting the client status to `DISCONNECTED` during a normal shut down procedure
|
|
209
|
+
|
|
210
|
+
## Version 1.3.0
|
|
211
|
+
|
|
212
|
+
* feat(redis integration)!: change `reconnectOnError` behavior to also resubmit the failed command in case the error was of type `READONLY`
|
|
213
|
+
* feat(redis integration): improve the reliability and usage of the event notification mechanism for connection observers
|
|
214
|
+
* feat(redis integration): implement listener to the `end` event on Redis connection to capture when connection can no longer be recovered
|
|
215
|
+
* feat(redis integration): notify connection observers `onConnectionLost` event
|
|
216
|
+
* feat(redis integration): add redis client platform-specific status. It is used internally by the platform and can also be accessed via `redisClient.clientStatus` property
|
|
217
|
+
* feat(connection observer): add new event handler `onConnectionLost` that will be invoked when the observed connection is irrevocably lost
|
|
218
|
+
* feat(cache)!: implement `onConnectionLost` handler that will cause the service instance to immediately stop since it cannot work without the cache
|
|
219
|
+
* fix(service caller): fix multiple promise reject condition when a service call timed out and the service handler still attempted to complete with subsequent error
|
|
220
|
+
* fix(service instance): limit health check reporting to one attempt at a time to avoid unnecessary cache requests and log spam
|
|
221
|
+
* fix(redis integration): fix a multiple promise resolve condition on Redis `reconnect` event
|
|
222
|
+
* fix(redis integration): fix broken event propagation on `disrupted` events to some connection observers
|
|
223
|
+
|
|
224
|
+
## Version 1.2.5
|
|
225
|
+
|
|
226
|
+
* feat(cache): extend method `expireValue` to work with has set fields as well
|
|
227
|
+
|
|
228
|
+
## Version 1.2.4
|
|
229
|
+
|
|
230
|
+
* feat(cache): expose the cache module as export in `package.json`
|
|
231
|
+
* feat(cache): add method `hashDeleteField` to remove a hash-set field. This implements the `hdel` Redis command
|
|
232
|
+
* fix(tools): optimize method `stringifyJSON` not to call unnecessary decycling of the value if it's not an object
|
|
233
|
+
* fix(cache): replace `hmset` with `hset` Redis command in both methods that set hash-set values. Also remove unnecessary `_.isObjectLike` call in `hashSetFields` method
|
|
234
|
+
|
|
235
|
+
## Version 1.2.3
|
|
236
|
+
|
|
237
|
+
* feat(start instance): add support for providing a custom path to the `.env` file to be used at service startup as process argument. Accepted arguments are `--env`, `--env-file`, `--dotenv`, `--dotenv-path`, and `-e`. The path itself should be relative to the working directory and should include the file name
|
|
238
|
+
|
|
239
|
+
## Version 1.2.2
|
|
240
|
+
|
|
241
|
+
* feat(start instance): change package `dotenv` to `@dotenvx/dotenvx` for loading of ENV variables. The new package supports encrypting the ENV variables. For more information see https://dotenvx.com/docs/
|
|
242
|
+
|
|
243
|
+
## Version 1.2.1
|
|
244
|
+
|
|
245
|
+
* feat(localization): add support for adding custom labels to the localization system. These have to follow the same format as the system labels
|
|
246
|
+
* docs: add section about localization to the `README.md` file
|
|
247
|
+
|
|
248
|
+
## Version 1.2.0
|
|
249
|
+
|
|
250
|
+
* feat(config)!: change the setting `localization.labelsPath` to be an array of strings. It can now be used to supply any additional custom labels in one or more files to the framework
|
|
251
|
+
* feat(message memory cache): implement graceful exception handling during shut down procedure in `receiveMessage` and `sendMessage` methods
|
|
252
|
+
* fix(default message sender): add missing initialization of the memory cache on enable
|
|
253
|
+
* fix(default message receiver): add missing initialization of the memory cache on enable
|
|
254
|
+
* fix(message receiver): ensure `receive` method is no longer called recursively when the receiver has been disabled
|
|
255
|
+
* fix(redis integration)!: change the way the Redis client is initialized as the previous sequence was leaving unresolved promises and in some cases failed to fetch the Redis server settings. Also, it will now notify the listeners only once when the server settings are fetched and the connection is ready to be used
|
|
256
|
+
* fix(localization)!: change the way system labels are loaded as the previous implementation could cause a critical startup error if the working dir was different from expected
|
|
257
|
+
* fix(package): add the missing main export to the `start-instance.js` script. Without it was impossible to start the framework in specific cases like in a workspaces repository
|
|
258
|
+
* fix(message tracer): exclude `E_GEN_FEATURE_UNSUPPORTED` exception from the initialization of the message tracer exception handler
|
|
259
|
+
* fix(service executor)!: change the individual service registration process to ensure service registration does actually happen before the service provider finishes its initialization
|
|
260
|
+
|
|
261
|
+
## Version 1.1.10
|
|
262
|
+
|
|
263
|
+
* fix(cache): fix redis client creation sequence. It is now created inside the constructor as intended. It still needs to be initialized explicitly using the `initialize` method.
|
|
264
|
+
|
|
265
|
+
## Version 1.1.9
|
|
266
|
+
|
|
267
|
+
* feat(redis integration)!: change the way the `redis` client is initialized. Instead of happening automatically on class instantiation, it is now initialized on demand using the `initialize` method.
|
|
268
|
+
* feat(cache): change the way the main cache instance is initialized in compliance with the new redis integration
|
|
269
|
+
* feat(message memory cache)!: change the way the message memory cache is initialized in compliance with the new redis integration. The `initialize` method needs to be called explicitly to initialize the cache instance before it can be used.
|
|
270
|
+
* fix(message dispatcher): fix the way the `messageExchange` is initialized in the `MessageDispatcher` class (was not returning a promise)
|
|
271
|
+
|
|
272
|
+
## Version 1.1.8
|
|
273
|
+
|
|
274
|
+
* feat(auditing): change export of the singleton class in an `instance` variable for consistency and clarity
|
|
275
|
+
* feat(message dispatcher): change export of the singleton class in an `instance` variable for consistency and clarity
|
|
276
|
+
* feat(cache): change export of the singleton class in an `instance` variable for consistency and clarity
|
|
277
|
+
* feat(service executor): implement service registration retry policy
|
|
278
|
+
|
|
279
|
+
## Version 1.1.7
|
|
280
|
+
|
|
281
|
+
* feat(start instance): add support for the detection of `SIGBREAK` events and graceful shutdown on Windows
|
|
282
|
+
* feat(service instance)!: prevent the initialization of multiple `ServiceInstance` within the same process
|
|
283
|
+
* feat(message tracer)!: covert to singleton instance and add initialization method
|
|
284
|
+
* feat(message dispatcher): initialize the message tracer on start before message exchange is enabled
|
|
285
|
+
* fix(message tracer): optimize `recordTraceEntry` to not call set JSON command on every request
|
|
286
|
+
* fix(gcloud integration): fix the bool conversion of the `TI_GCLOUD_ENABLED` ENV variable
|
|
287
|
+
* fix(redis integration): update links to official commands documentation
|
|
288
|
+
|
|
289
|
+
## Version 1.1.6
|
|
290
|
+
|
|
291
|
+
* feat(start instance): add fail-fast mode as default behavior on promise unhandled rejections
|
|
292
|
+
* feat(start instance): implement functionality to derive safe default service domain name when none is provided in the configuration
|
|
293
|
+
* feat(config): add support for new ENV variable `TI_FAIL_FAST_ON_UNHANDLED_OFF` that controls the fail-fast mode
|
|
294
|
+
* feat(service instance): ensure instance ID naming standard is followed when creating new instances and no ID is provided in the configuration
|
|
295
|
+
* feat(redis integration): marked command `hmset` as deprecated (according to official documentation)
|
|
296
|
+
* feat(redis integration)!: change redis client default behavior: set to automatically resend all pending commands on connection recovery with no limit on the retry attempts. This behavior cannot be changed. Arguments `autoRetryUnfulfilled` and `maxRetries` have been removed from the constructor
|
|
297
|
+
* feat(redis integration)!: add options to configure redis connection retry policy. This can be controlled with two new arguments in the constructor `retryMaxIntervalMs` and `retryMaxAttempts`.
|
|
298
|
+
* feat(redis integration)!: improve and extend the behavior of pub/sub implementation functionality. The `subscribeCommand` method can now only subscribe once to the same channel. The client instance will keep a map of all channels it has subscribed to. To unsubscribe, use the `unsubscribeCommand` method
|
|
299
|
+
* feat(redis integration): add a `shutDown` method to gracefully close a redis connection. This is now used on instance shut down sequence as well as in the default message sender and receiver implementations
|
|
300
|
+
* fix(start instance): fix the logging of reason for unhandled rejections and multiple resolves
|
|
301
|
+
* fix(service instance): use the static service domain name to initialize the health check instead of the ENV variable
|
|
302
|
+
* fix(redis integration): add detection of ReJSON2 in the verification of JSON support in the redis server
|
|
303
|
+
* build(npm): update npm dependencies to their latest versions
|
|
304
|
+
* docs: add section about ENV variables to the `README.md` file
|
|
305
|
+
|
|
306
|
+
## Version 1.1.5
|
|
307
|
+
|
|
308
|
+
* fix(service instance): add overrides of the `reportHealthy` method in `ServiceConsumer` and `ServiceProvider` classes
|
|
309
|
+
* fix(tester): implement `reportHealthy` method
|
|
310
|
+
* docs(license): add a `LICENSE` file
|
|
311
|
+
* docs(license): change all licensing information in source files to GNU 3.0
|
|
312
|
+
* docs: improve the information in `README.md` file
|
|
313
|
+
|
|
314
|
+
## Version 1.1.4
|
|
315
|
+
|
|
316
|
+
* feat(service instance): expose method `reportHealthy` and mark it as virtual to allow for overrides with custom health status reporting logic
|
|
317
|
+
|
|
318
|
+
## Version 1.1.3
|
|
319
|
+
|
|
320
|
+
* feat(config)!: removed ENV variable `TI_OPERATION_MODE` as it was duplicating the practical purpose of `NODE_ENV`
|
|
321
|
+
* feat(config)!: setting `OPERATION_MODE` is now initialized by the `NODE_ENV` ENV variable (if provided)
|
|
322
|
+
* feat(service instance): show application operation mode in log at successful startup
|
|
323
|
+
* docs: add more sections and information in `README.md`
|
|
324
|
+
|
|
325
|
+
## Version 1.1.2
|
|
326
|
+
|
|
327
|
+
* feat(localization): add new functionality for localization based on labels and system language. It is currently utilized by the `exceptions` module for localizing the exception descriptions. The new `localization` module can also be accessed externally in the implementing application's files via standard import
|
|
328
|
+
* feat(config): add new setting `localization.labelsPath` that specifies the file path for the localization labels
|
|
329
|
+
* feat(config): add new setting `localization.language` that specifies the language to be used for the labels
|
|
330
|
+
* feat(config): add new ENV variable `TI_LOCALIZATION_LABELS_PATH` that controls the `localization.labelsPath` setting
|
|
331
|
+
* feat(config): add new ENV variable `TI_LOCALIZATION_LANGUAGE` that controls the `localization.language` setting
|
|
332
|
+
* feat(logger): log exception label instead of system-level description
|
|
333
|
+
* fix(start instance): fix the order of ENV loading in the `start-instance.js` script. It will now properly load the `.env` file first and then proceed with any configuration overrides in `config` module
|
|
334
|
+
* fix(service provider): normalize service file paths on dynamic service handler loading
|
|
335
|
+
* build(npm): update npm dependencies to their latest versions
|
|
336
|
+
|
|
337
|
+
## Version 1.1.1
|
|
338
|
+
|
|
339
|
+
* feat(config): add new ENV variable `TI_AUDITING_LOG_DETAILS` that controls the `auditing.logDetails` setting
|
|
340
|
+
* feat(service provider): add a method that returns a list of the currently registered services
|
|
341
|
+
* feat(tester service): improved the structure, configuration, and inline docs of tester service
|
|
342
|
+
* fix(logger): fix the way Exception is logged when it's a part of the main logging data object
|
|
343
|
+
* docs(readme): expanded the general documentation in `README.md` with a new section and improved many of the older sections
|
|
344
|
+
* docs: improved some of the JSDoc definitions across the framework
|
|
345
|
+
|
|
346
|
+
## Version 1.1.0
|
|
347
|
+
|
|
348
|
+
* feat(redis integration): implement better process for fetching and storing the remote Redis server settings and enabled features
|
|
349
|
+
* feat(redis integration): add getter method `serverVersion` that returns the Redis server version
|
|
350
|
+
* feat(redis integration): add support for RedisJSON functionality
|
|
351
|
+
* feat(redis integration): add getter method `isJSONSupported` to verify if this module is enabled/supported in Redis server
|
|
352
|
+
* feat(redis integration): add separate enum for override modes `TiRedisOverrideMode`
|
|
353
|
+
* feat(redis integration): add support for executing any single command in Redis that is otherwise unsupported by the underlying framework. Use method `callCommand` for that in case you need to access something more exotic or currently unimplemented
|
|
354
|
+
* feat(cache): add support for working with JSON values. Currently supporting operations `set`, `get`, and `append array` with more coming in future versions
|
|
355
|
+
* feat(cache): add support for setting manual expiration of values
|
|
356
|
+
* feat(message tracer): change log level of trace entries from `DEBUG` to `NOTICE` for all events
|
|
357
|
+
* feat(message tracer): add functionality for storing the trace entries in the `cache` in JSON format. This is the default behavior and will always work. Traces can later be retrieved from the `cache` for further processing by specialized application
|
|
358
|
+
* feat(message tracer): add new property `traceTimestamp` to the trace entries as it may differ from the actual message timestamp
|
|
359
|
+
* feat(config): add new setting `messageExchange.traceExpirationTime` that controls the preservation time for all trace entries. Default is one hour and will be refreshed every time a new trace is generated. Setting this to `0` will disable
|
|
360
|
+
expiration altogether
|
|
361
|
+
* feat(config): add new setting `messageExchange.traceRepository` that specifies the name of the key in `cache` that will store the trace entries. The default one should be sufficient for most cases
|
|
362
|
+
* feat(config): change default of setting `messageExchange.traceLogEnabled` to `false`. With this change trace entries will not be written to the standard log output
|
|
363
|
+
* feat(exceptions): add new exception code `1006` as `E_GEN_FEATURE_UNSUPPORTED` to indicate functionality that is unsupported by the system or integrated application
|
|
364
|
+
* refactor(config)!: correct the name of the ENV variable controlling `memoryCache.user` to `TI_MEMORY_CACHE_USER` from previous `MEMORY_CACHE_USER`
|
|
365
|
+
* build(npm): update npm development dependencies to their latest versions
|
|
366
|
+
* docs: update some JSDoc types and other entries to reflect the current state of the code
|
|
367
|
+
|
|
368
|
+
## Version 1.0.14
|
|
369
|
+
|
|
370
|
+
* feat(message exchange): improve the behavior of `onConnectionRecovered` and `onConnectionDisrupted` events in modules `cache`, `message-handler` and `service-executor` to prevent cross-activation or deactivation
|
|
371
|
+
* feat(redis integration): improve Redis integration for greater stability, support of Redis Cloud, and support for Redis 7
|
|
372
|
+
* feat(config): enable setting `auditing.logDetails` by default for all logs
|
|
373
|
+
* docs: update general documentation
|
|
374
|
+
|
|
375
|
+
## Version 1.0.13
|
|
376
|
+
|
|
377
|
+
* build(npm): update npm dependencies to their latest versions
|
|
378
|
+
|
|
379
|
+
## Version 1.0.12
|
|
380
|
+
|
|
381
|
+
* build(npm): update npm dependencies to their latest versions
|
|
382
|
+
|
|
383
|
+
## Version 1.0.11
|
|
384
|
+
|
|
385
|
+
* feat(message exchange): implement message tampering and insertion protection
|
|
386
|
+
* feat(config): provide option to turn on/off the message tampering and insertion protection
|
|
387
|
+
* feat(config): provide option to turn on/off message tracing
|
|
388
|
+
* build(npm): update npm dependencies to their latest versions
|
|
389
|
+
* refactor(config)!: rename all environment variables that set configuration settings to match their related setting
|
|
390
|
+
* docs: add a change log
|
|
391
|
+
|
|
392
|
+
## Version 1.0.0
|
|
393
|
+
|
|
378
394
|
* feat: create initial version of the framework
|