This commit is contained in:
Tobe O 2019-04-29 13:41:35 -04:00
parent 6ec93f2296
commit cf1b813578
5 changed files with 22 additions and 6 deletions

View file

@ -1,3 +1,8 @@
# 2.1.6
* Fix a bug where models always defaulted to ORM.
* Add GraphQL boilerplate.
* Automatically restore terminal colors on shutdown.
# 2.1.5+1
* Update to `inflection2`.

View file

@ -4,6 +4,7 @@ library angel_cli.tool;
import "dart:io";
import "package:args/command_runner.dart";
import 'package:angel_cli/angel_cli.dart';
import 'package:io/ansi.dart';
final String DOCTOR = "doctor";
@ -28,17 +29,19 @@ main(List<String> args) async {
..addCommand(new RenameCommand())
..addCommand(new MakeCommand());
return await runner.run(args).then((_) {}).catchError((exc, st) {
return await runner.run(args).catchError((exc, st) {
if (exc is String) {
stdout.writeln(exc);
} else {
stderr.writeln("Oops, something went wrong: $exc");
exitCode = 1;
if (args.contains('--verbose')) {
stderr.writeln(st);
}
}
exitCode = 1;
}).whenComplete(() {
stdout.write(resetAll.wrap(''));
});
}

View file

@ -221,6 +221,13 @@ Future preBuild(Directory projectDir) async {
if (buildCode != 0) throw new Exception('Failed to pre-build resources.');
}
const BoilerplateInfo graphQLBoilerplate = const BoilerplateInfo(
'GraphQL',
"A starting point for GraphQL API servers.",
'https://github.com/angel-dart/angel.git',
ref: 'graphql',
);
const BoilerplateInfo ormBoilerplate = const BoilerplateInfo(
'ORM',
"A starting point for applications that use Angel's ORM.",
@ -256,6 +263,7 @@ const List<BoilerplateInfo> boilerplates = const [
basicBoilerplate,
//legacyBoilerplate,
ormBoilerplate,
graphQLBoilerplate,
sharedBoilerplate,
sharedOrmBoilerplate,
];

View file

@ -20,7 +20,6 @@ class ModelCommand extends Command {
..addFlag('migration',
abbr: 'm',
help: 'Generate migrations when running `build_runner`.',
defaultsTo: true,
negatable: false)
..addFlag('orm', help: 'Generate angel_orm code.', negatable: false)
..addFlag('serializable',

View file

@ -2,14 +2,14 @@ author: Tobe O <thosakwe@gmail.com>
description: Command-line tools for the Angel framework, including scaffolding.
homepage: https://github.com/angel-dart/angel_cli
name: angel_cli
version: 2.1.5+2
version: 2.1.6
dependencies:
analyzer: ">=0.32.0 <2.0.0"
args: ^1.0.0
code_builder: ^3.0.0
dart_style: ^1.0.0
glob: ^1.1.0
http: ^0.11.3
http: ^0.12.0
io: ^0.3.2
inflection2: ^0.4.2
mustache4dart: ^3.0.0-dev.1.0
@ -18,6 +18,7 @@ dependencies:
pubspec_parse: ^0.1.2
quiver: ^2.0.0
recase: ^2.0.0
shutdown: ^0.4.0
watcher: ^0.9.7
yaml: ^2.0.0
#yamlicious: ^0.0.5