mirror of https://github.com/langgenius/dify.git
fix: rename imported PluginMeta type to WorkflowPluginMeta for clarity
This commit is contained in:
parent
a460770c62
commit
d4721af52b
|
|
@ -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<string, any>[]
|
||||
output_schema?: Record<string, any>
|
||||
credential_id?: string
|
||||
meta?: PluginMeta
|
||||
meta?: WorkflowPluginMeta
|
||||
plugin_id?: string
|
||||
provider_icon?: Collection['icon']
|
||||
plugin_unique_identifier?: string
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue