stacks 0.52.9 → 0.53.1

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 (122) hide show
  1. package/api/nitro.config.ts +2 -2
  2. package/api/routes/index.ts +1 -1
  3. package/auto-imports.d.ts +6 -0
  4. package/core/actions/package.json +1 -5
  5. package/core/actions/src/clean.ts +1 -1
  6. package/core/actions/src/dev/index.ts +0 -9
  7. package/core/actions/src/generate/index.ts +3 -3
  8. package/core/actions/src/generate/settings.ts +3 -3
  9. package/core/actions/src/helpers/lib-entries.ts +11 -12
  10. package/core/actions/src/helpers/utils.ts +1 -1
  11. package/core/actions/src/make.ts +1 -1
  12. package/core/actions/src/release.ts +4 -2
  13. package/core/actions/src/upgrade/framework.ts +29 -29
  14. package/core/actions/src/upgrade/index.ts +13 -15
  15. package/core/actions/src/upgrade/node.ts +4 -4
  16. package/core/actions/src/upgrade/package-manager.ts +4 -4
  17. package/core/actions/src/upgrade.ts +1 -1
  18. package/core/ai/package.json +1 -1
  19. package/core/alias/package.json +1 -1
  20. package/core/analytics/package.json +1 -1
  21. package/core/arrays/package.json +1 -1
  22. package/core/auth/package.json +1 -1
  23. package/core/buddy/package.json +1 -1
  24. package/core/buddy/src/cli.ts +3 -26
  25. package/core/buddy/src/commands/fresh.ts +1 -1
  26. package/core/buddy/src/commands/lint.ts +2 -2
  27. package/core/buddy/src/commands/onboarding.ts +9 -15
  28. package/core/buddy/src/commands/setting.ts +10 -12
  29. package/core/buddy/src/commands/version.ts +7 -19
  30. package/core/buddy/src/index.ts +0 -21
  31. package/core/build/package.json +3 -3
  32. package/core/build/src/functions.ts +3 -3
  33. package/core/build/src/stacks.ts +3 -6
  34. package/core/build/src/web-components.ts +1 -1
  35. package/core/cache/package.json +2 -2
  36. package/core/cache/src/drivers/redis.ts +2 -2
  37. package/core/chat/package.json +1 -1
  38. package/core/cli/package.json +1 -1
  39. package/core/cli/src/run.ts +2 -2
  40. package/core/cloud/package.json +1 -1
  41. package/core/collections/package.json +1 -1
  42. package/core/config/package.json +1 -1
  43. package/core/database/package.json +1 -1
  44. package/core/database/src/factory/index.ts +2 -2
  45. package/core/database/src/migrations/index.ts +2 -2
  46. package/core/datetime/package.json +1 -1
  47. package/core/desktop/package.json +1 -1
  48. package/core/development/package.json +1 -1
  49. package/core/docs/node_modules/.bin/vitepress +4 -4
  50. package/core/docs/package.json +2 -2
  51. package/core/domains/package.json +1 -1
  52. package/core/email/package.json +1 -1
  53. package/core/email/src/actions/send.ts +2 -0
  54. package/core/email/src/tailwind.config.ts +3 -3
  55. package/core/error-handling/package.json +2 -2
  56. package/core/events/package.json +1 -1
  57. package/core/faker/package.json +1 -1
  58. package/core/git/package.json +1 -1
  59. package/core/health/package.json +1 -1
  60. package/core/lint/node_modules/.bin/publint +4 -4
  61. package/core/lint/package.json +4 -4
  62. package/core/logging/package.json +2 -2
  63. package/core/modules/package.json +1 -1
  64. package/core/notifications/package.json +1 -1
  65. package/core/notifications/tests/chat/Slack.test.ts +35 -35
  66. package/core/notifications/tests/email/Mailgun.test.ts +41 -41
  67. package/core/notifications/tests/email/Sendgrid.test.ts +41 -41
  68. package/core/notifications/tests/sms/Twilio.test.ts +38 -38
  69. package/core/objects/package.json +1 -1
  70. package/core/objects/src/index.ts +2 -1
  71. package/core/orm/package.json +1 -1
  72. package/core/pages/package.json +1 -1
  73. package/core/pages/src/index.ts +39 -39
  74. package/core/path/package.json +1 -1
  75. package/core/path/src/index.ts +14 -4
  76. package/core/payments/package.json +1 -1
  77. package/core/push/package.json +1 -1
  78. package/core/query-builder/package.json +2 -2
  79. package/core/queue/package.json +1 -1
  80. package/core/realtime/package.json +1 -1
  81. package/core/router/package.json +1 -1
  82. package/core/scheduler/package.json +1 -1
  83. package/core/search-engine/package.json +2 -2
  84. package/core/search-engine/src/helpers.ts +1 -1
  85. package/core/security/package.json +1 -1
  86. package/core/server/package.json +2 -1
  87. package/core/server/src/index.ts +2 -5
  88. package/core/server/src/nitro.config.ts +2 -2
  89. package/core/signals/package.json +1 -1
  90. package/core/slug/package.json +1 -1
  91. package/core/sms/package.json +1 -1
  92. package/core/sms/src/drivers/gupshup.ts +1 -1
  93. package/core/sms/src/drivers/nexmo.ts +3 -2
  94. package/core/sms/src/drivers/plivo.ts +3 -2
  95. package/core/sms/src/drivers/sms77.ts +3 -2
  96. package/core/sms/src/drivers/sns.ts +1 -1
  97. package/core/sms/src/drivers/telnyx.ts +3 -2
  98. package/core/sms/src/drivers/termii.ts +3 -2
  99. package/core/sms/src/drivers/twilio.ts +3 -2
  100. package/core/storage/package.json +1 -1
  101. package/core/storage/src/index.ts +3 -5
  102. package/core/strings/package.json +1 -1
  103. package/core/testing/node_modules/.bin/playwright +4 -4
  104. package/core/testing/package.json +2 -2
  105. package/core/tinker/package.json +1 -1
  106. package/core/types/node_modules/.bin/vite +4 -4
  107. package/core/types/node_modules/.bin/vitepress +4 -4
  108. package/core/types/package.json +8 -8
  109. package/core/types/src/cli.ts +9 -11
  110. package/core/types/src/fs.ts +5 -0
  111. package/core/types/src/model.ts +0 -1
  112. package/core/ui/package.json +3 -3
  113. package/core/utils/package.json +3 -3
  114. package/core/utils/src/guards.ts +3 -3
  115. package/core/utils/src/helpers.ts +26 -8
  116. package/core/utils/src/vendors.ts +1 -0
  117. package/core/validation/package.json +1 -1
  118. package/docs/node_modules/.bin/vitepress +4 -4
  119. package/docs/package.json +1 -1
  120. package/package.json +91 -91
  121. package/pages/web/main.ts +26 -26
  122. package/core/actions/src/generate/package-jsons.ts +0 -11
