🔧 format code

This commit is contained in:
Tw93
2025-08-13 19:45:22 +08:00
parent 09a122dd6b
commit 48be7fce14
9 changed files with 24 additions and 24 deletions

View File

@@ -17,14 +17,14 @@ jobs:
# github.event.pull_request.user.login == 'external-contributor' || # github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' || # github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
pull-requests: read pull-requests: read
issues: read issues: read
id-token: write id-token: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -39,7 +39,7 @@ jobs:
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514" # model: "claude-opus-4-20250514"
# Direct prompt for automated review (no @claude mention needed) # Direct prompt for automated review (no @claude mention needed)
direct_prompt: | direct_prompt: |
Please review this pull request and provide feedback on: Please review this pull request and provide feedback on:
@@ -48,12 +48,12 @@ jobs:
- Performance considerations - Performance considerations
- Security concerns - Security concerns
- Test coverage - Test coverage
Be constructive and helpful in your feedback. Be constructive and helpful in your feedback.
# Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR
# use_sticky_comment: true # use_sticky_comment: true
# Optional: Customize review based on file types # Optional: Customize review based on file types
# direct_prompt: | # direct_prompt: |
# Review this PR focusing on: # Review this PR focusing on:
@@ -61,18 +61,17 @@ jobs:
# - For API endpoints: Security, input validation, and error handling # - For API endpoints: Security, input validation, and error handling
# - For React components: Performance, accessibility, and best practices # - For React components: Performance, accessibility, and best practices
# - For tests: Coverage, edge cases, and test quality # - For tests: Coverage, edge cases, and test quality
# Optional: Different prompts for different authors # Optional: Different prompts for different authors
# direct_prompt: | # direct_prompt: |
# ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' &&
# 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' ||
# 'Please provide a thorough code review focusing on our coding standards and best practices.' }} # 'Please provide a thorough code review focusing on our coding standards and best practices.' }}
# Optional: Add specific tools for running tests or linting # Optional: Add specific tools for running tests or linting
# allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)"
# Optional: Skip review for certain conditions # Optional: Skip review for certain conditions
# if: | # if: |
# !contains(github.event.pull_request.title, '[skip-review]') && # !contains(github.event.pull_request.title, '[skip-review]') &&
# !contains(github.event.pull_request.title, '[WIP]') # !contains(github.event.pull_request.title, '[WIP]')

View File

@@ -39,26 +39,25 @@ jobs:
# This is an optional setting that allows Claude to read CI results on PRs # This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: | additional_permissions: |
actions: read actions: read
# Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4)
# model: "claude-opus-4-20250514" # model: "claude-opus-4-20250514"
# Optional: Customize the trigger phrase (default: @claude) # Optional: Customize the trigger phrase (default: @claude)
# trigger_phrase: "/claude" # trigger_phrase: "/claude"
# Optional: Trigger when specific user is assigned to an issue # Optional: Trigger when specific user is assigned to an issue
# assignee_trigger: "claude-bot" # assignee_trigger: "claude-bot"
# Optional: Allow Claude to run specific commands # Optional: Allow Claude to run specific commands
# allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)" # allowed_tools: "Bash(npm install),Bash(npm run build),Bash(npm run test:*),Bash(npm run lint:*)"
# Optional: Add custom instructions for Claude to customize its behavior for your project # Optional: Add custom instructions for Claude to customize its behavior for your project
# custom_instructions: | # custom_instructions: |
# Follow our coding standards # Follow our coding standards
# Ensure all new code has tests # Ensure all new code has tests
# Use TypeScript for new files # Use TypeScript for new files
# Optional: Custom environment variables for Claude # Optional: Custom environment variables for Claude
# claude_env: | # claude_env: |
# NODE_ENV: test # NODE_ENV: test

View File

@@ -80,7 +80,7 @@ npm run build:mac # macOS universal build
### CLI Tool (`bin/`) ### CLI Tool (`bin/`)
- `bin/cli.ts` - Main entry point with Commander.js - `bin/cli.ts` - Main entry point with Commander.js
- `bin/builders/` - Platform-specific builders (Mac, Windows, Linux) - `bin/builders/` - Platform-specific builders (Mac, Windows, Linux)
- `bin/options/` - CLI option processing and validation - `bin/options/` - CLI option processing and validation
- `bin/helpers/merge.ts` - Configuration merging (name setting at line 55) - `bin/helpers/merge.ts` - Configuration merging (name setting at line 55)

View File

