@monostate/browsernative-client 1.1.2 → 1.2.0

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/README.md +30 -13
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # @browsernative/client
1
+ # @monostate/browsernative-client
2
2
 
3
3
  > **Official JavaScript/TypeScript client for Browser Native API**
4
4
 
5
- [![npm version](https://badge.fury.io/js/%40browsernative%2Fclient.svg)](https://badge.fury.io/js/%40browsernative%2Fclient)
5
+ [![npm version](https://badge.fury.io/js/%40monostate%2Fbrowsernative-client.svg)](https://badge.fury.io/js/%40monostate%2Fbrowsernative-client)
6
6
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
7
7
  [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](../../LICENSE)
8
8
 
@@ -13,11 +13,11 @@ A lightweight, fast, and reliable client for the Browser Native web scraping and
13
13
  ### Installation
14
14
 
15
15
  ```bash
16
- npm install @browsernative/client
16
+ npm install @monostate/browsernative-client
17
17
  # or
18
- yarn add @browsernative/client
18
+ yarn add @monostate/browsernative-client
19
19
  # or
20
- pnpm add @browsernative/client
20
+ pnpm add @monostate/browsernative-client
21
21
  ```
22
22
 
23
23
  ### Get Your API Key
@@ -29,7 +29,7 @@ pnpm add @browsernative/client
29
29
  ### Basic Usage
30
30
 
31
31
  ```javascript
32
- import { BrowserNativeClient } from '@browsernative/client';
32
+ import { BrowserNativeClient } from '@monostate/browsernative-client';
33
33
 
34
34
  const client = new BrowserNativeClient('your-api-key');
35
35
 
@@ -46,7 +46,7 @@ console.log(screenshot.screenshot); // Base64 image
46
46
  ### Quick Functions
47
47
 
48
48
  ```javascript
49
- import { quickScrape, quickScreenshot, quickShot, quickAnalyze } from '@browsernative/client';
49
+ import { quickScrape, quickScreenshot, quickShot, quickAnalyze } from '@monostate/browsernative-client';
50
50
 
51
51
  // One-line scraping
52
52
  const content = await quickScrape('https://example.com', 'your-api-key');
@@ -199,7 +199,7 @@ console.log(health.data.services); // Service status breakdown
199
199
  ```javascript
200
200
  // hooks/useBrowserNative.js
201
201
  import { useState } from 'react';
202
- import { BrowserNativeClient } from '@browsernative/client';
202
+ import { BrowserNativeClient } from '@monostate/browsernative-client';
203
203
 
204
204
  export function useBrowserNative(apiKey) {
205
205
  const [loading, setLoading] = useState(false);
@@ -235,7 +235,7 @@ export function useBrowserNative(apiKey) {
235
235
  ```javascript
236
236
  // composables/useBrowserNative.js
237
237
  import { ref } from 'vue';
238
- import { BrowserNativeClient } from '@browsernative/client';
238
+ import { BrowserNativeClient } from '@monostate/browsernative-client';
239
239
 
240
240
  export function useBrowserNative(apiKey) {
241
241
  const loading = ref(false);
@@ -270,7 +270,7 @@ export function useBrowserNative(apiKey) {
270
270
 
271
271
  ```javascript
272
272
  // pages/api/scrape.js
273
- import { BrowserNativeClient } from '@browsernative/client';
273
+ import { BrowserNativeClient } from '@monostate/browsernative-client';
274
274
 
275
275
  const client = new BrowserNativeClient(process.env.BROWSER_NATIVE_API_KEY);
276
276
 
@@ -300,7 +300,7 @@ export default async function handler(req, res) {
300
300
 
301
301
  ```javascript
302
302
  import express from 'express';
303
- import { BrowserNativeClient } from '@browsernative/client';
303
+ import { BrowserNativeClient } from '@monostate/browsernative-client';
304
304
 
305
305
  const app = express();
306
306
  const client = new BrowserNativeClient(process.env.BROWSER_NATIVE_API_KEY);
@@ -342,7 +342,7 @@ You can use this client directly in browsers, but be careful with API keys:
342
342
  </head>
343
343
  <body>
344
344
  <script type="module">
345
- import { BrowserNativeClient } from 'https://cdn.skypack.dev/@browsernative/client';
345
+ import { BrowserNativeClient } from 'https://cdn.skypack.dev/@monostate/browsernative-client';
346
346
 
347
347
  // ⚠️ Never expose your API key in client-side code!
348
348
  // Use a proxy server or environment variables
@@ -405,7 +405,7 @@ Common error scenarios:
405
405
  Full TypeScript support with comprehensive type definitions:
406
406
 
407
407
  ```typescript
408
- import { BrowserNativeClient, ScrapeResult, AnalyzeResult } from '@browsernative/client';
408
+ import { BrowserNativeClient, ScrapeResult, AnalyzeResult } from '@monostate/browsernative-client';
409
409
 
410
410
  const client: BrowserNativeClient = new BrowserNativeClient('your-api-key');
411
411
 
@@ -422,6 +422,23 @@ const analysis: AnalyzeResult = await client.analyze(url, question);
422
422
  | **Pro** | 100,000 | 300/minute |
423
423
  | **Enterprise** | Unlimited | Custom |
424
424
 
425
+ ## 📋 Changelog
426
+
427
+ ### v1.2.0 (Latest)
428
+ - 🔧 **Timeout Improvements**: Enhanced timeout handling and request reliability
429
+ - 📝 **Documentation Updates**: Comprehensive API documentation and examples
430
+ - 🏷️ **Package Naming**: Proper package name consistency across all imports
431
+ - ⚡ **Performance Optimizations**: Better error handling and response processing
432
+ - 🌐 **Framework Integration**: Improved React, Vue, and Next.js examples
433
+
434
+ ### v1.1.2
435
+ - Bug fixes and stability improvements
436
+ - Enhanced error handling
437
+
438
+ ### v1.1.1
439
+ - Initial TypeScript support
440
+ - Basic API client functionality
441
+
425
442
  ## 🤝 Support
426
443
 
427
444
  - 📧 **Email**: [support@bnca.monostate.ai](mailto:support@bnca.monostate.ai)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monostate/browsernative-client",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "Browser Native client SDK for web scraping and content extraction API",
5
5
  "type": "module",
6
6
  "main": "index.js",