Add Brave CDP automation, replace Oracle browser mode

Connects to user's running Brave via Chrome DevTools Protocol
to automate ChatGPT interaction. Uses puppeteer-core to open a
tab, send the prompt, wait for response, and extract the result.

No cookies, no separate profiles, no copy/paste. Just connects
to the browser where the user is already logged in.

One-time setup: relaunch Brave with --remote-debugging-port=9222

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Taylor Eernisse
2026-02-07 16:16:41 -05:00
parent d776a266a8
commit e7882b917b
4163 changed files with 782828 additions and 148 deletions

View File

@@ -0,0 +1,112 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ErrorResponse } from './generated/webdriver-bidi.js';
import { ErrorCode } from './generated/webdriver-bidi.js';
export declare class Exception extends Error {
error: ErrorCode;
message: string;
stacktrace?: string | undefined;
constructor(error: ErrorCode, message: string, stacktrace?: string | undefined);
toErrorResponse(commandId: number): ErrorResponse;
}
export declare class InvalidArgumentException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class InvalidSelectorException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class InvalidSessionIdException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class MoveTargetOutOfBoundsException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchAlertException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchElementException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchFrameException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchHandleException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchHistoryEntryException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchInterceptException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchNodeException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchRequestException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchScriptException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchUserContextException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class SessionNotCreatedException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnknownCommandException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnknownErrorException extends Exception {
constructor(message: string, stacktrace?: string | undefined);
}
export declare class UnableToCaptureScreenException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnableToCloseBrowserException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnsupportedOperationException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchStoragePartitionException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnableToSetCookieException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnableToSetFileInputException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnderspecifiedStoragePartitionException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class InvalidWebExtensionException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchWebExtensionException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchNetworkCollectorException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class NoSuchNetworkDataException extends Exception {
constructor(message: string, stacktrace?: string);
}
export declare class UnavailableNetworkDataException extends Exception {
constructor(message: string, stacktrace?: string);
}

View File

