stacks 0.52.1 → 0.52.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/actions/package.json +1 -1
- package/core/actions/src/bump.ts +1 -1
- package/core/actions/src/helpers/utils.ts +0 -2
- package/core/ai/package.json +1 -1
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/commands/build.ts +8 -11
- package/core/buddy/src/commands/changelog.ts +7 -6
- package/core/buddy/src/commands/deploy.ts +4 -5
- package/core/buddy/src/commands/inspire.ts +4 -5
- package/core/buddy/src/commands/key.ts +4 -5
- package/core/buddy/src/commands/lint.ts +8 -10
- package/core/buddy/src/commands/make.ts +4 -5
- package/core/buddy/src/commands/migrate.ts +4 -5
- package/core/buddy/src/commands/onboarding.ts +4 -5
- package/core/buddy/src/commands/setting.ts +4 -5
- package/core/buddy/src/commands/test.ts +4 -9
- package/core/buddy/src/commands/upgrade.ts +8 -11
- package/core/build/package.json +1 -1
- package/core/cache/package.json +1 -1
- package/core/chat/package.json +1 -1
- package/core/cli/package.json +1 -1
- package/core/cli/src/helpers.ts +12 -5
- package/core/cloud/package.json +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/database/package.json +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +1 -1
- package/core/development/package.json +1 -1
- package/core/docs/package.json +1 -1
- package/core/domains/package.json +1 -1
- package/core/email/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/events/package.json +1 -1
- package/core/faker/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/lint/package.json +1 -1
- package/core/logging/package.json +1 -1
- package/core/modules/package.json +1 -1
- package/core/notifications/package.json +1 -1
- package/core/objects/package.json +1 -1
- package/core/orm/package.json +1 -1
- package/core/pages/package.json +1 -1
- package/core/path/package.json +1 -1
- package/core/payments/package.json +1 -1
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +1 -1
- package/core/queue/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/router/package.json +1 -1
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +1 -1
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +1 -1
- package/core/storage/package.json +1 -1
- package/core/strings/package.json +1 -1
- package/core/testing/package.json +1 -1
- package/core/tinker/package.json +1 -1
- package/core/types/package.json +1 -1
- package/core/types/src/cli.ts +18 -1
- package/core/ui/package.json +1 -1
- package/core/utils/package.json +1 -1
- package/core/validation/package.json +1 -1
- package/package.json +91 -91
package/core/actions/src/bump.ts
CHANGED
|
@@ -2,6 +2,6 @@ import { runCommand } from '@stacksjs/cli'
|
|
|
2
2
|
import { frameworkPath } from '@stacksjs/path'
|
|
3
3
|
|
|
4
4
|
await runCommand(
|
|
5
|
-
'npx bumpp ./package.json ./buddy/package.json ./core/**/package.json ./vscode/package.json --execute "
|
|
5
|
+
'npx bumpp ./package.json ./buddy/package.json ./core/**/package.json ./vscode/package.json --execute "buddy changelog --quiet" --all',
|
|
6
6
|
{ verbose: true, cwd: frameworkPath(), shell: true },
|
|
7
7
|
)
|
|
@@ -37,8 +37,6 @@ export async function runAction(action: string, options?: ActionOptions): Promis
|
|
|
37
37
|
// we need to parse options here because they need to bw passed to the action
|
|
38
38
|
const opts = parseOptions(options)
|
|
39
39
|
const cmd = `npx tsx ${actionsPath(`${action}.ts ${opts}`)}`
|
|
40
|
-
// eslint-disable-next-line no-console
|
|
41
|
-
console.log('cmd', cmd)
|
|
42
40
|
|
|
43
41
|
if (options?.verbose)
|
|
44
42
|
log.debug('running command:', italic(cmd))
|
package/core/ai/package.json
CHANGED
package/core/alias/package.json
CHANGED
package/core/arrays/package.json
CHANGED
package/core/auth/package.json
CHANGED
package/core/buddy/package.json
CHANGED
|
@@ -110,12 +110,10 @@ async function build(buddy: CLI) {
|
|
|
110
110
|
const startTime = await intro('buddy build:core')
|
|
111
111
|
const result = await runAction(Action.BuildCore, options)
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
// process.exit()
|
|
118
|
-
// }
|
|
113
|
+
if (result.isErr()) {
|
|
114
|
+
log.error('Failed to build the Stacks core.', result.error as Error)
|
|
115
|
+
process.exit()
|
|
116
|
+
}
|
|
119
117
|
|
|
120
118
|
outro('Stacks core built successfully', { startTime, useSeconds: true })
|
|
121
119
|
})
|
|
@@ -127,12 +125,11 @@ async function build(buddy: CLI) {
|
|
|
127
125
|
.action(async (options: BuildOptions) => {
|
|
128
126
|
const startTime = await intro('buddy build:stacks')
|
|
129
127
|
const result = await runAction(Action.BuildStacks, options)
|
|
130
|
-
console.log('result', result)
|
|
131
128
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
if (result.isErr()) {
|
|
130
|
+
log.error('Failed to build Stacks.', result.error as Error)
|
|
131
|
+
process.exit()
|
|
132
|
+
}
|
|
136
133
|
|
|
137
134
|
outro('Stacks built successfully', { startTime, useSeconds: true })
|
|
138
135
|
})
|
|
@@ -6,23 +6,24 @@ import { Action, ExitCode } from '@stacksjs/types'
|
|
|
6
6
|
async function changelog(buddy: CLI) {
|
|
7
7
|
const descriptions = {
|
|
8
8
|
changelog: 'Create a CHANGELOG.md file',
|
|
9
|
+
quiet: 'Minimal output',
|
|
9
10
|
verbose: 'Enable verbose output',
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
buddy
|
|
13
14
|
.command('changelog', descriptions.changelog)
|
|
15
|
+
.option('--quiet', descriptions.quiet, { default: false })
|
|
14
16
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
15
17
|
.action(async (options: FreshOptions) => {
|
|
16
18
|
const perf = await intro('buddy changelog')
|
|
17
19
|
const result = await runAction(Action.Changelog, options)
|
|
18
|
-
console.log('result', result)
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (result.isErr()) {
|
|
22
|
+
outro('While running the changelog command, there was an issue', { ...options, startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
23
|
+
process.exit()
|
|
24
|
+
}
|
|
24
25
|
|
|
25
|
-
outro('Generated the CHANGELOG.md file
|
|
26
|
+
outro('Generated the CHANGELOG.md file', { ...options, startTime: perf, useSeconds: true, type: 'info' })
|
|
26
27
|
process.exit(ExitCode.Success)
|
|
27
28
|
})
|
|
28
29
|
}
|
|
@@ -15,12 +15,11 @@ async function deploy(buddy: CLI) {
|
|
|
15
15
|
.action(async (options: DeployOptions) => {
|
|
16
16
|
const perf = await intro('buddy deploy')
|
|
17
17
|
const result = await runAction(Action.Deploy, options)
|
|
18
|
-
console.log('result', result)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
outro('While running the `buddy deploy`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
21
|
+
process.exit()
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
outro('Deployment succeeded.', { startTime: perf, useSeconds: true })
|
|
26
25
|
process.exit(ExitCode.Success)
|
|
@@ -10,12 +10,11 @@ async function inspire(buddy: CLI) {
|
|
|
10
10
|
.action(async () => {
|
|
11
11
|
const perf = await intro('buddy inspire')
|
|
12
12
|
const result = await runAction(Action.Inspire)
|
|
13
|
-
console.log('result', result)
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
if (result.isErr()) {
|
|
15
|
+
outro('While running the inspire command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
16
|
+
process.exit()
|
|
17
|
+
}
|
|
19
18
|
|
|
20
19
|
outro('Your quote is: ...', { startTime: perf, useSeconds: true })
|
|
21
20
|
process.exit(ExitCode.Success)
|
|
@@ -15,12 +15,11 @@ async function key(buddy: CLI) {
|
|
|
15
15
|
.action(async (options: KeyOptions) => {
|
|
16
16
|
const startTime = await intro('buddy key:generate')
|
|
17
17
|
const result = await runAction(Action.KeyGenerate, options)
|
|
18
|
-
console.log('result', result)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
log.error('Failed to set random application key.', result.error as Error)
|
|
21
|
+
process.exit()
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
outro('Set random application key.', { startTime })
|
|
26
25
|
})
|
|
@@ -17,12 +17,11 @@ async function lint(buddy: CLI) {
|
|
|
17
17
|
.action(async (options: LintOptions) => {
|
|
18
18
|
const perf = await intro('buddy lint')
|
|
19
19
|
const result = await runAction(Action.Lint, { ...options, showSpinner: true, spinnerText: 'Linting...' })
|
|
20
|
-
console.log('result', result)
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
if (result.isErr()) {
|
|
22
|
+
outro('While running `buddy lint`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
23
|
+
process.exit()
|
|
24
|
+
}
|
|
26
25
|
|
|
27
26
|
outro('Linted your project.', { startTime: perf, useSeconds: true })
|
|
28
27
|
})
|
|
@@ -33,12 +32,11 @@ async function lint(buddy: CLI) {
|
|
|
33
32
|
.action(async (options: LintOptions) => {
|
|
34
33
|
log.info('Fixing lint errors...')
|
|
35
34
|
const result = await runAction(Action.LintFix, { ...options, showSpinner: true, spinnerText: 'Linting...' })
|
|
36
|
-
console.log('result', result)
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
if (result.isErr()) {
|
|
37
|
+
log.error('There was an error lint fixing your code.', result.error as Error)
|
|
38
|
+
process.exit()
|
|
39
|
+
}
|
|
42
40
|
|
|
43
41
|
log.success('Fixed lint errors.')
|
|
44
42
|
})
|
|
@@ -185,12 +185,11 @@ async function make(buddy: CLI) {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
const result = await createNotification(options)
|
|
188
|
-
console.log('result', result)
|
|
189
188
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
if (!result) {
|
|
190
|
+
outro('While running the make:notification command, there was an issue', { startTime: perf, useSeconds: true, isError: true })
|
|
191
|
+
process.exit()
|
|
192
|
+
}
|
|
194
193
|
|
|
195
194
|
outro(`Created your ${italic(name)} notification.`, { startTime: perf, useSeconds: true })
|
|
196
195
|
process.exit(ExitCode.Success)
|
|
@@ -15,12 +15,11 @@ async function migrate(buddy: CLI) {
|
|
|
15
15
|
.action(async (options: FreshOptions) => {
|
|
16
16
|
const perf = await intro('buddy migrate')
|
|
17
17
|
const result = await runAction(Action.Migrate, { ...options, showSpinner: true, spinnerText: 'Migrating...' })
|
|
18
|
-
console.log('result', result)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
outro('While running the migrate command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
21
|
+
process.exit()
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
const APP_ENV = process.env.APP_ENV || 'local'
|
|
26
25
|
|
|
@@ -15,12 +15,11 @@ async function onboarding(buddy: CLI) {
|
|
|
15
15
|
.action(async () => {
|
|
16
16
|
const startTime = await intro('buddy page:onboarding')
|
|
17
17
|
const result = await runAction(Action.GenerateOnboarding)
|
|
18
|
-
console.log('result', result)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
log.error('Something went wrong when generating', result.error as Error)
|
|
21
|
+
process.exit()
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
outro('Pages generated successfully', { startTime })
|
|
26
25
|
})
|
|
@@ -15,12 +15,11 @@ async function setting(buddy: CLI) {
|
|
|
15
15
|
.action(async () => {
|
|
16
16
|
const startTime = await intro('buddy page:setting')
|
|
17
17
|
const result = await runAction(Action.GenerateSettings)
|
|
18
|
-
console.log('result', result)
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
if (result.isErr()) {
|
|
20
|
+
log.error('Something went wrong when generating', result.error as Error)
|
|
21
|
+
process.exit()
|
|
22
|
+
}
|
|
24
23
|
|
|
25
24
|
outro('Pages generated successfully', { startTime })
|
|
26
25
|
})
|
|
@@ -23,12 +23,11 @@ async function test(buddy: CLI) {
|
|
|
23
23
|
.action(async (options: TestOptions) => {
|
|
24
24
|
const perf = await intro('buddy test')
|
|
25
25
|
const result = await runAction(Action.Test, { ...options, cwd: projectPath() })
|
|
26
|
-
console.log('result', result)
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
if (result.isErr()) {
|
|
28
|
+
outro('While running `buddy test`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
29
|
+
process.exit()
|
|
30
|
+
}
|
|
32
31
|
|
|
33
32
|
outro('Finished running tests', { startTime: perf, useSeconds: true })
|
|
34
33
|
})
|
|
@@ -39,7 +38,6 @@ async function test(buddy: CLI) {
|
|
|
39
38
|
.action(async (options: TestOptions) => {
|
|
40
39
|
const perf = await intro('buddy test:unit')
|
|
41
40
|
const result = await runAction(Action.TestUnit, { ...options, verbose: true, cwd: projectPath() })
|
|
42
|
-
console.log('result', result)
|
|
43
41
|
|
|
44
42
|
if (result.isErr()) {
|
|
45
43
|
outro('While running `buddy test:unit`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
@@ -76,7 +74,6 @@ async function test(buddy: CLI) {
|
|
|
76
74
|
.action(async (options: TestOptions) => {
|
|
77
75
|
const perf = await intro('buddy test:ui')
|
|
78
76
|
const result = await runAction(Action.TestUi, { ...options, verbose: true, cwd: projectPath() })
|
|
79
|
-
console.log('result', result)
|
|
80
77
|
|
|
81
78
|
if (result.isErr()) {
|
|
82
79
|
outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
@@ -93,7 +90,6 @@ async function test(buddy: CLI) {
|
|
|
93
90
|
.action(async (options: TestOptions) => {
|
|
94
91
|
const perf = await intro('buddy test:types')
|
|
95
92
|
const result = await runAction(Action.Typecheck, { ...options, verbose: true, cwd: projectPath() })
|
|
96
|
-
console.log('result', result)
|
|
97
93
|
|
|
98
94
|
if (result.isErr()) {
|
|
99
95
|
outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
@@ -108,7 +104,6 @@ async function test(buddy: CLI) {
|
|
|
108
104
|
.action(async (options: TestOptions) => {
|
|
109
105
|
const perf = await intro('buddy test:coverage')
|
|
110
106
|
const result = await runAction(Action.TestCoverage, { ...options, cwd: projectPath(), verbose: true })
|
|
111
|
-
console.log('result', result)
|
|
112
107
|
|
|
113
108
|
if (result.isErr()) {
|
|
114
109
|
outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
@@ -56,12 +56,11 @@ async function upgrade(buddy: CLI) {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const result = await runAction(Action.Upgrade, { ...options, shell: true })
|
|
59
|
-
console.log('result', result)
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
if (result.isErr()) {
|
|
61
|
+
outro('While running the buddy:upgrade command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
62
|
+
process.exit()
|
|
63
|
+
}
|
|
65
64
|
|
|
66
65
|
outro('Upgrade complete.', { startTime: perf, useSeconds: true })
|
|
67
66
|
process.exit()
|
|
@@ -100,12 +99,11 @@ async function upgrade(buddy: CLI) {
|
|
|
100
99
|
|
|
101
100
|
const perf = await intro('buddy upgrade:package-manager')
|
|
102
101
|
const result = await runAction(Action.UpgradePackageManager, options)
|
|
103
|
-
console.log('result', result, perf)
|
|
104
102
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
if (result.isErr()) {
|
|
104
|
+
outro('While running the buddy upgrade:package-manager command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
|
|
105
|
+
process.exit()
|
|
106
|
+
}
|
|
109
107
|
|
|
110
108
|
process.exit(ExitCode.Success)
|
|
111
109
|
})
|
|
@@ -116,7 +114,6 @@ async function upgrade(buddy: CLI) {
|
|
|
116
114
|
.action(async (options: UpgradeOptions) => {
|
|
117
115
|
const perf = await intro('buddy upgrade:node')
|
|
118
116
|
const result = await runAction(Action.UpgradeNode, options)
|
|
119
|
-
console.log('result', result, perf)
|
|
120
117
|
|
|
121
118
|
if (result.isErr()) {
|
|
122
119
|
outro('While running the buddy upgrade:node command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error) // FIXME: should not have to cast
|
package/core/build/package.json
CHANGED
package/core/cache/package.json
CHANGED
package/core/chat/package.json
CHANGED
package/core/cli/package.json
CHANGED
package/core/cli/src/helpers.ts
CHANGED
|
@@ -9,12 +9,16 @@ import { bgCyan, bold, cyan, dim, green, italic, red } from './utilities'
|
|
|
9
9
|
*/
|
|
10
10
|
export async function intro(command: string, options?: IntroOptions) {
|
|
11
11
|
const version = await frameworkVersion()
|
|
12
|
-
console.log()
|
|
13
|
-
console.log(cyan(bold('Stacks CLI')) + dim(` v${version}`))
|
|
14
|
-
console.log()
|
|
15
|
-
log.info(`Preparing to run the ${bgCyan(italic(bold(` ${command} `)))} command.`)
|
|
16
12
|
|
|
17
|
-
if (options?.
|
|
13
|
+
if (options?.quiet === false) {
|
|
14
|
+
console.log()
|
|
15
|
+
console.log(cyan(bold('Stacks CLI')) + dim(` v${version}`))
|
|
16
|
+
console.log()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
log.info(`Preparing to run the ${bgCyan(italic(bold(` ${command} `)))} command`)
|
|
20
|
+
|
|
21
|
+
if (options?.showPerformance === false || options?.quiet)
|
|
18
22
|
return
|
|
19
23
|
|
|
20
24
|
return performance.now()
|
|
@@ -43,6 +47,9 @@ export function outro(text: string, options: OutroOptions, error?: Error | strin
|
|
|
43
47
|
time = Math.round(time * 100) / 100 // https://stackoverflow.com/a/11832950/7811162
|
|
44
48
|
}
|
|
45
49
|
|
|
50
|
+
if (options.quiet === false)
|
|
51
|
+
return
|
|
52
|
+
|
|
46
53
|
if (options.isError)
|
|
47
54
|
log.error(red(`in ${time}${options.useSeconds ? 's' : 'ms'}`))
|
|
48
55
|
else
|
package/core/cloud/package.json
CHANGED
package/core/config/package.json
CHANGED
package/core/docs/package.json
CHANGED
package/core/email/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/email",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.52.
|
|
4
|
+
"version": "0.52.3",
|
|
5
5
|
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks Email integration. Painlessly create & manage your inboxes, templates, and send emails.",
|
|
7
7
|
"author": "Chris Breuer",
|
package/core/events/package.json
CHANGED
package/core/faker/package.json
CHANGED
package/core/git/package.json
CHANGED