stacks 0.44.11 → 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.
Files changed (86) hide show
  1. package/README.md +1 -0
  2. package/buddy/README.md +1 -0
  3. package/buddy/package.json +4 -3
  4. package/buddy/src/commands/add.ts +12 -12
  5. package/buddy/src/commands/build.ts +48 -31
  6. package/buddy/src/commands/clean.ts +6 -6
  7. package/buddy/src/commands/commit.ts +6 -6
  8. package/buddy/src/commands/create.ts +14 -14
  9. package/buddy/src/commands/dev.ts +15 -15
  10. package/buddy/src/commands/example.ts +11 -11
  11. package/buddy/src/commands/fresh.ts +19 -8
  12. package/buddy/src/commands/generate.ts +20 -20
  13. package/buddy/src/commands/key.ts +2 -2
  14. package/buddy/src/commands/lint.ts +8 -8
  15. package/buddy/src/commands/make.ts +33 -33
  16. package/buddy/src/commands/preinstall.ts +6 -6
  17. package/buddy/src/commands/prepublish.ts +6 -6
  18. package/buddy/src/commands/release.ts +2 -2
  19. package/buddy/src/commands/setup.ts +8 -8
  20. package/buddy/src/commands/test.ts +11 -11
  21. package/buddy/src/commands/types.ts +8 -8
  22. package/buddy/src/commands/update.ts +20 -20
  23. package/buddy/src/index.ts +1 -0
  24. package/core/actions/package.json +1 -1
  25. package/core/actions/src/build-component-libs.ts +15 -0
  26. package/core/actions/src/build-stacks.ts +9 -0
  27. package/core/actions/src/fresh.ts +3 -26
  28. package/core/actions/src/helpers/utils.ts +2 -1
  29. package/core/ai/package.json +1 -1
  30. package/core/alias/package.json +1 -1
  31. package/core/arrays/package.json +1 -1
  32. package/core/auth/package.json +1 -1
  33. package/core/build/package.json +1 -1
  34. package/core/cache/package.json +1 -1
  35. package/core/cli/package.json +1 -1
  36. package/core/cli/src/actions/run.ts +2 -2
  37. package/core/cli/src/helpers.ts +1 -1
  38. package/core/cloud/package.json +1 -1
  39. package/core/collections/package.json +1 -1
  40. package/core/config/package.json +1 -1
  41. package/core/dashboard/package.json +1 -1
  42. package/core/database/package.json +1 -1
  43. package/core/datetime/package.json +1 -1
  44. package/core/desktop/package.json +1 -1
  45. package/core/docs/node_modules/.bin/vitepress +2 -2
  46. package/core/docs/package.json +2 -2
  47. package/core/domains/package.json +1 -1
  48. package/core/drivers/package.json +1 -1
  49. package/core/email/package.json +1 -1
  50. package/core/error-handling/package.json +1 -1
  51. package/core/git/package.json +1 -1
  52. package/core/health/README.md +56 -0
  53. package/core/health/node_modules/.bin/mkdist +17 -0
  54. package/core/health/node_modules/.bin/tsc +17 -0
  55. package/core/health/node_modules/.bin/tsserver +17 -0
  56. package/core/health/package.json +54 -0
  57. package/core/health/src/drivers/ohdear.ts +1 -0
  58. package/core/health/src/index.ts +1 -0
  59. package/core/health/src/notifications/index.ts +1 -0
  60. package/core/health/tests/example.test.ts +7 -0
  61. package/core/lint/package.json +1 -1
  62. package/core/logging/package.json +1 -1
  63. package/core/modules/package.json +1 -1
  64. package/core/notifications/README.md +205 -30
  65. package/core/notifications/package.json +1 -1
  66. package/core/objects/package.json +1 -1
  67. package/core/path/package.json +1 -1
  68. package/core/payments/package.json +1 -1
  69. package/core/realtime/package.json +1 -1
  70. package/core/router/package.json +1 -1
  71. package/core/search-engine/package.json +2 -2
  72. package/core/security/package.json +1 -1
  73. package/core/server/package.json +1 -1
  74. package/core/storage/package.json +1 -1
  75. package/core/strings/package.json +1 -1
  76. package/core/testing/package.json +1 -1
  77. package/core/types/node_modules/.bin/vitepress +2 -2
  78. package/core/types/package.json +2 -2
  79. package/core/types/src/cli.ts +8 -0
  80. package/core/ui/package.json +1 -1
  81. package/core/utils/package.json +4 -4
  82. package/core/x-ray/package.json +1 -1
  83. package/package.json +6 -6
  84. package/tsconfig.json +2 -2
  85. package/components/vue/dist/.gitkeep +0 -0
  86. package/components/web/dist/.gitkeep +0 -0
