@techdocs/cli 0.0.0-nightly-20260918023200 → 0.0.0-nightly-20260920023043
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 -6
- package/dist/commands/generate/generate.cjs.js.map +1 -1
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/commands/migrate/migrate.cjs.js.map +1 -1
- package/dist/commands/publish/publish.cjs.js.map +1 -1
- package/dist/commands/serve/mkdocs.cjs.js.map +1 -1
- package/dist/commands/serve/serve.cjs.js.map +1 -1
- package/dist/commands/serve/utils.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +77 -77
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/{123.f267957e6c41.chunk.js → 123.91b76c2db3c7.chunk.js} +2 -2
- package/dist/embedded-app/static/{123.f267957e6c41.chunk.js.map → 123.91b76c2db3c7.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{1659.5545606eb90d.chunk.js → 1659.d331ae7a2aa0.chunk.js} +2 -2
- package/dist/embedded-app/static/{1659.5545606eb90d.chunk.js.map → 1659.d331ae7a2aa0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/3031.f2ee3495211a.chunk.js +2 -0
- package/dist/embedded-app/static/{3031.cd0a0f1ddfd2.chunk.js.map → 3031.f2ee3495211a.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4587.11ca9b455aac.chunk.js → 4587.51046685b224.chunk.js} +2 -2
- package/dist/embedded-app/static/{4587.11ca9b455aac.chunk.js.map → 4587.51046685b224.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{4609.b1c67dc7cac2.chunk.js → 4609.9d9e4473afcc.chunk.js} +6 -6
- package/dist/embedded-app/static/{4609.b1c67dc7cac2.chunk.js.map → 4609.9d9e4473afcc.chunk.js.map} +1 -1
- package/dist/embedded-app/static/4876.fa3ad2676113.chunk.js +2 -0
- package/dist/embedded-app/static/4876.fa3ad2676113.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.541fb5168686.js +2 -0
- package/dist/embedded-app/static/main.541fb5168686.js.map +1 -0
- package/dist/embedded-app/static/module-zod.da562d5b5226.js +56 -0
- package/dist/embedded-app/static/module-zod.da562d5b5226.js.map +1 -0
- package/dist/embedded-app/static/{runtime.7f24644fbdca.js → runtime.f85ef6e514f1.js} +2 -2
- package/dist/embedded-app/static/{runtime.7f24644fbdca.js.map → runtime.f85ef6e514f1.js.map} +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/lib/PublisherConfig.cjs.js.map +1 -1
- package/dist/lib/etag.cjs.js.map +1 -1
- package/dist/lib/httpServer.cjs.js.map +1 -1
- package/dist/lib/livereload.cjs.js.map +1 -1
- package/dist/lib/mkdocsServer.cjs.js.map +1 -1
- package/dist/lib/utility.cjs.js.map +1 -1
- package/dist/package.json.cjs.js +1 -1
- package/dist/package.json.cjs.js.map +1 -1
- package/package.json +7 -7
- package/dist/embedded-app/static/3031.cd0a0f1ddfd2.chunk.js +0 -2
- package/dist/embedded-app/static/4876.67117dbbe8d1.chunk.js +0 -2
- package/dist/embedded-app/static/4876.67117dbbe8d1.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.54cabd539fb3.js +0 -2
- package/dist/embedded-app/static/main.54cabd539fb3.js.map +0 -1
- package/dist/embedded-app/static/module-zod.faf74f910029.js +0 -38
- package/dist/embedded-app/static/module-zod.faf74f910029.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
-
## 0.0.0-nightly-
|
|
3
|
+
## 0.0.0-nightly-20260920023043
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Updated dependencies
|
|
8
|
-
- @backstage/
|
|
9
|
-
- @backstage/
|
|
10
|
-
- @backstage/
|
|
11
|
-
- @backstage/
|
|
12
|
-
- @backstage/
|
|
8
|
+
- @backstage/config@0.0.0-nightly-20260920023043
|
|
9
|
+
- @backstage/backend-defaults@0.0.0-nightly-20260920023043
|
|
10
|
+
- @backstage/plugin-techdocs-node@0.0.0-nightly-20260920023043
|
|
11
|
+
- @backstage/catalog-model@0.0.0-nightly-20260920023043
|
|
12
|
+
- @backstage/cli-common@0.0.0-nightly-20260920023043
|
|
13
13
|
|
|
14
14
|
## 1.12.0
|
|
15
15
|
|
|
@@ -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 TechdocsGenerator,\n ParsedLocationAnnotation,\n getMkdocsYml,\n} from '@backstage/plugin-techdocs-node';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n getLogStream,\n} from '../../lib/utility';\nimport { computeDirectoryEtag } from '../../lib/etag';\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\n const sourceDir = resolve(opts.sourceDir);\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 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 techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.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","fs","getMkdocsYml","config","ConfigReader","convertTechDocsRefToLocationAnnotation","etag","TechdocsGenerator","getLogStream","computeDirectoryEtag","join","JSON5"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,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,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,SAAA,GAAYC,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,SAAA,GAAYA,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,yBAAyB,IAAA,CAAK,4BAAA;AACpC,EAAA,MAAM,cAAc,IAAA,CAAK,WAAA;AACzB,EAAA,MAAM,YAAY,IAAA,CAAK,IAAA;AACvB,EAAA,MAAM,8BAA8B,IAAA,CAAK,2BAAA;AACzC,EAAA,MAAM,uBAAuB,IAAA,CAAK,oBAAA;AAClC,EAAA,MAA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AAA;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 TechdocsGenerator,\n ParsedLocationAnnotation,\n getMkdocsYml,\n} from '@backstage/plugin-techdocs-node';\nimport { ConfigReader } from '@backstage/config';\nimport {\n convertTechDocsRefToLocationAnnotation,\n createLogger,\n getLogStream,\n} from '../../lib/utility';\nimport { computeDirectoryEtag } from '../../lib/etag';\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\n const sourceDir = resolve(opts.sourceDir);\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 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 techdocsGenerator = await TechdocsGenerator.fromConfig(config, {\n logger,\n });\n\n logger.info('Generating documentation...');\n\n await techdocsGenerator.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","fs","getMkdocsYml","config","ConfigReader","convertTechDocsRefToLocationAnnotation","etag","TechdocsGenerator","getLogStream","computeDirectoryEtag","join","JSON5"],"mappings":";;;;;;;;;;;;;;;;;AAiCA,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,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,SAAA,GAAYC,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,SAAA,GAAYA,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,yBAAyB,IAAA,CAAK,4BAAA;AACpC,EAAA,MAAM,cAAc,IAAA,CAAK,WAAA;AACzB,EAAA,MAAM,YAAY,IAAA,CAAK,IAAA;AACvB,EAAA,MAAM,8BAA8B,IAAA,CAAK,2BAAA;AACzC,EAAA,MAAM,uBAAuB,IAAA,CAAK,oBAAA;AAClC,EAAA,MAAM,iBAAiB,IAAA,CAAK,aAAA;AAC5B,EAAA,MAAM,iCAAiC,IAAA,CAAK,8BAAA;AAE5C,EAAA,MAAA,CAAO,IAAA,CAAK,CAAA,iBAAA,EAAoB,SAAS,CAAA,CAAE,CAAA;AAC3C,EAAA,MAAA,CAAO,IAAA,CAAK,CAAA,+BAAA,EAAkC,SAAS,CAAA,CAAE,CAAA;AAEzD,EAAA,MAAA,CAAO,QAAQ,iDAAiD,CAAA;AA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AA,EAAWE,qBAAa,MAAM,CAAA;AAAA,IAC9B,WAAA,EAAa,EAAE,IAAA,EAAM,IAAA,CAAK,QAAA,EAAS;AAAA,IACnC,kBAAkB,IAAA,CAAK;AAAA,GACxB,CAAA;AAED,EAAA,IAAI,CAAC,eAAA,EAAiB;AACpB,IAAA,MAAM,iBAAA,GAAoB,MAAMC,yBAAA,CAAqB,SAAA,EAAW;AAAA,MAC9D,OAAA,EAAS;AAAA,KACV,CAAA;AACD,IAAA,MAAM,YAAA,GAAeC,SAAA,CAAK,SAAA,EAAW,sBAAsB,CAAA;AAC3D,IAAA,MAAM,QAAA,GAAWC,uBAAM,KAAA,CAAM,MAAMV,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;;"}
|
|
@@ -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 ' 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 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 '--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 .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 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,GAEF,CACC,MAAA;AAAA,IACC,aAAA;AAAA,IACA,gDAAA;AAA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AAA;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 ' 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 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 '--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 .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 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,oCAA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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":"migrate.cjs.js","sources":["../../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { HostDiscovery } from '@backstage/backend-defaults/discovery';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","discovery","HostDiscovery","Publisher"],"mappings":";;;;;;;;;AAsBA,eAA8B,QAAQ,IAAA,EAAoB;AACxD,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,MAAA,GAASC,+BAAA,CAAgB,cAAA,CAAe,IAAI,CAAA;AAClD,EAAA,MAAMC,WAAA,GAAYC,uBAAA,CAAc,UAAA,CAAW,MAAM,CAAA;AACjD,EAAA,MAAM,SAAA,GAAY,MAAMC,4BAAA,CAAU,UAAA,CAAW,QAAQ,EAAE,MAAA,aAAQF,aAAW,CAAA;AAE1E,EAAA,IAAI,CAAC,UAAU,eAAA,EAAiB;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,8BAAA,EAAiC,IAAA,CAAK,aAAa,CAAA,CAAE,CAAA;AAAA,EACvE;AAGA,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,MAAM,UAAU,YAAA,EAAa;AACrD,EAAA,IAAI,CAAC,WAAA,EAAa;AAEhB,IAAA,MAAM,IAAI,MAAM,EAAE,CAAA;AAAA,EACpB;AAGA,EAAA,MAAM,iBAAiB,IAAA,CAAK,cAAA;AAC5B,EAAA,MAAM,kBAAA,GAAqB,QAAA,CAAS,IAAA,CAAK,WAAA,EAAa,EAAE,CAAA;AAExD,EAAA,IAAI,CAAC,MAAA,CAAO,SAAA,CAAU,kBAAkB,CAAA,IAAK,sBAAsB,CAAA,EAAG;AACpE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,6CAAA,EAAgD,KAAK,WAAW,CAAA,UAAA;AAAA,KAClE;AAAA,EACF;AAEA,EAAA,MAAM,UAAU,eAAA,CAAgB;AAAA,IAC9B,WAAA,EAAa,kBAAA;AAAA,IACb;AAAA,GACD,CAAA;AACH
|
|
1
|
+
{"version":3,"file":"migrate.cjs.js","sources":["../../../src/commands/migrate/migrate.ts"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { HostDiscovery } from '@backstage/backend-defaults/discovery';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function migrate(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n if (!publisher.migrateDocsCase) {\n throw new Error(`Migration not implemented for ${opts.publisherType}`);\n }\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n throw new Error('');\n }\n\n // Validate and parse migration arguments.\n const removeOriginal = opts.removeOriginal;\n const numericConcurrency = parseInt(opts.concurrency, 10);\n\n if (!Number.isInteger(numericConcurrency) || numericConcurrency <= 0) {\n throw new Error(\n `Concurrency must be a number greater than 1. ${opts.concurrency} provided.`,\n );\n }\n\n await publisher.migrateDocsCase({\n concurrency: numericConcurrency,\n removeOriginal,\n });\n}\n"],"names":["createLogger","PublisherConfig","discovery","HostDiscovery","Publisher"],"mappings":";;;;;;;;;AAsBA,eAA8B,QAAQ,IAAA,EAAoB;AACxD,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,MAAA,GAASC,+BAAA,CAAgB,cAAA,CAAe,IAAI,CAAA;AAClD,EAAA,MAAMC,WAAA,GAAYC,uBAAA,CAAc,UAAA,CAAW,MAAM,CAAA;AACjD,EAAA,MAAM,SAAA,GAAY,MAAMC,4BAAA,CAAU,UAAA,CAAW,QAAQ,EAAE,MAAA,aAAQF,aAAW,CAAA;AAE1E,EAAA,IAAI,CAAC,UAAU,eAAA,EAAiB;AAC9B,IAAA,MAAM,IAAI,KAAA,CAAM,CAAA,8BAAA,EAAiC,IAAA,CAAK,aAAa,CAAA,CAAE,CAAA;AAAA,EACvE;AAGA,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,MAAM,UAAU,YAAA,EAAa;AACrD,EAAA,IAAI,CAAC,WAAA,EAAa;AAEhB,IAAA,MAAM,IAAI,MAAM,EAAE,CAAA;AAAA,EACpB;AAGA,EAAA,MAAM,iBAAiB,IAAA,CAAK,cAAA;AAC5B,EAAA,MAAM,kBAAA,GAAqB,QAAA,CAAS,IAAA,CAAK,WAAA,EAAa,EAAE,CAAA;AAExD,EAAA,IAAI,CAAC,MAAA,CAAO,SAAA,CAAU,kBAAkB,CAAA,IAAK,sBAAsB,CAAA,EAAG;AACpE,IAAA,MAAM,IAAI,KAAA;AAAA,MACR,CAAA,6CAAA,EAAgD,KAAK,WAAW,CAAA,UAAA;AAAA,KAClE;AAAA,EACF;AAEA,EAAA,MAAM,UAAU,eAAA,CAAgB;AAAA,IAC9B,WAAA,EAAa,kBAAA;AAAA,IACb;AAAA,GACD,CAAA;AACH;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.cjs.js","sources":["../../../src/commands/publish/publish.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve, join } from 'node:path';\nimport fs from 'fs-extra';\nimport JSON5 from 'json5';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { HostDiscovery } from '@backstage/backend-defaults/discovery';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n\n if (opts.skipIfUnchanged) {\n const metadataPath = join(directory, 'techdocs_metadata.json');\n\n if (!(await fs.pathExists(metadataPath))) {\n logger.info(\n '--skip-if-unchanged: techdocs_metadata.json not found locally, proceeding with publish',\n );\n } else {\n const localMetadata = JSON5.parse(\n await fs.readFile(metadataPath, 'utf8'),\n );\n const localEtag = localMetadata?.etag;\n\n if (!localEtag) {\n logger.info(\n '--skip-if-unchanged: no etag in local techdocs_metadata.json (was --etag passed to generate?), proceeding with publish',\n );\n } else {\n try {\n const remoteMetadata = await publisher.fetchTechDocsMetadata({\n namespace,\n kind,\n name,\n });\n const remoteEtag = remoteMetadata?.etag;\n\n if (localEtag === remoteEtag) {\n logger.info(\n `--skip-if-unchanged: local etag \"${localEtag}\" matches remote, skipping publish`,\n );\n return true;\n }\n\n logger.info(\n `--skip-if-unchanged: etag changed from \"${remoteEtag}\" to \"${localEtag}\", proceeding with publish`,\n );\n } catch (error) {\n // fetchTechDocsMetadata rejects when metadata is not found (first publish),\n // but may also fail for other reasons (network, auth), so log the cause.\n logger.info(\n `--skip-if-unchanged: could not fetch remote metadata (first publish?), proceeding with publish: ${error}`,\n );\n }\n }\n }\n }\n\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","discovery","HostDiscovery","Publisher","resolve","join","fs","JSON5"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,eAA8B,QAAQ,IAAA,EAAkC;AACtE,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,MAAA,GAASC,+BAAA,CAAgB,cAAA,CAAe,IAAI,CAAA;AAClD,EAAA,MAAMC,WAAA,GAAYC,uBAAA,CAAc,UAAA,CAAW,MAAM,CAAA;AACjD,EAAA,MAAM,SAAA,GAAY,MAAMC,4BAAA,CAAU,UAAA,CAAW,QAAQ,EAAE,MAAA,aAAQF,aAAW,CAAA;AAG1E,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,MAAM,UAAU,YAAA,EAAa;AACrD,EAAA,IAAI,CAAC,WAAA,EAAa;AAEhB,IAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,EAAE,CAAC,CAAA;AAAA,EACrC;AAEA,EAAA,MAAM,CAAC,WAAW,IAAA,EAAM,IAAI,IAAI,IAAA,CAAK,MAAA,CAAO,MAAM,GAAG,CAAA;AACrD,EAAA,MAAM,MAAA,GAAS;AAAA,IACb,IAAA;AAAA,IACA,QAAA,EAAU;AAAA,MACR,SAAA;AAAA,MACA;AAAA;AACF,GACF;AAEA,EAAA,MAAM,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,MAAA,EAAQ,WAAW,CAAA;AAE7C,EAAA,OAAO,IAAA;AACT
|
|
1
|
+
{"version":3,"file":"publish.cjs.js","sources":["../../../src/commands/publish/publish.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { resolve, join } from 'node:path';\nimport fs from 'fs-extra';\nimport JSON5 from 'json5';\nimport { OptionValues } from 'commander';\nimport { createLogger } from '../../lib/utility';\nimport { HostDiscovery } from '@backstage/backend-defaults/discovery';\nimport { Publisher } from '@backstage/plugin-techdocs-node';\nimport { Entity } from '@backstage/catalog-model';\nimport { PublisherConfig } from '../../lib/PublisherConfig';\n\nexport default async function publish(opts: OptionValues): Promise<any> {\n const logger = createLogger({ verbose: opts.verbose });\n\n const config = PublisherConfig.getValidConfig(opts);\n const discovery = HostDiscovery.fromConfig(config);\n const publisher = await Publisher.fromConfig(config, { logger, discovery });\n\n // Check that the publisher's underlying storage is ready and available.\n const { isAvailable } = await publisher.getReadiness();\n if (!isAvailable) {\n // Error messages printed in getReadiness() call. This ensures exit code 1.\n return Promise.reject(new Error(''));\n }\n\n const [namespace, kind, name] = opts.entity.split('/');\n const entity = {\n kind,\n metadata: {\n namespace,\n name,\n },\n } as Entity;\n\n const directory = resolve(opts.directory);\n\n if (opts.skipIfUnchanged) {\n const metadataPath = join(directory, 'techdocs_metadata.json');\n\n if (!(await fs.pathExists(metadataPath))) {\n logger.info(\n '--skip-if-unchanged: techdocs_metadata.json not found locally, proceeding with publish',\n );\n } else {\n const localMetadata = JSON5.parse(\n await fs.readFile(metadataPath, 'utf8'),\n );\n const localEtag = localMetadata?.etag;\n\n if (!localEtag) {\n logger.info(\n '--skip-if-unchanged: no etag in local techdocs_metadata.json (was --etag passed to generate?), proceeding with publish',\n );\n } else {\n try {\n const remoteMetadata = await publisher.fetchTechDocsMetadata({\n namespace,\n kind,\n name,\n });\n const remoteEtag = remoteMetadata?.etag;\n\n if (localEtag === remoteEtag) {\n logger.info(\n `--skip-if-unchanged: local etag \"${localEtag}\" matches remote, skipping publish`,\n );\n return true;\n }\n\n logger.info(\n `--skip-if-unchanged: etag changed from \"${remoteEtag}\" to \"${localEtag}\", proceeding with publish`,\n );\n } catch (error) {\n // fetchTechDocsMetadata rejects when metadata is not found (first publish),\n // but may also fail for other reasons (network, auth), so log the cause.\n logger.info(\n `--skip-if-unchanged: could not fetch remote metadata (first publish?), proceeding with publish: ${error}`,\n );\n }\n }\n }\n }\n\n await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","discovery","HostDiscovery","Publisher","resolve","join","fs","JSON5"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,eAA8B,QAAQ,IAAA,EAAkC;AACtE,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,MAAA,GAASC,+BAAA,CAAgB,cAAA,CAAe,IAAI,CAAA;AAClD,EAAA,MAAMC,WAAA,GAAYC,uBAAA,CAAc,UAAA,CAAW,MAAM,CAAA;AACjD,EAAA,MAAM,SAAA,GAAY,MAAMC,4BAAA,CAAU,UAAA,CAAW,QAAQ,EAAE,MAAA,aAAQF,aAAW,CAAA;AAG1E,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,MAAM,UAAU,YAAA,EAAa;AACrD,EAAA,IAAI,CAAC,WAAA,EAAa;AAEhB,IAAA,OAAO,OAAA,CAAQ,MAAA,CAAO,IAAI,KAAA,CAAM,EAAE,CAAC,CAAA;AAAA,EACrC;AAEA,EAAA,MAAM,CAAC,WAAW,IA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AAAA,QACF,SAAS,KAAA,EAAO;AAGd,UAAA,MAAA,CAAO,IAAA;AAAA,YACL,mGAAmG,KAAK,CAAA;AAAA,WAC1G;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,EAAA,MAAM,SAAA,CAAU,OAAA,CAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA;AAE7C,EAAA,OAAO,IAAA;AACT;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mkdocs.cjs.js","sources":["../../../src/commands/serve/mkdocs.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 openBrowser from 'react-dev-utils/openBrowser';\nimport { createLogger } from '../../lib/utility';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { RunOnOutput } from '@backstage/cli-common';\nimport { getMkdocsYml } from '@backstage/plugin-techdocs-node';\nimport fs from 'fs-extra';\nimport { checkIfDockerIsOperational } from './utils';\n\nexport default async function serveMkdocs(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const dockerAddr = `http://0.0.0.0:${opts.port}`;\n const localAddr = `http://127.0.0.1:${opts.port}`;\n const expectedDevAddr = opts.docker ? dockerAddr : localAddr;\n\n if (opts.docker) {\n const isDockerOperational = await checkIfDockerIsOperational(logger);\n if (!isDockerOperational) {\n return;\n }\n }\n\n const { path: mkdocsYmlPath, configIsTemporary } = await getMkdocsYml(\n './',\n opts.siteName,\n );\n\n // We want to open browser only once based on a log.\n let boolOpenBrowserTriggered = false;\n\n const logFunc: RunOnOutput = data => {\n // Sometimes the lines contain an unnecessary extra new line in between\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 // Logs from container is verbose.\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !boolOpenBrowserTriggered &&\n line.includes(`Serving on ${expectedDevAddr}`)\n ) {\n // Always open the local address, since 0.0.0.0 belongs to docker\n logger.info(`\\nStarting mkdocs server on ${localAddr}\\n`);\n openBrowser(localAddr);\n boolOpenBrowserTriggered = 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\n // Commander stores --no-docker in cmd.docker variable\n const childProcess = runMkdocsServer({\n port: opts.port,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n dockerOptions: opts.dockerOption,\n useDocker: opts.docker,\n mkdocsConfigFileName: mkdocsYmlPath,\n onStdout: logFunc,\n onStderr: logFunc,\n });\n\n // Keep waiting for user to cancel the process\n await childProcess.waitForExit();\n\n if (configIsTemporary) {\n process.on('exit', async () => {\n fs.rmSync(mkdocsYmlPath, {});\n });\n }\n}\n"],"names":["createLogger","checkIfDockerIsOperational","getMkdocsYml","openBrowser","runMkdocsServer","fs"],"mappings":";;;;;;;;;;;;;;;;AAyBA,eAA8B,YAAY,IAAA,EAAoB;AAC5D,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,UAAA,GAAa,CAAA,eAAA,EAAkB,IAAA,CAAK,IAAI,CAAA,CAAA;AAC9C,EAAA,MAAM,SAAA,GAAY,CAAA,iBAAA,EAAoB,IAAA,CAAK,IAAI,CAAA,CAAA;AAC/C,EAAA,MAAM,eAAA,GAAkB,IAAA,C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AAA;AAAA,IACvB,eAAe,IAAA,CAAK,YAAA;AAAA,IACpB,WAAW,IAAA,CAAK,MAAA;AAAA,IAChB,oBAAA,EAAsB,aAAA;AAAA,IACtB,QAAA,EAAU,OAAA;AAAA,IACV,QAAA,EAAU;AAAA,GACX,CAAA;AAGD,EAAA,MAAM,aAAa,WAAA,EAAY;AAE/B,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
|
|
1
|
+
{"version":3,"file":"mkdocs.cjs.js","sources":["../../../src/commands/serve/mkdocs.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 openBrowser from 'react-dev-utils/openBrowser';\nimport { createLogger } from '../../lib/utility';\nimport { runMkdocsServer } from '../../lib/mkdocsServer';\nimport { RunOnOutput } from '@backstage/cli-common';\nimport { getMkdocsYml } from '@backstage/plugin-techdocs-node';\nimport fs from 'fs-extra';\nimport { checkIfDockerIsOperational } from './utils';\n\nexport default async function serveMkdocs(opts: OptionValues) {\n const logger = createLogger({ verbose: opts.verbose });\n\n const dockerAddr = `http://0.0.0.0:${opts.port}`;\n const localAddr = `http://127.0.0.1:${opts.port}`;\n const expectedDevAddr = opts.docker ? dockerAddr : localAddr;\n\n if (opts.docker) {\n const isDockerOperational = await checkIfDockerIsOperational(logger);\n if (!isDockerOperational) {\n return;\n }\n }\n\n const { path: mkdocsYmlPath, configIsTemporary } = await getMkdocsYml(\n './',\n opts.siteName,\n );\n\n // We want to open browser only once based on a log.\n let boolOpenBrowserTriggered = false;\n\n const logFunc: RunOnOutput = data => {\n // Sometimes the lines contain an unnecessary extra new line in between\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 // Logs from container is verbose.\n logger.verbose(`${logPrefix} ${line}`);\n\n // When the server has started, open a new browser tab for the user.\n if (\n !boolOpenBrowserTriggered &&\n line.includes(`Serving on ${expectedDevAddr}`)\n ) {\n // Always open the local address, since 0.0.0.0 belongs to docker\n logger.info(`\\nStarting mkdocs server on ${localAddr}\\n`);\n openBrowser(localAddr);\n boolOpenBrowserTriggered = 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\n // Commander stores --no-docker in cmd.docker variable\n const childProcess = runMkdocsServer({\n port: opts.port,\n dockerImage: opts.dockerImage,\n dockerEntrypoint: opts.dockerEntrypoint,\n dockerOptions: opts.dockerOption,\n useDocker: opts.docker,\n mkdocsConfigFileName: mkdocsYmlPath,\n onStdout: logFunc,\n onStderr: logFunc,\n });\n\n // Keep waiting for user to cancel the process\n await childProcess.waitForExit();\n\n if (configIsTemporary) {\n process.on('exit', async () => {\n fs.rmSync(mkdocsYmlPath, {});\n });\n }\n}\n"],"names":["createLogger","checkIfDockerIsOperational","getMkdocsYml","openBrowser","runMkdocsServer","fs"],"mappings":";;;;;;;;;;;;;;;;AAyBA,eAA8B,YAAY,IAAA,EAAoB;AAC5D,EAAA,MAAM,SAASA,oBAAA,CAAa,EAAE,OAAA,EAAS,IAAA,CAAK,SAAS,CAAA;AAErD,EAAA,MAAM,UAAA,GAAa,CAAA,eAAA,EAAkB,IAAA,CAAK,IAAI,CAAA,C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AAeC,4BAAA,CAAgB;AAAA,IACnC,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,kBAAkB,IAAA,CAAK,gBAAA;AAAA,IACvB,eAAe,IAAA,CAAK,YAAA;AAAA,IACpB,WAAW,IAAA,CAAK,MAAA;AAAA,IAChB,oBAAA,EAAsB,aAAA;AAAA,IACtB,QAAA,EAAU,OAAA;AAAA,IACV,QAAA,EAAU;AAAA,GACX,CAAA;AAGD,EAAA,MAAM,aAAa,WAAA,EAAY;AAE/B,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;;"}
|
|
@@ -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 { 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,GAAuB,IAAA;AAE7B,EAAA,MAAM,gBAAA,GAAmB,CAAA,eAAA,EAAkB,IAAA,CAAK,UAAU,CAAA,CAAA;AAC1D,EAAA,MAAM,eAAA,GAAkB,CAAA,iBAAA,EAAoB,IAAA,CAAK,UAAU,CAAA,CAAA;AAC3D,EAAA,MAAM,qBAAA,GAAwB,IAAA,CAAK,MAAA,GAC/B,gBAAA,GACA,eAAA;AACJ,EAAA,MAAM,uBAAuB,IAAA,CAAK,oBAAA;AAClC,EAAA,MAAM,WAAW,IAAA,CAAK,QAAA;AAEtB,EAAA,MAAM,EAAE,IAAA,EAA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;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
|
|
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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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs.js","sources":["../../../src/commands/serve/utils.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as winston from 'winston';\nimport { runCheck } from '@backstage/cli-common';\n\nexport async function checkIfDockerIsOperational(\n logger: winston.Logger,\n): Promise<boolean> {\n logger.info('Checking Docker status...');\n const isOperational = await runCheck(['docker', 'info']);\n if (isOperational) {\n logger.info(\n 'Docker is up and running. Proceed to starting up mkdocs server',\n );\n return true;\n }\n logger.error(\n 'Docker is not running. Exiting. Please check status of Docker daemon with `docker info` before re-running',\n );\n return false;\n}\n"],"names":["runCheck"],"mappings":";;;;AAmBA,eAAsB,2BACpB,MAAA,EACkB;AAClB,EAAA,MAAA,CAAO,KAAK,2BAA2B,CAAA;AACvC,EAAA,MAAM,gBAAgB,MAAMA,kBAAA,CAAS,CAAC,QAAA,EAAU,MAAM,CAAC,CAAA;AACvD,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,MAAA,CAAO,KAAA;AAAA,IACL;AAAA,GACF;AACA,EAAA,OAAO,KAAA;AACT
|
|
1
|
+
{"version":3,"file":"utils.cjs.js","sources":["../../../src/commands/serve/utils.ts"],"sourcesContent":["/*\n * Copyright 2023 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 * as winston from 'winston';\nimport { runCheck } from '@backstage/cli-common';\n\nexport async function checkIfDockerIsOperational(\n logger: winston.Logger,\n): Promise<boolean> {\n logger.info('Checking Docker status...');\n const isOperational = await runCheck(['docker', 'info']);\n if (isOperational) {\n logger.info(\n 'Docker is up and running. Proceed to starting up mkdocs server',\n );\n return true;\n }\n logger.error(\n 'Docker is not running. Exiting. Please check status of Docker daemon with `docker info` before re-running',\n );\n return false;\n}\n"],"names":["runCheck"],"mappings":";;;;AAmBA,eAAsB,2BACpB,MAAA,EACkB;AAClB,EAAA,MAAA,CAAO,KAAK,2BAA2B,CAAA;AACvC,EAAA,MAAM,gBAAgB,MAAMA,kBAAA,CAAS,CAAC,QAAA,EAAU,MAAM,CAAC,CAAA;AACvD,EAAA,IAAI,aAAA,EAAe;AACjB,IAAA,MAAA,CAAO,IAAA;AAAA,MACL;AAAA,KACF;AACA,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,MAAA,CAAO,KAAA;AAAA,IACL;AAAA,GACF;AACA,EAAA,OAAO,KAAA;AACT;;"}
|
|
@@ -358,6 +358,52 @@
|
|
|
358
358
|
},
|
|
359
359
|
"packageName": "@backstage/core-app-api"
|
|
360
360
|
},
|
|
361
|
+
{
|
|
362
|
+
"path": "../core-components/config.d.ts",
|
|
363
|
+
"value": {
|
|
364
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
365
|
+
"type": "object",
|
|
366
|
+
"properties": {
|
|
367
|
+
"auth": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"properties": {
|
|
370
|
+
"autologout": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"properties": {
|
|
373
|
+
"enabled": {
|
|
374
|
+
"type": "boolean",
|
|
375
|
+
"description": "Enable or disable the autologout feature",
|
|
376
|
+
"visibility": "frontend"
|
|
377
|
+
},
|
|
378
|
+
"idleTimeoutMinutes": {
|
|
379
|
+
"type": "number",
|
|
380
|
+
"description": "Number of minutes after which the inactive user is logged out automatically. Default is 60 minutes (1 hour)",
|
|
381
|
+
"visibility": "frontend"
|
|
382
|
+
},
|
|
383
|
+
"promptBeforeIdleSeconds": {
|
|
384
|
+
"type": "number",
|
|
385
|
+
"description": "Number of seconds before the idle timeout where the user will be asked if it's still active. A dialog will be shown. Default is 10 seconds. Set to 0 seconds to disable the prompt.",
|
|
386
|
+
"visibility": "frontend"
|
|
387
|
+
},
|
|
388
|
+
"useWorkerTimers": {
|
|
389
|
+
"type": "boolean",
|
|
390
|
+
"description": "Enable/disable the usage of worker thread timers instead of main thread timers. Default is true. If you experience some browser incompatibility, you may try to set this to false.",
|
|
391
|
+
"visibility": "frontend"
|
|
392
|
+
},
|
|
393
|
+
"logoutIfDisconnected": {
|
|
394
|
+
"type": "boolean",
|
|
395
|
+
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open. Default is true.",
|
|
396
|
+
"visibility": "frontend"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"description": "Autologout feature configuration"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
},
|
|
405
|
+
"packageName": "@backstage/core-components"
|
|
406
|
+
},
|
|
361
407
|
{
|
|
362
408
|
"path": "../../plugins/techdocs/config.d.ts",
|
|
363
409
|
"value": {
|
|
@@ -946,83 +992,6 @@
|
|
|
946
992
|
},
|
|
947
993
|
"packageName": "@backstage/integration"
|
|
948
994
|
},
|
|
949
|
-
{
|
|
950
|
-
"path": "../../plugins/catalog/config.d.ts",
|
|
951
|
-
"value": {
|
|
952
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
953
|
-
"type": "object",
|
|
954
|
-
"properties": {
|
|
955
|
-
"catalog": {
|
|
956
|
-
"type": "object",
|
|
957
|
-
"properties": {
|
|
958
|
-
"experimentalPagination": {
|
|
959
|
-
"anyOf": [
|
|
960
|
-
{
|
|
961
|
-
"type": "boolean"
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
"type": "object",
|
|
965
|
-
"properties": {
|
|
966
|
-
"limit": {
|
|
967
|
-
"type": "number"
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
],
|
|
972
|
-
"deepVisibility": "frontend"
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
},
|
|
978
|
-
"packageName": "@backstage/plugin-catalog"
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
"path": "../core-components/config.d.ts",
|
|
982
|
-
"value": {
|
|
983
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
984
|
-
"type": "object",
|
|
985
|
-
"properties": {
|
|
986
|
-
"auth": {
|
|
987
|
-
"type": "object",
|
|
988
|
-
"properties": {
|
|
989
|
-
"autologout": {
|
|
990
|
-
"type": "object",
|
|
991
|
-
"properties": {
|
|
992
|
-
"enabled": {
|
|
993
|
-
"type": "boolean",
|
|
994
|
-
"description": "Enable or disable the autologout feature",
|
|
995
|
-
"visibility": "frontend"
|
|
996
|
-
},
|
|
997
|
-
"idleTimeoutMinutes": {
|
|
998
|
-
"type": "number",
|
|
999
|
-
"description": "Number of minutes after which the inactive user is logged out automatically. Default is 60 minutes (1 hour)",
|
|
1000
|
-
"visibility": "frontend"
|
|
1001
|
-
},
|
|
1002
|
-
"promptBeforeIdleSeconds": {
|
|
1003
|
-
"type": "number",
|
|
1004
|
-
"description": "Number of seconds before the idle timeout where the user will be asked if it's still active. A dialog will be shown. Default is 10 seconds. Set to 0 seconds to disable the prompt.",
|
|
1005
|
-
"visibility": "frontend"
|
|
1006
|
-
},
|
|
1007
|
-
"useWorkerTimers": {
|
|
1008
|
-
"type": "boolean",
|
|
1009
|
-
"description": "Enable/disable the usage of worker thread timers instead of main thread timers. Default is true. If you experience some browser incompatibility, you may try to set this to false.",
|
|
1010
|
-
"visibility": "frontend"
|
|
1011
|
-
},
|
|
1012
|
-
"logoutIfDisconnected": {
|
|
1013
|
-
"type": "boolean",
|
|
1014
|
-
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open. Default is true.",
|
|
1015
|
-
"visibility": "frontend"
|
|
1016
|
-
}
|
|
1017
|
-
},
|
|
1018
|
-
"description": "Autologout feature configuration"
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
},
|
|
1024
|
-
"packageName": "@backstage/core-components"
|
|
1025
|
-
},
|
|
1026
995
|
{
|
|
1027
996
|
"path": "../frontend-app-api/config.d.ts",
|
|
1028
997
|
"value": {
|
|
@@ -1195,6 +1164,37 @@
|
|
|
1195
1164
|
},
|
|
1196
1165
|
"packageName": "@backstage/frontend-app-api"
|
|
1197
1166
|
},
|
|
1167
|
+
{
|
|
1168
|
+
"path": "../../plugins/catalog/config.d.ts",
|
|
1169
|
+
"value": {
|
|
1170
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
1171
|
+
"type": "object",
|
|
1172
|
+
"properties": {
|
|
1173
|
+
"catalog": {
|
|
1174
|
+
"type": "object",
|
|
1175
|
+
"properties": {
|
|
1176
|
+
"experimentalPagination": {
|
|
1177
|
+
"anyOf": [
|
|
1178
|
+
{
|
|
1179
|
+
"type": "boolean"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"type": "object",
|
|
1183
|
+
"properties": {
|
|
1184
|
+
"limit": {
|
|
1185
|
+
"type": "number"
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
],
|
|
1190
|
+
"deepVisibility": "frontend"
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
},
|
|
1196
|
+
"packageName": "@backstage/plugin-catalog"
|
|
1197
|
+
},
|
|
1198
1198
|
{
|
|
1199
1199
|
"path": "../backend-plugin-api/config.d.ts",
|
|
1200
1200
|
"value": {
|
|
@@ -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.f85ef6e514f1.js"></script><script defer="defer" src="/static/module-react-aria.e5ec1c3eb56c.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.605250e71906.js"></script><script defer="defer" src="/static/module-zod.da562d5b5226.js"></script><script defer="defer" src="/static/module-react-aria-components.52a99e4e4c7d.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.d2c73d5e1e09.js"></script><script defer="defer" src="/static/main.541fb5168686.js"></script><link href="/static/main.f998754e3938.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.f85ef6e514f1.js"></script><script defer src="<%= publicPath %>/static/module-react-aria.e5ec1c3eb56c.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.605250e71906.js"></script><script defer src="<%= publicPath %>/static/module-zod.da562d5b5226.js"></script><script defer src="<%= publicPath %>/static/module-react-aria-components.52a99e4e4c7d.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.d2c73d5e1e09.js"></script><script defer src="<%= publicPath %>/static/main.541fb5168686.js"></script><link href="<%= publicPath %>/static/main.f998754e3938.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>
|
|
@@ -1,2 +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":"0.0.0-nightly-
|
|
2
|
-
//# sourceMappingURL=123.
|
|
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":"0.0.0-nightly-20260920023043","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/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.91b76c2db3c7.chunk.js.map
|
package/dist/embedded-app/static/{123.f267957e6c41.chunk.js.map → 123.91b76c2db3c7.chunk.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/123.
|
|
1
|
+
{"version":3,"file":"static/123.91b76c2db3c7.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\":\"0.0.0-nightly-20260920023043\",\"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/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,imG"}
|