From b004205e284d8aabf76f6c5ad2940f8882329a9e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 9 Dec 2024 14:22:55 +0200 Subject: [PATCH] docs: fix links to steps in workflow references --- .../src/constants/merger-options.ts | 5 ++++- www/utils/packages/typedoc-plugin-workflows/src/plugin.ts | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts b/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts index 401429e9b0f30..eb691f6025b3d 100644 --- a/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts +++ b/www/utils/packages/typedoc-generate-references/src/constants/merger-options.ts @@ -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 = { 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: { diff --git a/www/utils/packages/typedoc-plugin-workflows/src/plugin.ts b/www/utils/packages/typedoc-plugin-workflows/src/plugin.ts index 2aa17c1d18c41..6a0acbc860980 100644 --- a/www/utils/packages/typedoc-plugin-workflows/src/plugin.ts +++ b/www/utils/packages/typedoc-plugin-workflows/src/plugin.ts @@ -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])) ) {