ai-yuca 1.5.5 → 1.6.2
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/.claude/skills/ai-yuca/SKILL.md +61 -0
- package/.cline/rules/ai-yuca.md +11 -0
- package/.cursor/rules/ai-yuca.mdc +21 -0
- package/.github/workflows/version-check.yml +30 -0
- package/.idea/ai-yuca.iml +12 -0
- package/.idea/claudeCodeTabState.xml +34 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.mcp.json +21 -0
- package/.windsurf/rules/ai-yuca.md +13 -0
- package/.windsurf/skills/ai-yuca/SKILL.md +18 -0
- package/AGENTS.md +43 -0
- package/CHANGELOG.md +31 -0
- package/CONTRIBUTING.md +51 -1
- package/README.md +258 -266
- package/dist/bin/cli.js +83 -22
- package/dist/package.json +5 -2
- package/dist/src/config.d.ts +9 -0
- package/dist/src/deploy.js +43 -2
- package/dist/src/font.js +105 -2
- package/dist/src/ico.d.ts +2 -0
- package/dist/src/ico.js +118 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +5 -1
- package/dist/src/proxyUploadImage.d.ts +2 -0
- package/dist/src/proxyUploadImage.js +141 -0
- package/dist/src/types/font.d.ts +1 -0
- package/dist/src/types/ico.d.ts +5 -0
- package/dist/src/types/ico.js +2 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/proxyUploadImage.d.ts +27 -0
- package/dist/src/types/proxyUploadImage.js +2 -0
- package/package.json +5 -2
- package/scripts/check-version-bump.js +140 -0
- package/vs.config.json +6 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-yuca
|
|
3
|
+
description: Use this skill whenever working in the AI-Yuca repository or helping with its CLI commands, docs, deployment flow, GCP upload/download, image tools, icon font generation, ico generation, i18n/Crowdin helpers, or project release/versioning rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI-Yuca Repository Skill
|
|
7
|
+
|
|
8
|
+
## When To Use
|
|
9
|
+
|
|
10
|
+
Use this skill for tasks involving:
|
|
11
|
+
|
|
12
|
+
- Adding, changing, or documenting `ai-yuca` CLI commands.
|
|
13
|
+
- Working with GCP upload/download, `upload-config`, or `deploy`.
|
|
14
|
+
- Updating resource tools such as `sharp`, `tinify`, `zip-anim`, `svg-fix`, `font`, or `ico`.
|
|
15
|
+
- Updating i18n/Crowdin helpers such as `transKey`, `useTrans`, `gkeys`, `cr-pull`, or `cr-push`.
|
|
16
|
+
- Preparing releases, README updates, CHANGELOG entries, or version bumps.
|
|
17
|
+
|
|
18
|
+
## Repository Map
|
|
19
|
+
|
|
20
|
+
- `bin/cli.ts`: CLI command registration and option parsing.
|
|
21
|
+
- `src/*.ts`: command implementations.
|
|
22
|
+
- `src/types/*.ts`: command option and result types.
|
|
23
|
+
- `src/config.ts`: `vs.config.json` schema helpers.
|
|
24
|
+
- `dist/`: compiled output from `npm run build`.
|
|
25
|
+
- `docs/`: longer user-facing documentation.
|
|
26
|
+
- `README.md`: primary public usage guide.
|
|
27
|
+
- `CHANGELOG.md`: release notes.
|
|
28
|
+
- `vs.config.json`: local/example project configuration.
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
|
|
32
|
+
1. Inspect the relevant command in `bin/cli.ts`.
|
|
33
|
+
2. Inspect the implementation in `src/` and types in `src/types/`.
|
|
34
|
+
3. Make the smallest change that matches existing project style.
|
|
35
|
+
4. Update user-facing docs for behavior or option changes.
|
|
36
|
+
5. For functional changes, bump patch/minor/major version and add a CHANGELOG entry.
|
|
37
|
+
6. Run `npm run build`.
|
|
38
|
+
7. Run targeted CLI smoke checks when practical, for example:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
node dist/bin/cli.js --help
|
|
42
|
+
node dist/bin/cli.js font --help
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Release And Version Rules
|
|
46
|
+
|
|
47
|
+
Functional code changes require:
|
|
48
|
+
|
|
49
|
+
- `package.json` version update.
|
|
50
|
+
- `package-lock.json` version update.
|
|
51
|
+
- `CHANGELOG.md` entry for the new version.
|
|
52
|
+
|
|
53
|
+
Documentation-only changes do not need a version bump.
|
|
54
|
+
|
|
55
|
+
## Cautions
|
|
56
|
+
|
|
57
|
+
- Do not edit `dist/` directly. Rebuild.
|
|
58
|
+
- Do not remove unrelated user changes from `.gitignore`, `README.md`, or local configuration files.
|
|
59
|
+
- Do not expose real API keys, GCP service account content, or webhook secrets.
|
|
60
|
+
- `vs.config.json` can include local project values; treat secrets conservatively.
|
|
61
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# AI-Yuca Rules
|
|
2
|
+
|
|
3
|
+
When working in this repository:
|
|
4
|
+
|
|
5
|
+
- Read `AGENTS.md` first.
|
|
6
|
+
- Prefer existing CLI and module patterns.
|
|
7
|
+
- Update docs and changelog for user-facing behavior.
|
|
8
|
+
- Bump package versions for functional changes.
|
|
9
|
+
- Run `npm run build` after TypeScript edits.
|
|
10
|
+
- Do not expose or commit credentials.
|
|
11
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AI-Yuca repository conventions for CLI, docs, config, and releases.
|
|
3
|
+
globs:
|
|
4
|
+
- "**/*"
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AI-Yuca Rules
|
|
9
|
+
|
|
10
|
+
AI-Yuca is a TypeScript Node.js CLI. Follow these conventions:
|
|
11
|
+
|
|
12
|
+
- Register CLI commands in `bin/cli.ts`.
|
|
13
|
+
- Put command implementations in `src/`.
|
|
14
|
+
- Put command option/result types in `src/types/`.
|
|
15
|
+
- Update `src/config.ts` for `vs.config.json` schema changes.
|
|
16
|
+
- Update `README.md` and `CHANGELOG.md` for user-facing behavior changes.
|
|
17
|
+
- Bump `package.json` and `package-lock.json` for functional changes.
|
|
18
|
+
- Run `npm run build` after TypeScript changes.
|
|
19
|
+
- Rebuild generated `dist/` output; do not edit `dist/` manually.
|
|
20
|
+
- Do not commit credentials, local caches, or local IDE/agent state.
|
|
21
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Version & Changelog Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- master
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
version-check:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
fetch-depth: 0
|
|
17
|
+
|
|
18
|
+
- name: Fetch base branch
|
|
19
|
+
run: git fetch origin "${{ github.base_ref }}" --depth=1
|
|
20
|
+
|
|
21
|
+
- name: Setup Node
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: 20
|
|
25
|
+
|
|
26
|
+
- name: Verify version bump & changelog
|
|
27
|
+
run: node scripts/check-version-bump.js
|
|
28
|
+
env:
|
|
29
|
+
BASE_REF: origin/${{ github.base_ref }}
|
|
30
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="WEB_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
|
7
|
+
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
|
8
|
+
</content>
|
|
9
|
+
<orderEntry type="inheritedJdk" />
|
|
10
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
11
|
+
</component>
|
|
12
|
+
</module>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ClaudeCodeTabState">
|
|
4
|
+
<option name="tabSessions">
|
|
5
|
+
<map>
|
|
6
|
+
<entry key="0">
|
|
7
|
+
<value>
|
|
8
|
+
<TabSessionState>
|
|
9
|
+
<option name="provider" value="codex" />
|
|
10
|
+
<option name="sessionId" value="019e252d-ca1c-7f33-850b-c6c31adb3871" />
|
|
11
|
+
<option name="cwd" value="$PROJECT_DIR$" />
|
|
12
|
+
<option name="model" value="gpt-5.5" />
|
|
13
|
+
<option name="permissionMode" value="default" />
|
|
14
|
+
<option name="reasoningEffort" value="high" />
|
|
15
|
+
</TabSessionState>
|
|
16
|
+
</value>
|
|
17
|
+
</entry>
|
|
18
|
+
<entry key="1">
|
|
19
|
+
<value>
|
|
20
|
+
<TabSessionState>
|
|
21
|
+
<option name="provider" value="codex" />
|
|
22
|
+
<option name="sessionId" value="019e2533-5257-7d82-bb0e-647740eabce8" />
|
|
23
|
+
<option name="cwd" value="$PROJECT_DIR$" />
|
|
24
|
+
<option name="model" value="gpt-5.5" />
|
|
25
|
+
<option name="permissionMode" value="default" />
|
|
26
|
+
<option name="reasoningEffort" value="high" />
|
|
27
|
+
</TabSessionState>
|
|
28
|
+
</value>
|
|
29
|
+
</entry>
|
|
30
|
+
</map>
|
|
31
|
+
</option>
|
|
32
|
+
<option name="tabCount" value="2" />
|
|
33
|
+
</component>
|
|
34
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/.mcp.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"filesystem-ai-yuca": {
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": [
|
|
6
|
+
"-y",
|
|
7
|
+
"@modelcontextprotocol/server-filesystem",
|
|
8
|
+
"/Users/yucang/Desktop/ai-project/ai-yuca"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"git-ai-yuca": {
|
|
12
|
+
"command": "uvx",
|
|
13
|
+
"args": [
|
|
14
|
+
"mcp-server-git",
|
|
15
|
+
"--repository",
|
|
16
|
+
"/Users/yucang/Desktop/ai-project/ai-yuca"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# AI-Yuca Workspace Rules
|
|
2
|
+
|
|
3
|
+
Use `AGENTS.md` as the primary repository instruction file.
|
|
4
|
+
|
|
5
|
+
Project conventions:
|
|
6
|
+
|
|
7
|
+
- TypeScript source lives in `src/`.
|
|
8
|
+
- CLI registration lives in `bin/cli.ts`.
|
|
9
|
+
- Compiled output lives in `dist/` and should be regenerated with `npm run build`.
|
|
10
|
+
- User-facing command changes need README and CHANGELOG updates.
|
|
11
|
+
- Functional changes need version bumps in `package.json` and `package-lock.json`.
|
|
12
|
+
- Avoid committing credentials, local cache files, and personal editor or agent settings.
|
|
13
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-yuca
|
|
3
|
+
description: Use when editing or explaining the AI-Yuca CLI repository, including commands, configuration, docs, deployment, GCP storage workflows, resource processing, icon generation, i18n/Crowdin helpers, and release/version rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# AI-Yuca Skill
|
|
7
|
+
|
|
8
|
+
AI-Yuca is a TypeScript Node.js CLI. Use the same workflow as other AI agents in this repo:
|
|
9
|
+
|
|
10
|
+
- Read `AGENTS.md` first for repository-wide instructions.
|
|
11
|
+
- Use `bin/cli.ts` for command registration.
|
|
12
|
+
- Use `src/` for implementations and `src/types/` for command types.
|
|
13
|
+
- Update `README.md` and `CHANGELOG.md` for user-facing changes.
|
|
14
|
+
- Bump `package.json` and `package-lock.json` for functional changes.
|
|
15
|
+
- Run `npm run build` after TypeScript edits.
|
|
16
|
+
|
|
17
|
+
Known commands include `upload`, `download`, `upload-config`, `deploy`, `sharp`, `tinify`, `zip-anim`, `svg-fix`, `font`, `ico`, `gkeys`, `transKey`, `useTrans`, `cr-pull`, `cr-push`, `analyze`, and `lg`.
|
|
18
|
+
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# AI-Yuca Agent Instructions
|
|
2
|
+
|
|
3
|
+
Use these instructions when working on this repository with AI coding tools.
|
|
4
|
+
|
|
5
|
+
## Project Context
|
|
6
|
+
|
|
7
|
+
AI-Yuca is a TypeScript Node.js CLI for frontend release workflows, static asset processing, Google Cloud Storage upload/download, deployment configuration, image compression, icon font generation, favicon generation, and i18n/Crowdin helpers.
|
|
8
|
+
|
|
9
|
+
The CLI entrypoint is `bin/cli.ts`; command implementations live in `src/`; compiled output lives in `dist/`.
|
|
10
|
+
|
|
11
|
+
## Common Commands
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install
|
|
15
|
+
npm run build
|
|
16
|
+
npm test
|
|
17
|
+
npm run lint
|
|
18
|
+
npm run dev -- --help
|
|
19
|
+
node dist/bin/cli.js --help
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Engineering Rules
|
|
23
|
+
|
|
24
|
+
- Prefer existing CLI patterns in `bin/cli.ts` and module patterns in `src/*.ts`.
|
|
25
|
+
- Keep command option types under `src/types/` and export them from `src/types/index.ts` when needed.
|
|
26
|
+
- Update `README.md` and `CHANGELOG.md` when adding or changing user-facing CLI behavior.
|
|
27
|
+
- Keep `README.md` focused on installation and user-facing command usage only. Do not put contributor rules, AI-agent rules, internal development notes, or operational cautions there.
|
|
28
|
+
- Put repository rules, development cautions, AI workflow instructions, and MCP/Skill guidance in `AGENTS.md`, `docs/ai-dev-tools.md`, and the tool-specific rule/skill files.
|
|
29
|
+
- When functionality is added, changed, removed, or behavior changes, update the relevant user-facing install/usage/config examples in `README.md` in the same change.
|
|
30
|
+
- When `package.json` version changes, check whether README usage or capability descriptions need to be updated.
|
|
31
|
+
- Bump `package.json` and `package-lock.json` for functional changes. The repository uses `scripts/check-version-bump.js` to enforce this.
|
|
32
|
+
- Run `npm run build` after TypeScript changes.
|
|
33
|
+
- If generated `dist/` files are committed in the current workflow, rebuild instead of editing `dist/` manually.
|
|
34
|
+
- Do not commit local credentials, service account files, cache files, `.idea/`, `.vscode/`, or local `.claude/settings.local.json`.
|
|
35
|
+
|
|
36
|
+
## Current Known Test Issues
|
|
37
|
+
|
|
38
|
+
At the time this instruction was written, `npm test` has known failures unrelated to recent documentation/config changes:
|
|
39
|
+
|
|
40
|
+
- `test/download.test.ts` and `test/upload.test.ts` attempt to stub `fs.existsSync`, which is non-configurable in the current runtime.
|
|
41
|
+
- `test/index.test.ts` expects word count `9`, while `analyzeContent` currently returns `10` for the fixture text.
|
|
42
|
+
|
|
43
|
+
Still run tests when relevant and report these failures clearly if they remain.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
## [Unreleased]
|
|
2
|
+
|
|
3
|
+
## [1.6.2] - 2026-05-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- 新增 `proxy-upload-image` 命令,通过项目代理接口 `/proxy-upload/gcp-image` 上传本地图片到 GCP,并返回可直接使用的图片链接。
|
|
7
|
+
|
|
8
|
+
## [1.6.1] - 2026-05-14
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `font` 命令支持通过 `vs.config.json` 的 `font.styleTypes` 控制最终生成的样式文件类型
|
|
12
|
+
- `font.styleTypes` 支持 `css`、`less`、`module.less`、`scss`、`sass`、`styl`、`stylus`,其中 `sass` 映射为 `.scss`
|
|
13
|
+
- 新增主流 AI 开发工具配置文档、项目级 Agent 指令、Skill/Rules 模板和 MCP 配置模板
|
|
14
|
+
|
|
15
|
+
## [1.6.0] - 2026-05-14
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- 新增 `ico` 命令:支持将单个 png、jpg、jpeg、svg、webp 图标转换为 `.ico` 文件
|
|
19
|
+
- `ico` 命令支持尺寸设置,可通过逗号传入多尺寸,例如 `16,32,48,64,128,256`
|
|
20
|
+
- `ico` 命令默认按原文件同目录同名输出,也支持自定义输出目录或完整输出路径
|
|
21
|
+
|
|
22
|
+
## [1.5.7] - 2026-05-14
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- 增加版本管理规则与 CI 校验,确保每次功能变更同步更新 package.json 版本号并记录更新日志
|
|
26
|
+
- deploy 发布成功后增加飞书机器人通知(包含版本号、项目名、更新时间、环境、分支等)
|
|
27
|
+
- 新增 font 命令:基于 svgtofont 生成字体库,支持通过 vs.config.json 配置输入/输出与前缀
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- tinify 批量压缩:如果 zip 目录已存在对应文件则跳过,避免重复压缩与配额消耗
|
|
31
|
+
- 测试脚本排除 font 生成产物(避免将生成的 .d.ts 误作为测试文件执行)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -39,6 +39,56 @@ npm run lint
|
|
|
39
39
|
4. 推送到分支 (`git push origin feature/amazing-feature`)
|
|
40
40
|
5. 打开一个Pull Request
|
|
41
41
|
|
|
42
|
+
## 版本管理(强制)
|
|
43
|
+
|
|
44
|
+
本项目采用语义化版本号(SemVer)三段式格式:`主版本号.次版本号.修订号`。
|
|
45
|
+
|
|
46
|
+
### 核心要求
|
|
47
|
+
|
|
48
|
+
每当项目完成任何功能变更(含 BUG 修复、功能新增、架构重构等所有代码改动),必须同步更新 `package.json` 内的 `version` 字段,并在 `CHANGELOG.md` 中记录本次变更。
|
|
49
|
+
|
|
50
|
+
### 版本号递增规则
|
|
51
|
+
|
|
52
|
+
- **BUG 修复 / 小改动**:仅将修订号(第三段)加 1
|
|
53
|
+
- 示例:`1.2.3` → `1.2.4`
|
|
54
|
+
- **新增功能 / 新增命令(向下兼容)**:将次版本号(第二段)加 1
|
|
55
|
+
- 示例:`1.2.3` → `1.3.0`
|
|
56
|
+
- **重大重构 / 不兼容变更**:将主版本号(第一段)加 1
|
|
57
|
+
- 示例:`1.2.3` → `2.0.0`
|
|
58
|
+
|
|
59
|
+
### 版本号重置规则
|
|
60
|
+
|
|
61
|
+
任意一段版本号递增后,其后续所有低位版本号必须统一重置为 `0`:
|
|
62
|
+
|
|
63
|
+
- `1.2.3`(次版本 +1)→ `1.3.0`
|
|
64
|
+
- `1.2.3`(主版本 +1)→ `2.0.0`
|
|
65
|
+
|
|
66
|
+
### 更新日志(CHANGELOG)
|
|
67
|
+
|
|
68
|
+
每次版本更新必须同步在 `CHANGELOG.md` 中新增对应版本条目,并明确写清:
|
|
69
|
+
|
|
70
|
+
- 版本号
|
|
71
|
+
- 变更类型(例如 Added / Changed / Fixed / Removed)
|
|
72
|
+
- 变更内容要点
|
|
73
|
+
|
|
74
|
+
### 本地自检
|
|
75
|
+
|
|
76
|
+
提交前建议在本地执行:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm run build
|
|
80
|
+
npm test
|
|
81
|
+
npm run check:version -- --base-ref origin/main
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### CI 强制校验
|
|
85
|
+
|
|
86
|
+
CI 会在 Pull Request 合入主干前执行版本校验:
|
|
87
|
+
|
|
88
|
+
- 若检测到有功能性代码变更但未提升 `package.json` 版本号,将直接失败
|
|
89
|
+
- 若版本号提升但未同步更新 `CHANGELOG.md`,将直接失败
|
|
90
|
+
- 若版本号递增不符合三段式 + 重置规则,也将直接失败
|
|
91
|
+
|
|
42
92
|
## 功能建议
|
|
43
93
|
|
|
44
94
|
如果您有新功能的想法,请先开一个issue讨论您想要添加的内容,以确保它符合项目的方向。
|
|
@@ -55,4 +105,4 @@ npm run lint
|
|
|
55
105
|
|
|
56
106
|
## 许可证
|
|
57
107
|
|
|
58
|
-
通过贡献代码,您同意您的贡献将在MIT许可证下发布。
|
|
108
|
+
通过贡献代码,您同意您的贡献将在MIT许可证下发布。
|