@cap-js-community/common 0.1.2 → 0.1.3
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/README.md +6 -1
- package/package.json +1 -1
- package/src/redis-client/RedisClient.js +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# CAP Node.js Community Common
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@cap-js-community/common)
|
|
4
|
+
[](https://www.npmjs.com/package/@cap-js-community/common)
|
|
5
|
+
[](https://api.reuse.software/info/github.com/cap-js-community/common)
|
|
6
|
+
[](https://github.com/cap-js-community/common/commits/main)
|
|
7
|
+
|
|
3
8
|
## Getting Started
|
|
4
9
|
|
|
5
10
|
- Run `npm add @cap-js-community/common` in `@sap/cds` project
|
|
@@ -262,4 +267,4 @@ We as members, contributors, and leaders pledge to make participation in our com
|
|
|
262
267
|
|
|
263
268
|
## Licensing
|
|
264
269
|
|
|
265
|
-
Copyright 2025 SAP SE or an SAP affiliate company and
|
|
270
|
+
Copyright 2025 SAP SE or an SAP affiliate company and common contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cap-js-community/common).
|
package/package.json
CHANGED
|
@@ -103,7 +103,7 @@ class RedisClient {
|
|
|
103
103
|
|
|
104
104
|
createClientBase(redisOptions = {}) {
|
|
105
105
|
const { credentials, options } =
|
|
106
|
-
(this.name ? cds.requires[`redis-${this.name}`] : undefined) || cds.requires["redis"] || {};
|
|
106
|
+
(this.name ? cds.env.requires[`redis-${this.name}`] : undefined) || cds.env.requires["redis"] || {};
|
|
107
107
|
const socket = {
|
|
108
108
|
host: credentials?.hostname ?? "127.0.0.1",
|
|
109
109
|
tls: !!credentials?.tls,
|
|
@@ -114,7 +114,7 @@ class RedisClient {
|
|
|
114
114
|
const socketOptions = {
|
|
115
115
|
...options,
|
|
116
116
|
...redisOptions,
|
|
117
|
-
password:
|
|
117
|
+
password: redisOptions?.password ?? options?.password ?? credentials?.password,
|
|
118
118
|
socket,
|
|
119
119
|
};
|
|
120
120
|
try {
|