@agile-team/wl-skills-kit 2.1.1 → 2.1.3

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +6 -5
  3. package/bin/wl-skills.js +35 -1
  4. package/files/.github/guides/README.md +13 -13
  5. package/files/.github/guides/architecture.md +555 -555
  6. package/files/.github/guides/usage.md +166 -166
  7. package/files/.github/reports/README.md +65 -65
  8. package/files/.github/reports/SYS_DICT_INFO.md +19 -19
  9. package/files/.github/reports/SYS_MENU_INFO.md +247 -247
  10. package/files/.github/reports/SYS_PERMISSION_INFO.md +20 -20
  11. package/files/.github/reports//347/273/204/344/273/266/346/217/220/345/217/226/345/273/272/350/256/256.md +33 -33
  12. package/files/.github/reports//350/247/204/350/214/203/345/256/241/346/237/245/346/212/245/345/221/212.md +44 -44
  13. package/files/.github/skills/_compat/README.md +108 -108
  14. package/files/.github/skills/_compat/headers/agents.txt +8 -8
  15. package/files/.github/skills/_compat/headers/claude-code.txt +7 -7
  16. package/files/.github/skills/_compat/headers/cline.txt +7 -7
  17. package/files/.github/skills/_compat/headers/cursor-mdc.txt +16 -16
  18. package/files/.github/skills/_compat/headers/cursor-rules.txt +7 -7
  19. package/files/.github/skills/_compat/headers/github-copilot.txt +1 -1
  20. package/files/.github/skills/_compat/headers/kiro.txt +10 -10
  21. package/files/.github/skills/_compat/headers/trae.txt +11 -11
  22. package/files/.github/skills/_compat/headers/windsurf.txt +7 -7
  23. package/files/.github/skills/_registry.md +81 -81
  24. package/files/.github/skills/core/api-contract/SKILL.md +344 -344
  25. package/files/.github/skills/core/api-contract/USAGE.md +110 -110
  26. package/files/.github/skills/core/convention-audit/SKILL.md +189 -189
  27. package/files/.github/skills/core/convention-audit/USAGE.md +99 -99
  28. package/files/.github/skills/core/page-codegen/SKILL.md +973 -973
  29. package/files/.github/skills/core/page-codegen/USAGE.md +102 -102
  30. package/files/.github/skills/core/page-codegen/templates/_index.md +46 -46
  31. package/files/.github/skills/core/page-codegen/templates/domains/_CONTRIBUTING.md +107 -107
  32. package/files/.github/skills/core/page-codegen/templates/domains/produce/TPL-OPERATION-STATION.md +442 -442
  33. package/files/.github/skills/core/page-codegen/templates/domains/sale/README.md +26 -26
  34. package/files/.github/skills/core/page-codegen/templates/universal/TPL-CHANGE-HISTORY.md +276 -276
  35. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DETAIL-TABS.md +1145 -1145
  36. package/files/.github/skills/core/page-codegen/templates/universal/TPL-DRIVEN.md +124 -124
  37. package/files/.github/skills/core/page-codegen/templates/universal/TPL-FORM-ROUTE.md +436 -436
  38. package/files/.github/skills/core/page-codegen/templates/universal/TPL-LIST.md +191 -191
  39. package/files/.github/skills/core/page-codegen/templates/universal/TPL-MASTER-DETAIL.md +148 -148
  40. package/files/.github/skills/core/page-codegen/templates/universal/TPL-RECORD-FORM.md +371 -371
  41. package/files/.github/skills/core/page-codegen/templates/universal/TPL-TREE-LIST.md +186 -186
  42. package/files/.github/skills/core/prototype-scan/SKILL.md +498 -498
  43. package/files/.github/skills/core/prototype-scan/USAGE.md +95 -95
  44. package/files/.github/skills/core/template-extract/SKILL.md +139 -139
  45. package/files/.github/skills/core/template-extract/USAGE.md +93 -93
  46. package/files/.github/skills/domain/README.md +51 -51
  47. package/files/.github/skills/ops/code-fix/SKILL.draft.md +108 -108
  48. package/files/.github/skills/sync/dict-sync/SKILL.draft.md +100 -100
  49. package/files/.github/skills/sync/menu-sync/SKILL.md +258 -258
  50. package/files/.github/skills/sync/menu-sync/USAGE.md +104 -104
  51. package/files/.github/skills/sync/menu-sync/env/env.local.json +6 -6
  52. package/files/.github/skills/sync/menu-sync/env/guide.md +83 -83
  53. package/files/.github/skills/sync/permission-sync/SKILL.draft.md +91 -91
  54. package/files/.github/standards/01-toolchain.md +57 -57
  55. package/files/.github/standards/02-code-structure.md +111 -111
  56. package/files/.github/standards/03-comments.md +53 -53
  57. package/files/.github/standards/04-coding-basics.md +33 -33
  58. package/files/.github/standards/05-logging.md +38 -38
  59. package/files/.github/standards/06-security.md +44 -44
  60. package/files/.github/standards/07-config.md +52 -52
  61. package/files/.github/standards/08-git.md +60 -60
  62. package/files/.github/standards/09-typescript.md +71 -71
  63. package/files/.github/standards/10-pinia.md +57 -57
  64. package/files/.github/standards/11-form-validation.md +81 -81
  65. package/files/.github/standards/12-base-table.md +116 -116
  66. package/files/.github/standards/13-platform-components.md +123 -123
  67. package/files/.github/standards/index.md +89 -89
  68. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/data.ts +196 -196
  69. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.scss +150 -150
  70. package/files/demo/produce/aiflow/mmwr-customer-apply-change-history/index.vue +79 -79
  71. package/files/docs/jh-date-range.md +257 -257
  72. package/files/docs/jh-date.md +222 -222
  73. package/files/docs/jh-dept-picker.md +190 -190
  74. package/files/docs/jh-drag-row.md +590 -590
  75. package/files/docs/jh-file-upload.md +216 -216
  76. package/files/docs/jh-picker.md +218 -218
  77. package/files/docs/jh-select.md +148 -148
  78. package/files/docs/jh-text.md +248 -248
  79. package/files/docs/jh-user-picker.md +197 -197
  80. package/package.json +3 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.3] - 2026-04-27
