| Index: sdk/lib/_internal/pub_generated/lib/src/pubspec.dart
|
| diff --git a/sdk/lib/_internal/pub_generated/lib/src/pubspec.dart b/sdk/lib/_internal/pub_generated/lib/src/pubspec.dart
|
| index ce32ae2cbb980577b2c52da5d3b4c2b8cf79a7c5..17620557a8681e849638596812ec1e43613645fd 100644
|
| --- a/sdk/lib/_internal/pub_generated/lib/src/pubspec.dart
|
| +++ b/sdk/lib/_internal/pub_generated/lib/src/pubspec.dart
|
| @@ -171,6 +171,42 @@ class Pubspec {
|
| }
|
| bool _parsedPublishTo = false;
|
| String _publishTo;
|
| + Map<String, String> get executables {
|
| + if (_executables != null) return _executables;
|
| + var yaml = fields['executables'];
|
| + if (yaml == null) {
|
| + _executables = {};
|
| + return _executables;
|
| + }
|
| + if (yaml is! Map) {
|
| + _error(
|
| + '"executables" field must be a map.',
|
| + fields.nodes['executables'].span);
|
| + }
|
| + yaml.nodes.forEach((key, value) {
|
| + validateName(name, description) {
|
| + final validName = new RegExp(r"^[a-zA-Z0-9_-]+$");
|
| + if (!validName.hasMatch(name.value)) {
|
| + _error(
|
| + '"executables" $description may only contain letters, '
|
| + 'numbers, hyphens and underscores.',
|
| + name.span);
|
| + }
|
| + }
|
| + if (key.value is! String) {
|
| + _error('"executables" keys must be strings.', key.span);
|
| + }
|
| + validateName(key, "keys");
|
| + if (value.value == null) return;
|
| + if (value.value is! String) {
|
| + _error('"executables" values must be strings or null.', value.span);
|
| + }
|
| + validateName(value, "values");
|
| + });
|
| + _executables = yaml;
|
| + return _executables;
|
| + }
|
| + Map<String, String> _executables;
|
| bool get isPrivate => publishTo == "none";
|
| bool get isEmpty =>
|
| name == null && version == Version.none && dependencies.isEmpty;
|
|
|