lighthouse 11.7.1 → 12.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/CONTRIBUTING.md +2 -2
- package/cli/bin.js +0 -7
- package/cli/cli-flags.d.ts +1 -5
- package/cli/cli-flags.js +4 -8
- package/cli/test/smokehouse/__snapshots__/report-assert-test.js.snap +14 -14
- package/cli/test/smokehouse/config/exclusions.js +3 -0
- package/cli/test/smokehouse/core-tests.js +6 -20
- package/cli/test/smokehouse/frontends/smokehouse-bin.js +2 -2
- package/core/audits/accessibility/aria-conditional-attr.d.ts +10 -0
- package/core/audits/accessibility/aria-conditional-attr.js +43 -0
- package/core/audits/accessibility/{duplicate-id-active.d.ts → aria-deprecated-role.d.ts} +3 -3
- package/core/audits/accessibility/aria-deprecated-role.js +43 -0
- package/core/audits/accessibility/aria-prohibited-attr.d.ts +10 -0
- package/core/audits/accessibility/aria-prohibited-attr.js +44 -0
- package/core/audits/accessibility/target-size.js +0 -1
- package/core/audits/byte-efficiency/byte-efficiency-audit.d.ts +0 -16
- package/core/audits/byte-efficiency/byte-efficiency-audit.js +1 -38
- package/core/audits/byte-efficiency/offscreen-images.d.ts +0 -11
- package/core/audits/byte-efficiency/offscreen-images.js +0 -15
- package/core/audits/byte-efficiency/render-blocking-resources.js +27 -26
- package/core/audits/byte-efficiency/unminified-css.js +2 -2
- package/core/audits/byte-efficiency/unused-css-rules.js +3 -1
- package/core/audits/dobetterweb/uses-http2.d.ts +0 -13
- package/core/audits/dobetterweb/uses-http2.js +4 -38
- package/core/audits/font-display.js +2 -2
- package/core/audits/layout-shifts.js +1 -1
- package/core/audits/preload-fonts.d.ts +1 -5
- package/core/audits/preload-fonts.js +1 -10
- package/core/audits/prioritize-lcp-image.js +2 -2
- package/core/audits/redirects-http.d.ts +19 -0
- package/core/audits/redirects-http.js +75 -0
- package/core/audits/resource-summary.d.ts +2 -0
- package/core/audits/resource-summary.js +5 -4
- package/core/audits/seo/is-crawlable.d.ts +2 -1
- package/core/audits/seo/link-text.js +12 -0
- package/core/audits/uses-rel-preload.d.ts +1 -5
- package/core/audits/uses-rel-preload.js +5 -15
- package/core/audits/work-during-interaction.d.ts +2 -2
- package/core/audits/work-during-interaction.js +2 -2
- package/core/computed/js-bundles.d.ts +1 -1
- package/core/computed/metrics/lantern-first-contentful-paint.d.ts +13 -82
- package/core/computed/metrics/lantern-first-contentful-paint.js +16 -178
- package/core/computed/metrics/lantern-first-meaningful-paint.d.ts +13 -12
- package/core/computed/metrics/lantern-first-meaningful-paint.js +11 -49
- package/core/computed/metrics/lantern-interactive.d.ts +13 -21
- package/core/computed/metrics/lantern-interactive.js +12 -84
- package/core/computed/metrics/lantern-largest-contentful-paint.d.ts +13 -25
- package/core/computed/metrics/lantern-largest-contentful-paint.js +13 -80
- package/core/computed/metrics/lantern-max-potential-fid.d.ts +13 -24
- package/core/computed/metrics/lantern-max-potential-fid.js +12 -64
- package/core/computed/metrics/lantern-metric.d.ts +14 -18
- package/core/computed/metrics/lantern-metric.js +34 -30
- package/core/computed/metrics/lantern-speed-index.d.ts +13 -32
- package/core/computed/metrics/lantern-speed-index.js +13 -116
- package/core/computed/metrics/lantern-total-blocking-time.d.ts +13 -25
- package/core/computed/metrics/lantern-total-blocking-time.js +10 -94
- package/core/computed/metrics/metric.js +1 -3
- package/core/computed/module-duplication.d.ts +1 -1
- package/core/computed/navigation-insights.d.ts +36 -0
- package/core/computed/navigation-insights.js +35 -0
- package/core/computed/page-dependency-graph.js +3 -7
- package/core/computed/resource-summary.d.ts +10 -12
- package/core/computed/resource-summary.js +12 -19
- package/core/computed/trace-engine-result.d.ts +16 -3
- package/core/computed/trace-engine-result.js +19 -14
- package/core/computed/unused-css.d.ts +3 -1
- package/core/computed/unused-css.js +6 -5
- package/core/config/config-helpers.js +0 -4
- package/core/config/constants.js +0 -1
- package/core/config/default-config.js +63 -142
- package/core/config/experimental-config.js +11 -0
- package/core/config/filters.js +0 -1
- package/core/gather/driver/navigation.js +4 -1
- package/core/gather/driver/prepare.js +1 -1
- package/core/gather/driver/target-manager.js +4 -3
- package/core/gather/driver/wait-for-condition.js +2 -3
- package/core/gather/driver.d.ts +12 -0
- package/core/gather/driver.js +27 -0
- package/core/gather/gatherers/accessibility.js +4 -6
- package/core/gather/gatherers/css-usage.d.ts +0 -21
- package/core/gather/gatherers/css-usage.js +9 -119
- package/core/gather/gatherers/root-causes.d.ts +2 -2
- package/core/gather/gatherers/root-causes.js +6 -5
- package/core/gather/gatherers/stylesheets.d.ts +26 -0
- package/core/gather/gatherers/stylesheets.js +138 -0
- package/core/gather/gatherers/trace-elements.d.ts +2 -12
- package/core/gather/gatherers/trace-elements.js +2 -21
- package/core/gather/navigation-runner.js +3 -1
- package/core/gather/session.d.ts +8 -0
- package/core/gather/session.js +14 -1
- package/core/lib/emulation.js +2 -2
- package/core/lib/i18n/i18n.d.ts +0 -1
- package/core/lib/i18n/i18n.js +0 -2
- package/core/lib/lantern/cpu-node.d.ts +7 -1
- package/core/lib/lantern/cpu-node.js +12 -2
- package/core/lib/lantern/lantern-error.d.ts +8 -0
- package/core/lib/lantern/lantern-error.js +9 -0
- package/core/lib/lantern/metric.js +2 -6
- package/core/lib/lantern/metrics/first-contentful-paint.d.ts +79 -0
- package/core/lib/lantern/metrics/first-contentful-paint.js +200 -0
- package/core/lib/lantern/metrics/first-meaningful-paint.d.ts +6 -0
- package/core/lib/lantern/metrics/first-meaningful-paint.js +64 -0
- package/core/lib/lantern/metrics/interactive.d.ts +26 -0
- package/core/lib/lantern/metrics/interactive.js +112 -0
- package/core/lib/lantern/metrics/largest-contentful-paint.d.ts +19 -0
- package/core/lib/lantern/metrics/largest-contentful-paint.js +108 -0
- package/core/lib/lantern/metrics/max-potential-fid.d.ts +30 -0
- package/core/lib/lantern/metrics/max-potential-fid.js +92 -0
- package/core/lib/lantern/metrics/speed-index.d.ts +38 -0
- package/core/lib/lantern/metrics/speed-index.js +144 -0
- package/core/lib/lantern/metrics/total-blocking-time.d.ts +31 -0
- package/core/lib/lantern/metrics/total-blocking-time.js +128 -0
- package/core/lib/lantern/network-node.js +28 -4
- package/core/lib/lantern/page-dependency-graph.d.ts +4 -4
- package/core/lib/lantern/page-dependency-graph.js +19 -7
- package/core/lib/lantern/simulator/connection-pool.d.ts +2 -12
- package/core/lib/lantern/simulator/connection-pool.js +3 -22
- package/core/lib/lantern/simulator/network-analyzer.js +1 -12
- package/core/lib/lantern/simulator/simulator.d.ts +2 -4
- package/core/lib/lantern/simulator/simulator.js +7 -14
- package/core/lib/lantern/types/lantern.d.ts +5 -3
- package/core/lib/lantern-trace-saver.js +0 -1
- package/core/lib/lh-error.d.ts +9 -0
- package/core/lib/lh-error.js +13 -3
- package/core/lib/lighthouse-compatibility.js +53 -10
- package/core/lib/navigation-error.js +3 -0
- package/core/lib/network-request.d.ts +1 -0
- package/core/lib/network-request.js +28 -0
- package/core/runner.js +18 -25
- package/dist/report/bundle.esm.js +11 -112
- package/dist/report/flow.js +16 -117
- package/dist/report/standalone.js +12 -113
- package/flow-report/src/help-dialog.tsx +0 -1
- package/flow-report/src/i18n/i18n.d.ts +0 -4
- package/flow-report/src/i18n/ui-strings.d.ts +0 -1
- package/flow-report/src/i18n/ui-strings.js +0 -2
- package/flow-report/src/summary/category.tsx +10 -12
- package/package.json +5 -5
- package/readme.md +4 -4
- package/report/assets/styles.css +1 -60
- package/report/assets/templates.html +0 -95
- package/report/renderer/category-renderer.js +1 -1
- package/report/renderer/components.d.ts +2 -2
- package/report/renderer/components.js +2 -103
- package/report/renderer/dom.d.ts +1 -1
- package/report/renderer/dom.js +1 -1
- package/report/renderer/performance-category-renderer.d.ts +0 -7
- package/report/renderer/performance-category-renderer.js +1 -32
- package/report/renderer/report-renderer.js +3 -13
- package/report/renderer/report-ui-features.js +1 -1
- package/report/renderer/report-utils.d.ts +0 -1
- package/report/renderer/report-utils.js +13 -13
- package/shared/localization/locales/ar-XB.json +62 -329
- package/shared/localization/locales/ar.json +62 -329
- package/shared/localization/locales/bg.json +62 -329
- package/shared/localization/locales/ca.json +62 -329
- package/shared/localization/locales/cs.json +62 -329
- package/shared/localization/locales/da.json +62 -329
- package/shared/localization/locales/de.json +62 -329
- package/shared/localization/locales/el.json +62 -329
- package/shared/localization/locales/en-GB.json +62 -329
- package/shared/localization/locales/en-US.json +41 -272
- package/shared/localization/locales/en-XA.json +62 -329
- package/shared/localization/locales/en-XL.json +41 -272
- package/shared/localization/locales/es-419.json +62 -329
- package/shared/localization/locales/es.json +62 -329
- package/shared/localization/locales/fi.json +62 -329
- package/shared/localization/locales/fil.json +61 -328
- package/shared/localization/locales/fr.json +62 -329
- package/shared/localization/locales/he.json +62 -329
- package/shared/localization/locales/hi.json +62 -329
- package/shared/localization/locales/hr.json +63 -330
- package/shared/localization/locales/hu.json +62 -329
- package/shared/localization/locales/id.json +62 -329
- package/shared/localization/locales/it.json +62 -329
- package/shared/localization/locales/ja.json +62 -329
- package/shared/localization/locales/ko.json +62 -329
- package/shared/localization/locales/lt.json +62 -329
- package/shared/localization/locales/lv.json +62 -329
- package/shared/localization/locales/nl.json +62 -329
- package/shared/localization/locales/no.json +62 -329
- package/shared/localization/locales/pl.json +61 -328
- package/shared/localization/locales/pt-PT.json +62 -329
- package/shared/localization/locales/pt.json +64 -331
- package/shared/localization/locales/ro.json +62 -329
- package/shared/localization/locales/ru.json +62 -329
- package/shared/localization/locales/sk.json +62 -329
- package/shared/localization/locales/sl.json +62 -329
- package/shared/localization/locales/sr-Latn.json +62 -329
- package/shared/localization/locales/sr.json +62 -329
- package/shared/localization/locales/sv.json +62 -329
- package/shared/localization/locales/ta.json +61 -328
- package/shared/localization/locales/te.json +62 -329
- package/shared/localization/locales/th.json +62 -329
- package/shared/localization/locales/tr.json +62 -329
- package/shared/localization/locales/uk.json +62 -329
- package/shared/localization/locales/vi.json +61 -328
- package/shared/localization/locales/zh-HK.json +62 -329
- package/shared/localization/locales/zh-TW.json +61 -328
- package/shared/localization/locales/zh.json +62 -329
- package/tsconfig.json +1 -3
- package/types/artifacts.d.ts +21 -110
- package/types/audit.d.ts +0 -10
- package/types/config.d.ts +0 -1
- package/types/externs.d.ts +0 -2
- package/types/gatherer.d.ts +3 -0
- package/types/internal/smokehouse.d.ts +1 -1
- package/types/lh.d.ts +0 -2
- package/types/lhr/audit-details.d.ts +9 -4
- package/types/lhr/lhr.d.ts +0 -4
- package/types/lhr/settings.d.ts +0 -4
- package/core/audits/accessibility/duplicate-id-active.js +0 -42
- package/core/audits/content-width.d.ts +0 -17
- package/core/audits/content-width.js +0 -76
- package/core/audits/installable-manifest.d.ts +0 -111
- package/core/audits/installable-manifest.js +0 -248
- package/core/audits/layout-shift-elements.d.ts +0 -16
- package/core/audits/layout-shift-elements.js +0 -101
- package/core/audits/manual/pwa-cross-browser.d.ts +0 -12
- package/core/audits/manual/pwa-cross-browser.js +0 -40
- package/core/audits/manual/pwa-each-page-has-url.d.ts +0 -12
- package/core/audits/manual/pwa-each-page-has-url.js +0 -38
- package/core/audits/manual/pwa-page-transitions.d.ts +0 -12
- package/core/audits/manual/pwa-page-transitions.js +0 -38
- package/core/audits/maskable-icon.d.ts +0 -25
- package/core/audits/maskable-icon.js +0 -70
- package/core/audits/multi-check-audit.d.ts +0 -28
- package/core/audits/multi-check-audit.js +0 -82
- package/core/audits/no-unload-listeners.d.ts +0 -16
- package/core/audits/no-unload-listeners.js +0 -86
- package/core/audits/performance-budget.d.ts +0 -39
- package/core/audits/performance-budget.js +0 -154
- package/core/audits/script-elements-test-audit.d.ts +0 -14
- package/core/audits/script-elements-test-audit.js +0 -29
- package/core/audits/seo/plugins.d.ts +0 -15
- package/core/audits/seo/plugins.js +0 -150
- package/core/audits/seo/tap-targets.d.ts +0 -50
- package/core/audits/seo/tap-targets.js +0 -352
- package/core/audits/splash-screen.d.ts +0 -37
- package/core/audits/splash-screen.js +0 -98
- package/core/audits/themed-omnibox.d.ts +0 -42
- package/core/audits/themed-omnibox.js +0 -102
- package/core/audits/timing-budget.d.ts +0 -43
- package/core/audits/timing-budget.js +0 -175
- package/core/computed/manifest-values.d.ts +0 -24
- package/core/computed/manifest-values.js +0 -136
- package/core/config/budget.d.ts +0 -74
- package/core/config/budget.js +0 -340
- package/core/config/metrics-to-audits.d.ts +0 -19
- package/core/config/metrics-to-audits.js +0 -62
- package/core/gather/driver/service-workers.d.ts +0 -16
- package/core/gather/driver/service-workers.js +0 -52
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.d.ts +0 -47
- package/core/gather/gatherers/dobetterweb/tags-blocking-first-paint.js +0 -233
- package/core/gather/gatherers/global-listeners.d.ts +0 -27
- package/core/gather/gatherers/global-listeners.js +0 -108
- package/core/gather/gatherers/installability-errors.d.ts +0 -17
- package/core/gather/gatherers/installability-errors.js +0 -56
- package/core/gather/gatherers/script-elements.d.ts +0 -21
- package/core/gather/gatherers/script-elements.js +0 -100
- package/core/gather/gatherers/seo/embedded-content.d.ts +0 -10
- package/core/gather/gatherers/seo/embedded-content.js +0 -63
- package/core/gather/gatherers/seo/tap-targets.d.ts +0 -21
- package/core/gather/gatherers/seo/tap-targets.js +0 -389
- package/core/gather/gatherers/service-worker.d.ts +0 -10
- package/core/gather/gatherers/service-worker.js +0 -32
- package/core/gather/gatherers/web-app-manifest.d.ts +0 -32
- package/core/gather/gatherers/web-app-manifest.js +0 -106
- package/report/renderer/pwa-category-renderer.d.ts +0 -55
- package/report/renderer/pwa-category-renderer.js +0 -184
- package/third-party/chromium-synchronization/installability-errors-test.js +0 -79
- package/types/lhr/budget.d.ts +0 -60
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
export default InstallableManifest;
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview
|
|
4
|
-
* Audits if the page's web app manifest and service worker qualify for triggering a beforeinstallprompt event.
|
|
5
|
-
* https://github.com/GoogleChrome/lighthouse/issues/23#issuecomment-270453303
|
|
6
|
-
*
|
|
7
|
-
* Requirements based on Chrome Devtools' installability requirements.
|
|
8
|
-
* Origin of logging:
|
|
9
|
-
* https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/installable/installable_logging.cc
|
|
10
|
-
* DevTools InstallabilityError implementation:
|
|
11
|
-
* https://source.chromium.org/search?q=getInstallabilityErrorMessages&ss=chromium%2Fchromium%2Fsrc:third_party%2Fdevtools-frontend%2Fsrc%2Ffront_end%2Fresources%2F
|
|
12
|
-
*/
|
|
13
|
-
declare class InstallableManifest extends Audit {
|
|
14
|
-
/**
|
|
15
|
-
* @param {LH.Artifacts} artifacts
|
|
16
|
-
* @return {{i18nErrors: Array<LH.IcuMessage | string>; warnings: Array<LH.IcuMessage>}}
|
|
17
|
-
*/
|
|
18
|
-
static getInstallabilityErrors(artifacts: LH.Artifacts): {
|
|
19
|
-
i18nErrors: Array<LH.IcuMessage | string>;
|
|
20
|
-
warnings: Array<LH.IcuMessage>;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @param {LH.Artifacts} artifacts
|
|
24
|
-
* @param {LH.Audit.Context} context
|
|
25
|
-
* @return {Promise<LH.Audit.Product>}
|
|
26
|
-
*
|
|
27
|
-
*/
|
|
28
|
-
static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<LH.Audit.Product>;
|
|
29
|
-
}
|
|
30
|
-
export const UIStrings: {
|
|
31
|
-
/** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is installable. */
|
|
32
|
-
title: string;
|
|
33
|
-
/** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is not installable. */
|
|
34
|
-
failureTitle: string;
|
|
35
|
-
/** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
36
|
-
description: string;
|
|
37
|
-
/** Label for a column in a data table; entries in the column will be a string explaining why a failure occurred. */
|
|
38
|
-
columnValue: string;
|
|
39
|
-
/**
|
|
40
|
-
* @description [ICU Syntax] Label for an audit identifying the number of installability errors found in the page.
|
|
41
|
-
*/
|
|
42
|
-
displayValue: string;
|
|
43
|
-
/**
|
|
44
|
-
* @description Error message describing a DevTools error id that was found and has not been identified by this audit.
|
|
45
|
-
* @example {platform-not-supported-on-android} errorId
|
|
46
|
-
*/
|
|
47
|
-
noErrorId: string;
|
|
48
|
-
/** Error message explaining that the page is not loaded in the frame. */
|
|
49
|
-
'not-in-main-frame': string;
|
|
50
|
-
/** Error message explaining that the page is served from a secure origin. */
|
|
51
|
-
'not-from-secure-origin': string;
|
|
52
|
-
/** Error message explaining that the page has no manifest URL. */
|
|
53
|
-
'no-manifest': string;
|
|
54
|
-
/** Error message explaining that the provided manifest URL is invalid. */
|
|
55
|
-
'start-url-not-valid': string;
|
|
56
|
-
/** Error message explaining that the provided manifest does not contain a name or short_name field. */
|
|
57
|
-
'manifest-missing-name-or-short-name': string;
|
|
58
|
-
/** Error message explaining that the manifest display property must be one of 'standalone', 'fullscreen', or 'minimal-ui'. */
|
|
59
|
-
'manifest-display-not-supported': string;
|
|
60
|
-
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
61
|
-
'manifest-empty': string;
|
|
62
|
-
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
63
|
-
'manifest-parsing-or-network-error': string;
|
|
64
|
-
/**
|
|
65
|
-
* @description Error message explaining that the manifest does not contain a suitable icon.
|
|
66
|
-
* @example {192} value0
|
|
67
|
-
*/
|
|
68
|
-
'manifest-missing-suitable-icon': string;
|
|
69
|
-
/**
|
|
70
|
-
* @description Error message explaining that the manifest does not supply an icon of the correct format.
|
|
71
|
-
* @example {192} value0
|
|
72
|
-
*/
|
|
73
|
-
'no-acceptable-icon': string;
|
|
74
|
-
/** Error message explaining that the icon could not be downloaded. */
|
|
75
|
-
'cannot-download-icon': string;
|
|
76
|
-
/** Error message explaining that the downloaded icon was empty or corrupt. */
|
|
77
|
-
'no-icon-available': string;
|
|
78
|
-
/** Error message explaining that the specified application platform is not supported on Android. */
|
|
79
|
-
'platform-not-supported-on-android': string;
|
|
80
|
-
/** Error message explaining that a Play store ID was not provided. */
|
|
81
|
-
'no-id-specified': string;
|
|
82
|
-
/** Error message explaining that the Play Store app URL and Play Store ID do not match. */
|
|
83
|
-
'ids-do-not-match': string;
|
|
84
|
-
/** Error message explaining that the app is already installed. */
|
|
85
|
-
'already-installed': string;
|
|
86
|
-
/** Error message explaining that a URL in the manifest contains a username, password, or port. */
|
|
87
|
-
'url-not-supported-for-webapk': string;
|
|
88
|
-
/** Error message explaining that the page is loaded in an incognito window. */
|
|
89
|
-
'in-incognito': string;
|
|
90
|
-
/** Error message explaining that the page does not work offline. */
|
|
91
|
-
'not-offline-capable': string;
|
|
92
|
-
/** Error message explaining that service worker could not be checked without a start_url. */
|
|
93
|
-
'no-url-for-service-worker': string;
|
|
94
|
-
/** Error message explaining that the manifest specifies prefer_related_applications: true. */
|
|
95
|
-
'prefer-related-applications': string;
|
|
96
|
-
/** Error message explaining that prefer_related_applications is only supported on Chrome Beta and Stable channels on Android. */
|
|
97
|
-
'prefer-related-applications-only-beta-stable': string;
|
|
98
|
-
/** Error message explaining that the manifest contains 'display_override' field, and the
|
|
99
|
-
first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'. */
|
|
100
|
-
'manifest-display-override-not-supported': string;
|
|
101
|
-
/** Error message explaining that the web manifest's URL changed while the manifest was being downloaded by the browser. */
|
|
102
|
-
'manifest-location-changed': string;
|
|
103
|
-
/** Warning message explaining that the page does not work offline. */
|
|
104
|
-
'warn-not-offline-capable': string;
|
|
105
|
-
/** Error message explaining that Lighthouse failed while checking if the page is installable, and directing the user to try again in a new Chrome. */
|
|
106
|
-
'protocol-timeout': string;
|
|
107
|
-
/** Message logged when the web app has been uninstalled o desktop, signalling that the install banner state is being reset. */
|
|
108
|
-
'pipeline-restarted': string;
|
|
109
|
-
};
|
|
110
|
-
import { Audit } from './audit.js';
|
|
111
|
-
//# sourceMappingURL=installable-manifest.d.ts.map
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import {Audit} from './audit.js';
|
|
8
|
-
import * as i18n from '../lib/i18n/i18n.js';
|
|
9
|
-
import {ManifestValues} from '../computed/manifest-values.js';
|
|
10
|
-
|
|
11
|
-
/* eslint-disable max-len */
|
|
12
|
-
const UIStrings = {
|
|
13
|
-
/** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is installable. */
|
|
14
|
-
'title': 'Web app manifest and service worker meet the installability requirements',
|
|
15
|
-
/** Title of a Lighthouse audit that provides detail on if a website is installable as an application. This descriptive title is shown to users when a webapp is not installable. */
|
|
16
|
-
'failureTitle': 'Web app manifest or service worker do not meet the installability requirements',
|
|
17
|
-
/** Description of a Lighthouse audit that tells the user why installability is important for webapps. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
18
|
-
'description': `Service worker is the technology that enables your app to use many Progressive Web App features, such as offline, add to homescreen, and push notifications. With proper service worker and manifest implementations, browsers can proactively prompt users to add your app to their homescreen, which can lead to higher engagement. [Learn more about manifest installability requirements](https://developer.chrome.com/docs/lighthouse/pwa/installable-manifest/).`,
|
|
19
|
-
/** Label for a column in a data table; entries in the column will be a string explaining why a failure occurred. */
|
|
20
|
-
'columnValue': 'Failure reason',
|
|
21
|
-
/**
|
|
22
|
-
* @description [ICU Syntax] Label for an audit identifying the number of installability errors found in the page.
|
|
23
|
-
*/
|
|
24
|
-
'displayValue': `{itemCount, plural,
|
|
25
|
-
=1 {1 reason}
|
|
26
|
-
other {# reasons}
|
|
27
|
-
}`,
|
|
28
|
-
/**
|
|
29
|
-
* @description Error message describing a DevTools error id that was found and has not been identified by this audit.
|
|
30
|
-
* @example {platform-not-supported-on-android} errorId
|
|
31
|
-
*/
|
|
32
|
-
'noErrorId': `Installability error id '{errorId}' is not recognized`,
|
|
33
|
-
/** Error message explaining that the page is not loaded in the frame. */
|
|
34
|
-
'not-in-main-frame': `Page is not loaded in the main frame`,
|
|
35
|
-
/** Error message explaining that the page is served from a secure origin. */
|
|
36
|
-
'not-from-secure-origin': 'Page is not served from a secure origin',
|
|
37
|
-
/** Error message explaining that the page has no manifest URL. */
|
|
38
|
-
'no-manifest': 'Page has no manifest <link> URL',
|
|
39
|
-
/** Error message explaining that the provided manifest URL is invalid. */
|
|
40
|
-
'start-url-not-valid': `Manifest start URL is not valid`,
|
|
41
|
-
/** Error message explaining that the provided manifest does not contain a name or short_name field. */
|
|
42
|
-
'manifest-missing-name-or-short-name': 'Manifest does not contain a `name` or `short_name` field',
|
|
43
|
-
/** Error message explaining that the manifest display property must be one of 'standalone', 'fullscreen', or 'minimal-ui'. */
|
|
44
|
-
'manifest-display-not-supported': 'Manifest `display` property must be one of `standalone`, `fullscreen`, or `minimal-ui`',
|
|
45
|
-
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
46
|
-
'manifest-empty': `Manifest could not be fetched, is empty, or could not be parsed`,
|
|
47
|
-
/** Error message explaining that the manifest could not be fetched, might be empty, or could not be parsed. */
|
|
48
|
-
'manifest-parsing-or-network-error': 'Manifest could not be fetched, is empty, or could not be parsed',
|
|
49
|
-
/**
|
|
50
|
-
* @description Error message explaining that the manifest does not contain a suitable icon.
|
|
51
|
-
* @example {192} value0
|
|
52
|
-
*/
|
|
53
|
-
'manifest-missing-suitable-icon': `Manifest does not contain a suitable icon - PNG, SVG or WebP format of at least {value0}\xa0px is required, the sizes attribute must be set, and the purpose attribute, if set, must include "any".`,
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @description Error message explaining that the manifest does not supply an icon of the correct format.
|
|
57
|
-
* @example {192} value0
|
|
58
|
-
*/
|
|
59
|
-
'no-acceptable-icon': `No supplied icon is at least {value0}\xa0px square in PNG, SVG or WebP format, with the purpose attribute unset or set to "any"`,
|
|
60
|
-
|
|
61
|
-
/** Error message explaining that the icon could not be downloaded. */
|
|
62
|
-
'cannot-download-icon': `Could not download a required icon from the manifest`,
|
|
63
|
-
/** Error message explaining that the downloaded icon was empty or corrupt. */
|
|
64
|
-
'no-icon-available': `Downloaded icon was empty or corrupted`,
|
|
65
|
-
/** Error message explaining that the specified application platform is not supported on Android. */
|
|
66
|
-
'platform-not-supported-on-android': `The specified application platform is not supported on Android`,
|
|
67
|
-
/** Error message explaining that a Play store ID was not provided. */
|
|
68
|
-
'no-id-specified': `No Play store ID provided`,
|
|
69
|
-
/** Error message explaining that the Play Store app URL and Play Store ID do not match. */
|
|
70
|
-
'ids-do-not-match': `The Play Store app URL and Play Store ID do not match`,
|
|
71
|
-
/** Error message explaining that the app is already installed. */
|
|
72
|
-
'already-installed': `The app is already installed`,
|
|
73
|
-
/** Error message explaining that a URL in the manifest contains a username, password, or port. */
|
|
74
|
-
'url-not-supported-for-webapk': `A URL in the manifest contains a username, password, or port`,
|
|
75
|
-
/** Error message explaining that the page is loaded in an incognito window. */
|
|
76
|
-
'in-incognito': `Page is loaded in an incognito window`,
|
|
77
|
-
// TODO: perhaps edit this message to make it more actionable for LH users
|
|
78
|
-
/** Error message explaining that the page does not work offline. */
|
|
79
|
-
'not-offline-capable': `Page does not work offline`,
|
|
80
|
-
/** Error message explaining that service worker could not be checked without a start_url. */
|
|
81
|
-
'no-url-for-service-worker': `Could not check service worker without a 'start_url' field in the manifest`,
|
|
82
|
-
/** Error message explaining that the manifest specifies prefer_related_applications: true. */
|
|
83
|
-
'prefer-related-applications': `Manifest specifies prefer_related_applications: true`,
|
|
84
|
-
/** Error message explaining that prefer_related_applications is only supported on Chrome Beta and Stable channels on Android. */
|
|
85
|
-
'prefer-related-applications-only-beta-stable': `prefer_related_applications is only supported on Chrome Beta and Stable channels on Android.`,
|
|
86
|
-
/** Error message explaining that the manifest contains 'display_override' field, and the
|
|
87
|
-
first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'. */
|
|
88
|
-
'manifest-display-override-not-supported': `Manifest contains 'display_override' field, and the first supported display mode must be one of 'standalone', 'fullscreen', or 'minimal-ui'`,
|
|
89
|
-
/** Error message explaining that the web manifest's URL changed while the manifest was being downloaded by the browser. */
|
|
90
|
-
'manifest-location-changed': `Manifest URL changed while the manifest was being fetched.`,
|
|
91
|
-
/** Warning message explaining that the page does not work offline. */
|
|
92
|
-
// TODO(COMPAT): This error was removed in M118, we can remove this message when it hits stable.
|
|
93
|
-
'warn-not-offline-capable': `Page does not work offline. The page will not be regarded as installable after Chrome 93, stable release August 2021.`,
|
|
94
|
-
/** Error message explaining that Lighthouse failed while checking if the page is installable, and directing the user to try again in a new Chrome. */
|
|
95
|
-
'protocol-timeout': `Lighthouse could not determine if the page is installable. Please try with a newer version of Chrome.`,
|
|
96
|
-
/** Message logged when the web app has been uninstalled o desktop, signalling that the install banner state is being reset. */
|
|
97
|
-
'pipeline-restarted': 'PWA has been uninstalled and installability checks resetting.',
|
|
98
|
-
};
|
|
99
|
-
/* eslint-enable max-len */
|
|
100
|
-
|
|
101
|
-
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @fileoverview
|
|
105
|
-
* Audits if the page's web app manifest and service worker qualify for triggering a beforeinstallprompt event.
|
|
106
|
-
* https://github.com/GoogleChrome/lighthouse/issues/23#issuecomment-270453303
|
|
107
|
-
*
|
|
108
|
-
* Requirements based on Chrome Devtools' installability requirements.
|
|
109
|
-
* Origin of logging:
|
|
110
|
-
* https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/installable/installable_logging.cc
|
|
111
|
-
* DevTools InstallabilityError implementation:
|
|
112
|
-
* https://source.chromium.org/search?q=getInstallabilityErrorMessages&ss=chromium%2Fchromium%2Fsrc:third_party%2Fdevtools-frontend%2Fsrc%2Ffront_end%2Fresources%2F
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
class InstallableManifest extends Audit {
|
|
116
|
-
/**
|
|
117
|
-
* @return {LH.Audit.Meta}
|
|
118
|
-
*/
|
|
119
|
-
static get meta() {
|
|
120
|
-
return {
|
|
121
|
-
id: 'installable-manifest',
|
|
122
|
-
title: str_(UIStrings.title),
|
|
123
|
-
failureTitle: str_(UIStrings.failureTitle),
|
|
124
|
-
description: str_(UIStrings.description),
|
|
125
|
-
supportedModes: ['navigation'],
|
|
126
|
-
requiredArtifacts: ['WebAppManifest', 'InstallabilityErrors'],
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* @param {LH.Artifacts} artifacts
|
|
132
|
-
* @return {{i18nErrors: Array<LH.IcuMessage | string>; warnings: Array<LH.IcuMessage>}}
|
|
133
|
-
*/
|
|
134
|
-
static getInstallabilityErrors(artifacts) {
|
|
135
|
-
const installabilityErrors = artifacts.InstallabilityErrors.errors;
|
|
136
|
-
const i18nErrors = [];
|
|
137
|
-
const warnings = [];
|
|
138
|
-
const errorArgumentsRegex = /{([^}]+)}/g;
|
|
139
|
-
|
|
140
|
-
for (const err of installabilityErrors) {
|
|
141
|
-
// Filter out errorId 'in-incognito' since Lighthouse recommends incognito.
|
|
142
|
-
if (err.errorId === 'in-incognito') continue;
|
|
143
|
-
|
|
144
|
-
if (err.errorId === 'warn-not-offline-capable') {
|
|
145
|
-
warnings.push(str_(UIStrings[err.errorId]));
|
|
146
|
-
continue;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Filter out errorId 'pipeline-restarted' since it only applies when the PWA is uninstalled.
|
|
150
|
-
if (err.errorId === 'pipeline-restarted') {
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
// @ts-expect-error errorIds from protocol should match up against the strings dict
|
|
155
|
-
const matchingString = UIStrings[err.errorId];
|
|
156
|
-
|
|
157
|
-
// Handle an errorId we don't recognize.
|
|
158
|
-
if (matchingString === undefined) {
|
|
159
|
-
i18nErrors.push(str_(UIStrings.noErrorId, {errorId: err.errorId}));
|
|
160
|
-
continue;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Get the i18m argument names of the installability error message, if any.
|
|
164
|
-
const UIStringArguments = matchingString.match(errorArgumentsRegex) || [];
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* If there is an argument value, get it.
|
|
168
|
-
* We only expect a `minimum-icon-size-in-pixels` errorArg[0] for two errorIds, currently.
|
|
169
|
-
*/
|
|
170
|
-
const value0 = err.errorArguments?.length && err.errorArguments[0].value;
|
|
171
|
-
|
|
172
|
-
if (matchingString && err.errorArguments.length !== UIStringArguments.length) {
|
|
173
|
-
// Matching string, but have the incorrect number of arguments for the message.
|
|
174
|
-
const stringArgs = JSON.stringify(err.errorArguments);
|
|
175
|
-
const msg = err.errorArguments.length > UIStringArguments.length ?
|
|
176
|
-
`${err.errorId} has unexpected arguments ${stringArgs}` :
|
|
177
|
-
`${err.errorId} does not have the expected number of arguments.`;
|
|
178
|
-
i18nErrors.push(msg);
|
|
179
|
-
} else if (matchingString && value0) {
|
|
180
|
-
i18nErrors.push(str_(matchingString, {value0}));
|
|
181
|
-
} else if (matchingString) {
|
|
182
|
-
i18nErrors.push(str_(matchingString));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
return {i18nErrors, warnings};
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* @param {LH.Artifacts} artifacts
|
|
191
|
-
* @param {LH.Audit.Context} context
|
|
192
|
-
* @return {Promise<LH.Audit.Product>}
|
|
193
|
-
*
|
|
194
|
-
*/
|
|
195
|
-
static async audit(artifacts, context) {
|
|
196
|
-
const {i18nErrors, warnings} = InstallableManifest.getInstallabilityErrors(artifacts);
|
|
197
|
-
|
|
198
|
-
const manifestUrl = artifacts.WebAppManifest ? artifacts.WebAppManifest.url : null;
|
|
199
|
-
|
|
200
|
-
/** @type {LH.Audit.Details.Table['headings']} */
|
|
201
|
-
const headings = [
|
|
202
|
-
{key: 'reason', valueType: 'text', label: str_(UIStrings.columnValue)},
|
|
203
|
-
];
|
|
204
|
-
|
|
205
|
-
// Errors for report table.
|
|
206
|
-
/** @type {LH.Audit.Details.Table['items']} */
|
|
207
|
-
const errorReasons = i18nErrors.map(reason => {
|
|
208
|
-
return {reason};
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
// If InstallabilityErrors is empty, double check ManifestValues to make sure nothing was missed.
|
|
212
|
-
// InstallabilityErrors can be empty erroneously in our DevTools web tests.
|
|
213
|
-
if (!errorReasons.length) {
|
|
214
|
-
const manifestValues = await ManifestValues.request(artifacts, context);
|
|
215
|
-
if (manifestValues.isParseFailure) {
|
|
216
|
-
errorReasons.push({
|
|
217
|
-
reason: manifestValues.parseFailureReason,
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// Include the detailed pass/fail checklist as a diagnostic.
|
|
223
|
-
/** @type {LH.Audit.Details.DebugData} */
|
|
224
|
-
const debugData = {
|
|
225
|
-
type: 'debugdata',
|
|
226
|
-
manifestUrl,
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
if (errorReasons.length > 0) {
|
|
230
|
-
return {
|
|
231
|
-
score: 0,
|
|
232
|
-
warnings,
|
|
233
|
-
numericValue: errorReasons.length,
|
|
234
|
-
numericUnit: 'element',
|
|
235
|
-
displayValue: str_(UIStrings.displayValue, {itemCount: errorReasons.length}),
|
|
236
|
-
details: {...Audit.makeTableDetails(headings, errorReasons), debugData},
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
return {
|
|
240
|
-
score: 1,
|
|
241
|
-
warnings,
|
|
242
|
-
details: {...Audit.makeTableDetails(headings, errorReasons), debugData},
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
export default InstallableManifest;
|
|
248
|
-
export {UIStrings};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export default LayoutShiftElements;
|
|
2
|
-
declare class LayoutShiftElements extends Audit {
|
|
3
|
-
/**
|
|
4
|
-
* @param {LH.Artifacts} artifacts
|
|
5
|
-
* @param {LH.Audit.Context} context
|
|
6
|
-
* @return {Promise<LH.Audit.Product>}
|
|
7
|
-
*/
|
|
8
|
-
static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<LH.Audit.Product>;
|
|
9
|
-
}
|
|
10
|
-
export namespace UIStrings {
|
|
11
|
-
const title: string;
|
|
12
|
-
const description: string;
|
|
13
|
-
const columnContribution: string;
|
|
14
|
-
}
|
|
15
|
-
import { Audit } from './audit.js';
|
|
16
|
-
//# sourceMappingURL=layout-shift-elements.d.ts.map
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright 2020 Google LLC
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import {Audit} from './audit.js';
|
|
7
|
-
import * as i18n from '../lib/i18n/i18n.js';
|
|
8
|
-
import {CumulativeLayoutShift as CumulativeLayoutShiftComputed} from '../computed/metrics/cumulative-layout-shift.js';
|
|
9
|
-
import CumulativeLayoutShift from './metrics/cumulative-layout-shift.js';
|
|
10
|
-
|
|
11
|
-
const UIStrings = {
|
|
12
|
-
/** Descriptive title of a diagnostic audit that provides the top elements affected by layout shifts. */
|
|
13
|
-
title: 'Avoid large layout shifts',
|
|
14
|
-
/** Description of a diagnostic audit that provides the top elements affected by layout shifts. "windowing" means the metric value is calculated using the subset of events in a small window of time during the run. "normalization" is a good substitute for "windowing". The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
15
|
-
description: 'These DOM elements were most affected by layout shifts. Some layout shifts may not be included in the CLS metric value due to [windowing](https://web.dev/articles/cls#what_is_cls). [Learn how to improve CLS](https://web.dev/articles/optimize-cls)',
|
|
16
|
-
/** Label for a column in a data table; entries in this column will be the amount that the corresponding element affected by layout shifts. */
|
|
17
|
-
columnContribution: 'Layout shift impact',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
21
|
-
|
|
22
|
-
class LayoutShiftElements extends Audit {
|
|
23
|
-
/**
|
|
24
|
-
* @return {LH.Audit.Meta}
|
|
25
|
-
*/
|
|
26
|
-
static get meta() {
|
|
27
|
-
return {
|
|
28
|
-
id: 'layout-shift-elements',
|
|
29
|
-
title: str_(UIStrings.title),
|
|
30
|
-
description: str_(UIStrings.description),
|
|
31
|
-
scoreDisplayMode: Audit.SCORING_MODES.METRIC_SAVINGS,
|
|
32
|
-
guidanceLevel: 2,
|
|
33
|
-
requiredArtifacts: ['traces', 'TraceElements'],
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @param {LH.Artifacts} artifacts
|
|
39
|
-
* @param {LH.Audit.Context} context
|
|
40
|
-
* @return {Promise<LH.Audit.Product>}
|
|
41
|
-
*/
|
|
42
|
-
static async audit(artifacts, context) {
|
|
43
|
-
const {cumulativeLayoutShift: clsSavings, impactByNodeId} =
|
|
44
|
-
await CumulativeLayoutShiftComputed.request(artifacts.traces[Audit.DEFAULT_PASS], context);
|
|
45
|
-
|
|
46
|
-
/** @type {Array<{node: LH.Audit.Details.ItemValue, score: number}>} */
|
|
47
|
-
const clsElementData = artifacts.TraceElements
|
|
48
|
-
.filter(element => element.traceEventType === 'layout-shift-element')
|
|
49
|
-
.map(element => ({
|
|
50
|
-
node: Audit.makeNodeItem(element.node),
|
|
51
|
-
score: impactByNodeId.get(element.nodeId) || 0,
|
|
52
|
-
}));
|
|
53
|
-
|
|
54
|
-
if (clsElementData.length < impactByNodeId.size) {
|
|
55
|
-
const displayedNodeImpact = clsElementData.reduce((sum, {score}) => sum += score, 0);
|
|
56
|
-
|
|
57
|
-
// This is not necessarily the same as CLS due to normalization.
|
|
58
|
-
const totalNodeImpact = Array.from(impactByNodeId.values())
|
|
59
|
-
.reduce((sum, score) => sum + score);
|
|
60
|
-
|
|
61
|
-
clsElementData.push({
|
|
62
|
-
node: {
|
|
63
|
-
type: 'code',
|
|
64
|
-
value: str_(i18n.UIStrings.otherResourceType),
|
|
65
|
-
},
|
|
66
|
-
score: totalNodeImpact - displayedNodeImpact,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** @type {LH.Audit.Details.Table['headings']} */
|
|
71
|
-
const headings = [
|
|
72
|
-
{key: 'node', valueType: 'node', label: str_(i18n.UIStrings.columnElement)},
|
|
73
|
-
{key: 'score', valueType: 'numeric',
|
|
74
|
-
granularity: 0.001, label: str_(UIStrings.columnContribution)},
|
|
75
|
-
];
|
|
76
|
-
|
|
77
|
-
const details = Audit.makeTableDetails(headings, clsElementData);
|
|
78
|
-
|
|
79
|
-
let displayValue;
|
|
80
|
-
if (impactByNodeId.size > 0) {
|
|
81
|
-
displayValue = str_(i18n.UIStrings.displayValueElementsFound,
|
|
82
|
-
{nodeCount: impactByNodeId.size});
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
const passed = clsSavings <= CumulativeLayoutShift.defaultOptions.p10;
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
score: passed ? 1 : 0,
|
|
89
|
-
scoreDisplayMode: passed ? Audit.SCORING_MODES.INFORMATIVE : undefined,
|
|
90
|
-
metricSavings: {
|
|
91
|
-
CLS: clsSavings,
|
|
92
|
-
},
|
|
93
|
-
notApplicable: details.items.length === 0,
|
|
94
|
-
displayValue,
|
|
95
|
-
details,
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export default LayoutShiftElements;
|
|
101
|
-
export {UIStrings};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default PWACrossBrowser;
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Manual PWA audit for cross browser support.
|
|
4
|
-
*/
|
|
5
|
-
declare class PWACrossBrowser extends ManualAudit {
|
|
6
|
-
}
|
|
7
|
-
export namespace UIStrings {
|
|
8
|
-
const title: string;
|
|
9
|
-
const description: string;
|
|
10
|
-
}
|
|
11
|
-
import ManualAudit from './manual-audit.js';
|
|
12
|
-
//# sourceMappingURL=pwa-cross-browser.d.ts.map
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2017 Google LLC
|
|
5
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import ManualAudit from './manual-audit.js';
|
|
9
|
-
import * as i18n from '../../lib/i18n/i18n.js';
|
|
10
|
-
|
|
11
|
-
const UIStrings = {
|
|
12
|
-
/** Title of a Lighthouse audit that prompts the user to manually check that their site works across different web browsers. */
|
|
13
|
-
title: 'Site works cross-browser',
|
|
14
|
-
/** Description of a Lighthouse audit that tells the user why they should make sites work across different browsers. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
15
|
-
description: 'To reach the most number of users, sites should work across ' +
|
|
16
|
-
'every major browser. [Learn about cross-browser compatibility](https://developer.chrome.com/docs/lighthouse/pwa/pwa-cross-browser/).',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* @fileoverview Manual PWA audit for cross browser support.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
class PWACrossBrowser extends ManualAudit {
|
|
26
|
-
/**
|
|
27
|
-
* @return {LH.Audit.Meta}
|
|
28
|
-
*/
|
|
29
|
-
static get meta() {
|
|
30
|
-
return Object.assign({
|
|
31
|
-
id: 'pwa-cross-browser',
|
|
32
|
-
title: str_(UIStrings.title),
|
|
33
|
-
description: str_(UIStrings.description),
|
|
34
|
-
}, super.partialMeta);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default PWACrossBrowser;
|
|
39
|
-
export {UIStrings};
|
|
40
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default PWAEachPageHasURL;
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Manual PWA audit to ensure every page has a deep link.
|
|
4
|
-
*/
|
|
5
|
-
declare class PWAEachPageHasURL extends ManualAudit {
|
|
6
|
-
}
|
|
7
|
-
export namespace UIStrings {
|
|
8
|
-
const title: string;
|
|
9
|
-
const description: string;
|
|
10
|
-
}
|
|
11
|
-
import ManualAudit from './manual-audit.js';
|
|
12
|
-
//# sourceMappingURL=pwa-each-page-has-url.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import ManualAudit from './manual-audit.js';
|
|
8
|
-
import * as i18n from '../../lib/i18n/i18n.js';
|
|
9
|
-
|
|
10
|
-
const UIStrings = {
|
|
11
|
-
/** Title of a Lighthouse audit that prompts the user to manually check that each page on their website uses a unique URL. */
|
|
12
|
-
title: 'Each page has a URL',
|
|
13
|
-
/** Description of a Lighthouse audit that tells the user why they should use unique URLs for each web page. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
14
|
-
description: 'Ensure individual pages are deep linkable via URL and that URLs are ' +
|
|
15
|
-
'unique for the purpose of shareability on social media. [Learn more about providing deep links](https://developer.chrome.com/docs/lighthouse/pwa/pwa-each-page-has-url/).',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @fileoverview Manual PWA audit to ensure every page has a deep link.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
class PWAEachPageHasURL extends ManualAudit {
|
|
25
|
-
/**
|
|
26
|
-
* @return {LH.Audit.Meta}
|
|
27
|
-
*/
|
|
28
|
-
static get meta() {
|
|
29
|
-
return Object.assign({
|
|
30
|
-
id: 'pwa-each-page-has-url',
|
|
31
|
-
title: str_(UIStrings.title),
|
|
32
|
-
description: str_(UIStrings.description),
|
|
33
|
-
}, super.partialMeta);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default PWAEachPageHasURL;
|
|
38
|
-
export {UIStrings};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export default PWAPageTransitions;
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview Manual PWA audit for janky-free page transitions.
|
|
4
|
-
*/
|
|
5
|
-
declare class PWAPageTransitions extends ManualAudit {
|
|
6
|
-
}
|
|
7
|
-
export namespace UIStrings {
|
|
8
|
-
const title: string;
|
|
9
|
-
const description: string;
|
|
10
|
-
}
|
|
11
|
-
import ManualAudit from './manual-audit.js';
|
|
12
|
-
//# sourceMappingURL=pwa-page-transitions.d.ts.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import ManualAudit from './manual-audit.js';
|
|
8
|
-
import * as i18n from '../../lib/i18n/i18n.js';
|
|
9
|
-
|
|
10
|
-
const UIStrings = {
|
|
11
|
-
/** Title of a Lighthouse audit that prompts the user to manually check that page transitions (navigating to other pages on a website) shouldn't feel like they are waiting for the network to load. */
|
|
12
|
-
title: 'Page transitions don\'t feel like they block on the network',
|
|
13
|
-
/** Description of a Lighthouse audit that tells the user why they should make transitions in their web app feel fast. This is displayed after a user expands the section to see more. No character length limits. The last sentence starting with 'Learn' becomes link text to additional documentation. */
|
|
14
|
-
description: 'Transitions should feel snappy as you tap around, even on a slow network. ' +
|
|
15
|
-
'This experience is key to a user\'s perception of performance. [Learn more about page transitions](https://developer.chrome.com/docs/lighthouse/pwa/pwa-page-transitions/).',
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
const str_ = i18n.createIcuMessageFn(import.meta.url, UIStrings);
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @fileoverview Manual PWA audit for janky-free page transitions.
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
class PWAPageTransitions extends ManualAudit {
|
|
25
|
-
/**
|
|
26
|
-
* @return {LH.Audit.Meta}
|
|
27
|
-
*/
|
|
28
|
-
static get meta() {
|
|
29
|
-
return Object.assign({
|
|
30
|
-
id: 'pwa-page-transitions',
|
|
31
|
-
title: str_(UIStrings.title),
|
|
32
|
-
description: str_(UIStrings.description),
|
|
33
|
-
}, super.partialMeta);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export default PWAPageTransitions;
|
|
38
|
-
export {UIStrings};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export default MaskableIcon;
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview
|
|
4
|
-
* Audits if a manifest contains at least one icon that is maskable
|
|
5
|
-
*
|
|
6
|
-
* Requirements:
|
|
7
|
-
* * manifest is not empty
|
|
8
|
-
* * manifest has valid icons
|
|
9
|
-
* * at least one of the icons has a purpose of 'maskable'
|
|
10
|
-
*/
|
|
11
|
-
declare class MaskableIcon extends Audit {
|
|
12
|
-
/**
|
|
13
|
-
* @param {LH.Artifacts} artifacts
|
|
14
|
-
* @param {LH.Audit.Context} context
|
|
15
|
-
* @return {Promise<LH.Audit.Product>}
|
|
16
|
-
*/
|
|
17
|
-
static audit(artifacts: LH.Artifacts, context: LH.Audit.Context): Promise<LH.Audit.Product>;
|
|
18
|
-
}
|
|
19
|
-
export namespace UIStrings {
|
|
20
|
-
const title: string;
|
|
21
|
-
const failureTitle: string;
|
|
22
|
-
const description: string;
|
|
23
|
-
}
|
|
24
|
-
import { Audit } from './audit.js';
|
|
25
|
-
//# sourceMappingURL=maskable-icon.d.ts.map
|