Skip to content

Commit eadc89a

Browse files
committed
chore: wip
1 parent 34a9421 commit eadc89a

File tree

444 files changed

+7561
-4851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+7561
-4851
lines changed

.github/renovate.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
{
2-
"extends": [
3-
"@ow3",
4-
"regexManagers:biomeVersions"
5-
]
2+
"extends": ["@ow3", "regexManagers:biomeVersions"]
63
}

app/Actions/Buddy/CommandsAction.ts

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default new Action({
1919
{
2020
signature: 'buddy --help',
2121
description: 'View help menu',
22-
notes: 'Please note: you may suffix any command with the e.g `command --help` flag to review the help menu',
22+
notes:
23+
'Please note: you may suffix any command with the e.g `command --help` flag to review the help menu',
2324
synopsis: 'buddy --help',
2425
aliases: [],
2526
arguments: [],
@@ -135,7 +136,8 @@ export default new Action({
135136
},
136137
{
137138
signature: 'buddy dev -i',
138-
description: 'Prompts any of the dev servers (components, functions, views, or docs)',
139+
description:
140+
'Prompts any of the dev servers (components, functions, views, or docs)',
139141
notes: '',
140142
synopsis: 'buddy dev -i',
141143
aliases: [],
@@ -207,7 +209,8 @@ export default new Action({
207209
},
208210
{
209211
signature: 'buddy dev docs',
210-
description: 'Also starts the local docs dev server (colon is optional)',
212+
description:
213+
'Also starts the local docs dev server (colon is optional)',
211214
notes: '',
212215
synopsis: 'buddy dev docs',
213216
aliases: [],
@@ -279,7 +282,8 @@ export default new Action({
279282
},
280283
{
281284
signature: 'buddy build:web-components',
282-
description: 'Builds framework-agnostic Web Component library (i.e. Custom Elements)',
285+
description:
286+
'Builds framework-agnostic Web Component library (i.e. Custom Elements)',
283287
notes: '',
284288
synopsis: 'buddy build:web-components',
285289
aliases: [],
@@ -337,7 +341,8 @@ export default new Action({
337341
arguments: [
338342
{
339343
name: 'name',
340-
description: 'The function name to be created. Must be in <snake-case>',
344+
description:
345+
'The function name to be created. Must be in <snake-case>',
341346
value_required: true,
342347
},
343348
],
@@ -352,7 +357,8 @@ export default new Action({
352357
arguments: [
353358
{
354359
name: 'name',
355-
description: 'The component to be created. Must be in <snake-case>',
360+
description:
361+
'The component to be created. Must be in <snake-case>',
356362
value_required: true,
357363
},
358364
],
@@ -450,7 +456,8 @@ export default new Action({
450456
},
451457
{
452458
signature: 'buddy make:lang',
453-
description: 'Bootstraps a new yml language file under `lang/<name>.yml`',
459+
description:
460+
'Bootstraps a new yml language file under `lang/<name>.yml`',
454461
notes: '',
455462
synopsis: 'buddy make:lang <name>',
456463
aliases: [],
@@ -505,7 +512,8 @@ export default new Action({
505512
arguments: [
506513
{
507514
name: 'site',
508-
description: 'The name of the site to list all of its DNS records',
515+
description:
516+
'The name of the site to list all of its DNS records',
509517
value_required: true,
510518
},
511519
],
@@ -546,7 +554,8 @@ export default new Action({
546554
},
547555
{
548556
signature: 'buddy release',
549-
description: 'Creates the releases for the stack & triggers the Release Action (workflow)',
557+
description:
558+
'Creates the releases for the stack & triggers the Release Action (workflow)',
550559
notes: '',
551560
synopsis: 'buddy release',
552561
aliases: [],
@@ -573,7 +582,8 @@ export default new Action({
573582
},
574583
{
575584
signature: 'buddy undeploy',
576-
description: 'Be careful: "undeploys" removes/deletes your deployed resources',
585+
description:
586+
'Be careful: "undeploys" removes/deletes your deployed resources',
577587
notes: '',
578588
synopsis: 'buddy undeploy',
579589
aliases: [],
@@ -591,7 +601,8 @@ export default new Action({
591601
},
592602
{
593603
signature: 'buddy cloud:cleanup',
594-
description: 'Removes cloud setup & cleans up all potentially leftover resources',
604+
description:
605+
'Removes cloud setup & cleans up all potentially leftover resources',
595606
notes: '',
596607
synopsis: 'buddy cloud:cleanup',
597608
aliases: [],
@@ -645,7 +656,8 @@ export default new Action({
645656
},
646657
{
647658
signature: 'buddy generate:types',
648-
description: 'Generates types for your components, functions, & views',
659+
description:
660+
'Generates types for your components, functions, & views',
649661
notes: '',
650662
synopsis: 'buddy generate:types',
651663
aliases: [],
@@ -654,7 +666,8 @@ export default new Action({
654666
},
655667
{
656668
signature: 'buddy generate:entries',
657-
description: 'Generates entry files for components, functions, & views',
669+
description:
670+
'Generates entry files for components, functions, & views',
658671
notes: '',
659672
synopsis: 'buddy generate:entries',
660673
aliases: [],
@@ -708,7 +721,8 @@ export default new Action({
708721
},
709722
{
710723
signature: 'buddy types:generate',
711-
description: 'Generates types for your components, functions, & views',
724+
description:
725+
'Generates types for your components, functions, & views',
712726
notes: '',
713727
synopsis: 'buddy types:generate',
714728
aliases: [],
@@ -717,7 +731,8 @@ export default new Action({
717731
},
718732
{
719733
signature: 'buddy types:fix',
720-
description: 'Auto-fixes types for your components, functions, & views',
734+
description:
735+
'Auto-fixes types for your components, functions, & views',
721736
notes: '',
722737
synopsis: 'buddy types:fix',
723738
aliases: [],

app/Actions/Buddy/VersionsAction.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ export default new Action({
66

77
handle() {
88
return {
9-
versions: [
10-
'1.0',
11-
],
9+
versions: ['1.0'],
1210
}
1311
},
1412
})

app/Actions/ExampleAction.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ export default new Action({
1313
},
1414
})
1515

16-
function sendEmail({ to, subject, text }: { to: string, subject: string, text: string }) {
16+
function sendEmail({
17+
to,
18+
subject,
19+
text,
20+
}: { to: string; subject: string; text: string }) {
1721
log.info('Sending email', { to, subject, text })
1822
return `Welcome email sent to ${email}`
1923
}

app/Actions/LogAction.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Action } from '@stacksjs/actions'
2-
import { rule } from '@stacksjs/validation'
32
import { log } from '@stacksjs/logging'
3+
import { rule } from '@stacksjs/validation'
44

55
interface Request {
66
message: string
@@ -9,7 +9,8 @@ interface Request {
99

1010
export default new Action({
1111
name: 'Dummy Logger',
12-
description: 'This action is used to demo how to POST to a server and upon success, log a message.',
12+
description:
13+
'This action is used to demo how to POST to a server and upon success, log a message.',
1314

1415
// the request object is optional, but if it is provided, it will be used for validation
1516
fields: {
@@ -26,8 +27,7 @@ export default new Action({
2627

2728
// handle(request: { message: string, level: 'info' | 'warn' | 'error' }) {
2829
handle(request?: Request) {
29-
if (!request)
30-
return 'No request was provided.'
30+
if (!request) return 'No request was provided.'
3131

3232
// TODO: need to vine validate
3333
log[request.level](request.message)

app/Commands/Inspire.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ interface InspireOptions {
1313
export default function (cli: CLI) {
1414
cli
1515
.command('inspire', 'Inspire yourself with a random quote')
16-
.option('--two, -t', 'Inspire yourself with two random quotes', { default: false })
16+
.option('--two, -t', 'Inspire yourself with two random quotes', {
17+
default: false,
18+
})
1719
.alias('insp')
1820
.action((options: InspireOptions) => {
1921
if (options.two)
2022
// @ts-expect-error - this is safe because we hard-coded the quotes
21-
quotes.random(2).map((quote, index) => log.info(`${index + 1}. ${quote}`))
22-
else
23-
log.info(quotes.random())
23+
quotes
24+
.random(2)
25+
.map((quote, index) => log.info(`${index + 1}. ${quote}`))
26+
else log.info(quotes.random())
2427

2528
log.success('Have a great day!')
2629
process.exit(ExitCode.Success)
@@ -37,7 +40,10 @@ export default function (cli: CLI) {
3740
})
3841

3942
cli.on('inspire:*', () => {
40-
log.error('Invalid command: %s\nSee --help for a list of available commands.', cli.args.join(' '))
43+
log.error(
44+
'Invalid command: %s\nSee --help for a list of available commands.',
45+
cli.args.join(' '),
46+
)
4147
process.exit(1)
4248
})
4349

app/Jobs/ExampleJob.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
import { log } from '@stacksjs/cli'
12
import { Job } from '@stacksjs/queue'
23
import { Every } from '@stacksjs/types'
3-
import { log } from '@stacksjs/cli'
44

55
export default new Job({
66
name: 'Example Job', // optional, defaults to the file name
77
description: 'A demo (cron) job that runs every minute', // optional
88
tries: 3, // optional, defaults to 3 retries, in case of failures
99
backoff: 3, // optional, defaults to 3-second delays between retries
1010
rate: Every.Minute, // optional, '* * * * *' in cron syntax
11-
handle: () => { // action: 'SendWelcomeEmail', // instead of handle, you may target an action or `action: () => {`
11+
handle: () => {
12+
// action: 'SendWelcomeEmail', // instead of handle, you may target an action or `action: () => {`
1213
log.info('This message logs every minute') // unless triggered via a route.job() call, in which case it logs once
1314
},
1415
})

app/Jobs/ExampleTwoJob.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
import { log } from '@stacksjs/cli'
12
import { Job } from '@stacksjs/queue'
23
import { Every } from '@stacksjs/types'
3-
import { log } from '@stacksjs/cli'
44

55
export default new Job({
66
rate: Every.TwoMinutes, // optional, '*/2 * * * *' in cron syntax
7-
handle: () => { // action: 'SendWelcomeEmail', // instead of handle, you may target an action or `action: () => {`
7+
handle: () => {
8+
// action: 'SendWelcomeEmail', // instead of handle, you may target an action or `action: () => {`
89
log.info('This cron job log this message every two minutes')
9-
log.info('Please note, any job may also be dispatched individually, or scheduled via ./app/Schedule')
10+
log.info(
11+
'Please note, any job may also be dispatched individually, or scheduled via ./app/Schedule',
12+
)
1013
},
1114
})

app/Models/Post.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { faker } from '@stacksjs/faker'
2-
import { schema } from '@stacksjs/validation'
32
import type { Model } from '@stacksjs/types'
3+
import { schema } from '@stacksjs/validation'
44

55
export default {
66
name: 'Post', // defaults to the sanitized file name
@@ -10,7 +10,8 @@ export default {
1010

1111
traits: {
1212
useTimestamps: true, // defaults to true
13-
useSeeder: { // defaults to a count of 10
13+
useSeeder: {
14+
// defaults to a count of 10
1415
count: 10,
1516
},
1617
},

app/Models/Subscriber.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { faker } from '@stacksjs/faker'
2-
import { schema } from '@stacksjs/validation'
32
import type { Model } from '@stacksjs/types'
3+
import { schema } from '@stacksjs/validation'
44

55
export default {
66
name: 'Subscriber', // defaults to the sanitized file name
@@ -10,7 +10,8 @@ export default {
1010

1111
traits: {
1212
useTimestamps: true, // defaults to true
13-
useSeeder: { // defaults to a count of 10
13+
useSeeder: {
14+
// defaults to a count of 10
1415
count: 10,
1516
},
1617
},

0 commit comments

Comments
 (0)