Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/barback/web_socket_api.dart

Issue 887223007: Revert "Use native async/await support in pub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub_generated/lib/src/barback/web_socket_api.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart b/sdk/lib/_internal/pub_generated/lib/src/barback/web_socket_api.dart
similarity index 93%
copy from sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
copy to sdk/lib/_internal/pub_generated/lib/src/barback/web_socket_api.dart
index a580a2c60c0f3b94f9499346fd46e8b5f080c24a..3d5d4e1cc9f9b625312f5f3d6ba8010f6f5bc3e8 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/web_socket_api.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/barback/web_socket_api.dart
@@ -110,7 +110,8 @@ class WebSocketApi {
return _environment.getAssetIdForUrl(url).then((id) {
if (id == null) {
- throw new json_rpc.RpcException(_Error.NOT_SERVED,
+ throw new json_rpc.RpcException(
+ _Error.NOT_SERVED,
'"${url.host}:${url.port}" is not being served by pub.');
}
@@ -118,7 +119,10 @@ class WebSocketApi {
// see if assets exist, consider supporting implicit index.html at that
// point.
- var result = {"package": id.package, "path": id.path};
+ var result = {
+ "package": id.package,
+ "path": id.path
+ };
// Map the line.
// TODO(rnystrom): Right now, source maps are not supported and it just
@@ -186,11 +190,14 @@ class WebSocketApi {
return _environment.getUrlsForAssetPath(assetPath).then((urls) {
if (urls.isEmpty) {
- throw new json_rpc.RpcException(_Error.NOT_SERVED,
+ throw new json_rpc.RpcException(
+ _Error.NOT_SERVED,
'Asset path "$assetPath" is not currently being served.');
}
- var result = {"urls": urls.map((url) => url.toString()).toList()};
+ var result = {
+ "urls": urls.map((url) => url.toString()).toList()
+ };
// Map the line.
// TODO(rnystrom): Right now, source maps are not supported and it just
@@ -230,16 +237,19 @@ class WebSocketApi {
}).catchError((error) {
if (error is! OverlappingSourceDirectoryException) throw error;
- var dir = pluralize("directory", error.overlappingDirectories.length,
+ var dir = pluralize(
+ "directory",
+ error.overlappingDirectories.length,
plural: "directories");
- var overlapping = toSentence(error.overlappingDirectories.map(
- (dir) => '"$dir"'));
+ var overlapping =
+ toSentence(error.overlappingDirectories.map((dir) => '"$dir"'));
print("data: ${error.overlappingDirectories}");
- throw new json_rpc.RpcException(_Error.OVERLAPPING,
+ throw new json_rpc.RpcException(
+ _Error.OVERLAPPING,
'Path "$rootDirectory" overlaps already served $dir $overlapping.',
data: {
- "directories": error.overlappingDirectories
- });
+ "directories": error.overlappingDirectories
+ });
});
}
@@ -267,11 +277,14 @@ class WebSocketApi {
var rootDirectory = _validateRelativePath(params, "path");
return _environment.unserveDirectory(rootDirectory).then((url) {
if (url == null) {
- throw new json_rpc.RpcException(_Error.NOT_SERVED,
+ throw new json_rpc.RpcException(
+ _Error.NOT_SERVED,
'Directory "$rootDirectory" is not bound to a server.');
}
- return {"url": url.toString()};
+ return {
+ "url": url.toString()
+ };
});
}
@@ -291,8 +304,7 @@ class WebSocketApi {
if (!path.isWithin(".", pathString)) {
throw new json_rpc.RpcException.invalidParams(
- '"$key" cannot reach out of its containing directory. '
- 'Got "$pathString".');
+ '"$key" cannot reach out of its containing directory. ' 'Got "$pathString".');
}
return pathString;

Powered by Google App Engine
This is Rietveld 408576698