@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.
Files changed (33) hide show
  1. package/CHANGELOG.md +393 -377
  2. package/LICENSE.md +321 -321
  3. package/README.md +599 -597
  4. package/bin/localization/labels.json +122 -122
  5. package/bin/settings.json +41 -41
  6. package/bin/start-instance.js +164 -164
  7. package/components/auditing.js +191 -191
  8. package/components/connection-observer.js +72 -72
  9. package/components/definitions.types.js +248 -248
  10. package/components/exchange/default/default-message-exchange.js +136 -136
  11. package/components/exchange/default/default-message-receiver.js +101 -101
  12. package/components/exchange/default/default-message-sender.js +100 -100
  13. package/components/exchange/message-dispatcher.js +168 -168
  14. package/components/exchange/message-exchange.js +449 -449
  15. package/components/exchange/message-handler.js +235 -235
  16. package/components/exchange/message-memory-cache.js +190 -190
  17. package/components/exchange/message-observer.js +126 -126
  18. package/components/exchange/message-receiver.js +181 -181
  19. package/components/exchange/message-sender.js +143 -143
  20. package/components/exchange/message-tracer.js +212 -212
  21. package/components/service-caller.js +370 -370
  22. package/components/service-consumer.js +131 -131
  23. package/components/service-executor.js +278 -278
  24. package/components/service-instance.js +316 -316
  25. package/components/service-provider.js +251 -251
  26. package/integrations/redis-integration.js +591 -591
  27. package/package.json +89 -89
  28. package/utils/cache.js +772 -772
  29. package/utils/config.js +103 -103
  30. package/utils/exceptions.js +368 -368
  31. package/utils/localization.js +298 -298
  32. package/utils/logger.js +82 -82
  33. 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.7.1
