@techdocs/cli 0.8.6 → 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/cjs/{PublisherConfig-e517144b.cjs.js → PublisherConfig-4eefa446.cjs.js} +3 -3
- package/dist/cjs/{PublisherConfig-e517144b.cjs.js.map → PublisherConfig-4eefa446.cjs.js.map} +1 -1
- package/dist/cjs/{migrate-66e006f6.cjs.js → migrate-eedd77be.cjs.js} +2 -2
- package/dist/cjs/{migrate-66e006f6.cjs.js.map → migrate-eedd77be.cjs.js.map} +1 -1
- package/dist/cjs/{publish-0bdef520.cjs.js → publish-b72ab7ac.cjs.js} +2 -2
- package/dist/cjs/{publish-0bdef520.cjs.js.map → publish-b72ab7ac.cjs.js.map} +1 -1
- package/dist/cjs/{serve-6f7d37dd.cjs.js → serve-7ca882f7.cjs.js} +2 -2
- package/dist/cjs/{serve-6f7d37dd.cjs.js.map → serve-7ca882f7.cjs.js.map} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/techdocs-preview-bundle/.config-schema.json +26 -0
- package/dist/techdocs-preview-bundle/index.html +1 -1
- package/dist/techdocs-preview-bundle/static/{1553.74c14b71.chunk.js → 1553.b196c066.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{1553.74c14b71.chunk.js.map → 1553.b196c066.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{1959.cee4ff3e.chunk.js → 1959.36e7858c.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{1959.cee4ff3e.chunk.js.map → 1959.36e7858c.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{390.ad5e470f.chunk.js → 390.d7537222.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{390.ad5e470f.chunk.js.map → 390.d7537222.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{4022.1e003d91.chunk.js → 4022.91fbea78.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{4022.1e003d91.chunk.js.map → 4022.91fbea78.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{4960.a60038b0.chunk.js → 4960.1233073b.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{4960.a60038b0.chunk.js.map → 4960.1233073b.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{6105.4e9aa3ee.chunk.js → 6105.32d43fcf.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{6105.4e9aa3ee.chunk.js.map → 6105.32d43fcf.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{6235.749fe487.chunk.js → 6235.49ff359a.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{6235.749fe487.chunk.js.map → 6235.49ff359a.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{6650.2bbdf350.chunk.js → 6650.d336b3bc.chunk.js} +1 -1
- package/dist/techdocs-preview-bundle/static/{6650.2bbdf350.chunk.js.map → 6650.d336b3bc.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{8061.e424ec00.chunk.js → 8061.525ebd5c.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{8061.e424ec00.chunk.js.map → 8061.525ebd5c.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{8792.3fa7b079.chunk.js → 8792.d2185dc8.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{8792.3fa7b079.chunk.js.map → 8792.d2185dc8.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{9028.3fcdef44.chunk.js → 9028.38d39eff.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{9028.3fcdef44.chunk.js.map → 9028.38d39eff.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/main.73551f6b.js +2 -0
- package/dist/techdocs-preview-bundle/static/main.73551f6b.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{module-material-ui.79c12e1e.js → module-material-ui.af63fffa.js} +3 -3
- package/dist/techdocs-preview-bundle/static/{module-material-ui.79c12e1e.js.LICENSE.txt → module-material-ui.af63fffa.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/module-material-ui.af63fffa.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{runtime.6a0b1657.js → runtime.73551f6b.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{runtime.6a0b1657.js.map → runtime.73551f6b.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/vendor.73551f6b.js +3 -0
- package/dist/techdocs-preview-bundle/static/{vendor.6a0b1657.js.LICENSE.txt → vendor.73551f6b.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/vendor.73551f6b.js.map +1 -0
- package/package.json +6 -6
- package/dist/techdocs-preview-bundle/static/main.6a0b1657.js +0 -2
- package/dist/techdocs-preview-bundle/static/main.6a0b1657.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/module-material-ui.79c12e1e.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/vendor.6a0b1657.js +0 -3
- package/dist/techdocs-preview-bundle/static/vendor.6a0b1657.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,9 +10,9 @@ const _PublisherConfig = class {
|
|
|
10
10
|
}
|
|
11
11
|
return new config.ConfigReader({
|
|
12
12
|
backend: {
|
|
13
|
-
baseUrl: "http://localhost:
|
|
13
|
+
baseUrl: "http://localhost:7007",
|
|
14
14
|
listen: {
|
|
15
|
-
port:
|
|
15
|
+
port: 7007
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
techdocs: {
|
|
@@ -94,4 +94,4 @@ PublisherConfig.configFactories = {
|
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
exports.PublisherConfig = PublisherConfig;
|
|
97
|
-
//# sourceMappingURL=PublisherConfig-
|
|
97
|
+
//# sourceMappingURL=PublisherConfig-4eefa446.cjs.js.map
|
package/dist/cjs/{PublisherConfig-e517144b.cjs.js.map → PublisherConfig-4eefa446.cjs.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublisherConfig-
|
|
1
|
+
{"version":3,"file":"PublisherConfig-4eefa446.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 { Command } 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(cmd: Command): ConfigReader {\n const publisherType = cmd.publisherType;\n\n if (!PublisherConfig.isKnownPublisher(publisherType)) {\n throw new Error(`Unknown publisher type ${cmd.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](cmd),\n legacyUseCaseSensitiveTripletPaths:\n cmd.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(cmd: Command): PublisherConfiguration {\n return {\n type: 'awsS3',\n awsS3: {\n bucketName: cmd.storageName,\n ...(cmd.awsBucketRootPath && { bucketRootPath: cmd.awsBucketRootPath }),\n ...(cmd.awsRoleArn && { credentials: { roleArn: cmd.awsRoleArn } }),\n ...(cmd.awsEndpoint && { endpoint: cmd.awsEndpoint }),\n ...(cmd.awsS3ForcePathStyle && { s3ForcePathStyle: true }),\n ...(cmd.awsS3sse && { sse: cmd.awsS3sse }),\n },\n };\n }\n\n /**\n * Retrieve valid Azure Blob Storage configuration based on the command.\n */\n private static getValidAzureConfig(cmd: Command): PublisherConfiguration {\n if (!cmd.azureAccountName) {\n throw new Error(\n `azureBlobStorage requires --azureAccountName to be specified`,\n );\n }\n\n return {\n type: 'azureBlobStorage',\n azureBlobStorage: {\n containerName: cmd.storageName,\n credentials: {\n accountName: cmd.azureAccountName,\n accountKey: cmd.azureAccountKey,\n },\n },\n };\n }\n\n /**\n * Retrieve valid GCS configuration based on the command.\n */\n private static getValidGoogleGcsConfig(cmd: Command): PublisherConfiguration {\n return {\n type: 'googleGcs',\n googleGcs: {\n bucketName: cmd.storageName,\n ...(cmd.gcsBucketRootPath && { bucketRootPath: cmd.gcsBucketRootPath }),\n },\n };\n }\n\n /**\n * Retrieves valid OpenStack Swift configuration based on the command.\n */\n private static getValidOpenStackSwiftConfig(\n cmd: Command,\n ): PublisherConfiguration {\n const missingParams = [\n 'osCredentialId',\n 'osSecret',\n 'osAuthUrl',\n 'osSwiftUrl',\n ].filter((param: string) => !cmd[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: cmd.storageName,\n credentials: {\n id: cmd.osCredentialId,\n secret: cmd.osSecret,\n },\n authUrl: cmd.osAuthUrl,\n swiftUrl: cmd.osSwiftUrl,\n },\n };\n }\n}\n"],"names":["ConfigReader"],"mappings":";;;;AA6BO,+BAAsB;AAAA,SAkBpB,eAAe,KAA4B;AAChD,UAAM,gBAAgB,IAAI;AAE1B,QAAI,CAAC,iBAAgB,iBAAiB,gBAAgB;AACpD,YAAM,IAAI,MAAM,0BAA0B,IAAI;AAAA;AAGhD,WAAO,IAAIA,oBAAa;AAAA,MAEtB,SAAS;AAAA,QACP,SAAS;AAAA,QACT,QAAQ;AAAA,UACN,MAAM;AAAA;AAAA;AAAA,MAGV,UAAU;AAAA,QACR,WAAW,iBAAgB,gBAAgB,eAAe;AAAA,QAC1D,oCACE,IAAI;AAAA;AAAA;AAAA;AAAA,SAQG,iBACb,MACyD;AACzD,WAAO,iBAAgB,gBAAgB,eAAe;AAAA;AAAA,SAMzC,oBAAoB,KAAsC;AACvE,WAAO;AAAA,MACL,MAAM;AAAA,MACN,OAAO;AAAA,QACL,YAAY,IAAI;AAAA,WACZ,IAAI,qBAAqB,CAAE,gBAAgB,IAAI;AAAA,WAC/C,IAAI,cAAc,CAAE,aAAa,CAAE,SAAS,IAAI;AAAA,WAChD,IAAI,eAAe,CAAE,UAAU,IAAI;AAAA,WACnC,IAAI,uBAAuB,CAAE,kBAAkB;AAAA,WAC/C,IAAI,YAAY,CAAE,KAAK,IAAI;AAAA;AAAA;AAAA;AAAA,SAQtB,oBAAoB,KAAsC;AACvE,QAAI,CAAC,IAAI,kBAAkB;AACzB,YAAM,IAAI,MACR;AAAA;AAIJ,WAAO;AAAA,MACL,MAAM;AAAA,MACN,kBAAkB;AAAA,QAChB,eAAe,IAAI;AAAA,QACnB,aAAa;AAAA,UACX,aAAa,IAAI;AAAA,UACjB,YAAY,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA,SAST,wBAAwB,KAAsC;AAC3E,WAAO;AAAA,MACL,MAAM;AAAA,MACN,WAAW;AAAA,QACT,YAAY,IAAI;AAAA,WACZ,IAAI,qBAAqB,CAAE,gBAAgB,IAAI;AAAA;AAAA;AAAA;AAAA,SAQ1C,6BACb,KACwB;AACxB,UAAM,gBAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,CAAC,UAAkB,CAAC,IAAI;AAEjC,QAAI,cAAc,QAAQ;AACxB,YAAM,IAAI,MACR,iEAAiE,cAAc,KAC7E;AAAA;AAKN,WAAO;AAAA,MACL,MAAM;AAAA,MACN,gBAAgB;AAAA,QACd,eAAe,IAAI;AAAA,QACnB,aAAa;AAAA,UACX,IAAI,IAAI;AAAA,UACR,QAAQ,IAAI;AAAA;AAAA,QAEd,SAAS,IAAI;AAAA,QACb,UAAU,IAAI;AAAA;AAAA;AAAA;AAAA;;AApIf,gBAIU,kBAAkB;AAAA,EAC/B,OAAO,iBAAgB;AAAA,EACvB,kBAAkB,iBAAgB;AAAA,EAClC,WAAW,iBAAgB;AAAA,EAC3B,gBAAgB,iBAAgB;AAAA;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var backendCommon = require('@backstage/backend-common');
|
|
4
4
|
var techdocsCommon = require('@backstage/techdocs-common');
|
|
5
5
|
var utility = require('./utility-597170e7.cjs.js');
|
|
6
|
-
var PublisherConfig = require('./PublisherConfig-
|
|
6
|
+
var PublisherConfig = require('./PublisherConfig-4eefa446.cjs.js');
|
|
7
7
|
require('winston');
|
|
8
8
|
require('@backstage/config');
|
|
9
9
|
|
|
@@ -31,4 +31,4 @@ async function migrate(cmd) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
exports.default = migrate;
|
|
34
|
-
//# sourceMappingURL=migrate-
|
|
34
|
+
//# sourceMappingURL=migrate-eedd77be.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrate-
|
|
1
|
+
{"version":3,"file":"migrate-eedd77be.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 { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/techdocs-common';\nimport { Command } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(cmd: Command) {\n const logger = createLogger({ verbose: cmd.verbose });\n\n const config = PublisherConfig.getValidConfig(cmd);\n const discovery = SingleHostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${cmd.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 = cmd.removeOriginal;\n const numericConcurrency = parseInt(cmd.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${cmd.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher"],"mappings":";;;;;;;;;uBAsBsC,KAAc;AAClD,QAAM,SAASA,qBAAa,CAAE,SAAS,IAAI;AAE3C,QAAM,SAASC,gCAAgB,eAAe;AAC9C,QAAM,YAAYC,kCAAoB,WAAW;AACjD,QAAM,YAAY,MAAMC,yBAAU,WAAW,QAAQ,CAAE,QAAQ;AAE/D,MAAI,CAAC,UAAU,iBAAiB;AAC9B,UAAM,IAAI,MAAM,iCAAiC,IAAI;AAAA;AAIvD,QAAM,CAAE,eAAgB,MAAM,UAAU;AACxC,MAAI,CAAC,aAAa;AAEhB,UAAM,IAAI,MAAM;AAAA;AAIlB,QAAM,iBAAiB,IAAI;AAC3B,QAAM,qBAAqB,SAAS,IAAI,aAAa;AAErD,MAAI,CAAC,OAAO,UAAU,uBAAuB,sBAAsB,GAAG;AACpE,UAAM,IAAI,MACR,gDAAgD,IAAI;AAAA;AAIxD,QAAM,UAAU,gBAAgB;AAAA,IAC9B,aAAa;AAAA,IACb;AAAA;AAAA;;;;"}
|
|
@@ -4,7 +4,7 @@ var path = require('path');
|
|
|
4
4
|
var utility = require('./utility-597170e7.cjs.js');
|
|
5
5
|
var backendCommon = require('@backstage/backend-common');
|
|
6
6
|
var techdocsCommon = require('@backstage/techdocs-common');
|
|
7
|
-
var PublisherConfig = require('./PublisherConfig-
|
|
7
|
+
var PublisherConfig = require('./PublisherConfig-4eefa446.cjs.js');
|
|
8
8
|
require('winston');
|
|
9
9
|
require('@backstage/config');
|
|
10
10
|
|
|
@@ -31,4 +31,4 @@ async function publish(cmd) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
exports.default = publish;
|
|
34
|
-
//# sourceMappingURL=publish-
|
|
34
|
+
//# sourceMappingURL=publish-b72ab7ac.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish-
|
|
1
|
+
{"version":3,"file":"publish-b72ab7ac.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 { Command } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { SingleHostDiscovery } from '@backstage/backend-common';\nimport { Publisher } from '@backstage/techdocs-common';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(cmd: Command): Promise<any> {\n const logger = createLogger({ verbose: cmd.verbose });\n\n const config = PublisherConfig.getValidConfig(cmd);\n const discovery = SingleHostDiscovery.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] = cmd.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(cmd.directory);\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","SingleHostDiscovery","Publisher","resolve"],"mappings":";;;;;;;;;;uBAwBsC,KAA4B;AAChE,QAAM,SAASA,qBAAa,CAAE,SAAS,IAAI;AAE3C,QAAM,SAASC,gCAAgB,eAAe;AAC9C,QAAM,YAAYC,kCAAoB,WAAW;AACjD,QAAM,YAAY,MAAMC,yBAAU,WAAW,QAAQ,CAAE,QAAQ;AAG/D,QAAM,CAAE,eAAgB,MAAM,UAAU;AACxC,MAAI,CAAC,aAAa;AAEhB,WAAO,QAAQ,OAAO,IAAI,MAAM;AAAA;AAGlC,QAAM,CAAC,WAAW,MAAM,QAAQ,IAAI,OAAO,MAAM;AACjD,QAAM,SAAS;AAAA,IACb;AAAA,IACA,UAAU;AAAA,MACR;AAAA,MACA;AAAA;AAAA;AAIJ,QAAM,YAAYC,aAAQ,IAAI;AAC9B,QAAM,UAAU,QAAQ,CAAE,QAAQ;AAElC,SAAO;AAAA;;;;"}
|
|
@@ -76,7 +76,7 @@ async function serve(cmd) {
|
|
|
76
76
|
const logger = utility.createLogger({verbose: cmd.verbose});
|
|
77
77
|
const isDevMode = Object.keys(process.env).includes("TECHDOCS_CLI_DEV_MODE") ? true : false;
|
|
78
78
|
const backstagePort = 3e3;
|
|
79
|
-
const backstageBackendPort =
|
|
79
|
+
const backstageBackendPort = 7007;
|
|
80
80
|
const mkdocsDockerAddr = `http://0.0.0.0:${cmd.mkdocsPort}`;
|
|
81
81
|
const mkdocsLocalAddr = `http://127.0.0.1:${cmd.mkdocsPort}`;
|
|
82
82
|
const mkdocsExpectedDevAddr = cmd.docker ? mkdocsDockerAddr : mkdocsLocalAddr;
|
|
@@ -128,4 +128,4 @@ Opening browser.`);
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
exports.default = serve;
|
|
131
|
-
//# sourceMappingURL=serve-
|
|
131
|
+
//# sourceMappingURL=serve-7ca882f7.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve-6f7d37dd.cjs.js","sources":["../../src/lib/httpServer.ts","../../src/commands/serve/serve.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 serveHandler from 'serve-handler';\nimport http from 'http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsPort: number;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsPort: number,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsPort = mkdocsPort;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: `http://localhost:${this.mkdocsPort}`,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request goes to /api/ we want to remove /api/ from the prefix of the request URL.\n // e.g. ['/', 'api', pathChunks]\n const [, , ...pathChunks] = request.url?.split('/') ?? [];\n const forwardPath = pathChunks.join('/');\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n if (request.url?.startsWith(this.proxyEndpoint)) {\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n return proxy.web(request, response);\n }\n\n return serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\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 { Command } from 'commander';\nimport path from 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\nimport { createLogger } from '../../lib/utility';\n\nexport default async function serve(cmd: Command) {\n const logger = createLogger({ verbose: cmd.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n // TODO: Backstage app port should also be configurable as a CLI option. However, since we bundle\n // a backstage app, we define app.baseUrl in the app-config.yaml.\n // Hence, it is complicated to make this configurable.\n const backstagePort = 3000;\n const backstageBackendPort = 7000;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${cmd.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${cmd.mkdocsPort}`;\n const mkdocsExpectedDevAddr = cmd.docker ? mkdocsDockerAddr : mkdocsLocalAddr;\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = cmd.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = await runMkdocsServer({\n port: cmd.mkdocsPort,\n dockerImage: cmd.dockerImage,\n useDocker: cmd.docker,\n stdoutLogFunc: mkdocsLogFunc,\n stderrLogFunc: mkdocsLogFunc,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n // Run the embedded-techdocs Backstage app\n const techdocsPreviewBundlePath = path.join(\n path.dirname(require.resolve('@techdocs/cli/package.json')),\n 'dist',\n 'techdocs-preview-bundle',\n );\n\n const port = isDevMode ? backstageBackendPort : backstagePort;\n const httpServer = new HTTPServer(\n techdocsPreviewBundlePath,\n port,\n cmd.mkdocsPort,\n cmd.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error(err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await waitForSignal([mkdocsChildProcess]);\n}\n"],"names":["httpProxy","http","serveHandler","createLogger","runMkdocsServer","path","waitForSignal"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"serve-7ca882f7.cjs.js","sources":["../../src/lib/httpServer.ts","../../src/commands/serve/serve.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 serveHandler from 'serve-handler';\nimport http from 'http';\nimport httpProxy from 'http-proxy';\nimport { createLogger } from './utility';\n\nexport default class HTTPServer {\n private readonly proxyEndpoint: string;\n private readonly backstageBundleDir: string;\n private readonly backstagePort: number;\n private readonly mkdocsPort: number;\n private readonly verbose: boolean;\n\n constructor(\n backstageBundleDir: string,\n backstagePort: number,\n mkdocsPort: number,\n verbose: boolean,\n ) {\n this.proxyEndpoint = '/api/';\n this.backstageBundleDir = backstageBundleDir;\n this.backstagePort = backstagePort;\n this.mkdocsPort = mkdocsPort;\n this.verbose = verbose;\n }\n\n // Create a Proxy for mkdocs server\n private createProxy() {\n const proxy = httpProxy.createProxyServer({\n target: `http://localhost:${this.mkdocsPort}`,\n });\n\n return (request: http.IncomingMessage): [httpProxy, string] => {\n // If the request goes to /api/ we want to remove /api/ from the prefix of the request URL.\n // e.g. ['/', 'api', pathChunks]\n const [, , ...pathChunks] = request.url?.split('/') ?? [];\n const forwardPath = pathChunks.join('/');\n\n return [proxy, forwardPath];\n };\n }\n\n public async serve(): Promise<http.Server> {\n return new Promise<http.Server>((resolve, reject) => {\n const proxyHandler = this.createProxy();\n const server = http.createServer(\n (request: http.IncomingMessage, response: http.ServerResponse) => {\n if (request.url?.startsWith(this.proxyEndpoint)) {\n const [proxy, forwardPath] = proxyHandler(request);\n\n proxy.on('error', (error: Error) => {\n reject(error);\n });\n\n response.setHeader('Access-Control-Allow-Origin', '*');\n response.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');\n\n request.url = forwardPath;\n return proxy.web(request, response);\n }\n\n return serveHandler(request, response, {\n public: this.backstageBundleDir,\n trailingSlash: true,\n rewrites: [{ source: '**', destination: 'index.html' }],\n });\n },\n );\n\n const logger = createLogger({ verbose: false });\n server.listen(this.backstagePort, () => {\n if (this.verbose) {\n logger.info(\n `[techdocs-preview-bundle] Running local version of Backstage at http://localhost:${this.backstagePort}`,\n );\n }\n resolve(server);\n });\n\n server.on('error', (error: Error) => {\n reject(error);\n });\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 { Command } from 'commander';\nimport path from 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { LogFunc, waitForSignal } from '../../lib/run';\nimport { createLogger } from '../../lib/utility';\n\nexport default async function serve(cmd: Command) {\n const logger = createLogger({ verbose: cmd.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n // TODO: Backstage app port should also be configurable as a CLI option. However, since we bundle\n // a backstage app, we define app.baseUrl in the app-config.yaml.\n // Hence, it is complicated to make this configurable.\n const backstagePort = 3000;\n const backstageBackendPort = 7007;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${cmd.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${cmd.mkdocsPort}`;\n const mkdocsExpectedDevAddr = cmd.docker ? mkdocsDockerAddr : mkdocsLocalAddr;\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: LogFunc = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = cmd.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = await runMkdocsServer({\n port: cmd.mkdocsPort,\n dockerImage: cmd.dockerImage,\n useDocker: cmd.docker,\n stdoutLogFunc: mkdocsLogFunc,\n stderrLogFunc: mkdocsLogFunc,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n // Run the embedded-techdocs Backstage app\n const techdocsPreviewBundlePath = path.join(\n path.dirname(require.resolve('@techdocs/cli/package.json')),\n 'dist',\n 'techdocs-preview-bundle',\n );\n\n const port = isDevMode ? backstageBackendPort : backstagePort;\n const httpServer = new HTTPServer(\n techdocsPreviewBundlePath,\n port,\n cmd.mkdocsPort,\n cmd.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error(err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await waitForSignal([mkdocsChildProcess]);\n}\n"],"names":["httpProxy","http","serveHandler","createLogger","runMkdocsServer","path","waitForSignal"],"mappings":"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"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -10,10 +10,10 @@ var program__default = /*#__PURE__*/_interopDefaultLegacy(program);
|
|
|
10
10
|
const defaultDockerImage = techdocsCommon.TechdocsGenerator.defaultDockerImage;
|
|
11
11
|
function registerCommands(program) {
|
|
12
12
|
program.command("generate").description("Generate TechDocs documentation site using MkDocs.").option("--source-dir <PATH>", "Source directory containing mkdocs.yml and docs/ directory.", ".").option("--output-dir <PATH>", "Output directory containing generated TechDocs site.", "./site/").option("--docker-image <DOCKER_IMAGE>", "The mkdocs docker container to use", defaultDockerImage).option("--no-pull", "Do not pull the latest docker image", false).option("--no-docker", "Do not use Docker, use MkDocs executable and plugins in current user environment.").option("--techdocs-ref <HOST_TYPE:URL>", "The repository hosting documentation source files e.g. github:https://ghe.mycompany.net.com/org/repo.\nThis value is same as the backstage.io/techdocs-ref annotation of the corresponding Backstage entity.\nIt is completely fine to skip this as it is only being used to set repo_url in mkdocs.yml if not found.\n").option("--etag <ETAG>", "A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json.").option("-v --verbose", "Enable verbose output.", false).alias("build").action(lazy(() => Promise.resolve().then(function () { return require('./cjs/generate-391c018a.cjs.js'); }).then((m) => m.default)));
|
|
13
|
-
program.command("migrate").description("Migrate objects with case-sensitive entity triplets to lower-case versions.").requiredOption("--publisher-type <TYPE>", "(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml").requiredOption("--storage-name <BUCKET/CONTAINER NAME>", "(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName").option("--azureAccountName <AZURE ACCOUNT NAME>", "(Required for Azure) specify when --publisher-type azureBlobStorage").option("--azureAccountKey <AZURE ACCOUNT KEY>", "Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.").option("--awsRoleArn <AWS ROLE ARN>", "Optional AWS ARN of role to be assumed.").option("--awsEndpoint <AWS ENDPOINT>", "Optional AWS endpoint to send requests to.").option("--awsS3ForcePathStyle", "Optional AWS S3 option to force path style.").option("--awsBucketRootPath", "Optional sub-directory to store files in Amazon S3").option("--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osAuthUrl <OPENSTACK SWIFT AUTHURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--removeOriginal", "Optional Files are copied by default. If flag is set, files are renamed/moved instead.", false).option("--concurrency <MAX CONCURRENT REQS>", "Optional Controls the number of API requests allowed to be performed simultaneously.", "25").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => Promise.resolve().then(function () { return require('./cjs/migrate-
|
|
14
|
-
program.command("publish").description("Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc.").requiredOption("--publisher-type <TYPE>", "(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml").requiredOption("--storage-name <BUCKET/CONTAINER NAME>", "(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName").requiredOption("--entity <NAMESPACE/KIND/NAME>", "(Required always) Entity uid separated by / in namespace/kind/name order (case-sensitive). Example: default/Component/myEntity ").option("--legacyUseCaseSensitiveTripletPaths", "Publishes objects with cased entity triplet prefix when set (e.g. namespace/Kind/name). Only use if your TechDocs backend is configured the same way.", false).option("--azureAccountName <AZURE ACCOUNT NAME>", "(Required for Azure) specify when --publisher-type azureBlobStorage").option("--azureAccountKey <AZURE ACCOUNT KEY>", "Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.").option("--awsRoleArn <AWS ROLE ARN>", "Optional AWS ARN of role to be assumed.").option("--awsEndpoint <AWS ENDPOINT>", "Optional AWS endpoint to send requests to.").option("--awsS3sse <AWS SSE>", "Optional AWS S3 Server Side Encryption.").option("--awsS3ForcePathStyle", "Optional AWS S3 option to force path style.").option("--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osAuthUrl <OPENSTACK SWIFT AUTHURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--gcsBucketRootPath", "Optional sub-directory to store files in Google cloud storage").option("--directory <PATH>", "Path of the directory containing generated files to publish", "./site/").action(lazy(() => Promise.resolve().then(function () { return require('./cjs/publish-
|
|
13
|
+
program.command("migrate").description("Migrate objects with case-sensitive entity triplets to lower-case versions.").requiredOption("--publisher-type <TYPE>", "(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml").requiredOption("--storage-name <BUCKET/CONTAINER NAME>", "(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName").option("--azureAccountName <AZURE ACCOUNT NAME>", "(Required for Azure) specify when --publisher-type azureBlobStorage").option("--azureAccountKey <AZURE ACCOUNT KEY>", "Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.").option("--awsRoleArn <AWS ROLE ARN>", "Optional AWS ARN of role to be assumed.").option("--awsEndpoint <AWS ENDPOINT>", "Optional AWS endpoint to send requests to.").option("--awsS3ForcePathStyle", "Optional AWS S3 option to force path style.").option("--awsBucketRootPath", "Optional sub-directory to store files in Amazon S3").option("--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osAuthUrl <OPENSTACK SWIFT AUTHURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--removeOriginal", "Optional Files are copied by default. If flag is set, files are renamed/moved instead.", false).option("--concurrency <MAX CONCURRENT REQS>", "Optional Controls the number of API requests allowed to be performed simultaneously.", "25").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => Promise.resolve().then(function () { return require('./cjs/migrate-eedd77be.cjs.js'); }).then((m) => m.default)));
|
|
14
|
+
program.command("publish").description("Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc.").requiredOption("--publisher-type <TYPE>", "(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml").requiredOption("--storage-name <BUCKET/CONTAINER NAME>", "(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName").requiredOption("--entity <NAMESPACE/KIND/NAME>", "(Required always) Entity uid separated by / in namespace/kind/name order (case-sensitive). Example: default/Component/myEntity ").option("--legacyUseCaseSensitiveTripletPaths", "Publishes objects with cased entity triplet prefix when set (e.g. namespace/Kind/name). Only use if your TechDocs backend is configured the same way.", false).option("--azureAccountName <AZURE ACCOUNT NAME>", "(Required for Azure) specify when --publisher-type azureBlobStorage").option("--azureAccountKey <AZURE ACCOUNT KEY>", "Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.").option("--awsRoleArn <AWS ROLE ARN>", "Optional AWS ARN of role to be assumed.").option("--awsEndpoint <AWS ENDPOINT>", "Optional AWS endpoint to send requests to.").option("--awsS3sse <AWS SSE>", "Optional AWS S3 Server Side Encryption.").option("--awsS3ForcePathStyle", "Optional AWS S3 option to force path style.").option("--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osAuthUrl <OPENSTACK SWIFT AUTHURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>", "(Required for OpenStack) specify when --publisher-type openStackSwift").option("--gcsBucketRootPath", "Optional sub-directory to store files in Google cloud storage").option("--directory <PATH>", "Path of the directory containing generated files to publish", "./site/").action(lazy(() => Promise.resolve().then(function () { return require('./cjs/publish-b72ab7ac.cjs.js'); }).then((m) => m.default)));
|
|
15
15
|
program.command("serve:mkdocs").description("Serve a documentation project locally using MkDocs serve.").option("-i, --docker-image <DOCKER_IMAGE>", "The mkdocs docker container to use", defaultDockerImage).option("--no-docker", "Do not use Docker, run `mkdocs serve` in current user environment.").option("-p, --port <PORT>", "Port to serve documentation locally", "8000").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => Promise.resolve().then(function () { return require('./cjs/mkdocs-3446534f.cjs.js'); }).then((m) => m.default)));
|
|
16
|
-
program.command("serve").description("Serve a documentation project locally in a Backstage app-like environment").option("-i, --docker-image <DOCKER_IMAGE>", "The mkdocs docker container to use", defaultDockerImage).option("--no-docker", "Do not use Docker, use MkDocs executable in current user environment.").option("--mkdocs-port <PORT>", "Port for MkDocs server to use", "8000").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => Promise.resolve().then(function () { return require('./cjs/serve-
|
|
16
|
+
program.command("serve").description("Serve a documentation project locally in a Backstage app-like environment").option("-i, --docker-image <DOCKER_IMAGE>", "The mkdocs docker container to use", defaultDockerImage).option("--no-docker", "Do not use Docker, use MkDocs executable in current user environment.").option("--mkdocs-port <PORT>", "Port for MkDocs server to use", "8000").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => Promise.resolve().then(function () { return require('./cjs/serve-7ca882f7.cjs.js'); }).then((m) => m.default)));
|
|
17
17
|
}
|
|
18
18
|
function lazy(getActionFunc) {
|
|
19
19
|
return async (...args) => {
|
|
@@ -28,7 +28,7 @@ function lazy(getActionFunc) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var version = "0.8.
|
|
31
|
+
var version = "0.8.7";
|
|
32
32
|
|
|
33
33
|
const main = (argv) => {
|
|
34
34
|
program__default['default'].name("techdocs-cli").version(version);
|
|
@@ -515,6 +515,32 @@
|
|
|
515
515
|
"backend": {
|
|
516
516
|
"type": "object",
|
|
517
517
|
"properties": {
|
|
518
|
+
"auth": {
|
|
519
|
+
"description": "Backend configuration for when request authentication is enabled",
|
|
520
|
+
"type": "object",
|
|
521
|
+
"properties": {
|
|
522
|
+
"keys": {
|
|
523
|
+
"description": "Keys shared by all backends for signing and validating backend tokens.",
|
|
524
|
+
"type": "array",
|
|
525
|
+
"items": {
|
|
526
|
+
"type": "object",
|
|
527
|
+
"properties": {
|
|
528
|
+
"secret": {
|
|
529
|
+
"description": "Secret for generating tokens. Should be a base64 string, recommended\nlength is 24 bytes.",
|
|
530
|
+
"visibility": "secret",
|
|
531
|
+
"type": "string"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"required": [
|
|
535
|
+
"secret"
|
|
536
|
+
]
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
"required": [
|
|
541
|
+
"keys"
|
|
542
|
+
]
|
|
543
|
+
},
|
|
518
544
|
"baseUrl": {
|
|
519
545
|
"type": "string"
|
|
520
546
|
},
|
|
@@ -1,3 +1,3 @@
|
|
|
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 platform for building developer portals"/><link rel="apple-touch-icon" href="/logo192.png"/><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"/><style>#root {
|
|
2
2
|
min-height: 100%;
|
|
3
|
-
}</style><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.
|
|
3
|
+
}</style><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.73551f6b.js"></script><script defer="defer" src="/static/module-material-ui.af63fffa.js"></script><script defer="defer" src="/static/module-lodash.2161df9d.js"></script><script defer="defer" src="/static/module-date-fns.c7ff5eb2.js"></script><script defer="defer" src="/static/module-ajv.1375df52.js"></script><script defer="defer" src="/static/module-material-table.3a6dac89.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.2394f1f9.js"></script><script defer="defer" src="/static/module-hot-loader.550aeb54.js"></script><script defer="defer" src="/static/vendor.73551f6b.js"></script><script defer="defer" src="/static/main.73551f6b.js"></script></head><body style="margin: 0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
package/dist/techdocs-preview-bundle/static/{1553.74c14b71.chunk.js → 1553.b196c066.chunk.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[1553],{11553:function(e,t,n){n.r(t),n.d(t,{HasResourcesCard:function(){return o}});var r=n(52890),a=n(2784),c=n(62426);const o=({variant:e="gridItem"})=>a.createElement(c.fT,{variant:e,title:"Has resources",entityKind:"Resource",relationType:r.aS,columns:c.xp,asRenderableEntities:c.$c,emptyMessage:"No resource is part of this system",emptyHelpLink:c.Uc})},62426:function(e,t,n){n.d(t,{fT:function(){return i},D:function(){return u},$c:function(){return y},el:function(){return E},we:function(){return s},AE:function(){return l},xp:function(){return m},Uc:function(){return d},_v:function(){return f},G5:function(){return p}});var r=n(90436),a=n(5578),c=n(2784),o=n(
|
|
2
|
-
//# sourceMappingURL=1553.
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[1553],{11553:function(e,t,n){n.r(t),n.d(t,{HasResourcesCard:function(){return o}});var r=n(52890),a=n(2784),c=n(62426);const o=({variant:e="gridItem"})=>a.createElement(c.fT,{variant:e,title:"Has resources",entityKind:"Resource",relationType:r.aS,columns:c.xp,asRenderableEntities:c.$c,emptyMessage:"No resource is part of this system",emptyHelpLink:c.Uc})},62426:function(e,t,n){n.d(t,{fT:function(){return i},D:function(){return u},$c:function(){return y},el:function(){return E},we:function(){return s},AE:function(){return l},xp:function(){return m},Uc:function(){return d},_v:function(){return f},G5:function(){return p}});var r=n(90436),a=n(5578),c=n(2784),o=n(91375);function i({variant:e="gridItem",title:t,columns:n,entityKind:i,relationType:s,emptyMessage:l,emptyHelpLink:u,asRenderableEntities:m}){const{entity:d}=(0,a.useEntity)(),{entities:y,loading:f,error:p}=(0,a.useRelatedEntities)(d,{type:s,kind:i});return f?c.createElement(o.InfoCard,{variant:e,title:t},c.createElement(o.Progress,null)):p?c.createElement(o.InfoCard,{variant:e,title:t},c.createElement(o.ResponseErrorPanel,{error:p})):c.createElement(a.EntityTable,{title:t,variant:e,emptyContent:c.createElement("div",{style:{textAlign:"center"}},c.createElement(r.Z,{variant:"body1"},l),c.createElement(r.Z,{variant:"body2"},c.createElement(o.Link,{to:u},"Learn how to change this."))),columns:n,entities:m(y||[])})}const s=[a.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),a.EntityTable.columns.createOwnerColumn(),a.EntityTable.columns.createSpecTypeColumn(),a.EntityTable.columns.createSpecLifecycleColumn(),a.EntityTable.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",u=e=>e,m=[a.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),a.EntityTable.columns.createOwnerColumn(),a.EntityTable.columns.createSpecTypeColumn(),a.EntityTable.columns.createSpecLifecycleColumn(),a.EntityTable.columns.createMetadataDescriptionColumn()],d="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",y=e=>e,f=[a.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),a.EntityTable.columns.createOwnerColumn(),a.EntityTable.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",E=e=>e}}]);
|
|
2
|
+
//# sourceMappingURL=1553.b196c066.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/1553.
|
|
1
|
+
{"version":3,"file":"static/1553.b196c066.chunk.js","mappings":"+NA6BO,MAAMA,EAAmB,EAAGC,QAAAA,EAAU,cAEzC,gBAAoBC,EAAA,GAAqB,CACvCD,QAASA,EACTE,MAAO,gBACPC,WAAY,WACZC,aAAc,KACdC,QAAS,KACTC,qBAAsB,KACtBC,aAAc,qCACdC,cAAe,Q,4TCId,SAASP,GAAoB,QAClCD,EAAU,WAAU,MACpBE,EAAK,QACLG,EAAO,WACPF,EAAU,aACVC,EAAY,aACZG,EAAY,cACZC,EAAa,qBACbF,IAEA,MAAM,OAAEG,IAAW,IAAAC,cACb,SAAEC,EAAQ,QAAEC,EAAO,MAAEC,IAAU,IAAAC,oBAAmBL,EAAQ,CAC9DM,KAAMX,EACNY,KAAMb,IAGR,OAAIS,EAEA,gBAAoB,EAAAK,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAgB,SAAU,OAKlCL,EAEA,gBAAoB,EAAAI,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAiB,mBAAoB,CAAEN,MAAOA,KAMvD,gBAAoB,EAAAO,YAAa,CAC/BlB,MAAOA,EACPF,QAASA,EACTqB,aACE,gBAAoB,MAAO,CAAEC,MAAO,CAAEC,UAAW,WAC7C,gBAAoBC,EAAA,EAAY,CAAExB,QAAS,SAAWO,GACtD,gBAAoBiB,EAAA,EAAY,CAAExB,QAAS,SACzC,gBAAoB,EAAAyB,KAAM,CAAEC,GAAIlB,GAAiB,+BAIzDH,QAASA,EACTM,SAAUL,EAAqBK,GAAY,MChE1C,MAAMgB,EAAyB,CACpC,EAAAP,YAAA,8BAA0C,CAAEQ,YAAa,cACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWS,EACX,uFACWC,EAAuBnB,GAClCA,EAEWoB,EAAwB,CACnC,EAAAX,YAAA,8BAA0C,CAAEQ,YAAa,aACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWY,EACX,sFACWC,EAAsBtB,GACjCA,EAEWuB,EAAsB,CACjC,EAAAd,YAAA,8BAA0C,CAAEQ,YAAa,WACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,2CAEWe,EACX,oFACWC,EAAoBzB,GAC/BA","sources":["webpack://embedded-techdocs-app/../../plugins/catalog/src/components/HasResourcesCard/HasResourcesCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asResourceEntities,\n RelatedEntitiesCard,\n resourceEntityColumns,\n resourceEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n\n\n\n\nexport const HasResourcesCard = ({ variant = 'gridItem' }) => {\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has resources\" ,\n entityKind: \"Resource\",\n relationType: RELATION_HAS_PART,\n columns: resourceEntityColumns,\n asRenderableEntities: asResourceEntities,\n emptyMessage: \"No resource is part of this system\" ,\n emptyHelpLink: resourceEntityHelpLink,}\n )\n );\n};\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n\n\n\n\n\n\n\n\n\n\n\nexport function RelatedEntitiesCard({\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\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 React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"names":["HasResourcesCard","variant","RelatedEntitiesCard","title","entityKind","relationType","columns","asRenderableEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"sourceRoot":""}
|
package/dist/techdocs-preview-bundle/static/{1959.cee4ff3e.chunk.js → 1959.36e7858c.chunk.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[1959],{52160:function(e,t,n){var a=n(14859),l=n(93291);t.Z=void 0;var r=l(n(2784)),c=(0,a(n(50175)).default)(r.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");t.Z=c},81959:function(e,t,n){n.r(t),n.d(t,{EntityLinksCard:function(){return Z}});var a=n(5578),l=n(52160),r=n(2784),c=n(79692),o=n(90436),s=n(77277),i=n(
|
|
2
|
-
//# sourceMappingURL=1959.
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[1959],{52160:function(e,t,n){var a=n(14859),l=n(93291);t.Z=void 0;var r=l(n(2784)),c=(0,a(n(50175)).default)(r.createElement("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"Language");t.Z=c},81959:function(e,t,n){n.r(t),n.d(t,{EntityLinksCard:function(){return Z}});var a=n(5578),l=n(52160),r=n(2784),c=n(79692),o=n(90436),s=n(77277),i=n(91375);const m=(0,c.Z)((e=>({code:{borderRadius:6,margin:`${e.spacing(2)}px 0px`,background:"dark"===e.palette.type?"#444":"#fff"}})),{name:"PluginCatalogEntityLinksEmptyState"}),d=()=>{const e=m();return r.createElement(r.Fragment,null,r.createElement(o.Z,{variant:"body1"},"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:"),r.createElement("div",{className:e.code},r.createElement(i.CodeSnippet,{text:"metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard",language:"yaml",showLineNumbers:!0,highlightedNumbers:[3,4,5,6],customStyle:{background:"inherit",fontSize:"115%"}})),r.createElement(s.Z,{variant:"contained",color:"primary",target:"_blank",href:"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional"},"Read more"))};var u=n(90348),p=n(11861),h=n(95544);const g=(0,c.Z)({svgIcon:{display:"inline-block","& svg":{display:"inline-block",fontSize:"inherit",verticalAlign:"baseline"}}}),f=({href:e,text:t,Icon:n})=>{const a=g();return r.createElement(h.Z,{display:"flex"},r.createElement(h.Z,{mr:1,className:a.svgIcon},r.createElement(o.Z,{component:"div"},n?r.createElement(n,null):r.createElement(l.Z,null))),r.createElement(h.Z,{flexGrow:"1"},r.createElement(i.Link,{to:e,target:"_blank",rel:"noopener"},t||e)))};var k=n(41156);const b={xs:1,sm:1,md:1,lg:2,xl:3},E=({items:e,cols:t})=>{const n=function(e){const t=[(0,k.Z)((e=>e.breakpoints.up("xl")))?"xl":null,(0,k.Z)((e=>e.breakpoints.up("lg")))?"lg":null,(0,k.Z)((e=>e.breakpoints.up("md")))?"md":null,(0,k.Z)((e=>e.breakpoints.up("sm")))?"sm":null,(0,k.Z)((e=>e.breakpoints.up("xs")))?"xs":null];let n=1;if("number"==typeof e)n=e;else{const a=t.find((e=>null!==e))??"xs";n=e?.[a]??b[a]}return n}(t);return r.createElement(u.Z,{rowHeight:"auto",cols:n},e.map((({text:e,href:t,Icon:n},a)=>r.createElement(p.Z,{key:a},r.createElement(f,{href:t,text:e??t,Icon:n})))))};var y=n(36964);const Z=({cols:e,variant:t})=>{const{entity:n}=(0,a.useEntity)(),c=(0,y.useApp)(),o=n?.metadata?.links;return r.createElement(i.InfoCard,{title:"Links",variant:t},o&&0!==o.length?r.createElement(E,{cols:e,items:o.map((({url:e,title:t,icon:n})=>{return{text:t??e,href:e,Icon:(a=n,a?c.getSystemIcon(a)??l.Z:l.Z)};var a}))}):r.createElement(d,null))}}}]);
|
|
2
|
+
//# sourceMappingURL=1959.36e7858c.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/1959.cee4ff3e.chunk.js","mappings":"yIAEIA,EAAyB,EAAQ,OAEjCC,EAA0B,EAAQ,OAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,OAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,8yBACD,YAEJL,EAAQ,EAAUE,G,0JCElB,MAUMI,GAAY,EAAAC,EAAA,IAChBC,IAAS,CACPC,KAAM,CACJC,aAAc,EACdC,OAAQ,GAAGH,EAAMI,QAAQ,WACzBC,WAAmC,SAAvBL,EAAMM,QAAQC,KAAkB,OAAS,WAGzD,CAAEC,KAAM,uCAGGC,EAAwB,KACnC,MAAMC,EAAUZ,IAEhB,OACE,gBAAoB,WAAgB,KAChC,gBAAoBa,EAAA,EAAY,CAAEC,QAAS,SAAW,sHAItD,gBAAoB,MAAO,CAAEC,UAAWH,EAAQT,MAC9C,gBAAoB,EAAAa,YAAa,CACjCC,KAhCU,mIAiCVC,SAAU,OACVC,iBAAiB,EACjBC,mBAAoB,CAAC,EAAG,EAAG,EAAG,GAC9BC,YAAa,CAAEd,WAAY,UAAWe,SAAU,WAGlD,gBAAoBC,EAAA,EAAQ,CAC5BT,QAAS,YACTU,MAAO,UACPC,OAAQ,SACRC,KAAM,wFACN,e,qCC1CR,MAAM,GAAY,EAAAzB,EAAA,GAAW,CAC3B0B,QAAS,CACPC,QAAS,eACT,QAAS,CACPA,QAAS,eACTN,SAAU,UACVO,cAAe,eAKRC,EAAW,EACtBJ,KAAAA,EACAT,KAAAA,EACAc,KAAAA,MAMA,MAAMnB,EAAU,IAEhB,OACE,gBAAoBoB,EAAA,EAAK,CAAEJ,QAAS,QAChC,gBAAoBI,EAAA,EAAK,CAAEC,GAAI,EAAGlB,UAAWH,EAAQe,SACnD,gBAAoBd,EAAA,EAAY,CAAEqB,UAAW,OAC3CH,EAAO,gBAAoBA,EAAM,MAAS,gBAAoBI,EAAA,EAAc,QAGhF,gBAAoBH,EAAA,EAAK,CAAEI,SAAU,KACnC,gBAAoB,EAAAC,KAAM,CAAEC,GAAIZ,EAAMD,OAAQ,SAAUc,IAAK,YAC3DtB,GAAQS,M,eCnCpB,MAAMc,EAAc,CAClBC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,GCUOC,EAAgB,EAAGC,MAAAA,EAAOC,KAAAA,MACrC,MAAMC,EDRD,SACLD,GAEA,MAAME,EAAU,EACd,EAAAC,EAAA,IAAejD,GAAUA,EAAMkD,YAAYC,GAAG,QAAS,KAAO,MAC9D,EAAAF,EAAA,IAAejD,GAAUA,EAAMkD,YAAYC,GAAG,QAAS,KAAO,MAC9D,EAAAF,EAAA,IAAejD,GAAUA,EAAMkD,YAAYC,GAAG,QAAS,KAAO,MAC9D,EAAAF,EAAA,IAAejD,GAAUA,EAAMkD,YAAYC,GAAG,QAAS,KAAO,MAC9D,EAAAF,EAAA,IAAejD,GAAUA,EAAMkD,YAAYC,GAAG,QAAS,KAAO,MAGhE,IAAIJ,EAAY,EAEhB,GAAoB,iBAATD,EACTC,EAAYD,MACP,CACL,MAAMM,EAAaJ,EAAQK,MAAKC,GAAW,OAANA,KAAe,KACpDP,EAAYD,IAAOM,IAAed,EAAYc,GAGhD,OAAOL,ECZWQ,CAAkBT,GAEpC,OACE,gBAAoBU,EAAA,EAAW,CAAEC,UAAW,OAAQX,KAAMC,GACtDF,EAAMa,KAAI,EAAG3C,KAAAA,EAAMS,KAAAA,EAAMK,KAAAA,GAAQ8B,IACjC,gBAAoBC,EAAA,EAAe,CAAEC,IAAKF,GACtC,gBAAoB/B,EAAU,CAAEJ,KAAMA,EAAMT,KAAMA,GAAQS,EAAMK,KAAMA,S,eCP3E,MAAMiC,EAAkB,EAAGhB,KAAAA,EAAkBlC,QAAAA,MAClD,MAAM,OAAEmD,IAAW,IAAAC,aACbC,GAAM,IAAAC,UAKNC,EAAQJ,GAAQK,UAAUD,MAEhC,OACE,gBAAoB,EAAAE,SAAU,CAAEC,MAAO,QAAS1D,QAASA,GACpDuD,GAA0B,IAAjBA,EAAMI,OAGhB,gBAAoB3B,EAAe,CACjCE,KAAMA,EACND,MAAOsB,EAAMT,KAAI,EAAGc,IAAAA,EAAKF,MAAAA,EAAOG,KAAAA,MAAW,OACzC1D,KAAMuD,GAASE,EACfhD,KAAMgD,EACN3C,MAfYgC,EAeOY,EAd3BZ,EAAMI,EAAIS,cAAcb,IAAQ5B,EAAA,EAAeA,EAAA,IAD5B,IAAC4B,OAQhB,gBAAoBpD,EAAuB","sources":["webpack://embedded-techdocs-app/../../node_modules/@material-ui/icons/Language.js","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"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: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\n\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport const EntityLinksEmptyState = () => {\n const classes = useStyles();\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(Typography, { variant: \"body1\",}, \"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:\"\n\n\n )\n , React.createElement('div', { className: classes.code,}\n , React.createElement(CodeSnippet, {\n text: ENTITY_YAML,\n language: \"yaml\",\n showLineNumbers: true,\n highlightedNumbers: [3, 4, 5, 6],\n customStyle: { background: 'inherit', fontSize: '115%' },}\n )\n )\n , React.createElement(Button, {\n variant: \"contained\",\n color: \"primary\",\n target: \"_blank\",\n href: \"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\",}\n , \"Read more\"\n\n )\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 { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\n\nimport { Link } from '@backstage/core-components';\n\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport const IconLink = ({\n href,\n text,\n Icon,\n}\n\n\n\n) => {\n const classes = useStyles();\n\n return (\n React.createElement(Box, { display: \"flex\",}\n , React.createElement(Box, { mr: 1, className: classes.svgIcon,}\n , React.createElement(Typography, { component: \"div\",}\n , Icon ? React.createElement(Icon, null ) : React.createElement(LanguageIcon, null )\n )\n )\n , React.createElement(Box, { flexGrow: \"1\",}\n , React.createElement(Link, { to: href, target: \"_blank\", rel: \"noopener\",}\n , text || href\n )\n )\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 { useMediaQuery } from '@material-ui/core';\n\n\nconst colDefaults = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols,\n) {\n const matches = [\n useMediaQuery((theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\n\nimport { useDynamicColumns } from './useDynamicColumns';\n\n\n\n\n\n\n\n\n\n\n\n\n\nexport const LinksGridList = ({ items, cols = undefined }) => {\n const numOfCols = useDynamicColumns(cols);\n\n return (\n React.createElement(ImageList, { rowHeight: \"auto\", cols: numOfCols,}\n , items.map(({ text, href, Icon }, i) => (\n React.createElement(ImageListItem, { key: i,}\n , React.createElement(IconLink, { href: href, text: text ?? href, Icon: Icon,} )\n )\n ))\n )\n );\n};\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\n\n\nimport { useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n\n\n\n\n\n\n\nexport const EntityLinksCard = ({ cols = undefined, variant }) => {\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key) =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n React.createElement(InfoCard, { title: \"Links\", variant: variant,}\n , !links || links.length === 0 ? (\n React.createElement(EntityLinksEmptyState, null )\n ) : (\n React.createElement(LinksGridList, {\n cols: cols,\n items: links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n })),}\n )\n )\n )\n );\n};\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_default","default","createElement","d","useStyles","makeStyles","theme","code","borderRadius","margin","spacing","background","palette","type","name","EntityLinksEmptyState","classes","Typography","variant","className","CodeSnippet","text","language","showLineNumbers","highlightedNumbers","customStyle","fontSize","Button","color","target","href","svgIcon","display","verticalAlign","IconLink","Icon","Box","mr","component","Language","flexGrow","Link","to","rel","colDefaults","xs","sm","md","lg","xl","LinksGridList","items","cols","numOfCols","matches","useMediaQuery","breakpoints","up","breakpoint","find","k","useDynamicColumns","ImageList","rowHeight","map","i","ImageListItem","key","EntityLinksCard","entity","useEntity","app","useApp","links","metadata","InfoCard","title","length","url","icon","getSystemIcon"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"static/1959.36e7858c.chunk.js","mappings":"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","sources":["webpack://embedded-techdocs-app/../../node_modules/@material-ui/icons/Language.js","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksEmptyState.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/IconLink.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/useDynamicColumns.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/LinksGridList.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/EntityLinksCard/EntityLinksCard.tsx"],"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: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z\"\n}), 'Language');\n\nexports.default = _default;","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Button, makeStyles, Typography } from '@material-ui/core';\nimport React from 'react';\nimport { CodeSnippet } from '@backstage/core-components';\n\nconst ENTITY_YAML = `metadata:\n name: example\n links:\n - url: https://dashboard.example.com\n title: My Dashboard\n icon: dashboard`;\n\n/** @public */\n\n\nconst useStyles = makeStyles(\n theme => ({\n code: {\n borderRadius: 6,\n margin: `${theme.spacing(2)}px 0px`,\n background: theme.palette.type === 'dark' ? '#444' : '#fff',\n },\n }),\n { name: 'PluginCatalogEntityLinksEmptyState' },\n);\n\nexport const EntityLinksEmptyState = () => {\n const classes = useStyles();\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(Typography, { variant: \"body1\",}, \"No links defined for this entity. You can add links to your entity YAML as shown in the highlighted example below:\"\n\n\n )\n , React.createElement('div', { className: classes.code,}\n , React.createElement(CodeSnippet, {\n text: ENTITY_YAML,\n language: \"yaml\",\n showLineNumbers: true,\n highlightedNumbers: [3, 4, 5, 6],\n customStyle: { background: 'inherit', fontSize: '115%' },}\n )\n )\n , React.createElement(Button, {\n variant: \"contained\",\n color: \"primary\",\n target: \"_blank\",\n href: \"https://backstage.io/docs/features/software-catalog/descriptor-format#links-optional\",}\n , \"Read more\"\n\n )\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 { makeStyles, Box, Typography } from '@material-ui/core';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\n\nimport { Link } from '@backstage/core-components';\n\n\nconst useStyles = makeStyles({\n svgIcon: {\n display: 'inline-block',\n '& svg': {\n display: 'inline-block',\n fontSize: 'inherit',\n verticalAlign: 'baseline',\n },\n },\n});\n\nexport const IconLink = ({\n href,\n text,\n Icon,\n}\n\n\n\n) => {\n const classes = useStyles();\n\n return (\n React.createElement(Box, { display: \"flex\",}\n , React.createElement(Box, { mr: 1, className: classes.svgIcon,}\n , React.createElement(Typography, { component: \"div\",}\n , Icon ? React.createElement(Icon, null ) : React.createElement(LanguageIcon, null )\n )\n )\n , React.createElement(Box, { flexGrow: \"1\",}\n , React.createElement(Link, { to: href, target: \"_blank\", rel: \"noopener\",}\n , text || href\n )\n )\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 { useMediaQuery } from '@material-ui/core';\n\n\nconst colDefaults = {\n xs: 1,\n sm: 1,\n md: 1,\n lg: 2,\n xl: 3,\n};\n\nexport function useDynamicColumns(\n cols,\n) {\n const matches = [\n useMediaQuery((theme) => theme.breakpoints.up('xl')) ? 'xl' : null,\n useMediaQuery((theme) => theme.breakpoints.up('lg')) ? 'lg' : null,\n useMediaQuery((theme) => theme.breakpoints.up('md')) ? 'md' : null,\n useMediaQuery((theme) => theme.breakpoints.up('sm')) ? 'sm' : null,\n useMediaQuery((theme) => theme.breakpoints.up('xs')) ? 'xs' : null,\n ];\n\n let numOfCols = 1;\n\n if (typeof cols === 'number') {\n numOfCols = cols;\n } else {\n const breakpoint = matches.find(k => k !== null) ?? 'xs';\n numOfCols = cols?.[breakpoint] ?? colDefaults[breakpoint];\n }\n\n return numOfCols;\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 { ImageList, ImageListItem } from '@material-ui/core';\nimport React from 'react';\nimport { IconLink } from './IconLink';\n\nimport { useDynamicColumns } from './useDynamicColumns';\n\n\n\n\n\n\n\n\n\n\n\n\n\nexport const LinksGridList = ({ items, cols = undefined }) => {\n const numOfCols = useDynamicColumns(cols);\n\n return (\n React.createElement(ImageList, { rowHeight: \"auto\", cols: numOfCols,}\n , items.map(({ text, href, Icon }, i) => (\n React.createElement(ImageListItem, { key: i,}\n , React.createElement(IconLink, { href: href, text: text ?? href, Icon: Icon,} )\n )\n ))\n )\n );\n};\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport LanguageIcon from '@material-ui/icons/Language';\nimport React from 'react';\nimport { EntityLinksEmptyState } from './EntityLinksEmptyState';\nimport { LinksGridList } from './LinksGridList';\n\n\nimport { useApp } from '@backstage/core-plugin-api';\nimport { InfoCard } from '@backstage/core-components';\n\n\n\n\n\n\n\n\nexport const EntityLinksCard = ({ cols = undefined, variant }) => {\n const { entity } = useEntity();\n const app = useApp();\n\n const iconResolver = (key) =>\n key ? app.getSystemIcon(key) ?? LanguageIcon : LanguageIcon;\n\n const links = entity?.metadata?.links;\n\n return (\n React.createElement(InfoCard, { title: \"Links\", variant: variant,}\n , !links || links.length === 0 ? (\n React.createElement(EntityLinksEmptyState, null )\n ) : (\n React.createElement(LinksGridList, {\n cols: cols,\n items: links.map(({ url, title, icon }) => ({\n text: title ?? url,\n href: url,\n Icon: iconResolver(icon),\n })),}\n )\n )\n )\n );\n};\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_default","default","createElement","d","useStyles","makeStyles","theme","code","borderRadius","margin","spacing","background","palette","type","name","EntityLinksEmptyState","classes","Typography","variant","className","CodeSnippet","text","language","showLineNumbers","highlightedNumbers","customStyle","fontSize","Button","color","target","href","svgIcon","display","verticalAlign","IconLink","Icon","Box","mr","component","Language","flexGrow","Link","to","rel","colDefaults","xs","sm","md","lg","xl","LinksGridList","items","cols","numOfCols","matches","useMediaQuery","breakpoints","up","breakpoint","find","k","useDynamicColumns","ImageList","rowHeight","map","i","ImageListItem","key","EntityLinksCard","entity","useEntity","app","useApp","links","metadata","InfoCard","title","length","url","icon","getSystemIcon"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[390],{60390:function(e,t,n){n.r(t),n.d(t,{HasSystemsCard:function(){return c}});var a=n(52890),r=n(2784),i=n(62426);const c=({variant:e="gridItem"})=>r.createElement(i.fT,{variant:e,title:"Has systems",entityKind:"System",relationType:a.aS,columns:i._v,asRenderableEntities:i.el,emptyMessage:"No system is part of this domain",emptyHelpLink:i.G5})},62426:function(e,t,n){n.d(t,{fT:function(){return o},D:function(){return u},$c:function(){return y},el:function(){return E},we:function(){return s},AE:function(){return l},xp:function(){return m},Uc:function(){return d},_v:function(){return f},G5:function(){return p}});var a=n(90436),r=n(5578),i=n(2784),c=n(
|
|
2
|
-
//# sourceMappingURL=390.
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[390],{60390:function(e,t,n){n.r(t),n.d(t,{HasSystemsCard:function(){return c}});var a=n(52890),r=n(2784),i=n(62426);const c=({variant:e="gridItem"})=>r.createElement(i.fT,{variant:e,title:"Has systems",entityKind:"System",relationType:a.aS,columns:i._v,asRenderableEntities:i.el,emptyMessage:"No system is part of this domain",emptyHelpLink:i.G5})},62426:function(e,t,n){n.d(t,{fT:function(){return o},D:function(){return u},$c:function(){return y},el:function(){return E},we:function(){return s},AE:function(){return l},xp:function(){return m},Uc:function(){return d},_v:function(){return f},G5:function(){return p}});var a=n(90436),r=n(5578),i=n(2784),c=n(91375);function o({variant:e="gridItem",title:t,columns:n,entityKind:o,relationType:s,emptyMessage:l,emptyHelpLink:u,asRenderableEntities:m}){const{entity:d}=(0,r.useEntity)(),{entities:y,loading:f,error:p}=(0,r.useRelatedEntities)(d,{type:s,kind:o});return f?i.createElement(c.InfoCard,{variant:e,title:t},i.createElement(c.Progress,null)):p?i.createElement(c.InfoCard,{variant:e,title:t},i.createElement(c.ResponseErrorPanel,{error:p})):i.createElement(r.EntityTable,{title:t,variant:e,emptyContent:i.createElement("div",{style:{textAlign:"center"}},i.createElement(a.Z,{variant:"body1"},l),i.createElement(a.Z,{variant:"body2"},i.createElement(c.Link,{to:u},"Learn how to change this."))),columns:n,entities:m(y||[])})}const s=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createSpecTypeColumn(),r.EntityTable.columns.createSpecLifecycleColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],l="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",u=e=>e,m=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createSpecTypeColumn(),r.EntityTable.columns.createSpecLifecycleColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],d="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",y=e=>e,f=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],p="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",E=e=>e}}]);
|
|
2
|
+
//# sourceMappingURL=390.d7537222.chunk.js.map
|
package/dist/techdocs-preview-bundle/static/{390.ad5e470f.chunk.js.map → 390.d7537222.chunk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/390.
|
|
1
|
+
{"version":3,"file":"static/390.d7537222.chunk.js","mappings":"4NA6BO,MAAMA,EAAiB,EAAGC,QAAAA,EAAU,cAEvC,gBAAoBC,EAAA,GAAqB,CACvCD,QAASA,EACTE,MAAO,cACPC,WAAY,SACZC,aAAc,KACdC,QAAS,KACTC,qBAAsB,KACtBC,aAAc,mCACdC,cAAe,Q,4TCId,SAASP,GAAoB,QAClCD,EAAU,WAAU,MACpBE,EAAK,QACLG,EAAO,WACPF,EAAU,aACVC,EAAY,aACZG,EAAY,cACZC,EAAa,qBACbF,IAEA,MAAM,OAAEG,IAAW,IAAAC,cACb,SAAEC,EAAQ,QAAEC,EAAO,MAAEC,IAAU,IAAAC,oBAAmBL,EAAQ,CAC9DM,KAAMX,EACNY,KAAMb,IAGR,OAAIS,EAEA,gBAAoB,EAAAK,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAgB,SAAU,OAKlCL,EAEA,gBAAoB,EAAAI,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAiB,mBAAoB,CAAEN,MAAOA,KAMvD,gBAAoB,EAAAO,YAAa,CAC/BlB,MAAOA,EACPF,QAASA,EACTqB,aACE,gBAAoB,MAAO,CAAEC,MAAO,CAAEC,UAAW,WAC7C,gBAAoBC,EAAA,EAAY,CAAExB,QAAS,SAAWO,GACtD,gBAAoBiB,EAAA,EAAY,CAAExB,QAAS,SACzC,gBAAoB,EAAAyB,KAAM,CAAEC,GAAIlB,GAAiB,+BAIzDH,QAASA,EACTM,SAAUL,EAAqBK,GAAY,MChE1C,MAAMgB,EAAyB,CACpC,EAAAP,YAAA,8BAA0C,CAAEQ,YAAa,cACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWS,EACX,uFACWC,EAAuBnB,GAClCA,EAEWoB,EAAwB,CACnC,EAAAX,YAAA,8BAA0C,CAAEQ,YAAa,aACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWY,EACX,sFACWC,EAAsBtB,GACjCA,EAEWuB,EAAsB,CACjC,EAAAd,YAAA,8BAA0C,CAAEQ,YAAa,WACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,2CAEWe,EACX,oFACWC,EAAoBzB,GAC/BA","sources":["webpack://embedded-techdocs-app/../../plugins/catalog/src/components/HasSystemsCard/HasSystemsCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asSystemEntities,\n RelatedEntitiesCard,\n systemEntityColumns,\n systemEntityHelpLink,\n} from '../RelatedEntitiesCard';\n\n\n\n\n\nexport const HasSystemsCard = ({ variant = 'gridItem' }) => {\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has systems\" ,\n entityKind: \"System\",\n relationType: RELATION_HAS_PART,\n columns: systemEntityColumns,\n asRenderableEntities: asSystemEntities,\n emptyMessage: \"No system is part of this domain\" ,\n emptyHelpLink: systemEntityHelpLink,}\n )\n );\n};\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n\n\n\n\n\n\n\n\n\n\n\nexport function RelatedEntitiesCard({\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\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 React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"names":["HasSystemsCard","variant","RelatedEntitiesCard","title","entityKind","relationType","columns","asRenderableEntities","emptyMessage","emptyHelpLink","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"sourceRoot":""}
|
package/dist/techdocs-preview-bundle/static/{4022.1e003d91.chunk.js → 4022.91fbea78.chunk.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[4022],{4022:function(e,t,n){n.r(t),n.d(t,{HasComponentsCard:function(){return c}});var a=n(52890),r=n(2784),o=n(62426);const c=({variant:e="gridItem"})=>r.createElement(o.fT,{variant:e,title:"Has components",entityKind:"Component",relationType:a.aS,columns:o.we,emptyMessage:"No component is part of this system",emptyHelpLink:o.AE,asRenderableEntities:o.D})},62426:function(e,t,n){n.d(t,{fT:function(){return i},D:function(){return u},$c:function(){return p},el:function(){return E},we:function(){return l},AE:function(){return s},xp:function(){return m},Uc:function(){return d},_v:function(){return y},G5:function(){return f}});var a=n(90436),r=n(5578),o=n(2784),c=n(
|
|
2
|
-
//# sourceMappingURL=4022.
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[4022],{4022:function(e,t,n){n.r(t),n.d(t,{HasComponentsCard:function(){return c}});var a=n(52890),r=n(2784),o=n(62426);const c=({variant:e="gridItem"})=>r.createElement(o.fT,{variant:e,title:"Has components",entityKind:"Component",relationType:a.aS,columns:o.we,emptyMessage:"No component is part of this system",emptyHelpLink:o.AE,asRenderableEntities:o.D})},62426:function(e,t,n){n.d(t,{fT:function(){return i},D:function(){return u},$c:function(){return p},el:function(){return E},we:function(){return l},AE:function(){return s},xp:function(){return m},Uc:function(){return d},_v:function(){return y},G5:function(){return f}});var a=n(90436),r=n(5578),o=n(2784),c=n(91375);function i({variant:e="gridItem",title:t,columns:n,entityKind:i,relationType:l,emptyMessage:s,emptyHelpLink:u,asRenderableEntities:m}){const{entity:d}=(0,r.useEntity)(),{entities:p,loading:y,error:f}=(0,r.useRelatedEntities)(d,{type:l,kind:i});return y?o.createElement(c.InfoCard,{variant:e,title:t},o.createElement(c.Progress,null)):f?o.createElement(c.InfoCard,{variant:e,title:t},o.createElement(c.ResponseErrorPanel,{error:f})):o.createElement(r.EntityTable,{title:t,variant:e,emptyContent:o.createElement("div",{style:{textAlign:"center"}},o.createElement(a.Z,{variant:"body1"},s),o.createElement(a.Z,{variant:"body2"},o.createElement(c.Link,{to:u},"Learn how to change this."))),columns:n,entities:m(p||[])})}const l=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"component"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createSpecTypeColumn(),r.EntityTable.columns.createSpecLifecycleColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],s="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component",u=e=>e,m=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"resource"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createSpecTypeColumn(),r.EntityTable.columns.createSpecLifecycleColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],d="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource",p=e=>e,y=[r.EntityTable.columns.createEntityRefColumn({defaultKind:"system"}),r.EntityTable.columns.createOwnerColumn(),r.EntityTable.columns.createMetadataDescriptionColumn()],f="https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system",E=e=>e}}]);
|
|
2
|
+
//# sourceMappingURL=4022.91fbea78.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/4022.
|
|
1
|
+
{"version":3,"file":"static/4022.91fbea78.chunk.js","mappings":"+NA6BO,MAAMA,EAAoB,EAAGC,QAAAA,EAAU,cAE1C,gBAAoBC,EAAA,GAAqB,CACvCD,QAASA,EACTE,MAAO,iBACPC,WAAY,YACZC,aAAc,KACdC,QAAS,KACTC,aAAc,sCACdC,cAAe,KACfC,qBAAsB,O,4TCIrB,SAASP,GAAoB,QAClCD,EAAU,WAAU,MACpBE,EAAK,QACLG,EAAO,WACPF,EAAU,aACVC,EAAY,aACZE,EAAY,cACZC,EAAa,qBACbC,IAEA,MAAM,OAAEC,IAAW,IAAAC,cACb,SAAEC,EAAQ,QAAEC,EAAO,MAAEC,IAAU,IAAAC,oBAAmBL,EAAQ,CAC9DM,KAAMX,EACNY,KAAMb,IAGR,OAAIS,EAEA,gBAAoB,EAAAK,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAgB,SAAU,OAKlCL,EAEA,gBAAoB,EAAAI,SAAU,CAAEjB,QAASA,EAASE,MAAOA,GACrD,gBAAoB,EAAAiB,mBAAoB,CAAEN,MAAOA,KAMvD,gBAAoB,EAAAO,YAAa,CAC/BlB,MAAOA,EACPF,QAASA,EACTqB,aACE,gBAAoB,MAAO,CAAEC,MAAO,CAAEC,UAAW,WAC7C,gBAAoBC,EAAA,EAAY,CAAExB,QAAS,SAAWM,GACtD,gBAAoBkB,EAAA,EAAY,CAAExB,QAAS,SACzC,gBAAoB,EAAAyB,KAAM,CAAEC,GAAInB,GAAiB,+BAIzDF,QAASA,EACTM,SAAUH,EAAqBG,GAAY,MChE1C,MAAMgB,EAAyB,CACpC,EAAAP,YAAA,8BAA0C,CAAEQ,YAAa,cACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWS,EACX,uFACWC,EAAuBnB,GAClCA,EAEWoB,EAAwB,CACnC,EAAAX,YAAA,8BAA0C,CAAEQ,YAAa,aACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,+BACA,EAAAA,YAAA,oCACA,EAAAA,YAAA,2CAEWY,EACX,sFACWC,EAAsBtB,GACjCA,EAEWuB,EAAsB,CACjC,EAAAd,YAAA,8BAA0C,CAAEQ,YAAa,WACzD,EAAAR,YAAA,4BACA,EAAAA,YAAA,2CAEWe,EACX,oFACWC,EAAoBzB,GAC/BA","sources":["webpack://embedded-techdocs-app/../../plugins/catalog/src/components/HasComponentsCard/HasComponentsCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/RelatedEntitiesCard.tsx","webpack://embedded-techdocs-app/../../plugins/catalog/src/components/RelatedEntitiesCard/presets.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 { RELATION_HAS_PART } from '@backstage/catalog-model';\nimport React from 'react';\nimport {\n asComponentEntities,\n componentEntityColumns,\n componentEntityHelpLink,\n RelatedEntitiesCard,\n} from '../RelatedEntitiesCard';\n\n\n\n\n\nexport const HasComponentsCard = ({ variant = 'gridItem' }) => {\n return (\n React.createElement(RelatedEntitiesCard, {\n variant: variant,\n title: \"Has components\" ,\n entityKind: \"Component\",\n relationType: RELATION_HAS_PART,\n columns: componentEntityColumns,\n emptyMessage: \"No component is part of this system\" ,\n emptyHelpLink: componentEntityHelpLink,\n asRenderableEntities: asComponentEntities,}\n )\n );\n};\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Typography } from '@material-ui/core';\nimport {\n EntityTable,\n useEntity,\n useRelatedEntities,\n} from '@backstage/plugin-catalog-react';\nimport React from 'react';\nimport {\n InfoCard,\n Link,\n Progress,\n ResponseErrorPanel,\n\n} from '@backstage/core-components';\n\n\n\n\n\n\n\n\n\n\n\n\nexport function RelatedEntitiesCard({\n variant = 'gridItem',\n title,\n columns,\n entityKind,\n relationType,\n emptyMessage,\n emptyHelpLink,\n asRenderableEntities,\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 React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(Progress, null )\n )\n );\n }\n\n if (error) {\n return (\n React.createElement(InfoCard, { variant: variant, title: title,}\n , React.createElement(ResponseErrorPanel, { error: error,} )\n )\n );\n }\n\n return (\n React.createElement(EntityTable, {\n title: title,\n variant: variant,\n emptyContent: \n React.createElement('div', { style: { textAlign: 'center' },}\n , React.createElement(Typography, { variant: \"body1\",}, emptyMessage)\n , React.createElement(Typography, { variant: \"body2\",}\n , React.createElement(Link, { to: emptyHelpLink,}, \"Learn how to change this.\" )\n )\n )\n ,\n columns: columns,\n entities: asRenderableEntities(entities || []),}\n )\n );\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { EntityTable } from '@backstage/plugin-catalog-react';\n\n\nexport const componentEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component';\nexport const asComponentEntities = (entities) =>\n entities ;\n\nexport const resourceEntityColumns = [\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 =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-resource';\nexport const asResourceEntities = (entities) =>\n entities ;\n\nexport const systemEntityColumns = [\n EntityTable.columns.createEntityRefColumn({ defaultKind: 'system' }),\n EntityTable.columns.createOwnerColumn(),\n EntityTable.columns.createMetadataDescriptionColumn(),\n];\nexport const systemEntityHelpLink =\n 'https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system';\nexport const asSystemEntities = (entities) =>\n entities ;\n"],"names":["HasComponentsCard","variant","RelatedEntitiesCard","title","entityKind","relationType","columns","emptyMessage","emptyHelpLink","asRenderableEntities","entity","useEntity","entities","loading","error","useRelatedEntities","type","kind","InfoCard","Progress","ResponseErrorPanel","EntityTable","emptyContent","style","textAlign","Typography","Link","to","componentEntityColumns","defaultKind","componentEntityHelpLink","asComponentEntities","resourceEntityColumns","resourceEntityHelpLink","asResourceEntities","systemEntityColumns","systemEntityHelpLink","asSystemEntities"],"sourceRoot":""}
|