This commit is contained in:
thosakwe 2016-12-31 13:19:51 -05:00
parent 07d48ca35e
commit 6e2030fdf4
3 changed files with 10 additions and 4 deletions

View file

@ -30,10 +30,13 @@ class InitCommand extends Command {
await _pubGet(projectDir);
await preBuild(projectDir);
var secret = rs.randomAlphaNumeric(32);
print('Generated new JWT secret: $secret');
print('Generated new development JWT secret: $secret');
await _key.changeSecret(
new File.fromUri(projectDir.uri.resolve('config/default.yaml')),
secret);
secret = rs.randomAlphaNumeric(32);
print('Generated new production JWT secret: $secret');
await _key.changeSecret(
new File.fromUri(projectDir.uri.resolve('config/production.yaml')),
secret);

View file

@ -12,8 +12,11 @@ class KeyCommand extends Command {
@override
run() async {
var secret = rs.randomAlphaNumeric(32);
print('Generated new JWT secret: $secret');
print('Generated new development JWT secret: $secret');
await changeSecret(new File('config/default.yaml'), secret);
secret = rs.randomAlphaNumeric(32);
print('Generated new production JWT secret: $secret');
await changeSecret(new File('config/production.yaml'), secret);
}

View file

@ -1,5 +1,5 @@
name: angel_cli
version: 1.0.0-dev+16
version: 1.0.0-dev+17
description: Command-line tools for the Angel framework.
environment:
sdk: ">=1.19.0"