uniner-cli 1.0.9 → 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.
Files changed (2) hide show
  1. package/bin/uniner-cli.js +40 -1
  2. package/package.json +1 -1
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniner-cli",
3
- "version": "1.0.9",
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",