Revert "add generated .medusa/types to local plugins (#13777)" (#14361)

This reverts commit 125694626e.
This commit is contained in:
Adrien de Peretti
2025-12-19 11:10:38 +01:00
committed by GitHub
parent 181d5fa671
commit ee8d7221da
2 changed files with 17 additions and 31 deletions
-5
View File
@@ -1,5 +0,0 @@
---
"@medusajs/medusa": patch
---
feat(medusa): add generated .medusa/types to local plugins
+1 -10
View File
@@ -11,7 +11,6 @@ import {
dynamicImport, dynamicImport,
FileSystem, FileSystem,
generateContainerTypes, generateContainerTypes,
getResolvedPlugins,
gqlSchemaToTypes, gqlSchemaToTypes,
GracefulShutdownServer, GracefulShutdownServer,
isFileSkipped, isFileSkipped,
@@ -273,14 +272,7 @@ async function start(args: {
}) })
if (generateTypes) { if (generateTypes) {
const configModule = container.resolve( const typesDirectory = path.join(directory, ".medusa/types")
ContainerRegistrationKeys.CONFIG_MODULE
)
const localPlugins = (await getResolvedPlugins(directory, configModule, true))
.filter((p) => p.admin?.type === "local")
for (const plugin of localPlugins) {
const typesDirectory = path.join(plugin.admin!.resolve, "../../.medusa/types")
/** /**
* Cleanup existing types directory before creating new artifacts * Cleanup existing types directory before creating new artifacts
@@ -304,7 +296,6 @@ async function start(args: {
logger.debug("Generated modules types") logger.debug("Generated modules types")
} }
} }
}
// Register a health check endpoint. Ideally this also checks the readiness of the service, rather than just returning a static response. // Register a health check endpoint. Ideally this also checks the readiness of the service, rather than just returning a static response.
app.get("/health", (_, res) => { app.get("/health", (_, res) => {