package/README.md CHANGED
@@ -91,6 +91,7 @@ _Enhanced productivity for developers. No more creating boilerplate._
91
91
  - ✨ **Git Workflows** _committing with ease_
92
92
  - 🚗 **Auto Imports** _your components & functions, including date, string, array, & object helpers_
93
93
  - ⏩ **Code Snippets** _say goodbye to the boilerplate_
94
+ - 🔤 **Spell Checker** _be notified once when there are typos_
94
95
  - 🛠️ **Utilities** _Collections, VueUse, and more_
95
96
  - 🧪 **Testing** _unit & e2e tests powered by Vitest & Playwright_
96
97
 
package/buddy/README.md CHANGED
@@ -91,6 +91,7 @@ _Enhanced productivity for developers. No more creating boilerplate._
91
91
  - ✨ **Git Workflows** _committing with ease_
92
92
  - 🚗 **Auto Imports** _your components & functions, including date, string, array, & object helpers_
93
93
  - ⏩ **Code Snippets** _say goodbye to the boilerplate_
94
+ - 🔤 **Spell Checker** _be notified once when there are typos_
94
95
  - 🛠️ **Utilities** _Collections, VueUse, and more_
95
96
  - 🧪 **Testing** _unit & e2e tests powered by Vitest & Playwright_
96
97
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.44.11",
4
+ "version": "0.44.12",
5
5
  "packageManager": "pnpm@7.18.2",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
@@ -84,10 +84,11 @@
84
84
  "build:docs": "npx vitepress build ../apps/docs",
85
85
  "build:pages": "npx vite-ssg build ./pages -c ./core/build/src/pages.ts",
86
86
  "build:core": "pnpm --filter '../core/**' --filter='!../core/config' build && pnpm --filter '../core/config' build",
87
- "build:cli": "npx unbuild",
87
+ "build:buddy": "npx unbuild",
88
+ "build:cli": "pnpm run build:buddy",
88
89
  "build:runtime": "pnpm run build:cli",
89
90
  "build:desktop": "wip",
90
- "build:stacks": "npx mkdist -d && pnpm build:cli && pnpm build:core",
91
+ "build:stacks": "pnpm buddy build:stacks",
91
92
  "build:all": "wip",
92
93
  "prod": "pnpm run build",
93
94
  "prod:components": "pnpm run build:components",
@@ -3,16 +3,16 @@ import { ExitCode } from '@stacksjs/types'
3
3
  import { prompts } from '@stacksjs/cli'
4
4
  import { invoke } from '@stacksjs/actions/add'
5
5
 
6
- const descriptions = {
7
- add: 'Add a stack to your project (coming soon)',
8
- table: 'Add the Table Stack to your project',
9
- calendar: 'Add the Calendar Stack to your project',
10
- all: 'Add all stacks',
11
- debug: 'Enable debug mode',
12
- }
13
-
14
- async function add(stacks: CLI) {
15
- stacks
6
+ async function add(buddy: CLI) {
7
+ const descriptions = {
8
+ add: 'Add a stack to your project (coming soon)',
9
+ table: 'Add the Table Stack to your project',
10
+ calendar: 'Add the Calendar Stack to your project',
11
+ all: 'Add all stacks',
12
+ debug: 'Enable debug mode',
13
+ }
14
+
15
+ buddy
16
16
  .command('add', descriptions.add)
17
17
  .option('-t, --table', descriptions.table, { default: false })
18
18
  .option('-c, --calendar', descriptions.calendar, { default: false })
@@ -39,7 +39,7 @@ async function add(stacks: CLI) {
39
39
  process.exit(ExitCode.Success)
40
40
  })
41
41
 
42
- stacks
42
+ buddy
43
43
  .command('add:table', descriptions.table)
44
44
  .option('-t, --table', descriptions.table, { default: true })
45
45
  .option('--debug', descriptions.debug, { default: false })
@@ -47,7 +47,7 @@ async function add(stacks: CLI) {
47
47
  await invoke(options)
48
48
  })
