Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 21, 2025

In development environments, getPluginType() returned 'npm' for root plugins while getPluginInfo() returned 'git', causing web config retrieval to fail.

Root plugins are processed as git-type plugins throughout the plugin loading system (list.ts:312-315), but getPluginType() incorrectly classified them as npm plugins.

Change:

// packages/core/src/server/plugins/config.ts:347
- if (item === rootName) return 'npm'
+ if (item === rootName) return 'git'

This aligns getPluginType() with how root plugins are actually loaded and cached.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • registry.npmmirror.com
    • Triggering command: /usr/local/bin/node node /home/REDACTED/.npm/_npx/c65dbefa27d408e0/node_modules/.bin/prebuild-install -r node --pkg_version=0.12.0 --pkg_name=node-pty-prebuilt-multiarch (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Bug: 开发环境获取web配置文件失败</issue_title>
<issue_description>### 描述问题

在开发环境获取web配置文件失败,同时getPluginType和getPluginInfo返回不一致,即getPluginType返回npm,getPluginInfo返回git,

Image 应当同步这两个部分返回类型, root应当返回git

复现步骤

  1. 第一步
  2. 第二步
  3. ...

预期行为

正确读取配置

实际行为

读取了错误的路径,web出现

Image

操作系统

windows 11

Node.js 版本

v24.12.0

项目版本

1.14.0

附加信息

No response</issue_description>

<agent_instructions>请你解决一下</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@sj817 @yusheng929 请你的copilot来修一下

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@coderabbitai
Copy link

coderabbitai bot commented Dec 21, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Co-authored-by: nadaien05 <222257398+nadaien05@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix web configuration retrieval issue in development environment Fix getPluginType returning inconsistent type for root plugins Dec 21, 2025
Copilot AI requested a review from nadaien05 December 21, 2025 13:42
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.

Bug: 开发环境获取web配置文件失败

2 participants