chrome-devtools-frontend 1.0.1638082 → 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/host/AidaClientTypes.ts +8 -6
- package/front_end/core/sdk/DOMStorageModel.ts +1 -1
- 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 +0 -4
- package/front_end/generated/InspectorBackendCommands.ts +7 -3
- 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 +80 -0
- 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 -28
- package/front_end/models/ai_assistance/AiOrigins.ts +46 -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 +2 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +73 -36
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +25 -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 -1
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +3 -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 -0
- 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/heap_snapshot/HeapSnapshotModel.ts +20 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +5 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
- package/front_end/models/live-metrics/web-vitals-injected/web-vitals-injected.ts +1 -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/panels/ai_assistance/AiAssistancePanel.ts +8 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +114 -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/console/ConsoleViewMessage.ts +13 -12
- package/front_end/panels/elements/StandaloneStylesContainer.ts +10 -0
- 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 +45 -4
- 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/networkTimingTable.css +2 -4
- 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/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/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 +2 -0
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +2 -0
- package/mcp/mcp.ts +1 -1
- package/package.json +7 -9
- 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/marked/package/{LICENSE.md → LICENSE} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2021 The Chromium Authors
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
4
|
|
|
6
5
|
/*
|
|
7
6
|
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|
@@ -31,13 +30,14 @@
|
|
|
31
30
|
|
|
32
31
|
import type * as Common from '../../core/common/common.js';
|
|
33
32
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
34
|
-
import * as SDK from '../../core/sdk/sdk.js';
|
|
33
|
+
import type * as SDK from '../../core/sdk/sdk.js';
|
|
35
34
|
import * as Protocol from '../../generated/protocol.js';
|
|
36
35
|
import * as SourceMapScopes from '../../models/source_map_scopes/source_map_scopes.js';
|
|
37
36
|
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
38
37
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
39
38
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
40
39
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
40
|
+
import {html, nothing, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
41
41
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
42
42
|
|
|
43
43
|
import scopeChainSidebarPaneStyles from './scopeChainSidebarPane.css.js';
|
|
@@ -69,32 +69,119 @@ const str_ = i18n.i18n.registerUIStrings('panels/sources/ScopeChainSidebarPane.t
|
|
|
69
69
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
70
70
|
let scopeChainSidebarPaneInstance: ScopeChainSidebarPane;
|
|
71
71
|
|
|
72
|
+
interface ViewInput {
|
|
73
|
+
linkifier: Components.Linkifier.Linkifier;
|
|
74
|
+
isPaused: boolean;
|
|
75
|
+
scopeChain: Array<{
|
|
76
|
+
scope: SDK.DebuggerModel.ScopeChainEntry,
|
|
77
|
+
objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree,
|
|
78
|
+
}>|null;
|
|
79
|
+
}
|
|
80
|
+
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
81
|
+
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
82
|
+
const createScopeSectionTreeElement =
|
|
83
|
+
(scope: SDK.DebuggerModel.ScopeChainEntry,
|
|
84
|
+
objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree): TemplateResult => {
|
|
85
|
+
let emptyPlaceholder: Common.UIString.LocalizedString|null = null;
|
|
86
|
+
if (scope.type() === Protocol.Debugger.ScopeType.Local ||
|
|
87
|
+
scope.type() === Protocol.Debugger.ScopeType.Closure) {
|
|
88
|
+
emptyPlaceholder = i18nString(UIStrings.noVariables);
|
|
89
|
+
}
|
|
90
|
+
const icon = scope.icon();
|
|
91
|
+
const {title, subtitle} = scopeTitle(scope);
|
|
92
|
+
const section = new ObjectUI.ObjectPropertiesSection.RootElement(objectTree, input.linkifier, emptyPlaceholder);
|
|
93
|
+
section.listItemElement.classList.add('scope-chain-sidebar-pane-section');
|
|
94
|
+
section.listItemElement.setAttribute('aria-label', title);
|
|
95
|
+
|
|
96
|
+
const titleNode = document.createDocumentFragment();
|
|
97
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
98
|
+
render(
|
|
99
|
+
html`<div class='scope-chain-sidebar-pane-section-header tree-element-title'>${
|
|
100
|
+
icon ? html`<img class=scope-chain-sidebar-pane-section-icon src=${icon}>` : nothing}
|
|
101
|
+
<div class=scope-chain-sidebar-pane-section-subtitle>${subtitle}</div>
|
|
102
|
+
<div class=scope-chain-sidebar-pane-section-title>${title}</div>
|
|
103
|
+
</div>`,
|
|
104
|
+
titleNode);
|
|
105
|
+
section.title = titleNode;
|
|
106
|
+
|
|
107
|
+
if (scope === input.scopeChain?.[0]?.scope) {
|
|
108
|
+
section.select(/* omitFocus */ true);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return html`<devtools-tree-wrapper .treeElement=${section}></devtools-tree-wrapper>`;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
render(
|
|
115
|
+
// clang-format off
|
|
116
|
+
html`
|
|
117
|
+
<style>${scopeChainSidebarPaneStyles}</style>
|
|
118
|
+
${input.scopeChain ? html`
|
|
119
|
+
<devtools-tree autofocus hide-overflow show-selection-on-keyboard-focus .template=${
|
|
120
|
+
html`<ul role=tree class="source-code object-properties-section">
|
|
121
|
+
<style>${ObjectUI.ObjectPropertiesSection.objectValueStyles}</style>
|
|
122
|
+
<style>${ObjectUI.ObjectPropertiesSection.objectPropertiesSectionStyles}</style>
|
|
123
|
+
<style>${scopeChainSidebarPaneStyles}</style>
|
|
124
|
+
${input.scopeChain?.map(({scope, objectTree}) => createScopeSectionTreeElement(scope, objectTree)) ?? nothing}
|
|
125
|
+
</ul>`}>
|
|
126
|
+
</devtools-tree>` : html`
|
|
127
|
+
<div class=gray-info-message tabindex=-1>${
|
|
128
|
+
input.isPaused ? i18nString(UIStrings.loading) : i18nString(UIStrings.notPaused)}</div>`}
|
|
129
|
+
`,
|
|
130
|
+
// clang-format on
|
|
131
|
+
target);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
function scopeTitle(scope: SDK.DebuggerModel.ScopeChainEntry): {title: string, subtitle: string|null} {
|
|
135
|
+
let title = scope.typeName();
|
|
136
|
+
if (scope.type() === Protocol.Debugger.ScopeType.Closure) {
|
|
137
|
+
const scopeName = scope.name();
|
|
138
|
+
if (scopeName) {
|
|
139
|
+
title = i18nString(UIStrings.closureS, {PH1: UI.UIUtils.beautifyFunctionName(scopeName)});
|
|
140
|
+
} else {
|
|
141
|
+
title = i18nString(UIStrings.closure);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
let subtitle: string|null = scope.description();
|
|
145
|
+
if (!title || title === subtitle) {
|
|
146
|
+
subtitle = null;
|
|
147
|
+
}
|
|
148
|
+
return {title, subtitle};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function scopeKey(scope: SDK.DebuggerModel.ScopeChainEntry): string {
|
|
152
|
+
let title = scope.typeName();
|
|
153
|
+
if (scope.type() === Protocol.Debugger.ScopeType.Closure) {
|
|
154
|
+
const scopeName = scope.name();
|
|
155
|
+
if (scopeName) {
|
|
156
|
+
title = `Closure: ${UI.UIUtils.beautifyFunctionName(scopeName)}`;
|
|
157
|
+
} else {
|
|
158
|
+
title = 'Closure';
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
let subtitle: string|null = scope.description();
|
|
162
|
+
if (!title || title === subtitle) {
|
|
163
|
+
subtitle = null;
|
|
164
|
+
}
|
|
165
|
+
return title + (subtitle ? ':' + subtitle : '');
|
|
166
|
+
}
|
|
72
167
|
export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextFlavorListener.ContextFlavorListener {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
private readonly linkifier: Components.Linkifier.Linkifier;
|
|
76
|
-
private infoElement: HTMLDivElement;
|
|
168
|
+
readonly #linkifier: Components.Linkifier.Linkifier;
|
|
169
|
+
#expansionTrackers = new Map<string, ObjectUI.ObjectPropertiesSection.ObjectTreeExpansionTracker>();
|
|
77
170
|
#scopeChainModel: SourceMapScopes.ScopeChainModel.ScopeChainModel|null = null;
|
|
171
|
+
#scopeChain:
|
|
172
|
+
Array<{scope: SDK.DebuggerModel.ScopeChainEntry, objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree}>|null =
|
|
173
|
+
null;
|
|
174
|
+
#view: View;
|
|
78
175
|
|
|
79
|
-
|
|
80
|
-
super({
|
|
176
|
+
constructor(target?: HTMLElement, view = DEFAULT_VIEW) {
|
|
177
|
+
super(target, {
|
|
81
178
|
jslog: `${VisualLogging.section('sources.scope-chain')}`,
|
|
82
179
|
useShadowDom: true,
|
|
83
180
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
this.treeOutline = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline();
|
|
87
|
-
this.treeOutline.registerRequiredCSS(scopeChainSidebarPaneStyles);
|
|
88
|
-
this.treeOutline.setHideOverflow(true);
|
|
89
|
-
|
|
90
|
-
this.treeOutline.setShowSelectionOnKeyboardFocus(/* show */ true);
|
|
91
|
-
this.expandController =
|
|
92
|
-
new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeExpandController(this.treeOutline);
|
|
93
|
-
this.linkifier = new Components.Linkifier.Linkifier();
|
|
94
|
-
this.infoElement = document.createElement('div');
|
|
95
|
-
this.infoElement.className = 'gray-info-message';
|
|
96
|
-
this.infoElement.tabIndex = -1;
|
|
181
|
+
|
|
182
|
+
this.#linkifier = new Components.Linkifier.Linkifier();
|
|
97
183
|
this.flavorChanged(UI.Context.Context.instance().flavor(StackTrace.StackTrace.DebuggableFrameFlavor));
|
|
184
|
+
this.#view = view;
|
|
98
185
|
}
|
|
99
186
|
|
|
100
187
|
static instance(): ScopeChainSidebarPane {
|
|
@@ -104,116 +191,92 @@ export class ScopeChainSidebarPane extends UI.Widget.VBox implements UI.ContextF
|
|
|
104
191
|
return scopeChainSidebarPaneInstance;
|
|
105
192
|
}
|
|
106
193
|
|
|
107
|
-
|
|
108
|
-
|
|
194
|
+
/**
|
|
195
|
+
* @deprecated Required for legacy web tests via DebuggerTestRunner.js
|
|
196
|
+
*/
|
|
197
|
+
get treeOutline(): ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline|null {
|
|
198
|
+
const devtoolsTree = this.contentElement.querySelector('devtools-tree');
|
|
199
|
+
if (devtoolsTree) {
|
|
200
|
+
return (devtoolsTree as UI.TreeOutline.TreeViewElement).getInternalTreeOutlineForTest() as
|
|
201
|
+
ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionsTreeOutline;
|
|
202
|
+
}
|
|
203
|
+
return null;
|
|
109
204
|
}
|
|
110
205
|
|
|
111
206
|
flavorChanged(callFrame: StackTrace.StackTrace.DebuggableFrameFlavor|null): void {
|
|
112
207
|
this.#scopeChainModel?.dispose();
|
|
113
208
|
this.#scopeChainModel = null;
|
|
209
|
+
this.#scopeChain = null;
|
|
114
210
|
|
|
115
|
-
this
|
|
116
|
-
this.contentElement.removeChildren();
|
|
117
|
-
this.contentElement.appendChild(this.infoElement);
|
|
211
|
+
this.#linkifier.reset();
|
|
118
212
|
|
|
119
213
|
if (callFrame) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
this.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
this);
|
|
128
|
-
} else {
|
|
129
|
-
this.infoElement.textContent = i18nString(UIStrings.notPaused);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
override focus(): void {
|
|
134
|
-
if (this.hasFocus()) {
|
|
135
|
-
return;
|
|
214
|
+
const scopeChainModel = new SourceMapScopes.ScopeChainModel.ScopeChainModel(callFrame.sdkFrame);
|
|
215
|
+
this.#scopeChainModel = scopeChainModel;
|
|
216
|
+
this.#scopeChainModel.addEventListener(SourceMapScopes.ScopeChainModel.Events.SCOPE_CHAIN_UPDATED, event => {
|
|
217
|
+
if (this.#scopeChainModel === scopeChainModel) {
|
|
218
|
+
this.#buildScopeChain(event.data);
|
|
219
|
+
}
|
|
220
|
+
});
|
|
136
221
|
}
|
|
137
222
|
|
|
138
|
-
|
|
139
|
-
this.treeOutline.forceSelect();
|
|
140
|
-
}
|
|
223
|
+
this.requestUpdate();
|
|
141
224
|
}
|
|
142
225
|
|
|
143
|
-
|
|
144
|
-
|
|
226
|
+
override performUpdate(): void {
|
|
227
|
+
this.#view(
|
|
228
|
+
{
|
|
229
|
+
linkifier: this.#linkifier,
|
|
230
|
+
isPaused: Boolean(this.#scopeChainModel),
|
|
231
|
+
scopeChain: this.#scopeChain,
|
|
232
|
+
},
|
|
233
|
+
{}, this.contentElement);
|
|
234
|
+
}
|
|
145
235
|
|
|
146
|
-
|
|
236
|
+
#buildScopeChain({scopeChain}: SourceMapScopes.ScopeChainModel.ScopeChain): void {
|
|
237
|
+
const oldExpansionTrackers = this.#expansionTrackers;
|
|
238
|
+
this.#expansionTrackers = new Map();
|
|
239
|
+
this.#scopeChain = [];
|
|
147
240
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
241
|
+
for (const scope of scopeChain) {
|
|
242
|
+
const key = scopeKey(scope);
|
|
243
|
+
let expansionTracker = this.#expansionTrackers.get(key);
|
|
244
|
+
if (!expansionTracker) {
|
|
245
|
+
expansionTracker =
|
|
246
|
+
oldExpansionTrackers.get(key) ?? new ObjectUI.ObjectPropertiesSection.ObjectTreeExpansionTracker();
|
|
247
|
+
this.#expansionTrackers.set(key, expansionTracker);
|
|
154
248
|
}
|
|
155
249
|
|
|
156
|
-
const
|
|
250
|
+
const objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(scope.object(), {
|
|
251
|
+
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.ALL,
|
|
252
|
+
readOnly: false,
|
|
253
|
+
expansionTracker,
|
|
254
|
+
});
|
|
255
|
+
void expansionTracker.apply(objectTree);
|
|
256
|
+
objectTree.addExtraProperties(...scope.extraProperties());
|
|
157
257
|
if (scope.type() === Protocol.Debugger.ScopeType.Global) {
|
|
158
|
-
|
|
159
|
-
} else if (!foundLocalScope || scope.type() === Protocol.Debugger.ScopeType.Local) {
|
|
160
|
-
section.expand();
|
|
258
|
+
objectTree.expanded = false;
|
|
161
259
|
}
|
|
162
260
|
|
|
163
|
-
this.
|
|
164
|
-
if (i === 0) {
|
|
165
|
-
section.select(/* omitFocus */ true);
|
|
166
|
-
}
|
|
261
|
+
this.#scopeChain.push({scope, objectTree});
|
|
167
262
|
}
|
|
168
|
-
this.sidebarPaneUpdatedForTest();
|
|
169
|
-
}
|
|
170
263
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
let title = scope.typeName();
|
|
179
|
-
if (scope.type() === Protocol.Debugger.ScopeType.Closure) {
|
|
180
|
-
const scopeName = scope.name();
|
|
181
|
-
if (scopeName) {
|
|
182
|
-
title = i18nString(UIStrings.closureS, {PH1: UI.UIUtils.beautifyFunctionName(scopeName)});
|
|
183
|
-
} else {
|
|
184
|
-
title = i18nString(UIStrings.closure);
|
|
264
|
+
for (const {scope, objectTree} of this.#scopeChain) {
|
|
265
|
+
if (scope.type() !== Protocol.Debugger.ScopeType.Global) {
|
|
266
|
+
objectTree.expanded = true;
|
|
267
|
+
}
|
|
268
|
+
if (scope.type() === Protocol.Debugger.ScopeType.Local) {
|
|
269
|
+
break;
|
|
185
270
|
}
|
|
186
271
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
const icon = scope.icon();
|
|
192
|
-
|
|
193
|
-
const titleElement = document.createElement('div');
|
|
194
|
-
titleElement.classList.add('scope-chain-sidebar-pane-section-header');
|
|
195
|
-
titleElement.classList.add('tree-element-title');
|
|
196
|
-
if (icon) {
|
|
197
|
-
const iconElement = document.createElement('img');
|
|
198
|
-
iconElement.classList.add('scope-chain-sidebar-pane-section-icon');
|
|
199
|
-
iconElement.src = icon;
|
|
200
|
-
titleElement.appendChild(iconElement);
|
|
201
|
-
}
|
|
202
|
-
titleElement.createChild('div', 'scope-chain-sidebar-pane-section-subtitle').textContent = subtitle;
|
|
203
|
-
titleElement.createChild('div', 'scope-chain-sidebar-pane-section-title').textContent = title;
|
|
204
|
-
|
|
205
|
-
const root = new ObjectUI.ObjectPropertiesSection.ObjectTree(
|
|
206
|
-
scope.object(), {propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.ALL, readOnly: false});
|
|
207
|
-
root.addExtraProperties(...scope.extraProperties());
|
|
208
|
-
const section = new ObjectUI.ObjectPropertiesSection.RootElement(root, this.linkifier, emptyPlaceholder);
|
|
209
|
-
section.title = titleElement;
|
|
210
|
-
section.listItemElement.classList.add('scope-chain-sidebar-pane-section');
|
|
211
|
-
section.listItemElement.setAttribute('aria-label', title);
|
|
212
|
-
this.expandController.watchSection(title + (subtitle ? ':' + subtitle : ''), section);
|
|
213
|
-
|
|
214
|
-
return section;
|
|
272
|
+
|
|
273
|
+
this.requestUpdate();
|
|
274
|
+
void this.updateComplete.then(() => this.sidebarPaneUpdatedForTest());
|
|
215
275
|
}
|
|
216
276
|
|
|
277
|
+
/**
|
|
278
|
+
* @deprecated Hook for legacy web tests
|
|
279
|
+
*/
|
|
217
280
|
sidebarPaneUpdatedForTest(): void {
|
|
218
281
|
}
|
|
219
282
|
}
|
|
@@ -192,6 +192,7 @@ export class IgnoreListSetting extends UI.Widget.Widget {
|
|
|
192
192
|
Common.Settings.Settings.instance()
|
|
193
193
|
.moduleSetting('enable-ignore-listing')
|
|
194
194
|
.addChangeListener(this.requestUpdate.bind(this));
|
|
195
|
+
this.requestUpdate();
|
|
195
196
|
}
|
|
196
197
|
|
|
197
198
|
#getSkipStackFramesPatternSetting(): Common.Settings.RegExpSetting {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: d56b17376efe8dc18fbf38aee20fe155821dd910
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Name: Marked
|
|
2
2
|
Short Name: marked
|
|
3
3
|
URL: https://github.com/markedjs/marked
|
|
4
|
-
Version:
|
|
5
|
-
Revision:
|
|
4
|
+
Version: 18.0.4
|
|
5
|
+
Revision: 0a2cd54cbe91911890e4460ae4fd7b9966e05654
|
|
6
6
|
Update Mechanism: Manual
|
|
7
7
|
License: BSD-3-Clause, MIT
|
|
8
8
|
License File: LICENSE
|
|
@@ -14,8 +14,5 @@ Light-weight markdown parser and renderer.
|
|
|
14
14
|
|
|
15
15
|
To update this package, run the following command (replace version number with updated version number):
|
|
16
16
|
```bash
|
|
17
|
-
wget -qO- https://registry.npmjs.org/marked/-/marked-
|
|
17
|
+
wget -qO- https://registry.npmjs.org/marked/-/marked-18.0.4.tgz | tar xzf -
|
|
18
18
|
```
|
|
19
|
-
|
|
20
|
-
Local Modifications:
|
|
21
|
-
- Renamed marked.d.ts to marked.esm.d.ts for TypeScript typechecking.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
# Marked
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/marked)
|
|
8
|
-
[](https://cdn.jsdelivr.net/npm/marked/marked.min.js)
|
|
9
8
|
[](https://packagephobia.now.sh/result?p=marked)
|
|
10
9
|
[](https://www.npmjs.com/package/marked)
|
|
11
10
|
[](https://github.com/markedjs/marked/actions)
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
|
|
19
18
|
## Demo
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
Check out the [demo page](https://marked.js.org/demo/) to see Marked in action ⛹️
|
|
22
21
|
|
|
23
22
|
## Docs
|
|
24
23
|
|
|
@@ -33,7 +32,7 @@ Also read about:
|
|
|
33
32
|
|
|
34
33
|
**Node.js:** Only [current and LTS](https://nodejs.org/en/about/releases/) Node.js versions are supported. End of life Node.js versions may become incompatible with Marked at any point in time.
|
|
35
34
|
|
|
36
|
-
**Browser:**
|
|
35
|
+
**Browser:** [Baseline Widely Available](https://developer.mozilla.org/en-US/docs/Glossary/Baseline/Compatibility)
|
|
37
36
|
|
|
38
37
|
## Installation
|
|
39
38
|
|
|
@@ -84,7 +83,7 @@ $ marked --help
|
|
|
84
83
|
</head>
|
|
85
84
|
<body>
|
|
86
85
|
<div id="content"></div>
|
|
87
|
-
<script src="https://cdn.jsdelivr.net/npm/marked/marked.
|
|
86
|
+
<script src="https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js"></script>
|
|
88
87
|
<script>
|
|
89
88
|
document.getElementById('content').innerHTML =
|
|
90
89
|
marked.parse('# Marked in the browser\n\nRendered by **marked**.');
|
|
@@ -104,4 +103,5 @@ or import esm module
|
|
|
104
103
|
|
|
105
104
|
## License
|
|
106
105
|
|
|
107
|
-
Copyright (c)
|
|
106
|
+
Copyright (c) 2018+, MarkedJS. (MIT License)
|
|
107
|
+
Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Marked CLI
|
|
5
|
-
* Copyright (c)
|
|
5
|
+
* Copyright (c) 2018+, MarkedJS. (MIT License)
|
|
6
|
+
* Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License)
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
import { promises } from 'node:fs';
|
|
9
10
|
import { dirname, resolve } from 'node:path';
|
|
10
11
|
import { homedir } from 'node:os';
|
|
11
12
|
import { createRequire } from 'node:module';
|
|
13
|
+
import { pathToFileURL } from 'node:url';
|
|
12
14
|
import { marked } from '../lib/marked.esm.js';
|
|
13
15
|
|
|
14
16
|
const { access, readFile, writeFile } = promises;
|
|
@@ -28,18 +30,21 @@ export async function main(nodeProcess) {
|
|
|
28
30
|
const options = {
|
|
29
31
|
cwd: nodeProcess.cwd(),
|
|
30
32
|
env: nodeProcess.env,
|
|
31
|
-
stdio: 'inherit'
|
|
33
|
+
stdio: 'inherit',
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
35
37
|
const helpText = await readFile(resolve(__dirname, '../man/marked.1.md'), 'utf8');
|
|
36
38
|
|
|
37
|
-
// eslint-disable-next-line promise/param-names
|
|
38
39
|
await new Promise(res => {
|
|
39
|
-
spawn('man', [resolve(__dirname, '../man/marked.1')], options)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const manProcess = spawn('man', [resolve(__dirname, '../man/marked.1')], options);
|
|
41
|
+
nodeProcess.on('SIGINT', () => {
|
|
42
|
+
manProcess.kill('SIGINT');
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
manProcess.on('error', () => {
|
|
46
|
+
console.log(helpText);
|
|
47
|
+
})
|
|
43
48
|
.on('close', res);
|
|
44
49
|
});
|
|
45
50
|
}
|
|
@@ -128,7 +133,7 @@ export async function main(nodeProcess) {
|
|
|
128
133
|
default:
|
|
129
134
|
if (arg.indexOf('--') === 0) {
|
|
130
135
|
opt = camelize(arg.replace(/^--(no-)?/, ''));
|
|
131
|
-
if (!marked.defaults
|
|
136
|
+
if (!(opt in marked.defaults)) {
|
|
132
137
|
continue;
|
|
133
138
|
}
|
|
134
139
|
if (arg.indexOf('--no-') === 0) {
|
|
@@ -148,16 +153,16 @@ export async function main(nodeProcess) {
|
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
async function getData() {
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
if (string) {
|
|
157
|
+
return string;
|
|
158
|
+
}
|
|
159
|
+
if (input) {
|
|
160
|
+
return await readFile(input, 'utf8');
|
|
161
|
+
}
|
|
162
|
+
if (files.length > 0) {
|
|
163
|
+
return await readFile(files.pop(), 'utf8');
|
|
159
164
|
}
|
|
160
|
-
return await
|
|
165
|
+
return await getStdin();
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
function resolveFile(file) {
|
|
@@ -174,12 +179,12 @@ export async function main(nodeProcess) {
|
|
|
174
179
|
try {
|
|
175
180
|
// try require for json
|
|
176
181
|
markedConfig = require(configFile);
|
|
177
|
-
} catch
|
|
182
|
+
} catch(err) {
|
|
178
183
|
if (err.code !== 'ERR_REQUIRE_ESM') {
|
|
179
184
|
throw err;
|
|
180
185
|
}
|
|
181
186
|
// must import esm
|
|
182
|
-
markedConfig = await import(
|
|
187
|
+
markedConfig = await import(pathToFileURL(configFile).href);
|
|
183
188
|
}
|
|
184
189
|
|
|
185
190
|
if (markedConfig.default) {
|
|
@@ -205,7 +210,7 @@ export async function main(nodeProcess) {
|
|
|
205
210
|
const defaultConfig = [
|
|
206
211
|
'~/.marked.json',
|
|
207
212
|
'~/.marked.js',
|
|
208
|
-
'~/.marked/index.js'
|
|
213
|
+
'~/.marked/index.js',
|
|
209
214
|
];
|
|
210
215
|
|
|
211
216
|
for (const configFile of defaultConfig) {
|
|
@@ -266,9 +271,9 @@ export async function main(nodeProcess) {
|
|
|
266
271
|
}
|
|
267
272
|
|
|
268
273
|
try {
|
|
269
|
-
await start(nodeProcess.argv.slice());
|
|
274
|
+
await start(nodeProcess.argv.slice(2));
|
|
270
275
|
nodeProcess.exit(0);
|
|
271
|
-
} catch
|
|
276
|
+
} catch(err) {
|
|
272
277
|
if (err.code === 'ENOENT') {
|
|
273
278
|
nodeProcess.stderr.write('marked: ' + err.path + ': No such file or directory');
|
|
274
279
|
} else {
|