Skip to content

Commit 59b4828

Browse files
committed
chore: wip
1 parent 457cda6 commit 59b4828

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

storage/framework/core/actions/src/orm/generate-model.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function generateApiRoutes(modelFiles: string[]) {
9595
}
9696

9797
async function lookupFile(fileName: string): Promise<string | null> {
98-
const ormDirectory = path.builtUserActionsPath()
98+
const ormDirectory = path.builtUserActionsPath('src')
9999
const filePath = path.join(ormDirectory, fileName)
100100
const pathExists = await fs.existsSync(filePath)
101101

@@ -365,7 +365,7 @@ async function writeOrmActions(apiRoute: string, modelName: String): Promise<voi
365365
})
366366
`
367367

368-
const file = Bun.file(path.builtUserActionsPath(`${modelName}${formattedApiRoute}OrmAction.ts`))
368+
const file = Bun.file(path.builtUserActionsPath(`src/${modelName}${formattedApiRoute}OrmAction.ts`))
369369

370370
const writer = file.writer()
371371

@@ -488,14 +488,14 @@ async function deleteExistingOrmActions(modelStringFile?: string) {
488488
if (fs.existsSync(routes)) await Bun.$`rm ${routes}`
489489

490490
if (modelStringFile) {
491-
const ormPath = path.builtUserActionsPath(`${modelStringFile}.ts`)
491+
const ormPath = path.builtUserActionsPath(`src/${modelStringFile}.ts`)
492492

493493
if (fs.existsSync(ormPath)) await Bun.$`rm ${ormPath}`
494494

495495
return
496496
}
497497

498-
const ormPaths = glob.sync(path.builtUserActionsPath(`*.ts`))
498+
const ormPaths = glob.sync(path.builtUserActionsPath(`**/*.ts`))
499499

500500
for (const ormPath of ormPaths) {
501501
if (fs.existsSync(ormPath)) await Bun.$`rm ${ormPath}`

storage/framework/core/cloud/src/cloud/queue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class QueueStack {
2525
async init() {
2626
const jobsDir = path.jobsPath()
2727
const actionsDir = path.appPath('Actions')
28-
const ormActionDir = path.builtUserActionsPath()
28+
const ormActionDir = path.builtUserActionsPath('src')
2929

3030
const jobFiles = await fs.readdir(jobsDir)
3131
const actionFiles = await fs.readdir(actionsDir)

0 commit comments

Comments
 (0)