@hagicode/hagi18n 0.1.0-dev.20.1.79815c8 → 0.1.0-dev.22.1.40e8a1c
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 +2 -21
- package/README_cn.md +4 -19
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
[](https://github.com/HagiCode-org/hagi18n/actions/workflows/ci.yml)
|
|
8
8
|
|
|
9
|
-
`@hagicode/hagi18n` is a reusable YAML locale maintenance toolkit for HagiCode projects. It
|
|
9
|
+
`@hagicode/hagi18n` is a reusable YAML locale maintenance toolkit for HagiCode projects. It runs as an independent package and CLI.
|
|
10
10
|
|
|
11
11
|
It supports:
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ Use it when an AI agent needs to:
|
|
|
23
23
|
|
|
24
24
|
- run or explain `hagi18n audit`, `doctor`, `sync`, or `prune`
|
|
25
25
|
- add or review a `hagi18n.yaml` file
|
|
26
|
-
- inspect or modify the source
|
|
26
|
+
- inspect or modify the package source
|
|
27
27
|
- validate locale maintenance workflows against a consumer repository
|
|
28
28
|
|
|
29
29
|
The skill includes focused references for command usage, configuration, and package development.
|
|
@@ -201,25 +201,6 @@ Main exports include:
|
|
|
201
201
|
- text formatters such as `formatAuditSummary`, `formatDoctorSummary`, and `formatMutationSummary`
|
|
202
202
|
- package metadata helpers such as `getPackageMetadata` and `createRuntimeInfo`
|
|
203
203
|
|
|
204
|
-
## Web Reference Mapping
|
|
205
|
-
|
|
206
|
-
This package preserves the maintenance model from the Web repository:
|
|
207
|
-
|
|
208
|
-
- `repos/web/buildTools/lib/i18nLocaleToolkit.mjs` -> `src/locale-toolkit.ts`
|
|
209
|
-
- `repos/web/buildTools/i18n-locale-cli.mjs` -> `src/cli.ts`
|
|
210
|
-
|
|
211
|
-
The Web project remains the behavior reference, but it does not need runtime changes to use this package later.
|
|
212
|
-
|
|
213
|
-
## Development
|
|
214
|
-
|
|
215
|
-
Run commands from `repos/hagi18n/`:
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
npm install
|
|
219
|
-
npm test
|
|
220
|
-
npm run build
|
|
221
|
-
```
|
|
222
|
-
|
|
223
204
|
## License
|
|
224
205
|
|
|
225
206
|
MIT. See [LICENSE](./LICENSE).
|
package/README_cn.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
[](https://github.com/HagiCode-org/hagi18n/actions/workflows/ci.yml)
|
|
8
8
|
|
|
9
|
-
`@hagicode/hagi18n` 是一个可复用的 YAML
|
|
9
|
+
`@hagicode/hagi18n` 是一个可复用的 YAML 语言包维护工具,可作为独立 npm 包和 CLI 使用。
|
|
10
10
|
|
|
11
11
|
它提供:
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
- 执行或解释 `hagi18n audit`、`doctor`、`sync`、`prune`
|
|
25
25
|
- 新增或审查 `hagi18n.yaml`
|
|
26
|
-
-
|
|
26
|
+
- 检查或修改该包的源码
|
|
27
27
|
- 在消费方仓库中验证语言包维护流程
|
|
28
28
|
|
|
29
29
|
skill 内还附带了命令使用、配置结构和包开发流程的拆分参考文档。
|
|
@@ -195,21 +195,6 @@ console.log(formatAuditSummary(audit));
|
|
|
195
195
|
- 文本格式化函数:`formatAuditSummary`、`formatDoctorSummary`、`formatMutationSummary`
|
|
196
196
|
- 元数据函数:`getPackageMetadata`、`createRuntimeInfo`
|
|
197
197
|
|
|
198
|
-
##
|
|
198
|
+
## 许可证
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
- `repos/web/buildTools/lib/i18nLocaleToolkit.mjs` -> `src/locale-toolkit.ts`
|
|
203
|
-
- `repos/web/buildTools/i18n-locale-cli.mjs` -> `src/cli.ts`
|
|
204
|
-
|
|
205
|
-
也就是说,这次抽象保留了 Web 的参考行为,但不会要求 `repos/web` 立即修改运行时代码。
|
|
206
|
-
|
|
207
|
-
## 开发
|
|
208
|
-
|
|
209
|
-
在 `repos/hagi18n/` 目录执行:
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
npm install
|
|
213
|
-
npm test
|
|
214
|
-
npm run build
|
|
215
|
-
```
|
|
200
|
+
MIT。参见 [LICENSE](./LICENSE)。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hagicode/hagi18n",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.22.1.40e8a1c",
|
|
4
4
|
"description": "Internationalization tooling CLI for HagiCode: audit, sync and manage locale resources",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/HagiCode-org/hagi18n#readme",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"README_cn.md"
|
|
30
30
|
],
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "tsc -p tsconfig.json",
|
|
32
|
+
"build": "node --max-old-space-size=4096 ./node_modules/typescript/bin/tsc -p tsconfig.json",
|
|
33
33
|
"clean": "rm -rf dist .vitest-temp .tmp coverage",
|
|
34
34
|
"dev": "tsx src/cli.ts",
|
|
35
35
|
"format": "prettier --write .",
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"tsx": "^4.20.6",
|
|
79
79
|
"typescript": "^6.0.3",
|
|
80
80
|
"typescript-eslint": "^8.46.2",
|
|
81
|
-
"vitest": "^
|
|
81
|
+
"vitest": "^5.0.5"
|
|
82
82
|
}
|
|
83
83
|
}
|