quick-sh 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,251 @@
1
+ {
2
+ "app": {
3
+ "name": "快速脚本工具 (q) - 脚本管理工具",
4
+ "description": "一个强大的本地和远程脚本管理工具"
5
+ },
6
+ "help": {
7
+ "usage": "用法:",
8
+ "localScripts": "本地脚本:",
9
+ "remoteScripts": "远程脚本:",
10
+ "examples": "示例:",
11
+ "configFiles": "配置文件:",
12
+ "executeScript": "执行脚本",
13
+ "listScripts": "列出可用脚本",
14
+ "setDirectory": "设置脚本目录",
15
+ "runScript": "运行 {{script}}",
16
+ "runWithArgs": "带参数运行",
17
+ "listSources": "列出脚本源",
18
+ "addGithubSource": "添加 GitHub 源",
19
+ "downloadScript": "下载脚本",
20
+ "listDownloaded": "列出已下载脚本",
21
+ "globalConfig": "全局配置",
22
+ "aliasConfig": "别名配置",
23
+ "showHelp": "显示帮助信息",
24
+ "setLanguage": "设置或显示语言",
25
+ "setChineseExample": "设置语言为中文",
26
+ "showLanguageExample": "显示当前语言设置",
27
+ "aiChat": "AI聊天配置",
28
+ "configureAI": "配置AI模型",
29
+ "useAIModel": "使用指定AI模型聊天"
30
+ },
31
+ "commands": {
32
+ "pathSet": "脚本路径已设置为: {{path}}",
33
+ "pathNotFound": "路径不存在: {{path}}",
34
+ "noPathConfigured": "未配置脚本路径。使用 \"q -path <目录>\" 设置路径。",
35
+ "executingAlias": "执行别名 ({{type}} 路径): {{path}}",
36
+ "executingRemote": "执行远程脚本: {{script}}",
37
+ "aliasNotFound": "别名目标未找到: {{path}}",
38
+ "systemCommandNotFound": "系统命令未找到: {{command}}",
39
+ "invalidAlias": "无效的别名配置: {{name}}",
40
+ "commandNotFound": "命令未找到: {{command}}",
41
+ "lookedIn": "查找位置:",
42
+ "aliasConfig": "- 别名配置: {{path}}",
43
+ "scriptDirectory": "- 脚本目录: {{path}}",
44
+ "remoteScripts": "- 远程脚本: {{path}}",
45
+ "systemPath": "- 系统 PATH",
46
+ "languageSet": "语言已设置为: {{language}}",
47
+ "unsupportedLanguage": "不支持的语言: {{language}}。支持的语言: {{supported}}",
48
+ "currentLanguage": "当前语言设置:",
49
+ "activeLanguage": "当前使用语言",
50
+ "userSetLanguage": "用户设置语言",
51
+ "autoDetected": "系统自动检测",
52
+ "yes": "是",
53
+ "supportedLanguages": "支持的语言",
54
+ "current": "当前"
55
+ },
56
+ "status": {
57
+ "currentPath": "📁 当前脚本路径: {{path}}",
58
+ "configuredAliases": "🔗 配置的别名:",
59
+ "projectScripts": "📝 项目脚本:",
60
+ "absolutePathScripts": "🔧 绝对路径脚本:",
61
+ "systemCommandAliases": "⚡ 系统命令别名:",
62
+ "availableScripts": "📂 目录中的可用脚本:",
63
+ "rootDirectory": "📁 根目录:",
64
+ "remoteScriptsTitle": "📡 远程脚本:",
65
+ "noRemoteScripts": "📭 尚未下载远程脚本",
66
+ "downloadTip": "💡 使用 \"q --download <源> <脚本>\" 下载脚本",
67
+ "noScriptsFound": "❌ 在目录中未找到可执行脚本。",
68
+ "usageTips": "💡 使用提示:",
69
+ "useAliases": "• 使用别名执行配置的命令 (例如: q commit)",
70
+ "useFileNames": "• 使用文件名直接执行脚本 (例如: q script-name)",
71
+ "useDirectories": "• 使用目录名执行目录脚本 (例如: q directory-name)",
72
+ "useRemote": "• 直接使用远程脚本名 (例如: q remote-script)",
73
+ "getHelp": "• 运行 \"q --help\" 获取帮助",
74
+ "manageSources": "• 运行 \"q --sources\" 管理远程脚本源",
75
+ "errorScanning": "❌ 扫描脚本目录时出错: {{error}}"
76
+ },
77
+ "remote": {
78
+ "sourceAdded": "✅ 源 \"{{name}}\" 添加成功",
79
+ "sourceRemoved": "✅ 源 \"{{name}}\" 删除成功",
80
+ "sourceNotFound": "源 \"{{name}}\" 不存在",
81
+ "scriptsDeleted": "🗑️ 已删除源 \"{{name}}\" 的所有脚本",
82
+ "noSources": "📭 没有配置的源",
83
+ "sourcesTitle": "📡 已配置的脚本源:",
84
+ "sourceInfo": "🔗 {{name}}",
85
+ "sourceType": " 类型: {{type}}",
86
+ "sourceUrl": " 链接: {{url}}",
87
+ "sourceAdded2": " 添加时间: {{date}}",
88
+ "scriptCount": " 脚本数: {{count}}",
89
+ "downloadingFromGithub": "📥 从 GitHub 下载: {{url}}",
90
+ "downloadingFromUrl": "📥 从 URL 下载: {{url}}",
91
+ "downloadSuccess": "✅ 脚本下载成功: {{path}}",
92
+ "downloadFailed": "下载失败: {{error}}",
93
+ "remoteScriptsTitle": "📂 已下载的远程脚本:",
94
+ "sourcePrefix": "📡 源: {{name}} ({{type}})",
95
+ "scriptFile": " 📄 {{script}}",
96
+ "totalScripts": "📊 总计: {{count}} 个远程脚本",
97
+ "noRemoteDownloaded": "📭 没有下载的远程脚本",
98
+ "scriptRemoved": "✅ 已删除远程脚本: {{script}}",
99
+ "scriptNotFound": "脚本 \"{{script}}\" 不存在",
100
+ "invalidSourceType": "不支持的源类型: {{type}}。支持的类型: {{types}}",
101
+ "sourceNameRequired": "需要源名称、类型和URL",
102
+ "invalidGithubUrl": "无效的 GitHub URL 格式"
103
+ },
104
+ "errors": {
105
+ "configWriteError": "写入配置时出错: {{error}}",
106
+ "downloadTimeout": "下载超时",
107
+ "httpError": "HTTP {{code}}: {{message}}",
108
+ "networkError": "网络错误: {{error}}",
109
+ "fileNotFound": "文件未找到: {{path}}",
110
+ "permissionDenied": "权限被拒绝: {{path}}",
111
+ "unknownError": "未知错误: {{error}}"
112
+ },
113
+ "git": {
114
+ "accountTitle": "🔧 Git 账户管理",
115
+ "currentAccount": "📋 当前账户:",
116
+ "availableAccounts": "📋 可用账户:",
117
+ "noAccountsConfigured": "📭 尚未配置账户",
118
+ "addFirstAccount": "💡 使用选项 2 添加你的第一个账户",
119
+ "selectOption": "请选择选项 (1-5):",
120
+ "switchAccount": "[1] 切换账户",
121
+ "addAccount": "[2] 添加新账户",
122
+ "deleteAccount": "[3] 删除账户",
123
+ "refreshDisplay": "[4] 刷新显示",
124
+ "exitTool": "[5] 退出",
125
+ "enterAccountName": "输入账户名:",
126
+ "enterUserName": "输入用户名:",
127
+ "enterUserEmail": "输入用户邮箱:",
128
+ "accountAdded": "✅ 账户 '{{name}}' 添加成功!",
129
+ "accountSwitched": "✅ 已切换到账户 '{{name}}'",
130
+ "selectAccountToDelete": "选择要删除的账户:",
131
+ "confirmDelete": "确定要删除账户 '{{name}}' 吗? (y/N):",
132
+ "accountDeleted": "✅ 账户 '{{name}}' 删除成功",
133
+ "deleteCancelled": "❌ 删除已取消",
134
+ "invalidOption": "❌ 无效选项,请重试",
135
+ "noAccountsToSwitch": "❌ 没有可切换的账户",
136
+ "noAccountsToDelete": "❌ 没有可删除的账户",
137
+ "accountExists": "❌ 账户 '{{name}}' 已存在",
138
+ "gitConfigError": "❌ 配置 git 失败: {{error}}"
139
+ },
140
+ "npm": {
141
+ "toolTitle": "📦 NPM 版本管理工具",
142
+ "projectInfo": "📋 项目信息:",
143
+ "projectName": " 项目: {{name}}",
144
+ "currentVersion": " 当前版本: {{version}}",
145
+ "projectDirectory": " 项目目录: {{path}}",
146
+ "latestTag": " 最新标签: {{tag}}",
147
+ "unreleasedCommits": " 未发布提交: {{count}}",
148
+ "availableActions": "📋 可用操作:",
149
+ "updateVersion": "[1] 更新包版本",
150
+ "viewHistory": "[2] 查看版本历史",
151
+ "viewUnreleased": "[3] 查看未发布提交",
152
+ "refreshDisplay": "[4] 刷新显示",
153
+ "exitTool": "[0] 退出",
154
+ "selectAction": "请选择操作 (0-4):",
155
+ "selectVersionType": "📦 选择版本更新类型:",
156
+ "patchVersion": "[1] patch - 错误修复",
157
+ "minorVersion": "[2] minor - 新功能",
158
+ "majorVersion": "[3] major - 破坏性变更",
159
+ "newVersionWillBe": "(新版本: {{version}})",
160
+ "selectVersionTypePrompt": "请选择版本类型 (1-3):",
161
+ "versionUpdateStarting": "🚀 开始版本更新...",
162
+ "switchingToProject": "✅ 切换到项目目录: {{path}}",
163
+ "updatedPackageJson": "✅ 已更新 package.json",
164
+ "updatedPackageLock": "✅ 已更新 package-lock.json",
165
+ "updatedChangelog": "✅ 已更新 CHANGELOG.md",
166
+ "committedChanges": "✅ 已提交版本变更",
167
+ "createdGitTag": "✅ 已创建 Git 标签: {{tag}}",
168
+ "versionUpdateComplete": "🎉 版本更新完成!",
169
+ "newVersion": " 新版本: {{version}}",
170
+ "gitTag": " Git 标签: {{tag}}",
171
+ "changedFiles": " 变更文件: package.json, package-lock.json, CHANGELOG.md",
172
+ "pushToRemote": "推送到远程仓库? (y/N):",
173
+ "pushedToRemote": "✅ 已推送到远程仓库",
174
+ "pushFailed": "推送失败: {{error}}",
175
+ "versionUpdateFailed": "版本更新失败: {{error}}",
176
+ "updateCancelled": "版本更新已取消",
177
+ "packageJsonNotFound": "未找到 package.json",
178
+ "uncommittedChanges": "⚠️ 工作目录有未提交的变更,建议先提交",
179
+ "continueAnyway": "仍要继续? (y/N):",
180
+ "foundCommits": "📋 找到 {{count}} 个提交"
181
+ },
182
+ "ai": {
183
+ "configTitle": "AI 配置",
184
+ "configOptions": "配置选项",
185
+ "addModel": "添加模型",
186
+ "editModel": "编辑模型",
187
+ "deleteModel": "删除模型",
188
+ "showConfig": "显示配置",
189
+ "exit": "退出",
190
+ "selectOption": "请选择选项 (1-5)",
191
+ "invalidOption": "无效选项,请重试",
192
+ "presetModels": "预设模型",
193
+ "customModel": "自定义模型",
194
+ "selectModel": "选择模型",
195
+ "enterApiKey": "输入 API Key",
196
+ "apiKeyRequired": "API Key 是必需的",
197
+ "modelAdded": "模型 {{model}} 添加成功",
198
+ "invalidChoice": "无效选择",
199
+ "customModelConfig": "自定义模型配置",
200
+ "modelId": "模型 ID",
201
+ "modelName": "模型名称",
202
+ "apiUrl": "API URL",
203
+ "apiPath": "API 路径",
204
+ "modelIdRequired": "模型 ID 是必需的",
205
+ "noModelsConfigured": "未配置任何模型",
206
+ "configuredModels": "已配置的模型",
207
+ "selectModelToEdit": "选择要编辑的模型",
208
+ "editingModel": "正在编辑模型 {{model}}",
209
+ "currentApiKey": "当前 API Key",
210
+ "currentMaxTokens": "当前最大令牌数",
211
+ "currentTemperature": "当前温度",
212
+ "newApiKey": "新 API Key",
213
+ "keepCurrent": "保持当前",
214
+ "newMaxTokens": "新最大令牌数",
215
+ "newTemperature": "新温度",
216
+ "modelUpdated": "模型 {{model}} 更新成功",
217
+ "selectModelToDelete": "选择要删除的模型",
218
+ "confirmDelete": "确定要删除模型 {{model}} 吗?",
219
+ "modelDeleted": "模型 {{model}} 删除成功",
220
+ "deleteCancelled": "删除已取消",
221
+ "currentConfig": "当前 AI 配置",
222
+ "useConfigCommand": "使用 'q -ai -config' 来配置 AI 模型",
223
+ "maxTokens": "最大令牌数",
224
+ "temperature": "温度",
225
+ "defaultModel": "默认模型",
226
+ "selectModelTitle": "选择 AI 模型",
227
+ "modelNotFound": "未找到模型 {{model}}",
228
+ "chatStarted": "AI 聊天已启动 - {{model}}",
229
+ "chatInstructions": "输入消息然后按回车与 AI 聊天",
230
+ "availableCommands": "可用命令",
231
+ "showHelp": "显示帮助信息",
232
+ "clearHistory": "清除对话历史",
233
+ "showHistory": "显示对话历史",
234
+ "showCurrentConfig": "显示当前模型配置",
235
+ "exitChat": "退出聊天",
236
+ "you": "你",
237
+ "goodbye": "再见!",
238
+ "unknownCommand": "未知命令: {{command}}",
239
+ "typeHelp": "输入 /help 查看可用命令",
240
+ "thinking": "AI 正在思考...",
241
+ "noResponse": "AI 没有响应",
242
+ "error": "错误: {{error}}",
243
+ "parseError": "解析 API 响应失败",
244
+ "chatHelp": "AI 聊天帮助",
245
+ "justTypeMessage": "只需输入消息然后按回车即可与 AI 聊天",
246
+ "currentModelConfig": "当前模型配置",
247
+ "conversationHistory": "对话历史",
248
+ "noHistory": "暂无对话历史",
249
+ "historyCleared": "对话历史已清除"
250
+ }
251
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quick-sh",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "A local script management tool for quick execution of JavaScript and Shell scripts with alias support",
5
5
  "main": "lib/script-manager.js",
6
6
  "bin": {
@@ -10,10 +10,18 @@
10
10
  "bin/",
11
11
  "lib/",
12
12
  "README.md",
13
- "LICENSE"
13
+ "LICENSE",
14
+ "locales/"
14
15
  ],
15
16
  "scripts": {
16
- "test": "node test/test.js",
17
+ "test": "node test/run-all.js",
18
+ "test:legacy": "node test/test.js",
19
+ "test:basic": "node test/basic.test.js",
20
+ "test:script": "node test/script-execution.test.js",
21
+ "test:alias": "node test/alias.test.js",
22
+ "test:error": "node test/error-handling.test.js",
23
+ "test:config": "node test/config.test.js",
24
+ "test:help": "node test/run-all.js --help",
17
25
  "test:manual": "echo \"Run manual tests with: q test-args, q test-args.sh, q test-dir\"",
18
26
  "prepublishOnly": "npm test"
19
27
  },
@@ -30,18 +38,18 @@
30
38
  "bash",
31
39
  "quick-execution"
32
40
  ],
33
- "author": "YoungChou <your-email@example.com>",
41
+ "author": "Young6118 <zy1308536472@gmail.com>",
34
42
  "license": "MIT",
35
43
  "engines": {
36
44
  "node": ">=14.0.0"
37
45
  },
38
46
  "repository": {
39
47
  "type": "git",
40
- "url": "git+https://github.com/YoungChou/quick-sh.git"
48
+ "url": "git+https://github.com/Young6118/quick-sh.git"
41
49
  },
42
- "homepage": "https://github.com/YoungChou/quick-sh#readme",
50
+ "homepage": "https://github.com/Young6118/quick-sh#readme",
43
51
  "bugs": {
44
- "url": "https://github.com/YoungChou/quick-sh/issues"
52
+ "url": "https://github.com/Young6118/quick-sh/issues"
45
53
  },
46
54
  "dependencies": {
47
55
  "commander": "^9.0.0",