diff --git a/plugins/scaffolder-backend-module-bitbucket-cloud/src/actions/bitbucketCloudPipelinesRun.test.ts b/plugins/scaffolder-backend-module-bitbucket-cloud/src/actions/bitbucketCloudPipelinesRun.test.ts index f910e35743..83d959e67f 100644 --- a/plugins/scaffolder-backend-module-bitbucket-cloud/src/actions/bitbucketCloudPipelinesRun.test.ts +++ b/plugins/scaffolder-backend-module-bitbucket-cloud/src/actions/bitbucketCloudPipelinesRun.test.ts @@ -21,7 +21,6 @@ import { createBitbucketPipelinesRunAction } from './bitbucketCloudPipelinesRun' import { ConfigReader } from '@backstage/config'; import { ScmIntegrations } from '@backstage/integration'; import { createMockActionContext } from '@backstage/plugin-scaffolder-node-test-utils'; -import { TemplateAction } from '@backstage/plugin-scaffolder-node'; describe('bitbucket:pipelines:run', () => { const config = new ConfigReader({ diff --git a/plugins/scaffolder-backend-module-confluence-to-markdown/src/actions/confluence/confluenceToMarkdown.ts b/plugins/scaffolder-backend-module-confluence-to-markdown/src/actions/confluence/confluenceToMarkdown.ts index 3d08259e98..aa9f94988a 100644 --- a/plugins/scaffolder-backend-module-confluence-to-markdown/src/actions/confluence/confluenceToMarkdown.ts +++ b/plugins/scaffolder-backend-module-confluence-to-markdown/src/actions/confluence/confluenceToMarkdown.ts @@ -66,6 +66,7 @@ export const createConfluenceToMarkdownAction = (options: { 'Paste your Confluence url. Ensure it follows this format: https://{confluence+base+url}/display/{spacekey}/{page+title} or https://{confluence+base+url}/spaces/{spacekey}/pages/1234567/{page+title} for Confluence Cloud', items: { type: 'string', + default: 'Confluence URL', }, }, repoUrl: { diff --git a/plugins/scaffolder-node/src/actions/createTemplateAction.ts b/plugins/scaffolder-node/src/actions/createTemplateAction.ts index 2abe696cb0..ce38f3b4e1 100644 --- a/plugins/scaffolder-node/src/actions/createTemplateAction.ts +++ b/plugins/scaffolder-node/src/actions/createTemplateAction.ts @@ -16,7 +16,6 @@ import { ActionContext, TemplateAction } from './types'; import { z } from 'zod'; -import { JSONSchema7 } from 'json-schema'; import { Expand, JsonObject } from '@backstage/types'; import { parseSchemas } from './util'; @@ -31,13 +30,13 @@ export type TemplateActionOptions< TActionInput extends JsonObject = {}, TActionOutput extends JsonObject = {}, TInputSchema extends - | JSONSchema7 + | JsonObject | z.ZodType - | { [key in string]: (zImpl: typeof z) => z.ZodType } = JSONSchema7, + | { [key in string]: (zImpl: typeof z) => z.ZodType } = JsonObject, TOutputSchema extends - | JSONSchema7 + | JsonObject | z.ZodType - | { [key in string]: (zImpl: typeof z) => z.ZodType } = JSONSchema7, + | { [key in string]: (zImpl: typeof z) => z.ZodType } = JsonObject, TSchemaType extends 'v1' | 'v2' = 'v1' | 'v2', > = { id: string; @@ -64,6 +63,26 @@ type FlattenOptionalProperties = Expand< } >; +/** + * @public + * @deprecated migrate to using the new built in zod schema definitions for schemas + */ +export function createTemplateAction< + TInputParams extends JsonObject = JsonObject, + TOutputParams extends JsonObject = JsonObject, + TInputSchema extends JsonObject = JsonObject, + TOutputSchema extends JsonObject = JsonObject, + TActionInput extends JsonObject = TInputParams, + TActionOutput extends JsonObject = TOutputParams, +>( + action: TemplateActionOptions< + TActionInput, + TActionOutput, + TInputSchema, + TOutputSchema, + 'v1' + >, +): TemplateAction; /** * @public * @deprecated migrate to using the new built in zod schema definitions for schemas @@ -113,37 +132,17 @@ export function createTemplateAction< }>, 'v2' >; -/** - * @public - * @deprecated migrate to using the new built in zod schema definitions for schemas - */ -export function createTemplateAction< - TInputParams extends JsonObject = JsonObject, - TOutputParams extends JsonObject = JsonObject, - TInputSchema extends JSONSchema7 = JSONSchema7, - TOutputSchema extends JSONSchema7 = JSONSchema7, - TActionInput extends JsonObject = TInputParams, - TActionOutput extends JsonObject = TOutputParams, ->( - action: TemplateActionOptions< - TActionInput, - TActionOutput, - TInputSchema, - TOutputSchema, - 'v1' - >, -): TemplateAction; export function createTemplateAction< TInputParams extends JsonObject = JsonObject, TOutputParams extends JsonObject = JsonObject, TInputSchema extends - | JSONSchema7 + | JsonObject | z.ZodType - | { [key in string]: (zImpl: typeof z) => z.ZodType } = JSONSchema7, + | { [key in string]: (zImpl: typeof z) => z.ZodType } = JsonObject, TOutputSchema extends - | JSONSchema7 + | JsonObject | z.ZodType - | { [key in string]: (zImpl: typeof z) => z.ZodType } = JSONSchema7, + | { [key in string]: (zImpl: typeof z) => z.ZodType } = JsonObject, TActionInput extends JsonObject = TInputSchema extends z.ZodType< any, any,