@backstage/plugin-scaffolder-react 1.11.0-next.3 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/alpha/package.json +1 -1
- package/dist/next/components/PasswordWidget/PasswordWidget.esm.js +4 -4
- package/dist/next/components/PasswordWidget/PasswordWidget.esm.js.map +1 -1
- package/dist/next/components/SecretWidget/SecretWidget.esm.js +7 -7
- package/dist/next/components/SecretWidget/SecretWidget.esm.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-react
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8839381: Add scaffolder option to display object items in separate rows on review page
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 072c00c: Fixed a bug in `DefaultTableOutputs` where output elements overlapped on smaller screen sizes
|
|
12
|
+
- 46e5e55: Change scaffolder widgets to use `TextField` component for more flexibility in theme overrides.
|
|
13
|
+
- d0e95a7: Add ability to customise form fields in the UI by exposing `uiSchema` and `formContext` in `FormProps`
|
|
14
|
+
- 4670f06: support `ajv-errors` for scaffolder validation to allow for customizing the error messages
|
|
15
|
+
- 04759f2: Fix null check in `isJsonObject` utility function for scaffolder review state component
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/plugin-catalog-react@1.12.3
|
|
18
|
+
- @backstage/core-components@0.14.10
|
|
19
|
+
- @backstage/catalog-model@1.6.0
|
|
20
|
+
- @backstage/catalog-client@1.6.6
|
|
21
|
+
- @backstage/core-plugin-api@1.9.3
|
|
22
|
+
- @backstage/theme@0.5.6
|
|
23
|
+
- @backstage/types@1.1.1
|
|
24
|
+
- @backstage/version-bridge@1.0.8
|
|
25
|
+
- @backstage/plugin-permission-react@0.4.25
|
|
26
|
+
- @backstage/plugin-scaffolder-common@1.5.5
|
|
27
|
+
|
|
3
28
|
## 1.11.0-next.3
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/alpha/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Input from '@material-ui/core/Input';
|
|
1
|
+
import TextField from '@material-ui/core/TextField';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import FormHelperText from '@material-ui/core/FormHelperText';
|
|
5
4
|
import { MarkdownContent } from '@backstage/core-components';
|
|
@@ -10,10 +9,11 @@ const PasswordWidget = (props) => {
|
|
|
10
9
|
onChange,
|
|
11
10
|
schema: { title }
|
|
12
11
|
} = props;
|
|
13
|
-
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
14
|
-
|
|
12
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
13
|
+
TextField,
|
|
15
14
|
{
|
|
16
15
|
id: title,
|
|
16
|
+
label: title,
|
|
17
17
|
"aria-describedby": title,
|
|
18
18
|
onChange: (e) => {
|
|
19
19
|
onChange(e.target.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordWidget.esm.js","sources":["../../../../src/next/components/PasswordWidget/PasswordWidget.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetProps } from '@rjsf/utils';\nimport
|
|
1
|
+
{"version":3,"file":"PasswordWidget.esm.js","sources":["../../../../src/next/components/PasswordWidget/PasswordWidget.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetProps } from '@rjsf/utils';\nimport TextField from '@material-ui/core/TextField';\nimport React from 'react';\nimport FormHelperText from '@material-ui/core/FormHelperText';\nimport { MarkdownContent } from '@backstage/core-components';\n\nexport const PasswordWidget = (\n props: Pick<WidgetProps, 'onChange' | 'schema' | 'value'>,\n) => {\n const {\n value,\n onChange,\n schema: { title },\n } = props;\n\n return (\n <>\n <TextField\n id={title}\n label={title}\n aria-describedby={title}\n onChange={e => {\n onChange(e.target.value);\n }}\n value={value}\n autoComplete=\"off\"\n />\n <FormHelperText error>\n <MarkdownContent\n content=\"This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of\n `ui:widget: password`\"\n />\n </FormHelperText>\n </>\n );\n};\n"],"names":[],"mappings":";;;;;AAsBa,MAAA,cAAA,GAAiB,CAC5B,KACG,KAAA;AACH,EAAM,MAAA;AAAA,IACJ,KAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA,EAAQ,EAAE,KAAM,EAAA;AAAA,GACd,GAAA,KAAA,CAAA;AAEJ,EAAA,uBAEI,KAAA,CAAA,aAAA,CAAA,KAAA,CAAA,QAAA,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA,KAAA;AAAA,MACJ,KAAO,EAAA,KAAA;AAAA,MACP,kBAAkB,EAAA,KAAA;AAAA,MAClB,UAAU,CAAK,CAAA,KAAA;AACb,QAAS,QAAA,CAAA,CAAA,CAAE,OAAO,KAAK,CAAA,CAAA;AAAA,OACzB;AAAA,MACA,KAAA;AAAA,MACA,YAAa,EAAA,KAAA;AAAA,KAAA;AAAA,GAEf,kBAAA,KAAA,CAAA,aAAA,CAAC,cAAe,EAAA,EAAA,KAAA,EAAK,IACnB,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,eAAA;AAAA,IAAA;AAAA,MACC,OAAQ,EAAA,8LAAA;AAAA,KAAA;AAAA,GAGZ,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useTemplateSecrets } from '@backstage/plugin-scaffolder-react';
|
|
2
|
-
import
|
|
3
|
-
import Input from '@material-ui/core/Input';
|
|
2
|
+
import TextField from '@material-ui/core/TextField';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
|
|
6
5
|
const SecretWidget = (props) => {
|
|
@@ -10,20 +9,21 @@ const SecretWidget = (props) => {
|
|
|
10
9
|
onChange,
|
|
11
10
|
schema: { title }
|
|
12
11
|
} = props;
|
|
13
|
-
return /* @__PURE__ */ React.createElement(
|
|
14
|
-
|
|
12
|
+
return /* @__PURE__ */ React.createElement(
|
|
13
|
+
TextField,
|
|
15
14
|
{
|
|
16
15
|
id: title,
|
|
16
|
+
label: title,
|
|
17
17
|
"aria-describedby": title,
|
|
18
18
|
onChange: (e) => {
|
|
19
|
-
onChange(Array(e.target
|
|
20
|
-
setSecrets({ [name]: e.target
|
|
19
|
+
onChange(Array(e.target.value.length).fill("*").join(""));
|
|
20
|
+
setSecrets({ [name]: e.target.value });
|
|
21
21
|
},
|
|
22
22
|
value: secrets[name] ?? "",
|
|
23
23
|
type: "password",
|
|
24
24
|
autoComplete: "off"
|
|
25
25
|
}
|
|
26
|
-
)
|
|
26
|
+
);
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export { SecretWidget };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecretWidget.esm.js","sources":["../../../../src/next/components/SecretWidget/SecretWidget.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetProps } from '@rjsf/utils';\nimport { useTemplateSecrets } from '@backstage/plugin-scaffolder-react';\nimport
|
|
1
|
+
{"version":3,"file":"SecretWidget.esm.js","sources":["../../../../src/next/components/SecretWidget/SecretWidget.tsx"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WidgetProps } from '@rjsf/utils';\nimport { useTemplateSecrets } from '@backstage/plugin-scaffolder-react';\nimport TextField from '@material-ui/core/TextField';\nimport React from 'react';\n\n/**\n * Secret Widget for overriding the default password input widget\n * @alpha\n */\nexport const SecretWidget = (\n props: Pick<WidgetProps, 'name' | 'onChange' | 'schema'>,\n) => {\n const { setSecrets, secrets } = useTemplateSecrets();\n const {\n name,\n onChange,\n schema: { title },\n } = props;\n\n return (\n <TextField\n id={title}\n label={title}\n aria-describedby={title}\n onChange={e => {\n onChange(Array(e.target.value.length).fill('*').join(''));\n setSecrets({ [name]: e.target.value });\n }}\n value={secrets[name] ?? ''}\n type=\"password\"\n autoComplete=\"off\"\n />\n );\n};\n"],"names":[],"mappings":";;;;AAyBa,MAAA,YAAA,GAAe,CAC1B,KACG,KAAA;AACH,EAAA,MAAM,EAAE,UAAA,EAAY,OAAQ,EAAA,GAAI,kBAAmB,EAAA,CAAA;AACnD,EAAM,MAAA;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA,EAAQ,EAAE,KAAM,EAAA;AAAA,GACd,GAAA,KAAA,CAAA;AAEJ,EACE,uBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,EAAI,EAAA,KAAA;AAAA,MACJ,KAAO,EAAA,KAAA;AAAA,MACP,kBAAkB,EAAA,KAAA;AAAA,MAClB,UAAU,CAAK,CAAA,KAAA;AACb,QAAS,QAAA,CAAA,KAAA,CAAM,CAAE,CAAA,MAAA,CAAO,KAAM,CAAA,MAAM,CAAE,CAAA,IAAA,CAAK,GAAG,CAAA,CAAE,IAAK,CAAA,EAAE,CAAC,CAAA,CAAA;AACxD,QAAA,UAAA,CAAW,EAAE,CAAC,IAAI,GAAG,CAAE,CAAA,MAAA,CAAO,OAAO,CAAA,CAAA;AAAA,OACvC;AAAA,MACA,KAAA,EAAO,OAAQ,CAAA,IAAI,CAAK,IAAA,EAAA;AAAA,MACxB,IAAK,EAAA,UAAA;AAAA,MACL,YAAa,EAAA,KAAA;AAAA,KAAA;AAAA,GACf,CAAA;AAEJ;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-scaffolder-react",
|
|
3
|
-
"version": "1.11.0
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "A frontend library that helps other Backstage plugins interact with the Scaffolder",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"test": "backstage-cli package test"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@backstage/catalog-client": "^1.6.6
|
|
61
|
-
"@backstage/catalog-model": "^1.6.0
|
|
62
|
-
"@backstage/core-components": "^0.14.10
|
|
60
|
+
"@backstage/catalog-client": "^1.6.6",
|
|
61
|
+
"@backstage/catalog-model": "^1.6.0",
|
|
62
|
+
"@backstage/core-components": "^0.14.10",
|
|
63
63
|
"@backstage/core-plugin-api": "^1.9.3",
|
|
64
|
-
"@backstage/plugin-catalog-react": "^1.12.3
|
|
65
|
-
"@backstage/plugin-permission-react": "^0.4.25
|
|
66
|
-
"@backstage/plugin-scaffolder-common": "^1.5.5
|
|
64
|
+
"@backstage/plugin-catalog-react": "^1.12.3",
|
|
65
|
+
"@backstage/plugin-permission-react": "^0.4.25",
|
|
66
|
+
"@backstage/plugin-scaffolder-common": "^1.5.5",
|
|
67
67
|
"@backstage/theme": "^0.5.6",
|
|
68
68
|
"@backstage/types": "^1.1.1",
|
|
69
69
|
"@backstage/version-bridge": "^1.0.8",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"zod-to-json-schema": "^3.20.4"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@backstage/cli": "^0.27.0
|
|
97
|
-
"@backstage/core-app-api": "^1.14.2
|
|
98
|
-
"@backstage/plugin-catalog": "^1.22.0
|
|
99
|
-
"@backstage/plugin-catalog-common": "^1.0.26
|
|
100
|
-
"@backstage/plugin-permission-common": "^0.8.1
|
|
101
|
-
"@backstage/test-utils": "^1.5.10
|
|
96
|
+
"@backstage/cli": "^0.27.0",
|
|
97
|
+
"@backstage/core-app-api": "^1.14.2",
|
|
98
|
+
"@backstage/plugin-catalog": "^1.22.0",
|
|
99
|
+
"@backstage/plugin-catalog-common": "^1.0.26",
|
|
100
|
+
"@backstage/plugin-permission-common": "^0.8.1",
|
|
101
|
+
"@backstage/test-utils": "^1.5.10",
|
|
102
102
|
"@testing-library/dom": "^10.0.0",
|
|
103
103
|
"@testing-library/jest-dom": "^6.0.0",
|
|
104
104
|
"@testing-library/react": "^15.0.0",
|