@@ -4,12 +4,13 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.nexmo
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.nexmo
8
9
 
9
10
  const provider = new NexmoSmsProvider({
10
11
  apiKey: env?.key || '',
11
12
  apiSecret: env?.secret || '',
12
- from: env?.from || '',
13
+ from: from || '',
13
14
  })
14
15
 
15
16
  function send(options: SmsOptions) {
@@ -4,12 +4,13 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.plivo
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.plivo
8
9
 
9
10
  const provider = new PlivoSmsProvider({
10
11
  accountSid: env?.sid,
11
12
  authToken: env?.authToken,
12
- from: env?.from,
13
+ from: from || '',
13
14
  })
14
15
 
15
16
  function send(options: SmsOptions) {
@@ -4,11 +4,12 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.sms77
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.sms77
8
9
 
9
10
  const provider = new Sms77SmsProvider({
10
11
  apiKey: env?.key,
11
- from: env?.from,
12
+ from,
12
13
  })
13
14
 
14
15
  function send(options: SmsOptions) {
@@ -4,7 +4,7 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.sns
7
+ const env = notification.sms?.drivers.sns
8
8
 
9
9
  const provider = new SNSSmsProvider({
10
10
  region: env?.region,
@@ -4,12 +4,13 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.telnyx
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.telnyx
8
9
 
9
10
  const provider = new TelnyxSmsProvider({
10
11
  apiKey: env?.key,
11
12
  messageProfileId: env?.messageProfileId,
12
- from: env?.from,
13
+ from: from || '',
13
14
  })
14
15
 
15
16
  function send(options: SmsOptions) {
@@ -4,11 +4,12 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.termii
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.termii
8
9
 
9
10
  const provider = new TermiiSmsProvider({
10
11
  apiKey: env?.key,
11
- from: env?.from,
12
+ from: from || '',
12
13
  })
13
14
 
14
15
  function send(options: SmsOptions) {
@@ -4,12 +4,13 @@ import type { SmsOptions } from '@stacksjs/types'
4
4
  import { ResultAsync } from '@stacksjs/error-handling'
5
5
  import { notification } from '@stacksjs/config'
6
6
 
7
- const env = notification.sms?.twilio
7
+ const from = notification.sms?.from
8
+ const env = notification.sms?.drivers.twilio
8
9
 
9
10
  const provider = new TwilioSmsProvider({
10
11
  accountSid: env?.sid,
11
12
  authToken: env?.authToken,
12
- from: env?.from,
13
+ from: from || '',
13
14
  })
14
15
 
15
16
  function send(options: SmsOptions) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/storage",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks file system.",
7
7
  "author": "Chris Breuer",
@@ -206,9 +206,10 @@ export function updateConfigFile(filePath: string, newConfig: Record<string, unk
206
206
  }
207
207
 
208
208
 
209
- export const filesystem = {
209
+ export const storage = {
210
210
  _dirname,
211
211
  readJsonFile,
212
+ readPackageJson,
212
213
  writeJsonFile,
213
214
  readTextFile,
214
215
  writeTextFile,
@@ -223,8 +224,5 @@ export const filesystem = {
223
224
  deleteEmptyFolders,
224
225
  doesFolderExist,
225
226
  updateConfigFile,
226
- fs, // potentially refactor to `...fs` but, currently, there is an issues when building @stacksjs/config
227
- // the problem is relating to https://github.com/microsoft/TypeScript/issues/5711#issuecomment-157793294
227
+ fs,
228
228
  }
229
-
230
- export default filesystem
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/strings",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks string utilities.",
7
7
  "author": "Chris Breuer",
@@ -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/@playwright+test@1.33.0/node_modules/@playwright/test/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.33.0/node_modules/@playwright/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.33.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/@playwright+test@1.34.2/node_modules/@playwright/test/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.34.2/node_modules/@playwright/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.34.2/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/@playwright+test@1.33.0/node_modules/@playwright/test/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.33.0/node_modules/@playwright/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.33.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/@playwright+test@1.34.2/node_modules/@playwright/test/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.34.2/node_modules/@playwright/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/@playwright+test@1.34.2/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/@playwright+test@1.33.0/node_modules/@playwright/test/cli.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/@playwright+test@1.34.2/node_modules/@playwright/test/cli.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/@playwright+test@1.33.0/node_modules/@playwright/test/cli.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/@playwright+test@1.34.2/node_modules/@playwright/test/cli.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/testing",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks way of testing.",
7
7
  "author": "Chris Breuer",
@@ -50,7 +50,7 @@
50
50
  "typecheck": "tsc --noEmit"
51
51
  },
52
52
  "peerDependencies": {
53
- "@playwright/test": "^1.33.0",
53
+ "@playwright/test": "^1.34.2",
54
54
  "@vitest/coverage-istanbul": "^0.31.1",
55
55
  "@vitest/ui": "^0.31.1",
56
56
  "vitest": "^0.31.1"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/tinker",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks way to tinker.",
7
7
  "author": "Chris Breuer",
@@ -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.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"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/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.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"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/node_modules/vite/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/node_modules/vite/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/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.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/node_modules/vite/bin/vite.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.13/node_modules/vite/bin/vite.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vite@4.3.8_@types+node@18.16.14/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/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"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/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.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"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/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.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/vitepress.js" "$@"
15
15
  else
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" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/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.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks framework types.",
7
7
  "author": "Chris Breuer",
@@ -53,28 +53,28 @@
53
53
  "@stacksjs/development": "workspace:*",
54
54
  "@types/bcryptjs": "^2.4.2",
55
55
  "@types/crypto-js": "^4.1.1",
56
- "@types/eslint": "^8.37.0",
56
+ "@types/eslint": "^8.40.0",
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.13",
60
+ "@types/node": "^18.16.14",
61
61
  "@types/nprogress": "^0.2.0",
62
62
  "@types/pluralize": "^0.0.29",
63
63
  "cac": "^6.7.14",
64
64
  "execa": "^7.1.1",
65
65
  "markdown-it": "^13.0.1",
66
- "meilisearch": "^0.32.3",
66
+ "meilisearch": "^0.32.4",
67
67
  "neverthrow": "^6.0.0",
68
68
  "ora": "^6.3.1",
69
- "unocss": "^0.51.13",
70
- "unplugin-auto-import": "^0.16.0",
69
+ "unocss": "^0.52.3",
70
+ "unplugin-auto-import": "^0.16.2",
71
71
  "unplugin-vue-components": "^0.24.1",
72
72
  "vite": "^4.3.8",
73
- "vite-plugin-inspect": "^0.7.26",
73
+ "vite-plugin-inspect": "^0.7.28",
74
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.76",
77
+ "vitepress": "1.0.0-beta.1",
78
78
  "vue": "^3.3.4",
79
79
  "zod": "^3.21.4"
80
80
  }
@@ -256,16 +256,16 @@ export const enum NpmScript {
256
256
  Prepublish = 'prepublish',
257
257
  Wip = 'wip',
258
258
  UpgradeNode = './.stacks/scripts/setup.sh +nodejs.org',
259
- UpgradePackageManager = './.stacks/scripts/setup.sh +pnpm.io',
259
+ UpgradeDependencies = 'pnpm up',
260
260
  }
261
261
 
262
262
  export const enum Action {
263
- Bump = 'bump', // wip - changelog action
264
- BuildStacks = 'build/stacks',
265
- BuildComponentLibs = 'build-component-libs',
266
- BuildVueComponentLib = 'build-vue-component-lib',
267
- BuildWebComponentLib = 'build-web-component-lib',
268
- BuildCli = 'build-cli',
263
+ Bump = 'bump', // wip
264
+ BuildStacks = 'build/stacks', // wip
265
+ BuildComponentLibs = 'build-component-libs', // wip
266
+ BuildVueComponentLib = 'build-vue-component-lib', // wip
267
+ BuildWebComponentLib = 'build-web-component-lib', // wip
268
+ BuildCli = 'build-cli', // wip
269
269
  BuildCore = 'build/core', // wip
270
270
  BuildDocs = 'build-docs',
271
271
  BuildFunctionLib = 'build-function-lib',
@@ -275,16 +275,14 @@ export const enum Action {
275
275
  DevDocs = 'dev/docs', // wip
276
276
  Deploy = 'deploy', // wip
277
277
  Fresh = 'fresh', // wip
278
- GeneratePackageJsons = 'generate/package-jsons', // ✅
279
- GenerateSettings = 'generate-settings', // wip
280
- GenerateOnboarding = 'generate-onboarding', // wip
278
+ GenerateLibraryEntries = 'generate/lib-entries', // ✅
281
279
  Inspire = 'inspire', // wip
282
280
  KeyGenerate = 'key-generate', // wip
283
281
  MakeNotification = 'make-notification', // wip
284
282
  Migrate = 'migrate', // wip
285
283
  Seed = 'seed', // wip
286
284
  Lint = 'lint/index', // wip
287
- LintFix = 'lint/fix', // wip
285
+ LintFix = 'lint/fix', //
288
286
  Prepublish = 'prepublish', // wip
289
287
  Release = 'release', // wip
290
288
  ShowFeatureTestReport = 'show-feature-test-report', // wip
@@ -20,6 +20,11 @@ export interface JsonFile {
20
20
  * Describes a package.json file.
21
21
  */
22
22
  export interface PackageJson {
23
+ engines: {
24
+ node: string
25
+ pnpm: string
26
+ }
27
+ version: string
23
28
  packageManager: string
24
29
  // wip
25
30
  }
@@ -36,7 +36,6 @@ export interface Model {
36
36
 
37
37
  export interface Fields {
38
38
  [key: string]: {
39
- type: string
40
39
  default?: boolean
41
40
  unique?: boolean
42
41
  required?: boolean
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ui",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks atomic UI engine, powered by UnoCSS.",
7
7
  "author": "Chris Breuer",
@@ -57,9 +57,9 @@
57
57
  "@julr/unocss-preset-forms": "^0.0.5",
58
58
  "@stacksjs/build": "workspace:*",
59
59
  "@stacksjs/config": "workspace:*",
60
- "@unocss/transformer-compile-class": "^0.51.13",
60
+ "@unocss/transformer-compile-class": "^0.52.3",
61
61
  "pinia": "^2.1.3",
62
- "unocss": "^0.51.13",
62
+ "unocss": "^0.52.3",
63
63
  "vue": "^3.3.4",
64
64
  "vue-tsc": "^1.6.5"
65
65
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks helper functions.",
7
7
  "author": "Chris Breuer",
@@ -70,7 +70,7 @@
70
70
  "p-limit": "^4.0.0",
71
71
  "rimraf": "^5.0.1",
72
72
  "semver": "^7.5.1",
73
- "yaml": "^2.2.2"
73
+ "yaml": "^2.3.0"
74
74
  },
75
75
  "dependencies": {
76
76
  "@stacksjs/arrays": "workspace:*",
@@ -94,7 +94,7 @@
94
94
  "perfect-debounce": "^1.0.0",
95
95
  "rimraf": "^5.0.1",
96
96
  "semver": "^7.5.1",
97
- "yaml": "^2.2.2"
97
+ "yaml": "^2.3.0"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@stacksjs/development": "workspace:*"
@@ -4,9 +4,9 @@
4
4
  * @category Guards
5
5
  * @example array.filter(notNullish)
6
6
  */
7
- // export function notNullish<T>(v: T | null | undefined): v is NonNullable<T> {
8
- // return v != null
9
- // }
7
+ export function notNullish<T>(v: T | null | undefined): v is NonNullable<T> {
8
+ return v != null
9
+ }
10
10
 
11
11
  /**
12
12
  * Type guard to filter out null values
@@ -2,9 +2,10 @@ import type { CliOptions, CommandResult, Manifest, NpmScript } from '@stacksjs/t
2
2
  import detectIndent from 'detect-indent'
3
3
  import { frameworkPath, projectPath } from '@stacksjs/path'
4
4
  import { parse } from 'yaml'
5
- import { log, runCommand, spawn } from '@stacksjs/cli'
6
- import storage from '@stacksjs/storage'
5
+ import { execSync, log, runCommand, spawn } from '@stacksjs/cli'
7
6
  import { app, ui } from '@stacksjs/config'
7
+ import { storage } from '@stacksjs/storage'
8
+ import { semver } from './versions'
8
9
 
9
10
  export async function isProjectCreated() {
10
11
  if (storage.isFile('.env'))
@@ -17,9 +18,29 @@ export async function isProjectCreated() {
17
18
  return await isAppKeySet()
18
19
  }
19
20
 
21
+ export async function installIfVersionMismatch() {
22
+ const dependenciesYaml = storage.fs.readFileSync(projectPath('tea.yaml'), 'utf8')
23
+ const dependencies = parseYaml(dependenciesYaml).dependencies
24
+
25
+ const requiredNodeVersion = dependencies['nodejs.org']
26
+ const requiredPnpmVersion = dependencies['pnpm.io']
27
+
28
+ const installedNodeVersion = process.version
29
+ const installedPnpmVersion = execSync('pnpm -v').trim()
30
+
31
+ if (!semver.satisfies(installedNodeVersion, requiredNodeVersion)) {
32
+ log.error(`Installed Node.js version (${installedNodeVersion}) does not satisfy required version (${requiredNodeVersion}). One moment...`)
33
+ await runCommand(`tea +nodejs.org${requiredNodeVersion} >/dev/null 2>&1`)
34
+ }
35
+
36
+ if (!semver.satisfies(installedPnpmVersion, requiredPnpmVersion)) {
37
+ log.error(`Installed pnpm version (${installedPnpmVersion}) does not satisfy required version (${requiredPnpmVersion}). One moment...`)
38
+ await runCommand(`tea +pnpm.io${requiredPnpmVersion} >/dev/null 2>&1`)
39
+ }
40
+ }
41
+
20
42
  export async function frameworkVersion(): Promise<string> {
21
- const packageJson = await storage.fs.readJson(frameworkPath('package.json'))
22
- return packageJson.version
43
+ return (await storage.readPackageJson(frameworkPath('package.json'))).version
23
44
  }
24
45
 
25
46
  export async function isAppKeySet() {
@@ -27,10 +48,7 @@ export async function isAppKeySet() {
27
48
  const lines = env.data.split('\n')
28
49
  const appKey = lines.find(line => line.startsWith('APP_KEY='))
29
50
 
30
- if (appKey && appKey.length > 16)
31
- return true
32
-
33
- return false
51
+ return !!(appKey && appKey.length > 16)
34
52
  }
35
53
 
36
54
  /**
@@ -145,6 +145,7 @@ export {
145
145
  useTimestamp,
146
146
  useTitle,
147
147
  useTransition,
148
+ useToggle,
148
149
  useUrlSearchParams,
149
150
  useUserMedia,
150
151
  useVModel,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/validation",
3
3
  "type": "module",
4
- "version": "0.52.9",
4
+ "version": "0.53.1",
5
5
  "packageManager": "pnpm@8.5.1",
6
6
  "description": "The Stacks Validation methods.",
7
7
  "author": "Chris Breuer",
@@ -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.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"
9
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/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.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"
11
+ export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/node_modules:/home/runner/work/stacks/stacks/node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/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.76_@algolia+client-search@4.17.0_@types+node@18.16.13/node_modules/vitepress/bin/vitepress.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/vitepress.js" "$@"
15
15
  else
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" "$@"
16
+ exec node "$basedir/../../../../node_modules/.pnpm/vitepress@1.0.0-beta.1_@algolia+client-search@4.17.0_@types+node@18.16.14/node_modules/vitepress/bin/vitepress.js" "$@"
17
17
  fi
package/docs/package.json CHANGED
@@ -41,6 +41,6 @@
41
41
  "@stacksjs/docs": "workspace:*",
42
42
  "@stacksjs/path": "workspace:*",
43
43
  "rimraf": "^5.0.1",
44
- "vitepress": "^1.0.0-alpha.76"
44
+ "vitepress": "^1.0.0-beta.1"
45
45
  }
46
46
  }