feat: auto update plugin list from tego-standard#193
Conversation
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughAdds a generator script and npm task to produce standardized English/Chinese plugin lists and a public manifest; updates English and Chinese plugin-list docs to a four-column layout and modifies Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes
Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces an automated plugin list update feature that synchronizes plugin documentation from the tego-standard repository. The script reads plugin metadata from package.json files and generates both Markdown documentation (in English and Chinese) and a JSON configuration file.
Key Changes
- Added a Node.js automation script to read plugin metadata from the tego-standard repository
- Generated/updated plugin list documentation in both English and Chinese formats
- Updated the index.tego.json configuration file with the latest plugin and module information
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/update-plugin-list.js | New automation script that reads plugin metadata from tego-standard packages and generates documentation files |
| package.json | Added new npm script plugin:update to run the automation |
| docs/zh/plugins/plugin-list.md | Updated Chinese plugin list with 68 plugins (added 3 new plugins) |
| docs/en/plugins/plugin-list.md | Updated English plugin list with 68 plugins (added 3 new plugins) |
| docs/public/index.tego.json | Updated plugin configuration with reordered entries and new plugins added |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (3)
scripts/update-plugin-list.js (3)
61-96: Translate Chinese comments to English.As flagged in previous reviews, Chinese comments should be translated to English for consistency with the codebase. This includes:
- Line 61: "首先尝试默认路径" → "First try default path"
- Line 78: "检查用户输入的路径" → "Check user input path"
- Line 82: "如果用户输入的已经是 packages 目录" → "If user input is already the packages directory"
272-272: Remove extra leading space in table header.The line starts with an extra space before the pipe character, which should be removed for consistency with line 273.
Apply this diff:
- markdown += ' | No. | Package Name | Plugin Name | Description |\n'; + markdown += '| No. | Package Name | Plugin Name | Description |\n';
376-416: Solid orchestration and error handling.The main function follows a clear step-by-step workflow with comprehensive logging. The top-level error handler ensures failures are properly reported with a non-zero exit code.
Note: Chinese comments at lines 380, 383, 386 should be translated (already flagged in previous review).
🧹 Nitpick comments (2)
scripts/update-plugin-list.js (2)
18-18: Consider encapsulating mutable state.The
PACKAGES_DIRvariable is mutated at line 89, making it a global state that changes during execution. While acceptable for a script, encapsulating this in a configuration object or class would improve testability and reduce side effects.
50-50: Mixed language in user-facing message.The warning message mixes English with potential Chinese context. For consistency, ensure all user-facing messages match the system locale or default to English.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
scripts/update-plugin-list.js(1 hunks)
🔇 Additional comments (5)
scripts/update-plugin-list.js (5)
176-234: Well-structured dual-path approach.The separation between
readPluginInfo(for documentation with exclusions) andgetPluginPackageName(for JSON without exclusions) is clear and well-executed. The fallback handling for missing localized fields ensures graceful degradation.
236-262: Clean data building logic.The function correctly maintains separate lists for documentation and JSON output, with appropriate sorting for deterministic results.
310-318: Adequate file writing utility.The error handling is appropriate for a build script, with clear logging for both success and failure cases.
320-374: Well-structured JSON generation.The JSON structure correctly differentiates modules (required) from plugins (optional) and maintains the schema reference. The trailing newline addition (line 369) follows best practices for version control.
157-171: Verify that special renaming rules are still necessary with the atual tego-standard repository structure.The hardcoded folder name transformations may become stale if the upstream
tego-standardrepository renames folders. In particular, the special case forplugin-prototype-game-runesweepersuggests a one-off rename that might no longer be needed. Consider checking the current folder structure intego-standard/packagesto confirm these rules are still applicable.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (6)
docs/en/plugins/plugin-list.md (6)
21-21: Capitalize proper name "DingTalk".Line 21 uses the informal term "dingding" which should be capitalized as "DingTalk" to match standard naming conventions and past review feedback. This is a duplicate of a previous comment.
-| 17 | `@tachybase/plugin-auth-dingtalk` | Auth: Ding Talk | dingding authentication. | +| 17 | `@tachybase/plugin-auth-dingtalk` | Auth: Ding Talk | DingTalk authentication. |
25-25: Capitalize "Work" in "Work WeChat".Line 25 uses lowercase "work WeChat" which should be "Work WeChat" to match the proper product name format. This is a duplicate of a previous comment.
-| 25 | `@tachybase/plugin-auth-wecom` | Auth: WeCom | work WeChat authentication. | +| 25 | `@tachybase/plugin-auth-wecom` | Auth: WeCom | Work WeChat authentication. |
26-26: Fix spelling error: "callendar" → "calendar".Line 26 contains a spelling error ("callendar" should be "calendar"). This issue was flagged in previous reviews and remains unresolved.
-| 26 | `@tachybase/plugin-block-calendar` | Calendar | Provides callendar collection template and block for managing date data, typically for date/time related information such as events, appointments, tasks, and so on. | +| 26 | `@tachybase/plugin-block-calendar` | Calendar | Provides calendar collection template and block for managing date/time-related information such as events, appointments, tasks, and so on. |
32-32: Fix grammar error: "Create an card" → "Create a card".Line 32 has an incorrect article usage ("an card" should be "a card"). This issue was flagged in previous reviews and remains unresolved.
-| 32 | `@tachybase/plugin-block-presentation` | Block: Presentation | Create an card on the page to embed and display external web pages or content. | +| 32 | `@tachybase/plugin-block-presentation` | Block: Presentation | Create a card on the page to embed and display external web pages or content. |
15-15: Capitalize the first word of the description.Line 15 has a lowercase "integrate" which should be capitalized to match the style of other descriptions in the table.
-| 11 | `@tachybase/plugin-adapter-remix` | Adapter remix | integrate and manage remix server. | +| 11 | `@tachybase/plugin-adapter-remix` | Adapter remix | Integrate and manage remix server. |
35-35: Improve phrasing: "support" → "supports" or restructure.Line 35 uses "Map block, support Gaode map and Google map" which is grammatically awkward. The pattern should either use "supports" or restructure for clarity.
-| 31 | `@tachybase/plugin-block-map` | Block: Map | Map block, support Gaode map and Google map, you can also extend more map types. | +| 31 | `@tachybase/plugin-block-map` | Block: Map | Map block supports Gaode map and Google map; you can also extend more map types. |
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
docs/en/plugins/plugin-list.md(1 hunks)docs/zh/plugins/plugin-list.md(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
docs/zh/**/*.md
📄 CodeRabbit inference engine (.cursorrules)
docs/zh/**/*.md: When creating a new file in docs/zh/, you MUST create the corresponding file in docs/en/ in the same commit or pull request
When modifying content in docs/zh/, you MUST update the corresponding file in docs/en/ in the same commit or pull request
Files:
docs/zh/plugins/plugin-list.md
docs/**/*.md
📄 CodeRabbit inference engine (.cursorrules)
docs/**/*.md: Use professional technical terminology in documentation translations
Maintain original formatting (headings, lists, code blocks, tables, links) when translating documentation
Preserve code examples as-is; do not translate code or variable names
Keep image references and links functional across both language versions
Maintain markdown syntax consistency across all documentation files
Use the defined key terminology mapping when translating between Chinese and English (e.g., 灵矶 → Lingji/Tachybase, 数据表 → Data table/Collection, 字段 → Field, 卡片 → Block, 工作流 → Workflow, 触发器 → Trigger, 节点 → Node, 关系字段 → Relationship field/Association field, 数据范围 → Data scope, 联动规则 → Linkage rules, 操作 → Action/Operation, 弹窗 → Modal/Popup/Drawer)
Use proper heading hierarchy (H1 → H2 → H3) in documentation
Include code language tags in code blocks (e.g.,typescript,bash)
Use relative paths for internal links in documentation
Include alt text for images in documentation for accessibility
Translate code comments only if they contain important explanations; preserve variable names, function names, and API calls
Files:
docs/zh/plugins/plugin-list.mddocs/en/plugins/plugin-list.md
docs/en/**/*.md
📄 CodeRabbit inference engine (.cursorrules)
Verify the Chinese version in docs/zh/ is up-to-date when modifying docs/en/; the Chinese version is the source of truth
Files:
docs/en/plugins/plugin-list.md
🪛 LanguageTool
docs/zh/plugins/plugin-list.md
[uncategorized] ~30-~30: 您的意思是“等"于"”吗?
Context: ...日历 | 提供日历数据表模板和卡片,用于管理日期数据,通常用于事件、约会、任务等与日期/时间相关的信息。 | | 27 | `@tachybase/plugin-...
(YU7_YU8)
docs/en/plugins/plugin-list.md
[style] ~8-~8: ‘new record’ might be wordy. Consider a shorter alternative.
Context: ...can duplicate it directly to generate a new record. | | 5 | `@tachybase/plugin-action-expo...
(EN_WORDINESS_PREMIUM_NEW_RECORD)
[grammar] ~30-~30: Use a hyphen to join words.
Context: ...aging date data, typically for date/time related information such as events, appo...
(QB_NEW_EN_HYPHEN)
[style] ~49-~49: ‘new record’ might be wordy. Consider a shorter alternative.
Context: ...lection field: Snapshot | When adding a new record, create a snapshot for its relational r...
(EN_WORDINESS_PREMIUM_NEW_RECORD)
[style] ~49-~49: ‘new record’ might be wordy. Consider a shorter alternative.
Context: ...r its relational record and save in the new record. The snapshot will not be updated when ...
(EN_WORDINESS_PREMIUM_NEW_RECORD)
[grammar] ~51-~51: Use a hyphen to join words.
Context: ...arch| Full-text Search | Provides full text search capability | | 48 |@tachyb...
(QB_NEW_EN_HYPHEN)
🔇 Additional comments (2)
docs/zh/plugins/plugin-list.md (2)
3-4: Table structure is well-organized.The Chinese plugin list has been properly updated to the 4-column format (序号 | 包名 | 插件名 | 描述) with consistent formatting throughout. All package names are properly enclosed in backticks, and descriptions are populated.
5-68: Verify English-Chinese content correspondence after fixing English issues.The Chinese file properly mirrors the English file structure and maintains the update in parallel, which aligns with the coding guidelines requiring EN/ZH sync. However, since the English version contains several quality issues (spelling errors like "callendar", grammar errors like "Create an card"), you should verify that the Chinese descriptions accurately correspond to the corrected English versions once those are fixed.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.