feat(medusa): Improve add line item to cart perf and transaction management + clustering start command (#5701)

This commit is contained in:
Adrien de Peretti
2023-12-06 08:53:35 +01:00
committed by GitHub
parent a458cd144d
commit 6975eacb33
14 changed files with 341 additions and 147 deletions

View File

@@ -15,7 +15,9 @@ export async function build({
options,
reporting = "fancy",
}: BuildArgs) {
await createCacheDir({ appDir, plugins })
if (!process.env.PLUGIN_ADMIN_UI_SKIP_CACHE) {
await createCacheDir({ appDir, plugins })
}
const cacheDir = path.resolve(appDir, ".cache")
const entry = path.resolve(cacheDir, "admin", "src", "main.tsx")

View File

@@ -5,6 +5,10 @@ import { createEntry } from "./create-entry"
import { logger } from "./logger"
async function copyAdmin(dest: string) {
if (process.env.PLUGIN_ADMIN_UI_SKIP_CACHE) {
return true
}
const adminDir = path.resolve(__dirname, "..", "ui")
const destDir = path.resolve(dest, "admin")

View File

@@ -13,6 +13,10 @@ import {
const FILE_EXT_REGEX = /\.[^/.]+$/
async function copyLocalExtensions(src: string, dest: string) {
if (process.env.PLUGIN_ADMIN_UI_SKIP_CACHE) {
return true
}
try {
await fse.copy(src, dest, {
filter: copyFilter,