@hg-ts/redis 0.1.54 → 0.1.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hg-ts/redis",
3
- "version": "0.1.54",
3
+ "version": "0.1.56",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -16,13 +16,13 @@
16
16
  "test:dev": "yarn build:dev --onSuccess \"yarn test\""
17
17
  },
18
18
  "devDependencies": {
19
- "@hg-ts-config/typescript": "0.1.54",
20
- "@hg-ts/config-loader": "0.1.54",
21
- "@hg-ts/exception": "0.1.54",
22
- "@hg-ts/ioc": "0.1.54",
23
- "@hg-ts/linter": "0.1.54",
24
- "@hg-ts/types": "0.1.54",
25
- "@hg-ts/validation": "0.1.54",
19
+ "@hg-ts-config/typescript": "0.1.56",
20
+ "@hg-ts/config-loader": "0.1.56",
21
+ "@hg-ts/exception": "0.1.56",
22
+ "@hg-ts/ioc": "0.1.56",
23
+ "@hg-ts/linter": "0.1.56",
24
+ "@hg-ts/types": "0.1.56",
25
+ "@hg-ts/validation": "0.1.56",
26
26
  "@types/node": "22.10.6",
27
27
  "eslint": "9.18.0",
28
28
  "reflect-metadata": "0.2.2",
@@ -32,9 +32,9 @@
32
32
  "typescript": "5.7.3"
33
33
  },
34
34
  "peerDependencies": {
35
- "@hg-ts/config-loader": "0.1.54",
36
- "@hg-ts/ioc": "0.1.54",
37
- "@hg-ts/validation": "0.1.54",
35
+ "@hg-ts/config-loader": "0.1.56",
36
+ "@hg-ts/ioc": "0.1.56",
37
+ "@hg-ts/validation": "0.1.56",
38
38
  "reflect-metadata": "*",
39
39
  "rxjs": "*",
40
40
  "tslib": "*"
package/.eslintcache DELETED
@@ -1 +0,0 @@
1
- [{"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/config.js":"1","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/index.js":"2","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/redis.client.js":"3","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/redis.module.js":"4","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/eslint.config.mjs":"5","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/config.ts":"6","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/index.ts":"7","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/redis.client.ts":"8","/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/redis.module.ts":"9"},{"size":630,"mtime":1746294774111,"results":"10","hashOfConfig":"11"},{"size":260,"mtime":1746294774118,"results":"12","hashOfConfig":"11"},{"size":327,"mtime":1746294774114,"results":"13","hashOfConfig":"11"},{"size":1300,"mtime":1746294774117,"results":"14","hashOfConfig":"11"},{"size":59,"mtime":1736896000119,"results":"15","hashOfConfig":"11"},{"size":279,"mtime":1740570715643,"results":"16","hashOfConfig":"17"},{"size":64,"mtime":1736876770676,"results":"18","hashOfConfig":"17"},{"size":72,"mtime":1736876770676,"results":"19","hashOfConfig":"17"},{"size":698,"mtime":1746294395716,"results":"20","hashOfConfig":"17"},{"filePath":"21","messages":"22","suppressedMessages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1gtnk1i",{"filePath":"24","messages":"25","suppressedMessages":"26","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"27","messages":"28","suppressedMessages":"29","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","suppressedMessages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","suppressedMessages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","suppressedMessages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"i5df87",{"filePath":"39","messages":"40","suppressedMessages":"41","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","suppressedMessages":"44","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"45","messages":"46","suppressedMessages":"47","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/config.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/index.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/redis.client.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/dist/redis.module.js",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/eslint.config.mjs",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/config.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/index.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/redis.client.ts",[],[],"/Users/atsapko/WebstormProjects/personnal/framework/packages/redis/src/redis.module.ts",[],[]]
@@ -1,2 +0,0 @@
1
-
2
- 
@@ -1,2 +0,0 @@
1
-
2
- 
@@ -1,9 +0,0 @@
1
-
2
- ℹ tests 0
3
- ℹ suites 0
4
- ℹ pass 0
5
- ℹ fail 0
6
- ℹ cancelled 0
7
- ℹ skipped 0
8
- ℹ todo 0
9
- ℹ duration_ms 7.374375
package/eslint.config.mjs DELETED
@@ -1,3 +0,0 @@
1
- import config from '@hg-ts/linter';
2
-
3
- export default config;
package/src/config.ts DELETED
@@ -1,9 +0,0 @@
1
- import zod from '@hg-ts/validation';
2
-
3
- export const REDIS_CONFIG_SCHEMA = zod.object({
4
- host: zod.string().enforceEnv('REDIS_HOST'),
5
- database: zod.number().int().min(0),
6
- port: zod.number().positive().int(),
7
- });
8
-
9
- export class RedisConfig extends REDIS_CONFIG_SCHEMA.toClass() {}
package/src/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './redis.module';
2
- export * from './redis.client';
@@ -1,3 +0,0 @@
1
- import Redis from 'ioredis';
2
-
3
- export class RedisClient extends Redis {}
@@ -1,33 +0,0 @@
1
- import { ConfigLoader } from '@hg-ts/config-loader';
2
- import {
3
- Global,
4
- Module,
5
- } from '@hg-ts/ioc';
6
-
7
- import { REDIS_CONFIG_SCHEMA } from './config';
8
- import { RedisClient } from './redis.client';
9
-
10
- @Global()
11
- @Module({
12
- providers: [
13
- {
14
- provide: RedisClient,
15
- async useFactory(configLoader: ConfigLoader): Promise<RedisClient> {
16
- const config = await configLoader.load(REDIS_CONFIG_SCHEMA, 'redis');
17
- const redis = new RedisClient({
18
- host: config.host,
19
- port: config.port,
20
- db: config.database,
21
- enableReadyCheck: true,
22
- });
23
-
24
- await redis.connect();
25
-
26
- return redis;
27
- },
28
- inject: [ConfigLoader],
29
- },
30
- ],
31
- exports: [RedisClient],
32
- })
33
- export class RedisModule {}