chrome-devtools-frontend 1.0.945579 → 1.0.946920

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 (100) hide show
  1. package/config/gni/all_devtools_files.gni +0 -7
  2. package/config/gni/devtools_grd_files.gni +3 -39
  3. package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
  4. package/front_end/core/host/UserMetrics.ts +0 -22
  5. package/front_end/core/i18n/locales/en-US.json +33 -27
  6. package/front_end/core/i18n/locales/en-XL.json +33 -27
  7. package/front_end/core/root/Runtime.ts +0 -1
  8. package/front_end/core/sdk/CSSProperty.ts +16 -9
  9. package/front_end/core/sdk/sdk-meta.ts +20 -8
  10. package/front_end/devtools_compatibility.js +1 -8
  11. package/front_end/entrypoints/devtools_app/devtools_app.js +3 -0
  12. package/front_end/entrypoints/devtools_app/devtools_app.json +1 -2
  13. package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -3
  14. package/front_end/entrypoints/formatter_worker/FormatterActions.ts +0 -2
  15. package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +0 -120
  16. package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -11
  17. package/front_end/entrypoints/formatter_worker/formatter_worker.ts +5 -0
  18. package/front_end/entrypoints/js_app/js_app.js +3 -0
  19. package/front_end/entrypoints/js_app/js_app.json +1 -2
  20. package/front_end/entrypoints/main/MainImpl.ts +0 -6
  21. package/front_end/entrypoints/ndb_app/ndb_app.js +3 -0
  22. package/front_end/entrypoints/ndb_app/ndb_app.json +1 -2
  23. package/front_end/entrypoints/{node_main → node_app}/NodeConnectionsPanel.ts +1 -1
  24. package/front_end/entrypoints/{node_main → node_app}/NodeMain.ts +2 -4
  25. package/front_end/entrypoints/{node_main → node_app}/nodeConnectionsPanel.css +0 -0
  26. package/front_end/entrypoints/node_app/node_app.ts +81 -0
  27. package/front_end/entrypoints/shell/shell.js +18 -1
  28. package/front_end/entrypoints/worker_app/worker_app.js +3 -0
  29. package/front_end/entrypoints/worker_app/worker_app.json +1 -2
  30. package/front_end/legacy_test_runner/sources_test_runner/sources_test_runner.js +0 -1
  31. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
  32. package/front_end/models/bindings/ResourceMapping.ts +1 -1
  33. package/front_end/models/formatter/FormatterWorkerPool.ts +0 -18
  34. package/front_end/models/text_utils/CodeMirrorUtils.ts +6 -51
  35. package/front_end/models/text_utils/TextUtils.ts +1 -2
  36. package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
  37. package/front_end/panels/animation/AnimationTimeline.ts +1 -1
  38. package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -4
  39. package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +0 -11
  40. package/front_end/panels/elements/StylesSidebarPane.ts +0 -1
  41. package/front_end/panels/elements/elementsTreeOutline.css +0 -13
  42. package/front_end/panels/emulation/DeviceModeToolbar.ts +0 -16
  43. package/front_end/panels/network/NetworkConfigView.ts +10 -0
  44. package/front_end/panels/network/NetworkItemView.ts +10 -1
  45. package/front_end/panels/network/networkConfigView.css +5 -0
  46. package/front_end/panels/profiler/heapProfiler.css +2 -5
  47. package/front_end/panels/profiler/profilesPanel.css +1 -1
  48. package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +6 -4
  49. package/front_end/panels/settings/emulation/components/userAgentClientHintsForm.css +0 -12
  50. package/front_end/panels/sources/DebuggerPlugin.ts +7 -3
  51. package/front_end/panels/sources/sourcesView.css +0 -130
  52. package/front_end/panels/timeline/TimelineTreeView.ts +1 -0
  53. package/front_end/panels/webauthn/WebauthnPane.ts +31 -32
  54. package/front_end/third_party/codemirror/codemirror-tsconfig.json +1 -25
  55. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  56. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1486 -1423
  57. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
  58. package/front_end/third_party/codemirror.next/package.json +9 -9
  59. package/front_end/ui/components/buttons/Button.ts +17 -0
  60. package/front_end/ui/components/buttons/button.css +31 -0
  61. package/front_end/ui/components/data_grid/DataGrid.ts +9 -0
  62. package/front_end/ui/components/docs/button/basic.ts +42 -0
  63. package/front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.ts +0 -8
  64. package/front_end/ui/components/text_editor/TextEditor.ts +5 -2
  65. package/front_end/ui/components/text_editor/config.ts +3 -3
  66. package/front_end/ui/components/text_editor/javascript.ts +28 -10
  67. package/front_end/ui/components/text_editor/theme.ts +1 -0
  68. package/front_end/ui/legacy/InspectorView.ts +10 -0
  69. package/front_end/ui/legacy/ListWidget.ts +2 -2
  70. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -3
  71. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +0 -1
  72. package/front_end/ui/legacy/components/object_ui/object_ui-legacy.ts +0 -8
  73. package/front_end/ui/legacy/components/object_ui/object_ui.ts +0 -4
  74. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +3 -0
  75. package/front_end/ui/legacy/inspectorSyntaxHighlight.css +0 -211
  76. package/front_end/ui/legacy/legacy-legacy.ts +0 -6
  77. package/front_end/ui/legacy/legacy.ts +0 -2
  78. package/front_end/ui/legacy/tabbedPane.css +1 -1
  79. package/package.json +1 -1
  80. package/scripts/check_gn.js +1 -1
  81. package/scripts/eslint_rules/lib/l10n_filename_matches.js +17 -4
  82. package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +21 -0
  83. package/scripts/hosted_mode/server.js +17 -2
  84. package/front_end/entrypoints/node_app/node_app-meta.ts +0 -43
  85. package/front_end/entrypoints/node_app/node_app.js +0 -13
  86. package/front_end/entrypoints/node_app/node_app.json +0 -4
  87. package/front_end/entrypoints/node_main/node_main-meta.ts +0 -48
  88. package/front_end/entrypoints/node_main/node_main.ts +0 -11
  89. package/front_end/entrypoints/shell/shell-meta-files.ts +0 -22
  90. package/front_end/entrypoints/shell/shell.json +0 -5
  91. package/front_end/ui/legacy/TextEditor.ts +0 -82
  92. package/front_end/ui/legacy/components/object_ui/JavaScriptAutocomplete.ts +0 -836
  93. package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +0 -1676
  94. package/front_end/ui/legacy/components/text_editor/TextEditorAutocompleteController.ts +0 -586
  95. package/front_end/ui/legacy/components/text_editor/autocompleteTooltip.css +0 -20
  96. package/front_end/ui/legacy/components/text_editor/cm_modes.ts +0 -23
  97. package/front_end/ui/legacy/components/text_editor/cmdevtools.css +0 -995
  98. package/front_end/ui/legacy/components/text_editor/module.json +0 -7
  99. package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -33
  100. package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -13
