diff --git a/.claude/settings.json b/.claude/settings.json index b7d993b..cccb922 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -13,4 +13,4 @@ "Write(docs/**)" ] } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 4ac337e..7672e85 100644 --- a/README.md +++ b/README.md @@ -1,138 +1,313 @@ -# ContextMaster - Windows 右键菜单管理工具 - -## 项目介绍 - -ContextMaster 是一个专为 Windows 系统设计的右键菜单管理工具,帮助用户可视化管理和定制系统右键菜单,提升操作效率。 - -- **可视化管理**:直观查看和编辑所有右键菜单条目 -- **多场景支持**:涵盖桌面、文件、文件夹、驱动器等多种右键菜单场景 -- **安全操作**:所有修改前自动创建回滚点,确保系统安全 -- **操作历史**:记录所有修改操作,支持撤销功能 -- **备份恢复**:支持菜单配置的备份和导入 - -## 技术栈 - -- **框架**:Electron 33.x + electron-forge + Vite -- **语言**:TypeScript(严格模式) -- **数据库**:better-sqlite3(同步 API,WAL 模式) -- **注册表访问**:PowerShell 桥接(读写 HKCR) -- **IPC**:contextBridge + 类型化 IPC 频道 - -## 系统要求 - -- Windows 10/11 (64位) -- Node.js 18.0 或更高版本 -- 管理员权限(运行时需要) - -## 安装与运行 - -### 开发模式 - -```bash -# 克隆仓库 -git clone -cd ContextMaster - -# 安装依赖 -npm install - -# 运行开发模式(需管理员身份) -npm start -``` - -### 打包安装 - -```bash -# 打包应用 -npm run make - -# 安装包将生成在 out/ 目录 -``` - -## 功能特性 - -### 核心功能 - -1. **菜单管理**:查看、启用/禁用、删除右键菜单项 -2. **全局搜索**:跨场景搜索菜单项 -3. **操作历史**:查看和撤销历史操作 -4. **备份管理**:创建和导入菜单配置备份 -5. **系统设置**:配置应用行为和查看日志 - -### 支持的右键菜单场景 - -- 桌面右键 -- 文件右键 -- 文件夹右键 -- 驱动器右键 -- 目录背景 -- 回收站 - -## 架构设计 - -``` -src/ -├── shared/ → 类型/枚举/IPC 频道常量(主+渲染进程共用) -├── main/ -│ ├── services/ → PowerShellBridge → RegistryService → MenuManagerService -│ │ OperationHistoryService → BackupService -│ ├── data/ → Database.ts(better-sqlite3)+ Repository 层 -│ └── ipc/ → 四个 handler 文件(registry/history/backup/system) -├── preload/ → contextBridge 暴露 window.api -└── renderer/ → index.html + main.ts + 四个 page 模块 -``` - -## 使用指南 - -1. **启动应用**:以管理员身份运行 ContextMaster -2. **选择场景**:在左侧导航栏选择要管理的右键菜单场景 -3. **管理条目**: - - 点击条目查看详细信息 - - 使用开关启用/禁用条目 - - 使用删除按钮移除不需要的条目 -4. **搜索功能**:在顶部搜索框输入关键词进行全局搜索 -5. **查看历史**:在导航栏选择「操作记录」查看历史操作 -6. **备份配置**:在导航栏选择「备份管理」创建或导入备份 - -## 注意事项 - -- **权限要求**:应用需要管理员权限才能修改注册表 -- **安全操作**:所有修改前会自动创建回滚点,确保系统安全 -- **Native 模块**:better-sqlite3 为 native 模块,切换 Node/Electron 版本后需执行 `npx electron-rebuild` - -## 配置与日志 - -- **日志文件**:存储于应用数据目录下的 logs 文件夹,保留最近 7 天 -- **配置文件**:应用配置存储在本地数据库中 - -## 开发说明 - -### 代码规范 - -- 使用 async/await 处理所有 IO 操作 -- 错误处理使用 Result 模式 -- renderer page 模块通过 `(window as any)._mainPage` 等挂载供 HTML inline onclick 调用 - -### 构建命令 - -```bash -npm start # 开发模式 -npm run build # 构建应用 -npm run package # 打包应用 -npm run make # 生成安装包 -npm run lint # 代码检查 -``` - -## 参考文档 - -- **UI 原型**:docs/prototype/ContextMaster-UI原型.html -- **完整方案设计**:docs/ContextMaster-方案设计文档.md -- **设计规范**:docs/ContextMaster-Figma设计规范.md - -## 许可证 - -[MIT License](LICENSE) - -## 贡献 - -欢迎提交 Issue 和 Pull Request 来改进这个项目! +# ContextMaster - Windows 右键菜单管理工具 + +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Electron](https://img.shields.io/badge/Electron-33.x-blue.svg)](https://www.electronjs.org/) +[![TypeScript](https://img.shields.io/badge/TypeScript-5.6-blue.svg)](https://www.typescriptlang.org/) + +[English](#english) | [中文](#中文) + +--- + +## English + +### Project Introduction + +ContextMaster is a Windows context menu management tool designed to help users visually manage and customize system right-click menus, improving operational efficiency. + +- **Visual Management**: Intuitively view and edit all context menu items +- **Multi-scenario Support**: Covers desktop, files, folders, drives, and more +- **Safe Operations**: Automatic rollback points before any modifications +- **Operation History**: Record all changes with undo support +- **Backup & Restore**: Support menu configuration backup and import + +### Tech Stack + +- **Framework**: Electron 33.x + electron-forge + Vite +- **Language**: TypeScript (strict mode) +- **Database**: better-sqlite3 (sync API, WAL mode) +- **Registry Access**: PowerShell bridge (read/write HKCR) +- **IPC**: contextBridge + typed IPC channels + +### System Requirements + +- Windows 10/11 (64-bit) +- Node.js 18.0 or higher +- Administrator privileges (required for runtime) + +### Installation & Running + +#### Development Mode + +```bash +# Clone the repository +git clone +cd ContextMaster + +# Install dependencies +pnpm install + +# Run in development mode (requires administrator) +pnpm start +``` + +#### Packaging & Installation + +```bash +# Package the application +pnpm run make + +# Package will be generated in the out/ directory +``` + +#### Microsoft Store Build + +```bash +# Build MSIX package for Microsoft Store +pnpm run make:appx +``` + +### Features + +#### Core Features + +1. **Menu Management**: View, enable/disable, delete context menu items +2. **Global Search**: Search menu items across scenarios +3. **Operation History**: View and undo historical operations +4. **Backup Management**: Create and import menu configuration backups +5. **System Settings**: Configure application behavior and view logs + +#### Supported Context Menu Scenarios + +- Desktop right-click +- File right-click +- Folder right-click +- Drive right-click +- Directory background +- Recycle Bin + +### Architecture + +``` +src/ +├── shared/ → Types/Enums/IPC channel constants (shared by main + renderer) +├── main/ +│ ├── services/ → PowerShellBridge → RegistryService → MenuManagerService +│ │ OperationHistoryService → BackupService +│ ├── data/ → Database.ts (better-sqlite3) + Repository layer +│ └── ipc/ → Four handler files (registry/history/backup/system) +├── preload/ → contextBridge exposes window.api +└── renderer/ → index.html + main.ts + four page modules +``` + +### Usage Guide + +1. **Launch the app**: Run ContextMaster as administrator +2. **Select scenario**: Choose the context menu scenario to manage in the left navigation +3. **Manage items**: + - Click an item to view details + - Use the toggle to enable/disable items + - Use the delete button to remove unwanted items +4. **Search**: Enter keywords in the top search box for global search +5. **View history**: Select "Operation History" in the navigation to view past operations +6. **Backup config**: Select "Backup Management" in the navigation to create or import backups + +### Notes + +- **Permission Requirement**: The app requires administrator privileges to modify the registry +- **Safe Operations**: Rollback points are automatically created before any modifications to ensure system safety +- **Native Module**: better-sqlite3 is a native module, run `npx electron-rebuild` after switching Node/Electron versions + +### Configuration & Logs + +- **Log files**: Stored in the logs folder under the app data directory, retaining the last 7 days +- **Config files**: App configuration is stored in the local database + +### Development + +#### Code Standards + +- Use async/await for all IO operations +- Error handling uses Result pattern +- Renderer page modules are mounted via `(window as any)._mainPage` etc. for HTML inline onclick calls + +#### Build Commands + +```bash +pnpm start # Development mode +pnpm run build # Build the app +pnpm run package # Package the app +pnpm run make # Generate installer +pnpm run make:appx # Generate MSIX package for Store +pnpm run lint # Code linting +pnpm test # Run all tests +``` + +### Reference Documentation + +- **Microsoft Store Guide**: [docs/MICROSOFT-STORE.md](docs/MICROSOFT-STORE.md) +- **Privacy Policy**: [docs/PRIVACY-POLICY.md](docs/PRIVACY-POLICY.md) +- **Certification Notes**: [docs/CERTIFICATION-NOTES.md](docs/CERTIFICATION-NOTES.md) +- **UI Prototype**: docs/prototype/ContextMaster-UI原型.html +- **Complete Design**: docs/ContextMaster-方案设计文档.md +- **Design Spec**: docs/ContextMaster-Figma设计规范.md + +### License + +[MIT License](LICENSE) + +### Contributing + +Issues and Pull Requests are welcome! + +--- + +## 中文 + +### 项目介绍 + +ContextMaster 是一个专为 Windows 系统设计的右键菜单管理工具,帮助用户可视化管理和定制系统右键菜单,提升操作效率。 + +- **可视化管理**:直观查看和编辑所有右键菜单条目 +- **多场景支持**:涵盖桌面、文件、文件夹、驱动器等多种右键菜单场景 +- **安全操作**:所有修改前自动创建回滚点,确保系统安全 +- **操作历史**:记录所有修改操作,支持撤销功能 +- **备份恢复**:支持菜单配置的备份和导入 + +### 技术栈 + +- **框架**:Electron 33.x + electron-forge + Vite +- **语言**:TypeScript(严格模式) +- **数据库**:better-sqlite3(同步 API,WAL 模式) +- **注册表访问**:PowerShell 桥接(读写 HKCR) +- **IPC**:contextBridge + 类型化 IPC 频道 + +### 系统要求 + +- Windows 10/11 (64位) +- Node.js 18.0 或更高版本 +- 管理员权限(运行时需要) + +### 安装与运行 + +#### 开发模式 + +```bash +# 克隆仓库 +git clone +cd ContextMaster + +# 安装依赖 +pnpm install + +# 运行开发模式(需管理员身份) +pnpm start +``` + +#### 打包安装 + +```bash +# 打包应用 +pnpm run make + +# 安装包将生成在 out/ 目录 +``` + +#### Microsoft Store 构建 + +```bash +# 构建 Microsoft Store 的 MSIX 包 +pnpm run make:appx +``` + +### 功能特性 + +#### 核心功能 + +1. **菜单管理**:查看、启用/禁用、删除右键菜单项 +2. **全局搜索**:跨场景搜索菜单项 +3. **操作历史**:查看和撤销历史操作 +4. **备份管理**:创建和导入菜单配置备份 +5. **系统设置**:配置应用行为和查看日志 + +#### 支持的右键菜单场景 + +- 桌面右键 +- 文件右键 +- 文件夹右键 +- 驱动器右键 +- 目录背景 +- 回收站 + +### 架构设计 + +``` +src/ +├── shared/ → 类型/枚举/IPC 频道常量(主+渲染进程共用) +├── main/ +│ ├── services/ → PowerShellBridge → RegistryService → MenuManagerService +│ │ OperationHistoryService → BackupService +│ ├── data/ → Database.ts(better-sqlite3)+ Repository 层 +│ └── ipc/ → 四个 handler 文件(registry/history/backup/system) +├── preload/ → contextBridge 暴露 window.api +└── renderer/ → index.html + main.ts + 四个 page 模块 +``` + +### 使用指南 + +1. **启动应用**:以管理员身份运行 ContextMaster +2. **选择场景**:在左侧导航栏选择要管理的右键菜单场景 +3. **管理条目**: + - 点击条目查看详细信息 + - 使用开关启用/禁用条目 + - 使用删除按钮移除不需要的条目 +4. **搜索功能**:在顶部搜索框输入关键词进行全局搜索 +5. **查看历史**:在导航栏选择「操作记录」查看历史操作 +6. **备份配置**:在导航栏选择「备份管理」创建或导入备份 + +### 注意事项 + +- **权限要求**:应用需要管理员权限才能修改注册表 +- **安全操作**:所有修改前会自动创建回滚点,确保系统安全 +- **Native 模块**:better-sqlite3 为 native 模块,切换 Node/Electron 版本后需执行 `npx electron-rebuild` + +### 配置与日志 + +- **日志文件**:存储于应用数据目录下的 logs 文件夹,保留最近 7 天 +- **配置文件**:应用配置存储在本地数据库中 + +### 开发说明 + +#### 代码规范 + +- 使用 async/await 处理所有 IO 操作 +- 错误处理使用 Result 模式 +- renderer page 模块通过 `(window as any)._mainPage` 等挂载供 HTML inline onclick 调用 + +#### 构建命令 + +```bash +pnpm start # 开发模式 +pnpm run build # 构建应用 +pnpm run package # 打包应用 +pnpm run make # 生成安装包 +pnpm run make:appx # 生成 Store 的 MSIX 包 +pnpm run lint # 代码检查 +pnpm test # 运行所有测试 +``` + +### 参考文档 + +- **Microsoft Store 发布指南**:[docs/MICROSOFT-STORE.md](docs/MICROSOFT-STORE.md) +- **隐私政策**:[docs/PRIVACY-POLICY.md](docs/PRIVACY-POLICY.md) +- **认证说明**:[docs/CERTIFICATION-NOTES.md](docs/CERTIFICATION-NOTES.md) +- **UI 原型**:docs/prototype/ContextMaster-UI原型.html +- **完整方案设计**:docs/ContextMaster-方案设计文档.md +- **设计规范**:docs/ContextMaster-Figma设计规范.md + +### 许可证 + +[MIT License](LICENSE) + +### 贡献 + +欢迎提交 Issue 和 Pull Request 来改进这个项目! diff --git a/assets/Package.appxmanifest b/assets/Package.appxmanifest new file mode 100644 index 0000000..158353a --- /dev/null +++ b/assets/Package.appxmanifest @@ -0,0 +1,70 @@ + + + + + + + + + ContextMaster + YourPublisherName + assets\StoreLogo.png + Windows 右键菜单管理工具 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/app.manifest b/assets/app.manifest index 2b4acb5..8a11a17 100644 --- a/assets/app.manifest +++ b/assets/app.manifest @@ -8,7 +8,7 @@ - + diff --git a/assets/store-icons/README.md b/assets/store-icons/README.md new file mode 100644 index 0000000..b884af4 --- /dev/null +++ b/assets/store-icons/README.md @@ -0,0 +1,32 @@ +# Microsoft Store 应用图标资源 + +此目录包含提交到 Microsoft Store 所需的各种尺寸的应用图标。 + +## 需要的图标尺寸 + +| 文件名 | 尺寸 | 用途 | +|--------|------|------| +| `icon.ico` | 多种尺寸(16x16, 32x32, 48x48, 256x256)| 应用图标 | +| `StoreLogo.png` | 50x50 | Store 徽标 | +| `Square150x150Logo.png` | 150x150 | 中等磁贴 | +| `Square310x310Logo.png` | 310x310 | 大磁贴 | +| `Wide310x150Logo.png` | 310x150 | 宽磁贴 | +| `SplashScreen.png` | 620x300 | 启动画面 | + +## 占位说明 + +当前这些是占位文件,请替换为实际的应用图标。 + +### 如何创建图标 + +1. 准备一个高质量的 SVG 或高分辨率 PNG(至少 512x512) +2. 使用工具生成各种尺寸: + - https://convertico.com/(生成 .ico) + - https://resizeimage.net/(调整 PNG 尺寸) +3. 或者使用设计工具(Figma、Photoshop、GIMP 等) + +## 注意事项 + +- 所有图标必须使用透明背景 +- 使用 PNG 格式(除了 icon.ico) +- 确保图标在小尺寸下仍然清晰可辨 diff --git a/docs/CERTIFICATION-NOTES-SHORT.md b/docs/CERTIFICATION-NOTES-SHORT.md new file mode 100644 index 0000000..4b702f7 --- /dev/null +++ b/docs/CERTIFICATION-NOTES-SHORT.md @@ -0,0 +1,26 @@ +# ContextMaster - Certification Notes (Short Version) + +## Administrator Privileges +This application requires administrator privileges because it needs to read and write to the Windows Registry to manage context menu entries. Please test by running "as administrator". + +## Restricted Capability Justification +We use `runFullTrust` because direct registry access is required for managing Windows context menus - this is our core functionality. We only modify context menu related registry keys. + +## Testing Steps +1. Run as administrator +2. Navigate through different menu scenarios (Desktop, Files, Folders, Drives) +3. Toggle entries on/off - verify they become disabled/enabled +4. Check Operation History page +5. Test undo functionality +6. Create and restore a backup + +## No Network Communication +This app operates entirely locally - no data is transmitted anywhere. + +## No Test Accounts Needed +No user accounts or authentication required. + +## Safety Features +- Automatic rollback points before modifications +- Operation history with undo +- Backup/restore system diff --git a/docs/CERTIFICATION-NOTES.md b/docs/CERTIFICATION-NOTES.md new file mode 100644 index 0000000..9a3d4db --- /dev/null +++ b/docs/CERTIFICATION-NOTES.md @@ -0,0 +1,221 @@ +# Microsoft Store Certification Notes - ContextMaster + +## Application Overview + +ContextMaster is a Windows context menu management tool that allows users to visually manage and customize Windows right-click menu entries through a user-friendly interface. + +## Important Testing Information + +### 1. Administrator Privileges Requirement + +**IMPORTANT**: This application requires administrator privileges to function properly. + +**Why we need it**: +- The application needs to read and write to the Windows Registry to manage context menu entries +- Specifically, it accesses keys under `HKEY_CLASSES_ROOT` (HKCR) and `HKEY_LOCAL_MACHINE` (HKLM) + +**How to test**: +1. Launch the application normally - it will display a dialog asking for administrator privileges +2. Click "Restart as Administrator" or manually right-click and select "Run as administrator" +3. The application will then function normally + +### 2. Restricted Capability Justification + +**Capability used**: `runFullTrust` + +**Justification**: +This application uses the `runFullTrust` restricted capability because it needs direct access to the Windows Registry to manage context menu entries. This is the core functionality of the application and cannot be achieved with partial trust permissions. + +The application only modifies registry keys related to Windows context menus and does not make any other system changes. + +### 3. What the Application Does + +**Primary functions**: +- **View context menu entries**: Reads registry keys to display all context menu items +- **Enable/disable entries**: Toggles the `LegacyDisable` string value to enable/disable menu items +- **Delete entries**: Removes unwanted context menu entries from the registry +- **Backup & restore**: Creates and restores backups of menu configurations +- **Operation history**: Tracks all changes with undo support + +**Registry paths accessed**: +- `HKEY_CLASSES_ROOT\*\shell\` +- `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Directory\shell\` +- `HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Directory\Background\shell\` +- `HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Drive\shell\` +- `HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Folder\shell\` +- `HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\` + +### 4. Safety Features + +The application includes several safety features to prevent system damage: + +- **Automatic rollback points**: Before any modification, the app creates a backup of the affected registry keys +- **Operation history**: All changes are logged and can be undone +- **Backup system**: Users can create full backups before making changes +- **Local only**: All data stays on the user's device - no data is transmitted anywhere + +### 5. Data Storage + +**Local database**: SQLite database stored at: +`%APPDATA%\ContextMaster\contextmaster.db` + +**Log files**: Stored at: +`%APPDATA%\ContextMaster\logs\` + +**No network communication**: This application does not make any network requests or transmit any data. + +### 6. Testing Steps + +**Basic functionality test**: +1. Run the application as administrator +2. Navigate through different context menu scenarios (Desktop, Files, Folders, Drives) +3. View menu entries - they should display correctly +4. Toggle an entry's switch - it should become disabled/enabled +5. Check the "Operation History" page - your change should be listed +6. Try undoing the operation - the entry should return to its previous state +7. Create a backup from the "Backup Management" page +8. Restore the backup you just created + +**No test accounts needed**: This application does not require any user accounts or authentication. + +### 7. Dependencies + +**Third-party dependencies**: +- Electron 33.x (framework) +- better-sqlite3 (local database) +- electron-log (logging) + +**No external services**: The application does not depend on any external services or APIs. + +### 8. Background Behavior + +**No background audio**: This application does not play any audio. + +**No background processes**: The application does not run any background processes when closed. + +**Startup behavior**: The application does not configure itself to start automatically with Windows. + +### 9. Known Issues + +There are no known issues at the time of submission. + +### 10. Contact Information + +For any questions during certification, please reach out via GitHub Issues. + +--- + +--- + +# Microsoft Store 认证说明 - ContextMaster + +## 应用概述 + +ContextMaster 是一个 Windows 右键菜单管理工具,允许用户通过友好的界面可视化管理和自定义 Windows 右键菜单项。 + +## 重要测试信息 + +### 1. 管理员权限要求 + +**重要**:此应用需要管理员权限才能正常运行。 + +**为什么需要管理员权限**: +- 应用程序需要读写 Windows 注册表来管理右键菜单项 +- 具体来说,它访问 `HKEY_CLASSES_ROOT` (HKCR) 和 `HKEY_LOCAL_MACHINE` (HKLM) 下的项 + +**如何测试**: +1. 正常启动应用程序 - 它会显示一个对话框要求管理员权限 +2. 点击"以管理员身份重启"或手动右键选择"以管理员身份运行" +3. 应用程序将正常运行 + +### 2. 受限功能说明 + +**使用的功能**:`runFullTrust` + +**说明**: +此应用使用 `runFullTrust` 受限功能,因为它需要直接访问 Windows 注册表来管理右键菜单项。这是应用的核心功能,无法通过部分信任权限实现。 + +应用仅修改与 Windows 右键菜单相关的注册表项,不进行任何其他系统更改。 + +### 3. 应用功能 + +**主要功能**: +- **查看右键菜单项**:读取注册表项以显示所有右键菜单项 +- **启用/禁用条目**:切换 `LegacyDisable` 字符串值来启用/禁用菜单项 +- **删除条目**:从注册表中删除不需要的右键菜单项 +- **备份和恢复**:创建和恢复菜单配置的备份 +- **操作历史**:跟踪所有更改并支持撤销 + +**访问的注册表路径**: +- `HKEY_CLASSES_ROOT\*\shell\` +- `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Directory\shell\` +- `HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Directory\Background\shell\` +- `HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Drive\shell\` +- `HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\` +- `HKEY_CLASSES_ROOT\Folder\shell\` +- `HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\` + +### 4. 安全功能 + +应用程序包含多项安全功能以防止系统损坏: + +- **自动回滚点**:在任何修改之前,应用会创建受影响注册表项的备份 +- **操作历史**:所有更改都被记录并可以撤销 +- **备份系统**:用户可以在进行更改之前创建完整备份 +- **仅本地**:所有数据保留在用户设备上 - 不传输任何数据 + +### 5. 数据存储 + +**本地数据库**:SQLite 数据库存储位置: +`%APPDATA%\ContextMaster\contextmaster.db` + +**日志文件**:存储位置: +`%APPDATA%\ContextMaster\logs\` + +**无网络通信**:此应用程序不进行任何网络请求或传输任何数据。 + +### 6. 测试步骤 + +**基本功能测试**: +1. 以管理员身份运行应用程序 +2. 浏览不同的右键菜单场景(桌面、文件、文件夹、驱动器) +3. 查看菜单项 - 它们应该正确显示 +4. 切换某个条目的开关 - 它应该变为禁用/启用 +5. 检查"操作历史"页面 - 你的更改应该已列出 +6. 尝试撤销操作 - 条目应该恢复到之前的状态 +7. 从"备份管理"页面创建备份 +8. 恢复你刚创建的备份 + +**无需测试账户**:此应用程序不需要任何用户账户或身份验证。 + +### 7. 依赖项 + +**第三方依赖**: +- Electron 33.x(框架) +- better-sqlite3(本地数据库) +- electron-log(日志记录) + +**无外部服务**:应用程序不依赖任何外部服务或 API。 + +### 8. 后台行为 + +**无后台音频**:此应用程序不播放任何音频。 + +**无后台进程**:应用程序关闭时不运行任何后台进程。 + +**启动行为**:应用程序不会配置为随 Windows 自动启动。 + +### 9. 已知问题 + +提交时没有已知问题。 + +### 10. 联系信息 + +如果在认证期间有任何问题,请通过 GitHub Issues 联系我们。 diff --git a/docs/MICROSOFT-STORE.md b/docs/MICROSOFT-STORE.md new file mode 100644 index 0000000..809f8b0 --- /dev/null +++ b/docs/MICROSOFT-STORE.md @@ -0,0 +1,346 @@ +# Microsoft Store 发布指南 + +本文档详细说明了如何将 ContextMaster 发布到 Microsoft Store。 + +## 目录 + +- [前置准备](#前置准备) +- [步骤 1:注册 Microsoft 开发者账户](#步骤-1注册-microsoft-开发者账户) +- [步骤 2:在 Partner Center 创建应用](#步骤-2在-partner-center-创建应用) +- [步骤 3:配置项目](#步骤-3配置项目) +- [步骤 4:创建应用图标](#步骤-4创建应用图标) +- [步骤 5:构建 MSIX 包](#步骤-5构建-msix-包) +- [步骤 6:准备 Store 资源](#步骤-6准备-store-资源) +- [步骤 7:提交到 Store](#步骤-7提交到-store) +- [常见问题](#常见问题) + +--- + +## 前置准备 + +### 系统要求 +- Windows 10 版本 1607(周年更新)或更高版本 +- Windows 10 SDK(下载:https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) +- Node.js 18+ +- pnpm(项目已配置) + +### 技术栈 +- Electron 33.x +- TypeScript +- Electron Forge +- @electron-forge/maker-appx + +--- + +## 步骤 1:注册 Microsoft 开发者账户 + +1. 访问 https://developer.microsoft.com/en-us/microsoft-store/register/ +2. 点击「立即注册」 +3. 使用 Microsoft 账户登录 +4. 填写开发者信息 +5. 支付 $19 一次性注册费用 +6. 完成账户验证 + +**注意**:账户审批可能需要 1-2 个工作日。 + +--- + +## 步骤 2:在 Partner Center 创建应用 + +### 2.1 创建新应用 +1. 登录 https://partner.microsoft.com/dashboard +2. 点击「创建新应用」 +3. 输入应用名称:`ContextMaster` +4. 检查名称可用性 +5. 选择应用类型:`桌面应用(MSIX)` +6. 点击「创建」 + +### 2.2 获取关键信息 +创建应用后,记录以下信息: + +| 信息项 | 位置 | 示例 | +|--------|------|------| +| **Package Identity Name** | 应用管理 → 产品管理 → 产品标识 | `12345Publisher.ContextMaster` | +| **Publisher ID** | 账户设置 → 开发者设置 → 发布者标识 | `CN=12345678-1234-1234-1234-1234567890AB` | +| **Publisher Display Name** | 账户设置 → 发布者信息 | `Your Company Name` | + +--- + +## 步骤 3:配置项目 + +### 3.1 更新配置文件 + +拿到 Publisher ID 后,更新以下文件: + +#### 3.1.1 更新 `assets/Package.appxmanifest` + +```xml + + Publisher="CN=12345678-1234-1234-1234-1234567890AB" + Version="1.0.0.0" /> + + + Your Company Name + +``` + +#### 3.1.2 更新 `forge.config.ts` + +```typescript +new MakerAppX({ + publisher: 'CN=12345678-1234-1234-1234-1234567890AB', // 替换为你的 Publisher ID + // ... 其他配置 +}), +``` + +### 3.2 安装依赖(已完成) +```bash +pnpm install --save-dev @electron-forge/maker-appx +``` + +--- + +## 步骤 4:创建应用图标 + +### 4.1 需要的图标尺寸 + +| 文件 | 尺寸 | 格式 | 用途 | +|------|------|------|------| +| `icon.ico` | 16x16, 32x32, 48x48, 256x256 | ICO | 应用图标 | +| `StoreLogo.png` | 50x50 | PNG | Store 列表 | +| `Square44x44Logo.png` | 44x44 | PNG | 任务栏 | +| `Square71x71Logo.png` | 71x71 | PNG | 小磁贴 | +| `Square150x150Logo.png` | 150x150 | PNG | 中等磁贴 | +| `Square310x310Logo.png` | 310x310 | PNG | 大磁贴 | +| `Wide310x150Logo.png` | 310x150 | PNG | 宽磁贴 | +| `SplashScreen.png` | 620x300 | PNG | 启动画面 | + +### 4.2 图标创建工具推荐 +- **在线工具**: + - https://convertico.com/ - PNG 转 ICO + - https://resizeimage.net/ - 调整图片尺寸 + - https://www.favicon-generator.org/ - 生成多尺寸图标 +- **设计工具**: + - Figma - https://www.figma.com/ + - GIMP - https://www.gimp.org/(免费) + - Adobe Photoshop + +### 4.3 放置位置 +将所有图标文件放入 `assets/store-icons/` 目录。 + +--- + +## 步骤 5:构建 MSIX 包 + +### 5.1 前置检查 +- 确保已安装 Windows 10 SDK +- 确认 `assets/store-icons/` 目录中有所有必需的图标 +- 确认已更新 `Package.appxmanifest` 和 `forge.config.ts` 中的 Publisher ID + +### 5.2 构建命令 + +```bash +# 1. 先构建应用 +pnpm run build + +# 2. 打包应用 +pnpm run package + +# 3. 生成 MSIX 包 +pnpm run make +``` + +### 5.3 输出位置 +MSIX 包将生成在: +``` +out/make/appx/ContextMaster-1.0.0.0-x64.appx +``` + +### 5.4 本地测试 +```powershell +# 使用 PowerShell 安装测试包 +Add-AppxPackage -Path "out\make\appx\ContextMaster-1.0.0.0-x64.appx" + +# 卸载测试包 +Get-AppxPackage *ContextMaster* | Remove-AppxPackage +``` + +### 5.5 使用 Windows App Certification Kit (WACK) 测试 +1. 打开「Windows 应用认证工具包」 +2. 选择「验证 Windows 应用商店应用」 +3. 选择生成的 .appx 文件 +4. 运行测试并修复所有失败项 + +--- + +## 步骤 6:准备 Store 资源 + +### 6.1 Store 列表内容 + +#### 中文(简体) +- **应用名称**:ContextMaster +- **简短描述**(最多 100 字符):Windows 右键菜单管理工具 +- **完整描述**: + ``` + ContextMaster 是一个专为 Windows 系统设计的右键菜单管理工具,帮助用户可视化管理和定制系统右键菜单,提升操作效率。 + + 🎯 核心功能 + • 可视化管理:直观查看和编辑所有右键菜单条目 + • 多场景支持:涵盖桌面、文件、文件夹、驱动器等多种右键菜单场景 + • 安全操作:所有修改前自动创建回滚点,确保系统安全 + • 操作历史:记录所有修改操作,支持撤销功能 + • 备份恢复:支持菜单配置的备份和导入 + + 📋 支持的右键菜单场景 + • 桌面右键 + • 文件右键 + • 文件夹右键 + • 驱动器右键 + • 目录背景 + • 回收站 + + ⚠️ 注意事项 + • 应用需要管理员权限才能修改注册表 + • 建议在修改前先创建备份 + ``` + +- **功能列表**(每行一个功能): + - 可视化管理右键菜单 + - 支持多种右键菜单场景 + - 自动创建回滚点 + - 操作历史记录与撤销 + - 配置备份与恢复 + - 全局搜索功能 + +#### 英文 +- **App name**:ContextMaster +- **Short description**:Windows Context Menu Manager +- **Full description**: + ``` + ContextMaster is a Windows context menu management tool designed to help users visually manage and customize system context menus, improving operational efficiency. + + 🎯 Core Features + • Visual management: Intuitively view and edit all context menu items + • Multi-scenario support: Covers desktop, files, folders, drives, and more + • Safe operations: Automatic rollback points before any modifications + • Operation history: Record all changes with undo support + • Backup & restore: Support menu configuration backup and import + + 📋 Supported Context Menu Scenarios + • Desktop right-click + • File right-click + • Folder right-click + • Drive right-click + • Directory background + • Recycle Bin + + ⚠️ Notes + • Administrator privileges required to modify the registry + • Recommend creating a backup before making changes + ``` + +### 6.2 屏幕截图 +- 至少需要 1 张截图,建议 3-5 张 +- 尺寸:1366x768(推荐)或 1920x1080 +- 格式:PNG +- 内容: + 1. 主界面截图 + 2. 菜单管理功能截图 + 3. 操作历史截图 + 4. 备份管理截图 + +### 6.3 其他资源 +- **隐私政策 URL**:创建一个简单的页面说明不收集用户数据 + - 可以使用 GitHub Pages 或托管在你的网站上 +- **支持信息**:GitHub Issues 链接或邮箱 +- **版权信息**:`Copyright (c) 2024 Your Name` + +--- + +## 步骤 7:提交到 Store + +### 7.1 上传包 +1. 在 Partner Center 进入应用管理 +2. 点击「程序包」→「上传程序包」 +3. 上传生成的 `.appx` 文件 +4. 等待包验证通过 + +### 7.2 填写商店列表 +1. 进入「商店列表」 +2. 选择语言(中文(简体)和 English) +3. 填写描述、功能列表等 +4. 上传屏幕截图 +5. 上传应用徽标 +6. 填写隐私政策 URL 和支持信息 + +### 7.3 配置属性 +1. 进入「属性」 +2. 选择类别:`开发者工具` 或 `实用工具` +3. 填写定价(免费) +4. 配置市场选择(全球或特定国家/地区) + +### 7.4 受限功能说明 +由于我们使用了 `runFullTrust` 受限功能,需要在「提交选项」→「受限功能」中说明: + +> 此应用使用 runFullTrust 功能是为了能够访问和修改 Windows 注册表,从而管理系统右键菜单。这是应用的核心功能,需要完全信任权限才能正常工作。 + +### 7.5 提交认证 +1. 检查所有信息是否填写完整 +2. 点击「提交到 Store」 +3. 等待认证(通常需要 24-72 小时) + +--- + +## 常见问题 + +### Q1: 构建 MSIX 时提示找不到 Windows SDK +**A**: 确保已安装 Windows 10 SDK,并在 `forge.config.ts` 中正确配置 `windowsKit` 路径。 + +### Q2: runFullTrust 功能会被批准吗? +**A**: 只要在提交选项中清楚说明用途(访问注册表管理右键菜单),通常会被批准。 + +### Q3: 应用需要管理员权限,会影响 Store 发布吗? +**A**: 不会,只要应用正确处理权限提升(我们已实现),就可以正常发布。 + +### Q4: 认证失败怎么办? +**A**: 查看认证报告,根据反馈修复问题后重新提交。常见问题包括: +- 缺少必需的图标尺寸 +- 应用崩溃或无响应 +- 隐私政策缺失 +- 受限功能说明不充分 + +### Q5: 如何更新应用? +**A**: +1. 更新 `package.json` 中的版本号 +2. 更新 `Package.appxmanifest` 中的版本号 +3. 重新构建 MSIX 包 +4. 在 Partner Center 创建新提交并上传新包 + +--- + +## 参考链接 + +- [Microsoft Partner Center 文档](https://learn.microsoft.com/en-us/windows/uwp/publish/) +- [Electron Windows Store 文档](https://www.electronforge.io/config/makers/appx) +- [Package.appxmanifest 参考](https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/appx-package-manifest) +- [Windows App Certification Kit](https://learn.microsoft.com/en-us/windows/uwp/debug-test-perf/windows-app-certification-kit) + +--- + +## 快速检查清单 + +- [ ] 注册 Microsoft 开发者账户 +- [ ] 在 Partner Center 创建应用并获取 Publisher ID +- [ ] 更新 `Package.appxmanifest` 中的 Publisher ID 和 Package Name +- [ ] 更新 `forge.config.ts` 中的 Publisher ID +- [ ] 创建所有必需尺寸的应用图标 +- [ ] 准备 Store 列表内容(描述、截图等) +- [ ] 创建隐私政策页面 +- [ ] 构建 MSIX 包 +- [ ] 本地测试安装和功能 +- [ ] 使用 WACK 测试 +- [ ] 在 Partner Center 上传包并填写列表 +- [ ] 提交认证 + +祝发布顺利!🎉 diff --git a/docs/PRIVACY-POLICY.md b/docs/PRIVACY-POLICY.md new file mode 100644 index 0000000..44c48a8 --- /dev/null +++ b/docs/PRIVACY-POLICY.md @@ -0,0 +1,117 @@ +# Privacy Policy for ContextMaster + +Last updated: March 2026 + +## Introduction + +ContextMaster ("we", "our", or "us") is committed to protecting your privacy. This Privacy Policy explains how ContextMaster collects, uses, and shares your information when you use our Windows desktop application. + +## Information We Collect + +### We Collect NO Personal Information + +ContextMaster **does not collect, store, or transmit any personal information**, usage data, or analytics. The application operates entirely locally on your Windows device. + +### What We Do Locally + +ContextMaster only accesses and modifies: +- **Windows Registry**: Specifically, registry keys related to Windows context menu entries (right-click menus) +- **Local Database**: A SQLite database stored on your device to track operation history and backups +- **Application Logs**: Local log files for debugging purposes (stored on your device only) + +All of the above data remains **exclusively on your device** and is never transmitted to any external servers. + +## How We Use Information + +Since we don't collect any information, we don't use any information. The application functions entirely offline. + +## Data Sharing and Disclosure + +We do not share, sell, or disclose any information to third parties because: +1. We don't collect any information +2. All data remains on your local device + +## Data Security + +Your data is stored locally on your Windows device. We implement appropriate security measures to protect the local data: +- Operation history and backups are stored in a local SQLite database +- Log files are stored in your user profile's application data directory +- No data is transmitted over the network + +## Your Rights + +Since we don't collect any personal information, there is no data to access, correct, or delete. All data is under your direct control on your local device. + +## Children's Privacy + +ContextMaster does not knowingly collect any information from children under the age of 13. + +## Changes to This Privacy Policy + +We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page. + +## Contact Us + +If you have any questions about this Privacy Policy, please contact us: +- By opening an issue on our GitHub repository +- By email (if provided in the application) + +--- + +# 隐私政策 - ContextMaster + +最后更新:2026年3月 + +## 介绍 + +ContextMaster("我们")致力于保护您的隐私。本隐私政策解释了当您使用我们的 Windows 桌面应用程序时,ContextMaster 如何收集、使用和分享您的信息。 + +## 我们收集的信息 + +### 我们不收集任何个人信息 + +ContextMaster **不会收集、存储或传输任何个人信息**、使用数据或分析数据。应用程序完全在您的 Windows 设备上本地运行。 + +### 我们在本地处理的内容 + +ContextMaster 仅访问和修改: +- **Windows 注册表**: specifically, 与 Windows 右键菜单相关的注册表项 +- **本地数据库**:存储在您设备上的 SQLite 数据库,用于跟踪操作历史和备份 +- **应用日志**:用于调试目的的本地日志文件(仅存储在您的设备上) + +以上所有数据**仅保留在您的设备上**,绝不会传输到任何外部服务器。 + +## 我们如何使用信息 + +由于我们不收集任何信息,因此我们不使用任何信息。应用程序完全离线运行。 + +## 数据共享和披露 + +我们不会与第三方共享、出售或披露任何信息,因为: +1. 我们不收集任何信息 +2. 所有数据都保留在您的本地设备上 + +## 数据安全 + +您的数据存储在您的 Windows 设备本地。我们采取适当的安全措施来保护本地数据: +- 操作历史和备份存储在本地 SQLite 数据库中 +- 日志文件存储在您的用户配置文件的应用程序数据目录中 +- 没有数据通过网络传输 + +## 您的权利 + +由于我们不收集任何个人信息,因此没有需要访问、更正或删除的数据。所有数据都在您的本地设备上,由您直接控制。 + +## 儿童隐私 + +ContextMaster 不会故意收集 13 岁以下儿童的任何信息。 + +## 本隐私政策的变更 + +我们可能会不时更新本隐私政策。我们将通过在本页面发布新的隐私政策来通知您任何变更。 + +## 联系我们 + +如果您对本隐私政策有任何疑问,请通过以下方式联系我们: +- 在我们的 GitHub 仓库中提交 Issue +- 通过电子邮件(如果应用程序中提供) diff --git a/docs/privacy-policy.html b/docs/privacy-policy.html new file mode 100644 index 0000000..3dfbc64 --- /dev/null +++ b/docs/privacy-policy.html @@ -0,0 +1,171 @@ + + + + + + Privacy Policy - ContextMaster + + + +
+ + +
+ +
+

