@nest-boot/redis 7.0.0 → 7.0.2
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/dist/index.d.ts +1 -3
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/redis.module-definition.d.ts +2 -8
- package/dist/redis.module-definition.js +1 -8
- package/dist/redis.module-definition.js.map +1 -1
- package/dist/redis.module.d.ts +65 -3
- package/dist/redis.module.js +75 -5
- package/dist/redis.module.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/load-config-from-env.util.d.ts +14 -0
- package/dist/utils/load-config-from-env.util.js +14 -0
- package/dist/utils/load-config-from-env.util.js.map +1 -1
- package/package.json +8 -8
- package/dist/redis.d.ts +0 -3
- package/dist/redis.js +0 -21
- package/dist/redis.js.map +0 -1
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import { RedisOptions } from "ioredis";
|
|
2
|
+
/**
|
|
3
|
+
* Loads Redis configuration from environment variables.
|
|
4
|
+
*
|
|
5
|
+
* Supports the following environment variables:
|
|
6
|
+
* - `REDIS_URL`: Full Redis connection URL (takes precedence over individual settings)
|
|
7
|
+
* - `REDIS_HOST`: Redis server hostname
|
|
8
|
+
* - `REDIS_PORT`: Redis server port
|
|
9
|
+
* - `REDIS_DB` or `REDIS_DATABASE`: Redis database number
|
|
10
|
+
* - `REDIS_USER` or `REDIS_USERNAME`: Redis username
|
|
11
|
+
* - `REDIS_PASS` or `REDIS_PASSWORD`: Redis password
|
|
12
|
+
* - `REDIS_TLS`: Enable TLS connection (any truthy value)
|
|
13
|
+
*
|
|
14
|
+
* @returns Redis connection options parsed from environment variables
|
|
15
|
+
*/
|
|
2
16
|
export declare function loadConfigFromEnv(): RedisOptions;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadConfigFromEnv = loadConfigFromEnv;
|
|
4
|
+
/**
|
|
5
|
+
* Loads Redis configuration from environment variables.
|
|
6
|
+
*
|
|
7
|
+
* Supports the following environment variables:
|
|
8
|
+
* - `REDIS_URL`: Full Redis connection URL (takes precedence over individual settings)
|
|
9
|
+
* - `REDIS_HOST`: Redis server hostname
|
|
10
|
+
* - `REDIS_PORT`: Redis server port
|
|
11
|
+
* - `REDIS_DB` or `REDIS_DATABASE`: Redis database number
|
|
12
|
+
* - `REDIS_USER` or `REDIS_USERNAME`: Redis username
|
|
13
|
+
* - `REDIS_PASS` or `REDIS_PASSWORD`: Redis password
|
|
14
|
+
* - `REDIS_TLS`: Enable TLS connection (any truthy value)
|
|
15
|
+
*
|
|
16
|
+
* @returns Redis connection options parsed from environment variables
|
|
17
|
+
*/
|
|
4
18
|
function loadConfigFromEnv() {
|
|
5
19
|
if (process.env.REDIS_URL) {
|
|
6
20
|
const url = new URL(process.env.REDIS_URL);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-config-from-env.util.js","sourceRoot":"","sources":["../../src/utils/load-config-from-env.util.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"load-config-from-env.util.js","sourceRoot":"","sources":["../../src/utils/load-config-from-env.util.ts"],"names":[],"mappings":";;AAgBA,8CA+BC;AA7CD;;;;;;;;;;;;;GAaG;AACH,SAAgB,iBAAiB;IAC/B,IAAI,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC;QAC1B,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC3C,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;QACtB,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAE5C,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,QAAQ;YAClB,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,C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package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-boot/redis",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "d4rkcr0w <me@d4rkcr0w.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -14,13 +14,10 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"@nest-boot/eslint-plugin": "^7.0.0",
|
|
19
|
-
"@nest-boot/tsconfig": "^7.0.0",
|
|
20
|
-
"@nestjs/common": "^11.1.6",
|
|
17
|
+
"@nestjs/common": "^11.1.9",
|
|
21
18
|
"@nestjs/config": "^4.0.2",
|
|
22
|
-
"@nestjs/core": "^11.1.
|
|
23
|
-
"@nestjs/testing": "^11.1.
|
|
19
|
+
"@nestjs/core": "^11.1.9",
|
|
20
|
+
"@nestjs/testing": "^11.1.9",
|
|
24
21
|
"@types/jest": "^29.5.14",
|
|
25
22
|
"eslint": "^9.36.0",
|
|
26
23
|
"ioredis": "^5.8.0",
|
|
@@ -28,7 +25,10 @@
|
|
|
28
25
|
"reflect-metadata": "^0.2.2",
|
|
29
26
|
"rxjs": "^7.8.2",
|
|
30
27
|
"ts-jest": "^29.4.4",
|
|
31
|
-
"typescript": "^5.9.3"
|
|
28
|
+
"typescript": "^5.9.3",
|
|
29
|
+
"@nest-boot/eslint-config": "^7.0.2",
|
|
30
|
+
"@nest-boot/eslint-plugin": "^7.0.3",
|
|
31
|
+
"@nest-boot/tsconfig": "^7.0.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@nestjs/common": "^11.0.0",
|
package/dist/redis.d.ts
DELETED
package/dist/redis.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Redis = void 0;
|
|
13
|
-
const common_1 = require("@nestjs/common");
|
|
14
|
-
const ioredis_1 = __importDefault(require("ioredis"));
|
|
15
|
-
let Redis = class Redis extends ioredis_1.default {
|
|
16
|
-
};
|
|
17
|
-
exports.Redis = Redis;
|
|
18
|
-
exports.Redis = Redis = __decorate([
|
|
19
|
-
(0, common_1.Injectable)()
|
|
20
|
-
], Redis);
|
|
21
|
-
//# sourceMappingURL=redis.js.map
|
package/dist/redis.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"redis.js","sourceRoot":"","sources":["../src/redis.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sDAAgE;AAGzD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,iBAAO;CAA6B,CAAA;AAAlD,sBAAK;gBAAL,KAAK;IADjB,IAAA,mBAAU,GAAE;GACA,KAAK,CAA6C"}
|