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:
Shahed Nasser
2024-05-23 12:23:45 +03:00
committed by GitHub
parent b0209e1114
commit 9cbe0085d0
2 changed files with 4 additions and 33 deletions
@@ -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 }