feat: add browser manager with page registry and Playwright stealth integration
- PageRegistry: thread-safe in-memory registry for tracking active pages by ID and alias - BrowserManager: Playwright browser lifecycle with stealth plugin, context creation, and page navigation - 8 unit tests for PageRegistry (add, get, findByIdOrAlias, hasAlias, remove, list) - 8 integration tests for BrowserManager (skipped by default, guard: VISIONL_INTEGRATION=1) - Fix: PageInfo import in core/client.ts (was incorrectly imported from api.js instead of page.js)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
||||
import http from 'node:http';
|
||||
import { VisionLClient } from '../client.js';
|
||||
import type { ApiResponse, PageInfo } from '../types/api.js';
|
||||
import type { ApiResponse } from '../types/api.js';
|
||||
import type { PageInfo } from '../types/page.js';
|
||||
|
||||
function createMockServer() {
|
||||
const server = http.createServer((req, res) => {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ApiResponse, PageInfo } from './types/api.js';
|
||||
import type { ApiResponse } from './types/api.js';
|
||||
import type { PageInfo } from './types/page.js';
|
||||
|
||||
export class VisionLClient {
|
||||
constructor(private baseUrl: string) {}
|
||||
|
||||
Reference in New Issue
Block a user