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.
- package/api/nitro.config.ts +2 -2
- package/api/routes/index.ts +1 -1
- package/auto-imports.d.ts +6 -0
- package/core/actions/package.json +1 -5
- package/core/actions/src/clean.ts +1 -1
- package/core/actions/src/dev/index.ts +0 -9
- package/core/actions/src/generate/index.ts +3 -3
- package/core/actions/src/generate/settings.ts +3 -3
- package/core/actions/src/helpers/lib-entries.ts +11 -12
- package/core/actions/src/helpers/utils.ts +1 -1
- package/core/actions/src/make.ts +1 -1
- package/core/actions/src/release.ts +4 -2
- package/core/actions/src/upgrade/framework.ts +29 -29
- package/core/actions/src/upgrade/index.ts +13 -15
- package/core/actions/src/upgrade/node.ts +4 -4
- package/core/actions/src/upgrade/package-manager.ts +4 -4
- package/core/actions/src/upgrade.ts +1 -1
- package/core/ai/package.json +1 -1
- package/core/alias/package.json +1 -1
- package/core/analytics/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/buddy/package.json +1 -1
- package/core/buddy/src/cli.ts +3 -26
- package/core/buddy/src/commands/fresh.ts +1 -1
- package/core/buddy/src/commands/lint.ts +2 -2
- package/core/buddy/src/commands/onboarding.ts +9 -15
- package/core/buddy/src/commands/setting.ts +10 -12
- package/core/buddy/src/commands/version.ts +7 -19
- package/core/buddy/src/index.ts +0 -21
- package/core/build/package.json +3 -3
- package/core/build/src/functions.ts +3 -3
- package/core/build/src/stacks.ts +3 -6
- package/core/build/src/web-components.ts +1 -1
- package/core/cache/package.json +2 -2
- package/core/cache/src/drivers/redis.ts +2 -2
- package/core/chat/package.json +1 -1
- package/core/cli/package.json +1 -1
- package/core/cli/src/run.ts +2 -2
- package/core/cloud/package.json +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/database/package.json +1 -1
- package/core/database/src/factory/index.ts +2 -2
- package/core/database/src/migrations/index.ts +2 -2
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +1 -1
- package/core/development/package.json +1 -1
- package/core/docs/node_modules/.bin/vitepress +4 -4
- package/core/docs/package.json +2 -2
- package/core/domains/package.json +1 -1
- package/core/email/package.json +1 -1
- package/core/email/src/actions/send.ts +2 -0
- package/core/email/src/tailwind.config.ts +3 -3
- package/core/error-handling/package.json +2 -2
- package/core/events/package.json +1 -1
- package/core/faker/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/lint/node_modules/.bin/publint +4 -4
- package/core/lint/package.json +4 -4
- package/core/logging/package.json +2 -2
- package/core/modules/package.json +1 -1
- package/core/notifications/package.json +1 -1
- package/core/notifications/tests/chat/Slack.test.ts +35 -35
- package/core/notifications/tests/email/Mailgun.test.ts +41 -41
- package/core/notifications/tests/email/Sendgrid.test.ts +41 -41
- package/core/notifications/tests/sms/Twilio.test.ts +38 -38
- package/core/objects/package.json +1 -1
- package/core/objects/src/index.ts +2 -1
- package/core/orm/package.json +1 -1
- package/core/pages/package.json +1 -1
- package/core/pages/src/index.ts +39 -39
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +14 -4
- package/core/payments/package.json +1 -1
- package/core/push/package.json +1 -1
- package/core/query-builder/package.json +2 -2
- package/core/queue/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/router/package.json +1 -1
- package/core/scheduler/package.json +1 -1
- package/core/search-engine/package.json +2 -2
- package/core/search-engine/src/helpers.ts +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +2 -1
- package/core/server/src/index.ts +2 -5
- package/core/server/src/nitro.config.ts +2 -2
- package/core/signals/package.json +1 -1
- package/core/slug/package.json +1 -1
- package/core/sms/package.json +1 -1
- package/core/sms/src/drivers/gupshup.ts +1 -1
- package/core/sms/src/drivers/nexmo.ts +3 -2
- package/core/sms/src/drivers/plivo.ts +3 -2
- package/core/sms/src/drivers/sms77.ts +3 -2
- package/core/sms/src/drivers/sns.ts +1 -1
- package/core/sms/src/drivers/telnyx.ts +3 -2
- package/core/sms/src/drivers/termii.ts +3 -2
- package/core/sms/src/drivers/twilio.ts +3 -2
- package/core/storage/package.json +1 -1
- package/core/storage/src/index.ts +3 -5
- package/core/strings/package.json +1 -1
- package/core/testing/node_modules/.bin/playwright +4 -4
- package/core/testing/package.json +2 -2
- package/core/tinker/package.json +1 -1
- package/core/types/node_modules/.bin/vite +4 -4
- package/core/types/node_modules/.bin/vitepress +4 -4
- package/core/types/package.json +8 -8
- package/core/types/src/cli.ts +9 -11
- package/core/types/src/fs.ts +5 -0
- package/core/types/src/model.ts +0 -1
- package/core/ui/package.json +3 -3
- package/core/utils/package.json +3 -3
- package/core/utils/src/guards.ts +3 -3
- package/core/utils/src/helpers.ts +26 -8
- package/core/utils/src/vendors.ts +1 -0
- package/core/validation/package.json +1 -1
- package/docs/node_modules/.bin/vitepress +4 -4
- package/docs/package.json +1 -1
- package/package.json +91 -91
- package/pages/web/main.ts +26 -26
- 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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
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
|
|
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:
|
|
13
|
+
from: from || '',
|
|
13
14
|
})
|
|
14
15
|
|
|
15
16
|
function send(options: SmsOptions) {
|
|
@@ -206,9 +206,10 @@ export function updateConfigFile(filePath: string, newConfig: Record<string, unk
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
export const
|
|
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,
|
|
227
|
-
// the problem is relating to https://github.com/microsoft/TypeScript/issues/5711#issuecomment-157793294
|
|
227
|
+
fs,
|
|
228
228
|
}
|
|
229
|
-
|
|
230
|
-
export default filesystem
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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"
|
package/core/tinker/package.json
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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.
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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/core/types/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
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.
|
|
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.
|
|
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.
|
|
66
|
+
"meilisearch": "^0.32.4",
|
|
67
67
|
"neverthrow": "^6.0.0",
|
|
68
68
|
"ora": "^6.3.1",
|
|
69
|
-
"unocss": "^0.
|
|
70
|
-
"unplugin-auto-import": "^0.16.
|
|
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.
|
|
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-
|
|
77
|
+
"vitepress": "1.0.0-beta.1",
|
|
78
78
|
"vue": "^3.3.4",
|
|
79
79
|
"zod": "^3.21.4"
|
|
80
80
|
}
|
package/core/types/src/cli.ts
CHANGED
|
@@ -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
|
-
|
|
259
|
+
UpgradeDependencies = 'pnpm up',
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
export const enum Action {
|
|
263
|
-
Bump = 'bump', // wip
|
|
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
|
-
|
|
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', //
|
|
285
|
+
LintFix = 'lint/fix', // ✅
|
|
288
286
|
Prepublish = 'prepublish', // wip
|
|
289
287
|
Release = 'release', // wip
|
|
290
288
|
ShowFeatureTestReport = 'show-feature-test-report', // wip
|
package/core/types/src/fs.ts
CHANGED
package/core/types/src/model.ts
CHANGED
package/core/ui/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
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.
|
|
60
|
+
"@unocss/transformer-compile-class": "^0.52.3",
|
|
61
61
|
"pinia": "^2.1.3",
|
|
62
|
-
"unocss": "^0.
|
|
62
|
+
"unocss": "^0.52.3",
|
|
63
63
|
"vue": "^3.3.4",
|
|
64
64
|
"vue-tsc": "^1.6.5"
|
|
65
65
|
},
|
package/core/utils/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
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.
|
|
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.
|
|
97
|
+
"yaml": "^2.3.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@stacksjs/development": "workspace:*"
|
package/core/utils/src/guards.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* @category Guards
|
|
5
5
|
* @example array.filter(notNullish)
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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
|
-
|
|
31
|
-
return true
|
|
32
|
-
|
|
33
|
-
return false
|
|
51
|
+
return !!(appKey && appKey.length > 16)
|
|
34
52
|
}
|
|
35
53
|
|
|
36
54
|
/**
|
|
@@ -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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|