stacks 0.47.4 โ†’ 0.48.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/buddy/art/social.png +0 -0
  2. package/buddy/package.json +1 -1
  3. package/buddy/src/commands/make.ts +27 -12
  4. package/buddy/src/commands/test.ts +40 -2
  5. package/core/actions/package.json +2 -2
  6. package/core/actions/src/helpers/utils.ts +29 -3
  7. package/core/actions/src/make.ts +37 -6
  8. package/core/actions/src/test-coverage.ts +1 -1
  9. package/core/actions/src/test-feature.ts +5 -0
  10. package/core/actions/src/test-unit.ts +5 -0
  11. package/core/ai/package.json +1 -1
  12. package/core/alias/package.json +1 -1
  13. package/core/arrays/package.json +1 -1
  14. package/core/auth/package.json +1 -1
  15. package/core/build/package.json +3 -3
  16. package/core/cache/package.json +3 -3
  17. package/core/chat/README.md +33 -40
  18. package/core/chat/package.json +1 -1
  19. package/core/cli/package.json +1 -1
  20. package/core/cloud/package.json +1 -1
  21. package/core/collections/package.json +1 -1
  22. package/core/config/package.json +1 -1
  23. package/core/dashboard/package.json +1 -1
  24. package/core/database/package.json +1 -1
  25. package/core/datetime/package.json +1 -1
  26. package/core/desktop/package.json +1 -1
  27. package/core/docs/node_modules/.bin/vitepress +2 -2
  28. package/core/docs/package.json +2 -2
  29. package/core/domains/package.json +1 -1
  30. package/core/drivers/package.json +1 -1
  31. package/core/email/README.md +101 -35
  32. package/core/email/package.json +1 -1
  33. package/core/error-handling/package.json +2 -2
  34. package/core/events/package.json +1 -1
  35. package/core/git/package.json +1 -1
  36. package/core/health/package.json +1 -1
  37. package/core/lint/node_modules/.bin/eslint +2 -2
  38. package/core/lint/package.json +3 -3
  39. package/core/logging/package.json +1 -1
  40. package/core/modules/package.json +1 -1
  41. package/core/notifications/README.md +7 -2
  42. package/core/notifications/package.json +1 -1
  43. package/core/notifications/src/index.ts +37 -9
  44. package/core/notifications/tests/chat/Slack.test.ts +5 -4
  45. package/core/notifications/tests/email/Mailgun.test.ts +4 -3
  46. package/core/notifications/tests/email/Sendgrid.test.ts +3 -3
  47. package/core/notifications/tests/sms/Twilio.test.ts +3 -3
  48. package/core/objects/package.json +1 -1
  49. package/core/path/package.json +1 -1
  50. package/core/path/src/index.ts +5 -0
  51. package/core/payments/package.json +1 -1
  52. package/core/push/README.md +24 -42
  53. package/core/push/package.json +1 -1
  54. package/core/realtime/package.json +1 -1
  55. package/core/router/package.json +1 -1
  56. package/core/search-engine/package.json +1 -1
  57. package/core/security/package.json +1 -1
  58. package/core/server/package.json +1 -1
  59. package/core/sms/README.md +82 -35
  60. package/core/sms/package.json +1 -1
  61. package/core/storage/package.json +1 -1
  62. package/core/storage/src/index.ts +13 -0
  63. package/core/strings/README.md +10 -2
  64. package/core/strings/package.json +4 -2
  65. package/core/strings/src/case.ts +14 -0
  66. package/core/strings/src/index.ts +4 -97
  67. package/core/strings/src/pluralize.ts +1 -0
  68. package/core/strings/src/utils.ts +80 -0
  69. package/core/strings/src/validation.ts +182 -0
  70. package/core/tables/README.md +109 -0
  71. package/core/tables/examples/vue/App.vue +12 -0
  72. package/core/tables/examples/vue/favicon.png +0 -0
  73. package/core/tables/examples/vue/index.html +20 -0
  74. package/core/tables/examples/web/favicon.png +0 -0
  75. package/core/tables/examples/web/index.html +13 -0
  76. package/core/tables/node_modules/.bin/mkdist +17 -0
  77. package/core/tables/node_modules/.bin/tsc +17 -0
  78. package/core/tables/node_modules/.bin/tsserver +17 -0
  79. package/core/tables/node_modules/.bin/unbuild +17 -0
  80. package/core/tables/package.json +97 -0
  81. package/core/tables/src/cli/index.ts +1 -0
  82. package/core/tables/src/components/Demo.vue +89 -0
  83. package/core/tables/src/components/README.md +111 -0
  84. package/core/tables/src/components/Table.vue +342 -0
  85. package/core/tables/src/components/TableBody.vue +33 -0
  86. package/core/tables/src/components/TableCellActionItems.vue +9 -0
  87. package/core/tables/src/components/TableFilters.vue +703 -0
  88. package/core/tables/src/components/TableHead.vue +87 -0
  89. package/core/tables/src/components/TablePagination.vue +146 -0
  90. package/core/tables/src/components/TableRow.vue +78 -0
  91. package/core/tables/src/components/TableSearch.vue +38 -0
  92. package/core/tables/src/components/Tooltip.vue +10 -0
  93. package/core/tables/src/config/tables.ts +1 -0
  94. package/core/tables/src/docs/index.md +0 -0
  95. package/core/tables/src/functions/README.md +8 -0
  96. package/core/tables/src/functions/dark.ts +3 -0
  97. package/core/tables/src/functions/index.ts +2 -0
  98. package/core/tables/src/functions/table.ts +180 -0
  99. package/core/tables/tests/example.test.ts +7 -0
  100. package/core/testing/node_modules/.bin/vitest +2 -2
  101. package/core/testing/package.json +9 -6
  102. package/core/types/node_modules/.bin/vitepress +2 -2
  103. package/core/types/package.json +4 -3
  104. package/core/types/src/cli.ts +10 -2
  105. package/core/types/src/hashing.ts +15 -0
  106. package/core/types/src/index.ts +2 -0
  107. package/core/types/src/notifications.ts +1 -0
  108. package/core/types/src/reactivity.ts +3 -0
  109. package/core/types/src/tables.ts +48 -0
  110. package/core/ui/node_modules/.bin/vue-tsc +2 -2
  111. package/core/ui/package.json +2 -2
  112. package/core/utils/package.json +1 -1
  113. package/core/x-ray/package.json +1 -1
  114. package/package.json +3 -2
  115. package/tsconfig.json +8 -0
  116. package/vitest.config.ts +2 -0