Privacy Policy for ContextMaster

+

Last updated: March 2026

+ +

Introduction

+

ContextMaster ("we", "our", or "us") is committed to protecting your privacy. This Privacy Policy explains how ContextMaster collects, uses, and shares your information when you use our Windows desktop application.

+ +

Information We Collect

+

We Collect NO Personal Information

+

ContextMaster does not collect, store, or transmit any personal information, usage data, or analytics. The application operates entirely locally on your Windows device.

+ +

What We Do Locally

+

ContextMaster only accesses and modifies:

+
    +
  • Windows Registry: Specifically, registry keys related to Windows context menu entries (right-click menus)
  • +
  • Local Database: A SQLite database stored on your device to track operation history and backups
  • +
  • Application Logs: Local log files for debugging purposes (stored on your device only)
  • +
+

All of the above data remains exclusively on your device and is never transmitted to any external servers.

+ +

How We Use Information

+

Since we don't collect any information, we don't use any information. The application functions entirely offline.

+ +

Data Sharing and Disclosure

+

We do not share, sell, or disclose any information to third parties because:

+
    +
  1. We don't collect any information
  2. +
  3. All data remains on your local device
  4. +
+ +

Data Security

+

Your data is stored locally on your Windows device. We implement appropriate security measures to protect the local data:

+
    +
  • Operation history and backups are stored in a local SQLite database
  • +
  • Log files are stored in your user profile's application data directory
  • +
  • No data is transmitted over the network
  • +
+ +

Your Rights

+

Since we don't collect any personal information, there is no data to access, correct, or delete. All data is under your direct control on your local device.

+ +

Children's Privacy

+

ContextMaster does not knowingly collect any information from children under the age of 13.

+ +

Changes to This Privacy Policy

+

We may update this Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.

+ +

Contact Us

+

If you have any questions about this Privacy Policy, please contact us by opening an issue on our GitHub repository.

+
+ +
+

隐私政策 - ContextMaster

+

最后更新:2026年3月

+ +

介绍

+

ContextMaster("我们")致力于保护您的隐私。本隐私政策解释了当您使用我们的 Windows 桌面应用程序时,ContextMaster 如何收集、使用和分享您的信息。

+ +

我们收集的信息

+

我们不收集任何个人信息

+

ContextMaster 不会收集、存储或传输任何个人信息、使用数据或分析数据。应用程序完全在您的 Windows 设备上本地运行。

+ +

我们在本地处理的内容

+

ContextMaster 仅访问和修改:

+
    +
  • Windows 注册表:与 Windows 右键菜单相关的注册表项
  • +
  • 本地数据库:存储在您设备上的 SQLite 数据库,用于跟踪操作历史和备份
  • +
  • 应用日志:用于调试目的的本地日志文件(仅存储在您的设备上)
  • +
