-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
197 additions
and
175 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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)); | ||
} |
This file contains 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,45 @@ | ||
// 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; | ||
// TODO(annagrin): make expressionCompiler argument required | ||
// [issue 881](https://github.com/dart-lang/webdev/issues/881) | ||
final ExpressionCompiler? expressionCompiler; | ||
final UrlEncoder? urlEncoder; | ||
|
||
DebugSettings({ | ||
required this.enableDebugging, | ||
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 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.