Skip to content

Commit 168e383

Browse files
chore: wip
1 parent 1eb406d commit 168e383

File tree

15 files changed

+35
-39
lines changed

15 files changed

+35
-39
lines changed

app/Actions/AI/AskAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Action } from '@stacksjs/actions'
2-
import { schema } from '@stacksjs/validation'
32
import { ask } from '@stacksjs/ai'
3+
import { schema } from '@stacksjs/validation'
44

55
// TODO: this should have been auto-generated
66
type Request = {

app/Actions/InstallAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default new Action({
1010
description: 'This action is used to setup the CLI.',
1111
path: '/install',
1212

13-
handle() {
13+
handle(): string {
1414
const setupScriptContents = `if [ -n "$1" ]; then
1515
# Check if the directory exists
1616
if [ -d "storage/framework/core" ]; then # this is our identifier whether it is a Stacks project

app/Actions/LoginAction.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@ export default new Action({
1414

1515
await request.validate({
1616
email: {
17-
validation: {
18-
rule: schema.string().email(),
19-
message: {
20-
email: 'Email must be a valid email address',
21-
},
17+
rule: schema.string().email(),
18+
message: {
19+
email: 'Email must be a valid email address',
2220
},
2321
},
2422

2523
password: {
26-
validation: {
27-
rule: schema.string().minLength(6).maxLength(255),
28-
message: {
29-
minLength: 'Password must have a minimum of 6 characters',
30-
maxLength: 'Password must have a maximum of 255 characters',
31-
},
24+
rule: schema.string().minLength(6).maxLength(255),
25+
message: {
26+
minLength: 'Password must have a minimum of 6 characters',
27+
maxLength: 'Password must have a maximum of 255 characters',
3228
},
3329
},
3430
})

storage/framework/.biomelintrc-auto-import.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,4 @@
349349
"whenever"
350350
]
351351
}
352-
}
352+
}

storage/framework/core/actions/src/action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface ActionOptions {
1919
enabled?: JobOptions['enabled']
2020
path?: string
2121
requestFile?: string
22-
handle: (options?: Request) => Promise<any>
22+
handle: (options?: Request) => Promise<any> | string | number | boolean
2323
}
2424

2525
export class Action {

storage/framework/core/orm/src/utils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ export async function generateModelString(
10611061

10621062
if (useSoftDeletes) {
10631063
declareFields += `
1064-
public deleted_at: Date | undefined
1064+
public deleted_at: string | undefined
10651065
`
10661066

10671067
constructorFields += `
@@ -1091,14 +1091,14 @@ export async function generateModelString(
10911091

10921092
if (useTimestamps) {
10931093
fieldString += `
1094-
created_at?: Date\n
1095-
updated_at?: Date
1094+
created_at?: string\n
1095+
updated_at?: string
10961096
`
10971097
}
10981098

10991099
if (useSoftDeletes) {
11001100
fieldString += `
1101-
deleted_at?: Date
1101+
deleted_at?: string
11021102
`
11031103
}
11041104

storage/framework/orm/src/models/AccessToken.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export interface PersonalAccessTokensTable {
1919
abilities?: string[]
2020
team_id?: number
2121

22-
created_at?: Date
22+
created_at?: string
2323

24-
updated_at?: Date
24+
updated_at?: string
2525
}
2626

2727
interface AccessTokenResponse {

storage/framework/orm/src/models/Deployment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export interface DeploymentsTable {
2222
terminal_output?: string
2323
user_id?: number
2424

25-
created_at?: Date
25+
created_at?: string
2626

27-
updated_at?: Date
27+
updated_at?: string
2828
}
2929

3030
interface DeploymentResponse {

storage/framework/orm/src/models/Post.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export interface PostsTable {
1717
body?: string
1818
user_id?: number
1919

20-
created_at?: Date
20+
created_at?: string
2121

22-
updated_at?: Date
22+
updated_at?: string
2323
}
2424

2525
interface PostResponse {

storage/framework/orm/src/models/Project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export interface ProjectsTable {
1717
url?: string
1818
status?: string
1919

20-
created_at?: Date
20+
created_at?: string
2121

22-
updated_at?: Date
22+
updated_at?: string
2323
}
2424

2525
interface ProjectResponse {

0 commit comments

Comments
 (0)