lighthouse 11.1.0-dev.20230912 → 11.1.0-dev.20230914
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/core/lib/asset-saver.d.ts +4 -4
- package/core/lib/asset-saver.js +14 -10
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type PreparedAssets = {
|
|
2
|
-
traceData
|
|
3
|
-
devtoolsLog
|
|
2
|
+
traceData?: import("../index.js").Trace | undefined;
|
|
3
|
+
devtoolsLog?: import("../index.js").DevtoolsLog | undefined;
|
|
4
4
|
};
|
|
5
5
|
/**
|
|
6
6
|
* Save artifacts object mostly to single file located at basePath/artifacts.json.
|
|
@@ -34,8 +34,8 @@ export function saveFlowArtifacts(flowArtifacts: LH.UserFlow.FlowArtifacts, base
|
|
|
34
34
|
export function saveLhr(lhr: LH.Result, basePath: string): void;
|
|
35
35
|
/**
|
|
36
36
|
* @typedef {object} PreparedAssets
|
|
37
|
-
* @property {LH.Trace} traceData
|
|
38
|
-
* @property {LH.DevtoolsLog} devtoolsLog
|
|
37
|
+
* @property {LH.Trace} [traceData]
|
|
38
|
+
* @property {LH.DevtoolsLog} [devtoolsLog]
|
|
39
39
|
*/
|
|
40
40
|
/**
|
|
41
41
|
* Load artifacts object from files located within basePath
|
package/core/lib/asset-saver.js
CHANGED
|
@@ -29,8 +29,8 @@ const stepDirectoryRegex = /^step(\d+)$/;
|
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* @typedef {object} PreparedAssets
|
|
32
|
-
* @property {LH.Trace} traceData
|
|
33
|
-
* @property {LH.DevtoolsLog} devtoolsLog
|
|
32
|
+
* @property {LH.Trace} [traceData]
|
|
33
|
+
* @property {LH.DevtoolsLog} [devtoolsLog]
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
36
|
|
|
@@ -420,14 +420,18 @@ async function saveLanternDebugTraces(pathWithBasename) {
|
|
|
420
420
|
*/
|
|
421
421
|
async function saveAssets(artifacts, audits, pathWithBasename) {
|
|
422
422
|
const allAssets = await prepareAssets(artifacts, audits);
|
|
423
|
-
const saveAll = allAssets.map(async (
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
423
|
+
const saveAll = allAssets.map(async (assets, index) => {
|
|
424
|
+
if (assets.devtoolsLog) {
|
|
425
|
+
const devtoolsLogFilename = `${pathWithBasename}-${index}${devtoolsLogSuffix}`;
|
|
426
|
+
await saveDevtoolsLog(assets.devtoolsLog, devtoolsLogFilename);
|
|
427
|
+
log.log('saveAssets', 'devtools log saved to disk: ' + devtoolsLogFilename);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (assets.traceData) {
|
|
431
|
+
const traceFilename = `${pathWithBasename}-${index}${traceSuffix}`;
|
|
432
|
+
await saveTrace(assets.traceData, traceFilename);
|
|
433
|
+
log.log('saveAssets', 'trace file streamed to disk: ' + traceFilename);
|
|
434
|
+
}
|
|
431
435
|
});
|
|
432
436
|
|
|
433
437
|
await Promise.all(saveAll);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lighthouse",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "11.1.0-dev.
|
|
4
|
+
"version": "11.1.0-dev.20230914",
|
|
5
5
|
"description": "Automated auditing, performance metrics, and best practices for the web.",
|
|
6
6
|
"main": "./core/index.js",
|
|
7
7
|
"bin": {
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"pako": "^2.0.3",
|
|
167
167
|
"preact": "^10.7.2",
|
|
168
168
|
"pretty-json-stringify": "^0.0.2",
|
|
169
|
-
"puppeteer": "
|
|
169
|
+
"puppeteer": "21.1.1",
|
|
170
170
|
"resolve": "^1.22.1",
|
|
171
171
|
"rollup": "^2.52.7",
|
|
172
172
|
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"open": "^8.4.0",
|
|
200
200
|
"parse-cache-control": "1.0.1",
|
|
201
201
|
"ps-list": "^8.0.0",
|
|
202
|
-
"puppeteer-core": "
|
|
202
|
+
"puppeteer-core": "21.1.1",
|
|
203
203
|
"robots-parser": "^3.0.1",
|
|
204
204
|
"semver": "^5.3.0",
|
|
205
205
|
"speedline-core": "^1.4.3",
|