We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ea6bb9 commit e7a59adCopy full SHA for e7a59ad
storage/framework/api/dev.ts
@@ -157,6 +157,21 @@ async function watchFolders() {
157
log.success(`Hot reloaded Middleware: ${filename}`)
158
}
159
})
160
+
161
+ // Watch user models for ORM generation
162
+ watch(path.userModelsPath(), { recursive: true }, (event: string, filename: string | null) => {
163
+ if (filename === null)
164
+ return
165
166
+ log.info(`Detected ${event} in user models/${filename}`)
167
+ log.info('Generating ORM model files...')
168
169
+ runCommandSync('./buddy generate:model-files', {
170
+ cwd: process.cwd(), // Run at root directory
171
+ })
172
173
+ log.success(`Generated ORM model files for: ${filename}`)
174
175
176
177
// @ts-expect-error - somehow type is not recognized
0 commit comments