49
49
 
50
- stacks
50
+ buddy
51
51
  .command('add:calendar', descriptions.calendar)
52
52
  .option('-t, --calendar', descriptions.calendar, { default: true })
53
53
  .option('--debug', descriptions.debug, { default: false })
@@ -1,22 +1,22 @@
1
1
  import type { BuildOptions, CLI } from '@stacksjs/types'
2
- import { ExitCode } from '@stacksjs/types'
3
- import { prompts } from '@stacksjs/cli'
4
- import { invoke } from '@stacksjs/actions/build'
5
-
6
- const descriptions = {
7
- components: 'Build your component library',
8
- vueComponents: 'Build your Vue component library',
9
- webComponents: 'Build your framework agnostic web component library',
10
- elements: 'An alias to the -w flag',
11
- functions: 'Build your function library',
12
- pages: 'Build your SSG pages',
13
- docs: 'Build your documentation site',
14
- stacks: 'Build Stacks framework',
15
- debug: 'Enable debug mode',
16
- }
2
+ import { Action, ExitCode } from '@stacksjs/types'
3
+ import { intro, log, outro, prompts } from '@stacksjs/cli'
4
+ import { runAction } from '@stacksjs/actions'
5
+
6
+ async function build(buddy: CLI) {
7
+ const descriptions = {
8
+ components: 'Build your component library',
9
+ vueComponents: 'Build your Vue component library',
10
+ webComponents: 'Build your framework agnostic web component library',
11
+ elements: 'An alias to the -w flag',
12
+ functions: 'Build your function library',
13
+ pages: 'Build your SSG pages',
14
+ docs: 'Build your documentation site',
15
+ stacks: 'Build Stacks framework',
16
+ debug: 'Enable debug mode',
17
+ }
17
18
 
18
- async function build(stacks: CLI) {
19
- stacks
19
+ buddy
20
20
  .command('build', 'Automagically build any of your libraries/packages for production use. Select any of the following packages')
21
21
  .option('-c, --components', descriptions.components)
22
22
  .option('-v, --vue-components', descriptions.vueComponents) // these are automatically built with your -c option as well
@@ -47,60 +47,77 @@ async function build(stacks: CLI) {
47
47
  options = answers.reduce((a: any, v: any) => ({ ...a, [v]: true }), {})
48
48
  }
49
49
 
50
- await invoke(options)
50
+ await runAction(Action.BuildStacks, options)
51
51
 
52
52
  process.exit(ExitCode.Success)
53
53
  })
54
54
 
55
- stacks
55
+ buddy
56
56
  .command('build:components', 'Automagically build component libraries for production use & npm/CDN distribution')
57
57
  .option('-c, --components', descriptions.components, { default: true })
58
58
  .option('--debug', descriptions.debug, { default: false })
59
59
  .action(async (options: BuildOptions) => {
60
- await invoke(options)
60
+ await runAction(Action.BuildComponentLibs, options)
61
+ })
62
+
63
+ buddy
64
+ .command('build:cli', 'Automagically build the CLI')
65
+ .option('-c, --components', descriptions.components, { default: true })
66
+ .option('--debug', descriptions.debug, { default: false })
67
+ .action(async (options: BuildOptions) => {
68
+ await runAction(Action.BuildCli, options)
61
69
  })
62
70
 
63
- stacks
71
+ buddy
64
72
  .command('build:functions', 'Automagically build function library for npm/CDN distribution')
65
73
  .option('-f, --functions', descriptions.functions, { default: true })
66
74
  .option('--debug', descriptions.debug, { default: false })
67
75
  .action(async (options: BuildOptions) => {
68
- await invoke(options)
76
+ await runAction(Action.BuildFunctionLib, options)
69
77
  })
70
78
 
71
- stacks
79
+ buddy
72
80
  .command('build:vue-components', 'Automagically build Vue component library for npm/CDN distribution')
73
81
  .option('-v, --vue-components', descriptions.vueComponents, { default: true })
74
82
  .option('--debug', descriptions.debug, { default: false })
75
83
  .alias('build:vue')
76
84
  .action(async (options: BuildOptions) => {
77
- await invoke(options)
85
+ await runAction(Action.BuildVueComponentLib, options)
78
86
  })
79
87
 
