feat(create-medusa-app): remove admin email prompt (#7417)
* feat(create-medusa-app): remove admin email prompt * change to constant
This commit is contained in:
@@ -9,12 +9,11 @@ import ProcessManager from "./process-manager.js"
|
||||
import { clearProject } from "./clear-project.js"
|
||||
import type { Client } from "pg"
|
||||
|
||||
const ADMIN_EMAIL = "admin@medusa-test.com"
|
||||
|
||||
type PrepareOptions = {
|
||||
directory: string
|
||||
dbConnectionString: string
|
||||
admin?: {
|
||||
email: string
|
||||
}
|
||||
seed?: boolean
|
||||
boilerplate?: boolean
|
||||
spinner: Ora
|
||||
@@ -31,7 +30,6 @@ type PrepareOptions = {
|
||||
export default async ({
|
||||
directory,
|
||||
dbConnectionString,
|
||||
admin,
|
||||
seed,
|
||||
boilerplate,
|
||||
spinner,
|
||||
@@ -186,7 +184,7 @@ export default async ({
|
||||
})
|
||||
}
|
||||
|
||||
if (admin && !skipDb && migrations) {
|
||||
if (!skipDb && migrations) {
|
||||
// create admin user
|
||||
factBoxOptions.interval = displayFactBox({
|
||||
...factBoxOptions,
|
||||
@@ -197,7 +195,7 @@ export default async ({
|
||||
process: async () => {
|
||||
const proc = await execute(
|
||||
[
|
||||
`npx medusa user -e ${admin.email} --invite`,
|
||||
`npx medusa user -e ${ADMIN_EMAIL} --invite`,
|
||||
npxOptions,
|
||||
],
|
||||
{ verbose, needOutput: true }
|
||||
|
||||
Reference in New Issue
Block a user