@@ -0,0 +1,166 @@
export class Exception extends Error {
error;
message;
stacktrace;
constructor(error, message, stacktrace) {
super();
this.error = error;
this.message = message;
this.stacktrace = stacktrace;
}
toErrorResponse(commandId) {
return {
type: 'error',
id: commandId,
error: this.error,
message: this.message,
stacktrace: this.stacktrace,
};
}
}
export class InvalidArgumentException extends Exception {
constructor(message, stacktrace) {
super("invalid argument" /* ErrorCode.InvalidArgument */, message, stacktrace);
}
}
export class InvalidSelectorException extends Exception {
constructor(message, stacktrace) {
super("invalid selector" /* ErrorCode.InvalidSelector */, message, stacktrace);
}
}
export class InvalidSessionIdException extends Exception {
constructor(message, stacktrace) {
super("invalid session id" /* ErrorCode.InvalidSessionId */, message, stacktrace);
}
}
export class MoveTargetOutOfBoundsException extends Exception {
constructor(message, stacktrace) {
super("move target out of bounds" /* ErrorCode.MoveTargetOutOfBounds */, message, stacktrace);
}
}
export class NoSuchAlertException extends Exception {
constructor(message, stacktrace) {
super("no such alert" /* ErrorCode.NoSuchAlert */, message, stacktrace);
}
}
export class NoSuchElementException extends Exception {
constructor(message, stacktrace) {
super("no such element" /* ErrorCode.NoSuchElement */, message, stacktrace);
}
}
export class NoSuchFrameException extends Exception {
constructor(message, stacktrace) {
super("no such frame" /* ErrorCode.NoSuchFrame */, message, stacktrace);
}
}
export class NoSuchHandleException extends Exception {
constructor(message, stacktrace) {
super("no such handle" /* ErrorCode.NoSuchHandle */, message, stacktrace);
}
}
export class NoSuchHistoryEntryException extends Exception {
constructor(message, stacktrace) {
super("no such history entry" /* ErrorCode.NoSuchHistoryEntry */, message, stacktrace);
}
}
export class NoSuchInterceptException extends Exception {
constructor(message, stacktrace) {
super("no such intercept" /* ErrorCode.NoSuchIntercept */, message, stacktrace);
}
}
export class NoSuchNodeException extends Exception {
constructor(message, stacktrace) {
super("no such node" /* ErrorCode.NoSuchNode */, message, stacktrace);
}
}
export class NoSuchRequestException extends Exception {
constructor(message, stacktrace) {
super("no such request" /* ErrorCode.NoSuchRequest */, message, stacktrace);
}
}
export class NoSuchScriptException extends Exception {
constructor(message, stacktrace) {
super("no such script" /* ErrorCode.NoSuchScript */, message, stacktrace);
}
}
export class NoSuchUserContextException extends Exception {
constructor(message, stacktrace) {
super("no such user context" /* ErrorCode.NoSuchUserContext */, message, stacktrace);
}
}
export class SessionNotCreatedException extends Exception {
constructor(message, stacktrace) {
super("session not created" /* ErrorCode.SessionNotCreated */, message, stacktrace);
}
}
export class UnknownCommandException extends Exception {
constructor(message, stacktrace) {
super("unknown command" /* ErrorCode.UnknownCommand */, message, stacktrace);
}
}
export class UnknownErrorException extends Exception {
constructor(message, stacktrace = new Error().stack) {
super("unknown error" /* ErrorCode.UnknownError */, message, stacktrace);
}
}
export class UnableToCaptureScreenException extends Exception {
constructor(message, stacktrace) {
super("unable to capture screen" /* ErrorCode.UnableToCaptureScreen */, message, stacktrace);
}
}
export class UnableToCloseBrowserException extends Exception {
constructor(message, stacktrace) {
super("unable to close browser" /* ErrorCode.UnableToCloseBrowser */, message, stacktrace);
}
}
export class UnsupportedOperationException extends Exception {
constructor(message, stacktrace) {
super("unsupported operation" /* ErrorCode.UnsupportedOperation */, message, stacktrace);
}
}
export class NoSuchStoragePartitionException extends Exception {
constructor(message, stacktrace) {
super("no such storage partition" /* ErrorCode.NoSuchStoragePartition */, message, stacktrace);
}
}
export class UnableToSetCookieException extends Exception {
constructor(message, stacktrace) {
super("unable to set cookie" /* ErrorCode.UnableToSetCookie */, message, stacktrace);
}
}
export class UnableToSetFileInputException extends Exception {
constructor(message, stacktrace) {
super("unable to set file input" /* ErrorCode.UnableToSetFileInput */, message, stacktrace);
}
}
export class UnderspecifiedStoragePartitionException extends Exception {
constructor(message, stacktrace) {
super("underspecified storage partition" /* ErrorCode.UnderspecifiedStoragePartition */, message, stacktrace);
}
}
export class InvalidWebExtensionException extends Exception {
constructor(message, stacktrace) {
super("invalid web extension" /* ErrorCode.InvalidWebExtension */, message, stacktrace);
}
}
export class NoSuchWebExtensionException extends Exception {
constructor(message, stacktrace) {
super("no such web extension" /* ErrorCode.NoSuchWebExtension */, message, stacktrace);
}
}
export class NoSuchNetworkCollectorException extends Exception {
constructor(message, stacktrace) {
super("no such network collector" /* ErrorCode.NoSuchNetworkCollector */, message, stacktrace);
}
}
export class NoSuchNetworkDataException extends Exception {
constructor(message, stacktrace) {
super("no such network data" /* ErrorCode.NoSuchNetworkData */, message, stacktrace);
}
}
export class UnavailableNetworkDataException extends Exception {
constructor(message, stacktrace) {
super("unavailable network data" /* ErrorCode.UnavailableNetworkData */, message, stacktrace);
}
}
//# sourceMappingURL=ErrorResponse.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../../src/protocol/ErrorResponse.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,SAAU,SAAQ,KAAK;IAEzB;IACS;IACT;IAHT,YACS,KAAgB,EACP,OAAe,EACxB,UAAmB;QAE1B,KAAK,EAAE,CAAC;QAJD,UAAK,GAAL,KAAK,CAAW;QACP,YAAO,GAAP,OAAO,CAAQ;QACxB,eAAU,GAAV,UAAU,CAAS;IAG5B,CAAC;IAED,eAAe,CAAC,SAAiB;QAC/B,OAAO;YACL,IAAI,EAAE,OAAO;YACb,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IACrD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,qDAA4B,OAAO,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,SAAS;IACrD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,qDAA4B,OAAO,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;CACF;AAED,MAAM,OAAO,yBAA0B,SAAQ,SAAS;IACtD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,wDAA6B,OAAO,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;CACF;AAED,MAAM,OAAO,8BAA+B,SAAQ,SAAS;IAC3D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,oEAAkC,OA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AA2B,SAAQ,SAAS;IACvD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,2DAA8B,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF;AAED,MAAM,OAAO,6BAA8B,SAAQ,SAAS;IAC1D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,kEAAiC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AAED,MAAM,OAAO,uCAAwC,SAAQ,SAAS;IACpE,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,oFAA2C,OAAO,EAAE,UAAU,CAAC,CAAC;IACvE,CAAC;CACF;AAED,MAAM,OAAO,4BAA6B,SAAQ,SAAS;IACzD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,8DAAgC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC5D,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,SAAS;IACxD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,6DAA+B,OAAO,EAAE,UAAU,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,OAAO,+BAAgC,SAAQ,SAAS;IAC5D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,qEAAmC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;CACF;AACD,MAAM,OAAO,0BAA2B,SAAQ,SAAS;IACvD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,2DAA8B,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF;AACD,MAAM,OAAO,+BAAgC,SAAQ,SAAS;IAC5D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,oEAAmC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;CACF"}

