The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
refactor: update app paths in manage-env-files to reflect new directory structure and simplify API detection logic
vholik6716bdb0da1c
diff --git a/packages/cli/src/utils/manage-env-files.ts b/packages/cli/src/utils/manage-env-files.tsindex 8c8a5c6ee..c17e041f3 100644--- a/packages/cli/src/utils/manage-env-files.ts+++ b/packages/cli/src/utils/manage-env-files.ts@@ -53,9 +53,9 @@ const sanitizeEnv = ({};const APP_PATHS = [- { path: "apps/api", isApi: true },- { path: "apps/vendor", isApi: false },- { path: "apps/admin", isApi: false },+ { path: "packages/api" },+ { path: "apps/vendor" },+ { path: "apps/admin" },];export async function manageEnvFiles({@@ -67,7 +67,7 @@ export async function manageEnvFiles({}): Promise<void> {try {await Promise.all(- APP_PATHS.map(async ({ path: appPath, isApi }) => {+ APP_PATHS.map(async ({ path: appPath }) => {const appDir = path.join(projectDir, appPath);if (!fs.existsSync(appDir)) {@@ -77,6 +77,7 @@ export async function manageEnvFiles({const envTemplatePath = path.join(appDir, ".env.template");const envPath = path.join(appDir, ".env");+ const isApi = appPath.includes("api");// if not API, just copy the .env.template fileif (!isApi) {if (fs.existsSync(envTemplatePath) && !fs.existsSync(envPath)) {@@ -88,7 +89,10 @@ export async function manageEnvFiles({let templateEnv = "";if (fs.existsSync(envTemplatePath)) {- const envTemplateContents = await fs.readFile(envTemplatePath, "utf8");+ const envTemplateContents = await fs.readFile(+ envTemplatePath,+ "utf8"+ );templateEnv = sanitizeEnv({contents: envTemplateContents,databaseUri,