17
This commit is contained in:
parent
07d48ca35e
commit
6e2030fdf4
3 changed files with 10 additions and 4 deletions
|
@ -30,10 +30,13 @@ class InitCommand extends Command {
|
||||||
await _pubGet(projectDir);
|
await _pubGet(projectDir);
|
||||||
await preBuild(projectDir);
|
await preBuild(projectDir);
|
||||||
var secret = rs.randomAlphaNumeric(32);
|
var secret = rs.randomAlphaNumeric(32);
|
||||||
print('Generated new JWT secret: $secret');
|
print('Generated new development JWT secret: $secret');
|
||||||
await _key.changeSecret(
|
await _key.changeSecret(
|
||||||
new File.fromUri(projectDir.uri.resolve('config/default.yaml')),
|
new File.fromUri(projectDir.uri.resolve('config/default.yaml')),
|
||||||
secret);
|
secret);
|
||||||
|
|
||||||
|
secret = rs.randomAlphaNumeric(32);
|
||||||
|
print('Generated new production JWT secret: $secret');
|
||||||
await _key.changeSecret(
|
await _key.changeSecret(
|
||||||
new File.fromUri(projectDir.uri.resolve('config/production.yaml')),
|
new File.fromUri(projectDir.uri.resolve('config/production.yaml')),
|
||||||
secret);
|
secret);
|
||||||
|
@ -91,7 +94,7 @@ class InitCommand extends Command {
|
||||||
preBuild(Directory projectDir) async {
|
preBuild(Directory projectDir) async {
|
||||||
// Run build
|
// Run build
|
||||||
print('Pre-building resources...');
|
print('Pre-building resources...');
|
||||||
|
|
||||||
var build = await Process.start(Platform.executable, ['tool/build.dart'],
|
var build = await Process.start(Platform.executable, ['tool/build.dart'],
|
||||||
workingDirectory: projectDir.absolute.path);
|
workingDirectory: projectDir.absolute.path);
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,11 @@ class KeyCommand extends Command {
|
||||||
@override
|
@override
|
||||||
run() async {
|
run() async {
|
||||||
var secret = rs.randomAlphaNumeric(32);
|
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);
|
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);
|
await changeSecret(new File('config/production.yaml'), secret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_cli
|
name: angel_cli
|
||||||
version: 1.0.0-dev+16
|
version: 1.0.0-dev+17
|
||||||
description: Command-line tools for the Angel framework.
|
description: Command-line tools for the Angel framework.
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=1.19.0"
|
sdk: ">=1.19.0"
|
||||||
|
|
Loading…
Reference in a new issue