chrome-devtools-mcp 0.10.2 → 0.11.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/README.md +67 -9
- package/build/node_modules/chrome-devtools-frontend/front_end/core/common/common.js +1 -3
- package/build/node_modules/chrome-devtools-frontend/front_end/core/host/AidaClient.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHost.js +31 -449
- package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostStub.js +430 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/host/ResourceLoader.js +10 -22
- package/build/node_modules/chrome-devtools-frontend/front_end/core/host/UserMetrics.js +2 -5
- package/build/node_modules/chrome-devtools-frontend/front_end/core/i18n/collect-ui-strings.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/i18n/generate-locales-js.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/HostRuntime.js +19 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/StringUtilities.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/api/HostRuntime.js +4 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/api/api.js +5 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/{common/Worker.js → platform/browser/HostRuntime.js} +18 -7
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/browser/browser.js +5 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/node/HostRuntime.js +72 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/node/node.js +5 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/platform.js +2 -2
- package/build/node_modules/chrome-devtools-frontend/front_end/core/root/DevToolsContext.js +4 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/root/Runtime.js +7 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AnimationModel.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMatchedStyles.js +2 -2
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMetadata.js +17 -5
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSModel.js +3 -3
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSProperty.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSPropertyParserMatchers.js +10 -10
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ConsoleModel.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Cookie.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DOMModel.js +5 -2
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DebuggerModel.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkManager.js +46 -34
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkRequest.js +3 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PageResourceLoader.js +43 -33
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PreloadingModel.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RemoteObject.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ResourceTreeModel.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Script.js +26 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMap.js +4 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapCache.js +16 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapManager.js +11 -5
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapScopesInfo.js +129 -20
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Target.js +4 -13
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/TargetManager.js +35 -4
- package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/sdk-meta.js +72 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/foundation/Universe.js +5 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/generated/Deprecation.js +48 -4
- package/build/node_modules/chrome-devtools-frontend/front_end/generated/InspectorBackendCommands.js +45 -42
- package/build/node_modules/chrome-devtools-frontend/front_end/generated/SupportedCSSProperties.js +56 -77
- package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.js +21 -6
- package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AICallTree.js +9 -3
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CSSWorkspaceBinding.js +4 -3
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CompilerScriptMapping.js +34 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DebuggerWorkspaceBinding.js +15 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceMapping.js +59 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceScriptMapping.js +38 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/SASSSourceMapping.js +5 -4
- package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/CPUProfileDataModel.js +9 -7
- package/build/node_modules/chrome-devtools-frontend/front_end/models/crux-manager/CrUXManager.js +5 -3
- package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/FormatterWorkerPool.js +2 -2
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/AttributionReportingIssue.js +5 -6
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/BounceTrackingIssue.js +3 -11
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/ClientHintIssue.js +4 -9
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/ContentSecurityPolicyIssue.js +4 -9
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/ContrastCheckTrigger.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CookieDeprecationMetadataIssue.js +5 -11
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CookieIssue.js +26 -25
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CorsIssue.js +7 -14
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.js +4 -6
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/DeprecationIssue.js +6 -11
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/ElementAccessibilityIssue.js +6 -11
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/FederatedAuthRequestIssue.js +3 -8
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.js +3 -8
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/GenericIssue.js +36 -21
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/HeavyAdIssue.js +3 -8
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/Issue.js +6 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/IssueAggregator.js +6 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/LowTextContrastIssue.js +2 -7
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/MixedContentIssue.js +6 -10
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/PartitioningBlobURLIssue.js +3 -8
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/PropertyRuleIssue.js +5 -10
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/QuirksModeIssue.js +2 -7
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/SRIMessageSignatureIssue.js +6 -10
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/SharedArrayBufferIssue.js +3 -8
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/SharedDictionaryIssue.js +5 -10
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/StylesheetLoadingIssue.js +7 -11
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/UnencodedDigestIssue.js +1 -6
- package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/FunctionCodeResolver.js +192 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/source_map_scopes.js +2 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/SamplesHandler.js +3 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Trace.js +10 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/trace_source_maps_resolver/SourceMapsResolver.js +23 -0
- package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/IgnoreListManager.js +1 -1
- package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/UISourceCode.js +38 -0
- package/build/node_modules/chrome-devtools-frontend/mcp/HostBindings.js +222 -0
- package/build/node_modules/chrome-devtools-frontend/mcp/mcp.js +15 -1
- package/build/src/DevToolsConnectionAdapter.js +56 -19
- package/build/src/DevtoolsUtils.js +143 -1
- package/build/src/McpContext.js +33 -11
- package/build/src/McpResponse.js +18 -26
- package/build/src/PageCollector.js +4 -11
- package/build/src/browser.js +4 -0
- package/build/src/cli.js +11 -3
- package/build/src/formatters/consoleFormatter.js +81 -3
- package/build/src/formatters/snapshotFormatter.js +18 -4
- package/build/src/issue-descriptions.js +4 -0
- package/build/src/main.js +20 -49
- package/build/src/third_party/THIRD_PARTY_NOTICES +1973 -27
- package/build/src/third_party/index.js +58356 -18839
- package/build/src/tools/console.js +0 -4
- package/build/src/tools/emulation.js +29 -6
- package/build/src/tools/screenshot.js +4 -2
- package/build/src/tools/snapshot.js +1 -1
- package/build/src/tools/tools.js +29 -0
- package/build/src/utils/keyboard.js +5 -0
- package/package.json +7 -7
- package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Linkifier.js +0 -34
- package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DOMUtilities.js +0 -122
- package/build/src/features.js +0 -14
- /package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/descriptions/{genericFormAriaLabelledByToNonExistingId.md → genericFormAriaLabelledByToNonExistingIdError.md} +0 -0
- /package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/descriptions/{genericFormLabelHasNeitherForNorNestedInput.md → genericFormLabelHasNeitherForNorNestedInputError.md} +0 -0
|
@@ -55,10 +55,8 @@ const structuredHeaderLink = {
|
|
|
55
55
|
linkTitle: 'Structured Headers RFC',
|
|
56
56
|
};
|
|
57
57
|
export class AttributionReportingIssue extends Issue {
|
|
58
|
-
issueDetails;
|
|
59
58
|
constructor(issueDetails, issuesModel) {
|
|
60
|
-
super(getIssueCode(issueDetails), issuesModel);
|
|
61
|
-
this.issueDetails = issueDetails;
|
|
59
|
+
super(getIssueCode(issueDetails), issueDetails, issuesModel);
|
|
62
60
|
}
|
|
63
61
|
getCategory() {
|
|
64
62
|
return "AttributionReporting" /* IssueCategory.ATTRIBUTION_REPORTING */;
|
|
@@ -66,8 +64,9 @@ export class AttributionReportingIssue extends Issue {
|
|
|
66
64
|
getHeaderValidatorLink(name) {
|
|
67
65
|
const url = new URL('https://wicg.github.io/attribution-reporting-api/validate-headers');
|
|
68
66
|
url.searchParams.set('header', name);
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
const details = this.details();
|
|
68
|
+
if (details.invalidParameter) {
|
|
69
|
+
url.searchParams.set('json', details.invalidParameter);
|
|
71
70
|
}
|
|
72
71
|
return {
|
|
73
72
|
link: url.toString(),
|
|
@@ -186,7 +185,7 @@ export class AttributionReportingIssue extends Issue {
|
|
|
186
185
|
}
|
|
187
186
|
}
|
|
188
187
|
primaryKey() {
|
|
189
|
-
return JSON.stringify(this.
|
|
188
|
+
return JSON.stringify(this.details());
|
|
190
189
|
}
|
|
191
190
|
getKind() {
|
|
192
191
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|
|
@@ -12,10 +12,8 @@ const UIStrings = {
|
|
|
12
12
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/BounceTrackingIssue.ts', UIStrings);
|
|
13
13
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
14
14
|
export class BounceTrackingIssue extends Issue {
|
|
15
|
-
#issueDetails;
|
|
16
15
|
constructor(issueDetails, issuesModel) {
|
|
17
|
-
super("BounceTrackingIssue" /* Protocol.Audits.InspectorIssueCode.BounceTrackingIssue */, issuesModel);
|
|
18
|
-
this.#issueDetails = issueDetails;
|
|
16
|
+
super("BounceTrackingIssue" /* Protocol.Audits.InspectorIssueCode.BounceTrackingIssue */, issueDetails, issuesModel);
|
|
19
17
|
}
|
|
20
18
|
getCategory() {
|
|
21
19
|
return "Other" /* IssueCategory.OTHER */;
|
|
@@ -31,20 +29,14 @@ export class BounceTrackingIssue extends Issue {
|
|
|
31
29
|
],
|
|
32
30
|
};
|
|
33
31
|
}
|
|
34
|
-
details() {
|
|
35
|
-
return this.#issueDetails;
|
|
36
|
-
}
|
|
37
32
|
getKind() {
|
|
38
33
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
39
34
|
}
|
|
40
35
|
primaryKey() {
|
|
41
|
-
return JSON.stringify(this
|
|
36
|
+
return JSON.stringify(this.details());
|
|
42
37
|
}
|
|
43
38
|
trackingSites() {
|
|
44
|
-
|
|
45
|
-
return this.#issueDetails.trackingSites;
|
|
46
|
-
}
|
|
47
|
-
return [];
|
|
39
|
+
return this.details().trackingSites;
|
|
48
40
|
}
|
|
49
41
|
static fromInspectorIssue(issuesModel, inspectorIssue) {
|
|
50
42
|
const details = inspectorIssue.details.bounceTrackingIssueDetails;
|
|
@@ -13,32 +13,27 @@ const UIStrings = {
|
|
|
13
13
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ClientHintIssue.ts', UIStrings);
|
|
14
14
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
15
15
|
export class ClientHintIssue extends Issue {
|
|
16
|
-
issueDetails;
|
|
17
16
|
constructor(issueDetails, issuesModel) {
|
|
18
17
|
super({
|
|
19
18
|
code: "ClientHintIssue" /* Protocol.Audits.InspectorIssueCode.ClientHintIssue */,
|
|
20
19
|
umaCode: ["ClientHintIssue" /* Protocol.Audits.InspectorIssueCode.ClientHintIssue */, issueDetails.clientHintIssueReason].join('::'),
|
|
21
|
-
}, issuesModel);
|
|
22
|
-
this.issueDetails = issueDetails;
|
|
20
|
+
}, issueDetails, issuesModel);
|
|
23
21
|
}
|
|
24
22
|
getCategory() {
|
|
25
23
|
return "Other" /* IssueCategory.OTHER */;
|
|
26
24
|
}
|
|
27
|
-
details() {
|
|
28
|
-
return this.issueDetails;
|
|
29
|
-
}
|
|
30
25
|
getDescription() {
|
|
31
|
-
const description = issueDescriptions.get(this.
|
|
26
|
+
const description = issueDescriptions.get(this.details().clientHintIssueReason);
|
|
32
27
|
if (!description) {
|
|
33
28
|
return null;
|
|
34
29
|
}
|
|
35
30
|
return resolveLazyDescription(description);
|
|
36
31
|
}
|
|
37
32
|
sources() {
|
|
38
|
-
return [this.
|
|
33
|
+
return [this.details().sourceCodeLocation];
|
|
39
34
|
}
|
|
40
35
|
primaryKey() {
|
|
41
|
-
return JSON.stringify(this.
|
|
36
|
+
return JSON.stringify(this.details());
|
|
42
37
|
}
|
|
43
38
|
getKind() {
|
|
44
39
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
@@ -29,20 +29,18 @@ const UIStrings = {
|
|
|
29
29
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/ContentSecurityPolicyIssue.ts', UIStrings);
|
|
30
30
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
31
31
|
export class ContentSecurityPolicyIssue extends Issue {
|
|
32
|
-
#issueDetails;
|
|
33
32
|
constructor(issueDetails, issuesModel, issueId) {
|
|
34
33
|
const issueCode = [
|
|
35
34
|
"ContentSecurityPolicyIssue" /* Protocol.Audits.InspectorIssueCode.ContentSecurityPolicyIssue */,
|
|
36
35
|
issueDetails.contentSecurityPolicyViolationType,
|
|
37
36
|
].join('::');
|
|
38
|
-
super(issueCode, issuesModel, issueId);
|
|
39
|
-
this.#issueDetails = issueDetails;
|
|
37
|
+
super(issueCode, issueDetails, issuesModel, issueId);
|
|
40
38
|
}
|
|
41
39
|
getCategory() {
|
|
42
40
|
return "ContentSecurityPolicy" /* IssueCategory.CONTENT_SECURITY_POLICY */;
|
|
43
41
|
}
|
|
44
42
|
primaryKey() {
|
|
45
|
-
return JSON.stringify(this
|
|
43
|
+
return JSON.stringify(this.details(), [
|
|
46
44
|
'blockedURL',
|
|
47
45
|
'contentSecurityPolicyViolationType',
|
|
48
46
|
'violatedDirective',
|
|
@@ -55,17 +53,14 @@ export class ContentSecurityPolicyIssue extends Issue {
|
|
|
55
53
|
]);
|
|
56
54
|
}
|
|
57
55
|
getDescription() {
|
|
58
|
-
const description = issueDescriptions.get(this
|
|
56
|
+
const description = issueDescriptions.get(this.details().contentSecurityPolicyViolationType);
|
|
59
57
|
if (!description) {
|
|
60
58
|
return null;
|
|
61
59
|
}
|
|
62
60
|
return resolveLazyDescription(description);
|
|
63
61
|
}
|
|
64
|
-
details() {
|
|
65
|
-
return this.#issueDetails;
|
|
66
|
-
}
|
|
67
62
|
getKind() {
|
|
68
|
-
if (this
|
|
63
|
+
if (this.details().isReportOnly) {
|
|
69
64
|
return "Improvement" /* IssueKind.IMPROVEMENT */;
|
|
70
65
|
}
|
|
71
66
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|
|
@@ -52,7 +52,7 @@ export class ContrastCheckTrigger {
|
|
|
52
52
|
// If the target document finished loading, check the contrast immediately.
|
|
53
53
|
// Otherwise, it should be triggered when the page load event fires.
|
|
54
54
|
const response = await frame.resourceTreeModel().target().runtimeAgent().invoke_evaluate({ expression: 'document.readyState', returnByValue: true });
|
|
55
|
-
if (response.result
|
|
55
|
+
if (response.result?.value === 'complete') {
|
|
56
56
|
this.#checkContrast(frame.resourceTreeModel());
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -13,22 +13,19 @@ const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieDeprecatio
|
|
|
13
13
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
14
14
|
/** TODO(b/305738703): Move this issue into a warning on CookieIssue. **/
|
|
15
15
|
export class CookieDeprecationMetadataIssue extends Issue {
|
|
16
|
-
#issueDetails;
|
|
17
16
|
constructor(issueDetails, issuesModel) {
|
|
18
17
|
// Set a distinct code for ReadCookie and SetCookie issues, so they are grouped separately.
|
|
19
18
|
const issueCode = "CookieDeprecationMetadataIssue" /* Protocol.Audits.InspectorIssueCode.CookieDeprecationMetadataIssue */ + '_' + issueDetails.operation;
|
|
20
|
-
super(issueCode, issuesModel);
|
|
21
|
-
this.#issueDetails = issueDetails;
|
|
19
|
+
super(issueCode, issueDetails, issuesModel);
|
|
22
20
|
}
|
|
23
21
|
getCategory() {
|
|
24
22
|
return "Other" /* IssueCategory.OTHER */;
|
|
25
23
|
}
|
|
26
24
|
getDescription() {
|
|
27
|
-
const fileName = this
|
|
28
|
-
'cookieWarnMetadataGrantRead.md';
|
|
25
|
+
const fileName = this.details().operation === 'SetCookie' ? 'cookieWarnMetadataGrantSet.md' : 'cookieWarnMetadataGrantRead.md';
|
|
29
26
|
let optOutText = '';
|
|
30
|
-
if (this
|
|
31
|
-
optOutText = '\n\n (Top level site opt-out: ' + this
|
|
27
|
+
if (this.details().isOptOutTopLevel) {
|
|
28
|
+
optOutText = '\n\n (Top level site opt-out: ' + this.details().optOutPercentage +
|
|
32
29
|
'% - [learn more](gracePeriodStagedControlExplainer))';
|
|
33
30
|
}
|
|
34
31
|
return {
|
|
@@ -44,14 +41,11 @@ export class CookieDeprecationMetadataIssue extends Issue {
|
|
|
44
41
|
],
|
|
45
42
|
};
|
|
46
43
|
}
|
|
47
|
-
details() {
|
|
48
|
-
return this.#issueDetails;
|
|
49
|
-
}
|
|
50
44
|
getKind() {
|
|
51
45
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
52
46
|
}
|
|
53
47
|
primaryKey() {
|
|
54
|
-
return JSON.stringify(this
|
|
48
|
+
return JSON.stringify(this.details());
|
|
55
49
|
}
|
|
56
50
|
static fromInspectorIssue(issuesModel, inspectorIssue) {
|
|
57
51
|
const details = inspectorIssue.details.cookieDeprecationMetadataIssueDetails;
|
package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CookieIssue.js
CHANGED
|
@@ -32,21 +32,18 @@ const UIStrings = {
|
|
|
32
32
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/CookieIssue.ts', UIStrings);
|
|
33
33
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
34
34
|
export class CookieIssue extends Issue {
|
|
35
|
-
#issueDetails;
|
|
36
|
-
constructor(code, issueDetails, issuesModel, issueId) {
|
|
37
|
-
super(code, issuesModel, issueId);
|
|
38
|
-
this.#issueDetails = issueDetails;
|
|
39
|
-
}
|
|
40
35
|
cookieId() {
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
const details = this.details();
|
|
37
|
+
if (details.cookie) {
|
|
38
|
+
const { domain, path, name } = details.cookie;
|
|
43
39
|
const cookieId = `${domain};${path};${name}`;
|
|
44
40
|
return cookieId;
|
|
45
41
|
}
|
|
46
|
-
return this
|
|
42
|
+
return this.details().rawCookieLine ?? 'no-cookie-info';
|
|
47
43
|
}
|
|
48
44
|
primaryKey() {
|
|
49
|
-
const
|
|
45
|
+
const details = this.details();
|
|
46
|
+
const requestId = details.request ? details.request.requestId : 'no-request';
|
|
50
47
|
return `${this.code()}-(${this.cookieId()})-(${requestId})`;
|
|
51
48
|
}
|
|
52
49
|
/**
|
|
@@ -145,20 +142,23 @@ export class CookieIssue extends Issue {
|
|
|
145
142
|
return ["CookieIssue" /* Protocol.Audits.InspectorIssueCode.CookieIssue */, reason, operation].join('::');
|
|
146
143
|
}
|
|
147
144
|
cookies() {
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
const details = this.details();
|
|
146
|
+
if (details.cookie) {
|
|
147
|
+
return [details.cookie];
|
|
150
148
|
}
|
|
151
149
|
return [];
|
|
152
150
|
}
|
|
153
151
|
rawCookieLines() {
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
const details = this.details();
|
|
153
|
+
if (details.rawCookieLine) {
|
|
154
|
+
return [details.rawCookieLine];
|
|
156
155
|
}
|
|
157
156
|
return [];
|
|
158
157
|
}
|
|
159
158
|
requests() {
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
const details = this.details();
|
|
160
|
+
if (details.request) {
|
|
161
|
+
return [details.request];
|
|
162
162
|
}
|
|
163
163
|
return [];
|
|
164
164
|
}
|
|
@@ -174,25 +174,26 @@ export class CookieIssue extends Issue {
|
|
|
174
174
|
}
|
|
175
175
|
isCausedByThirdParty() {
|
|
176
176
|
const outermostFrame = SDK.FrameManager.FrameManager.instance().getOutermostFrame();
|
|
177
|
-
return isCausedByThirdParty(outermostFrame, this
|
|
177
|
+
return isCausedByThirdParty(outermostFrame, this.details().cookieUrl, this.details().siteForCookies);
|
|
178
178
|
}
|
|
179
179
|
getKind() {
|
|
180
|
-
if (this
|
|
180
|
+
if (this.details().cookieExclusionReasons?.length > 0) {
|
|
181
181
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|
|
182
182
|
}
|
|
183
183
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
184
184
|
}
|
|
185
185
|
makeCookieReportEntry() {
|
|
186
|
-
const status = CookieIssue.getCookieStatus(this
|
|
187
|
-
|
|
188
|
-
|
|
186
|
+
const status = CookieIssue.getCookieStatus(this.details());
|
|
187
|
+
const details = this.details();
|
|
188
|
+
if (details.cookie && details.cookieUrl && status !== undefined) {
|
|
189
|
+
const entity = ThirdPartyWeb.ThirdPartyWeb.getEntity(details.cookieUrl);
|
|
189
190
|
return {
|
|
190
|
-
name:
|
|
191
|
-
domain:
|
|
191
|
+
name: details.cookie.name,
|
|
192
|
+
domain: details.cookie.domain,
|
|
192
193
|
type: entity?.category,
|
|
193
194
|
platform: entity?.name,
|
|
194
195
|
status,
|
|
195
|
-
insight: this
|
|
196
|
+
insight: this.details().insight,
|
|
196
197
|
};
|
|
197
198
|
}
|
|
198
199
|
return;
|
|
@@ -242,8 +243,8 @@ export class CookieIssue extends Issue {
|
|
|
242
243
|
const issuesModel = this.model();
|
|
243
244
|
if (issuesModel && this.code().includes("ExcludeThirdPartyPhaseout" /* Protocol.Audits.CookieExclusionReason.ExcludeThirdPartyPhaseout */)) {
|
|
244
245
|
return new SDK.ConsoleModel.ConsoleMessage(issuesModel.target().model(SDK.RuntimeModel.RuntimeModel), Common.Console.FrontendMessageSource.ISSUE_PANEL, "warning" /* Protocol.Log.LogEntryLevel.Warning */, UIStrings.consoleTpcdErrorMessage, {
|
|
245
|
-
url: this
|
|
246
|
-
affectedResources: { requestId: this
|
|
246
|
+
url: this.details().request?.url,
|
|
247
|
+
affectedResources: { requestId: this.details().request?.requestId, issueId: this.issueId },
|
|
247
248
|
isCookieReportIssue: true
|
|
248
249
|
});
|
|
249
250
|
}
|
package/build/node_modules/chrome-devtools-frontend/front_end/models/issues_manager/CorsIssue.js
CHANGED
|
@@ -81,19 +81,14 @@ function getIssueCode(details) {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
export class CorsIssue extends Issue {
|
|
84
|
-
#issueDetails;
|
|
85
84
|
constructor(issueDetails, issuesModel, issueId) {
|
|
86
|
-
super(getIssueCode(issueDetails), issuesModel, issueId);
|
|
87
|
-
this.#issueDetails = issueDetails;
|
|
85
|
+
super(getIssueCode(issueDetails), issueDetails, issuesModel, issueId);
|
|
88
86
|
}
|
|
89
87
|
getCategory() {
|
|
90
88
|
return "Cors" /* IssueCategory.CORS */;
|
|
91
89
|
}
|
|
92
|
-
details() {
|
|
93
|
-
return this.#issueDetails;
|
|
94
|
-
}
|
|
95
90
|
getDescription() {
|
|
96
|
-
switch (getIssueCode(this
|
|
91
|
+
switch (getIssueCode(this.details())) {
|
|
97
92
|
case "CorsIssue::InsecurePrivateNetwork" /* IssueCode.INSECURE_PRIVATE_NETWORK */:
|
|
98
93
|
return {
|
|
99
94
|
file: 'corsInsecurePrivateNetwork.md',
|
|
@@ -227,15 +222,13 @@ export class CorsIssue extends Issue {
|
|
|
227
222
|
}
|
|
228
223
|
}
|
|
229
224
|
primaryKey() {
|
|
230
|
-
return JSON.stringify(this
|
|
225
|
+
return JSON.stringify(this.details());
|
|
231
226
|
}
|
|
232
227
|
getKind() {
|
|
233
|
-
if (this
|
|
234
|
-
(this
|
|
235
|
-
this
|
|
236
|
-
|
|
237
|
-
this.#issueDetails.corsErrorStatus.corsError ===
|
|
238
|
-
"PreflightInvalidAllowPrivateNetwork" /* Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork */)) {
|
|
228
|
+
if (this.details().isWarning &&
|
|
229
|
+
(this.details().corsErrorStatus.corsError === "InsecurePrivateNetwork" /* Protocol.Network.CorsError.InsecurePrivateNetwork */ ||
|
|
230
|
+
this.details().corsErrorStatus.corsError === "PreflightMissingAllowPrivateNetwork" /* Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork */ ||
|
|
231
|
+
this.details().corsErrorStatus.corsError === "PreflightInvalidAllowPrivateNetwork" /* Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork */)) {
|
|
239
232
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
240
233
|
}
|
|
241
234
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|
|
@@ -32,19 +32,17 @@ export function isCrossOriginEmbedderPolicyIssue(reason) {
|
|
|
32
32
|
return false;
|
|
33
33
|
}
|
|
34
34
|
export class CrossOriginEmbedderPolicyIssue extends Issue {
|
|
35
|
-
#issueDetails;
|
|
36
35
|
constructor(issueDetails, issuesModel) {
|
|
37
|
-
super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issuesModel);
|
|
38
|
-
this.#issueDetails = issueDetails;
|
|
36
|
+
super(`CrossOriginEmbedderPolicyIssue::${issueDetails.reason}`, issueDetails, issuesModel);
|
|
39
37
|
}
|
|
40
38
|
primaryKey() {
|
|
41
|
-
return `${this.code()}-(${this
|
|
39
|
+
return `${this.code()}-(${this.details().request.requestId})`;
|
|
42
40
|
}
|
|
43
41
|
getBlockedByResponseDetails() {
|
|
44
|
-
return [this
|
|
42
|
+
return [this.details()];
|
|
45
43
|
}
|
|
46
44
|
requests() {
|
|
47
|
-
return [this
|
|
45
|
+
return [this.details().request];
|
|
48
46
|
}
|
|
49
47
|
getCategory() {
|
|
50
48
|
return "CrossOriginEmbedderPolicy" /* IssueCategory.CROSS_ORIGIN_EMBEDDER_POLICY */;
|
|
@@ -26,29 +26,24 @@ const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined
|
|
|
26
26
|
const strDeprecation = i18n.i18n.registerUIStrings('generated/Deprecation.ts', Deprecation.UIStrings);
|
|
27
27
|
const i18nLazyDeprecationString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, strDeprecation);
|
|
28
28
|
export class DeprecationIssue extends Issue {
|
|
29
|
-
#issueDetails;
|
|
30
29
|
constructor(issueDetails, issuesModel) {
|
|
31
30
|
const issueCode = [
|
|
32
31
|
"DeprecationIssue" /* Protocol.Audits.InspectorIssueCode.DeprecationIssue */,
|
|
33
32
|
issueDetails.type,
|
|
34
33
|
].join('::');
|
|
35
|
-
super({ code: issueCode, umaCode: 'DeprecationIssue' }, issuesModel);
|
|
36
|
-
this.#issueDetails = issueDetails;
|
|
34
|
+
super({ code: issueCode, umaCode: 'DeprecationIssue' }, issueDetails, issuesModel);
|
|
37
35
|
}
|
|
38
36
|
getCategory() {
|
|
39
37
|
return "Other" /* IssueCategory.OTHER */;
|
|
40
38
|
}
|
|
41
|
-
details() {
|
|
42
|
-
return this.#issueDetails;
|
|
43
|
-
}
|
|
44
39
|
getDescription() {
|
|
45
40
|
let messageFunction = () => '';
|
|
46
|
-
const maybeEnglishMessage = Deprecation.UIStrings[this
|
|
41
|
+
const maybeEnglishMessage = Deprecation.UIStrings[this.details().type];
|
|
47
42
|
if (maybeEnglishMessage) {
|
|
48
43
|
messageFunction = i18nLazyDeprecationString(maybeEnglishMessage);
|
|
49
44
|
}
|
|
50
45
|
const links = [];
|
|
51
|
-
const deprecationMeta = Deprecation.DEPRECATIONS_METADATA[this
|
|
46
|
+
const deprecationMeta = Deprecation.DEPRECATIONS_METADATA[this.details().type];
|
|
52
47
|
const feature = deprecationMeta?.chromeStatusFeature ?? 0;
|
|
53
48
|
if (feature !== 0) {
|
|
54
49
|
links.push({
|
|
@@ -73,13 +68,13 @@ export class DeprecationIssue extends Issue {
|
|
|
73
68
|
});
|
|
74
69
|
}
|
|
75
70
|
sources() {
|
|
76
|
-
if (this
|
|
77
|
-
return [this
|
|
71
|
+
if (this.details().sourceCodeLocation) {
|
|
72
|
+
return [this.details().sourceCodeLocation];
|
|
78
73
|
}
|
|
79
74
|
return [];
|
|
80
75
|
}
|
|
81
76
|
primaryKey() {
|
|
82
|
-
return JSON.stringify(this
|
|
77
|
+
return JSON.stringify(this.details());
|
|
83
78
|
}
|
|
84
79
|
getKind() {
|
|
85
80
|
return "BreakingChange" /* IssueKind.BREAKING_CHANGE */;
|
|
@@ -4,17 +4,15 @@
|
|
|
4
4
|
import { Issue } from './Issue.js';
|
|
5
5
|
import { resolveLazyDescription } from './MarkdownIssueDescription.js';
|
|
6
6
|
export class ElementAccessibilityIssue extends Issue {
|
|
7
|
-
issueDetails;
|
|
8
7
|
constructor(issueDetails, issuesModel, issueId) {
|
|
9
8
|
const issueCode = [
|
|
10
9
|
"ElementAccessibilityIssue" /* Protocol.Audits.InspectorIssueCode.ElementAccessibilityIssue */,
|
|
11
10
|
issueDetails.elementAccessibilityIssueReason,
|
|
12
11
|
].join('::');
|
|
13
|
-
super(issueCode, issuesModel, issueId);
|
|
14
|
-
this.issueDetails = issueDetails;
|
|
12
|
+
super(issueCode, issueDetails, issuesModel, issueId);
|
|
15
13
|
}
|
|
16
14
|
primaryKey() {
|
|
17
|
-
return JSON.stringify(this.
|
|
15
|
+
return JSON.stringify(this.details());
|
|
18
16
|
}
|
|
19
17
|
getDescription() {
|
|
20
18
|
if (this.isInteractiveContentAttributesSelectDescendantIssue()) {
|
|
@@ -23,7 +21,7 @@ export class ElementAccessibilityIssue extends Issue {
|
|
|
23
21
|
links: [],
|
|
24
22
|
};
|
|
25
23
|
}
|
|
26
|
-
const description = issueDescriptions.get(this.
|
|
24
|
+
const description = issueDescriptions.get(this.details().elementAccessibilityIssueReason);
|
|
27
25
|
if (!description) {
|
|
28
26
|
return null;
|
|
29
27
|
}
|
|
@@ -35,14 +33,11 @@ export class ElementAccessibilityIssue extends Issue {
|
|
|
35
33
|
getCategory() {
|
|
36
34
|
return "Other" /* IssueCategory.OTHER */;
|
|
37
35
|
}
|
|
38
|
-
details() {
|
|
39
|
-
return this.issueDetails;
|
|
40
|
-
}
|
|
41
36
|
isInteractiveContentAttributesSelectDescendantIssue() {
|
|
42
|
-
return this.
|
|
43
|
-
(this.
|
|
37
|
+
return this.details().hasDisallowedAttributes &&
|
|
38
|
+
(this.details().elementAccessibilityIssueReason !==
|
|
44
39
|
"InteractiveContentOptionChild" /* Protocol.Audits.ElementAccessibilityIssueReason.InteractiveContentOptionChild */ &&
|
|
45
|
-
this.
|
|
40
|
+
this.details().elementAccessibilityIssueReason !==
|
|
46
41
|
"InteractiveContentSummaryDescendant" /* Protocol.Audits.ElementAccessibilityIssueReason.InteractiveContentSummaryDescendant */);
|
|
47
42
|
}
|
|
48
43
|
static fromInspectorIssue(issuesModel, inspectorIssue) {
|
|
@@ -13,7 +13,6 @@ const UIStrings = {
|
|
|
13
13
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/FederatedAuthRequestIssue.ts', UIStrings);
|
|
14
14
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
15
15
|
export class FederatedAuthRequestIssue extends Issue {
|
|
16
|
-
#issueDetails;
|
|
17
16
|
constructor(issueDetails, issuesModel) {
|
|
18
17
|
super({
|
|
19
18
|
code: "FederatedAuthRequestIssue" /* Protocol.Audits.InspectorIssueCode.FederatedAuthRequestIssue */,
|
|
@@ -21,24 +20,20 @@ export class FederatedAuthRequestIssue extends Issue {
|
|
|
21
20
|
"FederatedAuthRequestIssue" /* Protocol.Audits.InspectorIssueCode.FederatedAuthRequestIssue */,
|
|
22
21
|
issueDetails.federatedAuthRequestIssueReason,
|
|
23
22
|
].join('::'),
|
|
24
|
-
}, issuesModel);
|
|
25
|
-
this.#issueDetails = issueDetails;
|
|
23
|
+
}, issueDetails, issuesModel);
|
|
26
24
|
}
|
|
27
25
|
getCategory() {
|
|
28
26
|
return "Other" /* IssueCategory.OTHER */;
|
|
29
27
|
}
|
|
30
|
-
details() {
|
|
31
|
-
return this.#issueDetails;
|
|
32
|
-
}
|
|
33
28
|
getDescription() {
|
|
34
|
-
const description = issueDescriptions.get(this
|
|
29
|
+
const description = issueDescriptions.get(this.details().federatedAuthRequestIssueReason);
|
|
35
30
|
if (!description) {
|
|
36
31
|
return null;
|
|
37
32
|
}
|
|
38
33
|
return resolveLazyDescription(description);
|
|
39
34
|
}
|
|
40
35
|
primaryKey() {
|
|
41
|
-
return JSON.stringify(this
|
|
36
|
+
return JSON.stringify(this.details());
|
|
42
37
|
}
|
|
43
38
|
getKind() {
|
|
44
39
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|
|
@@ -13,7 +13,6 @@ const UIStrings = {
|
|
|
13
13
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/FederatedAuthUserInfoRequestIssue.ts', UIStrings);
|
|
14
14
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
15
15
|
export class FederatedAuthUserInfoRequestIssue extends Issue {
|
|
16
|
-
#issueDetails;
|
|
17
16
|
constructor(issueDetails, issuesModel) {
|
|
18
17
|
super({
|
|
19
18
|
code: "FederatedAuthUserInfoRequestIssue" /* Protocol.Audits.InspectorIssueCode.FederatedAuthUserInfoRequestIssue */,
|
|
@@ -21,24 +20,20 @@ export class FederatedAuthUserInfoRequestIssue extends Issue {
|
|
|
21
20
|
"FederatedAuthUserInfoRequestIssue" /* Protocol.Audits.InspectorIssueCode.FederatedAuthUserInfoRequestIssue */,
|
|
22
21
|
issueDetails.federatedAuthUserInfoRequestIssueReason,
|
|
23
22
|
].join('::'),
|
|
24
|
-
}, issuesModel);
|
|
25
|
-
this.#issueDetails = issueDetails;
|
|
23
|
+
}, issueDetails, issuesModel);
|
|
26
24
|
}
|
|
27
25
|
getCategory() {
|
|
28
26
|
return "Other" /* IssueCategory.OTHER */;
|
|
29
27
|
}
|
|
30
|
-
details() {
|
|
31
|
-
return this.#issueDetails;
|
|
32
|
-
}
|
|
33
28
|
getDescription() {
|
|
34
|
-
const description = issueDescriptions.get(this
|
|
29
|
+
const description = issueDescriptions.get(this.details().federatedAuthUserInfoRequestIssueReason);
|
|
35
30
|
if (!description) {
|
|
36
31
|
return null;
|
|
37
32
|
}
|
|
38
33
|
return resolveLazyDescription(description);
|
|
39
34
|
}
|
|
40
35
|
primaryKey() {
|
|
41
|
-
return JSON.stringify(this
|
|
36
|
+
return JSON.stringify(this.details());
|
|
42
37
|
}
|
|
43
38
|
getKind() {
|
|
44
39
|
return "PageError" /* IssueKind.PAGE_ERROR */;
|