Socket
Socket
Sign inDemoInstall

chromium-bidi

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chromium-bidi - npm Package Compare versions

Comparing version 0.4.33 to 0.4.34

1

lib/cjs/bidiMapper/BidiNoOpParser.d.ts

@@ -30,2 +30,3 @@ /**

parseSetViewportParams(params: unknown): BrowsingContext.SetViewportParameters;
parseTraverseHistoryParams(params: unknown): BrowsingContext.TraverseHistoryParameters;
parseGetSessionParams(params: unknown): Cdp.GetSessionParameters;

@@ -32,0 +33,0 @@ parseSendCommandParams(params: unknown): Cdp.SendCommandParameters;

@@ -53,2 +53,5 @@ "use strict";

}
parseTraverseHistoryParams(params) {
return params;
}
// keep-sorted end

@@ -55,0 +58,0 @@ // CDP domain

@@ -29,2 +29,3 @@ /**

parseSetViewportParams(params: unknown): BrowsingContext.SetViewportParameters;
parseTraverseHistoryParams(params: unknown): BrowsingContext.TraverseHistoryParameters;
parseGetSessionParams(params: unknown): Cdp.GetSessionParameters;

@@ -31,0 +32,0 @@ parseSendCommandParams(params: unknown): Cdp.SendCommandParameters;

4

lib/cjs/bidiMapper/BidiServer.d.ts

@@ -17,2 +17,3 @@ /**

*/
import type { ICdpClient } from '../cdp/CdpClient';
import type { ICdpConnection } from '../cdp/CdpConnection.js';

@@ -23,7 +24,6 @@ import type { ChromiumBidi } from '../protocol/protocol.js';

