uniner-cli 1.0.8 → 1.0.10

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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  - **Excel 操作** —— 读写、批量处理、样式
7
7
  - **OCR 识别** —— 支持验证码和通用 OCR
8
8
  - **桌面 / SAP 自动化** —— 支持桌面软件的自动化(仅 Windows)
9
- - **通用工具** —— 加密、HTTP、邮件、文件、PDF、压缩
9
+ - **通用工具** —— 加密、HTTP、邮件、文件、PDF、压缩、FTP
10
10
 
11
11
  安装时会自动注册一个 [Claude Code](https://claude.com/claude-code) 技能(`~/.claude/skills/uniner-cli/SKILL.md`),让 Claude 一启动就能识别并调用本 CLI。
12
12
 
@@ -178,6 +178,12 @@ npm install -g uniner-cli
178
178
 
179
179
  ## Changelog
180
180
 
181
+ ### 1.1.0 (2026-07-05)
182
+
183
+ - **feat**: SDK 1.24.0 同步 —— 新增 `tool ftp` 子命令(create-folder / check-folder / check-file / list-dir),跨平台可用
184
+ - **feat**: `web browser close` 现在自动终止残留 chrome.exe 进程,避免进程泄漏
185
+ - **feat**: `tool zip` 新增 `--if-exists` 参数控制文件已存在时的行为(Windows-only)
186
+
181
187
  ### 1.0.8 (2026-06-30)
182
188
 
183
189
  - **feat**: 改进 `uniner-cli uninstall`,增强清理逻辑与兼容性
package/bin/uniner-cli.js CHANGED
@@ -26,6 +26,19 @@ function printUninstallHelp() {
26
26
  console.log('');
27
27
  }
28
28
 
29
+ function isTopLevelHelp(args) {
30
+ return args.length === 1 &&
31
+ (args[0] === '--help' || args[0] === '-h' || args[0] === 'help');
32
+ }
33
+
34
+ function printPackageCommandsHelp() {
35
+ console.log('');
36
+ console.log('Package commands:');
37
+ console.log(' uninstall Clean runtime files and remove this npm package');
38
+ console.log('');
39
+ console.log('Run "uniner-cli uninstall --help" for uninstall options.');
40
+ }
41
+
29
42
  function realPath(p) {
30
43
  try {
31
44
  return fs.realpathSync.native(p);
@@ -204,6 +217,7 @@ if (process.argv[2] === 'uninstall') {
204
217
  }
205
218
 
206
219
  const exe = realBinaryPath();
220
+ const forwardedArgs = process.argv.slice(2);
207
221
 
208
222
  if (!isInstalled()) {
209
223
  console.error('');
@@ -216,9 +230,34 @@ if (!isInstalled()) {
216
230
  process.exit(127);
217
231
  }
218
232
 
233
+ if (isTopLevelHelp(forwardedArgs)) {
234
+ const helpResult = spawnSync(exe, forwardedArgs, {
235
+ encoding: 'utf8',
236
+ shell: false,
237
+ windowsHide: false,
238
+ });
239
+
240
+ if (helpResult.stdout) {
241
+ process.stdout.write(helpResult.stdout);
242
+ }
243
+ if (helpResult.stderr) {
244
+ process.stderr.write(helpResult.stderr);
245
+ }
246
+ if (helpResult.error) {
247
+ console.error(`[uniner-cli] Failed to launch ${exe}: ${helpResult.error.message}`);
248
+ process.exit(1);
249
+ }
250
+
251
+ const status = helpResult.status === null ? 1 : helpResult.status;
252
+ if (status === 0) {
253
+ printPackageCommandsHelp();
254
+ }
255
+ process.exit(status);
256
+ }
257
+
219
258
  // stdio:'inherit' forwards stdin/stdout/stderr unchanged so interactive prompts
220
259
  // and ANSI color survive. shell:false avoids any path-quoting surprises.
221
- const result = spawnSync(exe, process.argv.slice(2), {
260
+ const result = spawnSync(exe, forwardedArgs, {
222
261
  stdio: 'inherit',
223
262
  shell: false,
224
263
  windowsHide: false,
@@ -152,7 +152,7 @@ uniner-cli [全局选项] <模块> <子命令> <命令> [命令选项]
152
152
  ## 关键注意事项(6 条 TOC,详情看链接)
153
153
 
154
154
  1. **Chrome CDP 自动管理** — 别手动 kill Chrome;客户机必须装 Chrome 或 Edge
155
- 2. **session 持久化** — `$TEMP/uniner-cli-sessions/sessions.json`(Windows: `%TEMP%\uniner-cli-sessions\sessions.json`);CLI 退出后用 `web browser reconnect` 恢复
155
+ 2. **session 持久化** — `$TEMP/.uniner-cli/sessions.json`(Windows: `%TEMP%\.uniner-cli\sessions.json`);CLI 退出后用 `web browser reconnect` 恢复
156
156
  3. **Vue/Element UI 组件** — 日期选择器、级联下拉等,用 `execute-js` 直接操作组件模型,不要硬 input
157
157
  4. **desktop 返回 -999** = Agent 服务未启动;此时改用 `web action execute-js` 或 `tool system execute`
158
158
  5. **Linux 平台** — Playwright 默认 HTTPS-only,访问 HTTP 站点需改 wrapper 加 `--disable-features=HttpsOnlyMode`,或用 Firefox `--browser-type 1`
@@ -163,8 +163,11 @@ uniner-cli [全局选项] <模块> <子命令> <命令> [命令选项]
163
163
  | 主题 | 路径 |
164
164
  |---|---|
165
165
  | 命令树全集 + 三级参数 | [{{INSTALL_PATH}}/skills/cli/SKILL.md]({{INSTALL_PATH}}/skills/cli/SKILL.md) |
166
- | SDK ↔ CLI 命令映射 | [{{INSTALL_PATH}}/skills/cli/sdk-cli-mapping.md]({{INSTALL_PATH}}/skills/cli/sdk-cli-mapping.md) |
166
+ | 完整命令结构(120+ 命令) | [{{INSTALL_PATH}}/skills/cli/command-tree.md]({{INSTALL_PATH}}/skills/cli/command-tree.md) |
167
+ | execute-js 使用指南 | [{{INSTALL_PATH}}/skills/cli/execute-js-guide.md]({{INSTALL_PATH}}/skills/cli/execute-js-guide.md) |
168
+ | 典型场景示例 | [{{INSTALL_PATH}}/skills/cli/examples.md]({{INSTALL_PATH}}/skills/cli/examples.md) |
167
169
  | Windows 配置指南 | [{{INSTALL_PATH}}/skills/windows-setup-guide.md]({{INSTALL_PATH}}/skills/windows-setup-guide.md) |
170
+ | macOS 配置指南 | [{{INSTALL_PATH}}/skills/macos-setup-guide.md]({{INSTALL_PATH}}/skills/macos-setup-guide.md) |
168
171
  | Linux 配置指南 | [{{INSTALL_PATH}}/skills/linux-setup-guide.md]({{INSTALL_PATH}}/skills/linux-setup-guide.md) |
169
172
  | 实战案例(TMS 抓单) | [{{INSTALL_PATH}}/skills/tms-workflow-test-report.md]({{INSTALL_PATH}}/skills/tms-workflow-test-report.md) |
170
173
  | Helper 脚本(Chrome 启动 / Vue 日期 / 表格提取) | [{{INSTALL_PATH}}/skills/cli/helpers/]({{INSTALL_PATH}}/skills/cli/helpers/) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniner-cli",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "uniner-cli — RPA automation CLI: browser automation (Playwright/CDP), Excel, OCR, desktop/SAP, crypto/HTTP/email tools. Auto-installs a Claude Code skill on install.",
5
5
  "keywords": [
6
6
  "rpa",