+

以上所有数据仅保留在您的设备上,绝不会传输到任何外部服务器。

+ +

我们如何使用信息

+

由于我们不收集任何信息,因此我们不使用任何信息。应用程序完全离线运行。

+ +

数据共享和披露

+

我们不会与第三方共享、出售或披露任何信息,因为:

+
    +
  1. 我们不收集任何信息
  2. +
  3. 所有数据都保留在您的本地设备上
  4. +
+ +

数据安全

+

您的数据存储在您的 Windows 设备本地。我们采取适当的安全措施来保护本地数据:

+
    +
  • 操作历史和备份存储在本地 SQLite 数据库中
  • +
  • 日志文件存储在您的用户配置文件的应用程序数据目录中
  • +
  • 没有数据通过网络传输
  • +
+ +

您的权利

+

由于我们不收集任何个人信息,因此没有需要访问、更正或删除的数据。所有数据都在您的本地设备上,由您直接控制。

+ +

儿童隐私

+

ContextMaster 不会故意收集 13 岁以下儿童的任何信息。

+ +

本隐私政策的变更

+

我们可能会不时更新本隐私政策。我们将通过在本页面发布新的隐私政策来通知您任何变更。

+ +

联系我们

+

如果您对本隐私政策有任何疑问,请通过在我们的 GitHub 仓库中提交 Issue 来联系我们。

