From 0f761b46ba7bd3f591e33a0141ffe4a50c3b9be4 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 18 Feb 2025 17:36:32 +0200 Subject: [PATCH 1/2] fix(framework): add missing storefrontUrl from configuration type --- .changeset/dull-tigers-dress.md | 5 ++++ packages/core/framework/src/config/types.ts | 26 ++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .changeset/dull-tigers-dress.md diff --git a/.changeset/dull-tigers-dress.md b/.changeset/dull-tigers-dress.md new file mode 100644 index 0000000000000..70921b7d91888 --- /dev/null +++ b/.changeset/dull-tigers-dress.md @@ -0,0 +1,5 @@ +--- +"@medusajs/framework": patch +--- + +fix(framework): add missing storefrontUrl from configuration type diff --git a/packages/core/framework/src/config/types.ts b/packages/core/framework/src/config/types.ts index f50fc1435ec91..e01d7d050a0fc 100644 --- a/packages/core/framework/src/config/types.ts +++ b/packages/core/framework/src/config/types.ts @@ -87,6 +87,24 @@ export type AdminOptions = { * ``` */ backendUrl?: string + /** + * The URL of your Medusa storefront application. This URL is used as a prefix to some + * links in the admin that require performing actions in the storefront. For example, + * this URL is used as a prefix to shareable payment links for orders with + * outstanding amounts. + * + * @example + * ```js title="medusa-config.js" + * module.exports = defineConfig({ + * admin: { + * storefrontUrl: process.env.MEDUSA_STOREFRONT_URL || + * "http://localhost:9000" + * }, + * // ... + * }) + * ``` + */ + storefrontUrl?: string /** * Configure the Vite configuration for the admin dashboard. This function receives the default Vite configuration * and returns the modified configuration. The default value is `undefined`. @@ -771,7 +789,13 @@ export type ProjectConfigOptions = { /** * @interface * - * The configurations for your Medusa application are in `medusa-config.ts` located in the root of your Medusa project. The configurations include configurations for database, modules, and more. + * The configurations for your Medusa application are set in `medusa-config.ts` located in the root of your Medusa project. The configurations include configurations for database, modules, and more. + * + * :::note + * + * Some Medusa configurations are set through environment variables, which you can find in [this documentation](https://docs.medusajs.com/learn/fundamentals/environment-variables#predefined-medusa-environment-variables). + * + * ::: * * `medusa-config.ts` exports the value returned by the `defineConfig` utility function imported from `@medusajs/framework/utils`. * From 65c58be0d014545b7fac8aa07675e46ecaa64f77 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 18 Feb 2025 19:11:52 +0200 Subject: [PATCH 2/2] Update packages/core/framework/src/config/types.ts Co-authored-by: Kasper Fabricius Kristensen <45367945+kasperkristensen@users.noreply.github.com> --- packages/core/framework/src/config/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/framework/src/config/types.ts b/packages/core/framework/src/config/types.ts index e01d7d050a0fc..1218ad05f4d5e 100644 --- a/packages/core/framework/src/config/types.ts +++ b/packages/core/framework/src/config/types.ts @@ -98,7 +98,7 @@ export type AdminOptions = { * module.exports = defineConfig({ * admin: { * storefrontUrl: process.env.MEDUSA_STOREFRONT_URL || - * "http://localhost:9000" + * "http://localhost:8000" * }, * // ... * })