devtools-tracing 1.0.1 → 1.1.1

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.
Files changed (132) hide show
  1. package/generate.ts +32 -26
  2. package/index.ts +2 -1
  3. package/lib/extension-api/ExtensionAPI.d.ts +357 -0
  4. package/lib/front_end/models/bindings/CSSWorkspaceBinding.ts +318 -0
  5. package/lib/front_end/models/bindings/CompilerScriptMapping.ts +536 -0
  6. package/lib/front_end/models/bindings/ContentProviderBasedProject.ts +187 -0
  7. package/lib/front_end/models/bindings/DebuggerLanguagePlugins.ts +1197 -0
  8. package/lib/front_end/models/bindings/DebuggerWorkspaceBinding.ts +733 -0
  9. package/lib/front_end/models/bindings/DefaultScriptMapping.ts +141 -0
  10. package/lib/front_end/models/bindings/FileUtils.ts +228 -0
  11. package/lib/front_end/models/bindings/LiveLocation.ts +81 -0
  12. package/lib/front_end/models/bindings/NetworkProject.ts +157 -0
  13. package/lib/front_end/models/bindings/PresentationConsoleMessageHelper.ts +312 -0
  14. package/lib/front_end/models/bindings/ResourceMapping.ts +539 -0
  15. package/lib/front_end/models/bindings/ResourceScriptMapping.ts +491 -0
  16. package/lib/front_end/models/bindings/ResourceUtils.ts +103 -0
  17. package/lib/front_end/models/bindings/SASSSourceMapping.ts +222 -0
  18. package/lib/front_end/models/bindings/StylesSourceMapping.ts +316 -0
  19. package/lib/front_end/models/bindings/TempFile.ts +67 -0
  20. package/lib/front_end/models/bindings/bindings.ts +39 -0
  21. package/lib/front_end/models/source_map_scopes/NamesResolver.ts +765 -0
  22. package/lib/front_end/models/source_map_scopes/ScopeChainModel.ts +84 -0
  23. package/lib/front_end/models/source_map_scopes/source_map_scopes.ts +11 -0
  24. package/lib/front_end/models/stack_trace/StackTrace.ts +53 -0
  25. package/lib/front_end/models/stack_trace/StackTraceImpl.ts +85 -0
  26. package/lib/front_end/models/stack_trace/StackTraceModel.ts +128 -0
  27. package/lib/front_end/models/stack_trace/Trie.ts +163 -0
  28. package/lib/front_end/models/stack_trace/stack_trace.ts +9 -0
  29. package/lib/front_end/models/stack_trace/stack_trace_impl.ts +13 -0
  30. package/lib/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +240 -0
  31. package/lib/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +5 -0
  32. package/lib/front_end/models/workspace/FileManager.ts +97 -0
  33. package/lib/front_end/models/workspace/IgnoreListManager.ts +628 -0
  34. package/lib/front_end/models/workspace/SearchConfig.ts +149 -0
  35. package/lib/front_end/models/workspace/UISourceCode.ts +698 -0
  36. package/lib/front_end/models/workspace/WorkspaceImpl.ts +339 -0
  37. package/lib/front_end/models/workspace/workspace.ts +17 -0
  38. package/lib/front_end/panels/timeline/TimelineUIUtils.ts +1029 -0
  39. package/lib/front_end/panels/timeline/extensions/ExtensionUI.ts +49 -0
  40. package/lib/front_end/panels/timeline/extensions/extensions.ts +9 -0
  41. package/lib/front_end/third_party/codemirror.next/LICENSE +21 -0
  42. package/lib/front_end/third_party/codemirror.next/README.chromium +30 -0
  43. package/lib/front_end/third_party/codemirror.next/bundle-tsconfig.json +24 -0
  44. package/lib/front_end/third_party/codemirror.next/bundle.ts +135 -0
  45. package/lib/front_end/third_party/codemirror.next/chunk/angular.js +2 -0
  46. package/lib/front_end/third_party/codemirror.next/chunk/angular.js.map +1 -0
  47. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js +2 -0
  48. package/lib/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -0
  49. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js +2 -0
  50. package/lib/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -0
  51. package/lib/front_end/third_party/codemirror.next/chunk/css.js +2 -0
  52. package/lib/front_end/third_party/codemirror.next/chunk/html.js +4 -0
  53. package/lib/front_end/third_party/codemirror.next/chunk/java.js +2 -0
  54. package/lib/front_end/third_party/codemirror.next/chunk/java.js.map +1 -0
  55. package/lib/front_end/third_party/codemirror.next/chunk/javascript.js +2 -0
  56. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js +2 -0
  57. package/lib/front_end/third_party/codemirror.next/chunk/legacy.js.map +1 -0
  58. package/lib/front_end/third_party/codemirror.next/chunk/less.js +2 -0
  59. package/lib/front_end/third_party/codemirror.next/chunk/less.js.map +1 -0
  60. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js +2 -0
  61. package/lib/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -0
  62. package/lib/front_end/third_party/codemirror.next/chunk/php.js +2 -0
  63. package/lib/front_end/third_party/codemirror.next/chunk/php.js.map +1 -0
  64. package/lib/front_end/third_party/codemirror.next/chunk/python.js +2 -0
  65. package/lib/front_end/third_party/codemirror.next/chunk/python.js.map +1 -0
  66. package/lib/front_end/third_party/codemirror.next/chunk/sass.js +2 -0
  67. package/lib/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -0
  68. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js +2 -0
  69. package/lib/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -0
  70. package/lib/front_end/third_party/codemirror.next/chunk/vue.js +2 -0
  71. package/lib/front_end/third_party/codemirror.next/chunk/vue.js.map +1 -0
  72. package/lib/front_end/third_party/codemirror.next/chunk/wast.js +2 -0
  73. package/lib/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -0
  74. package/lib/front_end/third_party/codemirror.next/chunk/xml.js +2 -0
  75. package/lib/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -0
  76. package/lib/front_end/third_party/codemirror.next/codemirror.next.d.ts +8057 -0
  77. package/lib/front_end/third_party/codemirror.next/codemirror.next.js +2 -0
  78. package/lib/front_end/third_party/codemirror.next/codemirror.next.js.map +1 -0
  79. package/lib/front_end/third_party/codemirror.next/package.json +43 -0
  80. package/lib/front_end/third_party/codemirror.next/rebuild.sh +6 -0
  81. package/lib/front_end/third_party/codemirror.next/rollup.config.mjs +49 -0
  82. package/lib/front_end/third_party/source-map-scopes-codec/LICENSE +26 -0
  83. package/lib/front_end/third_party/source-map-scopes-codec/README.chromium +31 -0
  84. package/lib/front_end/third_party/source-map-scopes-codec/package/CONTRIBUTING.md +33 -0
  85. package/lib/front_end/third_party/source-map-scopes-codec/package/LICENSE +26 -0
  86. package/lib/front_end/third_party/source-map-scopes-codec/package/README.md +64 -0
  87. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts +62 -0
  88. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/builder.d.ts.map +1 -0
  89. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts +37 -0
  90. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/builder/safe_builder.d.ts.map +1 -0
  91. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +29 -0
  92. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -0
  93. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts +8 -0
  94. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/encode/encode.d.ts.map +1 -0
  95. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +6 -0
  96. package/lib/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +1 -0
  97. package/lib/front_end/third_party/source-map-scopes-codec/package/deno.json +21 -0
  98. package/lib/front_end/third_party/source-map-scopes-codec/package/package.json +14 -0
  99. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +196 -0
  100. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js.map +1 -0
  101. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.ts +262 -0
  102. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +235 -0
  103. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js.map +1 -0
  104. package/lib/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.ts +359 -0
  105. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js +39 -0
  106. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.js.map +1 -0
  107. package/lib/front_end/third_party/source-map-scopes-codec/package/src/codec.ts +53 -0
  108. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +438 -0
  109. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -0
  110. package/lib/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +539 -0
  111. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +23 -0
  112. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js.map +1 -0
  113. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.ts +35 -0
  114. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +257 -0
  115. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js.map +1 -0
  116. package/lib/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.ts +348 -0
  117. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js +8 -0
  118. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +1 -0
  119. package/lib/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +20 -0
  120. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes-tsconfig.json +8 -0
  121. package/lib/front_end/third_party/source-map-scopes-codec/package/src/scopes.d.ts +184 -0
  122. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js +9 -0
  123. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.js.map +1 -0
  124. package/lib/front_end/third_party/source-map-scopes-codec/package/src/util.ts +12 -0
  125. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +82 -0
  126. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.js.map +1 -0
  127. package/lib/front_end/third_party/source-map-scopes-codec/package/src/vlq.ts +99 -0
  128. package/lib/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.ts +5 -0
  129. package/lib/front_end/ui/legacy/theme_support/ThemeSupport.ts +222 -0
  130. package/lib/front_end/ui/legacy/theme_support/theme_support.ts +5 -0
  131. package/package.json +5 -5
  132. package/patches/chrome-devtools-frontend+1.0.1533544.patch +1549 -20
