Index: sdk/lib/_internal/pub_generated/lib/src/command/lish.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command/lish.dart b/sdk/lib/_internal/pub_generated/lib/src/command/lish.dart |
similarity index 80% |
copy from sdk/lib/_internal/pub/lib/src/command/lish.dart |
copy to sdk/lib/_internal/pub_generated/lib/src/command/lish.dart |
index 678360419eebb5951029af36d5d04779f73a4fc2..ef5840e430232641badc81e71774423925a506b5 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command/lish.dart |
+++ b/sdk/lib/_internal/pub_generated/lib/src/command/lish.dart |
@@ -50,11 +50,19 @@ class LishCommand extends PubCommand { |
bool get force => argResults['force']; |
LishCommand() { |
- argParser.addFlag('dry-run', abbr: 'n', negatable: false, |
+ argParser.addFlag( |
+ 'dry-run', |
+ abbr: 'n', |
+ negatable: false, |
help: 'Validate but do not publish the package.'); |
- argParser.addFlag('force', abbr: 'f', negatable: false, |
+ argParser.addFlag( |
+ 'force', |
+ abbr: 'f', |
+ negatable: false, |
help: 'Publish without confirmation if there are no errors.'); |
- argParser.addOption('server', defaultsTo: HostedSource.defaultUrl, |
+ argParser.addOption( |
+ 'server', |
+ defaultsTo: HostedSource.defaultUrl, |
help: 'The package server to which to upload this package.'); |
} |
@@ -82,15 +90,19 @@ class LishCommand extends PubCommand { |
}); |
request.followRedirects = false; |
- request.files.add(new http.MultipartFile.fromBytes( |
- 'file', packageBytes, filename: 'package.tar.gz')); |
+ request.files.add( |
+ new http.MultipartFile.fromBytes( |
+ 'file', |
+ packageBytes, |
+ filename: 'package.tar.gz')); |
return client.send(request); |
}).then(http.Response.fromStream).then((response) { |
var location = response.headers['location']; |
if (location == null) throw new PubHttpException(response); |
return location; |
- }).then((location) => client.get(location, headers: PUB_API_HEADERS)) |
- .then(handleJsonSuccess); |
+ }).then( |
+ (location) => |
+ client.get(location, headers: PUB_API_HEADERS)).then(handleJsonSuccess); |
}); |
}).catchError((error) { |
if (error is! PubHttpException) throw error; |
@@ -114,9 +126,9 @@ class LishCommand extends PubCommand { |
} |
if (entrypoint.root.pubspec.isPrivate) { |
- dataError('A private package cannot be published.\n' |
- 'You can enable this by changing the "publish_to" field in your ' |
- 'pubspec.'); |
+ dataError( |
+ 'A private package cannot be published.\n' |
+ 'You can enable this by changing the "publish_to" field in your ' 'pubspec.'); |
} |
var files = entrypoint.root.listFiles(useGitIgnore: true); |
@@ -126,15 +138,15 @@ class LishCommand extends PubCommand { |
var package = entrypoint.root; |
log.message( |
'Publishing ${package.name} ${package.version} to $server:\n' |
- '${tree.fromFiles(files, baseDir: entrypoint.root.dir)}'); |
+ '${tree.fromFiles(files, baseDir: entrypoint.root.dir)}'); |
- var packageBytesFuture = createTarGz(files, baseDir: entrypoint.root.dir) |
- .toBytes(); |
+ var packageBytesFuture = |
+ createTarGz(files, baseDir: entrypoint.root.dir).toBytes(); |
// Validate the package. |
- return _validate(packageBytesFuture.then((bytes) => bytes.length)) |
- .then((isValid) { |
- if (isValid) return packageBytesFuture.then(_publish); |
+ return _validate( |
+ packageBytesFuture.then((bytes) => bytes.length)).then((isValid) { |
+ if (isValid) return packageBytesFuture.then(_publish); |
}); |
} |
@@ -153,10 +165,11 @@ class LishCommand extends PubCommand { |
var warnings = pair.last; |
if (!errors.isEmpty) { |
- log.error("Sorry, your package is missing " |
- "${(errors.length > 1) ? 'some requirements' : 'a requirement'} " |
- "and can't be published yet.\nFor more information, see: " |
- "http://pub.dartlang.org/doc/pub-lish.html.\n"); |
+ log.error( |
+ "Sorry, your package is missing " |
+ "${(errors.length > 1) ? 'some requirements' : 'a requirement'} " |
+ "and can't be published yet.\nFor more information, see: " |
+ "http://pub.dartlang.org/doc/pub-lish.html.\n"); |
return false; |
} |