-
Notifications
You must be signed in to change notification settings - Fork 83
Support running DWDS without a Chrome Debug Port (web-socket-based) #2639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1fe0895
2707a41
489dbcc
a4e0dd0
412bda3
8f7c645
91c7b41
871f388
d7dad51
6f40567
b4d5cb1
0edf3d8
340baad
fa5feb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As a follow-up (in a different change) should we update the ChromeProxyService to also use this Built object for service extensions? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2025, the Dart project authors. All rights reserved. | ||
// Defines the request for service extension calls over WebSocket. | ||
|
||
import 'dart:convert'; | ||
import 'package:built_value/built_value.dart'; | ||
import 'package:built_value/serializer.dart'; | ||
|
||
part 'service_extension_request.g.dart'; | ||
|
||
abstract class ServiceExtensionRequest | ||
implements Built<ServiceExtensionRequest, ServiceExtensionRequestBuilder> { | ||
String get id; | ||
String get method; | ||
String | ||
get argsJson; // Store args as JSON string for built_value compatibility | ||
|
||
// Helper method to get args as Map<String, dynamic> | ||
Map<String, dynamic> get args => | ||
argsJson.isEmpty | ||
? <String, dynamic>{} | ||
: json.decode(argsJson) as Map<String, dynamic>; | ||
|
||
ServiceExtensionRequest._(); | ||
factory ServiceExtensionRequest([ | ||
void Function(ServiceExtensionRequestBuilder) updates, | ||
]) = _$ServiceExtensionRequest; | ||
|
||
// Convenient factory method to create with args Map | ||
factory ServiceExtensionRequest.fromArgs({ | ||
required String id, | ||
required String method, | ||
required Map<String, dynamic> args, | ||
}) => ServiceExtensionRequest( | ||
(b) => | ||
b | ||
..id = id | ||
..method = method | ||
..argsJson = json.encode(args), | ||
); | ||
|
||
static Serializer<ServiceExtensionRequest> get serializer => | ||
_$serviceExtensionRequestSerializer; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can leave this bullet off since it's more of an implementation detail.