@@ -182,7 +182,7 @@ If you are new to the command line, you can compile packages online with _GitHub
## Development ## Development
Prepare your environment before starting. Make sure you have Rust `>=1.89` and Node `>=22` (e.g., `22.11.0`) installed on your computer. *Note: Older versions (Rust ≥1.78, Node ≥16) may also work but latest stable versions are recommended.* For installation guidance, see [Tauri documentation](https://tauri.app/start/prerequisites/). Prepare your environment before starting. Make sure you have Rust `>=1.89` and Node `>=22` (e.g., `22.11.0`) installed on your computer. _Note: Older versions (Rust ≥1.78, Node ≥16) may also work but latest stable versions are recommended._ For installation guidance, see [Tauri documentation](https://tauri.app/start/prerequisites/).
If you are unfamiliar with these, it is better to try out the above tool to pack with one click. If you are unfamiliar with these, it is better to try out the above tool to pack with one click.

View File

@@ -178,7 +178,7 @@ pake https://weekly.tw93.fun --name Weekly --hide-title-bar
## 定制开发 ## 定制开发
开始前请确保电脑已经安装了 Rust `>=1.89` 和 Node `>=22 如 22.11.0` 的环境,*注意较旧的版本Rust ≥1.78Node ≥16也可能可以工作但推荐使用最新稳定版本。* 此外需参考 [Tauri 文档](https://tauri.app/start/prerequisites/) 快速配置好环境才可以开始使用,假如你太不懂,使用上面的命令行打包会更加合适。 开始前请确保电脑已经安装了 Rust `>=1.89` 和 Node `>=22 如 22.11.0` 的环境,_注意较旧的版本Rust ≥1.78Node ≥16也可能可以工作但推荐使用最新稳定版本。_ 此外需参考 [Tauri 文档](https://tauri.app/start/prerequisites/) 快速配置好环境才可以开始使用,假如你太不懂,使用上面的命令行打包会更加合适。
```sh ```sh
# 安装依赖 # 安装依赖

View File

@@ -178,7 +178,7 @@ pake https://weekly.tw93.fun --name Weekly --hide-title-bar
## 開発 ## 開発
開始する前に、Rust `>=1.89` と Node `>=22` (例: `22.11.0`) がコンピュータにインストールされていることを確認してください。*注意古いバージョンRust ≥1.78、Node ≥16でも動作する可能性がありますが、最新の安定版の使用をお勧めします。* インストールガイドについては、[Tauri ドキュメント](https://tauri.app/start/prerequisites/)を参照してください。 開始する前に、Rust `>=1.89` と Node `>=22` (例: `22.11.0`) がコンピュータにインストールされていることを確認してください。_注意古いバージョンRust ≥1.78、Node ≥16でも動作する可能性がありますが、最新の安定版の使用をお勧めします。_ インストールガイドについては、[Tauri ドキュメント](https://tauri.app/start/prerequisites/)を参照してください。
これらに不慣れな場合は、上記のツールを使用してワンクリックでパッケージを作成することをお勧めします。 これらに不慣れな場合は、上記のツールを使用してワンクリックでパッケージを作成することをお勧めします。

2
bin/README.md vendored
View File

@@ -2,7 +2,7 @@
## Installation ## Installation
Ensure that your Node.js version is 22.0 or higher (e.g., 22.11.0). *Note: Older versions ≥16.0.0 may also work.* Avoid using `sudo` for the installation. If you encounter permission issues with npm, refer to [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo). Ensure that your Node.js version is 22.0 or higher (e.g., 22.11.0). _Note: Older versions ≥16.0.0 may also work._ Avoid using `sudo` for the installation. If you encounter permission issues with npm, refer to [How to fix npm throwing error without sudo](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo).
```bash ```bash
npm install pake-cli -g npm install pake-cli -g

2
bin/README_CN.md vendored
View File

@@ -2,7 +2,7 @@
## 安装 ## 安装
请确保您的 Node.js 版本为 22 或更高版本(例如 22.11.0)。*注意:较旧的版本 ≥16.0.0 也可能可以工作。* 请避免使用 `sudo` 进行安装。如果 npm 报告权限问题,请参考 [如何在不使用 sudo 的情况下修复 npm 报错](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo)。 请确保您的 Node.js 版本为 22 或更高版本(例如 22.11.0)。_注意:较旧的版本 ≥16.0.0 也可能可以工作。_ 请避免使用 `sudo` 进行安装。如果 npm 报告权限问题,请参考 [如何在不使用 sudo 的情况下修复 npm 报错](https://stackoverflow.com/questions/16151018/how-to-fix-npm-throwing-error-without-sudo)。
```bash ```bash
npm install pake-cli -g npm install pake-cli -g

4
bin/utils/url.ts vendored
View File

@@ -35,6 +35,8 @@ export function normalizeUrl(urlToNormalize: string): string {
new URL(urlWithProtocol); new URL(urlWithProtocol);
return urlWithProtocol; return urlWithProtocol;
} catch (err) { } catch (err) {
throw new Error(`Your url "${urlWithProtocol}" is invalid: ${(err as Error).message}`); throw new Error(
`Your url "${urlWithProtocol}" is invalid: ${(err as Error).message}`,
);
} }
} }