Skip to content

Commit b293500

Browse files
committed
chore: wip
1 parent 9321a2b commit b293500

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.stacks/buddy/src/commands/generate.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { CLI, GeneratorOptions } from '@stacksjs/types'
2-
import { log } from '@stacksjs/logging'
32
import { ExitCode } from '@stacksjs/types'
43
import { prompts } from '@stacksjs/cli'
54
import { componentMeta, ideHelpers, libEntries, invoke as startGenerationProcess, types, vsCodeCustomData, vueCompat, webTypes, models } from '@stacksjs/actions/generate'
@@ -114,18 +113,7 @@ async function generate(buddy: CLI) {
114113

115114
buddy
116115
.command('generate:model', 'Generate Model')
117-
.option('-n, --name', 'Model Name')
118116
.action(async (options: any) => {
119-
const name = buddy.args[0] || options.name
120-
121-
options.name = name
122-
123-
if (!name) {
124-
log.error('You need to specify the Model Name.')
125-
126-
process.exit()
127-
}
128-
129117
await models(options)
130118
})
131119
}

.stacks/core/database/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
},
4949
"peerDependencies": {
5050
"@prisma/client": "^4.10.1",
51+
"@stacksjs/path": "workspace:*",
5152
"@stacksjs/utils": "workspace:*"
5253
},
5354
"devDependencies": {

.stacks/core/database/src/migrations/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { filesystem } from '@stacksjs/storage'
2+
import { projectPath } from '@stacksjs/path'
23
import type { SchemaOptions } from '@stacksjs/types'
34

45
const { fs } = filesystem
@@ -58,7 +59,9 @@ generator client {
5859
schema += '}\n\n'
5960
}
6061

61-
path = '.stacks/database/schema.prisma'
62+
if (!fs.existsSync(`${projectPath()}/.stacks/database`)) {
63+
fs.mkdirSync(`${projectPath()}/.stacks/database`)
64+
}
6265

6366
fs.writeFile(path, schema, (err) => {
6467
if (err) {

0 commit comments

Comments
 (0)