@@ -0,0 +1,196 @@
1
+ // Copyright 2025 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ /**
5
+ * Small utility class to build scope and range trees.
6
+ *
7
+ * This class allows construction of scope/range trees that will be rejected by the encoder.
8
+ * Use this class if you guarantee proper nesting yourself and don't want to pay for the
9
+ * checks, otherwise use the `SafeScopeInfoBuilder`.
10
+ *
11
+ * This class will also silently ignore calls that would fail otherwise. E.g. calling
12
+ * `end*` without a matching `start*`.
13
+ */ export class ScopeInfoBuilder {
14
+ #scopes = [];
15
+ #ranges = [];
16
+ #scopeStack = [];
17
+ #rangeStack = [];
18
+ #knownScopes = new Set();
19
+ #keyToScope = new Map();
20
+ #lastScope = null;
21
+ addNullScope() {
22
+ this.#scopes.push(null);
23
+ return this;
24
+ }
25
+ startScope(line, column, options) {
26
+ const scope = {
27
+ start: {
28
+ line,
29
+ column
30
+ },
31
+ end: {
32
+ line,
33
+ column
34
+ },
35
+ variables: options?.variables?.slice(0) ?? [],
36
+ children: [],
37
+ isStackFrame: Boolean(options?.isStackFrame)
38
+ };
39
+ if (options?.name !== undefined) scope.name = options.name;
40
+ if (options?.kind !== undefined) scope.kind = options.kind;
41
+ if (this.#scopeStack.length > 0) {
42
+ scope.parent = this.#scopeStack.at(-1);
43
+ }
44
+ this.#scopeStack.push(scope);
45
+ this.#knownScopes.add(scope);
46
+ if (options?.key !== undefined) this.#keyToScope.set(options.key, scope);
47
+ return this;
48
+ }
49
+ setScopeName(name) {
50
+ const scope = this.#scopeStack.at(-1);
51
+ if (scope) scope.name = name;
52
+ return this;
53
+ }
54
+ setScopeKind(kind) {
55
+ const scope = this.#scopeStack.at(-1);
56
+ if (scope) scope.kind = kind;
57
+ return this;
58
+ }
59
+ setScopeStackFrame(isStackFrame) {
60
+ const scope = this.#scopeStack.at(-1);
61
+ if (scope) scope.isStackFrame = isStackFrame;
62
+ return this;
63
+ }
64
+ setScopeVariables(variables) {
65
+ const scope = this.#scopeStack.at(-1);
66
+ if (scope) scope.variables = variables.slice(0);
67
+ return this;
68
+ }
69
+ endScope(line, column) {
70
+ const scope = this.#scopeStack.pop();
71
+ if (!scope) return this;
72
+ scope.end = {
73
+ line,
74
+ column
75
+ };
76
+ if (this.#scopeStack.length === 0) {
77
+ this.#scopes.push(scope);
78
+ } else {
79
+ this.#scopeStack.at(-1).children.push(scope);
80
+ }
81
+ this.#lastScope = scope;
82
+ return this;
83
+ }
84
+ /**
85
+ * @returns The OriginalScope opened with the most recent `startScope` call, but not yet closed.
86
+ */ currentScope() {
87
+ return this.#scopeStack.at(-1) ?? null;
88
+ }
89
+ /**
90
+ * @returns The most recent OriginalScope closed with `endScope`.
91
+ */ lastScope() {
92
+ return this.#lastScope;
93
+ }
94
+ /**
95
+ * @param option The definition 'scope' of this range can either be the "OriginalScope" directly
96
+ * (produced by this builder) or the scope's key set while building the scope.
97
+ */ startRange(line, column, options) {
98
+ const range = {
99
+ start: {
100
+ line,
101
+ column
102
+ },
103
+ end: {
104
+ line,
105
+ column
106
+ },
107
+ isStackFrame: Boolean(options?.isStackFrame),
108
+ isHidden: Boolean(options?.isHidden),
109
+ values: options?.values ?? [],
110
+ children: []
111
+ };
112
+ if (this.#rangeStack.length > 0) {
113
+ range.parent = this.#rangeStack.at(-1);
114
+ }
115
+ if (options?.scope !== undefined) {
116
+ range.originalScope = options.scope;
117
+ } else if (options?.scopeKey !== undefined) {
118
+ range.originalScope = this.#keyToScope.get(options.scopeKey);
119
+ }
120
+ if (options?.callSite) {
121
+ range.callSite = options.callSite;
122
+ }
123
+ this.#rangeStack.push(range);
124
+ return this;
125
+ }
126
+ setRangeDefinitionScope(scope) {
127
+ const range = this.#rangeStack.at(-1);
128
+ if (range) range.originalScope = scope;
129
+ return this;
130
+ }
131
+ setRangeDefinitionScopeKey(scopeKey) {
132
+ const range = this.#rangeStack.at(-1);
133
+ if (range) range.originalScope = this.#keyToScope.get(scopeKey);
134
+ return this;
135
+ }
136
+ setRangeStackFrame(isStackFrame) {
137
+ const range = this.#rangeStack.at(-1);
138
+ if (range) range.isStackFrame = isStackFrame;
139
+ return this;
140
+ }
141
+ setRangeHidden(isHidden) {
142
+ const range = this.#rangeStack.at(-1);
143
+ if (range) range.isHidden = isHidden;
144
+ return this;
145
+ }
146
+ setRangeValues(values) {
147
+ const range = this.#rangeStack.at(-1);
148
+ if (range) range.values = values;
149
+ return this;
150
+ }
151
+ setRangeCallSite(callSite) {
152
+ const range = this.#rangeStack.at(-1);
153
+ if (range) range.callSite = callSite;
154
+ return this;
155
+ }
156
+ endRange(line, column) {
157
+ const range = this.#rangeStack.pop();
158
+ if (!range) return this;
159
+ range.end = {
160
+ line,
161
+ column
162
+ };
163
+ if (this.#rangeStack.length === 0) {
164
+ this.#ranges.push(range);
165
+ } else {
166
+ this.#rangeStack.at(-1).children.push(range);
167
+ }
168
+ return this;
169
+ }
170
+ build() {
171
+ const info = {
172
+ scopes: this.#scopes,
173
+ ranges: this.#ranges
174
+ };
175
+ this.#scopes = [];
176
+ this.#ranges = [];
177
+ this.#knownScopes.clear();
178
+ return info;
179
+ }
180
+ get scopeStack() {
181
+ return this.#scopeStack;
182
+ }
183
+ get rangeStack() {
184
+ return this.#rangeStack;
185
+ }
186
+ isKnownScope(scope) {
187
+ return this.#knownScopes.has(scope);
188
+ }
189
+ isValidScopeKey(key) {
190
+ return this.#keyToScope.has(key);
191
+ }
192
+ getScopeByValidKey(key) {
193
+ return this.#keyToScope.get(key);
194
+ }
195
+ }
196
+ //# sourceMappingURL=builder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builder.js","sources":["./builder.ts"],"names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,CAAC;EAC/B;EAEU,gBAAgB,GAAa,EAAW;IAChD,OAAO,IAAI,CAAC,CAAA,UAAW,CAAC,GAAG,CAAC;EAC9B;EAEU,mBAAmB,GAAa,EAAiB;IACzD,OAAO,IAAI,CAAC,CAAA,UAAW,CAAC,GAAG,CAAC;EAC9B;AACF"}
@@ -0,0 +1,262 @@
1
+ // Copyright 2025 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import type {
6
+ Binding,
7
+ GeneratedRange,
8
+ OriginalPosition,
9
+ OriginalScope,
10
+ ScopeInfo,
11
+ } from "../scopes.d.ts";
12
+
13
+ /**
14
+ * Small utility class to build scope and range trees.
15
+ *
16
+ * This class allows construction of scope/range trees that will be rejected by the encoder.
17
+ * Use this class if you guarantee proper nesting yourself and don't want to pay for the
18
+ * checks, otherwise use the `SafeScopeInfoBuilder`.
19
+ *
20
+ * This class will also silently ignore calls that would fail otherwise. E.g. calling
21
+ * `end*` without a matching `start*`.
22
+ */
23
+ export class ScopeInfoBuilder {
24
+ #scopes: (OriginalScope | null)[] = [];
25
+ #ranges: GeneratedRange[] = [];
26
+
27
+ #scopeStack: OriginalScope[] = [];
28
+ #rangeStack: GeneratedRange[] = [];
29
+
30
+ #knownScopes = new Set<OriginalScope>();
31
+ #keyToScope = new Map<ScopeKey, OriginalScope>();
32
+ #lastScope: OriginalScope | null = null;
33
+
34
+ addNullScope(): this {
35
+ this.#scopes.push(null);
36
+ return this;
37
+ }
38
+
39
+ startScope(
40
+ line: number,
41
+ column: number,
42
+ options?: {
43
+ name?: string;
44
+ kind?: string;
45
+ isStackFrame?: boolean;
46
+ variables?: string[];
47
+ key?: ScopeKey;
48
+ },
49
+ ): this {
50
+ const scope: OriginalScope = {
51
+ start: { line, column },
52
+ end: { line, column },
53
+ variables: options?.variables?.slice(0) ?? [],
54
+ children: [],
55
+ isStackFrame: Boolean(options?.isStackFrame),
56
+ };
57
+
58
+ if (options?.name !== undefined) scope.name = options.name;
59
+ if (options?.kind !== undefined) scope.kind = options.kind;
60
+
61
+ if (this.#scopeStack.length > 0) {
62
+ scope.parent = this.#scopeStack.at(-1);
63
+ }
64
+ this.#scopeStack.push(scope);
65
+ this.#knownScopes.add(scope);
66
+ if (options?.key !== undefined) this.#keyToScope.set(options.key, scope);
67
+
68
+ return this;
69
+ }
70
+
71
+ setScopeName(name: string): this {
72
+ const scope = this.#scopeStack.at(-1);
73
+ if (scope) scope.name = name;
74
+ return this;
75
+ }
76
+
77
+ setScopeKind(kind: string): this {
78
+ const scope = this.#scopeStack.at(-1);
79
+ if (scope) scope.kind = kind;
80
+ return this;
81
+ }
82
+
83
+ setScopeStackFrame(isStackFrame: boolean): this {
84
+ const scope = this.#scopeStack.at(-1);
85
+ if (scope) scope.isStackFrame = isStackFrame;
86
+ return this;
87
+ }
88
+
89
+ setScopeVariables(variables: string[]): this {
90
+ const scope = this.#scopeStack.at(-1);
91
+ if (scope) scope.variables = variables.slice(0);
92
+
93
+ return this;
94
+ }
95
+
96
+ endScope(line: number, column: number): this {
97
+ const scope = this.#scopeStack.pop();
98
+ if (!scope) return this;
99
+
100
+ scope.end = { line, column };
101
+
102
+ if (this.#scopeStack.length === 0) {
103
+ this.#scopes.push(scope);
104
+ } else {
105
+ this.#scopeStack.at(-1)!.children.push(scope);
106
+ }
107
+ this.#lastScope = scope;
108
+
109
+ return this;
110
+ }
111
+
112
+ /**
113
+ * @returns The OriginalScope opened with the most recent `startScope` call, but not yet closed.
114
+ */
115
+ currentScope(): OriginalScope | null {
116
+ return this.#scopeStack.at(-1) ?? null;
117
+ }
118
+
119
+ /**
120
+ * @returns The most recent OriginalScope closed with `endScope`.
121
+ */
122
+ lastScope(): OriginalScope | null {
123
+ return this.#lastScope;
124
+ }
125
+
126
+ /**
127
+ * @param option The definition 'scope' of this range can either be the "OriginalScope" directly
128
+ * (produced by this builder) or the scope's key set while building the scope.
129
+ */
130
+ startRange(
131
+ line: number,
132
+ column: number,
133
+ options?: {
134
+ scope?: OriginalScope;
135
+ scopeKey?: ScopeKey;
136
+ isStackFrame?: boolean;
137
+ isHidden?: boolean;
138
+ values?: Binding[];
139
+ callSite?: OriginalPosition;
140
+ },
141
+ ): this {
142
+ const range: GeneratedRange = {
143
+ start: { line, column },
144
+ end: { line, column },
145
+ isStackFrame: Boolean(options?.isStackFrame),
146
+ isHidden: Boolean(options?.isHidden),
147
+ values: options?.values ?? [],
148
+ children: [],
149
+ };
150
+
151
+ if (this.#rangeStack.length > 0) {
152
+ range.parent = this.#rangeStack.at(-1);
153
+ }
154
+
155
+ if (options?.scope !== undefined) {
156
+ range.originalScope = options.scope;
157
+ } else if (options?.scopeKey !== undefined) {
158
+ range.originalScope = this.#keyToScope.get(options.scopeKey);
159
+ }
160
+
161
+ if (options?.callSite) {
162
+ range.callSite = options.callSite;
163
+ }
164
+
165
+ this.#rangeStack.push(range);
166
+
167
+ return this;
168
+ }
169
+
170
+ setRangeDefinitionScope(scope: OriginalScope): this {
171
+ const range = this.#rangeStack.at(-1);
172
+ if (range) range.originalScope = scope;
173
+ return this;
174
+ }
175
+
176
+ setRangeDefinitionScopeKey(scopeKey: ScopeKey): this {
177
+ const range = this.#rangeStack.at(-1);
178
+ if (range) range.originalScope = this.#keyToScope.get(scopeKey);
179
+ return this;
180
+ }
181
+
182
+ setRangeStackFrame(isStackFrame: boolean): this {
183
+ const range = this.#rangeStack.at(-1);
184
+ if (range) range.isStackFrame = isStackFrame;
185
+
186
+ return this;
187
+ }
188
+
189
+ setRangeHidden(isHidden: boolean): this {
190
+ const range = this.#rangeStack.at(-1);
191
+ if (range) range.isHidden = isHidden;
192
+
193
+ return this;
194
+ }
195
+
196
+ setRangeValues(values: Binding[]): this {
197
+ const range = this.#rangeStack.at(-1);
198
+ if (range) range.values = values;
199
+
200
+ return this;
201
+ }
202
+
203
+ setRangeCallSite(callSite: OriginalPosition): this {
204
+ const range = this.#rangeStack.at(-1);
205
+ if (range) range.callSite = callSite;
206
+
207
+ return this;
208
+ }
209
+
210
+ endRange(line: number, column: number): this {
211
+ const range = this.#rangeStack.pop();
212
+ if (!range) return this;
213
+
214
+ range.end = { line, column };
215
+
216
+ if (this.#rangeStack.length === 0) {
217
+ this.#ranges.push(range);
218
+ } else {
219
+ this.#rangeStack.at(-1)!.children.push(range);
220
+ }
221
+
222
+ return this;
223
+ }
224
+
225
+ build(): ScopeInfo {
226
+ const info: ScopeInfo = { scopes: this.#scopes, ranges: this.#ranges };
227
+
228
+ this.#scopes = [];
229
+ this.#ranges = [];
230
+ this.#knownScopes.clear();
231
+
232
+ return info;
233
+ }
234
+
235
+ protected get scopeStack(): ReadonlyArray<OriginalScope> {
236
+ return this.#scopeStack;
237
+ }
238
+
239
+ protected get rangeStack(): ReadonlyArray<GeneratedRange> {
240
+ return this.#rangeStack;
241
+ }
242
+
243
+ protected isKnownScope(scope: OriginalScope): boolean {
244
+ return this.#knownScopes.has(scope);
245
+ }
246
+
247
+ protected isValidScopeKey(key: ScopeKey): boolean {
248
+ return this.#keyToScope.has(key);
249
+ }
250
+
251
+ protected getScopeByValidKey(key: ScopeKey): OriginalScope {
252
+ return this.#keyToScope.get(key)!;
253
+ }
254
+ }
255
+
256
+ /**
257
+ * Users of the {@link ScopeInfoBuilder} can provide their own keys to uniquely identify a scope,
258
+ * and use the key later when building the corresponding range to connect them.
259
+ *
260
+ * The only requirement for ScopeKey is that it can be used as a key in a `Map`.
261
+ */
262
+ export type ScopeKey = unknown;
@@ -0,0 +1,235 @@
1
+ // Copyright 2025 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+ import { comparePositions } from "../util.js";
5
+ import { ScopeInfoBuilder } from "./builder.js";
6
+ /**
7
+ * Similar to `ScopeInfoBuilder`, but with checks that scopes/ranges are well
8
+ * nested and don't partially overlap.
9
+ */ export class SafeScopeInfoBuilder extends ScopeInfoBuilder {
10
+ addNullScope() {
11
+ this.#verifyEmptyScopeStack("add null scope");
12
+ this.#verifyEmptyRangeStack("add null scope");
13
+ super.addNullScope();
14
+ return this;
15
+ }
16
+ startScope(line, column, options) {
17
+ this.#verifyEmptyRangeStack("start scope");
18
+ const parent = this.scopeStack.at(-1);
19
+ if (parent && comparePositions(parent.start, {
20
+ line,
21
+ column
22
+ }) > 0) {
23
+ throw new Error(`Scope start (${line}, ${column}) must not precede parent start (${parent.start.line}, ${parent.start.column})`);
24
+ }
25
+ const precedingSibling = parent?.children.at(-1);
26
+ if (precedingSibling && comparePositions(precedingSibling.end, {
27
+ line,
28
+ column
29
+ }) > 0) {
30
+ throw new Error(`Scope start (${line}, ${column}) must not precede preceding siblings' end (${(precedingSibling.end.line, precedingSibling.end.column)})`);
31
+ }
32
+ super.startScope(line, column, options);
33
+ return this;
34
+ }
35
+ setScopeName(name) {
36
+ this.#verifyScopePresent("setScopeName");
37
+ this.#verifyEmptyRangeStack("setScopeName");
38
+ super.setScopeName(name);
39
+ return this;
40
+ }
41
+ setScopeKind(kind) {
42
+ this.#verifyScopePresent("setScopeKind");
43
+ this.#verifyEmptyRangeStack("setScopeKind");
44
+ super.setScopeKind(kind);
45
+ return this;
46
+ }
47
+ setScopeStackFrame(isStackFrame) {
48
+ this.#verifyScopePresent("setScopeStackFrame");
49
+ this.#verifyEmptyRangeStack("setScopeStackFrame");
50
+ super.setScopeStackFrame(isStackFrame);
51
+ return this;
52
+ }
53
+ setScopeVariables(variables) {
54
+ this.#verifyScopePresent("setScopeVariables");
55
+ this.#verifyEmptyRangeStack("setScopeVariables");
56
+ super.setScopeVariables(variables);
57
+ return this;
58
+ }
59
+ endScope(line, column) {
60
+ this.#verifyEmptyRangeStack("end scope");
61
+ if (this.scopeStack.length === 0) {
62
+ throw new Error("No scope to end");
63
+ }
64
+ const scope = this.scopeStack.at(-1);
65
+ if (comparePositions(scope.start, {
66
+ line,
67
+ column
68
+ }) > 0) {
69
+ throw new Error(`Scope end (${line}, ${column}) must not precede scope start (${scope.start.line}, ${scope.start.column})`);
70
+ }
71
+ super.endScope(line, column);
72
+ return this;
73
+ }
74
+ startRange(line, column, options) {
75
+ this.#verifyEmptyScopeStack("starRange");
76
+ const parent = this.rangeStack.at(-1);
77
+ if (parent && comparePositions(parent.start, {
78
+ line,
79
+ column
80
+ }) > 0) {
81
+ throw new Error(`Range start (${line}, ${column}) must not precede parent start (${parent.start.line}, ${parent.start.column})`);
82
+ }
83
+ const precedingSibling = parent?.children.at(-1);
84
+ if (precedingSibling && comparePositions(precedingSibling.end, {
85
+ line,
86
+ column
87
+ }) > 0) {
88
+ throw new Error(`Range start (${line}, ${column}) must not precede preceding siblings' end (${(precedingSibling.end.line, precedingSibling.end.column)})`);
89
+ }
90
+ if (options?.scopeKey !== undefined && !this.isValidScopeKey(options.scopeKey)) {
91
+ throw new Error(`${options.scopeKey} does not reference a valid OriginalScope`);
92
+ }
93
+ if (options?.scope && !this.isKnownScope(options.scope)) {
94
+ throw new Error("The provided definition scope was not produced by this builder!");
95
+ }
96
+ if (options?.values?.length && options?.scope === undefined && options?.scopeKey === undefined) {
97
+ throw new Error("Provided bindings without providing an OriginalScope");
98
+ } else if (options?.values?.length && options?.scope && options.values.length !== options.scope.variables.length) {
99
+ throw new Error("Provided bindings don't match up with OriginalScope.variables");
100
+ } else if (options?.values?.length && options?.scopeKey !== undefined) {
101
+ const scope = this.getScopeByValidKey(options.scopeKey);
102
+ if (options.values.length !== scope.variables.length) {
103
+ throw new Error("Provided bindings don't match up with OriginalScope.variables");
104
+ }
105
+ }
106
+ super.startRange(line, column, options);
107
+ return this;
108
+ }
109
+ setRangeDefinitionScope(scope) {
110
+ this.#verifyEmptyScopeStack("setRangeDefinitionScope");
111
+ this.#verifyRangePresent("setRangeDefinitionScope");
112
+ if (!this.isKnownScope(scope)) {
113
+ throw new Error("The provided definition scope was not produced by this builder!");
114
+ }
115
+ super.setRangeDefinitionScope(scope);
116
+ return this;
117
+ }
118
+ setRangeDefinitionScopeKey(scopeKey) {
119
+ this.#verifyEmptyScopeStack("setRangeDefinitionScope");
120
+ this.#verifyRangePresent("setRangeDefinitionScope");
121
+ if (!this.isValidScopeKey(scopeKey)) {
122
+ throw new Error(`The provided scope key ${scopeKey} is not know nto the builder!`);
123
+ }
124
+ super.setRangeDefinitionScopeKey(scopeKey);
125
+ return this;
126
+ }
127
+ setRangeStackFrame(isStackFrame) {
128
+ this.#verifyEmptyScopeStack("setRangeStackFrame");
129
+ this.#verifyRangePresent("setRangeStackFrame");
130
+ super.setRangeStackFrame(isStackFrame);
131
+ return this;
132
+ }
133
+ setRangeHidden(isHidden) {
134
+ this.#verifyEmptyScopeStack("setRangeHidden");
135
+ this.#verifyRangePresent("setRangeHidden");
136
+ super.setRangeHidden(isHidden);
137
+ return this;
138
+ }
139
+ setRangeValues(values) {
140
+ this.#verifyEmptyScopeStack("setRangeValues");
141
+ this.#verifyRangePresent("setRangeValues");
142
+ const range = this.rangeStack.at(-1);
143
+ if (!range.originalScope) {
144
+ throw new Error("Setting an OriginalScope for a range is required before value bindings can be provided!");
145
+ } else if (range.originalScope.variables.length !== values.length) {
146
+ throw new Error("Provided bindings don't match up with OriginalScope.variables");
147
+ }
148
+ super.setRangeValues(values);
149
+ return this;
150
+ }
151
+ setRangeCallSite(callSite) {
152
+ this.#verifyEmptyScopeStack("setRangeCallSite");
153
+ this.#verifyRangePresent("setRangeCallSite");
154
+ super.setRangeCallSite(callSite);
155
+ return this;
156
+ }
157
+ endRange(line, column) {
158
+ this.#verifyEmptyScopeStack("endRange");
159
+ if (this.rangeStack.length === 0) {
160
+ throw new Error("No range to end");
161
+ }
162
+ const range = this.rangeStack.at(-1);
163
+ if (comparePositions(range.start, {
164
+ line,
165
+ column
166
+ }) > 0) {
167
+ throw new Error(`Range end (${line}, ${column}) must not precede range start (${range.start.line}, ${range.start.column})`);
168
+ }
169
+ this.#verifyRangeValues(range, {
170
+ line,
171
+ column
172
+ });
173
+ super.endRange(line, column);
174
+ return this;
175
+ }
176
+ build() {
177
+ if (this.scopeStack.length > 0) {
178
+ throw new Error("Can't build ScopeInfo while an OriginalScope is unclosed.");
179
+ }
180
+ this.#verifyEmptyRangeStack("build ScopeInfo");
181
+ return super.build();
182
+ }
183
+ #verifyEmptyScopeStack(op) {
184
+ if (this.scopeStack.length > 0) {
185
+ throw new Error(`Can't ${op} while a OriginalScope is unclosed.`);
186
+ }
187
+ }
188
+ #verifyEmptyRangeStack(op) {
189
+ if (this.rangeStack.length > 0) {
190
+ throw new Error(`Can't ${op} while a GeneratedRange is unclosed.`);
191
+ }
192
+ }
193
+ #verifyScopePresent(op) {
194
+ if (this.scopeStack.length === 0) {
195
+ throw new Error(`Can't ${op} while no OriginalScope is on the stack.`);
196
+ }
197
+ }
198
+ #verifyRangePresent(op) {
199
+ if (this.rangeStack.length === 0) {
200
+ throw new Error(`Can't ${op} while no GeneratedRange is on the stack.`);
201
+ }
202
+ }
203
+ #verifyRangeValues(range, end) {
204
+ for (const value of range.values){
205
+ if (!Array.isArray(value)) {
206
+ continue;
207
+ }
208
+ const subRanges = value;
209
+ if (subRanges.length === 0) {
210
+ continue;
211
+ }
212
+ const first = subRanges.at(0);
213
+ if (comparePositions(first.from, range.start) !== 0) {
214
+ throw new Error(`Sub-range bindings must start at the generated range's start. Expected ${range.start.line}:${range.start.column}, but got ${first.from.line}:${first.from.column}`);
215
+ }
216
+ const last = subRanges.at(-1);
217
+ if (comparePositions(last.to, end) !== 0) {
218
+ throw new Error(`Sub-range bindings must end at the generated range's end. Expected ${end.line}:${end.column}, but got ${last.to.line}:${last.to.column}`);
219
+ }
220
+ for(let i = 0; i < subRanges.length; ++i){
221
+ const current = subRanges[i];
222
+ if (comparePositions(current.from, current.to) >= 0) {
223
+ throw new Error(`Sub-range binding 'from' (${current.from.line}:${current.from.column}) must precede 'to' (${current.to.line}:${current.to.column})`);
224
+ }
225
+ if (i > 0) {
226
+ const prev = subRanges[i - 1];
227
+ if (comparePositions(prev.to, current.from) !== 0) {
228
+ throw new Error(`Sub-range bindings must be sorted and not overlap. Found gap between ${prev.to.line}:${prev.to.column} and ${current.from.line}:${current.from.column}`);
229
+ }
230
+ }
231
+ }
232
+ }
233
+ }
234
+ }
235
+ //# sourceMappingURL=safe_builder.js.map