stacks 0.47.2 → 0.47.4

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 (80) hide show
  1. package/buddy/package.json +1 -1
  2. package/core/actions/package.json +1 -1
  3. package/core/ai/package.json +1 -1
  4. package/core/alias/package.json +1 -1
  5. package/core/alias/src/index.ts +8 -0
  6. package/core/arrays/package.json +1 -1
  7. package/core/auth/package.json +1 -1
  8. package/core/build/package.json +1 -1
  9. package/core/cache/package.json +1 -1
  10. package/core/chat/package.json +4 -5
  11. package/core/cli/package.json +1 -1
  12. package/core/cloud/package.json +1 -1
  13. package/core/collections/package.json +1 -1
  14. package/core/config/package.json +1 -1
  15. package/core/dashboard/package.json +1 -1
  16. package/core/database/package.json +1 -1
  17. package/core/datetime/package.json +1 -1
  18. package/core/desktop/package.json +1 -1
  19. package/core/docs/package.json +1 -1
  20. package/core/domains/package.json +1 -1
  21. package/core/drivers/package.json +1 -1
  22. package/core/email/package.json +10 -2
  23. package/core/email/src/utils/config.ts +1 -1
  24. package/core/error-handling/package.json +1 -1
  25. package/core/events/package.json +1 -1
  26. package/core/git/package.json +1 -1
  27. package/core/health/package.json +1 -1
  28. package/core/lint/package.json +1 -1
  29. package/core/logging/package.json +1 -1
  30. package/core/modules/package.json +1 -1
  31. package/core/notifications/package.json +5 -1
  32. package/core/notifications/src/drivers/chat.ts +1 -0
  33. package/core/notifications/src/drivers/email.ts +1 -0
  34. package/core/notifications/src/drivers/push.ts +1 -0
  35. package/core/notifications/src/drivers/sms.ts +1 -0
  36. package/core/notifications/src/utils/config.ts +2 -2
  37. package/core/objects/package.json +1 -1
  38. package/core/path/package.json +1 -1
  39. package/core/path/src/index.ts +20 -0
  40. package/core/payments/package.json +1 -1
  41. package/core/push/package.json +1 -1
  42. package/core/realtime/package.json +1 -1
  43. package/core/router/package.json +1 -1
  44. package/core/search-engine/package.json +1 -1
  45. package/core/security/package.json +1 -1
  46. package/core/server/package.json +1 -1
  47. package/core/sms/package.json +10 -4
  48. package/core/storage/package.json +1 -1
  49. package/core/strings/package.json +1 -1
  50. package/core/testing/package.json +1 -1
  51. package/core/types/package.json +1 -1
  52. package/core/ui/package.json +1 -1
  53. package/core/utils/package.json +1 -1
  54. package/core/x-ray/package.json +1 -1
  55. package/package.json +2 -2
  56. package/core/notifications/src/drivers/chat/discord.ts +0 -15
  57. package/core/notifications/src/drivers/chat/index.ts +0 -2
  58. package/core/notifications/src/drivers/chat/slack.ts +0 -22
  59. package/core/notifications/src/drivers/email/actions/send.ts +0 -36
  60. package/core/notifications/src/drivers/email/emailjs.ts +0 -21
  61. package/core/notifications/src/drivers/email/index.ts +0 -9
  62. package/core/notifications/src/drivers/email/mailgun.ts +0 -19
  63. package/core/notifications/src/drivers/email/mailjet.ts +0 -18
  64. package/core/notifications/src/drivers/email/mandrill.ts +0 -17
  65. package/core/notifications/src/drivers/email/netcore.ts +0 -17
  66. package/core/notifications/src/drivers/email/nodemailer.ts +0 -21
  67. package/core/notifications/src/drivers/email/postmark.ts +0 -17
  68. package/core/notifications/src/drivers/email/sendgrid.ts +0 -18
  69. package/core/notifications/src/drivers/email/ses.ts +0 -19
  70. package/core/notifications/src/drivers/push/expo.ts +0 -19
  71. package/core/notifications/src/drivers/push/fcm.ts +0 -19
  72. package/core/notifications/src/drivers/sms/gupshup.ts +0 -21
  73. package/core/notifications/src/drivers/sms/index.ts +0 -8
  74. package/core/notifications/src/drivers/sms/nexmo.ts +0 -22
  75. package/core/notifications/src/drivers/sms/plivo.ts +0 -22
  76. package/core/notifications/src/drivers/sms/sms77.ts +0 -21
  77. package/core/notifications/src/drivers/sms/sns.ts +0 -22
  78. package/core/notifications/src/drivers/sms/telnyx.ts +0 -22
  79. package/core/notifications/src/drivers/sms/termii.ts +0 -21
  80. package/core/notifications/src/drivers/sms/twilio.ts +0 -22
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ui",
3
3
  "type": "module",
