Skip to content

feat: auto update plugin list from tego-standard#193

Merged
TomyJan merged 7 commits intomainfrom
perf/plugins
Dec 8, 2025
Merged

feat: auto update plugin list from tego-standard#193
TomyJan merged 7 commits intomainfrom
perf/plugins

Conversation

@TomyJan
Copy link
Contributor

@TomyJan TomyJan commented Dec 8, 2025

Summary by CodeRabbit

  • Documentation

    • Reworked English/Chinese plugin lists: replaced version/metadata with a "Package Name" column, standardized quoting/names and descriptions, removed extra metadata, preserved row order.
    • Updated public plugin manifest: reordered auth entries, added several plugins (database-clean, demos-game-runesweeper, icon-pickerv2, online-user, pagespy, wechat-official-account), and removed/replaced others (otp), adjusted collections.
  • Chores

    • Added automation to generate and maintain plugin lists and a package task to run it.

✏️ Tip: You can customize this high-level summary in your review settings.

@TomyJan TomyJan requested a review from Copilot December 8, 2025 08:37
@coderabbitai
Copy link

coderabbitai bot commented Dec 8, 2025

Caution

Review failed

The pull request is closed.

Note

Other AI code review bot(s) detected

CodeRabbit 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.

Walkthrough

Adds 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 docs/public/index.tego.json entries (renames, reorders, adds, and removes plugins).

Changes

Cohort / File(s) Summary
Documentation — English plugin list
docs/en/plugins/plugin-list.md
Rewrote table header and rows to a 4-column layout: "Package Name", "Plugin Name", "Description"; standardized markup and wording for each row.
Documentation — Chinese plugin list
docs/zh/plugins/plugin-list.md
Rewrote table to 4 columns (包名, 插件名, 描述), removed version/statistics block, reformatted rows and wording to match new schema.
Public plugin manifest
docs/public/index.tego.json
Updated public manifest: cycled/renamed several auth plugin name values, added new plugins (e.g., @tachybase/plugin-database-clean, @tachybase/plugin-demos-game-runesweeper, @tachybase/plugin-icon-pickerv2, @tachybase/plugin-online-user, re-added @tachybase/plugin-wechat-official-account), removed some entries (e.g., @tachybase/plugin-otp), and adjusted collections.standard.
Generator script & npm task
scripts/update-plugin-list.js, package.json
Added scripts/update-plugin-list.js (discovers packages, normalizes plugin names, reads package.json data, builds English/Chinese Markdown lists and index.tego.json, writes outputs) and new npm script "plugin:update": "node scripts/update-plugin-list.js".

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

  • Review scripts/update-plugin-list.js thoroughly: folder discovery logic, transformation rules (prototype → demos/auth mappings), EXCLUDE_PLUGINS handling, and package.json parsing.
  • Validate produced docs/public/index.tego.json ordering and name mappings against intended public API surface.
  • Spot-check generated Markdown encoding/escaping and any assumptions about package metadata fields (displayName, description, zh-CN fallbacks).
  • Confirm file-write safety (atomic writes/backups) and CLI non-interactive behavior for CI usage.

Possibly related PRs

Suggested labels

documentation, automated, sync

Poem

🐰 I hopped through folders, name by name,
Converted rows and tables into frame,
Wrote lists in English, 中文 too,
A script that hums — the index grew! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: auto update plugin list from tego-standard' clearly describes the main change—automating the plugin list updates from tego-standard packages.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0effc29 and 2cbc32c.

📒 Files selected for processing (1)
  • scripts/update-plugin-list.js (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]

This comment was marked as outdated.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_DIR variable 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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a62e96 and d0598ef.

📒 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) and getPluginPackageName (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-standard repository renames folders. In particular, the special case for plugin-prototype-game-runesweeper suggests a one-off rename that might no longer be needed. Consider checking the current folder structure in tego-standard/packages to confirm these rules are still applicable.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d0598ef and 3725e1a.

📒 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.md
  • docs/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.

TomyJan and others added 2 commits December 8, 2025 19:21
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TomyJan TomyJan merged commit 6d0c1ee into main Dec 8, 2025
1 check passed
@TomyJan TomyJan deleted the perf/plugins branch December 8, 2025 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants