This reverts commit 125694626e.
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
"@medusajs/medusa": patch
|
|
||||||
---
|
|
||||||
|
|
||||||
feat(medusa): add generated .medusa/types to local plugins
|
|
||||||
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user