puppeteer-core
Advanced tools
Comparing version 24.1.0 to 24.1.1
@@ -79,11 +79,11 @@ "use strict"; | ||
// Coverage | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.CSS.styleSheetAdded', | ||
'cdp.Runtime.executionContextsCleared', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.CSS.styleSheetAdded', | ||
'goog:cdp.Runtime.executionContextsCleared', | ||
// Tracing | ||
'cdp.Tracing.tracingComplete', | ||
'goog:cdp.Tracing.tracingComplete', | ||
// TODO: subscribe to all CDP events in the future. | ||
'cdp.Network.requestWillBeSent', | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.Page.screencastFrame', | ||
'goog:cdp.Network.requestWillBeSent', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.Page.screencastFrame', | ||
]; | ||
@@ -90,0 +90,0 @@ static async create(opts) { |
@@ -31,3 +31,3 @@ "use strict"; | ||
try { | ||
const { result } = await connection.send('cdp.getSession', { | ||
const { result } = await connection.send('goog:cdp.getSession', { | ||
context: frame._id, | ||
@@ -57,3 +57,3 @@ }); | ||
const session = await this.#sessionId.valueOrThrow(); | ||
const { result } = await this.#connection.send('cdp.sendCommand', { | ||
const { result } = await this.#connection.send('goog:cdp.sendCommand', { | ||
method: method, | ||
@@ -60,0 +60,0 @@ params: params, |
@@ -10,3 +10,3 @@ /** | ||
import { EventEmitter } from '../common/EventEmitter.js'; | ||
import type { Commands as BidiCommands, BidiEvents, Connection } from './core/Connection.js'; | ||
import type { BidiEvents, Commands as BidiCommands, Connection } from './core/Connection.js'; | ||
/** | ||
@@ -16,11 +16,11 @@ * @internal | ||
export interface Commands extends BidiCommands { | ||
'cdp.sendCommand': { | ||
'goog:cdp.sendCommand': { | ||
params: Bidi.Cdp.SendCommandParameters; | ||
returnType: Bidi.Cdp.SendCommandResult; | ||
}; | ||
'cdp.getSession': { | ||
'goog:cdp.getSession': { | ||
params: Bidi.Cdp.GetSessionParameters; | ||
returnType: Bidi.Cdp.GetSessionResult; | ||
}; | ||
'cdp.resolveRealm': { | ||
'goog:cdp.resolveRealm': { | ||
params: Bidi.Cdp.ResolveRealmParameters; | ||
@@ -27,0 +27,0 @@ returnType: Bidi.Cdp.ResolveRealmResult; |
@@ -143,4 +143,4 @@ "use strict"; | ||
function isCdpEvent(event) { | ||
return event.method.startsWith('cdp.'); | ||
return event.method.startsWith('goog:cdp.'); | ||
} | ||
//# sourceMappingURL=Connection.js.map |
@@ -114,3 +114,3 @@ "use strict"; | ||
if (!this.executionContextId) { | ||
const { result } = await this.session.connection.send('cdp.resolveRealm', { realm: this.id }); | ||
const { result } = await this.session.connection.send('goog:cdp.resolveRealm', { realm: this.id }); | ||
this.executionContextId = result.executionContextId; | ||
@@ -117,0 +117,0 @@ } |
@@ -103,3 +103,3 @@ "use strict"; | ||
async adoptBackendNode(backendNodeId) { | ||
// This code needs to schedule resolveNode call synchroniously (at | ||
// This code needs to schedule resolveNode call synchronously (at | ||
// least when the context is there) so we cannot unconditionally | ||
@@ -106,0 +106,0 @@ // await. |
@@ -26,23 +26,23 @@ /** | ||
* | ||
* - `Letter`: 8.5in x 11in | ||
* - `Letter`: 8.5in x 11in / 21.59cm x 27.94cm | ||
* | ||
* - `Legal`: 8.5in x 14in | ||
* - `Legal`: 8.5in x 14in / 21.59cm x 35.56cm | ||
* | ||
* - `Tabloid`: 11in x 17in | ||
* - `Tabloid`: 11in x 17in / 27.94cm x 43.18cm | ||
* | ||
* - `Ledger`: 17in x 11in | ||
* - `Ledger`: 17in x 11in / 43.18cm x 27.94cm | ||
* | ||
* - `A0`: 33.1102in x 46.811in | ||
* - `A0`: 33.1102in x 46.811in / 84.1cm x 118.9cm | ||
* | ||
* - `A1`: 23.3858in x 33.1102in | ||
* - `A1`: 23.3858in x 33.1102in / 59.4cm x 84.1cm | ||
* | ||
* - `A2`: 16.5354in x 23.3858in | ||
* - `A2`: 16.5354in x 23.3858in / 42cm x 59.4cm | ||
* | ||
* - `A3`: 11.6929in x 16.5354in | ||
* - `A3`: 11.6929in x 16.5354in / 29.7cm x 42cm | ||
* | ||
* - `A4`: 8.2677in x 11.6929in | ||
* - `A4`: 8.2677in x 11.6929in / 21cm x 29.7cm | ||
* | ||
* - `A5`: 5.8268in x 8.2677in | ||
* - `A5`: 5.8268in x 8.2677in / 14.8cm x 21cm | ||
* | ||
* - `A6`: 4.1339in x 5.8268in | ||
* - `A6`: 4.1339in x 5.8268in / 10.5cm x 14.8cm | ||
* | ||
@@ -199,4 +199,7 @@ * @public | ||
* @internal | ||
* | ||
* @remarks All A series paper format sizes in inches are calculated from centimeters | ||
* rounded mathematically to four decimal places. | ||
*/ | ||
export declare const paperFormats: Record<LowerCasePaperFormat, PaperFormatDimensions>; | ||
export declare const paperFormats: Record<LowerCasePaperFormat, Record<'cm' | 'in', PaperFormatDimensions>>; | ||
//# sourceMappingURL=PDFOptions.d.ts.map |
@@ -11,16 +11,52 @@ "use strict"; | ||
* @internal | ||
* | ||
* @remarks All A series paper format sizes in inches are calculated from centimeters | ||
* rounded mathematically to four decimal places. | ||
*/ | ||
exports.paperFormats = { | ||
letter: { width: 8.5, height: 11 }, | ||
legal: { width: 8.5, height: 14 }, | ||
tabloid: { width: 11, height: 17 }, | ||
ledger: { width: 17, height: 11 }, | ||
a0: { width: 33.1102, height: 46.811 }, | ||
a1: { width: 23.3858, height: 33.1102 }, | ||
a2: { width: 16.5354, height: 23.3858 }, | ||
a3: { width: 11.6929, height: 16.5354 }, | ||
a4: { width: 8.2677, height: 11.6929 }, | ||
a5: { width: 5.8268, height: 8.2677 }, | ||
a6: { width: 4.1339, height: 5.8268 }, | ||
letter: { | ||
cm: { width: 21.59, height: 27.94 }, | ||
in: { width: 8.5, height: 11 }, | ||
}, | ||
legal: { | ||
cm: { width: 21.59, height: 35.56 }, | ||
in: { width: 8.5, height: 14 }, | ||
}, | ||
tabloid: { | ||
cm: { width: 27.94, height: 43.18 }, | ||
in: { width: 11, height: 17 }, | ||
}, | ||
ledger: { | ||
cm: { width: 43.18, height: 27.94 }, | ||
in: { width: 17, height: 11 }, | ||
}, | ||
a0: { | ||
cm: { width: 84.1, height: 118.9 }, | ||
in: { width: 33.1102, height: 46.811 }, | ||
}, | ||
a1: { | ||
cm: { width: 59.4, height: 84.1 }, | ||
in: { width: 23.3858, height: 33.1102 }, | ||
}, | ||
a2: { | ||
cm: { width: 42, height: 59.4 }, | ||
in: { width: 16.5354, height: 23.3858 }, | ||
}, | ||
a3: { | ||
cm: { width: 29.7, height: 42 }, | ||
in: { width: 11.6929, height: 16.5354 }, | ||
}, | ||
a4: { | ||
cm: { width: 21, height: 29.7 }, | ||
in: { width: 8.2677, height: 11.6929 }, | ||
}, | ||
a5: { | ||
cm: { width: 14.8, height: 21 }, | ||
in: { width: 5.8268, height: 8.2677 }, | ||
}, | ||
a6: { | ||
cm: { width: 10.5, height: 14.8 }, | ||
in: { width: 4.1339, height: 5.8268 }, | ||
}, | ||
}; | ||
//# sourceMappingURL=PDFOptions.js.map |
@@ -300,3 +300,3 @@ "use strict"; | ||
if (options.format) { | ||
const format = PDFOptions_js_1.paperFormats[options.format.toLowerCase()]; | ||
const format = PDFOptions_js_1.paperFormats[options.format.toLowerCase()][lengthUnit]; | ||
(0, assert_js_1.assert)(format, 'Unknown paper format: ' + options.format); | ||
@@ -303,0 +303,0 @@ width = format.width; |
@@ -126,3 +126,3 @@ "use strict"; | ||
try { | ||
await this.#poller.evaluateHandle(async (poller) => { | ||
await this.#poller.evaluate(async (poller) => { | ||
await poller.stop(); | ||
@@ -129,0 +129,0 @@ }); |
/** | ||
* @internal | ||
*/ | ||
export declare const packageVersion = "24.1.0"; | ||
export declare const packageVersion = "24.1.1"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
*/ | ||
exports.packageVersion = '24.1.0'; | ||
exports.packageVersion = '24.1.1'; | ||
//# sourceMappingURL=version.js.map |
@@ -34,3 +34,3 @@ /** | ||
customQuerySelectors: { | ||
"__#56522@#selectors": Map<string, CustomQuerySelectors.CustomQuerySelector>; | ||
"__#56576@#selectors": Map<string, CustomQuerySelectors.CustomQuerySelector>; | ||
register(name: string, handler: import("../index.js").CustomQueryHandler): void; | ||
@@ -37,0 +37,0 @@ unregister(name: string): void; |
@@ -10,6 +10,6 @@ /** | ||
export declare const PUPPETEER_REVISIONS: Readonly<{ | ||
chrome: "132.0.6834.83"; | ||
'chrome-headless-shell': "132.0.6834.83"; | ||
firefox: "stable_134.0.1"; | ||
chrome: "132.0.6834.110"; | ||
'chrome-headless-shell': "132.0.6834.110"; | ||
firefox: "stable_134.0.2"; | ||
}>; | ||
//# sourceMappingURL=revisions.d.ts.map |
@@ -13,6 +13,6 @@ "use strict"; | ||
exports.PUPPETEER_REVISIONS = Object.freeze({ | ||
chrome: '132.0.6834.83', | ||
'chrome-headless-shell': '132.0.6834.83', | ||
firefox: 'stable_134.0.1', | ||
chrome: '132.0.6834.110', | ||
'chrome-headless-shell': '132.0.6834.110', | ||
firefox: 'stable_134.0.2', | ||
}); | ||
//# sourceMappingURL=revisions.js.map |
@@ -9,4 +9,4 @@ import { disposeSymbol } from './disposable.js'; | ||
new (mutex: Mutex, onRelease?: () => void): { | ||
"__#56510@#mutex": Mutex; | ||
"__#56510@#onRelease"?: () => void; | ||
"__#56564@#mutex": Mutex; | ||
"__#56564@#onRelease"?: () => void; | ||
[Symbol.dispose](): void; | ||
@@ -13,0 +13,0 @@ }; |
@@ -370,4 +370,4 @@ /** | ||
*/ | ||
dispose() { | ||
return this.handle.dispose(); | ||
async dispose() { | ||
await Promise.all([this.handle.dispose(), this.isolatedHandle?.dispose()]); | ||
} | ||
@@ -374,0 +374,0 @@ /** |
@@ -76,11 +76,11 @@ /** | ||
// Coverage | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.CSS.styleSheetAdded', | ||
'cdp.Runtime.executionContextsCleared', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.CSS.styleSheetAdded', | ||
'goog:cdp.Runtime.executionContextsCleared', | ||
// Tracing | ||
'cdp.Tracing.tracingComplete', | ||
'goog:cdp.Tracing.tracingComplete', | ||
// TODO: subscribe to all CDP events in the future. | ||
'cdp.Network.requestWillBeSent', | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.Page.screencastFrame', | ||
'goog:cdp.Network.requestWillBeSent', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.Page.screencastFrame', | ||
]; | ||
@@ -87,0 +87,0 @@ static async create(opts) { |
@@ -28,3 +28,3 @@ import { CDPSession } from '../api/CDPSession.js'; | ||
try { | ||
const { result } = await connection.send('cdp.getSession', { | ||
const { result } = await connection.send('goog:cdp.getSession', { | ||
context: frame._id, | ||
@@ -54,3 +54,3 @@ }); | ||
const session = await this.#sessionId.valueOrThrow(); | ||
const { result } = await this.#connection.send('cdp.sendCommand', { | ||
const { result } = await this.#connection.send('goog:cdp.sendCommand', { | ||
method: method, | ||
@@ -57,0 +57,0 @@ params: params, |
@@ -10,3 +10,3 @@ /** | ||
import { EventEmitter } from '../common/EventEmitter.js'; | ||
import type { Commands as BidiCommands, BidiEvents, Connection } from './core/Connection.js'; | ||
import type { BidiEvents, Commands as BidiCommands, Connection } from './core/Connection.js'; | ||
/** | ||
@@ -16,11 +16,11 @@ * @internal | ||
export interface Commands extends BidiCommands { | ||
'cdp.sendCommand': { | ||
'goog:cdp.sendCommand': { | ||
params: Bidi.Cdp.SendCommandParameters; | ||
returnType: Bidi.Cdp.SendCommandResult; | ||
}; | ||
'cdp.getSession': { | ||
'goog:cdp.getSession': { | ||
params: Bidi.Cdp.GetSessionParameters; | ||
returnType: Bidi.Cdp.GetSessionResult; | ||
}; | ||
'cdp.resolveRealm': { | ||
'goog:cdp.resolveRealm': { | ||
params: Bidi.Cdp.ResolveRealmParameters; | ||
@@ -27,0 +27,0 @@ returnType: Bidi.Cdp.ResolveRealmResult; |
@@ -139,4 +139,4 @@ /** | ||
function isCdpEvent(event) { | ||
return event.method.startsWith('cdp.'); | ||
return event.method.startsWith('goog:cdp.'); | ||
} | ||
//# sourceMappingURL=Connection.js.map |
@@ -111,3 +111,3 @@ /** | ||
if (!this.executionContextId) { | ||
const { result } = await this.session.connection.send('cdp.resolveRealm', { realm: this.id }); | ||
const { result } = await this.session.connection.send('goog:cdp.resolveRealm', { realm: this.id }); | ||
this.executionContextId = result.executionContextId; | ||
@@ -114,0 +114,0 @@ } |
@@ -100,3 +100,3 @@ /** | ||
async adoptBackendNode(backendNodeId) { | ||
// This code needs to schedule resolveNode call synchroniously (at | ||
// This code needs to schedule resolveNode call synchronously (at | ||
// least when the context is there) so we cannot unconditionally | ||
@@ -103,0 +103,0 @@ // await. |
@@ -26,23 +26,23 @@ /** | ||
* | ||
* - `Letter`: 8.5in x 11in | ||
* - `Letter`: 8.5in x 11in / 21.59cm x 27.94cm | ||
* | ||
* - `Legal`: 8.5in x 14in | ||
* - `Legal`: 8.5in x 14in / 21.59cm x 35.56cm | ||
* | ||
* - `Tabloid`: 11in x 17in | ||
* - `Tabloid`: 11in x 17in / 27.94cm x 43.18cm | ||
* | ||
* - `Ledger`: 17in x 11in | ||
* - `Ledger`: 17in x 11in / 43.18cm x 27.94cm | ||
* | ||
* - `A0`: 33.1102in x 46.811in | ||
* - `A0`: 33.1102in x 46.811in / 84.1cm x 118.9cm | ||
* | ||
* - `A1`: 23.3858in x 33.1102in | ||
* - `A1`: 23.3858in x 33.1102in / 59.4cm x 84.1cm | ||
* | ||
* - `A2`: 16.5354in x 23.3858in | ||
* - `A2`: 16.5354in x 23.3858in / 42cm x 59.4cm | ||
* | ||
* - `A3`: 11.6929in x 16.5354in | ||
* - `A3`: 11.6929in x 16.5354in / 29.7cm x 42cm | ||
* | ||
* - `A4`: 8.2677in x 11.6929in | ||
* - `A4`: 8.2677in x 11.6929in / 21cm x 29.7cm | ||
* | ||
* - `A5`: 5.8268in x 8.2677in | ||
* - `A5`: 5.8268in x 8.2677in / 14.8cm x 21cm | ||
* | ||
* - `A6`: 4.1339in x 5.8268in | ||
* - `A6`: 4.1339in x 5.8268in / 10.5cm x 14.8cm | ||
* | ||
@@ -199,4 +199,7 @@ * @public | ||
* @internal | ||
* | ||
* @remarks All A series paper format sizes in inches are calculated from centimeters | ||
* rounded mathematically to four decimal places. | ||
*/ | ||
export declare const paperFormats: Record<LowerCasePaperFormat, PaperFormatDimensions>; | ||
export declare const paperFormats: Record<LowerCasePaperFormat, Record<'cm' | 'in', PaperFormatDimensions>>; | ||
//# sourceMappingURL=PDFOptions.d.ts.map |
@@ -8,16 +8,52 @@ /** | ||
* @internal | ||
* | ||
* @remarks All A series paper format sizes in inches are calculated from centimeters | ||
* rounded mathematically to four decimal places. | ||
*/ | ||
export const paperFormats = { | ||
letter: { width: 8.5, height: 11 }, | ||
legal: { width: 8.5, height: 14 }, | ||
tabloid: { width: 11, height: 17 }, | ||
ledger: { width: 17, height: 11 }, | ||
a0: { width: 33.1102, height: 46.811 }, | ||
a1: { width: 23.3858, height: 33.1102 }, | ||
a2: { width: 16.5354, height: 23.3858 }, | ||
a3: { width: 11.6929, height: 16.5354 }, | ||
a4: { width: 8.2677, height: 11.6929 }, | ||
a5: { width: 5.8268, height: 8.2677 }, | ||
a6: { width: 4.1339, height: 5.8268 }, | ||
letter: { | ||
cm: { width: 21.59, height: 27.94 }, | ||
in: { width: 8.5, height: 11 }, | ||
}, | ||
legal: { | ||
cm: { width: 21.59, height: 35.56 }, | ||
in: { width: 8.5, height: 14 }, | ||
}, | ||
tabloid: { | ||
cm: { width: 27.94, height: 43.18 }, | ||
in: { width: 11, height: 17 }, | ||
}, | ||
ledger: { | ||
cm: { width: 43.18, height: 27.94 }, | ||
in: { width: 17, height: 11 }, | ||
}, | ||
a0: { | ||
cm: { width: 84.1, height: 118.9 }, | ||
in: { width: 33.1102, height: 46.811 }, | ||
}, | ||
a1: { | ||
cm: { width: 59.4, height: 84.1 }, | ||
in: { width: 23.3858, height: 33.1102 }, | ||
}, | ||
a2: { | ||
cm: { width: 42, height: 59.4 }, | ||
in: { width: 16.5354, height: 23.3858 }, | ||
}, | ||
a3: { | ||
cm: { width: 29.7, height: 42 }, | ||
in: { width: 11.6929, height: 16.5354 }, | ||
}, | ||
a4: { | ||
cm: { width: 21, height: 29.7 }, | ||
in: { width: 8.2677, height: 11.6929 }, | ||
}, | ||
a5: { | ||
cm: { width: 14.8, height: 21 }, | ||
in: { width: 5.8268, height: 8.2677 }, | ||
}, | ||
a6: { | ||
cm: { width: 10.5, height: 14.8 }, | ||
in: { width: 4.1339, height: 5.8268 }, | ||
}, | ||
}; | ||
//# sourceMappingURL=PDFOptions.js.map |
@@ -279,3 +279,3 @@ /** | ||
if (options.format) { | ||
const format = paperFormats[options.format.toLowerCase()]; | ||
const format = paperFormats[options.format.toLowerCase()][lengthUnit]; | ||
assert(format, 'Unknown paper format: ' + options.format); | ||
@@ -282,0 +282,0 @@ width = format.width; |
@@ -123,3 +123,3 @@ /** | ||
try { | ||
await this.#poller.evaluateHandle(async (poller) => { | ||
await this.#poller.evaluate(async (poller) => { | ||
await poller.stop(); | ||
@@ -126,0 +126,0 @@ }); |
/** | ||
* @internal | ||
*/ | ||
export declare const packageVersion = "24.1.0"; | ||
export declare const packageVersion = "24.1.1"; | ||
//# sourceMappingURL=version.d.ts.map |
/** | ||
* @internal | ||
*/ | ||
export const packageVersion = '24.1.0'; | ||
export const packageVersion = '24.1.1'; | ||
//# sourceMappingURL=version.js.map |
@@ -10,6 +10,6 @@ /** | ||
export declare const PUPPETEER_REVISIONS: Readonly<{ | ||
chrome: "132.0.6834.83"; | ||
'chrome-headless-shell': "132.0.6834.83"; | ||
firefox: "stable_134.0.1"; | ||
chrome: "132.0.6834.110"; | ||
'chrome-headless-shell': "132.0.6834.110"; | ||
firefox: "stable_134.0.2"; | ||
}>; | ||
//# sourceMappingURL=revisions.d.ts.map |
@@ -10,6 +10,6 @@ /** | ||
export const PUPPETEER_REVISIONS = Object.freeze({ | ||
chrome: '132.0.6834.83', | ||
'chrome-headless-shell': '132.0.6834.83', | ||
firefox: 'stable_134.0.1', | ||
chrome: '132.0.6834.110', | ||
'chrome-headless-shell': '132.0.6834.110', | ||
firefox: 'stable_134.0.2', | ||
}); | ||
//# sourceMappingURL=revisions.js.map |
{ | ||
"name": "puppeteer-core", | ||
"version": "24.1.0", | ||
"version": "24.1.1", | ||
"description": "A high-level API to control headless Chrome over the DevTools Protocol", | ||
@@ -145,3 +145,3 @@ "keywords": [ | ||
"debug": "^4.4.0", | ||
"chromium-bidi": "0.11.0", | ||
"chromium-bidi": "1.1.0", | ||
"devtools-protocol": "0.0.1380148", | ||
@@ -152,3 +152,3 @@ "typed-query-selector": "^2.12.0", | ||
"devDependencies": { | ||
"@types/chrome": "0.0.293", | ||
"@types/chrome": "0.0.297", | ||
"@types/debug": "4.1.12", | ||
@@ -155,0 +155,0 @@ "@types/node": "^18.17.15", |
@@ -334,4 +334,4 @@ /** | ||
*/ | ||
override dispose(): Promise<void> { | ||
return this.handle.dispose(); | ||
override async dispose(): Promise<void> { | ||
await Promise.all([this.handle.dispose(), this.isolatedHandle?.dispose()]); | ||
} | ||
@@ -338,0 +338,0 @@ |
@@ -63,11 +63,11 @@ /** | ||
// Coverage | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.CSS.styleSheetAdded', | ||
'cdp.Runtime.executionContextsCleared', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.CSS.styleSheetAdded', | ||
'goog:cdp.Runtime.executionContextsCleared', | ||
// Tracing | ||
'cdp.Tracing.tracingComplete', | ||
'goog:cdp.Tracing.tracingComplete', | ||
// TODO: subscribe to all CDP events in the future. | ||
'cdp.Network.requestWillBeSent', | ||
'cdp.Debugger.scriptParsed', | ||
'cdp.Page.screencastFrame', | ||
'goog:cdp.Network.requestWillBeSent', | ||
'goog:cdp.Debugger.scriptParsed', | ||
'goog:cdp.Page.screencastFrame', | ||
]; | ||
@@ -74,0 +74,0 @@ |
@@ -44,3 +44,3 @@ /** | ||
try { | ||
const {result} = await connection.send('cdp.getSession', { | ||
const {result} = await connection.send('goog:cdp.getSession', { | ||
context: frame._id, | ||
@@ -81,3 +81,3 @@ }); | ||
const {result} = await this.#connection.send( | ||
'cdp.sendCommand', | ||
'goog:cdp.sendCommand', | ||
{ | ||
@@ -84,0 +84,0 @@ method: method, |
@@ -19,4 +19,4 @@ /** | ||
import type { | ||
BidiEvents, | ||
Commands as BidiCommands, | ||
BidiEvents, | ||
Connection, | ||
@@ -32,11 +32,11 @@ } from './core/Connection.js'; | ||
export interface Commands extends BidiCommands { | ||
'cdp.sendCommand': { | ||
'goog:cdp.sendCommand': { | ||
params: Bidi.Cdp.SendCommandParameters; | ||
returnType: Bidi.Cdp.SendCommandResult; | ||
}; | ||
'cdp.getSession': { | ||
'goog:cdp.getSession': { | ||
params: Bidi.Cdp.GetSessionParameters; | ||
returnType: Bidi.Cdp.GetSessionResult; | ||
}; | ||
'cdp.resolveRealm': { | ||
'goog:cdp.resolveRealm': { | ||
params: Bidi.Cdp.ResolveRealmParameters; | ||
@@ -213,3 +213,3 @@ returnType: Bidi.Cdp.ResolveRealmResult; | ||
function isCdpEvent(event: Bidi.ChromiumBidi.Event): event is Bidi.Cdp.Event { | ||
return event.method.startsWith('cdp.'); | ||
return event.method.startsWith('goog:cdp.'); | ||
} |
@@ -128,3 +128,3 @@ /** | ||
const {result} = await (this.session.connection as BidiConnection).send( | ||
'cdp.resolveRealm', | ||
'goog:cdp.resolveRealm', | ||
{realm: this.id}, | ||
@@ -131,0 +131,0 @@ ); |
@@ -202,3 +202,3 @@ /** | ||
): Promise<JSHandle<Node>> { | ||
// This code needs to schedule resolveNode call synchroniously (at | ||
// This code needs to schedule resolveNode call synchronously (at | ||
// least when the context is there) so we cannot unconditionally | ||
@@ -205,0 +205,0 @@ // await. |
@@ -40,23 +40,23 @@ /** | ||
* | ||
* - `Letter`: 8.5in x 11in | ||
* - `Letter`: 8.5in x 11in / 21.59cm x 27.94cm | ||
* | ||
* - `Legal`: 8.5in x 14in | ||
* - `Legal`: 8.5in x 14in / 21.59cm x 35.56cm | ||
* | ||
* - `Tabloid`: 11in x 17in | ||
* - `Tabloid`: 11in x 17in / 27.94cm x 43.18cm | ||
* | ||
* - `Ledger`: 17in x 11in | ||
* - `Ledger`: 17in x 11in / 43.18cm x 27.94cm | ||
* | ||
* - `A0`: 33.1102in x 46.811in | ||
* - `A0`: 33.1102in x 46.811in / 84.1cm x 118.9cm | ||
* | ||
* - `A1`: 23.3858in x 33.1102in | ||
* - `A1`: 23.3858in x 33.1102in / 59.4cm x 84.1cm | ||
* | ||
* - `A2`: 16.5354in x 23.3858in | ||
* - `A2`: 16.5354in x 23.3858in / 42cm x 59.4cm | ||
* | ||
* - `A3`: 11.6929in x 16.5354in | ||
* - `A3`: 11.6929in x 16.5354in / 29.7cm x 42cm | ||
* | ||
* - `A4`: 8.2677in x 11.6929in | ||
* - `A4`: 8.2677in x 11.6929in / 21cm x 29.7cm | ||
* | ||
* - `A5`: 5.8268in x 8.2677in | ||
* - `A5`: 5.8268in x 8.2677in / 14.8cm x 21cm | ||
* | ||
* - `A6`: 4.1339in x 5.8268in | ||
* - `A6`: 4.1339in x 5.8268in / 10.5cm x 14.8cm | ||
* | ||
@@ -223,16 +223,54 @@ * @public | ||
* @internal | ||
* | ||
* @remarks All A series paper format sizes in inches are calculated from centimeters | ||
* rounded mathematically to four decimal places. | ||
*/ | ||
export const paperFormats: Record<LowerCasePaperFormat, PaperFormatDimensions> = | ||
{ | ||
letter: {width: 8.5, height: 11}, | ||
legal: {width: 8.5, height: 14}, | ||
tabloid: {width: 11, height: 17}, | ||
ledger: {width: 17, height: 11}, | ||
a0: {width: 33.1102, height: 46.811}, | ||
a1: {width: 23.3858, height: 33.1102}, | ||
a2: {width: 16.5354, height: 23.3858}, | ||
a3: {width: 11.6929, height: 16.5354}, | ||
a4: {width: 8.2677, height: 11.6929}, | ||
a5: {width: 5.8268, height: 8.2677}, | ||
a6: {width: 4.1339, height: 5.8268}, | ||
} as const; | ||
export const paperFormats: Record< | ||
LowerCasePaperFormat, | ||
Record<'cm' | 'in', PaperFormatDimensions> | ||
> = { | ||
letter: { | ||
cm: {width: 21.59, height: 27.94}, | ||
in: {width: 8.5, height: 11}, | ||
}, | ||
legal: { | ||
cm: {width: 21.59, height: 35.56}, | ||
in: {width: 8.5, height: 14}, | ||
}, | ||
tabloid: { | ||
cm: {width: 27.94, height: 43.18}, | ||
in: {width: 11, height: 17}, | ||
}, | ||
ledger: { | ||
cm: {width: 43.18, height: 27.94}, | ||
in: {width: 17, height: 11}, | ||
}, | ||
a0: { | ||
cm: {width: 84.1, height: 118.9}, | ||
in: {width: 33.1102, height: 46.811}, | ||
}, | ||
a1: { | ||
cm: {width: 59.4, height: 84.1}, | ||
in: {width: 23.3858, height: 33.1102}, | ||
}, | ||
a2: { | ||
cm: {width: 42, height: 59.4}, | ||
in: {width: 16.5354, height: 23.3858}, | ||
}, | ||
a3: { | ||
cm: {width: 29.7, height: 42}, | ||
in: {width: 11.6929, height: 16.5354}, | ||
}, | ||
a4: { | ||
cm: {width: 21, height: 29.7}, | ||
in: {width: 8.2677, height: 11.6929}, | ||
}, | ||
a5: { | ||
cm: {width: 14.8, height: 21}, | ||
in: {width: 5.8268, height: 8.2677}, | ||
}, | ||
a6: { | ||
cm: {width: 10.5, height: 14.8}, | ||
in: {width: 4.1339, height: 5.8268}, | ||
}, | ||
} as const; |
@@ -357,3 +357,5 @@ /** | ||
const format = | ||
paperFormats[options.format.toLowerCase() as LowerCasePaperFormat]; | ||
paperFormats[options.format.toLowerCase() as LowerCasePaperFormat][ | ||
lengthUnit | ||
]; | ||
assert(format, 'Unknown paper format: ' + options.format); | ||
@@ -360,0 +362,0 @@ width = format.width; |
@@ -183,3 +183,3 @@ /** | ||
try { | ||
await this.#poller.evaluateHandle(async poller => { | ||
await this.#poller.evaluate(async poller => { | ||
await poller.stop(); | ||
@@ -186,0 +186,0 @@ }); |
/** | ||
* @internal | ||
*/ | ||
export const packageVersion = '24.1.0'; | ||
export const packageVersion = '24.1.1'; |
@@ -11,5 +11,5 @@ /** | ||
export const PUPPETEER_REVISIONS = Object.freeze({ | ||
chrome: '132.0.6834.83', | ||
'chrome-headless-shell': '132.0.6834.83', | ||
firefox: 'stable_134.0.1', | ||
chrome: '132.0.6834.110', | ||
'chrome-headless-shell': '132.0.6834.110', | ||
firefox: 'stable_134.0.2', | ||
}); |
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
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 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
8075921
174357
+ Addedchromium-bidi@1.1.0(transitive)
+ Addedzod@3.24.1(transitive)
- Removedchromium-bidi@0.11.0(transitive)
- Removedzod@3.23.8(transitive)
Updatedchromium-bidi@1.1.0