Skip to content

Commit d37b975

Browse files
chore: wip
1 parent e1b95ef commit d37b975

File tree

9 files changed

+38
-40
lines changed

9 files changed

+38
-40
lines changed

app/Actions/ExampleAction.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Action } from '@stacksjs/actions'
2+
import { log } from '@stacksjs/logging'
23

34
export default new Action({
45
name: 'SendWelcomeEmail',
@@ -15,5 +16,5 @@ export default new Action({
1516

1617
function sendEmail({ to, subject, text }: { to: string, subject: string, text: string }) {
1718
log.info('Sending email', { to, subject, text })
18-
return `Welcome email sent to ${email}`
19+
return `Welcome email sent to ${to}`
1920
}

app/Actions/SubscriberEmailAction.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import type { SubscriberEmailRequestType } from '@stacksjs/orm'
22
import { Action } from '@stacksjs/actions'
3-
// import { schema } from '@stacksjs/validation'
4-
// import { epmailSubscribeRequest } from '@stacksjs/validation'
53
import { SubscriberEmail } from '@stacksjs/orm'
64

75
export default new Action({

storage/framework/api/dev.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ if (globalThis.counter === 1)
6161
watchFolders().catch(log.error)
6262
else log.debug(`Skipping watching folders`)
6363

64-
initiateImports()
65-
6664
serve({
6765
port: ports.api || 3008,
6866
timezone: app.timezone || 'UTC',

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// }
1414

1515
export * from '../../../orm/src/types'
16-
export * from './models'
1716
export * from './requests'
1817

1918
export * from './utils'

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

Lines changed: 0 additions & 31 deletions
This file was deleted.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,10 +2640,10 @@ async function writeModelOrmImports(modelFiles: string[]): Promise<void> {
26402640

26412641
const modelName = getModelName(model, modelFile)
26422642

2643-
ormImportString += `export { default as ${modelName} } from '../../../orm/src/models/${modelName}'\n\n`
2643+
ormImportString += `export { default as ${modelName} } from './${modelName}'\n\n`
26442644
}
26452645

2646-
const file = Bun.file(path.frameworkPath(`core/orm/src/models.ts`))
2646+
const file = Bun.file(path.frameworkPath(`orm/src/models/index.ts`))
26472647
const writer = file.writer()
26482648

26492649
writer.write(ormImportString)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
export { default as AccessToken } from './AccessToken'
2+
3+
export { default as Deployment } from './Deployment'
4+
5+
export { default as Error } from './Error'
6+
7+
export { default as FailedJob } from './FailedJob'
8+
9+
export { default as Job } from './Job'
10+
11+
export { default as PaymentMethod } from './PaymentMethod'
12+
13+
export { default as Post } from './Post'
14+
15+
export { default as Product } from './Product'
16+
17+
export { default as Project } from './Project'
18+
19+
export { default as Release } from './Release'
20+
21+
export { default as Subscriber } from './Subscriber'
22+
23+
export { default as SubscriberEmail } from './SubscriberEmail'
24+
25+
export { default as Subscription } from './Subscription'
26+
27+
export { default as Team } from './Team'
28+
29+
export { default as Transaction } from './Transaction'
30+
31+
export { default as User } from './User'

storage/framework/server-auto-imports.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@
159159
"UserType": true,
160160
"UserUpdate": true,
161161
"Users": true,
162-
"UsersTable": true
162+
"UsersTable": true,
163+
"default": true
163164
}
164165
}

storage/framework/types/server-auto-imports.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,5 @@ declare global {
161161
const UserUpdate: typeof import('./../orm/src/models')['UserUpdate']
162162
const Users: typeof import('./../orm/src/models')['Users']
163163
const UsersTable: typeof import('./../orm/src/models')['UsersTable']
164+
const default: typeof import('./../orm/src/models')['default']
164165
}

0 commit comments

Comments
 (0)