stacks 0.46.4 → 0.47.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/.gitignore +4 -0
- package/README.md +2 -1
- package/buddy/README.md +2 -1
- package/buddy/package.json +13 -4
- package/buddy/src/cli.ts +37 -20
- package/buddy/src/commands/create.ts +13 -13
- package/buddy/src/commands/key.ts +12 -2
- package/buddy/src/index.ts +3 -0
- package/components/vue/package.json +1 -1
- package/components/web/package.json +1 -1
- package/core/actions/package.json +5 -4
- package/core/actions/src/helpers/package-json.ts +1 -1
- package/core/actions/src/key-generate.ts +10 -0
- package/core/ai/package.json +3 -3
- package/core/alias/package.json +3 -3
- package/core/arrays/package.json +3 -3
- package/core/auth/package.json +3 -3
- package/core/build/package.json +3 -3
- package/core/cache/package.json +4 -4
- package/core/chat/README.md +89 -0
- package/core/chat/node_modules/.bin/maizzle +17 -0
- package/core/chat/node_modules/.bin/mkdist +17 -0
- package/{buddy/node_modules/.bin/pnpm → core/chat/node_modules/.bin/tsc} +2 -2
- package/core/chat/node_modules/.bin/tsserver +17 -0
- package/core/chat/package.json +62 -0
- package/core/chat/src/drivers/discord.ts +15 -0
- package/core/chat/src/drivers/slack.ts +22 -0
- package/core/chat/src/index.ts +2 -0
- package/core/chat/tests/example.test.ts +7 -0
- package/core/cli/package.json +3 -3
- package/core/cloud/package.json +3 -3
- package/core/collections/package.json +3 -3
- package/core/config/package.json +3 -3
- package/core/config/src/index.ts +1 -1
- package/core/dashboard/package.json +3 -3
- package/core/database/package.json +3 -3
- package/core/datetime/package.json +3 -3
- package/core/desktop/package.json +3 -3
- package/core/docs/package.json +3 -3
- package/core/domains/package.json +3 -3
- package/core/drivers/package.json +3 -3
- package/core/email/dist/utils/template.html +8 -0
- package/core/email/node_modules/.bin/maizzle +17 -0
- package/core/email/package.json +15 -3
- package/core/email/src/drivers/actions/send.ts +36 -0
- package/core/email/src/drivers/emailjs.ts +21 -0
- package/core/email/src/drivers/mailgun.ts +19 -0
- package/core/email/src/drivers/mailjet.ts +18 -0
- package/core/email/src/drivers/mandrill.ts +17 -0
- package/core/email/src/drivers/netcore.ts +17 -0
- package/core/email/src/drivers/nodemailer.ts +21 -0
- package/core/email/src/drivers/postmark.ts +17 -0
- package/core/email/src/drivers/sendgrid.ts +18 -0
- package/core/email/src/drivers/ses.ts +19 -0
- package/core/email/src/index.ts +9 -1
- package/core/email/src/utils/config.ts +5 -0
- package/core/email/src/utils/template.html +8 -0
- package/core/error-handling/package.json +3 -3
- package/core/events/README.md +76 -0
- package/core/events/build.config.ts +15 -0
- package/core/events/node_modules/.bin/mkdist +17 -0
- package/{buddy/node_modules/.bin/pnpx → core/events/node_modules/.bin/tsc} +2 -2
- package/core/events/node_modules/.bin/tsserver +17 -0
- package/core/events/package.json +55 -0
- package/core/events/src/index.ts +30 -0
- package/core/events/tests/example.test.ts +7 -0
- package/core/git/package.json +3 -3
- package/core/health/package.json +3 -3
- package/core/lint/package.json +3 -3
- package/core/logging/package.json +3 -3
- package/core/modules/package.json +3 -3
- package/core/notifications/package.json +24 -24
- package/core/objects/package.json +3 -3
- package/core/path/package.json +3 -3
- package/core/path/src/index.ts +1 -0
- package/core/payments/package.json +3 -3
- package/core/push/README.md +89 -0
- package/core/push/node_modules/.bin/maizzle +17 -0
- package/core/push/node_modules/.bin/mkdist +17 -0
- package/core/push/node_modules/.bin/tsc +17 -0
- package/core/push/node_modules/.bin/tsserver +17 -0
- package/core/push/package.json +60 -0
- package/core/push/src/drivers/expo.ts +19 -0
- package/core/push/src/drivers/fcm.ts +19 -0
- package/core/push/src/index.ts +2 -0
- package/core/push/tests/example.test.ts +7 -0
- package/core/realtime/package.json +3 -3
- package/core/router/package.json +3 -3
- package/core/search-engine/package.json +4 -4
- package/core/security/package.json +3 -3
- package/core/security/src/crypt.ts +2 -2
- package/core/server/package.json +3 -3
- package/core/sms/README.md +89 -0
- package/core/sms/node_modules/.bin/maizzle +17 -0
- package/core/sms/node_modules/.bin/mkdist +17 -0
- package/core/sms/node_modules/.bin/tsc +17 -0
- package/core/sms/node_modules/.bin/tsserver +17 -0
- package/core/sms/package.json +68 -0
- package/core/sms/src/drivers/gupshup.ts +21 -0
- package/core/sms/src/drivers/nexmo.ts +22 -0
- package/core/sms/src/drivers/plivo.ts +22 -0
- package/core/sms/src/drivers/sms77.ts +21 -0
- package/core/sms/src/drivers/sns.ts +22 -0
- package/core/sms/src/drivers/telnyx.ts +22 -0
- package/core/sms/src/drivers/termii.ts +21 -0
- package/core/sms/src/drivers/twilio.ts +22 -0
- package/core/sms/src/index.ts +8 -0
- package/core/sms/tests/example.test.ts +7 -0
- package/core/storage/package.json +3 -3
- package/core/strings/package.json +3 -3
- package/core/testing/node_modules/.bin/playwright +17 -0
- package/core/testing/package.json +4 -3
- package/core/testing/src/index.ts +2 -1
- package/core/types/node_modules/.bin/vitepress +2 -2
- package/core/types/package.json +5 -5
- package/core/types/src/app.ts +0 -9
- package/core/types/src/cli.ts +1 -0
- package/core/types/src/debug.ts +1 -1
- package/core/types/src/deploy.ts +1 -1
- package/core/types/src/events.ts +22 -0
- package/core/types/src/index.ts +1 -0
- package/core/types/src/notifications.ts +2 -4
- package/core/types/src/ui.ts +28 -19
- package/core/ui/node_modules/.bin/vue-tsc +2 -2
- package/core/ui/package.json +4 -4
- package/core/utils/package.json +6 -6
- package/core/x-ray/package.json +3 -3
- package/functions/package.json +1 -1
- package/package.json +6 -4
- package/tests/feature/example.spec.ts +20 -0
- package/tests/unit/example.test.ts +7 -0
- package/tsconfig.json +2 -0
- package/core/actions/src/key.ts +0 -48
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TwilioSmsProvider } from '@novu/twilio'
|
|
2
|
+
import { italic } from '@stacksjs/cli'
|
|
3
|
+
import type { SmsOptions } from '@stacksjs/types'
|
|
4
|
+
import { ResultAsync } from '@stacksjs/error-handling'
|
|
5
|
+
import { notification } from '@stacksjs/config'
|
|
6
|
+
|
|
7
|
+
const env = notification.sms.twilio
|
|
8
|
+
|
|
9
|
+
const provider = new TwilioSmsProvider({
|
|
10
|
+
accountSid: env.sid,
|
|
11
|
+
authToken: env.authToken,
|
|
12
|
+
from: env.from,
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
function send(options: SmsOptions) {
|
|
16
|
+
return ResultAsync.fromPromise(
|
|
17
|
+
provider.sendMessage(options),
|
|
18
|
+
() => new Error(`Failed to send message using provider: ${italic('Twilio')}`),
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { send as Send, send }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * as twilio from './drivers/twilio'
|
|
2
|
+
export * as plivo from './drivers/plivo'
|
|
3
|
+
export * as nexmo from './drivers/nexmo'
|
|
4
|
+
export * as sms77 from './drivers/sms77'
|
|
5
|
+
export * as sns from './drivers/sns'
|
|
6
|
+
export * as gupshup from './drivers/gupshup'
|
|
7
|
+
export * as telnyx from './drivers/telnyx'
|
|
8
|
+
export * as termii from './drivers/termii'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/storage",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks file system.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=v18.12.1",
|
|
41
|
-
"pnpm": ">=7.
|
|
41
|
+
"pnpm": ">=7.21.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "mkdist -d",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/strings",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks string utilities.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
],
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=v18.12.1",
|
|
49
|
-
"pnpm": ">=7.
|
|
49
|
+
"pnpm": ">=7.21.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "unbuild",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/@playwright+test@1.29.1/node_modules/@playwright/test/cli.js" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/@playwright+test@1.29.1/node_modules/@playwright/test/cli.js" "$@"
|
|
17
|
+
fi
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/testing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks way to test.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
],
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=v18.12.1",
|
|
40
|
-
"pnpm": ">=7.
|
|
40
|
+
"pnpm": ">=7.21.0"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "mkdist -d",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"typecheck": "tsc --noEmit"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@playwright/test": "^1.29.1",
|
|
49
50
|
"@vitest/coverage-istanbul": "^0.26.2",
|
|
50
51
|
"@vitest/ui": "^0.26.2",
|
|
51
52
|
"vitest": "^0.26.2"
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from 'vitest'
|
|
1
|
+
export * as unit from 'vitest'
|
|
2
|
+
export * as feature from '@playwright/test'
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.33_j73j5xdbzpkigstapj6vkce2xy/node_modules/vitepress/bin/vitepress.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.33_j73j5xdbzpkigstapj6vkce2xy/node_modules/vitepress/bin/vitepress.js" "$@"
|
|
17
17
|
fi
|
package/core/types/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks framework types.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
],
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=v18.12.1",
|
|
37
|
-
"pnpm": ">=7.
|
|
37
|
+
"pnpm": ">=7.21.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "mkdist -d",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typecheck": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@mdit-vue/plugin-component": "^0.11.
|
|
46
|
+
"@mdit-vue/plugin-component": "^0.11.2",
|
|
47
47
|
"@mdit-vue/plugin-frontmatter": "^0.11.1",
|
|
48
48
|
"@mdit-vue/types": "^0.11.0",
|
|
49
49
|
"@rollup/pluginutils": "^5.0.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/fs-extra": "^9.0.13",
|
|
54
54
|
"@types/markdown-it-link-attributes": "^3.0.1",
|
|
55
55
|
"@types/minimatch": "^5.1.2",
|
|
56
|
-
"@types/node": "^18.11.
|
|
56
|
+
"@types/node": "^18.11.18",
|
|
57
57
|
"@types/nprogress": "^0.2.0",
|
|
58
58
|
"@types/pluralize": "^0.0.29",
|
|
59
59
|
"@types/prompts": "^2.4.2",
|
package/core/types/src/app.ts
CHANGED
package/core/types/src/cli.ts
CHANGED
package/core/types/src/debug.ts
CHANGED
package/core/types/src/deploy.ts
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Events**
|
|
3
|
+
*
|
|
4
|
+
* This configuration defines all of your events. Because Stacks is full-typed, you may
|
|
5
|
+
* hover any of the options below and the definitions will be provided. In case you
|
|
6
|
+
* have any questions, feel free to reach out via Discord or GitHub Discussions.
|
|
7
|
+
*
|
|
8
|
+
* @example To fire an event, you may use any of the following approaches:
|
|
9
|
+
* ```ts
|
|
10
|
+
* useEvent('user:registered', { name: 'Chris'})
|
|
11
|
+
* dispatch('user:registered', { name: 'Chris'})
|
|
12
|
+
* ````
|
|
13
|
+
|
|
14
|
+
* @example To capture an event, you may use any of the following approaches:
|
|
15
|
+
* ```ts
|
|
16
|
+
* useListen('user:registered', (user) => console.log(user))
|
|
17
|
+
* listen('user:registered', (user) => console.log(user))
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export interface Events {
|
|
21
|
+
[key: string]: any
|
|
22
|
+
}
|
package/core/types/src/index.ts
CHANGED
package/core/types/src/ui.ts
CHANGED
|
@@ -2,7 +2,13 @@ import type { UserShortcuts } from 'unocss'
|
|
|
2
2
|
|
|
3
3
|
export type Font = 'inter' | 'mona' | 'hubot'
|
|
4
4
|
export type Icon = 'heroicon-outline' | 'heroicon-solid'
|
|
5
|
-
export type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
|
|
5
|
+
export type WebFontsProviders = 'google' | 'bunny' | 'fontshare'
|
|
6
|
+
|
|
7
|
+
export interface FontInfo {
|
|
8
|
+
title: string
|
|
9
|
+
text: string
|
|
10
|
+
}
|
|
11
|
+
export type FontFor = 'email' | 'desktop' | 'mobile' | 'web'
|
|
6
12
|
|
|
7
13
|
export interface WebFontMeta {
|
|
8
14
|
name: string
|
|
@@ -122,32 +128,35 @@ export interface UiOptions {
|
|
|
122
128
|
/**
|
|
123
129
|
* **Fonts**
|
|
124
130
|
*
|
|
125
|
-
* Define the
|
|
126
|
-
*
|
|
127
|
-
*
|
|
131
|
+
* Define the fonts you want to use. By default, Stacks provides support
|
|
132
|
+
* for several local font providers. You may set this value to
|
|
133
|
+
* `null` if you prefer not utilize any local fonts.
|
|
128
134
|
*
|
|
129
135
|
* @see https://stacks.ow3.org/fonts
|
|
130
|
-
* @example
|
|
136
|
+
* @example applies the same font for all platforms _(web, email, desktop, and mobile)_
|
|
131
137
|
* ```ts
|
|
132
|
-
* fonts:
|
|
138
|
+
* fonts: {
|
|
139
|
+
* title: 'Mona',
|
|
140
|
+
* text: 'Hubot'
|
|
141
|
+
* }
|
|
133
142
|
* ```
|
|
134
|
-
*/
|
|
135
|
-
fonts?: Record<string, WebFontMeta | string | (WebFontMeta | string)[]>
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* **Web Fonts**
|
|
139
|
-
*
|
|
140
|
-
* Define the web fonts you want to use. By default, Stacks provides
|
|
141
|
-
* support for several web font providers. You may set this value
|
|
142
|
-
* to `null` if you prefer not utilize any web fonts.
|
|
143
|
-
*
|
|
144
|
-
* @see https://stacks.ow3.org/fonts
|
|
145
143
|
* @example
|
|
146
144
|
* ```ts
|
|
147
|
-
*
|
|
145
|
+
* fonts: {
|
|
146
|
+
* web: {
|
|
147
|
+
* title: 'Inter',
|
|
148
|
+
* text: 'Mona'
|
|
149
|
+
* },
|
|
150
|
+
* desktop: {
|
|
151
|
+
* title: 'Mona',
|
|
152
|
+
* text: 'Inter'
|
|
153
|
+
* },
|
|
154
|
+
* }
|
|
148
155
|
* ```
|
|
149
156
|
*/
|
|
150
|
-
|
|
157
|
+
fonts?: Record<FontFor, FontInfo> | { [key in FontFor]: FontInfo }
|
|
158
|
+
|
|
159
|
+
useWebFonts?: boolean | WebFontsProviders
|
|
151
160
|
|
|
152
161
|
/**
|
|
153
162
|
* **Icon Sets**
|
|
@@ -11,7 +11,7 @@ else
|
|
|
11
11
|
export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
12
12
|
fi
|
|
13
13
|
if [ -x "$basedir/node" ]; then
|
|
14
|
-
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.18_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
15
15
|
else
|
|
16
|
-
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/vue-tsc@1.0.18_typescript@4.9.4/node_modules/vue-tsc/bin/vue-tsc.js" "$@"
|
|
17
17
|
fi
|
package/core/ui/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks atomic UI engine, powered by UnoCSS.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=v18.12.1",
|
|
41
|
-
"pnpm": ">=7.
|
|
41
|
+
"pnpm": ">=7.21.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "mkdist -d",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"pinia": "^2.0.28",
|
|
57
57
|
"unocss": "^0.48.0",
|
|
58
58
|
"vue": "^3.2.45",
|
|
59
|
-
"vue-tsc": "^1.0.
|
|
59
|
+
"vue-tsc": "^1.0.18"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@stacksjs/testing": "workspace:*",
|
package/core/utils/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks helper functions.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
],
|
|
39
39
|
"engines": {
|
|
40
40
|
"node": ">=v18.12.1",
|
|
41
|
-
"pnpm": ">=7.
|
|
41
|
+
"pnpm": ">=7.21.0"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "mkdist -d",
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"@stacksjs/path": "workspace:*",
|
|
55
55
|
"@stacksjs/storage": "workspace:*",
|
|
56
56
|
"@stacksjs/types": "workspace:*",
|
|
57
|
-
"@vueuse/core": "^9.
|
|
57
|
+
"@vueuse/core": "^9.9.0",
|
|
58
58
|
"@vueuse/head": "^1.0.22",
|
|
59
|
-
"@vueuse/math": "^9.
|
|
60
|
-
"@vueuse/shared": "^9.
|
|
59
|
+
"@vueuse/math": "^9.9.0",
|
|
60
|
+
"@vueuse/shared": "^9.9.0",
|
|
61
61
|
"defu": "^6.1.1",
|
|
62
62
|
"detect-indent": "^7.0.1",
|
|
63
63
|
"detect-newline": "^4.0.0",
|
package/core/x-ray/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/x-ray",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "All you need to debug, log & analyze.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
],
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=v18.12.1",
|
|
42
|
-
"pnpm": ">=7.
|
|
42
|
+
"pnpm": ">=7.21.0"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "echo 'wip'",
|
package/functions/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.47.1",
|
|
5
|
+
"packageManager": "pnpm@7.21.0",
|
|
6
6
|
"description": "The Stacks framework.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
],
|
|
62
62
|
"engines": {
|
|
63
63
|
"node": ">=v18.12.1",
|
|
64
|
-
"pnpm": ">=7.
|
|
64
|
+
"pnpm": ">=7.21.0"
|
|
65
65
|
},
|
|
66
66
|
"web-types": "./web-types.json",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@stacksjs/buddy": "0.
|
|
68
|
+
"@stacksjs/buddy": "0.47.1"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"buddy": "esno ./buddy/src/cli.ts",
|
|
@@ -146,6 +146,8 @@
|
|
|
146
146
|
"types:generate": "vue-tsc --declaration --emitDeclarationOnly && esno ./core/actions/src/copy-types.ts",
|
|
147
147
|
"types:fix": "esno actions/src/fix-types.ts",
|
|
148
148
|
"test": "pnpm buddy test",
|
|
149
|
+
"test:unit": "pnpm buddy test:unit",
|
|
150
|
+
"test:e2e": "pnpm buddy test:e2e",
|
|
149
151
|
"test:ui": "pnpm buddy test:ui",
|
|
150
152
|
"test:coverage": "pnpm buddy test:coverage",
|
|
151
153
|
"test:types": "vue-tsc --noEmit"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { expect, test } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
test('homepage has title and links to intro page', async ({ page }) => {
|
|
4
|
+
await page.goto('https://playwright.dev/')
|
|
5
|
+
|
|
6
|
+
// Expect a title "to contain" a substring.
|
|
7
|
+
await expect(page).toHaveTitle(/Playwright/)
|
|
8
|
+
|
|
9
|
+
// create a locator
|
|
10
|
+
const getStarted = page.getByRole('link', { name: 'Get started' })
|
|
11
|
+
|
|
12
|
+
// Expect an attribute "to be strictly equal" to the value.
|
|
13
|
+
await expect(getStarted).toHaveAttribute('href', '/docs/intro')
|
|
14
|
+
|
|
15
|
+
// Click the get started link.
|
|
16
|
+
await getStarted.click()
|
|
17
|
+
|
|
18
|
+
// Expects the URL to contain intro.
|
|
19
|
+
await expect(page).toHaveURL(/.*intro/)
|
|
20
|
+
})
|
package/tsconfig.json
CHANGED
|
@@ -80,6 +80,8 @@
|
|
|
80
80
|
"@stacksjs/storage/*": ["./core/storage/src/*"],
|
|
81
81
|
"@stacksjs/strings": ["./core/strings/src/index.ts"],
|
|
82
82
|
"@stacksjs/strings/*": ["./core/strings/src/*"],
|
|
83
|
+
"@stacksjs/testing": ["./core/testing/src/index.ts"],
|
|
84
|
+
"@stacksjs/testing/*": ["./core/testing/src/*"],
|
|
83
85
|
"@stacksjs/types": ["./core/types/src/index.ts"],
|
|
84
86
|
"@stacksjs/types/*": ["./core/types/src/*"],
|
|
85
87
|
"@stacksjs/ui": ["./core/ui/src/index.ts"],
|
package/core/actions/src/key.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { getRandomValues } from 'node:crypto'
|
|
2
|
-
import { log, runCommand } from '@stacksjs/cli'
|
|
3
|
-
// import { generateAppKey } from '@stacksjs/security'
|
|
4
|
-
import type { CliOptions as KeyOptions } from '@stacksjs/types'
|
|
5
|
-
import { setEnvValue } from '@stacksjs/utils'
|
|
6
|
-
import { isFile } from '@stacksjs/storage'
|
|
7
|
-
import utf8 from 'crypto-js/enc-utf8'
|
|
8
|
-
import base64 from 'crypto-js/enc-base64'
|
|
9
|
-
|
|
10
|
-
export async function invoke(options: KeyOptions) {
|
|
11
|
-
await generate(options)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* An alias of the invoke method.
|
|
16
|
-
* @param options
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
export async function key(options: KeyOptions) {
|
|
20
|
-
return invoke(options)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export async function generate(options: KeyOptions) {
|
|
24
|
-
try {
|
|
25
|
-
log.info('Setting random application key.')
|
|
26
|
-
|
|
27
|
-
if (!isFile('.env'))
|
|
28
|
-
await runCommand('cp .env.example .env', options)
|
|
29
|
-
// spawn('cp .env.example .env', { stdio: debug, cwd: projectPath() })
|
|
30
|
-
|
|
31
|
-
await setEnvValue('APP_KEY', await generateAppKey())
|
|
32
|
-
log.success('Application key set')
|
|
33
|
-
|
|
34
|
-
return true
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
log.error('There was an error generating your key.', error)
|
|
38
|
-
process.exit()
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export async function generateAppKey() {
|
|
43
|
-
const random = getRandomValues(new Uint8Array(32))
|
|
44
|
-
const encodedWord = utf8.parse(random.toString())
|
|
45
|
-
const key = base64.stringify(encodedWord)
|
|
46
|
-
|
|
47
|
-
return `base64:${key}`
|
|
48
|
-
}
|