80
- stacks
88
+ buddy
81
89
  .command('build:web-components', 'Automagically build Web Component library for npm/CDN distribution')
82
90
  .option('-w, --web-components', descriptions.webComponents, { default: true })
83
91
  .option('--debug', descriptions.debug, { default: false })
84
92
  .alias('build:elements')
85
93
  .alias('build:wc')
86
94
  .action(async (options: BuildOptions) => {
87
- await invoke(options)
95
+ await runAction(Action.BuildWebComponentLib, options)
88
96
  })
89
97
 
90
- stacks
98
+ buddy
91
99
  .command('build:docs', 'Automagically build your documentation site.')
92
100
  .option('-d, --docs', descriptions.docs, { default: true })
93
101
  .option('--debug', descriptions.debug, { default: false })
94
102
  .action(async (options: BuildOptions) => {
95
- await invoke(options)
103
+ await runAction(Action.BuildDocs, options)
96
104
  })
97
105
 
98
- stacks
99
- .command('build:stacks', 'Build the core Stacks framework.')
106
+ buddy
107
+ .command('build:stacks', 'Build the Stacks framework.')
100
108
  .option('-s, --stacks', descriptions.stacks, { default: true })
101
109
  .option('--debug', descriptions.debug, { default: false })
102
110
  .action(async (options: BuildOptions) => {
103
- await invoke(options)
111
+ console.log('here')
112
+ const perf = intro('buddy release')
113
+ const result = await runAction(Action.BuildStacks, options)
114
+
115
+ if (result.isErr()) {
116
+ log.error('Failed to build Stacks.', result.error)
117
+ process.exit()
118
+ }
119
+
120
+ outro('Stacks built successfully', { startTime: perf, useSeconds: true })
104
121
  })
105
122
  }
106
123
 
@@ -1,13 +1,13 @@
1
1
  import type { CLI, CleanOptions } from '@stacksjs/types'
2
2
  import { invoke } from '@stacksjs/actions/clean'
3
3
 