Binary file
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/buddy",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "Meet Buddy. The Stacks runtime.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,9 @@
1
1
  import { ExitCode } from '@stacksjs/types'
2
2
  import type { CLI, MakeOptions } from '@stacksjs/types'
3
- import { log, prompts } from '@stacksjs/cli'
3
+ import { intro, italic, log, outro, prompts } from '@stacksjs/cli'
4
+
4
5
  import {
6
+ createNotification,
5
7
  invoke,
6
8
  component as makeComponent,
7
9
  database as makeDatabase,
@@ -9,9 +11,9 @@ import {
9
11
  fx as makeFunction,
10
12
  language as makeLanguage,
11
13
  migration as makeMigration,
12
- notification as makeNotification,
13
14
  page as makePage,
14
15
  stack as makeStack,
16
+
15
17
  } from '@stacksjs/actions/make'
16
18
 
17
19
  async function make(buddy: CLI) {
@@ -77,7 +79,7 @@ async function make(buddy: CLI) {
77
79
 
78
80
  buddy
79
81
  .command('make:component', descriptions.component)
80
- .option('--n, -name', 'The name of the component')
82
+ .option('-n, --name', 'The name of the component')
81
83
  .option('--debug', descriptions.debug, { default: false })
82
84
  .action(async (options: MakeOptions) => {
83
85
  const name = buddy.args[0] || options.name
@@ -93,7 +95,7 @@ async function make(buddy: CLI) {
93
95
 
94
96
  buddy
95
97
  .command('make:database', descriptions.database)
96
- .option('--n, -name', 'The name of the database')
98
+ .option('-n, --name', 'The name of the database')
97
99
  .option('--debug', descriptions.debug, { default: false })
98
100
  .action(async (options: MakeOptions) => {
99
101
  const name = buddy.args[0] || options.name
@@ -109,7 +111,7 @@ async function make(buddy: CLI) {
109
111
 
110
112
  buddy
111
113
  .command('make:migration', descriptions.migration)
112
- .option('--n, -name', 'The name of the migration')
114
+ .option('-n, --name', 'The name of the migration')
113
115
  .option('--debug', descriptions.debug, { default: false })
114
116
  .action(async (options: MakeOptions) => {
115
117
  const name = buddy.args[0] || options.name
@@ -125,7 +127,7 @@ async function make(buddy: CLI) {
125
127
 
126
128
  buddy
127
129
  .command('make:factory', descriptions.factory)
128
- .option('--n, -name', 'The name of the factory')
130
+ .option('-n, --name', 'The name of the factory')
129
131
  .option('--debug', descriptions.debug, { default: false })
130
132
  .action(async (options: MakeOptions) => {
131
133
  const name = buddy.args[0] || options.name
@@ -141,7 +143,7 @@ async function make(buddy: CLI) {
141
143
 
142
144
  buddy
143
145
  .command('make:page', descriptions.page)
144
- .option('--n, -name', 'The name of the page')
146
+ .option('-n, --name', 'The name of the page')
145
147
  .option('--debug', descriptions.debug, { default: false })
146
148
  .action(async (options: MakeOptions) => {
147
149
  const name = buddy.args[0] || options.name
@@ -157,7 +159,7 @@ async function make(buddy: CLI) {
157
159
 
158
160
  buddy
159
161
  .command('make:function', descriptions.function)
160
- .option('--n, -name', 'The name of the function')
162
+ .option('-n, --name', 'The name of the function')
161
163
  .option('--debug', descriptions.debug, { default: false })
162
164
  .action(async (options: MakeOptions) => {
163
165
  await makeFunction(options)
@@ -165,7 +167,7 @@ async function make(buddy: CLI) {
165
167
 
166
168
  buddy
167
169
  .command('make:lang', descriptions.language)
168
- .option('--n, -name', 'The name of the language')
170
+ .option('-n, --name', 'The name of the language')
169
171
  .option('--debug', descriptions.debug, { default: false })
170
172
  .action(async (options: MakeOptions) => {
171
173
  const name = buddy.args[0] || options.name
@@ -181,9 +183,14 @@ async function make(buddy: CLI) {
181
183
 
182
184
  buddy
183
185
  .command('make:notification', descriptions.notification)
184
- .option('--n, -name', 'The name of the notification')
186
+ .option('-n, --name', 'The name of the notification')
187
+ .option('-e, --email', 'Is it an email notification?', { default: true })
188
+ .option('-c, --chat', 'Is it a chat notification?', { default: false })
189
+ .option('-s, --sms', 'Is it a SMS notification?', { default: false })
185
190
  .option('--debug', descriptions.debug, { default: false })
186
191
  .action(async (options: MakeOptions) => {
192
+ const perf = intro('buddy make:notification')
193
+
187
194
  const name = buddy.args[0] || options.name
188
195
  options.name = name
189
196
 
@@ -192,12 +199,20 @@ async function make(buddy: CLI) {
192
199
  process.exit()
193
200
  }
194
201
 
195
- await makeNotification(options)
202
+ const result = await createNotification(options)
203
+
204
+ if (!result) {
205
+ outro('While running the make:notification command, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
206
+ process.exit()
207
+ }
208
+
209
+ outro(`Created your ${italic(name)} notification.`, { startTime: perf, useSeconds: true })
210
+ process.exit(ExitCode.Success)
196
211
  })
197
212
 
198
213
  buddy
199
214
  .command('make:stack', descriptions.stack)
200
- .option('--n, -name', 'The name of the stack')
215
+ .option('-n, --name', 'The name of the stack')
201
216
  .option('--debug', descriptions.debug, { default: false })
202
217
  .action(async (options: MakeOptions) => {
203
218
  const name = buddy.args[0] || options.name
@@ -11,6 +11,9 @@ async function test(buddy: CLI) {
11
11
  coverage: 'Generates a test coverage report',
12
12
  ui: 'Runs your test suite in the browser',
13
13
  debug: 'Enable debug mode',
14
+ unit: 'Runs your unit tests',
15
+ feature: 'Runs your feature tests',
16
+ showReport: 'Show the test report',
14
17
  }
15
18
 
16
19
  buddy
@@ -29,6 +32,42 @@ async function test(buddy: CLI) {
29
32
  outro('Finished running tests', { startTime: perf, useSeconds: true })
30
33
  })
31
34
 
35
+ buddy
36
+ .command('test:unit', descriptions.unit)
37
+ .option('--debug', descriptions.debug, { default: false })
38
+ .action(async (options: TestOptions) => {
39
+ const perf = intro('buddy test:unit')
40
+ const result = await runAction(Action.TestUnit, { ...options, debug: true, cwd: projectPath() })
41
+
42
+ if (result.isErr()) {
43
+ outro('While running `buddy test:unit`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
44
+ process.exit()
45
+ }
46
+
47
+ outro('Finished running unit tests', { startTime: perf, useSeconds: true })
48
+ })
49
+
50
+ buddy
51
+ .command('test:feature', descriptions.feature)
52
+ .option('--show-report', descriptions.showReport, { default: false })
53
+ .option('--debug', descriptions.debug, { default: false })
54
+ .action(async (options: TestOptions) => {
55
+ const perf = intro('buddy test:feature')
56
+ let result
57
+
58
+ if (options.showReport)
59
+ result = await runAction(Action.ShowFeatureTestReport, { ...options, debug: true, cwd: projectPath() })
60
+ else
61
+ result = await runAction(Action.TestFeature, { ...options, debug: true, cwd: projectPath() })
62
+
63
+ if (result.isErr()) {
64
+ outro('While running `buddy test:feature`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
65
+ process.exit()
66
+ }
67
+
68
+ outro('Finished running feature tests', { startTime: perf, useSeconds: true })
69
+ })
70
+
32
71
  buddy
33
72
  .command('test:ui', descriptions.command)
34
73
  .option('--debug', descriptions.debug, { default: false })
@@ -62,10 +101,9 @@ async function test(buddy: CLI) {
62
101
 
63
102
  buddy
64
103
  .command('test:coverage', descriptions.coverage)
65
- .option('--debug', descriptions.debug, { default: false })
66
104
  .action(async (options: TestOptions) => {
67
105
  const perf = intro('buddy test:coverage')
68
- const result = await runAction(Action.TestCoverage, options)
106
+ const result = await runAction(Action.TestCoverage, { ...options, cwd: projectPath(), debug: true })
69
107
 
70
108
  if (result.isErr()) {
71
109
  outro('While running `buddy test:coverage`, there was an issue', { startTime: perf, useSeconds: true, isError: true }, result.error)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/actions",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks actions.",
7
7
  "author": "Chris Breuer",
@@ -55,7 +55,7 @@
55
55
  "@stacksjs/types": "workspace:*",
56
56
  "@stacksjs/utils": "workspace:*",
57
57
  "markdown-it": "^13.0.1",
58
- "vue-component-meta": "^1.0.18"
58
+ "vue-component-meta": "^1.0.19"
59
59
  },
60
60
  "dependencies": {
61
61
  "@stacksjs/strings": "workspace:*",
@@ -1,10 +1,31 @@
1
1
  import storage from '@stacksjs/storage'
2
- import { runCommand, runCommands } from '@stacksjs/cli'
2
+ import { log, runCommand, runCommands } from '@stacksjs/cli'
3
3
  import { actionsPath, functionsPath } from '@stacksjs/path'
4
4
  import type { CliOptions, CommandResult } from '@stacksjs/types'
5
5
  import type { Err, Result } from '@stacksjs/error-handling'
6
6
  import { err } from '@stacksjs/error-handling'
7
7
 
8
+ const parseOptions = (options?: CliOptions) => {
9
+ if (!options)
10
+ return ''
11
+
12
+ const parsedOptions = Object.entries(options).map(([key, value]) => {
13
+ if (typeof value === 'boolean')
14
+ return `--${key}`
15
+ else
16
+ return `--${key}=${value}`
17
+ })
18
+
19
+ // ----= only happens when no flags are passed
20
+ return parsedOptions.join(' ').replace('----=', '')
21
+ }
22
+
23
+ export type ActionResult = Promise<
24
+ Result<CommandResult<string>, Error>
25
+ | Result<CommandResult<string>, Error>[]
26
+ | Err<CommandResult<string>, string>
27
+ >
28
+
8
29
  /**
9
30
  * Run an Action the Stacks way.
10
31
  *
@@ -12,11 +33,16 @@ import { err } from '@stacksjs/error-handling'
12
33
  * @param options The options to pass to the command.
13
34
  * @returns The result of the command.
14
35
  */
15
- export async function runAction(action: string, options?: CliOptions): Promise<Result<CommandResult<string>, Error> | Err<CommandResult<string>, string>> {
36
+ export async function runAction(action: string, options?: CliOptions): ActionResult {
16
37
  if (!hasAction(action))
17
38
  return err(`The specified action "${action}" does not exist.`)
18
39
 
19
- const cmd = `npx esno ${actionsPath(`${action}.ts`)}`
40
+ // we need to parse options here because we need to pass them to the action command
41
+ const opts = parseOptions(options)
42
+ const cmd = `npx esno ${actionsPath(`${action}.ts ${opts}`)}`
43
+
44
+ if (options?.debug)
45
+ log.info('Running command:', cmd, options)
20
46
 
21
47
  return options?.shouldShowSpinner
22
48
  ? await runCommands([cmd], options)
@@ -1,5 +1,5 @@
1
1
  import { italic, log, spawn } from '@stacksjs/cli'
2
- import { writeTextFile } from '@stacksjs/storage'
2
+ import { createFolder, doesFolderExist, writeTextFile } from '@stacksjs/storage'
3
3
  import { resolve } from '@stacksjs/path'
4
4
  import type { MakeOptions } from '@stacksjs/types'
5
5
 
@@ -139,11 +139,6 @@ export async function notification(options: MakeOptions) {
139
139
  }
140
140
  }
141
141
 
142
- export async function createNotification(options: MakeOptions) {
143
- // eslint-disable-next-line no-console
144
- console.log('options', options) // wip
145
- }
146
-
147
142
  export async function page(options: MakeOptions) {
148
143
  try {
149
144
  const name = options.name
@@ -247,3 +242,39 @@ export async function stack(options: MakeOptions) {
247
242
  process.exit()
248
243
  }
249
244
  }
245
+
246
+ export async function createNotification(options: MakeOptions) {
247
+ const name = options.name
248
+ try {
249
+ let importOption = 'EmailOptions'
250
+
251
+ if (!doesFolderExist('notifications'))
252
+ await createFolder('./notifications')
253
+
254
+ if (options.chat)
255
+ importOption = 'ChatOptions'
256
+
257
+ if (options.sms)
258
+ importOption = 'SMSOptions'
259
+
260
+ await writeTextFile({
261
+ path: `./notifications/${name}.ts`,
262
+ data: `import type { ${importOption} } from \'@stacksjs/types\'
263
+
264
+ function content(): string {
265
+ return 'example'
266
+ }
267
+
268
+ function send(): ${importOption} {
269
+ return {
270
+ content: content(),
271
+ }
272
+ }`,
273
+ })
274
+
275
+ return true
276
+ }
277
+ catch (error) {
278
+ return false
279
+ }
280
+ }
@@ -2,4 +2,4 @@ import { NpmScript } from '@stacksjs/types'
2
2
  import { runCommand } from '@stacksjs/cli'
3
3
  import { frameworkPath } from '@stacksjs/path'
4
4
 
5
- await runCommand(NpmScript.TestCoverage, { debug: true, cwd: frameworkPath() })
5
+ await runCommand(NpmScript.TestCoverage, { cwd: frameworkPath(), debug: true })
@@ -0,0 +1,5 @@
1
+ import { NpmScript } from '@stacksjs/types'
2
+ import { runCommand } from '@stacksjs/cli'
3
+ import { frameworkPath } from '@stacksjs/path'
4
+
5
+ await runCommand(NpmScript.TestFeature, { debug: true, cwd: frameworkPath() })
@@ -0,0 +1,5 @@
1
+ import { NpmScript } from '@stacksjs/types'
2
+ import { runCommand } from '@stacksjs/cli'
3
+ import { frameworkPath } from '@stacksjs/path'
4
+
5
+ await runCommand(NpmScript.TestUnit, { debug: true, cwd: frameworkPath() })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/ai",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "Stacks Artificial Intelligence.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/alias",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks aliases.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/arrays",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks array utilities.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/auth",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "A more simplistic way to authenticate.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/build",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks framework build tools and configurations.",
7
7
  "author": "Chris Breuer",
@@ -58,11 +58,11 @@
58
58
  "unplugin-auto-import": "^0.12.1",
59
59
  "unplugin-vue-components": "^0.22.12",
60
60
  "vite": "^4.0.3",
61
- "vite-plugin-inspect": "^0.7.11",
61
+ "vite-plugin-inspect": "^0.7.12",
62
62
  "vite-plugin-pages": "^0.28.0",
63
63
  "vite-plugin-pwa": "^0.14.0",
64
64
  "vite-plugin-vue-layouts": "^0.7.0",
65
- "vite-plugin-vue-markdown": "^0.22.1",
65
+ "vite-plugin-vue-markdown": "^0.22.2",
66
66
  "vite-ssg": "^0.22.1",
67
67
  "vite-ssg-sitemap": "^0.4.3",
68
68
  "vue-docgen-web-types": "^0.1.8",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cache",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks way to test.",
7
7
  "author": "Chris Breuer",
@@ -45,9 +45,9 @@
45
45
  "typecheck": "tsc --noEmit"
46
46
  },
47
47
  "peerDependencies": {
48
- "@aws-sdk/client-dynamodb": "^3.238.0",
48
+ "@aws-sdk/client-dynamodb": "^3.241.0",
49
49
  "@stacksjs/config": "workspace:*",
50
- "@types/memjs": "^1.2.4",
50
+ "@types/memjs": "^1.2.5",
51
51
  "memcached": "^2.2.2",
52
52
  "memjs": "^1.3.0",
53
53
  "redis": "^4.5.1"
@@ -1,62 +1,47 @@
1
- # Stacks Notifications
1
+ # Stacks Chat
2
2
 
3
- wip
3
+ Stacks Chat is driver system for sending messages through chat apps.
4
4
 
5
5
  ## โ˜˜๏ธ Features
6
6
 
7
- wip
8
-
9
- - โšก๏ธ
10
-
11
- wip
7
+ - ๐Ÿ“ฆ Send Chats
12
8
 
13
9
  ## ๐Ÿค– Usage
14
10
 
15
- wip
16
-
17
11
  ```bash
18
- pnpm i -D @stacksjs/notifications
12
+ pnpm i -D @stacksjs/chat
19
13
  ```
20
14
 
21
- Now, you can use it in your project:
15
+ You may now use it in your project:
22
16
 
23
- ```js
24
- import notifications from '@stacksjs/notifications'
17
+ ```ts
18
+ import * as chat from '@stacksjs/chat'
19
+ /* Then choose a driver. E.g for Slack */
20
+ const notification = chat.slack
25
21
 
26
- // wip
27
- ```
28
-
29
- ## ๐Ÿค– Drivers
22
+ notification.send(ChatOptions)
30
23
 
31
- ### Email
24
+ interface ChatOptions {
25
+ webhookUrl: string
26
+ content: string
27
+ }
28
+ ```
32
29
 
33
- - Sendgrid
34
- - Mailgun
35
- - Mailjet
36
- - Netcore
37
- - Nodemailer
38
- - Post Mark
39
- - Ses
40
- - Mandrill
41
- - EmailJS
30
+ ### Drivers
42
31
 
43
- ### SMS
32
+ Drivers are configured with the following environment variables:
44
33
 
45
- - Twilio
46
- - Nexmo
47
- - Gupshup
48
- - Plivo
49
- - SMS77
50
- - SNS
51
- - Telnyx
52
- - Termii
34
+ #### Discord
53
35
 
54
- ### Chat
36
+ - None
55
37
 
56
- - Discord
57
- - Slack
38
+ #### Slack
58
39
 
59
- Learn more in the docs.
40
+ ```bash
41
+ SLACK_APPLICATION_ID=SAID123
42
+ SLACK_CLIENT_ID=SCID123
43
+ SLACK_SECRET_KEY=SSK123
44
+ ```
60
45
 
61
46
  ## ๐Ÿงช Testing
62
47
 
@@ -82,6 +67,14 @@ For casual chit-chat with others using this package:
82
67
 
83
68
  [Join the Stacks Discord Server](https://discord.ow3.org)
84
69
 
70
+ ## ๐Ÿ™๐Ÿผ Credits
71
+
72
+ Many thanks to the following core technologies & people who have contributed to this package:
73
+
74
+ - [Chris Breuer](https://github.com/chrisbbreuer)
75
+ - [Novu](https://novu.co/)
76
+ - [All Contributors](../../contributors)
77
+
85
78
  ## ๐Ÿ“„ License
86
79
 
87
80
  The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks Chat Integration. Easy sending of messages for chat services",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cli",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The simple way to create beautiful CLIs.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/cloud",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks cloud/serverless integration & implementation.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/collections",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks collections.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/config",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks configuration.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/dashboard",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks Dashboard.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/database",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks database integration.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/datetime",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks datetime helpers.",
7
7
  "author": "Chris Breuer",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/desktop",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks Desktop engine.",
7
7
  "author": "Chris Breuer",
@@ -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.33_2r467mdhb7mblpaox4bg7fatdi/node_modules/vitepress/bin/vitepress.js" "$@"
14
+ exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.34_2r467mdhb7mblpaox4bg7fatdi/node_modules/vitepress/bin/vitepress.js" "$@"
15
15
  else
16
- exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.33_2r467mdhb7mblpaox4bg7fatdi/node_modules/vitepress/bin/vitepress.js" "$@"
16
+ exec node "$basedir/../../../../../node_modules/.pnpm/vitepress@1.0.0-alpha.34_2r467mdhb7mblpaox4bg7fatdi/node_modules/vitepress/bin/vitepress.js" "$@"
17
17
  fi
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/docs",
3
3
  "type": "module",
4
- "version": "0.47.4",
4
+ "version": "0.48.2",
5
5
  "packageManager": "pnpm@7.21.0",
6
6
  "description": "The Stacks way to document.",
7
7
  "author": "Chris Breuer",
@@ -43,7 +43,7 @@
43
43
  "typecheck": "tsc --noEmit"
44
44
  },
45
45
  "peerDependencies": {
46
- "vitepress": "1.0.0-alpha.33"
46
+ "vitepress": "1.0.0-alpha.34"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@stacksjs/testing": "workspace:*",