@hg-ts/redis 0.1.97 → 0.1.99

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 CHANGED
@@ -1,5 +1,3 @@
1
1
  export * from './redis.module';
2
2
  export * from './redis.client';
3
- export * from './config';
4
- export * from './redis.config.module';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -3,6 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./redis.module"), exports);
5
5
  tslib_1.__exportStar(require("./redis.client"), exports);
6
- tslib_1.__exportStar(require("./config"), exports);
7
- tslib_1.__exportStar(require("./redis.config.module"), exports);
8
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,yDAA+B;AAC/B,mDAAyB;AACzB,gEAAsC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,yDAA+B"}
@@ -1,6 +1,6 @@
1
1
  import { DESTROY_HOOK, INIT_HOOK } from '@hg-ts/ioc';
2
+ import { RedisConfig } from '@hg-ts/redis-config';
2
3
  import Redis from 'ioredis';
3
- import { RedisConfig } from './config';
4
4
  export declare class RedisClient extends Redis {
5
5
  constructor(config: RedisConfig);
6
6
  [INIT_HOOK](): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"redis.client.d.ts","sourceRoot":"","sources":["../src/redis.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,YAAY,EACZ,SAAS,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,qBACa,WAAY,SAAQ,KAAK;gBAClB,MAAM,EAAE,WAAW;IAUzB,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5C"}
1
+ {"version":3,"file":"redis.client.d.ts","sourceRoot":"","sources":["../src/redis.client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,YAAY,EACZ,SAAS,EACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,qBACa,WAAY,SAAQ,KAAK;gBAClB,MAAM,EAAE,WAAW;IAUzB,CAAC,SAAS,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5C"}
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RedisClient = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ioc_1 = require("@hg-ts/ioc");
6
+ const redis_config_1 = require("@hg-ts/redis-config");
6
7
  const ioredis_1 = tslib_1.__importDefault(require("ioredis"));
7
- const config_1 = require("./config");
8
8
  let RedisClient = class RedisClient extends ioredis_1.default {
9
9
  constructor(config) {
10
10
  super({
@@ -25,6 +25,6 @@ let RedisClient = class RedisClient extends ioredis_1.default {
25
25
  exports.RedisClient = RedisClient;
26
26
  exports.RedisClient = RedisClient = tslib_1.__decorate([
27
27
  (0, ioc_1.Dependant)(),
28
- tslib_1.__metadata("design:paramtypes", [config_1.RedisConfig])
28
+ tslib_1.__metadata("design:paramtypes", [redis_config_1.RedisConfig])
29
29
  ], RedisClient);
30
30
  //# sourceMappingURL=redis.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"redis.client.js","sourceRoot":"","sources":["../src/redis.client.ts"],"names":[],"mappings":";;;;AAAA,oCAIoB;AACpB,8DAA4B;AAC5B,qCAAuC;AAGhC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,iBAAK;IACrC,YAAmB,MAAmB;QACrC,KAAK,CAAC;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,EAAE,EAAE,MAAM,CAAC,QAAQ;YACnB,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,IAAI;SACjB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,CAAC,eAAS,CAAC;QACvB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,CAAC,kBAAY,CAAC;QAC1B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;CACD,CAAA;AAlBY,kCAAW;sBAAX,WAAW;IADvB,IAAA,eAAS,GAAE;6CAEgB,oBAAW;GAD1B,WAAW,CAkBvB"}
1
+ {"version":3,"file":"redis.client.js","sourceRoot":"","sources":["../src/redis.client.ts"],"names":[],"mappings":";;;;AAAA,oCAIoB;AACpB,sDAAkD;AAClD,8DAA4B;AAGrB,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,iBAAK;IACrC,YAAmB,MAAmB;QACrC,KAAK,CAAC;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,EAAE,EAAE,MAAM,CAAC,QAAQ;YACnB,gBAAgB,EAAE,IAAI;YACtB,WAAW,EAAE,IAAI;SACjB,CAAC,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,CAAC,eAAS,CAAC;QACvB,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IAEM,KAAK,CAAC,CAAC,kBAAY,CAAC;QAC1B,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;IACnB,CAAC;CACD,CAAA;AAlBY,kCAAW;sBAAX,WAAW;IADvB,IAAA,eAAS,GAAE;6CAEgB,0BAAW;GAD1B,WAAW,CAkBvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"redis.module.d.ts","sourceRoot":"","sources":["../src/redis.module.ts"],"names":[],"mappings":"AAOA,qBAMa,WAAW;CAAG"}
1
+ {"version":3,"file":"redis.module.d.ts","sourceRoot":"","sources":["../src/redis.module.ts"],"names":[],"mappings":"AAQA,qBAMa,WAAW;CAAG"}
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RedisModule = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const ioc_1 = require("@hg-ts/ioc");
6
+ const redis_config_1 = require("@hg-ts/redis-config");
6
7
  const redis_client_1 = require("./redis.client");
7
- const redis_config_module_1 = require("./redis.config.module");
8
8
  let RedisModule = class RedisModule {
9
9
  };
10
10
  exports.RedisModule = RedisModule;
11
11
  exports.RedisModule = RedisModule = tslib_1.__decorate([
12
12
  (0, ioc_1.Global)(),
13
13
  (0, ioc_1.Module)({
14
- imports: [redis_config_module_1.RedisConfigModule],
14
+ imports: [redis_config_1.RedisConfigModule],
15
15
  providers: [redis_client_1.RedisClient],
16
16
  exports: [redis_client_1.RedisClient],
17
17
  })
@@ -1 +1 @@
1
- {"version":3,"file":"redis.module.js","sourceRoot":"","sources":["../src/redis.module.ts"],"names":[],"mappings":";;;;AAAA,oCAGoB;AACpB,iDAA6C;AAC7C,+DAA0D;AAQnD,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IANvB,IAAA,YAAM,GAAE;IACR,IAAA,YAAM,EAAC;QACP,OAAO,EAAE,CAAC,uCAAiB,CAAC;QAC5B,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACtB,CAAC;GACW,WAAW,CAAG"}
1
+ {"version":3,"file":"redis.module.js","sourceRoot":"","sources":["../src/redis.module.ts"],"names":[],"mappings":";;;;AAAA,oCAGoB;AACpB,sDAAwD;AAExD,iDAA6C;AAQtC,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IANvB,IAAA,YAAM,GAAE;IACR,IAAA,YAAM,EAAC;QACP,OAAO,EAAE,CAAC,gCAAiB,CAAC;QAC5B,SAAS,EAAE,CAAC,0BAAW,CAAC;QACxB,OAAO,EAAE,CAAC,0BAAW,CAAC;KACtB,CAAC;GACW,WAAW,CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hg-ts/redis",
3
- "version": "0.1.97",
3
+ "version": "0.1.99",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -15,31 +15,27 @@
15
15
  "lint:ts:fix": "lint-ts --fix"
16
16
  },
17
17
  "devDependencies": {
18
- "@hg-ts-config/typescript": "0.1.97",
19
- "@hg-ts/config-loader": "0.1.97",
20
- "@hg-ts/exception": "0.1.97",
21
- "@hg-ts/ioc": "0.1.97",
22
- "@hg-ts/linter": "0.1.97",
23
- "@hg-ts/tests": "0.1.97",
24
- "@hg-ts/types": "0.1.97",
25
- "@hg-ts/validation": "0.1.97",
26
- "@types/node": "catalog:types",
27
- "eslint": "catalog:devtools",
28
- "reflect-metadata": "catalog:core",
29
- "rxjs": "catalog:",
30
- "tsc-watch": "catalog:devtools",
31
- "tslib": "catalog:core",
32
- "typescript": "catalog:devtools"
18
+ "@hg-ts-config/typescript": "0.1.99",
19
+ "@hg-ts/ioc": "0.1.99",
20
+ "@hg-ts/linter": "0.1.99",
21
+ "@hg-ts/redis-config": "0.1.99",
22
+ "@hg-ts/types": "0.1.99",
23
+ "@types/node": "22.10.6",
24
+ "eslint": "9.18.0",
25
+ "reflect-metadata": "0.2.2",
26
+ "rxjs": "7.8.1",
27
+ "tsc-watch": "6.3.0",
28
+ "tslib": "2.8.1",
29
+ "typescript": "5.7.3"
33
30
  },
34
31
  "peerDependencies": {
35
- "@hg-ts/config-loader": "0.1.97",
36
- "@hg-ts/ioc": "0.1.97",
37
- "@hg-ts/validation": "0.1.97",
32
+ "@hg-ts/ioc": "0.1.99",
33
+ "@hg-ts/redis-config": "0.1.99",
38
34
  "reflect-metadata": "*",
39
35
  "rxjs": "*",
40
36
  "tslib": "*"
41
37
  },
42
38
  "dependencies": {
43
- "ioredis": "catalog:"
39
+ "ioredis": "5.5.0"
44
40
  }
45
41
  }
package/dist/config.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import zod from '@hg-ts/validation';
2
- export declare const REDIS_CONFIG_SCHEMA: zod.ZodObject<{
3
- host: zod.ZodEffects<zod.ZodString, string, string>;
4
- database: zod.ZodNumber;
5
- port: zod.ZodNumber;
6
- }, "strip", zod.ZodTypeAny, {
7
- host: string;
8
- database: number;
9
- port: number;
10
- }, {
11
- host: string;
12
- database: number;
13
- port: number;
14
- }>;
15
- declare const RedisConfig_base: import("@hg-ts/validation").ZodDto<{
16
- host: string;
17
- database: number;
18
- port: number;
19
- }>;
20
- export declare class RedisConfig extends RedisConfig_base {
21
- }
22
- export {};
23
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,mBAAmB,CAAC;AAEpC,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;;;;;;AAEH,qBAAa,WAAY,SAAQ,gBAA6B;CAAG"}
package/dist/config.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedisConfig = exports.REDIS_CONFIG_SCHEMA = void 0;
4
- const tslib_1 = require("tslib");
5
- const validation_1 = tslib_1.__importDefault(require("@hg-ts/validation"));
6
- exports.REDIS_CONFIG_SCHEMA = validation_1.default.object({
7
- host: validation_1.default.string().enforceEnv('REDIS_HOST'),
8
- database: validation_1.default.number().int().min(0),
9
- port: validation_1.default.number().positive().int(),
10
- });
11
- class RedisConfig extends exports.REDIS_CONFIG_SCHEMA.toClass() {
12
- }
13
- exports.RedisConfig = RedisConfig;
14
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;AAAA,2EAAoC;AAEvB,QAAA,mBAAmB,GAAG,oBAAG,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,oBAAG,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC;IAC3C,QAAQ,EAAE,oBAAG,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,IAAI,EAAE,oBAAG,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE;CACnC,CAAC,CAAC;AAEH,MAAa,WAAY,SAAQ,2BAAmB,CAAC,OAAO,EAAE;CAAG;AAAjE,kCAAiE"}
@@ -1,3 +0,0 @@
1
- export declare class RedisConfigModule {
2
- }
3
- //# sourceMappingURL=redis.config.module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis.config.module.d.ts","sourceRoot":"","sources":["../src/redis.config.module.ts"],"names":[],"mappings":"AAQA,qBAYa,iBAAiB;CAAG"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RedisConfigModule = void 0;
4
- const tslib_1 = require("tslib");
5
- const config_loader_1 = require("@hg-ts/config-loader");
6
- const ioc_1 = require("@hg-ts/ioc");
7
- const config_1 = require("./config");
8
- let RedisConfigModule = class RedisConfigModule {
9
- };
10
- exports.RedisConfigModule = RedisConfigModule;
11
- exports.RedisConfigModule = RedisConfigModule = tslib_1.__decorate([
12
- (0, ioc_1.Module)({
13
- providers: [
14
- {
15
- provide: config_1.RedisConfig,
16
- async useFactory(configLoader) {
17
- return configLoader.load(config_1.REDIS_CONFIG_SCHEMA, 'redis');
18
- },
19
- inject: [config_loader_1.ConfigLoader],
20
- },
21
- ],
22
- exports: [config_1.RedisConfig],
23
- })
24
- ], RedisConfigModule);
25
- //# sourceMappingURL=redis.config.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redis.config.module.js","sourceRoot":"","sources":["../src/redis.config.module.ts"],"names":[],"mappings":";;;;AAAA,wDAAoD;AACpD,oCAAoC;AAEpC,qCAGkB;AAcX,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAAG,CAAA;AAApB,8CAAiB;4BAAjB,iBAAiB;IAZ7B,IAAA,YAAM,EAAC;QACP,SAAS,EAAE;YACV;gBACC,OAAO,EAAE,oBAAW;gBACpB,KAAK,CAAC,UAAU,CAAC,YAA0B;oBAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,4BAAmB,EAAE,OAAO,CAAC,CAAC;gBACxD,CAAC;gBACD,MAAM,EAAE,CAAC,4BAAY,CAAC;aACtB;SACD;QACD,OAAO,EAAE,CAAC,oBAAW,CAAC;KACtB,CAAC;GACW,iBAAiB,CAAG"}