diff --git a/packages/framework/src/types/discover.types.ts b/packages/framework/src/types/discover.types.ts index 1f6cf46ea31..cf82d1cfa0b 100644 --- a/packages/framework/src/types/discover.types.ts +++ b/packages/framework/src/types/discover.types.ts @@ -53,6 +53,7 @@ export type DiscoverStepOutput = { export type DiscoverWorkflowOutput = { workflowId: string; execute: Execute, Record>; + /** @deprecated use top-level properties instead */ options: WorkflowOptions; code: string; steps: Array; diff --git a/packages/framework/src/validators/zod.validator.ts b/packages/framework/src/validators/zod.validator.ts index ceae534b88f..e6eb413a372 100644 --- a/packages/framework/src/validators/zod.validator.ts +++ b/packages/framework/src/validators/zod.validator.ts @@ -1,5 +1,4 @@ import { ZodSchema } from 'zod'; -import { zodToJsonSchema } from 'zod-to-json-schema'; import type { FromSchema, FromSchemaUnvalidated, JsonSchema, Schema } from '../types/schema.types'; import type { ValidateResult, Validator } from '../types/validator.types'; @@ -30,6 +29,9 @@ export class ZodValidator implements Validator { transformToJsonSchema(schema: ZodSchema): JsonSchema { try { + // eslint-disable-next-line global-require + const { zodToJsonSchema } = require('zod-to-json-schema') as typeof import('zod-to-json-schema'); + // @ts-expect-error - zod-to-json-schema is not using JSONSchema7 return zodToJsonSchema(schema); } catch (error) {