stacks 0.64.6 → 0.65.0
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/buddy/bin/cli.ts +7 -4
- package/buddy/build.ts +3 -0
- package/buddy/package.json +5 -5
- package/buddy/src/cli.ts +10 -7
- package/buddy/src/commands/add.ts +2 -2
- package/buddy/src/commands/build.ts +50 -32
- package/buddy/src/commands/changelog.ts +2 -2
- package/buddy/src/commands/clean.ts +2 -2
- package/buddy/src/commands/cloud.ts +31 -12
- package/buddy/src/commands/commit.ts +2 -2
- package/buddy/src/commands/configure.ts +4 -3
- package/buddy/src/commands/create.ts +3 -3
- package/buddy/src/commands/deploy.ts +21 -10
- package/buddy/src/commands/dev.ts +38 -25
- package/buddy/src/commands/dns.ts +2 -2
- package/buddy/src/commands/domains.ts +2 -2
- package/buddy/src/commands/fresh.ts +2 -2
- package/buddy/src/commands/generate.ts +27 -3
- package/buddy/src/commands/http.ts +2 -2
- package/buddy/src/commands/index.ts +3 -3
- package/buddy/src/commands/install.ts +2 -2
- package/buddy/src/commands/key.ts +2 -2
- package/buddy/src/commands/lint.ts +7 -10
- package/buddy/src/commands/list.ts +2 -2
- package/buddy/src/commands/make.ts +12 -12
- package/buddy/src/commands/migrate.ts +2 -2
- package/buddy/src/commands/outdated.ts +3 -3
- package/buddy/src/commands/ports.ts +26 -16
- package/buddy/src/commands/prepublish.ts +2 -2
- package/buddy/src/commands/projects.ts +6 -4
- package/buddy/src/commands/release.ts +4 -3
- package/buddy/src/commands/route.ts +2 -2
- package/buddy/src/commands/seed.ts +2 -2
- package/buddy/src/commands/setup.ts +11 -7
- package/buddy/src/commands/test.ts +77 -54
- package/buddy/src/commands/tinker.ts +2 -2
- package/buddy/src/commands/types.ts +2 -2
- package/buddy/src/commands/upgrade.ts +20 -13
- package/buddy/src/commands/version.ts +2 -2
- package/buddy/src/custom-cli.ts +3 -2
- package/buddy/tsconfig.json +1 -1
- package/package.json +53 -62
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import type { CLI, ProjectsOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { intro, log } from '@stacksjs/cli'
|
|
3
4
|
import { ExitCode } from '@stacksjs/types'
|
|
4
|
-
import type { CLI, ProjectsOptions } from '@stacksjs/types'
|
|
5
5
|
import { findStacksProjects } from '@stacksjs/utils'
|
|
6
6
|
|
|
7
|
-
export function projects(buddy: CLI) {
|
|
7
|
+
export function projects(buddy: CLI): void {
|
|
8
8
|
const descriptions = {
|
|
9
9
|
projects: 'Find all Stacks projects on your system',
|
|
10
10
|
verbose: 'Enable verbose output',
|
|
@@ -18,7 +18,8 @@ export function projects(buddy: CLI) {
|
|
|
18
18
|
.action(async (options: ProjectsOptions) => {
|
|
19
19
|
log.debug('Running `buddy projects` ...', options)
|
|
20
20
|
|
|
21
|
-
if (!options.quiet)
|
|
21
|
+
if (!options.quiet)
|
|
22
|
+
await intro('buddy projects')
|
|
22
23
|
|
|
23
24
|
const projects = await findStacksProjects(undefined, options)
|
|
24
25
|
|
|
@@ -35,7 +36,8 @@ export function projects(buddy: CLI) {
|
|
|
35
36
|
.action(async (options: ProjectsOptions) => {
|
|
36
37
|
log.debug('Running `buddy projects` ...', options)
|
|
37
38
|
|
|
38
|
-
if (!options.quiet)
|
|
39
|
+
if (!options.quiet)
|
|
40
|
+
await intro('buddy projects:list')
|
|
39
41
|
|
|
40
42
|
// uses os.homedir() as the default path
|
|
41
43
|
const projects = await findStacksProjects(undefined, options)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { CLI, ReleaseOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
4
|
import { intro, italic, log, outro } from '@stacksjs/cli'
|
|
4
5
|
import { Action } from '@stacksjs/enums'
|
|
5
6
|
import { ExitCode } from '@stacksjs/types'
|
|
6
|
-
import type { CLI, ReleaseOptions } from '@stacksjs/types'
|
|
7
7
|
|
|
8
8
|
const descriptions = {
|
|
9
9
|
release: 'Release a new version of your libraries/packages',
|
|
@@ -12,7 +12,7 @@ const descriptions = {
|
|
|
12
12
|
verbose: 'Enable verbose output',
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
export function release(buddy: CLI) {
|
|
15
|
+
export function release(buddy: CLI): void {
|
|
16
16
|
buddy
|
|
17
17
|
.command('release', descriptions.release)
|
|
18
18
|
.option('--dry-run', descriptions.dryRun, { default: false })
|
|
@@ -21,7 +21,8 @@ export function release(buddy: CLI) {
|
|
|
21
21
|
.action(async (options: ReleaseOptions) => {
|
|
22
22
|
log.debug('Running `buddy release` ...', options)
|
|
23
23
|
|
|
24
|
-
if (options.dryRun)
|
|
24
|
+
if (options.dryRun)
|
|
25
|
+
log.warn('Dry run enabled. No changes will be made or committed.')
|
|
25
26
|
|
|
26
27
|
const startTime = await intro('buddy release')
|
|
27
28
|
const result = await runAction(Action.Release, {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CLI, MigrateOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
4
|
import { intro, outro } from '@stacksjs/cli'
|
|
4
5
|
import { Action } from '@stacksjs/enums'
|
|
5
6
|
import { ExitCode } from '@stacksjs/types'
|
|
6
|
-
import type { CLI, MigrateOptions } from '@stacksjs/types'
|
|
7
7
|
|
|
8
|
-
export function route(buddy: CLI) {
|
|
8
|
+
export function route(buddy: CLI): void {
|
|
9
9
|
const descriptions = {
|
|
10
10
|
route: 'Lists your routes',
|
|
11
11
|
verbose: 'Enable verbose output',
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CLI, SeedOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
4
|
import { intro, log, outro } from '@stacksjs/cli'
|
|
4
5
|
import { Action } from '@stacksjs/enums'
|
|
5
6
|
import { ExitCode } from '@stacksjs/types'
|
|
6
|
-
import type { CLI, SeedOptions } from '@stacksjs/types'
|
|
7
7
|
|
|
8
|
-
export function seed(buddy: CLI) {
|
|
8
|
+
export function seed(buddy: CLI): void {
|
|
9
9
|
const descriptions = {
|
|
10
10
|
seed: 'Seed your database',
|
|
11
11
|
project: 'Target a specific project',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CLI, CliOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
4
|
import { log, runCommand } from '@stacksjs/cli'
|
|
@@ -6,9 +7,8 @@ import { handleError } from '@stacksjs/error-handling'
|
|
|
6
7
|
import { path as p } from '@stacksjs/path'
|
|
7
8
|
import { storage } from '@stacksjs/storage'
|
|
8
9
|
import { ExitCode } from '@stacksjs/types'
|
|
9
|
-
import type { CLI, CliOptions } from '@stacksjs/types'
|
|
10
10
|
|
|
11
|
-
export function setup(buddy: CLI) {
|
|
11
|
+
export function setup(buddy: CLI): void {
|
|
12
12
|
const descriptions = {
|
|
13
13
|
setup: 'This command ensures your project is setup correctly',
|
|
14
14
|
ohMyZsh: 'Enable Oh My Zsh',
|
|
@@ -25,7 +25,8 @@ export function setup(buddy: CLI) {
|
|
|
25
25
|
.action(async (options: CliOptions) => {
|
|
26
26
|
log.debug('Running `buddy setup` ...', options)
|
|
27
27
|
|
|
28
|
-
if (!(await isPkgxInstalled()))
|
|
28
|
+
if (!(await isPkgxInstalled()))
|
|
29
|
+
await installPkgx()
|
|
29
30
|
|
|
30
31
|
// ensure the minimal amount of deps are written to ./pkgx.yaml
|
|
31
32
|
await optimizePkgxDeps()
|
|
@@ -59,7 +60,8 @@ export function setup(buddy: CLI) {
|
|
|
59
60
|
async function isPkgxInstalled(): Promise<boolean> {
|
|
60
61
|
const result = await runCommand('pkgx --version', { silent: true })
|
|
61
62
|
|
|
62
|
-
if (result.isOk())
|
|
63
|
+
if (result.isOk())
|
|
64
|
+
return true
|
|
63
65
|
|
|
64
66
|
return false
|
|
65
67
|
}
|
|
@@ -67,7 +69,8 @@ async function isPkgxInstalled(): Promise<boolean> {
|
|
|
67
69
|
async function installPkgx(): Promise<void> {
|
|
68
70
|
const result = await runCommand(p.frameworkPath('scripts/pkgx-install'))
|
|
69
71
|
|
|
70
|
-
if (result.isOk())
|
|
72
|
+
if (result.isOk())
|
|
73
|
+
return
|
|
71
74
|
|
|
72
75
|
handleError(result.error)
|
|
73
76
|
process.exit(ExitCode.FatalError)
|
|
@@ -118,7 +121,7 @@ async function initializeProject(options: CliOptions): Promise<void> {
|
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
export async function optimizePkgxDeps(): Promise<void> {
|
|
121
|
-
return new Promise(
|
|
124
|
+
return new Promise(resolve => setTimeout(resolve, 300))
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
export async function ensureEnvIsSet(options: CliOptions): Promise<void> {
|
|
@@ -135,7 +138,8 @@ export async function ensureEnvIsSet(options: CliOptions): Promise<void> {
|
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
log.success('.env created')
|
|
138
|
-
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
139
143
|
log.success('.env existed')
|
|
140
144
|
}
|
|
141
145
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import type { CLI, TestOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
|
-
import { intro, outro } from '@stacksjs/cli'
|
|
4
|
+
import { intro, log, outro } from '@stacksjs/cli'
|
|
4
5
|
import { Action } from '@stacksjs/enums'
|
|
5
6
|
import { projectPath } from '@stacksjs/path'
|
|
6
|
-
import type { CLI, TestOptions } from '@stacksjs/types'
|
|
7
7
|
|
|
8
|
-
export function test(buddy: CLI) {
|
|
8
|
+
export function test(buddy: CLI): void {
|
|
9
9
|
const descriptions = {
|
|
10
10
|
command: 'Runs your test suite',
|
|
11
11
|
types: 'Typechecks your codebase',
|
|
@@ -20,23 +20,80 @@ export function test(buddy: CLI) {
|
|
|
20
20
|
|
|
21
21
|
buddy
|
|
22
22
|
.command('test', descriptions.command)
|
|
23
|
-
.option('--
|
|
23
|
+
.option('-f, --feature', descriptions.feature, { default: false })
|
|
24
|
+
.option('-u, --unit', descriptions.unit, { default: false })
|
|
25
|
+
// .option('--ui', descriptions.ui, { default: false })
|
|
24
26
|
.option('-p, --project [project]', descriptions.project, { default: false })
|
|
25
27
|
.option('--verbose', descriptions.verbose, { default: true })
|
|
26
28
|
.action(async (options: TestOptions) => {
|
|
27
29
|
const perf = await intro('buddy test')
|
|
28
|
-
const result = await runAction(Action.Test, {
|
|
29
|
-
...options,
|
|
30
|
-
cwd: projectPath(),
|
|
31
|
-
})
|
|
32
30
|
|
|
33
|
-
if (
|
|
34
|
-
await
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
if (options.feature && options.unit) {
|
|
32
|
+
const result = await runAction(Action.Test, {
|
|
33
|
+
...options,
|
|
34
|
+
cwd: projectPath(),
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
if (result.isErr()) {
|
|
38
|
+
await outro(
|
|
39
|
+
'While running `buddy test`, there was an issue',
|
|
40
|
+
{ startTime: perf, useSeconds: true },
|
|
41
|
+
result.error,
|
|
42
|
+
)
|
|
43
|
+
process.exit()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (options.feature && !options.unit) {
|
|
48
|
+
log.info('Running Feature tests...')
|
|
49
|
+
|
|
50
|
+
const result = await runAction(Action.TestFeature, {
|
|
51
|
+
...options,
|
|
52
|
+
cwd: projectPath(),
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
if (result.isErr()) {
|
|
56
|
+
await outro(
|
|
57
|
+
'While running `buddy test`, there was an issue',
|
|
58
|
+
{ startTime: perf, useSeconds: true },
|
|
59
|
+
result.error,
|
|
60
|
+
)
|
|
61
|
+
process.exit()
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (!options.feature && options.unit) {
|
|
66
|
+
log.info('Running Unit tests...')
|
|
67
|
+
|
|
68
|
+
const result = await runAction(Action.TestUnit, {
|
|
69
|
+
...options,
|
|
70
|
+
cwd: projectPath(),
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
if (result.isErr()) {
|
|
74
|
+
await outro(
|
|
75
|
+
'While running `buddy test`, there was an issue',
|
|
76
|
+
{ startTime: perf, useSeconds: true },
|
|
77
|
+
result.error,
|
|
78
|
+
)
|
|
79
|
+
process.exit()
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (!options.feature && !options.unit) {
|
|
84
|
+
const result = await runAction(Action.Test, {
|
|
85
|
+
...options,
|
|
86
|
+
cwd: projectPath(),
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
if (result.isErr()) {
|
|
90
|
+
await outro(
|
|
91
|
+
'While running `buddy test`, there was an issue',
|
|
92
|
+
{ startTime: perf, useSeconds: true },
|
|
93
|
+
result.error,
|
|
94
|
+
)
|
|
95
|
+
process.exit()
|
|
96
|
+
}
|
|
40
97
|
}
|
|
41
98
|
|
|
42
99
|
await outro('Finished running tests', {
|
|
@@ -73,24 +130,14 @@ export function test(buddy: CLI) {
|
|
|
73
130
|
|
|
74
131
|
buddy
|
|
75
132
|
.command('test:feature', descriptions.feature)
|
|
76
|
-
.option('--show-report', descriptions.showReport, { default: false })
|
|
77
133
|
.option('--verbose', descriptions.verbose, { default: false })
|
|
78
134
|
.action(async (options: TestOptions) => {
|
|
79
135
|
const perf = await intro('buddy test:feature')
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
verbose: true,
|
|
86
|
-
cwd: projectPath(),
|
|
87
|
-
})
|
|
88
|
-
else
|
|
89
|
-
result = await runAction(Action.TestFeature, {
|
|
90
|
-
...options,
|
|
91
|
-
verbose: true,
|
|
92
|
-
cwd: projectPath(),
|
|
93
|
-
})
|
|
136
|
+
const result = await runAction(Action.TestFeature, {
|
|
137
|
+
...options,
|
|
138
|
+
verbose: true,
|
|
139
|
+
cwd: projectPath(),
|
|
140
|
+
})
|
|
94
141
|
|
|
95
142
|
if (result.isErr()) {
|
|
96
143
|
await outro(
|
|
@@ -160,30 +207,6 @@ export function test(buddy: CLI) {
|
|
|
160
207
|
})
|
|
161
208
|
})
|
|
162
209
|
|
|
163
|
-
buddy.command('test:coverage', descriptions.coverage).action(async (options: TestOptions) => {
|
|
164
|
-
const perf = await intro('buddy test:coverage')
|
|
165
|
-
const result = await runAction(Action.TestCoverage, {
|
|
166
|
-
...options,
|
|
167
|
-
cwd: projectPath(),
|
|
168
|
-
verbose: true,
|
|
169
|
-
})
|
|
170
|
-
|
|
171
|
-
if (result.isErr()) {
|
|
172
|
-
await outro(
|
|
173
|
-
'While running `buddy test:coverage`, there was an issue',
|
|
174
|
-
{ startTime: perf, useSeconds: true },
|
|
175
|
-
result.error,
|
|
176
|
-
)
|
|
177
|
-
process.exit()
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
await outro('Generated the test coverage report', {
|
|
181
|
-
startTime: perf,
|
|
182
|
-
useSeconds: true,
|
|
183
|
-
})
|
|
184
|
-
process.exit()
|
|
185
|
-
})
|
|
186
|
-
|
|
187
210
|
buddy.on('test:*', () => {
|
|
188
211
|
console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
|
|
189
212
|
process.exit(1)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { CLI, TinkerOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { intro, log, outro, runCommand } from '@stacksjs/cli'
|
|
3
4
|
import { ExitCode } from '@stacksjs/types'
|
|
4
|
-
import type { CLI, TinkerOptions } from '@stacksjs/types'
|
|
5
5
|
|
|
6
|
-
export function tinker(buddy: CLI) {
|
|
6
|
+
export function tinker(buddy: CLI): void {
|
|
7
7
|
const descriptions = {
|
|
8
8
|
tinker: 'Tinker with your code',
|
|
9
9
|
project: 'Target a specific project',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { CLI, CliOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { generateTypes } from '@stacksjs/actions'
|
|
3
4
|
import { log } from '@stacksjs/logging'
|
|
4
|
-
import type { CLI, CliOptions } from '@stacksjs/types'
|
|
5
5
|
|
|
6
|
-
export function types(buddy: CLI) {
|
|
6
|
+
export function types(buddy: CLI): void {
|
|
7
7
|
const descriptions = {
|
|
8
8
|
generate: 'Generate the types of & for your library/libraries',
|
|
9
9
|
fix: 'wip',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import type { CLI, UpgradeOptions } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { runAction } from '@stacksjs/actions'
|
|
3
|
-
import { intro, log, outro } from '@stacksjs/cli'
|
|
4
|
+
import { intro, log, outro, prompts } from '@stacksjs/cli'
|
|
4
5
|
import { Action } from '@stacksjs/enums'
|
|
5
6
|
import { ExitCode } from '@stacksjs/types'
|
|
6
|
-
import type { CLI, UpgradeOptions } from '@stacksjs/types'
|
|
7
7
|
import { isString } from '@stacksjs/validation'
|
|
8
8
|
|
|
9
|
-
export function upgrade(buddy: CLI) {
|
|
9
|
+
export function upgrade(buddy: CLI): void {
|
|
10
10
|
const descriptions = {
|
|
11
11
|
command: 'Upgrade dependencies, framework, package manager, JS/TS runtime',
|
|
12
12
|
framework: 'Upgrade the Stacks framework',
|
|
@@ -42,22 +42,29 @@ export function upgrade(buddy: CLI) {
|
|
|
42
42
|
const perf = await intro('buddy upgrade')
|
|
43
43
|
|
|
44
44
|
if (hasNoOptions(options)) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{ value: '
|
|
51
|
-
{ value: '
|
|
45
|
+
const answers = await prompts({
|
|
46
|
+
type: 'multiselect',
|
|
47
|
+
name: 'value',
|
|
48
|
+
message: descriptions.select,
|
|
49
|
+
choices: [
|
|
50
|
+
{ value: 'dependencies', title: 'Dependencies' },
|
|
51
|
+
{ value: 'framework', title: 'Framework' },
|
|
52
|
+
{ value: 'bun', title: 'Bun' },
|
|
53
|
+
{ value: 'shell', title: 'Shell' },
|
|
54
|
+
{ value: 'binary', title: 'Binary' },
|
|
52
55
|
],
|
|
53
56
|
})
|
|
54
57
|
|
|
55
|
-
|
|
58
|
+
let answersValue = answers.value
|
|
59
|
+
|
|
60
|
+
if (answersValue !== null)
|
|
61
|
+
process.exit(ExitCode.InvalidArgument)
|
|
56
62
|
|
|
57
|
-
if (isString(
|
|
63
|
+
if (isString(answersValue))
|
|
64
|
+
answersValue = [answersValue]
|
|
58
65
|
|
|
59
66
|
// creates an object out of array and sets answers to true
|
|
60
|
-
options =
|
|
67
|
+
options = answersValue.reduce((a: any, v: any) => {
|
|
61
68
|
a[v] = true
|
|
62
69
|
return a
|
|
63
70
|
}, {})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { CLI } from '@stacksjs/types'
|
|
1
2
|
import process from 'node:process'
|
|
2
3
|
import { bold, dim, green, intro, log } from '@stacksjs/cli'
|
|
3
4
|
import { storage } from '@stacksjs/storage'
|
|
4
|
-
import type { CLI } from '@stacksjs/types'
|
|
5
5
|
|
|
6
|
-
export function version(buddy: CLI) {
|
|
6
|
+
export function version(buddy: CLI): void {
|
|
7
7
|
const descriptions = {
|
|
8
8
|
version: 'Retrieving Stacks build version',
|
|
9
9
|
}
|
package/buddy/src/custom-cli.ts
CHANGED
|
@@ -17,14 +17,15 @@ async function main() {
|
|
|
17
17
|
|
|
18
18
|
// dynamically import and register commands from ./app/Commands/*
|
|
19
19
|
const commandsDir = p.appPath('Commands')
|
|
20
|
-
const commandFiles = fs.readdirSync(commandsDir).filter((file) => file.endsWith('.ts'))
|
|
20
|
+
const commandFiles = fs.readdirSync(commandsDir).filter((file: string) => file.endsWith('.ts'))
|
|
21
21
|
|
|
22
22
|
for (const file of commandFiles) {
|
|
23
23
|
const commandPath = `${commandsDir}/${file}`
|
|
24
24
|
const dynamicImport = await import(commandPath)
|
|
25
25
|
|
|
26
26
|
// Correctly use the default export function
|
|
27
|
-
if (typeof dynamicImport.default === 'function')
|
|
27
|
+
if (typeof dynamicImport.default === 'function')
|
|
28
|
+
dynamicImport.default(buddy)
|
|
28
29
|
else console.error(`Expected a default export function in ${file}, but got:`, dynamicImport.default)
|
|
29
30
|
}
|
|
30
31
|
|
package/buddy/tsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.65.0",
|
|
5
5
|
"description": "The Stacks framework.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
|
+
"contributors": ["Chris Breuer <chris@stacksjs.org>"],
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
9
10
|
"homepage": "https://github.com/stacksjs/stacks/tree/main/stacks#readme",
|
|
@@ -334,71 +335,61 @@
|
|
|
334
335
|
}
|
|
335
336
|
},
|
|
336
337
|
"types": "./types/dist/index.d.ts",
|
|
337
|
-
"
|
|
338
|
-
"Chris Breuer <chris@stacksjs.org>"
|
|
339
|
-
],
|
|
340
|
-
"files": [
|
|
341
|
-
"buddy",
|
|
342
|
-
"core",
|
|
343
|
-
"ide",
|
|
344
|
-
"package.json",
|
|
345
|
-
"stubs",
|
|
346
|
-
"vcs"
|
|
347
|
-
],
|
|
338
|
+
"files": ["buddy", "core", "ide", "package.json", "stubs", "vcs"],
|
|
348
339
|
"scripts": {
|
|
349
|
-
"buddy": "bun
|
|
340
|
+
"buddy": "bun run ./buddy/src/cli.ts",
|
|
350
341
|
"build": "cd config && bun run build && cd ../env && bun run build && cd ../storage && bun run build && cd .. && bun ./build.ts",
|
|
351
|
-
"
|
|
352
|
-
"up": "
|
|
342
|
+
"up": "bun update",
|
|
343
|
+
"up:latest": "bun update --latest"
|
|
353
344
|
},
|
|
354
345
|
"web-types": "./web-types.json",
|
|
355
346
|
"dependencies": {
|
|
356
|
-
"@stacksjs/actions": "
|
|
357
|
-
"@stacksjs/ai": "
|
|
358
|
-
"@stacksjs/alias": "
|
|
359
|
-
"@stacksjs/arrays": "
|
|
360
|
-
"@stacksjs/auth": "
|
|
361
|
-
"@stacksjs/buddy": "
|
|
362
|
-
"@stacksjs/build": "
|
|
363
|
-
"@stacksjs/cache": "
|
|
364
|
-
"@stacksjs/cli": "
|
|
365
|
-
"@stacksjs/cloud": "
|
|
366
|
-
"@stacksjs/collections": "
|
|
367
|
-
"@stacksjs/config": "
|
|
368
|
-
"@stacksjs/database": "
|
|
369
|
-
"@stacksjs/desktop": "
|
|
370
|
-
"@stacksjs/development": "
|
|
371
|
-
"@stacksjs/dns": "
|
|
372
|
-
"@stacksjs/docs": "
|
|
373
|
-
"@stacksjs/email": "
|
|
374
|
-
"@stacksjs/enums": "
|
|
375
|
-
"@stacksjs/env": "
|
|
376
|
-
"@stacksjs/error-handling": "
|
|
377
|
-
"@stacksjs/events": "
|
|
378
|
-
"@stacksjs/faker": "
|
|
379
|
-
"@stacksjs/git": "
|
|
380
|
-
"@stacksjs/health": "
|
|
381
|
-
"@stacksjs/lint": "
|
|
382
|
-
"@stacksjs/logging": "
|
|
383
|
-
"@stacksjs/notifications": "
|
|
384
|
-
"@stacksjs/objects": "
|
|
385
|
-
"@stacksjs/orm": "
|
|
386
|
-
"@stacksjs/path": "
|
|
387
|
-
"@stacksjs/payments": "
|
|
388
|
-
"@stacksjs/realtime": "
|
|
389
|
-
"@stacksjs/router": "
|
|
390
|
-
"@stacksjs/search-engine": "
|
|
391
|
-
"@stacksjs/security": "
|
|
392
|
-
"@stacksjs/server": "
|
|
393
|
-
"@stacksjs/storage": "
|
|
394
|
-
"@stacksjs/strings": "
|
|
395
|
-
"@stacksjs/testing": "
|
|
396
|
-
"@stacksjs/tunnel": "
|
|
397
|
-
"@stacksjs/types": "
|
|
398
|
-
"@stacksjs/ui": "
|
|
399
|
-
"@stacksjs/utils": "
|
|
400
|
-
"@stacksjs/validation": "
|
|
401
|
-
"@stacksjs/vite-config": "
|
|
402
|
-
"@stacksjs/vite-plugin": "
|
|
347
|
+
"@stacksjs/actions": "0.64.6",
|
|
348
|
+
"@stacksjs/ai": "0.64.6",
|
|
349
|
+
"@stacksjs/alias": "0.64.6",
|
|
350
|
+
"@stacksjs/arrays": "0.64.6",
|
|
351
|
+
"@stacksjs/auth": "0.64.6",
|
|
352
|
+
"@stacksjs/buddy": "0.64.6",
|
|
353
|
+
"@stacksjs/build": "0.64.6",
|
|
354
|
+
"@stacksjs/cache": "0.64.6",
|
|
355
|
+
"@stacksjs/cli": "0.64.6",
|
|
356
|
+
"@stacksjs/cloud": "0.64.6",
|
|
357
|
+
"@stacksjs/collections": "0.64.6",
|
|
358
|
+
"@stacksjs/config": "0.64.6",
|
|
359
|
+
"@stacksjs/database": "0.64.6",
|
|
360
|
+
"@stacksjs/desktop": "0.64.6",
|
|
361
|
+
"@stacksjs/development": "0.64.6",
|
|
362
|
+
"@stacksjs/dns": "0.64.6",
|
|
363
|
+
"@stacksjs/docs": "0.64.6",
|
|
364
|
+
"@stacksjs/email": "0.64.6",
|
|
365
|
+
"@stacksjs/enums": "0.64.6",
|
|
366
|
+
"@stacksjs/env": "0.64.6",
|
|
367
|
+
"@stacksjs/error-handling": "0.64.6",
|
|
368
|
+
"@stacksjs/events": "0.64.6",
|
|
369
|
+
"@stacksjs/faker": "0.64.6",
|
|
370
|
+
"@stacksjs/git": "0.64.6",
|
|
371
|
+
"@stacksjs/health": "0.64.6",
|
|
372
|
+
"@stacksjs/lint": "0.64.6",
|
|
373
|
+
"@stacksjs/logging": "0.64.6",
|
|
374
|
+
"@stacksjs/notifications": "0.64.6",
|
|
375
|
+
"@stacksjs/objects": "0.64.6",
|
|
376
|
+
"@stacksjs/orm": "0.64.6",
|
|
377
|
+
"@stacksjs/path": "0.64.6",
|
|
378
|
+
"@stacksjs/payments": "0.64.6",
|
|
379
|
+
"@stacksjs/realtime": "0.64.6",
|
|
380
|
+
"@stacksjs/router": "0.64.6",
|
|
381
|
+
"@stacksjs/search-engine": "0.64.6",
|
|
382
|
+
"@stacksjs/security": "0.64.6",
|
|
383
|
+
"@stacksjs/server": "0.64.6",
|
|
384
|
+
"@stacksjs/storage": "0.64.6",
|
|
385
|
+
"@stacksjs/strings": "0.64.6",
|
|
386
|
+
"@stacksjs/testing": "0.64.6",
|
|
387
|
+
"@stacksjs/tunnel": "0.64.6",
|
|
388
|
+
"@stacksjs/types": "0.64.6",
|
|
389
|
+
"@stacksjs/ui": "0.64.6",
|
|
390
|
+
"@stacksjs/utils": "0.64.6",
|
|
391
|
+
"@stacksjs/validation": "0.64.6",
|
|
392
|
+
"@stacksjs/vite-config": "0.64.6",
|
|
393
|
+
"@stacksjs/vite-plugin": "0.64.6"
|
|
403
394
|
}
|
|
404
395
|
}
|