stacks 0.52.0 → 0.52.2

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 (181) hide show
  1. package/auto-imports.d.ts +1595 -651
  2. package/components.d.ts +4 -2
  3. package/core/actions/build.config.ts +2 -0
  4. package/core/actions/package.json +14 -2
  5. package/core/actions/src/clean.ts +9 -12
  6. package/core/actions/src/deploy/domains.ts +1 -1
  7. package/core/actions/src/helpers/package-json.ts +1 -2
  8. package/core/actions/src/helpers/utils.ts +1 -2
  9. package/core/actions/src/release.ts +1 -1
  10. package/core/actions/src/tinker.ts +1 -0
  11. package/core/ai/build.config.ts +2 -0
  12. package/core/ai/package.json +1 -1
  13. package/core/alias/build.config.ts +2 -0
  14. package/core/alias/package.json +1 -2
  15. package/core/analytics/build.config.ts +2 -0
  16. package/core/analytics/package.json +1 -1
  17. package/core/arrays/build.config.ts +2 -0
  18. package/core/arrays/package.json +1 -1
  19. package/core/auth/build.config.ts +2 -0
  20. package/core/auth/package.json +1 -1
  21. package/core/auth/src/index.ts +1 -3
  22. package/core/buddy/README.md +1 -1
  23. package/core/buddy/package.json +1 -1
  24. package/core/buddy/src/commands/build.ts +8 -11
  25. package/core/buddy/src/commands/changelog.ts +4 -5
  26. package/core/buddy/src/commands/clean.ts +2 -3
  27. package/core/buddy/src/commands/deploy.ts +4 -5
  28. package/core/buddy/src/commands/dev.ts +2 -1
  29. package/core/buddy/src/commands/fresh.ts +2 -2
  30. package/core/buddy/src/commands/inspire.ts +4 -5
  31. package/core/buddy/src/commands/key.ts +4 -5
  32. package/core/buddy/src/commands/lint.ts +8 -10
  33. package/core/buddy/src/commands/make.ts +4 -5
  34. package/core/buddy/src/commands/migrate.ts +4 -5
  35. package/core/buddy/src/commands/onboarding.ts +4 -5
  36. package/core/buddy/src/commands/release.ts +4 -12
  37. package/core/buddy/src/commands/seed.ts +14 -14
  38. package/core/buddy/src/commands/setting.ts +4 -5
  39. package/core/buddy/src/commands/test.ts +29 -34
  40. package/core/buddy/src/commands/upgrade.ts +13 -16
  41. package/core/buddy/src/commands/version.ts +25 -16
  42. package/core/build/build.config.ts +2 -0
  43. package/core/build/node_modules/.bin/vite +4 -4
  44. package/core/build/node_modules/.bin/vite-ssg +4 -4
  45. package/core/build/node_modules/.bin/vue-docgen-web-types +4 -4
  46. package/core/build/package.json +5 -5
  47. package/core/build/src/stacks.ts +8 -14
  48. package/core/build/src/vue-components.ts +6 -4
  49. package/core/cache/build.config.ts +2 -0
  50. package/core/cache/package.json +2 -2
  51. package/core/chat/build.config.ts +2 -0
  52. package/core/chat/package.json +6 -6
  53. package/core/cli/package.json +1 -1
  54. package/core/cli/src/actions/install.ts +20 -2
  55. package/core/cli/src/helpers.ts +6 -1
  56. package/core/cli/src/run.ts +5 -8
  57. package/core/cloud/build.config.ts +2 -0
  58. package/core/cloud/package.json +1 -1
  59. package/core/collections/build.config.ts +2 -0
  60. package/core/collections/package.json +1 -1
  61. package/core/config/package.json +1 -1
  62. package/core/config/src/defaults.ts +0 -2
  63. package/core/config/src/stacks.ts +9 -2
  64. package/core/database/package.json +1 -1
  65. package/core/database/src/migrations/index.ts +2 -1
  66. package/core/datetime/package.json +1 -1
  67. package/core/desktop/build.config.ts +2 -0
  68. package/core/desktop/package.json +2 -2
  69. package/core/development/build.config.ts +2 -0
  70. package/core/development/package.json +6 -6
  71. package/core/docs/build.config.ts +1 -0
  72. package/core/docs/node_modules/.bin/vitepress +4 -4
  73. package/core/docs/package.json +2 -2
  74. package/core/domains/build.config.ts +2 -0
  75. package/core/domains/package.json +1 -1
  76. package/core/email/package.json +12 -12
  77. package/core/email/src/drivers/mailjet.ts +1 -0
  78. package/core/email/src/tailwind.config.ts +1 -1
  79. package/core/error-handling/package.json +2 -2
  80. package/core/events/package.json +1 -1
  81. package/core/faker/build.config.ts +2 -0
  82. package/core/faker/package.json +1 -1
  83. package/core/git/build.config.ts +2 -0
  84. package/core/git/package.json +1 -1
  85. package/core/health/build.config.ts +2 -0
  86. package/core/health/package.json +1 -1
  87. package/core/lint/build.config.ts +2 -0
  88. package/core/lint/node_modules/.bin/eslint +4 -4
  89. package/core/lint/package.json +3 -3
  90. package/core/lint/src/index.ts +1 -1
  91. package/core/logging/package.json +5 -5
  92. package/core/modules/build.config.ts +2 -0
  93. package/core/modules/package.json +1 -1
  94. package/core/notifications/package.json +22 -22
  95. package/core/notifications/src/index.ts +5 -8
  96. package/core/objects/build.config.ts +2 -0
  97. package/core/objects/package.json +1 -1
  98. package/core/orm/package.json +1 -1
  99. package/core/pages/build.config.ts +2 -0
  100. package/core/pages/package.json +1 -1
  101. package/core/path/build.config.ts +1 -0
  102. package/core/path/package.json +1 -1
  103. package/core/payments/build.config.ts +2 -0
  104. package/core/payments/package.json +2 -2
  105. package/core/push/build.config.ts +2 -0
  106. package/core/push/package.json +3 -3
  107. package/core/query-builder/build.config.ts +2 -0
  108. package/core/query-builder/package.json +1 -1
  109. package/core/queue/build.config.ts +2 -0
  110. package/core/queue/package.json +1 -1
  111. package/core/realtime/build.config.ts +2 -0
  112. package/core/realtime/package.json +1 -1
  113. package/core/router/build.config.ts +2 -0
  114. package/core/router/package.json +2 -2
  115. package/core/router/src/index.ts +114 -11
  116. package/core/scheduler/build.config.ts +2 -0
  117. package/core/scheduler/package.json +1 -1
  118. package/core/search-engine/build.config.ts +1 -0
  119. package/core/search-engine/package.json +1 -1
  120. package/core/search-engine/src/index.ts +1 -22
  121. package/core/security/build.config.ts +2 -0
  122. package/core/security/package.json +1 -1
  123. package/core/server/build.config.ts +2 -0
  124. package/core/server/node_modules/.bin/nitro +4 -4
  125. package/core/server/node_modules/.bin/nitropack +4 -4
  126. package/core/server/node_modules/.bin/vite +4 -4
  127. package/core/server/package.json +3 -3
  128. package/core/signals/build.config.ts +2 -0
  129. package/core/signals/package.json +1 -1
  130. package/core/slug/build.config.ts +2 -0
  131. package/core/slug/package.json +1 -1
  132. package/core/sms/build.config.ts +2 -0
  133. package/core/sms/package.json +11 -11
  134. package/core/storage/build.config.ts +2 -0
  135. package/core/storage/package.json +1 -1
  136. package/core/storage/src/index.ts +11 -1
  137. package/core/strings/package.json +1 -1
  138. package/core/strings/src/index.ts +0 -1
  139. package/core/testing/build.config.ts +2 -0
  140. package/core/testing/node_modules/.bin/vitest +4 -4
  141. package/core/testing/package.json +4 -4
  142. package/core/testing/src/index.ts +1 -0
  143. package/core/tinker/package.json +1 -1
  144. package/core/types/build.config.ts +2 -0
  145. package/core/types/node_modules/.bin/vite +4 -4
  146. package/core/types/node_modules/.bin/vite-ssg +4 -4
  147. package/core/types/node_modules/.bin/vitepress +4 -4
  148. package/core/types/package.json +7 -7
  149. package/core/types/src/cli.ts +10 -9
  150. package/core/types/src/fs.ts +8 -0
  151. package/core/types/src/router.ts +22 -0
  152. package/core/types/src/stacks.ts +3 -3
  153. package/core/ui/build.config.ts +2 -0
  154. package/core/ui/package.json +3 -3
  155. package/core/ui/src/index.ts +1 -1
  156. package/core/utils/build.config.ts +2 -0
  157. package/core/utils/node_modules/.bin/rimraf +4 -4
  158. package/core/utils/package.json +3 -3
  159. package/core/utils/src/base.ts +6 -5
  160. package/core/utils/src/config.ts +2 -3
  161. package/core/utils/src/currency.ts +26 -0
  162. package/core/utils/src/delete.ts +3 -0
  163. package/core/utils/src/helpers.ts +2 -2
  164. package/core/utils/src/index.ts +7 -9
  165. package/core/utils/src/math.ts +30 -0
  166. package/core/utils/src/throttle.ts +3 -6
  167. package/core/utils/src/vendors.ts +221 -0
  168. package/core/utils/src/versions.ts +1 -0
  169. package/core/validation/build.config.ts +2 -0
  170. package/core/validation/package.json +1 -1
  171. package/core/validation/src/index.ts +2 -29
  172. package/core/{strings/src/validation.ts → validation/src/is.ts} +83 -8
  173. package/core/validation/src/validate.ts +29 -0
  174. package/docs/node_modules/.bin/rimraf +4 -4
  175. package/docs/node_modules/.bin/vitepress +4 -4
  176. package/docs/package.json +2 -2
  177. package/package.json +93 -46
  178. package/vitest.config.ts +25 -17
  179. package/core/utils/src/is.ts +0 -83
  180. package/tests/feature/example.spec.ts +0 -20
  181. package/tests/unit/example.test.ts +0 -7
