* Modifies schema to allow SQLite as a DB driver. SQLite is preinstalled in most OSes allowing for minimal prerequisites in the installation process. * Removes Redis dependency and replaces "real" redis instance with ioredis-mock this is not feature complete and errors are expected. * Updates medusa new command to only ask for Postgres credentials if the starter template has database_type === "postgres" in medusa-config.js * Small improvements to bin resolution * Improvements to endpoint stability
26 lines
777 B
JavaScript
26 lines
777 B
JavaScript
export const panicHandler = (panicData = {}) => {
|
|
const { id, context } = panicData
|
|
switch (id) {
|
|
case "10000":
|
|
return {
|
|
message: `Looks like you provided a URL as your project name. Try "medusa new my-medusa-store ${context.rootPath}" instead.`,
|
|
}
|
|
case "10001":
|
|
return {
|
|
message: `Looks like you provided a URL as your project name. Try "medusa new my-medusa-store ${context.rootPath}" instead.`,
|
|
}
|
|
case "10002":
|
|
return {
|
|
message: `Could not create project because ${context.path} is not a valid path.`,
|
|
}
|
|
case "10003":
|
|
return {
|
|
message: `Directory ${context.rootPath} is already a Node project.`,
|
|
}
|
|
default:
|
|
return {
|
|
message: "Unknown error",
|
|
}
|
|
}
|
|
}
|