fix(create-medusa-app): disable opening browser (#4321)
This commit is contained in:
1 parent
30d89044f1
commit
5ad7347408
2 files changed
+37
-26
No files matched your search
@@ -34,7 +34,12 @@ type CreateOptions = {
|
||||
boilerplate?: boolean
|
||||
}
|
||||
|
||||
export default async ({ repoUrl = "", seed, boilerplate }: CreateOptions) => {
|
||||
export default async ({
|
||||
repoUrl = "",
|
||||
// TODO remove default value later
|
||||
seed = true,
|
||||
boilerplate,
|
||||
}: CreateOptions) => {
|
||||
track("CREATE_CLI")
|
||||
if (repoUrl) {
|
||||
track("STARTER_SELECTED", { starter: repoUrl })
|
||||
@@ -113,19 +118,20 @@ export default async ({ repoUrl = "", seed, boilerplate }: CreateOptions) => {
|
||||
}
|
||||
}
|
||||
|
||||
const { adminEmail } = await inquirer.prompt([
|
||||
{
|
||||
type: "input",
|
||||
name: "adminEmail",
|
||||
message: "Enter an email for your admin dashboard user",
|
||||
default: !seed && boilerplate ? "admin@medusa-test.com" : undefined,
|
||||
validate: (input) => {
|
||||
return typeof input === "string" && input.length > 0 && isEmail(input)
|
||||
? true
|
||||
: "Please enter a valid email"
|
||||
},
|
||||
},
|
||||
])
|
||||
// TODO enable this later
|
||||
// const { adminEmail } = await inquirer.prompt([
|
||||
// {
|
||||
// type: "input",
|
||||
// name: "adminEmail",
|
||||
// message: "Enter an email for your admin dashboard user",
|
||||
// default: !seed && boilerplate ? "admin@medusa-test.com" : undefined,
|
||||
// validate: (input) => {
|
||||
// return typeof input === "string" && input.length > 0 && isEmail(input)
|
||||
// ? true
|
||||
// : "Please enter a valid email"
|
||||
// },
|
||||
// },
|
||||
// ])
|
||||
|
||||
logMessage({
|
||||
message: `${emojify(
|
||||
@@ -208,9 +214,9 @@ export default async ({ repoUrl = "", seed, boilerplate }: CreateOptions) => {
|
||||
inviteToken = await prepareProject({
|
||||
directory: projectName,
|
||||
dbConnectionString,
|
||||
admin: {
|
||||
email: adminEmail,
|
||||
},
|
||||
// admin: {
|
||||
// email: adminEmail,
|
||||
// },
|
||||
seed,
|
||||
boilerplate,
|
||||
spinner,
|
||||
@@ -279,13 +285,13 @@ export default async ({ repoUrl = "", seed, boilerplate }: CreateOptions) => {
|
||||
}
|
||||
})
|
||||
|
||||
await waitOn({
|
||||
resources: ["http://localhost:9000/health"],
|
||||
}).then(async () =>
|
||||
open(
|
||||
inviteToken
|
||||
? `http://localhost:7001/invite?token=${inviteToken}&first_run=true`
|
||||
: "http://localhost:7001"
|
||||
)
|
||||
)
|
||||
// await waitOn({
|
||||
// resources: ["http://localhost:9000/health"],
|
||||
// }).then(async () =>
|
||||
// open(
|
||||
// inviteToken
|
||||
// ? `http://localhost:7001/invite?token=${inviteToken}&first_run=true`
|
||||
// : "http://localhost:7001"
|
||||
// )
|
||||
// )
|
||||
}
|
||||
Reference in new issue
Block a user