@backstage/plugin-scaffolder-react 1.19.8-next.1 → 1.20.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 CHANGED
@@ -1,5 +1,47 @@
1
1
  # @backstage/plugin-scaffolder-react
2
2
 
3
+ ## 1.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0be2541: Promoted the plugin's translation ref to the stable package entry point. It was previously only available through the alpha entry point.
8
+ - 470f72d: The `LogViewer` component from `@backstage/core-components` now supports downloading logs if a callback is passed to `onDownloadLogs`
9
+
10
+ ### Patch Changes
11
+
12
+ - 004b5c1: Added back `formFieldsApiRef` and `ScaffolderFormFieldsApi` as alpha exports.
13
+ - bd31ddd: Updated dependency `flatted` to `3.3.4`.
14
+ - f598909: Added `scaffolderApiMock` test utility, exported from `@backstage/plugin-scaffolder-react/testUtils`.
15
+ - a49a40d: Updated dependency `zod` to `^3.25.76 || ^4.0.0` & migrated to `/v3` or `/v4` imports.
16
+ - Updated dependencies
17
+ - @backstage/plugin-catalog-react@2.1.0
18
+ - @backstage/core-plugin-api@1.12.4
19
+ - @backstage/core-components@0.18.8
20
+ - @backstage/frontend-plugin-api@0.15.0
21
+ - @backstage/catalog-client@1.14.0
22
+ - @backstage/frontend-test-utils@0.5.1
23
+ - @backstage/plugin-permission-react@0.4.41
24
+ - @backstage/plugin-scaffolder-common@2.0.0
25
+ - @backstage/catalog-model@1.7.7
26
+
27
+ ## 1.20.0-next.2
28
+
29
+ ### Minor Changes
30
+
31
+ - 470f72d: The `LogViewer` component from `@backstage/core-components` now supports downloading logs if a callback is passed to `onDownloadLogs`
32
+
33
+ ### Patch Changes
34
+
35
+ - bd31ddd: Updated dependency `flatted` to `3.3.4`.
36
+ - Updated dependencies
37
+ - @backstage/frontend-test-utils@0.5.1-next.2
38
+ - @backstage/frontend-plugin-api@0.15.0-next.1
39
+ - @backstage/core-plugin-api@1.12.4-next.1
40
+ - @backstage/catalog-client@1.14.0-next.2
41
+ - @backstage/plugin-catalog-react@2.1.0-next.2
42
+ - @backstage/core-components@0.18.8-next.1
43
+ - @backstage/plugin-scaffolder-common@2.0.0-next.2
44
+
3
45
  ## 1.19.8-next.1
4
46
 
5
47
  ### Patch Changes
package/dist/alpha.d.ts CHANGED
@@ -9,7 +9,7 @@ import { UiSchema, FieldValidation, WidgetProps } from '@rjsf/utils';
9
9
  import { ApiHolder, IconComponent, AnyApiRef } from '@backstage/core-plugin-api';
10
10
  import { Overrides } from '@material-ui/core/styles/overrides';
11
11
  import { StyleRules } from '@material-ui/core/styles/withStyles';
12
- import { z } from 'zod';
12
+ import { z } from 'zod/v3';
13
13
 
14
14
  /** @alpha */
15
15
  interface FormField {
@@ -21,7 +21,9 @@ interface ScaffolderFormFieldsApi {
21
21
  }
22
22
 
23
23
  /** @alpha */
24
- declare const formFieldsApiRef: _backstage_frontend_plugin_api.ApiRef<ScaffolderFormFieldsApi>;
24
+ declare const formFieldsApiRef: _backstage_frontend_plugin_api.ApiRef<ScaffolderFormFieldsApi> & {
25
+ readonly $$type: "@backstage/ApiRef";
26
+ };
25
27
 
26
28
  /**
27
29
  * This is the parsed template schema that is returned from the {@link useTemplateSchema} hook.
@@ -422,14 +424,12 @@ declare const FormFieldBlueprint: _backstage_frontend_plugin_api.ExtensionBluepr
422
424
  */
423
425
  declare function createFormField<TReturnValue extends z.ZodType, TUiOptions extends z.ZodType>(opts: FormFieldExtensionData<TReturnValue, TUiOptions>): FormField;
424
426
 
425
- /** @alpha */
427
+ /**
428
+ * @alpha
429
+ * @deprecated Import from `@backstage/plugin-scaffolder-react` instead.
430
+ */
426
431
  declare const scaffolderReactTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"scaffolder-react", {
427
432
  readonly "workflow.noDescription": "No description";
428
- readonly "stepper.backButtonText": "Back";
429
- readonly "stepper.nextButtonText": "Next";
430
- readonly "stepper.createButtonText": "Create";
431
- readonly "stepper.reviewButtonText": "Review";
432
- readonly "stepper.stepIndexLabel": "Step {{index, number}}";
433
433
  readonly "passwordWidget.content": "This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`";
434
434
  readonly "scaffolderPageContextMenu.createLabel": "Create";
435
435
  readonly "scaffolderPageContextMenu.moreLabel": "more";
@@ -437,6 +437,11 @@ declare const scaffolderReactTranslationRef: _backstage_frontend_plugin_api.Tran
437
437
  readonly "scaffolderPageContextMenu.actionsLabel": "Installed Actions";
438
438
  readonly "scaffolderPageContextMenu.tasksLabel": "Task List";
439
439
  readonly "scaffolderPageContextMenu.templatingExtensionsLabel": "Templating Extensions";
440
+ readonly "stepper.backButtonText": "Back";
441
+ readonly "stepper.nextButtonText": "Next";
442
+ readonly "stepper.createButtonText": "Create";
443
+ readonly "stepper.reviewButtonText": "Review";
444
+ readonly "stepper.stepIndexLabel": "Step {{index, number}}";
440
445
  readonly "templateCategoryPicker.title": "Categories";
441
446
  readonly "templateCard.noDescription": "No description";
442
447
  readonly "templateCard.chooseButtonText": "Choose";
package/dist/alpha.esm.js CHANGED
@@ -22,5 +22,9 @@ export { useFilteredSchemaProperties } from './next/hooks/useFilteredSchemaPrope
22
22
  export { FormDecoratorBlueprint } from './next/blueprints/FormDecoratorBlueprint.esm.js';
23
23
  export { FormFieldBlueprint, createFormField } from './next/blueprints/FormFieldBlueprint.esm.js';
24
24
  export { createScaffolderFormDecorator } from './next/extensions/createScaffolderFormDecorator.esm.js';
25
- export { scaffolderReactTranslationRef } from './translation.esm.js';
25
+ import { scaffolderReactTranslationRef as scaffolderReactTranslationRef$1 } from './translation.esm.js';
26
+
27
+ const scaffolderReactTranslationRef = scaffolderReactTranslationRef$1;
28
+
29
+ export { scaffolderReactTranslationRef };
26
30
  //# sourceMappingURL=alpha.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"alpha.esm.js","sources":["../src/alpha.ts"],"sourcesContent":["/*\n * Copyright 2022 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\nexport * from './next';\n\nimport { scaffolderReactTranslationRef as _scaffolderReactTranslationRef } from './translation';\n\n/**\n * @alpha\n * @deprecated Import from `@backstage/plugin-scaffolder-react` instead.\n */\nexport const scaffolderReactTranslationRef = _scaffolderReactTranslationRef;\n"],"names":["_scaffolderReactTranslationRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAwBO,MAAM,6BAAA,GAAgCA;;;;"}
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import * as _backstage_plugin_scaffolder_common from '@backstage/plugin-scaffold
8
8
  import { TemplateEntityV1beta3, TemplateParameterSchema as TemplateParameterSchema$1, ScaffolderTaskStatus as ScaffolderTaskStatus$1, ScaffolderTask as ScaffolderTask$1, ScaffolderUsageExample as ScaffolderUsageExample$1, Action as Action$1, ListActionsResponse as ListActionsResponse$1, TemplateFilter as TemplateFilter$1, TemplateGlobalFunction as TemplateGlobalFunction$1, TemplateGlobalValue as TemplateGlobalValue$1, ListTemplatingExtensionsResponse as ListTemplatingExtensionsResponse$1, ScaffolderOutputLink as ScaffolderOutputLink$1, ScaffolderOutputText as ScaffolderOutputText$1, ScaffolderTaskOutput as ScaffolderTaskOutput$1, LogEvent as LogEvent$1, ScaffolderScaffoldOptions as ScaffolderScaffoldOptions$1, ScaffolderScaffoldResponse as ScaffolderScaffoldResponse$1, ScaffolderGetIntegrationsListOptions as ScaffolderGetIntegrationsListOptions$1, ScaffolderGetIntegrationsListResponse as ScaffolderGetIntegrationsListResponse$1, ScaffolderStreamLogsOptions as ScaffolderStreamLogsOptions$1, ScaffolderDryRunOptions as ScaffolderDryRunOptions$1, ScaffolderDryRunResponse as ScaffolderDryRunResponse$1, ScaffolderApi as ScaffolderApi$1 } from '@backstage/plugin-scaffolder-common';
9
9
  import * as react_jsx_runtime from 'react/jsx-runtime';
10
10
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
11
- import { z } from 'zod';
11
+ import { z } from 'zod/v3';
12
12
 
13
13
  /**
14
14
  * The props for the `Field` components
@@ -366,7 +366,9 @@ interface ScaffolderUseTemplateSecrets {
366
366
  declare const useTemplateSecrets: () => ScaffolderUseTemplateSecrets;
367
367
 
368
368
  /** @public */
369
- declare const scaffolderApiRef: _backstage_frontend_plugin_api.ApiRef<_backstage_plugin_scaffolder_common.ScaffolderApi>;
369
+ declare const scaffolderApiRef: _backstage_frontend_plugin_api.ApiRef<_backstage_plugin_scaffolder_common.ScaffolderApi> & {
370
+ readonly $$type: "@backstage/ApiRef";
371
+ };
370
372
 
371
373
  /**
372
374
  * The status of each task in a Scaffolder Job
@@ -615,5 +617,27 @@ interface FieldSchema<TReturn, TUiOptions> {
615
617
  readonly TOutput: TReturn;
616
618
  }
617
619
 
618
- export { ScaffolderFieldExtensions, ScaffolderLayouts, SecretsContextProvider, createScaffolderFieldExtension, createScaffolderLayout, makeFieldSchema, scaffolderApiRef, useCustomFieldExtensions, useCustomLayouts, useTaskEventStream, useTemplateSecrets };
620
+ /** @public */
621
+ declare const scaffolderReactTranslationRef: _backstage_frontend_plugin_api.TranslationRef<"scaffolder-react", {
622
+ readonly "workflow.noDescription": "No description";
623
+ readonly "passwordWidget.content": "This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`";
624
+ readonly "scaffolderPageContextMenu.createLabel": "Create";
625
+ readonly "scaffolderPageContextMenu.moreLabel": "more";
626
+ readonly "scaffolderPageContextMenu.editorLabel": "Manage Templates";
627
+ readonly "scaffolderPageContextMenu.actionsLabel": "Installed Actions";
628
+ readonly "scaffolderPageContextMenu.tasksLabel": "Task List";
629
+ readonly "scaffolderPageContextMenu.templatingExtensionsLabel": "Templating Extensions";
630
+ readonly "stepper.backButtonText": "Back";
631
+ readonly "stepper.nextButtonText": "Next";
632
+ readonly "stepper.createButtonText": "Create";
633
+ readonly "stepper.reviewButtonText": "Review";
634
+ readonly "stepper.stepIndexLabel": "Step {{index, number}}";
635
+ readonly "templateCategoryPicker.title": "Categories";
636
+ readonly "templateCard.noDescription": "No description";
637
+ readonly "templateCard.chooseButtonText": "Choose";
638
+ readonly "cardHeader.detailBtnTitle": "Show template entity details";
639
+ readonly "templateOutputs.title": "Text Output";
640
+ }>;
641
+
642
+ export { ScaffolderFieldExtensions, ScaffolderLayouts, SecretsContextProvider, createScaffolderFieldExtension, createScaffolderLayout, makeFieldSchema, scaffolderApiRef, scaffolderReactTranslationRef, useCustomFieldExtensions, useCustomLayouts, useTaskEventStream, useTemplateSecrets };
619
643
  export type { Action, ActionExample, CustomFieldExtensionSchema, CustomFieldValidator, FieldExtensionComponent, FieldExtensionComponentProps, FieldExtensionOptions, FieldExtensionUiSchema, FieldSchema, FormProps, LayoutComponent, LayoutOptions, LayoutTemplate, ListActionsResponse, ListTemplatingExtensionsResponse, LogEvent, ReviewStepProps, ScaffolderApi, ScaffolderDryRunOptions, ScaffolderDryRunResponse, ScaffolderGetIntegrationsListOptions, ScaffolderGetIntegrationsListResponse, ScaffolderOutputLink, ScaffolderOutputText, ScaffolderRJSFField, ScaffolderRJSFFieldProps, ScaffolderRJSFFormProps, ScaffolderRJSFRegistryFieldsType, ScaffolderScaffoldOptions, ScaffolderScaffoldResponse, ScaffolderStep, ScaffolderStreamLogsOptions, ScaffolderTask, ScaffolderTaskOutput, ScaffolderTaskStatus, ScaffolderUsageExample, ScaffolderUseTemplateSecrets, TaskStream, TemplateFilter, TemplateGlobalFunction, TemplateGlobalValue, TemplateGroupFilter, TemplateParameterSchema };
package/dist/index.esm.js CHANGED
@@ -6,4 +6,5 @@ export { useCustomLayouts } from './hooks/useCustomLayouts.esm.js';
6
6
  export { useTaskEventStream } from './hooks/useEventStream.esm.js';
7
7
  export { ScaffolderLayouts, createScaffolderLayout } from './layouts/createScaffolderLayout.esm.js';
8
8
  export { makeFieldSchema } from './utils.esm.js';
9
+ export { scaffolderReactTranslationRef } from './translation.esm.js';
9
10
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"index.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldBlueprint.esm.js","sources":["../../../src/next/blueprints/FormFieldBlueprint.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 */\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport { z } from 'zod';\n\nimport { OpaqueFormField } from '@internal/scaffolder';\nimport { FormFieldExtensionData } from './types';\nimport { FormField } from '../api';\n\nconst formFieldExtensionDataRef = createExtensionDataRef<\n () => Promise<FormField>\n>().with({\n id: 'scaffolder.form-field-loader',\n});\n\n/**\n * @alpha\n * Creates extensions that are Field Extensions for the Scaffolder\n * */\nexport const FormFieldBlueprint = createExtensionBlueprint({\n kind: 'scaffolder-form-field',\n attachTo: { id: 'api:scaffolder/form-fields', input: 'formFields' },\n dataRefs: {\n formFieldLoader: formFieldExtensionDataRef,\n },\n output: [formFieldExtensionDataRef],\n *factory(params: { field: () => Promise<FormField> }) {\n yield formFieldExtensionDataRef(params.field);\n },\n});\n\n/**\n * @alpha\n * Used to create a form field binding with typechecking for compliance\n */\nexport function createFormField<\n TReturnValue extends z.ZodType,\n TUiOptions extends z.ZodType,\n>(opts: FormFieldExtensionData<TReturnValue, TUiOptions>): FormField {\n return OpaqueFormField.createInstance('v1', opts);\n}\n"],"names":[],"mappings":";;;;AAyBA,MAAM,yBAAA,GAA4B,sBAAA,EAEhC,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC,CAAA;AAMM,MAAM,qBAAqB,wBAAA,CAAyB;AAAA,EACzD,IAAA,EAAM,uBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,4BAAA,EAA8B,OAAO,YAAA,EAAa;AAAA,EAClE,QAAA,EAAU;AAAA,IACR,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,MAAA,EAAQ,CAAC,yBAAyB,CAAA;AAAA,EAClC,CAAC,QAAQ,MAAA,EAA6C;AACpD,IAAA,MAAM,yBAAA,CAA0B,OAAO,KAAK,CAAA;AAAA,EAC9C;AACF,CAAC;AAMM,SAAS,gBAGd,IAAA,EAAmE;AACnE,EAAA,OAAO,eAAA,CAAgB,cAAA,CAAe,IAAA,EAAM,IAAI,CAAA;AAClD;;;;"}
1
+ {"version":3,"file":"FormFieldBlueprint.esm.js","sources":["../../../src/next/blueprints/FormFieldBlueprint.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 */\nimport {\n createExtensionBlueprint,\n createExtensionDataRef,\n} from '@backstage/frontend-plugin-api';\nimport { z } from 'zod/v3';\n\nimport { OpaqueFormField } from '@internal/scaffolder';\nimport { FormFieldExtensionData } from './types';\nimport { FormField } from '../api';\n\nconst formFieldExtensionDataRef = createExtensionDataRef<\n () => Promise<FormField>\n>().with({\n id: 'scaffolder.form-field-loader',\n});\n\n/**\n * @alpha\n * Creates extensions that are Field Extensions for the Scaffolder\n * */\nexport const FormFieldBlueprint = createExtensionBlueprint({\n kind: 'scaffolder-form-field',\n attachTo: { id: 'api:scaffolder/form-fields', input: 'formFields' },\n dataRefs: {\n formFieldLoader: formFieldExtensionDataRef,\n },\n output: [formFieldExtensionDataRef],\n *factory(params: { field: () => Promise<FormField> }) {\n yield formFieldExtensionDataRef(params.field);\n },\n});\n\n/**\n * @alpha\n * Used to create a form field binding with typechecking for compliance\n */\nexport function createFormField<\n TReturnValue extends z.ZodType,\n TUiOptions extends z.ZodType,\n>(opts: FormFieldExtensionData<TReturnValue, TUiOptions>): FormField {\n return OpaqueFormField.createInstance('v1', opts);\n}\n"],"names":[],"mappings":";;;;AAyBA,MAAM,yBAAA,GAA4B,sBAAA,EAEhC,CAAE,IAAA,CAAK;AAAA,EACP,EAAA,EAAI;AACN,CAAC,CAAA;AAMM,MAAM,qBAAqB,wBAAA,CAAyB;AAAA,EACzD,IAAA,EAAM,uBAAA;AAAA,EACN,QAAA,EAAU,EAAE,EAAA,EAAI,4BAAA,EAA8B,OAAO,YAAA,EAAa;AAAA,EAClE,QAAA,EAAU;AAAA,IACR,eAAA,EAAiB;AAAA,GACnB;AAAA,EACA,MAAA,EAAQ,CAAC,yBAAyB,CAAA;AAAA,EAClC,CAAC,QAAQ,MAAA,EAA6C;AACpD,IAAA,MAAM,yBAAA,CAA0B,OAAO,KAAK,CAAA;AAAA,EAC9C;AACF,CAAC;AAMM,SAAS,gBAGd,IAAA,EAAmE;AACnE,EAAA,OAAO,eAAA,CAAgB,cAAA,CAAe,IAAA,EAAM,IAAI,CAAA;AAClD;;;;"}
@@ -1,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { LogViewer } from '@backstage/core-components';
3
3
  import { makeStyles } from '@material-ui/core/styles';
4
+ import { useDownloadLogs } from '../../hooks/useDownloadLogs.esm.js';
4
5
 
5
6
  const useStyles = makeStyles({
6
7
  root: {
@@ -12,9 +13,11 @@ const useStyles = makeStyles({
12
13
  });
13
14
  const TaskLogStream = (props) => {
14
15
  const styles = useStyles();
16
+ const onDownloadLogs = useDownloadLogs(props.logs);
15
17
  return /* @__PURE__ */ jsx("div", { className: styles.root, children: /* @__PURE__ */ jsx(
16
18
  LogViewer,
17
19
  {
20
+ onDownloadLog: onDownloadLogs,
18
21
  text: Object.values(props.logs).map((l) => l.join("\n")).filter(Boolean).join("\n")
19
22
  }
20
23
  ) });
@@ -1 +1 @@
1
- {"version":3,"file":"TaskLogStream.esm.js","sources":["../../../../src/next/components/TaskLogStream/TaskLogStream.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 */\nimport { LogViewer } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n position: 'relative',\n minHeight: 240,\n },\n});\n\n/**\n * The text of the event stream\n *\n * @alpha\n */\nexport const TaskLogStream = (props: { logs: { [k: string]: string[] } }) => {\n const styles = useStyles();\n return (\n <div className={styles.root}>\n <LogViewer\n text={Object.values(props.logs)\n .map(l => l.join('\\n'))\n .filter(Boolean)\n .join('\\n')}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;AAkBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,IAAA,EAAM;AAAA,IACJ,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,MAAA;AAAA,IACR,QAAA,EAAU,UAAA;AAAA,IACV,SAAA,EAAW;AAAA;AAEf,CAAC,CAAA;AAOM,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA+C;AAC3E,EAAA,MAAM,SAAS,SAAA,EAAU;AACzB,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,IAAA,EACrB,QAAA,kBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,MAAM,MAAA,CAAO,MAAA,CAAO,KAAA,CAAM,IAAI,EAC3B,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,CACrB,OAAO,OAAO,CAAA,CACd,KAAK,IAAI;AAAA;AAAA,GACd,EACF,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"TaskLogStream.esm.js","sources":["../../../../src/next/components/TaskLogStream/TaskLogStream.tsx"],"sourcesContent":["/*\n * Copyright 2023 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 */\nimport { LogViewer } from '@backstage/core-components';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { useDownloadLogs } from '../../hooks/useDownloadLogs';\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n position: 'relative',\n minHeight: 240,\n },\n});\n\n/**\n * The text of the event stream\n *\n * @alpha\n */\nexport const TaskLogStream = (props: { logs: { [k: string]: string[] } }) => {\n const styles = useStyles();\n\n const onDownloadLogs = useDownloadLogs(props.logs);\n\n return (\n <div className={styles.root}>\n <LogViewer\n onDownloadLog={onDownloadLogs}\n text={Object.values(props.logs)\n .map(l => l.join('\\n'))\n .filter(Boolean)\n .join('\\n')}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,YAAY,UAAA,CAAW;AAAA,EAC3B,IAAA,EAAM;AAAA,IACJ,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,MAAA;AAAA,IACR,QAAA,EAAU,UAAA;AAAA,IACV,SAAA,EAAW;AAAA;AAEf,CAAC,CAAA;AAOM,MAAM,aAAA,GAAgB,CAAC,KAAA,KAA+C;AAC3E,EAAA,MAAM,SAAS,SAAA,EAAU;AAEzB,EAAA,MAAM,cAAA,GAAiB,eAAA,CAAgB,KAAA,CAAM,IAAI,CAAA;AAEjD,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,IAAA,EACrB,QAAA,kBAAA,GAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACC,aAAA,EAAe,cAAA;AAAA,MACf,MAAM,MAAA,CAAO,MAAA,CAAO,KAAA,CAAM,IAAI,EAC3B,GAAA,CAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,CACrB,OAAO,OAAO,CAAA,CACd,KAAK,IAAI;AAAA;AAAA,GACd,EACF,CAAA;AAEJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"createScaffolderFormDecorator.esm.js","sources":["../../../src/next/extensions/createScaffolderFormDecorator.ts"],"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 */\nimport { AnyApiRef } from '@backstage/core-plugin-api';\nimport { JsonObject, JsonValue } from '@backstage/types';\nimport { OpaqueFormDecorator } from '@internal/scaffolder';\nimport { z } from 'zod';\n\n/** @alpha */\nexport type ScaffolderFormDecoratorContext<\n TInput extends JsonObject = JsonObject,\n> = {\n input: TInput;\n formState: Record<string, JsonValue>;\n\n setFormState: (\n fn: (currentState: Record<string, JsonValue>) => Record<string, JsonValue>,\n ) => void;\n setSecrets: (\n fn: (currentState: Record<string, string>) => Record<string, string>,\n ) => void;\n};\n\n/** @alpha */\nexport type ScaffolderFormDecorator<TInput extends JsonObject = JsonObject> = {\n readonly $$type: '@backstage/scaffolder/FormDecorator';\n readonly id: string;\n readonly TInput: TInput;\n};\n\n/**\n * Method for creating decorators which can be used to collect\n * secrets from the user before submitting to the backend.\n * @alpha\n */\nexport function createScaffolderFormDecorator<\n TInputSchema extends { [key in string]: (zImpl: typeof z) => z.ZodType } = {\n [key in string]: (zImpl: typeof z) => z.ZodType;\n },\n TDeps extends { [key in string]: AnyApiRef } = { [key in string]: AnyApiRef },\n TInput extends JsonObject = {\n [key in keyof TInputSchema]: z.infer<ReturnType<TInputSchema[key]>>;\n },\n>(options: {\n id: string;\n schema?: {\n input?: TInputSchema;\n };\n deps?: TDeps;\n decorator: (\n ctx: ScaffolderFormDecoratorContext<TInput>,\n deps: TDeps extends { [key in string]: AnyApiRef }\n ? { [key in keyof TDeps]: TDeps[key]['T'] }\n : never,\n ) => Promise<void>;\n}): ScaffolderFormDecorator<TInput> {\n return OpaqueFormDecorator.createInstance('v1', {\n ...options,\n TInput: null as unknown as TInput,\n } as {\n id: string;\n schema?: {\n input?: TInputSchema;\n };\n TInput: TInput;\n deps?: TDeps;\n decorator: (\n ctx: ScaffolderFormDecoratorContext,\n deps: { [key in string]: AnyApiRef['T'] },\n ) => Promise<void>;\n });\n}\n"],"names":[],"mappings":";;;AA+CO,SAAS,8BAQd,OAAA,EAYkC;AAClC,EAAA,OAAO,mBAAA,CAAoB,eAAe,IAAA,EAAM;AAAA,IAC9C,GAAG,OAAA;AAAA,IACH,MAAA,EAAQ;AAAA,GAYT,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"createScaffolderFormDecorator.esm.js","sources":["../../../src/next/extensions/createScaffolderFormDecorator.ts"],"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 */\nimport { AnyApiRef } from '@backstage/core-plugin-api';\nimport { JsonObject, JsonValue } from '@backstage/types';\nimport { OpaqueFormDecorator } from '@internal/scaffolder';\nimport { z } from 'zod/v3';\n\n/** @alpha */\nexport type ScaffolderFormDecoratorContext<\n TInput extends JsonObject = JsonObject,\n> = {\n input: TInput;\n formState: Record<string, JsonValue>;\n\n setFormState: (\n fn: (currentState: Record<string, JsonValue>) => Record<string, JsonValue>,\n ) => void;\n setSecrets: (\n fn: (currentState: Record<string, string>) => Record<string, string>,\n ) => void;\n};\n\n/** @alpha */\nexport type ScaffolderFormDecorator<TInput extends JsonObject = JsonObject> = {\n readonly $$type: '@backstage/scaffolder/FormDecorator';\n readonly id: string;\n readonly TInput: TInput;\n};\n\n/**\n * Method for creating decorators which can be used to collect\n * secrets from the user before submitting to the backend.\n * @alpha\n */\nexport function createScaffolderFormDecorator<\n TInputSchema extends { [key in string]: (zImpl: typeof z) => z.ZodType } = {\n [key in string]: (zImpl: typeof z) => z.ZodType;\n },\n TDeps extends { [key in string]: AnyApiRef } = { [key in string]: AnyApiRef },\n TInput extends JsonObject = {\n [key in keyof TInputSchema]: z.infer<ReturnType<TInputSchema[key]>>;\n },\n>(options: {\n id: string;\n schema?: {\n input?: TInputSchema;\n };\n deps?: TDeps;\n decorator: (\n ctx: ScaffolderFormDecoratorContext<TInput>,\n deps: TDeps extends { [key in string]: AnyApiRef }\n ? { [key in keyof TDeps]: TDeps[key]['T'] }\n : never,\n ) => Promise<void>;\n}): ScaffolderFormDecorator<TInput> {\n return OpaqueFormDecorator.createInstance('v1', {\n ...options,\n TInput: null as unknown as TInput,\n } as {\n id: string;\n schema?: {\n input?: TInputSchema;\n };\n TInput: TInput;\n deps?: TDeps;\n decorator: (\n ctx: ScaffolderFormDecoratorContext,\n deps: { [key in string]: AnyApiRef['T'] },\n ) => Promise<void>;\n });\n}\n"],"names":[],"mappings":";;;AA+CO,SAAS,8BAQd,OAAA,EAYkC;AAClC,EAAA,OAAO,mBAAA,CAAoB,eAAe,IAAA,EAAM;AAAA,IAC9C,GAAG,OAAA;AAAA,IACH,MAAA,EAAQ;AAAA,GAYT,CAAA;AACH;;;;"}
@@ -0,0 +1,23 @@
1
+ import { useCallback } from 'react';
2
+ import { useParams } from 'react-router';
3
+
4
+ const useDownloadLogs = (logs) => {
5
+ const { taskId } = useParams();
6
+ return useCallback(() => {
7
+ const element = document.createElement("a");
8
+ const file = new Blob(
9
+ [
10
+ Object.values(logs).map((l) => l.join("\n")).filter(Boolean).join("\n")
11
+ ],
12
+ { type: "text/plain" }
13
+ );
14
+ element.href = URL.createObjectURL(file);
15
+ element.download = `${taskId}.log`;
16
+ element.click();
17
+ URL.revokeObjectURL(element.href);
18
+ element.remove();
19
+ }, [logs, taskId]);
20
+ };
21
+
22
+ export { useDownloadLogs };
23
+ //# sourceMappingURL=useDownloadLogs.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDownloadLogs.esm.js","sources":["../../../src/next/hooks/useDownloadLogs.ts"],"sourcesContent":["/*\n * Copyright 2026 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 { useCallback } from 'react';\nimport { useParams } from 'react-router';\n\nexport const useDownloadLogs = (logs: { [k: string]: string[] }) => {\n const { taskId } = useParams<{ taskId: string }>();\n return useCallback(() => {\n const element = document.createElement('a');\n const file = new Blob(\n [\n Object.values(logs)\n .map(l => l.join('\\n'))\n .filter(Boolean)\n .join('\\n'),\n ],\n { type: 'text/plain' },\n );\n element.href = URL.createObjectURL(file);\n element.download = `${taskId}.log`;\n element.click();\n URL.revokeObjectURL(element.href);\n element.remove();\n }, [logs, taskId]);\n};\n"],"names":[],"mappings":";;;AAmBO,MAAM,eAAA,GAAkB,CAAC,IAAA,KAAoC;AAClE,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAA8B;AACjD,EAAA,OAAO,YAAY,MAAM;AACvB,IAAA,MAAM,OAAA,GAAU,QAAA,CAAS,aAAA,CAAc,GAAG,CAAA;AAC1C,IAAA,MAAM,OAAO,IAAI,IAAA;AAAA,MACf;AAAA,QACE,MAAA,CAAO,MAAA,CAAO,IAAI,CAAA,CACf,IAAI,CAAA,CAAA,KAAK,CAAA,CAAE,IAAA,CAAK,IAAI,CAAC,CAAA,CACrB,MAAA,CAAO,OAAO,CAAA,CACd,KAAK,IAAI;AAAA,OACd;AAAA,MACA,EAAE,MAAM,YAAA;AAAa,KACvB;AACA,IAAA,OAAA,CAAQ,IAAA,GAAO,GAAA,CAAI,eAAA,CAAgB,IAAI,CAAA;AACvC,IAAA,OAAA,CAAQ,QAAA,GAAW,GAAG,MAAM,CAAA,IAAA,CAAA;AAC5B,IAAA,OAAA,CAAQ,KAAA,EAAM;AACd,IAAA,GAAA,CAAI,eAAA,CAAgB,QAAQ,IAAI,CAAA;AAChC,IAAA,OAAA,CAAQ,MAAA,EAAO;AAAA,EACjB,CAAA,EAAG,CAAC,IAAA,EAAM,MAAM,CAAC,CAAA;AACnB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalFormDecorator.esm.js","sources":["../../../../../../../packages/scaffolder-internal/src/wiring/InternalFormDecorator.ts"],"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 */\nimport { OpaqueType } from '@internal/opaque';\nimport { z } from 'zod';\n\nimport {\n ScaffolderFormDecorator,\n ScaffolderFormDecoratorContext,\n} from '@backstage/plugin-scaffolder-react/alpha';\nimport { AnyApiRef } from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport const OpaqueFormDecorator = OpaqueType.create<{\n public: ScaffolderFormDecorator;\n versions: {\n readonly version: 'v1';\n readonly id: string;\n readonly schema?: {\n input?: {\n [key in string]: (zImpl: typeof z) => z.ZodType;\n };\n };\n readonly deps?: { [key in string]: AnyApiRef };\n readonly decorator: (\n ctx: ScaffolderFormDecoratorContext,\n deps: { [depName in string]: AnyApiRef['T'] },\n ) => Promise<void>;\n };\n}>({ type: '@backstage/scaffolder/FormDecorator', versions: ['v1'] });\n"],"names":[],"mappings":";;AAyBO,MAAM,mBAAA,GAAsB,UAAA,CAAW,MAAA,CAgB3C,EAAE,IAAA,EAAM,uCAAuC,QAAA,EAAU,CAAC,IAAI,CAAA,EAAG;;;;"}
1
+ {"version":3,"file":"InternalFormDecorator.esm.js","sources":["../../../../../../../packages/scaffolder-internal/src/wiring/InternalFormDecorator.ts"],"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 */\nimport { OpaqueType } from '@internal/opaque';\nimport { z } from 'zod/v3';\n\nimport {\n ScaffolderFormDecorator,\n ScaffolderFormDecoratorContext,\n} from '@backstage/plugin-scaffolder-react/alpha';\nimport { AnyApiRef } from '@backstage/frontend-plugin-api';\n\n/** @alpha */\nexport const OpaqueFormDecorator = OpaqueType.create<{\n public: ScaffolderFormDecorator;\n versions: {\n readonly version: 'v1';\n readonly id: string;\n readonly schema?: {\n input?: {\n [key in string]: (zImpl: typeof z) => z.ZodType;\n };\n };\n readonly deps?: { [key in string]: AnyApiRef };\n readonly decorator: (\n ctx: ScaffolderFormDecoratorContext,\n deps: { [depName in string]: AnyApiRef['T'] },\n ) => Promise<void>;\n };\n}>({ type: '@backstage/scaffolder/FormDecorator', versions: ['v1'] });\n"],"names":[],"mappings":";;AAyBO,MAAM,mBAAA,GAAsB,UAAA,CAAW,MAAA,CAgB3C,EAAE,IAAA,EAAM,uCAAuC,QAAA,EAAU,CAAC,IAAI,CAAA,EAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"InternalFormField.esm.js","sources":["../../../../../../../packages/scaffolder-internal/src/wiring/InternalFormField.ts"],"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 { OpaqueType } from '@internal/opaque';\nimport { z } from 'zod';\n\nimport {\n FormFieldExtensionData,\n FormField,\n} from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport const OpaqueFormField = OpaqueType.create<{\n public: FormField;\n versions: FormFieldExtensionData<z.ZodType, z.ZodType> & {\n readonly version: 'v1';\n };\n}>({ type: '@backstage/scaffolder/FormField', versions: ['v1'] });\n"],"names":[],"mappings":";;AAyBO,MAAM,eAAA,GAAkB,UAAA,CAAW,MAAA,CAKvC,EAAE,IAAA,EAAM,mCAAmC,QAAA,EAAU,CAAC,IAAI,CAAA,EAAG;;;;"}
1
+ {"version":3,"file":"InternalFormField.esm.js","sources":["../../../../../../../packages/scaffolder-internal/src/wiring/InternalFormField.ts"],"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 { OpaqueType } from '@internal/opaque';\nimport { z } from 'zod/v3';\n\nimport {\n FormFieldExtensionData,\n FormField,\n} from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport const OpaqueFormField = OpaqueType.create<{\n public: FormField;\n versions: FormFieldExtensionData<z.ZodType, z.ZodType> & {\n readonly version: 'v1';\n };\n}>({ type: '@backstage/scaffolder/FormField', versions: ['v1'] });\n"],"names":[],"mappings":";;AAyBO,MAAM,eAAA,GAAkB,UAAA,CAAW,MAAA,CAKvC,EAAE,IAAA,EAAM,mCAAmC,QAAA,EAAU,CAAC,IAAI,CAAA,EAAG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"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 */\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @alpha */\nexport const scaffolderReactTranslationRef = createTranslationRef({\n id: 'scaffolder-react',\n messages: {\n passwordWidget: {\n content:\n 'This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`',\n },\n scaffolderPageContextMenu: {\n moreLabel: 'more',\n createLabel: 'Create',\n editorLabel: 'Manage Templates',\n actionsLabel: 'Installed Actions',\n tasksLabel: 'Task List',\n templatingExtensionsLabel: 'Templating Extensions',\n },\n stepper: {\n backButtonText: 'Back',\n createButtonText: 'Create',\n reviewButtonText: 'Review',\n stepIndexLabel: 'Step {{index, number}}',\n nextButtonText: 'Next',\n },\n templateCategoryPicker: {\n title: 'Categories',\n },\n templateCard: {\n noDescription: 'No description',\n chooseButtonText: 'Choose',\n },\n cardHeader: {\n detailBtnTitle: 'Show template entity details',\n },\n templateOutputs: {\n title: 'Text Output',\n },\n workflow: {\n noDescription: 'No description',\n },\n },\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,gCAAgC,oBAAA,CAAqB;AAAA,EAChE,EAAA,EAAI,kBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB;AAAA,MACd,OAAA,EACE;AAAA,KACJ;AAAA,IACA,yBAAA,EAA2B;AAAA,MACzB,SAAA,EAAW,MAAA;AAAA,MACX,WAAA,EAAa,QAAA;AAAA,MACb,WAAA,EAAa,kBAAA;AAAA,MACb,YAAA,EAAc,mBAAA;AAAA,MACd,UAAA,EAAY,WAAA;AAAA,MACZ,yBAAA,EAA2B;AAAA,KAC7B;AAAA,IACA,OAAA,EAAS;AAAA,MACP,cAAA,EAAgB,MAAA;AAAA,MAChB,gBAAA,EAAkB,QAAA;AAAA,MAClB,gBAAA,EAAkB,QAAA;AAAA,MAClB,cAAA,EAAgB,wBAAA;AAAA,MAChB,cAAA,EAAgB;AAAA,KAClB;AAAA,IACA,sBAAA,EAAwB;AAAA,MACtB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,aAAA,EAAe,gBAAA;AAAA,MACf,gBAAA,EAAkB;AAAA,KACpB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,cAAA,EAAgB;AAAA,KAClB;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,KAAA,EAAO;AAAA,KACT;AAAA,IACA,QAAA,EAAU;AAAA,MACR,aAAA,EAAe;AAAA;AACjB;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"translation.esm.js","sources":["../src/translation.ts"],"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 */\nimport { createTranslationRef } from '@backstage/core-plugin-api/alpha';\n\n/** @public */\nexport const scaffolderReactTranslationRef = createTranslationRef({\n id: 'scaffolder-react',\n messages: {\n passwordWidget: {\n content:\n 'This widget is insecure. Please use [`ui:field: Secret`](https://backstage.io/docs/features/software-templates/writing-templates/#using-secrets) instead of `ui:widget: password`',\n },\n scaffolderPageContextMenu: {\n moreLabel: 'more',\n createLabel: 'Create',\n editorLabel: 'Manage Templates',\n actionsLabel: 'Installed Actions',\n tasksLabel: 'Task List',\n templatingExtensionsLabel: 'Templating Extensions',\n },\n stepper: {\n backButtonText: 'Back',\n createButtonText: 'Create',\n reviewButtonText: 'Review',\n stepIndexLabel: 'Step {{index, number}}',\n nextButtonText: 'Next',\n },\n templateCategoryPicker: {\n title: 'Categories',\n },\n templateCard: {\n noDescription: 'No description',\n chooseButtonText: 'Choose',\n },\n cardHeader: {\n detailBtnTitle: 'Show template entity details',\n },\n templateOutputs: {\n title: 'Text Output',\n },\n workflow: {\n noDescription: 'No description',\n },\n },\n});\n"],"names":[],"mappings":";;AAkBO,MAAM,gCAAgC,oBAAA,CAAqB;AAAA,EAChE,EAAA,EAAI,kBAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,cAAA,EAAgB;AAAA,MACd,OAAA,EACE;AAAA,KACJ;AAAA,IACA,yBAAA,EAA2B;AAAA,MACzB,SAAA,EAAW,MAAA;AAAA,MACX,WAAA,EAAa,QAAA;AAAA,MACb,WAAA,EAAa,kBAAA;AAAA,MACb,YAAA,EAAc,mBAAA;AAAA,MACd,UAAA,EAAY,WAAA;AAAA,MACZ,yBAAA,EAA2B;AAAA,KAC7B;AAAA,IACA,OAAA,EAAS;AAAA,MACP,cAAA,EAAgB,MAAA;AAAA,MAChB,gBAAA,EAAkB,QAAA;AAAA,MAClB,gBAAA,EAAkB,QAAA;AAAA,MAClB,cAAA,EAAgB,wBAAA;AAAA,MAChB,cAAA,EAAgB;AAAA,KAClB;AAAA,IACA,sBAAA,EAAwB;AAAA,MACtB,KAAA,EAAO;AAAA,KACT;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,aAAA,EAAe,gBAAA;AAAA,MACf,gBAAA,EAAkB;AAAA,KACpB;AAAA,IACA,UAAA,EAAY;AAAA,MACV,cAAA,EAAgB;AAAA,KAClB;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,KAAA,EAAO;AAAA,KACT;AAAA,IACA,QAAA,EAAU;AAAA,MACR,aAAA,EAAe;AAAA;AACjB;AAEJ,CAAC;;;;"}
package/dist/utils.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import zodToJsonSchema from 'zod-to-json-schema';
2
- import { z } from 'zod';
2
+ import { z } from 'zod/v3';
3
3
 
4
4
  function makeFieldSchema(options) {
5
5
  const { output, uiOptions } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.esm.js","sources":["../src/utils.ts"],"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 zodToJsonSchema from 'zod-to-json-schema';\nimport { JSONSchema7 } from 'json-schema';\nimport { z } from 'zod';\nimport {\n CustomFieldExtensionSchema,\n FieldExtensionComponentProps,\n} from './extensions';\n\n/** @public */\nexport function makeFieldSchema<\n TReturnType extends z.ZodType,\n TUiOptions extends z.ZodType,\n>(options: {\n output: (zImpl: typeof z) => TReturnType;\n uiOptions?: (zImpl: typeof z) => TUiOptions;\n}): FieldSchema<z.output<TReturnType>, z.output<TUiOptions>> {\n const { output, uiOptions } = options;\n return {\n TProps: undefined as any,\n TOutput: undefined as any,\n schema: {\n returnValue: zodToJsonSchema(output(z)) as JSONSchema7,\n uiOptions: uiOptions && (zodToJsonSchema(uiOptions(z)) as JSONSchema7),\n },\n\n // These will be removed - just here for backwards compat whilst we're moving across\n type: undefined as any,\n uiOptionsType: undefined as any,\n };\n}\n\n/**\n * @public\n * FieldSchema encapsulates a JSONSchema7 along with the\n * matching FieldExtensionComponentProps type for a field extension.\n */\nexport interface FieldSchema<TReturn, TUiOptions> {\n /** @deprecated use TProps instead */\n readonly type: FieldExtensionComponentProps<TReturn, TUiOptions>;\n /** @deprecated will be removed */\n readonly uiOptionsType: TUiOptions;\n\n readonly schema: CustomFieldExtensionSchema;\n readonly TProps: FieldExtensionComponentProps<TReturn, TUiOptions>;\n readonly TOutput: TReturn;\n}\n"],"names":[],"mappings":";;;AAyBO,SAAS,gBAGd,OAAA,EAG2D;AAC3D,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,OAAA;AAC9B,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,MAAA;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa,eAAA,CAAgB,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,MACtC,SAAA,EAAW,SAAA,IAAc,eAAA,CAAgB,SAAA,CAAU,CAAC,CAAC;AAAA,KACvD;AAAA;AAAA,IAGA,IAAA,EAAM,MAAA;AAAA,IACN,aAAA,EAAe;AAAA,GACjB;AACF;;;;"}
1
+ {"version":3,"file":"utils.esm.js","sources":["../src/utils.ts"],"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 zodToJsonSchema from 'zod-to-json-schema';\nimport { JSONSchema7 } from 'json-schema';\nimport { z } from 'zod/v3';\nimport {\n CustomFieldExtensionSchema,\n FieldExtensionComponentProps,\n} from './extensions';\n\n/** @public */\nexport function makeFieldSchema<\n TReturnType extends z.ZodType,\n TUiOptions extends z.ZodType,\n>(options: {\n output: (zImpl: typeof z) => TReturnType;\n uiOptions?: (zImpl: typeof z) => TUiOptions;\n}): FieldSchema<z.output<TReturnType>, z.output<TUiOptions>> {\n const { output, uiOptions } = options;\n return {\n TProps: undefined as any,\n TOutput: undefined as any,\n schema: {\n returnValue: zodToJsonSchema(output(z)) as JSONSchema7,\n uiOptions: uiOptions && (zodToJsonSchema(uiOptions(z)) as JSONSchema7),\n },\n\n // These will be removed - just here for backwards compat whilst we're moving across\n type: undefined as any,\n uiOptionsType: undefined as any,\n };\n}\n\n/**\n * @public\n * FieldSchema encapsulates a JSONSchema7 along with the\n * matching FieldExtensionComponentProps type for a field extension.\n */\nexport interface FieldSchema<TReturn, TUiOptions> {\n /** @deprecated use TProps instead */\n readonly type: FieldExtensionComponentProps<TReturn, TUiOptions>;\n /** @deprecated will be removed */\n readonly uiOptionsType: TUiOptions;\n\n readonly schema: CustomFieldExtensionSchema;\n readonly TProps: FieldExtensionComponentProps<TReturn, TUiOptions>;\n readonly TOutput: TReturn;\n}\n"],"names":[],"mappings":";;;AAyBO,SAAS,gBAGd,OAAA,EAG2D;AAC3D,EAAA,MAAM,EAAE,MAAA,EAAQ,SAAA,EAAU,GAAI,OAAA;AAC9B,EAAA,OAAO;AAAA,IACL,MAAA,EAAQ,MAAA;AAAA,IACR,OAAA,EAAS,MAAA;AAAA,IACT,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa,eAAA,CAAgB,MAAA,CAAO,CAAC,CAAC,CAAA;AAAA,MACtC,SAAA,EAAW,SAAA,IAAc,eAAA,CAAgB,SAAA,CAAU,CAAC,CAAC;AAAA,KACvD;AAAA;AAAA,IAGA,IAAA,EAAM,MAAA;AAAA,IACN,aAAA,EAAe;AAAA,GACjB;AACF;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-react",
3
- "version": "1.19.8-next.1",
3
+ "version": "1.20.0",
4
4
  "description": "A frontend library that helps other Backstage plugins interact with the Scaffolder",
5
5
  "backstage": {
6
6
  "role": "web-library",
@@ -74,17 +74,17 @@
74
74
  "test": "backstage-cli package test"
75
75
  },
76
76
  "dependencies": {
77
- "@backstage/catalog-client": "1.14.0-next.1",
78
- "@backstage/catalog-model": "1.7.6",
79
- "@backstage/core-components": "0.18.8-next.0",
80
- "@backstage/core-plugin-api": "1.12.4-next.0",
81
- "@backstage/frontend-plugin-api": "0.14.2-next.0",
82
- "@backstage/plugin-catalog-react": "2.1.0-next.1",
83
- "@backstage/plugin-permission-react": "0.4.41-next.0",
84
- "@backstage/plugin-scaffolder-common": "2.0.0-next.1",
85
- "@backstage/theme": "0.7.2",
86
- "@backstage/types": "1.2.2",
87
- "@backstage/version-bridge": "1.0.12",
77
+ "@backstage/catalog-client": "^1.14.0",
78
+ "@backstage/catalog-model": "^1.7.7",
79
+ "@backstage/core-components": "^0.18.8",
80
+ "@backstage/core-plugin-api": "^1.12.4",
81
+ "@backstage/frontend-plugin-api": "^0.15.0",
82
+ "@backstage/plugin-catalog-react": "^2.1.0",
83
+ "@backstage/plugin-permission-react": "^0.4.41",
84
+ "@backstage/plugin-scaffolder-common": "^2.0.0",
85
+ "@backstage/theme": "^0.7.2",
86
+ "@backstage/types": "^1.2.2",
87
+ "@backstage/version-bridge": "^1.0.12",
88
88
  "@material-ui/core": "^4.12.2",
89
89
  "@material-ui/icons": "^4.9.1",
90
90
  "@material-ui/lab": "4.0.0-alpha.61",
@@ -97,7 +97,7 @@
97
97
  "ajv": "^8.0.1",
98
98
  "ajv-errors": "^3.0.0",
99
99
  "classnames": "^2.2.6",
100
- "flatted": "3.3.3",
100
+ "flatted": "^3.3.4",
101
101
  "humanize-duration": "^3.25.1",
102
102
  "immer": "^9.0.6",
103
103
  "json-schema": "^0.4.0",
@@ -108,17 +108,17 @@
108
108
  "react-use": "^17.2.4",
109
109
  "use-immer": "^0.11.0",
110
110
  "zen-observable": "^0.10.0",
111
- "zod": "^3.25.76",
111
+ "zod": "^3.25.76 || ^4.0.0",
112
112
  "zod-to-json-schema": "^3.25.1"
113
113
  },
114
114
  "devDependencies": {
115
- "@backstage/cli": "0.36.0-next.1",
116
- "@backstage/core-app-api": "1.19.6-next.0",
117
- "@backstage/frontend-test-utils": "0.5.1-next.1",
118
- "@backstage/plugin-catalog": "1.34.0-next.1",
119
- "@backstage/plugin-catalog-common": "1.1.8",
120
- "@backstage/plugin-permission-common": "0.9.6",
121
- "@backstage/test-utils": "1.7.16-next.0",
115
+ "@backstage/cli": "^0.36.0",
116
+ "@backstage/core-app-api": "^1.19.6",
117
+ "@backstage/frontend-test-utils": "^0.5.1",
118
+ "@backstage/plugin-catalog": "^2.0.0",
119
+ "@backstage/plugin-catalog-common": "^1.1.8",
120
+ "@backstage/plugin-permission-common": "^0.9.7",
121
+ "@backstage/test-utils": "^1.7.16",
122
122
  "@testing-library/dom": "^10.0.0",
123
123
  "@testing-library/jest-dom": "^6.0.0",
124
124
  "@testing-library/react": "^16.0.0",
@@ -131,10 +131,11 @@
131
131
  "swr": "^2.0.0"
132
132
  },
133
133
  "peerDependencies": {
134
- "@backstage/frontend-test-utils": "0.5.1-next.1",
134
+ "@backstage/frontend-test-utils": "^0.5.1",
135
135
  "@types/react": "^17.0.0 || ^18.0.0",
136
136
  "react": "^17.0.0 || ^18.0.0",
137
137
  "react-dom": "^17.0.0 || ^18.0.0",
138
+ "react-router": "^6.30.3",
138
139
  "react-router-dom": "^6.30.2"
139
140
  },
140
141
  "peerDependenciesMeta": {