fix(create-medusa-app): updates to text and prompts (#12360)

This commit is contained in:
Shahed Nasser
2025-05-06 14:23:54 +03:00
committed by GitHub
parent ffd323a2a9
commit f74586e772
4 changed files with 28 additions and 23 deletions

View File

@@ -14,24 +14,24 @@ export type FactBoxOptions = {
}
const facts = [
"You can specify a product's availability in one or more sales channels.",
"Payment and shipping options and providers can be configured per region.",
"Tax-inclusive pricing allows you to set prices for products, shipping options, and more without having to worry about calculating taxes.",
"Specify a product's availability in one or more sales channels.",
"Payment providers can be configured per region.",
"Tax-inclusive pricing allows you to set prices for products and shipping options while delegating tax calculations to Medusa.",
"Medusa provides multi-currency and region support, with full control over prices for each currency and region.",
"You can organize customers by customer groups and set special prices for them.",
"You can specify the inventory of products per location and sales channel.",
"Publishable-API Keys allow you to send requests to the backend within a scoped resource.",
"You can create custom endpoints by creating a TypeScript file under the src/api directory.",
"You can listen to events to perform asynchronous actions using Subscribers.",
"A data model represents a table in the database. You can create a table by creating a custom data model and migration in a module.",
"Medusa's store endpoint paths are prefixed by /store. The admin endpoints are prefixed by /admin.",
"Medusa provides a JavaScript client and a React library that you can use to build a storefront or a custom admin.",
"Modules hold your custom features and data models. You create them under the src/modules directory. Each module must have a service.",
"A service is a class with methods related to a functionality or a data model. You create a service in a module.",
"Organize customers by customer groups and set special prices for them.",
"Specify the inventory of products per location and sales channel.",
"Publishable-API Keys allow you to send scoped requests to the server's store API routes.",
"API Routes expose business logic to clients, such as storefronts and admin customizations.",
"Subscribers are asynchronous functions that are executed when an event is emitted.",
"Data models represent tables in the database. They are created using Medusa's Data Modeling Language (DML).",
"Medusa's store API routes are prefixed by /store. The admin API routes are prefixed by /admin.",
"The JS SDK allows you to send requests to the Medusa server from your storefront or admin customizations.",
"Modules are reusable packages of functionalities related to a single commerce domain or integration.",
"Modules have a main service that provides data-management and integration functionalities.",
"Modules allow you to replace an entire functionality with your custom logic.",
"The event bus module is responsible for triggering events and relaying them to subscribers.",
"The cache module is responsible for caching data that requires heavy computation.",
"A workflow is a series of steps that are defined once and executed anywhere. Workflows are created under the src/workflows directory.",
"Infrastructure Modules are interchangeable modules that implement features and integrations related to the Medusa server's infrastructure.",
"Commerce Modules are built-in modules that provide core commerce logic specific to domains like Product, Cart and Order.",
"Workflows are a series of queries and actions, called steps, that complete a task.",
"A workflow's steps can be retried or rolled back in case of an error.",
]

View File

@@ -17,7 +17,7 @@ export async function askForNextjsStarter(): Promise<boolean> {
{
type: "confirm",
name: "installNextjs",
message: `Would you like to create the Next.js storefront? You can also create it later`,
message: `Would you like to install the Next.js Starter Storefront? You can also install it later.`,
default: false,
},
])
@@ -42,7 +42,7 @@ export async function installNextjsStarter({
}: InstallOptions): Promise<string> {
factBoxOptions.interval = displayFactBox({
...factBoxOptions,
title: "Installing Next.js Storefront...",
title: "Installing Next.js Starter Storefront...",
})
let nextjsDirectory = `${directoryName}-storefront`
@@ -94,7 +94,7 @@ export async function installNextjsStarter({
}
logMessage({
message: `An error occurred while installing Next.js storefront: ${e}`,
message: `An error occurred while installing Next.js Starter Storefront: ${e}`,
type: "error",
})
}
@@ -111,7 +111,7 @@ export async function installNextjsStarter({
displayFactBox({
...factBoxOptions,
message: `Installed Next.js Starter successfully in the ${nextjsDirectory} directory.`,
message: `Installed Next.js Starter Storefront successfully in the ${nextjsDirectory} directory.`,
})
return nextjsDirectory

View File

@@ -219,13 +219,13 @@ export class MedusaProjectCreator
chalk.green(
`Change to the \`${
this.projectName
}\` directory to explore your Medusa project.${EOL}${EOL}Start your Medusa app again with the following command:${EOL}${EOL}yarn dev${EOL}${EOL}${
}\` directory to explore your Medusa project.${EOL}${EOL}Start your Medusa application again with the following command:${EOL}${EOL}yarn dev${EOL}${EOL}${
this.inviteToken
? `After you start the Medusa app, you can set a password for your admin user with the URL http://localhost:7001/invite?token=${this.inviteToken}&first_run=true${EOL}${EOL}`
? `After you start the Medusa application, you can create an admin user with the URL http://localhost:9000/app/invite?token=${this.inviteToken}&first_run=true${EOL}${EOL}`
: ""
}${
this.nextjsDirectory?.length
? `The Next.js Starter storefront was installed in the \`${this.nextjsDirectory}\` directory. Change to that directory and start it with the following command:${EOL}${EOL}npm run dev${EOL}${EOL}`
? `The Next.js Starter Storefront was installed in the \`${this.nextjsDirectory}\` directory. Change to that directory and start it with the following command:${EOL}${EOL}npm run dev${EOL}${EOL}`
: ""
}Check out the Medusa documentation to start your development:${EOL}${EOL}https://docs.medusajs.com/${EOL}${EOL}Star us on GitHub if you like what we're building:${EOL}${EOL}https://github.com/medusajs/medusa/stargazers`
),