@techdocs/cli 1.8.10 → 1.8.11

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +26 -2
  2. package/dist/cjs/{PublisherConfig-B9GYw8mh.cjs.js → PublisherConfig-DheuBNuV.cjs.js} +2 -2
  3. package/dist/cjs/{PublisherConfig-B9GYw8mh.cjs.js.map → PublisherConfig-DheuBNuV.cjs.js.map} +1 -1
  4. package/dist/cjs/{migrate-CccqCfHt.cjs.js → migrate-D6YuWLen.cjs.js} +2 -2
  5. package/dist/cjs/{migrate-CccqCfHt.cjs.js.map → migrate-D6YuWLen.cjs.js.map} +1 -1
  6. package/dist/cjs/{publish-D19dZg09.cjs.js → publish-DYFq3em1.cjs.js} +2 -2
  7. package/dist/cjs/{publish-D19dZg09.cjs.js.map → publish-DYFq3em1.cjs.js.map} +1 -1
  8. package/dist/embedded-app/.config-schema.json +91 -49
  9. package/dist/embedded-app/index.html +1 -1
  10. package/dist/embedded-app/static/124.2fe45728.chunk.js +5 -0
  11. package/dist/embedded-app/static/124.2fe45728.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/2401.b9ecb259.chunk.js +5 -0
  13. package/dist/embedded-app/static/2401.b9ecb259.chunk.js.map +1 -0
  14. package/dist/embedded-app/static/2420.8b65f057.chunk.js +5 -0
  15. package/dist/embedded-app/static/2420.8b65f057.chunk.js.map +1 -0
  16. package/dist/embedded-app/static/287.e4ea033a.chunk.js +5 -0
  17. package/dist/embedded-app/static/287.e4ea033a.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/3182.09c2f360.chunk.js +6 -0
  19. package/dist/embedded-app/static/3182.09c2f360.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/3632.12b6d8dd.chunk.js +5 -0
  21. package/dist/embedded-app/static/3632.12b6d8dd.chunk.js.map +1 -0
  22. package/dist/embedded-app/static/{4487.06c23d1b.chunk.js → 4487.8a9c8ef0.chunk.js} +1 -1
  23. package/dist/embedded-app/static/{4487.06c23d1b.chunk.js.map → 4487.8a9c8ef0.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/4919.94eee8c0.chunk.js +3 -0
  25. package/dist/embedded-app/static/4919.94eee8c0.chunk.js.map +1 -0
  26. package/dist/embedded-app/static/5974.9d006f0f.chunk.js +3 -0
  27. package/dist/embedded-app/static/5974.9d006f0f.chunk.js.map +1 -0
  28. package/dist/embedded-app/static/6271.e14894fd.chunk.js +5 -0
  29. package/dist/embedded-app/static/6271.e14894fd.chunk.js.map +1 -0
  30. package/dist/embedded-app/static/73.c7f521ae.chunk.js +3 -0
  31. package/dist/embedded-app/static/{73.618ea766.chunk.js.map → 73.c7f521ae.chunk.js.map} +1 -1
  32. package/dist/embedded-app/static/8307.3553740d.chunk.js +8 -0
  33. package/dist/embedded-app/static/8307.3553740d.chunk.js.map +1 -0
  34. package/dist/embedded-app/static/8384.f9a38a1a.chunk.js +5 -0
  35. package/dist/embedded-app/static/8384.f9a38a1a.chunk.js.map +1 -0
  36. package/dist/embedded-app/static/9652.e5ad523b.chunk.js +5 -0
  37. package/dist/embedded-app/static/9652.e5ad523b.chunk.js.map +1 -0
  38. package/dist/embedded-app/static/main.e5571a2f.js +497 -0
  39. package/dist/embedded-app/static/main.e5571a2f.js.map +1 -0
  40. package/dist/embedded-app/static/module-date-fns.196adaa7.js +3 -0
  41. package/dist/embedded-app/static/module-date-fns.196adaa7.js.map +1 -0
  42. package/dist/embedded-app/static/module-material-table.892da5bc.js +3 -0
  43. package/dist/embedded-app/static/module-material-table.892da5bc.js.map +1 -0
  44. package/dist/embedded-app/static/module-zod.52dba18e.js +3 -0
  45. package/dist/embedded-app/static/module-zod.52dba18e.js.map +1 -0
  46. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gherkin.4bae5020.chunk.js +3 -0
  47. package/dist/embedded-app/static/{react-syntax-highlighter_languages_highlight_gherkin.f9cdeff1.chunk.js.map → react-syntax-highlighter_languages_highlight_gherkin.4bae5020.chunk.js.map} +1 -1
  48. package/dist/embedded-app/static/{runtime.04529c71.js → runtime.e5571a2f.js} +2 -2
  49. package/dist/embedded-app/static/{runtime.04529c71.js.map → runtime.e5571a2f.js.map} +1 -1
  50. package/dist/embedded-app/static/vendor.e5571a2f.js +160 -0
  51. package/dist/embedded-app/static/vendor.e5571a2f.js.map +1 -0
  52. package/dist/index.cjs.js +3 -3
  53. package/package.json +5 -5
  54. package/dist/embedded-app/static/115.dcb79bb0.chunk.js +0 -3
  55. package/dist/embedded-app/static/115.dcb79bb0.chunk.js.map +0 -1
  56. package/dist/embedded-app/static/124.843ab31e.chunk.js +0 -5
  57. package/dist/embedded-app/static/124.843ab31e.chunk.js.map +0 -1
  58. package/dist/embedded-app/static/2401.4df01527.chunk.js +0 -5
  59. package/dist/embedded-app/static/2401.4df01527.chunk.js.map +0 -1
  60. package/dist/embedded-app/static/2420.18b68427.chunk.js +0 -5
  61. package/dist/embedded-app/static/2420.18b68427.chunk.js.map +0 -1
  62. package/dist/embedded-app/static/287.ee4ee196.chunk.js +0 -5
  63. package/dist/embedded-app/static/287.ee4ee196.chunk.js.map +0 -1
  64. package/dist/embedded-app/static/3182.232eb781.chunk.js +0 -6
  65. package/dist/embedded-app/static/3182.232eb781.chunk.js.map +0 -1
  66. package/dist/embedded-app/static/3632.95b279c9.chunk.js +0 -5
  67. package/dist/embedded-app/static/3632.95b279c9.chunk.js.map +0 -1
  68. package/dist/embedded-app/static/5974.633b23c0.chunk.js +0 -3
  69. package/dist/embedded-app/static/5974.633b23c0.chunk.js.map +0 -1
  70. package/dist/embedded-app/static/6271.25803276.chunk.js +0 -5
  71. package/dist/embedded-app/static/6271.25803276.chunk.js.map +0 -1
  72. package/dist/embedded-app/static/73.618ea766.chunk.js +0 -3
  73. package/dist/embedded-app/static/8307.42c405fe.chunk.js +0 -8
  74. package/dist/embedded-app/static/8307.42c405fe.chunk.js.map +0 -1
  75. package/dist/embedded-app/static/8384.a139d26a.chunk.js +0 -5
  76. package/dist/embedded-app/static/8384.a139d26a.chunk.js.map +0 -1
  77. package/dist/embedded-app/static/9652.9a93372c.chunk.js +0 -5
  78. package/dist/embedded-app/static/9652.9a93372c.chunk.js.map +0 -1
  79. package/dist/embedded-app/static/main.04529c71.js +0 -497
  80. package/dist/embedded-app/static/main.04529c71.js.map +0 -1
  81. package/dist/embedded-app/static/module-material-table.145eb704.js +0 -3
  82. package/dist/embedded-app/static/module-material-table.145eb704.js.map +0 -1
  83. package/dist/embedded-app/static/module-zod.955be94f.js +0 -3
  84. package/dist/embedded-app/static/module-zod.955be94f.js.map +0 -1
  85. package/dist/embedded-app/static/react-syntax-highlighter_languages_highlight_gherkin.f9cdeff1.chunk.js +0 -3
  86. package/dist/embedded-app/static/vendor.04529c71.js +0 -160
  87. package/dist/embedded-app/static/vendor.04529c71.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,10 +1,34 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 1.8.10
3
+ ## 1.8.11
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 15768bc: Fix cookie endpoint mock for `serve`
7
+ - 1a0e009: Fix cookie endpoint mock for `serve`
8
+ - Updated dependencies
9
+ - @backstage/catalog-model@1.5.0
10
+ - @backstage/backend-common@0.22.0
11
+ - @backstage/plugin-techdocs-node@1.12.4
12
+
13
+ ## 1.8.11-next.1
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @backstage/backend-common@0.22.0-next.1
19
+ - @backstage/plugin-techdocs-node@1.12.4-next.1
20
+
21
+ ## 1.8.10-next.0
22
+
23
+ ### Patch Changes
24
+
25
+ - 1a0e009: Fix cookie endpoint mock for `serve`
26
+ - Updated dependencies
27
+ - @backstage/catalog-model@1.5.0-next.0
28
+ - @backstage/backend-common@0.21.8-next.0
29
+ - @backstage/plugin-techdocs-node@1.12.4-next.0
30
+ - @backstage/cli-common@0.1.13
31
+ - @backstage/config@1.2.0
8
32
 
9
33
  ## 1.8.9
10
34
 
@@ -5,7 +5,7 @@ var config = require('@backstage/config');
5
5
  var __defProp = Object.defineProperty;
6
6
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
7
  var __publicField = (obj, key, value) => {
8
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
+ __defNormalProp(obj, key + "" , value);
9
9
  return value;
10
10
  };
11
11
  const _PublisherConfig = class _PublisherConfig {
@@ -137,4 +137,4 @@ __publicField(_PublisherConfig, "configFactories", {
137
137
  let PublisherConfig = _PublisherConfig;
138
138
 
139
139
  exports.PublisherConfig = PublisherConfig;
140
- //# sourceMappingURL=PublisherConfig-B9GYw8mh.cjs.js.map
140
+ //# sourceMappingURL=PublisherConfig-DheuBNuV.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PublisherConfig-B9GYw8mh.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof (typeof PublisherConfig)['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof (typeof PublisherConfig)['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n ...(opts.awsProxy && { httpsProxy: opts.awsProxy }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credentials: {\n id: opts.osCredentialId,\n secret: opts.osSecret,\n },\n authUrl: opts.osAuthUrl,\n swiftUrl: opts.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;;;;;;;AA6BO,MAAM,gBAAA,GAAN,MAAM,gBAAgB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkB3B,OAAO,eAAe,IAAkC,EAAA;AACtD,IAAA,MAAM,gBAAgB,IAAK,CAAA,aAAA,CAAA;AAE3B,IAAA,IAAI,CAAC,gBAAA,CAAgB,gBAAiB,CAAA,aAAa,CAAG,EAAA;AACpD,MAAA,MAAM,IAAI,KAAA,CAAM,CAA0B,uBAAA,EAAA,IAAA,CAAK,aAAa,CAAE,CAAA,CAAA,CAAA;AAAA,KAChE;AAEA,IAAA,OAAO,IAAIA,mBAAa,CAAA;AAAA;AAAA,MAEtB,OAAS,EAAA;AAAA,QACP,OAAS,EAAA,uBAAA;AAAA,QACT,MAAQ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AAAA,QACd,UAAU,IAAK,CAAA,UAAA;AAAA,OACjB;AAAA,KACF,CAAA;AAAA,GACF;AACF,CAAA,CAAA;AAAA;AAAA;AAAA;AA/IE,aAAA,CAJW,kBAII,iBAAkB,EAAA;AAAA,EAC/B,OAAO,gBAAgB,CAAA,mBAAA;AAAA,EACvB,kBAAkB,gBAAgB,CAAA,mBAAA;AAAA,EAClC,WAAW,gBAAgB,CAAA,uBAAA;AAAA,EAC3B,gBAAgB,gBAAgB,CAAA,4BAAA;AAClC,CAAA,CAAA,CAAA;AATK,IAAM,eAAN,GAAA;;;;"}
1
+ {"version":3,"file":"PublisherConfig-DheuBNuV.cjs.js","sources":["../../src/lib/PublisherConfig.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { ConfigReader } from '@backstage/config';\nimport { OptionValues } from 'commander';\n\ntype Publisher = keyof (typeof PublisherConfig)['configFactories'];\ntype PublisherConfiguration = {\n [p in Publisher]?: any;\n} & {\n type: Publisher;\n};\n\n/**\n * Helper when working with publisher-related configurations.\n */\nexport class PublisherConfig {\n /**\n * Maps publisher-specific config keys to config getters.\n */\n private static configFactories = {\n awsS3: PublisherConfig.getValidAwsS3Config,\n azureBlobStorage: PublisherConfig.getValidAzureConfig,\n googleGcs: PublisherConfig.getValidGoogleGcsConfig,\n openStackSwift: PublisherConfig.getValidOpenStackSwiftConfig,\n };\n\n /**\n * Returns Backstage config suitable for use when instantiating a Publisher. If\n * there are any missing or invalid options provided, an error is thrown.\n *\n * Note: This assumes that proper credentials are set in Environment\n * variables for the respective GCS/AWS clients to work.\n */\n static getValidConfig(opts: OptionValues): ConfigReader {\n const publisherType = opts.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${opts.publisherType}`);\n }\n\n return new ConfigReader({\n // This backend config is not used at all. Just something needed a create a mock discovery instance.\n backend: {\n baseUrl: 'http://localhost:7007',\n listen: {\n port: 7007,\n },\n },\n techdocs: {\n publisher: PublisherConfig.configFactories[publisherType](opts),\n legacyUseCaseSensitiveTripletPaths:\n opts.legacyUseCaseSensitiveTripletPaths,\n },\n });\n }\n\n /**\n * Typeguard to ensure the publisher has a known config getter.\n */\n private static isKnownPublisher(\n type: string,\n ): type is keyof (typeof PublisherConfig)['configFactories'] {\n return PublisherConfig.configFactories.hasOwnProperty(type);\n }\n\n /**\n * Retrieve valid AWS S3 configuration based on the command.\n */\n private static getValidAwsS3Config(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: opts.storageName,\n ...(opts.awsBucketRootPath && {\n bucketRootPath: opts.awsBucketRootPath,\n }),\n ...(opts.awsRoleArn && { credentials: { roleArn: opts.awsRoleArn } }),\n ...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),\n ...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(opts.awsS3sse && { sse: opts.awsS3sse }),\n ...(opts.awsProxy && { httpsProxy: opts.awsProxy }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n if (!opts.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: opts.storageName,\n credentials: {\n accountName: opts.azureAccountName,\n accountKey: opts.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: opts.storageName,\n ...(opts.gcsBucketRootPath && {\n bucketRootPath: opts.gcsBucketRootPath,\n }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n opts: OptionValues,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !opts[param]);\n\n if (missingParams.length) {\n throw new Error(\n `openStackSwift requires the following params to be specified: ${missingParams.join(\n ', ',\n )}`,\n );\n }\n\n return {\n type: 'openStackSwift',\n openStackSwift: {\n containerName: opts.storageName,\n credentials: {\n id: opts.osCredentialId,\n secret: opts.osSecret,\n },\n authUrl: opts.osAuthUrl,\n swiftUrl: opts.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;;;;;;;AA6BO,MAAM,gBAAA,GAAN,MAAM,gBAAgB,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkB3B,OAAO,eAAe,IAAkC,EAAA;AACtD,IAAA,MAAM,gBAAgB,IAAK,CAAA,aAAA,CAAA;AAE3B,IAAA,IAAI,CAAC,gBAAA,CAAgB,gBAAiB,CAAA,aAAa,CAAG,EAAA;AACpD,MAAA,MAAM,IAAI,KAAA,CAAM,CAA0B,uBAAA,EAAA,IAAA,CAAK,aAAa,CAAE,CAAA,CAAA,CAAA;AAAA,KAChE;AAEA,IAAA,OAAO,IAAIA,mBAAa,CAAA;AAAA;AAAA,MAEtB,OAAS,EAAA;AAAA,QACP,OAAS,EAAA,uBAAA;AAAA,QACT,MAAQ,EAAA;AAAA,UACN,IAAM,EAAA,IAAA;AAAA,SACR;AAAA,OACF;AAAA,MACA,QAAU,EAAA;AAAA,QACR,SAAW,EAAA,gBAAA,CAAgB,eAAgB,CAAA,aAAa,EAAE,IAAI,CAAA;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EAC/B,OAAO,gBAAgB,CAAA,mBAAA;AAAA,EACvB,kBAAkB,gBAAgB,CAAA,mBAAA;AAAA,EAClC,WAAW,gBAAgB,CAAA,uBAAA;AAAA,EAC3B,gBAAgB,gBAAgB,CAAA,4BAAA;AAClC,CAAA,CAAA,CAAA;AATK,IAAM,eAAN,GAAA;;;;"}
@@ -3,7 +3,7 @@
3
3
  var backendCommon = require('@backstage/backend-common');
4
4
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
5
5
  var utility = require('./utility-CsspJYjU.cjs.js');
6
- var PublisherConfig = require('./PublisherConfig-B9GYw8mh.cjs.js');
6
+ var PublisherConfig = require('./PublisherConfig-DheuBNuV.cjs.js');
7
7
  require('winston');
8
8
  require('stream');
9
9
  require('process');
@@ -35,4 +35,4 @@ async function migrate(opts) {
35
35
  }
36
36
 
37
37
  exports.default = migrate;
38
- //# sourceMappingURL=migrate-CccqCfHt.cjs.js.map
38
+ //# sourceMappingURL=migrate-D6YuWLen.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-CccqCfHt.cjs.js","sources":["../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { HostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","HostDiscovery","Publisher"],"mappings":";;;;;;;;;;;AAsBA,eAA8B,QAAQ,IAAoB,EAAA;AACxD,EAAA,MAAM,SAASA,oBAAa,CAAA,EAAE,OAAS,EAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAErD,EAAM,MAAA,MAAA,GAASC,+BAAgB,CAAA,cAAA,CAAe,IAAI,CAAA,CAAA;AAClD,EAAM,MAAA,SAAA,GAAYC,2BAAc,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACjD,EAAM,MAAA,SAAA,GAAY,MAAMC,4BAAU,CAAA,UAAA,CAAW,QAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAE1E,EAAI,IAAA,CAAC,UAAU,eAAiB,EAAA;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAiC,8BAAA,EAAA,IAAA,CAAK,aAAa,CAAE,CAAA,CAAA,CAAA;AAAA,GACvE;AAGA,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,MAAM,UAAU,YAAa,EAAA,CAAA;AACrD,EAAA,IAAI,CAAC,WAAa,EAAA;AAEhB,IAAM,MAAA,IAAI,MAAM,EAAE,CAAA,CAAA;AAAA,GACpB;AAGA,EAAA,MAAM,iBAAiB,IAAK,CAAA,cAAA,CAAA;AAC5B,EAAA,MAAM,kBAAqB,GAAA,QAAA,CAAS,IAAK,CAAA,WAAA,EAAa,EAAE,CAAA,CAAA;AAExD,EAAA,IAAI,CAAC,MAAO,CAAA,SAAA,CAAU,kBAAkB,CAAA,IAAK,sBAAsB,CAAG,EAAA;AACpE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,6CAAA,EAAgD,KAAK,WAAW,CAAA,UAAA,CAAA;AAAA,KAClE,CAAA;AAAA,GACF;AAEA,EAAA,MAAM,UAAU,eAAgB,CAAA;AAAA,IAC9B,WAAa,EAAA,kBAAA;AAAA,IACb,cAAA;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
1
+ {"version":3,"file":"migrate-D6YuWLen.cjs.js","sources":["../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { HostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","HostDiscovery","Publisher"],"mappings":";;;;;;;;;;;AAsBA,eAA8B,QAAQ,IAAoB,EAAA;AACxD,EAAA,MAAM,SAASA,oBAAa,CAAA,EAAE,OAAS,EAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAErD,EAAM,MAAA,MAAA,GAASC,+BAAgB,CAAA,cAAA,CAAe,IAAI,CAAA,CAAA;AAClD,EAAM,MAAA,SAAA,GAAYC,2BAAc,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACjD,EAAM,MAAA,SAAA,GAAY,MAAMC,4BAAU,CAAA,UAAA,CAAW,QAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAE1E,EAAI,IAAA,CAAC,UAAU,eAAiB,EAAA;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAiC,8BAAA,EAAA,IAAA,CAAK,aAAa,CAAE,CAAA,CAAA,CAAA;AAAA,GACvE;AAGA,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,MAAM,UAAU,YAAa,EAAA,CAAA;AACrD,EAAA,IAAI,CAAC,WAAa,EAAA;AAEhB,IAAM,MAAA,IAAI,MAAM,EAAE,CAAA,CAAA;AAAA,GACpB;AAGA,EAAA,MAAM,iBAAiB,IAAK,CAAA,cAAA,CAAA;AAC5B,EAAA,MAAM,kBAAqB,GAAA,QAAA,CAAS,IAAK,CAAA,WAAA,EAAa,EAAE,CAAA,CAAA;AAExD,EAAA,IAAI,CAAC,MAAO,CAAA,SAAA,CAAU,kBAAkB,CAAA,IAAK,sBAAsB,CAAG,EAAA;AACpE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,6CAAA,EAAgD,KAAK,WAAW,CAAA,UAAA,CAAA;AAAA,KAClE,CAAA;AAAA,GACF;AAEA,EAAA,MAAM,UAAU,eAAgB,CAAA;AAAA,IAC9B,WAAa,EAAA,kBAAA;AAAA,IACb,cAAA;AAAA,GACD,CAAA,CAAA;AACH;;;;"}
@@ -4,7 +4,7 @@ var path = require('path');
4
4
  var utility = require('./utility-CsspJYjU.cjs.js');
5
5
  var backendCommon = require('@backstage/backend-common');
6
6
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
7
- var PublisherConfig = require('./PublisherConfig-B9GYw8mh.cjs.js');
7
+ var PublisherConfig = require('./PublisherConfig-DheuBNuV.cjs.js');
8
8
  require('winston');
9
9
  require('stream');
10
10
  require('process');
@@ -33,4 +33,4 @@ async function publish(opts) {
33
33
  }
34
34
 
35
35
  exports.default = publish;
36
- //# sourceMappingURL=publish-D19dZg09.cjs.js.map
36
+ //# sourceMappingURL=publish-DYFq3em1.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publish-D19dZg09.cjs.js","sources":["../../src/commands/publish/publish.ts"],"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 { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { HostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","HostDiscovery","Publisher","resolve"],"mappings":";;;;;;;;;;;;AAwBA,eAA8B,QAAQ,IAAkC,EAAA;AACtE,EAAA,MAAM,SAASA,oBAAa,CAAA,EAAE,OAAS,EAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAErD,EAAM,MAAA,MAAA,GAASC,+BAAgB,CAAA,cAAA,CAAe,IAAI,CAAA,CAAA;AAClD,EAAM,MAAA,SAAA,GAAYC,2BAAc,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACjD,EAAM,MAAA,SAAA,GAAY,MAAMC,4BAAU,CAAA,UAAA,CAAW,QAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAG1E,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,MAAM,UAAU,YAAa,EAAA,CAAA;AACrD,EAAA,IAAI,CAAC,WAAa,EAAA;AAEhB,IAAA,OAAO,OAAQ,CAAA,MAAA,CAAO,IAAI,KAAA,CAAM,EAAE,CAAC,CAAA,CAAA;AAAA,GACrC;AAEA,EAAM,MAAA,CAAC,WAAW,IAAM,EAAA,IAAI,IAAI,IAAK,CAAA,MAAA,CAAO,MAAM,GAAG,CAAA,CAAA;AACrD,EAAA,MAAM,MAAS,GAAA;AAAA,IACb,IAAA;AAAA,IACA,QAAU,EAAA;AAAA,MACR,SAAA;AAAA,MACA,IAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEA,EAAM,MAAA,SAAA,GAAYC,YAAQ,CAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AACxC,EAAA,MAAM,SAAU,CAAA,OAAA,CAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAE7C,EAAO,OAAA,IAAA,CAAA;AACT;;;;"}
1
+ {"version":3,"file":"publish-DYFq3em1.cjs.js","sources":["../../src/commands/publish/publish.ts"],"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 { resolve } from 'path';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { HostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","HostDiscovery","Publisher","resolve"],"mappings":";;;;;;;;;;;;AAwBA,eAA8B,QAAQ,IAAkC,EAAA;AACtE,EAAA,MAAM,SAASA,oBAAa,CAAA,EAAE,OAAS,EAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AAErD,EAAM,MAAA,MAAA,GAASC,+BAAgB,CAAA,cAAA,CAAe,IAAI,CAAA,CAAA;AAClD,EAAM,MAAA,SAAA,GAAYC,2BAAc,CAAA,UAAA,CAAW,MAAM,CAAA,CAAA;AACjD,EAAM,MAAA,SAAA,GAAY,MAAMC,4BAAU,CAAA,UAAA,CAAW,QAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAG1E,EAAA,MAAM,EAAE,WAAA,EAAgB,GAAA,MAAM,UAAU,YAAa,EAAA,CAAA;AACrD,EAAA,IAAI,CAAC,WAAa,EAAA;AAEhB,IAAA,OAAO,OAAQ,CAAA,MAAA,CAAO,IAAI,KAAA,CAAM,EAAE,CAAC,CAAA,CAAA;AAAA,GACrC;AAEA,EAAM,MAAA,CAAC,WAAW,IAAM,EAAA,IAAI,IAAI,IAAK,CAAA,MAAA,CAAO,MAAM,GAAG,CAAA,CAAA;AACrD,EAAA,MAAM,MAAS,GAAA;AAAA,IACb,IAAA;AAAA,IACA,QAAU,EAAA;AAAA,MACR,SAAA;AAAA,MACA,IAAA;AAAA,KACF;AAAA,GACF,CAAA;AAEA,EAAM,MAAA,SAAA,GAAYC,YAAQ,CAAA,IAAA,CAAK,SAAS,CAAA,CAAA;AACxC,EAAA,MAAM,SAAU,CAAA,OAAA,CAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA,CAAA;AAE7C,EAAO,OAAA,IAAA,CAAA;AACT;;;;"}
@@ -40,6 +40,16 @@
40
40
  "type": "string",
41
41
  "visibility": "frontend",
42
42
  "description": "site for Datadog RUM events"
43
+ },
44
+ "sessionSampleRate": {
45
+ "type": "number",
46
+ "visibility": "frontend",
47
+ "description": "sample rate of Datadog RUM events"
48
+ },
49
+ "sessionReplaySampleRate": {
50
+ "type": "number",
51
+ "visibility": "frontend",
52
+ "description": "sample rate of session replays based upon already sampled Datadog RUM events"
43
53
  }
44
54
  },
45
55
  "required": [
@@ -323,54 +333,6 @@
323
333
  "$schema": "http://json-schema.org/draft-07/schema#"
324
334
  }
325
335
  },
326
- {
327
- "path": "../../plugins/techdocs/config.d.ts",
328
- "value": {
329
- "type": "object",
330
- "properties": {
331
- "techdocs": {
332
- "description": "Configuration options for the techdocs plugin",
333
- "type": "object",
334
- "properties": {
335
- "builder": {
336
- "description": "Documentation building process depends on the builder attr",
337
- "visibility": "frontend",
338
- "enum": [
339
- "external",
340
- "local"
341
- ],
342
- "type": "string"
343
- },
344
- "legacyUseCaseSensitiveTripletPaths": {
345
- "description": "Allows fallback to case-sensitive triplets in case of migration issues.",
346
- "visibility": "frontend",
347
- "type": "boolean"
348
- },
349
- "sanitizer": {
350
- "type": "object",
351
- "properties": {
352
- "allowedIframeHosts": {
353
- "description": "Allows iframe tag only for listed hosts\nExample:\n allowedIframeHosts: [\"example.com\"]\n this will allow all iframes with the host `example.com` in the src attribute",
354
- "visibility": "frontend",
355
- "type": "array",
356
- "items": {
357
- "type": "string"
358
- }
359
- }
360
- }
361
- }
362
- },
363
- "required": [
364
- "builder"
365
- ]
366
- }
367
- },
368
- "required": [
369
- "techdocs"
370
- ],
371
- "$schema": "http://json-schema.org/draft-07/schema#"
372
- }
373
- },
374
336
  {
375
337
  "path": "../core-components/config.d.ts",
376
338
  "value": {
@@ -416,6 +378,51 @@
416
378
  "$schema": "http://json-schema.org/draft-07/schema#"
417
379
  }
418
380
  },
381
+ {
382
+ "path": "../../plugins/techdocs/config.d.ts",
383
+ "value": {
384
+ "type": "object",
385
+ "properties": {
386
+ "techdocs": {
387
+ "description": "Configuration options for the techdocs plugin",
388
+ "type": "object",
389
+ "properties": {
390
+ "builder": {
391
+ "description": "Documentation building process depends on the builder attr",
392
+ "visibility": "frontend",
393
+ "enum": [
394
+ "external",
395
+ "local"
396
+ ],
397
+ "type": "string"
398
+ },
399
+ "legacyUseCaseSensitiveTripletPaths": {
400
+ "description": "Allows fallback to case-sensitive triplets in case of migration issues.",
401
+ "visibility": "frontend",
402
+ "type": "boolean"
403
+ },
404
+ "sanitizer": {
405
+ "type": "object",
406
+ "properties": {
407
+ "allowedIframeHosts": {
408
+ "description": "Allows iframe tag only for listed hosts\nExample:\n allowedIframeHosts: [\"example.com\"]\n this will allow all iframes with the host `example.com` in the src attribute",
409
+ "visibility": "frontend",
410
+ "type": "array",
411
+ "items": {
412
+ "type": "string"
413
+ }
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ },
420
+ "required": [
421
+ "techdocs"
422
+ ],
423
+ "$schema": "http://json-schema.org/draft-07/schema#"
424
+ }
425
+ },
419
426
  {
420
427
  "path": "../integration/config.d.ts",
421
428
  "value": {
@@ -821,6 +828,33 @@
821
828
  "host"
822
829
  ]
823
830
  }
831
+ },
832
+ "harness": {
833
+ "description": "Integration configuration for Harness Code",
834
+ "type": "array",
835
+ "items": {
836
+ "type": "object",
837
+ "properties": {
838
+ "host": {
839
+ "description": "The hostname of the given Harness Code instance",
840
+ "visibility": "frontend",
841
+ "type": "string"
842
+ },
843
+ "apiKey": {
844
+ "description": "The apikey to use for authenticated requests.",
845
+ "visibility": "secret",
846
+ "type": "string"
847
+ },
848
+ "token": {
849
+ "description": "Harness Code token used to authenticate requests. This can be either a generated access token.",
850
+ "visibility": "secret",
851
+ "type": "string"
852
+ }
853
+ },
854
+ "required": [
855
+ "host"
856
+ ]
857
+ }
824
858
  }
825
859
  }
826
860
  }
@@ -962,7 +996,7 @@
962
996
  }
963
997
  },
964
998
  {
965
- "path": "../../plugins/stackstorm/config.d.ts",
999
+ "path": "../../node_modules/@backstage-community/plugin-stackstorm/config.d.ts",
966
1000
  "value": {
967
1001
  "type": "object",
968
1002
  "properties": {
@@ -1158,6 +1192,10 @@
1158
1192
  "description": "Whether to ensure the given database exists by creating it if it does not.\nDefaults to true if unspecified.",
1159
1193
  "type": "boolean"
1160
1194
  },
1195
+ "ensureSchemaExists": {
1196
+ "description": "Whether to ensure the given database schema exists by creating it if it does not.\nDefaults to false if unspecified.\n\nNOTE: Currently only supported by the `pg` client when pluginDivisionMode: schema",
1197
+ "type": "boolean"
1198
+ },
1161
1199
  "pluginDivisionMode": {
1162
1200
  "description": "How plugins databases are managed/divided in the provided database instance.\n\n`database` -> Plugins are each given their own database to manage their schemas/tables.\n\n`schema` -> Plugins will be given their own schema (in the specified/default database)\n to manage their tables.\n\nNOTE: Currently only supported by the `pg` client.",
1163
1201
  "default": "database",
@@ -1210,6 +1248,10 @@
1210
1248
  "description": "Whether to ensure the given database exists by creating it if it does not.\nDefaults to base config if unspecified.",
1211
1249
  "type": "boolean"
1212
1250
  },
1251
+ "ensureSchemaExists": {
1252
+ "description": "Whether to ensure the given database schema exists by creating it if it does not.\nDefaults to false if unspecified.\n\nNOTE: Currently only supported by the `pg` client when pluginDivisionMode: schema",
1253
+ "type": "boolean"
1254
+ },
1213
1255
  "knexConfig": {
1214
1256
  "description": "Arbitrary config object to pass to knex when initializing\n(https://knexjs.org/#Installation-client). Most notable is the\ndebug and asyncStackTraces booleans.\n\nThis is merged recursively into the base knexConfig",
1215
1257
  "type": "object",
@@ -1 +1 @@
1
- <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.04529c71.js"></script><script defer="defer" src="/static/module-material-ui.1eefc717.js"></script><script defer="defer" src="/static/module-material-table.145eb704.js"></script><script defer="defer" src="/static/module-lodash.1a2b8e11.js"></script><script defer="defer" src="/static/module-mui.3056800b.js"></script><script defer="defer" src="/static/module-react-dom.3e65b8bc.js"></script><script defer="defer" src="/static/module-react-router.07ec2a81.js"></script><script defer="defer" src="/static/module-react-router-dom.ba9d01bf.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.8a51ed97.js"></script><script defer="defer" src="/static/module-zod.955be94f.js"></script><script defer="defer" src="/static/module-i18next.40b7c233.js"></script><script defer="defer" src="/static/vendor.04529c71.js"></script><script defer="defer" src="/static/main.04529c71.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1
+ <!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.e5571a2f.js"></script><script defer="defer" src="/static/module-material-ui.1eefc717.js"></script><script defer="defer" src="/static/module-lodash.1a2b8e11.js"></script><script defer="defer" src="/static/module-date-fns.196adaa7.js"></script><script defer="defer" src="/static/module-mui.3056800b.js"></script><script defer="defer" src="/static/module-material-table.892da5bc.js"></script><script defer="defer" src="/static/module-react-dom.3e65b8bc.js"></script><script defer="defer" src="/static/module-react-router.07ec2a81.js"></script><script defer="defer" src="/static/module-react-router-dom.ba9d01bf.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.8a51ed97.js"></script><script defer="defer" src="/static/module-zod.52dba18e.js"></script><script defer="defer" src="/static/module-i18next.40b7c233.js"></script><script defer="defer" src="/static/vendor.e5571a2f.js"></script><script defer="defer" src="/static/main.e5571a2f.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
@@ -0,0 +1,5 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[124],{74616:function(z,f,t){var n,h=t(4293),A=t(78920);n={value:!0},f.A=void 0;var u=A(t(14041)),y=h(t(74044)),C=(0,y.default)(u.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");f.A=C},48514:function(z,f,t){t.d(f,{M:function(){return x}});var n=t(31085),h=t(58837),A=t(71677),u=t(14041),y=t(72501);const C=(0,h.A)({container:{overflow:"visible !important"},typo:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:s})=>s||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function x(s){const M=C(s);var a;return(0,n.jsx)(A.Ay,{title:(a=s.title)!==null&&a!==void 0?a:s.text||"",placement:s.placement,children:(0,n.jsx)(y.A,{className:M.typo,children:s.text})})}},48045:function(z,f,t){t.d(f,{n:function(){return D}});var n=t(31085),h=t(40703),A=t(59469),u=t(48653),y=t(45685),C=t(37197),x=t(58837),s=t(87051),M=t(53373),a=t.n(M),S=t(14041),c=t(10394),g=t(72501),I=t(74616),L=t(72072);const m=(0,x.A)(o=>({root:{maxWidth:"fit-content",padding:o.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:o.palette.textSubtle},arrow:{color:o.palette.textSubtle}}),{name:"BackstageBottomLink"});function R(o){const{link:e,title:l,onClick:T}=o,j=m();return(0,n.jsxs)(c.A,{children:[(0,n.jsx)(C.A,{}),(0,n.jsx)(L.N_,{to:e,onClick:T,underline:"none",children:(0,n.jsxs)(c.A,{display:"flex",alignItems:"center",className:j.root,children:[(0,n.jsx)(c.A,{className:j.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,n.jsx)(g.A,{children:(0,n.jsx)("strong",{children:l})})}),(0,n.jsx)(I.A,{className:j.arrow})]})})]})}var O=t(73896),r=t(22020),d=t(10315),U=t(87849);const K=o=>{const{slackChannel:e}=o,{t:l}=(0,U.i)(d.O);if(e){if(typeof e=="string")return(0,n.jsx)(g.A,{children:l("errorBoundary.title",{slackChannel:e})});if(!e.href)return(0,n.jsx)(g.A,{children:l("errorBoundary.title",{slackChannel:e.name})})}else return null;return(0,n.jsx)(O.z,{to:e.href,variant:"contained",children:e.name})},E=class extends S.Component{componentDidCatch(e,l){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:l}),this.setState({error:e,errorInfo:l})}render(){const{slackChannel:e,children:l}=this.props,{error:T}=this.state;return T?(0,n.jsx)(r.b,{title:"Something Went Wrong",error:T,children:(0,n.jsx)(K,{slackChannel:e})}):l}constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}},i=(0,x.A)(o=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:o.spacing(2,2,2,2.5)},headerTitle:{fontWeight:o.typography.fontWeightBold},headerSubheader:{paddingTop:o.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),p=(0,s.A)(o=>({root:{display:"inline-block",padding:o.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(A.A),v={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function D(o){const{title:e,subheader:l,divider:T=!0,deepLink:j,slackChannel:H,errorBoundaryProps:N,variant:B,alignContent:F="normal",children:P,headerStyle:$,headerProps:G,icon:b,action:Q,actionsClassName:Z,actions:k,cardClassName:w,actionsTopRight:X,className:q,noPadding:_,titleTypographyProps:tt,subheaderTypographyProps:nt}=o,W=i();let J={},V={};B&&B.split(/[\s]+/g).forEach(Y=>{J={...J,...v.card[Y]},V={...V,...v.cardContent[Y]}});const et=()=>!l&&!b?null:(0,n.jsxs)("div",{"data-testid":"info-card-subheader",children:[l&&(0,n.jsx)("div",{className:W.subheader,children:l}),b]}),ot=N||(H?{slackChannel:H}:{});return(0,n.jsx)(h.A,{style:J,className:q,children:(0,n.jsxs)(E,{...ot,children:[e&&(0,n.jsx)(y.A,{classes:{root:a()(W.header),title:W.headerTitle,subheader:W.headerSubheader,avatar:W.headerAvatar,action:W.headerAction,content:W.headerContent},title:e,subheader:et(),action:Q,style:{...$},titleTypographyProps:tt,subheaderTypographyProps:nt,...G}),X&&(0,n.jsx)(p,{children:X}),T&&(0,n.jsx)(C.A,{}),(0,n.jsx)(u.A,{className:a()(w,{[W.noPadding]:_,[W.contentAlignBottom]:F==="bottom"}),style:V,children:P}),k&&(0,n.jsx)(A.A,{className:Z,children:k}),j&&(0,n.jsx)(R,{...j})]})})}},89648:function(z,f,t){t.d(f,{s:function(){return L}});var n=t(31085),h=t(58837),A=t(14041),u=t(51372),y=t(48514),C=t(67871),x=t(90184),s=t(8859),M=t(34428);const a=Object.freeze({createEntityRefColumn(m){const{defaultKind:R}=m;function O(r){var d;return((d=r.metadata)===null||d===void 0?void 0:d.title)||(0,x.S)(r,{defaultKind:R})}return{title:"Name",highlight:!0,customFilterAndSearch(r,d){return O(d).includes(r)},customSort(r,d){return O(r).localeCompare(O(d))},render:r=>{var d;return(0,n.jsx)(s.z,{entityRef:r,defaultKind:R,title:(d=r.metadata)===null||d===void 0?void 0:d.title})}}},createEntityRelationColumn(m){const{title:R,relation:O,defaultKind:r,filter:d}=m;function U(E){return(0,C.t)(E,O,d)}function K(E){return U(E).map(i=>(0,x.S)(i,{defaultKind:r})).join(", ")}return{title:R,customFilterAndSearch(E,i){return K(i).includes(E)},customSort(E,i){return K(E).localeCompare(K(i))},render:E=>(0,n.jsx)(M.i,{entityRefs:U(E),defaultKind:r})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:u.vv,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:u.jn,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:u.jn,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:m=>(0,n.jsx)(y.M,{text:m.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),S=[a.createEntityRefColumn({defaultKind:"system"}),a.createDomainColumn(),a.createOwnerColumn(),a.createMetadataDescriptionColumn()],c=[a.createEntityRefColumn({defaultKind:"component"}),a.createSystemColumn(),a.createOwnerColumn(),a.createSpecTypeColumn(),a.createSpecLifecycleColumn(),a.createMetadataDescriptionColumn()];var g=t(14209);const I=(0,h.A)(m=>({empty:{padding:m.spacing(2),display:"flex",justifyContent:"center"}})),L=m=>{const{entities:R,title:O,emptyContent:r,variant:d="gridItem",columns:U,tableOptions:K={}}=m,E=I(),i={minWidth:"0",width:"100%"};return d==="gridItem"&&(i.height="calc(100% - 10px)"),(0,n.jsx)(g.X,{columns:U,title:O,style:i,emptyContent:r&&(0,n.jsx)("div",{className:E.empty,children:r}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1,...K},data:R})};L.columns=a,L.systemEntityColumns=S,L.componentEntityColumns=c},99538:function(z,f,t){t.d(f,{T7:function(){return s},TY:function(){return S},tN:function(){return a}});var n=t(31085),h=t(6820),A=t(25862),u=t(43836),y=t(10602),C=t(14041);const x=(0,u.tK)("entity-context"),s=c=>{const{children:g,entity:I,loading:L,error:m,refresh:R}=c,O={entity:I,loading:L,error:m,refresh:R};return(0,n.jsx)(x.Provider,{value:(0,y.B)({1:O}),children:(0,n.jsx)(A.Ig,{attributes:{...I?{entityRef:(0,h.U2)(I)}:void 0},children:g})})},M=c=>_jsx(s,{entity:c.entity,loading:!c.entity,error:void 0,refresh:void 0,children:c.children});function a(){const c=(0,u.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const g=c.atVersion(1);if(!g)throw new Error("EntityContext v1 not available");if(!g.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:g.entity}}function S(){const c=(0,u.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const g=c.atVersion(1);if(!g)throw new Error("EntityContext v1 not available");const{entity:I,loading:L,error:m,refresh:R}=g;return{entity:I,loading:L,error:m,refresh:R}}},124:function(z,f,t){t.r(f),t.d(f,{DependencyOfComponentsCard:function(){return C}});var n=t(31085),h=t(51372),A=t(14041),u=t(59251),y=t(48105);function C(x){const{variant:s="gridItem",title:M="Dependency of components"}=x;return(0,n.jsx)(u.p,{variant:s,title:M,entityKind:"Component",relationType:h.fT,columns:y.mz,emptyMessage:"No component depends on this component",emptyHelpLink:y.e2,asRenderableEntities:y.xJ})}},59251:function(z,f,t){t.d(f,{p:function(){return E}});var n=t(31085),h=t(72501),A=t(99538),u=t(6820),y=t(72427),C=t(73466),x=t(7341);function s(i,p){var v,D;const o=p==null||(v=p.type)===null||v===void 0?void 0:v.toLocaleLowerCase("en-US"),e=p==null||(D=p.kind)===null||D===void 0?void 0:D.toLocaleLowerCase("en-US"),l=(0,y.gf)(x.v),{loading:T,value:j,error:H}=(0,C.A)(async()=>{var N;const B=(N=i.relations)===null||N===void 0?void 0:N.filter(P=>(!o||P.type.toLocaleLowerCase("en-US")===o)&&(!e||(0,u.KU)(P.targetRef).kind===e));if(!(B!=null&&B.length))return[];const{items:F}=await l.getEntitiesByRefs({entityRefs:B.map(P=>P.targetRef)});return F.filter(P=>!!P)},[i,o,e]);return{entities:j,loading:T,error:H}}var M=t(89648),a=t(14041),S=t(48045),c=t(68146),g=t(58837),I=t(37197),L=t(8109),m=t(5951),R=t(77310),O=t(37916),r=t(22020);const d=(0,g.A)(i=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:i.spacing(2)},divider:{margin:i.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function U(i){var p;const{title:v,error:D,defaultExpanded:o}=i,e=d();if(D.name!=="ResponseError")return(0,n.jsx)(r.b,{title:v!=null?v:D.message,defaultExpanded:o,error:D});const{body:l,cause:T}=D,{request:j,response:H}=l,N=`${H.statusCode}: ${T.name}`,B=j&&`${j.method} ${j.url}`,F=T.message.replace(/\\n/g,`
2
+ `),P=(p=T.stack)===null||p===void 0?void 0:p.replace(/\\n/g,`
3
+ `),$=JSON.stringify(l,void 0,2);return(0,n.jsxs)(r.b,{title:v!=null?v:D.message,defaultExpanded:o,error:{name:N,message:F,stack:P},children:[B&&(0,n.jsxs)(L.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:e.text},primary:"Request",secondary:j?`${B}`:void 0}),(0,n.jsx)(O.l,{text:B})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(I.A,{component:"li",className:e.divider}),(0,n.jsx)(L.A,{alignItems:"flex-start",children:(0,n.jsx)(m.A,{classes:{secondary:e.text},primary:"Full Error as JSON"})}),(0,n.jsx)(R.z,{language:"json",text:$,showCopyCodeButton:!0})]})]})}var K=t(72072);function E(i){const{variant:p="gridItem",title:v,columns:D,entityKind:o,relationType:e,emptyMessage:l,emptyHelpLink:T,asRenderableEntities:j,tableOptions:H={}}=i,{entity:N}=(0,A.tN)(),{entities:B,loading:F,error:P}=s(N,{type:e,kind:o});return F?(0,n.jsx)(S.n,{variant:p,title:v,children:(0,n.jsx)(c.k,{})}):P?(0,n.jsx)(S.n,{variant:p,title:v,children:(0,n.jsx)(U,{error:P})}):(0,n.jsx)(M.s,{title:v,variant:p,emptyContent:(0,n.jsxs)("div",{style:{textAlign:"center"},children:[(0,n.jsx)(h.A,{variant:"body1",children:l}),(0,n.jsx)(h.A,{variant:"body2",children:(0,n.jsx)(K.N_,{to:T,children:"Learn how to change this."})})]}),columns:D,entities:j(B||[]),tableOptions:H})}},48105:function(z,f,t){t.d(f,{MW:function(){return s},e2:function(){return A},eB:function(){return x},iU:function(){return M},mz:function(){return h},nz:function(){return C},v9:function(){return y},vy:function(){return a},xJ:function(){return u}});var n=t(89648);const h=[n.s.columns.createEntityRefColumn({defaultKind:"component"}),n.s.columns.createOwnerColumn(),n.s.columns.createSpecTypeColumn(),n.s.columns.createSpecLifecycleColumn(),n.s.columns.createMetadataDescriptionColumn()],A="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",u=S=>S,y=[n.s.columns.createEntityRefColumn({defaultKind:"resource"}),n.s.columns.createOwnerColumn(),n.s.columns.createSpecTypeColumn(),n.s.columns.createSpecLifecycleColumn(),n.s.columns.createMetadataDescriptionColumn()],C="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",x=S=>S,s=[n.s.columns.createEntityRefColumn({defaultKind:"system"}),n.s.columns.createOwnerColumn(),n.s.columns.createMetadataDescriptionColumn()],M="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",a=S=>S}}]);})();
4
+
5
+ //# sourceMappingURL=124.2fe45728.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static/124.2fe45728.chunk.js","mappings":"wJAEIA,EAAyB,EAAQ,IAA8C,EAE/EC,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACAC,EAAQ,EAAU,OAElB,IAAIC,EAAQF,EAAwB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AASA,EACTF,SAAUuC,EAAqBvC,GAAY,CAAC,CAAC,EAC7CG,aAAcA,C,EAGpB,C,wQCzFO,MAAMP,EAAyD,CACpEG,EAAAA,EAAYG,QAAQ7C,sBAAsB,CAAEE,YAAa,WAAY,CAAC,EACtEwC,EAAAA,EAAYG,QAAQlB,kBAAkB,EACtCe,EAAAA,EAAYG,QAAQR,qBAAqB,EACzCK,EAAAA,EAAYG,QAAQT,0BAA0B,EAC9CM,EAAAA,EAAYG,QAAQZ,gCAAgC,C,EAEzCgD,EACX,uFACWE,EAAuBxC,GAClCA,EAEW6F,EAAuD,CAClE9F,EAAAA,EAAYG,QAAQ7C,sBAAsB,CAAEE,YAAa,UAAW,CAAC,EACrEwC,EAAAA,EAAYG,QAAQlB,kBAAkB,EACtCe,EAAAA,EAAYG,QAAQR,qBAAqB,EACzCK,EAAAA,EAAYG,QAAQT,0BAA0B,EAC9CM,EAAAA,EAAYG,QAAQZ,gCAAgC,C,EAEzCwG,EACX,sFACWC,EAAsB/F,GACjCA,EAEWL,EAAmD,CAC9DI,EAAAA,EAAYG,QAAQ7C,sBAAsB,CAAEE,YAAa,QAAS,CAAC,EACnEwC,EAAAA,EAAYG,QAAQlB,kBAAkB,EACtCe,EAAAA,EAAYG,QAAQZ,gCAAgC,C,EAEzC0G,EACX,oFACWC,EAAoBjG,GAC/BA,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/ArrowForward.js","webpack://techdocs-cli-embedded-app/../core-components/src/components/OverflowTooltip/OverflowTooltip.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/BottomLink/BottomLink.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ErrorBoundary/ErrorBoundary.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/InfoCard/InfoCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/columns.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/presets.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/components/EntityTable/EntityTable.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntity.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/DependencyOfComponentsCard/DependencyOfComponentsCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useRelatedEntities.ts","webpack://techdocs-cli-embedded-app/../core-components/src/components/ResponseErrorPanel/ResponseErrorPanel.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://techdocs-cli-embedded-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.ts"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z\"\n}), 'ArrowForward');\n\nexports.default = _default;","/*\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 { makeStyles } from '@material-ui/core/styles';\nimport Tooltip, { TooltipProps } from '@material-ui/core/Tooltip';\nimport React from 'react';\nimport Typography from '@material-ui/core/Typography';\n\ntype Props = {\n text?: string | undefined;\n title?: TooltipProps['title'];\n line?: number | undefined;\n placement?: TooltipProps['placement'];\n};\n\nexport type OverflowTooltipClassKey = 'container';\n\nconst useStyles = makeStyles(\n {\n container: {\n overflow: 'visible !important',\n },\n typo: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n display: '-webkit-box',\n '-webkit-line-clamp': ({ line }: Props) => line || 1,\n '-webkit-box-orient': 'vertical',\n },\n },\n { name: 'BackstageOverflowTooltip' },\n);\n\nexport function OverflowTooltip(props: Props) {\n const classes = useStyles(props);\n\n return (\n <Tooltip\n title={props.title ?? (props.text || '')}\n placement={props.placement}\n >\n <Typography className={classes.typo}>{props.text}</Typography>\n </Tooltip>\n );\n}\n","/*\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 Box from '@material-ui/core/Box';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport ArrowIcon from '@material-ui/icons/ArrowForward';\nimport React from 'react';\nimport { Link } from '../../components/Link';\n\n/** @public */\nexport type BottomLinkClassKey = 'root' | 'boxTitle' | 'arrow';\n\nconst useStyles = makeStyles(\n theme => ({\n root: {\n maxWidth: 'fit-content',\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n boxTitle: {\n margin: 0,\n color: theme.palette.textSubtle,\n },\n arrow: {\n color: theme.palette.textSubtle,\n },\n }),\n { name: 'BackstageBottomLink' },\n);\n\n/** @public */\nexport type BottomLinkProps = {\n link: string;\n title: string;\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n};\n\n/**\n * Footer with link used in {@link InfoCard } and {@link TabbedCard}\n *\n * @public\n *\n */\nexport function BottomLink(props: BottomLinkProps) {\n const { link, title, onClick } = props;\n const classes = useStyles();\n\n return (\n <Box>\n <Divider />\n <Link to={link} onClick={onClick} underline=\"none\">\n <Box display=\"flex\" alignItems=\"center\" className={classes.root}>\n <Box className={classes.boxTitle} fontWeight=\"fontWeightBold\" m={1}>\n <Typography>\n <strong>{title}</strong>\n </Typography>\n </Box>\n <ArrowIcon className={classes.arrow} />\n </Box>\n </Link>\n </Box>\n );\n}\n","/*\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 Typography from '@material-ui/core/Typography';\nimport React, { ComponentClass, Component, ErrorInfo } from 'react';\nimport { LinkButton } from '../../components/LinkButton';\nimport { ErrorPanel } from '../../components/ErrorPanel';\nimport { coreComponentsTranslationRef } from '../../translation';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\n\ntype SlackChannel = {\n name: string;\n href?: string;\n};\n\n/** @public */\nexport type ErrorBoundaryProps = React.PropsWithChildren<{\n slackChannel?: string | SlackChannel;\n onError?: (error: Error, errorInfo: string) => null;\n}>;\n\ntype State = {\n error?: Error;\n errorInfo?: ErrorInfo;\n};\n\nconst SlackLink = (props: { slackChannel?: string | SlackChannel }) => {\n const { slackChannel } = props;\n const { t } = useTranslationRef(coreComponentsTranslationRef);\n\n if (!slackChannel) {\n return null;\n } else if (typeof slackChannel === 'string') {\n return (\n <Typography>{t('errorBoundary.title', { slackChannel })}</Typography>\n );\n } else if (!slackChannel.href) {\n return (\n <Typography>\n {t('errorBoundary.title', {\n slackChannel: slackChannel.name,\n })}\n </Typography>\n );\n }\n\n return (\n <LinkButton to={slackChannel.href} variant=\"contained\">\n {slackChannel.name}\n </LinkButton>\n );\n};\n\n/** @public */\nexport const ErrorBoundary: ComponentClass<\n ErrorBoundaryProps,\n State\n> = class ErrorBoundary extends Component<ErrorBoundaryProps, State> {\n constructor(props: ErrorBoundaryProps) {\n super(props);\n this.state = {\n error: undefined,\n errorInfo: undefined,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n // eslint-disable-next-line no-console\n console.error(`ErrorBoundary, error: ${error}`, { error, errorInfo });\n this.setState({ error, errorInfo });\n }\n\n render() {\n const { slackChannel, children } = this.props;\n const { error } = this.state;\n\n if (!error) {\n return children;\n }\n\n return (\n <ErrorPanel title=\"Something Went Wrong\" error={error}>\n <SlackLink slackChannel={slackChannel} />\n </ErrorPanel>\n );\n }\n};\n","/*\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 Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardHeader, { CardHeaderProps } from '@material-ui/core/CardHeader';\nimport Divider from '@material-ui/core/Divider';\nimport { makeStyles, withStyles } from '@material-ui/core/styles';\nimport classNames from 'classnames';\nimport React, { ReactNode } from 'react';\nimport { BottomLink, BottomLinkProps } from '../BottomLink';\nimport { ErrorBoundary, ErrorBoundaryProps } from '../ErrorBoundary';\n\n/** @public */\nexport type InfoCardClassKey =\n | 'noPadding'\n | 'header'\n | 'headerTitle'\n | 'headerSubheader'\n | 'headerAvatar'\n | 'headerAction'\n | 'headerContent';\n\nconst useStyles = makeStyles(\n theme => ({\n noPadding: {\n padding: 0,\n '&:last-child': {\n paddingBottom: 0,\n },\n },\n contentAlignBottom: {\n display: 'flex',\n alignItems: 'self-end',\n },\n header: {\n padding: theme.spacing(2, 2, 2, 2.5),\n },\n headerTitle: {\n fontWeight: theme.typography.fontWeightBold,\n },\n headerSubheader: {\n paddingTop: theme.spacing(1),\n },\n headerAvatar: {},\n headerAction: {},\n headerContent: {},\n subheader: {\n display: 'flex',\n },\n }),\n { name: 'BackstageInfoCard' },\n);\n\n/** @public */\nexport type CardActionsTopRightClassKey = 'root';\n\nconst CardActionsTopRight = withStyles(\n theme => ({\n root: {\n display: 'inline-block',\n padding: theme.spacing(8, 8, 0, 0),\n float: 'right',\n },\n }),\n { name: 'BackstageInfoCardCardActionsTopRight' },\n)(CardActions);\n\nconst VARIANT_STYLES = {\n card: {\n flex: {\n display: 'flex',\n flexDirection: 'column',\n },\n fullHeight: {\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n gridItem: {\n display: 'flex',\n flexDirection: 'column',\n height: 'calc(100% - 10px)', // for pages without content header\n marginBottom: '10px',\n breakInside: 'avoid-page',\n '@media print': {\n height: 'auto',\n },\n },\n },\n cardContent: {\n fullHeight: {\n flex: 1,\n },\n gridItem: {\n flex: 1,\n },\n },\n};\n\n/** @public */\nexport type InfoCardVariants = 'flex' | 'fullHeight' | 'gridItem';\n\n/**\n * InfoCard is used to display a paper-styled block on the screen, similar to a panel.\n *\n * You can custom style an InfoCard with the 'className' (outer container) and 'cardClassName' (inner container)\n * props. This is typically used with the material-ui makeStyles mechanism.\n *\n * The InfoCard serves as an error boundary. As a result, if you provide an 'errorBoundaryProps' property this\n * specifies the extra information to display in the error component that is displayed if an error occurs\n * in any descendent components.\n *\n * By default the InfoCard has no custom layout of its children, but is treated as a block element. A\n * couple common variants are provided and can be specified via the variant property:\n *\n * When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items.\n * Set to the 'gridItem' variant to display the InfoCard with full height suitable for Grid:\n *\n * `<InfoCard variant=\"gridItem\">...</InfoCard>`\n */\nexport type Props = {\n title?: ReactNode;\n subheader?: ReactNode;\n divider?: boolean;\n deepLink?: BottomLinkProps;\n /** @deprecated Use errorBoundaryProps instead */\n slackChannel?: string;\n errorBoundaryProps?: ErrorBoundaryProps;\n variant?: InfoCardVariants;\n alignContent?: 'normal' | 'bottom';\n children?: ReactNode;\n headerStyle?: object;\n headerProps?: CardHeaderProps;\n icon?: ReactNode;\n action?: ReactNode;\n actionsClassName?: string;\n actions?: ReactNode;\n cardClassName?: string;\n actionsTopRight?: ReactNode;\n className?: string;\n noPadding?: boolean;\n titleTypographyProps?: object;\n subheaderTypographyProps?: object;\n};\n\n/**\n * Material-ui card with header , content and actions footer\n *\n * @public\n *\n */\nexport function InfoCard(props: Props): JSX.Element {\n const {\n title,\n subheader,\n divider = true,\n deepLink,\n slackChannel,\n errorBoundaryProps,\n variant,\n alignContent = 'normal',\n children,\n headerStyle,\n headerProps,\n icon,\n action,\n actionsClassName,\n actions,\n cardClassName,\n actionsTopRight,\n className,\n noPadding,\n titleTypographyProps,\n subheaderTypographyProps,\n } = props;\n const classes = useStyles();\n /**\n * If variant is specified, we build up styles for that particular variant for both\n * the Card and the CardContent (since these need to be synced)\n */\n let calculatedStyle = {};\n let calculatedCardStyle = {};\n if (variant) {\n const variants = variant.split(/[\\s]+/g);\n variants.forEach(name => {\n calculatedStyle = {\n ...calculatedStyle,\n ...VARIANT_STYLES.card[name as keyof (typeof VARIANT_STYLES)['card']],\n };\n calculatedCardStyle = {\n ...calculatedCardStyle,\n ...VARIANT_STYLES.cardContent[\n name as keyof (typeof VARIANT_STYLES)['cardContent']\n ],\n };\n });\n }\n\n const cardSubTitle = () => {\n if (!subheader && !icon) {\n return null;\n }\n\n return (\n <div data-testid=\"info-card-subheader\">\n {subheader && <div className={classes.subheader}>{subheader}</div>}\n {icon}\n </div>\n );\n };\n\n const errProps: ErrorBoundaryProps =\n errorBoundaryProps || (slackChannel ? { slackChannel } : {});\n\n return (\n <Card style={calculatedStyle} className={className}>\n <ErrorBoundary {...errProps}>\n {title && (\n <CardHeader\n classes={{\n root: classNames(classes.header),\n title: classes.headerTitle,\n subheader: classes.headerSubheader,\n avatar: classes.headerAvatar,\n action: classes.headerAction,\n content: classes.headerContent,\n }}\n title={title}\n subheader={cardSubTitle()}\n action={action}\n style={{ ...headerStyle }}\n titleTypographyProps={titleTypographyProps}\n subheaderTypographyProps={subheaderTypographyProps}\n {...headerProps}\n />\n )}\n {actionsTopRight && (\n <CardActionsTopRight>{actionsTopRight}</CardActionsTopRight>\n )}\n {divider && <Divider />}\n <CardContent\n className={classNames(cardClassName, {\n [classes.noPadding]: noPadding,\n [classes.contentAlignBottom]: alignContent === 'bottom',\n })}\n style={calculatedCardStyle}\n >\n {children}\n </CardContent>\n {actions && (\n <CardActions className={actionsClassName}>{actions}</CardActions>\n )}\n {deepLink && <BottomLink {...deepLink} />}\n </ErrorBoundary>\n </Card>\n );\n}\n","/*\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 {\n Entity,\n CompoundEntityRef,\n RELATION_OWNED_BY,\n RELATION_PART_OF,\n} from '@backstage/catalog-model';\nimport { OverflowTooltip, TableColumn } from '@backstage/core-components';\nimport React from 'react';\nimport { getEntityRelations } from '../../utils';\nimport {\n EntityRefLink,\n EntityRefLinks,\n humanizeEntityRef,\n} from '../EntityRefLink';\n\n/** @public */\nexport const columnFactories = Object.freeze({\n createEntityRefColumn<T extends Entity>(options: {\n defaultKind?: string;\n }): TableColumn<T> {\n const { defaultKind } = options;\n function formatContent(entity: T): string {\n return (\n entity.metadata?.title ||\n humanizeEntityRef(entity, {\n defaultKind,\n })\n );\n }\n\n return {\n title: 'Name',\n highlight: true,\n customFilterAndSearch(filter, entity) {\n // TODO: We could implement this more efficiently, like searching over\n // each field that is displayed individually (kind, namespace, name).\n // but that might confuse the user as it will behave different than a\n // simple text search.\n // Another alternative would be to cache the values. But writing them\n // into the entity feels bad too.\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n // TODO: We could implement this more efficiently by comparing field by field.\n // This has similar issues as above.\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => (\n <EntityRefLink\n entityRef={entity}\n defaultKind={defaultKind}\n title={entity.metadata?.title}\n />\n ),\n };\n },\n createEntityRelationColumn<T extends Entity>(options: {\n title: string;\n relation: string;\n defaultKind?: string;\n filter?: { kind: string };\n }): TableColumn<T> {\n const { title, relation, defaultKind, filter: entityFilter } = options;\n\n function getRelations(entity: T): CompoundEntityRef[] {\n return getEntityRelations(entity, relation, entityFilter);\n }\n\n function formatContent(entity: T): string {\n return getRelations(entity)\n .map(r => humanizeEntityRef(r, { defaultKind }))\n .join(', ');\n }\n\n return {\n title,\n customFilterAndSearch(filter, entity) {\n return formatContent(entity).includes(filter);\n },\n customSort(entity1, entity2) {\n return formatContent(entity1).localeCompare(formatContent(entity2));\n },\n render: entity => {\n return (\n <EntityRefLinks\n entityRefs={getRelations(entity)}\n defaultKind={defaultKind}\n />\n );\n },\n };\n },\n createOwnerColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: 'Owner',\n relation: RELATION_OWNED_BY,\n defaultKind: 'group',\n });\n },\n createDomainColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: 'Domain',\n relation: RELATION_PART_OF,\n defaultKind: 'domain',\n filter: {\n kind: 'domain',\n },\n });\n },\n createSystemColumn<T extends Entity>(): TableColumn<T> {\n return this.createEntityRelationColumn({\n title: 'System',\n relation: RELATION_PART_OF,\n defaultKind: 'system',\n filter: {\n kind: 'system',\n },\n });\n },\n createMetadataDescriptionColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: 'Description',\n field: 'metadata.description',\n render: entity => (\n <OverflowTooltip\n text={entity.metadata.description}\n placement=\"bottom-start\"\n line={2}\n />\n ),\n };\n },\n createSpecLifecycleColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: 'Lifecycle',\n field: 'spec.lifecycle',\n };\n },\n createSpecTypeColumn<T extends Entity>(): TableColumn<T> {\n return {\n title: 'Type',\n field: 'spec.type',\n };\n },\n});\n","/*\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 { ComponentEntity, SystemEntity } from '@backstage/catalog-model';\nimport { TableColumn } from '@backstage/core-components';\nimport { columnFactories } from './columns';\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'system' }),\n columnFactories.createDomainColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n];\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n columnFactories.createEntityRefColumn({ defaultKind: 'component' }),\n columnFactories.createSystemColumn(),\n columnFactories.createOwnerColumn(),\n columnFactories.createSpecTypeColumn(),\n columnFactories.createSpecLifecycleColumn(),\n columnFactories.createMetadataDescriptionColumn(),\n];\n","/*\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 { Entity } from '@backstage/catalog-model';\nimport { makeStyles } from '@material-ui/core/styles';\nimport React, { ReactNode } from 'react';\nimport { columnFactories } from './columns';\nimport { componentEntityColumns, systemEntityColumns } from './presets';\nimport {\n InfoCardVariants,\n Table,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\n\n/**\n * Props for {@link EntityTable}.\n *\n * @public\n */\nexport interface EntityTableProps<T extends Entity> {\n title: string;\n variant?: InfoCardVariants;\n entities: T[];\n emptyContent?: ReactNode;\n columns: TableColumn<T>[];\n tableOptions?: TableOptions;\n}\n\nconst useStyles = makeStyles(theme => ({\n empty: {\n padding: theme.spacing(2),\n display: 'flex',\n justifyContent: 'center',\n },\n}));\n\n/**\n * A general entity table component, that can be used for composing more\n * specific entity tables.\n *\n * @public\n */\nexport const EntityTable = <T extends Entity>(props: EntityTableProps<T>) => {\n const {\n entities,\n title,\n emptyContent,\n variant = 'gridItem',\n columns,\n tableOptions = {},\n } = props;\n\n const classes = useStyles();\n const tableStyle: React.CSSProperties = {\n minWidth: '0',\n width: '100%',\n };\n\n if (variant === 'gridItem') {\n tableStyle.height = 'calc(100% - 10px)';\n }\n\n return (\n <Table<T>\n columns={columns}\n title={title}\n style={tableStyle}\n emptyContent={\n emptyContent && <div className={classes.empty}>{emptyContent}</div>\n }\n options={{\n // TODO: Toolbar padding if off compared to other cards, should be: padding: 16px 24px;\n search: false,\n paging: false,\n actionsColumnIndex: -1,\n padding: 'dense',\n draggable: false,\n ...tableOptions,\n }}\n data={entities}\n />\n );\n};\n\nEntityTable.columns = columnFactories;\n\nEntityTable.systemEntityColumns = systemEntityColumns;\n\nEntityTable.componentEntityColumns = componentEntityColumns;\n","/*\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 */\nimport { Entity, stringifyEntityRef } from '@backstage/catalog-model';\nimport { AnalyticsContext } from '@backstage/core-plugin-api';\nimport {\n createVersionedContext,\n createVersionedValueMap,\n useVersionedContext,\n} from '@backstage/version-bridge';\nimport React, { ReactNode } from 'react';\n\n/** @public */\nexport type EntityLoadingStatus<TEntity extends Entity = Entity> = {\n entity?: TEntity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n};\n\n// This context has support for multiple concurrent versions of this package.\n// It is currently used in parallel with the old context in order to provide\n// a smooth transition, but will eventually be the only context we use.\nconst NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n);\n\n/**\n * Properties for the AsyncEntityProvider component.\n *\n * @public\n */\nexport interface AsyncEntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n loading: boolean;\n error?: Error;\n refresh?: VoidFunction;\n}\n\n/**\n * Provides a loaded entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const AsyncEntityProvider = (props: AsyncEntityProviderProps) => {\n const { children, entity, loading, error, refresh } = props;\n const value = { entity, loading, error, refresh };\n // We provide both the old and the new context, since\n // consumers might be doing things like `useContext(EntityContext)`\n return (\n <NewEntityContext.Provider value={createVersionedValueMap({ 1: value })}>\n <AnalyticsContext\n attributes={{\n ...(entity ? { entityRef: stringifyEntityRef(entity) } : undefined),\n }}\n >\n {children}\n </AnalyticsContext>\n </NewEntityContext.Provider>\n );\n};\n\n/**\n * Properties for the EntityProvider component.\n *\n * @public\n */\nexport interface EntityProviderProps {\n children: ReactNode;\n entity?: Entity;\n}\n\n/**\n * Provides an entity to be picked up by the `useEntity` hook.\n *\n * @public\n */\nexport const EntityProvider = (props: EntityProviderProps) => (\n <AsyncEntityProvider\n entity={props.entity}\n loading={!Boolean(props.entity)}\n error={undefined}\n refresh={undefined}\n children={props.children}\n />\n);\n\n/**\n * Grab the current entity from the context, throws if the entity has not yet been loaded\n * or is not available.\n *\n * @public\n */\nexport function useEntity<TEntity extends Entity = Entity>(): {\n entity: TEntity;\n} {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n if (!value.entity) {\n throw new Error(\n 'useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.',\n );\n }\n\n return { entity: value.entity as TEntity };\n}\n\n/**\n * Grab the current entity from the context, provides loading state and errors, and the ability to refresh.\n *\n * @public\n */\nexport function useAsyncEntity<\n TEntity extends Entity = Entity,\n>(): EntityLoadingStatus<TEntity> {\n const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>(\n 'entity-context',\n );\n\n if (!versionedHolder) {\n throw new Error('Entity context is not available');\n }\n const value = versionedHolder.atVersion(1);\n if (!value) {\n throw new Error('EntityContext v1 not available');\n }\n\n const { entity, loading, error, refresh } = value;\n return { entity: entity as TEntity, loading, error, refresh };\n}\n","/*\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 { RELATION_DEPENDENCY_OF } from '@backstage/catalog-model';\nimport { InfoCardVariants } from '@backstage/core-components';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n/** @public */\nexport interface DependencyOfComponentsCardProps {\n variant?: InfoCardVariants;\n title?: string;\n}\n\nexport function DependencyOfComponentsCard(\n props: DependencyOfComponentsCardProps,\n) {\n const { variant = 'gridItem', title = 'Dependency of components' } = props;\n return (\n <RelatedEntitiesCard\n variant={variant}\n title={title}\n entityKind=\"Component\"\n relationType={RELATION_DEPENDENCY_OF}\n columns={componentEntityColumns}\n emptyMessage=\"No component depends on this component\"\n emptyHelpLink={componentEntityHelpLink}\n asRenderableEntities={asComponentEntities}\n />\n );\n}\n","/*\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 { Entity, parseEntityRef } from '@backstage/catalog-model';\nimport { useApi } from '@backstage/core-plugin-api';\nimport useAsync from 'react-use/esm/useAsync';\nimport { catalogApiRef } from '../api';\n\n/**\n * Fetches all entities that appear in the entity's relations, optionally\n * filtered by relation type and kind.\n *\n * @public\n */\nexport function useRelatedEntities(\n entity: Entity,\n relationFilter: { type?: string; kind?: string },\n): {\n entities: Entity[] | undefined;\n loading: boolean;\n error: Error | undefined;\n} {\n const filterByTypeLower = relationFilter?.type?.toLocaleLowerCase('en-US');\n const filterByKindLower = relationFilter?.kind?.toLocaleLowerCase('en-US');\n const catalogApi = useApi(catalogApiRef);\n\n const {\n loading,\n value: entities,\n error,\n } = useAsync(async () => {\n const relations = entity.relations?.filter(\n r =>\n (!filterByTypeLower ||\n r.type.toLocaleLowerCase('en-US') === filterByTypeLower) &&\n (!filterByKindLower ||\n parseEntityRef(r.targetRef).kind === filterByKindLower),\n );\n\n if (!relations?.length) {\n return [];\n }\n\n const { items } = await catalogApi.getEntitiesByRefs({\n entityRefs: relations.map(r => r.targetRef),\n });\n\n return items.filter((x): x is Entity => Boolean(x));\n }, [entity, filterByTypeLower, filterByKindLower]);\n\n return {\n entities,\n loading,\n error,\n };\n}\n","/*\n * Copyright 2021 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 { ResponseError } from '@backstage/errors';\nimport { makeStyles } from '@material-ui/core/styles';\nimport Divider from '@material-ui/core/Divider';\nimport ListItem from '@material-ui/core/ListItem';\nimport ListItemText from '@material-ui/core/ListItemText';\nimport React from 'react';\nimport { CodeSnippet } from '../CodeSnippet';\nimport { CopyTextButton } from '../CopyTextButton';\nimport { ErrorPanel, ErrorPanelProps } from '../ErrorPanel';\n\nexport type ResponseErrorPanelClassKey = 'text' | 'divider';\n\nconst useStyles = makeStyles(\n theme => ({\n text: {\n fontFamily: 'monospace',\n whiteSpace: 'pre',\n overflowX: 'auto',\n marginRight: theme.spacing(2),\n },\n divider: {\n margin: theme.spacing(2),\n },\n }),\n { name: 'BackstageResponseErrorPanel' },\n);\n\n/**\n * Renders a warning panel as the effect of a failed server request.\n *\n * @remarks\n * Has special treatment for ResponseError errors, to display rich\n * server-provided information about what happened.\n */\nexport function ResponseErrorPanel(props: ErrorPanelProps) {\n const { title, error, defaultExpanded } = props;\n const classes = useStyles();\n\n if (error.name !== 'ResponseError') {\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={error}\n />\n );\n }\n\n const { body, cause } = error as ResponseError;\n const { request, response } = body;\n\n const errorString = `${response.statusCode}: ${cause.name}`;\n const requestString = request && `${request.method} ${request.url}`;\n const messageString = cause.message.replace(/\\\\n/g, '\\n');\n const stackString = cause.stack?.replace(/\\\\n/g, '\\n');\n const jsonString = JSON.stringify(body, undefined, 2);\n\n return (\n <ErrorPanel\n title={title ?? error.message}\n defaultExpanded={defaultExpanded}\n error={{ name: errorString, message: messageString, stack: stackString }}\n >\n {requestString && (\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Request\"\n secondary={request ? `${requestString}` : undefined}\n />\n <CopyTextButton text={requestString} />\n </ListItem>\n )}\n <>\n <Divider component=\"li\" className={classes.divider} />\n <ListItem alignItems=\"flex-start\">\n <ListItemText\n classes={{ secondary: classes.text }}\n primary=\"Full Error as JSON\"\n />\n </ListItem>\n <CodeSnippet language=\"json\" text={jsonString} showCopyCodeButton />\n </>\n </ErrorPanel>\n );\n}\n","/*\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 { Entity } from '@backstage/catalog-model';\nimport Typography from '@material-ui/core/Typography';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n InfoCardVariants,\n Link,\n Progress,\n ResponseErrorPanel,\n TableColumn,\n TableOptions,\n} from '@backstage/core-components';\n\n/** @public */\nexport type RelatedEntitiesCardProps<T extends Entity> = {\n variant?: InfoCardVariants;\n title: string;\n columns: TableColumn<T>[];\n entityKind?: string;\n relationType: string;\n emptyMessage: string;\n emptyHelpLink: string;\n asRenderableEntities: (entities: Entity[]) => T[];\n tableOptions?: TableOptions;\n};\n\n/**\n * A low level card component that can be used as a building block for more\n * specific cards.\n *\n * @remarks\n *\n * You probably want to make a dedicated component for your needs, which renders\n * this card as its implementation with some of the props set to the appropriate\n * values.\n *\n * @public\n */\nexport function RelatedEntitiesCard<T extends Entity>(\n props: RelatedEntitiesCardProps<T>,\n) {\n const {\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\n tableOptions = {},\n } = props;\n\n const { entity } = useEntity();\n const { entities, loading, error } = useRelatedEntities(entity, {\n type: relationType,\n kind: entityKind,\n });\n\n if (loading) {\n return (\n <InfoCard variant={variant} title={title}>\n <Progress />\n </InfoCard>\n );\n }\n\n if (error) {\n return (\n <InfoCard variant={variant} title={title}>\n <ResponseErrorPanel error={error} />\n </InfoCard>\n );\n }\n\n return (\n <EntityTable\n title={title}\n variant={variant}\n emptyContent={\n <div style={{ textAlign: 'center' }}>\n <Typography variant=\"body1\">{emptyMessage}</Typography>\n <Typography variant=\"body2\">\n <Link to={emptyHelpLink}>Learn how to change this.</Link>\n </Typography>\n </div>\n }\n columns={columns}\n entities={asRenderableEntities(entities || [])}\n tableOptions={tableOptions}\n />\n );\n}\n","/*\n * Copyright 2021 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 ComponentEntity,\n Entity,\n ResourceEntity,\n SystemEntity,\n} from '@backstage/catalog-model';\nimport { EntityTable } from '@backstage/plugin-catalog-react';\nimport { TableColumn } from '@backstage/core-components';\n\nexport const componentEntityColumns: TableColumn<ComponentEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'component' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const componentEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities: Entity[]): ComponentEntity[] =>\n entities as ComponentEntity[];\n\nexport const resourceEntityColumns: TableColumn<ResourceEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'resource' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createSpecTypeColumn(),\n EntityTable.columns.createSpecLifecycleColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const resourceEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities: Entity[]): ResourceEntity[] =>\n entities as ResourceEntity[];\n\nexport const systemEntityColumns: TableColumn<SystemEntity>[] = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink: string =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities: Entity[]): SystemEntity[] =>\n entities as SystemEntity[];\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","useStyles","makeStyles","container","overflow","typo","textOverflow","display","line","name","OverflowTooltip","props","classes","Tooltip","title","text","placement","Typography","className","theme","root","maxWidth","padding","spacing","boxTitle","margin","color","palette","textSubtle","arrow","BottomLink","link","onClick","Box","Divider","Link","to","underline","alignItems","fontWeight","m","strong","ArrowIcon","SlackLink","slackChannel","t","useTranslationRef","coreComponentsTranslationRef","href","LinkButton","variant","ErrorBoundary","Component","componentDidCatch","error","errorInfo","console","setState","render","children","state","ErrorPanel","constructor","undefined","noPadding","paddingBottom","contentAlignBottom","header","headerTitle","typography","fontWeightBold","headerSubheader","paddingTop","headerAvatar","headerAction","headerContent","subheader","CardActionsTopRight","withStyles","float","CardActions","VARIANT_STYLES","card","flex","flexDirection","fullHeight","height","gridItem","marginBottom","breakInside","cardContent","InfoCard","divider","deepLink","errorBoundaryProps","alignContent","headerStyle","headerProps","icon","action","actionsClassName","actions","cardClassName","actionsTopRight","titleTypographyProps","subheaderTypographyProps","calculatedStyle","calculatedCardStyle","split","forEach","cardSubTitle","div","data-testid","errProps","Card","style","CardHeader","classNames","avatar","content","CardContent","columnFactories","Object","freeze","createEntityRefColumn","options","defaultKind","formatContent","entity","metadata","humanizeEntityRef","highlight","customFilterAndSearch","filter","includes","customSort","entity1","entity2","localeCompare","EntityRefLink","entityRef","createEntityRelationColumn","relation","entityFilter","getRelations","getEntityRelations","map","r","join","EntityRefLinks","entityRefs","createOwnerColumn","RELATION_OWNED_BY","createDomainColumn","RELATION_PART_OF","kind","createSystemColumn","createMetadataDescriptionColumn","field","description","createSpecLifecycleColumn","createSpecTypeColumn","systemEntityColumns","componentEntityColumns","empty","justifyContent","EntityTable","entities","emptyContent","columns","tableOptions","tableStyle","minWidth","width","Table","search","paging","actionsColumnIndex","draggable","data","NewEntityContext","createVersionedContext","AsyncEntityProvider","loading","refresh","value","Provider","createVersionedValueMap","AnalyticsContext","attributes","stringifyEntityRef","EntityProvider","useEntity","versionedHolder","useVersionedContext","Error","atVersion","useAsyncEntity","DependencyOfComponentsCard","RelatedEntitiesCard","entityKind","relationType","RELATION_DEPENDENCY_OF","emptyMessage","emptyHelpLink","componentEntityHelpLink","asRenderableEntities","asComponentEntities","useRelatedEntities","relationFilter","filterByTypeLower","type","toLocaleLowerCase","filterByKindLower","catalogApi","useApi","catalogApiRef","useAsync","relations","parseEntityRef","targetRef","length","items","getEntitiesByRefs","x","Boolean","fontFamily","whiteSpace","overflowX","marginRight","ResponseErrorPanel","cause","defaultExpanded","message","body","request","response","errorString","statusCode","requestString","method","url","messageString","replace","stackString","stack","jsonString","JSON","stringify","ListItem","ListItemText","secondary","primary","CopyTextButton","component","CodeSnippet","language","showCopyCodeButton","Progress","textAlign","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityHelpLink","asSystemEntities"],"sourceRoot":""}
@@ -0,0 +1,5 @@
1
+ "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2401],{74616:function(z,f,t){var n,a=t(4293),j=t(78920);n={value:!0},f.A=void 0;var v=j(t(14041)),R=a(t(74044)),S=(0,R.default)(v.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");f.A=S},48514:function(z,f,t){t.d(f,{M:function(){return T}});var n=t(31085),a=t(58837),j=t(71677),v=t(14041),R=t(72501);const S=(0,a.A)({container:{overflow:"visible !important"},typo:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":({line:u})=>u||1,"-webkit-box-orient":"vertical"}},{name:"BackstageOverflowTooltip"});function T(u){const I=S(u);var r;return(0,n.jsx)(j.Ay,{title:(r=u.title)!==null&&r!==void 0?r:u.text||"",placement:u.placement,children:(0,n.jsx)(R.A,{className:I.typo,children:u.text})})}},48045:function(z,f,t){t.d(f,{n:function(){return P}});var n=t(31085),a=t(40703),j=t(59469),v=t(48653),R=t(45685),S=t(37197),T=t(58837),u=t(87051),I=t(53373),r=t.n(I),C=t(14041),c=t(10394),h=t(72501),M=t(74616),L=t(72072);const m=(0,T.A)(o=>({root:{maxWidth:"fit-content",padding:o.spacing(2,2,2,2.5)},boxTitle:{margin:0,color:o.palette.textSubtle},arrow:{color:o.palette.textSubtle}}),{name:"BackstageBottomLink"});function x(o){const{link:e,title:l,onClick:A}=o,E=m();return(0,n.jsxs)(c.A,{children:[(0,n.jsx)(S.A,{}),(0,n.jsx)(L.N_,{to:e,onClick:A,underline:"none",children:(0,n.jsxs)(c.A,{display:"flex",alignItems:"center",className:E.root,children:[(0,n.jsx)(c.A,{className:E.boxTitle,fontWeight:"fontWeightBold",m:1,children:(0,n.jsx)(h.A,{children:(0,n.jsx)("strong",{children:l})})}),(0,n.jsx)(M.A,{className:E.arrow})]})})]})}var O=t(73896),s=t(22020),d=t(10315),U=t(87849);const K=o=>{const{slackChannel:e}=o,{t:l}=(0,U.i)(d.O);if(e){if(typeof e=="string")return(0,n.jsx)(h.A,{children:l("errorBoundary.title",{slackChannel:e})});if(!e.href)return(0,n.jsx)(h.A,{children:l("errorBoundary.title",{slackChannel:e.name})})}else return null;return(0,n.jsx)(O.z,{to:e.href,variant:"contained",children:e.name})},p=class extends C.Component{componentDidCatch(e,l){console.error(`ErrorBoundary, error: ${e}`,{error:e,errorInfo:l}),this.setState({error:e,errorInfo:l})}render(){const{slackChannel:e,children:l}=this.props,{error:A}=this.state;return A?(0,n.jsx)(s.b,{title:"Something Went Wrong",error:A,children:(0,n.jsx)(K,{slackChannel:e})}):l}constructor(e){super(e),this.state={error:void 0,errorInfo:void 0}}},i=(0,T.A)(o=>({noPadding:{padding:0,"&:last-child":{paddingBottom:0}},contentAlignBottom:{display:"flex",alignItems:"self-end"},header:{padding:o.spacing(2,2,2,2.5)},headerTitle:{fontWeight:o.typography.fontWeightBold},headerSubheader:{paddingTop:o.spacing(1)},headerAvatar:{},headerAction:{},headerContent:{},subheader:{display:"flex"}}),{name:"BackstageInfoCard"}),g=(0,u.A)(o=>({root:{display:"inline-block",padding:o.spacing(8,8,0,0),float:"right"}}),{name:"BackstageInfoCardCardActionsTopRight"})(j.A),y={card:{flex:{display:"flex",flexDirection:"column"},fullHeight:{display:"flex",flexDirection:"column",height:"100%"},gridItem:{display:"flex",flexDirection:"column",height:"calc(100% - 10px)",marginBottom:"10px",breakInside:"avoid-page","@media print":{height:"auto"}}},cardContent:{fullHeight:{flex:1},gridItem:{flex:1}}};function P(o){const{title:e,subheader:l,divider:A=!0,deepLink:E,slackChannel:H,errorBoundaryProps:W,variant:B,alignContent:k="normal",children:D,headerStyle:F,headerProps:G,icon:J,action:Q,actionsClassName:Z,actions:V,cardClassName:w,actionsTopRight:X,className:q,noPadding:_,titleTypographyProps:tt,subheaderTypographyProps:nt}=o,N=i();let $={},b={};B&&B.split(/[\s]+/g).forEach(Y=>{$={...$,...y.card[Y]},b={...b,...y.cardContent[Y]}});const et=()=>!l&&!J?null:(0,n.jsxs)("div",{"data-testid":"info-card-subheader",children:[l&&(0,n.jsx)("div",{className:N.subheader,children:l}),J]}),ot=W||(H?{slackChannel:H}:{});return(0,n.jsx)(a.A,{style:$,className:q,children:(0,n.jsxs)(p,{...ot,children:[e&&(0,n.jsx)(R.A,{classes:{root:r()(N.header),title:N.headerTitle,subheader:N.headerSubheader,avatar:N.headerAvatar,action:N.headerAction,content:N.headerContent},title:e,subheader:et(),action:Q,style:{...F},titleTypographyProps:tt,subheaderTypographyProps:nt,...G}),X&&(0,n.jsx)(g,{children:X}),A&&(0,n.jsx)(S.A,{}),(0,n.jsx)(v.A,{className:r()(w,{[N.noPadding]:_,[N.contentAlignBottom]:k==="bottom"}),style:b,children:D}),V&&(0,n.jsx)(j.A,{className:Z,children:V}),E&&(0,n.jsx)(x,{...E})]})})}},89648:function(z,f,t){t.d(f,{s:function(){return L}});var n=t(31085),a=t(58837),j=t(14041),v=t(51372),R=t(48514),S=t(67871),T=t(90184),u=t(8859),I=t(34428);const r=Object.freeze({createEntityRefColumn(m){const{defaultKind:x}=m;function O(s){var d;return((d=s.metadata)===null||d===void 0?void 0:d.title)||(0,T.S)(s,{defaultKind:x})}return{title:"Name",highlight:!0,customFilterAndSearch(s,d){return O(d).includes(s)},customSort(s,d){return O(s).localeCompare(O(d))},render:s=>{var d;return(0,n.jsx)(u.z,{entityRef:s,defaultKind:x,title:(d=s.metadata)===null||d===void 0?void 0:d.title})}}},createEntityRelationColumn(m){const{title:x,relation:O,defaultKind:s,filter:d}=m;function U(p){return(0,S.t)(p,O,d)}function K(p){return U(p).map(i=>(0,T.S)(i,{defaultKind:s})).join(", ")}return{title:x,customFilterAndSearch(p,i){return K(i).includes(p)},customSort(p,i){return K(p).localeCompare(K(i))},render:p=>(0,n.jsx)(I.i,{entityRefs:U(p),defaultKind:s})}},createOwnerColumn(){return this.createEntityRelationColumn({title:"Owner",relation:v.vv,defaultKind:"group"})},createDomainColumn(){return this.createEntityRelationColumn({title:"Domain",relation:v.jn,defaultKind:"domain",filter:{kind:"domain"}})},createSystemColumn(){return this.createEntityRelationColumn({title:"System",relation:v.jn,defaultKind:"system",filter:{kind:"system"}})},createMetadataDescriptionColumn(){return{title:"Description",field:"metadata.description",render:m=>(0,n.jsx)(R.M,{text:m.metadata.description,placement:"bottom-start",line:2})}},createSpecLifecycleColumn(){return{title:"Lifecycle",field:"spec.lifecycle"}},createSpecTypeColumn(){return{title:"Type",field:"spec.type"}}}),C=[r.createEntityRefColumn({defaultKind:"system"}),r.createDomainColumn(),r.createOwnerColumn(),r.createMetadataDescriptionColumn()],c=[r.createEntityRefColumn({defaultKind:"component"}),r.createSystemColumn(),r.createOwnerColumn(),r.createSpecTypeColumn(),r.createSpecLifecycleColumn(),r.createMetadataDescriptionColumn()];var h=t(14209);const M=(0,a.A)(m=>({empty:{padding:m.spacing(2),display:"flex",justifyContent:"center"}})),L=m=>{const{entities:x,title:O,emptyContent:s,variant:d="gridItem",columns:U,tableOptions:K={}}=m,p=M(),i={minWidth:"0",width:"100%"};return d==="gridItem"&&(i.height="calc(100% - 10px)"),(0,n.jsx)(h.X,{columns:U,title:O,style:i,emptyContent:s&&(0,n.jsx)("div",{className:p.empty,children:s}),options:{search:!1,paging:!1,actionsColumnIndex:-1,padding:"dense",draggable:!1,...K},data:x})};L.columns=r,L.systemEntityColumns=C,L.componentEntityColumns=c},99538:function(z,f,t){t.d(f,{T7:function(){return u},TY:function(){return C},tN:function(){return r}});var n=t(31085),a=t(6820),j=t(25862),v=t(43836),R=t(10602),S=t(14041);const T=(0,v.tK)("entity-context"),u=c=>{const{children:h,entity:M,loading:L,error:m,refresh:x}=c,O={entity:M,loading:L,error:m,refresh:x};return(0,n.jsx)(T.Provider,{value:(0,R.B)({1:O}),children:(0,n.jsx)(j.Ig,{attributes:{...M?{entityRef:(0,a.U2)(M)}:void 0},children:h})})},I=c=>_jsx(u,{entity:c.entity,loading:!c.entity,error:void 0,refresh:void 0,children:c.children});function r(){const c=(0,v.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const h=c.atVersion(1);if(!h)throw new Error("EntityContext v1 not available");if(!h.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:h.entity}}function C(){const c=(0,v.qO)("entity-context");if(!c)throw new Error("Entity context is not available");const h=c.atVersion(1);if(!h)throw new Error("EntityContext v1 not available");const{entity:M,loading:L,error:m,refresh:x}=h;return{entity:M,loading:L,error:m,refresh:x}}},59251:function(z,f,t){t.d(f,{p:function(){return p}});var n=t(31085),a=t(72501),j=t(99538),v=t(6820),R=t(72427),S=t(73466),T=t(7341);function u(i,g){var y,P;const o=g==null||(y=g.type)===null||y===void 0?void 0:y.toLocaleLowerCase("en-US"),e=g==null||(P=g.kind)===null||P===void 0?void 0:P.toLocaleLowerCase("en-US"),l=(0,R.gf)(T.v),{loading:A,value:E,error:H}=(0,S.A)(async()=>{var W;const B=(W=i.relations)===null||W===void 0?void 0:W.filter(D=>(!o||D.type.toLocaleLowerCase("en-US")===o)&&(!e||(0,v.KU)(D.targetRef).kind===e));if(!(B!=null&&B.length))return[];const{items:k}=await l.getEntitiesByRefs({entityRefs:B.map(D=>D.targetRef)});return k.filter(D=>!!D)},[i,o,e]);return{entities:E,loading:A,error:H}}var I=t(89648),r=t(14041),C=t(48045),c=t(68146),h=t(58837),M=t(37197),L=t(8109),m=t(5951),x=t(77310),O=t(37916),s=t(22020);const d=(0,h.A)(i=>({text:{fontFamily:"monospace",whiteSpace:"pre",overflowX:"auto",marginRight:i.spacing(2)},divider:{margin:i.spacing(2)}}),{name:"BackstageResponseErrorPanel"});function U(i){var g;const{title:y,error:P,defaultExpanded:o}=i,e=d();if(P.name!=="ResponseError")return(0,n.jsx)(s.b,{title:y!=null?y:P.message,defaultExpanded:o,error:P});const{body:l,cause:A}=P,{request:E,response:H}=l,W=`${H.statusCode}: ${A.name}`,B=E&&`${E.method} ${E.url}`,k=A.message.replace(/\\n/g,`
2
+ `),D=(g=A.stack)===null||g===void 0?void 0:g.replace(/\\n/g,`
3
+ `),F=JSON.stringify(l,void 0,2);return(0,n.jsxs)(s.b,{title:y!=null?y:P.message,defaultExpanded:o,error:{name:W,message:k,stack:D},children:[B&&(0,n.jsxs)(L.A,{alignItems:"flex-start",children:[(0,n.jsx)(m.A,{classes:{secondary:e.text},primary:"Request",secondary:E?`${B}`:void 0}),(0,n.jsx)(O.l,{text:B})]}),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(M.A,{component:"li",className:e.divider}),(0,n.jsx)(L.A,{alignItems:"flex-start",children:(0,n.jsx)(m.A,{classes:{secondary:e.text},primary:"Full Error as JSON"})}),(0,n.jsx)(x.z,{language:"json",text:F,showCopyCodeButton:!0})]})]})}var K=t(72072);function p(i){const{variant:g="gridItem",title:y,columns:P,entityKind:o,relationType:e,emptyMessage:l,emptyHelpLink:A,asRenderableEntities:E,tableOptions:H={}}=i,{entity:W}=(0,j.tN)(),{entities:B,loading:k,error:D}=u(W,{type:e,kind:o});return k?(0,n.jsx)(C.n,{variant:g,title:y,children:(0,n.jsx)(c.k,{})}):D?(0,n.jsx)(C.n,{variant:g,title:y,children:(0,n.jsx)(U,{error:D})}):(0,n.jsx)(I.s,{title:y,variant:g,emptyContent:(0,n.jsxs)("div",{style:{textAlign:"center"},children:[(0,n.jsx)(a.A,{variant:"body1",children:l}),(0,n.jsx)(a.A,{variant:"body2",children:(0,n.jsx)(K.N_,{to:A,children:"Learn how to change this."})})]}),columns:P,entities:E(B||[]),tableOptions:H})}},52401:function(z,f,t){t.r(f),t.d(f,{RelatedEntitiesCard:function(){return n.p},asComponentEntities:function(){return a.xJ},asResourceEntities:function(){return a.eB},asSystemEntities:function(){return a.vy},componentEntityColumns:function(){return a.mz},componentEntityHelpLink:function(){return a.e2},resourceEntityColumns:function(){return a.v9},resourceEntityHelpLink:function(){return a.nz},systemEntityColumns:function(){return a.MW},systemEntityHelpLink:function(){return a.iU}});var n=t(59251),a=t(48105)},48105:function(z,f,t){t.d(f,{MW:function(){return u},e2:function(){return j},eB:function(){return T},iU:function(){return I},mz:function(){return a},nz:function(){return S},v9:function(){return R},vy:function(){return r},xJ:function(){return v}});var n=t(89648);const a=[n.s.columns.createEntityRefColumn({defaultKind:"component"}),n.s.columns.createOwnerColumn(),n.s.columns.createSpecTypeColumn(),n.s.columns.createSpecLifecycleColumn(),n.s.columns.createMetadataDescriptionColumn()],j="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",v=C=>C,R=[n.s.columns.createEntityRefColumn({defaultKind:"resource"}),n.s.columns.createOwnerColumn(),n.s.columns.createSpecTypeColumn(),n.s.columns.createSpecLifecycleColumn(),n.s.columns.createMetadataDescriptionColumn()],S="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",T=C=>C,u=[n.s.columns.createEntityRefColumn({defaultKind:"system"}),n.s.columns.createOwnerColumn(),n.s.columns.createMetadataDescriptionColumn()],I="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",r=C=>C}}]);})();
4
+
5
+ //# sourceMappingURL=2401.b9ecb259.chunk.js.map