A big commit with a bunch of node modules so I could run puppeteer for Walmart. Added some todos and Headway's templates.

This commit is contained in:
Norm Rasmussen
2024-02-28 17:13:10 -05:00
parent dbcdfc8472
commit 1184fe0cd1
1107 changed files with 76526 additions and 8934 deletions

View File

@ -14,8 +14,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import type { ErrorResponse } from './webdriver-bidi.js';
import { ErrorCode } from './webdriver-bidi.js';
import type { ErrorResponse } from './generated/webdriver-bidi.js';
import { ErrorCode } from './generated/webdriver-bidi.js';
export declare class Exception {
error: ErrorCode;
message: string;
@ -59,6 +59,9 @@ export declare class NoSuchRequestException extends Exception {
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);
}
@ -77,3 +80,15 @@ export declare class UnableToCloseBrowserException extends Exception {
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);
}

View File

@ -1,6 +1,6 @@
"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.NoSuchHistoryEntryException = exports.NoSuchHandleException = exports.NoSuchFrameException = exports.NoSuchElementException = exports.NoSuchAlertException = exports.MoveTargetOutOfBoundsException = exports.InvalidSessionIdException = exports.InvalidArgumentException = exports.Exception = void 0;
exports.UnderspecifiedStoragePartitionException = exports.UnableToSetFileInputException = exports.UnableToSetCookieException = exports.NoSuchStoragePartitionException = exports.UnsupportedOperationException = exports.UnableToCloseBrowserException = exports.UnableToCaptureScreenException = exports.UnknownErrorException = exports.UnknownCommandException = exports.SessionNotCreatedException = exports.NoSuchUserContextException = 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 {
error;
message;
@ -93,6 +93,12 @@ class NoSuchScriptException extends Exception {
}
}
exports.NoSuchScriptException = NoSuchScriptException;
class NoSuchUserContextException extends Exception {
constructor(message, stacktrace) {
super("no such user context" /* ErrorCode.NoSuchUserContext */, message, stacktrace);
}
}
exports.NoSuchUserContextException = NoSuchUserContextException;
class SessionNotCreatedException extends Exception {
constructor(message, stacktrace) {
super("session not created" /* ErrorCode.SessionNotCreated */, message, stacktrace);
@ -129,4 +135,28 @@ class UnsupportedOperationException extends Exception {
}
}
exports.UnsupportedOperationException = UnsupportedOperationException;
class NoSuchStoragePartitionException extends Exception {
constructor(message, stacktrace) {
super("no such storage partition" /* ErrorCode.NoSuchStoragePartition */, message, stacktrace);
}
}
exports.NoSuchStoragePartitionException = NoSuchStoragePartitionException;
class UnableToSetCookieException extends Exception {
constructor(message, stacktrace) {
super("unable to set cookie" /* ErrorCode.UnableToSetCookie */, message, stacktrace);
}
}
exports.UnableToSetCookieException = UnableToSetCookieException;
class UnableToSetFileInputException extends Exception {
constructor(message, stacktrace) {
super("unable to set file input" /* ErrorCode.UnableToSetFileInput */, message, stacktrace);
}
}
exports.UnableToSetFileInputException = UnableToSetFileInputException;
class UnderspecifiedStoragePartitionException extends Exception {
constructor(message, stacktrace) {
super("underspecified storage partition" /* ErrorCode.UnderspecifiedStoragePartition */, message, stacktrace);
}
}
exports.UnderspecifiedStoragePartitionException = UnderspecifiedStoragePartitionException;
//# sourceMappingURL=ErrorResponse.js.map

View File

@ -1 +1 @@
{"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../../src/protocol/ErrorResponse.ts"],"names":[],"mappings":";;;AAmBA,MAAa,SAAS;IAEX;IACA;IACA;IAHT,YACS,KAAgB,EAChB,OAAe,EACf,UAAmB;QAFnB,UAAK,GAAL,KAAK,CAAW;QAChB,YAAO,GAAP,OAAO,CAAQ;QACf,eAAU,GAAV,UAAU,CAAS;IACzB,CAAC;IAEJ,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;AAhBD,8BAgBC;AAED,MAAa,wBAAyB,SAAQ,SAAS;IACrD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,qDAA4B,OAAO,EAAE,UAAU,CAAC,CAAC;IACxD,CAAC;CACF;AAJD,4DAIC;AAED,MAAa,yBAA0B,SAAQ,SAAS;IACtD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,wDAA6B,OAAO,EAAE,UAAU,CAAC,CAAC;IACzD,CAAC;CACF;AAJD,8DAIC;AAED,MAAa,8BAA+B,SAAQ,SAAS;IAC3D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,oEAAkC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;CACF;AAJD,wEAIC;AAED,MAAa,oBAAqB,SAAQ,SAAS;IACjD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,8CAAwB,OAAO,EAAE,UAAU,CAAC,CAAC;IACpD,CAAC;CACF;AAJD,oDAIC;AAED,MAAa,sBAAuB,SAAQ,SAAS;IACnD,YA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B,SAAQ,SAAS;IAC3D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,mEAAkC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;CACF;AAJD,wEAIC;AAED,MAAa,6BAA8B,SAAQ,SAAS;IAC1D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,iEAAiC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,6BAA8B,SAAQ,SAAS;IAC1D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,+DAAiC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,+BAAgC,SAAQ,SAAS;IAC5D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,qEAAmC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC/D,CAAC;CACF;AAJD,0EAIC;AAED,MAAa,0BAA2B,SAAQ,SAAS;IACvD,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,2DAA8B,OAAO,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF;AAJD,gEAIC;AAED,MAAa,6BAA8B,SAAQ,SAAS;IAC1D,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,kEAAiC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AAJD,sEAIC;AAED,MAAa,uCAAwC,SAAQ,SAAS;IACpE,YAAY,OAAe,EAAE,UAAmB;QAC9C,KAAK,oFAA2C,OAAO,EAAE,UAAU,CAAC,CAAC;IACvE,CAAC;CACF;AAJD,0FAIC"}

