-
Notifications
You must be signed in to change notification settings - Fork 82
Refactor: Update the parameters for DWDS.start
#2231
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
793bcfb
Change parameters to Dwds.start
elliette 64c8abe
Update build.yaml
elliette 705edee
Fix the build
elliette 0f8eb68
Resolve merge conflicts
elliette 315caea
Add back in new line
elliette cc912ea
Also update WebDev CHANGELOG
elliette 316875c
Update tests
elliette 8854262
Create a ToolConfiguration
elliette 57c1745
Format and fix
elliette 79dc040
Forgot to commit
elliette d7e4971
Update tests
elliette eaa470d
Respond to PR comments
elliette b75e088
Merge branch 'master' into dwds-globals
elliette File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
export 'src/config/app_metadata.dart' show AppMetadata; | ||
export 'src/config/debug_settings.dart' | ||
show UrlEncoder, DevToolsLauncher, DebugSettings; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
/// Metadata for the connected app. | ||
/// | ||
/// These are set by the code runner and passed to DWDS on start up. | ||
class AppMetadata { | ||
final String hostname; | ||
final bool isInternalBuild; | ||
Future<bool> Function() isFlutterApp; | ||
|
||
AppMetadata({ | ||
this.hostname = 'localhost', | ||
this.isInternalBuild = false, | ||
Future<bool> Function()? isFlutterApp, | ||
}) : isFlutterApp = isFlutterApp ?? (() => Future.value(true)); | ||
elliette marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:dwds/src/servers/devtools.dart'; | ||
import 'package:dwds/src/services/expression_compiler.dart'; | ||
|
||
typedef UrlEncoder = Future<String> Function(String url); | ||
|
||
typedef DevToolsLauncher = Future<DevTools> Function(String hostname); | ||
|
||
/// Debug settings for the connected app. | ||
/// | ||
/// These are set by the code runner and passed to DWDS on start up. | ||
class DebugSettings { | ||
final bool enableDebugging; | ||
final bool enableDebugExtension; | ||
final bool useSseForDebugProxy; | ||
final bool useSseForDebugBackend; | ||
final bool useSseForInjectedClient; | ||
final bool spawnDds; | ||
final bool enableDevToolsLaunch; | ||
final bool launchDevToolsInNewWindow; | ||
final bool emitDebugEvents; | ||
final DevToolsLauncher? devToolsLauncher; | ||
final ExpressionCompiler? expressionCompiler; | ||
final UrlEncoder? urlEncoder; | ||
|
||
DebugSettings({ | ||
this.enableDebugging = true, | ||
this.enableDebugExtension = false, | ||
this.useSseForDebugProxy = true, | ||
this.useSseForDebugBackend = true, | ||
this.useSseForInjectedClient = true, | ||
this.spawnDds = true, | ||
this.enableDevToolsLaunch = true, | ||
this.launchDevToolsInNewWindow = true, | ||
this.emitDebugEvents = true, | ||
this.devToolsLauncher, | ||
this.expressionCompiler, | ||
this.urlEncoder, | ||
}); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.