Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2e5593

Browse files
authored
Format sources using the updated formatter (#2662)
1 parent 23aefeb commit d2e5593

File tree

159 files changed

+3410
-2749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+3410
-2749
lines changed

_analysis_config/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: The shared analysis configuration for the webdev packages.
44
publish_to: none
55

66
environment:
7-
sdk: ^3.1.0
7+
sdk: ^3.10.0-0.0.dev
88

99
dependencies:
1010
lints: ^5.0.0

dwds/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 25.1.1-wip
2+
3+
- Bump SDK constraint to ^3.10.0
4+
15
## 25.1.0
26

37
- Added `DartDevelopmentServiceConfiguration` to allow for configuring DDS behavior.

dwds/debug_extension/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: >-
55
A Chrome extension for Dart debugging.
66
77
environment:
8-
sdk: ^3.5.0
8+
sdk: ^3.10.0-0.0.dev
99

1010
dependencies:
1111
built_value: ^8.9.0
@@ -22,7 +22,7 @@ dev_dependencies:
2222
dwds: ^24.1.0
2323
path: ^1.9.0
2424
sse: ^4.1.4
25-
web_socket_channel: '>=2.2.0 <4.0.0'
25+
web_socket_channel: ">=2.2.0 <4.0.0"
2626

2727
dependency_overrides:
2828
dwds:

dwds/debug_extension/tool/build_extension.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ import 'package:path/path.dart' as p;
2020
const _prodFlag = 'prod';
2121

2222
void main(List<String> arguments) async {
23-
final parser =
24-
ArgParser()..addFlag(_prodFlag, negatable: true, defaultsTo: false);
23+
final parser = ArgParser()
24+
..addFlag(_prodFlag, negatable: true, defaultsTo: false);
2525
final argResults = parser.parse(arguments);
2626

2727
exitCode = await run(isProd: argResults[_prodFlag] as bool);

dwds/debug_extension/tool/update_dev_files.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ void main() async {
1212
Future<void> _updateManifestJson() async {
1313
final manifestJson = File('compiled/manifest.json');
1414
final extensionKeyTxt = File('extension_key.txt');
15-
final extensionKey =
16-
await extensionKeyTxt.exists()
17-
? await extensionKeyTxt.readAsString()
18-
: null;
15+
final extensionKey = await extensionKeyTxt.exists()
16+
? await extensionKeyTxt.readAsString()
17+
: null;
1918
return _transformDevFile(manifestJson, (line) {
2019
if (_matchesKey(line: line, key: 'name')) {
2120
return [

dwds/debug_extension/web/background.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -217,20 +217,19 @@ bool _isInternalNavigation(NavigationInfo navigationInfo) {
217217

218218
DebugInfo _addTabInfo(DebugInfo debugInfo, {required Tab tab}) {
219219
return DebugInfo(
220-
(b) =>
221-
b
222-
..appEntrypointPath = debugInfo.appEntrypointPath
223-
..appId = debugInfo.appId
224-
..appInstanceId = debugInfo.appInstanceId
225-
..appOrigin = debugInfo.appOrigin
226-
..appUrl = debugInfo.appUrl
227-
..authUrl = debugInfo.authUrl
228-
..extensionUrl = debugInfo.extensionUrl
229-
..isInternalBuild = debugInfo.isInternalBuild
230-
..isFlutterApp = debugInfo.isFlutterApp
231-
..workspaceName = debugInfo.workspaceName
232-
..tabUrl = tab.url
233-
..tabId = tab.id,
220+
(b) => b
221+
..appEntrypointPath = debugInfo.appEntrypointPath
222+
..appId = debugInfo.appId
223+
..appInstanceId = debugInfo.appInstanceId
224+
..appOrigin = debugInfo.appOrigin
225+
..appUrl = debugInfo.appUrl
226+
..authUrl = debugInfo.authUrl
227+
..extensionUrl = debugInfo.extensionUrl
228+
..isInternalBuild = debugInfo.isInternalBuild
229+
..isFlutterApp = debugInfo.isFlutterApp
230+
..workspaceName = debugInfo.workspaceName
231+
..tabUrl = tab.url
232+
..tabId = tab.id,
234233
);
235234
}
236235

@@ -280,8 +279,9 @@ void _setWarningIcon(int tabId) {
280279
}
281280

282281
void _setDefaultIcon(int tabId) {
283-
final iconPath =
284-
isDevMode ? 'static_assets/dart_dev.png' : 'static_assets/dart_grey.png';
282+
final iconPath = isDevMode
283+
? 'static_assets/dart_dev.png'
284+
: 'static_assets/dart_grey.png';
285285
setExtensionIcon(IconInfo(path: iconPath));
286286
setExtensionPopup(PopupDetails(popup: '', tabId: tabId));
287287
}

dwds/debug_extension/web/cross_extension_communication.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ void maybeForwardMessageToAngularDartDevTools({
5858
}) {
5959
if (!_eventsForAngularDartDevTools.contains(method)) return;
6060

61-
final message =
62-
method.startsWith('dwds')
63-
? _dwdsEventMessage(method: method, params: params, tabId: tabId)
64-
: _debugEventMessage(method: method, params: params, tabId: tabId);
61+
final message = method.startsWith('dwds')
62+
? _dwdsEventMessage(method: method, params: params, tabId: tabId)
63+
: _debugEventMessage(method: method, params: params, tabId: tabId);
6564

6665
_forwardMessageToAngularDartDevTools(message);
6766
}

dwds/debug_extension/web/data_types.g.dart

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/debug_extension/web/debug_info.dart

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,15 @@ String _readDartDebugInfo() {
3030
return jsonEncode(
3131
serializers.serialize(
3232
DebugInfo(
33-
(b) =>
34-
b
35-
..appEntrypointPath =
36-
windowContext['\$dartEntrypointPath'] as String?
37-
..appId = windowContext['\$dartAppId'] as String?
38-
..appInstanceId = windowContext['\$dartAppInstanceId'] as String?
39-
..appOrigin = window.location.origin
40-
..appUrl = window.location.href
41-
..extensionUrl = windowContext['\$dartExtensionUri'] as String?
42-
..isInternalBuild = windowContext['\$isInternalBuild'] as bool?
43-
..isFlutterApp = windowContext['\$isFlutterApp'] as bool?,
33+
(b) => b
34+
..appEntrypointPath = windowContext['\$dartEntrypointPath'] as String?
35+
..appId = windowContext['\$dartAppId'] as String?
36+
..appInstanceId = windowContext['\$dartAppInstanceId'] as String?
37+
..appOrigin = window.location.origin
38+
..appUrl = window.location.href
39+
..extensionUrl = windowContext['\$dartExtensionUri'] as String?
40+
..isInternalBuild = windowContext['\$isInternalBuild'] as bool?
41+
..isFlutterApp = windowContext['\$isFlutterApp'] as bool?,
4442
),
4543
),
4644
);

dwds/debug_extension/web/debug_session.dart

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -351,12 +351,9 @@ Future<bool> _connectToDwds({
351351
}
352352
final uri = Uri.parse(extensionUrl);
353353
// Start the client connection with DWDS:
354-
final client =
355-
uri.isScheme('ws') || uri.isScheme('wss')
356-
? WebSocketClient(WebSocketChannel.connect(uri))
357-
: SseSocketClient(
358-
SseClient(uri.toString(), debugKey: 'DebugExtension'),
359-
);
354+
final client = uri.isScheme('ws') || uri.isScheme('wss')
355+
? WebSocketClient(WebSocketChannel.connect(uri))
356+
: SseSocketClient(SseClient(uri.toString(), debugKey: 'DebugExtension'));
360357
final trigger = _tabIdToTrigger[dartAppTabId];
361358
debugLog('Connecting to DWDS...', verbose: true);
362359
final debugSession = _DebugSession(
@@ -386,14 +383,13 @@ Future<bool> _connectToDwds({
386383
final tabUrl = await _getTabUrl(dartAppTabId);
387384
debugSession.sendEvent(
388385
DevToolsRequest(
389-
(b) =>
390-
b
391-
..appId = debugInfo.appId
392-
..instanceId = debugInfo.appInstanceId
393-
..contextId = dartAppContextId
394-
..tabUrl = tabUrl
395-
..uriOnly = true
396-
..client = trigger?.clientName ?? 'unknown',
386+
(b) => b
387+
..appId = debugInfo.appId
388+
..instanceId = debugInfo.appInstanceId
389+
..contextId = dartAppContextId
390+
..tabUrl = tabUrl
391+
..uriOnly = true
392+
..client = trigger?.clientName ?? 'unknown',
397393
),
398394
);
399395
return true;
@@ -445,10 +441,9 @@ void _forwardDwdsEventToChromeDebugger(
445441
) {
446442
try {
447443
final messageParams = message.commandParams;
448-
final params =
449-
messageParams == null
450-
? <String, Object>{}
451-
: BuiltMap<String, Object>(json.decode(messageParams)).toMap();
444+
final params = messageParams == null
445+
? <String, Object>{}
446+
: BuiltMap<String, Object>(json.decode(messageParams)).toMap();
452447

453448
chrome.debugger.sendCommand(
454449
Debuggee(tabId: tabId),
@@ -461,11 +456,10 @@ void _forwardDwdsEventToChromeDebugger(
461456
jsonEncode(
462457
serializers.serialize(
463458
ExtensionResponse(
464-
(b) =>
465-
b
466-
..id = message.id
467-
..success = false
468-
..result = JSON.stringify(chrome.runtime.lastError),
459+
(b) => b
460+
..id = message.id
461+
..success = false
462+
..result = JSON.stringify(chrome.runtime.lastError),
469463
),
470464
),
471465
),
@@ -475,11 +469,10 @@ void _forwardDwdsEventToChromeDebugger(
475469
jsonEncode(
476470
serializers.serialize(
477471
ExtensionResponse(
478-
(b) =>
479-
b
480-
..id = message.id
481-
..success = true
482-
..result = JSON.stringify(e),
472+
(b) => b
473+
..id = message.id
474+
..success = true
475+
..result = JSON.stringify(e),
483476
),
484477
),
485478
),
@@ -612,10 +605,9 @@ Future<bool> _sendConnectFailureMessage(
612605
final json = jsonEncode(
613606
serializers.serialize(
614607
ConnectFailure(
615-
(b) =>
616-
b
617-
..tabId = dartAppTabId
618-
..reason = reason.name,
608+
(b) => b
609+
..tabId = dartAppTabId
610+
..reason = reason.name,
619611
),
620612
),
621613
);
@@ -634,11 +626,10 @@ Future<bool> _sendStopDebuggingMessage(
634626
final json = jsonEncode(
635627
serializers.serialize(
636628
DebugStateChange(
637-
(b) =>
638-
b
639-
..tabId = dartAppTabId
640-
..reason = reason.name
641-
..newState = DebugStateChange.stopDebugging,
629+
(b) => b
630+
..tabId = dartAppTabId
631+
..reason = reason.name
632+
..newState = DebugStateChange.stopDebugging,
642633
),
643634
),
644635
);
@@ -747,10 +738,9 @@ DebuggerLocation? _debuggerLocation(int dartAppTabId) {
747738
/// Construct an [ExtensionEvent] from [method] and [params].
748739
ExtensionEvent _extensionEventFor(String method, dynamic params) {
749740
return ExtensionEvent(
750-
(b) =>
751-
b
752-
..params = jsonEncode(json.decode(JSON.stringify(params)))
753-
..method = jsonEncode(method),
741+
(b) => b
742+
..params = jsonEncode(json.decode(JSON.stringify(params)))
743+
..method = jsonEncode(method),
754744
);
755745
}
756746

0 commit comments

Comments
 (0)