@backstage/plugin-scaffolder 1.34.2-next.3 → 1.34.3-next.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,50 @@
1
1
  # @backstage/plugin-scaffolder
2
2
 
3
+ ## 1.34.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 05f60e1: Refactored constructor parameter properties to explicit property declarations for compatibility with TypeScript's `erasableSyntaxOnly` setting. This internal refactoring maintains all existing functionality while ensuring TypeScript compilation compatibility.
8
+ - Updated dependencies
9
+ - @backstage/plugin-scaffolder-react@1.19.3-next.0
10
+ - @backstage/plugin-permission-react@0.4.38-next.0
11
+ - @backstage/plugin-catalog-react@1.21.3-next.0
12
+ - @backstage/core-plugin-api@1.11.2-next.0
13
+ - @backstage/core-components@0.18.3-next.0
14
+ - @backstage/catalog-model@1.7.6-next.0
15
+ - @backstage/integration@1.18.2-next.0
16
+ - @backstage/frontend-plugin-api@0.12.2-next.0
17
+ - @backstage/catalog-client@1.12.1-next.0
18
+ - @backstage/core-compat-api@0.5.4-next.0
19
+ - @backstage/errors@1.2.7
20
+ - @backstage/integration-react@1.2.12-next.0
21
+ - @backstage/types@1.2.2
22
+ - @backstage/plugin-catalog-common@1.1.7-next.0
23
+ - @backstage/plugin-scaffolder-common@1.7.3-next.0
24
+ - @backstage/plugin-techdocs-common@0.1.1
25
+ - @backstage/plugin-techdocs-react@1.3.5-next.0
26
+
27
+ ## 1.34.2
28
+
29
+ ### Patch Changes
30
+
31
+ - e0ffe84: Add missing `templatingExtensions` option to RouterProps.contextMenu to allow global control across scaffolder pages
32
+ - d9aed74: Forward `ui:disabled` in `OwnedEntityPicker` to allow disabling it
33
+ - 075e064: Added missing form fields for the new frontend system.
34
+ - Updated dependencies
35
+ - @backstage/plugin-scaffolder-react@1.19.2
36
+ - @backstage/plugin-catalog-react@1.21.2
37
+ - @backstage/core-components@0.18.2
38
+ - @backstage/integration@1.18.1
39
+ - @backstage/frontend-plugin-api@0.12.1
40
+ - @backstage/core-compat-api@0.5.3
41
+ - @backstage/plugin-techdocs-react@1.3.4
42
+ - @backstage/core-plugin-api@1.11.1
43
+ - @backstage/integration-react@1.2.11
44
+ - @backstage/plugin-catalog-common@1.1.6
45
+ - @backstage/plugin-permission-react@0.4.37
46
+ - @backstage/plugin-scaffolder-common@1.7.2
47
+
3
48
  ## 1.34.2-next.3
4
49
 
5
50
  ### Patch Changes
@@ -3,6 +3,7 @@ import { formDecoratorsApiRef } from './ref.esm.js';
3
3
  import { FormDecoratorBlueprint } from '@backstage/plugin-scaffolder-react/alpha';
4
4
 
