chrome-devtools-frontend 1.0.1636056 → 1.0.1640418
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/front_end/core/common/Color.ts +0 -4
- package/front_end/core/host/AidaClientTypes.ts +8 -6
- package/front_end/core/root/Runtime.ts +2 -2
- package/front_end/core/sdk/DOMStorageModel.ts +1 -1
- package/front_end/core/sdk/SourceMap.ts +8 -3
- package/front_end/core/sdk/TargetManager.ts +14 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +147 -0
- package/front_end/generated/ARIAProperties.js +17 -4
- package/front_end/generated/InspectorBackendCommands.ts +13 -7
- package/front_end/generated/SupportedCSSProperties.js +1 -0
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +14 -0
- package/front_end/generated/protocol.ts +120 -2
- package/front_end/global_typings/global_defs.d.ts +13 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +116 -0
- package/front_end/models/ai_assistance/AiConversation.ts +22 -36
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +0 -1
- package/front_end/models/ai_assistance/AiOrigins.ts +46 -0
- package/front_end/models/ai_assistance/AiUtils.ts +9 -0
- package/front_end/models/ai_assistance/README.md +16 -0
- package/front_end/models/ai_assistance/StorageItem.ts +30 -26
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +12 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +86 -32
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +31 -10
- package/front_end/models/ai_assistance/agents/ConversationSummaryAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/FileAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +1 -3
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +19 -0
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +9 -4
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +41 -12
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +442 -122
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/performance/AIContext.ts +7 -8
- package/front_end/models/ai_assistance/skills/README.md +40 -0
- package/front_end/models/ai_assistance/skills/Skill.ts +13 -0
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +10 -0
- package/front_end/models/ai_assistance/skills/styling.md +6 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +12 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +54 -2
- package/front_end/models/greendev/Prototypes.ts +0 -7
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +20 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -0
- package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +293 -0
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsFetchFailed.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestDnsInvalidRecord.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestInvalidEmail.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestKeyBindingSigningFailed.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestRpOriginIsOpaque.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenHttpNotFound.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidContentType.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidResponse.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenInvalidSdJwt.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenMalformedSdJwt.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestTokenNoResponse.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestUserLoggedOut.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownAccountsEndpointCrossOrigin.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownHttpNotFound.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidContentType.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownInvalidResponse.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownIssuanceEndpointCrossOrigin.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownListEmpty.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingAccountsEndpoint.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownMissingIssuanceEndpoint.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownNoResponse.md +1 -0
- package/front_end/models/issues_manager/descriptions/emailVerificationRequestWellKnownUnsupportedSigningAlgorithm.md +1 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +1748 -1739
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -1
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +9 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +29 -9
- package/front_end/models/stack_trace/StackTraceModel.ts +23 -11
- package/front_end/models/stack_trace/Trie.ts +11 -1
- package/front_end/models/trace/extras/TraceTree.ts +20 -1
- package/front_end/models/trace/insights/Common.ts +9 -0
- package/front_end/models/trace/lantern/core/NetworkAnalyzer.ts +21 -25
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +19 -75
- package/front_end/panels/ai_assistance/components/AccessibilityAgentMarkdownRenderer.ts +10 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +148 -2
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/chatMessage.css +27 -0
- package/front_end/panels/application/CookieItemsView.ts +24 -0
- package/front_end/panels/application/DOMStorageItemsView.ts +9 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +6 -0
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +4 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +13 -102
- package/front_end/panels/elements/StandaloneStylesContainer.ts +10 -0
- package/front_end/panels/elements/StylePropertiesSection.ts +6 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +30 -1
- package/front_end/panels/elements/StylesContainer.ts +3 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +54 -4
- package/front_end/panels/elements/elements-meta.ts +14 -0
- package/front_end/panels/layer_viewer/layerDetailsView.css +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +4 -4
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -0
- package/front_end/panels/network/NetworkLogViewColumns.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +55 -19
- package/front_end/panels/network/networkTimingTable.css +2 -4
- package/front_end/panels/recorder/components/ReplaySection.ts +28 -16
- package/front_end/panels/recorder/converters/LighthouseConverter.snapshot.txt +47 -0
- package/front_end/panels/recorder/converters/PuppeteerConverter.snapshot.txt +49 -0
- package/front_end/panels/recorder/converters/PuppeteerReplayConverter.snapshot.txt +33 -0
- package/front_end/panels/settings/SettingsScreen.ts +1 -2
- package/front_end/panels/sources/BreakpointsView.ts +23 -42
- package/front_end/panels/sources/DebuggerPlugin.ts +12 -5
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +169 -106
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +2 -2
- package/front_end/third_party/marked/README.chromium +3 -6
- package/front_end/third_party/marked/package/README.md +5 -5
- package/front_end/third_party/marked/package/bin/main.js +27 -22
- package/front_end/third_party/marked/package/bin/marked.js +2 -1
- package/front_end/third_party/marked/package/lib/marked.esm.d.ts +346 -256
- package/front_end/third_party/marked/package/lib/marked.esm.js +67 -2698
- package/front_end/third_party/marked/package/lib/marked.esm.js.map +7 -1
- package/front_end/third_party/marked/package/lib/marked.umd.js +69 -2722
- package/front_end/third_party/marked/package/lib/marked.umd.js.map +7 -1
- package/front_end/third_party/marked/package/man/marked.1 +4 -2
- package/front_end/third_party/marked/package/man/marked.1.md +2 -1
- package/front_end/third_party/marked/package/package.json +49 -57
- package/front_end/third_party/puppeteer-replay/README.chromium +2 -2
- package/front_end/third_party/puppeteer-replay/package/lib/cli.js +84 -80
- package/front_end/third_party/puppeteer-replay/package/lib/cli.js.map +1 -1
- package/front_end/third_party/puppeteer-replay/package/lib/extension-test.js +79 -83
- package/front_end/third_party/puppeteer-replay/package/lib/extension-test.js.map +1 -1
- package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +43 -171
- package/front_end/third_party/puppeteer-replay/package/lib/main.js +51 -206
- package/front_end/third_party/puppeteer-replay/package/lib/main.js.map +1 -1
- package/front_end/third_party/puppeteer-replay/package/package.json +37 -67
- package/front_end/tsconfig.json +1 -1
- package/front_end/ui/components/markdown_view/CodeBlock.ts +17 -6
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -3
- package/front_end/ui/components/markdown_view/codeBlock.css +11 -0
- package/front_end/ui/components/markdown_view/markdownView.css +17 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +0 -79
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +16 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +2 -0
- package/mcp/mcp.ts +1 -6
- package/package.json +14 -16
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgent.ts +0 -1015
- package/front_end/models/ai_assistance/agents/BreakpointDebuggerAgentOverlay.ts +0 -87
- package/front_end/third_party/marked/package/bin/marked +0 -215
- package/front_end/third_party/marked/package/lib/marked.cjs +0 -2726
- package/front_end/third_party/marked/package/lib/marked.cjs.map +0 -1
- package/front_end/third_party/marked/package/lib/marked.d.cts +0 -670
- package/front_end/third_party/marked/package/lib/marked.js +0 -2780
- package/front_end/third_party/marked/package/man/marked.1.txt +0 -86
- package/front_end/third_party/marked/package/marked.min.js +0 -6
- package/front_end/third_party/marked/package/src/Lexer.js +0 -492
- package/front_end/third_party/marked/package/src/Parser.js +0 -286
- package/front_end/third_party/marked/package/src/Renderer.js +0 -166
- package/front_end/third_party/marked/package/src/Slugger.js +0 -49
- package/front_end/third_party/marked/package/src/TextRenderer.js +0 -42
- package/front_end/third_party/marked/package/src/Tokenizer.js +0 -755
- package/front_end/third_party/marked/package/src/defaults.js +0 -29
- package/front_end/third_party/marked/package/src/helpers.js +0 -249
- package/front_end/third_party/marked/package/src/marked.js +0 -350
- package/front_end/third_party/marked/package/src/rules.js +0 -285
- package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.cjs +0 -2099
- package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.cjs.map +0 -1
- package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.d.cts +0 -686
- package/front_end/third_party/puppeteer-replay/package/lib/cjs/main.d.ts +0 -35
- package/mcp/HostBindings.ts +0 -319
- /package/front_end/third_party/marked/package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
15
5
|
*/
|
|
16
6
|
var SelectorType;
|
|
17
7
|
(function (SelectorType) {
|
|
@@ -51,19 +41,9 @@ var Schema = /*#__PURE__*/Object.freeze({
|
|
|
51
41
|
});
|
|
52
42
|
|
|
53
43
|
/**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
you may not use this file except in compliance with the License.
|
|
58
|
-
You may obtain a copy of the License at
|
|
59
|
-
|
|
60
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
61
|
-
|
|
62
|
-
Unless required by applicable law or agreed to in writing, software
|
|
63
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
64
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
65
|
-
See the License for the specific language governing permissions and
|
|
66
|
-
limitations under the License.
|
|
44
|
+
* @license
|
|
45
|
+
* Copyright 2022 Google LLC
|
|
46
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
67
47
|
*/
|
|
68
48
|
function assertAllStepTypesAreHandled(s) {
|
|
69
49
|
throw new Error(`Unknown step type: ${s.type}`);
|
|
@@ -577,19 +557,9 @@ function selectorToPElementSelector(selector) {
|
|
|
577
557
|
}
|
|
578
558
|
|
|
579
559
|
/**
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
you may not use this file except in compliance with the License.
|
|
584
|
-
You may obtain a copy of the License at
|
|
585
|
-
|
|
586
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
587
|
-
|
|
588
|
-
Unless required by applicable law or agreed to in writing, software
|
|
589
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
590
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
591
|
-
See the License for the specific language governing permissions and
|
|
592
|
-
limitations under the License.
|
|
560
|
+
* @license
|
|
561
|
+
* Copyright 2022 Google LLC
|
|
562
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
593
563
|
*/
|
|
594
564
|
class StringifyExtension {
|
|
595
565
|
async beforeAllSteps(out, flow) { }
|
|
@@ -600,19 +570,9 @@ class StringifyExtension {
|
|
|
600
570
|
}
|
|
601
571
|
|
|
602
572
|
/**
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
you may not use this file except in compliance with the License.
|
|
607
|
-
You may obtain a copy of the License at
|
|
608
|
-
|
|
609
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
610
|
-
|
|
611
|
-
Unless required by applicable law or agreed to in writing, software
|
|
612
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
613
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
614
|
-
See the License for the specific language governing permissions and
|
|
615
|
-
limitations under the License.
|
|
573
|
+
* @license
|
|
574
|
+
* Copyright 2022 Google LLC
|
|
575
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
616
576
|
*/
|
|
617
577
|
/**
|
|
618
578
|
* Stringifies a user flow to JSON with source maps.
|
|
@@ -653,19 +613,9 @@ class JSONStringifyExtension extends StringifyExtension {
|
|
|
653
613
|
}
|
|
654
614
|
|
|
655
615
|
/**
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
you may not use this file except in compliance with the License.
|
|
660
|
-
You may obtain a copy of the License at
|
|
661
|
-
|
|
662
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
663
|
-
|
|
664
|
-
Unless required by applicable law or agreed to in writing, software
|
|
665
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
666
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
667
|
-
See the License for the specific language governing permissions and
|
|
668
|
-
limitations under the License.
|
|
616
|
+
* @license
|
|
617
|
+
* Copyright 2022 Google LLC
|
|
618
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
669
619
|
*/
|
|
670
620
|
class InMemoryLineWriter {
|
|
671
621
|
#indentation;
|
|
@@ -708,19 +658,9 @@ class InMemoryLineWriter {
|
|
|
708
658
|
}
|
|
709
659
|
|
|
710
660
|
/**
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
you may not use this file except in compliance with the License.
|
|
715
|
-
You may obtain a copy of the License at
|
|
716
|
-
|
|
717
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
718
|
-
|
|
719
|
-
Unless required by applicable law or agreed to in writing, software
|
|
720
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
721
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
722
|
-
See the License for the specific language governing permissions and
|
|
723
|
-
limitations under the License.
|
|
661
|
+
* @license
|
|
662
|
+
* Copyright 2022 Google LLC
|
|
663
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
724
664
|
*/
|
|
725
665
|
/**
|
|
726
666
|
* Copyright (c) 2020 The Chromium Authors. All rights reserved.
|
|
@@ -851,19 +791,9 @@ const formatAsJSLiteral = (content) => {
|
|
|
851
791
|
};
|
|
852
792
|
|
|
853
793
|
/**
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
you may not use this file except in compliance with the License.
|
|
858
|
-
You may obtain a copy of the License at
|
|
859
|
-
|
|
860
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
861
|
-
|
|
862
|
-
Unless required by applicable law or agreed to in writing, software
|
|
863
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
864
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
865
|
-
See the License for the specific language governing permissions and
|
|
866
|
-
limitations under the License.
|
|
794
|
+
* @license
|
|
795
|
+
* Copyright 2022 Google LLC
|
|
796
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
867
797
|
*/
|
|
868
798
|
class PuppeteerStringifyExtension extends StringifyExtension {
|
|
869
799
|
#shouldAppendWaitForElementHelper = false;
|
|
@@ -873,14 +803,13 @@ class PuppeteerStringifyExtension extends StringifyExtension {
|
|
|
873
803
|
this.#targetBrowser = targetBrowser;
|
|
874
804
|
}
|
|
875
805
|
async beforeAllSteps(out, flow) {
|
|
876
|
-
out.appendLine("
|
|
806
|
+
out.appendLine("import { Locator, launch } from 'puppeteer'; // v25.0.0 or later");
|
|
877
807
|
out.appendLine('');
|
|
878
|
-
out.appendLine('(async () => {').startBlock();
|
|
879
808
|
if (this.#targetBrowser === 'firefox') {
|
|
880
|
-
out.appendLine(`const browser = await
|
|
809
|
+
out.appendLine(`const browser = await launch({browser: 'firefox'});`);
|
|
881
810
|
}
|
|
882
811
|
else {
|
|
883
|
-
out.appendLine('const browser = await
|
|
812
|
+
out.appendLine('const browser = await launch();');
|
|
884
813
|
}
|
|
885
814
|
out.appendLine('const page = await browser.newPage();');
|
|
886
815
|
out.appendLine(`const timeout = ${flow.timeout || defaultTimeout};`);
|
|
@@ -897,10 +826,6 @@ class PuppeteerStringifyExtension extends StringifyExtension {
|
|
|
897
826
|
out.appendLine(line);
|
|
898
827
|
}
|
|
899
828
|
}
|
|
900
|
-
out.endBlock().appendLine('})().catch(err => {').startBlock();
|
|
901
|
-
out.appendLine('console.error(err);');
|
|
902
|
-
out.appendLine('process.exit(1);');
|
|
903
|
-
out.endBlock().appendLine('});');
|
|
904
829
|
}
|
|
905
830
|
async stringifyStep(out, step, flow) {
|
|
906
831
|
out.appendLine('{').startBlock();
|
|
@@ -955,7 +880,7 @@ class PuppeteerStringifyExtension extends StringifyExtension {
|
|
|
955
880
|
}
|
|
956
881
|
}
|
|
957
882
|
#appendLocators(out, step, action) {
|
|
958
|
-
out.appendLine('await
|
|
883
|
+
out.appendLine('await Locator.race([').startBlock();
|
|
959
884
|
out.appendLine(step.selectors
|
|
960
885
|
.map((s) => {
|
|
961
886
|
return `${step.frame ? 'frame' : 'targetPage'}.locator(${formatJSONAsJS(selectorToPElementSelector(s), out.getIndent())})`;
|
|
@@ -1220,19 +1145,9 @@ async function waitForFunction(fn, timeout) {
|
|
|
1220
1145
|
}`;
|
|
1221
1146
|
|
|
1222
1147
|
/**
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
you may not use this file except in compliance with the License.
|
|
1227
|
-
You may obtain a copy of the License at
|
|
1228
|
-
|
|
1229
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1230
|
-
|
|
1231
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1232
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1233
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1234
|
-
See the License for the specific language governing permissions and
|
|
1235
|
-
limitations under the License.
|
|
1148
|
+
* @license
|
|
1149
|
+
* Copyright 2022 Google LLC
|
|
1150
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1236
1151
|
*/
|
|
1237
1152
|
const alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
1238
1153
|
const charToIdx = alpha.split('').reduce((acc, char, idx) => {
|
|
@@ -1293,19 +1208,9 @@ function decode(str) {
|
|
|
1293
1208
|
}
|
|
1294
1209
|
|
|
1295
1210
|
/**
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
you may not use this file except in compliance with the License.
|
|
1300
|
-
You may obtain a copy of the License at
|
|
1301
|
-
|
|
1302
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1303
|
-
|
|
1304
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1305
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1306
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1307
|
-
See the License for the specific language governing permissions and
|
|
1308
|
-
limitations under the License.
|
|
1211
|
+
* @license
|
|
1212
|
+
* Copyright 2022 Google LLC
|
|
1213
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1309
1214
|
*/
|
|
1310
1215
|
const SOURCE_MAP_PREFIX = '//# recorderSourceMap=';
|
|
1311
1216
|
/**
|
|
@@ -1381,19 +1286,9 @@ function stripSourceMap(text) {
|
|
|
1381
1286
|
}
|
|
1382
1287
|
|
|
1383
1288
|
/**
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
you may not use this file except in compliance with the License.
|
|
1388
|
-
You may obtain a copy of the License at
|
|
1389
|
-
|
|
1390
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1391
|
-
|
|
1392
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1393
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1394
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1395
|
-
See the License for the specific language governing permissions and
|
|
1396
|
-
limitations under the License.
|
|
1289
|
+
* @license
|
|
1290
|
+
* Copyright 2022 Google LLC
|
|
1291
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1397
1292
|
*/
|
|
1398
1293
|
class RunnerExtension {
|
|
1399
1294
|
async beforeAllSteps(flow) { }
|
|
@@ -1759,19 +1654,9 @@ async function waitForFunction(fn, timeout) {
|
|
|
1759
1654
|
}
|
|
1760
1655
|
|
|
1761
1656
|
/**
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
you may not use this file except in compliance with the License.
|
|
1766
|
-
You may obtain a copy of the License at
|
|
1767
|
-
|
|
1768
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1769
|
-
|
|
1770
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1771
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1772
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1773
|
-
See the License for the specific language governing permissions and
|
|
1774
|
-
limitations under the License.
|
|
1657
|
+
* @license
|
|
1658
|
+
* Copyright 2022 Google LLC
|
|
1659
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1775
1660
|
*/
|
|
1776
1661
|
async function _runStepWithHooks(extension, step, flow) {
|
|
1777
1662
|
await extension.beforeEachStep?.(step, flow);
|
|
@@ -1853,19 +1738,9 @@ async function createPuppeteerRunnerOwningBrowserExtension() {
|
|
|
1853
1738
|
}
|
|
1854
1739
|
|
|
1855
1740
|
/**
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
you may not use this file except in compliance with the License.
|
|
1860
|
-
You may obtain a copy of the License at
|
|
1861
|
-
|
|
1862
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1863
|
-
|
|
1864
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1865
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1866
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1867
|
-
See the License for the specific language governing permissions and
|
|
1868
|
-
limitations under the License.
|
|
1741
|
+
* @license
|
|
1742
|
+
* Copyright 2022 Google LLC
|
|
1743
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1869
1744
|
*/
|
|
1870
1745
|
/**
|
|
1871
1746
|
* Stringifies a user flow to a script that uses \@puppeteer/replay's own API.
|
|
@@ -1901,19 +1776,9 @@ class PuppeteerReplayStringifyExtension extends StringifyExtension {
|
|
|
1901
1776
|
}
|
|
1902
1777
|
|
|
1903
1778
|
/**
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
you may not use this file except in compliance with the License.
|
|
1908
|
-
You may obtain a copy of the License at
|
|
1909
|
-
|
|
1910
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1911
|
-
|
|
1912
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1913
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1914
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1915
|
-
See the License for the specific language governing permissions and
|
|
1916
|
-
limitations under the License.
|
|
1779
|
+
* @license
|
|
1780
|
+
* Copyright 2022 Google LLC
|
|
1781
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1917
1782
|
*/
|
|
1918
1783
|
function isNavigationStep(step) {
|
|
1919
1784
|
return Boolean(step.type === StepType.Navigate ||
|
|
@@ -1929,24 +1794,14 @@ function isMobileFlow(flow) {
|
|
|
1929
1794
|
}
|
|
1930
1795
|
|
|
1931
1796
|
/**
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
you may not use this file except in compliance with the License.
|
|
1936
|
-
You may obtain a copy of the License at
|
|
1937
|
-
|
|
1938
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
1939
|
-
|
|
1940
|
-
Unless required by applicable law or agreed to in writing, software
|
|
1941
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
1942
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1943
|
-
See the License for the specific language governing permissions and
|
|
1944
|
-
limitations under the License.
|
|
1797
|
+
* @license
|
|
1798
|
+
* Copyright 2022 Google LLC
|
|
1799
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
1945
1800
|
*/
|
|
1946
1801
|
class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
|
|
1947
1802
|
#isProcessingTimespan = false;
|
|
1948
1803
|
async beforeAllSteps(out, flow) {
|
|
1949
|
-
out.appendLine(`
|
|
1804
|
+
out.appendLine(`import fs from 'fs';`);
|
|
1950
1805
|
await super.beforeAllSteps(out, flow);
|
|
1951
1806
|
out.appendLine(`const lhApi = await import('lighthouse'); // v10.0.0 or later`);
|
|
1952
1807
|
const flags = {
|
|
@@ -1990,25 +1845,15 @@ class LighthouseStringifyExtension extends PuppeteerStringifyExtension {
|
|
|
1990
1845
|
out.appendLine(`await lhFlow.endTimespan();`);
|
|
1991
1846
|
}
|
|
1992
1847
|
out.appendLine(`const lhFlowReport = await lhFlow.generateReport();`);
|
|
1993
|
-
out.appendLine(`fs.writeFileSync(
|
|
1848
|
+
out.appendLine(`fs.writeFileSync(import.meta.dirname + '/flow.report.html', lhFlowReport)`);
|
|
1994
1849
|
await super.afterAllSteps(out, flow);
|
|
1995
1850
|
}
|
|
1996
1851
|
}
|
|
1997
1852
|
|
|
1998
1853
|
/**
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
you may not use this file except in compliance with the License.
|
|
2003
|
-
You may obtain a copy of the License at
|
|
2004
|
-
|
|
2005
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
2006
|
-
|
|
2007
|
-
Unless required by applicable law or agreed to in writing, software
|
|
2008
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
2009
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
2010
|
-
See the License for the specific language governing permissions and
|
|
2011
|
-
limitations under the License.
|
|
1854
|
+
* @license
|
|
1855
|
+
* Copyright 2022 Google LLC
|
|
1856
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
2012
1857
|
*/
|
|
2013
1858
|
class LighthouseRunnerExtension extends PuppeteerRunnerExtension {
|
|
2014
1859
|
#isTimespanRunning = false;
|