77
node_modules/chromium-bidi/lib/esm/protocol/cdp.d.ts generated vendored Normal file
View File

@@ -0,0 +1,77 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type { BrowsingContext, JsUint, Script } from './generated/webdriver-bidi.js';
export type EventNames = Event['method'];
export type Message = CommandResponse | Event;
export type Command = {
id: JsUint;
} & CommandData;
export type CommandData = SendCommandCommand | GetSessionCommand | ResolveRealmCommand;
export interface CommandResponse {
type: 'success';
id: JsUint;
result: ResultData;
}
export type ResultData = SendCommandResult | GetSessionResult | ResolveRealmResult;
export interface SendCommandCommand {
method: 'goog:cdp.sendCommand';
params: SendCommandParameters;
}
export interface SendCommandParameters<Command extends keyof ProtocolMapping.Commands = keyof ProtocolMapping.Commands> {
method: Command;
params?: ProtocolMapping.Commands[Command]['paramsType'][0];
session?: Protocol.Target.SessionID;
}
export interface SendCommandResult {
result: ProtocolMapping.Commands[keyof ProtocolMapping.Commands]['returnType'];
session?: Protocol.Target.SessionID;
}
export interface GetSessionCommand {
method: 'goog:cdp.getSession';
params: GetSessionParameters;
}
export interface GetSessionParameters {
context: BrowsingContext.BrowsingContext;
}
export interface GetSessionResult {
session?: Protocol.Target.SessionID;
}
export interface ResolveRealmCommand {
method: 'goog:cdp.resolveRealm';
params: ResolveRealmParameters;
}
export interface ResolveRealmParameters {
realm: Script.Realm;
}
export interface ResolveRealmResult {
executionContextId: Protocol.Runtime.ExecutionContextId;
}
export type Event = {
type: 'event';
} & EventData;
export type EventData = EventDataFor<keyof ProtocolMapping.Events>;
export interface EventDataFor<EventName extends keyof ProtocolMapping.Events> {
method: `goog:cdp.${EventName}`;
params: EventParametersFor<EventName>;
}
export interface EventParametersFor<EventName extends keyof ProtocolMapping.Events> {
event: EventName;
params: ProtocolMapping.Events[EventName][0];
session: Protocol.Target.SessionID;
}

