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
@@ -30,6 +30,9 @@ const allowedProjectDocuments: AllowedProjectDocumentsOption = {
[ReflectionKind.Method]: true, [ReflectionKind.Method]: true,
[ReflectionKind.Property]: true, [ReflectionKind.Property]: true,
}, },
"core-flows": {
[ReflectionKind.Function]: true,
},
} }
modules.forEach((module) => { modules.forEach((module) => {
@@ -77,7 +80,7 @@ const mergerOptions: Partial<TypeDocOptions> = {
mdxImports: [`import { TypeList } from "docs-ui"`], mdxImports: [`import { TypeList } from "docs-ui"`],
parameterComponentExtraProps: { parameterComponentExtraProps: {
expandUrl: 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: { internal: {
@@ -68,6 +68,10 @@ class WorkflowsPlugin {
* @param context - The project's context. * @param context - The project's context.
*/ */
handleResolve(context: Context) { handleResolve(context: Context) {
const isEnabled = this.app.options.getValue("enableWorkflowsPlugins")
if (!isEnabled) {
return
}
for (const reflection of context.project.getReflectionsByKind( for (const reflection of context.project.getReflectionsByKind(
ReflectionKind.All ReflectionKind.All
)) { )) {
@@ -84,6 +88,7 @@ class WorkflowsPlugin {
if ( if (
!initializer || !initializer ||
!initializer.arguments ||
(!ts.isArrowFunction(initializer.arguments[1]) && (!ts.isArrowFunction(initializer.arguments[1]) &&
!ts.isFunctionExpression(initializer.arguments[1])) !ts.isFunctionExpression(initializer.arguments[1]))
) { ) {