import type { Result } from '../utils/result.js';
import type { ICdpClient } from '../cdp/CdpClient';
import type { IBidiParser } from './BidiParser.js';
import type { IBidiTransport } from './BidiTransport.js';
import { BrowsingContextStorage } from './domains/context/BrowsingContextStorage.js';
import type { OutgoingMessage } from './OutgoingMessage.js';
import { BrowsingContextStorage } from './domains/context/BrowsingContextStorage.js';
type BidiServerEvent = {

@@ -30,0 +30,0 @@ message: ChromiumBidi.Command;

@@ -17,2 +17,3 @@ /**

*/
import type { ICdpClient } from '../cdp/CdpClient';
import type { ICdpConnection } from '../cdp/CdpConnection.js';

@@ -23,8 +24,7 @@ import { type ChromiumBidi } from '../protocol/protocol.js';

import type { Result } from '../utils/result.js';
import type { ICdpClient } from '../cdp/CdpClient';
import type { IBidiParser } from './BidiParser.js';
import { OutgoingMessage } from './OutgoingMessage.js';
import type { BrowsingContextStorage } from './domains/context/BrowsingContextStorage.js';
import type { EventManager } from './domains/events/EventManager.js';
import type { RealmStorage } from './domains/script/RealmStorage.js';
import { OutgoingMessage } from './OutgoingMessage.js';
export declare const enum CommandProcessorEvents {

@@ -31,0 +31,0 @@ Response = "response"

@@ -24,3 +24,2 @@ "use strict";

const BidiNoOpParser_js_1 = require("./BidiNoOpParser.js");
const OutgoingMessage_js_1 = require("./OutgoingMessage.js");
const BrowserProcessor_js_1 = require("./domains/browser/BrowserProcessor.js");

@@ -30,7 +29,8 @@ const CdpProcessor_js_1 = require("./domains/cdp/CdpProcessor.js");

const InputProcessor_js_1 = require("./domains/input/InputProcessor.js");
const NetworkProcessor_js_1 = require("./domains/network/NetworkProcessor.js");
const NetworkStorage_js_1 = require("./domains/network/NetworkStorage.js");
const PreloadScriptStorage_js_1 = require("./domains/script/PreloadScriptStorage.js");
const ScriptProcessor_js_1 = require("./domains/script/ScriptProcessor.js");
const NetworkProcessor_js_1 = require("./domains/network/NetworkProcessor.js");
const SessionProcessor_js_1 = require("./domains/session/SessionProcessor.js");
const NetworkStorage_js_1 = require("./domains/network/NetworkStorage.js");
const OutgoingMessage_js_1 = require("./OutgoingMessage.js");
class CommandProcessor extends EventEmitter_js_1.EventEmitter {

@@ -52,3 +52,3 @@ // keep-sorted start

this.#logger = logger;
const networkStorage = new NetworkStorage_js_1.NetworkStorage(eventManager);
const networkStorage = new NetworkStorage_js_1.NetworkStorage();
const preloadScriptStorage = new PreloadScriptStorage_js_1.PreloadScriptStorage();

@@ -90,2 +90,4 @@ // keep-sorted start block=yes

return await this.#browsingContextProcessor.handleUserPrompt(this.#parser.parseHandleUserPromptParams(command.params));
case 'browsingContext.locateNodes':
throw new protocol_js_1.UnsupportedOperationException(`Command '${command.method}' not yet implemented.`);
case 'browsingContext.navigate':

@@ -99,2 +101,4 @@ return await this.#browsingContextProcessor.navigate(this.#parser.parseNavigateParams(command.params));

return await this.#browsingContextProcessor.setViewport(this.#parser.parseSetViewportParams(command.params));
case 'browsingContext.traverseHistory':
return await this.#browsingContextProcessor.traverseHistory(this.#parser.parseTraverseHistoryParams(command.params));
// keep-sorted end

@@ -101,0 +105,0 @@ // CDP domain

@@ -69,2 +69,3 @@ /**

close(): Promise<void>;
traverseHistory(delta: number): Promise<void>;
}

@@ -100,2 +100,4 @@ "use strict";

}
// Fail all ongoing navigations.
this.#failDeferredsIfNotFinished();
this.#eventManager.registerEvent({

@@ -412,2 +414,10 @@ type: 'event',

}
#failDeferredsIfNotFinished() {
if (!this.#deferreds.Page.lifecycleEvent.DOMContentLoaded.isFinished) {
this.#deferreds.Page.lifecycleEvent.DOMContentLoaded.reject(new protocol_js_1.UnknownErrorException('navigation canceled'));
}
if (!this.#deferreds.Page.lifecycleEvent.load.isFinished) {
this.#deferreds.Page.lifecycleEvent.load.reject(new protocol_js_1.UnknownErrorException('navigation canceled'));
}
}
async navigate(url, wait) {

@@ -659,5 +669,2 @@ try {

case 'element': {
if (clip.scrollIntoView) {
throw new protocol_js_1.UnsupportedOperationException(`'scrollIntoView' is currently not supported`);
}
// TODO: #1213: Use custom sandbox specifically for Chromium BiDi

@@ -698,2 +705,17 @@ const sandbox = await this.getOrCreateSandbox(undefined);

}
async traverseHistory(delta) {
if (delta === 0) {
return;
}
const history = await this.#cdpTarget.cdpClient.sendCommand('Page.getNavigationHistory');
const entry = history.entries[history.currentIndex + delta];
if (!entry) {
throw new protocol_js_1.NoSuchHistoryEntryException(`No history entry at delta ${delta}`);
}
await this.#cdpTarget.cdpClient.sendCommand('Page.navigateToHistoryEntry', {
entryId: entry.id,
});
this.#resetDeferredsIfFinished();
await this.lifecycleLoaded();
}
}

@@ -700,0 +722,0 @@ exports.BrowsingContextImpl = BrowsingContextImpl;

@@ -6,5 +6,5 @@ import type { ICdpClient } from '../../../cdp/CdpClient.js';

import type { EventManager } from '../events/EventManager.js';
import type { NetworkStorage } from '../network/NetworkStorage.js';
import type { PreloadScriptStorage } from '../script/PreloadScriptStorage.js';
import type { RealmStorage } from '../script/RealmStorage.js';
import type { PreloadScriptStorage } from '../script/PreloadScriptStorage.js';
import type { NetworkStorage } from '../network/NetworkStorage.js';
import type { BrowsingContextStorage } from './BrowsingContextStorage.js';

@@ -22,4 +22,5 @@ export declare class BrowsingContextProcessor {

setViewport(params: BrowsingContext.SetViewportParameters): Promise<EmptyResult>;
traverseHistory(params: BrowsingContext.TraverseHistoryParameters): Promise<BrowsingContext.TraverseHistoryResult>;
handleUserPrompt(params: BrowsingContext.HandleUserPromptParameters): Promise<EmptyResult>;
close(commandParams: BrowsingContext.CloseParameters): Promise<EmptyResult>;
close(params: BrowsingContext.CloseParameters): Promise<EmptyResult>;
}

@@ -103,2 +103,10 @@ "use strict";

}
async traverseHistory(params) {
const context = this.#browsingContextStorage.getContext(params.context);
if (!context) {
throw new protocol_js_1.InvalidArgumentException(`No browsing context with id ${params.context}`);
}
await context.traverseHistory(params.delta);
return {};
}
async handleUserPrompt(params) {

@@ -109,4 +117,4 @@ const context = this.#browsingContextStorage.getContext(params.context);

}
async close(commandParams) {
const context = this.#browsingContextStorage.getContext(commandParams.context);
async close(params) {
const context = this.#browsingContextStorage.getContext(params.context);
if (!context.isTopLevelContext()) {

@@ -118,3 +126,3 @@ throw new protocol_js_1.InvalidArgumentException(`Non top-level browsing context ${context.id} cannot be closed.`);

const onContextDestroyed = (event) => {
if (event.targetId === commandParams.context) {
if (event.targetId === params.context) {
this.#browserCdpClient.off('Target.detachedFromTarget', onContextDestroyed);

@@ -126,3 +134,10 @@ resolve();

});
await context.close();
if (params.promptUnload) {
await context.close();
}
else {
await this.#browserCdpClient.sendCommand('Target.closeTarget', {
targetId: params.context,
});
}
// Sometimes CDP command finishes before `detachedFromTarget` event,

@@ -129,0 +144,0 @@ // sometimes after. Wait for the CDP command to be finished, and then wait

@@ -1,2 +0,2 @@

import type Protocol from 'devtools-protocol';
import type { Protocol } from 'devtools-protocol';
import type { ICdpClient } from '../../../cdp/CdpClient.js';

@@ -3,0 +3,0 @@ import { Deferred } from '../../../utils/Deferred.js';

@@ -19,3 +19,3 @@ "use strict";

LogManager_js_1.LogManager.create(cdpTarget, realmStorage, eventManager);
NetworkManager_js_1.NetworkManager.create(cdpTarget, networkStorage);
NetworkManager_js_1.NetworkManager.create(cdpTarget, eventManager, networkStorage);
cdpTarget.#setEventListeners();

@@ -22,0 +22,0 @@ // No need to await.

@@ -21,4 +21,4 @@ "use strict";

const protocol_js_1 = require("../../../protocol/protocol.js");
const Buffer_js_1 = require("../../../utils/Buffer.js");
const DefaultMap_js_1 = require("../../../utils/DefaultMap.js");
const Buffer_js_1 = require("../../../utils/Buffer.js");
const IdWrapper_js_1 = require("../../../utils/IdWrapper.js");

@@ -25,0 +25,0 @@ const OutgoingMessage_js_1 = require("../../OutgoingMessage.js");

@@ -23,4 +23,4 @@ "use strict";

const InputSource_js_1 = require("./InputSource.js");
const keyUtils_js_1 = require("./keyUtils.js");
const USKeyboardLayout_js_1 = require("./USKeyboardLayout.js");
const keyUtils_js_1 = require("./keyUtils.js");
/** https://w3c.github.io/webdriver/#dfn-center-point */

@@ -27,0 +27,0 @@ const CALCULATE_IN_VIEW_CENTER_PT_DECL = ((i) => {

@@ -21,4 +21,4 @@ "use strict";

const protocol_js_1 = require("../../../protocol/protocol.js");
const ActionDispatcher_js_1 = require("../input/ActionDispatcher.js");
const InputStateManager_js_1 = require("../input/InputStateManager.js");
const ActionDispatcher_js_1 = require("../input/ActionDispatcher.js");
class InputProcessor {

@@ -25,0 +25,0 @@ #browsingContextStorage;

@@ -54,9 +54,9 @@ /**

count: number;
"__#86748@#x": number;
"__#86748@#y": number;
"__#86748@#time": number;
"__#86982@#x": number;
"__#86982@#y": number;
"__#86982@#time": number;
compare(context: any): boolean;
};
"__#86748@#DOUBLE_CLICK_TIME_MS": number;
"__#86748@#MAX_DOUBLE_CLICK_RADIUS": number;
"__#86982@#DOUBLE_CLICK_TIME_MS": number;
"__#86982@#MAX_DOUBLE_CLICK_RADIUS": number;
};

@@ -63,0 +63,0 @@ setClickCount(button: number, context: InstanceType<typeof PointerSource.ClickContext>): number;

@@ -0,4 +1,4 @@

import type { CdpTarget } from '../context/CdpTarget.js';
import type { EventManager } from '../events/EventManager.js';
import type { RealmStorage } from '../script/RealmStorage.js';
import type { CdpTarget } from '../context/CdpTarget.js';
export declare class LogManager {

@@ -5,0 +5,0 @@ #private;

import type { CdpTarget } from '../context/CdpTarget.js';
import type { EventManager } from '../events/EventManager.js';
import type { NetworkStorage } from './NetworkStorage.js';

@@ -9,3 +10,3 @@ /** Maps 1:1 to CdpTarget. */

get cdpTarget(): CdpTarget;
static create(cdpTarget: CdpTarget, networkStorage: NetworkStorage): NetworkManager;
static create(cdpTarget: CdpTarget, eventManager: EventManager, networkStorage: NetworkStorage): NetworkManager;
}

@@ -24,5 +24,7 @@ "use strict";

#cdpTarget;
#eventManager;
#networkStorage;
constructor(cdpTarget, networkStorage) {
constructor(cdpTarget, eventManager, networkStorage) {
this.#cdpTarget = cdpTarget;
this.#eventManager = eventManager;
this.#networkStorage = networkStorage;

@@ -43,8 +45,8 @@ }

}
request = new NetworkRequest_js_1.NetworkRequest(id, this.#networkStorage.eventManager, this.#cdpTarget, redirectCount);
request = new NetworkRequest_js_1.NetworkRequest(id, this.#eventManager, this.#networkStorage, this.#cdpTarget, redirectCount);
this.#networkStorage.addRequest(request);
return request;
}
static create(cdpTarget, networkStorage) {
const networkManager = new NetworkManager(cdpTarget, networkStorage);
static create(cdpTarget, eventManager, networkStorage) {
const networkManager = new NetworkManager(cdpTarget, eventManager, networkStorage);
cdpTarget.browserCdpClient.on('Target.detachedFromTarget', (params) => {

@@ -51,0 +53,0 @@ if (cdpTarget.cdpClient.sessionId === params.sessionId) {

@@ -6,4 +6,4 @@ "use strict";

const assert_js_1 = require("../../../utils/assert.js");
const NetworkStorage_js_1 = require("./NetworkStorage.js");
const NetworkUtils_js_1 = require("./NetworkUtils.js");
const NetworkStorage_js_1 = require("./NetworkStorage.js");
/** Dispatches Network domain commands. */

@@ -196,2 +196,10 @@ class NetworkProcessor {

case 'pattern':
// No params signifies intercept all
if (urlPattern.protocol === undefined &&
urlPattern.hostname === undefined &&
urlPattern.port === undefined &&
urlPattern.pathname === undefined &&
urlPattern.search === undefined) {
return urlPattern;
}
if (urlPattern.protocol === '') {

@@ -198,0 +206,0 @@ throw new protocol_js_1.InvalidArgumentException(`URL pattern must specify a protocol`);

@@ -5,6 +5,6 @@ /**

*/
import type Protocol from 'devtools-protocol';
import type { EventManager } from '../events/EventManager.js';
import type { Protocol } from 'devtools-protocol';
import { Network, type JsUint } from '../../../protocol/protocol.js';
import type { CdpTarget } from '../context/CdpTarget.js';
import type { EventManager } from '../events/EventManager.js';
import type { NetworkStorage } from './NetworkStorage.js';

@@ -14,11 +14,4 @@ /** Abstracts one individual network request. */

#private;
/**
* Each network request has an associated request id, which is a string
* uniquely identifying that request.
*
* The identifier for a request resulting from a redirect matches that of the
* request that initiated it.
*/
readonly requestId: Network.Request;
constructor(requestId: Network.Request, eventManager: EventManager, cdpTarget: CdpTarget, redirectCount?: number);
constructor(requestId: Network.Request, eventManager: EventManager, networkStorage: NetworkStorage, cdpTarget: CdpTarget, redirectCount?: number);
get requestId(): string;
get url(): string | undefined;

@@ -25,0 +18,0 @@ get redirectCount(): number;

@@ -21,5 +21,5 @@ "use strict";

exports.NetworkRequest = void 0;
const Deferred_js_1 = require("../../../utils/Deferred.js");
const protocol_js_1 = require("../../../protocol/protocol.js");
const assert_js_1 = require("../../../utils/assert.js");
const Deferred_js_1 = require("../../../utils/Deferred.js");
const NetworkUtils_js_1 = require("./NetworkUtils.js");

@@ -36,3 +36,3 @@ /** Abstracts one individual network request. */

*/
requestId;
#requestId;
// TODO: Handle auth required?

@@ -47,2 +47,3 @@ /**

#eventManager;
#networkStorage;
#request = {};

@@ -54,8 +55,12 @@ #response = {};

#cdpTarget;
constructor(requestId, eventManager, cdpTarget, redirectCount = 0) {
this.requestId = requestId;
constructor(requestId, eventManager, networkStorage, cdpTarget, redirectCount = 0) {
this.#requestId = requestId;
this.#eventManager = eventManager;
this.#networkStorage = networkStorage;
this.#cdpTarget = cdpTarget;
this.#redirectCount = redirectCount;
}
get requestId() {
return this.#requestId;
}
get url() {

@@ -162,2 +167,8 @@ return this.#response.info?.url ?? this.#request.info?.request.url;

onRequestPaused(params, networkStorage) {
if (this.#isIgnoredEvent()) {
void this.continueRequest(params.requestId).catch(() => {
// TODO: Add some logging
});
return;
}
// The stage of the request can be determined by presence of

@@ -288,4 +299,7 @@ // responseErrorReason and responseStatusCode -- the request is at

#getBaseEventParams(phase) {
// TODO: Set this in terms of intercepts?
const isBlocked = phase !== undefined && phase === this.#interceptPhase;
const intercepts = this.#networkStorage.getNetworkIntercepts(this.#requestId, phase);
return {
isBlocked: phase !== undefined && phase === this.#interceptPhase,
isBlocked,
context: this.#context,

@@ -297,2 +311,4 @@ navigation: this.#getNavigationId(),

timestamp: Math.round((this.#request.info?.wallTime ?? 0) * 1000),
// XXX: we should return correct types from the function.
intercepts: isBlocked ? intercepts : undefined,
};

@@ -299,0 +315,0 @@ }

@@ -17,5 +17,4 @@ /**

*/
import type Protocol from 'devtools-protocol';
import { Network, ChromiumBidi } from '../../../protocol/protocol.js';
import type { EventManager } from '../events/EventManager.js';
import type { Protocol } from 'devtools-protocol';
import { Network } from '../../../protocol/protocol.js';
import type { NetworkRequest } from './NetworkRequest.js';

@@ -25,4 +24,2 @@ /** Stores network and intercept maps. */

#private;
constructor(eventManager: EventManager);
get eventManager(): EventManager;
disposeRequestMap(): void;

@@ -37,3 +34,3 @@ /**

urlPatterns: Network.UrlPattern[];
phases: Network.InterceptPhase[];
phases: Network.AddInterceptParameters['phases'];
}): Network.Intercept;

@@ -88,5 +85,5 @@ /**

/** #@see https://w3c.github.io/webdriver-bidi/#get-the-network-intercepts */
getNetworkIntercepts(event: Exclude<ChromiumBidi.Network.EventNames, ChromiumBidi.Network.EventNames.FetchError>, requestId: Network.Request): Network.Intercept[];
getNetworkIntercepts(requestId: Network.Request, phase?: Network.InterceptPhase): Network.Intercept[];
/** Matches the given URLPattern against the given URL. */
static matchUrlPattern(urlPattern: Network.UrlPattern, url: string | undefined): boolean;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NetworkStorage = void 0;
const protocol_js_1 = require("../../../protocol/protocol.js");
const UrlPattern_js_1 = require("../../../utils/UrlPattern.js");
const uuid_js_1 = require("../../../utils/uuid.js");
const protocol_js_1 = require("../../../protocol/protocol.js");
/** Stores network and intercept maps. */
class NetworkStorage {
#eventManager;
/**

@@ -19,8 +18,2 @@ * A map from network request ID to Network Request objects.

#blockedRequestMap = new Map();
constructor(eventManager) {
this.#eventManager = eventManager;
}
get eventManager() {
return this.#eventManager;
}
disposeRequestMap() {

@@ -68,8 +61,16 @@ for (const request of this.#requestMap.values()) {

for (const value of this.#interceptMap.values()) {
for (const urlPatternSpec of value.urlPatterns) {
const urlPattern = NetworkStorage.cdpFromSpecUrlPattern(urlPatternSpec);
for (const phase of value.phases) {
for (const phase of value.phases) {
const requestStage = NetworkStorage.requestStageFromPhase(phase);
if (value.urlPatterns.length === 0) {
patterns.push({
urlPattern: '*',
requestStage,
});
continue;
}
for (const urlPatternSpec of value.urlPatterns) {
const urlPattern = NetworkStorage.cdpFromSpecUrlPattern(urlPatternSpec);
patterns.push({
urlPattern,
requestStage: NetworkStorage.requestStageFromPhase(phase),
requestStage,
});

@@ -119,2 +120,5 @@ }

static buildUrlPatternString({ protocol, hostname, port, pathname, search, }) {
if (!protocol && !hostname && !port && !pathname && !search) {
return '*';
}
let url = '';

@@ -187,3 +191,3 @@ if (protocol) {

/** #@see https://w3c.github.io/webdriver-bidi/#get-the-network-intercepts */
getNetworkIntercepts(event, requestId) {
getNetworkIntercepts(requestId, phase) {
const request = this.#requestMap.get(requestId);

@@ -193,16 +197,2 @@ if (!request) {

}
let phase = undefined;
switch (event) {
case protocol_js_1.ChromiumBidi.Network.EventNames.BeforeRequestSent:
phase = "beforeRequestSent" /* Network.InterceptPhase.BeforeRequestSent */;
break;
case protocol_js_1.ChromiumBidi.Network.EventNames.ResponseStarted:
phase = "responseStarted" /* Network.InterceptPhase.ResponseStarted */;
break;
case protocol_js_1.ChromiumBidi.Network.EventNames.AuthRequired:
phase = "authRequired" /* Network.InterceptPhase.AuthRequired */;
break;
case protocol_js_1.ChromiumBidi.Network.EventNames.ResponseCompleted:
return [];
}
const interceptIds = [];

@@ -209,0 +199,0 @@ for (const [interceptId, { phases, urlPatterns },] of this.#interceptMap.entries()) {

/**
* @fileoverview Utility functions for the Network domain.
*/
import type Protocol from 'devtools-protocol';
import type { Protocol } from 'devtools-protocol';
import type { Network } from '../../../protocol/protocol.js';

@@ -6,0 +6,0 @@ export declare function computeHeadersSize(headers: Network.Header[]): number;

import { Script } from '../../../protocol/protocol.js';
import { type LoggerFn } from '../../../utils/log.js';
import type { EventManager } from '../events/EventManager.js';
import { type LoggerFn } from '../../../utils/log.js';
import type { Realm } from './Realm.js';

@@ -5,0 +5,0 @@ /**

@@ -22,4 +22,4 @@ "use strict";

const protocol_js_1 = require("../../../protocol/protocol.js");
const log_js_1 = require("../../../utils/log.js");
const uuid_js_1 = require("../../../utils/uuid.js");
const log_js_1 = require("../../../utils/log.js");
/**

@@ -26,0 +26,0 @@ * Used to send messages from realm to BiDi user.

@@ -1,5 +0,5 @@

import type Protocol from 'devtools-protocol';
import type { Protocol } from 'devtools-protocol';
import type { BrowsingContext, Script } from '../../../protocol/protocol.js';
import type { LoggerFn } from '../../../utils/log.js';
import type { CdpTarget } from '../context/CdpTarget.js';
import type { LoggerFn } from '../../../utils/log.js';
import { ChannelProxy } from './ChannelProxy.js';

@@ -6,0 +6,0 @@ /**

@@ -18,7 +18,7 @@ /**

import { Protocol } from 'devtools-protocol';
import type { ICdpClient } from '../../../cdp/CdpClient.js';
import { type BrowsingContext, Script } from '../../../protocol/protocol.js';
import { type LoggerFn } from '../../../utils/log.js';
import type { BrowsingContextStorage } from '../context/BrowsingContextStorage.js';
import type { EventManager } from '../events/EventManager.js';
import type { ICdpClient } from '../../../cdp/CdpClient.js';
import { type LoggerFn } from '../../../utils/log.js';
import type { RealmStorage } from './RealmStorage.js';

@@ -25,0 +25,0 @@ export declare class Realm {

@@ -6,2 +6,3 @@ "use strict";

const log_js_1 = require("../../../utils/log.js");
const uuid_js_1 = require("../../../utils/uuid.js");
const ChannelProxy_js_1 = require("./ChannelProxy.js");

@@ -41,3 +42,3 @@ const SHARED_ID_DIVIDER = '_element_';

cdpToBidiValue(cdpValue, resultOwnership) {
const bidiValue = this.#deepSerializedToBiDi(cdpValue.result.deepSerializedValue);
const bidiValue = this.#deepSerializedToBiDi(cdpValue.result.deepSerializedValue, new Map());
if (cdpValue.result.objectId) {

@@ -71,8 +72,19 @@ const objectId = cdpValue.result.objectId;

/**
* Relies on the CDP to implement proper BiDi serialization, except
* backendNodeId/sharedId and `platformobject`.
* Relies on the CDP to implement proper BiDi serialization, except:
* * CDP integer property `backendNodeId` is replaced with `sharedId` of
* `{documentId}_element_{backendNodeId}`;
* * CDP integer property `weakLocalObjectReference` is replaced with UUID `internalId`
* using unique-per serialization `internalIdMap`.
* * CDP type `platformobject` is replaced with `object`.
* @param deepSerializedValue - CDP value to be converted to BiDi.
* @param internalIdMap - Map from CDP integer `weakLocalObjectReference` to BiDi UUID
* `internalId`.
*/
#deepSerializedToBiDi(deepSerializedValue) {
#deepSerializedToBiDi(deepSerializedValue, internalIdMap) {
if (Object.hasOwn(deepSerializedValue, 'weakLocalObjectReference')) {
deepSerializedValue.internalId = `${deepSerializedValue.weakLocalObjectReference}`;
const weakLocalObjectReference = deepSerializedValue.weakLocalObjectReference;
if (!internalIdMap.has(weakLocalObjectReference)) {
internalIdMap.set(weakLocalObjectReference, (0, uuid_js_1.uuidv4)());
}
deepSerializedValue.internalId = internalIdMap.get(weakLocalObjectReference);
delete deepSerializedValue['weakLocalObjectReference'];

@@ -96,3 +108,3 @@ }

for (const i in bidiValue.children) {
bidiValue.children[i] = this.#deepSerializedToBiDi(bidiValue.children[i]);
bidiValue.children[i] = this.#deepSerializedToBiDi(bidiValue.children[i], internalIdMap);
}

@@ -102,3 +114,3 @@ }

bidiValue.shadowRoot !== null) {
bidiValue.shadowRoot = this.#deepSerializedToBiDi(bidiValue.shadowRoot);
bidiValue.shadowRoot = this.#deepSerializedToBiDi(bidiValue.shadowRoot, internalIdMap);
}

@@ -113,3 +125,3 @@ // `namespaceURI` can be is either `null` or non-empty string.

for (const i in bidiValue) {
bidiValue[i] = this.#deepSerializedToBiDi(bidiValue[i]);
bidiValue[i] = this.#deepSerializedToBiDi(bidiValue[i], internalIdMap);
}

@@ -120,4 +132,4 @@ }

bidiValue[i] = [
this.#deepSerializedToBiDi(bidiValue[i][0]),
this.#deepSerializedToBiDi(bidiValue[i][1]),
this.#deepSerializedToBiDi(bidiValue[i][0], internalIdMap),
this.#deepSerializedToBiDi(bidiValue[i][1], internalIdMap),
];

@@ -124,0 +136,0 @@ }

@@ -25,4 +25,4 @@ "use strict";

const promises_1 = require("fs/promises");
const os_1 = __importDefault(require("os"));
const path_1 = __importDefault(require("path"));
const os_1 = __importDefault(require("os"));
const browsers_1 = require("@puppeteer/browsers");

@@ -58,2 +58,3 @@ const debug_1 = __importDefault(require("debug"));

'--disable-features=DialMediaRouteProvider',
'--disable-infobars',
'--disable-notifications',

@@ -60,0 +61,0 @@ '--disable-popup-blocking',

@@ -18,11 +18,8 @@ "use strict";

*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const argparse_1 = __importDefault(require("argparse"));
const browsers_1 = require("@puppeteer/browsers");
const argparse_1 = require("argparse");
const WebSocketServer_js_1 = require("./WebSocketServer.js");
function parseArguments() {
const parser = new argparse_1.default.ArgumentParser({
const parser = new argparse_1.ArgumentParser({
add_help: true,

@@ -29,0 +26,0 @@ exit_on_error: true,

@@ -106,3 +106,3 @@ "use strict";

static async #initMapper(cdpConnection, mapperTabSource, verbose) {
debugInternal('Connection opened.');
debugInternal('Initializing Mapper.');
const browserClient = await cdpConnection.createBrowserSession();

@@ -137,3 +137,3 @@ const { targetId: mapperTabTargetId } = await browserClient.sendCommand('Target.createTarget', {

});
debugInternal('Launched!');
debugInternal('Mapper is launched!');
return mapperCdpClient;

@@ -140,0 +140,0 @@ }

@@ -0,3 +1,3 @@

import type { ChromeReleaseChannel } from '@puppeteer/browsers';
import debug from 'debug';
import type { ChromeReleaseChannel } from '@puppeteer/browsers';
export declare const debugInfo: debug.Debugger;

@@ -4,0 +4,0 @@ export declare class WebSocketServer {

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -25,3 +48,4 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

const debug_1 = __importDefault(require("debug"));
const websocket_1 = __importDefault(require("websocket"));
const websocket = __importStar(require("websocket"));
const Deferred_js_1 = require("../utils/Deferred.js");
const BrowserInstance_js_1 = require("./BrowserInstance.js");

@@ -90,3 +114,3 @@ exports.debugInfo = (0, debug_1.default)('bidi:server:info');

});
const wsServer = new websocket_1.default.server({
const wsServer = new websocket.server({
httpServer: server,

@@ -98,9 +122,25 @@ autoAcceptConnections: false,

debugInternal('new WS request received:', request.resourceURL.path);
const browserInstance = await BrowserInstance_js_1.BrowserInstance.run(channel, headless, verbose, chromeOptions?.args);
// Forward messages from BiDi Mapper to the client unconditionally.
browserInstance.bidiSession().on('message', (message) => {
void this.#sendClientMessageString(message, connection);
});
const connection = request.accept();
const browserInstanceDeferred = new Deferred_js_1.Deferred();
// Schedule browser instance creation, but don't wait for it.
void (async () => {
try {
(0, exports.debugInfo)('Scheduling browser launch...');
const browserInstance = await BrowserInstance_js_1.BrowserInstance.run(channel, headless, verbose, chromeOptions?.args);
// Forward messages from BiDi Mapper to the client unconditionally.
browserInstance.bidiSession().on('message', (message) => {
void this.#sendClientMessageString(message, connection);
});
(0, exports.debugInfo)('Browser is launched!');
browserInstanceDeferred.resolve(browserInstance);
}
catch (e) {
(0, exports.debugInfo)('Error while creating browser instance', e);
connection.close(500, 'Error while creating browser instance');
return;
}
})();
connection.on('message', async (message) => {
// Wait for browser instance to be created.
const browserInstance = await browserInstanceDeferred;
// If |type| is not text, return a error.

@@ -144,2 +184,4 @@ if (message.type !== 'utf8') {

debugInternal(`${new Date().toString()} Peer ${connection.remoteAddress} disconnected.`);
// Wait for browser instance to be created.
const browserInstance = await browserInstanceDeferred;
// TODO: handle reconnection which is used in WPT. Until then, close the

@@ -146,0 +188,0 @@ // browser after each WS connection is closed.

@@ -30,2 +30,3 @@ /**

parseSetViewportParams(params: unknown): BrowsingContext.SetViewportParameters;
parseTraverseHistoryParams(params: unknown): BrowsingContext.TraverseHistoryParameters;
parseGetSessionParams(params: unknown): Cdp.GetSessionParameters;

@@ -32,0 +33,0 @@ parseSendCommandParams(params: unknown): Cdp.SendCommandParameters;

@@ -61,2 +61,5 @@ "use strict";

}
parseTraverseHistoryParams(params) {
return Parser.BrowsingContext.parseTraverseHistoryParams(params);
}
// keep-sorted end

@@ -63,0 +66,0 @@ // CDP domain

@@ -25,4 +25,4 @@ "use strict";

const BidiParser_js_1 = require("./BidiParser.js");
const mapperTabPage_js_1 = require("./mapperTabPage.js");
const Transport_js_1 = require("./Transport.js");
const mapperTabPage_js_1 = require("./mapperTabPage.js");
(0, mapperTabPage_js_1.generatePage)();

@@ -41,2 +41,3 @@ const mapperTabToServerTransport = new Transport_js_1.WindowBidiTransport();

async function runMapperInstance(selfTargetId) {
// eslint-disable-next-line no-console
console.log('Launching Mapper instance with selfTargetId:', selfTargetId);

@@ -43,0 +44,0 @@ const bidiServer = await BidiMapper_js_1.BidiServer.createAndStart(mapperTabToServerTransport, cdpConnection,

@@ -17,4 +17,4 @@ /**

*/
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type Protocol from 'devtools-protocol';
import { EventEmitter } from '../utils/EventEmitter.js';

@@ -21,0 +21,0 @@ import type { CdpConnection } from './CdpConnection.js';

@@ -17,6 +17,6 @@ /**

*/
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type Protocol from 'devtools-protocol';
import type { LoggerFn } from '../utils/log.js';
import type { ITransport } from '../utils/transport.js';
import type { LoggerFn } from '../utils/log.js';
import { CdpClient, type ICdpClient } from './CdpClient.js';

@@ -23,0 +23,0 @@ export interface ICdpConnection {

@@ -17,3 +17,3 @@ /**

*/
import type Protocol from 'devtools-protocol';
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';

@@ -20,0 +20,0 @@ export interface CdpError {

@@ -85,3 +85,3 @@ /**

httpOnly?: boolean | undefined;
expires?: string | undefined;
expiry?: string | undefined;
maxAge?: number | undefined;

@@ -145,3 +145,3 @@ path?: string | undefined;

httpOnly?: boolean | undefined;
expires?: string | undefined;
expiry?: string | undefined;
maxAge?: number | undefined;

@@ -193,2 +193,3 @@ path?: string | undefined;

function parseSetViewportParams(params: unknown): Protocol.BrowsingContext.SetViewportParameters;
function parseTraverseHistoryParams(params: unknown): Protocol.BrowsingContext.TraverseHistoryParameters;
function parseHandleUserPromptParameters(params: unknown): Protocol.BrowsingContext.HandleUserPromptParameters;

@@ -195,0 +196,0 @@ }

@@ -161,2 +161,6 @@ "use strict";

BrowsingContext.parseSetViewportParams = parseSetViewportParams;
function parseTraverseHistoryParams(params) {
return parseObject(params, WebDriverBidi.BrowsingContext.TraverseHistoryParametersSchema);
}
BrowsingContext.parseTraverseHistoryParams = parseTraverseHistoryParams;
function parseHandleUserPromptParameters(params) {

@@ -163,0 +167,0 @@ return parseObject(params, WebDriverBidi.BrowsingContext.HandleUserPromptParametersSchema);

@@ -17,4 +17,4 @@ /**

*/
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type Protocol from 'devtools-protocol';
import type { BrowsingContext, JsUint } from './webdriver-bidi.js';

@@ -21,0 +21,0 @@ export type EventNames = Event['method'];

@@ -17,4 +17,4 @@ /**

*/
import type * as Cdp from './cdp.js';
import type * as WebDriverBidi from './webdriver-bidi.js';
import type * as Cdp from './cdp.js';
export type EventNames = BiDiModule | BrowsingContext.EventNames | Cdp.EventNames | Log.EventNames | Network.EventNames | Script.EventNames;

@@ -21,0 +21,0 @@ export declare enum BiDiModule {

@@ -47,2 +47,5 @@ /**

}
export declare class NoSuchHistoryEntryException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchInterceptException extends Exception {

@@ -49,0 +52,0 @@ constructor(message: string, stacktrace?: string);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnsupportedOperationException = exports.UnableToCloseBrowserException = exports.UnableToCaptureScreenException = exports.UnknownErrorException = exports.UnknownCommandException = exports.SessionNotCreatedException = exports.NoSuchScriptException = exports.NoSuchRequestException = exports.NoSuchNodeException = exports.NoSuchInterceptException = exports.NoSuchHandleException = exports.NoSuchFrameException = exports.NoSuchElementException = exports.NoSuchAlertException = exports.MoveTargetOutOfBoundsException = exports.InvalidSessionIdException = exports.InvalidArgumentException = exports.Exception = void 0;
exports.UnsupportedOperationException = exports.UnableToCloseBrowserException = exports.UnableToCaptureScreenException = exports.UnknownErrorException = exports.UnknownCommandException = exports.SessionNotCreatedException = exports.NoSuchScriptException = exports.NoSuchRequestException = exports.NoSuchNodeException = exports.NoSuchInterceptException = exports.NoSuchHistoryEntryException = exports.NoSuchHandleException = exports.NoSuchFrameException = exports.NoSuchElementException = exports.NoSuchAlertException = exports.MoveTargetOutOfBoundsException = exports.InvalidSessionIdException = exports.InvalidArgumentException = exports.Exception = void 0;
class Exception {

@@ -66,2 +66,8 @@ error;

exports.NoSuchHandleException = NoSuchHandleException;
class NoSuchHistoryEntryException extends Exception {
constructor(message, stacktrace) {
super("no such history entry" /* ErrorCode.NoSuchHistoryEntry */, message, stacktrace);
}
}
exports.NoSuchHistoryEntryException = NoSuchHistoryEntryException;
class NoSuchInterceptException extends Exception {

@@ -68,0 +74,0 @@ constructor(message, stacktrace) {

@@ -64,2 +64,3 @@ /**

NoSuchHandle = "no such handle",
NoSuchHistoryEntry = "no such history entry",
NoSuchIntercept = "no such intercept",

@@ -184,5 +185,5 @@ NoSuchNode = "no such node",

}
export type BrowsingContextCommand = BrowsingContext.Activate | BrowsingContext.CaptureScreenshot | BrowsingContext.Close | BrowsingContext.Create | BrowsingContext.GetTree | BrowsingContext.HandleUserPrompt | BrowsingContext.Navigate | BrowsingContext.Print | BrowsingContext.Reload | BrowsingContext.SetViewport;
export type BrowsingContextCommand = BrowsingContext.Activate | BrowsingContext.CaptureScreenshot | BrowsingContext.Close | BrowsingContext.Create | BrowsingContext.GetTree | BrowsingContext.HandleUserPrompt | BrowsingContext.LocateNodes | BrowsingContext.Navigate | BrowsingContext.Print | BrowsingContext.Reload | BrowsingContext.SetViewport | BrowsingContext.TraverseHistory;
export type BrowsingContextEvent = BrowsingContext.ContextCreated | BrowsingContext.ContextDestroyed | BrowsingContext.DomContentLoaded | BrowsingContext.DownloadWillBegin | BrowsingContext.FragmentNavigated | BrowsingContext.Load | BrowsingContext.NavigationAborted | BrowsingContext.NavigationFailed | BrowsingContext.NavigationStarted | BrowsingContext.UserPromptClosed | BrowsingContext.UserPromptOpened;
export type BrowsingContextResult = BrowsingContext.CaptureScreenshotResult | BrowsingContext.CreateResult | BrowsingContext.GetTreeResult | BrowsingContext.NavigateResult | BrowsingContext.PrintResult;
export type BrowsingContextResult = BrowsingContext.CaptureScreenshotResult | BrowsingContext.CreateResult | BrowsingContext.GetTreeResult | BrowsingContext.LocateNodesResult | BrowsingContext.NavigateResult | BrowsingContext.PrintResult | BrowsingContext.TraverseHistoryResult;
export declare namespace BrowsingContext {

@@ -203,2 +204,26 @@ type BrowsingContext = string;

export declare namespace BrowsingContext {
type Locator = BrowsingContext.CssLocator | BrowsingContext.InnerTextLocator | BrowsingContext.XPathLocator;
}
export declare namespace BrowsingContext {
type CssLocator = {
type: 'css';
value: string;
};
}
export declare namespace BrowsingContext {
type InnerTextLocator = {
type: 'innerText';
value: string;
ignoreCase?: boolean;
matchType?: 'full' | 'partial';
maxDepth?: JsUint;
};
}
export declare namespace BrowsingContext {
type XPathLocator = {
type: 'xpath';
value: string;
};
}
export declare namespace BrowsingContext {
type Navigation = string;

@@ -265,3 +290,2 @@ }

element: Script.SharedReference;
scrollIntoView?: boolean;
};

@@ -292,2 +316,6 @@ }

context: BrowsingContext.BrowsingContext;
/**
* @defaultValue `false`
*/
promptUnload?: boolean;
};

@@ -353,2 +381,27 @@ }

export declare namespace BrowsingContext {
type LocateNodesParameters = {
context: BrowsingContext.BrowsingContext;
locator: BrowsingContext.Locator;
/**
* Must be greater than or equal to `1`.
*/
maxNodeCount?: JsUint;
ownership?: Script.ResultOwnership;
sandbox?: string;
serializationOptions?: Script.SerializationOptions;
startNodes?: [Script.SharedReference, ...Script.SharedReference[]];
};
}
export declare namespace BrowsingContext {
type LocateNodes = {
method: 'browsingContext.locateNodes';
params: BrowsingContext.LocateNodesParameters;
};
}
export declare namespace BrowsingContext {
type LocateNodesResult = {
nodes: [...Script.NodeRemoteValue[]];
};
}
export declare namespace BrowsingContext {
type Navigate = {

@@ -489,2 +542,17 @@ method: 'browsingContext.navigate';

export declare namespace BrowsingContext {
type TraverseHistory = {
method: 'browsingContext.traverseHistory';
params: BrowsingContext.TraverseHistoryParameters;
};
}
export declare namespace BrowsingContext {
type TraverseHistoryParameters = {
context: BrowsingContext.BrowsingContext;
delta: JsInt;
};
}
export declare namespace BrowsingContext {
type TraverseHistoryResult = Record<string, never>;
}
export declare namespace BrowsingContext {
type ContextCreated = {

@@ -594,3 +662,3 @@ method: 'browsingContext.contextCreated';

timestamp: JsUint;
intercepts?: [...Network.Intercept[]];
intercepts?: [Network.Intercept, ...Network.Intercept[]];
};

@@ -623,3 +691,3 @@ }

sameSite: 'strict' | 'lax' | 'none';
expires?: JsUint;
expiry?: JsUint;
};

@@ -710,3 +778,3 @@ }

httpOnly?: boolean;
expires?: string;
expiry?: string;
maxAge?: JsInt;

@@ -739,3 +807,3 @@ path?: string;

type AddInterceptParameters = {
phases: [...Network.InterceptPhase[]];
phases: [Network.InterceptPhase, ...Network.InterceptPhase[]];
urlPatterns?: [...Network.UrlPattern[]];

@@ -958,2 +1026,5 @@ };

export declare namespace Script {
type InternalId = string;
}
export declare namespace Script {
type ListLocalValue = [...Script.LocalValue[]];

@@ -1112,2 +1183,10 @@ }

export declare namespace Script {
type ListRemoteValue = [...Script.RemoteValue[]];
}
export declare namespace Script {
type MappingRemoteValue = [
...[Script.RemoteValue | string, Script.RemoteValue][]
];
}
export declare namespace Script {
type RemoteValue = Script.PrimitiveProtocolValue | Script.SymbolRemoteValue | Script.ArrayRemoteValue | Script.ObjectRemoteValue | Script.FunctionRemoteValue | Script.RegExpRemoteValue | Script.DateRemoteValue | Script.MapRemoteValue | Script.SetRemoteValue | Script.WeakMapRemoteValue | Script.WeakSetRemoteValue | Script.IteratorRemoteValue | Script.GeneratorRemoteValue | Script.ErrorRemoteValue | Script.ProxyRemoteValue | Script.PromiseRemoteValue | Script.TypedArrayRemoteValue | Script.ArrayBufferRemoteValue | Script.NodeListRemoteValue | Script.HtmlCollectionRemoteValue | Script.NodeRemoteValue | Script.WindowProxyRemoteValue;

@@ -1131,13 +1210,2 @@ }

export declare namespace Script {
type InternalId = JsUint;
}
export declare namespace Script {
type ListRemoteValue = [...Script.RemoteValue[]];
}
export declare namespace Script {
type MappingRemoteValue = [
...[Script.RemoteValue | string, Script.RemoteValue][]
];
}
export declare namespace Script {
type SymbolRemoteValue = {

@@ -1384,3 +1452,6 @@ type: 'symbol';

arguments?: [...Script.ChannelValue[]];
contexts?: [...BrowsingContext.BrowsingContext[]];
contexts?: [
BrowsingContext.BrowsingContext,
...BrowsingContext.BrowsingContext[]
];
sandbox?: string;

@@ -1387,0 +1458,0 @@ };

{
"name": "chromium-bidi",
"version": "0.4.33",
"version": "0.4.34",
"description": "An implementation of the WebDriver BiDi protocol for Chromium implemented as a JavaScript layer translating between BiDi and CDP, running inside a Chrome tab.",

@@ -191,17 +191,17 @@ "scripts": {

"@actions/core": "1.10.1",
"@puppeteer/browsers": "1.7.1",
"@puppeteer/browsers": "1.8.0",
"@rollup/plugin-commonjs": "25.0.7",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"@types/argparse": "2.0.11",
"@types/chai": "4.3.8",
"@types/chai-as-promised": "7.1.6",
"@types/debug": "4.1.9",
"@types/mocha": "10.0.2",
"@types/node": "20.8.6",
"@types/argparse": "2.0.12",
"@types/chai": "4.3.9",
"@types/chai-as-promised": "7.1.7",
"@types/debug": "4.1.10",
"@types/mocha": "10.0.3",
"@types/node": "20.8.10",
"@types/sinon": "10.0.19",
"@types/websocket": "1.0.7",
"@types/ws": "8.5.7",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"@types/websocket": "1.0.8",
"@types/ws": "8.5.8",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"argparse": "2.0.1",

@@ -212,6 +212,7 @@ "chai": "4.3.10",

"debug": "4.3.4",
"devtools-protocol": "0.0.1213968",
"eslint": "8.51.0",
"devtools-protocol": "0.0.1224083",
"eslint": "8.52.0",
"eslint-config-prettier": "9.0.0",
"eslint-plugin-import": "2.28.1",
"eslint-import-resolver-typescript": "3.6.1",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-mocha": "10.2.0",

@@ -227,9 +228,9 @@ "eslint-plugin-prettier": "5.0.1",

"rollup": "3.29.4",
"sinon": "16.1.0",
"sinon": "17.0.1",
"source-map-support": "0.5.21",
"terser": "5.22.0",
"terser": "5.24.0",
"tslib": "2.6.2",
"typescript": "5.2.2",
"websocket": "1.0.34",
"wireit": "0.14.0",
"wireit": "0.14.1",
"ws": "8.14.2",

@@ -240,5 +241,5 @@ "yargs": "17.7.2",

"dependencies": {
"urlpattern-polyfill": "9.0.0",
"mitt": "3.0.1"
"mitt": "3.0.1",
"urlpattern-polyfill": "9.0.0"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc