fix(scaffolder): requested changes

Signed-off-by: Zander Franks <zander@zanderf.net>
This commit is contained in:
Zander Franks
2023-05-04 12:37:35 -05:00
parent ebf3c0e7a1
commit b779e98756
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
---
'@backstage/plugin-scaffolder-common': patch
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder-common': minor
'@backstage/plugin-scaffolder-react': minor
---
Add support for Markdown text blob outputs from templates
@@ -522,8 +522,8 @@ output:
icon: catalog
entityRef: ${{ steps['register'].output.entityRef }} # link to the entity that has been ingested to the catalog
text:
- title: More data
data: |
- title: More information
content: |
Access the \[remote repository\](${{ steps['publish'].output.remoteUrl }}).
```
@@ -221,15 +221,15 @@
},
"text": {
"type": "array",
"description": "A list of text blobs, like output data from the template.",
"description": "A list of Markdown text blobs, like output data from the template.",
"items": {
"type": "object",
"required": [],
"properties": {
"title": {
"type": "string",
"description": "A user friendly display name for the text blob.",
"examples": ["Output Data"],
"description": "A user friendly display name for the text.",
"examples": ["Output Content"],
"minLength": 1
},
"icon": {
@@ -238,10 +238,10 @@
"examples": ["dashboard"],
"minLength": 1
},
"data": {
"content": {
"type": "string",
"description": "The text blob to display in the UI.",
"examples": ["{}"]
"description": "The text blob to display in the UI, rendered as Markdown.",
"examples": ["**hey** _I'm_ Markdown"]
}
}
}
+1 -1
View File
@@ -221,7 +221,7 @@ export type ScaffolderOutputLink = {
export type ScaffolderOutputText = {
title?: string;
icon?: string;
data?: string;
content?: string;
};
// @public
+1 -1
View File
@@ -88,7 +88,7 @@ export type ScaffolderOutputLink = {
export type ScaffolderOutputText = {
title?: string;
icon?: string;
data?: string;
content?: string;
};
/** @public */
@@ -64,7 +64,7 @@ export const DefaultTemplateOutputs = (props: {
titleTypographyProps={{ component: 'h2' }}
>
<Box padding={2} height="100%">
<MarkdownContent content={textOutput.data ?? ''} />
<MarkdownContent content={textOutput.content ?? ''} />
</Box>
</InfoCard>
</Box>
@@ -38,7 +38,7 @@ export const TextOutputs = (props: {
return (
<>
{text
.filter(({ data }) => data)
.filter(({ content }) => content !== undefined)
.map(({ title, icon }, i) => {
const Icon = iconResolver(icon);
return (