@@ -25,121 +25,11 @@
25
25
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
26
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
27
  */
28
- .cm-js-keyword {
29
- color: hsl(310deg 86% 36%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
30
- }
31
-
32
- .cm-js-number {
33
- color: hsl(248deg 100% 41%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
34
- }
35
-
36
- .cm-js-comment {
37
- color: hsl(120deg 100% 23%); /* stylelint-disable-line plugin/use_theme_colors */
38
- /* See: crbug.com/1152736 for color variable migration. */
39
- font-style: italic;
40
- }
41
-
42
- .cm-js-string {
43
- color: hsl(1deg 80% 43%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
44
- }
45
-
46
- .cm-js-string-2 {
47
- color: hsl(1deg 99% 39%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
48
- }
49
-
50
- .cm-js-atom {
51
- color: hsl(310deg 86% 36%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
52
- }
53
-
54
- .cm-js-def {
55
- color: hsl(240deg 73% 38%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
56
- }
57
-
58
- .cm-js-operator {
59
- color: hsl(27deg 100% 30%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
60
- }
61
-
62
- .cm-js-meta {
63
- color: hsl(27deg 100% 30%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
64
- }
65
-
66
- .cm-js-variable-2 {
67
- color: hsl(240deg 73% 38%); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
68
- }
69
-
70
- .cm-css-keyword {
71
- color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
72
- }
73
-
74
- .cm-css-number {
75
- color: rgb(50 0 255); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
76
- }
77
-
78
- .cm-css-comment {
79
- color: rgb(0 116 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
80
- }
81
28
 
82
- .cm-css-def {
83
- color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
84
- }
85
-
86
- .cm-css-meta {
87
- color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
88
- }
89
-
90
- .cm-css-atom {
91
- color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
92
- }
93
-
94
- .cm-css-string {
95
- color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
96
- }
97
-
98
- .cm-css-string-2 {
99
- color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
100
- }
101
-
102
- .cm-css-link {
103
- color: rgb(7 144 154); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
104
- }
105
-
106
- .cm-css-variable {
107
- color: rgb(200 0 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
108
- }
109
-
110
- .cm-css-variable-2 {
111
- color: rgb(0 0 128); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
112
- }
113
-
114
- .cm-css-property,
115
29
  .webkit-css-property {
116
30
  color: var(--webkit-css-property-color, rgb(200 0 0)); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
117
31
  }
118
32
 
119
- .cm-xml-meta {
120
- color: rgb(192 192 192); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
121
- }
122
-
123
- .cm-xml-comment {
124
- color: rgb(35 110 37); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
125
- }
126
-
127
- .cm-xml-string {
128
- color: rgb(26 26 166); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
129
- }
130
-
131
- .cm-xml-tag {
132
- color: var(--color-token-tag);
133
- }
134
-
135
- .cm-xml-attribute {
136
- color: rgb(153 69 0); /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
137
- }
138
-
139
- .cm-xml-link {
140
- color: #00e; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
141
- }
142
-
143
33
  .webkit-html-comment {
144
34
  /* Keep this in sync with view-source.css (.webkit-html-comment) */
145
35
  color: rgb(35 110 37); /* stylelint-disable-line plugin/use_theme_colors */
@@ -228,107 +118,6 @@
228
118
  .devtools-link:not(.devtools-link-prevent-click) {
229
119
  cursor: pointer;
230
120
  }
231
- /* Default CodeMirror Theme */
232
- .cm-negative {
233
- color: #d44; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
234
- }
235
-
236
- .cm-positive {
237
- color: #292; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
238
- }
239
-
240
- .cm-header,
241
- .cm-strong { font-weight: bold; }
242
- .cm-em { font-style: italic; }
243
-
244
- .cm-link {
245
- text-decoration: underline;
246
- color: #00c; /* stylelint-disable-line plugin/use_theme_colors */
247
- /* See: crbug.com/1152736 for color variable migration. */
248
- }
249
-
250
- .cm-strikethrough { text-decoration: line-through; }
251
-
252
- .cm-invalidchar {
253
- color: #f00; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
254
- }
255
-
256
- .cm-header {
257
- color: #00f; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
258
- }
259
-
260
- .cm-quote {
261
- color: #090; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
262
- }
263
-
264
- .cm-keyword {
265
- color: #708; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
266
- }
267
-
268
- .cm-atom {
269
- color: #219; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
270
- }
271
-
272
- .cm-number {
273
- color: #164; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
274
- }
275
-
276
- .cm-def {
277
- color: #00f; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
278
- }
279
-
280
- .cm-variable-2 {
281
- color: #05a; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
282
- }
283
-
284
- .cm-variable-3,
285
- .cm-type {
286
- color: #085; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
287
- }
288
-
289
- .cm-comment {
290
- color: #a50; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
291
- }
292
-
293
- .cm-string {
294
- color: #a11; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
295
- }
296
-
297
- .cm-string-2 {
298
- color: #f50; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
299
- }
300
-
301
- .cm-meta {
302
- color: #555; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
303
- }
304
-
305
- .cm-qualifier {
306
- color: #555; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
307
- }
308
-
309
- .cm-builtin {
310
- color: #30a; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
311
- }
312
-
313
- .cm-bracket {
314
- color: #997; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
315
- }
316
-
317
- .cm-tag {
318
- color: #170; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
319
- }
320
-
321
- .cm-attribute {
322
- color: #00c; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
323
- }
324
-
325
- .cm-hr {
326
- color: #999; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
327
- }
328
-
329
- .cm-error {
330
- color: #f00; /* stylelint-disable-line plugin/use_theme_colors */ /* See: crbug.com/1152736 for color variable migration. */
331
- }
332
121
 
333
122
  @media (forced-colors: active) {
334
123
  .devtools-link:not(.devtools-link-prevent-click) {
@@ -166,12 +166,6 @@ UI.TabbedPane = UIModule.TabbedPane.TabbedPane;
166
166
  /** @enum {symbol} */
167
167
  UI.TabbedPane.Events = UIModule.TabbedPane.Events;
168
168
 
169
- /** @interface */
170
- UI.TextEditor = UIModule.TextEditor.TextEditor;
171
-
172
- /** @interface */
173
- UI.TextEditorFactory = UIModule.TextEditor.TextEditorFactory;
174
-
175
169
  /** @constructor */
176
170
  UI.TextPrompt = UIModule.TextPrompt.TextPrompt;
177
171
 
@@ -43,7 +43,6 @@ import * as SplitWidget from './SplitWidget.js';
43
43
  import * as SuggestBox from './SuggestBox.js';
44
44
  import * as TabbedPane from './TabbedPane.js';
45
45
  import * as TargetCrashedScreen from './TargetCrashedScreen.js';
46
- import * as TextEditor from './TextEditor.js';
47
46
  import * as TextPrompt from './TextPrompt.js';
48
47
  import * as ThrottledWidget from './ThrottledWidget.js';
49
48
  import * as Toolbar from './Toolbar.js';
@@ -101,7 +100,6 @@ export {
101
100
  SuggestBox,
102
101
  TabbedPane,
103
102
  TargetCrashedScreen,
104
- TextEditor,
105
103
  TextPrompt,
106
104
  ThrottledWidget,
107
105
  Toolbar,
@@ -134,7 +134,7 @@
134
134
  .tabbed-pane-header-tab:hover,
135
135
  .tabbed-pane-shadow .tabbed-pane-header-tab:focus-visible {
136
136
  color: var(--color-text-primary);
137
- background-color: var(--color-background-elevation-1);
137
+ background-color: var(--color-background-elevation-2);
138
138
  }
139
139
 
140
140
  .tabbed-pane-header-tab-title {
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.945579"
58
+ "version": "1.0.946920"
59
59
  }
@@ -9,7 +9,7 @@ const path = require('path');
9
9
  const FRONTEND_PATH = path.resolve(__dirname, '..', 'front_end');
10
10
 
11
11
  const manifestModules = [];
12
- for (const config of ['inspector', 'devtools_app', 'js_app', 'node_app', 'shell', 'worker_app']) {
12
+ for (const config of ['inspector', 'devtools_app', 'js_app', 'worker_app']) {
13
13
  manifestModules.push(...require(path.resolve(FRONTEND_PATH, 'entrypoints', config, `${config}.json`)).modules);
14
14
  }
15
15
 
@@ -5,8 +5,9 @@
5
5
  'use strict';
6
6
 
7
7
  const path = require('path');
8
+ const {devtoolsRootPath} = require('../../devtools_paths.js');
8
9
 
9
- const FRONT_END_DIRECTORY = path.join(__dirname, '..', '..', '..', 'front_end');
10
+ const DEFAULT_FRONT_END_DIRECTORY = path.join(devtoolsRootPath(), 'front_end');
10
11
 
11
12
  function isModuleScope(context) {
12
13
  return context.getScope().type === 'module';
@@ -36,7 +37,15 @@ module.exports = {
36
37
  category: 'Possible Errors',
37
38
  },
38
39
  fixable: 'code',
39
- schema: [] // no options
40
+ schema: [{
41
+ 'type': 'object',
42
+ 'properties': {
43
+ 'rootFrontendDirectory': {
44
+ 'type': 'string',
45
+ },
46
+ },
47
+ additionalProperties: false,
48
+ }]
40
49
  },
41
50
  create: function(context) {
42
51
  return {
@@ -51,8 +60,12 @@ module.exports = {
51
60
  return;
52
61
  }
53
62
 
63
+ let frontEndDirectory = DEFAULT_FRONT_END_DIRECTORY;
64
+ if (context.options && context.options[0]?.rootFrontendDirectory) {
65
+ frontEndDirectory = context.options[0].rootFrontendDirectory;
66
+ }
54
67
  const currentSourceFile = path.resolve(context.getFilename());
55
- const currentFileRelativeToFrontEnd = path.relative(FRONT_END_DIRECTORY, currentSourceFile);
68
+ const currentFileRelativeToFrontEnd = path.relative(frontEndDirectory, currentSourceFile);
56
69
 
57
70
  const currentModuleDirectory = path.dirname(currentSourceFile);
58
71
  const allowedPathArguments = [
@@ -62,7 +75,7 @@ module.exports = {
62
75
  ];
63
76
 
64
77
  const previousFileLocationArgument = callExpression.arguments[0];
65
- const actualPath = path.join(FRONT_END_DIRECTORY, previousFileLocationArgument.value);
78
+ const actualPath = path.join(frontEndDirectory, previousFileLocationArgument.value);
66
79
  if (!allowedPathArguments.includes(actualPath)) {
67
80
  const newFileName = currentFileRelativeToFrontEnd.replace(/\\/g, '/');
68
81
  context.report({
@@ -4,6 +4,8 @@
4
4
 
5
5
  'use strict';
6
6
 
7
+ const path = require('path');
8
+
7
9
  const rule = require('../lib/l10n_filename_matches.js');
8
10
  const ruleTester = new (require('eslint').RuleTester)({
9
11
  parserOptions: {ecmaVersion: 9, sourceType: 'module'},
@@ -24,6 +26,16 @@ ruleTester.run('l10n_filename_matches', rule, {
24
26
  code: 'const str_ = i18n.i18n.registerUIStrings(\'components/ModuleUIStrings.ts\', UIStrings);',
25
27
  filename: 'front_end/components/test.ts',
26
28
  },
29
+ {
30
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'ModuleUIStrings.ts\', UIStrings);',
31
+ filename: 'front_end/components/test.ts',
32
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
33
+ },
34
+ {
35
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'test.ts\', UIStrings);',
36
+ filename: 'front_end/components/test.ts',
37
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
38
+ },
27
39
  ],
28
40
  invalid: [
29
41
  {
@@ -35,5 +47,14 @@ ruleTester.run('l10n_filename_matches', rule, {
35
47
  }],
36
48
  output: 'const str_ = i18n.i18n.registerUIStrings(\'components/test.ts\', UIStrings);',
37
49
  },
50
+ {
51
+ code: 'const str_ = i18n.i18n.registerUIStrings(\'components/test.ts\', UIStrings);',
52
+ filename: 'front_end/components/test.ts',
53
+ errors: [
54
+ {message: 'First argument to \'registerUIStrings\' call must be \'test.ts\' or the ModuleUIStrings.(js|ts)'}
55
+ ],
56
+ output: 'const str_ = i18n.i18n.registerUIStrings(\'test.ts\', UIStrings);',
57
+ options: [{rootFrontendDirectory: path.join(__dirname, '..', '..', '..', 'front_end', 'components')}]
58
+ },
38
59
  ]
39
60
  });
@@ -66,10 +66,19 @@ wss.on('connection', ws => {
66
66
  });
67
67
  });
68
68
 
69
+ let delayResolve = null;
70
+
69
71
  server.listen(requestedPort);
70
72
 
71
73
  async function requestHandler(request, response) {
72
- const filePath = unescape(parseURL(request.url).pathname);
74
+ const url = parseURL(request.url);
75
+ const filePath = unescape(url.pathname);
76
+
77
+ if (url.search === '?send_delayed' && delayResolve) {
78
+ delayResolve();
79
+ delayResolve = null;
80
+ }
81
+
73
82
  if (filePath === '/') {
74
83
  const landingURL = `http://localhost:${remoteDebuggingPort}#custom=true`;
75
84
  sendResponse(200, `<html>Please go to <a href="${landingURL}">${landingURL}</a></html>`, 'utf8');
@@ -147,7 +156,13 @@ async function requestHandler(request, response) {
147
156
  return null;
148
157
  }
149
158
 
150
- function sendResponse(statusCode, data, encoding, headers) {
159
+ async function sendResponse(statusCode, data, encoding, headers) {
160
+ if (url.search === '?delay') {
161
+ delayPromise = new Promise(resolve => {
162
+ delayResolve = resolve;
163
+ });
164
+ await delayPromise;
165
+ }
151
166
  if (!headers) {
152
167
  headers = new Map();
153
168
  }
@@ -1,43 +0,0 @@
1
- // Copyright 2020 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 * as i18n from '../../core/i18n/i18n.js';
6
- import * as UI from '../../ui/legacy/legacy.js';
7
- import type * as Sources from '../../panels/sources/sources.js';
8
-
9
- const UIStrings = {
10
- /**
11
- *@description Title of the 'Node' tool in the Network Navigator View, which is part of the Sources tool
12
- */
13
- node: 'Node',
14
- /**
15
- *@description Command for showing the 'Node' tool in the Network Navigator View, which is part of the Sources tool
16
- */
17
- showNode: 'Node',
18
- };
19
-
20
- const str_ = i18n.i18n.registerUIStrings('entrypoints/node_app/node_app-meta.ts', UIStrings);
21
- const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
22
-
23
- let loadedSourcesModule: (typeof Sources|undefined);
24
-
25
- async function loadHelpModule(): Promise<typeof Sources> {
26
- if (!loadedSourcesModule) {
27
- loadedSourcesModule = await import('../../panels/sources/sources.js');
28
- }
29
- return loadedSourcesModule;
30
- }
31
-
32
- UI.ViewManager.registerViewExtension({
33
- location: UI.ViewManager.ViewLocationValues.NAVIGATOR_VIEW,
34
- id: 'navigator-network',
35
- title: i18nLazyString(UIStrings.node),
36
- commandPrompt: i18nLazyString(UIStrings.showNode),
37
- order: 2,
38
- persistence: UI.ViewManager.ViewPersistence.PERMANENT,
39
- async loadView() {
40
- const Sources = await loadHelpModule();
41
- return Sources.SourcesNavigator.NetworkNavigatorView.instance();
42
- },
43
- });
@@ -1,13 +0,0 @@
1
- // Copyright 2018 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 '../shell/shell.js';
5
- import '../../panels/js_profiler/js_profiler-meta.js';
6
- import '../node_main/node_main-meta.js';
7
- import './node_app-meta.js';
8
- import * as Startup from '../startup/startup.js';
9
-
10
- // Side-effect start the `node_main` module, which implements runnables in
11
- // the NodeMain class
12
- await import('../node_main/node_main.js');
13
- Startup.RuntimeInstantiator.startApplication('node_app');
@@ -1,4 +0,0 @@
1
- {
2
- "modules" : [ ],
3
- "extends": "shell"
4
- }
@@ -1,48 +0,0 @@
1
- // Copyright 2020 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 * as i18n from '../../core/i18n/i18n.js';
6
- import * as UI from '../../ui/legacy/legacy.js';
7
-
8
- import type * as NodeMain from './node_main.js';
9
-
10
- const UIStrings = {
11
- /**
12
- *@description Text that refers to the network connection
13
- */
14
- connection: 'Connection',
15
- /**
16
- *@description A tag of Node.js Connection Panel that can be searched in the command menu
17
- */
18
- node: 'node',
19
- /**
20
- *@description Command for showing the Connection tool
21
- */
22
- showConnection: 'Show Connection',
23
- };
24
-
25
- const str_ = i18n.i18n.registerUIStrings('entrypoints/node_main/node_main-meta.ts', UIStrings);
26
- const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
27
-
28
- let loadedNodeMainModule: (typeof NodeMain|undefined);
29
-
30
- async function loadNodeMainModule(): Promise<typeof NodeMain> {
31
- if (!loadedNodeMainModule) {
32
- loadedNodeMainModule = await import('./node_main.js');
33
- }
34
- return loadedNodeMainModule;
35
- }
36
-
37
- UI.ViewManager.registerViewExtension({
38
- location: UI.ViewManager.ViewLocationValues.PANEL,
39
- id: 'node-connection',
40
- title: i18nLazyString(UIStrings.connection),
41
- commandPrompt: i18nLazyString(UIStrings.showConnection),
42
- order: 0,
43
- async loadView() {
44
- const NodeMain = await loadNodeMainModule();
45
- return NodeMain.NodeConnectionsPanel.NodeConnectionsPanel.instance();
46
- },
47
- tags: [i18nLazyString(UIStrings.node)],
48
- });
@@ -1,11 +0,0 @@
1
- // Copyright 2019 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 * as NodeConnectionsPanel from './NodeConnectionsPanel.js';
6
- import * as NodeMain from './NodeMain.js';
7
-
8
- export {
9
- NodeConnectionsPanel,
10
- NodeMain,
11
- };
@@ -1,22 +0,0 @@
1
- // Copyright 2021 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 '../../panels/sources/sources-meta.js';
6
- import '../../panels/profiler/profiler-meta.js';
7
- import '../../panels/console/console-meta.js';
8
- import '../../panels/coverage/coverage-meta.js';
9
- import '../../panels/changes/changes-meta.js';
10
- import '../../panels/input/input-meta.js';
11
- import '../../ui/components/linear_memory_inspector/linear_memory_inspector-meta.js';
12
- import '../../panels/settings/settings-meta.js';
13
- import '../../panels/protocol_monitor/protocol_monitor-meta.js';
14
- import '../../models/persistence/persistence-meta.js';
15
- import '../../models/logs/logs-meta.js';
16
- import '../main/main-meta.js';
17
- import '../../ui/legacy/components/perf_ui/perf_ui-meta.js';
18
- import '../../ui/legacy/components/quick_open/quick_open-meta.js';
19
- import '../../core/sdk/sdk-meta.js';
20
- import '../../ui/legacy/components/source_frame/source_frame-meta.js';
21
- import '../../panels/console_counters/console_counters-meta.js';
22
- import '../../ui/legacy/components/object_ui/object_ui-meta.js';
@@ -1,5 +0,0 @@
1
- {
2
- "modules": [
3
- { "name": "ui/legacy/components/text_editor", "type": "autostart" }
4
- ]
5
- }
@@ -1,82 +0,0 @@
1
- // Copyright 2016 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 * as Common from '../../core/common/common.js';
6
- import type * as TextUtils from '../../models/text_utils/text_utils.js';
7
-
8
- import type {AnchorBehavior} from './GlassPane.js';
9
- import type {Suggestion} from './SuggestBox.js';
10
- import type {Widget} from './Widget.js';
11
-
12
- export interface TextEditorFactory {
13
- createEditor(options: Options): TextEditor;
14
- }
15
-
16
- export interface TextEditor extends Common.EventTarget.EventTarget<EventTypes> {
17
- widget(): Widget;
18
- fullRange(): TextUtils.TextRange.TextRange;
19
- selection(): TextUtils.TextRange.TextRange;
20
- setSelection(selection: TextUtils.TextRange.TextRange): void;
21
- text(textRange?: TextUtils.TextRange.TextRange): string;
22
- textWithCurrentSuggestion(): string;
23
- setText(text: string): void;
24
- line(lineNumber: number): string;
25
- newlineAndIndent(): void;
26
- addKeyDownHandler(handler: (arg0: KeyboardEvent) => void): void;
27
- configureAutocomplete(config: AutocompleteConfig|null): void;
28
- clearAutocomplete(): void;
29
- visualCoordinates(lineNumber: number, columnNumber: number): {
30
- x: number,
31
- y: number,
32
- };
33
- tokenAtTextPosition(lineNumber: number, columnNumber: number): {
34
- startColumn: number,
35
- endColumn: number,
36
- type: string,
37
- }|null;
38
- setPlaceholder(placeholder: string): void;
39
- }
40
-
41
- // TODO(crbug.com/1167717): Make this a const enum again
42
- // eslint-disable-next-line rulesdir/const_enum
43
- export enum Events {
44
- CursorChanged = 'CursorChanged',
45
- TextChanged = 'TextChanged',
46
- SuggestionChanged = 'SuggestionChanged',
47
- }
48
-
49
- export interface TextChangedEvent {
50
- newRange: TextUtils.TextRange.TextRange;
51
- oldRange: TextUtils.TextRange.TextRange;
52
- }
53
-
54
- export type EventTypes = {
55
- [Events.CursorChanged]: void,
56
- [Events.TextChanged]: TextChangedEvent,
57
- [Events.SuggestionChanged]: void,
58
- };
59
-
60
- export interface Options {
61
- bracketMatchingSetting?: Common.Settings.Setting<boolean>;
62
- devtoolsAccessibleName?: string;
63
- lineNumbers: boolean;
64
- lineWrapping: boolean;
65
- mimeType?: string;
66
- autoHeight?: boolean;
67
- padBottom?: boolean;
68
- maxHighlightLength?: number;
69
- placeholder?: string;
70
- lineWiseCopyCut?: boolean;
71
- inputStyle?: string;
72
- }
73
-
74
- export interface AutocompleteConfig {
75
- substituteRangeCallback?: ((arg0: number, arg1: number) => TextUtils.TextRange.TextRange | null);
76
- tooltipCallback?: ((arg0: number, arg1: number) => Promise<Element|null>);
77
- suggestionsCallback?:
78
- ((arg0: TextUtils.TextRange.TextRange, arg1: TextUtils.TextRange.TextRange,
79
- arg2?: boolean|undefined) => Promise<Suggestion[]>| null);
80
- isWordChar?: ((arg0: string) => boolean);
81
- anchorBehavior?: AnchorBehavior;
82
- }