stacks 0.44.10 → 0.44.12
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/README.md +2 -1
- package/buddy/README.md +2 -1
- package/buddy/art/social.png +0 -0
- package/buddy/package.json +4 -3
- package/buddy/src/commands/add.ts +12 -12
- package/buddy/src/commands/build.ts +48 -31
- package/buddy/src/commands/clean.ts +6 -6
- package/buddy/src/commands/commit.ts +6 -6
- package/buddy/src/commands/create.ts +14 -14
- package/buddy/src/commands/dev.ts +15 -15
- package/buddy/src/commands/example.ts +11 -11
- package/buddy/src/commands/fresh.ts +19 -8
- package/buddy/src/commands/generate.ts +20 -20
- package/buddy/src/commands/key.ts +2 -2
- package/buddy/src/commands/lint.ts +8 -8
- package/buddy/src/commands/make.ts +33 -33
- package/buddy/src/commands/preinstall.ts +6 -6
- package/buddy/src/commands/prepublish.ts +6 -6
- package/buddy/src/commands/release.ts +2 -2
- package/buddy/src/commands/setup.ts +8 -8
- package/buddy/src/commands/test.ts +11 -11
- package/buddy/src/commands/types.ts +8 -8
- package/buddy/src/commands/update.ts +20 -20
- package/buddy/src/index.ts +1 -0
- package/core/actions/package.json +1 -1
- package/core/actions/src/build-component-libs.ts +15 -0
- package/core/actions/src/build-stacks.ts +9 -0
- package/core/actions/src/fresh.ts +3 -26
- package/core/actions/src/helpers/utils.ts +2 -1
- package/core/ai/package.json +1 -1
- package/core/alias/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/build/package.json +1 -1
- package/core/cache/package.json +1 -1
- package/core/cli/package.json +1 -1
- package/core/cli/src/actions/run.ts +2 -2
- package/core/cli/src/helpers.ts +1 -1
- package/core/cloud/package.json +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/dashboard/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/docs/node_modules/.bin/vitepress +2 -2
- package/core/docs/package.json +2 -2
- package/core/domains/package.json +1 -1
- package/core/drivers/package.json +1 -1
- package/core/email/package.json +1 -1
- package/core/error-handling/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/README.md +56 -0
- package/core/health/node_modules/.bin/mkdist +17 -0
- package/core/health/node_modules/.bin/tsc +17 -0
- package/core/health/node_modules/.bin/tsserver +17 -0
- package/core/health/package.json +54 -0
- package/core/health/src/drivers/ohdear.ts +1 -0
- package/core/health/src/index.ts +1 -0
- package/core/health/src/notifications/index.ts +1 -0
- package/core/health/tests/example.test.ts +7 -0
- package/core/lint/package.json +1 -1
- package/core/logging/package.json +1 -1
- package/core/modules/package.json +1 -1
- package/core/notifications/README.md +205 -30
- package/core/notifications/package.json +1 -1
- package/core/objects/package.json +1 -1
- package/core/path/package.json +1 -1
- package/core/payments/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/router/package.json +1 -1
- package/core/search-engine/package.json +2 -2
- package/core/security/package.json +1 -1
- package/core/server/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/types/node_modules/.bin/vitepress +2 -2
- package/core/types/package.json +2 -2
- package/core/types/src/cli.ts +8 -0
- package/core/ui/package.json +1 -1
- package/core/utils/package.json +4 -4
- package/core/x-ray/package.json +1 -1
- package/package.json +6 -6
- package/tsconfig.json +2 -2
- package/components/vue/dist/.gitkeep +0 -0
- package/components/web/dist/.gitkeep +0 -0
|
@@ -14,21 +14,21 @@ import {
|
|
|
14
14
|
stack as makeStack,
|
|
15
15
|
} from '@stacksjs/actions/make'
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
async function make(buddy: CLI) {
|
|
18
|
+
const descriptions = {
|
|
19
|
+
component: 'Create a new component',
|
|
20
|
+
page: 'Create a new page',
|
|
21
|
+
function: 'Create a new function',
|
|
22
|
+
language: 'Create a new language',
|
|
23
|
+
database: 'Create a new database',
|
|
24
|
+
migration: 'Create a new migration',
|
|
25
|
+
factory: 'Create a new factory',
|
|
26
|
+
notification: 'Create a new notification',
|
|
27
|
+
stack: 'Create a new new stack',
|
|
28
|
+
debug: 'Enable debug mode',
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
buddy
|
|
32
32
|
.command('make', 'The make command')
|
|
33
33
|
.option('-c, --component', descriptions.component, { default: false })
|
|
34
34
|
.option('-p, --page', descriptions.page, { default: false })
|
|
@@ -41,7 +41,7 @@ async function make(stacks: CLI) {
|
|
|
41
41
|
.option('-s, --stack', descriptions.stack, { default: false })
|
|
42
42
|
.option('--debug', descriptions.debug, { default: false })
|
|
43
43
|
.action(async (options: MakeOptions) => {
|
|
44
|
-
const name =
|
|
44
|
+
const name = buddy.args[0]
|
|
45
45
|
|
|
46
46
|
if (!name) {
|
|
47
47
|
log.error('You need to specify a name. Read more about the documentation here.')
|
|
@@ -75,12 +75,12 @@ async function make(stacks: CLI) {
|
|
|
75
75
|
process.exit(ExitCode.Success)
|
|
76
76
|
})
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
buddy
|
|
79
79
|
.command('make:component', descriptions.component)
|
|
80
80
|
.option('--n, -name', 'The name of the component')
|
|
81
81
|
.option('--debug', descriptions.debug, { default: false })
|
|
82
82
|
.action(async (options: MakeOptions) => {
|
|
83
|
-
const name =
|
|
83
|
+
const name = buddy.args[0] || options.name
|
|
84
84
|
options.name = name
|
|
85
85
|
|
|
86
86
|
if (!name) {
|
|
@@ -91,12 +91,12 @@ async function make(stacks: CLI) {
|
|
|
91
91
|
await makeComponent(options)
|
|
92
92
|
})
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
buddy
|
|
95
95
|
.command('make:database', descriptions.database)
|
|
96
96
|
.option('--n, -name', 'The name of the database')
|
|
97
97
|
.option('--debug', descriptions.debug, { default: false })
|
|
98
98
|
.action(async (options: MakeOptions) => {
|
|
99
|
-
const name =
|
|
99
|
+
const name = buddy.args[0] || options.name
|
|
100
100
|
options.name = name
|
|
101
101
|
|
|
102
102
|
if (!name) {
|
|
@@ -107,12 +107,12 @@ async function make(stacks: CLI) {
|
|
|
107
107
|
await makeDatabase(options)
|
|
108
108
|
})
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
buddy
|
|
111
111
|
.command('make:migration', descriptions.migration)
|
|
112
112
|
.option('--n, -name', 'The name of the migration')
|
|
113
113
|
.option('--debug', descriptions.debug, { default: false })
|
|
114
114
|
.action(async (options: MakeOptions) => {
|
|
115
|
-
const name =
|
|
115
|
+
const name = buddy.args[0] || options.name
|
|
116
116
|
options.name = name
|
|
117
117
|
|
|
118
118
|
if (!name) {
|
|
@@ -123,12 +123,12 @@ async function make(stacks: CLI) {
|
|
|
123
123
|
await makeMigration(options)
|
|
124
124
|
})
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
buddy
|
|
127
127
|
.command('make:factory', descriptions.factory)
|
|
128
128
|
.option('--n, -name', 'The name of the factory')
|
|
129
129
|
.option('--debug', descriptions.debug, { default: false })
|
|
130
130
|
.action(async (options: MakeOptions) => {
|
|
131
|
-
const name =
|
|
131
|
+
const name = buddy.args[0] || options.name
|
|
132
132
|
options.name = name
|
|
133
133
|
|
|
134
134
|
if (!name) {
|
|
@@ -139,12 +139,12 @@ async function make(stacks: CLI) {
|
|
|
139
139
|
await makeFactory(options)
|
|
140
140
|
})
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
buddy
|
|
143
143
|
.command('make:page', descriptions.page)
|
|
144
144
|
.option('--n, -name', 'The name of the page')
|
|
145
145
|
.option('--debug', descriptions.debug, { default: false })
|
|
146
146
|
.action(async (options: MakeOptions) => {
|
|
147
|
-
const name =
|
|
147
|
+
const name = buddy.args[0] || options.name
|
|
148
148
|
options.name = name
|
|
149
149
|
|
|
150
150
|
if (!name) {
|
|
@@ -155,7 +155,7 @@ async function make(stacks: CLI) {
|
|
|
155
155
|
await makePage(options)
|
|
156
156
|
})
|
|
157
157
|
|
|
158
|
-
|
|
158
|
+
buddy
|
|
159
159
|
.command('make:function', descriptions.function)
|
|
160
160
|
.option('--n, -name', 'The name of the function')
|
|
161
161
|
.option('--debug', descriptions.debug, { default: false })
|
|
@@ -163,12 +163,12 @@ async function make(stacks: CLI) {
|
|
|
163
163
|
await makeFunction(options)
|
|
164
164
|
})
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
buddy
|
|
167
167
|
.command('make:lang', descriptions.language)
|
|
168
168
|
.option('--n, -name', 'The name of the language')
|
|
169
169
|
.option('--debug', descriptions.debug, { default: false })
|
|
170
170
|
.action(async (options: MakeOptions) => {
|
|
171
|
-
const name =
|
|
171
|
+
const name = buddy.args[0] || options.name
|
|
172
172
|
options.name = name
|
|
173
173
|
|
|
174
174
|
if (!name) {
|
|
@@ -179,12 +179,12 @@ async function make(stacks: CLI) {
|
|
|
179
179
|
await makeLanguage(options)
|
|
180
180
|
})
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
buddy
|
|
183
183
|
.command('make:notification', descriptions.notification)
|
|
184
184
|
.option('--n, -name', 'The name of the notification')
|
|
185
185
|
.option('--debug', descriptions.debug, { default: false })
|
|
186
186
|
.action(async (options: MakeOptions) => {
|
|
187
|
-
const name =
|
|
187
|
+
const name = buddy.args[0] || options.name
|
|
188
188
|
options.name = name
|
|
189
189
|
|
|
190
190
|
if (!name) {
|
|
@@ -195,12 +195,12 @@ async function make(stacks: CLI) {
|
|
|
195
195
|
await makeNotification(options)
|
|
196
196
|
})
|
|
197
197
|
|
|
198
|
-
|
|
198
|
+
buddy
|
|
199
199
|
.command('make:stack', descriptions.stack)
|
|
200
200
|
.option('--n, -name', 'The name of the stack')
|
|
201
201
|
.option('--debug', descriptions.debug, { default: false })
|
|
202
202
|
.action(async (options: MakeOptions) => {
|
|
203
|
-
const name =
|
|
203
|
+
const name = buddy.args[0] || options.name
|
|
204
204
|
options.name = name
|
|
205
205
|
|
|
206
206
|
if (!name) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { CLI, PreinstallOptions } from '@stacksjs/types'
|
|
2
2
|
import { invoke } from '@stacksjs/actions/preinstall'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
async function preinstall(buddy: CLI) {
|
|
5
|
+
const descriptions = {
|
|
6
|
+
command: 'Run your preinstall script',
|
|
7
|
+
debug: 'Enable debug mode',
|
|
8
|
+
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
stacks
|
|
10
|
+
buddy
|
|
11
11
|
.command('preinstall', descriptions.command)
|
|
12
12
|
.option('--debug', descriptions.debug, { default: false })
|
|
13
13
|
.action(async (options: PreinstallOptions) => {
|
|
@@ -2,13 +2,13 @@ import type { CLI, PrepublishOptions } from '@stacksjs/types'
|
|
|
2
2
|
import { Action } from '@stacksjs/types'
|
|
3
3
|
import { runAction } from '@stacksjs/actions'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
async function prepublish(buddy: CLI) {
|
|
6
|
+
const descriptions = {
|
|
7
|
+
command: 'Run your prepublish script',
|
|
8
|
+
debug: 'Enable debug mode',
|
|
9
|
+
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
stacks
|
|
11
|
+
buddy
|
|
12
12
|
.command('prepublish', descriptions.command)
|
|
13
13
|
.option('--debug', descriptions.debug, { default: false })
|
|
14
14
|
.action(async (options: PrepublishOptions) => {
|
|
@@ -8,8 +8,8 @@ const descriptions = {
|
|
|
8
8
|
debug: 'Enable debug mode',
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
async function release(
|
|
12
|
-
|
|
11
|
+
async function release(buddy: CLI) {
|
|
12
|
+
buddy
|
|
13
13
|
.command('release', descriptions.release)
|
|
14
14
|
.option('--debug', descriptions.debug, { default: true }) // it's on by default because it requires manual input
|
|
15
15
|
.action(async (options: ReleaseOptions) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { runCommand } from '@stacksjs/cli'
|
|
2
2
|
import type { CLI, CliOptions } from '@stacksjs/types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
async function setup(buddy: CLI) {
|
|
5
|
+
const descriptions = {
|
|
6
|
+
ensure: 'This command checks whether Node is installed. pnpm is checked via `only-allow` preinstall hook',
|
|
7
|
+
setup: 'This command installs Node & pnpm',
|
|
8
|
+
debug: 'Enable debug mode',
|
|
9
|
+
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
stacks
|
|
11
|
+
buddy
|
|
12
12
|
.command('ensure', descriptions.ensure)
|
|
13
13
|
.option('--debug', descriptions.debug, { default: false })
|
|
14
14
|
.action(async (options: CliOptions) => {
|
|
15
15
|
await runCommand('pnpm install', options)
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
buddy
|
|
19
19
|
.command('setup', descriptions.setup)
|
|
20
20
|
.option('--debug', descriptions.debug, { default: false })
|
|
21
21
|
.action(async (options: CliOptions) => {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import type { CLI, TestOptions } from '@stacksjs/types'
|
|
2
2
|
import { invoke, testCoverageReport, testUi, typecheck } from '@stacksjs/actions/test'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
async function test(buddy: CLI) {
|
|
5
|
+
const descriptions = {
|
|
6
|
+
command: 'Runs your test suite',
|
|
7
|
+
types: 'Typechecks your codebase',
|
|
8
|
+
coverage: 'Generates a test coverage report',
|
|
9
|
+
debug: 'Enable debug mode',
|
|
10
|
+
}
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
stacks
|
|
12
|
+
buddy
|
|
13
13
|
.command('test', descriptions.command)
|
|
14
14
|
.option('--debug', descriptions.debug, { default: false })
|
|
15
15
|
.action(async (options: TestOptions) => {
|
|
16
16
|
await invoke(options)
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
buddy
|
|
20
20
|
.command('test:ui', descriptions.command)
|
|
21
21
|
.option('--debug', descriptions.debug, { default: false })
|
|
22
22
|
.action(async (options: TestOptions) => {
|
|
23
23
|
await testUi(options)
|
|
24
24
|
})
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
buddy
|
|
27
27
|
.command('test:types', descriptions.types)
|
|
28
28
|
.option('--debug', descriptions.debug, { default: false })
|
|
29
29
|
.action(async (options: TestOptions) => {
|
|
30
30
|
await typecheck(options)
|
|
31
31
|
})
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
buddy
|
|
34
34
|
.command('test:coverage', descriptions.coverage)
|
|
35
35
|
.option('--debug', descriptions.debug, { default: false })
|
|
36
36
|
.action(async (options: TestOptions) => {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { CLI } from '@stacksjs/types'
|
|
2
2
|
import { types as generateTypes } from '@stacksjs/actions/generate'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
async function types(buddy: CLI) {
|
|
5
|
+
const descriptions = {
|
|
6
|
+
generate: 'Generate the types of & for your library/libraries',
|
|
7
|
+
fix: 'wip',
|
|
8
|
+
debug: 'Enable debug mode',
|
|
9
|
+
}
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
stacks
|
|
11
|
+
buddy
|
|
12
12
|
.command('types:generate', descriptions.generate)
|
|
13
13
|
.option('--debug', descriptions.debug, { default: false })
|
|
14
14
|
.action(async () => {
|
|
15
15
|
await generateTypes()
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
buddy
|
|
19
19
|
.command('types:fix', descriptions.fix)
|
|
20
20
|
.option('--debug', descriptions.debug, { default: false })
|
|
21
21
|
.action(async () => {
|
|
@@ -3,20 +3,20 @@ import { ExitCode } from '@stacksjs/types'
|
|
|
3
3
|
import { prompts } from '@stacksjs/cli'
|
|
4
4
|
import { invoke as updateStacks } from '@stacksjs/actions/update'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
6
|
+
async function update(buddy: CLI) {
|
|
7
|
+
const descriptions = {
|
|
8
|
+
command: 'Update dependencies, framework, package manager, and/or Node',
|
|
9
|
+
framework: 'Update the Stacks framework',
|
|
10
|
+
dependencies: 'Update your dependencies',
|
|
11
|
+
packageManager: 'Update your package manager, i.e. pnpm',
|
|
12
|
+
node: 'Update Node to the version defined in ./node-version',
|
|
13
|
+
all: 'Update Node, package manager, project dependencies, and framework',
|
|
14
|
+
force: 'Overwrite possible local updates with remote framework updates',
|
|
15
|
+
debug: 'Enable debug mode',
|
|
16
|
+
select: 'What are you trying to update?',
|
|
17
|
+
}
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
stacks
|
|
19
|
+
buddy
|
|
20
20
|
.command('update', descriptions.command)
|
|
21
21
|
.option('-c, --framework', descriptions.framework, { default: false })
|
|
22
22
|
.option('-d, --dependencies', descriptions.dependencies, { default: false })
|
|
@@ -47,7 +47,7 @@ async function update(stacks: CLI) {
|
|
|
47
47
|
await updateStacks(options)
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
buddy
|
|
51
51
|
.command('update:framework', descriptions.framework)
|
|
52
52
|
.option('-f, --framework', descriptions.framework, { default: true })
|
|
53
53
|
.option('--debug', descriptions.debug, { default: false })
|
|
@@ -56,7 +56,7 @@ async function update(stacks: CLI) {
|
|
|
56
56
|
await updateStacks(options)
|
|
57
57
|
})
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
buddy
|
|
60
60
|
.command('update:dependencies', descriptions.dependencies)
|
|
61
61
|
.option('-d, --dependencies', descriptions.dependencies, { default: true })
|
|
62
62
|
.option('--debug', descriptions.debug, { default: false })
|
|
@@ -66,7 +66,7 @@ async function update(stacks: CLI) {
|
|
|
66
66
|
await updateStacks(options)
|
|
67
67
|
})
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
buddy
|
|
70
70
|
.command('update:package-manager', descriptions.packageManager)
|
|
71
71
|
.option('-p, --package-manager', descriptions.packageManager, { default: true })
|
|
72
72
|
.option('--debug', descriptions.debug, { default: false })
|
|
@@ -76,15 +76,15 @@ async function update(stacks: CLI) {
|
|
|
76
76
|
.action(async (options: UpdateOptions) => {
|
|
77
77
|
options.version = 'latest'
|
|
78
78
|
|
|
79
|
-
if (
|
|
80
|
-
options.version =
|
|
79
|
+
if (buddy.args[0])
|
|
80
|
+
options.version = buddy.args[0]
|
|
81
81
|
|
|
82
82
|
await updateStacks(options)
|
|
83
83
|
|
|
84
84
|
process.exit(ExitCode.Success)
|
|
85
85
|
})
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
buddy
|
|
88
88
|
.command('update:node', descriptions.node)
|
|
89
89
|
.option('-n, --node', descriptions.node, { default: true })
|
|
90
90
|
.option('--debug', descriptions.debug, { default: false })
|
|
@@ -92,7 +92,7 @@ async function update(stacks: CLI) {
|
|
|
92
92
|
await updateStacks(options)
|
|
93
93
|
})
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
buddy
|
|
96
96
|
.command('update:all', descriptions.all)
|
|
97
97
|
.option('-a, --all', descriptions.all, { default: true })
|
|
98
98
|
.option('--debug', descriptions.debug, { default: false })
|
package/buddy/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from '@stacksjs/cloud'
|
|
|
7
7
|
export * from '@stacksjs/collections'
|
|
8
8
|
export * from '@stacksjs/config'
|
|
9
9
|
// export * from '@stacksjs/desktop'
|
|
10
|
+
// export * from '@stacksjs/notifications'
|
|
10
11
|
export * from '@stacksjs/storage'
|
|
11
12
|
export * from '@stacksjs/router'
|
|
12
13
|
export * from '@stacksjs/server'
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { log } from '@stacksjs/logging'
|
|
2
|
+
import { frameworkPath } from '@stacksjs/path'
|
|
3
|
+
import { runCommand } from '@stacksjs/cli'
|
|
4
|
+
|
|
5
|
+
log.info('Building Component Libraries...')
|
|
6
|
+
|
|
7
|
+
// run the `npx mkdist -d` command to build the dist folder
|
|
8
|
+
const result = await runCommand('npx mkdist -d', { debug: true, cwd: frameworkPath() })
|
|
9
|
+
|
|
10
|
+
if (result.isErr()) {
|
|
11
|
+
log.error('There was an error running `npx mkdist -d`.', result.error)
|
|
12
|
+
process.exit()
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
log.success('Building Stacks was successful.')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { frameworkPath } from '@stacksjs/path'
|
|
2
|
+
import { runCommands } from '@stacksjs/cli'
|
|
3
|
+
|
|
4
|
+
await runCommands([
|
|
5
|
+
'npx mkdist -d', // command to build the dist folder
|
|
6
|
+
'pnpm build:cli', // command to build the Buddy CLI
|
|
7
|
+
'pnpm build:core', // command to build the Stacks Core
|
|
8
|
+
'cp -a ./core/. ./', // copy the core stacks to the famework's root
|
|
9
|
+
], { debug: true, cwd: frameworkPath() })
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { ExitCode } from '@stacksjs/types'
|
|
1
|
+
import { runCommands } from '@stacksjs/cli'
|
|
2
|
+
import { frameworkPath } from '@stacksjs/path'
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
const perf = intro('buddy fresh')
|
|
7
|
-
const results = await runCommands(['pnpm run clean', 'pnpm install'], options)
|
|
8
|
-
|
|
9
|
-
for (const result of results) {
|
|
10
|
-
if (result.isErr()) {
|
|
11
|
-
outro('While running the fresh command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
|
|
12
|
-
process.exit(ExitCode.FatalError)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
outro('Freshly reinstalled your dependencies.', { startTime: perf, useSeconds: true })
|
|
17
|
-
process.exit(ExitCode.Success)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* An alias of the invoke method.
|
|
22
|
-
* @param options
|
|
23
|
-
* @returns
|
|
24
|
-
*/
|
|
25
|
-
export async function fresh(options: FreshOptions) {
|
|
26
|
-
return invoke(options)
|
|
27
|
-
}
|
|
4
|
+
await runCommands(['pnpm run clean', 'pnpm install'], { cwd: frameworkPath(), debug: true })
|
|
@@ -15,7 +15,8 @@ export async function runAction(action: string, options?: CliOptions) {
|
|
|
15
15
|
if (!hasAction(action))
|
|
16
16
|
return err(`The specified action "${action}" does not exist`)
|
|
17
17
|
|
|
18
|
-
const cmd = `esno ${actionsPath(`${action}.ts`)}`
|
|
18
|
+
const cmd = `npx esno ${actionsPath(`${action}.ts`)}`
|
|
19
|
+
|
|
19
20
|
return await runCommand(cmd, options)
|
|
20
21
|
}
|
|
21
22
|
|
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/build/package.json
CHANGED
package/core/cache/package.json
CHANGED
package/core/cli/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import type { CliOptions, CommandResult, Result, SpinnerOptions as Spinner } fro
|
|
|
2
2
|
import { determineDebugMode } from '@stacksjs/config'
|
|
3
3
|
import { ResultAsync } from '@stacksjs/error-handling'
|
|
4
4
|
import { projectPath } from '@stacksjs/path'
|
|
5
|
-
import { italic } from '
|
|
5
|
+
import { italic } from '@stacksjs/cli'
|
|
6
6
|
import { spawn } from '../command'
|
|
7
7
|
import { startAnimation } from '../helpers'
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ export function exec(command: string, options?: CliOptions) {
|
|
|
20
20
|
|
|
21
21
|
return ResultAsync.fromPromise(
|
|
22
22
|
spawn(command, { stdio, cwd }),
|
|
23
|
-
() => new Error(`Failed to
|
|
23
|
+
() => new Error(`Failed to run command: ${italic(command)}`),
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
|
package/core/cli/src/helpers.ts
CHANGED
|
@@ -24,7 +24,7 @@ export function intro(command: string, options?: IntroOptions) {
|
|
|
24
24
|
/**
|
|
25
25
|
* Prints the outro message.
|
|
26
26
|
*/
|
|
27
|
-
export function outro(text: string, options: OutroOptions, error?: Error) {
|
|
27
|
+
export function outro(text: string, options: OutroOptions, error?: Error | string) {
|
|
28
28
|
if (options.isError) {
|
|
29
29
|
if (error)
|
|
30
30
|
log.error(error)
|
package/core/cloud/package.json
CHANGED