@xbrowser/cli 1.4.1 → 1.4.2
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/dist/cli.js +7 -1
- package/dist/index.js +7 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -12407,7 +12407,13 @@ async function routeCommand(argvIn, stdinCommands) {
|
|
|
12407
12407
|
const spaceIdx = argv[0].indexOf(" ");
|
|
12408
12408
|
const possibleCmd = argv[0].substring(0, spaceIdx);
|
|
12409
12409
|
if (/^[a-zA-Z][\w-]*$/.test(possibleCmd)) {
|
|
12410
|
-
|
|
12410
|
+
const remainder = argv[0].substring(spaceIdx + 1);
|
|
12411
|
+
if (remainder.startsWith("--") || remainder.includes(" --") && !remainder.match(/^\w+:\/\//)) {
|
|
12412
|
+
const remainderParts = remainder.split(/\s+/).filter(Boolean);
|
|
12413
|
+
argv = [possibleCmd, ...remainderParts, ...argv.slice(1)];
|
|
12414
|
+
} else {
|
|
12415
|
+
argv = [possibleCmd, remainder, ...argv.slice(1)];
|
|
12416
|
+
}
|
|
12411
12417
|
}
|
|
12412
12418
|
}
|
|
12413
12419
|
} catch (e) {
|
package/dist/index.js
CHANGED
|
@@ -12747,7 +12747,13 @@ async function routeCommand(argvIn, stdinCommands) {
|
|
|
12747
12747
|
const spaceIdx = argv[0].indexOf(" ");
|
|
12748
12748
|
const possibleCmd = argv[0].substring(0, spaceIdx);
|
|
12749
12749
|
if (/^[a-zA-Z][\w-]*$/.test(possibleCmd)) {
|
|
12750
|
-
|
|
12750
|
+
const remainder = argv[0].substring(spaceIdx + 1);
|
|
12751
|
+
if (remainder.startsWith("--") || remainder.includes(" --") && !remainder.match(/^\w+:\/\//)) {
|
|
12752
|
+
const remainderParts = remainder.split(/\s+/).filter(Boolean);
|
|
12753
|
+
argv = [possibleCmd, ...remainderParts, ...argv.slice(1)];
|
|
12754
|
+
} else {
|
|
12755
|
+
argv = [possibleCmd, remainder, ...argv.slice(1)];
|
|
12756
|
+
}
|
|
12751
12757
|
}
|
|
12752
12758
|
}
|
|
12753
12759
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xbrowser/cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Browser automation CLI for web scraping, headless browsing, SEO analysis, and AI agent workflows. A command-line alternative to Playwright, Puppeteer, and Selenium.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|