use Buffer everywhere
This commit is contained in:
parent
bef3c15656
commit
87e9c61540
|
|
@ -531,9 +531,9 @@ Does not enforce fixed viewport, allows resizing window in the headed mode.
|
|||
- `clientCertificates` <[Array]<[Object]>>
|
||||
- `origin` <[string]> Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
|
||||
- `certPath` ?<[path]> Path to the file with the certificate in PEM format.
|
||||
- `cert` ?<[string]> Direct value of the certificate in PEM format.
|
||||
- `cert` ?<[Buffer]> Direct value of the certificate in PEM format.
|
||||
- `keyPath` ?<[path]> Path to the file with the private key in PEM format.
|
||||
- `key` ?<[string]> Direct value of the private key in PEM format.
|
||||
- `key` ?<[Buffer]> Direct value of the private key in PEM format.
|
||||
- `pfxPath` ?<[path]> Path to the PFX or PKCS12 encoded private key and certificate chain.
|
||||
- `pfx` ?<[Buffer]> Direct value of the PFX or PKCS12 encoded private key and certificate chain.
|
||||
- `passphrase` ?<[string]> Passphrase for the private key (PEM or PFX).
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ export const kLifecycleEvents: Set<LifecycleEvent> = new Set(['load', 'domconten
|
|||
|
||||
export type ClientCertificate = {
|
||||
origin: string;
|
||||
cert?: string;
|
||||
cert?: Buffer;
|
||||
certPath?: string;
|
||||
key?: string;
|
||||
key?: Buffer;
|
||||
keyPath?: string;
|
||||
pfx?: Buffer;
|
||||
pfxPath?: string;
|
||||
|
|
|
|||
16
packages/playwright-core/types/types.d.ts
vendored
16
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -9162,7 +9162,7 @@ export interface Browser {
|
|||
/**
|
||||
* Direct value of the certificate in PEM format.
|
||||
*/
|
||||
cert?: string;
|
||||
cert?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the file with the private key in PEM format.
|
||||
|
|
@ -9172,7 +9172,7 @@ export interface Browser {
|
|||
/**
|
||||
* Direct value of the private key in PEM format.
|
||||
*/
|
||||
key?: string;
|
||||
key?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the PFX or PKCS12 encoded private key and certificate chain.
|
||||
|
|
@ -13889,7 +13889,7 @@ export interface BrowserType<Unused = {}> {
|
|||
/**
|
||||
* Direct value of the certificate in PEM format.
|
||||
*/
|
||||
cert?: string;
|
||||
cert?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the file with the private key in PEM format.
|
||||
|
|
@ -13899,7 +13899,7 @@ export interface BrowserType<Unused = {}> {
|
|||
/**
|
||||
* Direct value of the private key in PEM format.
|
||||
*/
|
||||
key?: string;
|
||||
key?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the PFX or PKCS12 encoded private key and certificate chain.
|
||||
|
|
@ -16313,7 +16313,7 @@ export interface APIRequest {
|
|||
/**
|
||||
* Direct value of the certificate in PEM format.
|
||||
*/
|
||||
cert?: string;
|
||||
cert?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the file with the private key in PEM format.
|
||||
|
|
@ -16323,7 +16323,7 @@ export interface APIRequest {
|
|||
/**
|
||||
* Direct value of the private key in PEM format.
|
||||
*/
|
||||
key?: string;
|
||||
key?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the PFX or PKCS12 encoded private key and certificate chain.
|
||||
|
|
@ -20669,7 +20669,7 @@ export interface BrowserContextOptions {
|
|||
/**
|
||||
* Direct value of the certificate in PEM format.
|
||||
*/
|
||||
cert?: string;
|
||||
cert?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the file with the private key in PEM format.
|
||||
|
|
@ -20679,7 +20679,7 @@ export interface BrowserContextOptions {
|
|||
/**
|
||||
* Direct value of the private key in PEM format.
|
||||
*/
|
||||
key?: string;
|
||||
key?: Buffer;
|
||||
|
||||
/**
|
||||
* Path to the PFX or PKCS12 encoded private key and certificate chain.
|
||||
|
|
|
|||
|
|
@ -309,8 +309,8 @@ test.describe('browser', () => {
|
|||
ignoreHTTPSErrors: true,
|
||||
clientCertificates: [{
|
||||
origin: new URL(serverURL).origin,
|
||||
cert: (await fs.promises.readFile(asset('client-certificates/client/trusted/cert.pem'))).toString(),
|
||||
key: (await fs.promises.readFile(asset('client-certificates/client/trusted/key.pem'))).toString(),
|
||||
cert: await fs.promises.readFile(asset('client-certificates/client/trusted/cert.pem')),
|
||||
key: await fs.promises.readFile(asset('client-certificates/client/trusted/key.pem')),
|
||||
}],
|
||||
});
|
||||
await page.goto(serverURL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue