@techdocs/cli 0.8.15 → 0.8.16
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 +10 -0
- package/dist/cjs/{generate-86756c8c.cjs.js → generate-20171bf9.cjs.js} +6 -2
- package/dist/cjs/generate-20171bf9.cjs.js.map +1 -0
- package/dist/embedded-app/.config-schema.json +1 -1
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js → 1553.8d50cd6e.chunk.js} +2 -2
- package/dist/embedded-app/static/{1553.3f1fcd49.chunk.js.map → 1553.8d50cd6e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1959.657c7008.chunk.js → 1959.3c856a1e.chunk.js} +2 -2
- package/dist/embedded-app/static/{1959.657c7008.chunk.js.map → 1959.3c856a1e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{2426.82184352.chunk.js → 2426.0fc592b4.chunk.js} +2 -2
- package/dist/embedded-app/static/{2426.82184352.chunk.js.map → 2426.0fc592b4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js → 390.879c2086.chunk.js} +2 -2
- package/dist/embedded-app/static/{390.9bae5f6b.chunk.js.map → 390.879c2086.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4022.919281f3.chunk.js → 4022.0fe21618.chunk.js} +2 -2
- package/dist/embedded-app/static/{4022.919281f3.chunk.js.map → 4022.0fe21618.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js → 6105.6eda23ad.chunk.js} +1 -1
- package/dist/embedded-app/static/{6105.1f3a3239.chunk.js.map → 6105.6eda23ad.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js → 6235.c0346cdc.chunk.js} +2 -2
- package/dist/embedded-app/static/{6235.d2d64119.chunk.js.map → 6235.c0346cdc.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6583.ad8c5d41.chunk.js +3 -0
- package/dist/embedded-app/static/6583.ad8c5d41.chunk.js.map +1 -0
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js +3 -0
- package/dist/embedded-app/static/7110.5f7b5114.chunk.js.map +1 -0
- package/dist/embedded-app/static/7758.2fe27149.chunk.js +3 -0
- package/dist/embedded-app/static/{7758.5616a290.chunk.js.map → 7758.2fe27149.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js → 8061.8b41800d.chunk.js} +2 -2
- package/dist/embedded-app/static/{8061.4cacfdc7.chunk.js.map → 8061.8b41800d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js → 8718.8a863f87.chunk.js} +1 -1
- package/dist/embedded-app/static/{8718.cb2cefe2.chunk.js.map → 8718.8a863f87.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js → 8792.c72ab612.chunk.js} +2 -2
- package/dist/embedded-app/static/{8792.f347f8eb.chunk.js.map → 8792.c72ab612.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js → 9028.decd1f17.chunk.js} +2 -2
- package/dist/embedded-app/static/{9028.e0a4340b.chunk.js.map → 9028.decd1f17.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.a73a2a40.js +444 -0
- package/dist/embedded-app/static/main.a73a2a40.js.map +1 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js +25 -0
- package/dist/embedded-app/static/module-hot-loader.7c7a4226.js.map +1 -0
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js → module-material-ui.3c0e2d92.js} +6 -6
- package/dist/embedded-app/static/{module-material-ui.c0e7547f.js.map → module-material-ui.3c0e2d92.js.map} +1 -1
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js → module-react-beautiful-dnd.2ab2ffc2.js} +2 -2
- package/dist/embedded-app/static/{module-react-beautiful-dnd.bcb66a0c.js.map → module-react-beautiful-dnd.2ab2ffc2.js.map} +1 -1
- package/dist/embedded-app/static/{runtime.287af9cc.js → runtime.a73a2a40.js} +2 -2
- package/dist/embedded-app/static/runtime.a73a2a40.js.map +1 -0
- package/dist/embedded-app/static/vendor.a73a2a40.js +140 -0
- package/dist/embedded-app/static/vendor.a73a2a40.js.map +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/cjs/generate-86756c8c.cjs.js.map +0 -1
- package/dist/embedded-app/static/6583.fc990b80.chunk.js +0 -3
- package/dist/embedded-app/static/6583.fc990b80.chunk.js.map +0 -1
- package/dist/embedded-app/static/7758.5616a290.chunk.js +0 -3
- package/dist/embedded-app/static/main.287af9cc.js +0 -415
- package/dist/embedded-app/static/main.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/module-react-dom.40a0584f.js +0 -18
- package/dist/embedded-app/static/module-react-dom.40a0584f.js.map +0 -1
- package/dist/embedded-app/static/runtime.287af9cc.js.map +0 -1
- package/dist/embedded-app/static/vendor.287af9cc.js +0 -147
- package/dist/embedded-app/static/vendor.287af9cc.js.map +0 -1
package/dist/index.cjs.js
CHANGED
|
@@ -9,7 +9,7 @@ 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. url: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-
|
|
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. url: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).option("--omitTechdocsCoreMkdocsPlugin", "Don't patch MkDocs file automatically with techdocs-core plugin.", false).alias("build").action(lazy(() => Promise.resolve().then(function () { return require('./cjs/generate-20171bf9.cjs.js'); }).then((m) => m.default)));
|
|
13
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
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
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)));
|
|
@@ -28,7 +28,7 @@ function lazy(getActionFunc) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
var version = "0.8.
|
|
31
|
+
var version = "0.8.16";
|
|
32
32
|
|
|
33
33
|
const main = (argv) => {
|
|
34
34
|
program__default["default"].name("techdocs-cli").version(version);
|
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. url: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,wTAID,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;;"}
|
|
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. url: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 .option(\n '--omitTechdocsCoreMkdocsPlugin',\n \"Don't patch MkDocs file automatically with techdocs-core plugin.\",\n false,\n )\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,wTAID,OACC,iBACA,uHAED,OAAO,gBAAgB,0BAA0B,OACjD,OACC,kCACA,oEACA,OAED,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;;;;ACpOnB,MAAM,OAAO,CAAC,SAAmB;AAC/B,8BAAQ,KAAK,gBAAgB,QAAQ;AAErC,mBAAiBC;AAEjB,8BAAQ,MAAM;AAAA;AAGhB,KAAK,QAAQ;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@techdocs/cli",
|
|
3
3
|
"description": "Utility CLI for managing TechDocs sites in Backstage.",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.16",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"techdocs-cli": "bin/techdocs-cli"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@backstage/cli": "^0.
|
|
40
|
+
"@backstage/cli": "^0.15.0",
|
|
41
41
|
"@types/commander": "^2.12.2",
|
|
42
42
|
"@types/fs-extra": "^9.0.6",
|
|
43
43
|
"@types/http-proxy": "^1.17.4",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"cypress-plugin-snapshots": "^1.4.4",
|
|
50
50
|
"find-process": "^1.4.5",
|
|
51
51
|
"nodemon": "^2.0.2",
|
|
52
|
-
"techdocs-cli-embedded-app": "^0.2.
|
|
52
|
+
"techdocs-cli-embedded-app": "^0.2.66",
|
|
53
53
|
"ts-node": "^10.0.0"
|
|
54
54
|
},
|
|
55
55
|
"files": [
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"ext": "ts"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@backstage/backend-common": "^0.
|
|
66
|
-
"@backstage/catalog-model": "^0.
|
|
65
|
+
"@backstage/backend-common": "^0.12.0",
|
|
66
|
+
"@backstage/catalog-model": "^0.12.0",
|
|
67
67
|
"@backstage/cli-common": "^0.1.8",
|
|
68
68
|
"@backstage/config": "^0.1.15",
|
|
69
|
-
"@backstage/techdocs-common": "^0.11.
|
|
69
|
+
"@backstage/techdocs-common": "^0.11.11",
|
|
70
70
|
"@types/dockerode": "^3.3.0",
|
|
71
71
|
"commander": "^6.1.0",
|
|
72
72
|
"dockerode": "^3.3.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"serve-handler": "^6.1.3",
|
|
77
77
|
"winston": "^3.2.1"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "04bb0dd824b78f6b57dac62c3015e681f094045c"
|
|
80
80
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-86756c8c.cjs.js","sources":["../../src/commands/generate/generate.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve } from 'path';\nimport { Command } from 'commander';\nimport fs from 'fs-extra';\nimport Docker from 'dockerode';\nimport {\n TechdocsGenerator,\n ParsedLocationAnnotation,\n} from '@backstage/techdocs-common';\nimport { DockerContainerRunner } from '@backstage/backend-common';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n} from '../../lib/utility';\nimport { stdout } from 'process';\n\nexport default async function generate(cmd: Command) {\n // Use techdocs-common package to generate docs. Keep consistency between Backstage and CI generating docs.\n // Docs can be prepared using actions/checkout or git clone, or similar paradigms on CI. The TechDocs CI workflow\n // will run on the CI pipeline containing the documentation files.\n\n const logger = createLogger({ verbose: cmd.verbose });\n\n const sourceDir = resolve(cmd.sourceDir);\n const outputDir = resolve(cmd.outputDir);\n const dockerImage = cmd.dockerImage;\n const pullImage = cmd.pull;\n\n logger.info(`Using source dir ${sourceDir}`);\n logger.info(`Will output generated files in ${outputDir}`);\n\n logger.verbose('Creating output directory if it does not exist.');\n\n await fs.ensureDir(outputDir);\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: cmd.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n },\n },\n });\n\n // Docker client (conditionally) used by the generators, based on techdocs.generators config.\n const dockerClient = new Docker();\n const containerRunner = new DockerContainerRunner({ dockerClient });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (cmd.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n cmd.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n // Generate docs using @backstage/techdocs-common\n const techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n containerRunner,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.run({\n inputDir: sourceDir,\n outputDir,\n ...(cmd.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag: cmd.etag,\n ...(process.env.LOG_LEVEL === 'debug' ? { logStream: stdout } : {}),\n });\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","fs","config","ConfigReader","Docker","DockerContainerRunner","convertTechDocsRefToLocationAnnotation","TechdocsGenerator","stdout"],"mappings":";;;;;;;;;;;;;;;;;wBAgCuC,KAAc;AAKnD,QAAM,SAASA,qBAAa,EAAE,SAAS,IAAI;AAE3C,QAAM,YAAYC,aAAQ,IAAI;AAC9B,QAAM,YAAYA,aAAQ,IAAI;AAC9B,QAAM,cAAc,IAAI;AACxB,QAAM,YAAY,IAAI;AAEtB,SAAO,KAAK,oBAAoB;AAChC,SAAO,KAAK,kCAAkC;AAE9C,SAAO,QAAQ;AAEf,QAAMC,uBAAG,UAAU;AAEnB,QAAMC,WAAS,IAAIC,oBAAa;AAAA,IAC9B,UAAU;AAAA,MACR,WAAW;AAAA,QACT,OAAO,IAAI,SAAS,WAAW;AAAA,QAC/B;AAAA,QACA;AAAA;AAAA;AAAA;AAMN,QAAM,eAAe,IAAIC;AACzB,QAAM,kBAAkB,IAAIC,oCAAsB,EAAE;AAEpD,MAAI,2BAA2B;AAC/B,MAAI,IAAI,aAAa;AACnB,QAAI;AACF,iCAA2BC,+CACzB,IAAI;AAAA,aAEC,KAAP;AACA,aAAO,MAAM,IAAI;AAAA;AAAA;AAKrB,QAAM,oBAAoB,MAAMC,iCAAkB,WAAWL,UAAQ;AAAA,IACnE;AAAA,IACA;AAAA;AAGF,SAAO,KAAK;AAEZ,QAAM,kBAAkB,IAAI;AAAA,IAC1B,UAAU;AAAA,IACV;AAAA,OACI,IAAI,cACJ;AAAA,MACE;AAAA,QAEF;AAAA,IACJ;AAAA,IACA,MAAM,IAAI;AAAA,OACN,QAAQ,IAAI,cAAc,UAAU,EAAE,WAAWM,qBAAW;AAAA;AAGlE,SAAO,KAAK;AAAA;;;;"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[6583],{96583:function(A,o,t){t.r(o),t.d(o,{CatalogEntityPage:function(){return v}});var r=t(2784),s=t(10289),a=t(31423),e=t(36964),p=t(77446);const g=()=>{const{kind:c,namespace:i,name:n}=(0,e.useRouteRefParams)(a.entityRouteRef),u=(0,s.s0)(),l=(0,e.useApi)(e.errorApiRef),d=(0,e.useApi)(a.catalogApiRef),{value:f,error:y,loading:m,retry:E}=(0,p.Z)(()=>d.getEntityByName({kind:c,namespace:i,name:n}),[d,c,i,n]);return(0,r.useEffect)(()=>{n||(l.post(new Error("No name provided!")),u("/"))},[l,u,y,m,f,n]),{entity:f,loading:m,error:y,refresh:E}};function v(){return r.createElement(a.AsyncEntityProvider,{...g()},r.createElement(s.j3,null))}}}]);})();
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=6583.fc990b80.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/useEntityFromUrl.ts","webpack://techdocs-cli-embedded-app/../node_modules/@sucrase/webpack-loader/dist/plugins/catalog/src/components/CatalogEntityPage/CatalogEntityPage.tsx"],"names":[],"mappings":"oQA8BO,KAAM,GAAmB,IAAM,CACpC,KAAM,CAAE,OAAM,YAAW,QAAS,wBAAkB,kBAC9C,EAAW,WACX,EAAW,aAAO,eAClB,EAAa,aAAO,iBAEpB,CACJ,MAAO,EACP,QACA,UACA,MAAO,GACL,QACF,IAAM,EAAW,gBAAgB,CAAE,OAAM,YAAW,SACpD,CAAC,EAAY,EAAM,EAAW,IAGhC,sBAAU,IAAM,CACT,GACH,GAAS,KAAK,GAAI,OAAM,sBACxB,EAAS,OAEV,CAAC,EAAU,EAAU,EAAO,EAAS,EAAQ,IAEzC,CAAE,SAAQ,UAAS,QAAO,YC/B5B,YAA6B,CAClC,MACE,iBAAoB,sBAAqB,IAAK,KAC1C,gBAAoB,KAAQ","file":"static/6583.fc990b80.chunk.js","sourcesContent":["/*\n * Copyright 2022 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n errorApiRef,\n useApi,\n useRouteRefParams,\n} from '@backstage/core-plugin-api';\nimport {\n catalogApiRef,\n\n entityRouteRef,\n} from '@backstage/plugin-catalog-react';\nimport { useEffect } from 'react';\nimport { useNavigate } from 'react-router';\nimport useAsyncRetry from 'react-use/lib/useAsyncRetry';\n\nexport const useEntityFromUrl = () => {\n const { kind, namespace, name } = useRouteRefParams(entityRouteRef);\n const navigate = useNavigate();\n const errorApi = useApi(errorApiRef);\n const catalogApi = useApi(catalogApiRef);\n\n const {\n value: entity,\n error,\n loading,\n retry: refresh,\n } = useAsyncRetry(\n () => catalogApi.getEntityByName({ kind, namespace, name }),\n [catalogApi, kind, namespace, name],\n );\n\n useEffect(() => {\n if (!name) {\n errorApi.post(new Error('No name provided!'));\n navigate('/');\n }\n }, [errorApi, navigate, error, loading, entity, name]);\n\n return { entity, loading, error, refresh };\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { Outlet } from 'react-router';\nimport { AsyncEntityProvider } from '@backstage/plugin-catalog-react';\nimport { useEntityFromUrl } from './useEntityFromUrl';\n\n/** @public */\nexport function CatalogEntityPage() {\n return (\n React.createElement(AsyncEntityProvider, { ...useEntityFromUrl(),}\n , React.createElement(Outlet, null )\n )\n );\n}\n"],"sourceRoot":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[7758],{7758:function(h,r,t){t.r(r),t.d(r,{CatalogPage:function(){return f},DefaultCatalogPage:function(){return i}});var e=t(2784),E=t(10289),l=t(9118),a=t(36964),n=t(31423),g=t(47851),d=t(30097),o=t(26997),C=t(49782);function i(c){var s;const{columns:u,actions:y,initiallySelectedFilter:P="owned"}=c,v=(s=(0,a.useApi)(a.configApiRef).getOptionalString("organization.name"))!=null?s:"Backstage",m=(0,a.useRouteRef)(g.y);return e.createElement(l.PageWithHeader,{title:`${v} Catalog`,themeId:"home"},e.createElement(n.EntityListProvider,null,e.createElement(l.Content,null,e.createElement(l.ContentHeader,{titleComponent:e.createElement(C.K,null)},e.createElement(l.CreateButton,{title:"Create Component",to:m&&m()}),e.createElement(l.SupportButton,null,"All your software catalog entities")),e.createElement(o.q7,null,e.createElement(o.Gh,null,e.createElement(n.EntityTypePicker,null),e.createElement(n.UserListPicker,{initialFilter:P}),e.createElement(n.EntityOwnerPicker,null),e.createElement(n.EntityLifecyclePicker,null),e.createElement(n.EntityTagPicker,null)),e.createElement(o.Nz,null,e.createElement(d.E,{columns:u,actions:y}))))))}function f(c){return(0,E.pC)()||e.createElement(i,{...c})}}}]);})();
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=7758.5616a290.chunk.js.map
|