lighthouse 9.5.0-dev.20230131 → 9.5.0-dev.20230202
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/audits/dobetterweb/{password-inputs-can-be-pasted-into.d.ts → paste-preventing-inputs.d.ts} +3 -3
- package/core/audits/dobetterweb/{password-inputs-can-be-pasted-into.js → paste-preventing-inputs.js} +17 -15
- package/core/config/default-config.js +2 -4
- package/core/gather/driver/prepare.d.ts +6 -0
- package/core/gather/driver/prepare.js +26 -12
- package/core/gather/gatherers/bf-cache-failures.js +4 -1
- package/core/gather/gatherers/inputs.js +6 -0
- package/core/gather/navigation-runner.js +10 -0
- package/core/gather/timespan-runner.js +10 -1
- package/core/legacy/config/legacy-default-config.js +0 -1
- package/core/legacy/gather/driver.d.ts +4 -3
- package/core/legacy/gather/driver.js +6 -3
- package/core/legacy/gather/gather-runner.js +1 -1
- package/core/runner.d.ts +1 -6
- package/core/runner.js +9 -20
- package/dist/report/bundle.esm.js +7 -9
- package/dist/report/flow.js +2 -2
- package/dist/report/standalone.js +2 -2
- package/package.json +1 -1
- package/report/renderer/report-ui-features.js +1 -1
- package/report/renderer/report-utils.d.ts +2 -2
- package/report/renderer/report-utils.js +6 -8
- package/report/test/renderer/report-ui-features-test.js +20 -31
- package/shared/localization/locales/ar-XB.json +0 -9
- package/shared/localization/locales/ar.json +0 -9
- package/shared/localization/locales/bg.json +0 -9
- package/shared/localization/locales/ca.json +0 -9
- package/shared/localization/locales/cs.json +0 -9
- package/shared/localization/locales/da.json +0 -9
- package/shared/localization/locales/de.json +0 -9
- package/shared/localization/locales/el.json +0 -9
- package/shared/localization/locales/en-GB.json +0 -9
- package/shared/localization/locales/en-US.json +6 -6
- package/shared/localization/locales/en-XA.json +0 -9
- package/shared/localization/locales/en-XL.json +6 -6
- package/shared/localization/locales/es-419.json +0 -9
- package/shared/localization/locales/es.json +0 -9
- package/shared/localization/locales/fi.json +0 -9
- package/shared/localization/locales/fil.json +0 -9
- package/shared/localization/locales/fr.json +0 -9
- package/shared/localization/locales/he.json +0 -9
- package/shared/localization/locales/hi.json +0 -9
- package/shared/localization/locales/hr.json +0 -9
- package/shared/localization/locales/hu.json +0 -9
- package/shared/localization/locales/id.json +0 -9
- package/shared/localization/locales/it.json +0 -9
- package/shared/localization/locales/ja.json +0 -9
- package/shared/localization/locales/ko.json +0 -9
- package/shared/localization/locales/lt.json +0 -9
- package/shared/localization/locales/lv.json +0 -9
- package/shared/localization/locales/nl.json +0 -9
- package/shared/localization/locales/no.json +0 -9
- package/shared/localization/locales/pl.json +0 -9
- package/shared/localization/locales/pt-PT.json +0 -9
- package/shared/localization/locales/pt.json +0 -9
- package/shared/localization/locales/ro.json +0 -9
- package/shared/localization/locales/ru.json +0 -9
- package/shared/localization/locales/sk.json +0 -9
- package/shared/localization/locales/sl.json +0 -9
- package/shared/localization/locales/sr-Latn.json +0 -9
- package/shared/localization/locales/sr.json +0 -9
- package/shared/localization/locales/sv.json +0 -9
- package/shared/localization/locales/ta.json +0 -9
- package/shared/localization/locales/te.json +0 -9
- package/shared/localization/locales/th.json +0 -9
- package/shared/localization/locales/tr.json +0 -9
- package/shared/localization/locales/uk.json +0 -9
- package/shared/localization/locales/vi.json +0 -9
- package/shared/localization/locales/zh-HK.json +0 -9
- package/shared/localization/locales/zh-TW.json +0 -9
- package/shared/localization/locales/zh.json +0 -9
- package/tsconfig.json +0 -1
- package/types/artifacts.d.ts +2 -5
- package/types/lhr/lhr.d.ts +3 -11
- package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.d.ts +0 -10
- package/core/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste.js +0 -49
|
@@ -863,15 +863,6 @@
|
|
|
863
863
|
"core/audits/dobetterweb/notification-on-start.js | title": {
|
|
864
864
|
"message": "避免在載入網頁時要求使用者允許網站顯示通知"
|
|
865
865
|
},
|
|
866
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | description": {
|
|
867
|
-
"message": "禁止貼上密碼會對安全政策造成不良影響。[瞭解詳情](https://web.dev/password-inputs-can-be-pasted-into/)。"
|
|
868
|
-
},
|
|
869
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | failureTitle": {
|
|
870
|
-
"message": "禁止使用者貼到密碼欄位"
|
|
871
|
-
},
|
|
872
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | title": {
|
|
873
|
-
"message": "允許使用者貼到密碼欄位"
|
|
874
|
-
},
|
|
875
866
|
"core/audits/dobetterweb/uses-http2.js | columnProtocol": {
|
|
876
867
|
"message": "通訊協定"
|
|
877
868
|
},
|
|
@@ -863,15 +863,6 @@
|
|
|
863
863
|
"core/audits/dobetterweb/notification-on-start.js | title": {
|
|
864
864
|
"message": "避免在載入網頁時要求使用者允許網站顯示通知"
|
|
865
865
|
},
|
|
866
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | description": {
|
|
867
|
-
"message": "禁止貼上密碼會對安全性政策造成不良影響[瞭解詳情](https://web.dev/password-inputs-can-be-pasted-into/)。"
|
|
868
|
-
},
|
|
869
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | failureTitle": {
|
|
870
|
-
"message": "禁止使用者貼到密碼欄位"
|
|
871
|
-
},
|
|
872
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | title": {
|
|
873
|
-
"message": "允許使用者貼到密碼欄位"
|
|
874
|
-
},
|
|
875
866
|
"core/audits/dobetterweb/uses-http2.js | columnProtocol": {
|
|
876
867
|
"message": "通訊協定"
|
|
877
868
|
},
|
|
@@ -863,15 +863,6 @@
|
|
|
863
863
|
"core/audits/dobetterweb/notification-on-start.js | title": {
|
|
864
864
|
"message": "避免在网页加载时请求通知权限"
|
|
865
865
|
},
|
|
866
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | description": {
|
|
867
|
-
"message": "阻止密码粘贴,会破坏良好的安全政策。[了解详情](https://web.dev/password-inputs-can-be-pasted-into/)。"
|
|
868
|
-
},
|
|
869
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | failureTitle": {
|
|
870
|
-
"message": "不允许用户粘贴内容到密码字段"
|
|
871
|
-
},
|
|
872
|
-
"core/audits/dobetterweb/password-inputs-can-be-pasted-into.js | title": {
|
|
873
|
-
"message": "允许用户粘贴内容到密码字段"
|
|
874
|
-
},
|
|
875
866
|
"core/audits/dobetterweb/uses-http2.js | columnProtocol": {
|
|
876
867
|
"message": "协议"
|
|
877
868
|
},
|
package/tsconfig.json
CHANGED
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"core/test/gather/gatherers/console-messages-test.js",
|
|
49
49
|
"core/test/gather/gatherers/devtools-log-test.js",
|
|
50
50
|
"core/test/gather/gatherers/dobetterweb/optimized-images-test.js",
|
|
51
|
-
"core/test/gather/gatherers/dobetterweb/password-inputs-with-prevented-paste-test.js",
|
|
52
51
|
"core/test/gather/gatherers/dobetterweb/response-compression-test.js",
|
|
53
52
|
"core/test/gather/gatherers/dobetterweb/tags-blocking-first-paint-test.js",
|
|
54
53
|
"core/test/gather/gatherers/full-page-screenshot-test.js",
|
package/types/artifacts.d.ts
CHANGED
|
@@ -159,8 +159,6 @@ export interface GathererArtifacts extends PublicGathererArtifacts,LegacyBaseArt
|
|
|
159
159
|
MixedContent: {url: string};
|
|
160
160
|
/** Size and compression opportunity information for all the images in the page. */
|
|
161
161
|
OptimizedImages: Array<Artifacts.OptimizedImage | Artifacts.OptimizedImageError>;
|
|
162
|
-
/** HTML snippets and node paths from any password inputs that prevent pasting. */
|
|
163
|
-
PasswordInputsWithPreventedPaste: Artifacts.PasswordInputsWithPreventedPaste[];
|
|
164
162
|
/** Size info of all network records sent without compression and their size after gzipping. */
|
|
165
163
|
ResponseCompression: {requestId: string, url: string, mimeType: string, transferSize: number, resourceSize: number, gzipSize?: number}[];
|
|
166
164
|
/** Information on fetching and the content of the /robots.txt file. */
|
|
@@ -312,8 +310,6 @@ declare module Artifacts {
|
|
|
312
310
|
node: NodeDetails | null
|
|
313
311
|
}
|
|
314
312
|
|
|
315
|
-
interface PasswordInputsWithPreventedPaste {node: NodeDetails}
|
|
316
|
-
|
|
317
313
|
interface Script extends Omit<Crdp.Debugger.ScriptParsedEvent, 'url'|'embedderName'> {
|
|
318
314
|
/**
|
|
319
315
|
* Set by a sourceURL= magic comment if present, otherwise this is the same as the URL.
|
|
@@ -851,7 +847,8 @@ declare module Artifacts {
|
|
|
851
847
|
property: string;
|
|
852
848
|
attribute: string | null;
|
|
853
849
|
prediction: string | null;
|
|
854
|
-
}
|
|
850
|
+
};
|
|
851
|
+
preventsPaste?: boolean;
|
|
855
852
|
node: NodeDetails;
|
|
856
853
|
}
|
|
857
854
|
|
package/types/lhr/lhr.d.ts
CHANGED
|
@@ -155,18 +155,8 @@ declare module Result {
|
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Entity classification for the run, for resolving URLs/items to entities in report.
|
|
158
|
-
* The two lookup tables (LUT) below provide space-optimized, O(1) index lookup into entities.list.
|
|
159
158
|
*/
|
|
160
|
-
interface Entities {
|
|
161
|
-
/** All entities (1st and 3rd party) discovered during the run */
|
|
162
|
-
list: Array<LhrEntity>;
|
|
163
|
-
/** Name of the first-party entity */
|
|
164
|
-
firstParty?: string;
|
|
165
|
-
/** Entity-name to entity index lookup table */
|
|
166
|
-
entityIndexByName: Record<string, number>;
|
|
167
|
-
/** URL origin to entity index lookup table */
|
|
168
|
-
entityIndexByOrigin: Record<string, number>;
|
|
169
|
-
}
|
|
159
|
+
interface Entities extends Array<LhrEntity> {}
|
|
170
160
|
|
|
171
161
|
/**
|
|
172
162
|
* An entity that's either recognized by third-party-web or made up by Lighthouse.
|
|
@@ -182,6 +172,8 @@ declare module Result {
|
|
|
182
172
|
isFirstParty?: boolean;
|
|
183
173
|
/** Is this entity recognized by third-party-web? */
|
|
184
174
|
isUnrecognized?: boolean;
|
|
175
|
+
/** List of origin strings that belong to this entity found in network records. */
|
|
176
|
+
origins: Array<string>;
|
|
185
177
|
}
|
|
186
178
|
|
|
187
179
|
/**
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default PasswordInputsWithPreventedPaste;
|
|
2
|
-
declare class PasswordInputsWithPreventedPaste extends FRGatherer {
|
|
3
|
-
/**
|
|
4
|
-
* @param {LH.Gatherer.FRTransitionalContext} passContext
|
|
5
|
-
* @return {Promise<LH.Artifacts['PasswordInputsWithPreventedPaste']>}
|
|
6
|
-
*/
|
|
7
|
-
getArtifact(passContext: LH.Gatherer.FRTransitionalContext): Promise<LH.Artifacts['PasswordInputsWithPreventedPaste']>;
|
|
8
|
-
}
|
|
9
|
-
import FRGatherer from "../../base-gatherer.js";
|
|
10
|
-
//# sourceMappingURL=password-inputs-with-prevented-paste.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Copyright 2017 The Lighthouse Authors. All Rights Reserved.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/* global document ClipboardEvent getNodeDetails */
|
|
8
|
-
|
|
9
|
-
import FRGatherer from '../../base-gatherer.js';
|
|
10
|
-
import {pageFunctions} from '../../../lib/page-functions.js';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @return {LH.Artifacts['PasswordInputsWithPreventedPaste']}
|
|
14
|
-
*/
|
|
15
|
-
/* c8 ignore start */
|
|
16
|
-
function findPasswordInputsWithPreventedPaste() {
|
|
17
|
-
return Array.from(document.querySelectorAll('input[type="password"]'))
|
|
18
|
-
.filter(passwordInput =>
|
|
19
|
-
!passwordInput.dispatchEvent(
|
|
20
|
-
new ClipboardEvent('paste', {cancelable: true})
|
|
21
|
-
)
|
|
22
|
-
)
|
|
23
|
-
.map(passwordInput => ({
|
|
24
|
-
// @ts-expect-error - getNodeDetails put into scope via stringification
|
|
25
|
-
node: getNodeDetails(passwordInput),
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
/* c8 ignore stop */
|
|
29
|
-
|
|
30
|
-
class PasswordInputsWithPreventedPaste extends FRGatherer {
|
|
31
|
-
/** @type {LH.Gatherer.GathererMeta} */
|
|
32
|
-
meta = {
|
|
33
|
-
supportedModes: ['snapshot', 'navigation'],
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {LH.Gatherer.FRTransitionalContext} passContext
|
|
38
|
-
* @return {Promise<LH.Artifacts['PasswordInputsWithPreventedPaste']>}
|
|
39
|
-
*/
|
|
40
|
-
getArtifact(passContext) {
|
|
41
|
-
return passContext.driver.executionContext.evaluate(findPasswordInputsWithPreventedPaste, {
|
|
42
|
-
args: [],
|
|
43
|
-
deps: [pageFunctions.getNodeDetails],
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
export default PasswordInputsWithPreventedPaste;
|