Skip to content

Commit d2f1b2c

Browse files
committed
chore: wip
1 parent 8380e91 commit d2f1b2c

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { runCommand } from '@stacksjs/cli'
22
import { isFile } from '@stacksjs/storage'
33
import { setEnvValue } from '@stacksjs/utils'
4-
import { options } from 'kolorist'
4+
import { projectPath } from '@stacksjs/path'
55
import { generateAppKey } from '@stacksjs/security'
66

77
if (!isFile('.env'))
8-
await runCommand('cp .env.example .env', { ...options, cwd: projectPath() })
8+
await runCommand('cp .env.example .env', { cwd: projectPath() })
99

1010
await setEnvValue('APP_KEY', await generateAppKey())

.stacks/core/buddy/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ _Enhanced productivity for developers. No more creating boilerplate._
9393
- 💪🏼 **Type Strong** _built-in e2e type-safety_
9494
-**Git Workflows** _committing with ease_
9595
- 🚗 **Auto Imports** _your components & functions, including date, string, array, & object helpers_
96-
-**Code Snippets** _say goodbye to the boilerplate—thank you Sarah Drasner_
96+
-**Code Snippets** _say goodbye to the boilerplate—thank you [Sarah Drasner](https://github.com/sdras/vue-vscode-snippets)_
9797
- 🔤 **Spell Checker** _be notified once there are typos_
9898
- 🛠️ **Utilities** _Collections, VueUse, and more_
9999
- 🧪 **Testing** _unit & e2e tests powered by Vitest & Playwright_

.stacks/core/buddy/src/cli.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,22 @@ async function main() {
2323
// before running any commands, check if the project is already initialized
2424
if (!await isProjectCreated()) {
2525
if (env('APP_ENV') !== 'production') {
26-
log.info('Project not initialized, generating application key...')
27-
const result = await runAction(Action.KeyGenerate, { cwd: projectPath(), verbose: true })
28-
if (result.isErr()) {
29-
log.error(result.error)
30-
process.exit()
31-
}
32-
log.info('Application key generated.')
26+
log.info('Project not yet initialized, generating application key...')
3327
}
3428
else {
3529
log.error('Please run `buddy key:generate` to generate an application key.')
3630
process.exit()
3731
}
3832

33+
const result = await runAction(Action.KeyGenerate, { cwd: projectPath() })
34+
35+
if (result.isErr()) {
36+
log.error(result.error)
37+
process.exit()
38+
}
39+
40+
log.info('Application key generated.')
41+
3942
await create(cli)
4043
}
4144

0 commit comments

Comments
 (0)