4
+
5
+ ### 🔒 安全修复 + 依赖清理
6
+
7
+ #### env.local.json 双重保护
8
+ - `init` / `update` 遇到已存在的 `env.local.json` 不再覆盖(用户填写的 token / gatewayPath 等敏感数据不丢失)
9
+ - `init` / `update` 完成后自动向业务项目 `.gitignore` 追加 `env.local.json` 保护条目(若尚未包含),防止 token 意外提交到远端仓库
10
+ - `--help` 保护路径说明新增 `env.local.json` 条目
11
+
12
+ #### 依赖清理
13
+ - 移除 `devDependencies` 中的 `xlsx`(CLI 本身不使用;`xlsx` 是业务项目的依赖,已在 SKILL.md 中说明安装方式)
14
+
15
+ ---
16
+
17
+ ## [2.1.2] - 2026-04-26
18
+
19
+ ### 🔧 消除 npm 发布警告
20
+
21
+ - `package.json` bin 路径去掉 `./` 前缀(`"./bin/wl-skills.js"` → `"bin/wl-skills.js"`),符合 npm 规范化要求,消除发布时的 `warn: script name was invalid` 提示
22
+
23
+ ---
24
+
3
25
  ## [2.1.1] - 2026-04-26
4
26
 
5
27
  ### 🔧 修复与迁移增强
package/README.md CHANGED
@@ -225,11 +225,12 @@ npx @agile-team/wl-skills-kit update
225
225
 
226
226
  ## 受保护路径
227
227
 
228
- | 命令 | 保护路径 | 说明 |
229
- | ------------------------ | --------------------------------- | -------------------------- |
230
- | `init` / `update` | `.github/reports/*.md` | 已存在则跳过,不覆盖累积 |
231
- | `clean`(默认) | `src/components/` + `src/types/` | 业务代码必需,永不删除 |
232
- | `clean --keep-reports` | + `.github/reports/` | 保留菜单/字典/权限基线 |
228
+ | 命令 | 保护路径 | 说明 |
229
+ | ------------------------ | --------------------------------------------------- | -------------------------- |
230
+ | `init` / `update` | `.github/reports/*.md` | 已存则跳过,不覆盖累积 |
231
+ | `init` / `update` | `.github/skills/sync/menu-sync/env/env.local.json` | 已存则跳过,保护用户配置 |
232
+ | `clean`(默认) | `src/components/` + `src/types/` | 业务代码必需,永不删除 |
233
+ | `clean --keep-reports` | + `.github/reports/` | 保留菜单/字典/权限基线 |
233
234
 
234
235
  ---
235
236
 
