@wdio/lighthouse-service 10.0.0-alpha.18 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +10 -0
- package/README.md +8 -5
- package/build/auditor.d.ts +12 -37
- package/build/auditor.d.ts.map +1 -1
- package/build/commands.d.ts +21 -12
- package/build/commands.d.ts.map +1 -1
- package/build/constants.d.ts +13 -15
- package/build/constants.d.ts.map +1 -1
- package/build/handler/network.d.ts +1 -1
- package/build/handler/network.d.ts.map +1 -1
- package/build/index.d.ts +4 -4
- package/build/index.d.ts.map +1 -1
- package/build/index.js +428 -574
- package/build/pwa.d.ts +47 -0
- package/build/pwa.d.ts.map +1 -0
- package/build/types.d.ts +96 -79
- package/build/types.d.ts.map +1 -1
- package/build/utils.d.ts +31 -6
- package/build/utils.d.ts.map +1 -1
- package/package.json +12 -21
- package/build/gatherer/devtools.d.ts +0 -19
- package/build/gatherer/devtools.d.ts.map +0 -1
- package/build/gatherer/pwa.d.ts +0 -28
- package/build/gatherer/pwa.d.ts.map +0 -1
- package/build/gatherer/trace.d.ts +0 -60
- package/build/gatherer/trace.d.ts.map +0 -1
- package/build/lighthouse/cri.d.ts +0 -22
- package/build/lighthouse/cri.d.ts.map +0 -1
- package/build/scripts/collectMetaElements.d.ts +0 -8
- package/build/scripts/collectMetaElements.d.ts.map +0 -1
- package/build/scripts/registerPerformanceObserverInPage.d.ts +0 -12
- package/build/scripts/registerPerformanceObserverInPage.d.ts.map +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# @wdio/lighthouse-service
|
|
2
|
+
|
|
3
|
+
Read [packages/AGENTS.md](../AGENTS.md) first.
|
|
4
|
+
|
|
5
|
+
## Test ownership
|
|
6
|
+
|
|
7
|
+
- CDP events are observable through `browser.emit`. Do not keep a gatherer or log buffer whose only reader is a unit test.
|
|
8
|
+
- `getPageWeight` tests use the real byte totals. Do not stub `sumByKey` with a constant and assert that constant.
|
|
9
|
+
- Throttling profile numbers, traced command names, PWA scoring, trace-buffer parsing, and Lighthouse metric mapping each have one owner suite. Command-handler tests cover when a flow starts, falls back, or is cancelled.
|
|
10
|
+
- `checkPWA` returns one audit result for a single browser and an array for multi-remote. Keep that return-shape branch.
|
package/README.md
CHANGED
|
@@ -30,7 +30,9 @@ export const config = {
|
|
|
30
30
|
|
|
31
31
|
## Usage
|
|
32
32
|
|
|
33
|
-
The `@wdio/lighthouse-service` allows you to run Google Lighthouse accessibility and performance tests through WebdriverIO.
|
|
33
|
+
The `@wdio/lighthouse-service` allows you to run Google Lighthouse accessibility and performance tests through WebdriverIO. The service uses [Lighthouse 13](https://github.com/GoogleChrome/lighthouse/releases/tag/v13.4.1) and its public user-flow API (`startFlow`) to audit page loads performed by WebdriverIO.
|
|
34
|
+
|
|
35
|
+
**Note:** this service requires Node.js 22.19 or newer because it depends on [Lighthouse 13](https://github.com/GoogleChrome/lighthouse/releases/tag/v13.4.1). The rest of WebdriverIO continues to support the versions listed in the project engines field.
|
|
34
36
|
|
|
35
37
|
### Performance Testing
|
|
36
38
|
|
|
@@ -94,7 +96,8 @@ console.log(await browser.getMetrics())
|
|
|
94
96
|
* speedIndex: 3259,
|
|
95
97
|
* totalBlockingTime: 31,
|
|
96
98
|
* maxPotentialFID: 161,
|
|
97
|
-
* cumulativeLayoutShift:
|
|
99
|
+
* cumulativeLayoutShift: 0.01,
|
|
100
|
+
* interactionToNextPaint: 120 }
|
|
98
101
|
*/
|
|
99
102
|
```
|
|
100
103
|
|
|
@@ -143,7 +146,7 @@ console.log(await browser.getMainThreadWorkBreakdown())
|
|
|
143
146
|
|
|
144
147
|
#### getPerformanceScore
|
|
145
148
|
|
|
146
|
-
Returns the [Lighthouse Performance Score](https://
|
|
149
|
+
Returns the [Lighthouse Performance Score](https://developer.chrome.com/docs/lighthouse/performance/performance-scoring) which is a weighted mean of `firstContentfulPaint`, `speedIndex`, `largestContentfulPaint`, `cumulativeLayoutShift` and `totalBlockingTime`. Lighthouse still reports `interactive` (TTI) and `maxPotentialFID`, but they are no longer weighted into the score.
|
|
147
150
|
|
|
148
151
|
```js
|
|
149
152
|
console.log(await browser.getPerformanceScore())
|
|
@@ -154,7 +157,7 @@ console.log(await browser.getPerformanceScore())
|
|
|
154
157
|
|
|
155
158
|
#### enablePerformanceAudits
|
|
156
159
|
|
|
157
|
-
Enables auto performance audits for all page loads that are caused by calling the `url` command or clicking on a link or anything that causes a page load. You can pass in a config object to determine some throttling options. The default throttling profile is `
|
|
160
|
+
Enables auto performance audits for all page loads that are caused by calling the `url` command or clicking on a link or anything that causes a page load. You can pass in a config object to determine some throttling options. The default throttling profile is `online` (no network throttling) with no CPU throttling.
|
|
158
161
|
|
|
159
162
|
```js
|
|
160
163
|
await browser.enablePerformanceAudits({
|
|
@@ -169,7 +172,7 @@ The following network throttling profiles are available: `offline`, `GPRS`, `Reg
|
|
|
169
172
|
|
|
170
173
|
### PWA Testing
|
|
171
174
|
|
|
172
|
-
With the `checkPWA` command, you can validate if your web app is compliant to the latest web standards when it comes to progressive web apps. It checks:
|
|
175
|
+
With the `checkPWA` command, you can validate if your web app is compliant to the latest web standards when it comes to progressive web apps. Lighthouse 12 removed its PWA category, so this service now performs the same checks with Chrome DevTools Protocol and page inspection. It checks:
|
|
173
176
|
|
|
174
177
|
- whether your app is installable
|
|
175
178
|
- provides a service worker
|
package/build/auditor.d.ts
CHANGED
|
@@ -1,54 +1,29 @@
|
|
|
1
1
|
import type { CustomInstanceCommands } from 'webdriverio';
|
|
2
|
-
import type { FormFactor,
|
|
3
|
-
import type { Trace } from './gatherer/trace.js';
|
|
4
|
-
import type { CDPSessionOnMessageObject } from './gatherer/devtools.js';
|
|
2
|
+
import type { FormFactor, DiagnosticsResult, PerformanceMetrics, LighthouseResultLike, MainThreadWorkBreakdownResult } from './types.js';
|
|
5
3
|
export default class Auditor {
|
|
6
|
-
private
|
|
7
|
-
private _devtoolsLogs?;
|
|
4
|
+
private _lhr?;
|
|
8
5
|
private _formFactor?;
|
|
9
|
-
|
|
10
|
-
constructor(_traceLogs?: Trace | undefined, _devtoolsLogs?: CDPSessionOnMessageObject[] | undefined, _formFactor?: FormFactor | undefined);
|
|
11
|
-
_audit(AUDIT: Audit, params?: {}): Promise<LHAuditResult> | ErrorAudit;
|
|
6
|
+
constructor(_lhr?: LighthouseResultLike | undefined, _formFactor?: FormFactor | undefined);
|
|
12
7
|
/**
|
|
13
|
-
* an Auditor instance is created for every
|
|
14
|
-
* function to receive the latest performance metrics
|
|
8
|
+
* an Auditor instance is created for every Lighthouse run so provide an
|
|
9
|
+
* updateCommands function to receive the latest performance metrics
|
|
15
10
|
*/
|
|
16
11
|
updateCommands(browser: WebdriverIO.Browser, customFn?: CustomInstanceCommands<WebdriverIO.Browser>['addCommand']): void;
|
|
17
12
|
/**
|
|
18
|
-
* Returns a list with a breakdown of all main thread
|
|
13
|
+
* Returns a list with a breakdown of all main thread tasks and their total duration
|
|
19
14
|
*/
|
|
20
|
-
getMainThreadWorkBreakdown(): Promise<
|
|
21
|
-
group: string;
|
|
22
|
-
duration: number;
|
|
23
|
-
}[]>;
|
|
15
|
+
getMainThreadWorkBreakdown(): Promise<MainThreadWorkBreakdownResult[]>;
|
|
24
16
|
/**
|
|
25
17
|
* Get some useful diagnostics about the page load
|
|
26
18
|
*/
|
|
27
|
-
getDiagnostics(): Promise<
|
|
19
|
+
getDiagnostics(): Promise<DiagnosticsResult | null>;
|
|
28
20
|
/**
|
|
29
|
-
* Get most
|
|
21
|
+
* Get most commonly used performance metrics
|
|
30
22
|
*/
|
|
31
|
-
getMetrics(): Promise<
|
|
32
|
-
timeToFirstByte: number;
|
|
33
|
-
serverResponseTime: number;
|
|
34
|
-
domContentLoaded: number;
|
|
35
|
-
firstVisualChange: number;
|
|
36
|
-
firstPaint: number;
|
|
37
|
-
firstContentfulPaint: number;
|
|
38
|
-
firstMeaningfulPaint: number;
|
|
39
|
-
largestContentfulPaint: number;
|
|
40
|
-
lastVisualChange: number;
|
|
41
|
-
interactive: number;
|
|
42
|
-
load: number;
|
|
43
|
-
speedIndex: number;
|
|
44
|
-
totalBlockingTime: number;
|
|
45
|
-
maxPotentialFID: number;
|
|
46
|
-
cumulativeLayoutShift: number;
|
|
47
|
-
}>;
|
|
23
|
+
getMetrics(): Promise<PerformanceMetrics>;
|
|
48
24
|
/**
|
|
49
|
-
* Returns the Lighthouse Performance Score
|
|
25
|
+
* Returns the Lighthouse Performance Score, a weighted mean of FCP, SI, LCP, TBT and CLS.
|
|
50
26
|
*/
|
|
51
|
-
getPerformanceScore(): Promise<
|
|
52
|
-
_auditPWA(params: unknown, auditsToBeRun?: PWAAudits[]): Promise<AuditResult>;
|
|
27
|
+
getPerformanceScore(): Promise<number | null>;
|
|
53
28
|
}
|
|
54
29
|
//# sourceMappingURL=auditor.d.ts.map
|
package/build/auditor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auditor.d.ts","sourceRoot":"","sources":["../src/auditor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auditor.d.ts","sourceRoot":"","sources":["../src/auditor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEzD,OAAO,KAAK,EACR,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAChC,MAAM,YAAY,CAAA;AAanB,MAAM,CAAC,OAAO,OAAO,OAAO;IAEpB,OAAO,CAAC,IAAI,CAAC;IACb,OAAO,CAAC,WAAW,CAAC;gBADZ,IAAI,CAAC,EAAE,oBAAoB,YAAA,EAC3B,WAAW,CAAC,EAAE,UAAU,YAAA;IAGpC;;;OAGG;IACH,cAAc,CAAE,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,sBAAsB,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC;IAMlH;;OAEG;IACG,0BAA0B,IAAK,OAAO,CAAC,6BAA6B,EAAE,CAAC;IAY7E;;OAEG;IACG,cAAc,IAAK,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAS1D;;OAEG;IACG,UAAU,IAAK,OAAO,CAAC,kBAAkB,CAAC;IA0BhD;;OAEG;IACG,mBAAmB,IAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CASvD"}
|
package/build/commands.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { TraceEvent } from '@tracerbench/trace-event';
|
|
2
|
-
import type { CDPSession } from 'puppeteer-core
|
|
3
|
-
import type { Page } from 'puppeteer-core
|
|
4
|
-
import type { TracingOptions } from 'puppeteer-core
|
|
2
|
+
import type { CDPSession } from 'puppeteer-core';
|
|
3
|
+
import type { Page } from 'puppeteer-core';
|
|
4
|
+
import type { TracingOptions } from 'puppeteer-core';
|
|
5
5
|
import type { RequestPayload } from './handler/network.js';
|
|
6
|
-
import type { DevtoolsConfig, EnablePerformanceAuditsOptions,
|
|
6
|
+
import type { DevtoolsConfig, EnablePerformanceAuditsOptions, PWAAudits } from './types.js';
|
|
7
7
|
export default class CommandHandler {
|
|
8
8
|
private _session;
|
|
9
9
|
private _page;
|
|
10
|
-
private _driver;
|
|
11
10
|
private _options;
|
|
12
11
|
private _browser;
|
|
13
12
|
private _isTracing;
|
|
@@ -18,10 +17,13 @@ export default class CommandHandler {
|
|
|
18
17
|
private _cpuThrottling?;
|
|
19
18
|
private _networkThrottling?;
|
|
20
19
|
private _formFactor?;
|
|
21
|
-
private
|
|
22
|
-
private
|
|
23
|
-
private
|
|
24
|
-
|
|
20
|
+
private _pwaAuditor;
|
|
21
|
+
private _flow?;
|
|
22
|
+
private _flowInProgress;
|
|
23
|
+
private _pageLoadDetected;
|
|
24
|
+
private _clickTraceTimeout?;
|
|
25
|
+
private _onFrameNavigated;
|
|
26
|
+
constructor(_session: CDPSession, _page: Page, _options: DevtoolsConfig, _browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser);
|
|
25
27
|
/**
|
|
26
28
|
* Start tracing the browser. You can optionally pass in custom tracing categories and the
|
|
27
29
|
* sampling frequency.
|
|
@@ -30,7 +32,7 @@ export default class CommandHandler {
|
|
|
30
32
|
/**
|
|
31
33
|
* Stop tracing the browser.
|
|
32
34
|
*/
|
|
33
|
-
endTracing(): Promise<TraceEvent[]
|
|
35
|
+
endTracing(): Promise<TraceEvent[]>;
|
|
34
36
|
/**
|
|
35
37
|
* Returns the tracelogs that was captured within the tracing period.
|
|
36
38
|
* You can use this command to store the trace logs on the file system to analyse the trace
|
|
@@ -81,7 +83,14 @@ export default class CommandHandler {
|
|
|
81
83
|
checkPWA(auditsToBeRun?: PWAAudits[]): Promise<import("./types.js").AuditResult>;
|
|
82
84
|
private _propagateWSEvents;
|
|
83
85
|
_initCommand(): Promise<void>;
|
|
84
|
-
_beforeCmd(commandName: string, params: unknown[]): Promise<void
|
|
85
|
-
_afterCmd(commandName: string): Promise<void
|
|
86
|
+
_beforeCmd(commandName: string, params: unknown[]): Promise<void>;
|
|
87
|
+
_afterCmd(commandName: string): Promise<void>;
|
|
88
|
+
private _getFlowOptions;
|
|
89
|
+
private _handleFrameNavigated;
|
|
90
|
+
private _refreshAuditablePage;
|
|
91
|
+
private _navigateWithLighthouse;
|
|
92
|
+
private _cancelNavigation;
|
|
93
|
+
private _disposeFlow;
|
|
94
|
+
private _resetFlowState;
|
|
86
95
|
}
|
|
87
96
|
//# sourceMappingURL=commands.d.ts.map
|
package/build/commands.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,M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;;;;;;;;;;;;;;;;;;IAQb;;OAEG;IACH,uBAAuB,CAAE,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,GAAE,8BAAuD;IAgBhJ;;OAEG;IACH,wBAAwB;IAIxB;;OAEG;IACG,oBAAoB,CACtB,iBAAiB,sHAA2C,EAC5D,aAAa,GAAE,MAA6C,EAC5D,YAAY,GAAE,OAA6C;IAWzD,QAAQ,CAAE,aAAa,CAAC,EAAE,SAAS,EAAE;IAI3C,OAAO,CAAC,kBAAkB;IAiBpB,YAAY;IAWZ,UAAU,CAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE;IAoClD,SAAS,CAAE,WAAW,EAAE,MAAM;IA0CpC,OAAO,CAAC,eAAe;IAwBvB,OAAO,CAAC,qBAAqB;YAYf,qBAAqB;YAarB,uBAAuB;YAiBvB,iBAAiB;IAmB/B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,eAAe;CAS1B"}
|
package/build/constants.d.ts
CHANGED
|
@@ -7,11 +7,13 @@ export declare const DEFAULT_TRACING_CATEGORIES: string[];
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const IGNORED_URLS: readonly ["data:,", "about:", "chrome-extension://"];
|
|
9
9
|
export declare const FRAME_LOAD_START_TIMEOUT = 2000;
|
|
10
|
-
export declare const TRACING_TIMEOUT = 15000;
|
|
11
|
-
export declare const MAX_TRACE_WAIT_TIME = 45000;
|
|
12
10
|
export declare const DEFAULT_NETWORK_THROTTLING_STATE: "online";
|
|
13
11
|
export declare const DEFAULT_FORM_FACTOR: "desktop";
|
|
14
12
|
export declare const UNSUPPORTED_ERROR_MESSAGE: string;
|
|
13
|
+
/**
|
|
14
|
+
* Lighthouse throttling constants (core/config/constants.js).
|
|
15
|
+
* Regular 3G uses `mobileRegular3G`, Good 3G uses `mobileSlow4G`.
|
|
16
|
+
*/
|
|
15
17
|
export declare const NETWORK_STATES: {
|
|
16
18
|
offline: {
|
|
17
19
|
offline: boolean;
|
|
@@ -39,13 +41,13 @@ export declare const NETWORK_STATES: {
|
|
|
39
41
|
};
|
|
40
42
|
'Regular 3G': {
|
|
41
43
|
offline: boolean;
|
|
42
|
-
latency:
|
|
44
|
+
latency: number;
|
|
43
45
|
downloadThroughput: number;
|
|
44
46
|
uploadThroughput: number;
|
|
45
47
|
};
|
|
46
48
|
'Good 3G': {
|
|
47
49
|
offline: boolean;
|
|
48
|
-
latency:
|
|
50
|
+
latency: number;
|
|
49
51
|
downloadThroughput: number;
|
|
50
52
|
uploadThroughput: number;
|
|
51
53
|
};
|
|
@@ -81,15 +83,11 @@ export declare const DEFAULT_THROTTLE_STATE: {
|
|
|
81
83
|
readonly cacheEnabled: false;
|
|
82
84
|
readonly formFactor: "desktop";
|
|
83
85
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
readonly viewport: any;
|
|
92
|
-
readonly appleTouchIcon: any;
|
|
93
|
-
readonly maskableIcon: any;
|
|
94
|
-
};
|
|
86
|
+
/**
|
|
87
|
+
* PWA checks preserved from the original Lighthouse PWA category.
|
|
88
|
+
* Lighthouse 12+ removed that category, so the service implements these checks
|
|
89
|
+
* with Chrome DevTools Protocol and page inspection.
|
|
90
|
+
*/
|
|
91
|
+
export declare const PWA_AUDIT_NAMES: readonly ["isInstallable", "serviceWorker", "splashScreen", "themedOmnibox", "contentWith", "viewport", "appleTouchIcon", "maskableIcon"];
|
|
92
|
+
export declare const TRACE_COMMANDS: readonly ["click", "navigateTo", "url"];
|
|
95
93
|
//# sourceMappingURL=constants.d.ts.map
|
package/build/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,0BAA0B,UAqCtC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,sDAIf,CAAA;AAEV,eAAO,MAAM,wBAAwB,OAAO,CAAA;AAC5C,eAAO,MAAM,gCAAgC,EAAG,QAAiB,CAAA;AACjE,eAAO,MAAM,mBAAmB,EAAG,SAAkB,CAAA;AACrD,eAAO,MAAM,yBAAyB,QAIrC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6D1B,CAAA;AAED,eAAO,MAAM,gBAAgB,qBAAqB,CAAA;AAClD,eAAO,MAAM,sBAAsB;gCACwB,MAAM,OAAO,cAAc;;;;CAI5E,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,eAAe,2IASlB,CAAA;AAEV,eAAO,MAAM,cAAc,yCAA0C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/handler/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../src/handler/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAIjD,UAAU,UAAU;IAChB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,OAAO,EAAE,CAAA;CACtB;AAED,UAAU,OAAO;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CA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QAAQ,CAAC,IAAI,CAAC,mBAAmB;CAwBlE"}
|
package/build/index.d.ts
CHANGED
|
@@ -7,10 +7,10 @@ export default class DevToolsService implements Services.ServiceInstance {
|
|
|
7
7
|
private _command;
|
|
8
8
|
private _browser?;
|
|
9
9
|
constructor(_options: DevtoolsConfig);
|
|
10
|
-
before(caps: Capabilities.RequestedStandaloneCapabilities | Capabilities.
|
|
10
|
+
before(caps: Capabilities.RequestedStandaloneCapabilities | Capabilities.RequestedMultiRemoteCapabilities, specs: string[], browser: WebdriverIO.Browser | WebdriverIO.MultiRemoteBrowser): Promise<void>;
|
|
11
11
|
onReload(): Promise<void>;
|
|
12
|
-
beforeCommand(commandName: string, params: unknown[]): Promise<
|
|
13
|
-
afterCommand(commandName: string): Promise<
|
|
12
|
+
beforeCommand(commandName: string, params: unknown[]): Promise<void[]>;
|
|
13
|
+
afterCommand(commandName: string): Promise<void[]>;
|
|
14
14
|
/**
|
|
15
15
|
* set flag to run performance audits for page transitions
|
|
16
16
|
*/
|
|
@@ -25,7 +25,7 @@ export default class DevToolsService implements Services.ServiceInstance {
|
|
|
25
25
|
}
|
|
26
26
|
export * from './types.js';
|
|
27
27
|
type CommandHandlerCommands = FunctionProperties<CommandHandler>;
|
|
28
|
-
type AuditorCommands = Omit<FunctionProperties<Auditor>, '
|
|
28
|
+
type AuditorCommands = Omit<FunctionProperties<Auditor>, 'updateCommands'>;
|
|
29
29
|
/**
|
|
30
30
|
* ToDo(Christian): use key remapping with TS 4.1
|
|
31
31
|
* https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html#key-remapping-in-mapped-types
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAGtF,OAAO,cAAc,MAAM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