@xbrowser/cli 1.5.0 → 1.5.1

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 CHANGED
@@ -5221,6 +5221,9 @@ var tabCommand = registerCommand({
5221
5221
  data: z23.unknown()
5222
5222
  }),
5223
5223
  handler: async (p, ctx) => {
5224
+ if (!ctx.browserContext) {
5225
+ return fail6("No browser context available. Use --cdp to connect to a browser first.");
5226
+ }
5224
5227
  const pages = ctx.browserContext.pages();
5225
5228
  switch (p.subcommand) {
5226
5229
  case "list":
@@ -5182,6 +5182,9 @@ var tabCommand = registerCommand({
5182
5182
  data: z23.unknown()
5183
5183
  }),
5184
5184
  handler: async (p, ctx) => {
5185
+ if (!ctx.browserContext) {
5186
+ return fail6("No browser context available. Use --cdp to connect to a browser first.");
5187
+ }
5185
5188
  const pages = ctx.browserContext.pages();
5186
5189
  switch (p.subcommand) {
5187
5190
  case "list":
package/dist/index.js CHANGED
@@ -5538,6 +5538,9 @@ var tabCommand = registerCommand({
5538
5538
  data: z23.unknown()
5539
5539
  }),
5540
5540
  handler: async (p, ctx) => {
5541
+ if (!ctx.browserContext) {
5542
+ return fail6("No browser context available. Use --cdp to connect to a browser first.");
5543
+ }
5541
5544
  const pages = ctx.browserContext.pages();
5542
5545
  switch (p.subcommand) {
5543
5546
  case "list":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xbrowser/cli",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
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": {