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