diff --git a/web/app/components/workflow/block-selector/types.ts b/web/app/components/workflow/block-selector/types.ts index c7c0f9109d..28752ebeef 100644 --- a/web/app/components/workflow/block-selector/types.ts +++ b/web/app/components/workflow/block-selector/types.ts @@ -1,4 +1,4 @@ -import type { PluginMeta } from '../../plugins/types' +import type { PluginMeta as WorkflowPluginMeta } from '../../plugins/types' import type { AgentToolActivationCondition } from '@/app/components/workflow/nodes/agent/types' import type { TypeWithI18N } from '@/app/components/header/account-setting/model-provider-page/declarations' @@ -59,7 +59,7 @@ export type ToolDefaultValue = PluginCommonDefaultValue & { paramSchemas: Record[] output_schema?: Record credential_id?: string - meta?: PluginMeta + meta?: WorkflowPluginMeta plugin_id?: string provider_icon?: Collection['icon'] plugin_unique_identifier?: string diff --git a/web/app/components/workflow/nodes/trigger-schedule/utils/cron-parser.ts b/web/app/components/workflow/nodes/trigger-schedule/utils/cron-parser.ts index 90f65db0aa..bf7512d6ed 100644 --- a/web/app/components/workflow/nodes/trigger-schedule/utils/cron-parser.ts +++ b/web/app/components/workflow/nodes/trigger-schedule/utils/cron-parser.ts @@ -1,5 +1,10 @@ import { CronExpressionParser } from 'cron-parser' +// Minimal representation of the CronDate object returned by cron-parser. +type CronDateLike = { + toDate: () => Date +} + // Convert a UTC date from cron-parser to user timezone representation // This ensures consistency with other execution time calculations const convertToUserTimezoneRepresentation = (utcDate: Date, timezone: string): Date => { @@ -42,7 +47,7 @@ export const parseCronExpression = (cronExpression: string, timezone: string = ' }) // Get the next 5 execution times using the take() method - const nextCronDates = interval.take(5) + const nextCronDates: CronDateLike[] = interval.take(5) // Convert CronDate objects to Date objects and ensure they represent // the time in user timezone (consistent with execution-time-calculator.ts)