uniner-cli 1.0.9 → 1.0.11
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 +10 -1
- package/bin/uniner-cli.js +40 -1
- package/lib/SKILL.md.template +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,7 @@ uniner-cli --help
|
|
|
61
61
|
uniner-cli web browser open --url "https://example.com"
|
|
62
62
|
uniner-cli web element click --xpath "//button[@id='submit']"
|
|
63
63
|
uniner-cli web element get-text --xpath "//h1"
|
|
64
|
+
uniner-cli web action pdf --output report.pdf
|
|
64
65
|
|
|
65
66
|
# Excel
|
|
66
67
|
uniner-cli excel data read --file data.xlsx --cell A1
|
|
@@ -178,7 +179,15 @@ npm install -g uniner-cli
|
|
|
178
179
|
|
|
179
180
|
## Changelog
|
|
180
181
|
|
|
181
|
-
### 1.
|
|
182
|
+
### 1.0.11 (2026-07-16)
|
|
183
|
+
|
|
184
|
+
- **feat**: 新增 `web action pdf` 命令,支持将当前网页导出为 PDF(纸张格式 / 横向 / 背景 / 页边距 / 页眉页脚 / 缩放 / 页面范围)。SDK 层新增 `chrome.pdf()` 方法。
|
|
185
|
+
|
|
186
|
+
### 1.0.10 (2026-07-10)
|
|
187
|
+
|
|
188
|
+
- **feat**: 优化 Windows 端用户体验
|
|
189
|
+
|
|
190
|
+
### 1.0.9 (2026-07-05)
|
|
182
191
|
|
|
183
192
|
- **feat**: SDK 1.24.0 同步 —— 新增 `tool ftp` 子命令(create-folder / check-folder / check-file / list-dir),跨平台可用
|
|
184
193
|
- **feat**: `web browser close` 现在自动终止残留 chrome.exe 进程,避免进程泄漏
|
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,
|
|
260
|
+
const result = spawnSync(exe, forwardedArgs, {
|
|
222
261
|
stdio: 'inherit',
|
|
223
262
|
shell: false,
|
|
224
263
|
windowsHide: false,
|
package/lib/SKILL.md.template
CHANGED
|
@@ -64,7 +64,7 @@ web 浏览器自动化(Playwright + CDP)
|
|
|
64
64
|
├── element click / input / get-text / get-value / select / check / hover / screenshot
|
|
65
65
|
├── iframe enter / exit / list
|
|
66
66
|
├── page list / switch / close
|
|
67
|
-
└── action screenshot / execute-js / get-cookie / set-cookie
|
|
67
|
+
└── action screenshot / pdf / execute-js / get-cookie / set-cookie
|
|
68
68
|
|
|
69
69
|
tool 通用工具
|
|
70
70
|
├── list 创建 / append / remove / find / sort / unique
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniner-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
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",
|