chrome-devtools-frontend 1.0.961907 → 1.0.962581
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/.eslintignore +5 -4
- package/config/gni/devtools_grd_files.gni +1 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +7 -7
- package/front_end/core/sdk/CSSProperty.ts +22 -110
- package/front_end/generated/protocol-tsconfig.json +2 -2
- package/front_end/generated/protocol.ts +16772 -0
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
- package/front_end/models/text_utils/text_utils.ts +0 -2
- package/package.json +1 -1
- package/scripts/build/ninja/devtools_entrypoint.gni +25 -17
- package/scripts/devtools_paths.py +4 -0
- package/scripts/protocol_typescript/protocol_dts_generator.ts +4 -9
- package/front_end/generated/protocol.d.ts +0 -16771
- package/front_end/models/text_utils/CodeMirrorUtils.ts +0 -77
@@ -45,8 +45,3 @@ TextUtils.BalancedJSONTokenizer = TextUtilsModule.TextUtils.BalancedJSONTokenize
|
|
45
45
|
TextUtils.TokenizerFactory = TextUtilsModule.TextUtils.TokenizerFactory;
|
46
46
|
|
47
47
|
TextUtils.isMinified = TextUtilsModule.TextUtils.isMinified;
|
48
|
-
|
49
|
-
TextUtils.CodeMirrorUtils = {};
|
50
|
-
|
51
|
-
/** @constructor */
|
52
|
-
TextUtils.CodeMirrorUtils.TokenizerFactory = TextUtilsModule.CodeMirrorUtils.TokenizerFactory;
|
@@ -2,7 +2,6 @@
|
|
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
4
|
|
5
|
-
import * as CodeMirrorUtils from './CodeMirrorUtils.js';
|
6
5
|
import * as ContentProvider from './ContentProvider.js';
|
7
6
|
import * as StaticContentProvider from './StaticContentProvider.js';
|
8
7
|
import * as Text from './Text.js';
|
@@ -11,7 +10,6 @@ import * as TextRange from './TextRange.js';
|
|
11
10
|
import * as TextUtils from './TextUtils.js';
|
12
11
|
|
13
12
|
export {
|
14
|
-
CodeMirrorUtils,
|
15
13
|
ContentProvider,
|
16
14
|
StaticContentProvider,
|
17
15
|
Text,
|
package/package.json
CHANGED
@@ -90,8 +90,6 @@ template("devtools_entrypoint") {
|
|
90
90
|
_copy_target_name = _entrypoint_target_name + "-copy"
|
91
91
|
_rollup_target_name = _entrypoint_target_name + "-rollup"
|
92
92
|
_prebundle_target_name = _entrypoint_target_name + "-tsconfig"
|
93
|
-
_generated_declaration_target_name =
|
94
|
-
_entrypoint_target_name + "-generate-declaration"
|
95
93
|
|
96
94
|
node_action(_copy_target_name) {
|
97
95
|
script = "scripts/build/ninja/copy-file.js"
|
@@ -146,27 +144,37 @@ template("devtools_entrypoint") {
|
|
146
144
|
public_deps = [ ":$_prebundle_target_name" ] + invoker.deps
|
147
145
|
}
|
148
146
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
# rolled up bundle remains the same.
|
153
|
-
node_action(_generated_declaration_target_name) {
|
154
|
-
script = "scripts/build/ninja/generate-declaration.js"
|
147
|
+
if (!devtools_skip_typecheck) {
|
148
|
+
_generated_declaration_target_name =
|
149
|
+
_entrypoint_target_name + "-generate-declaration"
|
155
150
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
151
|
+
# TypeScript requires a `module.d.ts` that describes
|
152
|
+
# the public API of the `module.js` entrypoint. To do so, we copy
|
153
|
+
# the generated `prebundle.d.ts` over, as the public API for a
|
154
|
+
# rolled up bundle remains the same.
|
155
|
+
node_action(_generated_declaration_target_name) {
|
156
|
+
script = "scripts/build/ninja/generate-declaration.js"
|
157
|
+
|
158
|
+
args = [
|
159
|
+
rebase_path(target_gen_dir, root_build_dir),
|
160
|
+
invoker.entrypoint,
|
161
|
+
]
|
160
162
|
|
161
|
-
|
163
|
+
public_deps = [
|
164
|
+
":$_prebundle_target_name",
|
165
|
+
":$_rollup_target_name",
|
166
|
+
]
|
167
|
+
|
168
|
+
outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
|
169
|
+
}
|
170
|
+
|
171
|
+
_devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
|
172
|
+
} else {
|
173
|
+
_devtools_entrypoint_deps += [
|
162
174
|
":$_prebundle_target_name",
|
163
175
|
":$_rollup_target_name",
|
164
176
|
]
|
165
|
-
|
166
|
-
outputs = [ "$target_gen_dir/$_entrypoint_output_file_name.d.ts" ]
|
167
177
|
}
|
168
|
-
|
169
|
-
_devtools_entrypoint_deps += [ ":$_generated_declaration_target_name" ]
|
170
178
|
}
|
171
179
|
|
172
180
|
# Because we change the filename before rolling up the bundle,
|
@@ -75,6 +75,10 @@ def hosted_mode_script_path():
|
|
75
75
|
return path.join(devtools_root_path(), 'scripts', 'hosted_mode', 'server.js')
|
76
76
|
|
77
77
|
|
78
|
+
def esbuild_path():
|
79
|
+
return path.join(devtools_root_path(), 'third_party', 'esbuild', 'esbuild')
|
80
|
+
|
81
|
+
|
78
82
|
def downloaded_chrome_binary_path():
|
79
83
|
return path.abspath(path.join(
|
80
84
|
*{
|
@@ -62,15 +62,10 @@ const emitHeaderComments = () => {
|
|
62
62
|
emitLine();
|
63
63
|
};
|
64
64
|
|
65
|
-
const emitModule = (
|
66
|
-
moduleName = toTitleCase(moduleName);
|
65
|
+
const emitModule = (domains: Protocol.Domain[]) => {
|
67
66
|
emitHeaderComments();
|
68
|
-
emitOpenBlock(`declare namespace ${moduleName}`);
|
69
67
|
emitGlobalTypeDefs();
|
70
68
|
domains.forEach(emitDomain);
|
71
|
-
emitCloseBlock();
|
72
|
-
emitLine();
|
73
|
-
emitLine('export = Protocol;');
|
74
69
|
};
|
75
70
|
|
76
71
|
const emitGlobalTypeDefs = () => {
|
@@ -443,9 +438,9 @@ const flushEmitToFile = (path: string) => {
|
|
443
438
|
const main = () => {
|
444
439
|
const FRONTEND_GENERATED_DIR = path.resolve(__dirname, path.join('../../front_end/generated'));
|
445
440
|
|
446
|
-
const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.
|
447
|
-
const protocolModuleName = path.basename(destProtocolFilePath, '.
|
448
|
-
emitModule(
|
441
|
+
const destProtocolFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol.ts');
|
442
|
+
const protocolModuleName = path.basename(destProtocolFilePath, '.ts');
|
443
|
+
emitModule(protocolDomains);
|
449
444
|
flushEmitToFile(destProtocolFilePath);
|
450
445
|
|
451
446
|
const destMappingFilePath = path.join(FRONTEND_GENERATED_DIR, 'protocol-mapping.d.ts');
|