@hile/ioredis 1.0.1 → 1.0.5

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
@@ -35,3 +35,30 @@ const redis = await loadService(ioredisService)
35
35
  | `REDIS_DB` | Redis 数据库编号,默认 `0` |
36
36
 
37
37
  行为:服务在首次加载时创建连接并等待 `connect` 事件;进程退出时通过 Hile 的 shutdown 调用 `client.disconnect()`。
38
+
39
+ ## 与 @hile/cli 一起使用
40
+
41
+ 若使用 `@hile/cli` 启动应用,可在项目根 `package.json` 中配置自动加载本包默认服务:
42
+
43
+ ```json
44
+ {
45
+ "hile": {
46
+ "auto_load_packages": ["@hile/ioredis"]
47
+ }
48
+ }
49
+ ```
50
+
51
+ 之后在业务中直接 `loadService(ioredisService)` 即可,Redis 客户端会在应用启动时连接、退出时断开。
52
+
53
+ ## 开发
54
+
55
+ ```bash
56
+ pnpm install
57
+ pnpm build # 编译
58
+ pnpm dev # 监听模式
59
+ pnpm test # 测试
60
+ ```
61
+
62
+ ## License
63
+
64
+ MIT
package/SKILL.md CHANGED
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: hile-ioredis
3
+ description: Code generation and usage rules for @hile/ioredis. Use when editing this package or when the user asks about @hile/ioredis, Redis as Hile service, or loadService(ioredisService) patterns.
4
+ ---
5
+
1
6
  # @hile/ioredis
2
7
 
3
8
  本文档是面向 AI 编码模型和人类开发者的 **代码生成规范**,阅读后应能正确地使用本库编写符合架构规则的代码。
package/package.json CHANGED
@@ -1,19 +1,17 @@
1
1
  {
2
2
  "name": "@hile/ioredis",
3
- "version": "1.0.1",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc -b",
9
- "dev": "tsc -b --watch",
10
- "test": "vitest run"
9
+ "dev": "tsc -b --watch"
11
10
  },
12
11
  "files": [
13
12
  "dist",
14
13
  "README.md",
15
- "SKILL.md",
16
- "skill.json"
14
+ "SKILL.md"
17
15
  ],
18
16
  "license": "MIT",
19
17
  "publishConfig": {
@@ -23,8 +21,8 @@
23
21
  "vitest": "^4.0.18"
24
22
  },
25
23
  "dependencies": {
26
- "@hile/core": "1.0.11",
24
+ "@hile/core": "1.0.14",
27
25
  "ioredis": "^5.10.0"
28
26
  },
29
- "gitHead": "618a63b619956a0c1db4d77dece84a7efe18a11e"
27
+ "gitHead": "04ec75d1a9246786c6ac6ae8b590890fb17e2b2b"
30
28
  }
package/skill.json DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "name": "@hile/ioredis",
3
- "version": "1.0.0",
4
- "description": "Redis client as Hile service (@hile/ioredis); code generation and contribution rules",
5
- "repository": "https://github.com/cevio/hile/tree/main/packages/ioredis",
6
- "skills": [
7
- {
8
- "id": "ioredis",
9
- "name": "@hile/ioredis 开发指南",
10
- "description": "提供 @hile/ioredis 模块的开发与代码生成规范",
11
- "path": "SKILL.md"
12
- }
13
- ],
14
- "authors": [],
15
- "license": "MIT"
16
- }