@bejibun/redis 0.1.36 → 0.1.37

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/CHANGELOG.md CHANGED
@@ -3,23 +3,37 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  ---
5
5
 
6
- ## [v0.1.36](https://github.com/crenata/bejibun-redis/compare/v0.1.35...v0.1.36) - 2025-12-11
6
+ ## [v0.1.37](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.36...v0.1.37) - 2026-02-14
7
+
8
+ ### 🩹 Fixes
9
+
10
+ ### 📖 Changes
11
+ - Added `.keys(pattern: string)` to get list of key.
12
+
13
+ ### ❤️Contributors
14
+ - Havea Crenata ([@crenata](https://github.com/crenata))
15
+
16
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
17
+
18
+ ---
19
+
20
+ ## [v0.1.36](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.35...v0.1.36) - 2025-12-11
7
21
 
8
22
  ### 🩹 Fixes
9
23
 
10
24
  ### 📖 Changes
11
25
  - Set random connection name for `.setClient()` and disconnect after used then clear the connection lists.
12
26
 
13
- #### Upgrade [@bejibun/utils](https://github.com/crenata/bejibun-utils) to [v0.1.27](https://github.com/crenata/bejibun-utils/releases/tag/v0.1.24)
27
+ #### Upgrade [@bejibun/utils](https://github.com/Bejibun-Framework/bejibun-utils) to [v0.1.27](https://github.com/Bejibun-Framework/bejibun-utils/releases/tag/v0.1.24)
14
28
 
15
29
  ### ❤️Contributors
16
30
  - Havea Crenata ([@crenata](https://github.com/crenata))
17
31
 
18
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
32
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
19
33
 
20
34
  ---
21
35
 
22
- ## [v0.1.35](https://github.com/crenata/bejibun-redis/compare/v0.1.34...v0.1.35) - 2025-12-07
36
+ ## [v0.1.35](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.34...v0.1.35) - 2025-12-07
23
37
 
24
38
  ### 🩹 Fixes
25
39
 
@@ -27,21 +41,21 @@ All notable changes to this project will be documented in this file.
27
41
  What's New :
28
42
  - Adding `.setClient(cfg: RedisConfig)` to override connection.
29
43
 
30
- By default, [@bejibun/redis](https://github.com/crenata/bejibun-redis) use connection from `config/redis.ts`.
44
+ By default, [@bejibun/redis](https://github.com/Bejibun-Framework/bejibun-redis) use connection from `config/redis.ts`.
31
45
 
32
46
  Now, you can override it by using `setClient()`.
33
47
 
34
- #### Upgrade [@bejibun/utils](https://github.com/crenata/bejibun-utils) to [v0.1.24](https://github.com/crenata/bejibun-utils/releases/tag/v0.1.24)
48
+ #### Upgrade [@bejibun/utils](https://github.com/Bejibun-Framework/bejibun-utils) to [v0.1.24](https://github.com/Bejibun-Framework/bejibun-utils/releases/tag/v0.1.24)
35
49
  - Fix empty validation for class
36
50
 
37
51
  ### ❤️Contributors
38
52
  - Havea Crenata ([@crenata](https://github.com/crenata))
39
53
 
40
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
54
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
41
55
 
42
56
  ---
43
57
 
44
- ## [v0.1.34](https://github.com/crenata/bejibun-redis/compare/v0.1.33...v0.1.34) - 2025-11-23
58
+ ## [v0.1.34](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.33...v0.1.34) - 2025-11-23
45
59
 
46
60
  ### 🩹 Fixes
47
61
  - Fix redis ttl
@@ -51,11 +65,11 @@ Now, you can override it by using `setClient()`.
51
65
  ### ❤️Contributors
52
66
  - Havea Crenata ([@crenata](https://github.com/crenata))
53
67
 
54
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
68
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
55
69
 
56
70
  ---
57
71
 
58
- ## [v0.1.33](https://github.com/crenata/bejibun-redis/compare/v0.1.30...v0.1.33) - 2025-11-09
72
+ ## [v0.1.33](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.30...v0.1.33) - 2025-11-09
59
73
 
60
74
  ### 🩹 Fixes
61
75
  - Fix redis configuration
@@ -65,11 +79,11 @@ Now, you can override it by using `setClient()`.
65
79
  ### ❤️Contributors
66
80
  - Havea Crenata ([@crenata](https://github.com/crenata))
67
81
 
68
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
82
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
69
83
 
70
84
  ---
71
85
 
72
- ## [v0.1.30](https://github.com/crenata/bejibun-redis/compare/v0.1.29...v0.1.30) - 2025-10-22
86
+ ## [v0.1.30](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.29...v0.1.30) - 2025-10-22
73
87
 
74
88
  ### 🩹 Fixes
75
89
  - Fix `configure.ts` configuration file
@@ -80,11 +94,11 @@ Now, you can override it by using `setClient()`.
80
94
  - Havea Crenata ([@crenata](https://github.com/crenata))
81
95
  - Ghulje ([@ghulje](https://github.com/ghulje))
82
96
 
83
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
97
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
84
98
 
85
99
  ---
86
100
 
87
- ## [v0.1.29](https://github.com/crenata/bejibun-redis/compare/v0.1.27...v0.1.29) - 2025-10-22
101
+ ## [v0.1.29](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.27...v0.1.29) - 2025-10-22
88
102
 
89
103
  ### 🩹 Fixes
90
104
 
@@ -96,11 +110,11 @@ What's New :
96
110
  - Havea Crenata ([@crenata](https://github.com/crenata))
97
111
  - Ghulje ([@ghulje](https://github.com/ghulje))
98
112
 
99
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
113
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
100
114
 
101
115
  ---
102
116
 
103
- ## [v0.1.27](https://github.com/crenata/bejibun-redis/compare/v0.1.26...v0.1.27) - 2025-10-20
117
+ ## [v0.1.27](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.26...v0.1.27) - 2025-10-20
104
118
 
105
119
  ### 🩹 Fixes
106
120
 
@@ -113,11 +127,11 @@ Chore :
113
127
  - Havea Crenata ([@crenata](https://github.com/crenata))
114
128
  - Ghulje ([@ghulje](https://github.com/ghulje))
115
129
 
116
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
130
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
117
131
 
118
132
  ---
119
133
 
120
- ## [v0.1.26](https://github.com/crenata/bejibun-redis/compare/v0.1.24...v0.1.26) - 2025-10-18
134
+ ## [v0.1.26](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.24...v0.1.26) - 2025-10-18
121
135
 
122
136
  ### 🩹 Fixes
123
137
 
@@ -129,11 +143,11 @@ What's New :
129
143
  - Havea Crenata ([@crenata](https://github.com/crenata))
130
144
  - Ghulje ([@ghulje](https://github.com/ghulje))
131
145
 
132
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
146
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
133
147
 
134
148
  ---
135
149
 
136
- ## [v0.1.24](https://github.com/crenata/bejibun-redis/compare/v0.1.23...v0.1.24) - 2025-10-16
150
+ ## [v0.1.24](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.23...v0.1.24) - 2025-10-16
137
151
 
138
152
  ### 🩹 Fixes
139
153
 
@@ -145,11 +159,11 @@ What's New :
145
159
  - Havea Crenata ([@crenata](https://github.com/crenata))
146
160
  - Ghulje ([@ghulje](https://github.com/ghulje))
147
161
 
148
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
162
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
149
163
 
150
164
  ---
151
165
 
152
- ## [v0.1.23](https://github.com/crenata/bejibun-redis/compare/v0.1.0...v0.1.23) - 2025-10-15
166
+ ## [v0.1.23](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.0...v0.1.23) - 2025-10-15
153
167
 
154
168
  ### 🩹 Fixes
155
169
 
@@ -160,11 +174,11 @@ Update build indexing
160
174
  - Havea Crenata ([@crenata](https://github.com/crenata))
161
175
  - Ghulje ([@ghulje](https://github.com/ghulje))
162
176
 
163
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
177
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
164
178
 
165
179
  ---
166
180
 
167
- ## [v0.1.0](https://github.com/crenata/bejibun-redis/compare/v0.1.0...v0.1.0) - 2025-10-12
181
+ ## [v0.1.0](https://github.com/Bejibun-Framework/bejibun-redis/compare/v0.1.0...v0.1.0) - 2025-10-12
168
182
 
169
183
  ### 🩹 Fixes
170
184
 
@@ -190,4 +204,4 @@ Available Redis :
190
204
  - Havea Crenata ([@crenata](https://github.com/crenata))
191
205
  - Ghulje ([@ghulje](https://github.com/ghulje))
192
206
 
193
- **Full Changelog**: https://github.com/crenata/bejibun-redis/blob/master/CHANGELOG.md
207
+ **Full Changelog**: https://github.com/Bejibun-Framework/bejibun-redis/blob/master/CHANGELOG.md
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Havea Crenata
3
+ Copyright (c) 2025 Bejibun Framework
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  <div align="center">
2
2
 
3
- <img src="https://github.com/crenata/bejibun/blob/master/public/images/bejibun.png?raw=true" width="150" alt="Bejibun" />
3
+ <img src="https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/bejibun.png?raw=true" width="150" alt="Bejibun" />
4
4
 
5
- ![GitHub top language](https://img.shields.io/github/languages/top/crenata/bejibun-redis)
6
- ![GitHub all releases](https://img.shields.io/github/downloads/crenata/bejibun-redis/total)
7
- ![GitHub issues](https://img.shields.io/github/issues/crenata/bejibun-redis)
8
- ![GitHub](https://img.shields.io/github/license/crenata/bejibun-redis)
9
- ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/crenata/bejibun-redis?display_name=tag&include_prereleases)
5
+ ![GitHub top language](https://img.shields.io/github/languages/top/Bejibun-Framework/bejibun-redis)
6
+ ![GitHub all releases](https://img.shields.io/github/downloads/Bejibun-Framework/bejibun-redis/total)
7
+ ![GitHub issues](https://img.shields.io/github/issues/Bejibun-Framework/bejibun-redis)
8
+ ![GitHub](https://img.shields.io/github/license/Bejibun-Framework/bejibun-redis)
9
+ ![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/Bejibun-Framework/bejibun-redis?display_name=tag&include_prereleases)
10
10
 
11
11
  </div>
12
12
 
@@ -69,6 +69,9 @@ import Redis from "@bejibun/redis";
69
69
  export default class TestController extends BaseController {
70
70
  public async redis(request: Bun.BunRequest): Promise<Response> {
71
71
  await Redis.set("redis", {hello: "world"});
72
+
73
+ const keys = await Redis.keys("pattern");
74
+
72
75
  const redis = await Redis.get("redis");
73
76
 
74
77
  await Redis.connection("local").set("connection", "This is using custom connection.");
@@ -114,7 +117,7 @@ If you find this project helpful and want to support it, you can donate via cryp
114
117
 
115
118
  | EVM | Solana |
116
119
  | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
117
- | <img src="https://github.com/crenata/bejibun/blob/master/public/images/EVM.png?raw=true" width="150" /> | <img src="https://github.com/crenata/bejibun/blob/master/public/images/SOL.png?raw=true" width="150" /> |
120
+ | <img src="https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/EVM.png?raw=true" width="150" /> | <img src="https://github.com/Bejibun-Framework/bejibun/blob/master/public/images/SOL.png?raw=true" width="150" /> |
118
121
  | 0xdABe8750061410D35cE52EB2a418c8cB004788B3 | GAnoyvy9p3QFyxikWDh9hA3fmSk2uiPLNWyQ579cckMn |
119
122
 
120
123
  Or you can buy this `$BJBN (Bejibun)` tokens [here](https://pump.fun/coin/CQhbNnCGKfDaKXt8uE61i5DrBYJV7NPsCDD9vQgypump), beware of bots.
@@ -6,6 +6,7 @@ export default class RedisBuilder {
6
6
  static connection(name: string): Record<string, Function>;
7
7
  static connect(name?: string): Promise<Bun.RedisClient>;
8
8
  static disconnect(name?: string): Promise<void>;
9
+ static keys(pattern: string, connection?: string, disconnectAfter?: boolean): Promise<Array<string>>;
9
10
  static get(key: Bun.RedisClient.KeyLike, connection?: string, disconnectAfter?: boolean): Promise<any>;
10
11
  static set(key: Bun.RedisClient.KeyLike, value: any, ttl?: number, connection?: string, disconnectAfter?: boolean): Promise<number | "OK">;
11
12
  static del(key: Bun.RedisClient.KeyLike, connection?: string, disconnectAfter?: boolean): Promise<number>;
@@ -55,6 +55,18 @@ export default class RedisBuilder {
55
55
  this.clients = {};
56
56
  }
57
57
  }
58
+ static async keys(pattern, connection, disconnectAfter) {
59
+ try {
60
+ const response = await this.getClient(connection).keys(pattern);
61
+ if (disconnectAfter)
62
+ await this.disconnect(connection);
63
+ return response;
64
+ }
65
+ catch (error) {
66
+ Logger.setContext("Redis").error("Failed to get value.").trace(error);
67
+ return [];
68
+ }
69
+ }
58
70
  static async get(key, connection, disconnectAfter) {
59
71
  try {
60
72
  const response = await this.getClient(connection).get(key);
@@ -4,6 +4,7 @@ export default class Redis {
4
4
  static connection(name: string): Record<string, Function>;
5
5
  static connect(name?: string): Promise<Bun.RedisClient>;
6
6
  static disconnect(name?: string): Promise<void>;
7
+ static keys(pattern: string, connection?: string): Promise<Array<string>>;
7
8
  static get(key: Bun.RedisClient.KeyLike, connection?: string): Promise<any>;
8
9
  static set(key: Bun.RedisClient.KeyLike, value: any, ttl?: number, connection?: string): Promise<number | "OK">;
9
10
  static del(key: Bun.RedisClient.KeyLike, connection?: string): Promise<number>;
package/facades/Redis.js CHANGED
@@ -12,6 +12,9 @@ export default class Redis {
12
12
  static async disconnect(name) {
13
13
  return RedisBuilder.disconnect(name);
14
14
  }
15
+ static async keys(pattern, connection) {
16
+ return RedisBuilder.keys(pattern, connection);
17
+ }
15
18
  static async get(key, connection) {
16
19
  return RedisBuilder.get(key, connection);
17
20
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@bejibun/redis",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "author": "Havea Crenata <havea.crenata@gmail.com>",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/crenata/bejibun-redis.git"
7
+ "url": "git+https://github.com/Bejibun-Framework/bejibun-redis.git"
8
8
  },
9
9
  "main": "index.js",
10
10
  "module": "index.js",
@@ -13,10 +13,10 @@
13
13
  "tsc-alias": "^1.8.16"
14
14
  },
15
15
  "bugs": {
16
- "url": "https://github.com/crenata/bejibun-redis/issues"
16
+ "url": "https://github.com/Bejibun-Framework/bejibun-redis/issues"
17
17
  },
18
18
  "description": "Redis for Bejibun Framework",
19
- "homepage": "https://github.com/crenata/bejibun-redis#readme",
19
+ "homepage": "https://github.com/Bejibun-Framework/bejibun-redis#readme",
20
20
  "keywords": [
21
21
  "bun",
22
22
  "bun framework",
@@ -36,8 +36,8 @@
36
36
  "type": "module",
37
37
  "types": "index.d.ts",
38
38
  "dependencies": {
39
- "@bejibun/app": "^0.1.22",
39
+ "@bejibun/app": "^0.1.23",
40
40
  "@bejibun/logger": "^0.1.22",
41
- "@bejibun/utils": "^0.1.27"
41
+ "@bejibun/utils": "^0.1.28"
42
42
  }
43
43
  }