zapmyco 0.20.3 → 0.20.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 +66 -81
- package/esm/deno.js +8 -4
- package/package.json +1 -1
- package/types/deno.d.ts +11 -9
package/README.md
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# zapmyco
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/public/logo.svg" alt="zapmyco logo" width="300" />
|
|
5
|
+
</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://github.com/shenjingnan/zapmyco/actions/workflows/ci.yml"><img src="https://github.com/shenjingnan/zapmyco/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
9
|
+
<a href="https://codecov.io/gh/shenjingnan/zapmyco"><img src="https://codecov.io/gh/shenjingnan/zapmyco/branch/main/graph/badge.svg" alt="Codecov"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/zapmyco"><img src="https://img.shields.io/npm/v/zapmyco.svg?color=brightgreen" alt="NPM"></a>
|
|
11
|
+
<a href="https://jsr.io/@zapmyco/zapmyco"><img src="https://jsr.io/badges/@zapmyco/zapmyco" alt="JSR"></a>
|
|
12
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License: MIT"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
基于 Deno 的 AI 驱动命令行工具。
|
|
8
16
|
|
|
9
17
|
## 安装方式
|
|
10
18
|
|
|
@@ -24,7 +32,7 @@ iwr https://raw.githubusercontent.com/shenjingnan/zapmyco/main/install.ps1 -useb
|
|
|
24
32
|
|
|
25
33
|
```bash
|
|
26
34
|
# 安装指定版本
|
|
27
|
-
ZAPMYCO_VERSION=
|
|
35
|
+
ZAPMYCO_VERSION=vX.X.X curl -fsSL https://raw.githubusercontent.com/shenjingnan/zapmyco/main/install.sh | sh
|
|
28
36
|
|
|
29
37
|
# 安装到自定义目录
|
|
30
38
|
ZAPMYCO_INSTALL=~/tools curl -fsSL https://raw.githubusercontent.com/shenjingnan/zapmyco/main/install.sh | sh
|
|
@@ -54,13 +62,12 @@ deno run --allow-env --allow-net jsr:@zapmyco/zapmyco --help
|
|
|
54
62
|
|
|
55
63
|
## 特性
|
|
56
64
|
|
|
57
|
-
- **现代技术栈**: TypeScript +
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- **代码质量**: Biome (Lint + Format) + cspell (拼写检查)
|
|
61
|
-
- **Git 工作流**: Husky + lint-staged + release-it
|
|
65
|
+
- **现代技术栈**: TypeScript + Deno 2.x 运行时
|
|
66
|
+
- **测试框架**: Deno Test - 内置测试运行器
|
|
67
|
+
- **代码质量**: deno lint + deno fmt + cspell (拼写检查)
|
|
62
68
|
- **AI 集成**: 内置 CLAUDE.md 和 .claude/ 目录配置
|
|
63
69
|
- **CI/CD**: GitHub Actions 自动化测试和发布
|
|
70
|
+
- **双平台发布**: 自动发布到 JSR 和 npm (通过 dnt)
|
|
64
71
|
|
|
65
72
|
## 快速开始
|
|
66
73
|
|
|
@@ -74,31 +81,27 @@ deno run --allow-env --allow-net jsr:@zapmyco/zapmyco --help
|
|
|
74
81
|
# 克隆项目
|
|
75
82
|
git clone https://github.com/your-username/your-project.git
|
|
76
83
|
cd your-project
|
|
77
|
-
|
|
78
|
-
# 安装依赖
|
|
79
|
-
pnpm install
|
|
80
84
|
```
|
|
81
85
|
|
|
86
|
+
> 本项目基于 Deno 运行时,无需手动安装依赖。Deno 会自动处理模块缓存。
|
|
87
|
+
|
|
82
88
|
### 开发
|
|
83
89
|
|
|
84
90
|
```bash
|
|
85
91
|
# 开发模式
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
# 构建
|
|
89
|
-
pnpm run build
|
|
92
|
+
deno task dev
|
|
90
93
|
|
|
91
94
|
# 测试
|
|
92
|
-
|
|
95
|
+
deno task test
|
|
93
96
|
|
|
94
97
|
# 代码检查
|
|
95
|
-
|
|
98
|
+
deno task lint
|
|
96
99
|
|
|
97
100
|
# 类型检查
|
|
98
|
-
|
|
101
|
+
deno task check
|
|
99
102
|
|
|
100
103
|
# 完整检查
|
|
101
|
-
|
|
104
|
+
deno task check:all
|
|
102
105
|
```
|
|
103
106
|
|
|
104
107
|
## 项目结构
|
|
@@ -106,41 +109,42 @@ pnpm run check
|
|
|
106
109
|
```
|
|
107
110
|
ai-typescript-starter/
|
|
108
111
|
├── .claude/ # Claude Code 配置
|
|
109
|
-
│ ├──
|
|
110
|
-
│ └──
|
|
112
|
+
│ ├── skills/ # 技能定义
|
|
113
|
+
│ └── CLAUDE.md # 项目上下文
|
|
111
114
|
├── .github/ # GitHub 配置
|
|
112
|
-
│
|
|
113
|
-
│ └── ISSUE_TEMPLATE/ # Issue 模板
|
|
115
|
+
│ └── workflows/ # CI/CD 工作流
|
|
114
116
|
├── docs/ # 文档
|
|
115
117
|
├── examples/ # 示例代码
|
|
116
118
|
├── src/ # 源代码
|
|
117
|
-
│
|
|
119
|
+
│ ├── index.ts # 主入口 & CLI
|
|
120
|
+
│ ├── index_test.ts # 测试文件(与源码同目录)
|
|
121
|
+
│ ├── ai-agent.ts # AI Agent 对话模块
|
|
122
|
+
│ └── text-line-stream.ts # 文本行流工具
|
|
123
|
+
├── tools/ # 构建/发布脚本
|
|
124
|
+
│ ├── build-npm.ts # dnt npm 构建
|
|
125
|
+
│ └── release.ts # 自动化发布
|
|
118
126
|
├── AGENTS.md # AI Agent 配置
|
|
127
|
+
├── deno.json # Deno 配置
|
|
119
128
|
└── dist/ # 构建产物
|
|
120
129
|
```
|
|
121
130
|
|
|
122
131
|
## 可用脚本
|
|
123
132
|
|
|
124
|
-
| 命令
|
|
125
|
-
|
|
|
126
|
-
| `
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `
|
|
131
|
-
| `
|
|
132
|
-
| `
|
|
133
|
-
| `
|
|
134
|
-
| `
|
|
135
|
-
| `
|
|
136
|
-
| `
|
|
137
|
-
| `
|
|
138
|
-
| `
|
|
139
|
-
| `pnpm run release:beta` | 发布 beta 预发布版本 |
|
|
140
|
-
| `pnpm run release:dry` | 发布干运行 (不实际发布) |
|
|
141
|
-
| `pnpm run release:patch` | 直接发布 patch 版本 |
|
|
142
|
-
| `pnpm run release:minor` | 直接发布 minor 版本 |
|
|
143
|
-
| `pnpm run release:major` | 直接发布 major 版本 |
|
|
133
|
+
| 命令 | 说明 |
|
|
134
|
+
| ------------------------- | ------------------------------------ |
|
|
135
|
+
| `deno task dev` | 开发模式 (watch) |
|
|
136
|
+
| `deno task test` | 运行测试 |
|
|
137
|
+
| `deno task test:coverage` | 测试覆盖率报告 |
|
|
138
|
+
| `deno task lint` | 代码检查 |
|
|
139
|
+
| `deno task fmt` | 格式化代码 |
|
|
140
|
+
| `deno task fmt:check` | 格式检查 |
|
|
141
|
+
| `deno task check` | 类型检查 |
|
|
142
|
+
| `deno task check:all` | 完整检查 (fmt + lint + check + test) |
|
|
143
|
+
| `deno task cli` | 运行 CLI |
|
|
144
|
+
| `deno task ai` | AI 对话模式 |
|
|
145
|
+
| `deno task release` | 创建发布 |
|
|
146
|
+
| `deno task release:dry` | 发布干运行 (不实际发布) |
|
|
147
|
+
| `deno task build:npm` | dnt 构建 npm 包 |
|
|
144
148
|
|
|
145
149
|
## AI 辅助开发
|
|
146
150
|
|
|
@@ -152,46 +156,27 @@ ai-typescript-starter/
|
|
|
152
156
|
|
|
153
157
|
### .claude/ 目录
|
|
154
158
|
|
|
155
|
-
- `
|
|
156
|
-
|
|
157
|
-
- `skills/` - 项目技能定义 (`resolve-git-conflicts`, `fix-audit`, `project-context`,
|
|
158
|
-
`update-readme`)
|
|
159
|
-
|
|
160
|
-
## 代码风格
|
|
161
|
-
|
|
162
|
-
- 2 空格缩进
|
|
163
|
-
- 单引号
|
|
164
|
-
- 必须有分号
|
|
165
|
-
- 行宽 100 字符
|
|
166
|
-
- 禁止 `any` 类型 (warn)
|
|
167
|
-
|
|
168
|
-
## 测试规范
|
|
159
|
+
- `skills/` - 项目技能定义 (`update-readme`, `resolve-git-conflicts` 等)
|
|
160
|
+
- `CLAUDE.md` - 项目上下文和开发规范
|
|
169
161
|
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
- 使用 Vitest 全局 API
|
|
162
|
+
Slash 命令通过内置 skills 提供,支持 `/build`, `/test`, `/lint`, `/typecheck`, `/spellcheck`,
|
|
163
|
+
`/release`, `/commit-push-pr` 等。
|
|
173
164
|
|
|
174
|
-
##
|
|
165
|
+
## 贡献指南
|
|
175
166
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
pnpm run release
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
发布过程会自动:
|
|
183
|
-
|
|
184
|
-
1. 更新版本号
|
|
185
|
-
2. 更新 CHANGELOG.md
|
|
186
|
-
3. 创建 Git tag
|
|
187
|
-
4. 推送到远程仓库
|
|
188
|
-
5. 创建 GitHub Release
|
|
167
|
+
请参阅 [贡献指南](https://zapmyco-docs.vercel.app/community/contributing)
|
|
168
|
+
了解代码风格、测试规范、提交规范和发布流程等详细内容。
|
|
189
169
|
|
|
190
170
|
## 文档
|
|
191
171
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
- [
|
|
172
|
+
请访问 [文档站点](https://zapmyco-docs.vercel.app) 查看完整的在线文档,包括:
|
|
173
|
+
|
|
174
|
+
- [快速开始](https://zapmyco-docs.vercel.app/quickstart)
|
|
175
|
+
- [CLI 使用指南](https://zapmyco-docs.vercel.app/guide/cli-usage)
|
|
176
|
+
- [AI 代理功能](https://zapmyco-docs.vercel.app/guide/ai-agent)
|
|
177
|
+
- [架构说明](https://zapmyco-docs.vercel.app/advanced/architecture)
|
|
178
|
+
- [发布流程](https://zapmyco-docs.vercel.app/advanced/release-flow)
|
|
179
|
+
- [贡献指南](https://zapmyco-docs.vercel.app/community/contributing)
|
|
195
180
|
|
|
196
181
|
## 许可证
|
|
197
182
|
|
package/esm/deno.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
"exclude": [
|
|
3
|
+
"dist/",
|
|
4
|
+
"docs/"
|
|
5
|
+
],
|
|
2
6
|
"name": "@zapmyco/zapmyco",
|
|
3
|
-
"version": "0.20.
|
|
4
|
-
"description": "
|
|
7
|
+
"version": "0.20.5",
|
|
8
|
+
"description": "基于 Deno 的 AI 驱动命令行工具",
|
|
5
9
|
"exports": "./src/index.ts",
|
|
6
10
|
"tasks": {
|
|
7
11
|
"cli": "deno run --allow-env --allow-net src/index.ts",
|
|
@@ -13,8 +17,8 @@ export default {
|
|
|
13
17
|
"lint": "deno lint",
|
|
14
18
|
"fmt": "deno fmt",
|
|
15
19
|
"fmt:check": "deno fmt --check",
|
|
16
|
-
"check": "deno check
|
|
17
|
-
"check:all": "deno fmt --check && deno lint && deno check
|
|
20
|
+
"check": "deno check",
|
|
21
|
+
"check:all": "deno fmt --check && deno lint && deno check && deno test --allow-env",
|
|
18
22
|
"release": "deno run -A tools/release.ts",
|
|
19
23
|
"release:dry": "deno run -A tools/release.ts --dry-run",
|
|
20
24
|
"build:npm": "deno run -A tools/build-npm.ts"
|
package/package.json
CHANGED
package/types/deno.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare namespace _default {
|
|
2
|
+
let exclude: string[];
|
|
2
3
|
let name: string;
|
|
3
4
|
let version: string;
|
|
4
5
|
let description: string;
|
|
@@ -21,22 +22,23 @@ declare namespace _default {
|
|
|
21
22
|
};
|
|
22
23
|
let nodeModulesDir: string;
|
|
23
24
|
namespace fmt {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
let
|
|
28
|
-
let
|
|
25
|
+
let exclude_1: string[];
|
|
26
|
+
export { exclude_1 as exclude };
|
|
27
|
+
export let lineWidth: number;
|
|
28
|
+
export let indentWidth: number;
|
|
29
|
+
export let semiColons: boolean;
|
|
30
|
+
export let singleQuote: boolean;
|
|
29
31
|
}
|
|
30
32
|
namespace lint {
|
|
31
33
|
namespace rules {
|
|
32
34
|
export let tags: string[];
|
|
33
|
-
let
|
|
34
|
-
export {
|
|
35
|
+
let exclude_2: string[];
|
|
36
|
+
export { exclude_2 as exclude };
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
namespace publish {
|
|
38
|
-
let
|
|
39
|
-
export {
|
|
40
|
+
let exclude_3: string[];
|
|
41
|
+
export { exclude_3 as exclude };
|
|
40
42
|
}
|
|
41
43
|
namespace compilerOptions {
|
|
42
44
|
let strict: boolean;
|