View File

@ -16,7 +16,7 @@
*/
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type { BrowsingContext, JsUint } from './webdriver-bidi.js';
import type { BrowsingContext, JsUint } from './generated/webdriver-bidi.js';
export type EventNames = Event['method'];
export type Message = CommandResponse | Event;
export type Command = {

View File

@ -15,7 +15,8 @@
* limitations under the License.
*/
import type * as Cdp from './cdp.js';
import type * as WebDriverBidi from './webdriver-bidi.js';
import type * as WebDriverBidiPermissions from './generated/webdriver-bidi-permissions.js';
import type * as WebDriverBidi from './generated/webdriver-bidi.js';
export type EventNames = BiDiModule | BrowsingContext.EventNames | Cdp.EventNames | Log.EventNames | Network.EventNames | Script.EventNames;
export declare enum BiDiModule {
Browser = "browser",
@ -63,15 +64,18 @@ export declare namespace Network {
ResponseStarted = "network.responseStarted"
}
}
export type Command = (WebDriverBidi.Command | Cdp.Command) & {
export type Command = (WebDriverBidi.Command | Cdp.Command | ({
id: WebDriverBidi.JsUint;
} & WebDriverBidiPermissions.PermissionsCommand)) & {
channel?: WebDriverBidi.Script.Channel;
};
export type CommandResponse = WebDriverBidi.CommandResponse | Cdp.CommandResponse;
export type Event = WebDriverBidi.Event | Cdp.Event;
export declare const EVENT_NAMES: Set<BiDiModule | BrowsingContext.EventNames | Log.EventNames.LogEntryAdded | Network.EventNames | Script.EventNames>;
export type ResultData = WebDriverBidi.ResultData | Cdp.ResultData;
export type BidiPlusChannel = string | null;
export type Message = (WebDriverBidi.Message | Cdp.Message | {
launched: true;
}) & {
channel?: WebDriverBidi.Script.Channel;
channel?: BidiPlusChannel;
};

View File

@ -1 +1 @@
{"version":3,"file":"chromium-bidi.js","sourceRoot":"","sources":["../../../src/protocol/chromium-bidi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAaH,kBAAkB;AAElB,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,oBAAoB;IACpB,iCAAmB,CAAA;IACnB,iDAAmC,CAAA;IACnC,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,kBAAkB;AACpB,CAAC,EAXW,UAAU,0BAAV,UAAU,QAWrB;AAED,IAAiB,MAAM,CAQtB;AARD,WAAi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;IACjC,oBAAoB;IACpB,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IAC5B,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC;IAC5C,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;IAChC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACnC,kBAAkB;CACnB,CAAC,CAAC"}
{"version":3,"file":"chromium-bidi.js","sourceRoot":"","sources":["../../../src/protocol/chromium-bidi.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAcH,kBAAkB;AAElB,IAAY,UAWX;AAXD,WAAY,UAAU;IACpB,oBAAoB;IACpB,iCAAmB,CAAA;IACnB,iDAAmC,CAAA;IACnC,yBAAW,CAAA;IACX,6BAAe,CAAA;IACf,yBAAW,CAAA;IACX,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,kBAAkB;AACpB,CAAC,EAXW,UAAU,0BAAV,UAAU,QAWrB;AAED,IAAiB,MAAM,CAQtB;AARD,WAAiB,MAAM;IACrB,IAAY,UAMX;IAND,WAAY,UAAU;QACpB,oBAAoB;QACpB,wCAA0B,CAAA;QAC1B,kDAAoC,CAAA;QACpC,sDAAwC,CAAA;QACxC,kBAAkB;IACpB,CAAC,EANW,UAAU,GAAV,iBAAU,KAAV,iBAAU,QAMrB;AACH,CAAC,EARgB,MAAM,sBAAN,MAAM,QAQtB;AAED,IAAiB,GAAG,CAInB;AAJD,WAAiB,GAAG;IAClB,IAAY,UAEX;IAFD,WAAY,UAAU;QACpB,8CAAgC,CAAA;IAClC,CAAC,EAFW,UAAU,GAAV,cAAU,KAAV,cAAU,QAErB;AACH,CAAC,EAJgB,GAAG,mBAAH,GAAG,QAInB;AAED,IAAiB,eAAe,CAgB/B;AAhBD,WAAiB,eAAe;IAC9B,IAAY,UAcX;IAdD,WAAY,UAAU;QACpB,oBAAoB;QACpB,+DAAiD,CAAA;QACjD,mEAAqD,CAAA;QACrD,mEAAqD,CAAA;QACrD,qEAAuD,CAAA;QACvD,qEAAuD,CAAA;QACvD,2CAA6B,CAAA;QAC7B,qEAAuD,CAAA;QACvD,mEAAqD,CAAA;QACrD,qEAAuD,CAAA;QACvD,mEAAqD,CAAA;QACrD,mEAAqD,CAAA;QACrD,kBAAkB;IACpB,CAAC,EAdW,UAAU,GAAV,0BAAU,KAAV,0BAAU,QAcrB;AACH,CAAC,EAhBgB,eAAe,+BAAf,eAAe,QAgB/B;AAED,IAAiB,OAAO,CAUvB;AAVD,WAAiB,OAAO;IACtB,IAAY,UAQX;IARD,WAAY,UAAU;QACpB,oBAAoB;QACpB,mDAAqC,CAAA;QACrC,6DAA+C,CAAA;QAC/C,+CAAiC,CAAA;QACjC,6DAA+C,CAAA;QAC/C,yDAA2C,CAAA;QAC3C,kBAAkB;IACpB,CAAC,EARW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAQrB;AACH,CAAC,EAVgB,OAAO,uBAAP,OAAO,QAUvB;AAoBY,QAAA,WAAW,GAAG,IAAI,GAAG,CAAC;IACjC,oBAAoB;IACpB,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IAC5B,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC;IAC5C,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC;IAChC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC;IACnC,kBAAkB;CACnB,CAAC,CAAC"}

View File

@ -0,0 +1,46 @@
/**
* 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. Run `npm run bidi-types` 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;
};
}

View File

@ -0,0 +1,19 @@
"use strict";
/**
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# 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

@ -1,5 +1,5 @@
/**
* Copyright 2023 Google LLC.
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -30,8 +30,8 @@ export type CommandResponse = {
result: ResultData;
} & Extensible;
export type EventData = BrowsingContextEvent | LogEvent | NetworkEvent | ScriptEvent;
export type CommandData = BrowserCommand | BrowsingContextCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand;
export type ResultData = BrowsingContextResult | EmptyResult | NetworkResult | ScriptResult | SessionResult;
export type CommandData = BrowserCommand | BrowsingContextCommand | InputCommand | NetworkCommand | ScriptCommand | SessionCommand | StorageCommand;
export type ResultData = BrowsingContextResult | EmptyResult | NetworkResult | ScriptResult | SessionResult | StorageResult;
export type EmptyParams = Extensible;
export type Message = CommandResponse | ErrorResponse | Event;
export type ErrorResponse = {
@ -66,9 +66,14 @@ export declare const enum ErrorCode {
NoSuchNode = "no such node",
NoSuchRequest = "no such request",
NoSuchScript = "no such script",
NoSuchStoragePartition = "no such storage partition",
NoSuchUserContext = "no such user context",
SessionNotCreated = "session not created",
UnableToCaptureScreen = "unable to capture screen",
UnableToCloseBrowser = "unable to close browser",
UnableToSetCookie = "unable to set cookie",
UnableToSetFileInput = "unable to set file input",
UnderspecifiedStoragePartition = "underspecified storage partition",
UnknownCommand = "unknown command",
UnknownError = "unknown error",
UnsupportedOperation = "unsupported operation"
@ -173,7 +178,7 @@ export declare namespace Session {
platformName: string;
setWindowRect: boolean;
proxy?: Session.ProxyConfiguration;
webSocketUrl?: string | true;
webSocketUrl?: string;
} & Extensible;
};
}
@ -195,13 +200,50 @@ export declare namespace Session {
params: Session.SubscriptionRequest;
};
}
export type BrowserCommand = Browser.Close;
export type BrowserCommand = Browser.Close | Browser.CreateUserContext | Browser.GetUserContexts | Browser.RemoveUserContext;
export type BrowserResult = Browser.CreateUserContextResult | Browser.GetUserContextsResult;
export declare namespace Browser {
type UserContext = string;
}
export declare namespace Browser {
type UserContextInfo = {
userContext: Browser.UserContext;
};
}
export declare namespace Browser {
type Close = {
method: 'browser.close';
params: EmptyParams;
};
}
export declare namespace Browser {
type CreateUserContext = {
method: 'browser.createUserContext';
params: EmptyParams;
};
}
export declare namespace Browser {
type CreateUserContextResult = Browser.UserContextInfo;
}
export declare namespace Browser {
type GetUserContexts = {
method: 'browser.getUserContexts';
params: EmptyParams;
};
}
export declare namespace Browser {
type GetUserContextsResult = {
userContexts: [Browser.UserContextInfo, ...Browser.UserContextInfo[]];
};
}
export declare namespace Browser {
type RemoveUserContext = {
method: 'browser.removeUserContext';
params: {
userContext: Browser.UserContext;
};
};
}
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.LocateNodesResult | BrowsingContext.NavigateResult | BrowsingContext.PrintResult | BrowsingContext.TraverseHistoryResult;
@ -213,9 +255,10 @@ export declare namespace BrowsingContext {
}
export declare namespace BrowsingContext {
type Info = {
children: BrowsingContext.InfoList | null;
context: BrowsingContext.BrowsingContext;
url: string;
children: BrowsingContext.InfoList | null;
userContext: Browser.UserContext;
parent?: BrowsingContext.BrowsingContext | null;
};
}
@ -356,6 +399,7 @@ export declare namespace BrowsingContext {
* @defaultValue `false`
*/
background?: boolean;
userContext?: Browser.UserContext | null;
};
}
export declare namespace BrowsingContext {
@ -691,6 +735,13 @@ export declare namespace Network {
value: string;
};
}
export declare namespace Network {
const enum SameSite {
Strict = "strict",
Lax = "lax",
None = "none"
}
}
export declare namespace Network {
type Cookie = {
name: string;
@ -700,9 +751,9 @@ export declare namespace Network {
size: JsUint;
httpOnly: boolean;
secure: boolean;
sameSite: 'strict' | 'lax' | 'none';
sameSite: Network.SameSite;
expiry?: JsUint;
};
} & Extensible;
}
export declare namespace Network {
type CookieHeader = {
@ -790,7 +841,7 @@ export declare namespace Network {
expiry?: string;
maxAge?: JsInt;
path?: string;
sameSite?: 'strict' | 'lax' | 'none';
sameSite?: Network.SameSite;
secure?: boolean;
};
}
@ -1153,16 +1204,19 @@ export declare namespace Script {
export declare namespace Script {
type DedicatedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'dedicated-worker';
owners: [Script.Realm];
};
}
export declare namespace Script {
type SharedWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'shared-worker';
owners: [Script.Realm, ...Script.Realm[]];
};
}
export declare namespace Script {
type ServiceWorkerRealmInfo = Script.BaseRealmInfo & {
type: 'service-worker';
owners: [...Script.Realm[]];
};
}
export declare namespace Script {
@ -1578,6 +1632,107 @@ export declare namespace Script {
realm: Script.Realm;
};
}
export type StorageCommand = Storage.DeleteCookies | Storage.GetCookies | Storage.SetCookie;
export type StorageResult = Storage.DeleteCookiesResult | Storage.GetCookiesResult | Storage.SetCookieResult;
export declare namespace Storage {
type PartitionKey = {
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export declare namespace Storage {
type GetCookies = {
method: 'storage.getCookies';
params: Storage.GetCookiesParameters;
};
}
export declare namespace Storage {
type CookieFilter = {
name?: string;
value?: Network.BytesValue;
domain?: string;
path?: string;
size?: JsUint;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export declare namespace Storage {
type BrowsingContextPartitionDescriptor = {
type: 'context';
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace Storage {
type StorageKeyPartitionDescriptor = {
type: 'storageKey';
userContext?: string;
sourceOrigin?: string;
} & Extensible;
}
export declare namespace Storage {
type PartitionDescriptor = Storage.BrowsingContextPartitionDescriptor | Storage.StorageKeyPartitionDescriptor;
}
export declare namespace Storage {
type GetCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type GetCookiesResult = {
cookies: [...Network.Cookie[]];
partitionKey: Storage.PartitionKey;
};
}
export declare namespace Storage {
type SetCookie = {
method: 'storage.setCookie';
params: Storage.SetCookieParameters;
};
}
export declare namespace Storage {
type PartialCookie = {
name: string;
value: Network.BytesValue;
domain: string;
path?: string;
httpOnly?: boolean;
secure?: boolean;
sameSite?: Network.SameSite;
expiry?: JsUint;
} & Extensible;
}
export declare namespace Storage {
type SetCookieParameters = {
cookie: Storage.PartialCookie;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type SetCookieResult = {
partitionKey: Storage.PartitionKey;
};
}
export declare namespace Storage {
type DeleteCookies = {
method: 'storage.deleteCookies';
params: Storage.DeleteCookiesParameters;
};
}
export declare namespace Storage {
type DeleteCookiesParameters = {
filter?: Storage.CookieFilter;
partition?: Storage.PartitionDescriptor;
};
}
export declare namespace Storage {
type DeleteCookiesResult = {
partitionKey: Storage.PartitionKey;
};
}
export type LogEvent = Log.EntryAdded;
export declare namespace Log {
const enum Level {
@ -1622,7 +1777,7 @@ export declare namespace Log {
params: Log.Entry;
};
}
export type InputCommand = Input.PerformActions | Input.ReleaseActions;
export type InputCommand = Input.PerformActions | Input.ReleaseActions | Input.SetFiles;
export declare namespace Input {
type ElementOrigin = {
type: 'element';
@ -1805,3 +1960,16 @@ export declare namespace Input {
context: BrowsingContext.BrowsingContext;
};
}
export declare namespace Input {
type SetFiles = {
method: 'input.setFiles';
params: Input.SetFilesParameters;
};
}
export declare namespace Input {
type SetFilesParameters = {
context: BrowsingContext.BrowsingContext;
element: Script.SharedReference;
files: [...string[]];
};
}

View File

@ -1,6 +1,6 @@
"use strict";
/**
* Copyright 2023 Google LLC.
* Copyright 2024 Google LLC.
* Copyright (c) Microsoft Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");

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

@ -16,5 +16,6 @@
*/
export * as Cdp from './cdp.js';
export * as ChromiumBidi from './chromium-bidi.js';
export * from './webdriver-bidi.js';
export * from './generated/webdriver-bidi.js';
export * from './ErrorResponse.js';
export * from './generated/webdriver-bidi-permissions.js';

View File

@ -45,6 +45,7 @@ exports.ChromiumBidi = exports.Cdp = void 0;
*/
exports.Cdp = __importStar(require("./cdp.js"));
exports.ChromiumBidi = __importStar(require("./chromium-bidi.js"));
__exportStar(require("./webdriver-bidi.js"), exports);
__exportStar(require("./generated/webdriver-bidi.js"), exports);
__exportStar(require("./ErrorResponse.js"), exports);
__exportStar(require("./generated/webdriver-bidi-permissions.js"), exports);
//# sourceMappingURL=protocol.js.map

View File

@ -1 +1 @@
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/protocol/protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,gDAAgC;AAChC,mEAAmD;AACnD,sDAAoC;AACpC,qDAAmC"}
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../../src/protocol/protocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;GAeG;AACH,gDAAgC;AAChC,mEAAmD;AACnD,gEAA8C;AAC9C,qDAAmC;AACnC,4EAA0D"}

View File

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