-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated keystone-next dev so that it interactively prompts for creati…
…ng and applying a migration (#5135)
- Loading branch information
Showing
8 changed files
with
207 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@keystone-next/adapter-prisma-legacy': major | ||
'@keystone-next/keystone': major | ||
--- | ||
|
||
Updated `keystone-next dev` with the Prisma adapter so that it interactively prompts for creating and applying a migration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@keystone-next/adapter-prisma-legacy': major | ||
--- | ||
|
||
Changed default migrationMode from `dev` to `prototype` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import prompts from 'prompts'; | ||
|
||
// prompts is badly typed so we have some more specific typed APIs | ||
// prompts also returns an undefined value on SIGINT which we really just want to exit on | ||
|
||
export async function confirmPrompt(message: string): Promise<boolean> { | ||
const { value } = await prompts({ | ||
name: 'value', | ||
type: 'confirm', | ||
message, | ||
initial: true, | ||
}); | ||
if (value === undefined) { | ||
process.exit(1); | ||
} | ||
return value; | ||
} | ||
|
||
export async function textPrompt(message: string): Promise<string> { | ||
const { value } = await prompts({ | ||
name: 'value', | ||
type: 'text', | ||
message, | ||
}); | ||
if (value === undefined) { | ||
process.exit(1); | ||
} | ||
return value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cdd889d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: