@stacksjs/buddy 0.65.0 → 0.67.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.
Files changed (106) hide show
  1. package/dist/{chunk-agapayce.js → chunk-3whxjf1k.js} +1 -4
  2. package/dist/chunk-42swmjjw.js +2 -0
  3. package/dist/chunk-564c63vr.js +2 -0
  4. package/dist/chunk-5wxk7vka.js +1 -0
  5. package/dist/chunk-6cscdnf5.js +2 -0
  6. package/dist/chunk-898dh3kh.js +8 -0
  7. package/dist/chunk-9g2p5d3j.js +2 -0
  8. package/dist/chunk-bpa4071y.js +2 -0
  9. package/dist/chunk-cbtnhpqk.js +2 -0
  10. package/dist/chunk-f18wwa85.js +827 -0
  11. package/dist/chunk-g767h9jq.js +3 -0
  12. package/dist/chunk-hgzxtrgw.js +9 -0
  13. package/dist/chunk-hqv9y9k2.js +6 -0
  14. package/dist/chunk-jfs19hhz.js +2 -0
  15. package/dist/chunk-ncwfzcsm.js +2 -0
  16. package/dist/chunk-pfb4369d.js +2 -0
  17. package/dist/chunk-sgm5999j.js +12 -0
  18. package/dist/chunk-we57sm1m.js +2 -0
  19. package/dist/chunk-wps8bq6b.js +2 -0
  20. package/dist/chunk-y2g00ayp.js +2 -0
  21. package/dist/chunk-ycyg22fp.js +2 -0
  22. package/dist/cli.js +1 -4
  23. package/dist/index.js +1 -4
  24. package/dist/stacks +0 -0
  25. package/package.json +48 -49
  26. package/dist/chunk-1bcxd9nx.js +0 -5
  27. package/dist/chunk-1bcxd9nx.js.map +0 -17
  28. package/dist/chunk-3gvx3tap.js +0 -5
  29. package/dist/chunk-3gvx3tap.js.map +0 -9
  30. package/dist/chunk-5mkzknp4.js +0 -5
  31. package/dist/chunk-5mkzknp4.js.map +0 -32
  32. package/dist/chunk-a3d48jzd.js +0 -15
  33. package/dist/chunk-a3d48jzd.js.map +0 -164
  34. package/dist/chunk-a6ba4vgs.js +0 -5
  35. package/dist/chunk-a6ba4vgs.js.map +0 -11
  36. package/dist/chunk-agapayce.js.map +0 -15
  37. package/dist/chunk-b9d377d9.js +0 -5
  38. package/dist/chunk-b9d377d9.js.map +0 -26
  39. package/dist/chunk-bh61bx6h.js +0 -4
  40. package/dist/chunk-bh61bx6h.js.map +0 -23
  41. package/dist/chunk-fqrjh7j8.js +0 -5
  42. package/dist/chunk-fqrjh7j8.js.map +0 -10
  43. package/dist/chunk-jkt9jxar.js +0 -9
  44. package/dist/chunk-jkt9jxar.js.map +0 -13
  45. package/dist/chunk-k1q2z202.js +0 -4
  46. package/dist/chunk-k1q2z202.js.map +0 -16
  47. package/dist/chunk-mmjggjd5.js +0 -849
  48. package/dist/chunk-mmjggjd5.js.map +0 -240
  49. package/dist/chunk-mxwvrbdh.js +0 -6
  50. package/dist/chunk-mxwvrbdh.js.map +0 -59
  51. package/dist/chunk-n55kahn5.js +0 -5
  52. package/dist/chunk-n55kahn5.js.map +0 -12
  53. package/dist/chunk-pbpgcz3v.js +0 -5
  54. package/dist/chunk-pbpgcz3v.js.map +0 -46
  55. package/dist/chunk-sadghty0.js +0 -5
  56. package/dist/chunk-sadghty0.js.map +0 -20
  57. package/dist/chunk-smzpmhmp.js +0 -11
  58. package/dist/chunk-smzpmhmp.js.map +0 -10
  59. package/dist/chunk-w4zypt02.js +0 -5
  60. package/dist/chunk-w4zypt02.js.map +0 -23
  61. package/dist/chunk-ywfsnx7v.js +0 -5
  62. package/dist/chunk-ywfsnx7v.js.map +0 -22
  63. package/dist/chunk-yxs8vtg9.js +0 -5
  64. package/dist/chunk-yxs8vtg9.js.map +0 -10
  65. package/dist/chunk-z7609s4h.js +0 -12
  66. package/dist/chunk-z7609s4h.js.map +0 -11
  67. package/dist/cli.js.map +0 -10
  68. package/dist/index.js.map +0 -9
  69. package/src/cli.ts +0 -105
  70. package/src/commands/add.ts +0 -71
  71. package/src/commands/build.ts +0 -299
  72. package/src/commands/changelog.ts +0 -52
  73. package/src/commands/clean.ts +0 -46
  74. package/src/commands/cloud.ts +0 -553
  75. package/src/commands/commit.ts +0 -26
  76. package/src/commands/configure.ts +0 -84
  77. package/src/commands/create.ts +0 -143
  78. package/src/commands/deploy.ts +0 -194
  79. package/src/commands/dev.ts +0 -292
  80. package/src/commands/dns.ts +0 -86
  81. package/src/commands/domains.ts +0 -255
  82. package/src/commands/fresh.ts +0 -48
  83. package/src/commands/generate.ts +0 -202
  84. package/src/commands/http.ts +0 -57
  85. package/src/commands/index.ts +0 -33
  86. package/src/commands/install.ts +0 -30
  87. package/src/commands/key.ts +0 -36
  88. package/src/commands/lint.ts +0 -54
  89. package/src/commands/list.ts +0 -42
  90. package/src/commands/make.ts +0 -352
  91. package/src/commands/migrate.ts +0 -105
  92. package/src/commands/outdated.ts +0 -31
  93. package/src/commands/ports.ts +0 -188
  94. package/src/commands/prepublish.ts +0 -28
  95. package/src/commands/projects.ts +0 -54
  96. package/src/commands/release.ts +0 -50
  97. package/src/commands/route.ts +0 -39
  98. package/src/commands/seed.ts +0 -47
  99. package/src/commands/setup.ts +0 -145
  100. package/src/commands/test.ts +0 -214
  101. package/src/commands/tinker.ts +0 -42
  102. package/src/commands/types.ts +0 -35
  103. package/src/commands/upgrade.ts +0 -200
  104. package/src/commands/version.ts +0 -29
  105. package/src/custom-cli.ts +0 -35
  106. package/src/index.ts +0 -1