2
node_modules/chromium-bidi/lib/esm/protocol/cdp.js generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=cdp.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"cdp.js","sourceRoot":"","sources":["../../../src/protocol/cdp.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,112 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type * as Cdp from './cdp.js';
import type * as WebDriverBidiBluetooth from './generated/webdriver-bidi-bluetooth.js';
import type * as WebDriverBidiSpeculation from './generated/webdriver-bidi-nav-speculation.ts';
import type * as WebDriverBidiPermissions from './generated/webdriver-bidi-permissions.js';
import type * as WebDriverBidiUAClientHints from './generated/webdriver-bidi-ua-client-hints.js';
import type * as WebDriverBidi from './generated/webdriver-bidi.js';
export type EventNames = Cdp.EventNames | `${BiDiModule}` | `${Bluetooth.EventNames}` | `${BrowsingContext.EventNames}` | `${Input.EventNames}` | `${Log.EventNames}` | `${Network.EventNames}` | `${Script.EventNames}` | `${Speculation.EventNames}`;
export declare enum BiDiModule {
Bluetooth = "bluetooth",
Browser = "browser",
BrowsingContext = "browsingContext",
Cdp = "goog:cdp",
Input = "input",
Log = "log",
Network = "network",
Script = "script",
Session = "session",
Speculation = "speculation"
}
export declare namespace Script {
enum EventNames {
Message = "script.message",
RealmCreated = "script.realmCreated",
RealmDestroyed = "script.realmDestroyed"
}
}
export declare namespace Log {
enum EventNames {
LogEntryAdded = "log.entryAdded"
}
}
export declare namespace BrowsingContext {
enum EventNames {
ContextCreated = "browsingContext.contextCreated",
ContextDestroyed = "browsingContext.contextDestroyed",
DomContentLoaded = "browsingContext.domContentLoaded",
DownloadEnd = "browsingContext.downloadEnd",
DownloadWillBegin = "browsingContext.downloadWillBegin",
FragmentNavigated = "browsingContext.fragmentNavigated",
HistoryUpdated = "browsingContext.historyUpdated",
Load = "browsingContext.load",
NavigationAborted = "browsingContext.navigationAborted",
NavigationCommitted = "browsingContext.navigationCommitted",
NavigationFailed = "browsingContext.navigationFailed",
NavigationStarted = "browsingContext.navigationStarted",
UserPromptClosed = "browsingContext.userPromptClosed",
UserPromptOpened = "browsingContext.userPromptOpened"
}
}
export declare namespace Input {
enum EventNames {
FileDialogOpened = "input.fileDialogOpened"
}
}
export declare namespace Network {
enum EventNames {
AuthRequired = "network.authRequired",
BeforeRequestSent = "network.beforeRequestSent",
FetchError = "network.fetchError",
ResponseCompleted = "network.responseCompleted",
ResponseStarted = "network.responseStarted"
}
}
export declare namespace Bluetooth {
enum EventNames {
RequestDevicePromptUpdated = "bluetooth.requestDevicePromptUpdated",
GattConnectionAttempted = "bluetooth.gattConnectionAttempted",
CharacteristicEventGenerated = "bluetooth.characteristicEventGenerated",
DescriptorEventGenerated = "bluetooth.descriptorEventGenerated"
}
}
export declare namespace Speculation {
enum EventNames {
PrefetchStatusUpdated = "speculation.prefetchStatusUpdated"
}
}
type ExternalSpecCommand<T> = {
id: WebDriverBidi.JsUint;
} & T;
type ExternalSpecEvent<T> = {
type: 'event';
} & T & WebDriverBidi.Extensible;
export type Command = (WebDriverBidi.Command | Cdp.Command | ExternalSpecCommand<WebDriverBidiPermissions.PermissionsCommand> | ExternalSpecCommand<WebDriverBidiBluetooth.BluetoothCommand> | ExternalSpecCommand<WebDriverBidiUAClientHints.UserAgentClientHintsCommand>) & {
'goog:channel'?: GoogChannel;
};
export type CommandResponse = WebDriverBidi.CommandResponse | Cdp.CommandResponse;
export type BluetoothEvent = ExternalSpecEvent<WebDriverBidiBluetooth.Bluetooth.RequestDevicePromptUpdated> | ExternalSpecEvent<WebDriverBidiBluetooth.Bluetooth.GattConnectionAttempted> | ExternalSpecEvent<WebDriverBidiBluetooth.Bluetooth.CharacteristicEventGenerated> | ExternalSpecEvent<WebDriverBidiBluetooth.Bluetooth.DescriptorEventGenerated>;
export type SpeculationEvent = ExternalSpecEvent<WebDriverBidiSpeculation.Speculation.PrefetchStatusUpdated>;
export type Event = WebDriverBidi.Event | Cdp.Event | BluetoothEvent | SpeculationEvent;
export declare const EVENT_NAMES: Set<BiDiModule | Bluetooth.EventNames | BrowsingContext.EventNames | Input.EventNames.FileDialogOpened | Log.EventNames.LogEntryAdded | Network.EventNames | Script.EventNames | Speculation.EventNames.PrefetchStatusUpdated>;
export type ResultData = WebDriverBidi.ResultData | Cdp.ResultData;
export type GoogChannel = string | null;
export type Message = (WebDriverBidi.Message | Cdp.Message | BluetoothEvent | SpeculationEvent) & {
'goog:channel'?: GoogChannel;
};
export {};

View File

@@ -0,0 +1,124 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// keep-sorted end
export var BiDiModule;
(function (BiDiModule) {
// keep-sorted start
BiDiModule["Bluetooth"] = "bluetooth";
BiDiModule["Browser"] = "browser";
BiDiModule["BrowsingContext"] = "browsingContext";
BiDiModule["Cdp"] = "goog:cdp";
BiDiModule["Input"] = "input";
BiDiModule["Log"] = "log";
BiDiModule["Network"] = "network";
BiDiModule["Script"] = "script";
BiDiModule["Session"] = "session";
BiDiModule["Speculation"] = "speculation";
// keep-sorted end
})(BiDiModule || (BiDiModule = {}));
export var Script;
(function (Script) {
let EventNames;
(function (EventNames) {
// keep-sorted start
EventNames["Message"] = "script.message";
EventNames["RealmCreated"] = "script.realmCreated";
EventNames["RealmDestroyed"] = "script.realmDestroyed";
// keep-sorted end
})(EventNames = Script.EventNames || (Script.EventNames = {}));
})(Script || (Script = {}));
export var Log;
(function (Log) {
let EventNames;
(function (EventNames) {
EventNames["LogEntryAdded"] = "log.entryAdded";
})(EventNames = Log.EventNames || (Log.EventNames = {}));
})(Log || (Log = {}));
export var BrowsingContext;
(function (BrowsingContext) {
let EventNames;
(function (EventNames) {
// keep-sorted start
EventNames["ContextCreated"] = "browsingContext.contextCreated";
EventNames["ContextDestroyed"] = "browsingContext.contextDestroyed";
EventNames["DomContentLoaded"] = "browsingContext.domContentLoaded";
EventNames["DownloadEnd"] = "browsingContext.downloadEnd";
EventNames["DownloadWillBegin"] = "browsingContext.downloadWillBegin";
EventNames["FragmentNavigated"] = "browsingContext.fragmentNavigated";
EventNames["HistoryUpdated"] = "browsingContext.historyUpdated";
EventNames["Load"] = "browsingContext.load";
EventNames["NavigationAborted"] = "browsingContext.navigationAborted";
EventNames["NavigationCommitted"] = "browsingContext.navigationCommitted";
EventNames["NavigationFailed"] = "browsingContext.navigationFailed";
EventNames["NavigationStarted"] = "browsingContext.navigationStarted";
EventNames["UserPromptClosed"] = "browsingContext.userPromptClosed";
EventNames["UserPromptOpened"] = "browsingContext.userPromptOpened";
// keep-sorted end
})(EventNames = BrowsingContext.EventNames || (BrowsingContext.EventNames = {}));
})(BrowsingContext || (BrowsingContext = {}));
export var Input;
(function (Input) {
let EventNames;
(function (EventNames) {
// keep-sorted start
EventNames["FileDialogOpened"] = "input.fileDialogOpened";
// keep-sorted end
})(EventNames = Input.EventNames || (Input.EventNames = {}));
})(Input || (Input = {}));
export var Network;
(function (Network) {
let EventNames;
(function (EventNames) {
// keep-sorted start
EventNames["AuthRequired"] = "network.authRequired";
EventNames["BeforeRequestSent"] = "network.beforeRequestSent";
EventNames["FetchError"] = "network.fetchError";
EventNames["ResponseCompleted"] = "network.responseCompleted";
EventNames["ResponseStarted"] = "network.responseStarted";
// keep-sorted end
})(EventNames = Network.EventNames || (Network.EventNames = {}));
})(Network || (Network = {}));
export var Bluetooth;
(function (Bluetooth) {
let EventNames;
(function (EventNames) {
EventNames["RequestDevicePromptUpdated"] = "bluetooth.requestDevicePromptUpdated";
EventNames["GattConnectionAttempted"] = "bluetooth.gattConnectionAttempted";
EventNames["CharacteristicEventGenerated"] = "bluetooth.characteristicEventGenerated";
EventNames["DescriptorEventGenerated"] = "bluetooth.descriptorEventGenerated";
})(EventNames = Bluetooth.EventNames || (Bluetooth.EventNames = {}));
})(Bluetooth || (Bluetooth = {}));
export var Speculation;
(function (Speculation) {
let EventNames;
(function (EventNames) {
EventNames["PrefetchStatusUpdated"] = "speculation.prefetchStatusUpdated";
})(EventNames = Speculation.EventNames || (Speculation.EventNames = {}));
})(Speculation || (Speculation = {}));
export const EVENT_NAMES = new Set([
// keep-sorted start
...Object.values(BiDiModule),
...Object.values(Bluetooth.EventNames),
...Object.values(BrowsingContext.EventNames),
...Object.values(Input.EventNames),
...Object.values(Log.EventNames),
...Object.values(Network.EventNames),
...Object.values(Script.EventNames),
...Object.values(Speculation.EventNames),
// keep-sorted end
]);
//# sourceMappingURL=chromium-bidi.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chromium-bidi.js","sourceRoot":"","sources":["../../../src/protocol/chromium-bidi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAoBH,kBAAkB;AAElB,MAAM,CAAN,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB,oBAAoB;IACpB,qCAAuB,CAAA;IACvB,iCAAmB,CAAA;IACnB,iDAAmC,CAAA;IACnC,8BAAgB,CAAA;IAChB,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,yCAA2B,CAA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MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACnC,GAAG,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC;IACxC,kBAAkB;CACnB,CAAC,CAAC"}

View File

@@ -0,0 +1,309 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
* Run `node tools/generate-bidi-types.mjs` to regenerate.
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
*/
export declare namespace Bluetooth {
type BluetoothUuid = string;
}
export declare namespace Bluetooth {
type BluetoothManufacturerData = {
key: number;
data: string;
};
}
export declare namespace Bluetooth {
type CharacteristicProperties = {
broadcast?: boolean;
read?: boolean;
writeWithoutResponse?: boolean;
write?: boolean;
notify?: boolean;
indicate?: boolean;
authenticatedSignedWrites?: boolean;
extendedProperties?: boolean;
};
}
export declare namespace Bluetooth {
type RequestDevice = string;
}
export declare namespace Bluetooth {
type RequestDeviceInfo = {
id: Bluetooth.RequestDevice;
name: string | null;
};
}
export declare namespace Bluetooth {
type RequestDevicePrompt = string;
}
export declare namespace Bluetooth {
type ScanRecord = {
name?: string;
uuids?: [...Bluetooth.BluetoothUuid[]];
appearance?: number;
manufacturerData?: [...Bluetooth.BluetoothManufacturerData[]];
};
}
export type BluetoothCommand = Bluetooth.HandleRequestDevicePrompt | Bluetooth.SimulateAdapter | Bluetooth.DisableSimulation | Bluetooth.SimulatePreconnectedPeripheral | Bluetooth.SimulateAdvertisement | Bluetooth.SimulateGattConnectionResponse | Bluetooth.SimulateGattDisconnection | Bluetooth.SimulateService | Bluetooth.SimulateCharacteristic | Bluetooth.SimulateCharacteristicResponse | Bluetooth.SimulateDescriptor | Bluetooth.SimulateDescriptorResponse;
export declare namespace Bluetooth {
type HandleRequestDevicePrompt = {
method: 'bluetooth.handleRequestDevicePrompt';
params: Bluetooth.HandleRequestDevicePromptParameters;
};
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
} & (Bluetooth.HandleRequestDevicePromptAcceptParameters | Bluetooth.HandleRequestDevicePromptCancelParameters);
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptAcceptParameters = {
accept: true;
device: Bluetooth.RequestDevice;
};
}
export declare namespace Bluetooth {
type HandleRequestDevicePromptCancelParameters = {
accept: false;
};
}
export declare namespace Bluetooth {
type SimulateAdapter = {
method: 'bluetooth.simulateAdapter';
params: Bluetooth.SimulateAdapterParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdapterParameters = {
context: string;
leSupported?: boolean;
state: 'absent' | 'powered-off' | 'powered-on';
};
}
export declare namespace Bluetooth {
type DisableSimulation = {
method: 'bluetooth.disableSimulation';
params: Bluetooth.DisableSimulationParameters;
};
}
export declare namespace Bluetooth {
type DisableSimulationParameters = {
context: string;
};
}
export declare namespace Bluetooth {
type SimulatePreconnectedPeripheral = {
method: 'bluetooth.simulatePreconnectedPeripheral';
params: Bluetooth.SimulatePreconnectedPeripheralParameters;
};
}
export declare namespace Bluetooth {
type SimulatePreconnectedPeripheralParameters = {
context: string;
address: string;
name: string;
manufacturerData: [...Bluetooth.BluetoothManufacturerData[]];
knownServiceUuids: [...Bluetooth.BluetoothUuid[]];
};
}
export declare namespace Bluetooth {
type SimulateAdvertisement = {
method: 'bluetooth.simulateAdvertisement';
params: Bluetooth.SimulateAdvertisementParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdvertisementParameters = {
context: string;
scanEntry: Bluetooth.SimulateAdvertisementScanEntryParameters;
};
}
export declare namespace Bluetooth {
type SimulateAdvertisementScanEntryParameters = {
deviceAddress: string;
rssi: number;
scanRecord: Bluetooth.ScanRecord;
};
}
export declare namespace Bluetooth {
type SimulateGattConnectionResponse = {
method: 'bluetooth.simulateGattConnectionResponse';
params: Bluetooth.SimulateGattConnectionResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateGattConnectionResponseParameters = {
context: string;
address: string;
code: number;
};
}
export declare namespace Bluetooth {
type SimulateGattDisconnection = {
method: 'bluetooth.simulateGattDisconnection';
params: Bluetooth.SimulateGattDisconnectionParameters;
};
}
export declare namespace Bluetooth {
type SimulateGattDisconnectionParameters = {
context: string;
address: string;
};
}
export declare namespace Bluetooth {
type SimulateService = {
method: 'bluetooth.simulateService';
params: Bluetooth.SimulateServiceParameters;
};
}
export declare namespace Bluetooth {
type SimulateServiceParameters = {
context: string;
address: string;
uuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateCharacteristic = {
method: 'bluetooth.simulateCharacteristic';
params: Bluetooth.SimulateCharacteristicParameters;
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
characteristicProperties?: Bluetooth.CharacteristicProperties;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicResponse = {
method: 'bluetooth.simulateCharacteristicResponse';
params: Bluetooth.SimulateCharacteristicResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateCharacteristicResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write' | 'subscribe-to-notifications' | 'unsubscribe-from-notifications';
code: number;
data?: [...number[]];
};
}
export declare namespace Bluetooth {
type SimulateDescriptor = {
method: 'bluetooth.simulateDescriptor';
params: Bluetooth.SimulateDescriptorParameters;
};
}
export declare namespace Bluetooth {
type SimulateDescriptorParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'add' | 'remove';
};
}
export declare namespace Bluetooth {
type SimulateDescriptorResponse = {
method: 'bluetooth.simulateDescriptorResponse';
params: Bluetooth.SimulateDescriptorResponseParameters;
};
}
export declare namespace Bluetooth {
type SimulateDescriptorResponseParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
code: number;
data?: [...number[]];
};
}
export type BluetoothEvent = Bluetooth.RequestDevicePromptUpdated | Bluetooth.GattConnectionAttempted;
export declare namespace Bluetooth {
type RequestDevicePromptUpdated = {
method: 'bluetooth.requestDevicePromptUpdated';
params: Bluetooth.RequestDevicePromptUpdatedParameters;
};
}
export declare namespace Bluetooth {
type RequestDevicePromptUpdatedParameters = {
context: string;
prompt: Bluetooth.RequestDevicePrompt;
devices: [...Bluetooth.RequestDeviceInfo[]];
};
}
export declare namespace Bluetooth {
type GattConnectionAttempted = {
method: 'bluetooth.gattConnectionAttempted';
params: Bluetooth.GattConnectionAttemptedParameters;
};
}
export declare namespace Bluetooth {
type GattConnectionAttemptedParameters = {
context: string;
address: string;
};
}
export declare namespace Bluetooth {
type CharacteristicEventGenerated = {
method: 'bluetooth.characteristicEventGenerated';
params: Bluetooth.CharacteristicEventGeneratedParameters;
};
}
export declare namespace Bluetooth {
type CharacteristicEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write-with-response' | 'write-without-response' | 'subscribe-to-notifications' | 'unsubscribe-from-notifications';
data?: [...number[]];
};
}
export declare namespace Bluetooth {
type DescriptorEventGenerated = {
method: 'bluetooth.descriptorEventGenerated';
params: Bluetooth.DescriptorEventGeneratedParameters;
};
}
export declare namespace Bluetooth {
type DescriptorEventGeneratedParameters = {
context: string;
address: string;
serviceUuid: Bluetooth.BluetoothUuid;
characteristicUuid: Bluetooth.BluetoothUuid;
descriptorUuid: Bluetooth.BluetoothUuid;
type: 'read' | 'write';
data?: [...number[]];
};
}

View File

@@ -0,0 +1,18 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
//# sourceMappingURL=webdriver-bidi-bluetooth.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webdriver-bidi-bluetooth.js","sourceRoot":"","sources":["../../../../src/protocol/generated/webdriver-bidi-bluetooth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}

View File

@@ -0,0 +1,43 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
* Run `node tools/generate-bidi-types.mjs` to regenerate.
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
*/
export declare namespace Speculation {
const enum PreloadingStatus {
Pending = "pending",
Ready = "ready",
Success = "success",
Failure = "failure"
}
}
export type SpeculationEvent = Speculation.PrefetchStatusUpdated;
export declare namespace Speculation {
type PrefetchStatusUpdated = {
method: 'speculation.prefetchStatusUpdated';
params: Speculation.PrefetchStatusUpdatedParameters;
};
}
export declare namespace Speculation {
type PrefetchStatusUpdatedParameters = {
context: string;
url: string;
status: Speculation.PreloadingStatus;
};
}

View File

@@ -0,0 +1,18 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
//# sourceMappingURL=webdriver-bidi-nav-speculation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webdriver-bidi-nav-speculation.js","sourceRoot":"","sources":["../../../../src/protocol/generated/webdriver-bidi-nav-speculation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}

View File

@@ -0,0 +1,49 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
* Run `node tools/generate-bidi-types.mjs` to regenerate.
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
*/
export type PermissionsCommand = Permissions.SetPermission;
export declare namespace Permissions {
type PermissionDescriptor = {
name: string;
};
}
export declare namespace Permissions {
const enum PermissionState {
Granted = "granted",
Denied = "denied",
Prompt = "prompt"
}
}
export declare namespace Permissions {
type SetPermission = {
method: 'permissions.setPermission';
params: Permissions.SetPermissionParameters;
};
}
export declare namespace Permissions {
type SetPermissionParameters = {
descriptor: Permissions.PermissionDescriptor;
state: Permissions.PermissionState;
origin: string;
embeddedOrigin?: string;
userContext?: string;
};
}

View File

@@ -0,0 +1,18 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
//# sourceMappingURL=webdriver-bidi-permissions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webdriver-bidi-permissions.js","sourceRoot":"","sources":["../../../../src/protocol/generated/webdriver-bidi-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}

View File

@@ -0,0 +1,56 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* THIS FILE IS AUTOGENERATED by cddlconv 0.1.7.
* Run `node tools/generate-bidi-types.mjs` to regenerate.
* @see https://github.com/w3c/webdriver-bidi/blob/master/index.bs
*/
export type UserAgentClientHintsCommand = Emulation.SetClientHintsOverrideCommand;
export declare namespace Emulation {
type SetClientHintsOverrideCommand = {
method: 'emulation.setClientHintsOverride';
params: {
clientHints: Emulation.ClientHintsMetadata | null;
contexts?: [string, ...string[]];
userContexts?: [string, ...string[]];
};
};
type SetClientHintsOverrideParameters = SetClientHintsOverrideCommand['params'];
}
export declare namespace Emulation {
type ClientHintsMetadata = {
brands?: [...Emulation.BrandVersion[]];
fullVersionList?: [...Emulation.BrandVersion[]];
platform?: string;
platformVersion?: string;
architecture?: string;
model?: string;
mobile?: boolean;
bitness?: string;
wow64?: boolean;
formFactors?: [...string[]];
};
}
export declare namespace Emulation {
type BrandVersion = {
brand: string;
version: string;
};
}
export declare namespace Emulation {
type SetClientHintsOverrideResult = Record<string, never>;
}

View File

@@ -0,0 +1,18 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
//# sourceMappingURL=webdriver-bidi-ua-client-hints.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webdriver-bidi-ua-client-hints.js","sourceRoot":"","sources":["../../../../src/protocol/generated/webdriver-bidi-ua-client-hints.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,18 @@
/**
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export {};
//# sourceMappingURL=webdriver-bidi.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"webdriver-bidi.js","sourceRoot":"","sources":["../../../../src/protocol/generated/webdriver-bidi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG"}

View File

@@ -0,0 +1,24 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * as Cdp from './cdp.js';
export * as ChromiumBidi from './chromium-bidi.js';
export * from './generated/webdriver-bidi.js';
export * from './ErrorResponse.js';
export * from './generated/webdriver-bidi-permissions.js';
export * from './generated/webdriver-bidi-bluetooth.js';
export * from './generated/webdriver-bidi-nav-speculation.js';
export * as UAClientHints from './generated/webdriver-bidi-ua-client-hints.js';

View File

@@ -0,0 +1,26 @@
/**
* Copyright 2023 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * as Cdp from './cdp.js';
export * as ChromiumBidi from './chromium-bidi.js';
export * from './generated/webdriver-bidi.js';
export * from './ErrorResponse.js';
export * from './generated/webdriver-bidi-permissions.js';
export * from './generated/webdriver-bidi-bluetooth.js';
export * from './generated/webdriver-bidi-nav-speculation.js';
// Alias is required, as `UAClientHints` spec defines `Emulation` namespace.
export * as UAClientHints from './generated/webdriver-bidi-ua-client-hints.js';
//# sourceMappingURL=protocol.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AACnC,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,4EAA4E;AAC5E,OAAO,KAAK,aAAa,MAAM,+CAA+C,CAAC"}