Skip to content

Provide an app entrypoint to DWDS #2047

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 17 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## 18.0.3-dev
## 19.0.0-dev
- Allow clients to specify the connected app's entrypoint file. - [#2047](https://github.com/dart-lang/webdev/pull/2047)

## 18.0.2

Expand Down
11 changes: 9 additions & 2 deletions dwds/lib/src/debugging/libraries.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,15 @@ class LibraryHelper extends Domain {
// TODO: read entrypoint from app metadata.
// Issue: https://github.com/dart-lang/webdev/issues/1290
final libraries = await libraryRefs;
_rootLib = libraries
.firstWhereOrNull((lib) => lib.name?.contains('org-dartlang') ?? false);
if (globalLoadStrategy.appEntrypoint != null) {
_rootLib = libraries.firstWhereOrNull(
(lib) => Uri.parse(lib.uri ?? '') == globalLoadStrategy.appEntrypoint,
);
}
_rootLib = _rootLib ??
libraries.firstWhereOrNull(
(lib) => lib.name?.contains('org-dartlang') ?? false,
);
_rootLib = _rootLib ??
libraries
.firstWhereOrNull((lib) => lib.name?.contains('main') ?? false);
Expand Down
Loading