4
- "version": "0.47.2",
4
+ "version": "0.47.4",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks atomic UI engine, powered by UnoCSS.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/utils",
3
3
  "type": "module",
4
- "version": "0.47.2",
4
+ "version": "0.47.4",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks helper functions.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/x-ray",
3
3
  "type": "module",
4
- "version": "0.47.2",
4
+ "version": "0.47.4",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "All you need to debug, log & analyze.",
7
7
  "author": "Chris Breuer",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stacks",
3
3
  "type": "module",
4
- "version": "0.47.2",
4
+ "version": "0.47.4",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks framework.",
7
7
  "author": "Chris Breuer",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "web-types": "./web-types.json",
67
67
  "dependencies": {
68
- "@stacksjs/buddy": "0.47.2"
68
+ "@stacksjs/buddy": "0.47.4"
69
69
  },
70
70
  "scripts": {
71
71
  "buddy": "esno ./buddy/src/cli.ts",
@@ -1,15 +0,0 @@
1
- import { DiscordProvider } from '@novu/discord'
2
- import { italic } from '@stacksjs/cli'
3
- import type { ChatOptions } from '@stacksjs/types'
4
- import { ResultAsync } from '@stacksjs/error-handling'
5
-
6
- const provider = new DiscordProvider({})
7
-
8
- function send(options: ChatOptions) {
9
- return ResultAsync.fromPromise(
10
- provider.sendMessage(options),
11
- () => new Error(`Failed to send message using provider: ${italic('Discord')}`),
12
- )
13
- }
14
-
15
- export { send as Send, send }
@@ -1,2 +0,0 @@
1
- export * as discord from './discord'
2
- export * as slack from './slack'
@@ -1,22 +0,0 @@
1
- import { SlackProvider } from '@novu/slack'
2
- import { italic } from '@stacksjs/cli'
3
- import type { ChatOptions } from '@stacksjs/types'
4
- import { ResultAsync } from '@stacksjs/error-handling'
5
- import { notification } from '@stacksjs/config'
6
-
7
- const env = notification.chat.slack
8
-
9
- const provider = new SlackProvider({
10
- applicationId: env.appId,
11
- clientId: env.clientId,
12
- secretKey: env.secret,
13
- })
14
-
15
- function send(options: ChatOptions) {
16
- return ResultAsync.fromPromise(
17
- provider.sendMessage(options),
18
- () => new Error(`Failed to send message using provider: ${italic('Slack')}`),
19
- )
20
- }
21
-
22
- export { send as Send, send }
@@ -1,36 +0,0 @@
1
- import type { EmailOptions } from '@stacksjs/types'
2
- import { italic } from '@stacksjs/cli'
3
- import { log } from '@stacksjs/logging'
4
- import { ResultAsync } from '@stacksjs/error-handling'
5
- import * as Maizzle from '@maizzle/framework'
6
- import * as maizzleConfig from '../../../utils/config'
7
- import { config } from '../../../tailwind.config'
8
-
9
- export async function send(options: EmailOptions, provider: any, providerName: string, css?: string) {
10
- const template = `
11
- <extends src="./core/notifications/src/utils/template.html">
12
- <block name="template">
13
- ${options.html}
14
- </block>
15
- </extends>`
16
-
17
- await Maizzle.render(
18
- template,
19
- {
20
- tailwind: {
21
- config,
22
- css,
23
- maizzle: maizzleConfig,
24
- },
25
- },
26
- )
27
- .then(({ html }: any) => {
28
- options.html = html
29
- })
30
- .catch((error: any) => log.error(`Failed to render email template using provider: ${italic(providerName)}.`, error))
31
-
32
- return ResultAsync.fromPromise(
33
- provider.sendMessage(options),
34
- () => new Error(`Failed to send message using provider: ${italic(providerName)}`),
35
- )
36
- }
@@ -1,21 +0,0 @@
1
- import { EmailJsProvider } from '@novu/emailjs'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.emailjs
7
-
8
- const provider = new EmailJsProvider({
9
- from: env.from,
10
- host: env.host,
11
- user: env.user,
12
- password: env.password,
13
- port: env.port,
14
- secure: env.secure,
15
- })
16
-
17
- async function send(options: EmailOptions, css?: string) {
18
- return sendEmail(options, provider, 'EmailJS', css)
19
- }
20
-
21
- export { send as Send, send }
@@ -1,9 +0,0 @@
1
- export * as sendgrid from './sendgrid'
2
- export * as mailgun from './mailgun'
3
- export * as mailjet from './mailjet'
4
- export * as mandrill from './mandrill'
5
- export * as netcore from './netcore'
6
- export * as nodemailer from './nodemailer'
7
- export * as postmark from './postmark'
8
- export * as ses from './ses'
9
- export * as emailjs from './emailjs'
@@ -1,19 +0,0 @@
1
- import { MailgunEmailProvider } from '@novu/mailgun'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.mailgun
7
-
8
- const provider = new MailgunEmailProvider({
9
- apiKey: env.key,
10
- domain: env.domain,
11
- username: env.username,
12
- from: env.from,
13
- })
14
-
15
- async function send(options: EmailOptions, css?: string) {
16
- return sendEmail(options, provider, 'Mailgun', css)
17
- }
18
-
19
- export { send as Send, send }
@@ -1,18 +0,0 @@
1
- import { MailjetEmailProvider } from '@novu/mailjet'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.mailjet
7
-
8
- const provider = new MailjetEmailProvider({
9
- apiKey: env.key,
10
- apiSecret: env.secret,
11
- from: env.from,
12
- })
13
-
14
- async function send(options: EmailOptions, css?: string) {
15
- return sendEmail(options, provider, 'Mailjet', css)
16
- }
17
-
18
- export { send as Send, send }
@@ -1,17 +0,0 @@
1
- import { MandrillProvider } from '@novu/mandrill'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.mandrill
7
-
8
- const provider = new MandrillProvider({
9
- apiKey: env.key,
10
- from: env.from,
11
- })
12
-
13
- async function send(options: EmailOptions, css?: string) {
14
- return sendEmail(options, provider, 'Mandrill', css)
15
- }
16
-
17
- export { send as Send, send }
@@ -1,17 +0,0 @@
1
- import { NetCoreProvider } from '@novu/netcore'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.netcore
7
-
8
- const provider = new NetCoreProvider({
9
- apiKey: env.key,
10
- from: env.from,
11
- })
12
-
13
- async function send(options: EmailOptions, css?: string) {
14
- return sendEmail(options, provider, 'Netcore', css)
15
- }
16
-
17
- export { send as Send, send }
@@ -1,21 +0,0 @@
1
- import { NodemailerProvider } from '@novu/nodemailer'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.nodemailer
7
-
8
- const provider = new NodemailerProvider({
9
- from: env.from,
10
- host: env.host,
11
- user: env.user,
12
- password: env.password,
13
- port: env.port,
14
- secure: env.secure,
15
- })
16
-
17
- async function send(options: EmailOptions, css?: string) {
18
- return sendEmail(options, provider, 'Nodemailer', css)
19
- }
20
-
21
- export { send as Send, send }
@@ -1,17 +0,0 @@
1
- import { PostmarkEmailProvider } from '@novu/postmark'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.postmark
7
-
8
- const provider = new PostmarkEmailProvider({
9
- apiKey: env.key,
10
- from: env.from,
11
- })
12
-
13
- async function send(options: EmailOptions, css?: string) {
14
- return sendEmail(options, provider, 'Postmark', css)
15
- }
16
-
17
- export { send as Send, send }
@@ -1,18 +0,0 @@
1
- import { SendgridEmailProvider } from '@novu/sendgrid'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.sendgrid
7
-
8
- const provider = new SendgridEmailProvider({
9
- apiKey: env.key,
10
- from: env.from,
11
- senderName: env.senderName,
12
- })
13
-
14
- async function send(options: EmailOptions, css?: string) {
15
- return sendEmail(options, provider, 'Sendgrid', css)
16
- }
17
-
18
- export { send as Send, send }
@@ -1,19 +0,0 @@
1
- import { SESEmailProvider } from '@novu/ses'
2
- import type { EmailOptions } from '@stacksjs/types'
3
- import { notification } from '@stacksjs/config'
4
- import { send as sendEmail } from './actions/send'
5
-
6
- const env = notification.email.ses
7
-
8
- const provider = new SESEmailProvider({
9
- region: env.region,
10
- accessKeyId: env.key,
11
- secretAccessKey: env.secret,
12
- from: env.from,
13
- })
14
-
15
- async function send(options: EmailOptions, css?: string) {
16
- return sendEmail(options, provider, 'Ses', css)
17
- }
18
-
19
- export { send as Send, send }
@@ -1,19 +0,0 @@
1
- import { Novu } from '@novu/node'
2
- import { notification } from '@stacksjs/config'
3
- import type { ExpoPushNotificationOptions } from '@stacksjs/types'
4
- import { ResultAsync } from '@stacksjs/error-handling'
5
- import { italic } from '@stacksjs/cli'
6
-
7
- const novu = new Novu(notification.novu.key)
8
-
9
- function send(options: ExpoPushNotificationOptions) {
10
- return ResultAsync.fromPromise(
11
- novu.trigger(options.eventName, {
12
- to: options.to,
13
- payload: options.payload,
14
- }),
15
- () => new Error(`Failed to send message using provider: ${italic('Expo')}`),
16
- )
17
- }
18
-
19
- export { send as Send, send }
@@ -1,19 +0,0 @@
1
- import { Novu } from '@novu/node'
2
- import { notification } from '@stacksjs/config'
3
- import type { FCMPushNotificationOptions } from '@stacksjs/types'
4
- import { ResultAsync } from '@stacksjs/error-handling'
5
- import { italic } from '@stacksjs/cli'
6
-
7
- const novu = new Novu(notification.novu.key)
8
-
9
- function send(options: FCMPushNotificationOptions) {
10
- return ResultAsync.fromPromise(
11
- novu.trigger(options.eventName, {
12
- to: options.to,
13
- payload: options.payload,
14
- }),
15
- () => new Error(`Failed to send message using provider: ${italic('FCM')}`),
16
- )
17
- }
18
-
19
- export { send as Send, send }
@@ -1,21 +0,0 @@
1
- import { GupshupSmsProvider } from '@novu/gupshup'
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.gupshup
8
-
9
- const provider = new GupshupSmsProvider({
10
- userId: env.user,
11
- password: env.password,
12
- })
13
-
14
- function send(options: SmsOptions) {
15
- return ResultAsync.fromPromise(
16
- provider.sendMessage(options),
17
- () => new Error(`Failed to send message using provider: ${italic('Gupshup')}`),
18
- )
19
- }
20
-
21
- export { send as Send, send }
@@ -1,8 +0,0 @@
1
- export * as twilio from './twilio'
2
- export * as plivo from './plivo'
3
- export * as nexmo from './nexmo'
4
- export * as sms77 from './sms77'
5
- export * as sns from './sns'
6
- export * as gupshup from './gupshup'
7
- export * as telnyx from './telnyx'
8
- export * as termii from './termii'
@@ -1,22 +0,0 @@
1
- import { NexmoSmsProvider } from '@novu/nexmo'
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.nexmo
8
-
9
- const provider = new NexmoSmsProvider({
10
- apiKey: env.key,
11
- apiSecret: env.secret,
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('Nexmo')}`),
19
- )
20
- }
21
-
22
- export { send as Send, send }
@@ -1,22 +0,0 @@
1
- import { PlivoSmsProvider } from '@novu/plivo'
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.plivo
8
-
9
- const provider = new PlivoSmsProvider({
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('Plivo')}`),
19
- )
20
- }
21
-
22
- export { send as Send, send }
@@ -1,21 +0,0 @@
1
- import { Sms77SmsProvider } from '@novu/sms77'
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.sms77
8
-
9
- const provider = new Sms77SmsProvider({
10
- apiKey: env.key,
11
- from: env.from,
12
- })
13
-
14
- function send(options: SmsOptions) {
15
- return ResultAsync.fromPromise(
16
- provider.sendMessage(options),
17
- () => new Error(`Failed to send message using provider: ${italic('Sms77')}`),
18
- )
19
- }
20
-
21
- export { send as Send, send }
@@ -1,22 +0,0 @@
1
- import { SNSSmsProvider } from '@novu/sns'
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.sns
8
-
9
- const provider = new SNSSmsProvider({
10
- region: env.region,
11
- accessKeyId: env.key,
12
- secretAccessKey: env.secret,
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('SNS')}`),
19
- )
20
- }
21
-
22
- export { send as Send, send }
@@ -1,22 +0,0 @@
1
- import { TelnyxSmsProvider } from '@novu/telnyx'
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.telnyx
8
-
9
- const provider = new TelnyxSmsProvider({
10
- apiKey: env.key,
11
- messageProfileId: env.messageProfileId,
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('Telnyx')}`),
19
- )
20
- }
21
-
22
- export { send as Send, send }
@@ -1,21 +0,0 @@
1
- import { TermiiSmsProvider } from '@novu/termii'
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.termii
8
-
9
- const provider = new TermiiSmsProvider({
10
- apiKey: env.key,
11
- from: env.from,
12
- })
13
-
14
- function send(options: SmsOptions) {
15
- return ResultAsync.fromPromise(
16
- provider.sendMessage(options),
17
- () => new Error(`Failed to send message using provider: ${italic('Termii')}`),
18
- )
19
- }
20
-
21
- export { send as Send, send }
@@ -1,22 +0,0 @@
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 }