4
- const descriptions = {
5
- clean: 'Removes all node_modules & lock files',
6
- debug: 'Enable debug mode',
7
- }
4
+ async function clean(buddy: CLI) {
5
+ const descriptions = {
6
+ clean: 'Removes all node_modules & lock files',
7
+ debug: 'Enable debug mode',
8
+ }
8
9
 
9
- async function clean(stacks: CLI) {
10
- stacks
10
+ buddy
11
11
  .command('clean', descriptions.clean)
12
12
  .option('--debug', descriptions.debug, { default: false })
13
13
  .action(async (options: CleanOptions) => {
@@ -1,13 +1,13 @@
1
1
  import type { CLI, FreshOptions } from '@stacksjs/types'
2
2
  import { invoke } from '@stacksjs/actions/commit'
3
3
 
4
- const descriptions = {
5
- commit: 'Commit your stashed changes',
6
- debug: 'Enable debug mode',
7
- }
4
+ async function commit(buddy: CLI) {
5
+ const descriptions = {
6
+ commit: 'Commit your stashed changes',
7
+ debug: 'Enable debug mode',
8
+ }
8
9
 
9
- async function commit(stacks: CLI) {
10
- stacks
10
+ buddy
11
11
  .command('commit', descriptions.commit)
12
12
  .option('--debug', descriptions.debug, { default: false })
13
13
  .action(async (options: FreshOptions) => {
@@ -6,21 +6,21 @@ import { resolve } from '@stacksjs/path'
6
6
  import { ExitCode } from '@stacksjs/types'
7
7
  import { generate as generateAppKey } from '@stacksjs/actions/key'
8
8
 
9
- const descriptions = {
10
- command: 'Create a new Stacks project',
11
- ui: 'Are you building a UI?',
12
- components: 'Are you building UI components?',
13
- webComponents: 'Automagically built optimized custom elements/web components?',
14
- vue: 'Automagically built a Vue component library?',
15
- pages: 'How about pages?',
16
- functions: 'Are you developing functions/composables?',
17
- api: 'Are you building an API?',
18
- database: 'Do you need a database?',
19
- debug: 'Enable debug mode',
20
- }
9
+ async function create(buddy: CLI) {
10
+ const descriptions = {
11
+ command: 'Create a new Stacks project',
12
+ ui: 'Are you building a UI?',
13
+ components: 'Are you building UI components?',
14
+ webComponents: 'Automagically built optimized custom elements/web components?',
15
+ vue: 'Automagically built a Vue component library?',
16
+ pages: 'How about pages?',
17
+ functions: 'Are you developing functions/composables?',
18
+ api: 'Are you building an API?',
19
+ database: 'Do you need a database?',
20
+ debug: 'Enable debug mode',
21
+ }
21
22
 
22
- async function create(stacks: CLI) {
23
- stacks
23
+ buddy
24
24
  .command('new <name>', descriptions.command)
25
25
  .option('-u, --ui', descriptions.ui, { default: true }) // if no, disregard remainder of questions wrt UI
26
26
  .option('-c, --components', descriptions.components, { default: true }) // if no, -v and -w would be false
@@ -3,17 +3,17 @@ import type { CLI, DevOption, DevOptions } from '@stacksjs/types'
3
3
  import { prompts } from '@stacksjs/cli'
4
4
  import { components, desktop, docs, functions, pages, invoke as startDevelopmentServer } from '@stacksjs/actions/dev'
5
5
 
6
- const descriptions = {
7
- components: 'Start the Components development server',
8
- desktop: 'Start the Desktop development server',
9
- functions: 'Start the Functions development server',
10
- docs: 'Start the Documentation development server',
11
- pages: 'Start the Pages development server',
12
- debug: 'Enable debug mode',
13
- }
6
+ async function dev(buddy: CLI) {
7
+ const descriptions = {
8
+ components: 'Start the Components development server',
9
+ desktop: 'Start the Desktop development server',
10
+ functions: 'Start the Functions development server',
11
+ docs: 'Start the Documentation development server',
12
+ pages: 'Start the Pages development server',
13
+ debug: 'Enable debug mode',
14
+ }
14
15
 
15
- async function dev(stacks: CLI) {
16
- stacks
16
+ buddy
17
17
  .command('dev', 'Start the development server for any of the following')
18
18
  .option('-c, --components', descriptions.components)
19
19
  .option('-f, --functions', descriptions.functions)
@@ -53,35 +53,35 @@ async function dev(stacks: CLI) {
53
53
  process.exit(ExitCode.Success)
54
54
  })
55
55
 
56
- stacks
56
+ buddy
57
57
  .command('dev:components', descriptions.components)
58
58
  .option('--debug', descriptions.debug, { default: false })
59
59
  .action(async (options: DevOptions) => {
60
60
  await startDevelopmentServer(options)
61
61
  })
62
62
 
63
- stacks
63
+ buddy
64
64
  .command('dev:docs', descriptions.docs)
65
65
  .option('--debug', descriptions.debug, { default: false })
66
66
  .action(async (options: DevOptions) => {
67
67
  await docs(options)
68
68
  })
69
69
 
70
- stacks
70
+ buddy
71
71
  .command('dev:desktop', descriptions.desktop)
72
72
  .option('--debug', descriptions.debug, { default: false })
73
73
  .action(async (options: DevOptions) => {
74
74
  await desktop(options)
75
75
  })
76
76
 
77
- stacks
77
+ buddy
78
78
  .command('dev:functions', descriptions.functions)
79
79
  .option('--debug', descriptions.debug, { default: false })
80
80
  .action(async (options: DevOptions) => {
81
81
  await functions(options)
82
82
  })
83
83
 
84
- stacks
84
+ buddy
85
85
  .command('dev:pages', descriptions.pages)
86
86
  .option('--debug', descriptions.debug, { default: false })
87
87
  .action(async (options: DevOptions) => {
@@ -3,16 +3,16 @@ import type { CLI, ExamplesOption, ExamplesOptions } from '@stacksjs/types'
3
3
  import { italic, log, prompts } from '@stacksjs/cli'
4
4
  import { componentExample, invoke as runExample, webComponentExample } from '@stacksjs/actions/examples'
5
5
 
6
- const descriptions = {
7
- example: 'Which example do you want to see?',
8
- components: 'Test your libraries against your built bundle',
9
- vue: 'Test your Vue component library',
10
- webComponents: 'Test your web component library',
11
- debug: 'Enable debug mode',
12
- }
6
+ async function example(buddy: CLI) {
7
+ const descriptions = {
8
+ example: 'Which example do you want to see?',
9
+ components: 'Test your libraries against your built bundle',
10
+ vue: 'Test your Vue component library',
11
+ webComponents: 'Test your web component library',
12
+ debug: 'Enable debug mode',
13
+ }
13
14
 
14
- async function example(stacks: CLI) {
15
- stacks
15
+ buddy
16
16
  .command('example', descriptions.example)
17
17
  .option('-c, --components', descriptions.components)
18
18
  .option('-v, --vue', descriptions.vue)
@@ -44,7 +44,7 @@ async function example(stacks: CLI) {
44
44
  process.exit(ExitCode.Success)
45
45
  })
46
46
 
47
- stacks
47
+ buddy
48
48
  .command('example:vue', descriptions.vue)
49
49
  .option('-v, --vue', descriptions.debug, { default: true })
50
50
  .option('--debug', descriptions.debug, { default: false })
@@ -53,7 +53,7 @@ async function example(stacks: CLI) {
53
53
  await runExample(options)
54
54
  })
55
55
 
56
- stacks
56
+ buddy
57
57
  .command('example:web-components', 'Test your Web Component library.')
58
58
  .option('-w, --web-components', descriptions.debug, { default: true })
59
59
  .option('--debug', descriptions.debug, { default: false })
@@ -1,17 +1,28 @@
1
1
  import type { CLI, CommitOptions } from '@stacksjs/types'
2
- import { invoke } from '@stacksjs/actions/fresh'
2
+ import { runAction } from '@stacksjs/actions'
3
+ import { intro, outro } from '@stacksjs/cli'
4
+ import { Action, ExitCode } from '@stacksjs/types'
3
5
 
4
- const descriptions = {
5
- fresh: 'Reinstalls your npm dependencies',
6
- debug: 'Enable debug mode',
7
- }
6
+ async function fresh(buddy: CLI) {
7
+ const descriptions = {
8
+ fresh: 'Reinstalls your npm dependencies',
9
+ debug: 'Enable debug mode',
10
+ }
8
11
 
9
- async function fresh(stacks: CLI) {
10
- stacks
12
+ buddy
11
13
  .command('fresh', descriptions.fresh)
12
14
  .option('--debug', descriptions.debug, { default: false })
13
15
  .action(async (options: CommitOptions) => {
14
- await invoke(options)
16
+ const perf = intro('buddy fresh')
17
+ const result = await runAction(Action.Fresh, options)
18
+
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
+ }
23
+
24
+ outro('Freshly reinstalled your dependencies.', { startTime: perf, useSeconds: true })
25
+ process.exit(ExitCode.Success)
15
26
  })
16
27
  }
17
28
 
@@ -3,20 +3,20 @@ import { ExitCode } from '@stacksjs/types'
3
3
  import { prompts } from '@stacksjs/cli'
4
4
  import { componentMeta, ideHelpers, libEntries, invoke as startGenerationProcess, types, vsCodeCustomData, vueCompat, webTypes } from '@stacksjs/actions/generate'
5
5
 
6
- const descriptions = {
7
- command: 'Automagically build any of your libraries/packages for production use. Select any of the following packages',
8
- types: 'Generate your TypeScript types',
9
- entries: 'Generate your function & component library entry points',
10
- webTypes: 'Generate web-types.json for IDEs',
11
- customData: 'Generate VS Code custom data (custom-elements.json) for IDEs',
12
- ideHelpers: 'Generate IDE helpers',
13
- vueCompat: 'Generate Vue 2 & 3 compatibility',
14
- componentMeta: 'Generate component meta information',
15
- debug: 'Enable debug mode',
16
- }
6
+ async function generate(buddy: CLI) {
7
+ const descriptions = {
8
+ command: 'Automagically build any of your libraries/packages for production use. Select any of the following packages',
9
+ types: 'Generate your TypeScript types',
10
+ entries: 'Generate your function & component library entry points',
11
+ webTypes: 'Generate web-types.json for IDEs',
12
+ customData: 'Generate VS Code custom data (custom-elements.json) for IDEs',
13
+ ideHelpers: 'Generate IDE helpers',
14
+ vueCompat: 'Generate Vue 2 & 3 compatibility',
15
+ componentMeta: 'Generate component meta information',
16
+ debug: 'Enable debug mode',
17
+ }
17
18
 
18
- async function generate(stacks: CLI) {
19
- stacks
19
+ buddy
20
20
  .command('generate', descriptions.command)
21
21
  .option('-t, --types', descriptions.types)
22
22
  .option('-e, --entries', descriptions.entries)
@@ -52,7 +52,7 @@ async function generate(stacks: CLI) {
52
52
  process.exit(ExitCode.Success)
53
53
  })
54
54
 
55
- stacks
55
+ buddy
56
56
  .command('generate:types', descriptions.types)
57
57
  .option('--debug', descriptions.debug, { default: false })
58
58
  .alias('types:generate')
@@ -60,42 +60,42 @@ async function generate(stacks: CLI) {
60
60
  await types(options)
61
61
  })
62
62
 
63
- stacks
63
+ buddy
64
64
  .command('generate:entries', descriptions.entries)
65
65
  .option('--debug', descriptions.debug, { default: false })
66
66
  .action(async (options: GeneratorOptions) => {
67
67
  await libEntries(options)
68
68
  })
69
69
 
70
- stacks
70
+ buddy
71
71
  .command('generate:vue-compatibility', descriptions.vueCompat)
72
72
  .option('--debug', descriptions.debug, { default: false })
73
73
  .action(async (options: GeneratorOptions) => {
74
74
  await vueCompat(options)
75
75
  })
76
76
 
77
- stacks
77
+ buddy
78
78
  .command('generate:web-types', descriptions.webTypes)
79
79
  .option('--debug', descriptions.debug, { default: false })
80
80
  .action(async (options: GeneratorOptions) => {
81
81
  await webTypes(options)
82
82
  })
83
83
 
84
- stacks
84
+ buddy
85
85
  .command('generate:vscode-custom-data', descriptions.customData)
86
86
  .option('--debug', descriptions.debug, { default: false })
87
87
  .action(async (options: GeneratorOptions) => {
88
88
  await vsCodeCustomData(options)
89
89
  })
90
90
 
91
- stacks
91
+ buddy
92
92
  .command('generate:ide-helpers', descriptions.ideHelpers)
93
93
  .option('--debug', descriptions.debug, { default: false })
94
94
  .action(async (options: GeneratorOptions) => {
95
95
  await ideHelpers(options)
96
96
  })
97
97
 
98
- stacks
98
+ buddy
99
99
  .command('generate:component-meta', descriptions.componentMeta)
100
100
  .option('--debug', descriptions.debug, { default: false })
101
101
  .action(async (options: GeneratorOptions) => {
@@ -1,13 +1,13 @@
1
1
  import type { CLI, KeyOptions } from '@stacksjs/types'
2
2
  import { generate as generateAppKey } from '@stacksjs/actions/key'
3
3
 
4
- async function key(stacks: CLI) {
4
+ async function key(buddy: CLI) {
5
5
  const descriptions = {
6
6
  command: 'Generate & set the application key.',
7
7
  debug: 'Enable debug mode',
8
8
  }
9
9
 
10
- stacks
10
+ buddy
11
11
  .command('key:generate', descriptions.command)
12
12
  .option('--debug', descriptions.debug, { default: false })
13
13
  .action(async (options: KeyOptions) => {
@@ -1,14 +1,14 @@
1
1
  import type { CLI, LintOptions } from '@stacksjs/types'
2
2
  import { invoke, lintFix } from '@stacksjs/actions/lint'
3
3
 
4
- const descriptions = {
5
- lint: 'Automagically lints your codebase',
6
- lintFix: 'Automagically fixes lint errors',
7
- debug: 'Enable debug mode',
8
- }
4
+ async function lint(buddy: CLI) {
5
+ const descriptions = {
6
+ lint: 'Automagically lints your codebase',
7
+ lintFix: 'Automagically fixes lint errors',
8
+ debug: 'Enable debug mode',
9
+ }
9
10
 
10
- async function lint(stacks: CLI) {
11
- stacks
11
+ buddy
12
12
  .command('lint', descriptions.lint)
13
13
  .option('-f, --fix', descriptions.lintFix, { default: false })
14
14
  .option('--debug', descriptions.debug, { default: false })
@@ -16,7 +16,7 @@ async function lint(stacks: CLI) {
16
16
  await invoke(options)
17
17
  })
18
18
 
19
- stacks
19
+ buddy
20
20
  .command('lint:fix', descriptions.lintFix)
21
21
  .option('--debug', descriptions.debug, { default: false })
22
22
  .action(async (options: LintOptions) => {