Skip to content

Commit 6109260

Browse files
committed
Formatting
1 parent 0fd4a05 commit 6109260

Some content is hidden

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

46 files changed

+533
-492
lines changed

dwds/lib/dart_web_debug_service.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,19 @@ class Dwds {
8383
Future<String>? extensionUri;
8484
ExtensionBackend? extensionBackend;
8585
if (debugSettings.enableDebugExtension) {
86-
final handler = debugSettings.useSseForDebugBackend
87-
? SseSocketHandler(
88-
SseHandler(
89-
Uri.parse('/\$debug'),
90-
// Proxy servers may actively kill long standing connections.
91-
// Allow for clients to reconnect in a short window. Making the
92-
// window too long may cause issues if the user closes a debug
93-
// session and initiates a new one during the keepAlive window.
94-
keepAlive: const Duration(seconds: 5),
95-
),
96-
)
97-
: WebSocketSocketHandler();
86+
final handler =
87+
debugSettings.useSseForDebugBackend
88+
? SseSocketHandler(
89+
SseHandler(
90+
Uri.parse('/\$debug'),
91+
// Proxy servers may actively kill long standing connections.
92+
// Allow for clients to reconnect in a short window. Making the
93+
// window too long may cause issues if the user closes a debug
94+
// session and initiates a new one during the keepAlive window.
95+
keepAlive: const Duration(seconds: 5),
96+
),
97+
)
98+
: WebSocketSocketHandler();
9899

99100
extensionBackend = await ExtensionBackend.start(
100101
handler,

dwds/lib/data/build_result.g.dart

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

dwds/lib/data/debug_event.g.dart

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

dwds/lib/data/extension_request.g.dart

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

dwds/lib/data/hot_reload_request.g.dart

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

dwds/lib/data/hot_restart_request.g.dart

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

dwds/lib/data/service_extension_request.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ abstract class ServiceExtensionRequest
1515
get argsJson; // Store args as JSON string for built_value compatibility
1616

1717
// Helper method to get args as Map<String, dynamic>
18-
Map<String, dynamic> get args => argsJson.isEmpty
19-
? <String, dynamic>{}
20-
: json.decode(argsJson) as Map<String, dynamic>;
18+
Map<String, dynamic> get args =>
19+
argsJson.isEmpty
20+
? <String, dynamic>{}
21+
: json.decode(argsJson) as Map<String, dynamic>;
2122

2223
ServiceExtensionRequest._();
2324
factory ServiceExtensionRequest([
@@ -30,10 +31,11 @@ abstract class ServiceExtensionRequest
3031
required String method,
3132
required Map<String, dynamic> args,
3233
}) => ServiceExtensionRequest(
33-
(b) => b
34-
..id = id
35-
..method = method
36-
..argsJson = json.encode(args),
34+
(b) =>
35+
b
36+
..id = id
37+
..method = method
38+
..argsJson = json.encode(args),
3739
);
3840

3941
static Serializer<ServiceExtensionRequest> get serializer =>

dwds/lib/data/service_extension_response.dart

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ abstract class ServiceExtensionResponse
1818
String? get errorMessage;
1919

2020
// Helper method to get result as Map<String, dynamic>
21-
Map<String, dynamic>? get result => resultJson == null || resultJson!.isEmpty
22-
? null
23-
: json.decode(resultJson!) as Map<String, dynamic>;
21+
Map<String, dynamic>? get result =>
22+
resultJson == null || resultJson!.isEmpty
23+
? null
24+
: json.decode(resultJson!) as Map<String, dynamic>;
2425

2526
ServiceExtensionResponse._();
2627
factory ServiceExtensionResponse([
@@ -35,12 +36,13 @@ abstract class ServiceExtensionResponse
3536
int? errorCode,
3637
String? errorMessage,
3738
}) => ServiceExtensionResponse(
38-
(b) => b
39-
..id = id
40-
..success = success
41-
..resultJson = result != null ? json.encode(result) : null
42-
..errorCode = errorCode
43-
..errorMessage = errorMessage,
39+
(b) =>
40+
b
41+
..id = id
42+
..success = success
43+
..resultJson = result != null ? json.encode(result) : null
44+
..errorCode = errorCode
45+
..errorMessage = errorMessage,
4446
);
4547

4648
static Serializer<ServiceExtensionResponse> get serializer =>

dwds/lib/src/connections/debug_connection.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ class DebugConnection {
4747
/// A client of the Dart VM Service with DWDS specific extensions.
4848
VmService get vmService => _appDebugServices.dwdsVmClient.client;
4949

50-
Future<void> close() => _closed ??= () async {
51-
final proxyService = _appDebugServices.proxyService;
52-
if (proxyService is ChromeProxyService) {
53-
await proxyService.remoteDebugger.close();
54-
}
55-
await _appDebugServices.close();
56-
_onDoneCompleter.complete();
57-
}();
50+
Future<void> close() =>
51+
_closed ??= () async {
52+
final proxyService = _appDebugServices.proxyService;
53+
if (proxyService is ChromeProxyService) {
54+
await proxyService.remoteDebugger.close();
55+
}
56+
await _appDebugServices.close();
57+
_onDoneCompleter.complete();
58+
}();
5859

5960
Future<void> get onDone => _onDoneCompleter.future;
6061
}

dwds/lib/src/debugging/dart_runtime_debugger.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ class DartRuntimeDebugger {
198198

199199
/// Generates a JS expression for calling a library method.
200200
String callLibraryMethodJsExpression(String libraryUri, String methodName) {
201-
final findLibraryExpression =
202-
'''
201+
final findLibraryExpression = '''
203202
(function() {
204203
const sdk = ${_loadStrategy.loadModuleSnippet}('dart_sdk');
205204
const dart = sdk.dart;

0 commit comments

Comments
 (0)