Skip to content
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
File renamed without changes.
File renamed without changes.
23 changes: 23 additions & 0 deletions _test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: _test
version: 1.0.0
description: >-
A fake package used for testing
publish_to: none

environment:
sdk: ">=2.3.2-dev.0.1 <3.0.0"

dependencies:
intl: ^0.15.8
path: ^1.6.1
webdev: ^2.0.0

dev_dependencies:
build_runner: ^1.0.0
build_web_compilers: '>=1.0.0 <3.0.0'

dependency_overrides:
webdev:
path: ../webdev
dwds:
path: ../dwds
1 change: 1 addition & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- Move `data` abstractions from `package:webdev` into `package:dwds`.
- Move debugging related handlers from `package:webdev` into `package:dwds`.
- Move injected client from `package:webdev` into `package:dwds`.

## 0.3.3

Expand Down
4 changes: 2 additions & 2 deletions webdev/build.yaml → dwds/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ targets:
- -O4
generate_for:
- web/client.dart
webdev|client_js_copy_builder:
dwds|client_js_copy_builder:
enabled: true

builders:
Expand All @@ -18,6 +18,6 @@ builders:
- copyBuilder
build_extensions:
web/client.dart.js:
- lib/src/serve/injected/client.js
- lib/src/injected/client.js
auto_apply: none
build_to: source
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const entrypointExtensionMarker = '/* ENTRYPOINT_EXTENTION_MARKER */';
/// Marker placed by build_web_compilers for where to put injected JS code.
const mainExtensionMarker = '/* MAIN_EXTENSION_MARKER */';

const _clientScript = 'webdev/src/serve/injected/client';
const _clientScript = 'dwds/src/injected/client';

Handler Function(Handler) createInjectedHandler(
ReloadConfiguration configuration,
Expand Down
3 changes: 3 additions & 0 deletions dwds/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ dev_dependencies:
build_runner: ^1.0.0
build_web_compilers: '>=1.0.0 <3.0.0'
built_value_generator: ^6.4.0
graphs: ^0.2.0
js: ^0.6.1
test: ^1.6.0
uuid: ^2.0.0
webdriver: ^2.0.0
webdev: ^2.0.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import 'dart:io';

import 'package:dwds/src/handlers/injected_handler.dart';
import 'package:dwds/src/injected/configuration.dart';
import 'package:http/http.dart' as http;
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart' as shelf_io;
import 'package:test/test.dart';
import 'package:webdev/src/serve/injected/configuration.dart';
import 'package:webdev/src/serve/middlewares/injected_middleware.dart';

void main() {
HttpServer server;
Expand Down
15 changes: 7 additions & 8 deletions dwds/test/test_context.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:dwds/service.dart';
import 'package:dwds/src/chrome_proxy_service.dart';
import 'package:dwds/src/helpers.dart';
import 'package:http/http.dart' as http;
import 'package:path/path.dart' as p;
import 'package:test/test.dart';
import 'package:webdriver/io.dart';
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
Expand All @@ -31,14 +32,12 @@ class TestContext {
'Could not start ChromeDriver. Is it installed?\nError: $e');
}

webdev = await Process.start('pub', [
'run',
'webdev',
'serve',
'example:$port',
'--',
'--delete-conflicting-outputs'
]);
await Process.run('pub', ['get'],
workingDirectory: p.relative('../_test', from: p.current));

webdev = await Process.start(
'pub', ['run', 'webdev', 'serve', 'example:$port'],
workingDirectory: p.relative('../_test', from: p.current));
webdev.stderr
.transform(const Utf8Decoder())
.transform(const LineSplitter())
Expand Down
4 changes: 2 additions & 2 deletions webdev/tool/copy_builder.dart → dwds/tool/copy_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ class _CopyBuilder extends Builder {
}
}

final _clientJsId = AssetId('webdev', 'web/client.dart.js');
final _clientJsCopyId = AssetId('webdev', 'lib/src/serve/injected/client.js');
final _clientJsId = AssetId('dwds', 'web/client.dart.js');
final _clientJsCopyId = AssetId('dwds', 'lib/src/injected/client.js');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion webdev/lib/src/command/configuration.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:args/args.dart';
import 'package:dwds/src/injected/configuration.dart'; // ignore: implementation_imports
import 'package:logging/logging.dart';

import '../logging.dart';
import '../serve/injected/configuration.dart';

const autoOption = 'auto';
const chromeDebugPortFlag = 'chrome-debug-port';
Expand Down
2 changes: 1 addition & 1 deletion webdev/lib/src/serve/webdev_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import 'package:build_daemon/data/build_status.dart';
import 'package:dwds/src/devtools.dart'; // ignore: implementation_imports
import 'package:dwds/src/handlers/asset_handler.dart'; // ignore: implementation_imports
import 'package:dwds/src/handlers/dev_handler.dart'; // ignore: implementation_imports
import 'package:dwds/src/handlers/injected_handler.dart'; // ignore: implementation_imports
import 'package:http_multi_server/http_multi_server.dart';
import 'package:shelf/shelf.dart';
import 'package:shelf/shelf_io.dart' as shelf_io;
Expand All @@ -17,7 +18,6 @@ import '../command/configuration.dart';
import '../logging.dart';
import 'chrome.dart';
import 'handlers/favicon_handler.dart';
import 'middlewares/injected_middleware.dart';

class ServerOptions {
final Configuration configuration;
Expand Down
4 changes: 0 additions & 4 deletions webdev/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,11 @@ dependencies:
dev_dependencies:
build: ^1.0.0
build_runner: ^1.0.0
build_web_compilers: '>=1.0.0 <3.0.0'
build_verify: ^1.0.0
build_version: ^2.0.0
graphs: ^0.2.0
js: ^0.6.1
test: ^1.6.0
test_descriptor: ^1.0.3
test_process: ^1.0.1
uuid: ^2.0.0
webdriver: ^2.0.0

executables:
Expand Down