@techdocs/cli 1.11.5-next.1 → 1.12.0
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 +29 -0
- package/dist/commands/generate/generate.cjs.js +32 -2
- package/dist/commands/generate/generate.cjs.js.map +1 -1
- package/dist/commands/index.cjs.js +9 -1
- package/dist/commands/index.cjs.js.map +1 -1
- package/dist/commands/publish/publish.cjs.js +47 -0
- package/dist/commands/publish/publish.cjs.js.map +1 -1
- package/dist/embedded-app/.config-schema.json +51 -46
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/123.91ba1b809deb.chunk.js +2 -0
- package/dist/embedded-app/static/123.91ba1b809deb.chunk.js.map +1 -0
- package/dist/embedded-app/static/1659.a99e4eb674e0.chunk.js +2 -0
- package/dist/embedded-app/static/1659.a99e4eb674e0.chunk.js.map +1 -0
- package/dist/embedded-app/static/1749.99ba95728e00.chunk.js +2 -0
- package/dist/embedded-app/static/1749.99ba95728e00.chunk.js.map +1 -0
- package/dist/embedded-app/static/1994.7736057c2e9f.chunk.js +2 -0
- package/dist/embedded-app/static/1994.7736057c2e9f.chunk.js.map +1 -0
- package/dist/embedded-app/static/{2055.fd3ccf91ac47.chunk.js → 2055.d938e6121e5f.chunk.js} +4 -4
- package/dist/embedded-app/static/2055.d938e6121e5f.chunk.js.map +1 -0
- package/dist/embedded-app/static/{2295.e8be8ba6c18d.chunk.js → 2295.aaedbca4c1c5.chunk.js} +2 -2
- package/dist/embedded-app/static/2295.aaedbca4c1c5.chunk.js.map +1 -0
- package/dist/embedded-app/static/2360.806f2e1ab212.chunk.js +2 -0
- package/dist/embedded-app/static/2360.806f2e1ab212.chunk.js.map +1 -0
- package/dist/embedded-app/static/3554.78dd0c182f6c.chunk.js +2 -0
- package/dist/embedded-app/static/3554.78dd0c182f6c.chunk.js.map +1 -0
- package/dist/embedded-app/static/4587.d1220800a7d6.chunk.js +2 -0
- package/dist/embedded-app/static/4587.d1220800a7d6.chunk.js.map +1 -0
- package/dist/embedded-app/static/4591.d741c025cb8a.chunk.js +2 -0
- package/dist/embedded-app/static/4591.d741c025cb8a.chunk.js.map +1 -0
- package/dist/embedded-app/static/4609.b1c67dc7cac2.chunk.js +531 -0
- package/dist/embedded-app/static/4609.b1c67dc7cac2.chunk.js.map +1 -0
- package/dist/embedded-app/static/4648.cd5b8df48435.chunk.js +2 -0
- package/dist/embedded-app/static/4648.cd5b8df48435.chunk.js.map +1 -0
- package/dist/embedded-app/static/6138.f15d6245c80d.chunk.js +2 -0
- package/dist/embedded-app/static/6138.f15d6245c80d.chunk.js.map +1 -0
- package/dist/embedded-app/static/6206.3e7f13e11c59.chunk.js +2 -0
- package/dist/embedded-app/static/6206.3e7f13e11c59.chunk.js.map +1 -0
- package/dist/embedded-app/static/6949.beeb90ede97f.chunk.js +4 -0
- package/dist/embedded-app/static/6949.beeb90ede97f.chunk.js.map +1 -0
- package/dist/embedded-app/static/7203.8b3d94b34b16.chunk.js +2 -0
- package/dist/embedded-app/static/7203.8b3d94b34b16.chunk.js.map +1 -0
- package/dist/embedded-app/static/8877.ab3d98868650.chunk.js +2 -0
- package/dist/embedded-app/static/8877.ab3d98868650.chunk.js.map +1 -0
- package/dist/embedded-app/static/9050.bd63e0a33f06.chunk.js +2 -0
- package/dist/embedded-app/static/9050.bd63e0a33f06.chunk.js.map +1 -0
- package/dist/embedded-app/static/9230.422824f655e0.chunk.js +2 -0
- package/dist/embedded-app/static/9230.422824f655e0.chunk.js.map +1 -0
- package/dist/embedded-app/static/main.9b48363c4ffa.js +2 -0
- package/dist/embedded-app/static/main.9b48363c4ffa.js.map +1 -0
- package/dist/embedded-app/static/module-remix-run.32d1d7665115.js +2 -0
- package/dist/embedded-app/static/module-remix-run.32d1d7665115.js.map +1 -0
- package/dist/embedded-app/static/{runtime.c8854f4ed6f8.js → runtime.720cb48cd7ae.js} +2 -2
- package/dist/embedded-app/static/{runtime.c8854f4ed6f8.js.map → runtime.720cb48cd7ae.js.map} +1 -1
- package/dist/embedded-app/static/vendor.470d3e8ecef1.js +2 -0
- package/dist/embedded-app/static/vendor.470d3e8ecef1.js.map +1 -0
- package/dist/lib/etag.cjs.js +40 -0
- package/dist/lib/etag.cjs.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +8 -7
- package/dist/embedded-app/static/123.449f4a83fd2b.chunk.js +0 -2
- package/dist/embedded-app/static/123.449f4a83fd2b.chunk.js.map +0 -1
- package/dist/embedded-app/static/1659.41bf35e59592.chunk.js +0 -2
- package/dist/embedded-app/static/1659.41bf35e59592.chunk.js.map +0 -1
- package/dist/embedded-app/static/1749.75c83d8a41f6.chunk.js +0 -2
- package/dist/embedded-app/static/1749.75c83d8a41f6.chunk.js.map +0 -1
- package/dist/embedded-app/static/1994.78042a47b6c6.chunk.js +0 -2
- package/dist/embedded-app/static/1994.78042a47b6c6.chunk.js.map +0 -1
- package/dist/embedded-app/static/2055.fd3ccf91ac47.chunk.js.map +0 -1
- package/dist/embedded-app/static/2295.e8be8ba6c18d.chunk.js.map +0 -1
- package/dist/embedded-app/static/2360.82e9c38bff17.chunk.js +0 -2
- package/dist/embedded-app/static/2360.82e9c38bff17.chunk.js.map +0 -1
- package/dist/embedded-app/static/3554.bb882f8e4aea.chunk.js +0 -2
- package/dist/embedded-app/static/3554.bb882f8e4aea.chunk.js.map +0 -1
- package/dist/embedded-app/static/4587.96f03715ec4f.chunk.js +0 -2
- package/dist/embedded-app/static/4587.96f03715ec4f.chunk.js.map +0 -1
- package/dist/embedded-app/static/4591.5563e3a7aea4.chunk.js +0 -2
- package/dist/embedded-app/static/4591.5563e3a7aea4.chunk.js.map +0 -1
- package/dist/embedded-app/static/4609.152f14ef4904.chunk.js +0 -531
- package/dist/embedded-app/static/4609.152f14ef4904.chunk.js.map +0 -1
- package/dist/embedded-app/static/4648.c047b78345c6.chunk.js +0 -2
- package/dist/embedded-app/static/4648.c047b78345c6.chunk.js.map +0 -1
- package/dist/embedded-app/static/6138.113ed7a1d8cd.chunk.js +0 -2
- package/dist/embedded-app/static/6138.113ed7a1d8cd.chunk.js.map +0 -1
- package/dist/embedded-app/static/6206.b2713857572e.chunk.js +0 -2
- package/dist/embedded-app/static/6206.b2713857572e.chunk.js.map +0 -1
- package/dist/embedded-app/static/6949.62c7fa0aab7f.chunk.js +0 -4
- package/dist/embedded-app/static/6949.62c7fa0aab7f.chunk.js.map +0 -1
- package/dist/embedded-app/static/7203.6e3ffa800885.chunk.js +0 -2
- package/dist/embedded-app/static/7203.6e3ffa800885.chunk.js.map +0 -1
- package/dist/embedded-app/static/8877.58093d2c2ba0.chunk.js +0 -2
- package/dist/embedded-app/static/8877.58093d2c2ba0.chunk.js.map +0 -1
- package/dist/embedded-app/static/9050.0c0d51ee0fd8.chunk.js +0 -2
- package/dist/embedded-app/static/9050.0c0d51ee0fd8.chunk.js.map +0 -1
- package/dist/embedded-app/static/9230.ba752de28896.chunk.js +0 -2
- package/dist/embedded-app/static/9230.ba752de28896.chunk.js.map +0 -1
- package/dist/embedded-app/static/main.82ddbc06e504.js +0 -2
- package/dist/embedded-app/static/main.82ddbc06e504.js.map +0 -1
- package/dist/embedded-app/static/module-remix-run.0c80eb31316a.js +0 -2
- package/dist/embedded-app/static/module-remix-run.0c80eb31316a.js.map +0 -1
- package/dist/embedded-app/static/vendor.3bc2778face5.js +0 -2
- package/dist/embedded-app/static/vendor.3bc2778face5.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @techdocs/cli
|
|
2
2
|
|
|
3
|
+
## 1.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 57205a0: Added a `--dangerouslyAllowAdditionalKeys` option to `techdocs-cli generate`
|
|
8
|
+
- c4976e0: The `generate` command now automatically computes a sha256 content hash of the generated site output and stores it as the etag in `techdocs_metadata.json` when no `--etag` value is explicitly provided.
|
|
9
|
+
|
|
10
|
+
Added `--skip-if-unchanged` flag to `publish` that compares the local etag against the remote etag before uploading. When they match, the publish step is skipped entirely. This avoids redundant uploads in CI pipelines when docs haven't changed between builds.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- de92fae: Fixed an issue where `techdocs-cli serve` would silently stop detecting documentation changes and no longer refresh the browser when the Python environment (TechDocs container image or local) contains `click` 8.3.x. The CLI now explicitly enables MkDocs live reload when serving.
|
|
15
|
+
- 4441911: Improved MkDocs configuration file handling.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @backstage/backend-defaults@0.18.0
|
|
18
|
+
- @backstage/catalog-model@1.10.1
|
|
19
|
+
- @backstage/cli-common@0.3.1
|
|
20
|
+
- @backstage/plugin-techdocs-node@2.0.0
|
|
21
|
+
- @backstage/config@1.3.9
|
|
22
|
+
|
|
23
|
+
## 1.11.5-next.2
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
- @backstage/plugin-techdocs-node@1.16.0-next.1
|
|
29
|
+
- @backstage/config@1.3.9-next.0
|
|
30
|
+
- @backstage/backend-defaults@0.17.9-next.1
|
|
31
|
+
|
|
3
32
|
## 1.11.5-next.1
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -4,14 +4,27 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var path = require('node:path');
|
|
6
6
|
var fs = require('fs-extra');
|
|
7
|
+
var JSON5 = require('json5');
|
|
7
8
|
var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
|
|
8
9
|
var config = require('@backstage/config');
|
|
9
10
|
var utility = require('../../lib/utility.cjs.js');
|
|
11
|
+
var etag = require('../../lib/etag.cjs.js');
|
|
10
12
|
|
|
11
13
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
12
14
|
|
|
13
15
|
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
16
|
+
var JSON5__default = /*#__PURE__*/_interopDefaultCompat(JSON5);
|
|
14
17
|
|
|
18
|
+
const TECHDOCS_METADATA_FILE = "techdocs_metadata.json";
|
|
19
|
+
const GENERATED_SITE_ETAG_EXCLUDED_FILES = [
|
|
20
|
+
TECHDOCS_METADATA_FILE,
|
|
21
|
+
// The compressed sitemap can include gzip metadata that changes between
|
|
22
|
+
// otherwise identical generated sites; sitemap.xml still captures content.
|
|
23
|
+
"sitemap.xml.gz",
|
|
24
|
+
// mkdocs writes build-date lastmod entries into sitemap.xml, so the hash
|
|
25
|
+
// changes daily even when the documentation content is identical.
|
|
26
|
+
"sitemap.xml"
|
|
27
|
+
];
|
|
15
28
|
async function generate(opts) {
|
|
16
29
|
const logger = utility.createLogger({ verbose: opts.verbose });
|
|
17
30
|
const sourceDir = path.resolve(opts.sourceDir);
|
|
@@ -22,6 +35,7 @@ async function generate(opts) {
|
|
|
22
35
|
const legacyCopyReadmeMdToIndexMd = opts.legacyCopyReadmeMdToIndexMd;
|
|
23
36
|
const disableExternalFonts = opts.disableExternalFonts;
|
|
24
37
|
const defaultPlugins = opts.defaultPlugin;
|
|
38
|
+
const dangerouslyAllowAdditionalKeys = opts.dangerouslyAllowAdditionalKeys;
|
|
25
39
|
logger.info(`Using source dir ${sourceDir}`);
|
|
26
40
|
logger.info(`Will output generated files in ${outputDir}`);
|
|
27
41
|
logger.verbose("Creating output directory if it does not exist.");
|
|
@@ -39,7 +53,8 @@ async function generate(opts) {
|
|
|
39
53
|
legacyCopyReadmeMdToIndexMd,
|
|
40
54
|
omitTechdocsCorePlugin,
|
|
41
55
|
disableExternalFonts,
|
|
42
|
-
defaultPlugins
|
|
56
|
+
defaultPlugins,
|
|
57
|
+
dangerouslyAllowAdditionalKeys
|
|
43
58
|
}
|
|
44
59
|
}
|
|
45
60
|
}
|
|
@@ -54,6 +69,8 @@ async function generate(opts) {
|
|
|
54
69
|
logger.error(err.message);
|
|
55
70
|
}
|
|
56
71
|
}
|
|
72
|
+
const hasExplicitEtag = opts.etag !== void 0;
|
|
73
|
+
const etag$1 = hasExplicitEtag ? opts.etag : void 0;
|
|
57
74
|
const techdocsGenerator = await pluginTechdocsNode.TechdocsGenerator.fromConfig(config$1, {
|
|
58
75
|
logger
|
|
59
76
|
});
|
|
@@ -65,11 +82,24 @@ async function generate(opts) {
|
|
|
65
82
|
parsedLocationAnnotation
|
|
66
83
|
} : {},
|
|
67
84
|
logger,
|
|
68
|
-
etag:
|
|
85
|
+
etag: etag$1,
|
|
69
86
|
logStream: utility.getLogStream(logger),
|
|
70
87
|
siteOptions: { name: opts.siteName },
|
|
71
88
|
runAsDefaultUser: opts.runAsDefaultUser
|
|
72
89
|
});
|
|
90
|
+
if (!hasExplicitEtag) {
|
|
91
|
+
const generatedSiteEtag = await etag.computeDirectoryEtag(outputDir, {
|
|
92
|
+
exclude: GENERATED_SITE_ETAG_EXCLUDED_FILES
|
|
93
|
+
});
|
|
94
|
+
const metadataPath = path.join(outputDir, TECHDOCS_METADATA_FILE);
|
|
95
|
+
const metadata = JSON5__default.default.parse(await fs__default.default.readFile(metadataPath, "utf8"));
|
|
96
|
+
await fs__default.default.writeJson(
|
|
97
|
+
metadataPath,
|
|
98
|
+
{ ...metadata, etag: generatedSiteEtag },
|
|
99
|
+
{ spaces: 2 }
|
|
100
|
+
);
|
|
101
|
+
logger.info(`Computed generated site content hash: ${generatedSiteEtag}`);
|
|
102
|
+
}
|
|
73
103
|
if (configIsTemporary) {
|
|
74
104
|
process.on("exit", async () => {
|
|
75
105
|
fs__default.default.rmSync(mkdocsYmlPath, {});
|
|
@@ -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 { resolve } from 'node:path';\nimport { OptionValues } from 'commander';\nimport fs from 'fs-extra';\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';\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\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 },\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 // 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
|
|
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,M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,CAAA;AACrB;;;;"}
|
|
@@ -25,7 +25,7 @@ function registerCommands(program) {
|
|
|
25
25
|
"The repository hosting documentation source files e.g. url:https://ghe.mycompany.net.com/org/repo.\nThis value is same as the backstage.io/techdocs-ref annotation of the corresponding Backstage entity.\nIt is completely fine to skip this as it is only being used to set repo_url in mkdocs.yml if not found.\n"
|
|
26
26
|
).option(
|
|
27
27
|
"--etag <ETAG>",
|
|
28
|
-
"A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json."
|
|
28
|
+
"A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json. If omitted, a sha256 content hash of the generated site output is computed automatically."
|
|
29
29
|
).option(
|
|
30
30
|
"--site-name",
|
|
31
31
|
"Name for site when using default MkDocs config",
|
|
@@ -46,6 +46,10 @@ function registerCommands(program) {
|
|
|
46
46
|
"--defaultPlugin [defaultPlugins...]",
|
|
47
47
|
"Plugins which should be added automatically to the mkdocs.yaml file",
|
|
48
48
|
[]
|
|
49
|
+
).option(
|
|
50
|
+
"--dangerouslyAllowAdditionalKeys [additionalKeys...]",
|
|
51
|
+
"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.",
|
|
52
|
+
[]
|
|
49
53
|
).option(
|
|
50
54
|
"--runAsDefaultUser",
|
|
51
55
|
"Bypass setting the container user as the same user and group id as host for Linux and MacOS",
|
|
@@ -153,6 +157,10 @@ function registerCommands(program) {
|
|
|
153
157
|
"--directory <PATH>",
|
|
154
158
|
"Path of the directory containing generated files to publish",
|
|
155
159
|
"./site/"
|
|
160
|
+
).option(
|
|
161
|
+
"--skip-if-unchanged",
|
|
162
|
+
"Skip publishing if the local etag in techdocs_metadata.json matches the remote etag. The generate step computes a generated site content hash automatically unless --etag is overridden.",
|
|
163
|
+
false
|
|
156
164
|
).action(lazy(() => import('./publish/publish.cjs.js'), "default"));
|
|
157
165
|
program.command("serve:mkdocs").description("Serve a documentation project locally using MkDocs serve.").option(
|
|
158
166
|
"-i, --docker-image <DOCKER_IMAGE>",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../src/commands/index.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Command } from 'commander';\nimport { TechdocsGenerator } from '@backstage/plugin-techdocs-node';\n\nconst defaultDockerImage = TechdocsGenerator.defaultDockerImage;\nconst defaultPreviewAppPort = '3000';\n\nexport function registerCommands(program: Command) {\n program\n .command('generate')\n .description('Generate TechDocs documentation site using MkDocs.')\n .option(\n '--source-dir <PATH>',\n 'Source directory containing mkdocs.yml and docs/ directory.',\n '.',\n )\n .option(\n '--output-dir <PATH>',\n 'Output directory containing generated TechDocs site.',\n './site/',\n )\n .option(\n '--docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option('--no-pull', 'Do not pull the latest docker image')\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable and plugins in current user environment.',\n )\n .option(\n '--techdocs-ref <HOST_TYPE:URL>',\n 'The repository hosting documentation source files e.g. url:https://ghe.mycompany.net.com/org/repo.' +\n '\\nThis value is same as the backstage.io/techdocs-ref annotation of the corresponding Backstage entity.' +\n '\\nIt is completely fine to skip this as it is only being used to set repo_url in mkdocs.yml if not found.\\n',\n )\n .option(\n '--etag <ETAG>',\n 'A unique identifier for the prepared tree e.g. commit SHA. If provided it will be stored in techdocs_metadata.json.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\n )\n .option('-v, --verbose', 'Enable verbose output.', false)\n .option(\n '--omitTechdocsCoreMkdocsPlugin',\n \"Don't patch MkDocs file automatically with techdocs-core plugin.\",\n false,\n )\n .option(\n '--legacyCopyReadmeMdToIndexMd',\n 'Attempt to ensure an index.md exists falling back to using <docs-dir>/README.md or README.md in case a default <docs-dir>/index.md is not provided.',\n false,\n )\n .option(\n '--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 '--runAsDefaultUser',\n 'Bypass setting the container user as the same user and group id as host for Linux and MacOS',\n false,\n )\n .alias('build')\n .action(lazy(() => import('./generate/generate'), 'default'));\n\n program\n .command('migrate')\n .description(\n 'Migrate objects with case-sensitive entity triplets to lower-case versions.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n 'Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--removeOriginal',\n 'Optional Files are copied by default. If flag is set, files are renamed/moved instead.',\n false,\n )\n .option(\n '--concurrency <MAX CONCURRENT REQS>',\n 'Optional Controls the number of API requests allowed to be performed simultaneously.',\n '25',\n )\n .option('-v, --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./migrate/migrate'), 'default'));\n\n program\n .command('publish')\n .description(\n 'Publish generated TechDocs site to an external storage AWS S3, Google GCS, etc.',\n )\n .requiredOption(\n '--publisher-type <TYPE>',\n '(Required always) awsS3 | googleGcs | azureBlobStorage | openStackSwift - same as techdocs.publisher.type in Backstage app-config.yaml',\n )\n .requiredOption(\n '--storage-name <BUCKET/CONTAINER NAME>',\n '(Required always) In case of AWS/GCS, use the bucket name. In case of Azure, use container name. Same as techdocs.publisher.[TYPE].bucketName',\n )\n .requiredOption(\n '--entity <NAMESPACE/KIND/NAME>',\n '(Required always) Entity uid separated by / in namespace/kind/name order (case-sensitive). Example: default/Component/myEntity ',\n )\n .option(\n '--legacyUseCaseSensitiveTripletPaths',\n 'Publishes objects with cased entity triplet prefix when set (e.g. namespace/Kind/name). Only use if your TechDocs backend is configured the same way.',\n false,\n )\n .option(\n '--azureAccountName <AZURE ACCOUNT NAME>',\n '(Required for Azure) specify when --publisher-type azureBlobStorage',\n )\n .option(\n '--azureAccountKey <AZURE ACCOUNT KEY>',\n 'Azure Storage Account key to use for authentication. If not specified, you must set AZURE_TENANT_ID, AZURE_CLIENT_ID & AZURE_CLIENT_SECRET as environment variables.',\n )\n .option(\n '--awsRoleArn <AWS ROLE ARN>',\n 'Optional AWS ARN of role to be assumed.',\n )\n .option(\n '--awsEndpoint <AWS ENDPOINT>',\n 'Optional AWS endpoint to send requests to.',\n )\n .option(\n '--awsProxy <HTTPS Proxy>',\n 'Optional Proxy to use for AWS requests.',\n )\n .option('--awsS3sse <AWS SSE>', 'Optional AWS S3 Server Side Encryption.')\n .option(\n '--awsS3ForcePathStyle',\n 'Optional AWS S3 option to force path style.',\n )\n .option(\n '--awsBucketRootPath <AWS BUCKET ROOT PATH>',\n 'Optional sub-directory to store files in Amazon S3',\n )\n .option(\n '--awsMaxAttempts <AWS MAX ATTEMPTS>',\n 'Optional maximum number of retries for AWS S3 operations. If not specified, default value of 3 is used.',\n )\n .option(\n '--osCredentialId <OPENSTACK SWIFT APPLICATION CREDENTIAL ID>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSecret <OPENSTACK SWIFT APPLICATION CREDENTIAL SECRET>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osAuthUrl <OPENSTACK SWIFT AUTHURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--osSwiftUrl <OPENSTACK SWIFT SWIFTURL>',\n '(Required for OpenStack) specify when --publisher-type openStackSwift',\n )\n .option(\n '--gcsBucketRootPath <GCS BUCKET ROOT PATH>',\n 'Optional sub-directory to store files in Google cloud storage',\n )\n .option(\n '--directory <PATH>',\n 'Path of the directory containing generated files to publish',\n './site/',\n )\n .action(lazy(() => import('./publish/publish'), 'default'));\n\n program\n .command('serve:mkdocs')\n .description('Serve a documentation project locally using MkDocs serve.')\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, run `mkdocs serve` in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\n )\n .option('-p, --port <PORT>', 'Port to serve documentation locally', '8000')\n .option('-v, --verbose', 'Enable verbose output.', false)\n .action(lazy(() => import('./serve/mkdocs'), 'default'));\n\n program\n .command('serve')\n .description(\n 'Serve a documentation project locally in a Backstage app-like environment',\n )\n .option(\n '-i, --docker-image <DOCKER_IMAGE>',\n 'The mkdocs docker container to use',\n defaultDockerImage,\n )\n .option(\n '--docker-entrypoint <DOCKER_ENTRYPOINT>',\n 'Override the image entrypoint',\n )\n .option(\n '--docker-option <DOCKER_OPTION...>',\n 'Extra options to pass to the docker run command, e.g. \"--add-host=internal.host:192.168.11.12\" (can be added multiple times).',\n )\n .option(\n '--no-docker',\n 'Do not use Docker, use MkDocs executable in current user environment.',\n )\n .option(\n '--site-name',\n 'Name for site when using default MkDocs config',\n 'Documentation Site',\n )\n .option('--mkdocs-port <PORT>', 'Port for MkDocs server to use', '8000')\n .option('-v, --verbose', 'Enable verbose output.', false)\n .option(\n '--preview-app-bundle-path <PATH_TO_BUNDLE>',\n 'Preview documentation using another web app',\n )\n .option(\n '--preview-app-port <PORT>',\n 'Port for the preview app to be served on',\n defaultPreviewAppPort,\n )\n .option(\n '-c, --mkdocs-config-file-name <FILENAME>',\n 'Mkdocs config file name',\n )\n .option(\n '--mkdocs-parameter-clean',\n 'Pass \"--clean\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-dirtyreload',\n 'Pass \"--dirtyreload\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .option(\n '--mkdocs-parameter-strict',\n 'Pass \"--strict\" parameter to mkdocs server running in containerized environment',\n false,\n )\n .hook('preAction', command => {\n if (\n command.opts().previewAppPort !== defaultPreviewAppPort &&\n !command.opts().previewAppBundlePath\n ) {\n command.error(\n '--preview-app-port can only be used together with --preview-app-bundle-path',\n );\n }\n })\n .action(lazy(() => import('./serve/serve'), 'default'));\n}\n\n// Humbly taken from backstage-cli's registerCommands\ntype ActionFunc = (...args: any[]) => Promise<void>;\ntype ActionExports<TModule extends object> = {\n [KName in keyof TModule as TModule[KName] extends ActionFunc\n ? KName\n : never]: TModule[KName];\n};\n\n// Wraps an action function so that it always exits and handles errors\nexport function lazy<TModule extends object>(\n moduleLoader: () => Promise<TModule>,\n exportName: keyof ActionExports<TModule>,\n): (...args: any[]) => Promise<never> {\n return async (...args: any[]) => {\n try {\n const mod = await moduleLoader();\n const actualModule = (\n mod as unknown as { default: ActionExports<TModule> }\n ).default;\n const actionFunc = actualModule[exportName] as ActionFunc;\n await actionFunc(...args);\n\n process.exit(0);\n } catch (error) {\n console.error(error.message);\n process.exit(1);\n }\n };\n}\n"],"names":["TechdocsGenerator"],"mappings":";;;;AAmBA,MAAM,qBAAqBA,oCAAA,CAAkB,kBAAA;AAC7C,MAAM,qBAAA,GAAwB,MAAA;AAEvB,SAAS,iBAAiB,OAAA,EAAkB;AACjD,EAAA,OAAA,CACG,OAAA,CAAQ,UAAU,CAAA,CAClB,WAAA,CAAY,oDAAoD,CAAA,CAChE,MAAA;AAAA,IACC,qBAAA;AAAA,IACA,6DAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,qBAAA;AAAA,IACA,sDAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,+BAAA;AAAA,IACA,oCAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA,CAAO,WAAA,EAAa,qCAAqC,CAAA,CACzD,MAAA;AAAA,IACC,aAAA;AAAA,IACA;AAAA,GACF,CACC,MAAA;AAAA,IACC,gCAAA;AAAA,IACA;AAAA,GAGF,CACC,MAAA;AAAA,IACC,eAAA;AAAA,IACA;AAAA,GAC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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,I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AAA,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;;;;;"}
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var path = require('node:path');
|
|
6
|
+
var fs = require('fs-extra');
|
|
7
|
+
var JSON5 = require('json5');
|
|
6
8
|
var utility = require('../../lib/utility.cjs.js');
|
|
7
9
|
var discovery = require('@backstage/backend-defaults/discovery');
|
|
8
10
|
var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
|
|
9
11
|
var PublisherConfig = require('../../lib/PublisherConfig.cjs.js');
|
|
10
12
|
|
|
13
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
+
|
|
15
|
+
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
16
|
+
var JSON5__default = /*#__PURE__*/_interopDefaultCompat(JSON5);
|
|
17
|
+
|
|
11
18
|
async function publish(opts) {
|
|
12
19
|
const logger = utility.createLogger({ verbose: opts.verbose });
|
|
13
20
|
const config = PublisherConfig.PublisherConfig.getValidConfig(opts);
|
|
@@ -26,6 +33,46 @@ async function publish(opts) {
|
|
|
26
33
|
}
|
|
27
34
|
};
|
|
28
35
|
const directory = path.resolve(opts.directory);
|
|
36
|
+
if (opts.skipIfUnchanged) {
|
|
37
|
+
const metadataPath = path.join(directory, "techdocs_metadata.json");
|
|
38
|
+
if (!await fs__default.default.pathExists(metadataPath)) {
|
|
39
|
+
logger.info(
|
|
40
|
+
"--skip-if-unchanged: techdocs_metadata.json not found locally, proceeding with publish"
|
|
41
|
+
);
|
|
42
|
+
} else {
|
|
43
|
+
const localMetadata = JSON5__default.default.parse(
|
|
44
|
+
await fs__default.default.readFile(metadataPath, "utf8")
|
|
45
|
+
);
|
|
46
|
+
const localEtag = localMetadata?.etag;
|
|
47
|
+
if (!localEtag) {
|
|
48
|
+
logger.info(
|
|
49
|
+
"--skip-if-unchanged: no etag in local techdocs_metadata.json (was --etag passed to generate?), proceeding with publish"
|
|
50
|
+
);
|
|
51
|
+
} else {
|
|
52
|
+
try {
|
|
53
|
+
const remoteMetadata = await publisher.fetchTechDocsMetadata({
|
|
54
|
+
namespace,
|
|
55
|
+
kind,
|
|
56
|
+
name
|
|
57
|
+
});
|
|
58
|
+
const remoteEtag = remoteMetadata?.etag;
|
|
59
|
+
if (localEtag === remoteEtag) {
|
|
60
|
+
logger.info(
|
|
61
|
+
`--skip-if-unchanged: local etag "${localEtag}" matches remote, skipping publish`
|
|
62
|
+
);
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
logger.info(
|
|
66
|
+
`--skip-if-unchanged: etag changed from "${remoteEtag}" to "${localEtag}", proceeding with publish`
|
|
67
|
+
);
|
|
68
|
+
} catch (error) {
|
|
69
|
+
logger.info(
|
|
70
|
+
`--skip-if-unchanged: could not fetch remote metadata (first publish?), proceeding with publish: ${error}`
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
29
76
|
await publisher.publish({ entity, directory });
|
|
30
77
|
return true;
|
|
31
78
|
}
|
|
@@ -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 } from 'node:path';\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 await publisher.publish({ entity, directory });\n\n return true;\n}\n"],"names":["createLogger","PublisherConfig","discovery","HostDiscovery","Publisher","resolve"],"mappings":"
|
|
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","Publ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AAc,MAAM;AAAA,OACxC;AACA,MAAA,MAAM,YAAY,aAAA,EAAe,IAAA;AAEjC,MAAA,IAAI,CAAC,SAAA,EAAW;AACd,QAAA,MAAA,CAAO,IAAA;AAAA,UACL;AAAA,SACF;AAAA,MACF,CAAA,MAAO;AACL,QAAA,IAAI;AACF,UAAA,MAAM,cAAA,GAAiB,MAAM,SAAA,CAAU,qBAAA,CAAsB;AAAA,YAC3D,SAAA;AAAA,YACA,IAAA;AAAA,YACA;AAAA,WACD,CAAA;AACD,UAAA,MAAM,aAAa,cAAA,EAAgB,IAAA;AAEnC,UAAA,IAAI,cAAc,UAAA,EAAY;AAC5B,YAAA,MAAA,CAAO,IAAA;AAAA,cACL,oCAAoC,SAAS,CAAA,kCAAA;AAAA,aAC/C;AACA,YAAA,OAAO,IAAA;AAAA,UACT;AAEA,UAAA,MAAA,CAAO,IAAA;AAAA,YACL,CAAA,wCAAA,EAA2C,UAAU,CAAA,MAAA,EAAS,SAAS,CAAA,0BAAA;AAAA,WACzE;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;;;;"}
|
|
@@ -358,52 +358,6 @@
|
|
|
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
|
-
},
|
|
407
361
|
{
|
|
408
362
|
"path": "../../plugins/techdocs/config.d.ts",
|
|
409
363
|
"value": {
|
|
@@ -465,6 +419,52 @@
|
|
|
465
419
|
},
|
|
466
420
|
"packageName": "@backstage/plugin-techdocs"
|
|
467
421
|
},
|
|
422
|
+
{
|
|
423
|
+
"path": "../core-components/config.d.ts",
|
|
424
|
+
"value": {
|
|
425
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
426
|
+
"type": "object",
|
|
427
|
+
"properties": {
|
|
428
|
+
"auth": {
|
|
429
|
+
"type": "object",
|
|
430
|
+
"properties": {
|
|
431
|
+
"autologout": {
|
|
432
|
+
"type": "object",
|
|
433
|
+
"properties": {
|
|
434
|
+
"enabled": {
|
|
435
|
+
"type": "boolean",
|
|
436
|
+
"description": "Enable or disable the autologout feature",
|
|
437
|
+
"visibility": "frontend"
|
|
438
|
+
},
|
|
439
|
+
"idleTimeoutMinutes": {
|
|
440
|
+
"type": "number",
|
|
441
|
+
"description": "Number of minutes after which the inactive user is logged out automatically. Default is 60 minutes (1 hour)",
|
|
442
|
+
"visibility": "frontend"
|
|
443
|
+
},
|
|
444
|
+
"promptBeforeIdleSeconds": {
|
|
445
|
+
"type": "number",
|
|
446
|
+
"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.",
|
|
447
|
+
"visibility": "frontend"
|
|
448
|
+
},
|
|
449
|
+
"useWorkerTimers": {
|
|
450
|
+
"type": "boolean",
|
|
451
|
+
"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.",
|
|
452
|
+
"visibility": "frontend"
|
|
453
|
+
},
|
|
454
|
+
"logoutIfDisconnected": {
|
|
455
|
+
"type": "boolean",
|
|
456
|
+
"description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open. Default is true.",
|
|
457
|
+
"visibility": "frontend"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"description": "Autologout feature configuration"
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"packageName": "@backstage/core-components"
|
|
467
|
+
},
|
|
468
468
|
{
|
|
469
469
|
"path": "../integration/config.d.ts",
|
|
470
470
|
"value": {
|
|
@@ -2788,6 +2788,11 @@
|
|
|
2788
2788
|
"type": "string",
|
|
2789
2789
|
"description": "Database name prefix override"
|
|
2790
2790
|
},
|
|
2791
|
+
"schemaPrefix": {
|
|
2792
|
+
"type": "string",
|
|
2793
|
+
"description": "Prefix for schema names when using pluginDivisionMode: schema.",
|
|
2794
|
+
"default": ""
|
|
2795
|
+
},
|
|
2791
2796
|
"ensureExists": {
|
|
2792
2797
|
"type": "boolean",
|
|
2793
2798
|
"description": "Whether to ensure the given database exists by creating it if it does not. Defaults to true if unspecified."
|
|
@@ -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.720cb48cd7ae.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-zod.faf74f910029.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-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.470d3e8ecef1.js"></script><script defer="defer" src="/static/main.9b48363c4ffa.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.720cb48cd7ae.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-zod.faf74f910029.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-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.470d3e8ecef1.js"></script><script defer src="<%= publicPath %>/static/main.9b48363c4ffa.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>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["123"],{79894(a){a.exports=JSON.parse('{"name":"@backstage/plugin-catalog","version":"2.0.9","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.91ba1b809deb.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/123.91ba1b809deb.chunk.js","sources":["webpack://techdocs-cli-embedded-app/json|/home/runner/work/publishing/publishing/plugins/catalog/package.json"],"sourcesContent":["module.exports = JSON.parse('{\"name\":\"@backstage/plugin-catalog\",\"version\":\"2.0.9\",\"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,0kG"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([["1659"],{23494(e){e.exports=JSON.parse('{"name":"@backstage/plugin-techdocs","version":"1.18.1","description":"The Backstage plugin that renders technical documentation for your components","backstage":{"role":"frontend-plugin","pluginId":"techdocs","pluginPackages":["@backstage/plugin-techdocs","@backstage/plugin-techdocs-backend","@backstage/plugin-techdocs-common","@backstage/plugin-techdocs-node","@backstage/plugin-techdocs-react"]},"publishConfig":{"access":"public"},"keywords":["backstage","techdocs"],"homepage":"https://backstage.io","repository":{"type":"git","url":"https://github.com/backstage/backstage","directory":"plugins/techdocs"},"license":"Apache-2.0","sideEffects":false,"exports":{".":"./src/index.ts","./alpha":"./src/alpha/index.tsx","./package.json":"./package.json"},"main":"src/index.ts","types":"src/index.ts","typesVersions":{"*":{"alpha":["src/alpha/index.tsx"],"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/config":"workspace:^","@backstage/core-components":"workspace:^","@backstage/core-plugin-api":"workspace:^","@backstage/errors":"workspace:^","@backstage/frontend-plugin-api":"workspace:^","@backstage/integration":"workspace:^","@backstage/integration-react":"workspace:^","@backstage/plugin-auth-react":"workspace:^","@backstage/plugin-catalog-react":"workspace:^","@backstage/plugin-search-common":"workspace:^","@backstage/plugin-search-react":"workspace:^","@backstage/plugin-techdocs-common":"workspace:^","@backstage/plugin-techdocs-react":"workspace:^","@backstage/theme":"workspace:^","@backstage/ui":"workspace:^","@material-ui/core":"^4.12.2","@material-ui/icons":"^4.9.1","@material-ui/lab":"4.0.0-alpha.61","@material-ui/styles":"^4.10.0","@microsoft/fetch-event-source":"^2.0.1","@remixicon/react":">=4.6.0 <4.9.0","dompurify":"^3.4.12","git-url-parse":"^15.0.0","lodash":"^4.17.21","react-helmet":"6.1.0","react-use":"^17.2.4","zod":"^4.0.0"},"devDependencies":{"@backstage/cli":"workspace:^","@backstage/core-app-api":"workspace:^","@backstage/dev-utils":"workspace:^","@backstage/plugin-catalog":"workspace:^","@backstage/plugin-techdocs-module-addons-contrib":"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/dompurify":"^3.0.0","@types/react":"^18.0.0","react":"^18.0.2","react-dom":"^18.0.2","react-router-dom":"^6.30.2"},"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=1659.a99e4eb674e0.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/1659.a99e4eb674e0.chunk.js","sources":["webpack://techdocs-cli-embedded-app/json|/home/runner/work/publishing/publishing/plugins/techdocs/package.json"],"sourcesContent":["module.exports = JSON.parse('{\"name\":\"@backstage/plugin-techdocs\",\"version\":\"1.18.1\",\"description\":\"The Backstage plugin that renders technical documentation for your components\",\"backstage\":{\"role\":\"frontend-plugin\",\"pluginId\":\"techdocs\",\"pluginPackages\":[\"@backstage/plugin-techdocs\",\"@backstage/plugin-techdocs-backend\",\"@backstage/plugin-techdocs-common\",\"@backstage/plugin-techdocs-node\",\"@backstage/plugin-techdocs-react\"]},\"publishConfig\":{\"access\":\"public\"},\"keywords\":[\"backstage\",\"techdocs\"],\"homepage\":\"https://backstage.io\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/backstage/backstage\",\"directory\":\"plugins/techdocs\"},\"license\":\"Apache-2.0\",\"sideEffects\":false,\"exports\":{\".\":\"./src/index.ts\",\"./alpha\":\"./src/alpha/index.tsx\",\"./package.json\":\"./package.json\"},\"main\":\"src/index.ts\",\"types\":\"src/index.ts\",\"typesVersions\":{\"*\":{\"alpha\":[\"src/alpha/index.tsx\"],\"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/config\":\"workspace:^\",\"@backstage/core-components\":\"workspace:^\",\"@backstage/core-plugin-api\":\"workspace:^\",\"@backstage/errors\":\"workspace:^\",\"@backstage/frontend-plugin-api\":\"workspace:^\",\"@backstage/integration\":\"workspace:^\",\"@backstage/integration-react\":\"workspace:^\",\"@backstage/plugin-auth-react\":\"workspace:^\",\"@backstage/plugin-catalog-react\":\"workspace:^\",\"@backstage/plugin-search-common\":\"workspace:^\",\"@backstage/plugin-search-react\":\"workspace:^\",\"@backstage/plugin-techdocs-common\":\"workspace:^\",\"@backstage/plugin-techdocs-react\":\"workspace:^\",\"@backstage/theme\":\"workspace:^\",\"@backstage/ui\":\"workspace:^\",\"@material-ui/core\":\"^4.12.2\",\"@material-ui/icons\":\"^4.9.1\",\"@material-ui/lab\":\"4.0.0-alpha.61\",\"@material-ui/styles\":\"^4.10.0\",\"@microsoft/fetch-event-source\":\"^2.0.1\",\"@remixicon/react\":\">=4.6.0 <4.9.0\",\"dompurify\":\"^3.4.12\",\"git-url-parse\":\"^15.0.0\",\"lodash\":\"^4.17.21\",\"react-helmet\":\"6.1.0\",\"react-use\":\"^17.2.4\",\"zod\":\"^4.0.0\"},\"devDependencies\":{\"@backstage/cli\":\"workspace:^\",\"@backstage/core-app-api\":\"workspace:^\",\"@backstage/dev-utils\":\"workspace:^\",\"@backstage/plugin-catalog\":\"workspace:^\",\"@backstage/plugin-techdocs-module-addons-contrib\":\"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/dompurify\":\"^3.0.0\",\"@types/react\":\"^18.0.0\",\"react\":\"^18.0.2\",\"react-dom\":\"^18.0.2\",\"react-router-dom\":\"^6.30.2\"},\"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":"kIAAA,EAAO,OAAO,CAAGA,KAAK,KAAK,CAAC,2+F"}
|