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
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath } from 'node:url'
2
2
  import fs from 'fs-extra'
3
3
  import { detectIndent, detectNewline } from '@stacksjs/utils'
4
- import type { JsonFile, TextFile } from '@stacksjs/types'
4
+ import type { JsonFile, TextFile, PackageJson } from '@stacksjs/types'
5
5
  import { componentsPath, dirname, functionsPath, join, projectPath } from '@stacksjs/path'
6
6
  import { contains } from '@stacksjs/arrays'
7
7
 
@@ -21,6 +21,16 @@ export async function readJsonFile(name: string, cwd?: string): Promise<JsonFile
21
21
  return { ...file, data, indent, newline }
22
22
  }
23
23
 
24
+ /**
25
+ * Reads a package.json file and returns the parsed data.
26
+ */
27
+ export async function readPackageJson(name: string, cwd?: string) {
28
+ const file = await readJsonFile(name, cwd)
29
+ const data = file.data as PackageJson
30
+
31
+ return data
32
+ }
33
+
24
34
  /**
25
35
  * Writes the given data to the specified JSON file.
26
36
  */
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/strings",
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 string utilities.",
7
7
  "author": "Chris Breuer",
@@ -1,4 +1,3 @@
1
1
  export * from './case'
2
2
  export * from './utils'
3
3
  export * from './pluralize'
4
- export * from './validation'
@@ -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/vitest@0.31.0_@vitest+ui@0.31.0/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.0_@vitest+ui@0.31.0/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/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/vitest@0.31.0_@vitest+ui@0.31.0/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.0_@vitest+ui@0.31.0/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/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/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/vitest@0.31.0_@vitest+ui@0.31.0/node_modules/vitest/vitest.mjs" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/vitest.mjs" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.0_@vitest+ui@0.31.0/node_modules/vitest/vitest.mjs" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vitest@0.31.1_@vitest+ui@0.31.1/node_modules/vitest/vitest.mjs" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/testing",
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 testing.",
7
7
  "author": "Chris Breuer",
@@ -51,9 +51,9 @@
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@playwright/test": "^1.33.0",
54
- "@vitest/coverage-istanbul": "^0.31.0",
55
- "@vitest/ui": "^0.31.0",
56
- "vitest": "^0.31.0"
54
+ "@vitest/coverage-istanbul": "^0.31.1",
55
+ "@vitest/ui": "^0.31.1",
56
+ "vitest": "^0.31.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "typescript": "^5.0.4",
@@ -1,2 +1,3 @@
1
+ // export { assert, describe, test } from 'vitest'
1
2
  export * as unit from 'vitest'
2
3
  export * as feature from '@playwright/test'
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/tinker",
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 to tinker.",
7
7
  "author": "Chris Breuer",
@@ -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/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@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/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@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/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@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/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@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/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/bin/vitepress.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.10/node_modules/vitepress/bin/vitepress.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/types",
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 types.",
7
7
  "author": "Chris Breuer",
@@ -48,7 +48,7 @@
48
48
  "@mdit-vue/plugin-component": "^0.12.0",
49
49
  "@mdit-vue/plugin-frontmatter": "^0.12.0",
50
50
  "@mdit-vue/types": "^0.12.0",
51
- "@novu/stateless": "^0.14.0",
51
+ "@novu/stateless": "^0.15.0",
52
52
  "@rollup/pluginutils": "^5.0.2",
53
53
  "@stacksjs/development": "workspace:*",
54
54
  "@types/bcryptjs": "^2.4.2",
@@ -57,7 +57,7 @@
57
57
  "@types/fs-extra": "^11.0.1",
58
58
  "@types/markdown-it-link-attributes": "^3.0.1",
59
59
  "@types/minimatch": "^5.1.2",
60
- "@types/node": "^18.16.10",
60
+ "@types/node": "^18.16.13",
61
61
  "@types/nprogress": "^0.2.0",
62
62
  "@types/pluralize": "^0.0.29",
63
63
  "cac": "^6.7.14",
@@ -69,13 +69,13 @@
69
69
  "unocss": "^0.51.13",
70
70
  "unplugin-auto-import": "^0.16.0",
71
71
  "unplugin-vue-components": "^0.24.1",
72
- "vite": "^4.3.7",
72
+ "vite": "^4.3.8",
73
73
  "vite-plugin-inspect": "^0.7.26",
74
- "vite-plugin-pwa": "^0.14.7",
74
+ "vite-plugin-pwa": "^0.15.0",
75
75
  "vite-plugin-vue-layouts": "^0.8.0",
76
76
  "vite-ssg": "^0.22.2",
