stacks 0.47.4 → 0.48.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/buddy/art/social.png +0 -0
- package/buddy/package.json +1 -1
- package/buddy/src/commands/make.ts +27 -12
- package/buddy/src/commands/test.ts +40 -2
- package/core/actions/package.json +2 -2
- package/core/actions/src/helpers/utils.ts +21 -1
- package/core/actions/src/make.ts +37 -6
- package/core/actions/src/test-coverage.ts +1 -1
- package/core/actions/src/test-feature.ts +5 -0
- package/core/actions/src/test-unit.ts +5 -0
- package/core/ai/package.json +1 -1
- package/core/alias/package.json +1 -1
- package/core/arrays/package.json +1 -1
- package/core/auth/package.json +1 -1
- package/core/build/package.json +3 -3
- package/core/cache/package.json +3 -3
- package/core/chat/README.md +33 -40
- package/core/chat/package.json +1 -1
- package/core/cli/package.json +1 -1
- package/core/cloud/package.json +1 -1
- package/core/collections/package.json +1 -1
- package/core/config/package.json +1 -1
- package/core/dashboard/package.json +1 -1
- package/core/database/package.json +1 -1
- package/core/datetime/package.json +1 -1
- package/core/desktop/package.json +1 -1
- package/core/docs/node_modules/.bin/vitepress +2 -2
- package/core/docs/package.json +2 -2
- package/core/domains/package.json +1 -1
- package/core/drivers/package.json +1 -1
- package/core/email/README.md +101 -35
- package/core/email/package.json +1 -1
- package/core/error-handling/package.json +2 -2
- package/core/events/package.json +1 -1
- package/core/git/package.json +1 -1
- package/core/health/package.json +1 -1
- package/core/lint/node_modules/.bin/eslint +2 -2
- package/core/lint/package.json +3 -3
- package/core/logging/package.json +1 -1
- package/core/modules/package.json +1 -1
- package/core/notifications/README.md +7 -2
- package/core/notifications/package.json +1 -1
- package/core/notifications/src/index.ts +37 -9
- package/core/notifications/tests/chat/Slack.test.ts +5 -4
- package/core/notifications/tests/email/Mailgun.test.ts +4 -3
- package/core/notifications/tests/email/Sendgrid.test.ts +3 -3
- package/core/notifications/tests/sms/Twilio.test.ts +3 -3
- package/core/objects/package.json +1 -1
- package/core/path/package.json +1 -1
- package/core/path/src/index.ts +5 -0
- package/core/payments/package.json +1 -1
- package/core/push/README.md +24 -42
- package/core/push/package.json +1 -1
- package/core/realtime/package.json +1 -1
- package/core/router/package.json +1 -1
- package/core/search-engine/package.json +1 -1
- package/core/security/package.json +1 -1
- package/core/server/package.json +1 -1
- package/core/sms/README.md +82 -35
- package/core/sms/package.json +1 -1
- package/core/storage/package.json +1 -1
- package/core/storage/src/index.ts +13 -0
- package/core/strings/README.md +10 -2
- package/core/strings/package.json +4 -2
- package/core/strings/src/case.ts +14 -0
- package/core/strings/src/index.ts +4 -97
- package/core/strings/src/pluralize.ts +1 -0
- package/core/strings/src/utils.ts +80 -0
- package/core/strings/src/validation.ts +182 -0
- package/core/tables/README.md +109 -0
- package/core/tables/examples/vue/App.vue +12 -0
- package/core/tables/examples/vue/favicon.png +0 -0
- package/core/tables/examples/vue/index.html +20 -0
- package/core/tables/examples/web/favicon.png +0 -0
- package/core/tables/examples/web/index.html +13 -0
- package/core/tables/node_modules/.bin/mkdist +17 -0
- package/core/tables/node_modules/.bin/tsc +17 -0
- package/core/tables/node_modules/.bin/tsserver +17 -0
- package/core/tables/node_modules/.bin/unbuild +17 -0
- package/core/tables/package.json +97 -0
- package/core/tables/src/cli/index.ts +1 -0
- package/core/tables/src/components/Demo.vue +89 -0
- package/core/tables/src/components/README.md +111 -0
- package/core/tables/src/components/Table.vue +342 -0
- package/core/tables/src/components/TableBody.vue +33 -0
- package/core/tables/src/components/TableCellActionItems.vue +9 -0
- package/core/tables/src/components/TableFilters.vue +703 -0
- package/core/tables/src/components/TableHead.vue +87 -0
- package/core/tables/src/components/TablePagination.vue +146 -0
- package/core/tables/src/components/TableRow.vue +78 -0
- package/core/tables/src/components/TableSearch.vue +38 -0
- package/core/tables/src/components/Tooltip.vue +10 -0
- package/core/tables/src/config/tables.ts +1 -0
- package/core/tables/src/docs/index.md +0 -0
- package/core/tables/src/functions/README.md +8 -0
- package/core/tables/src/functions/dark.ts +3 -0
- package/core/tables/src/functions/index.ts +2 -0
- package/core/tables/src/functions/table.ts +180 -0
- package/core/tables/tests/example.test.ts +7 -0
- package/core/testing/node_modules/.bin/vitest +2 -2
- package/core/testing/package.json +9 -6
- package/core/types/node_modules/.bin/vitepress +2 -2
- package/core/types/package.json +3 -3
- package/core/types/src/cli.ts +10 -2
- package/core/types/src/hashing.ts +15 -0
- package/core/types/src/index.ts +2 -0
- package/core/types/src/notifications.ts +1 -0
- package/core/types/src/reactivity.ts +3 -0
- package/core/types/src/tables.ts +48 -0
- package/core/ui/node_modules/.bin/vue-tsc +2 -2
- package/core/ui/package.json +2 -2
- package/core/utils/package.json +1 -1
- package/core/x-ray/package.json +1 -1
- package/package.json +3 -2
- package/tsconfig.json +8 -0
- package/vitest.config.ts +2 -0
package/buddy/art/social.png
CHANGED
|
Binary file
|
package/buddy/package.json
CHANGED
|
@@ -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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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('
|
|
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
|
|
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('
|
|
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.
|
|
4
|
+
"version": "0.48.1",
|
|
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.
|
|
58
|
+
"vue-component-meta": "^1.0.19"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@stacksjs/strings": "workspace:*",
|
|
@@ -5,6 +5,21 @@ 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
|
+
|
|
8
23
|
/**
|
|
9
24
|
* Run an Action the Stacks way.
|
|
10
25
|
*
|
|
@@ -16,7 +31,12 @@ export async function runAction(action: string, options?: CliOptions): Promise<R
|
|
|
16
31
|
if (!hasAction(action))
|
|
17
32
|
return err(`The specified action "${action}" does not exist.`)
|
|
18
33
|
|
|
19
|
-
|
|
34
|
+
// we need to parse options here because we need to pass them to the action command
|
|
35
|
+
const opts = parseOptions(options)
|
|
36
|
+
const cmd = `npx esno ${actionsPath(`${action}.ts ${opts}`)}`
|
|
37
|
+
|
|
38
|
+
// eslint-disable-next-line no-console
|
|
39
|
+
console.log('Running command:', cmd, options)
|
|
20
40
|
|
|
21
41
|
return options?.shouldShowSpinner
|
|
22
42
|
? await runCommands([cmd], options)
|
package/core/actions/src/make.ts
CHANGED
|
@@ -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, {
|
|
5
|
+
await runCommand(NpmScript.TestCoverage, { cwd: frameworkPath(), debug: true })
|
package/core/ai/package.json
CHANGED
package/core/alias/package.json
CHANGED
package/core/arrays/package.json
CHANGED
package/core/auth/package.json
CHANGED
package/core/build/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/build",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.1",
|
|
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.
|
|
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.
|
|
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",
|
package/core/cache/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cache",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.1",
|
|
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.
|
|
48
|
+
"@aws-sdk/client-dynamodb": "^3.241.0",
|
|
49
49
|
"@stacksjs/config": "workspace:*",
|
|
50
|
-
"@types/memjs": "^1.2.
|
|
50
|
+
"@types/memjs": "^1.2.5",
|
|
51
51
|
"memcached": "^2.2.2",
|
|
52
52
|
"memjs": "^1.3.0",
|
|
53
53
|
"redis": "^4.5.1"
|
package/core/chat/README.md
CHANGED
|
@@ -1,62 +1,47 @@
|
|
|
1
|
-
# Stacks
|
|
1
|
+
# Stacks Chat
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Stacks Chat is driver system for sending messages through chat apps.
|
|
4
4
|
|
|
5
5
|
## ☘️ Features
|
|
6
6
|
|
|
7
|
-
|
|
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/
|
|
12
|
+
pnpm i -D @stacksjs/chat
|
|
19
13
|
```
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
You may now use it in your project:
|
|
22
16
|
|
|
23
|
-
```
|
|
24
|
-
import
|
|
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
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 🤖 Drivers
|
|
22
|
+
notification.send(ChatOptions)
|
|
30
23
|
|
|
31
|
-
|
|
24
|
+
interface ChatOptions {
|
|
25
|
+
webhookUrl: string
|
|
26
|
+
content: string
|
|
27
|
+
}
|
|
28
|
+
```
|
|
32
29
|
|
|
33
|
-
|
|
34
|
-
- Mailgun
|
|
35
|
-
- Mailjet
|
|
36
|
-
- Netcore
|
|
37
|
-
- Nodemailer
|
|
38
|
-
- Post Mark
|
|
39
|
-
- Ses
|
|
40
|
-
- Mandrill
|
|
41
|
-
- EmailJS
|
|
30
|
+
### Drivers
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
Drivers are configured with the following environment variables:
|
|
44
33
|
|
|
45
|
-
|
|
46
|
-
- Nexmo
|
|
47
|
-
- Gupshup
|
|
48
|
-
- Plivo
|
|
49
|
-
- SMS77
|
|
50
|
-
- SNS
|
|
51
|
-
- Telnyx
|
|
52
|
-
- Termii
|
|
34
|
+
#### Discord
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
- None
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
- Slack
|
|
38
|
+
#### Slack
|
|
58
39
|
|
|
59
|
-
|
|
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.
|
package/core/chat/package.json
CHANGED
package/core/cli/package.json
CHANGED
package/core/cloud/package.json
CHANGED
package/core/config/package.json
CHANGED
|
@@ -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.34_2r467mdhb7mblpaox4bg7fatdi/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.34_2r467mdhb7mblpaox4bg7fatdi/node_modules/vitepress/bin/vitepress.js" "$@"
|
|
17
17
|
fi
|
package/core/docs/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/docs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.48.1",
|
|
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.
|
|
46
|
+
"vitepress": "1.0.0-alpha.34"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@stacksjs/testing": "workspace:*",
|