docs: fix links to steps in workflow references (#10503)

This commit is contained in:
Shahed Nasser
2024-12-09 14:55:35 +02:00
committed by GitHub
parent 0ae98c51eb
commit 8dedb97e40
2 changed files with 9 additions and 1 deletions

View File

@@ -30,6 +30,9 @@ const allowedProjectDocuments: AllowedProjectDocumentsOption = {
[ReflectionKind.Method]: true,
[ReflectionKind.Property]: true,
},
"core-flows": {
[ReflectionKind.Function]: true,
},
}
modules.forEach((module) => {
@@ -77,7 +80,7 @@ const mergerOptions: Partial<TypeDocOptions> = {
mdxImports: [`import { TypeList } from "docs-ui"`],
parameterComponentExtraProps: {
expandUrl:
"https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation",
"https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation",
},
},
internal: {

View File

@@ -68,6 +68,10 @@ class WorkflowsPlugin {
* @param context - The project's context.
*/
handleResolve(context: Context) {
const isEnabled = this.app.options.getValue("enableWorkflowsPlugins")
if (!isEnabled) {
return
}
for (const reflection of context.project.getReflectionsByKind(
ReflectionKind.All
)) {
@@ -84,6 +88,7 @@ class WorkflowsPlugin {
if (
!initializer ||
!initializer.arguments ||
(!ts.isArrowFunction(initializer.arguments[1]) &&
!ts.isFunctionExpression(initializer.arguments[1]))
) {