77
- "vitepress": "1.0.0-alpha.75",
78
- "vue": "^3.3.2",
77
+ "vitepress": "1.0.0-alpha.76",
78
+ "vue": "^3.3.4",
79
79
  "zod": "^3.21.4"
80
80
  }
81
81
  }
@@ -10,6 +10,7 @@ export type CommandReturnValue = ExecaReturnValue<string>
10
10
  export type CommandResult = Ok<ExecaReturnValue<string>, Error | void> | Err<ExecaReturnValue<string>, Error | string | void>
11
11
 
12
12
  export interface OutroOptions {
13
+ type?: 'success' | 'error' | 'warning' | 'info'
13
14
  startTime?: number
14
15
  useSeconds?: boolean
15
16
  isError?: boolean
@@ -131,8 +132,8 @@ export type CreateBooleanOption = 'ui' | 'components' | 'web-components' | 'vue'
131
132
  export type CreateOptions = {
132
133
  [key in CreateBooleanOption]: boolean
133
134
  } & {
134
- [key in CreateStringOption]: string
135
- } & CliOptions
135
+ [key in CreateStringOption]: string
136
+ } & CliOptions
136
137
 
137
138
  export type DevOption = 'components' | 'docs' | 'pages' | 'functions' | 'desktop' | 'all'
138
139
  export type DevOptions = {
@@ -154,8 +155,8 @@ export type MakeBooleanOption = 'component' | 'page' | 'function' | 'language' |
154
155
  export type MakeOptions = {
155
156
  [key in MakeBooleanOption]: boolean
156
157
  } & {
157
- [key in MakeStringOption]: string
158
- } & CliOptions
158
+ [key in MakeStringOption]: string
159
+ } & CliOptions
159
160
 
160
161
  export type UpgradeBoolean = 'framework' | 'dependencies' | 'packageManager' | 'node' | 'all' | 'force'
161
162
  export type UpgradeString = 'version'
@@ -163,8 +164,8 @@ export type UpgradeString = 'version'
163
164
  export type UpgradeOptions = {
164
165
  [key in UpgradeBoolean]: boolean;
165
166
  } & {
166
- [key in UpgradeString]: string;
167
- } & CliOptions
167
+ [key in UpgradeString]: string;
168
+ } & CliOptions
168
169
 
169
170
  export type ExamplesString = 'version'
170
171
  export type ExamplesBoolean = 'components' | 'vue' | 'webComponents' | 'elements' | 'all' | 'force'
@@ -172,8 +173,8 @@ export type ExamplesOption = ExamplesString & ExamplesBoolean | void
172
173
  export type ExamplesOptions = {
173
174
  [key in ExamplesString]: string;
174
175
  } & {
175
- [key in ExamplesBoolean]: boolean;
176
- } & CliOptions
176
+ [key in ExamplesBoolean]: boolean;
177
+ } & CliOptions
177
178
  export type TestOptions = CliOptions & {
178
179
  showReport?: boolean
179
180
  }
