@techdocs/cli 1.14.1-next.1 → 1.14.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 +6 -19
- package/dist/commands/generate/generate.cjs.js +3 -1
- package/dist/commands/generate/generate.cjs.js.map +1 -1
- package/dist/commands/index.cjs.js +4 -0
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +26 -2
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.b7794a0eee64.chunk.js +2 -0
- package/dist/embedded-app/static/123.b7794a0eee64.chunk.js.map +1 -0
- package/dist/embedded-app/static/1435.8322a7d8da03.chunk.js +2 -0
- package/dist/embedded-app/static/1435.8322a7d8da03.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.b8b0e908d038.chunk.js +2 -0
- package/dist/embedded-app/static/1659.b8b0e908d038.chunk.js.map +1 -0
- package/dist/embedded-app/static/1749.682df5396a43.chunk.js +2 -0
- package/dist/embedded-app/static/1749.682df5396a43.chunk.js.map +1 -0
- package/dist/embedded-app/static/1767.9f5e3fa87f62.chunk.js +2 -0
- package/dist/embedded-app/static/1767.9f5e3fa87f62.chunk.js.map +1 -0
- package/dist/embedded-app/static/1994.e9f61042da84.chunk.js +2 -0
- package/dist/embedded-app/static/1994.e9f61042da84.chunk.js.map +1 -0
- package/dist/embedded-app/static/2295.6b18a59669de.chunk.js +5 -0
- package/dist/embedded-app/static/2295.6b18a59669de.chunk.js.map +1 -0
- package/dist/embedded-app/static/2360.c15ceaf7a336.chunk.js +2 -0
- package/dist/embedded-app/static/2360.c15ceaf7a336.chunk.js.map +1 -0
- package/dist/embedded-app/static/{2668.420a5986c298.chunk.js → 2668.70ce80bd9574.chunk.js} +2 -2
- package/dist/embedded-app/static/{2668.420a5986c298.chunk.js.map → 2668.70ce80bd9574.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3031.a64485c78a5e.chunk.js +2 -0
- package/dist/embedded-app/static/{3031.3ad03b75f7d6.chunk.js.map → 3031.a64485c78a5e.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{3554.3dc8d75e4b1f.chunk.js → 3554.43b3a3c60b33.chunk.js} +2 -2
- package/dist/embedded-app/static/{3554.3dc8d75e4b1f.chunk.js.map → 3554.43b3a3c60b33.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4587.fa2bf602f965.chunk.js +2 -0
- package/dist/embedded-app/static/4587.fa2bf602f965.chunk.js.map +1 -0
- package/dist/embedded-app/static/{4591.47a06af79fef.chunk.js → 4591.d741c025cb8a.chunk.js} +2 -2
- package/dist/embedded-app/static/{4591.47a06af79fef.chunk.js.map → 4591.d741c025cb8a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4609.afdaf67e3d37.chunk.js +531 -0
- package/dist/embedded-app/static/4609.afdaf67e3d37.chunk.js.map +1 -0
- package/dist/embedded-app/static/4648.0de68968e5e2.chunk.js +2 -0
- package/dist/embedded-app/static/4648.0de68968e5e2.chunk.js.map +1 -0
- package/dist/embedded-app/static/{5124.7da4bbeaafd0.chunk.js → 5124.bf809bc06c78.chunk.js} +2 -2
- package/dist/embedded-app/static/{5124.7da4bbeaafd0.chunk.js.map → 5124.bf809bc06c78.chunk.js.map} +1 -1
- package/dist/embedded-app/static/5877.a2e28865fc9e.chunk.js +2 -0
- package/dist/embedded-app/static/5877.a2e28865fc9e.chunk.js.map +1 -0
- package/dist/embedded-app/static/6138.3678d771bc61.chunk.js +2 -0
- package/dist/embedded-app/static/6138.3678d771bc61.chunk.js.map +1 -0
- package/dist/embedded-app/static/{6206.a6dc0414494f.chunk.js → 6206.69309b586b93.chunk.js} +2 -2
- package/dist/embedded-app/static/{6206.a6dc0414494f.chunk.js.map → 6206.69309b586b93.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6718.89aeb24410af.chunk.js +22 -0
- package/dist/embedded-app/static/{6718.245b95228170.chunk.js.map → 6718.89aeb24410af.chunk.js.map} +1 -1
- package/dist/embedded-app/static/6949.7ed9d7a91fab.chunk.js +4 -0
- package/dist/embedded-app/static/6949.7ed9d7a91fab.chunk.js.map +1 -0
- package/dist/embedded-app/static/7203.80b9f341a5e8.chunk.js +2 -0
- package/dist/embedded-app/static/7203.80b9f341a5e8.chunk.js.map +1 -0
- package/dist/embedded-app/static/{7226.cd9be3586445.chunk.js → 7226.21b332b45923.chunk.js} +2 -2
- package/dist/embedded-app/static/{7226.cd9be3586445.chunk.js.map → 7226.21b332b45923.chunk.js.map} +1 -1
- package/dist/embedded-app/static/7632.3917bed33d55.chunk.js +2 -0
- package/dist/embedded-app/static/{7632.79234b81e968.chunk.js.map → 7632.3917bed33d55.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8125.84952fcec739.chunk.js → 8125.d349a79d61b4.chunk.js} +2 -2
- package/dist/embedded-app/static/{8125.84952fcec739.chunk.js.map → 8125.d349a79d61b4.chunk.js.map} +1 -1
- package/dist/embedded-app/static/8877.eae6a09dd4f9.chunk.js +2 -0
- package/dist/embedded-app/static/{8877.cdb190e598d5.chunk.js.map → 8877.eae6a09dd4f9.chunk.js.map} +1 -1
- package/dist/embedded-app/static/9050.ea90466f10f3.chunk.js +2 -0
- package/dist/embedded-app/static/9050.ea90466f10f3.chunk.js.map +1 -0
- package/dist/embedded-app/static/9230.53ff1aa23058.chunk.js +2 -0
- package/dist/embedded-app/static/9230.53ff1aa23058.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.7dc68125121e.js +2 -0
- package/dist/embedded-app/static/main.7dc68125121e.js.map +1 -0
- package/dist/embedded-app/static/module-micromark-core-commonmark.d049c8fc059e.js +2 -0
- package/dist/embedded-app/static/module-micromark-core-commonmark.d049c8fc059e.js.map +1 -0
- package/dist/embedded-app/static/module-parse5.94980036c2b0.js +2 -0
- package/dist/embedded-app/static/module-parse5.94980036c2b0.js.map +1 -0
- package/dist/embedded-app/static/module-react-aria-components.27a8b47829ea.js +2 -0
- package/dist/embedded-app/static/module-react-aria-components.27a8b47829ea.js.map +1 -0
- package/dist/embedded-app/static/{runtime.3d9231da678d.js → runtime.fa776ba09ef1.js} +2 -2
- package/dist/embedded-app/static/{runtime.3d9231da678d.js.map → runtime.fa776ba09ef1.js.map} +1 -1
- package/dist/embedded-app/static/vendor.e2d917c57ed9.js +2 -0
- package/dist/embedded-app/static/vendor.e2d917c57ed9.js.map +1 -0
- package/dist/packages/techdocs-cli/package.json.cjs.js +1 -1
- package/dist/plugins/techdocs-zensical-internal/src/TechdocsZensicalGenerator.cjs.js +5 -1
- package/dist/plugins/techdocs-zensical-internal/src/TechdocsZensicalGenerator.cjs.js.map +1 -1
- package/package.json +10 -10
- package/dist/embedded-app/static/123.45e40c5d70dc.chunk.js +0 -2
- package/dist/embedded-app/static/123.45e40c5d70dc.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.865be4aaaafb.chunk.js +0 -2
- package/dist/embedded-app/static/1659.865be4aaaafb.chunk.js.map +0 -1
- package/dist/embedded-app/static/1749.b4483b4e2bb6.chunk.js +0 -2
- package/dist/embedded-app/static/1749.b4483b4e2bb6.chunk.js.map +0 -1
- package/dist/embedded-app/static/1767.6e4cbc9c9d27.chunk.js +0 -2
- package/dist/embedded-app/static/1767.6e4cbc9c9d27.chunk.js.map +0 -1
- package/dist/embedded-app/static/1994.38d3dd466d30.chunk.js +0 -2
- package/dist/embedded-app/static/1994.38d3dd466d30.chunk.js.map +0 -1
- package/dist/embedded-app/static/2295.dda08612a0e4.chunk.js +0 -5
- package/dist/embedded-app/static/2295.dda08612a0e4.chunk.js.map +0 -1
- package/dist/embedded-app/static/2339.4b6211cd2e17.chunk.js +0 -2
- package/dist/embedded-app/static/2339.4b6211cd2e17.chunk.js.map +0 -1
- package/dist/embedded-app/static/2360.e30d0a827f1b.chunk.js +0 -2
- package/dist/embedded-app/static/2360.e30d0a827f1b.chunk.js.map +0 -1
- package/dist/embedded-app/static/3031.3ad03b75f7d6.chunk.js +0 -2
- package/dist/embedded-app/static/3306.ebe1d57e1ee8.chunk.js +0 -2
- package/dist/embedded-app/static/3306.ebe1d57e1ee8.chunk.js.map +0 -1
- package/dist/embedded-app/static/4587.51c2cef24263.chunk.js +0 -2
- package/dist/embedded-app/static/4587.51c2cef24263.chunk.js.map +0 -1
- package/dist/embedded-app/static/4609.59cdb7eef90d.chunk.js +0 -531
- package/dist/embedded-app/static/4609.59cdb7eef90d.chunk.js.map +0 -1
- package/dist/embedded-app/static/4648.71cc1dd433d0.chunk.js +0 -2
- package/dist/embedded-app/static/4648.71cc1dd433d0.chunk.js.map +0 -1
- package/dist/embedded-app/static/5877.dcbb54defb88.chunk.js +0 -2
- package/dist/embedded-app/static/5877.dcbb54defb88.chunk.js.map +0 -1
- package/dist/embedded-app/static/6138.4babe9cc6492.chunk.js +0 -2
- package/dist/embedded-app/static/6138.4babe9cc6492.chunk.js.map +0 -1
- package/dist/embedded-app/static/6718.245b95228170.chunk.js +0 -22
- package/dist/embedded-app/static/6949.d6860e77e10c.chunk.js +0 -4
- package/dist/embedded-app/static/6949.d6860e77e10c.chunk.js.map +0 -1
- package/dist/embedded-app/static/698.6389c3faa0bb.chunk.js +0 -2
- package/dist/embedded-app/static/698.6389c3faa0bb.chunk.js.map +0 -1
- package/dist/embedded-app/static/7203.a37705ededb5.chunk.js +0 -2
- package/dist/embedded-app/static/7203.a37705ededb5.chunk.js.map +0 -1
- package/dist/embedded-app/static/7632.79234b81e968.chunk.js +0 -2
- package/dist/embedded-app/static/8877.cdb190e598d5.chunk.js +0 -2
- package/dist/embedded-app/static/9050.d056f544fb11.chunk.js +0 -2
- package/dist/embedded-app/static/9050.d056f544fb11.chunk.js.map +0 -1
- package/dist/embedded-app/static/9230.cf54b232ffd4.chunk.js +0 -2
- package/dist/embedded-app/static/9230.cf54b232ffd4.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.4513a8956ce8.js +0 -2
- package/dist/embedded-app/static/main.4513a8956ce8.js.map +0 -1
- package/dist/embedded-app/static/module-react-aria-components.ad458624f76c.js +0 -2
- package/dist/embedded-app/static/module-react-aria-components.ad458624f76c.js.map +0 -1
- package/dist/embedded-app/static/vendor.9c2d9a0c65bd.js +0 -2
- package/dist/embedded-app/static/vendor.9c2d9a0c65bd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,38 +1,25 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 1.14.1
|
|
3
|
+
## 1.14.1
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- f8a717e: Restricts `markdown_extensions` in `mkdocs.yml` to known extension names before documentation generation, in both the MkDocs and Zensical engines. Extension names outside the permitted set are removed from the configuration with a warning. Allow additional extensions, for example from a custom build image, with the new `techdocs.generator.mkdocs.dangerouslyAllowAdditionalExtensions` configuration, or the `--dangerouslyAllowAdditionalExtensions` flag when using the TechDocs CLI.
|
|
7
8
|
- Updated dependencies
|
|
8
|
-
- @backstage/
|
|
9
|
-
- @backstage/backend-plugin-api@1.12.0-next.1
|
|
10
|
-
- @backstage/errors@1.4.0-next.0
|
|
11
|
-
- @backstage/plugin-techdocs-node@2.2.1-next.2
|
|
12
|
-
- @backstage/catalog-model@1.10.3-next.0
|
|
13
|
-
- @backstage/cli-common@0.3.3-next.0
|
|
14
|
-
- @backstage/config@1.3.11-next.0
|
|
9
|
+
- @backstage/plugin-techdocs-node@2.2.1
|
|
15
10
|
|
|
16
|
-
## 1.14.
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- Bumped version to account for a patch release.
|
|
21
|
-
|
|
22
|
-
## 1.14.0-next.0
|
|
11
|
+
## 1.14.0
|
|
23
12
|
|
|
24
13
|
### Minor Changes
|
|
25
14
|
|
|
26
|
-
-
|
|
15
|
+
- 8fd70e3: Add Zensical support to `serve`, `serve:raw` and `generate` via `--engine zensical` (or the `backstage.io/techdocs-engine` annotation in `catalog-info.yaml`), including live reload in the preview app. The default `--docker-image` is now chosen per engine instead of always being `spotify/techdocs`, and matches the image the TechDocs backend uses for that engine, so MkDocs previews now use `spotify/techdocs:v1.2.8` instead of `latest`. Passing `--docker-image` explicitly behaves as before.
|
|
27
16
|
|
|
28
17
|
The `serve` flags `--mkdocs-port`, `--mkdocs-config-file-name` and `--mkdocs-parameter-*` are deprecated in favor of `--engine-port`, `--config-file-name` and `--parameter-*`. If both the old and new flag are given, the new one wins and the warning says the old one is ignored.
|
|
29
18
|
|
|
30
19
|
### Patch Changes
|
|
31
20
|
|
|
32
21
|
- Updated dependencies
|
|
33
|
-
- @backstage/
|
|
34
|
-
- @backstage/plugin-techdocs-node@2.2.0-next.0
|
|
35
|
-
- @backstage/backend-plugin-api@1.11.1-next.0
|
|
22
|
+
- @backstage/plugin-techdocs-node@2.2.0
|
|
36
23
|
|
|
37
24
|
## 1.13.0
|
|
38
25
|
|
|
@@ -45,6 +45,7 @@ async function generate(opts) {
|
|
|
45
45
|
const disableExternalFonts = opts.disableExternalFonts;
|
|
46
46
|
const defaultPlugins = opts.defaultPlugin;
|
|
47
47
|
const dangerouslyAllowAdditionalKeys = opts.dangerouslyAllowAdditionalKeys;
|
|
48
|
+
const dangerouslyAllowAdditionalExtensions = opts.dangerouslyAllowAdditionalExtensions;
|
|
48
49
|
logger.info(`Using source dir ${sourceDir}`);
|
|
49
50
|
logger.info(`Will output generated files in ${outputDir}`);
|
|
50
51
|
logger.verbose("Creating output directory if it does not exist.");
|
|
@@ -64,7 +65,8 @@ async function generate(opts) {
|
|
|
64
65
|
omitTechdocsCorePlugin,
|
|
65
66
|
disableExternalFonts,
|
|
66
67
|
defaultPlugins,
|
|
67
|
-
dangerouslyAllowAdditionalKeys
|
|
68
|
+
dangerouslyAllowAdditionalKeys,
|
|
69
|
+
dangerouslyAllowAdditionalExtensions
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.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 { join, resolve } from 'node:path';\nimport { OptionValues } from 'commander';\nimport fs from 'fs-extra';\nimport JSON5 from 'json5';\nimport {\n Generators,\n ParsedLocationAnnotation,\n getMkdocsYml,\n TECHDOCS_ENGINE_CATALOG_ANNOTATION_KEY,\n} from '@backstage/plugin-techdocs-node';\nimport { ConfigReader } from '@backstage/config';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n getLogStream,\n} from '../../lib/utility';\nimport { computeDirectoryEtag } from '../../lib/etag';\nimport { getEngineConfig } from '../../lib/engines';\nimport { resolveEngine } from '../../lib/catalogEntity';\n\nconst TECHDOCS_METADATA_FILE = 'techdocs_metadata.json';\nconst GENERATED_SITE_ETAG_EXCLUDED_FILES = [\n TECHDOCS_METADATA_FILE,\n // The compressed sitemap can include gzip metadata that changes between\n // otherwise identical generated sites; sitemap.xml still captures content.\n 'sitemap.xml.gz',\n // mkdocs writes build-date lastmod entries into sitemap.xml, so the hash\n // changes daily even when the documentation content is identical.\n 'sitemap.xml',\n];\n\nexport default async function generate(opts: OptionValues) {\n // Use techdocs-node 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: opts.verbose });\n const sourceDir = resolve(opts.sourceDir);\n\n const {\n engine,\n source: engineSource,\n entity: catalogEntity,\n } = await resolveEngine(sourceDir, opts.engine, logger);\n\n const engineConfig = getEngineConfig(engine, engineSource);\n logger.info(`Using engine: ${engine} (binary: ${engineConfig.binary})`);\n const outputDir = resolve(opts.outputDir);\n const omitTechdocsCorePlugin = opts.omitTechdocsCoreMkdocsPlugin;\n const dockerImage = opts.dockerImage;\n const pullImage = opts.pull;\n const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;\n const disableExternalFonts = opts.disableExternalFonts;\n const defaultPlugins = opts.defaultPlugin;\n const dangerouslyAllowAdditionalKeys = opts.dangerouslyAllowAdditionalKeys;\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 { path: mkdocsYmlPath, configIsTemporary } = await getMkdocsYml(\n sourceDir,\n );\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: opts.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n defaultEngine: engine,\n mkdocs: {\n legacyCopyReadmeMdToIndexMd,\n omitTechdocsCorePlugin,\n disableExternalFonts,\n defaultPlugins,\n dangerouslyAllowAdditionalKeys,\n },\n },\n },\n });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (opts.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n opts.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n const hasExplicitEtag = opts.etag !== undefined;\n const etag = hasExplicitEtag ? opts.etag : undefined;\n\n // Generate docs using @backstage/plugin-techdocs-node\n const generators = await Generators.fromConfig(config, {\n logger,\n });\n // Engines other than MkDocs ship their own generator; register the one for\n // the detected engine so generators.get() below can resolve it.\n if (engineConfig.createGenerator) {\n generators.register(\n engine,\n engineConfig.createGenerator(config, { logger }),\n );\n }\n\n // Stamp the resolved engine onto the entity so that an explicit --engine\n // flag takes precedence over the catalog annotation in generators.get().\n const baseEntity: Entity = catalogEntity ?? {\n apiVersion: 'backstage.io/v1alpha1',\n kind: 'Component',\n metadata: { name: 'local' },\n };\n const entity: Entity = {\n ...baseEntity,\n metadata: {\n ...baseEntity.metadata,\n annotations: {\n ...baseEntity.metadata.annotations,\n [TECHDOCS_ENGINE_CATALOG_ANNOTATION_KEY]: engine,\n },\n },\n };\n const generator = generators.get(entity);\n\n logger.info('Generating documentation...');\n\n await generator.run({\n inputDir: sourceDir,\n outputDir,\n ...(opts.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag,\n logStream: getLogStream(logger),\n siteOptions: { name: opts.siteName },\n runAsDefaultUser: opts.runAsDefaultUser,\n });\n\n if (!hasExplicitEtag) {\n const generatedSiteEtag = await computeDirectoryEtag(outputDir, {\n exclude: GENERATED_SITE_ETAG_EXCLUDED_FILES,\n });\n const metadataPath = join(outputDir, TECHDOCS_METADATA_FILE);\n const metadata = JSON5.parse(await fs.readFile(metadataPath, 'utf8'));\n await fs.writeJson(\n metadataPath,\n { ...metadata, etag: generatedSiteEtag },\n { spaces: 2 },\n );\n logger.info(`Computed generated site content hash: ${generatedSiteEtag}`);\n }\n\n if (configIsTemporary) {\n process.on('exit', async () => {\n fs.rmSync(mkdocsYmlPath, {});\n });\n }\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","catalogEntity","resolveEngine","getEngineConfig","fs","getMkdocsYml","config","ConfigReader","convertTechDocsRefToLocationAnnotation","etag","Generators","TECHDOCS_ENGINE_CATALOG_ANNOTATION_KEY","getLogStream","computeDirectoryEtag","join","JSON5"],"mappings":";;;;;;;;;;;;;;;;;;;AAqCA,MAAM,sBAAA,GAAyB,wBAAA;AAC/B,MAAM,kCAAA,GAAqC;AAAA,EACzC,sBAAA;AAAA;AAAA;AAAA,EAGA,gBAAA;AAAA;AAAA;AAAA,EAGA;AACF,CAAA;AAEA,eAA8B,SAAS,IAAA,EAAoB;AAKzD,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EA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,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAA,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AACrB;;"}
|
|
1
|
+
{"version":3,"file":"generate.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 { join, resolve } from 'node:path';\nimport { OptionValues } from 'commander';\nimport fs from 'fs-extra';\nimport JSON5 from 'json5';\nimport {\n Generators,\n ParsedLocationAnnotation,\n getMkdocsYml,\n TECHDOCS_ENGINE_CATALOG_ANNOTATION_KEY,\n} from '@backstage/plugin-techdocs-node';\nimport { ConfigReader } from '@backstage/config';\nimport { Entity } from '@backstage/catalog-model';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n getLogStream,\n} from '../../lib/utility';\nimport { computeDirectoryEtag } from '../../lib/etag';\nimport { getEngineConfig } from '../../lib/engines';\nimport { resolveEngine } from '../../lib/catalogEntity';\n\nconst TECHDOCS_METADATA_FILE = 'techdocs_metadata.json';\nconst GENERATED_SITE_ETAG_EXCLUDED_FILES = [\n TECHDOCS_METADATA_FILE,\n // The compressed sitemap can include gzip metadata that changes between\n // otherwise identical generated sites; sitemap.xml still captures content.\n 'sitemap.xml.gz',\n // mkdocs writes build-date lastmod entries into sitemap.xml, so the hash\n // changes daily even when the documentation content is identical.\n 'sitemap.xml',\n];\n\nexport default async function generate(opts: OptionValues) {\n // Use techdocs-node 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: opts.verbose });\n const sourceDir = resolve(opts.sourceDir);\n\n const {\n engine,\n source: engineSource,\n entity: catalogEntity,\n } = await resolveEngine(sourceDir, opts.engine, logger);\n\n const engineConfig = getEngineConfig(engine, engineSource);\n logger.info(`Using engine: ${engine} (binary: ${engineConfig.binary})`);\n const outputDir = resolve(opts.outputDir);\n const omitTechdocsCorePlugin = opts.omitTechdocsCoreMkdocsPlugin;\n const dockerImage = opts.dockerImage;\n const pullImage = opts.pull;\n const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;\n const disableExternalFonts = opts.disableExternalFonts;\n const defaultPlugins = opts.defaultPlugin;\n const dangerouslyAllowAdditionalKeys = opts.dangerouslyAllowAdditionalKeys;\n const dangerouslyAllowAdditionalExtensions =\n opts.dangerouslyAllowAdditionalExtensions;\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 { path: mkdocsYmlPath, configIsTemporary } = await getMkdocsYml(\n sourceDir,\n );\n\n const config = new ConfigReader({\n techdocs: {\n generator: {\n runIn: opts.docker ? 'docker' : 'local',\n dockerImage,\n pullImage,\n defaultEngine: engine,\n mkdocs: {\n legacyCopyReadmeMdToIndexMd,\n omitTechdocsCorePlugin,\n disableExternalFonts,\n defaultPlugins,\n dangerouslyAllowAdditionalKeys,\n dangerouslyAllowAdditionalExtensions,\n },\n },\n },\n });\n\n let parsedLocationAnnotation = {} as ParsedLocationAnnotation;\n if (opts.techdocsRef) {\n try {\n parsedLocationAnnotation = convertTechDocsRefToLocationAnnotation(\n opts.techdocsRef,\n );\n } catch (err) {\n logger.error(err.message);\n }\n }\n\n const hasExplicitEtag = opts.etag !== undefined;\n const etag = hasExplicitEtag ? opts.etag : undefined;\n\n // Generate docs using @backstage/plugin-techdocs-node\n const generators = await Generators.fromConfig(config, {\n logger,\n });\n // Engines other than MkDocs ship their own generator; register the one for\n // the detected engine so generators.get() below can resolve it.\n if (engineConfig.createGenerator) {\n generators.register(\n engine,\n engineConfig.createGenerator(config, { logger }),\n );\n }\n\n // Stamp the resolved engine onto the entity so that an explicit --engine\n // flag takes precedence over the catalog annotation in generators.get().\n const baseEntity: Entity = catalogEntity ?? {\n apiVersion: 'backstage.io/v1alpha1',\n kind: 'Component',\n metadata: { name: 'local' },\n };\n const entity: Entity = {\n ...baseEntity,\n metadata: {\n ...baseEntity.metadata,\n annotations: {\n ...baseEntity.metadata.annotations,\n [TECHDOCS_ENGINE_CATALOG_ANNOTATION_KEY]: engine,\n },\n },\n };\n const generator = generators.get(entity);\n\n logger.info('Generating documentation...');\n\n await generator.run({\n inputDir: sourceDir,\n outputDir,\n ...(opts.techdocsRef\n ? {\n parsedLocationAnnotation,\n }\n : {}),\n logger,\n etag,\n logStream: getLogStream(logger),\n siteOptions: { name: opts.siteName },\n runAsDefaultUser: opts.runAsDefaultUser,\n });\n\n if (!hasExplicitEtag) {\n const generatedSiteEtag = await computeDirectoryEtag(outputDir, {\n exclude: GENERATED_SITE_ETAG_EXCLUDED_FILES,\n });\n const metadataPath = join(outputDir, TECHDOCS_METADATA_FILE);\n const metadata = JSON5.parse(await fs.readFile(metadataPath, 'utf8'));\n await fs.writeJson(\n metadataPath,\n { ...metadata, etag: generatedSiteEtag },\n { spaces: 2 },\n );\n logger.info(`Computed generated site content hash: ${generatedSiteEtag}`);\n }\n\n if (configIsTemporary) {\n process.on('exit', async () => {\n fs.rmSync(mkdocsYmlPath, {});\n });\n }\n\n logger.info('Done!');\n}\n"],"names":["createLogger","resolve","catalogEntity","resolveEngine","getEngineConfig","fs","getMkdocsYml","config","ConfigReader","convertTechDocsRefToLocationAnnotation","etag","Generators","TECHDOCS_ENGINE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AWC,uBAAM,KAAA,CAAM,MAAMX,oBAAG,QAAA,CAAS,YAAA,EAAc,MAAM,CAAC,CAAA;AACpE,IAAA,MAAMA,mBAAA,CAAG,SAAA;AAAA,MACP,YAAA;AAAA,MACA,EAAE,GAAG,QAAA,EAAU,IAAA,EAAM,iBAAA,EAAkB;AAAA,MACvC,EAAE,QAAQ,CAAA;AAAE,KACd;AACA,IAAA,MAAA,CAAO,IAAA,CAAK,CAAA,sCAAA,EAAyC,iBAAiB,CAAA,CAAE,CAAA;AAAA,EAC1E;AAEA,EAAA,IAAI,iBAAA,EAAmB;AACrB,IAAA,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAA,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AACrB;;"}
|
|
@@ -48,6 +48,10 @@ function registerCommands(program) {
|
|
|
48
48
|
"--dangerouslyAllowAdditionalKeys [additionalKeys...]",
|
|
49
49
|
"Top-level mkdocs.yml keys to allow beyond the built-in supported set, without failing or stripping them. Same as the techdocs.generator.mkdocs.dangerouslyAllowAdditionalKeys backend config option, which techdocs-cli generate does not currently read from a config file.",
|
|
50
50
|
[]
|
|
51
|
+
).option(
|
|
52
|
+
"--dangerouslyAllowAdditionalExtensions [additionalExtensions...]",
|
|
53
|
+
"Markdown extensions to allow in mkdocs.yml beyond the built-in permitted set, without stripping them. Same as the techdocs.generator.mkdocs.dangerouslyAllowAdditionalExtensions backend config option, which techdocs-cli generate does not currently read from a config file.",
|
|
54
|
+
[]
|
|
51
55
|
).option(
|
|
52
56
|
"--runAsDefaultUser",
|
|
53
57
|
"Bypass setting the container user as the same user and group id as host for Linux and MacOS",
|
|
@@ -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';\n\nconst defaultPreviewAppPort = '3000';\n\nexport function registerCommands(program: Command) {\n program\n .command('generate')\n .description(\n 'Generate a TechDocs documentation site with the selected engine (MkDocs by default).',\n )\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 \"Docker image to use. Defaults to the selected engine's image.\",\n )\n .option('--no-pull', 'Do not pull the latest docker image')\n .option(\n '--no-docker',\n 'Do not use Docker, run the engine and its plugins in the 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 ' If omitted, a sha256 content hash of the generated site output is computed automatically.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default 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 '--disableExternalFonts',\n 'Disable external font downloads by default by setting theme.font: false in mkdocs.yml when not already configured. Useful for air-gapped environments where Google fonts cannot be accessed.',\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 '--dangerouslyAllowAdditionalKeys [additionalKeys...]',\n 'Top-level mkdocs.yml keys to allow beyond the built-in supported set, without failing or stripping them. Same as the techdocs.generator.mkdocs.dangerouslyAllowAdditionalKeys backend config option, which techdocs-cli generate does not currently read from a config 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\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 .option(\n '--skip-if-unchanged',\n 'Skip publishing if the local etag in techdocs_metadata.json matches the remote etag.' +\n ' The generate step computes a generated site content hash automatically unless --etag is overridden.',\n false,\n )\n .action(lazy(() => import('./publish/publish'), 'default'));\n\n const serveRawAction = lazy(() => import('./serve/mkdocs'), 'default');\n\n program\n .command('serve:raw')\n .description(\n 'Serve a documentation project locally using the configured engine.',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n \"Docker image to use. Defaults to the selected engine's image.\",\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 the engine serve command in the current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\n )\n .action(serveRawAction);\n\n program\n .command('serve:mkdocs')\n .description(\n '[Deprecated: use serve:raw] Serve a documentation project locally.',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n \"Docker image to use. Defaults to the selected engine's image.\",\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 the default 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\n )\n .hook('preAction', command => {\n command.setOptionValue('deprecatedCommandAlias', 'serve:mkdocs');\n })\n .action(serveRawAction);\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 \"Docker image to use. Defaults to the selected engine's image.\",\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 the engine in the current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default config',\n 'Documentation Site',\n )\n .option(\n '--engine-port <PORT>',\n 'Port for the documentation engine server (MkDocs, Zensical, etc.) to listen on. Defaults to 8000. The Backstage preview app is served on --preview-app-port.',\n )\n .option(\n '--mkdocs-port <PORT>',\n '[Deprecated: use --engine-port] Port for MkDocs server to use',\n )\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, --config-file-name <FILENAME>',\n 'Config file name for the documentation engine (e.g. mkdocs.yml). Overrides automatic detection.',\n )\n .option(\n '--mkdocs-config-file-name <FILENAME>',\n '[Deprecated: use --config-file-name] Mkdocs config file name',\n )\n .option(\n '--parameter-clean',\n 'Pass \"--clean\" to the documentation engine server. Clears the build cache before serving.',\n false,\n )\n .option(\n '--mkdocs-parameter-clean',\n '[Deprecated: use --parameter-clean] Pass \"--clean\" parameter to mkdocs server',\n false,\n )\n .option(\n '--parameter-dirtyreload',\n 'Pass \"--dirtyreload\" to the documentation engine server. Only rebuilds changed files on reload (MkDocs only; ignored by other engines).',\n false,\n )\n .option(\n '--mkdocs-parameter-dirtyreload',\n '[Deprecated: use --parameter-dirtyreload] Pass \"--dirtyreload\" parameter to mkdocs server',\n false,\n )\n .option(\n '--parameter-strict',\n 'Pass \"--strict\" to the documentation engine server. Treats warnings as errors during build.',\n false,\n )\n .option(\n '--mkdocs-parameter-strict',\n '[Deprecated: use --parameter-strict] Pass \"--strict\" parameter to mkdocs server',\n false,\n )\n .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\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":[],"mappings":";;AAkBA,MAAM,qBAAA,GAAwB,MAAA;AAEvB,SAAS,iBAAiB,OAAA,EAAkB;AACjD,EAAA,OAAA,CACG,OAAA,CAAQ,UAAU,CAAA,CAClB,WAAA;AAAA,IACC;AAAA,GACF,CACC,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;AAAA,GACF,CACC,MAAA,CAAO,WAAA,EAAa,qCAAqC,C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,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';\n\nconst defaultPreviewAppPort = '3000';\n\nexport function registerCommands(program: Command) {\n program\n .command('generate')\n .description(\n 'Generate a TechDocs documentation site with the selected engine (MkDocs by default).',\n )\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 \"Docker image to use. Defaults to the selected engine's image.\",\n )\n .option('--no-pull', 'Do not pull the latest docker image')\n .option(\n '--no-docker',\n 'Do not use Docker, run the engine and its plugins in the 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 ' If omitted, a sha256 content hash of the generated site output is computed automatically.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default 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 '--disableExternalFonts',\n 'Disable external font downloads by default by setting theme.font: false in mkdocs.yml when not already configured. Useful for air-gapped environments where Google fonts cannot be accessed.',\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 '--dangerouslyAllowAdditionalKeys [additionalKeys...]',\n 'Top-level mkdocs.yml keys to allow beyond the built-in supported set, without failing or stripping them. Same as the techdocs.generator.mkdocs.dangerouslyAllowAdditionalKeys backend config option, which techdocs-cli generate does not currently read from a config file.',\n [],\n )\n .option(\n '--dangerouslyAllowAdditionalExtensions [additionalExtensions...]',\n 'Markdown extensions to allow in mkdocs.yml beyond the built-in permitted set, without stripping them. Same as the techdocs.generator.mkdocs.dangerouslyAllowAdditionalExtensions backend config option, which techdocs-cli generate does not currently read from a config 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\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 .option(\n '--skip-if-unchanged',\n 'Skip publishing if the local etag in techdocs_metadata.json matches the remote etag.' +\n ' The generate step computes a generated site content hash automatically unless --etag is overridden.',\n false,\n )\n .action(lazy(() => import('./publish/publish'), 'default'));\n\n const serveRawAction = lazy(() => import('./serve/mkdocs'), 'default');\n\n program\n .command('serve:raw')\n .description(\n 'Serve a documentation project locally using the configured engine.',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n \"Docker image to use. Defaults to the selected engine's image.\",\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 the engine serve command in the current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\n )\n .action(serveRawAction);\n\n program\n .command('serve:mkdocs')\n .description(\n '[Deprecated: use serve:raw] Serve a documentation project locally.',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n \"Docker image to use. Defaults to the selected engine's image.\",\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 the default 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 .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\n )\n .hook('preAction', command => {\n command.setOptionValue('deprecatedCommandAlias', 'serve:mkdocs');\n })\n .action(serveRawAction);\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 \"Docker image to use. Defaults to the selected engine's image.\",\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 the engine in the current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using the default config',\n 'Documentation Site',\n )\n .option(\n '--engine-port <PORT>',\n 'Port for the documentation engine server (MkDocs, Zensical, etc.) to listen on. Defaults to 8000. The Backstage preview app is served on --preview-app-port.',\n )\n .option(\n '--mkdocs-port <PORT>',\n '[Deprecated: use --engine-port] Port for MkDocs server to use',\n )\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, --config-file-name <FILENAME>',\n 'Config file name for the documentation engine (e.g. mkdocs.yml). Overrides automatic detection.',\n )\n .option(\n '--mkdocs-config-file-name <FILENAME>',\n '[Deprecated: use --config-file-name] Mkdocs config file name',\n )\n .option(\n '--parameter-clean',\n 'Pass \"--clean\" to the documentation engine server. Clears the build cache before serving.',\n false,\n )\n .option(\n '--mkdocs-parameter-clean',\n '[Deprecated: use --parameter-clean] Pass \"--clean\" parameter to mkdocs server',\n false,\n )\n .option(\n '--parameter-dirtyreload',\n 'Pass \"--dirtyreload\" to the documentation engine server. Only rebuilds changed files on reload (MkDocs only; ignored by other engines).',\n false,\n )\n .option(\n '--mkdocs-parameter-dirtyreload',\n '[Deprecated: use --parameter-dirtyreload] Pass \"--dirtyreload\" parameter to mkdocs server',\n false,\n )\n .option(\n '--parameter-strict',\n 'Pass \"--strict\" to the documentation engine server. Treats warnings as errors during build.',\n false,\n )\n .option(\n '--mkdocs-parameter-strict',\n '[Deprecated: use --parameter-strict] Pass \"--strict\" parameter to mkdocs server',\n false,\n )\n .option(\n '--engine <ENGINE>',\n 'Documentation engine to use. Overrides the backstage.io/techdocs-engine annotation in catalog-info.yaml; defaults to mkdocs.',\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"],"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,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;;;"}
|
|
@@ -1482,6 +1482,30 @@
|
|
|
1482
1482
|
},
|
|
1483
1483
|
"description": "Additional app origins to allow for authenticating"
|
|
1484
1484
|
},
|
|
1485
|
+
"experimentalDynamicClientRegistration": {
|
|
1486
|
+
"type": "object",
|
|
1487
|
+
"properties": {
|
|
1488
|
+
"enabled": {
|
|
1489
|
+
"type": "boolean",
|
|
1490
|
+
"description": "Whether to enable dynamic client registration Defaults to false"
|
|
1491
|
+
},
|
|
1492
|
+
"allowedRedirectUriPatterns": {
|
|
1493
|
+
"type": "array",
|
|
1494
|
+
"items": {
|
|
1495
|
+
"type": "string"
|
|
1496
|
+
},
|
|
1497
|
+
"description": "A list of allowed URI patterns to use for redirect URIs during dynamic client registration.\n\nPatterns are matched per URL component: a `*` in the hostname or path only matches within that component, and a `:*` port matches any port. Patterns must include an explicit protocol and only match the path they list, e.g. `http://localhost:*\\/*` allows any port and any path on localhost.\n\nDefaults to Cursor and loopback addresses (localhost, 127.0.0.1, [::1]).",
|
|
1498
|
+
"examples": [
|
|
1499
|
+
[
|
|
1500
|
+
"http://localhost:*/*",
|
|
1501
|
+
"https://*.example.com/callback"
|
|
1502
|
+
]
|
|
1503
|
+
]
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
"description": "Configuration for dynamic client registration",
|
|
1507
|
+
"deprecated": "Use `auth.clientIdMetadataDocuments` instead."
|
|
1508
|
+
},
|
|
1485
1509
|
"clientIdMetadataDocuments": {
|
|
1486
1510
|
"type": "object",
|
|
1487
1511
|
"properties": {
|
|
@@ -1494,7 +1518,7 @@
|
|
|
1494
1518
|
"items": {
|
|
1495
1519
|
"type": "string"
|
|
1496
1520
|
},
|
|
1497
|
-
"description": "A list of allowed URI patterns for client_id URLs. Uses glob-style pattern matching where `*` matches any characters. Defaults to `['https://claude.ai/*', 'https://vscode.dev/*', 'https://chatgpt.com/oauth/codex/*\\/client.json', '
|
|
1521
|
+
"description": "A list of allowed URI patterns for client_id URLs. Uses glob-style pattern matching where `*` matches any characters. Defaults to `['https://claude.ai/*', 'https://vscode.dev/*', 'https://chatgpt.com/oauth/codex/*\\/client.json', '{baseUrl}/.well-known/oauth-client/cli.json']` where `{baseUrl}` is the auth backend's base URL.\n\nSetting this replaces the Claude, VS Code, and ChatGPT Codex defaults. The built-in CLI client is always allowed, since this backend serves its metadata document itself.",
|
|
1498
1522
|
"examples": [
|
|
1499
1523
|
[
|
|
1500
1524
|
"https://example.com/*",
|
|
@@ -1530,7 +1554,7 @@
|
|
|
1530
1554
|
"items": {
|
|
1531
1555
|
"type": "string"
|
|
1532
1556
|
},
|
|
1533
|
-
"description": "A list of allowed URI patterns for client_id URLs.\n\nPatterns are matched per URL component: a `*` in the hostname or path only matches within that component, and a `:*` port matches any port. Patterns must include an explicit protocol.\n\nDefaults to `['https://claude.ai/*', 'https://vscode.dev/*', 'https://chatgpt.com/oauth/codex/*\\/client.json', '
|
|
1557
|
+
"description": "A list of allowed URI patterns for client_id URLs.\n\nPatterns are matched per URL component: a `*` in the hostname or path only matches within that component, and a `:*` port matches any port. Patterns must include an explicit protocol.\n\nDefaults to `['https://claude.ai/*', 'https://vscode.dev/*', 'https://chatgpt.com/oauth/codex/*\\/client.json', '{baseUrl}/.well-known/oauth-client/cli.json']` where `{baseUrl}` is the auth backend's base URL.\n\nSetting this replaces the Claude, VS Code, and ChatGPT Codex defaults. The built-in CLI client is always allowed, since this backend serves its metadata document itself.",
|
|
1534
1558
|
"examples": [
|
|
1535
1559
|
[
|
|
1536
1560
|
"https://example.com/*",
|
|
@@ -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.fa776ba09ef1.js"></script><script defer="defer" src="/static/module-react-aria.4e4d92cfdfed.js"></script><script defer="defer" src="/static/module-motion-dom.3c999f2a9b4e.js"></script><script defer="defer" src="/static/module-material-ui.b35df36d98d6.js"></script><script defer="defer" src="/static/module-lodash.26f0cc0617c0.js"></script><script defer="defer" src="/static/module-framer-motion.f34ff33a9d5f.js"></script><script defer="defer" src="/static/module-mui.9c07ad9e010f.js"></script><script defer="defer" src="/static/module-react-stately.dbcd4edbb271.js"></script><script defer="defer" src="/static/module-zod.410b00c4067e.js"></script><script defer="defer" src="/static/module-react-aria-components.27a8b47829ea.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.d049c8fc059e.js"></script><script defer="defer" src="/static/module-parse5.94980036c2b0.js"></script><script defer="defer" src="/static/module-react-dom.c631e87dd2a2.js"></script><script defer="defer" src="/static/module-i18next.c154323c180d.js"></script><script defer="defer" src="/static/module-remixicon.4e40b5b6bde1.js"></script><script defer="defer" src="/static/module-remix-run.32d1d7665115.js"></script><script defer="defer" src="/static/vendor.e2d917c57ed9.js"></script><script defer="defer" src="/static/main.7dc68125121e.js"></script><link href="/static/main.de8066da456c.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.fa776ba09ef1.js"></script><script defer src="<%= publicPath %>/static/module-react-aria.4e4d92cfdfed.js"></script><script defer src="<%= publicPath %>/static/module-motion-dom.3c999f2a9b4e.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.b35df36d98d6.js"></script><script defer src="<%= publicPath %>/static/module-lodash.26f0cc0617c0.js"></script><script defer src="<%= publicPath %>/static/module-framer-motion.f34ff33a9d5f.js"></script><script defer src="<%= publicPath %>/static/module-mui.9c07ad9e010f.js"></script><script defer src="<%= publicPath %>/static/module-react-stately.dbcd4edbb271.js"></script><script defer src="<%= publicPath %>/static/module-zod.410b00c4067e.js"></script><script defer src="<%= publicPath %>/static/module-react-aria-components.27a8b47829ea.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.d049c8fc059e.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036c2b0.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87dd2a2.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c180d.js"></script><script defer src="<%= publicPath %>/static/module-remixicon.4e40b5b6bde1.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.32d1d7665115.js"></script><script defer src="<%= publicPath %>/static/vendor.e2d917c57ed9.js"></script><script defer src="<%= publicPath %>/static/main.7dc68125121e.js"></script><link href="<%= publicPath %>/static/main.de8066da456c.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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"2.0.10","description":"The Backstage plugin for browsing the Backstage catalog","backstage":{"role":"frontend-plugin","pluginId":"catalog","pluginPackages":["@backstage/plugin-catalog","@backstage/plugin-catalog-backend","@backstage/plugin-catalog-common","@backstage/plugin-catalog-node","@backstage/plugin-catalog-react"]},"publishConfig":{"access":"public"},"keywords":["backstage"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/catalog"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.ts","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.ts"],"package.json":["package.json"]}},"files":["dist","config.d.ts"],"scripts":{"build":"backstage-cli package build","clean":"backstage-cli package clean","lint":"backstage-cli package lint","prepack":"backstage-cli package prepack","postpack":"backstage-cli package postpack","start":"backstage-cli package start","test":"backstage-cli package test"},"dependencies":{"@backstage/catalog-client":"workspace:^","@backstage/catalog-model":"workspace:^","@backstage/core-compat-api":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/filter-predicates":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-catalog-common":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-permission-react":"workspace:^","@backstage/plugin-scaffolder-common":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/types":"workspace:^","@backstage/ui":"workspace:^","@backstage/version-bridge":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@mui/utils":"^5.14.15","@remixicon/react":"^4.6.0","classnames":"^2.3.1","csv-stringify":"^5.6.5","dataloader":"^2.0.0","lodash":"^4.17.21","pluralize":"^8.0.0","react-helmet":"6.1.0","react-use":"^17.2.4","zen-observable":"^0.10.0","zod":"^4.0.0"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/frontend-test-utils":"workspace:^","@backstage/plugin-permission-common":"workspace:^","@backstage/test-utils":"workspace:^","@testing-library/dom":"^10.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^16.0.0","@testing-library/user-event":"^14.0.0","@types/pluralize":"^0.0.33","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2","swr":"^2.2.5"},"peerDependencies":{"@types/react":"^17.0.0 || ^18.0.0","react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","react-router-dom":"^6.30.2"},"peerDependenciesMeta":{"@types/react":{"optional":true}},"configSchema":"config.d.ts"}')}}]);
|
|
2
|
+
//# sourceMappingURL=123.b7794a0eee64.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/123.b7794a0eee64.chunk.js","sources":["webpack://techdocs-cli-embedded-app/json|/home/runner/work/publishing/publishing/plugins/catalog/package.json"],"sourcesContent":["module.exports = JSON.parse('{\"name\":\"@backstage/plugin-catalog\",\"version\":\"2.0.10\",\"description\":\"The Backstage plugin for browsing the Backstage catalog\",\"backstage\":{\"role\":\"frontend-plugin\",\"pluginId\":\"catalog\",\"pluginPackages\":[\"@backstage/plugin-catalog\",\"@backstage/plugin-catalog-backend\",\"@backstage/plugin-catalog-common\",\"@backstage/plugin-catalog-node\",\"@backstage/plugin-catalog-react\"]},\"publishConfig\":{\"access\":\"public\"},\"keywords\":[\"backstage\"],\"homepage\":\"https://backstage.io\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/backstage/backstage\",\"directory\":\"plugins/catalog\"},\"license\":\"Apache-2.0\",\"sideEffects\":false,\"exports\":{\".\":\"./src/index.ts\",\"./alpha\":\"./src/alpha/index.ts\",\"./package.json\":\"./package.json\"},\"main\":\"src/index.ts\",\"types\":\"src/index.ts\",\"typesVersions\":{\"*\":{\"alpha\":[\"src/alpha/index.ts\"],\"package.json\":[\"package.json\"]}},\"files\":[\"dist\",\"config.d.ts\"],\"scripts\":{\"build\":\"backstage-cli package build\",\"clean\":\"backstage-cli package clean\",\"lint\":\"backstage-cli package lint\",\"prepack\":\"backstage-cli package prepack\",\"postpack\":\"backstage-cli package postpack\",\"start\":\"backstage-cli package start\",\"test\":\"backstage-cli package test\"},\"dependencies\":{\"@backstage/catalog-client\":\"workspace:^\",\"@backstage/catalog-model\":\"workspace:^\",\"@backstage/core-compat-api\":\"workspace:^\",\"@backstage/core-components\":\"workspace:^\",\"@backstage/core-plugin-api\":\"workspace:^\",\"@backstage/errors\":\"workspace:^\",\"@backstage/filter-predicates\":\"workspace:^\",\"@backstage/frontend-plugin-api\":\"workspace:^\",\"@backstage/integration-react\":\"workspace:^\",\"@backstage/plugin-catalog-common\":\"workspace:^\",\"@backstage/plugin-catalog-react\":\"workspace:^\",\"@backstage/plugin-permission-react\":\"workspace:^\",\"@backstage/plugin-scaffolder-common\":\"workspace:^\",\"@backstage/plugin-search-common\":\"workspace:^\",\"@backstage/plugin-search-react\":\"workspace:^\",\"@backstage/plugin-techdocs-common\":\"workspace:^\",\"@backstage/plugin-techdocs-react\":\"workspace:^\",\"@backstage/types\":\"workspace:^\",\"@backstage/ui\":\"workspace:^\",\"@backstage/version-bridge\":\"workspace:^\",\"@material-ui/core\":\"^4.12.2\",\"@material-ui/icons\":\"^4.9.1\",\"@material-ui/lab\":\"4.0.0-alpha.61\",\"@mui/utils\":\"^5.14.15\",\"@remixicon/react\":\"^4.6.0\",\"classnames\":\"^2.3.1\",\"csv-stringify\":\"^5.6.5\",\"dataloader\":\"^2.0.0\",\"lodash\":\"^4.17.21\",\"pluralize\":\"^8.0.0\",\"react-helmet\":\"6.1.0\",\"react-use\":\"^17.2.4\",\"zen-observable\":\"^0.10.0\",\"zod\":\"^4.0.0\"},\"devDependencies\":{\"@backstage/cli\":\"workspace:^\",\"@backstage/core-app-api\":\"workspace:^\",\"@backstage/dev-utils\":\"workspace:^\",\"@backstage/frontend-test-utils\":\"workspace:^\",\"@backstage/plugin-permission-common\":\"workspace:^\",\"@backstage/test-utils\":\"workspace:^\",\"@testing-library/dom\":\"^10.0.0\",\"@testing-library/jest-dom\":\"^6.0.0\",\"@testing-library/react\":\"^16.0.0\",\"@testing-library/user-event\":\"^14.0.0\",\"@types/pluralize\":\"^0.0.33\",\"@types/react\":\"^18.0.0\",\"react\":\"^18.0.2\",\"react-dom\":\"^18.0.2\",\"react-router-dom\":\"^6.30.2\",\"swr\":\"^2.2.5\"},\"peerDependencies\":{\"@types/react\":\"^17.0.0 || ^18.0.0\",\"react\":\"^17.0.0 || ^18.0.0\",\"react-dom\":\"^17.0.0 || ^18.0.0\",\"react-router-dom\":\"^6.30.2\"},\"peerDependenciesMeta\":{\"@types/react\":{\"optional\":true}},\"configSchema\":\"config.d.ts\"}')"],"names":["JSON"],"mappings":"iIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,wnG"}
|