6
-
7
- * 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)
8
- * build(release): bump package version from `1.7.0` to `1.7.1`
9
-
10
- ## Version 1.7.0
11
-
12
- * refactor(core)!: load the `.env` file via native `process.loadEnvFile` instead of `@dotenvx/dotenvx`
13
- * build(deps)!: remove the `@dotenvx/dotenvx` dependency — core now has three runtime dependencies (`ioredis`, `lodash`, `node-schedule`)
14
- * build(core)!: raise the minimum Node.js version to `>=20.12.0` (required for `process.loadEnvFile`)
15
-
16
- > 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.
17
-
18
- ## Version 1.6.1
19
-
20
- * build(deps): update `@dotenvx/dotenvx` from ^1.73.1 to ^1.75.1
21
- * build(deps): remove `zeromq` as optional dependency
22
-
23
- ## Version 1.6.0
24
-
25
- * refactor(exchange)!: replace the blake2 keyed hash with native `node:crypto` HMAC-SHA256 in the message integrity check
26
- * build(deps)!: remove the `blake2` native addon dependency (no longer builds on Node 26; replaced by the built-in `node:crypto`)
27
- * fix(exchange): use a constant-time comparison for the message security hash
28
- * fix(exchange): ship an empty default `securityHashKey` and warn (once) when the security hash is enabled with a missing/default key
29
- * test(exchange): add the first core test suite message-hash determinism, tamper detection, and the constant-time comparison
30
-
31
- > **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.
32
-
33
- ## Version 1.5.1
34
-
35
- * build(deps): update `@dotenvx/dotenvx` from ^1.66.0 to ^1.73.1
36
- * build(deps): update `ioredis` from ^5.10.1 to ^5.11.1
37
-
38
- ## Version 1.5.0
39
-
40
- * feat(exceptions): add `E_APP_RESOURCE_ALREADY_EXISTS` (5006) for resource-creation conflicts; intended to be raised with HTTP `409`
41
-
42
- ## Version 1.4.6
43
-
44
- * build(deps): update `@dotenvx/dotenvx` from ^1.65.0 to ^1.66.0
45
-
46
- ## Version 1.4.5
47
-
48
- * 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
49
-
50
- ## Version 1.4.4
51
-
52
- * build(deps): update `@dotenvx/dotenvx` from ^1.60.0 to ^1.65.0
53
-
54
- ## Version 1.4.3
55
-
56
- * build(deps): update `@dotenvx/dotenvx` from ^1.59.1 to ^1.60.0
57
-
58
- ## Version 1.4.2
59
-
60
- * build(deps): update `@dotenvx/dotenvx` from ^1.55.1 to ^1.59.1
61
- * build(deps): update `ioredis` from ^5.10.0 to ^5.10.1
62
- * build(deps): update `lodash` from ^4.17.23 to ^4.18.1
63
-
64
- ## Version 1.4.1
65
-
66
- * build(deps): update `@dotenvx/dotenvx` from ^1.54.1 to ^1.55.1
67
-
68
- ## Version 1.4.0
69
-
70
- * feat(redis integration): implement support for `JSON.MERGE` and `JSON.MGET` commands
71
- * feat(cache): add `editJSON` method
72
- * feat(cache): implement consistent RedisJSON path handling and uniform error wrapping
73
- * feat(exceptions): add new standardized exception code `E_GEN_NOT_IMPLEMENTED` to use for cases where a feature is not yet implemented
74
- * feat(exceptions): add new optional, flexible parameter `httpCode` to the `raise` method
75
- * refactor(exceptions)!: rename the exception class from `Exception` to `TiException` in all referred places
76
- * refactor(definitions): move all object definitions to a new `definitions.types.js` file
77
- * refactor(gcloud integration)!: remove file `gcloud-integration.js` and all related functionality (as it was obsolete and a security vulnerability)
78
- * fix(cache): fix a bug where RedisJSON methods would return `E_GEN_FEATURE_UNSUPPORTED` error while discarding the details of that error
79
- * fix(config): fix the ENV `TI_LOCALIZATION_LABELS_PATH` to properly support multiple paths to label files
80
- * build(deps): update `@dotenvx/dotenvx` from ^1.52.0 to ^1.54.1
81
- * build(deps): update `ioredis` from ^5.9.2 to ^5.10.0
82
- * build(deps)!: remove `@google-cloud/error-reporting`
83
-
84
- ## Version 1.3.14
85
-
86
- * build(deps): update `@dotenvx/dotenvx` from ^1.51.1 to ^1.52.0
87
- * build(deps): update `blake2` from ^5.0.0 to ^5.0.1
88
- * build(deps): update `ioredis` from ^5.8.2 to ^5.9.2
89
- * build(deps): update `lodash` from ^4.17.21 to ^4.17.23
90
- * build(engines): update Node.js requirement from >=18.0.0 to >=20.0.0
91
-
92
- ## Version 1.3.13
93
-
94
- * feat(exceptions): add new exception code `E_GEN_UNALLOWED_OVERRIDE` (1009) for detecting attempts to override protected or private methods/properties
95
- * 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
96
- * 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
97
- * build(npm): update npm dependencies to their latest versions
98
-
99
- ## Version 1.3.12
100
-
101
- * feat(exceptions): add new exception code `E_COM_SERVICE_EXEC_FAILED`
102
- * feat(localization): add new public method `getAllLabels`
103
- * feat(localization): use new `deepFreeze` method to freeze all label trees
104
- * feat(tools): add new public method `deepFreeze` for freezing an object and all its sub-objects recursively
105
- * feat(config): use new `deepFreeze` method to freeze all configuration settings
106
- * docs: add more information about the `localization` module in `README.md` file
107
- * build(npm): update npm dependencies to their latest versions
108
-
109
- ## Version 1.3.11
110
-
111
- * feat(tools): add `arrayUniques` method to the tools module that helps extract only the unique array values
112
- * fix(start instance): fix `undefined` instance ID in the log message about starting the instance
113
-
114
- ## Version 1.3.10
115
-
116
- * chore: fix various minor issues reported by the linter
117
- * build(npm): add more information and options to the `package.json` file
118
- * docs: add some JSDoc descriptions to classes and methods
119
-
120
- ## Version 1.3.9
121
-
122
- * feat(exceptions): add new exception code `E_GEN_NOT_INITIALIZED`
123
- * docs: fix image links in the `README.md` file
124
-
125
- ## Version 1.3.8
126
-
127
- * 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
128
- * build(npm): update npm dependencies to their latest versions
129
- * docs: fix some outdated information in the `README.md` file and add some more details
130
-
131
- ## Version 1.3.7
132
-
133
- * feat(exceptions): add new exception code `E_SEC_UNRECOGNIZED_AUTH_METHOD`
134
- * fix(config): fix potential issue with `TI_GCLOUD_ENABLED` parsing as boolean
135
- * docs: adjust some of the JSDoc descriptions and definitions
136
-
137
- ## Version 1.3.6
138
-
139
- * feat(exceptions): add new exception code `E_GEN_INVALID_ARGUMENT_TYPE`
140
- * 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
141
- * feat(tools): add `description` property to enum objects
142
- * feat(tools): add `contains` property to enum objects
143
- * 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)
144
- * refactor(exceptions): invalid `httpCode` inputs are coerced to `undefined`; `Exception.asJSON` includes `httpCode` only when defined
145
- * refactor(tools): deprecate method `getEnumName` in favor of `enum.name`; removal planned for 1.4.0
146
- * refactor(tools)!: remove method `createCSVFile` as it is unnecessary for the framework's operation. It also eliminates the dependency from `fs-extra` package
147
- * 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)
148
- * fix(tools): fix a bug in the `RetryPolicy` class that caused the `maxAttempts` property to be ignored
149
- * build(npm): update npm dependencies to their latest versions
150
- * build(npm): remove `fs-extra` package as it is not used by the framework
151
- * build(npm)!: bump the minimum supported Node.js version to 18.0.0
152
-
153
- ## Version 1.3.5
154
-
155
- * fix(redis integration): fix a duplicated log entry on connection ready event if multiple observers are registered
156
- * 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
157
- * docs: update and fix various issues with the `README.md` file
158
-
159
- ## Version 1.3.4
160
-
161
- * fix(service instance): fix the way `ServiceConfiguration` is propagated via child classes and remove unnecessary defaults. Also update the relevant JSDoc
162
-
163
- ## Version 1.3.3
164
-
165
- * feat(exceptions): add new parameter `includeData` to `Exception.asJSON` method which allows the exclusion of the data parameter from the returned JSON
166
- * feat(exceptions): remove several excessive exception codes that were unlikely to be used
167
- * fix(localization): add several missing exception labels
168
-
169
- ## Version 1.3.2
170
-
171
- * feat(exceptions): add a set of new exception codes for the needs of any wrapping `web-server` standard communication
172
- * feat(exception)!: change the default prefix path for exception labels to `system.exceptions.`
173
- * feat(localization): add an Enum list of all language codes based on ISO 639-1 standard
174
- * 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
175
- * feat(localization)!: change the default structure of system labels from `labels.general.[...]` to `system.[...]`
176
- * refactor(localization): add typedefs and JSDoc structure for the objects used in localization
177
- * refactor(exceptions): refactor and fix various JSDoc descriptions
178
- * refactor(auditing): change the type name of `LogEntry` to `TiLogEntry` and fix some JSDoc descriptions
179
- * fix(exceptions): fix an issue which caused the exception to disregard the `description` value sent in the constructor and use the default one instead
180
- * 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
181
- * 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
182
-
183
- ## Version 1.3.1
184
-
185
- * feat(service caller): refactor the entire service call execution flow for clarity and better performance
186
- * feat(service caller): create a new private class `ServiceCallProcessor` to handle individual service calls in a contained scope
187
- * 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
188
- * 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`
189
- * feat(message handler)!: change method `onMessage` to `notifyMessageObservers` for clarity. It now implements the `MessageObserver` functionality for prioritization and message modification
190
- * 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
191
- * fix(redis integration): remove hardcoded `#retryMaxAttempts` value in `#setupClient` method
192
- * fix(redis integration): fix an issue which was setting the client status to `DISCONNECTED` during a normal shut down procedure
193
-
194
- ## Version 1.3.0
195
-
196
- * feat(redis integration)!: change `reconnectOnError` behavior to also resubmit the failed command in case the error was of type `READONLY`
197
- * feat(redis integration): improve the reliability and usage of the event notification mechanism for connection observers
198
- * feat(redis integration): implement listener to the `end` event on Redis connection to capture when connection can no longer be recovered
199
- * feat(redis integration): notify connection observers `onConnectionLost` event
200
- * 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
201
- * feat(connection observer): add new event handler `onConnectionLost` that will be invoked when the observed connection is irrevocably lost
202
- * feat(cache)!: implement `onConnectionLost` handler that will cause the service instance to immediately stop since it cannot work without the cache
203
- * 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
204
- * fix(service instance): limit health check reporting to one attempt at a time to avoid unnecessary cache requests and log spam
205
- * fix(redis integration): fix a multiple promise resolve condition on Redis `reconnect` event
206
- * fix(redis integration): fix broken event propagation on `disrupted` events to some connection observers
207
-
208
- ## Version 1.2.5
209
-
210
- * feat(cache): extend method `expireValue` to work with has set fields as well
211
-
212
- ## Version 1.2.4
213
-
214
- * feat(cache): expose the cache module as export in `package.json`
215
- * feat(cache): add method `hashDeleteField` to remove a hash-set field. This implements the `hdel` Redis command
216
- * fix(tools): optimize method `stringifyJSON` not to call unnecessary decycling of the value if it's not an object
217
- * fix(cache): replace `hmset` with `hset` Redis command in both methods that set hash-set values. Also remove unnecessary `_.isObjectLike` call in `hashSetFields` method
218
-
219
- ## Version 1.2.3
220
-
221
- * 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
222
-
223
- ## Version 1.2.2
224
-
225
- * 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/
226
-
227
- ## Version 1.2.1
228
-
229
- * feat(localization): add support for adding custom labels to the localization system. These have to follow the same format as the system labels
230
- * docs: add section about localization to the `README.md` file
231
-
232
- ## Version 1.2.0
233
-
234
- * 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
235
- * feat(message memory cache): implement graceful exception handling during shut down procedure in `receiveMessage` and `sendMessage` methods
236
- * fix(default message sender): add missing initialization of the memory cache on enable
237
- * fix(default message receiver): add missing initialization of the memory cache on enable
238
- * fix(message receiver): ensure `receive` method is no longer called recursively when the receiver has been disabled
239
- * 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
240
- * 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
241
- * 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
242
- * fix(message tracer): exclude `E_GEN_FEATURE_UNSUPPORTED` exception from the initialization of the message tracer exception handler
243
- * fix(service executor)!: change the individual service registration process to ensure service registration does actually happen before the service provider finishes its initialization
244
-
245
- ## Version 1.1.10
246
-
247
- * 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.
248
-
249
- ## Version 1.1.9
250
-
251
- * 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.
252
- * feat(cache): change the way the main cache instance is initialized in compliance with the new redis integration
253
- * 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.
254
- * fix(message dispatcher): fix the way the `messageExchange` is initialized in the `MessageDispatcher` class (was not returning a promise)
255
-
256
- ## Version 1.1.8
257
-
258
- * feat(auditing): change export of the singleton class in an `instance` variable for consistency and clarity
259
- * feat(message dispatcher): change export of the singleton class in an `instance` variable for consistency and clarity
260
- * feat(cache): change export of the singleton class in an `instance` variable for consistency and clarity
261
- * feat(service executor): implement service registration retry policy
262
-
263
- ## Version 1.1.7
264
-
265
- * feat(start instance): add support for the detection of `SIGBREAK` events and graceful shutdown on Windows
266
- * feat(service instance)!: prevent the initialization of multiple `ServiceInstance` within the same process
267
- * feat(message tracer)!: covert to singleton instance and add initialization method
268
- * feat(message dispatcher): initialize the message tracer on start before message exchange is enabled
269
- * fix(message tracer): optimize `recordTraceEntry` to not call set JSON command on every request
270
- * fix(gcloud integration): fix the bool conversion of the `TI_GCLOUD_ENABLED` ENV variable
271
- * fix(redis integration): update links to official commands documentation
272
-
273
- ## Version 1.1.6
274
-
275
- * feat(start instance): add fail-fast mode as default behavior on promise unhandled rejections
276
- * feat(start instance): implement functionality to derive safe default service domain name when none is provided in the configuration
277
- * feat(config): add support for new ENV variable `TI_FAIL_FAST_ON_UNHANDLED_OFF` that controls the fail-fast mode
278
- * feat(service instance): ensure instance ID naming standard is followed when creating new instances and no ID is provided in the configuration
279
- * feat(redis integration): marked command `hmset` as deprecated (according to official documentation)
280
- * 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
281
- * 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`.
282
- * 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
283
- * 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
284
- * fix(start instance): fix the logging of reason for unhandled rejections and multiple resolves
285
- * fix(service instance): use the static service domain name to initialize the health check instead of the ENV variable
286
- * fix(redis integration): add detection of ReJSON2 in the verification of JSON support in the redis server
287
- * build(npm): update npm dependencies to their latest versions
288
- * docs: add section about ENV variables to the `README.md` file
289
-
290
- ## Version 1.1.5
291
-
292
- * fix(service instance): add overrides of the `reportHealthy` method in `ServiceConsumer` and `ServiceProvider` classes
293
- * fix(tester): implement `reportHealthy` method
294
- * docs(license): add a `LICENSE` file
295
- * docs(license): change all licensing information in source files to GNU 3.0
296
- * docs: improve the information in `README.md` file
297
-
298
- ## Version 1.1.4
299
-
300
- * feat(service instance): expose method `reportHealthy` and mark it as virtual to allow for overrides with custom health status reporting logic
301
-
302
- ## Version 1.1.3
303
-
304
- * feat(config)!: removed ENV variable `TI_OPERATION_MODE` as it was duplicating the practical purpose of `NODE_ENV`
305
- * feat(config)!: setting `OPERATION_MODE` is now initialized by the `NODE_ENV` ENV variable (if provided)
306
- * feat(service instance): show application operation mode in log at successful startup
307
- * docs: add more sections and information in `README.md`
308
-
309
- ## Version 1.1.2
310
-
311
- * 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
312
- * feat(config): add new setting `localization.labelsPath` that specifies the file path for the localization labels
313
- * feat(config): add new setting `localization.language` that specifies the language to be used for the labels
314
- * feat(config): add new ENV variable `TI_LOCALIZATION_LABELS_PATH` that controls the `localization.labelsPath` setting
315
- * feat(config): add new ENV variable `TI_LOCALIZATION_LANGUAGE` that controls the `localization.language` setting
316
- * feat(logger): log exception label instead of system-level description
317
- * 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
318
- * fix(service provider): normalize service file paths on dynamic service handler loading
319
- * build(npm): update npm dependencies to their latest versions
320
-
321
- ## Version 1.1.1
322
-
323
- * feat(config): add new ENV variable `TI_AUDITING_LOG_DETAILS` that controls the `auditing.logDetails` setting
324
- * feat(service provider): add a method that returns a list of the currently registered services
325
- * feat(tester service): improved the structure, configuration, and inline docs of tester service
326
- * fix(logger): fix the way Exception is logged when it's a part of the main logging data object
327
- * docs(readme): expanded the general documentation in `README.md` with a new section and improved many of the older sections
328
- * docs: improved some of the JSDoc definitions across the framework
329
-
330
- ## Version 1.1.0
331
-
332
- * feat(redis integration): implement better process for fetching and storing the remote Redis server settings and enabled features
333
- * feat(redis integration): add getter method `serverVersion` that returns the Redis server version
334
- * feat(redis integration): add support for RedisJSON functionality
335
- * feat(redis integration): add getter method `isJSONSupported` to verify if this module is enabled/supported in Redis server
336
- * feat(redis integration): add separate enum for override modes `TiRedisOverrideMode`
337
- * 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
338
- * feat(cache): add support for working with JSON values. Currently supporting operations `set`, `get`, and `append array` with more coming in future versions
339
- * feat(cache): add support for setting manual expiration of values
340
- * feat(message tracer): change log level of trace entries from `DEBUG` to `NOTICE` for all events
341
- * 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
342
- * feat(message tracer): add new property `traceTimestamp` to the trace entries as it may differ from the actual message timestamp
343
- * 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
344
- expiration altogether
345
- * 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
346
- * feat(config): change default of setting `messageExchange.traceLogEnabled` to `false`. With this change trace entries will not be written to the standard log output
347
- * feat(exceptions): add new exception code `1006` as `E_GEN_FEATURE_UNSUPPORTED` to indicate functionality that is unsupported by the system or integrated application
348
- * refactor(config)!: correct the name of the ENV variable controlling `memoryCache.user` to `TI_MEMORY_CACHE_USER` from previous `MEMORY_CACHE_USER`
349
- * build(npm): update npm development dependencies to their latest versions
350
- * docs: update some JSDoc types and other entries to reflect the current state of the code
351
-
352
- ## Version 1.0.14
353
-
354
- * 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
355
- * feat(redis integration): improve Redis integration for greater stability, support of Redis Cloud, and support for Redis 7
356
- * feat(config): enable setting `auditing.logDetails` by default for all logs
357
- * docs: update general documentation
358
-
359
- ## Version 1.0.13
360
-
361
- * build(npm): update npm dependencies to their latest versions
362
-
363
- ## Version 1.0.12
364
-
365
- * build(npm): update npm dependencies to their latest versions
366
-
367
- ## Version 1.0.11
368
-
369
- * feat(message exchange): implement message tampering and insertion protection
370
- * feat(config): provide option to turn on/off the message tampering and insertion protection
371
- * feat(config): provide option to turn on/off message tracing
372
- * build(npm): update npm dependencies to their latest versions
373
- * refactor(config)!: rename all environment variables that set configuration settings to match their related setting
374
- * docs: add a change log
375
-
376
- ## Version 1.0.0
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