@backstage/plugin-scaffolder 1.27.2-next.1 → 1.27.2

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,55 @@
1
1
  # @backstage/plugin-scaffolder
2
2
 
3
+ ## 1.27.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 3c62a50: Experimental support for `formDecorators` to enable secret collection and mutations to the parameters for scaffolder tasks
8
+ - c4ffd13: Added the autocomplete feature to GitlabRepoUrlPicker
9
+ - 9951ba4: Updated dependency `@rjsf/utils` to `5.23.1`.
10
+ Updated dependency `@rjsf/core` to `5.23.1`.
11
+ Updated dependency `@rjsf/material-ui` to `5.23.1`.
12
+ Updated dependency `@rjsf/validator-ajv8` to `5.23.1`.
13
+ - 184161f: Scaffolder field extensions registered with `FormFieldBlueprint` are now collected in the `useCustomFieldExtensions` hook, enabling them for use in the scaffolder.
14
+ - Updated dependencies
15
+ - @backstage/plugin-catalog-react@1.15.0
16
+ - @backstage/integration@1.16.0
17
+ - @backstage/plugin-scaffolder-common@1.5.8
18
+ - @backstage/plugin-scaffolder-react@1.14.2
19
+ - @backstage/catalog-client@1.9.0
20
+ - @backstage/core-compat-api@0.3.4
21
+ - @backstage/frontend-plugin-api@0.9.3
22
+ - @backstage/core-components@0.16.2
23
+ - @backstage/errors@1.2.6
24
+ - @backstage/catalog-model@1.7.2
25
+ - @backstage/core-plugin-api@1.10.2
26
+ - @backstage/integration-react@1.2.2
27
+ - @backstage/types@1.2.0
28
+ - @backstage/plugin-catalog-common@1.1.2
29
+ - @backstage/plugin-permission-react@0.4.29
30
+
31
+ ## 1.27.2-next.2
32
+
33
+ ### Patch Changes
34
+
35
+ - 184161f: Scaffolder field extensions registered with `FormFieldBlueprint` are now collected in the `useCustomFieldExtensions` hook, enabling them for use in the scaffolder.
36
+ - Updated dependencies
37
+ - @backstage/core-compat-api@0.3.4-next.2
38
+ - @backstage/plugin-catalog-react@1.14.3-next.2
39
+ - @backstage/plugin-scaffolder-react@1.14.2-next.2
40
+ - @backstage/errors@1.2.6-next.0
41
+ - @backstage/catalog-client@1.9.0-next.2
42
+ - @backstage/catalog-model@1.7.2-next.0
43
+ - @backstage/core-components@0.16.2-next.2
44
+ - @backstage/core-plugin-api@1.10.2-next.0
45
+ - @backstage/frontend-plugin-api@0.9.3-next.2
46
+ - @backstage/integration@1.16.0-next.1
47
+ - @backstage/integration-react@1.2.2-next.1
48
+ - @backstage/types@1.2.0
49
+ - @backstage/plugin-catalog-common@1.1.2-next.0
50
+ - @backstage/plugin-permission-react@0.4.29-next.0
51
+ - @backstage/plugin-scaffolder-common@1.5.8-next.1
52
+
3
53
  ## 1.27.2-next.1
4
54
 
5
55
  ### Patch Changes
@@ -1,11 +1,8 @@
1
1
  import { createApiRef } from '@backstage/frontend-plugin-api';
2
2
 
3
- const formFieldsApiRef = createApiRef({
4
- id: "plugin.scaffolder.form-fields"
5
- });
6
3
  const formDecoratorsApiRef = createApiRef({
7
4
  id: "plugin.scaffolder.form-decorators"
8
5
  });
9
6
 
10
- export { formDecoratorsApiRef, formFieldsApiRef };
7
+ export { formDecoratorsApiRef };
11
8
  //# sourceMappingURL=ref.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ref.esm.js","sources":["../../../src/alpha/api/ref.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 { createApiRef } from '@backstage/frontend-plugin-api';\nimport { ScaffolderFormFieldsApi, ScaffolderFormDecoratorsApi } from './types';\n\n/** @alpha */\nexport const formFieldsApiRef = createApiRef<ScaffolderFormFieldsApi>({\n id: 'plugin.scaffolder.form-fields',\n});\n\n/** @alpha */\nexport const formDecoratorsApiRef = createApiRef<ScaffolderFormDecoratorsApi>({\n id: 'plugin.scaffolder.form-decorators',\n});\n"],"names":[],"mappings":";;AAoBO,MAAM,mBAAmB,YAAsC,CAAA;AAAA,EACpE,EAAI,EAAA;AACN,CAAC;AAGM,MAAM,uBAAuB,YAA0C,CAAA;AAAA,EAC5E,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"ref.esm.js","sources":["../../../src/alpha/api/ref.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 { createApiRef } from '@backstage/frontend-plugin-api';\nimport { ScaffolderFormDecoratorsApi } from './types';\n\n/** @alpha */\nexport const formDecoratorsApiRef = createApiRef<ScaffolderFormDecoratorsApi>({\n id: 'plugin.scaffolder.form-decorators',\n});\n"],"names":[],"mappings":";;AAoBO,MAAM,uBAAuB,YAA0C,CAAA;AAAA,EAC5E,EAAI,EAAA;AACN,CAAC;;;;"}
@@ -2,7 +2,7 @@ import { convertLegacyRouteRefs } from '@backstage/core-compat-api';
2
2
  import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { rootRouteRef, selectedTemplateRouteRef, scaffolderTaskRouteRef, actionsRouteRef, scaffolderListTaskRouteRef, editRouteRef, registerComponentRouteRef, viewTechDocRouteRef } from '../routes.esm.js';
4
4
  import { scaffolderApi, scaffolderPage, scaffolderNavItem, repoUrlPickerFormField } from './extensions.esm.js';
5
- import { formFieldsApi } from './api/FormFieldsApi.esm.js';
5
+ import { formFieldsApi } from '@backstage/plugin-scaffolder-react/alpha';
6
6
 
7
7
  var plugin = createFrontendPlugin({
8
8
  id: "scaffolder",
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n rootRouteRef,\n actionsRouteRef,\n editRouteRef,\n registerComponentRouteRef,\n scaffolderListTaskRouteRef,\n scaffolderTaskRouteRef,\n selectedTemplateRouteRef,\n viewTechDocRouteRef,\n} from '../routes';\nimport {\n repoUrlPickerFormField,\n scaffolderNavItem,\n scaffolderPage,\n scaffolderApi,\n} from './extensions';\nimport { formFieldsApi } from './api/FormFieldsApi';\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'scaffolder',\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n }),\n externalRoutes: convertLegacyRouteRefs({\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n }),\n extensions: [\n scaffolderApi,\n scaffolderPage,\n scaffolderNavItem,\n formFieldsApi,\n repoUrlPickerFormField,\n ],\n});\n"],"names":[],"mappings":";;;;;;AAqCA,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,YAAA;AAAA,EACJ,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA,YAAA;AAAA,IACN,gBAAkB,EAAA,wBAAA;AAAA,IAClB,WAAa,EAAA,sBAAA;AAAA,IACb,OAAS,EAAA,eAAA;AAAA,IACT,SAAW,EAAA,0BAAA;AAAA,IACX,IAAM,EAAA;AAAA,GACP,CAAA;AAAA,EACD,gBAAgB,sBAAuB,CAAA;AAAA,IACrC,iBAAmB,EAAA,yBAAA;AAAA,IACnB,WAAa,EAAA;AAAA,GACd,CAAA;AAAA,EACD,UAAY,EAAA;AAAA,IACV,aAAA;AAAA,IACA,cAAA;AAAA,IACA,iBAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.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 { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport {\n rootRouteRef,\n actionsRouteRef,\n editRouteRef,\n registerComponentRouteRef,\n scaffolderListTaskRouteRef,\n scaffolderTaskRouteRef,\n selectedTemplateRouteRef,\n viewTechDocRouteRef,\n} from '../routes';\nimport {\n repoUrlPickerFormField,\n scaffolderNavItem,\n scaffolderPage,\n scaffolderApi,\n} from './extensions';\nimport { formFieldsApi } from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport default createFrontendPlugin({\n id: 'scaffolder',\n routes: convertLegacyRouteRefs({\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n }),\n externalRoutes: convertLegacyRouteRefs({\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n }),\n extensions: [\n scaffolderApi,\n scaffolderPage,\n scaffolderNavItem,\n formFieldsApi,\n repoUrlPickerFormField,\n ],\n});\n"],"names":[],"mappings":";;;;;;AAqCA,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,YAAA;AAAA,EACJ,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,IAAM,EAAA,YAAA;AAAA,IACN,gBAAkB,EAAA,wBAAA;AAAA,IAClB,WAAa,EAAA,sBAAA;AAAA,IACb,OAAS,EAAA,eAAA;AAAA,IACT,SAAW,EAAA,0BAAA;AAAA,IACX,IAAM,EAAA;AAAA,GACP,CAAA;AAAA,EACD,gBAAgB,sBAAuB,CAAA;AAAA,IACrC,iBAAmB,EAAA,yBAAA;AAAA,IACnB,WAAa,EAAA;AAAA,GACd,CAAA;AAAA,EACD,UAAY,EAAA;AAAA,IACV,aAAA;AAAA,IACA,cAAA;AAAA,IACA,iBAAA;AAAA,IACA,aAAA;AAAA,IACA;AAAA;AAEJ,CAAC,CAAA;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -6,7 +6,8 @@ import { TemplateGroupFilter, FieldExtensionOptions, ReviewStepProps, LayoutOpti
6
6
  import { FormProps as FormProps$2 } from '@rjsf/core';
7
7
  import * as _backstage_core_plugin_api_alpha from '@backstage/core-plugin-api/alpha';
8
8
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
9
- import { FormFieldExtensionData, ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';
9
+ import { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';
10
+ export { ScaffolderFormFieldsApi, formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';
10
11
  import * as _backstage_core_plugin_api from '@backstage/core-plugin-api';
11
12
 
12
13
  /** @public */
@@ -225,17 +226,11 @@ declare const scaffolderTranslationRef: _backstage_core_plugin_api_alpha.Transla
225
226
  readonly "templateEditorToolbarTemplatesMenu.button": "Templates";
226
227
  }>;
227
228
 
228
- /** @alpha */
229
- interface ScaffolderFormFieldsApi {
230
- getFormFields(): Promise<FormFieldExtensionData[]>;
231
- }
232
229
  /** @alpha */
233
230
  interface ScaffolderFormDecoratorsApi {
234
231
  getFormDecorators(): Promise<ScaffolderFormDecorator[]>;
235
232
  }
236
233
 
237
- /** @alpha */
238
- declare const formFieldsApiRef: _backstage_frontend_plugin_api.ApiRef<ScaffolderFormFieldsApi>;
239
234
  /** @alpha */
240
235
  declare const formDecoratorsApiRef: _backstage_frontend_plugin_api.ApiRef<ScaffolderFormDecoratorsApi>;
241
236
 
@@ -288,6 +283,22 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
288
283
  namespace: string;
289
284
  }>;
290
285
  }, {
286
+ "api:scaffolder/form-fields": _backstage_frontend_plugin_api.ExtensionDefinition<{
287
+ config: {};
288
+ configInput: {};
289
+ output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
290
+ inputs: {
291
+ formFields: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<() => Promise<FormField>, "scaffolder.form-field-loader", {}>, {
292
+ singleton: false;
293
+ optional: false;
294
+ }>;
295
+ };
296
+ kind: "api";
297
+ name: "form-fields";
298
+ params: {
299
+ factory: _backstage_frontend_plugin_api.AnyApiFactory;
300
+ };
301
+ }>;
291
302
  "page:scaffolder": _backstage_frontend_plugin_api.ExtensionDefinition<{
292
303
  kind: "page";
293
304
  name: undefined;
@@ -346,22 +357,6 @@ declare const _default: _backstage_frontend_plugin_api.FrontendPlugin<{
346
357
  factory: _backstage_frontend_plugin_api.AnyApiFactory;
347
358
  };
348
359
  }>;
349
- "api:scaffolder/form-fields": _backstage_frontend_plugin_api.ExtensionDefinition<{
350
- config: {};
351
- configInput: {};
352
- output: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
353
- inputs: {
354
- formFields: _backstage_frontend_plugin_api.ExtensionInput<_backstage_frontend_plugin_api.ConfigurableExtensionDataRef<() => Promise<FormField>, "scaffolder.form-field-loader", {}>, {
355
- singleton: false;
356
- optional: false;
357
- }>;
358
- };
359
- kind: "api";
360
- name: "form-fields";
361
- params: {
362
- factory: _backstage_frontend_plugin_api.AnyApiFactory;
363
- };
364
- }>;
365
360
  }>;
366
361
 
367
- export { DefaultScaffolderFormDecoratorsApi, type FormProps, type ScaffolderCustomFieldExplorerClassKey, type ScaffolderFormDecoratorsApi, type ScaffolderFormFieldsApi, type ScaffolderTemplateEditorClassKey, type ScaffolderTemplateFormPreviewerClassKey, type TemplateListPageProps, type TemplateWizardPageProps, _default as default, formDecoratorsApiRef, formFieldsApiRef, scaffolderTranslationRef };
362
+ export { DefaultScaffolderFormDecoratorsApi, type FormProps, type ScaffolderCustomFieldExplorerClassKey, type ScaffolderFormDecoratorsApi, type ScaffolderTemplateEditorClassKey, type ScaffolderTemplateFormPreviewerClassKey, type TemplateListPageProps, type TemplateWizardPageProps, _default as default, formDecoratorsApiRef, scaffolderTranslationRef };
package/dist/alpha.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export { scaffolderTranslationRef } from './translation.esm.js';
2
- export { formDecoratorsApiRef, formFieldsApiRef } from './alpha/api/ref.esm.js';
2
+ export { formDecoratorsApiRef } from './alpha/api/ref.esm.js';
3
3
  export { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi.esm.js';
4
+ export { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';
4
5
  export { default } from './alpha/plugin.esm.js';
5
6
  //# 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":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,6 +1,4 @@
1
1
  import { OpaqueType } from '../../../opaque-internal/src/OpaqueType.esm.js';
2
2
 
3
- const OpaqueFormField = OpaqueType.create({ type: "@backstage/scaffolder/FormField", versions: ["v1"] });
4
-
5
- export { OpaqueFormField };
3
+ OpaqueType.create({ type: "@backstage/scaffolder/FormField", versions: ["v1"] });
6
4
  //# sourceMappingURL=InternalFormField.esm.js.map
@@ -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 { FormFieldExtensionData } from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport interface FormField {\n readonly $$type: '@backstage/scaffolder/FormField';\n}\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":";;AA2Ba,MAAA,eAAA,GAAkB,UAAW,CAAA,MAAA,CAKvC,EAAE,IAAA,EAAM,mCAAmC,QAAU,EAAA,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';\n\nimport { FormFieldExtensionData } from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport interface FormField {\n readonly $$type: '@backstage/scaffolder/FormField';\n}\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":";;AA2B+B,UAAW,CAAA,MAAA,CAKvC,EAAE,IAAA,EAAM,mCAAmC,QAAU,EAAA,CAAC,IAAI,CAAA,EAAG"}
@@ -18,6 +18,7 @@ import { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranc
18
18
  import { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema.esm.js';
19
19
  import { formDecoratorsApiRef } from './alpha/api/ref.esm.js';
20
20
  import { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi.esm.js';
21
+ import { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';
21
22
  import { EntityPickerSchema } from './components/fields/EntityPicker/schema.esm.js';
22
23
  import { EntityNamePickerSchema } from './components/fields/EntityNamePicker/schema.esm.js';
23
24
  import { MultiEntityPickerSchema } from './components/fields/MultiEntityPicker/schema.esm.js';
@@ -48,6 +49,11 @@ const scaffolderPlugin = createPlugin({
48
49
  api: formDecoratorsApiRef,
49
50
  deps: {},
50
51
  factory: () => DefaultScaffolderFormDecoratorsApi.create()
52
+ }),
53
+ createApiFactory({
54
+ api: formFieldsApiRef,
55
+ deps: {},
56
+ factory: () => ({ getFormFields: async () => [] })
51
57
  })
52
58
  ],
53
59
  routes: {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2020 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 { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n createScaffolderFieldExtension,\n scaffolderApiRef,\n} from '@backstage/plugin-scaffolder-react';\nimport { ScaffolderClient } from './api';\nimport {\n EntityPicker,\n EntityPickerSchema,\n} from './components/fields/EntityPicker/EntityPicker';\nimport { entityNamePickerValidation } from './components/fields/EntityNamePicker';\nimport {\n EntityNamePicker,\n EntityNamePickerSchema,\n} from './components/fields/EntityNamePicker/EntityNamePicker';\nimport {\n OwnerPicker,\n OwnerPickerSchema,\n} from './components/fields/OwnerPicker/OwnerPicker';\nimport {\n MultiEntityPicker,\n MultiEntityPickerSchema,\n validateMultiEntityPickerValidation,\n} from './components/fields/MultiEntityPicker/MultiEntityPicker';\nimport { repoPickerValidation } from './components/fields/RepoUrlPicker';\nimport {\n RepoUrlPicker,\n RepoUrlPickerSchema,\n} from './components/fields/RepoUrlPicker/RepoUrlPicker';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n OwnedEntityPicker,\n OwnedEntityPickerSchema,\n} from './components/fields/OwnedEntityPicker/OwnedEntityPicker';\nimport {\n EntityTagsPicker,\n EntityTagsPickerSchema,\n} from './components/fields/EntityTagsPicker/EntityTagsPicker';\nimport {\n registerComponentRouteRef,\n rootRouteRef,\n viewTechDocRouteRef,\n selectedTemplateRouteRef,\n scaffolderTaskRouteRef,\n scaffolderListTaskRouteRef,\n actionsRouteRef,\n editRouteRef,\n editorRouteRef,\n customFieldsRouteRef,\n templateFormRouteRef,\n} from './routes';\nimport {\n MyGroupsPicker,\n MyGroupsPickerSchema,\n} from './components/fields/MyGroupsPicker/MyGroupsPicker';\nimport { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranchPicker';\nimport { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema';\nimport { formDecoratorsApiRef } from './alpha/api/ref';\nimport { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi';\n\n/**\n * The main plugin export for the scaffolder.\n * @public\n */\nexport const scaffolderPlugin = createPlugin({\n id: 'scaffolder',\n apis: [\n createApiFactory({\n api: scaffolderApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, scmIntegrationsApi, fetchApi, identityApi }) =>\n new ScaffolderClient({\n discoveryApi,\n scmIntegrationsApi,\n fetchApi,\n identityApi,\n }),\n }),\n createApiFactory({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () => DefaultScaffolderFormDecoratorsApi.create(),\n }),\n ],\n routes: {\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n editor: editorRouteRef,\n customFields: customFieldsRouteRef,\n templateForm: templateFormRouteRef,\n },\n externalRoutes: {\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n },\n});\n\n/**\n * A field extension for selecting an Entity that exists in the Catalog.\n *\n * @public\n */\nexport const EntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityPicker,\n name: 'EntityPicker',\n schema: EntityPickerSchema,\n }),\n);\n\n/**\n * The field extension for selecting a name for a new Entity in the Catalog.\n *\n * @public\n */\nexport const EntityNamePickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n schema: EntityNamePickerSchema,\n }),\n);\n\n/**\n * A field extension for selecting multiple entities that exists in the Catalog.\n *\n * @public\n */\nexport const MultiEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MultiEntityPicker,\n name: 'MultiEntityPicker',\n schema: MultiEntityPickerSchema,\n validation: validateMultiEntityPickerValidation,\n }),\n);\n\n/**\n * The field extension which provides the ability to select a RepositoryUrl.\n * Currently, this is an encoded URL that looks something like the following `github.com?repo=myRepoName&owner=backstage`.\n *\n * @public\n */\nexport const RepoUrlPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n schema: RepoUrlPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking users and groups out of the Catalog.\n *\n * @public\n */\nexport const OwnerPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnerPicker,\n name: 'OwnerPicker',\n schema: OwnerPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking groups a user belongs to out of the catalog.\n *\n * @public\n */\nexport const MyGroupsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MyGroupsPicker,\n name: 'MyGroupsPicker',\n schema: MyGroupsPickerSchema,\n }),\n);\n\n/**\n * The Router and main entrypoint to the Scaffolder plugin.\n *\n * @public\n */\nexport const ScaffolderPage = scaffolderPlugin.provide(\n createRoutableExtension({\n name: 'ScaffolderPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * A field extension to show all the Entities that are owned by the current logged-in User for use in templates.\n *\n * @public\n */\nexport const OwnedEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n schema: OwnedEntityPickerSchema,\n }),\n);\n\n/**\n * EntityTagsPickerFieldExtension\n * @public\n */\nexport const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n schema: EntityTagsPickerSchema,\n }),\n);\n\n/**\n * A field extension to select a branch from a repository.\n *\n * @public\n */\nexport const RepoBranchPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoBranchPicker,\n name: 'RepoBranchPicker',\n schema: RepoBranchPickerSchema,\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuFO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA,YAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,kBAAoB,EAAA,qBAAA;AAAA,QACpB,QAAU,EAAA,WAAA;AAAA,QACV,WAAa,EAAA;AAAA,OACf;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,oBAAoB,QAAU,EAAA,WAAA,EACtD,KAAA,IAAI,gBAAiB,CAAA;AAAA,QACnB,YAAA;AAAA,QACA,kBAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OACD;AAAA,KACJ,CAAA;AAAA,I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["/*\n * Copyright 2020 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 { scmIntegrationsApiRef } from '@backstage/integration-react';\nimport {\n createScaffolderFieldExtension,\n scaffolderApiRef,\n} from '@backstage/plugin-scaffolder-react';\nimport { ScaffolderClient } from './api';\nimport {\n EntityPicker,\n EntityPickerSchema,\n} from './components/fields/EntityPicker/EntityPicker';\nimport { entityNamePickerValidation } from './components/fields/EntityNamePicker';\nimport {\n EntityNamePicker,\n EntityNamePickerSchema,\n} from './components/fields/EntityNamePicker/EntityNamePicker';\nimport {\n OwnerPicker,\n OwnerPickerSchema,\n} from './components/fields/OwnerPicker/OwnerPicker';\nimport {\n MultiEntityPicker,\n MultiEntityPickerSchema,\n validateMultiEntityPickerValidation,\n} from './components/fields/MultiEntityPicker/MultiEntityPicker';\nimport { repoPickerValidation } from './components/fields/RepoUrlPicker';\nimport {\n RepoUrlPicker,\n RepoUrlPickerSchema,\n} from './components/fields/RepoUrlPicker/RepoUrlPicker';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n discoveryApiRef,\n fetchApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport {\n OwnedEntityPicker,\n OwnedEntityPickerSchema,\n} from './components/fields/OwnedEntityPicker/OwnedEntityPicker';\nimport {\n EntityTagsPicker,\n EntityTagsPickerSchema,\n} from './components/fields/EntityTagsPicker/EntityTagsPicker';\nimport {\n registerComponentRouteRef,\n rootRouteRef,\n viewTechDocRouteRef,\n selectedTemplateRouteRef,\n scaffolderTaskRouteRef,\n scaffolderListTaskRouteRef,\n actionsRouteRef,\n editRouteRef,\n editorRouteRef,\n customFieldsRouteRef,\n templateFormRouteRef,\n} from './routes';\nimport {\n MyGroupsPicker,\n MyGroupsPickerSchema,\n} from './components/fields/MyGroupsPicker/MyGroupsPicker';\nimport { RepoBranchPicker } from './components/fields/RepoBranchPicker/RepoBranchPicker';\nimport { RepoBranchPickerSchema } from './components/fields/RepoBranchPicker/schema';\nimport { formDecoratorsApiRef } from './alpha/api/ref';\nimport { DefaultScaffolderFormDecoratorsApi } from './alpha/api/FormDecoratorsApi';\nimport { formFieldsApiRef } from '@backstage/plugin-scaffolder-react/alpha';\n\n/**\n * The main plugin export for the scaffolder.\n * @public\n */\nexport const scaffolderPlugin = createPlugin({\n id: 'scaffolder',\n apis: [\n createApiFactory({\n api: scaffolderApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n scmIntegrationsApi: scmIntegrationsApiRef,\n fetchApi: fetchApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, scmIntegrationsApi, fetchApi, identityApi }) =>\n new ScaffolderClient({\n discoveryApi,\n scmIntegrationsApi,\n fetchApi,\n identityApi,\n }),\n }),\n createApiFactory({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () => DefaultScaffolderFormDecoratorsApi.create(),\n }),\n createApiFactory({\n api: formFieldsApiRef,\n deps: {},\n factory: () => ({ getFormFields: async () => [] }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n selectedTemplate: selectedTemplateRouteRef,\n ongoingTask: scaffolderTaskRouteRef,\n actions: actionsRouteRef,\n listTasks: scaffolderListTaskRouteRef,\n edit: editRouteRef,\n editor: editorRouteRef,\n customFields: customFieldsRouteRef,\n templateForm: templateFormRouteRef,\n },\n externalRoutes: {\n registerComponent: registerComponentRouteRef,\n viewTechDoc: viewTechDocRouteRef,\n },\n});\n\n/**\n * A field extension for selecting an Entity that exists in the Catalog.\n *\n * @public\n */\nexport const EntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityPicker,\n name: 'EntityPicker',\n schema: EntityPickerSchema,\n }),\n);\n\n/**\n * The field extension for selecting a name for a new Entity in the Catalog.\n *\n * @public\n */\nexport const EntityNamePickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityNamePicker,\n name: 'EntityNamePicker',\n validation: entityNamePickerValidation,\n schema: EntityNamePickerSchema,\n }),\n);\n\n/**\n * A field extension for selecting multiple entities that exists in the Catalog.\n *\n * @public\n */\nexport const MultiEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MultiEntityPicker,\n name: 'MultiEntityPicker',\n schema: MultiEntityPickerSchema,\n validation: validateMultiEntityPickerValidation,\n }),\n);\n\n/**\n * The field extension which provides the ability to select a RepositoryUrl.\n * Currently, this is an encoded URL that looks something like the following `github.com?repo=myRepoName&owner=backstage`.\n *\n * @public\n */\nexport const RepoUrlPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoUrlPicker,\n name: 'RepoUrlPicker',\n validation: repoPickerValidation,\n schema: RepoUrlPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking users and groups out of the Catalog.\n *\n * @public\n */\nexport const OwnerPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnerPicker,\n name: 'OwnerPicker',\n schema: OwnerPickerSchema,\n }),\n);\n\n/**\n * A field extension for picking groups a user belongs to out of the catalog.\n *\n * @public\n */\nexport const MyGroupsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: MyGroupsPicker,\n name: 'MyGroupsPicker',\n schema: MyGroupsPickerSchema,\n }),\n);\n\n/**\n * The Router and main entrypoint to the Scaffolder plugin.\n *\n * @public\n */\nexport const ScaffolderPage = scaffolderPlugin.provide(\n createRoutableExtension({\n name: 'ScaffolderPage',\n component: () => import('./components/Router').then(m => m.Router),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * A field extension to show all the Entities that are owned by the current logged-in User for use in templates.\n *\n * @public\n */\nexport const OwnedEntityPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: OwnedEntityPicker,\n name: 'OwnedEntityPicker',\n schema: OwnedEntityPickerSchema,\n }),\n);\n\n/**\n * EntityTagsPickerFieldExtension\n * @public\n */\nexport const EntityTagsPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: EntityTagsPicker,\n name: 'EntityTagsPicker',\n schema: EntityTagsPickerSchema,\n }),\n);\n\n/**\n * A field extension to select a branch from a repository.\n *\n * @public\n */\nexport const RepoBranchPickerFieldExtension = scaffolderPlugin.provide(\n createScaffolderFieldExtension({\n component: RepoBranchPicker,\n name: 'RepoBranchPicker',\n schema: RepoBranchPickerSchema,\n }),\n);\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFO,MAAM,mBAAmB,YAAa,CAAA;AAAA,EAC3C,EAAI,EAAA,YAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,kBAAoB,EAAA,qBAAA;AAAA,QACpB,QAAU,EAAA,WAAA;AAAA,QACV,WAAa,EAAA;AAAA,OACf;AAAA,MACA,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,oBAAoB,QAAU,EAAA,WAAA,EACtD,KAAA,IAAI,gBAAiB,CAAA;AAAA,QACnB,YAAA;AAAA,QACA,kBAAA;AAAA,QACA,QAAA;AAAA,QACA;AAAA,OACD;AAAA,KACJ,CAAA;AAAA,IACD,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,oBAAA;AAAA,MACL,MAAM,EAAC;AAAA,MACP,OAAA,EAAS,MAAM,kCAAA,CAAmC,MAAO;AAAA,KAC1D,CAAA;AAAA,IACD,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,gBAAA;AAAA,MACL,MAAM,EAAC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description": "The Backstage plugin that helps you create new things",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -67,21 +67,21 @@
67
67
  "test": "backstage-cli package test"
68
68
  },
69
69
  "dependencies": {
70
- "@backstage/catalog-client": "1.9.0-next.1",
71
- "@backstage/catalog-model": "1.7.1",
72
- "@backstage/core-compat-api": "0.3.4-next.1",
73
- "@backstage/core-components": "0.16.2-next.1",
74
- "@backstage/core-plugin-api": "1.10.1",
75
- "@backstage/errors": "1.2.5",
76
- "@backstage/frontend-plugin-api": "0.9.3-next.1",
77
- "@backstage/integration": "1.16.0-next.0",
78
- "@backstage/integration-react": "1.2.2-next.0",
79
- "@backstage/plugin-catalog-common": "1.1.1",
80
- "@backstage/plugin-catalog-react": "1.14.3-next.1",
81
- "@backstage/plugin-permission-react": "0.4.28",
82
- "@backstage/plugin-scaffolder-common": "1.5.8-next.0",
83
- "@backstage/plugin-scaffolder-react": "1.14.2-next.1",
84
- "@backstage/types": "1.2.0",
70
+ "@backstage/catalog-client": "^1.9.0",
71
+ "@backstage/catalog-model": "^1.7.2",
72
+ "@backstage/core-compat-api": "^0.3.4",
73
+ "@backstage/core-components": "^0.16.2",
74
+ "@backstage/core-plugin-api": "^1.10.2",
75
+ "@backstage/errors": "^1.2.6",
76
+ "@backstage/frontend-plugin-api": "^0.9.3",
77
+ "@backstage/integration": "^1.16.0",
78
+ "@backstage/integration-react": "^1.2.2",
79
+ "@backstage/plugin-catalog-common": "^1.1.2",
80
+ "@backstage/plugin-catalog-react": "^1.15.0",
81
+ "@backstage/plugin-permission-react": "^0.4.29",
82
+ "@backstage/plugin-scaffolder-common": "^1.5.8",
83
+ "@backstage/plugin-scaffolder-react": "^1.14.2",
84
+ "@backstage/types": "^1.2.0",
85
85
  "@codemirror/language": "^6.0.0",
86
86
  "@codemirror/legacy-modes": "^6.1.0",
87
87
  "@codemirror/view": "^6.0.0",
@@ -114,12 +114,12 @@
114
114
  "zod-to-json-schema": "^3.20.4"
115
115
  },
116
116
  "devDependencies": {
117
- "@backstage/cli": "0.29.3-next.1",
118
- "@backstage/core-app-api": "1.15.3-next.0",
119
- "@backstage/dev-utils": "1.1.5-next.1",
120
- "@backstage/plugin-catalog": "1.25.2-next.1",
121
- "@backstage/plugin-permission-common": "0.8.2",
122
- "@backstage/test-utils": "1.7.3-next.0",
117
+ "@backstage/cli": "^0.29.4",
118
+ "@backstage/core-app-api": "^1.15.3",
119
+ "@backstage/dev-utils": "^1.1.5",
120
+ "@backstage/plugin-catalog": "^1.26.0",
121
+ "@backstage/plugin-permission-common": "^0.8.3",
122
+ "@backstage/test-utils": "^1.7.3",
123
123
  "@testing-library/dom": "^10.0.0",
124
124
  "@testing-library/jest-dom": "^6.0.0",
125
125
  "@testing-library/react": "^16.0.0",
@@ -1,41 +0,0 @@
1
- import { ApiBlueprint, createExtensionInput, createApiFactory } from '@backstage/frontend-plugin-api';
2
- import { formFieldsApiRef } from './ref.esm.js';
3
- import { FormFieldBlueprint } from '@backstage/plugin-scaffolder-react/alpha';
4
- import { OpaqueFormField } from '../../packages/scaffolder-internal/src/wiring/InternalFormField.esm.js';
5
- import '../../packages/scaffolder-internal/src/wiring/InternalFormDecorator.esm.js';
6
-
7
- class DefaultScaffolderFormFieldsApi {
8
- constructor(formFieldLoaders = []) {
9
- this.formFieldLoaders = formFieldLoaders;
10
- }
11
- async getFormFields() {
12
- const formFields = await Promise.all(
13
- this.formFieldLoaders.map((loader) => loader())
14
- );
15
- const internalFormFields = formFields.map(OpaqueFormField.toInternal);
16
- return internalFormFields;
17
- }
18
- }
19
- const formFieldsApi = ApiBlueprint.makeWithOverrides({
20
- name: "form-fields",
21
- inputs: {
22
- formFields: createExtensionInput([
23
- FormFieldBlueprint.dataRefs.formFieldLoader
24
- ])
25
- },
26
- factory(originalFactory, { inputs }) {
27
- const formFieldLoaders = inputs.formFields.map(
28
- (e) => e.get(FormFieldBlueprint.dataRefs.formFieldLoader)
29
- );
30
- return originalFactory({
31
- factory: createApiFactory({
32
- api: formFieldsApiRef,
33
- deps: {},
34
- factory: () => new DefaultScaffolderFormFieldsApi(formFieldLoaders)
35
- })
36
- });
37
- }
38
- });
39
-
40
- export { formFieldsApi };
41
- //# sourceMappingURL=FormFieldsApi.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormFieldsApi.esm.js","sources":["../../../src/alpha/api/FormFieldsApi.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 {\n ApiBlueprint,\n createApiFactory,\n createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { formFieldsApiRef } from './ref';\nimport { ScaffolderFormFieldsApi } from './types';\nimport { FormFieldBlueprint } from '@backstage/plugin-scaffolder-react/alpha';\nimport { FormField, OpaqueFormField } from '@internal/scaffolder';\n\nclass DefaultScaffolderFormFieldsApi implements ScaffolderFormFieldsApi {\n constructor(\n private readonly formFieldLoaders: Array<() => Promise<FormField>> = [],\n ) {}\n\n async getFormFields() {\n const formFields = await Promise.all(\n this.formFieldLoaders.map(loader => loader()),\n );\n\n const internalFormFields = formFields.map(OpaqueFormField.toInternal);\n\n return internalFormFields;\n }\n}\n\nexport const formFieldsApi = ApiBlueprint.makeWithOverrides({\n name: 'form-fields',\n inputs: {\n formFields: createExtensionInput([\n FormFieldBlueprint.dataRefs.formFieldLoader,\n ]),\n },\n factory(originalFactory, { inputs }) {\n const formFieldLoaders = inputs.formFields.map(e =>\n e.get(FormFieldBlueprint.dataRefs.formFieldLoader),\n );\n\n return originalFactory({\n factory: createApiFactory({\n api: formFieldsApiRef,\n deps: {},\n factory: () => new DefaultScaffolderFormFieldsApi(formFieldLoaders),\n }),\n });\n },\n});\n"],"names":[],"mappings":";;;;;;AA0BA,MAAM,8BAAkE,CAAA;AAAA,EACtE,WAAA,CACmB,gBAAoD,GAAA,EACrE,EAAA;AADiB,IAAA,IAAA,CAAA,gBAAA,GAAA,gBAAA;AAAA;AAChB,EAEH,MAAM,aAAgB,GAAA;AACpB,IAAM,MAAA,UAAA,GAAa,MAAM,OAAQ,CAAA,GAAA;AAAA,MAC/B,IAAK,CAAA,gBAAA,CAAiB,GAAI,CAAA,CAAA,MAAA,KAAU,QAAQ;AAAA,KAC9C;AAEA,IAAA,MAAM,kBAAqB,GAAA,UAAA,CAAW,GAAI,CAAA,eAAA,CAAgB,UAAU,CAAA;AAEpE,IAAO,OAAA,kBAAA;AAAA;AAEX;AAEa,MAAA,aAAA,GAAgB,aAAa,iBAAkB,CAAA;AAAA,EAC1D,IAAM,EAAA,aAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,YAAY,oBAAqB,CAAA;AAAA,MAC/B,mBAAmB,QAAS,CAAA;AAAA,KAC7B;AAAA,GACH;AAAA,EACA,OAAQ,CAAA,eAAA,EAAiB,EAAE,MAAA,EAAU,EAAA;AACnC,IAAM,MAAA,gBAAA,GAAmB,OAAO,UAAW,CAAA,GAAA;AAAA,MAAI,CAC7C,CAAA,KAAA,CAAA,CAAE,GAAI,CAAA,kBAAA,CAAmB,SAAS,eAAe;AAAA,KACnD;AAEA,IAAA,OAAO,eAAgB,CAAA;AAAA,MACrB,SAAS,gBAAiB,CAAA;AAAA,QACxB,GAAK,EAAA,gBAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAS,EAAA,MAAM,IAAI,8BAAA,CAA+B,gBAAgB;AAAA,OACnE;AAAA,KACF,CAAA;AAAA;AAEL,CAAC;;;;"}