@techdocs/cli 1.10.5 → 1.10.6-next.1
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 +24 -0
- package/dist/commands/index.cjs.js +4 -4
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/commands/serve/serve.cjs.js +1 -1
- package/dist/commands/serve/serve.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +137 -142
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.c7a9a606.chunk.js +1 -0
- package/dist/embedded-app/static/1659.e675bf84.chunk.js +1 -0
- package/dist/embedded-app/static/{4445.f328dda2.chunk.js → 4445.b9a2649d.chunk.js} +2 -2
- package/dist/embedded-app/static/{4445.f328dda2.chunk.js.map → 4445.b9a2649d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4587.d2528dda.chunk.js +1 -0
- package/dist/embedded-app/static/main.654208fc.js +523 -0
- package/dist/embedded-app/static/main.654208fc.js.map +1 -0
- package/dist/embedded-app/static/main.f25a5e82.css +2 -0
- package/dist/embedded-app/static/main.f25a5e82.css.map +1 -0
- package/dist/embedded-app/static/{runtime.8d2c128b.js → runtime.49204185.js} +2 -2
- package/dist/embedded-app/static/{runtime.8d2c128b.js.map → runtime.49204185.js.map} +1 -1
- package/dist/embedded-app/static/vendor.3550487b.js +6 -0
- package/dist/embedded-app/static/vendor.3550487b.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +8 -9
- package/dist/embedded-app/static/123.2cfafbf9.chunk.js +0 -1
- package/dist/embedded-app/static/1659.b83814a4.chunk.js +0 -1
- package/dist/embedded-app/static/4587.f3cdd66a.chunk.js +0 -1
- package/dist/embedded-app/static/main.1a18ff6f.js +0 -523
- package/dist/embedded-app/static/main.1a18ff6f.js.map +0 -1
- package/dist/embedded-app/static/main.b372392a.css +0 -2
- package/dist/embedded-app/static/main.b372392a.css.map +0 -1
- package/dist/embedded-app/static/vendor.e9c97626.js +0 -6
- package/dist/embedded-app/static/vendor.e9c97626.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.10.6-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/cli-common@0.2.0-next.1
|
|
9
|
+
- @backstage/plugin-techdocs-node@1.14.3-next.1
|
|
10
|
+
- @backstage/backend-defaults@0.16.0-next.1
|
|
11
|
+
- @backstage/catalog-model@1.7.6
|
|
12
|
+
- @backstage/config@1.3.6
|
|
13
|
+
|
|
14
|
+
## 1.10.6-next.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 70fc178: Migrated from deprecated `findPaths` to `targetPaths` and `findOwnPaths` from `@backstage/cli-common`.
|
|
19
|
+
- de62a9d: Upgraded `commander` dependency from `^12.0.0` to `^14.0.3` across all CLI packages.
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
- @backstage/cli-common@0.2.0-next.0
|
|
22
|
+
- @backstage/backend-defaults@0.15.3-next.0
|
|
23
|
+
- @backstage/catalog-model@1.7.6
|
|
24
|
+
- @backstage/config@1.3.6
|
|
25
|
+
- @backstage/plugin-techdocs-node@1.14.3-next.0
|
|
26
|
+
|
|
3
27
|
## 1.10.5
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -30,7 +30,7 @@ function registerCommands(program) {
|
|
|
30
30
|
"--site-name",
|
|
31
31
|
"Name for site when using default MkDocs config",
|
|
32
32
|
"Documentation Site"
|
|
33
|
-
).option("-v --verbose", "Enable verbose output.", false).option(
|
|
33
|
+
).option("-v, --verbose", "Enable verbose output.", false).option(
|
|
34
34
|
"--omitTechdocsCoreMkdocsPlugin",
|
|
35
35
|
"Don't patch MkDocs file automatically with techdocs-core plugin.",
|
|
36
36
|
false
|
|
@@ -90,7 +90,7 @@ function registerCommands(program) {
|
|
|
90
90
|
"--concurrency <MAX CONCURRENT REQS>",
|
|
91
91
|
"Optional Controls the number of API requests allowed to be performed simultaneously.",
|
|
92
92
|
"25"
|
|
93
|
-
).option("-v --verbose", "Enable verbose output.", false).action(lazy(() => import('./migrate/migrate.cjs.js'), "default"));
|
|
93
|
+
).option("-v, --verbose", "Enable verbose output.", false).action(lazy(() => import('./migrate/migrate.cjs.js'), "default"));
|
|
94
94
|
program.command("publish").description(
|
|
95
95
|
"Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc."
|
|
96
96
|
).requiredOption(
|
|
@@ -167,7 +167,7 @@ function registerCommands(program) {
|
|
|
167
167
|
"--site-name",
|
|
168
168
|
"Name for site when using default MkDocs config",
|
|
169
169
|
"Documentation Site"
|
|
170
|
-
).option("-p, --port <PORT>", "Port to serve documentation locally", "8000").option("-v --verbose", "Enable verbose output.", false).action(lazy(() => import('./serve/mkdocs.cjs.js'), "default"));
|
|
170
|
+
).option("-p, --port <PORT>", "Port to serve documentation locally", "8000").option("-v, --verbose", "Enable verbose output.", false).action(lazy(() => import('./serve/mkdocs.cjs.js'), "default"));
|
|
171
171
|
program.command("serve").description(
|
|
172
172
|
"Serve a documentation project locally in a Backstage app-like environment"
|
|
173
173
|
).option(
|
|
@@ -187,7 +187,7 @@ function registerCommands(program) {
|
|
|
187
187
|
"--site-name",
|
|
188
188
|
"Name for site when using default MkDocs config",
|
|
189
189
|
"Documentation Site"
|
|
190
|
-
).option("--mkdocs-port <PORT>", "Port for MkDocs server to use", "8000").option("-v --verbose", "Enable verbose output.", false).option(
|
|
190
|
+
).option("--mkdocs-port <PORT>", "Port for MkDocs server to use", "8000").option("-v, --verbose", "Enable verbose output.", false).option(
|
|
191
191
|
"--preview-app-bundle-path <PATH_TO_BUNDLE>",
|
|
192
192
|
"Preview documentation using another web app"
|
|
193
193
|
).option(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../src/commands/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 { Command } from 'commander';\nimport { TechdocsGenerator } from '@backstage/plugin-techdocs-node';\n\nconst defaultDockerImage = TechdocsGenerator.defaultDockerImage;\nconst defaultPreviewAppPort = '3000';\n\nexport function registerCommands(program: Command) {\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')\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(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\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 .option(\n '--legacyCopyReadmeMdToIndexMd',\n 'Attempt to ensure an index.md exists falling back to using <docs-dir>/README.md or README.md in case a default <docs-dir>/index.md is not provided.',\n false,\n )\n .option(\n '--defaultPlugin [defaultPlugins...]',\n 'Plugins which should be added automatically to the mkdocs.yaml file',\n [],\n )\n .option(\n '--runAsDefaultUser',\n 'Bypass setting the container user as the same user and group id as host for Linux and MacOS',\n false,\n )\n .alias('build')\n .action(lazy(() => import('./generate/generate'), '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 '--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'), '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(\n '--awsProxy <HTTPS Proxy>',\n 'Optional Proxy to use for AWS requests.',\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 '--awsBucketRootPath <AWS BUCKET ROOT PATH>',\n 'Optional sub-directory to store files in Amazon S3',\n )\n .option(\n '--awsMaxAttempts <AWS MAX ATTEMPTS>',\n 'Optional maximum number of retries for AWS S3 operations. If not specified, default value of 3 is used.',\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 <GCS BUCKET ROOT PATH>',\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'), '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 '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, run `mkdocs serve` in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\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'), '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 '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\n )\n .option('--mkdocs-port <PORT>', 'Port for MkDocs server to use', '8000')\n .option('-v --verbose', 'Enable verbose output.', false)\n .option(\n '--preview-app-bundle-path <PATH_TO_BUNDLE>',\n 'Preview documentation using another web app',\n )\n .option(\n '--preview-app-port <PORT>',\n 'Port for the preview app to be served on',\n defaultPreviewAppPort,\n )\n .option(\n '-c, --mkdocs-config-file-name <FILENAME>',\n 'Mkdocs config file name',\n )\n .option(\n '--mkdocs-parameter-clean',\n 'Pass \"--clean\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-dirtyreload',\n 'Pass \"--dirtyreload\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-strict',\n 'Pass \"--strict\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .hook('preAction', command => {\n if (\n command.opts().previewAppPort !== defaultPreviewAppPort &&\n !command.opts().previewAppBundlePath\n ) {\n command.error(\n '--preview-app-port can only be used together with --preview-app-bundle-path',\n );\n }\n })\n .action(lazy(() => import('./serve/serve'), 'default'));\n}\n\n// Humbly taken from backstage-cli's registerCommands\ntype ActionFunc = (...args: any[]) => Promise<void>;\ntype ActionExports<TModule extends object> = {\n [KName in keyof TModule as TModule[KName] extends ActionFunc\n ? KName\n : never]: TModule[KName];\n};\n\n// Wraps an action function so that it always exits and handles errors\nexport function lazy<TModule extends object>(\n moduleLoader: () => Promise<TModule>,\n exportName: keyof ActionExports<TModule>,\n): (...args: any[]) => Promise<never> {\n return async (...args: any[]) => {\n try {\n const mod = await moduleLoader();\n const actualModule = (\n mod as unknown as { default: ActionExports<TModule> }\n ).default;\n const actionFunc = actualModule[exportName] as ActionFunc;\n await actionFunc(...args);\n\n process.exit(0);\n } catch (error) {\n console.error(error.message);\n process.exit(1);\n }\n };\n}\n"],"names":["TechdocsGenerator"],"mappings":";;;;AAmBA,MAAM,qBAAqBA,oCAAA,CAAkB,kBAAA;AAC7C,MAAM,qBAAA,GAAwB,MAAA;AAEvB,SAAS,iBAAiB,OAAA,EAAkB;AACjD,EAAA,OAAA,CACG,OAAA,CAAQ,UAAU,CAAA,CAClB,WAAA,CAAY,oDAAoD,CAAA,CAChE,MAAA;AAAA,IACC,qBAAA;AAAA,IACA,6DAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,qBAAA;AAAA,IACA,sDAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA,CAAO,WAAA,EAAa,qCAAqC,CAAA,CACzD,MAAA;AAAA,IACC,aAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,gCAAA;AAAA,IACA;AAAA,GAGF,CACC,MAAA;AAAA,IACC,eAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,aAAA;AAAA,IACA,gDAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA,CAAO,cAAA,EAAgB,wBAAA,EAA0B,KAAK,CAAA,CACtD,MAAA;AAAA,IACC,gCAAA;AAAA,IACA,kEAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,+BAAA;AAAA,IACA,qJAAA;AAA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AAA;AAAA,IACA;AAAA,GACF,CACC,IAAA,CAAK,WAAA,EAAa,CAAA,OAAA,KAAW;AAC5B,IAAA,IACE,OAAA,CAAQ,MAAK,CAAE,cAAA,KAAmB,yBAClC,CAAC,OAAA,CAAQ,IAAA,EAAK,CAAE,oBAAA,EAChB;AACA,MAAA,OAAA,CAAQ,KAAA;AAAA,QACN;AAAA,OACF;AAAA,IACF;AAAA,EACF,CAAC,EACA,MAAA,CAAO,IAAA,CAAK,MAAM,OAAO,sBAAe,CAAA,EAAG,SAAS,CAAC,CAAA;AAC1D;AAWO,SAAS,IAAA,CACd,cACA,UAAA,EACoC;AACpC,EAAA,OAAO,UAAU,IAAA,KAAgB;AAC/B,IAAA,IAAI;AACF,MAAA,MAAM,GAAA,GAAM,MAAM,YAAA,EAAa;AAC/B,MAAA,MAAM,eACJ,GAAA,CACA,OAAA;AACF,MAAA,MAAM,UAAA,GAAa,aAAa,UAAU,CAAA;AAC1C,MAAA,MAAM,UAAA,CAAW,GAAG,IAAI,CAAA;AAExB,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,IAChB,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,MAAM,OAAO,CAAA;AAC3B,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,IAChB;AAAA,EACF,CAAA;AACF;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../src/commands/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 { Command } from 'commander';\nimport { TechdocsGenerator } from '@backstage/plugin-techdocs-node';\n\nconst defaultDockerImage = TechdocsGenerator.defaultDockerImage;\nconst defaultPreviewAppPort = '3000';\n\nexport function registerCommands(program: Command) {\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')\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(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\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 .option(\n '--legacyCopyReadmeMdToIndexMd',\n 'Attempt to ensure an index.md exists falling back to using <docs-dir>/README.md or README.md in case a default <docs-dir>/index.md is not provided.',\n false,\n )\n .option(\n '--defaultPlugin [defaultPlugins...]',\n 'Plugins which should be added automatically to the mkdocs.yaml file',\n [],\n )\n .option(\n '--runAsDefaultUser',\n 'Bypass setting the container user as the same user and group id as host for Linux and MacOS',\n false,\n )\n .alias('build')\n .action(lazy(() => import('./generate/generate'), '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 '--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'), '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(\n '--awsProxy <HTTPS Proxy>',\n 'Optional Proxy to use for AWS requests.',\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 '--awsBucketRootPath <AWS BUCKET ROOT PATH>',\n 'Optional sub-directory to store files in Amazon S3',\n )\n .option(\n '--awsMaxAttempts <AWS MAX ATTEMPTS>',\n 'Optional maximum number of retries for AWS S3 operations. If not specified, default value of 3 is used.',\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 <GCS BUCKET ROOT PATH>',\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'), '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 '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, run `mkdocs serve` in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\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'), '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 '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\n )\n .option('--mkdocs-port <PORT>', 'Port for MkDocs server to use', '8000')\n .option('-v, --verbose', 'Enable verbose output.', false)\n .option(\n '--preview-app-bundle-path <PATH_TO_BUNDLE>',\n 'Preview documentation using another web app',\n )\n .option(\n '--preview-app-port <PORT>',\n 'Port for the preview app to be served on',\n defaultPreviewAppPort,\n )\n .option(\n '-c, --mkdocs-config-file-name <FILENAME>',\n 'Mkdocs config file name',\n )\n .option(\n '--mkdocs-parameter-clean',\n 'Pass \"--clean\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-dirtyreload',\n 'Pass \"--dirtyreload\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-strict',\n 'Pass \"--strict\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .hook('preAction', command => {\n if (\n command.opts().previewAppPort !== defaultPreviewAppPort &&\n !command.opts().previewAppBundlePath\n ) {\n command.error(\n '--preview-app-port can only be used together with --preview-app-bundle-path',\n );\n }\n })\n .action(lazy(() => import('./serve/serve'), 'default'));\n}\n\n// Humbly taken from backstage-cli's registerCommands\ntype ActionFunc = (...args: any[]) => Promise<void>;\ntype ActionExports<TModule extends object> = {\n [KName in keyof TModule as TModule[KName] extends ActionFunc\n ? KName\n : never]: TModule[KName];\n};\n\n// Wraps an action function so that it always exits and handles errors\nexport function lazy<TModule extends object>(\n moduleLoader: () => Promise<TModule>,\n exportName: keyof ActionExports<TModule>,\n): (...args: any[]) => Promise<never> {\n return async (...args: any[]) => {\n try {\n const mod = await moduleLoader();\n const actualModule = (\n mod as unknown as { default: ActionExports<TModule> }\n ).default;\n const actionFunc = actualModule[exportName] as ActionFunc;\n await actionFunc(...args);\n\n process.exit(0);\n } catch (error) {\n console.error(error.message);\n process.exit(1);\n }\n };\n}\n"],"names":["Tech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CACd,cACA,UAAA,EACoC;AACpC,EAAA,OAAO,UAAU,IAAA,KAAgB;AAC/B,IAAA,IAAI;AACF,MAAA,MAAM,GAAA,GAAM,MAAM,YAAA,EAAa;AAC/B,MAAA,MAAM,eACJ,GAAA,CACA,OAAA;AACF,MAAA,MAAM,UAAA,GAAa,aAAa,UAAU,CAAA;AAC1C,MAAA,MAAM,UAAA,CAAW,GAAG,IAAI,CAAA;AAExB,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,IAChB,SAAS,KAAA,EAAO;AACd,MAAA,OAAA,CAAQ,KAAA,CAAM,MAAM,OAAO,CAAA;AAC3B,MAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,IAChB;AAAA,EACF,CAAA;AACF;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.cjs.js","sources":["../../../src/commands/serve/serve.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport path from 'node:path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport {
|
|
1
|
+
{"version":3,"file":"serve.cjs.js","sources":["../../../src/commands/serve/serve.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { OptionValues } from 'commander';\nimport path from 'node:path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { findOwnPaths, RunOnOutput } from '@backstage/cli-common';\nimport HTTPServer from '../../lib/httpServer';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { createLogger } from '../../lib/utility';\nimport { getMkdocsYml } from '@backstage/plugin-techdocs-node';\nimport fs from 'fs-extra';\nimport { checkIfDockerIsOperational } from './utils';\n\nfunction findPreviewBundlePath(): string {\n try {\n return path.join(\n path.dirname(require.resolve('techdocs-cli-embedded-app/package.json')),\n 'dist',\n );\n } catch {\n // If the techdocs-cli-embedded-app package is not available it means we're\n // running a published package. For published packages the preview bundle is\n // copied to dist/embedded-app be the prepack script.\n //\n // This can be tested by running `yarn pack` and extracting the resulting tarball into a directory.\n // Within the extracted directory, run `npm install --only=prod`.\n // Once that's done you can test the CLI in any directory using `node <tmp-dir>/package <command>`.\n /* eslint-disable-next-line no-restricted-syntax */\n return findOwnPaths(__dirname).resolve('dist/embedded-app');\n }\n}\n\nfunction getPreviewAppPath(opts: OptionValues): string {\n return opts.previewAppBundlePath ?? findPreviewBundlePath();\n}\n\nexport default async function serve(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n // Determine if we want to run in local dev mode or not\n // This will run the backstage http server on a different port and only used\n // for proxying mkdocs to the backstage app running locally (e.g. with webpack-dev-server)\n const isDevMode = Object.keys(process.env).includes('TECHDOCS_CLI_DEV_MODE')\n ? true\n : false;\n\n const backstageBackendPort = 7007;\n\n const mkdocsDockerAddr = `http://0.0.0.0:${opts.mkdocsPort}`;\n const mkdocsLocalAddr = `http://127.0.0.1:${opts.mkdocsPort}`;\n const mkdocsExpectedDevAddr = opts.docker\n ? mkdocsDockerAddr\n : mkdocsLocalAddr;\n const mkdocsConfigFileName = opts.mkdocsConfigFileName;\n const siteName = opts.siteName;\n\n const { path: mkdocsYmlPath, configIsTemporary } = await getMkdocsYml('./', {\n name: siteName,\n mkdocsConfigFileName,\n });\n\n // Validate that Docker is up and running\n if (opts.docker) {\n const isDockerOperational = await checkIfDockerIsOperational(logger);\n if (!isDockerOperational) {\n return;\n }\n }\n\n let mkdocsServerHasStarted = false;\n const mkdocsLogFunc: RunOnOutput = data => {\n // Sometimes the lines contain an unnecessary extra new line\n const logLines = data.toString().split('\\n');\n const logPrefix = opts.docker ? '[docker/mkdocs]' : '[mkdocs]';\n logLines.forEach(line => {\n if (line === '') {\n return;\n }\n\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !mkdocsServerHasStarted &&\n line.includes(`Serving on ${mkdocsExpectedDevAddr}`)\n ) {\n mkdocsServerHasStarted = true;\n }\n });\n };\n // mkdocs writes all of its logs to stderr by default, and not stdout.\n // https://github.com/mkdocs/mkdocs/issues/879#issuecomment-203536006\n // Had me questioning this whole implementation for half an hour.\n logger.info('Starting mkdocs server.');\n const mkdocsChildProcess = runMkdocsServer({\n port: opts.mkdocsPort,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n dockerOptions: opts.dockerOption,\n useDocker: opts.docker,\n onStdout: mkdocsLogFunc,\n onStderr: mkdocsLogFunc,\n mkdocsConfigFileName: mkdocsYmlPath,\n mkdocsParameterClean: opts.mkdocsParameterClean,\n mkdocsParameterDirtyReload: opts.mkdocsParameterDirtyreload,\n mkdocsParameterStrict: opts.mkdocsParameterStrict,\n });\n\n // Wait until mkdocs server has started so that Backstage starts with docs loaded\n // Takes 1-5 seconds\n for (let attempt = 0; attempt < 30; attempt++) {\n await new Promise(r => setTimeout(r, 3000));\n if (mkdocsServerHasStarted) {\n break;\n }\n logger.info('Waiting for mkdocs server to start...');\n }\n\n if (!mkdocsServerHasStarted) {\n logger.error(\n 'mkdocs server did not start. Exiting. Try re-running command with -v option for more details.',\n );\n }\n\n const port = isDevMode ? backstageBackendPort : opts.previewAppPort;\n const previewAppPath = getPreviewAppPath(opts);\n const httpServer = new HTTPServer(\n previewAppPath,\n port,\n mkdocsExpectedDevAddr,\n opts.verbose,\n );\n\n httpServer\n .serve()\n .catch(err => {\n logger.error('Failed to start HTTP server', err);\n mkdocsChildProcess.kill();\n process.exit(1);\n })\n .then(() => {\n // The last three things default/component/local/ don't matter. They can be anything.\n openBrowser(`http://localhost:${port}/docs/default/component/local/`);\n logger.info(\n `Serving docs in Backstage at http://localhost:${port}/docs/default/component/local/\\nOpening browser.`,\n );\n });\n\n await mkdocsChildProcess.waitForExit();\n\n if (configIsTemporary) {\n process.on('exit', async () => {\n fs.rmSync(mkdocsYmlPath, {});\n });\n }\n}\n"],"names":["path","findOwnPaths","createLogger","getMkdocsYml","checkIfDockerIsOperational","runMkdocsServer","httpServer","HTTPServer","openBrowser","fs"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,qBAAA,GAAgC;AACvC,EAAA,IAAI;AACF,IAAA,OAAOA,qBAAA,CAAK,IAAA;AAAA,MACVA,qBAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,OAAA,CAAQ,wCAAwC,CAAC,CAAA;AAAA,MACtE;AAAA,KACF;AAAA,EACF,CAAA,CAAA,MAAQ;AASN,IAAA,OAAOC,sBAAA,CAAa,SAAS,CAAA,CAAE,OAAA,CAAQ,mBAAmB,CAAA;AAAA,EAC5D;AACF;AAEA,SAAS,kBAAkB,IAAA,EAA4B;AACrD,EAAA,OAAO,IAAA,CAAK,wBAAwB,qBAAA,EAAsB;AAC5D;AAEA,eAA8B,MAAM,IAAA,EAAoB;AACtD,EAAA,MAAM,SAASC,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAKrD,EAAA,MAAM,SAAA,GAAY,OAAO,IAAA,CAAK,OAAA,CAAQ,GAAG,CAAA,CAAE,QAAA,CAAS,uBAAuB,CAAA,GACvE,IAAA,GACA,KAAA;AAEJ,EAAA,MAAM,oBAAA,GAAu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,KAAA,EAAM,CACN,KAAA,CAAM,CAAA,GAAA,KAAO;AACZ,IAAA,MAAA,CAAO,KAAA,CAAM,+BAA+B,GAAG,CAAA;AAC/C,IAAA,kBAAA,CAAmB,IAAA,EAAK;AACxB,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB,CAAC,CAAA,CACA,IAAA,CAAK,MAAM;AAEV,IAAAE,4BAAA,CAAY,CAAA,iBAAA,EAAoB,IAAI,CAAA,8BAAA,CAAgC,CAAA;AACpE,IAAA,MAAA,CAAO,IAAA;AAAA,MACL,iDAAiD,IAAI,CAAA;AAAA,gBAAA;AAAA,KACvD;AAAA,EACF,CAAC,CAAA;AAEH,EAAA,MAAM,mBAAmB,WAAA,EAAY;AAErC,EAAA,IAAI,iBAAA,EAAmB;AACrB,IAAA,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAC,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AACF;;;;"}
|
|
@@ -106,31 +106,6 @@
|
|
|
106
106
|
},
|
|
107
107
|
"path": "../cli/package.json"
|
|
108
108
|
},
|
|
109
|
-
{
|
|
110
|
-
"path": "../../plugins/permission-common/config.d.ts",
|
|
111
|
-
"value": {
|
|
112
|
-
"type": "object",
|
|
113
|
-
"properties": {
|
|
114
|
-
"permission": {
|
|
115
|
-
"description": "Configuration options for Backstage permissions and authorization",
|
|
116
|
-
"type": "object",
|
|
117
|
-
"properties": {
|
|
118
|
-
"enabled": {
|
|
119
|
-
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
120
|
-
"visibility": "frontend",
|
|
121
|
-
"type": "boolean"
|
|
122
|
-
},
|
|
123
|
-
"EXPERIMENTAL_enableBatchedRequests": {
|
|
124
|
-
"visibility": "frontend",
|
|
125
|
-
"type": "boolean"
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
131
|
-
},
|
|
132
|
-
"packageName": "@backstage/plugin-permission-common"
|
|
133
|
-
},
|
|
134
109
|
{
|
|
135
110
|
"path": "../core-app-api/config.d.ts",
|
|
136
111
|
"value": {
|
|
@@ -465,6 +440,31 @@
|
|
|
465
440
|
},
|
|
466
441
|
"packageName": "@backstage/plugin-techdocs"
|
|
467
442
|
},
|
|
443
|
+
{
|
|
444
|
+
"path": "../../plugins/permission-common/config.d.ts",
|
|
445
|
+
"value": {
|
|
446
|
+
"type": "object",
|
|
447
|
+
"properties": {
|
|
448
|
+
"permission": {
|
|
449
|
+
"description": "Configuration options for Backstage permissions and authorization",
|
|
450
|
+
"type": "object",
|
|
451
|
+
"properties": {
|
|
452
|
+
"enabled": {
|
|
453
|
+
"description": "Whether authorization is enabled in Backstage. Defaults to false, which means authorization\nrequests will be automatically allowed without invoking the authorization policy.",
|
|
454
|
+
"visibility": "frontend",
|
|
455
|
+
"type": "boolean"
|
|
456
|
+
},
|
|
457
|
+
"EXPERIMENTAL_enableBatchedRequests": {
|
|
458
|
+
"visibility": "frontend",
|
|
459
|
+
"type": "boolean"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
},
|
|
464
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
465
|
+
},
|
|
466
|
+
"packageName": "@backstage/plugin-permission-common"
|
|
467
|
+
},
|
|
468
468
|
{
|
|
469
469
|
"path": "../integration/config.d.ts",
|
|
470
470
|
"value": {
|
|
@@ -486,35 +486,8 @@
|
|
|
486
486
|
"visibility": "frontend",
|
|
487
487
|
"type": "string"
|
|
488
488
|
},
|
|
489
|
-
"token": {
|
|
490
|
-
"description": "Token used to authenticate requests.",
|
|
491
|
-
"visibility": "secret",
|
|
492
|
-
"deprecated": "Use `credentials` instead.",
|
|
493
|
-
"type": "string"
|
|
494
|
-
},
|
|
495
|
-
"credential": {
|
|
496
|
-
"description": "The credential to use for requests.\n\nIf no credential is specified anonymous access is used.",
|
|
497
|
-
"deepVisibility": "secret",
|
|
498
|
-
"deprecated": "Use `credentials` instead.",
|
|
499
|
-
"type": "object",
|
|
500
|
-
"properties": {
|
|
501
|
-
"clientId": {
|
|
502
|
-
"type": "string"
|
|
503
|
-
},
|
|
504
|
-
"clientSecret": {
|
|
505
|
-
"type": "string"
|
|
506
|
-
},
|
|
507
|
-
"tenantId": {
|
|
508
|
-
"type": "string"
|
|
509
|
-
},
|
|
510
|
-
"personalAccessToken": {
|
|
511
|
-
"type": "string"
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
},
|
|
515
489
|
"credentials": {
|
|
516
490
|
"description": "The credentials to use for requests. If multiple credentials are specified the first one that matches the organization is used.\nIf no organization matches the first credential without an organization is used.\n\nIf no credentials are specified at all, either a default credential (for Azure DevOps) or anonymous access (for Azure DevOps Server) is used.",
|
|
517
|
-
"deepVisibility": "secret",
|
|
518
491
|
"type": "array",
|
|
519
492
|
"items": {
|
|
520
493
|
"type": "object",
|
|
@@ -529,12 +502,14 @@
|
|
|
529
502
|
"type": "string"
|
|
530
503
|
},
|
|
531
504
|
"clientSecret": {
|
|
505
|
+
"visibility": "secret",
|
|
532
506
|
"type": "string"
|
|
533
507
|
},
|
|
534
508
|
"tenantId": {
|
|
535
509
|
"type": "string"
|
|
536
510
|
},
|
|
537
511
|
"personalAccessToken": {
|
|
512
|
+
"visibility": "secret",
|
|
538
513
|
"type": "string"
|
|
539
514
|
},
|
|
540
515
|
"managedIdentityClientId": {
|
|
@@ -590,7 +565,6 @@
|
|
|
590
565
|
},
|
|
591
566
|
"aadCredential": {
|
|
592
567
|
"description": "Optional credential to use for Azure Active Directory authentication.",
|
|
593
|
-
"deepVisibility": "secret",
|
|
594
568
|
"type": "object",
|
|
595
569
|
"properties": {
|
|
596
570
|
"clientId": {
|
|
@@ -603,6 +577,7 @@
|
|
|
603
577
|
},
|
|
604
578
|
"clientSecret": {
|
|
605
579
|
"description": "The client secret for the Azure AD application.",
|
|
580
|
+
"visibility": "secret",
|
|
606
581
|
"type": "string"
|
|
607
582
|
}
|
|
608
583
|
},
|
|
@@ -615,49 +590,6 @@
|
|
|
615
590
|
}
|
|
616
591
|
}
|
|
617
592
|
},
|
|
618
|
-
"bitbucket": {
|
|
619
|
-
"description": "Integration configuration for Bitbucket",
|
|
620
|
-
"deprecated": "replaced by bitbucketCloud and bitbucketServer",
|
|
621
|
-
"type": "array",
|
|
622
|
-
"items": {
|
|
623
|
-
"type": "object",
|
|
624
|
-
"properties": {
|
|
625
|
-
"host": {
|
|
626
|
-
"description": "The hostname of the given Bitbucket instance",
|
|
627
|
-
"visibility": "frontend",
|
|
628
|
-
"type": "string"
|
|
629
|
-
},
|
|
630
|
-
"token": {
|
|
631
|
-
"description": "Token used to authenticate requests.",
|
|
632
|
-
"visibility": "secret",
|
|
633
|
-
"type": "string"
|
|
634
|
-
},
|
|
635
|
-
"apiBaseUrl": {
|
|
636
|
-
"description": "The base url for the Bitbucket API, for example https://api.bitbucket.org/2.0",
|
|
637
|
-
"visibility": "frontend",
|
|
638
|
-
"type": "string"
|
|
639
|
-
},
|
|
640
|
-
"username": {
|
|
641
|
-
"description": "The username to use for authenticated requests.",
|
|
642
|
-
"visibility": "secret",
|
|
643
|
-
"type": "string"
|
|
644
|
-
},
|
|
645
|
-
"appPassword": {
|
|
646
|
-
"description": "Bitbucket app password used to authenticate requests.",
|
|
647
|
-
"visibility": "secret",
|
|
648
|
-
"type": "string"
|
|
649
|
-
},
|
|
650
|
-
"commitSigningKey": {
|
|
651
|
-
"description": "PGP signing key for signing commits.",
|
|
652
|
-
"visibility": "secret",
|
|
653
|
-
"type": "string"
|
|
654
|
-
}
|
|
655
|
-
},
|
|
656
|
-
"required": [
|
|
657
|
-
"host"
|
|
658
|
-
]
|
|
659
|
-
}
|
|
660
|
-
},
|
|
661
593
|
"bitbucketCloud": {
|
|
662
594
|
"description": "Integration configuration for Bitbucket Cloud",
|
|
663
595
|
"type": "array",
|
|
@@ -907,6 +839,31 @@
|
|
|
907
839
|
"description": "PGP signing key for signing commits.",
|
|
908
840
|
"visibility": "secret",
|
|
909
841
|
"type": "string"
|
|
842
|
+
},
|
|
843
|
+
"retry": {
|
|
844
|
+
"description": "Retry configuration for requests.",
|
|
845
|
+
"visibility": "frontend",
|
|
846
|
+
"type": "object",
|
|
847
|
+
"properties": {
|
|
848
|
+
"maxRetries": {
|
|
849
|
+
"description": "Maximum number of retries for failed requests.",
|
|
850
|
+
"visibility": "frontend",
|
|
851
|
+
"type": "number"
|
|
852
|
+
},
|
|
853
|
+
"retryStatusCodes": {
|
|
854
|
+
"description": "HTTP status codes that should trigger a retry.",
|
|
855
|
+
"visibility": "frontend",
|
|
856
|
+
"type": "array",
|
|
857
|
+
"items": {
|
|
858
|
+
"type": "number"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"maxApiRequestsPerMinute": {
|
|
862
|
+
"description": "Maximum number of API requests allowed per minute. Set to -1 to disable rate limiting.",
|
|
863
|
+
"visibility": "frontend",
|
|
864
|
+
"type": "number"
|
|
865
|
+
}
|
|
866
|
+
}
|
|
910
867
|
}
|
|
911
868
|
},
|
|
912
869
|
"required": [
|
|
@@ -1258,52 +1215,6 @@
|
|
|
1258
1215
|
},
|
|
1259
1216
|
"packageName": "@backstage/backend-plugin-api"
|
|
1260
1217
|
},
|
|
1261
|
-
{
|
|
1262
|
-
"path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
|
|
1263
|
-
"value": {
|
|
1264
|
-
"type": "object",
|
|
1265
|
-
"properties": {
|
|
1266
|
-
"auth": {
|
|
1267
|
-
"description": "Configuration options for the auth plugin",
|
|
1268
|
-
"type": "object",
|
|
1269
|
-
"properties": {
|
|
1270
|
-
"providers": {
|
|
1271
|
-
"type": "object",
|
|
1272
|
-
"properties": {
|
|
1273
|
-
"guest": {
|
|
1274
|
-
"type": "object",
|
|
1275
|
-
"properties": {
|
|
1276
|
-
"userEntityRef": {
|
|
1277
|
-
"description": "The entity reference to use for the guest user.",
|
|
1278
|
-
"default": "user:development/guest",
|
|
1279
|
-
"type": "string"
|
|
1280
|
-
},
|
|
1281
|
-
"ownershipEntityRefs": {
|
|
1282
|
-
"description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
|
|
1283
|
-
"default": "[userEntityRef]",
|
|
1284
|
-
"type": "array",
|
|
1285
|
-
"items": {
|
|
1286
|
-
"type": "string"
|
|
1287
|
-
}
|
|
1288
|
-
},
|
|
1289
|
-
"dangerouslyAllowOutsideDevelopment": {
|
|
1290
|
-
"description": "Allow users to sign in with the guest provider outside of their development environments.",
|
|
1291
|
-
"type": "boolean"
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
},
|
|
1298
|
-
"required": [
|
|
1299
|
-
"providers"
|
|
1300
|
-
]
|
|
1301
|
-
}
|
|
1302
|
-
},
|
|
1303
|
-
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1304
|
-
},
|
|
1305
|
-
"packageName": "@backstage/plugin-auth-backend-module-guest-provider"
|
|
1306
|
-
},
|
|
1307
1218
|
{
|
|
1308
1219
|
"path": "../../plugins/auth-backend/config.d.ts",
|
|
1309
1220
|
"value": {
|
|
@@ -1509,6 +1420,52 @@
|
|
|
1509
1420
|
},
|
|
1510
1421
|
"packageName": "@backstage/plugin-auth-backend"
|
|
1511
1422
|
},
|
|
1423
|
+
{
|
|
1424
|
+
"path": "../../plugins/auth-backend-module-guest-provider/config.d.ts",
|
|
1425
|
+
"value": {
|
|
1426
|
+
"type": "object",
|
|
1427
|
+
"properties": {
|
|
1428
|
+
"auth": {
|
|
1429
|
+
"description": "Configuration options for the auth plugin",
|
|
1430
|
+
"type": "object",
|
|
1431
|
+
"properties": {
|
|
1432
|
+
"providers": {
|
|
1433
|
+
"type": "object",
|
|
1434
|
+
"properties": {
|
|
1435
|
+
"guest": {
|
|
1436
|
+
"type": "object",
|
|
1437
|
+
"properties": {
|
|
1438
|
+
"userEntityRef": {
|
|
1439
|
+
"description": "The entity reference to use for the guest user.",
|
|
1440
|
+
"default": "user:development/guest",
|
|
1441
|
+
"type": "string"
|
|
1442
|
+
},
|
|
1443
|
+
"ownershipEntityRefs": {
|
|
1444
|
+
"description": "A list of entity references to user for ownership of the guest user if the user\n is not found in the catalog.",
|
|
1445
|
+
"default": "[userEntityRef]",
|
|
1446
|
+
"type": "array",
|
|
1447
|
+
"items": {
|
|
1448
|
+
"type": "string"
|
|
1449
|
+
}
|
|
1450
|
+
},
|
|
1451
|
+
"dangerouslyAllowOutsideDevelopment": {
|
|
1452
|
+
"description": "Allow users to sign in with the guest provider outside of their development environments.",
|
|
1453
|
+
"type": "boolean"
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
},
|
|
1460
|
+
"required": [
|
|
1461
|
+
"providers"
|
|
1462
|
+
]
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
1466
|
+
},
|
|
1467
|
+
"packageName": "@backstage/plugin-auth-backend-module-guest-provider"
|
|
1468
|
+
},
|
|
1512
1469
|
{
|
|
1513
1470
|
"path": "../backend-app-api/config.d.ts",
|
|
1514
1471
|
"value": {
|
|
@@ -2341,6 +2298,11 @@
|
|
|
2341
2298
|
"type": "object",
|
|
2342
2299
|
"additionalProperties": {},
|
|
2343
2300
|
"properties": {
|
|
2301
|
+
"type": {
|
|
2302
|
+
"description": "The rest config for default, regular connections",
|
|
2303
|
+
"const": "default",
|
|
2304
|
+
"type": "string"
|
|
2305
|
+
},
|
|
2344
2306
|
"password": {
|
|
2345
2307
|
"description": "Password that belongs to the client User",
|
|
2346
2308
|
"visibility": "secret",
|
|
@@ -3032,6 +2994,39 @@
|
|
|
3032
2994
|
}
|
|
3033
2995
|
}
|
|
3034
2996
|
},
|
|
2997
|
+
"metrics": {
|
|
2998
|
+
"description": "Options for the metrics service.",
|
|
2999
|
+
"type": "object",
|
|
3000
|
+
"properties": {
|
|
3001
|
+
"plugin": {
|
|
3002
|
+
"description": "Plugin-specific metrics configuration. Each plugin can override meter metadata.",
|
|
3003
|
+
"type": "object",
|
|
3004
|
+
"additionalProperties": {
|
|
3005
|
+
"type": "object",
|
|
3006
|
+
"properties": {
|
|
3007
|
+
"meter": {
|
|
3008
|
+
"description": "Meter configuration for this plugin.",
|
|
3009
|
+
"type": "object",
|
|
3010
|
+
"properties": {
|
|
3011
|
+
"name": {
|
|
3012
|
+
"description": "Custom meter name. If not set, defaults to backstage-plugin-{pluginId}.",
|
|
3013
|
+
"type": "string"
|
|
3014
|
+
},
|
|
3015
|
+
"version": {
|
|
3016
|
+
"description": "Version for the meter.",
|
|
3017
|
+
"type": "string"
|
|
3018
|
+
},
|
|
3019
|
+
"schemaUrl": {
|
|
3020
|
+
"description": "Schema URL for the meter.",
|
|
3021
|
+
"type": "string"
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
},
|
|
3035
3030
|
"logger": {
|
|
3036
3031
|
"description": "Options to configure the default RootLoggerService.",
|
|
3037
3032
|
"type": "object",
|
|
@@ -1,4 +1,4 @@
|
|
|
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="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.
|
|
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="color-scheme" content="light dark"/><meta name="description" content="Backstage is an open source framework for building developer portals"/><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"/><link rel="icon" href="/favicon.ico"/><link rel="shortcut icon" href="/favicon.ico"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5"/><title>Techdocs Preview App</title><meta name="backstage-app-mode" content="public"><script defer="defer" src="/static/runtime.49204185.js"></script><script defer="defer" src="/static/module-material-ui.31647b41.js"></script><script defer="defer" src="/static/module-lodash.c8595dcc.js"></script><script defer="defer" src="/static/module-react-aria.2ae7b382.js"></script><script defer="defer" src="/static/module-ajv.ac283755.js"></script><script defer="defer" src="/static/module-mui.9c07ad9e.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer="defer" src="/static/module-parse5.94980036.js"></script><script defer="defer" src="/static/module-zod.60f202c8.js"></script><script defer="defer" src="/static/module-react-dom.c631e87d.js"></script><script defer="defer" src="/static/module-react-hook-form.1d49754b.js"></script><script defer="defer" src="/static/module-i18next.c154323c.js"></script><script defer="defer" src="/static/module-remixicon.bd2a125c.js"></script><script defer="defer" src="/static/module-remix-run.0c80eb31.js"></script><script defer="defer" src="/static/vendor.3550487b.js"></script><script defer="defer" src="/static/main.654208fc.js"></script><link href="/static/main.f25a5e82.css" rel="stylesheet"><script type="backstage.io/config">[
|
|
2
2
|
{
|
|
3
3
|
"context": "app-config.yaml",
|
|
4
4
|
"data": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
color="#5bbad5"
|
|
44
44
|
/>
|
|
45
45
|
<title><%= config.getString('app.title') %></title>
|
|
46
|
-
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.
|
|
46
|
+
<meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.49204185.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.31647b41.js"></script><script defer src="<%= publicPath %>/static/module-lodash.c8595dcc.js"></script><script defer src="<%= publicPath %>/static/module-react-aria.2ae7b382.js"></script><script defer src="<%= publicPath %>/static/module-ajv.ac283755.js"></script><script defer src="<%= publicPath %>/static/module-mui.9c07ad9e.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.d049c8fc.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036.js"></script><script defer src="<%= publicPath %>/static/module-zod.60f202c8.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87d.js"></script><script defer src="<%= publicPath %>/static/module-react-hook-form.1d49754b.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c.js"></script><script defer src="<%= publicPath %>/static/module-remixicon.bd2a125c.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.0c80eb31.js"></script><script defer src="<%= publicPath %>/static/vendor.3550487b.js"></script><script defer src="<%= publicPath %>/static/main.654208fc.js"></script><link href="<%= publicPath %>/static/main.f25a5e82.css" rel="stylesheet"></head>
|
|
47
47
|
<body>
|
|
48
48
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
49
49
|
<div id="root"></div>
|