{ "name": "auto-git-sync", "displayName": "Auto Git Sync - 自动Git同步", "description": "每行代码更改后自动提交并推送到你自己的Gitea服务器,按日期每天一个提交", "version": "2.0.0", "publisher": "kozyax", "engines": { "vscode": "^1.85.0" }, "categories": [ "Other", "SCM" ], "activationEvents": [ "onStartupFinished" ], "main": "./out/extension.js", "contributes": { "commands": [ { "command": "autoGitSync.enable", "title": "Auto Git: 启用自动同步" }, { "command": "autoGitSync.disable", "title": "Auto Git: 停用自动同步" }, { "command": "autoGitSync.forceSync", "title": "Auto Git: 立即同步" }, { "command": "autoGitSync.initRepo", "title": "Auto Git: 🏗️ 创建Git仓库并推送到Gitea" }, { "command": "autoGitSync.viewLog", "title": "Auto Git: 📋 查看版本日志" }, { "command": "autoGitSync.restoreVersion", "title": "Auto Git: ⏪ 恢复到指定版本" }, { "command": "autoGitSync.createBranch", "title": "Auto Git: 🌿 创建新分支" }, { "command": "autoGitSync.switchBranch", "title": "Auto Git: 🔀 切换分支" }, { "command": "autoGitSync.pullLatest", "title": "Auto Git: ⬇️ 拉取最新代码" } ], "menus": { "explorer/context": [ { "command": "autoGitSync.initRepo", "when": "!explorerResourceIsFolder || explorerResourceIsFolder", "group": "autoGitSync@1" }, { "command": "autoGitSync.forceSync", "group": "autoGitSync@2" }, { "command": "autoGitSync.viewLog", "group": "autoGitSync@3" }, { "command": "autoGitSync.restoreVersion", "group": "autoGitSync@4" }, { "command": "autoGitSync.createBranch", "group": "autoGitSync@5" }, { "command": "autoGitSync.switchBranch", "group": "autoGitSync@6" }, { "command": "autoGitSync.pullLatest", "group": "autoGitSync@7" }, { "command": "autoGitSync.enable", "group": "autoGitSync@8" }, { "command": "autoGitSync.disable", "group": "autoGitSync@9" } ], "editor/title/context": [ { "command": "autoGitSync.forceSync", "group": "autoGitSync@1" }, { "command": "autoGitSync.viewLog", "group": "autoGitSync@2" } ] }, "configuration": { "title": "Auto Git Sync 配置", "properties": { "autoGitSync.giteaUrl": { "type": "string", "default": "http://localhost:3000", "description": "Gitea 服务器地址" }, "autoGitSync.giteaToken": { "type": "string", "default": "", "description": "Gitea 访问令牌 (在Gitea设置 -> 应用 -> 生成令牌)" }, "autoGitSync.autoPush": { "type": "boolean", "default": true, "description": "提交后是否自动推送到远程" }, "autoGitSync.debounceSeconds": { "type": "number", "default": 5, "description": "保存后等待几秒再提交(防抖)" }, "autoGitSync.dailyCommit": { "type": "boolean", "default": true, "description": "按日期每天一个提交(追加到当天提交)" }, "autoGitSync.enabled": { "type": "boolean", "default": true, "description": "是否启用自动同步" } } } }, "scripts": { "vscode:prepublish": "npm run compile", "compile": "tsc -p ./", "watch": "tsc -watch -p ./", "pretest": "npm run compile && npm run lint", "lint": "eslint src --ext ts" }, "devDependencies": { "@types/vscode": "^1.85.0", "@types/node": "18.x", "typescript": "^5.3.0" } }