@bejibun/redis 0.1.21 → 0.1.23

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 CHANGED
@@ -24,6 +24,33 @@ bun add @bejibun/redis
24
24
  bun ace install @bejibun/redis
25
25
  ```
26
26
 
27
+ ### Configuration
28
+ Add `redis.ts` inside config directory on your project
29
+
30
+ ```bash
31
+ config/redis.ts
32
+ ```
33
+
34
+ ```ts
35
+ const config: Record<string, any> = {
36
+ default: "local",
37
+
38
+ connections: {
39
+ local: {
40
+ host: "127.0.0.1",
41
+ port: 6379,
42
+ password: "",
43
+ database: 0,
44
+ maxRetries: 10
45
+ }
46
+ }
47
+ };
48
+
49
+ export default config;
50
+ ```
51
+
52
+ You can pass the value with environment variables.
53
+
27
54
  ### How to Use
28
55
  How to use tha package.
29
56
 
@@ -1,4 +1,4 @@
1
- import type { RedisPipeline, RedisSubscribe } from "@/types/redis";
1
+ import type { RedisPipeline, RedisSubscribe } from "../types/redis";
2
2
  import { RedisClient } from "bun";
3
3
  export default class RedisBuilder {
4
4
  private static clients;
package/bun.lock CHANGED
@@ -4,7 +4,7 @@
4
4
  "": {
5
5
  "name": "@bejibun/redis",
6
6
  "dependencies": {
7
- "@bejibun/core": "^0.1.33",
7
+ "@bejibun/core": "^0.1.35",
8
8
  },
9
9
  "devDependencies": {
10
10
  "@types/bun": "latest",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  },
15
15
  "packages": {
16
- "@bejibun/core": ["@bejibun/core@0.1.33", "", { "dependencies": { "@vinejs/vine": "^3.0.1", "chalk": "^5.6.2", "knex": "^3.1.0", "luxon": "^3.7.2", "objection": "^3.1.5", "pg": "^8.16.3" }, "peerDependencies": { "typescript": "^5" } }, "sha512-UKw+CuhbskDDv3hmixUBrCqwe4UkEubYb0UxfVR5DLdlq6+K5VrLXRxUKoA8jolFre3qvRMNM13RgQ3vLcYPgw=="],
16
+ "@bejibun/core": ["@bejibun/core@0.1.35", "", { "dependencies": { "@vinejs/vine": "^3.0.1", "chalk": "^5.6.2", "knex": "^3.1.0", "luxon": "^3.7.2", "objection": "^3.1.5", "pg": "^8.16.3" } }, "sha512-prXFOHPynRkkBjDQssRRIBiPlBkhl8XSyATMQS0XlGQoTfB2tcuJs1882HMkiEpuGEnHKJgnUHK+Qri37lprHw=="],
17
17
 
18
18
  "@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],
19
19
 
@@ -203,8 +203,6 @@
203
203
 
204
204
  "tsc-alias": ["tsc-alias@1.8.16", "", { "dependencies": { "chokidar": "^3.5.3", "commander": "^9.0.0", "get-tsconfig": "^4.10.0", "globby": "^11.0.4", "mylas": "^2.1.9", "normalize-path": "^3.0.0", "plimit-lit": "^1.2.6" }, "bin": { "tsc-alias": "dist/bin/index.js" } }, "sha512-QjCyu55NFyRSBAl6+MTFwplpFcnm2Pq01rR/uxfqJoLMm6X3O14KEGtaSDZpJYaE1bJBGDjD0eSuiIWPe2T58g=="],
205
205
 
206
- "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
207
-
208
206
  "undici-types": ["undici-types@7.14.0", "", {}, "sha512-QQiYxHuyZ9gQUIrmPo3IA+hUl4KYk8uSA7cHrcKd/l3p1OTpZcM0Tbp9x7FAtXdAYhlasd60ncPpgu6ihG6TOA=="],
209
207
 
210
208
  "validator": ["validator@13.15.15", "", {}, "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A=="],
@@ -0,0 +1 @@
1
+ export * from "../exceptions/RedisException";
@@ -0,0 +1 @@
1
+ export * from "../exceptions/RedisException";
@@ -1,4 +1,4 @@
1
- import type { RedisPipeline, RedisSubscribe } from "@/types/redis";
1
+ import type { RedisPipeline, RedisSubscribe } from "../types/redis";
2
2
  import { RedisClient } from "bun";
3
3
  export default class Redis {
4
4
  static connection(name: string): Record<string, Function>;
@@ -0,0 +1 @@
1
+ export * from "../facades/Redis";
@@ -0,0 +1 @@
1
+ export * from "../facades/Redis";
package/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default } from "./facades/Redis";
2
- export * from "@/types/index";
2
+ export * from "./exceptions/index";
3
+ export * from "./facades/index";
package/index.js CHANGED
@@ -1,2 +1,3 @@
1
1
  export { default } from "./facades/Redis";
2
- export * from "@/types/index";
2
+ export * from "./exceptions/index";
3
+ export * from "./facades/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bejibun/redis",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "author": "Havea Crenata <havea.crenata@gmail.com>",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,9 +8,6 @@
8
8
  },
9
9
  "main": "index.js",
10
10
  "module": "index.js",
11
- "dependencies": {
12
- "@bejibun/core": "^0.1.33"
13
- },
14
11
  "devDependencies": {
15
12
  "@types/bun": "latest",
16
13
  "tsc-alias": "^1.8.16"
@@ -33,9 +30,12 @@
33
30
  "copy": "cp -rf src/types dist",
34
31
  "rsync": "rsync -a dist/ ./",
35
32
  "clean": "rm -rf dist",
36
- "build": "bunx tsc -p tsconfig.json && bun run alias && bun run copy && bun run rsync && bun run clean",
33
+ "build": "bunx tsc -p tsconfig.json && bun run copy && bun run alias && bun run rsync && bun run clean",
37
34
  "deploy": "bun run build && npm publish --access public"
38
35
  },
39
36
  "type": "module",
40
- "types": "index.d.ts"
37
+ "types": "index.d.ts",
38
+ "dependencies": {
39
+ "@bejibun/core": "^0.1.35"
40
+ }
41
41
  }
@@ -0,0 +1 @@
1
+ export * from "@/exceptions/RedisException";
@@ -0,0 +1 @@
1
+ export * from "@/facades/Redis";
package/src/index.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export {default} from "@/facades/Redis";
2
2
 
3
- export * from "@/types/index";
3
+ export * from "@/exceptions/index";
4
+
5
+ export * from "@/facades/index";
@@ -1,3 +1 @@
1
- export * from "@/facades/Redis";
2
-
3
1
  export * from "@/types/redis";
package/types/index.d.ts CHANGED
@@ -1,3 +1 @@
1
- export * from "@/facades/Redis";
2
-
3
- export * from "@/types/redis";
1
+ export * from "../types/redis";