| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * The main entrypoint for the pub command line application. | 6 * The main entrypoint for the pub command line application. |
| 7 */ | 7 */ |
| 8 #library('pub'); | 8 library pub; |
| 9 | 9 |
| 10 #import('../../pkg/args/lib/args.dart'); | 10 import '../../pkg/args/lib/args.dart'; |
| 11 #import('dart:io'); | 11 import 'dart:io'; |
| 12 #import('dart:math'); | 12 import 'dart:math'; |
| 13 #import('io.dart'); | 13 import 'io.dart'; |
| 14 #import('command_help.dart'); | 14 import 'command_help.dart'; |
| 15 #import('command_install.dart'); | 15 import 'command_install.dart'; |
| 16 #import('command_update.dart'); | 16 import 'command_update.dart'; |
| 17 #import('command_version.dart'); | 17 import 'command_version.dart'; |
| 18 #import('entrypoint.dart'); | 18 import 'entrypoint.dart'; |
| 19 #import('exit_codes.dart', prefix: 'exit_codes'); | 19 import 'exit_codes.dart' as exit_codes; |
| 20 #import('git_source.dart'); | 20 import 'git_source.dart'; |
| 21 #import('hosted_source.dart'); | 21 import 'hosted_source.dart'; |
| 22 #import('package.dart'); | 22 import 'package.dart'; |
| 23 #import('pubspec.dart'); | 23 import 'pubspec.dart'; |
| 24 #import('sdk_source.dart'); | 24 import 'sdk_source.dart'; |
| 25 #import('source.dart'); | 25 import 'source.dart'; |
| 26 #import('source_registry.dart'); | 26 import 'source_registry.dart'; |
| 27 #import('system_cache.dart'); | 27 import 'system_cache.dart'; |
| 28 #import('utils.dart'); | 28 import 'utils.dart'; |
| 29 #import('version.dart'); | 29 import 'version.dart'; |
| 30 | 30 |
| 31 Version get pubVersion => new Version(0, 0, 0); | 31 Version get pubVersion => new Version(0, 0, 0); |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * The commands that Pub understands. | 34 * The commands that Pub understands. |
| 35 */ | 35 */ |
| 36 Map<String, PubCommand> get pubCommands => { | 36 Map<String, PubCommand> get pubCommands => { |
| 37 'help': new HelpCommand(), | 37 'help': new HelpCommand(), |
| 38 'install': new InstallCommand(), | 38 'install': new InstallCommand(), |
| 39 'update': new UpdateCommand(), | 39 'update': new UpdateCommand(), |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 if (exception is HttpException || exception is HttpParserException || | 264 if (exception is HttpException || exception is HttpParserException || |
| 265 exception is SocketIOException || exception is PubHttpException) { | 265 exception is SocketIOException || exception is PubHttpException) { |
| 266 return exit_codes.UNAVAILABLE; | 266 return exit_codes.UNAVAILABLE; |
| 267 } else if (exception is FormatException) { | 267 } else if (exception is FormatException) { |
| 268 return exit_codes.DATA; | 268 return exit_codes.DATA; |
| 269 } else { | 269 } else { |
| 270 return 1; | 270 return 1; |
| 271 } | 271 } |
| 272 } | 272 } |
| 273 } | 273 } |
| OLD | NEW |