5
5
  class DefaultScaffolderFormDecoratorsApi {
6
+ options;
6
7
  constructor(options) {
7
8
  this.options = options;
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FormDecoratorsApi.esm.js","sources":["../../../src/alpha/api/FormDecoratorsApi.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 createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { ScaffolderFormDecoratorsApi } from './types';\nimport { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';\nimport { formDecoratorsApiRef } from './ref';\nimport { FormDecoratorBlueprint } from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport class DefaultScaffolderFormDecoratorsApi\n implements ScaffolderFormDecoratorsApi\n{\n private constructor(\n private readonly options: {\n decorators: Array<ScaffolderFormDecorator>;\n },\n ) {}\n\n static create(options?: { decorators: ScaffolderFormDecorator[] }) {\n return new DefaultScaffolderFormDecoratorsApi(\n options ?? { decorators: [] },\n );\n }\n\n async getFormDecorators(): Promise<ScaffolderFormDecorator[]> {\n return this.options.decorators;\n }\n}\n\n/** @alpha */\nexport const formDecoratorsApi = ApiBlueprint.makeWithOverrides({\n name: 'form-decorators',\n inputs: {\n formDecorators: createExtensionInput([\n FormDecoratorBlueprint.dataRefs.formDecoratorLoader,\n ]),\n },\n factory(originalFactory, { inputs }) {\n const formDecorators = inputs.formDecorators.map(e =>\n e.get(FormDecoratorBlueprint.dataRefs.formDecoratorLoader),\n );\n\n return originalFactory(defineParams =>\n defineParams({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () =>\n DefaultScaffolderFormDecoratorsApi.create({\n decorators: formDecorators,\n }),\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;;AA0BO,MAAM,kCAAA,CAEb;AAAA,EACU,YACW,OAAA,EAGjB;AAHiB,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAAA,EAGhB;AAAA,EAEH,OAAO,OAAO,OAAA,EAAqD;AACjE,IAAA,OAAO,IAAI,kCAAA;AAAA,MACT,OAAA,IAAW,EAAE,UAAA,EAAY,EAAC;AAAE,KAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBAAA,GAAwD;AAC5D,IAAA,OAAO,KAAK,OAAA,CAAQ,UAAA;AAAA,EACtB;AACF;AAGO,MAAM,iBAAA,GAAoB,aAAa,iBAAA,CAAkB;AAAA,EAC9D,IAAA,EAAM,iBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,gBAAgB,oBAAA,CAAqB;AAAA,MACnC,uBAAuB,QAAA,CAAS;AAAA,KACjC;AAAA,GACH;AAAA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAO,EAAG;AACnC,IAAA,MAAM,cAAA,GAAiB,OAAO,cAAA,CAAe,GAAA;AAAA,MAAI,CAAA,CAAA,KAC/C,CAAA,CAAE,GAAA,CAAI,sBAAA,CAAuB,SAAS,mBAAmB;AAAA,KAC3D;AAEA,IAAA,OAAO,eAAA;AAAA,MAAgB,kBACrB,YAAA,CAAa;AAAA,QACX,GAAA,EAAK,oBAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MACP,kCAAA,CAAmC,MAAA,CAAO;AAAA,UACxC,UAAA,EAAY;AAAA,SACb;AAAA,OACJ;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
1
+ {"version":3,"file":"FormDecoratorsApi.esm.js","sources":["../../../src/alpha/api/FormDecoratorsApi.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 createExtensionInput,\n} from '@backstage/frontend-plugin-api';\nimport { ScaffolderFormDecoratorsApi } from './types';\nimport { ScaffolderFormDecorator } from '@backstage/plugin-scaffolder-react/alpha';\nimport { formDecoratorsApiRef } from './ref';\nimport { FormDecoratorBlueprint } from '@backstage/plugin-scaffolder-react/alpha';\n\n/** @alpha */\nexport class DefaultScaffolderFormDecoratorsApi\n implements ScaffolderFormDecoratorsApi\n{\n private readonly options: {\n decorators: Array<ScaffolderFormDecorator>;\n };\n\n private constructor(options: { decorators: Array<ScaffolderFormDecorator> }) {\n this.options = options;\n }\n\n static create(options?: { decorators: ScaffolderFormDecorator[] }) {\n return new DefaultScaffolderFormDecoratorsApi(\n options ?? { decorators: [] },\n );\n }\n\n async getFormDecorators(): Promise<ScaffolderFormDecorator[]> {\n return this.options.decorators;\n }\n}\n\n/** @alpha */\nexport const formDecoratorsApi = ApiBlueprint.makeWithOverrides({\n name: 'form-decorators',\n inputs: {\n formDecorators: createExtensionInput([\n FormDecoratorBlueprint.dataRefs.formDecoratorLoader,\n ]),\n },\n factory(originalFactory, { inputs }) {\n const formDecorators = inputs.formDecorators.map(e =>\n e.get(FormDecoratorBlueprint.dataRefs.formDecoratorLoader),\n );\n\n return originalFactory(defineParams =>\n defineParams({\n api: formDecoratorsApiRef,\n deps: {},\n factory: () =>\n DefaultScaffolderFormDecoratorsApi.create({\n decorators: formDecorators,\n }),\n }),\n );\n },\n});\n"],"names":[],"mappings":";;;;AA0BO,MAAM,kCAAA,CAEb;AAAA,EACmB,OAAA;AAAA,EAIT,YAAY,OAAA,EAAyD;AAC3E,IAAA,IAAA,CAAK,OAAA,GAAU,OAAA;AAAA,EACjB;AAAA,EAEA,OAAO,OAAO,OAAA,EAAqD;AACjE,IAAA,OAAO,IAAI,kCAAA;AAAA,MACT,OAAA,IAAW,EAAE,UAAA,EAAY,EAAC;AAAE,KAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBAAA,GAAwD;AAC5D,IAAA,OAAO,KAAK,OAAA,CAAQ,UAAA;AAAA,EACtB;AACF;AAGO,MAAM,iBAAA,GAAoB,aAAa,iBAAA,CAAkB;AAAA,EAC9D,IAAA,EAAM,iBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,gBAAgB,oBAAA,CAAqB;AAAA,MACnC,uBAAuB,QAAA,CAAS;AAAA,KACjC;AAAA,GACH;AAAA,EACA,OAAA,CAAQ,eAAA,EAAiB,EAAE,MAAA,EAAO,EAAG;AACnC,IAAA,MAAM,cAAA,GAAiB,OAAO,cAAA,CAAe,GAAA;AAAA,MAAI,CAAA,CAAA,KAC/C,CAAA,CAAE,GAAA,CAAI,sBAAA,CAAuB,SAAS,mBAAmB;AAAA,KAC3D;AAEA,IAAA,OAAO,eAAA;AAAA,MAAgB,kBACrB,YAAA,CAAa;AAAA,QACX,GAAA,EAAK,oBAAA;AAAA,QACL,MAAM,EAAC;AAAA,QACP,OAAA,EAAS,MACP,kCAAA,CAAmC,MAAA,CAAO;AAAA,UACxC,UAAA,EAAY;AAAA,SACb;AAAA,OACJ;AAAA,KACH;AAAA,EACF;AACF,CAAC;;;;"}
@@ -1,5 +1,7 @@
1
1
  const showDirectoryPicker = window.showDirectoryPicker;
2
2
  class WebFileAccess {
3
+ path;
4
+ handle;
3
5
  constructor(path, handle) {
4
6
  this.path = path;
5
7
  this.handle = handle;
@@ -14,6 +16,7 @@ class WebFileAccess {
14
16
  }
15
17
  }
16
18
  class WebDirectoryAccess {
19
+ handle;
17
20
  constructor(handle) {
18
21
  this.handle = handle;
19
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WebFileSystemAccess.esm.js","sources":["../../../src/lib/filesystem/WebFileSystemAccess.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\nimport { TemplateDirectoryAccess, TemplateFileAccess } from './types';\n\ntype WritableFileHandle = FileSystemFileHandle & {\n createWritable(): Promise<{\n write(data: string | Blob | BufferSource): Promise<void>;\n close(): Promise<void>;\n }>;\n};\n\n// A nicer type than the one from the TS lib\nexport interface IterableDirectoryHandle extends FileSystemDirectoryHandle {\n values(): AsyncIterable<\n | ({ kind: 'file' } & WritableFileHandle)\n | ({ kind: 'directory' } & IterableDirectoryHandle)\n >;\n}\n\nconst showDirectoryPicker = (window as any).showDirectoryPicker as\n | (() => Promise<IterableDirectoryHandle>)\n | undefined;\n\nclass WebFileAccess implements TemplateFileAccess {\n constructor(\n readonly path: string,\n private readonly handle: WritableFileHandle,\n ) {}\n\n file(): Promise<File> {\n return this.handle.getFile();\n }\n\n async save(data: string | Blob | BufferSource): Promise<void> {\n const writable = await this.handle.createWritable();\n await writable.write(data);\n await writable.close();\n }\n}\n\n/** @internal */\nexport class WebDirectoryAccess implements TemplateDirectoryAccess {\n constructor(private readonly handle: IterableDirectoryHandle) {}\n\n async listFiles(): Promise<TemplateFileAccess[]> {\n const content = [];\n for await (const entry of this.listDirectoryContents(this.handle)) {\n content.push(entry);\n }\n return content;\n }\n\n private async *listDirectoryContents(\n dirHandle: IterableDirectoryHandle,\n basePath: string[] = [],\n ): AsyncIterable<TemplateFileAccess> {\n for await (const handle of dirHandle.values()) {\n if (handle.kind === 'file') {\n yield new WebFileAccess([...basePath, handle.name].join('/'), handle);\n } else if (handle.kind === 'directory') {\n // Skip git storage directory\n if (handle.name === '.git') {\n continue;\n }\n yield* this.listDirectoryContents(handle, [...basePath, handle.name]);\n }\n }\n }\n\n async createFile(options: { name: string; data: string }): Promise<void> {\n const { name, data } = options;\n let file: FileSystemFileHandle;\n\n // Current create template does not require support for nested directories\n if (name.includes('/')) {\n const [dir, path] = name.split('/');\n const handle = await this.handle.getDirectoryHandle(dir, {\n create: true,\n });\n file = await handle.getFileHandle(path, { create: true });\n } else {\n file = await this.handle.getFileHandle(name, {\n create: true,\n });\n }\n const writable = await file.createWritable();\n await writable.write(data);\n await writable.close();\n }\n}\n\n/** @internal */\nexport class WebFileSystemAccess {\n static isSupported(): boolean {\n return Boolean(showDirectoryPicker);\n }\n\n static fromHandle(handle: IterableDirectoryHandle) {\n return new WebDirectoryAccess(handle);\n }\n\n static async requestDirectoryAccess(): Promise<TemplateDirectoryAccess> {\n if (!showDirectoryPicker) {\n throw new Error('File system access is not supported');\n }\n const handle = await showDirectoryPicker();\n return new WebDirectoryAccess(handle);\n }\n\n private constructor() {}\n}\n"],"names":[],"mappings":"AAiCA,MAAM,sBAAuB,MAAA,CAAe,mBAAA;AAI5C,MAAM,aAAA,CAA4C;AAAA,EAChD,WAAA,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AAM,IAAI,MAAM,qCAAqC,CAAA;AAAA,IACvD;AACA,IAAA,MAAM,MAAA,GAAS,MAAM,mBAAA,EAAoB;AACzC,IAAA,OAAO,IAAI,mBAAmB,MAAM,CAAA;AAAA,EACtC;AAAA,EAEQ,WAAA,GAAc;AAAA,EAAC;AACzB;;;;"}
1
+ {"version":3,"file":"WebFileSystemAccess.esm.js","sources":["../../../src/lib/filesystem/WebFileSystemAccess.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\nimport { TemplateDirectoryAccess, TemplateFileAccess } from './types';\n\ntype WritableFileHandle = FileSystemFileHandle & {\n createWritable(): Promise<{\n write(data: string | Blob | BufferSource): Promise<void>;\n close(): Promise<void>;\n }>;\n};\n\n// A nicer type than the one from the TS lib\nexport interface IterableDirectoryHandle extends FileSystemDirectoryHandle {\n values(): AsyncIterable<\n | ({ kind: 'file' } & WritableFileHandle)\n | ({ kind: 'directory' } & IterableDirectoryHandle)\n >;\n}\n\nconst showDirectoryPicker = (window as any).showDirectoryPicker as\n | (() => Promise<IterableDirectoryHandle>)\n | undefined;\n\nclass WebFileAccess implements TemplateFileAccess {\n readonly path: string;\n private readonly handle: WritableFileHandle;\n\n constructor(path: string, handle: WritableFileHandle) {\n this.path = path;\n this.handle = handle;\n }\n\n file(): Promise<File> {\n return this.handle.getFile();\n }\n\n async save(data: string | Blob | BufferSource): Promise<void> {\n const writable = await this.handle.createWritable();\n await writable.write(data);\n await writable.close();\n }\n}\n\n/** @internal */\nexport class WebDirectoryAccess implements TemplateDirectoryAccess {\n private readonly handle: IterableDirectoryHandle;\n\n constructor(handle: IterableDirectoryHandle) {\n this.handle = handle;\n }\n\n async listFiles(): Promise<TemplateFileAccess[]> {\n const content = [];\n for await (const entry of this.listDirectoryContents(this.handle)) {\n content.push(entry);\n }\n return content;\n }\n\n private async *listDirectoryContents(\n dirHandle: IterableDirectoryHandle,\n basePath: string[] = [],\n ): AsyncIterable<TemplateFileAccess> {\n for await (const handle of dirHandle.values()) {\n if (handle.kind === 'file') {\n yield new WebFileAccess([...basePath, handle.name].join('/'), handle);\n } else if (handle.kind === 'directory') {\n // Skip git storage directory\n if (handle.name === '.git') {\n continue;\n }\n yield* this.listDirectoryContents(handle, [...basePath, handle.name]);\n }\n }\n }\n\n async createFile(options: { name: string; data: string }): Promise<void> {\n const { name, data } = options;\n let file: FileSystemFileHandle;\n\n // Current create template does not require support for nested directories\n if (name.includes('/')) {\n const [dir, path] = name.split('/');\n const handle = await this.handle.getDirectoryHandle(dir, {\n create: true,\n });\n file = await handle.getFileHandle(path, { create: true });\n } else {\n file = await this.handle.getFileHandle(name, {\n create: true,\n });\n }\n const writable = await file.createWritable();\n await writable.write(data);\n await writable.close();\n }\n}\n\n/** @internal */\nexport class WebFileSystemAccess {\n static isSupported(): boolean {\n return Boolean(showDirectoryPicker);\n }\n\n static fromHandle(handle: IterableDirectoryHandle) {\n return new WebDirectoryAccess(handle);\n }\n\n static async requestDirectoryAccess(): Promise<TemplateDirectoryAccess> {\n if (!showDirectoryPicker) {\n throw new Error('File system access is not supported');\n }\n const handle = await showDirectoryPicker();\n return new WebDirectoryAccess(handle);\n }\n\n private constructor() {}\n}\n"],"names":[],"mappings":"AAiCA,MAAM,sBAAuB,MAAA,CAAe,mBAAA;AAI5C,MAAM,aAAA,CAA4C;AAAA,EACvC,IAAA;AAAA,EACQ,MAAA;AAAA,EAEjB,WAAA,CAAY,MAAc,MAAA,EAA4B;AACpD,IAAA,IAAA,CAAK,IAAA,GAAO,IAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,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EAAoB;AACzC,IAAA,OAAO,IAAI,mBAAmB,MAAM,CAAA;AAAA,EACtC;AAAA,EAEQ,WAAA,GAAc;AAAA,EAAC;AACzB;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-scaffolder";
2
- var version = "1.34.2-next.3";
2
+ var version = "1.34.3-next.0";
3
3
  var description = "The Backstage plugin that helps you create new things";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder",
3
- "version": "1.34.2-next.3",
3
+ "version": "1.34.3-next.0",
4
4
  "description": "The Backstage plugin that helps you create new things",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -70,22 +70,22 @@
70
70
  "test": "backstage-cli package test"
71
71
  },
72
72
  "dependencies": {
73
- "@backstage/catalog-client": "1.12.0",
74
- "@backstage/catalog-model": "1.7.5",
75
- "@backstage/core-compat-api": "0.5.3-next.1",
76
- "@backstage/core-components": "0.18.2-next.3",
77
- "@backstage/core-plugin-api": "1.11.1-next.0",
73
+ "@backstage/catalog-client": "1.12.1-next.0",
74
+ "@backstage/catalog-model": "1.7.6-next.0",
75
+ "@backstage/core-compat-api": "0.5.4-next.0",
76
+ "@backstage/core-components": "0.18.3-next.0",
77
+ "@backstage/core-plugin-api": "1.11.2-next.0",
78
78
  "@backstage/errors": "1.2.7",
79
- "@backstage/frontend-plugin-api": "0.12.1-next.2",
80
- "@backstage/integration": "1.18.1-next.1",
81
- "@backstage/integration-react": "1.2.11-next.1",
82
- "@backstage/plugin-catalog-common": "1.1.6-next.0",
83
- "@backstage/plugin-catalog-react": "1.21.2-next.1",
84
- "@backstage/plugin-permission-react": "0.4.37-next.0",
85
- "@backstage/plugin-scaffolder-common": "1.7.2-next.1",
86
- "@backstage/plugin-scaffolder-react": "1.19.2-next.2",
79
+ "@backstage/frontend-plugin-api": "0.12.2-next.0",
80
+ "@backstage/integration": "1.18.2-next.0",
81
+ "@backstage/integration-react": "1.2.12-next.0",
82
+ "@backstage/plugin-catalog-common": "1.1.7-next.0",
83
+ "@backstage/plugin-catalog-react": "1.21.3-next.0",
84
+ "@backstage/plugin-permission-react": "0.4.38-next.0",
85
+ "@backstage/plugin-scaffolder-common": "1.7.3-next.0",
86
+ "@backstage/plugin-scaffolder-react": "1.19.3-next.0",
87
87
  "@backstage/plugin-techdocs-common": "0.1.1",
88
- "@backstage/plugin-techdocs-react": "1.3.4-next.1",
88
+ "@backstage/plugin-techdocs-react": "1.3.5-next.0",
89
89
  "@backstage/types": "1.2.2",
90
90
  "@codemirror/language": "^6.0.0",
91
91
  "@codemirror/legacy-modes": "^6.1.0",
@@ -118,13 +118,13 @@
118
118
  "zod-to-json-schema": "^3.20.4"
119
119
  },
120
120
  "devDependencies": {
121
- "@backstage/cli": "0.34.4-next.3",
122
- "@backstage/core-app-api": "1.19.1-next.0",
123
- "@backstage/dev-utils": "1.1.15-next.2",
124
- "@backstage/plugin-catalog": "1.31.4-next.1",
125
- "@backstage/plugin-permission-common": "0.9.2-next.0",
126
- "@backstage/plugin-techdocs": "1.15.1-next.2",
127
- "@backstage/test-utils": "1.7.12-next.1",
121
+ "@backstage/cli": "0.34.5-next.0",
122
+ "@backstage/core-app-api": "1.19.2-next.0",
123
+ "@backstage/dev-utils": "1.1.17-next.0",
124
+ "@backstage/plugin-catalog": "1.31.5-next.0",
125
+ "@backstage/plugin-permission-common": "0.9.3-next.0",
126
+ "@backstage/plugin-techdocs": "1.15.2-next.0",
127
+ "@backstage/test-utils": "1.7.13-next.0",
128
128
  "@testing-library/dom": "^10.0.0",
129
129
  "@testing-library/jest-dom": "^6.0.0",
130
130
  "@testing-library/react": "^16.0.0",