@@ -23,12 +23,11 @@ async function test(buddy: CLI) {
23
23
  .action(async (options: TestOptions) => {
24
24
  const perf = await intro('buddy test')
25
25
  const result = await runAction(Action.Test, { ...options, cwd: projectPath() })
26
- console.log('result', result)
27
26
 
28
- // if (result.isErr()) {
29
- // outro('While running `buddy test`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
30
- // process.exit()
31
- // }
27
+ if (result.isErr()) {
28
+ outro('While running `buddy test`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
29
+ process.exit()
30
+ }
32
31
 
33
32
  outro('Finished running tests', { startTime: perf, useSeconds: true })
34
33
  })
@@ -39,12 +38,11 @@ async function test(buddy: CLI) {
39
38
  .action(async (options: TestOptions) => {
40
39
  const perf = await intro('buddy test:unit')
41
40
  const result = await runAction(Action.TestUnit, { ...options, verbose: true, cwd: projectPath() })
42
- console.log('result', result)
43
41
 
44
- // if (result.isErr()) {
45
- // outro('While running `buddy test:unit`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
46
- // process.exit()
47
- // }
42
+ if (result.isErr()) {
43
+ outro('While running `buddy test:unit`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
44
+ process.exit()
45
+ }
48
46
 
49
47
  outro('Finished running unit tests', { startTime: perf, useSeconds: true })
50
48
  })
@@ -55,17 +53,17 @@ async function test(buddy: CLI) {
55
53
  .option('--verbose', descriptions.verbose, { default: false })
56
54
  .action(async (options: TestOptions) => {
57
55
  const perf = await intro('buddy test:feature')
58
- // let result
56
+ let result
59
57
 
60
- // if (options.showReport)
61
- // result = await runAction(Action.ShowFeatureTestReport, { ...options, verbose: true, cwd: projectPath() })
62
- // else
63
- // result = await runAction(Action.TestFeature, { ...options, verbose: true, cwd: projectPath() })
58
+ if (options.showReport)
59
+ result = await runAction(Action.ShowFeatureTestReport, { ...options, verbose: true, cwd: projectPath() })
60
+ else
61
+ result = await runAction(Action.TestFeature, { ...options, verbose: true, cwd: projectPath() })
64
62
 
65
- // if (result.isErr()) {
66
- // outro('While running `buddy test:feature`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
67
- // process.exit()
68
- // }
63
+ if (result.isErr()) {
64
+ outro('While running `buddy test:feature`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
65
+ process.exit()
66
+ }
69
67
 
70
68
  outro('Finished running feature tests', { startTime: perf, useSeconds: true })
71
69
  })
@@ -76,12 +74,11 @@ async function test(buddy: CLI) {
76
74
  .action(async (options: TestOptions) => {
77
75
  const perf = await intro('buddy test:ui')
78
76
  const result = await runAction(Action.TestUi, { ...options, verbose: true, cwd: projectPath() })
79
- console.log('result', result)
80
77
 
81
- // if (result.isErr()) {
82
- // outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
83
- // process.exit()
84
- // }
78
+ if (result.isErr()) {
79
+ outro('While running `buddy test:ui`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
80
+ process.exit()
81
+ }
85
82
 
86
83
  outro('Finished running tests in the browser', { startTime: perf, useSeconds: true })
87
84
  })
@@ -93,12 +90,11 @@ async function test(buddy: CLI) {
93
90
  .action(async (options: TestOptions) => {
94
91
  const perf = await intro('buddy test:types')
95
92
  const result = await runAction(Action.Typecheck, { ...options, verbose: true, cwd: projectPath() })
96
- console.log('result', result)
97
93
 
98
- // if (result.isErr()) {
99
- // outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
100
- // process.exit()
101
- // }
94
+ if (result.isErr()) {
95
+ outro('While running `buddy test:types`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
96
+ process.exit()
97
+ }
102
98
 
103
99
  outro('Finished running typecheck', { startTime: perf, useSeconds: true })
104
100
  })
@@ -108,12 +104,11 @@ async function test(buddy: CLI) {
108
104
  .action(async (options: TestOptions) => {
109
105
  const perf = await intro('buddy test:coverage')
110
106
  const result = await runAction(Action.TestCoverage, { ...options, cwd: projectPath(), verbose: true })
111
- console.log('result', result)
112
107
 
113
- // if (result.isErr()) {
114
- // outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
115
- // process.exit()
116
- // }
108
+ if (result.isErr()) {
109
+ outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
110
+ process.exit()
111
+ }
117
112
 
118
113
  outro('Generated the test coverage report', { startTime: perf, useSeconds: true })
119
114
  process.exit()
@@ -56,12 +56,11 @@ async function upgrade(buddy: CLI) {
56
56
  }
57
57
 
58
58
  const result = await runAction(Action.Upgrade, { ...options, shell: true })
59
- console.log('result', result)
60
59
 
61
- // if (result.isErr()) {
62
- // outro('While running the buddy:upgrade command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
63
- // process.exit()
64
- // }
60
+ if (result.isErr()) {
61
+ outro('While running the buddy:upgrade command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
62
+ process.exit()
63
+ }
65
64
 
66
65
  outro('Upgrade complete.', { startTime: perf, useSeconds: true })
67
66
  process.exit()
@@ -100,12 +99,11 @@ async function upgrade(buddy: CLI) {
100
99
 
101
100
  const perf = await intro('buddy upgrade:package-manager')
102
101
  const result = await runAction(Action.UpgradePackageManager, options)
103
- console.log('result', result, perf)
104
102
 
105
- // if (response.isErr()) {
106
- // outro('While running the buddy upgrade:package-manager command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, response.error)
107
- // process.exit()
108
- // }
103
+ if (result.isErr()) {
104
+ outro('While running the buddy upgrade:package-manager command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error)
105
+ process.exit()
106
+ }
109
107
 
110
108
  process.exit(ExitCode.Success)
111
109
  })
@@ -116,12 +114,11 @@ async function upgrade(buddy: CLI) {
116
114
  .action(async (options: UpgradeOptions) => {
117
115
  const perf = await intro('buddy upgrade:node')
118
116
  const result = await runAction(Action.UpgradeNode, options)
119
- console.log('result', result, perf)
120
117
 
121
- // if (response.isErr()) {
122
- // outro('While running the buddy upgrade:node command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, response.error)
123
- // process.exit()
124
- // }
118
+ if (result.isErr()) {
119
+ outro('While running the buddy upgrade:node command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error as Error) // FIXME: should not have to cast
120
+ process.exit()
121
+ }
125
122
 
126
123
  process.exit(ExitCode.Success)
127
124
  })
@@ -130,7 +127,7 @@ async function upgrade(buddy: CLI) {
130
127
  .command('upgrade:all', descriptions.all)
131
128
  .option('--verbose', descriptions.verbose, { default: false })
132
129
  .action(async (options: UpgradeOptions) => {
133
- // await runAction(Action.Upgrade, { ...options, all: true })
130
+ await runAction(Action.Upgrade, options)
134
131
  })
135
132
  }
136
133
 
@@ -1,12 +1,20 @@
1
- import type { CLI, FreshOptions } from '@stacksjs/types'
2
-
3
- // import { bold, dim, green, intro } from '@stacksjs/cli'
4
- // import { filesystem } from '@stacksjs/storage'
5
- // import { log } from '@stacksjs/logging'
6
- // import { frameworkPath } from '@stacksjs/path'
1
+ import type { CLI } from '@stacksjs/types'
2
+ import { bold, dim, green, intro } from '@stacksjs/cli'
3
+ import { filesystem } from '@stacksjs/storage'
4
+ import { log } from '@stacksjs/logging'
5
+ import { frameworkPath } from '@stacksjs/path'
7
6
 
8
7
  async function version(buddy: CLI) {
9
- // const { fs } = filesystem
8
+ // maybe use type-fest?
9
+ interface PackageJson {
10
+ engines: {
11
+ node: string
12
+ pnpm: string
13
+ }
14
+ version: string
15
+ }
16
+
17
+ const { fs } = filesystem
10
18
 
11
19
  const descriptions = {
12
20
  version: 'Retrieving Stacks build version',
@@ -14,17 +22,18 @@ async function version(buddy: CLI) {
14
22
 
15
23
  buddy
16
24
  .command('version', descriptions.version)
17
- .action(async (options: FreshOptions) => {
18
- // const perf = await intro('buddy version')
25
+ .action(async () => {
26
+ await intro('buddy version')
19
27
 
20
- // const depVersions = JSON.parse(fs.readFileSync('./package.json', 'utf8'))
21
- // const nodeVersion = depVersions.engines.node.replace('>=v', '')
22
- // const pnpmVersion = depVersions.engines.pnpm.replace('>=', '')
23
- // const stacksVersion = JSON.parse(fs.readFileSync(frameworkPath('/package.json'), 'utf8'))
28
+ const depVersions = JSON.parse(fs.readFileSync('./package.json', 'utf8')) as PackageJson
29
+ const nodeVersion = depVersions.engines.node.replace('>=v', '')
30
+ const pnpmVersion = depVersions.engines.pnpm.replace('>=', '')
31
+ const stacksVersion = JSON.parse(fs.readFileSync(frameworkPath('/package.json'), 'utf8')) as PackageJson
24
32
 
25
- // log.info(green(bold('Stacks: ')) + dim(` ${stacksVersion.version}`))
26
- // log.info(green(bold('node: ')) + dim(` ${nodeVersion}`))
27
- // log.info(green(bold('pnpm: ')) + dim(` ${pnpmVersion}`))
33
+ log.info(green(bold('Stacks: ')) + dim(` ${stacksVersion.version}`))
34
+ log.info(green(bold('node: ')) + dim(` ${nodeVersion}`))
35
+ log.info(green(bold('pnpm: ')) + dim(` ${pnpmVersion}`))
36
+ // redis (or other cache/s), mysql (or other database/s),
28
37
  })
29
38
  }
30
39
 
@@ -6,8 +6,10 @@ export default defineBuildConfig({
6
6
  builder: 'mkdist',
7
7
  input: './src/',
8
8
  outDir: './dist/',
9
+ format: 'esm',
9
10
  },
10
11
  ],
11
12
 
13
+ clean: true,
12
14
  declaration: true,
13
15
  })
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/bin/vite.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.7_@types+node@18.16.10/node_modules/vite/bin/vite.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
17
17
  fi
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.7_vue-router@4.2.0_vue@3.3.2/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite-ssg@0.22.2_@vueuse+head@1.1.26_vite@4.3.8_vue-router@4.2.1_vue@3.3.4/node_modules/vite-ssg/bin/vite-ssg.js" "$@"
17
17
  fi
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/lib/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/lib/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/lib/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/lib/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.2/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vue-docgen-web-types@0.1.8_vue@3.3.4/node_modules/vue-docgen-web-types/lib/cli.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/build",
3
3
  "type": "module",
4
- "version": "0.52.0",
4
+ "version": "0.52.2",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks framework build tools and configurations.",
7
7
  "author": "Chris Breuer",
@@ -60,12 +60,12 @@
60
60
  "unbuild": "^1.2.1",
61
61
  "unplugin-auto-import": "^0.16.0",
62
62
  "unplugin-vue-components": "^0.24.1",
63
- "vite": "^4.3.7",
63
+ "vite": "^4.3.8",
64
64
  "vite-plugin-inspect": "^0.7.26",
65
- "vite-plugin-pages": "^0.29.0",
66
- "vite-plugin-pwa": "^0.14.7",
65
+ "vite-plugin-pages": "^0.30.1",
66
+ "vite-plugin-pwa": "^0.15.0",
67
67
  "vite-plugin-vue-layouts": "^0.8.0",
68
- "vite-plugin-vue-markdown": "^0.23.4",
68
+ "vite-plugin-vue-markdown": "^0.23.5",
69
69
  "vite-ssg": "^0.22.2",
70
70
  "vite-ssg-sitemap": "^0.5.1",
71
71
  "vue-docgen-web-types": "^0.1.8"
@@ -11,8 +11,8 @@ import LinkAttributes from 'markdown-it-link-attributes'
11
11
  import Shiki from 'markdown-it-shiki'
12
12
  import { VitePWA } from 'vite-plugin-pwa'
13
13
  import { defu } from 'defu'
14
- import type { AutoImportsOptions, ComponentOptions, InspectOptions, LayoutOptions, MarkdownOptions, PagesOptions } from '@stacksjs/types'
15
- import p, { resolve } from '@stacksjs/path'
14
+ import type { AutoImportsOptions, ComponentOptions, InspectOptions, LayoutOptions, MarkdownOptions, PagesOption } from '@stacksjs/types'
15
+ import { path as p, resolve } from '@stacksjs/path'
16
16
 
17
17
  // it is important to note that path references within this file
18
18
  // are relative to the ./build folder
@@ -43,8 +43,8 @@ function components(options?: ComponentOptions): PluginOption {
43
43
  }
44
44
 
45
45
  // https://github.com/hannoeru/vite-plugin-pages
46
- function pages(options?: PagesOptions) {
47
- const defaultOptions: PagesOptions = {
46
+ function pages(options?: PagesOption) {
47
+ const defaultOptions: PagesOption = {
48
48
  extensions: ['vue', 'md'],
49
49
  dirs: [
50
50
  p.pagesPath(),
@@ -83,27 +83,23 @@ function markdown(options?: MarkdownOptions) {
83
83
  function autoImports(options?: AutoImportsOptions) {
84
84
  const defaultOptions: AutoImportsOptions = {
85
85
  imports: [
86
- 'vue', 'vue-router', 'vue/macros', '@vueuse/core', '@vueuse/head', '@vueuse/math', 'vitest',
87
- { '@vueuse/shared': ['isClient', 'now', 'timestamp', 'clamp', 'noop', 'rand', 'isIOS', 'hasOwn'] },
86
+ 'vue', 'vue-router', 'vue/macros', 'vitest',
87
+ { '@stacksjs/ui': ['CssEngine', 'UiEngine', 'Store', 'presetForms', 'transformerCompileClass'] },
88
88
  ],
89
89
  dirs: [
90
- p.functionsPath(),
91
- p.componentsPath(),
90
+ p.projectPath('functions'),
91
+ p.projectPath('components'),
92
92
  p.projectPath('config'),
93
93
 
94
94
  // auto imported utilities start here
95
95
  p.aiPath('src'),
96
96
  p.arraysPath('src'),
97
97
  p.authPath('src'),
98
- p.authPath('src'),
99
98
  p.cachePath('src'),
100
99
  p.chatPath('src'),
101
- p.collectionsPath('src'),
102
100
  p.databasePath('src'),
103
101
  p.desktopPath('src'),
104
- p.emailPath('src'),
105
102
  p.errorHandlingPath('src'),
106
- p.eventsPath('src'),
107
103
  p.healthPath('src'),
108
104
  p.lintPath('src'),
109
105
  p.loggingPath('src'),
@@ -121,9 +117,7 @@ function autoImports(options?: AutoImportsOptions) {
121
117
  p.storagePath('src'),
122
118
  p.stringsPath('src'),
123
119
  p.tablesPath('src'),
124
- p.stringsPath('src'),
125
120
  p.testingPath('src'),
126
- p.uiPath('src'),
127
121
  p.utilsPath('src'),
128
122
  p.validationPath('src'),
129
123
  ],
@@ -3,7 +3,6 @@ import type { ViteConfig } from '@stacksjs/types'
3
3
  import { buildEntriesPath, frameworkPath, projectPath } from '@stacksjs/path'
4
4
  import type { BuildOptions as ViteBuildOptions } from 'vite'
5
5
  import { library } from '@stacksjs/config'
6
- import { server } from '@stacksjs/server'
7
6
  import { alias } from '@stacksjs/alias'
8
7
  import { autoImports, components, cssEngine, inspect, uiEngine } from './stacks'
9
8
 
@@ -12,7 +11,10 @@ export const vueComponentsConfig: ViteConfig = {
12
11
  envDir: projectPath(),
13
12
  envPrefix: 'APP_',
14
13
 
15
- server,
14
+ server: {
15
+ port: 3333,
16
+ open: true,
17
+ },
16
18
 
17
19
  resolve: {
18
20
  dedupe: ['vue'],
@@ -20,7 +22,7 @@ export const vueComponentsConfig: ViteConfig = {
20
22
  },
21
23
 
22
24
  optimizeDeps: {
23
- exclude: ['vue'],
25
+ exclude: ['vue', 'fsevents', '@novu/mandrill', '@maizzle/framework', 'browser-sync-ui'],
24
26
  },
25
27
 
26
28
  plugins: [
@@ -41,7 +43,7 @@ export function vueComponentsBuildOptions(): ViteBuildOptions {
41
43
  emptyOutDir: true,
42
44
  lib: {
43
45
  entry: buildEntriesPath('vue-components.ts'),
44
- name: library.vueComponents.name,
46
+ name: library.vueComponents?.name,
45
47
  formats: ['cjs', 'es'],
46
48
  fileName: (format: string) => {
47
49
  if (format === 'es')
@@ -6,8 +6,10 @@ export default defineBuildConfig({
6
6
  builder: 'mkdist',
7
7
  input: './src/',
8
8
  outDir: './dist/',
9
+ format: 'esm',
9
10
  },
10
11
  ],
11
12
 
13
+ clean: true,
12
14
  declaration: true,
13
15
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cache",
3
3
  "type": "module",
4
- "version": "0.52.0",
4
+ "version": "0.52.2",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks way of caching.",
7
7
  "author": "Chris Breuer",
@@ -64,7 +64,7 @@
64
64
  "typecheck": "tsc --noEmit"
65
65
  },
66
66
  "peerDependencies": {
67
- "@aws-sdk/client-dynamodb": "^3.332.0",
67
+ "@aws-sdk/client-dynamodb": "^3.335.0",
68
68
  "@stacksjs/config": "workspace:*",
69
69
  "@types/memjs": "^1.3.0",
70
70
  "memcached": "^2.2.2",
@@ -6,8 +6,10 @@ export default defineBuildConfig({
6
6
  builder: 'mkdist',
7
7
  input: './src/',
8
8
  outDir: './dist/',
9
+ format: 'esm',
9
10
  },
10
11
  ],
11
12
 
13
+ clean: true,
12
14
  declaration: true,
13
15
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.52.0",
4
+ "version": "0.52.2",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks Chat Integration. Easy sending of messages for chat services",
7
7
  "author": "Chris Breuer",
@@ -44,11 +44,11 @@
44
44
  "typecheck": "tsc --noEmit"
45
45
  },
46
46
  "peerDependencies": {
47
- "@novu/discord": "^0.14.0",
48
- "@novu/ms-teams": "^0.14.0",
49
- "@novu/node": "^0.14.0",
50
- "@novu/slack": "^0.14.0",
51
- "@novu/stateless": "^0.14.0",
47
+ "@novu/discord": "^0.15.0",
48
+ "@novu/ms-teams": "^0.15.0",
49
+ "@novu/node": "^0.15.0",
50
+ "@novu/slack": "^0.15.0",
51
+ "@novu/stateless": "^0.15.0",
52
52
  "@stacksjs/cli": "workspace:*",
53
53
  "@stacksjs/config": "workspace:*",
54
54
  "@stacksjs/error-handling": "workspace:*",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
- "version": "0.52.0",
4
+ "version": "0.52.2",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The simple way to create beautiful CLIs.",
7
7
  "author": "Chris Breuer",
@@ -1,13 +1,27 @@
1
1
  import { installPackage as installPkg } from '@antfu/install-pkg'
2
2
  import type { CommandReturnValue } from '@stacksjs/types'
3
3
 
4
+ interface InstallPackageOptions {
5
+ cwd?: string
6
+ dev?: boolean
7
+ silent?: boolean
8
+ packageManager?: string
9
+ packageManagerVersion?: string
10
+ preferOffline?: boolean
11
+ additionalArgs?: string[]
12
+ }
13
+
4
14
  /**
5
15
  * Install an npm package.
6
16
  *
7
17
  * @param pkg - The package name to install.
18
+ * @param pkg - The options to pass to the install.The options to pass to the install.
8
19
  * @returns The result of the install.
9
20
  */
10
- export async function installPackage(pkg: string): Promise<CommandReturnValue> {
21
+ export async function installPackage(pkg: string, options?: InstallPackageOptions): Promise<CommandReturnValue> {
22
+ if (options)
23
+ return await installPkg(pkg, options)
24
+
11
25
  return await installPkg(pkg, { silent: true })
12
26
  }
13
27
 
@@ -15,8 +29,12 @@ export async function installPackage(pkg: string): Promise<CommandReturnValue> {
15
29
  * Install a Stack into your project.
16
30
  *
17
31
  * @param pkg - The Stack name to install.
32
+ * @param options - The options to pass to the install.
18
33
  * @returns The result of the install.
19
34
  */
20
- export async function installStack(name: string): Promise<CommandReturnValue> {
35
+ export async function installStack(name: string, options?: InstallPackageOptions): Promise<CommandReturnValue> {
36
+ if (options)
37
+ return await installPkg(`@stacksjs/${name}`, options)
38
+
21
39
  return await installPkg(`@stacksjs/${name}`, { silent: true })
22
40
  }
@@ -28,7 +28,12 @@ export function outro(text: string, options: OutroOptions, error?: Error | strin
28
28
  if (error)
29
29
  log.error(error)
30
30
  }
31
- else { log.success(text) }
31
+ else {
32
+ if (options?.type === 'info')
33
+ log.info(text)
34
+
35
+ log.success(text)
36
+ }
32
37
 
33
38
  if (options.startTime) {
34
39
  let time = performance.now() - options.startTime
@@ -2,7 +2,7 @@ import { execSync as childExec } from 'node:child_process'
2
2
  import type { CliOptions, CommandResult, CommandReturnValue, ResultAsync, SpinnerOptions as Spinner } from '@stacksjs/types'
3
3
  import { ExitCode } from '@stacksjs/types'
4
4
  import { projectPath } from '@stacksjs/path'
5
- import { ResultAsync as AsyncResult, err } from '@stacksjs/error-handling'
5
+ import { ResultAsync as AsyncResult } from '@stacksjs/error-handling'
6
6
  import { determineDebugLevel } from '@stacksjs/utils'
7
7
  import { log } from './console'
8
8
  import { spawn } from './command'
@@ -46,7 +46,6 @@ export function execSync(command: string) {
46
46
  * @returns The result of the command.
47
47
  */
48
48
  export async function runCommand(command: string, options?: CliOptions): Promise<ResultAsync<CommandReturnValue, Error>> {
49
- console.log('runCommand', command, options)
50
49
  return await exec(command, options)
51
50
  }
52
51
 
@@ -69,17 +68,15 @@ export async function runCommands(commands: string[], options?: CliOptions): Pro
69
68
 
70
69
  const spinner = determineSpinner(options)
71
70
 
72
- console.log('spinner', spinner)
73
-
74
71
  for (const command of commands) {
75
72
  const result = await runCommand(command, options)
76
73
 
77
- if (result.isOk()) { results.push(result) }
78
-
74
+ if (result.isOk()) {
75
+ results.push(result)
76
+ }
79
77
  else if (result.isErr()) {
80
78
  if (spinner) {
81
- // spinner.fail('Failed to run command.')
82
- err(result.error)
79
+ log.error(new Error('Failed to run command'))
83
80
  process.exit(ExitCode.FatalError)
84
81
  }
85
82
 
@@ -6,8 +6,10 @@ export default defineBuildConfig({
6
6
  builder: 'mkdist',
7
7
  input: './src/',
8
8
  outDir: './dist/',
9
+ format: 'esm',
9
10
  },
10
11
  ],
11
12
 
13
+ clean: true,
12
14
  declaration: true,
13
15
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cloud",
3
3
  "type": "module",
4
- "version": "0.52.0",
4
+ "version": "0.52.2",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks cloud/serverless integration & implementation.",
7
7
  "author": "Chris Breuer",