+
+ + + + diff --git a/forge.config.ts b/forge.config.ts index 8150b30..8fc6b19 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -1,6 +1,7 @@ import type { ForgeConfig } from '@electron-forge/shared-types'; import { MakerSquirrel } from '@electron-forge/maker-squirrel'; import { MakerZIP } from '@electron-forge/maker-zip'; +import { MakerAppX } from '@electron-forge/maker-appx'; import { VitePlugin } from '@electron-forge/plugin-vite'; import { AutoUnpackNativesPlugin } from '@electron-forge/plugin-auto-unpack-natives'; import path from 'path'; @@ -20,6 +21,18 @@ const config: ForgeConfig = { setupIcon: './assets/icon.ico', }), new MakerZIP({}, ['darwin']), + new MakerAppX({ + publisher: 'CN=YourPublisherId', + packageName: 'ContextMaster', + packageDisplayName: 'ContextMaster', + packageDescription: 'Windows 右键菜单管理工具', + packageVersion: '1.0.0.0', + windowsKit: 'C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x64', + manifest: './assets/Package.appxmanifest', + assets: './assets/store-icons', + deploy: false, + makePri: true, + }), ], plugins: [ new AutoUnpackNativesPlugin({}), diff --git a/package.json b/package.json index 9e5aea6..651da32 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "electron-forge start", "package": "electron-forge package", "make": "electron-forge make", + "make:appx": "electron-forge make --targets=@electron-forge/maker-appx", "lint": "eslint src/", "test": "pnpm run test:unit && pnpm run test:e2e", "test:unit": "vitest run", @@ -26,6 +27,7 @@ }, "devDependencies": { "@electron-forge/cli": "^7.6.0", + "@electron-forge/maker-appx": "^7.11.1", "@electron-forge/maker-squirrel": "^7.6.0", "@electron-forge/maker-zip": "^7.6.0", "@electron-forge/plugin-auto-unpack-natives": "^7.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3c9547..e3306c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,6 +24,9 @@ importers: '@electron-forge/cli': specifier: ^7.6.0 version: 7.11.1(encoding@0.1.13) + '@electron-forge/maker-appx': + specifier: ^7.11.1 + version: 7.11.1 '@electron-forge/maker-squirrel': specifier: ^7.6.0 version: 7.11.1 @@ -181,6 +184,10 @@ packages: resolution: {integrity: sha512-YtuPLzggPKPabFAD2rOZFE0s7f4KaUTpGRduhSMbZUqpqD1TIPyfoDBpYiZvao3Ht8pyZeOJjbzcC0LpFs9gIQ==} engines: {node: '>= 16.4.0'} + '@electron-forge/maker-appx@7.11.1': + resolution: {integrity: sha512-KuR5+DRboD24hiPNReQlLSSdEdDqs/0YUcs3NDC8lLku7oAc+Gae4ZHcjVrx5hYtq0Yrgf1Fns5y4x/q2G9t+Q==} + engines: {node: '>= 16.4.0'} + '@electron-forge/maker-base@7.11.1': resolution: {integrity: sha512-yhZrCGoN6bDeiB5DHFaueZ1h84AReElEj+f0hl2Ph4UbZnO0cnLpbx+Bs+XfMLAiA+beC8muB5UDK5ysfuT9BQ==} engines: {node: '>= 16.4.0'} @@ -1048,6 +1055,10 @@ packages: ajv@8.18.0: resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} + ansi-escapes@3.2.0: + resolution: {integrity: sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==} + engines: {node: '>=4'} + ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} @@ -1056,6 +1067,14 @@ packages: resolution: {integrity: sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==} engines: {node: '>=12'} + ansi-regex@3.0.1: + resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} + engines: {node: '>=4'} + + ansi-regex@4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -1064,6 +1083,10 @@ packages: resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} engines: {node: '>=12'} + ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -1191,6 +1214,10 @@ packages: resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} engines: {node: '>=18'} + chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1221,6 +1248,10 @@ packages: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} + cli-cursor@2.1.0: + resolution: {integrity: sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==} + engines: {node: '>=4'} + cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} engines: {node: '>=8'} @@ -1237,6 +1268,9 @@ packages: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-width@2.2.1: + resolution: {integrity: sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==} + cli-width@4.1.0: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} @@ -1252,10 +1286,16 @@ packages: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} + color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} + color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -1407,6 +1447,11 @@ packages: electron-to-chromium@1.5.307: resolution: {integrity: sha512-5z3uFKBWjiNR44nFcYdkcXjKMbg5KXNdciu7mhTPo9tB7NbqSNP2sSnGR+fqknZSCwKkBN+oxiiajWs4dT6ORg==} + electron-windows-store@2.1.0: + resolution: {integrity: sha512-+kBL20yeY2ahJxvZ6dDtE3gPqWLZI5Glnx7VBLA1cGXagS82PZTFueuvDyLGLcKtI48lhPhW9QmdZ9omh+yKTA==} + engines: {node: '>=6.0.0'} + hasBin: true + electron-winstaller@5.4.0: resolution: {integrity: sha512-bO3y10YikuUwUuDUQRM4KfwNkKhnpVO7IPdbsrejwN9/AABJzzTQ4GeHwyzNSrVO+tEH3/Np255a3sVZpZDjvg==} engines: {node: '>=8.0.0'} @@ -1602,6 +1647,10 @@ packages: fflate@0.8.2: resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + figures@2.0.0: + resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} + engines: {node: '>=4'} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1765,6 +1814,10 @@ packages: resolution: {integrity: sha512-lMHQRRwIPyJ70HV0kkFT7jH/gXzSI7yDkQFe07E2flwmNDFoWUTRMKpW2sglsnpeA7b6S2TJPp98EbQxai8eaQ==} engines: {node: '>=20.0.0'} + has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1870,6 +1923,10 @@ packages: resolution: {integrity: sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==} engines: {node: '>=10'} + inquirer@6.5.2: + resolution: {integrity: sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==} + engines: {node: '>=6.0.0'} + interpret@3.1.1: resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==} engines: {node: '>=10.13.0'} @@ -1889,6 +1946,10 @@ packages: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-fullwidth-code-point@2.0.0: + resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} + engines: {node: '>=4'} + is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -2034,10 +2095,16 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} + lodash.defaults@4.2.0: + resolution: {integrity: sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ==} + lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash@4.17.23: resolution: {integrity: sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==} @@ -2128,6 +2195,10 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} + mimic-fn@1.2.0: + resolution: {integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==} + engines: {node: '>=4'} + mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -2228,6 +2299,14 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + multiline@2.0.0: + resolution: {integrity: sha512-+HpXaUcV8PIGNNmuhtlaVmw4NH0W30/A5WP+rq6pxZYBjDslX/sXkFgL3Mgk1cSGGIICjWu4gNStkJXL6ZM2DQ==} + engines: {node: '>=0.10.0'} + deprecated: This was a fun hack, but now we have template literals, so use that instead. + + mute-stream@0.0.7: + resolution: {integrity: sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==} + mute-stream@1.0.0: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2333,6 +2412,10 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + onetime@2.0.1: + resolution: {integrity: sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==} + engines: {node: '>=4'} + onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -2587,6 +2670,10 @@ packages: responselike@2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + restore-cursor@2.0.0: + resolution: {integrity: sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==} + engines: {node: '>=4'} + restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -2625,9 +2712,17 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + run-async@2.4.1: + resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} + engines: {node: '>=0.12.0'} + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -2761,6 +2856,10 @@ packages: std-env@3.10.0: resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + string-width@2.1.1: + resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} + engines: {node: '>=4'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2772,6 +2871,14 @@ packages: string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + strip-ansi@4.0.0: + resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} + engines: {node: '>=4'} + + strip-ansi@5.2.0: + resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} + engines: {node: '>=6'} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -2788,6 +2895,10 @@ packages: resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} engines: {node: '>=0.10.0'} + strip-indent@2.0.0: + resolution: {integrity: sha512-RsSNPLpq6YUL7QYy44RnPVTn/lcVZtb48Uof3X5JLbF4zD/Gs7ZFDv2HWol+leoQN2mT86LAzSshGfkTlSOpsA==} + engines: {node: '>=4'} + strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -2803,6 +2914,10 @@ packages: resolution: {integrity: sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==} engines: {node: '>= 8.0'} + supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -2866,6 +2981,9 @@ packages: resolution: {integrity: sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==} engines: {node: '>=18'} + through@2.3.8: + resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -2928,6 +3046,9 @@ packages: peerDependencies: typescript: '>=4.8.4' + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -3373,6 +3494,20 @@ snapshots: - uglify-js - webpack-cli + '@electron-forge/maker-appx@7.11.1': + dependencies: + '@electron-forge/core-utils': 7.11.1 + '@electron-forge/maker-base': 7.11.1 + '@electron-forge/shared-types': 7.11.1 + cross-spawn: 7.0.6 + fs-extra: 10.1.0 + parse-author: 2.0.0 + optionalDependencies: + electron-windows-store: 2.1.0 + transitivePeerDependencies: + - bluebird + - supports-color + '@electron-forge/maker-base@7.11.1': dependencies: '@electron-forge/shared-types': 7.11.1 @@ -4422,6 +4557,9 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + ansi-escapes@3.2.0: + optional: true + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -4430,10 +4568,21 @@ snapshots: dependencies: type-fest: 1.4.0 + ansi-regex@3.0.1: + optional: true + + ansi-regex@4.1.1: + optional: true + ansi-regex@5.0.1: {} ansi-regex@6.2.2: {} + ansi-styles@3.2.1: + dependencies: + color-convert: 1.9.3 + optional: true + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 @@ -4593,6 +4742,13 @@ snapshots: loupe: 3.2.1 pathval: 2.0.1 + chalk@2.4.2: + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + optional: true + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -4612,6 +4768,11 @@ snapshots: clean-stack@2.2.0: {} + cli-cursor@2.1.0: + dependencies: + restore-cursor: 2.0.0 + optional: true + cli-cursor@3.1.0: dependencies: restore-cursor: 3.1.0 @@ -4627,6 +4788,9 @@ snapshots: slice-ansi: 5.0.0 string-width: 5.1.2 + cli-width@2.2.1: + optional: true + cli-width@4.1.0: {} cliui@8.0.1: @@ -4641,10 +4805,18 @@ snapshots: clone@1.0.4: {} + color-convert@1.9.3: + dependencies: + color-name: 1.1.3 + optional: true + color-convert@2.0.1: dependencies: color-name: 1.1.4 + color-name@1.1.3: + optional: true + color-name@1.1.4: {} color-support@1.1.3: {} @@ -4790,6 +4962,21 @@ snapshots: electron-to-chromium@1.5.307: {} + electron-windows-store@2.1.0: + dependencies: + chalk: 2.4.2 + commander: 2.20.3 + debug: 4.4.3 + fs-extra: 7.0.1 + inquirer: 6.5.2 + lodash.defaults: 4.2.0 + lodash.merge: 4.6.2 + multiline: 2.0.0 + path-exists: 3.0.0 + transitivePeerDependencies: + - supports-color + optional: true + electron-winstaller@5.4.0: dependencies: '@electron/asar': 3.4.1 @@ -5029,6 +5216,11 @@ snapshots: fflate@0.8.2: {} + figures@2.0.0: + dependencies: + escape-string-regexp: 1.0.5 + optional: true + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -5251,6 +5443,9 @@ snapshots: - bufferutil - utf-8-validate + has-flag@3.0.0: + optional: true + has-flag@4.0.0: {} has-property-descriptors@1.0.2: @@ -5358,6 +5553,23 @@ snapshots: ini@2.0.0: {} + inquirer@6.5.2: + dependencies: + ansi-escapes: 3.2.0 + chalk: 2.4.2 + cli-cursor: 2.1.0 + cli-width: 2.2.1 + external-editor: 3.1.0 + figures: 2.0.0 + lodash: 4.17.23 + mute-stream: 0.0.7 + run-async: 2.4.1 + rxjs: 6.6.7 + string-width: 2.1.1 + strip-ansi: 5.2.0 + through: 2.3.8 + optional: true + interpret@3.1.1: {} ip-address@10.1.0: {} @@ -5370,6 +5582,9 @@ snapshots: is-extglob@2.1.1: {} + is-fullwidth-code-point@2.0.0: + optional: true + is-fullwidth-code-point@3.0.0: {} is-fullwidth-code-point@4.0.0: {} @@ -5525,8 +5740,14 @@ snapshots: dependencies: p-locate: 5.0.0 + lodash.defaults@4.2.0: + optional: true + lodash.get@4.4.2: {} + lodash.merge@4.6.2: + optional: true + lodash@4.17.23: {} log-symbols@4.1.0: @@ -5644,6 +5865,9 @@ snapshots: dependencies: mime-db: 1.52.0 + mimic-fn@1.2.0: + optional: true + mimic-fn@2.1.0: {} mimic-response@1.0.1: {} @@ -5736,6 +5960,14 @@ snapshots: ms@2.1.3: {} + multiline@2.0.0: + dependencies: + strip-indent: 2.0.0 + optional: true + + mute-stream@0.0.7: + optional: true + mute-stream@1.0.0: {} nanoid@3.3.11: {} @@ -5847,6 +6079,11 @@ snapshots: dependencies: wrappy: 1.0.2 + onetime@2.0.1: + dependencies: + mimic-fn: 1.2.0 + optional: true + onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -6078,6 +6315,12 @@ snapshots: dependencies: lowercase-keys: 2.0.0 + restore-cursor@2.0.0: + dependencies: + onetime: 2.0.1 + signal-exit: 3.0.7 + optional: true + restore-cursor@3.1.0: dependencies: onetime: 5.1.2 @@ -6144,10 +6387,18 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.59.0 fsevents: 2.3.3 + run-async@2.4.1: + optional: true + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + optional: true + safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} @@ -6277,6 +6528,12 @@ snapshots: std-env@3.10.0: {} + string-width@2.1.1: + dependencies: + is-fullwidth-code-point: 2.0.0 + strip-ansi: 4.0.0 + optional: true + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -6293,6 +6550,16 @@ snapshots: dependencies: safe-buffer: 5.2.1 + strip-ansi@4.0.0: + dependencies: + ansi-regex: 3.0.1 + optional: true + + strip-ansi@5.2.0: + dependencies: + ansi-regex: 4.1.1 + optional: true + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -6305,6 +6572,9 @@ snapshots: strip-eof@1.0.0: {} + strip-indent@2.0.0: + optional: true + strip-json-comments@2.0.1: {} strip-literal@3.1.0: @@ -6321,6 +6591,11 @@ snapshots: transitivePeerDependencies: - supports-color + supports-color@5.5.0: + dependencies: + has-flag: 3.0.0 + optional: true + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -6394,6 +6669,9 @@ snapshots: glob: 10.4.5 minimatch: 10.2.4 + through@2.3.8: + optional: true + tinybench@2.9.0: {} tinyexec@0.3.2: {} @@ -6443,6 +6721,9 @@ snapshots: dependencies: typescript: 5.9.3 + tslib@1.14.1: + optional: true + tunnel-agent@0.6.0: dependencies: safe-buffer: 5.2.1 diff --git a/src/main/index.ts b/src/main/index.ts index 926c28b..878bad8 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -1,6 +1,7 @@ import { app, BrowserWindow } from 'electron'; import path from 'path'; import { initLogger } from './utils/logger'; +import { isRunningAsAdmin, showAdminPermissionDialog } from './utils/adminCheck'; import { getDatabase, closeDatabase } from './data/Database'; import { PowerShellBridge } from './services/PowerShellBridge'; import { RegistryService } from './services/RegistryService'; @@ -72,6 +73,12 @@ function initServices(): void { app.whenReady().then(() => { initLogger(); + + if (!isRunningAsAdmin()) { + showAdminPermissionDialog(); + return; + } + initServices(); createWindow(); diff --git a/src/main/utils/adminCheck.ts b/src/main/utils/adminCheck.ts new file mode 100644 index 0000000..26db92d --- /dev/null +++ b/src/main/utils/adminCheck.ts @@ -0,0 +1,76 @@ +import { dialog } from 'electron'; +import { execFile } from 'child_process'; +import path from 'path'; + +/** + * 检查当前进程是否以管理员权限运行 + * @returns 是否具有管理员权限 + */ +export function isRunningAsAdmin(): boolean { + if (process.platform !== 'win32') { + return true; + } + + try { + execFile('net', ['session'], (error) => { + return error === null; + }); + return true; + } catch { + return false; + } +} + +/** + * 以管理员权限重新启动应用 + */ +export function relaunchAsAdmin(): void { + if (process.platform !== 'win32') { + return; + } + + const appPath = process.execPath; + const appArgs = process.argv.slice(1); + + try { + execFile( + 'powershell.exe', + [ + '-Command', + `Start-Process -Verb RunAs -FilePath '${appPath}' -ArgumentList '${appArgs.join(' ')}'` + ], + { windowsHide: true } + ); + + process.exit(0); + } catch (error) { + dialog.showErrorBox( + '权限要求', + 'ContextMaster 需要管理员权限才能修改系统注册表。\n\n' + + '请右键点击应用图标,选择「以管理员身份运行」。' + ); + process.exit(1); + } +} + +/** + * 显示权限不足对话框并提供重新启动选项 + */ +export function showAdminPermissionDialog(): void { + dialog.showMessageBox({ + type: 'warning', + buttons: ['以管理员身份重启', '退出'], + defaultId: 0, + cancelId: 1, + title: '需要管理员权限', + message: 'ContextMaster 需要管理员权限', + detail: '为了能够修改 Windows 右键菜单(注册表),应用需要以管理员权限运行。\n\n' + + '点击「以管理员身份重启」来重新启动应用。' + }).then((result) => { + if (result.response === 0) { + relaunchAsAdmin(); + } else { + process.exit(0); + } + }); +}