@techdocs/cli 0.8.6 → 0.8.10
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 +34 -0
- package/dist/cjs/{PublisherConfig-e517144b.cjs.js → PublisherConfig-a09bdfcc.cjs.js} +9 -9
- package/dist/cjs/{PublisherConfig-e517144b.cjs.js.map → PublisherConfig-a09bdfcc.cjs.js.map} +1 -1
- package/dist/cjs/{generate-391c018a.cjs.js → generate-86756c8c.cjs.js} +8 -8
- package/dist/cjs/{generate-391c018a.cjs.js.map → generate-86756c8c.cjs.js.map} +1 -1
- package/dist/cjs/{migrate-66e006f6.cjs.js → migrate-04a51fb3.cjs.js} +7 -7
- package/dist/cjs/{migrate-66e006f6.cjs.js.map → migrate-04a51fb3.cjs.js.map} +1 -1
- package/dist/cjs/{mkdocs-3446534f.cjs.js → mkdocs-f1cf9408.cjs.js} +6 -6
- package/dist/cjs/{mkdocs-3446534f.cjs.js.map → mkdocs-f1cf9408.cjs.js.map} +1 -1
- package/dist/cjs/{mkdocsServer-54486fc6.cjs.js → mkdocsServer-7058189d.cjs.js} +2 -2
- package/dist/cjs/{mkdocsServer-54486fc6.cjs.js.map → mkdocsServer-7058189d.cjs.js.map} +1 -1
- package/dist/cjs/{publish-0bdef520.cjs.js → publish-d1ccb001.cjs.js} +8 -8
- package/dist/cjs/{publish-0bdef520.cjs.js.map → publish-d1ccb001.cjs.js.map} +1 -1
- package/dist/cjs/{serve-6f7d37dd.cjs.js → serve-639872a5.cjs.js} +13 -13
- package/dist/cjs/{serve-6f7d37dd.cjs.js.map → serve-639872a5.cjs.js.map} +1 -1
- package/dist/cjs/{utility-597170e7.cjs.js → utility-6042a9ba.cjs.js} +5 -7
- package/dist/cjs/{utility-597170e7.cjs.js.map → utility-6042a9ba.cjs.js.map} +1 -1
- package/dist/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/techdocs-preview-bundle/.config-schema.json +79 -6
- package/dist/techdocs-preview-bundle/index.html +1 -3
- package/dist/techdocs-preview-bundle/static/1553.ddfb7621.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{1553.74c14b71.chunk.js.map → 1553.ddfb7621.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/1959.da6d366a.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{1959.cee4ff3e.chunk.js.map → 1959.da6d366a.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/3825.93a6ad0c.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/3825.93a6ad0c.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/390.869680c7.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{390.ad5e470f.chunk.js.map → 390.869680c7.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/4022.28aef274.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{4022.1e003d91.chunk.js.map → 4022.28aef274.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/4960.25870a82.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{4960.a60038b0.chunk.js.map → 4960.25870a82.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/6105.b519076e.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/6105.b519076e.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/6235.ae19aeb4.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{6235.749fe487.chunk.js.map → 6235.ae19aeb4.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{6650.2bbdf350.chunk.js → 6650.cf219dec.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{6650.2bbdf350.chunk.js.map → 6650.cf219dec.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/8015.07e09f1c.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/8015.07e09f1c.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/8061.0c10d2ee.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{8061.e424ec00.chunk.js.map → 8061.0c10d2ee.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/8718.87c92dac.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/8718.87c92dac.chunk.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/8792.46f21e7d.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{8792.3fa7b079.chunk.js.map → 8792.46f21e7d.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/9028.fb060d2e.chunk.js +2 -0
- package/dist/techdocs-preview-bundle/static/{9028.3fcdef44.chunk.js.map → 9028.fb060d2e.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/main.045916e2.js +2 -0
- package/dist/techdocs-preview-bundle/static/main.045916e2.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{module-hot-loader.550aeb54.js → module-hot-loader.ec8a2690.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{module-hot-loader.550aeb54.js.LICENSE.txt → module-hot-loader.ec8a2690.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/{module-hot-loader.550aeb54.js.map → module-hot-loader.ec8a2690.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/module-lodash.5fc3fe8a.js +3 -0
- package/dist/techdocs-preview-bundle/static/{module-lodash.2161df9d.js.LICENSE.txt → module-lodash.5fc3fe8a.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/module-lodash.5fc3fe8a.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{module-material-table.3a6dac89.js → module-material-table.ffd83fbb.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{module-material-table.3a6dac89.js.map → module-material-table.ffd83fbb.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/module-material-ui.ecd3d63b.js +3 -0
- package/dist/techdocs-preview-bundle/static/{module-material-ui.79c12e1e.js.LICENSE.txt → module-material-ui.ecd3d63b.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/module-material-ui.ecd3d63b.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/module-react-beautiful-dnd.da6c1d82.js +2 -0
- package/dist/techdocs-preview-bundle/static/module-react-beautiful-dnd.da6c1d82.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/{react-syntax-highlighter_languages_highlight_cLike.f197a4c8.chunk.js → react-syntax-highlighter_languages_highlight_cLike.0613bb54.chunk.js} +2 -2
- package/dist/techdocs-preview-bundle/static/{react-syntax-highlighter_languages_highlight_cLike.f197a4c8.chunk.js.map → react-syntax-highlighter_languages_highlight_cLike.0613bb54.chunk.js.map} +1 -1
- package/dist/techdocs-preview-bundle/static/{runtime.6a0b1657.js → runtime.045916e2.js} +2 -2
- package/dist/techdocs-preview-bundle/static/runtime.045916e2.js.map +1 -0
- package/dist/techdocs-preview-bundle/static/vendor.045916e2.js +3 -0
- package/dist/techdocs-preview-bundle/static/{vendor.6a0b1657.js.LICENSE.txt → vendor.045916e2.js.LICENSE.txt} +0 -0
- package/dist/techdocs-preview-bundle/static/vendor.045916e2.js.map +1 -0
- package/package.json +7 -7
- package/dist/techdocs-preview-bundle/static/1553.74c14b71.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/1959.cee4ff3e.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/390.ad5e470f.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/4022.1e003d91.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/4960.a60038b0.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/4968.02594898.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/4968.02594898.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/6105.4e9aa3ee.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/6105.4e9aa3ee.chunk.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/6235.749fe487.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/8061.e424ec00.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/8792.3fa7b079.chunk.js +0 -2
- package/dist/techdocs-preview-bundle/static/9028.3fcdef44.chunk.js +0 -2
- 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-lodash.2161df9d.js +0 -3
- package/dist/techdocs-preview-bundle/static/module-lodash.2161df9d.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/module-material-ui.79c12e1e.js +0 -3
- package/dist/techdocs-preview-bundle/static/module-material-ui.79c12e1e.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/module-react-beautiful-dnd.2394f1f9.js +0 -2
- package/dist/techdocs-preview-bundle/static/module-react-beautiful-dnd.2394f1f9.js.map +0 -1
- package/dist/techdocs-preview-bundle/static/runtime.6a0b1657.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/dist/index.cjs.js
CHANGED
|
@@ -9,11 +9,11 @@ var program__default = /*#__PURE__*/_interopDefaultLegacy(program);
|
|
|
9
9
|
|
|
10
10
|
const defaultDockerImage = techdocsCommon.TechdocsGenerator.defaultDockerImage;
|
|
11
11
|
function registerCommands(program) {
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-86756c8c.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-04a51fb3.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-d1ccb001.cjs.js'); }).then((m) => m.default)));
|
|
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-f1cf9408.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-639872a5.cjs.js'); }).then((m) => m.default)));
|
|
17
17
|
}
|
|
18
18
|
function lazy(getActionFunc) {
|
|
19
19
|
return async (...args) => {
|
|
@@ -28,12 +28,12 @@ function lazy(getActionFunc) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var version = "0.8.
|
|
31
|
+
var version = "0.8.10";
|
|
32
32
|
|
|
33
33
|
const main = (argv) => {
|
|
34
|
-
program__default[
|
|
35
|
-
registerCommands(program__default[
|
|
36
|
-
program__default[
|
|
34
|
+
program__default["default"].name("techdocs-cli").version(version);
|
|
35
|
+
registerCommands(program__default["default"]);
|
|
36
|
+
program__default["default"].parse(argv);
|
|
37
37
|
};
|
|
38
38
|
main(process.argv);
|
|
39
39
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/commands/index.ts","../src/index.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 { CommanderStatic } from 'commander';\nimport { TechdocsGenerator } from '@backstage/techdocs-common';\n\nconst defaultDockerImage = TechdocsGenerator.defaultDockerImage;\n\nexport function registerCommands(program: CommanderStatic) {\n program\n .command('generate')\n .description('Generate TechDocs documentation site using MkDocs.')\n .option(\n '--source-dir <PATH>',\n 'Source directory containing mkdocs.yml and docs/ directory.',\n '.',\n )\n .option(\n '--output-dir <PATH>',\n 'Output directory containing generated TechDocs site.',\n './site/',\n )\n .option(\n '--docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option('--no-pull', 'Do not pull the latest docker image', false)\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable and plugins in current user environment.',\n )\n .option(\n '--techdocs-ref <HOST_TYPE:URL>',\n 'The repository hosting documentation source files e.g. github:https://ghe.mycompany.net.com/org/repo.' +\n '\\nThis value is same as the backstage.io/techdocs-ref annotation of the corresponding Backstage entity.' +\n '\\nIt is completely fine to skip this as it is only being used to set repo_url in mkdocs.yml if not found.\\n',\n )\n .option(\n '--etag <ETAG>',\n 'A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json.',\n )\n .option('-v --verbose', 'Enable verbose output.', false)\n .alias('build')\n .action(lazy(() => import('./generate/generate').then(m => m.default)));\n\n program\n .command('migrate')\n .description(\n 'Migrate objects with case-sensitive entity triplets to lower-case versions.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n '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.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--awsBucketRootPath',\n 'Optional sub-directory to store files in Amazon S3',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--removeOriginal',\n 'Optional Files are copied by default. If flag is set, files are renamed/moved instead.',\n false,\n )\n .option(\n '--concurrency <MAX CONCURRENT REQS>',\n 'Optional Controls the number of API requests allowed to be performed simultaneously.',\n '25',\n )\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./migrate/migrate').then(m => m.default)));\n\n program\n .command('publish')\n .description(\n 'Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .requiredOption(\n '--entity <NAMESPACE/KIND/NAME>',\n '(Required always) Entity uid separated by / in namespace/kind/name order (case-sensitive). Example: default/Component/myEntity ',\n )\n .option(\n '--legacyUseCaseSensitiveTripletPaths',\n '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.',\n false,\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n '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.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option('--awsS3sse <AWS SSE>', 'Optional AWS S3 Server Side Encryption.')\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--gcsBucketRootPath',\n 'Optional sub-directory to store files in Google cloud storage',\n )\n .option(\n '--directory <PATH>',\n 'Path of the directory containing generated files to publish',\n './site/',\n )\n .action(lazy(() => import('./publish/publish').then(m => m.default)));\n\n program\n .command('serve:mkdocs')\n .description('Serve a documentation project locally using MkDocs serve.')\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--no-docker',\n 'Do not use Docker, run `mkdocs serve` in current user environment.',\n )\n .option('-p, --port <PORT>', 'Port to serve documentation locally', '8000')\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./serve/mkdocs').then(m => m.default)));\n\n program\n .command('serve')\n .description(\n 'Serve a documentation project locally in a Backstage app-like environment',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable in current user environment.',\n )\n .option('--mkdocs-port <PORT>', 'Port for MkDocs server to use', '8000')\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./serve/serve').then(m => m.default)));\n}\n\n// Wraps an action function so that it always exits and handles errors\n// Humbly taken from backstage-cli's registerCommands\nfunction lazy(\n getActionFunc: () => Promise<(...args: any[]) => Promise<void>>,\n): (...args: any[]) => Promise<never> {\n return async (...args: any[]) => {\n try {\n const actionFunc = await getActionFunc();\n await actionFunc(...args);\n process.exit(0);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error.message);\n process.exit(1);\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 program from 'commander';\nimport { registerCommands } from './commands';\nimport { version } from '../package.json';\n\nconst main = (argv: string[]) => {\n program.name('techdocs-cli').version(version);\n\n registerCommands(program);\n\n program.parse(argv);\n};\n\nmain(process.argv);\n"],"names":["TechdocsGenerator","program"],"mappings":";;;;;;;;;AAmBA,MAAM,qBAAqBA,iCAAkB;0BAEZ,SAA0B;AACzD,UACG,QAAQ,YACR,YAAY,sDACZ,OACC,uBACA,+DACA,KAED,OACC,uBACA,wDACA,WAED,OACC,iCACA,sCACA,oBAED,OAAO,aAAa,uCAAuC,OAC3D,OACC,eACA,qFAED,OACC,kCACA,2TAID,OACC,iBACA,uHAED,OAAO,gBAAgB,0BAA0B,OACjD,MAAM,SACN,OAAO,KAAK,MAAM,0FAA8B,KAAK,OAAK,EAAE;AAE/D,UACG,QAAQ,WACR,YACC,+EAED,eACC,2BACA,0IAED,eACC,0CACA,iJAED,OACC,2CACA,uEAED,OACC,yCACA,wKAED,OACC,+BACA,2CAED,OACC,gCACA,8CAED,OACC,yBACA,+CAED,OACC,uBACA,sDAED,OACC,gEACA,yEAED,OACC,8DACA,yEAED,OACC,yCACA,yEAED,OACC,2CACA,yEAED,OACC,oBACA,0FACA,OAED,OACC,uCACA,wFACA,MAED,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,yFAA4B,KAAK,OAAK,EAAE;AAE7D,UACG,QAAQ,WACR,YACC,mFAED,eACC,2BACA,0IAED,eACC,0CACA,iJAED,eACC,kCACA,mIAED,OACC,wCACA,yJACA,OAED,OACC,2CACA,uEAED,OACC,yCACA,wKAED,OACC,+BACA,2CAED,OACC,gCACA,8CAED,OAAO,wBAAwB,2CAC/B,OACC,yBACA,+CAED,OACC,gEACA,yEAED,OACC,8DACA,yEAED,OACC,yCACA,yEAED,OACC,2CACA,yEAED,OACC,uBACA,iEAED,OACC,sBACA,+DACA,WAED,OAAO,KAAK,MAAa,yFAAqB,KAAK,OAAK,EAAE;AAE7D,UACG,QAAQ,gBACR,YAAY,6DACZ,OACC,qCACA,sCACA,oBAED,OACC,eACA,sEAED,OAAO,qBAAqB,uCAAuC,QACnE,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,wFAAyB,KAAK,OAAK,EAAE;AAE1D,UACG,QAAQ,SACR,YACC,6EAED,OACC,qCACA,sCACA,oBAED,OACC,eACA,yEAED,OAAO,wBAAwB,iCAAiC,QAChE,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,uFAAwB,KAAK,OAAK,EAAE;AAAA;AAK3D,cACE,eACoC;AACpC,SAAO,UAAU,SAAgB;AAC/B,QAAI;AACF,YAAM,aAAa,MAAM;AACzB,YAAM,WAAW,GAAG;AACpB,cAAQ,KAAK;AAAA,aACN,OAAP;AAEA,cAAQ,MAAM,MAAM;AACpB,cAAQ,KAAK;AAAA;AAAA;AAAA;;;;AC/NnB,MAAM,OAAO,CAAC,SAAmB;AAC/B,8BAAQ,KAAK,gBAAgB,QAAQ;AAErC,mBAAiBC;AAEjB,8BAAQ,MAAM;AAAA;AAGhB,KAAK,QAAQ;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/commands/index.ts","../src/index.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 { CommanderStatic } from 'commander';\nimport { TechdocsGenerator } from '@backstage/techdocs-common';\n\nconst defaultDockerImage = TechdocsGenerator.defaultDockerImage;\n\nexport function registerCommands(program: CommanderStatic) {\n program\n .command('generate')\n .description('Generate TechDocs documentation site using MkDocs.')\n .option(\n '--source-dir <PATH>',\n 'Source directory containing mkdocs.yml and docs/ directory.',\n '.',\n )\n .option(\n '--output-dir <PATH>',\n 'Output directory containing generated TechDocs site.',\n './site/',\n )\n .option(\n '--docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option('--no-pull', 'Do not pull the latest docker image', false)\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable and plugins in current user environment.',\n )\n .option(\n '--techdocs-ref <HOST_TYPE:URL>',\n 'The repository hosting documentation source files e.g. github:https://ghe.mycompany.net.com/org/repo.' +\n '\\nThis value is same as the backstage.io/techdocs-ref annotation of the corresponding Backstage entity.' +\n '\\nIt is completely fine to skip this as it is only being used to set repo_url in mkdocs.yml if not found.\\n',\n )\n .option(\n '--etag <ETAG>',\n 'A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json.',\n )\n .option('-v --verbose', 'Enable verbose output.', false)\n .alias('build')\n .action(lazy(() => import('./generate/generate').then(m => m.default)));\n\n program\n .command('migrate')\n .description(\n 'Migrate objects with case-sensitive entity triplets to lower-case versions.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n '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.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--awsBucketRootPath',\n 'Optional sub-directory to store files in Amazon S3',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--removeOriginal',\n 'Optional Files are copied by default. If flag is set, files are renamed/moved instead.',\n false,\n )\n .option(\n '--concurrency <MAX CONCURRENT REQS>',\n 'Optional Controls the number of API requests allowed to be performed simultaneously.',\n '25',\n )\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./migrate/migrate').then(m => m.default)));\n\n program\n .command('publish')\n .description(\n 'Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .requiredOption(\n '--entity <NAMESPACE/KIND/NAME>',\n '(Required always) Entity uid separated by / in namespace/kind/name order (case-sensitive). Example: default/Component/myEntity ',\n )\n .option(\n '--legacyUseCaseSensitiveTripletPaths',\n '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.',\n false,\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n '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.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option('--awsS3sse <AWS SSE>', 'Optional AWS S3 Server Side Encryption.')\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--gcsBucketRootPath',\n 'Optional sub-directory to store files in Google cloud storage',\n )\n .option(\n '--directory <PATH>',\n 'Path of the directory containing generated files to publish',\n './site/',\n )\n .action(lazy(() => import('./publish/publish').then(m => m.default)));\n\n program\n .command('serve:mkdocs')\n .description('Serve a documentation project locally using MkDocs serve.')\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--no-docker',\n 'Do not use Docker, run `mkdocs serve` in current user environment.',\n )\n .option('-p, --port <PORT>', 'Port to serve documentation locally', '8000')\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./serve/mkdocs').then(m => m.default)));\n\n program\n .command('serve')\n .description(\n 'Serve a documentation project locally in a Backstage app-like environment',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable in current user environment.',\n )\n .option('--mkdocs-port <PORT>', 'Port for MkDocs server to use', '8000')\n .option('-v --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./serve/serve').then(m => m.default)));\n}\n\n// Wraps an action function so that it always exits and handles errors\n// Humbly taken from backstage-cli's registerCommands\nfunction lazy(\n getActionFunc: () => Promise<(...args: any[]) => Promise<void>>,\n): (...args: any[]) => Promise<never> {\n return async (...args: any[]) => {\n try {\n const actionFunc = await getActionFunc();\n await actionFunc(...args);\n process.exit(0);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error.message);\n process.exit(1);\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 program from 'commander';\nimport { registerCommands } from './commands';\nimport { version } from '../package.json';\n\nconst main = (argv: string[]) => {\n program.name('techdocs-cli').version(version);\n\n registerCommands(program);\n\n program.parse(argv);\n};\n\nmain(process.argv);\n"],"names":["TechdocsGenerator","program"],"mappings":";;;;;;;;;AAmBA,MAAM,qBAAqBA,iCAAkB;0BAEZ,SAA0B;AACzD,UACG,QAAQ,YACR,YAAY,sDACZ,OACC,uBACA,+DACA,KAED,OACC,uBACA,wDACA,WAED,OACC,iCACA,sCACA,oBAED,OAAO,aAAa,uCAAuC,OAC3D,OACC,eACA,qFAED,OACC,kCACA,2TAID,OACC,iBACA,uHAED,OAAO,gBAAgB,0BAA0B,OACjD,MAAM,SACN,OAAO,KAAK,MAAM,oDAAO,sCAAuB,KAAK,OAAK,EAAE;AAE/D,UACG,QAAQ,WACR,YACC,+EAED,eACC,2BACA,0IAED,eACC,0CACA,iJAED,OACC,2CACA,uEAED,OACC,yCACA,wKAED,OACC,+BACA,2CAED,OACC,gCACA,8CAED,OACC,yBACA,+CAED,OACC,uBACA,sDAED,OACC,gEACA,yEAED,OACC,8DACA,yEAED,OACC,yCACA,yEAED,OACC,2CACA,yEAED,OACC,oBACA,0FACA,OAED,OACC,uCACA,wFACA,MAED,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,oDAAO,qCAAqB,KAAK,OAAK,EAAE;AAE7D,UACG,QAAQ,WACR,YACC,mFAED,eACC,2BACA,0IAED,eACC,0CACA,iJAED,eACC,kCACA,mIAED,OACC,wCACA,yJACA,OAED,OACC,2CACA,uEAED,OACC,yCACA,wKAED,OACC,+BACA,2CAED,OACC,gCACA,8CAED,OAAO,wBAAwB,2CAC/B,OACC,yBACA,+CAED,OACC,gEACA,yEAED,OACC,8DACA,yEAED,OACC,yCACA,yEAED,OACC,2CACA,yEAED,OACC,uBACA,iEAED,OACC,sBACA,+DACA,WAED,OAAO,KAAK,MAAM,oDAAO,qCAAqB,KAAK,OAAK,EAAE;AAE7D,UACG,QAAQ,gBACR,YAAY,6DACZ,OACC,qCACA,sCACA,oBAED,OACC,eACA,sEAED,OAAO,qBAAqB,uCAAuC,QACnE,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,oDAAO,oCAAkB,KAAK,OAAK,EAAE;AAE1D,UACG,QAAQ,SACR,YACC,6EAED,OACC,qCACA,sCACA,oBAED,OACC,eACA,yEAED,OAAO,wBAAwB,iCAAiC,QAChE,OAAO,gBAAgB,0BAA0B,OACjD,OAAO,KAAK,MAAM,oDAAO,mCAAiB,KAAK,OAAK,EAAE;AAAA;AAK3D,cACE,eACoC;AACpC,SAAO,UAAU,SAAgB;AAC/B,QAAI;AACF,YAAM,aAAa,MAAM;AACzB,YAAM,WAAW,GAAG;AACpB,cAAQ,KAAK;AAAA,aACN,OAAP;AAEA,cAAQ,MAAM,MAAM;AACpB,cAAQ,KAAK;AAAA;AAAA;AAAA;;;;AC/NnB,MAAM,OAAO,CAAC,SAAmB;AAC/B,8BAAQ,KAAK,gBAAgB,QAAQ;AAErC,mBAAiBC;AAEjB,8BAAQ,MAAM;AAAA;AAGhB,KAAK,QAAQ;;"}
|
|
@@ -228,6 +228,26 @@
|
|
|
228
228
|
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
229
229
|
}
|
|
230
230
|
},
|
|
231
|
+
{
|
|
232
|
+
"path": "../../plugins/permission-common/config.d.ts",
|
|
233
|
+
"value": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"permission": {
|
|
237
|
+
"description": "Configuration options for Backstage permissions and authorization",
|
|
238
|
+
"type": "object",
|
|
239
|
+
"properties": {
|
|
240
|
+
"enabled": {
|
|
241
|
+
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
242
|
+
"visibility": "frontend",
|
|
243
|
+
"type": "boolean"
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
249
|
+
}
|
|
250
|
+
},
|
|
231
251
|
{
|
|
232
252
|
"path": "../../plugins/techdocs/config.d.ts",
|
|
233
253
|
"value": {
|
|
@@ -254,6 +274,19 @@
|
|
|
254
274
|
"requestUrl": {
|
|
255
275
|
"visibility": "frontend",
|
|
256
276
|
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
"sanitizer": {
|
|
279
|
+
"type": "object",
|
|
280
|
+
"properties": {
|
|
281
|
+
"allowedIframeHosts": {
|
|
282
|
+
"description": "Allows iframe tag only for listed hosts\nExample:\n allowedIframeHosts: [\"example.com\"]\n this will allow all iframes with the host `example.com` in the src attribute",
|
|
283
|
+
"visibility": "frontend",
|
|
284
|
+
"type": "array",
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
257
290
|
}
|
|
258
291
|
},
|
|
259
292
|
"required": [
|
|
@@ -464,11 +497,16 @@
|
|
|
464
497
|
"items": {
|
|
465
498
|
"type": "object",
|
|
466
499
|
"properties": {
|
|
467
|
-
"
|
|
468
|
-
"description": "
|
|
500
|
+
"endpoint": {
|
|
501
|
+
"description": "AWS Endpoint.\nThe endpoint URI to send requests to. The default endpoint is built from the configured region.",
|
|
469
502
|
"visibility": "frontend",
|
|
470
503
|
"type": "string"
|
|
471
504
|
},
|
|
505
|
+
"s3ForcePathStyle": {
|
|
506
|
+
"description": "Whether to use path style URLs when communicating with S3.\nDefaults to false.\nThis allows providers like LocalStack, Minio and Wasabi (and possibly others) to be used.",
|
|
507
|
+
"visibility": "frontend",
|
|
508
|
+
"type": "boolean"
|
|
509
|
+
},
|
|
472
510
|
"accessKeyId": {
|
|
473
511
|
"description": "Account access key used to authenticate requests.",
|
|
474
512
|
"visibility": "backend",
|
|
@@ -484,10 +522,7 @@
|
|
|
484
522
|
"visibility": "backend",
|
|
485
523
|
"type": "string"
|
|
486
524
|
}
|
|
487
|
-
}
|
|
488
|
-
"required": [
|
|
489
|
-
"host"
|
|
490
|
-
]
|
|
525
|
+
}
|
|
491
526
|
}
|
|
492
527
|
}
|
|
493
528
|
}
|
|
@@ -515,6 +550,32 @@
|
|
|
515
550
|
"backend": {
|
|
516
551
|
"type": "object",
|
|
517
552
|
"properties": {
|
|
553
|
+
"auth": {
|
|
554
|
+
"description": "Backend configuration for when request authentication is enabled",
|
|
555
|
+
"type": "object",
|
|
556
|
+
"properties": {
|
|
557
|
+
"keys": {
|
|
558
|
+
"description": "Keys shared by all backends for signing and validating backend tokens.",
|
|
559
|
+
"type": "array",
|
|
560
|
+
"items": {
|
|
561
|
+
"type": "object",
|
|
562
|
+
"properties": {
|
|
563
|
+
"secret": {
|
|
564
|
+
"description": "Secret for generating tokens. Should be a base64 string, recommended\nlength is 24 bytes.",
|
|
565
|
+
"visibility": "secret",
|
|
566
|
+
"type": "string"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
"required": [
|
|
570
|
+
"secret"
|
|
571
|
+
]
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
"required": [
|
|
576
|
+
"keys"
|
|
577
|
+
]
|
|
578
|
+
},
|
|
518
579
|
"baseUrl": {
|
|
519
580
|
"type": "string"
|
|
520
581
|
},
|
|
@@ -619,6 +680,12 @@
|
|
|
619
680
|
],
|
|
620
681
|
"type": "string"
|
|
621
682
|
},
|
|
683
|
+
"knexConfig": {
|
|
684
|
+
"description": "Arbitrary config object to pass to knex when initializing\n(https://knexjs.org/#Installation-client). Most notable is the debug\nand asyncStackTraces booleans",
|
|
685
|
+
"type": "object",
|
|
686
|
+
"properties": {},
|
|
687
|
+
"additionalProperties": true
|
|
688
|
+
},
|
|
622
689
|
"plugin": {
|
|
623
690
|
"description": "Plugin specific database configuration and client override",
|
|
624
691
|
"type": "object",
|
|
@@ -649,6 +716,12 @@
|
|
|
649
716
|
"ensureExists": {
|
|
650
717
|
"description": "Whether to ensure the given database exists by creating it if it does not.\nDefaults to base config if unspecified.",
|
|
651
718
|
"type": "boolean"
|
|
719
|
+
},
|
|
720
|
+
"knexConfig": {
|
|
721
|
+
"description": "Arbitrary config object to pass to knex when initializing\n(https://knexjs.org/#Installation-client). Most notable is the\ndebug and asyncStackTraces booleans.\n\nThis is merged recursively into the base knexConfig",
|
|
722
|
+
"type": "object",
|
|
723
|
+
"properties": {},
|
|
724
|
+
"additionalProperties": true
|
|
652
725
|
}
|
|
653
726
|
}
|
|
654
727
|
}
|
|
@@ -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"/><
|
|
2
|
-
min-height: 100%;
|
|
3
|
-
}</style><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.6a0b1657.js"></script><script defer="defer" src="/static/module-material-ui.79c12e1e.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.6a0b1657.js"></script><script defer="defer" src="/static/main.6a0b1657.js"></script></head><body style="margin: 0"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Backstage is an open 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"/><title>Techdocs Preview App</title><script defer="defer" src="/static/runtime.045916e2.js"></script><script defer="defer" src="/static/module-material-ui.ecd3d63b.js"></script><script defer="defer" src="/static/module-lodash.5fc3fe8a.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.ffd83fbb.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.da6c1d82.js"></script><script defer="defer" src="/static/module-hot-loader.ec8a2690.js"></script><script defer="defer" src="/static/vendor.045916e2.js"></script><script defer="defer" src="/static/main.045916e2.js"></script></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
|
@@ -0,0 +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(85653),c=n(2784),o=n(41682);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.ddfb7621.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/1553.
|
|
1
|
+
{"version":3,"file":"static/1553.ddfb7621.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,6TCId,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":""}
|
|
@@ -0,0 +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(85653),l=n(52160),r=n(2784),c=n(79692),o=n(90436),s=n(77277),i=n(41682);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.da6d366a.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/1959.cee4ff3e.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
|
+
{"version":3,"file":"static/1959.da6d366a.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":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[3825],{43825:function(e,c,n){n.r(c),n.d(c,{SidebarSearchModal:function(){return l}});var t=n(2784),a=n(21853),o=n(41682),r=n(65678),d=n(22313);const l=e=>{const{open:c,toggleModal:n}=(0,d.Rx)(),l=e.icon?e.icon:a.Z;return t.createElement(t.Fragment,null,t.createElement(o.SidebarItem,{className:"search-icon",icon:l,text:"Search",onClick:n}),t.createElement(r.s,{open:c,toggleModal:n}))}}}]);
|
|
2
|
+
//# sourceMappingURL=3825.93a6ad0c.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/3825.93a6ad0c.chunk.js","mappings":"uPA0BO,MAAMA,EAAsBC,IACjC,MAAM,KAAEC,EAAI,YAAEC,IAAgB,UACxBC,EAAOH,EAAMI,KAAOJ,EAAMI,KAAOC,EAAA,EAEvC,OACE,gBAAoB,WAAgB,KAChC,gBAAoB,EAAAC,YAAa,CACjCC,UAAW,cACXH,KAAMD,EACNK,KAAM,SACNC,QAASP,IAET,gBAAoBQ,EAAA,EAAa,CAAET,KAAMA,EAAMC,YAAaA","sources":["webpack://embedded-techdocs-app/../../plugins/search/src/components/SidebarSearchModal/SidebarSearchModal.tsx"],"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 */\nimport React from 'react';\nimport SearchIcon from '@material-ui/icons/Search';\nimport { SidebarItem } from '@backstage/core-components';\n\nimport { SearchModal } from '../SearchModal';\nimport { useSearch } from '../SearchContext';\n\n\n\n\n\nexport const SidebarSearchModal = (props) => {\n const { open, toggleModal } = useSearch();\n const Icon = props.icon ? props.icon : SearchIcon;\n\n return (\n React.createElement(React.Fragment, null\n , React.createElement(SidebarItem, {\n className: \"search-icon\",\n icon: Icon,\n text: \"Search\",\n onClick: toggleModal,}\n )\n , React.createElement(SearchModal, { open: open, toggleModal: toggleModal,} )\n )\n );\n};\n"],"names":["SidebarSearchModal","props","open","toggleModal","Icon","icon","Search","SidebarItem","className","text","onClick","SearchModal"],"sourceRoot":""}
|
|
@@ -0,0 +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(85653),i=n(2784),c=n(41682);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.869680c7.chunk.js.map
|
package/dist/techdocs-preview-bundle/static/{390.ad5e470f.chunk.js.map → 390.869680c7.chunk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/390.
|
|
1
|
+
{"version":3,"file":"static/390.869680c7.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,6TCId,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":""}
|
|
@@ -0,0 +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(85653),o=n(2784),c=n(41682);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.28aef274.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/4022.
|
|
1
|
+
{"version":3,"file":"static/4022.28aef274.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,6TCIrB,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":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkembedded_techdocs_app=self.webpackChunkembedded_techdocs_app||[]).push([[4960],{60008:function(e,t,n){var a=n(14859),o=n(93291);t.Z=void 0;var r=o(n(2784)),i=(0,a(n(50175)).default)(r.createElement("path",{d:"M15 3l2.3 2.3-2.89 2.87 1.42 1.42L18.7 6.7 21 9V3h-6zM3 9l2.3-2.3 2.87 2.89 1.42-1.42L6.7 5.3 9 3H3v6zm6 12l-2.3-2.3 2.89-2.87-1.42-1.42L5.3 17.3 3 15v6h6zm12-6l-2.3 2.3-2.87-2.89-1.42 1.42 2.89 2.87L15 21h6v-6z"}),"ZoomOutMap");t.Z=i},14960:function(e,t,n){n.r(t),n.d(t,{SystemDiagramCard:function(){return g}});var a=n(52890),o=n(85653),r=n(79692),i=n(60364),l=n(95544),s=n(90436),d=n(60008),m=n(2784),c=n(4812),p=n(41682),u=n(36964);const h=(0,r.Z)((e=>({domainNode:{fill:e.palette.primary.main,stroke:e.palette.border},systemNode:{fill:"coral",stroke:e.palette.border},componentNode:{fill:"yellowgreen",stroke:e.palette.border},apiNode:{fill:e.palette.gold,stroke:e.palette.border},resourceNode:{fill:"grey",stroke:e.palette.border}})),{name:"PluginCatalogSystemDiagramCard"});function E(e){return(0,a.eE)(e).toLocaleLowerCase("en-US").replace(`:${a.sk}/`,":").split(":")[1]}function f(e){const t=h(),n=(0,u.useRouteRef)(o.wi),r=e.node.kind||"Component",i=(0,a.of)(e.node.id),l=e.node.name.length<20?e.node.name:`${e.node.name.slice(0,20)}...`;let s=t.componentNode;switch(r){case"Domain":s=t.domainNode;break;case"System":s=t.systemNode;break;default:s=t.componentNode;break;case"API":s=t.apiNode;break;case"Resource":s=t.resourceNode}return m.createElement("g",null,m.createElement("rect",{width:200,height:100,rx:20,className:s}),m.createElement(p.Link,{to:n({kind:r,namespace:i.namespace,name:i.name})},m.createElement("text",{x:100,y:45,textAnchor:"middle",alignmentBaseline:"baseline",style:{fontWeight:"bold"}},l)),m.createElement("text",{x:100,y:65,textAnchor:"middle",alignmentBaseline:"hanging"},e.node.kind))}function g(){const{entity:e}=(0,o.useEntity)(),t=(0,i.Z)(),n=e.metadata.name,r=(0,a.eE)(e),h=new Array,g=new Array,y=(0,u.useApi)(o.Ah),{loading:k,error:b,value:N}=(0,c.Z)((()=>y.getEntities({filter:{kind:["Component","API","Resource","System","Domain"],"spec.system":[n,`${e.metadata.namespace||a.sk}/${n}`]}})),[y,n]);h.push({id:r,kind:"System",name:E(e)});const v=(0,o.getEntityRelations)(e,a.cz,{kind:"Domain"});if(v.forEach((e=>h.push({id:(0,a.eE)(e),kind:e.kind,name:E(e)}))),v.forEach((e=>g.push({from:r,to:(0,a.eE)(e),label:"part of"}))),N&&N.items)for(const e of N.items)h.push({id:(0,a.eE)(e),kind:e.kind,name:E(e)}),(0,o.getEntityRelations)(e,a.cz).forEach((t=>g.push({from:(0,a.eE)(e),to:(0,a.eE)(t),label:"part of"}))),(0,o.getEntityRelations)(e,a.M_).forEach((t=>g.push({from:(0,a.eE)(e),to:(0,a.eE)(t),label:"provides"}))),(0,o.getEntityRelations)(e,a.nP).forEach((t=>g.push({from:(0,a.eE)(e),to:(0,a.eE)(t),label:"depends on"})));return k?m.createElement(p.Progress,null):b?m.createElement(p.ResponseErrorPanel,{error:b}):m.createElement(p.InfoCard,{title:"System Diagram"},m.createElement(p.DependencyGraph,{nodes:h,edges:g,nodeMargin:10,direction:p.DependencyGraphTypes.Nm.BOTTOM_TOP,renderNode:f,paddingX:t.spacing(4),paddingY:t.spacing(4)}),m.createElement(l.Z,{m:1}),m.createElement(s.Z,{variant:"caption",style:{display:"block",textAlign:"right"}},m.createElement(d.Z,{style:{verticalAlign:"bottom"}})," Use pinch & zoom to move around the diagram."))}}}]);
|
|
2
|
+
//# sourceMappingURL=4960.25870a82.chunk.js.map
|