package/bin/wl-skills.js CHANGED
@@ -51,7 +51,8 @@ if (showHelp) {
51
51
  npx @agile-team/wl-skills-kit clean --dry-run 预览将要清理哪些文件
52
52
 
53
53
  保护路径(init / update 不覆盖已存在的):
54
- .github/reports/ AI 生成报告(团队累积数据,存在则跳过)
54
+ .github/reports/ AI 生成报告(团队累积数据,存在则跳过)
55
+ .github/skills/sync/menu-sync/env/env.local.json 用户本地配置(token 等,已存在则跳过)
55
56
 
56
57
  清理保护路径(clean 不删除):
57
58
  src/components/ 通用组件(被业务页面 import,构建必需)
@@ -162,6 +163,14 @@ function isReportFile(relPath) {
162
163
  return relPath.startsWith(".github/reports/") && relPath.endsWith(".md");
163
164
  }
164
165
 
166
+ // 用户本地配置:init/update 遇到已存在不覆盖(含 token / gatewayPath 等敏感信息)
167
+ const USER_LOCAL_CONFIGS = [
168
+ ".github/skills/sync/menu-sync/env/env.local.json",
169
+ ];
170
+ function isUserLocalConfig(relPath) {
171
+ return USER_LOCAL_CONFIGS.includes(relPath);
172
+ }
173
+
165
174
  // ─── 旧版遗留路径(v1.x/v2.0 → v2.1 迁移清理)───────────────────────────
166
175
  // update 时自动检测并移除,避免旧结构与新结构并存产生歧义。
167
176
  const LEGACY_PATHS = [
@@ -283,6 +292,13 @@ function runInstall(incremental) {
283
292
  continue;
284
293
  }
285
294
 
295
+ // 用户本地配置:已存在则跳过(含 token / gatewayPath 等敏感信息,不覆盖)
296
+ if (isUserLocalConfig(relPath) && fs.existsSync(dest)) {
297
+ preserved++;
298
+ if (dryRun) console.log(" 保留 " + relPath + " (用户本地配置,不覆盖)");
299
+ continue;
300
+ }
301
+
286
302
  // update 模式: 跳过内容相同的文件
287
303
  if (incremental && fs.existsSync(dest)) {
288
304
  if (srcHash === fileMd5(dest)) {
@@ -300,6 +316,24 @@ function runInstall(incremental) {
300
316
  }
301
317
  }
302
318
 
319
+ // ── Step 1.5: .gitignore 安全修补(防止 env.local.json 意外入 git)────────
320
+
321
+ const ENV_LOCAL_GITIGNORE_ENTRY =
322
+ ".github/skills/sync/menu-sync/env/env.local.json";
323
+ const gitignorePath = path.join(TARGET_DIR, ".gitignore");
324
+ if (!dryRun && fs.existsSync(gitignorePath)) {
325
+ const giContent = fs.readFileSync(gitignorePath, "utf8");
326
+ if (!giContent.includes(ENV_LOCAL_GITIGNORE_ENTRY)) {
327
+ fs.appendFileSync(
328
+ gitignorePath,
329
+ "\n# wl-skills-kit: 本地敏感配置(token / gatewayPath,不入 git)\n" +
330
+ ENV_LOCAL_GITIGNORE_ENTRY +
331
+ "\n",
332
+ );
333
+ console.log(" ✔ .gitignore 已追加 env.local.json 保护条目");
334
+ }
335
+ }
336
+
303
337
  // ── Step 2: 动态生成编辑器配置文件 ────────────────────────────────
304
338
 
305
339
  const INSTRUCTIONS_SRC = path.join(
@@ -1,13 +1,13 @@
1
- # Guides 指南目录
2
-
3
- 本目录下文档由 `wl-skills-kit` 安装到业务项目的 `.github/guides/`,作为团队成员人工维护的指南类文档。
4
-
5
- | 文件 | 内容 |
6
- | ----------------- | ---------------------------------------------- |
7
- | `usage.md` | 全套 Skill 使用说明(团队成员上手必读) |
8
- | `architecture.md` | 整体架构设计与决策记录(含菜单同步等设计内容) |
9
-
10
- > 与 `kit-internal/`(仅 wl-skills-kit 仓库可见的维护文档)严格区分:
11
- >
12
- > - `guides/` → 业务项目使用方阅读
13
- > - `kit-internal/` → wl-skills-kit 仓库维护者阅读,**不安装到业务项目**
1
+ # Guides 指南目录
2
+
3
+ 本目录下文档由 `wl-skills-kit` 安装到业务项目的 `.github/guides/`,作为团队成员人工维护的指南类文档。
4
+
5
+ | 文件 | 内容 |
6
+ | ----------------- | ---------------------------------------------- |
7
+ | `usage.md` | 全套 Skill 使用说明(团队成员上手必读) |
8
+ | `architecture.md` | 整体架构设计与决策记录(含菜单同步等设计内容) |
9
+
10
+ > 与 `kit-internal/`(仅 wl-skills-kit 仓库可见的维护文档)严格区分:
11
+ >
12
+ > - `guides/` → 业务项目使用方阅读
13
+ > - `kit-internal/` → wl-skills-kit 仓库维护者阅读,**不安装到业务项目**