OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library serve_packages; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:convert'; | 6 import 'dart:convert'; |
9 | 7 |
10 import 'package:path/path.dart' as p; | 8 import 'package:path/path.dart' as p; |
11 import 'package:pub/src/io.dart'; | 9 import 'package:pub/src/io.dart'; |
12 import 'package:pub/src/utils.dart'; | 10 import 'package:pub/src/utils.dart'; |
13 import 'package:pub_semver/pub_semver.dart'; | 11 import 'package:pub_semver/pub_semver.dart'; |
14 import 'package:scheduled_test/scheduled_test.dart'; | 12 import 'package:scheduled_test/scheduled_test.dart'; |
15 import 'package:yaml/yaml.dart'; | 13 import 'package:yaml/yaml.dart'; |
16 | 14 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 192 |
195 /// A package that's intended to be served. | 193 /// A package that's intended to be served. |
196 class _ServedPackage { | 194 class _ServedPackage { |
197 final Map pubspec; | 195 final Map pubspec; |
198 final List<d.Descriptor> contents; | 196 final List<d.Descriptor> contents; |
199 | 197 |
200 Version get version => new Version.parse(pubspec['version']); | 198 Version get version => new Version.parse(pubspec['version']); |
201 | 199 |
202 _ServedPackage(this.pubspec, this.contents); | 200 _ServedPackage(this.pubspec, this.contents); |
203 } | 201 } |
OLD | NEW |