Skip to content

Commit e514671

Browse files
committed
chore: wip
1 parent 518c038 commit e514671

File tree

16 files changed

+129
-108
lines changed

16 files changed

+129
-108
lines changed

.stacks/core/buddy/src/commands/build.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BuildOptions, CLI } from '@stacksjs/types'
22
import { Action, ExitCode } from '@stacksjs/types'
3-
import { intro, log, outro, prompt } from '@stacksjs/cli'
3+
import { intro, outro, prompt } from '@stacksjs/cli'
44
import { runAction } from '@stacksjs/actions'
55

66
async function build(buddy: CLI) {
@@ -112,10 +112,10 @@ async function build(buddy: CLI) {
112112

113113
console.log('result', result)
114114

115-
if (result.isErr()) {
116-
log.error('Failed to build the Stacks core.', result.error)
117-
process.exit()
118-
}
115+
// if (result.isErr()) {
116+
// log.error('Failed to build the Stacks core.', result.error)
117+
// process.exit()
118+
// }
119119

120120
outro('Stacks core built successfully', { startTime, useSeconds: true })
121121
})
@@ -127,11 +127,12 @@ async function build(buddy: CLI) {
127127
.action(async (options: BuildOptions) => {
128128
const startTime = await intro('buddy build:stacks')
129129
const result = await runAction(Action.BuildStacks, options)
130+
console.log('result', result)
130131

131-
if (result.isErr()) {
132-
log.error('Failed to build Stacks.', result.error)
133-
process.exit()
134-
}
132+
// if (result.isErr()) {
133+
// log.error('Failed to build Stacks.', result.error)
134+
// process.exit()
135+
// }
135136

136137
outro('Stacks built successfully', { startTime, useSeconds: true })
137138
})

.stacks/core/buddy/src/commands/changelog.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ async function changelog(buddy: CLI) {
1515
.action(async (options: FreshOptions) => {
1616
const perf = await intro('buddy changelog')
1717
const result = await runAction(Action.Changelog, options)
18+
console.log('result', result)
1819

19-
if (result.isErr()) {
20-
outro('While running the changelog command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
21-
process.exit()
22-
}
20+
// if (result.isErr()) {
21+
// outro('While running the changelog command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
22+
// process.exit()
23+
// }
2324

2425
outro('Generated the CHANGELOG.md file.', { startTime: perf, useSeconds: true })
2526
process.exit(ExitCode.Success)

.stacks/core/buddy/src/commands/deploy.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ async function deploy(buddy: CLI) {
1515
.action(async (options: DeployOptions) => {
1616
const perf = await intro('buddy deploy')
1717
const result = await runAction(Action.Deploy, options)
18+
console.log('result', result)
1819

19-
if (result.isErr()) {
20-
outro('While running the `buddy deploy`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
21-
process.exit()
22-
}
20+
// if (result.isErr()) {
21+
// outro('While running the `buddy deploy`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
22+
// process.exit()
23+
// }
2324

2425
outro('Deployment succeeded.', { startTime: perf, useSeconds: true })
2526
process.exit(ExitCode.Success)

.stacks/core/buddy/src/commands/dev.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ async function dev(buddy: CLI) {
6969
// check if result is an array
7070
if (Array.isArray(result)) {
7171
// check if any of the items in the array is an error
72-
if (result.some(item => item.isErr())) {
73-
outro('While running the dev:components command, there was an issue', { startTime: perf, useSeconds: true, isError: true })
74-
process.exit()
75-
}
72+
// if (result.some(item => item.isErr())) {
73+
// outro('While running the dev:components command, there was an issue', { startTime: perf, useSeconds: true, isError: true })
74+
// process.exit()
75+
// }
7676
}
7777

7878
// check if result is an error
@@ -95,10 +95,10 @@ async function dev(buddy: CLI) {
9595
// check if result is an array
9696
if (Array.isArray(result)) {
9797
// check if any of the items in the array is an error
98-
if (result.some(item => item.isErr())) {
99-
outro('While running the dev:docs command, there was an issue', { startTime: perf, useSeconds: true, isError: true })
100-
process.exit()
101-
}
98+
// if (result.some(item => item.isErr())) {
99+
// outro('While running the dev:docs command, there was an issue', { startTime: perf, useSeconds: true, isError: true })
100+
// process.exit()
101+
// }
102102
}
103103

104104
// check if result is an error

.stacks/core/buddy/src/commands/fresh.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ async function fresh(buddy: CLI) {
1515
.action(async (options: FreshOptions) => {
1616
const perf = await intro('buddy fresh')
1717
const result = await runAction(Action.Fresh, options)
18+
console.log('result', result)
1819

19-
if (result.isErr()) {
20-
outro('While running the fresh command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
21-
process.exit()
22-
}
20+
// if (result.isErr()) {
21+
// outro('While running the fresh command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
22+
// process.exit()
23+
// }
2324

2425
outro('Freshly reinstalled your dependencies.', { startTime: perf, useSeconds: true })
2526
process.exit(ExitCode.Success)

.stacks/core/buddy/src/commands/inspire.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ async function inspire(buddy: CLI) {
1010
.action(async () => {
1111
const perf = await intro('buddy inspire')
1212
const result = await runAction(Action.Inspire)
13+
console.log('result', result)
1314

14-
if (result.isErr()) {
15-
outro('While running the inspire command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
16-
process.exit()
17-
}
15+
// if (result.isErr()) {
16+
// outro('While running the inspire command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
17+
// process.exit()
18+
// }
1819

1920
outro('Your quote is: ...', { startTime: perf, useSeconds: true })
2021
process.exit(ExitCode.Success)

.stacks/core/buddy/src/commands/key.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ async function key(buddy: CLI) {
1515
.action(async (options: KeyOptions) => {
1616
const startTime = await intro('buddy key:generate')
1717
const result = await runAction(Action.KeyGenerate, options)
18+
console.log('result', result)
1819

19-
if (result.isErr()) {
20-
log.error('Failed to set random application key.', result.error)
21-
process.exit()
22-
}
20+
// if (result.isErr()) {
21+
// log.error('Failed to set random application key.', result.error)
22+
// process.exit()
23+
// }
2324

2425
outro('Set random application key.', { startTime })
2526
})

.stacks/core/buddy/src/commands/lint.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ async function lint(buddy: CLI) {
1717
.action(async (options: LintOptions) => {
1818
const perf = await intro('buddy lint')
1919
const result = await runAction(Action.Lint, { ...options, showSpinner: true, spinnerText: 'Linting...' })
20+
console.log('result', result)
2021

21-
if (result.isErr()) {
22-
outro('While running `buddy lint`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
23-
process.exit()
24-
}
22+
// if (result.isErr()) {
23+
// outro('While running `buddy lint`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
24+
// process.exit()
25+
// }
2526

2627
outro('Linted your project.', { startTime: perf, useSeconds: true })
2728
})
@@ -32,11 +33,12 @@ async function lint(buddy: CLI) {
3233
.action(async (options: LintOptions) => {
3334
log.info('Fixing lint errors...')
3435
const result = await runAction(Action.LintFix, { ...options, showSpinner: true, spinnerText: 'Linting...' })
36+
console.log('result', result)
3537

36-
if (result.isErr()) {
37-
log.error('There was an error lint fixing your code.', result.error)
38-
process.exit()
39-
}
38+
// if (result.isErr()) {
39+
// log.error('There was an error lint fixing your code.', result.error)
40+
// process.exit()
41+
// }
4042

4143
log.success('Fixed lint errors.')
4244
})

.stacks/core/buddy/src/commands/make.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,12 @@ async function make(buddy: CLI) {
185185
}
186186

187187
const result = await createNotification(options)
188+
console.log('result', result)
188189

189-
if (!result) {
190-
outro('While running the make:notification command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
191-
process.exit()
192-
}
190+
// if (!result) {
191+
// outro('While running the make:notification command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
192+
// process.exit()
193+
// }
193194

194195
outro(`Created your ${italic(name)} notification.`, { startTime: perf, useSeconds: true })
195196
process.exit(ExitCode.Success)

.stacks/core/buddy/src/commands/migrate.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ async function migrate(buddy: CLI) {
1515
.action(async (options: FreshOptions) => {
1616
const perf = await intro('buddy migrate')
1717
const result = await runAction(Action.Migrate, { ...options, showSpinner: true, spinnerText: 'Migrating...' })
18+
console.log('result', result)
1819

19-
if (result.isErr()) {
20-
outro('While running the migrate command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
21-
process.exit()
22-
}
20+
// if (result.isErr()) {
21+
// outro('While running the migrate command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
22+
// process.exit()
23+
// }
2324

2425
const APP_ENV = process.env.APP_ENV || 'local'
2526

0 commit comments

Comments
 (0)