@@ -1,299 +0,0 @@
1
- import type { BuildOptions, CLI } from '@stacksjs/types'
2
- import process from 'node:process'
3
- import { runAction } from '@stacksjs/actions'
4
- import { intro, log, outro, prompts } from '@stacksjs/cli'
5
- import { Action } from '@stacksjs/enums'
6
- import { ExitCode } from '@stacksjs/types'
7
-
8
- export function build(buddy: CLI): void {
9
- const descriptions = {
10
- build: 'Build any of your libraries (packages) for production use',
11
- components: 'Build your component library',
12
- vueComponents: 'Build your Vue component library',
13
- webComponents: 'Build your framework agnostic web component library',
14
- elements: 'An alias to the -w flag',
15
- buddy: 'Build the Buddy binary',
16
- functions: 'Build your function library',
17
- desktop: 'Build the Desktop Application',
18
- pages: 'Build your frontend',
19
- docs: 'Build your documentation',
20
- framework: 'Build Stacks framework',
21
- cli: 'Automagically build the CLI',
22
- server: 'Build the Stacks cloud server (Docker image)',
23
- select: 'What are you trying to build?',
24
- project: 'Target a specific project',
25
- verbose: 'Enable verbose output',
26
- }
27
-
28
- buddy
29
- .command('build [type]', descriptions.build)
30
- .option('-c, --components', descriptions.components)
31
- .option('-v, --vue-components', descriptions.vueComponents) // also automatically built via the -c flag
32
- .option('-w, --web-components', descriptions.webComponents) // also automatically built via the -c flag
33
- .option('-e, --elements', descriptions.elements) // alias for --web-components
34
- .option('-f, --functions', descriptions.functions)
35
- .option('-p, --views', descriptions.pages)
36
- .option('--pages', descriptions.pages) // alias for --views
37
- .option('-d, --docs', descriptions.docs)
38
- .option('-b, --buddy', descriptions.buddy, { default: false })
39
- .option('-s, --stacks', descriptions.framework, { default: false })
40
- .option('--project [project]', descriptions.project, { default: false })
41
- .option('--server', descriptions.server, { default: false })
42
- .option('--verbose', descriptions.verbose, { default: false })
43
- .action(async (server: string | undefined, options: BuildOptions) => {
44
- log.debug('Running `buddy build` ...', options)
45
-
46
- switch (server) {
47
- case 'components':
48
- options.components = true
49
- break
50
- case 'vue':
51
- options.vueComponents = true
52
- break
53
- case 'web-components':
54
- options.webComponents = true
55
- break
56
- case 'functions':
57
- options.functions = true
58
- break
59
- case 'views':
60
- options.views = true
61
- break
62
- case 'docs':
63
- options.docs = true
64
- break
65
- case 'buddy':
66
- options.buddy = true
67
- break
68
- case 'cli':
69
- options.buddy = true
70
- break
71
- case 'stacks':
72
- options.stacks = true
73
- break
74
- case 'server':
75
- options.server = true
76
- break
77
- default:
78
- break
79
- }
80
-
81
- console.log('server', server, options)
82
-
83
- // TODO: uncomment this when prompt is available
84
- if (hasNoOptions(options)) {
85
- console.log('has no')
86
- const answers = await prompts({
87
- type: 'multiselect',
88
- name: 'build',
89
- message: descriptions.select,
90
- choices: [
91
- { title: 'Components', value: 'components' },
92
- // { label: 'Vue Components', value: 'vue-components' },
93
- { title: 'Web Components', value: 'web-components' },
94
- { title: 'Functions', value: 'functions' },
95
- { title: 'Views', value: 'views' },
96
- { title: 'Documentation', value: 'docs' },
97
- ],
98
- })
99
-
100
- console.log('answers', answers)
101
- if (answers !== null)
102
- process.exit(ExitCode.InvalidArgument)
103
- }
104
- else {
105
- console.log('has op')
106
- }
107
-
108
- if (options.docs)
109
- await runAction(Action.BuildDocs)
110
- if (options.components)
111
- await runAction(Action.BuildComponentLibs)
112
- if (options.vueComponents)
113
- await runAction(Action.BuildVueComponentLib)
114
- if (options.webComponents)
115
- await runAction(Action.BuildWebComponentLib)
116
- if (options.functions)
117
- await runAction(Action.BuildFunctionLib)
118
- if (options.views)
119
- await runAction(Action.BuildViews)
120
- if (options.stacks)
121
- await runAction(Action.BuildStacks)
122
- if (options.buddy)
123
- await runAction(Action.BuildCli)
124
- if (options.server)
125
- await runAction(Action.BuildServer)
126
- process.exit(ExitCode.Success)
127
- })
128
-
129
- buddy
130
- .command('build:components', 'Automagically build component libraries for production use & npm/CDN distribution')
131
- .alias('prod:components')
132
- .option('-c, --components', descriptions.components, { default: true })
133
- .option('-p, --project [project]', descriptions.project, { default: false })
134
- .option('--verbose', descriptions.verbose, { default: false })
135
- .action(async (options: BuildOptions) => {
136
- log.debug('Running `buddy build:components` ...', options)
137
- await runAction(Action.BuildComponentLibs, options)
138
- })
139
-
140
- buddy
141
- .command('build:cli', descriptions.cli)
142
- .alias('prod:cli')
143
- .option('-b, --buddy', descriptions.buddy, { default: true })
144
- .option('-p, --project [project]', descriptions.project, { default: false })
145
- .option('--verbose', descriptions.verbose, { default: false })
146
- .action(async (options: BuildOptions) => {
147
- log.debug('Running `buddy build:cli` ...', options)
148
- await runAction(Action.BuildCli, options)
149
- })
150
-
151
- buddy
152
- .command('build:server', descriptions.server)
153
- .alias('prod:server')
154
- .alias('build:docker')
155
- .option('-p, --project [project]', descriptions.project, { default: false })
156
- .option('--verbose', descriptions.verbose, { default: false })
157
- .action(async (options: BuildOptions) => {
158
- log.debug('Running `buddy build:server` ...', options)
159
- await runAction(Action.BuildServer, options)
160
- })
161
-
162
- buddy
163
- .command('build:functions', 'Automagically build function library for npm/CDN distribution')
164
- .option('-f, --functions', descriptions.functions, { default: true })
165
- .option('-p, --project [project]', descriptions.project, { default: false })
166
- .option('--verbose', descriptions.verbose, { default: false })
167
- .action(async (options: BuildOptions) => {
168
- log.debug('Running `buddy `build:functions` ...', options)
169
- await runAction(Action.BuildFunctionLib, options)
170
- })
171
-
172
- buddy
173
- .command('build:vue-components', 'Automagically build Vue component library for npm/CDN distribution')
174
- .alias('build:vue')
175
- .alias('prod:vue-components')
176
- .alias('prod:vue')
177
- .option('-v, --vue-components', descriptions.vueComponents, {
178
- default: true,
179
- })
180
- .option('-p, --project [project]', descriptions.project, { default: false })
181
- .option('--verbose', descriptions.verbose, { default: false })
182
- .alias('build:vue')
183
- .action(async (options: BuildOptions) => {
184
- log.debug('Running `buddy build:vue-components` ...', options)
185
- await runAction(Action.BuildVueComponentLib, options)
186
- })
187
-
188
- buddy
189
- .command('build:web-components', 'Automagically build Web Component library for npm/CDN distribution')
190
- .alias('build:wc')
191
- .alias('prod:web-components')
192
- .alias('prod:wc')
193
- .option('-w, --web-components', descriptions.webComponents, {
194
- default: true,
195
- })
196
- .option('-p, --project [project]', descriptions.project, { default: false })
197
- .option('--verbose', descriptions.verbose, { default: false })
198
- .action(async (options: BuildOptions) => {
199
- log.debug('Running `buddy build:web-components` ...', options)
200
- await runAction(Action.BuildWebComponentLib, options)
201
- })
202
-
203
- buddy
204
- .command('build:docs', 'Automagically build your documentation site.')
205
- .alias('prod:docs')
206
- .alias('build:documentation')
207
- .alias('prod:documentation')
208
- .option('-d, --docs', descriptions.docs, { default: true })
209
- .option('-p, --project [project]', descriptions.project, { default: false })
210
- .option('--verbose', descriptions.verbose, { default: false })
211
- .action(async (options: BuildOptions) => {
212
- log.debug('Running `buddy build:docs` ...', options)
213
- await runAction(Action.BuildDocs, options)
214
- })
215
-
216
- buddy
217
- .command('build:core', 'Automagically build the Stacks core.')
218
- .option('-p, --project [project]', descriptions.project, { default: false })
219
- .option('--verbose', descriptions.verbose, { default: false })
220
- .action(async (options: BuildOptions) => {
221
- log.debug('Running `buddy build:core` ...', options)
222
-
223
- const startTime = await intro('buddy build:core')
224
- const result = await runAction(Action.BuildCore, options)
225
-
226
- if (result.isErr()) {
227
- log.error('Failed to build the Stacks core.', result.error)
228
- process.exit()
229
- }
230
-
231
- await outro('Core packages built successfully', {
232
- startTime,
233
- useSeconds: true,
234
- })
235
- })
236
-
237
- buddy
238
- .command('build:desktop', descriptions.desktop)
239
- .alias('prod:desktop')
240
- .option('-p, --project [project]', descriptions.project, { default: false })
241
- .option('--verbose', descriptions.verbose, { default: false })
242
- .action(async (options: BuildOptions) => {
243
- log.debug('Running `buddy build:desktop` ...', options)
244
-
245
- const perf = await intro('buddy build:desktop')
246
- const result = await runAction(Action.BuildDesktop, options)
247
-
248
- if (result.isErr()) {
249
- await outro(
250
- 'While running the build:desktop command, there was an issue',
251
- { startTime: perf, useSeconds: true },
252
- result.error,
253
- )
254
- process.exit()
255
- }
256
-
257
- console.log('')
258
- await outro('Exited', { startTime: perf, useSeconds: true })
259
- process.exit(ExitCode.Success)
260
- })
261
-
262
- buddy
263
- .command('build:stacks', 'Build the Stacks framework.')
264
- .option('-s, --stacks', descriptions.framework, { default: true })
265
- .option('-p, --project [project]', descriptions.project, { default: false })
266
- .option('--verbose', descriptions.verbose, { default: false })
267
- .action(async (options: BuildOptions) => {
268
- log.debug('Running `buddy build:stacks` ...', options)
269
-
270
- const startTime = await intro('buddy build:stacks')
271
- const result = await runAction(Action.BuildStacks, options)
272
-
273
- if (result.isErr()) {
274
- log.error('Failed to build Stacks.', result.error)
275
- process.exit()
276
- }
277
-
278
- await outro('Stacks built successfully', { startTime, useSeconds: true })
279
- })
280
-
281
- buddy.on('build:*', () => {
282
- console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
283
- process.exit(1)
284
- })
285
- }
286
-
287
- function hasNoOptions(options: BuildOptions) {
288
- return (
289
- !options.components
290
- && !options.vueComponents
291
- && !options.webComponents
292
- && !options.elements
293
- && !options.functions
294
- && !options.views
295
- && !options.docs
296
- && !options.stacks
297
- && !options.buddy
298
- )
299
- }
@@ -1,52 +0,0 @@
1
- import type { CLI, FreshOptions } from '@stacksjs/types'
2
- import process from 'node:process'
3
- import { runAction } from '@stacksjs/actions'
4
- import { intro, log, outro } from '@stacksjs/cli'
5
- import { Action } from '@stacksjs/enums'
6
-
7
- export function changelog(buddy: CLI): void {
8
- const descriptions = {
9
- changelog: 'Create a CHANGELOG.md file',
10
- quiet: 'Minimal output',
11
- dryRun: 'Do not write the file, just output the changes',
12
- project: 'Target a specific project',
13
- verbose: 'Enable verbose output',
14
- }
15
-
16
- // console.log('changelog', descriptions.changelog)
17
-
18
- buddy
19
- .command('changelog', descriptions.changelog)
20
- .option('-q, --quiet', descriptions.quiet, { default: false })
21
- .option('-d, --dry-run', descriptions.dryRun, { default: false })
22
- .option('-p, --project [project]', descriptions.project, { default: false })
23
- .option('--verbose', descriptions.verbose, { default: false })
24
- .action(async (options: FreshOptions) => {
25
- log.debug('Running `buddy changelog` ...', options)
26
-
27
- const perf = await intro('buddy changelog')
28
- const result = await runAction(Action.Changelog, options)
29
-
30
- if (result.isErr()) {
31
- await outro(
32
- 'While running the changelog command, there was an issue',
33
- { ...options, startTime: perf, useSeconds: true },
34
- result.error,
35
- )
36
- process.exit()
37
- }
38
-
39
- await outro('Generated CHANGELOG.md', {
40
- ...options,
41
- startTime: perf,
42
- useSeconds: true,
43
- type: 'success',
44
- })
45
- })
46
-
47
- buddy.on('changelog:*', () => {
48
- console.log('Invalid command: %s', buddy.args.join(' '))
49
- console.log('See --help for a list of available commands.')
50
- process.exit(1)
51
- })
52
- }
@@ -1,46 +0,0 @@
1
- import type { CleanOptions, CLI } from '@stacksjs/types'
2
- import process from 'node:process'
3
- import { runAction } from '@stacksjs/actions'
4
- import { intro, log, outro } from '@stacksjs/cli'
5
- import { Action } from '@stacksjs/enums'
6
- import { ExitCode } from '@stacksjs/types'
7
-
8
- export function clean(buddy: CLI): void {
9
- const descriptions = {
10
- clean: 'Removes all node_modules & lock files',
11
- project: 'Target a specific project',
12
- verbose: 'Enable verbose output',
13
- }
14
-
15
- buddy
16
- .command('clean', descriptions.clean)
17
- .option('-p, --project [project]', descriptions.project, { default: false })
18
- .option('--verbose', descriptions.verbose, { default: false })
19
- .action(async (options: CleanOptions) => {
20
- log.debug('Running `buddy clean` ...', options)
21
-
22
- const perf = await intro('buddy clean')
23
- const result = await runAction(Action.Clean, options)
24
-
25
- if (result.isErr()) {
26
- await outro(
27
- 'While running the clean command, there was an issue',
28
- { startTime: perf, useSeconds: true },
29
- result.error,
30
- )
31
- process.exit(ExitCode.FatalError)
32
- }
33
-
34
- await outro('Cleaned up', {
35
- startTime: perf,
36
- useSeconds: true,
37
- message: 'Cleaned up',
38
- })
39
- process.exit(ExitCode.Success)
40
- })
41
-
42
- buddy.on('clean:*', () => {
43
- console.error('Invalid command: %s\nSee --help for a list of available commands.', buddy.args.join(' '))
44
- process.exit(1)
45
- })
46
- }