@@ -201,7 +202,7 @@ export const enum NpmScript {
201
202
  BuildFunctions = 'build:functions',
202
203
  BuildDocs = 'build:docs',
203
204
  BuildStacks = 'build:stacks',
204
- Clean = 'rimraf ./pnpm-lock.yaml ./node_modules/ ./.stacks/**/node_modules ./.stacks/**/dist',
205
+ Clean = 'rimraf pnpm-lock.yaml node_modules/ .stacks/**/node_modules .stacks/**/dist',
205
206
  Dev = 'dev',
206
207
  DevComponents = 'vite --config ./core/build/src/vue-components.ts',
207
208
  DevDocs = 'npx vitepress dev ./docs/src',
@@ -15,3 +15,11 @@ export interface JsonFile {
15
15
  indent: string
16
16
  newline: string | undefined
17
17
  }
18
+
19
+ /**
20
+ * Describes a package.json file.
21
+ */
22
+ export interface PackageJson {
23
+ packageManager: string
24
+ // wip
25
+ }
@@ -28,3 +28,25 @@ export interface NitroEventHandler {
28
28
  */
29
29
  method?: string
30
30
  }
31
+
32
+ // need to refactor before, after, view to be a part of some other type
33
+ export type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete' | 'before' | 'after' | 'view'
34
+
35
+ export type RouteCallback = (params: Record<string, any>) => any
36
+
37
+ export interface Route {
38
+ method: HttpMethod
39
+ pattern: RegExp
40
+ callback: RouteCallback
41
+ paramNames: string[]
42
+ }
43
+
44
+ export interface Middleware {
45
+ before?: RouteCallback
46
+ after?: RouteCallback
47
+ }
48
+
49
+ export interface RouteGroupOptions {
50
+ prefix?: string
51
+ middleware?: Middleware[]
52
+ }
@@ -1,8 +1,7 @@
1
- import {
1
+ import type {
2
2
  AppOptions,
3
3
  CacheOptions,
4
4
  CdnOptions,
5
- UserCliOptions,
6
5
  DatabaseOptions,
7
6
  DebugOptions,
8
7
  DnsOptions,
@@ -18,7 +17,8 @@ import {
18
17
  ServicesOptions,
19
18
  StorageOptions,
20
19
  UiOptions,
21
- } from "./"
20
+ UserCliOptions,
21
+ } from './'
22
22
 
23
23
  /**
24
24
  * **Stacks Options**
@@ -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/ui",
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 atomic UI engine, powered by UnoCSS.",
7
7
  "author": "Chris Breuer",
@@ -58,9 +58,9 @@
58
58
  "@stacksjs/build": "workspace:*",
59
59
  "@stacksjs/config": "workspace:*",
60
60
  "@unocss/transformer-compile-class": "^0.51.13",
61
- "pinia": "^2.0.36",
61
+ "pinia": "^2.1.3",
62
62
  "unocss": "^0.51.13",
63
- "vue": "^3.3.2",
63
+ "vue": "^3.3.4",
64
64
  "vue-tsc": "^1.6.5"
65
65
  },
66
66
  "devDependencies": {
@@ -8,10 +8,10 @@ import { ui as options } from '@stacksjs/config'
8
8
  import config from './unocss'
9
9
 
10
10
  export {
11
+ CssEngine,
11
12
  UiEngine,
12
13
  ref,
13
14
  computed,
14
- CssEngine,
15
15
  Store,
16
16
  presetForms,
17
17
  transformerCompileClass,
@@ -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/rimraf@5.0.0/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/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/rimraf@5.0.0/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.0/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/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/rimraf@5.0.1/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/rimraf@5.0.0/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.0/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/bin.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
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 helper functions.",
7
7
  "author": "Chris Breuer",
@@ -68,7 +68,7 @@
68
68
  "fast-glob": "^3.2.12",
69
69
  "kolorist": "1.8.0",
70
70
  "p-limit": "^4.0.0",
71
- "rimraf": "^5.0.0",
71
+ "rimraf": "^5.0.1",
72
72
  "semver": "^7.5.1",
73
73
  "yaml": "^2.2.2"
74
74
  },
@@ -92,7 +92,7 @@
92
92
  "kolorist": "1.8.0",
93
93
  "p-limit": "^4.0.0",
94
94
  "perfect-debounce": "^1.0.0",
95
- "rimraf": "^5.0.0",
95
+ "rimraf": "^5.0.1",
96
96
  "semver": "^7.5.1",
97
97
  "yaml": "^2.2.2"
98
98
  },
@@ -1,13 +1,14 @@
1
- export function assert(condition: boolean, message: string): asserts condition {
2
- if (!condition)
3
- throw new Error(message)
4
- }
1
+ // imported through vitest already
2
+ // export function assert(condition: boolean, message: string): asserts condition {
3
+ // if (!condition)
4
+ // throw new Error(message)
5
+ // }
5
6
 
6
7
  export function toString(v: any) {
7
8
  return Object.prototype.toString.call(v)
8
9
  }
9
10
 
10
- export function noop() {}
11
+ // export function noop() {}
11
12
 
12
13
  export function loop(times: number, callback: any) {
13
14
  [...Array(times)].forEach((item, i) => callback(i))
@@ -1,7 +1,6 @@
1
- import type { UserCliOptions, AppOptions, CacheOptions, CdnOptions, CronJobOptions, DatabaseOptions, DebugOptions, DnsOptions, EmailOptions, Events, GitOptions, HashingOptions, LibraryOptions, Model, NotificationOptions, PagesOption, PaymentOptions, SearchEngineOptions, ServicesOptions, StorageOptions, UiOptions } from '@stacksjs/types'
1
+ import type { AppOptions, CacheOptions, CdnOptions, CronJobOptions, DatabaseOptions, DebugOptions, DnsOptions, EmailOptions, Events, GitOptions, HashingOptions, LibraryOptions, Model, NotificationOptions, PagesOption, PaymentOptions, SearchEngineOptions, ServicesOptions, StorageOptions, UiOptions, UserCliOptions } from '@stacksjs/types'
2
2
 
3
- export function env(key: any, fallback?: any) {
4
- // console.log('isClient', isClient)
3
+ export function env(key: any, _fallback?: any) {
5
4
  // if (key && import.meta?.env)
6
5
  // return import.meta.env[key]
7
6
 
@@ -0,0 +1,26 @@
1
+ export {
2
+ add,
3
+ allocate,
4
+ compare,
5
+ convert,
6
+ equal,
7
+ greaterThan,
8
+ greaterThanOrEqual,
9
+ hasSubUnits,
10
+ isZero,
11
+ lessThan,
12
+ lessThanOrEqual,
13
+ maximum,
14
+ minimum,
15
+ multiply,
16
+ normalizeScale,
17
+ dinero,
18
+ dinero as money,
19
+ subtract,
20
+ toSnapshot,
21
+ toUnits,
22
+ toDecimal,
23
+ trimScale,
24
+ haveSameCurrency,
25
+ haveSameAmount,
26
+ } from 'dinero.js'
@@ -0,0 +1,3 @@
1
+ import { rimraf } from 'rimraf'
2
+
3
+ export { rimraf, rimraf as del }
@@ -4,7 +4,7 @@ import { frameworkPath, projectPath } from '@stacksjs/path'
4
4
  import { parse } from 'yaml'
5
5
  import { log, runCommand, spawn } from '@stacksjs/cli'
6
6
  import storage from '@stacksjs/storage'
7
- import { ui, app } from '@stacksjs/config'
7
+ import { app, ui } from '@stacksjs/config'
8
8
 
9
9
  export async function isProjectCreated() {
10
10
  if (storage.isFile('.env'))
@@ -140,6 +140,6 @@ export function determineDebugLevel(options?: CliOptions) {
140
140
  }
141
141
 
142
142
  // export { SemVer } from 'semver'
143
- export * from 'dinero.js'
143
+
144
144
  export { detectIndent }
145
145
  export { detectNewline } from 'detect-newline'
@@ -1,17 +1,15 @@
1
- export { assert, toString, noop, loop, getTypeName } from './base'
1
+ export * from './base'
2
2
  export * from './config'
3
+ export * from './currency'
3
4
  export * from './debounce'
5
+ export * from './delete'
4
6
  export * from './equal'
5
7
  export * from './function'
6
8
  export * from './guards'
7
9
  export * from './helpers'
8
- export { isDef, isBoolean, isFunction, isNumber, isString, isObject, isWindow, isBrowser, isServer, isMap, isSet, isPromise } from './is'
10
+ export * from './math'
9
11
  export * from './p'
10
- export type { SingletonPromiseReturn, ControlledPromise } from './promise'
11
- export { createSingletonPromise, createPromiseLock, createControlledPromise, sleep } from './promise'
12
- export * as semver from 'semver'
12
+ export * from './promise'
13
13
  export * from './throttle'
14
-
15
- export * from '@vueuse/core'
16
- export * from '@vueuse/math'
17
- export * from '@vueuse/shared'
14
+ export * from './vendors'
15
+ export * from './versions'
@@ -0,0 +1,30 @@
1
+ export const clamp = (n: number, min: number, max: number) => Math.min(max, Math.max(min, n))
2
+
3
+ export function rand(min: number, max: number) {
4
+ min = Math.ceil(min)
5
+ max = Math.floor(max)
6
+ return Math.floor(Math.random() * (max - min + 1)) + min
7
+ }
8
+
9
+ export {
10
+ and,
11
+ createGenericProjection,
12
+ createProjection,
13
+ logicNot,
14
+ logicOr,
15
+ not,
16
+ or,
17
+ useAbs,
18
+ useAverage,
19
+ useCeil,
20
+ useClamp,
21
+ useFloor,
22
+ useMath,
23
+ useMax,
24
+ useMin,
25
+ usePrecision,
26
+ useProjection,
27
+ useRound,
28
+ useSum,
29
+ useTrunc,
30
+ } from '@vueuse/math'
@@ -21,12 +21,9 @@ export function throttle(fn: Function, wait = 300) {
21
21
  let lastFn: ReturnType<typeof setTimeout>
22
22
  let lastTime: number
23
23
 
24
- return function (this: any) {
25
- const context = this
26
- const args = arguments
27
-
24
+ return function (this: unknown, ...args: any[]) {
28
25
  if (!inThrottle) {
29
- fn.apply(context, args)
26
+ fn.apply(this, args)
30
27
 
31
28
  lastTime = Date.now()
32
29
  inThrottle = true
@@ -36,7 +33,7 @@ export function throttle(fn: Function, wait = 300) {
36
33
 
37
34
  lastFn = setTimeout(() => {
38
35
  if (Date.now() - lastTime >= wait) {
39
- fn.apply(context, args)
36
+ fn.apply(this, args) // Use 'this' directly
40
37
  lastTime = Date.now()
41
38
  }
42
39
  }, Math.max(wait - (Date.now() - lastTime), 0))