Skip to content

Conversation

@MirrorCY
Copy link
Member

No description provided.

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 implements mirror registry support for the create-koishi CLI tool and adds a help command to display usage information.

Key Changes:

  • Adds --mirror / -m option to allow users to specify a custom npm registry (defaults to npmmirror when used as a flag without value)
  • Adds --help / -h option to display CLI usage information with all available options
  • Updates the scaffold function to use the specified mirror registry with a fallback chain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@shigma shigma left a comment

Choose a reason for hiding this comment

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

我感觉这个参数应该是 --registry 而非 --mirror。如果要这么改的话可以把 refr 去掉,转给 registry

还有一个地方就是这个 --mirror 为 true 的行为感觉不够明确,建议是这样:

  • --registry [url] 表示指定某个 registry
  • --npmmirror 相当于 --registry https://registry.npmmirror.com

@MirrorCY
Copy link
Member Author

MirrorCY commented Dec 21, 2025

我感觉这个参数应该是 --registry 而非 --mirror。如果要这么改的话可以把 refr 去掉,转给 registry

我也觉得,其实原始需求里其实就是加个 mirror 的 flag,但是又觉得写死不太好。确实拆成两个好点

@MirrorCY
Copy link
Member Author

这样改如何,去掉了 mirror(反正之前也没有效果

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shigma
Copy link
Member

shigma commented Dec 25, 2025

argv.registry 的定义是不是也没了? 哦好像不需要,没事了

@shigma shigma merged commit 6969ec7 into main Dec 25, 2025
4 checks passed
@shigma shigma deleted the args branch December 25, 2025 17:52
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.

3 participants