@techdocs/cli 0.0.0-nightly-20260127025640 → 0.0.0-nightly-20260128025246

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 CHANGED
@@ -1,15 +1,28 @@
1
1
  # @techdocs/cli
2
2
 
3
- ## 0.0.0-nightly-20260127025640
3
+ ## 0.0.0-nightly-20260128025246
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - 7455dae: Use node prefix on native imports
7
8
  - Updated dependencies
8
- - @backstage/backend-defaults@0.0.0-nightly-20260127025640
9
+ - @backstage/backend-defaults@0.0.0-nightly-20260128025246
10
+ - @backstage/plugin-techdocs-node@0.0.0-nightly-20260128025246
11
+ - @backstage/cli-common@0.0.0-nightly-20260128025246
12
+ - @backstage/catalog-model@1.7.6
13
+ - @backstage/config@1.3.6
14
+
15
+ ## 1.10.5-next.0
16
+
17
+ ### Patch Changes
18
+
19
+ - 7455dae: Use node prefix on native imports
20
+ - Updated dependencies
21
+ - @backstage/backend-defaults@0.15.1-next.0
22
+ - @backstage/plugin-techdocs-node@1.14.1-next.0
23
+ - @backstage/cli-common@0.1.18-next.0
9
24
  - @backstage/catalog-model@1.7.6
10
- - @backstage/cli-common@0.1.17
11
25
  - @backstage/config@1.3.6
12
- - @backstage/plugin-techdocs-node@0.0.0-nightly-20260127025640
13
26
 
14
27
  ## 1.10.4
15
28
 
package/bin/techdocs-cli CHANGED
@@ -15,11 +15,13 @@
15
15
  * limitations under the License.
16
16
  */
17
17
 
18
- const path = require('path');
18
+ const path = require('node:path');
19
19
 
20
20
  // Figure out whether we're running inside the backstage repo or as an installed dependency
21
21
  /* eslint-disable-next-line no-restricted-syntax */
22
- const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));
22
+ const isLocal = require('node:fs').existsSync(
23
+ path.resolve(__dirname, '../src'),
24
+ );
23
25
 
24
26
  if (!isLocal) {
25
27
  require('..');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var path = require('path');
5
+ var path = require('node:path');
6
6
  var fs = require('fs-extra');
7
7
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
8
8
  var config = require('@backstage/config');
@@ -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 '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 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 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: opts.etag,\n logStream: getLogStream(logger),\n siteOptions: { name: opts.siteName },\n runAsDefaultUser: opts.runAsDefaultUser,\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","TechdocsGenerator","getLogStream"],"mappings":";;;;;;;;;;;;;;AA+BA,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,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,CAAI;AAAA,IAC1B,QAAA,EAAU,SAAA;AAAA,IACV,SAAA;AAAA,IACA,GAAI,KAAK,WAAA,GACL;AAAA,MACE;AAAA,QAEF,EAAC;AAAA,IACL,MAAA;AAAA,IACA,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,SAAA,EAAWI,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,iBAAA,EAAmB;AACrB,IAAA,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAN,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AACrB;;;;"}
1
+ {"version":3,"file":"generate.cjs.js","sources":["../../../src/commands/generate/generate.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { 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 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 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: opts.etag,\n logStream: getLogStream(logger),\n siteOptions: { name: opts.siteName },\n runAsDefaultUser: opts.runAsDefaultUser,\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","convertTechDocsRefToLocation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AAI,KAAK,WAAA,EAAa;AACpB,IAAA,IAAI;AACF,MAAA,wBAAA,GAA2BC,8CAAA;AAAA,QACzB,IAAA,CAAK;AAAA,OACP;AAAA,IACF,SAAS,GAAA,EAAK;AACZ,MAAA,MAAA,CAAO,KAAA,CAAM,IAAI,OAAO,CAAA;AAAA,IAC1B;AAAA,EACF;AAGA,EAAA,MAAM,iBAAA,GAAoB,MAAMC,oCAAA,CAAkB,UAAA,CAAWH,QAAA,EAAQ;AAAA,IACnE;AAAA,GACD,CAAA;AAED,EAAA,MAAA,CAAO,KAAK,6BAA6B,CAAA;AAEzC,EAAA,MAAM,kBAAkB,GAAA,CAAI;AAAA,IAC1B,QAAA,EAAU,SAAA;AAAA,IACV,SAAA;AAAA,IACA,GAAI,KAAK,WAAA,GACL;AAAA,MACE;AAAA,QAEF,EAAC;AAAA,IACL,MAAA;AAAA,IACA,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,SAAA,EAAWI,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,iBAAA,EAAmB;AACrB,IAAA,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAN,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AACrB;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var path = require('path');
5
+ var path = require('node:path');
6
6
  var utility = require('../../lib/utility.cjs.js');
7
7
  var discovery = require('@backstage/backend-defaults/discovery');
8
8
  var pluginTechdocsNode = require('@backstage/plugin-techdocs-node');
@@ -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 '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":";;;;;;;;;;AAwBA,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,SAAA,GAAYG,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,SAAA,CAAU,OAAA,CAAQ,EAAE,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 } 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":";;;;;;;;;;AAwBA,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,SAAA,GAAYG,YAAA,CAAQ,IAAA,CAAK,SAAS,CAAA;AACxC,EAAA,MAAM,SAAA,CAAU,OAAA,CAAQ,EAAE,MAAA,EAAQ,WAAW,CAAA;AAE7C,EAAA,OAAO,IAAA;AACT;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var path = require('path');
5
+ var path = require('node:path');
6
6
  var openBrowser = require('react-dev-utils/openBrowser');
7
7
  var cliCommon = require('@backstage/cli-common');
8
8
  var httpServer = require('../../lib/httpServer.cjs.js');
@@ -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 'path';\nimport openBrowser from 'react-dev-utils/openBrowser';\nimport { findPaths, 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 findPaths(__dirname).resolveOwn('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","findPaths","createLogger","getMkdocsYml","checkIfDockerIsOperational","runMkdocsServer","httpServer","HTTPServer","openBrowser","fs"],"mappings":";;;;;;;;;;;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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 { findPaths, 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 findPaths(__dirname).resolveOwn('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","findPaths","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,mBAAA,CAAU,SAAS,CAAA,CAAE,UAAA,CAAW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uC,CAAA;AAAA,EACrD;AAEA,EAAA,IAAI,CAAC,sBAAA,EAAwB;AAC3B,IAAA,MAAA,CAAO,KAAA;AAAA,MACL;AAAA,KACF;AAAA,EACF;AAEA,EAAA,MAAM,IAAA,GAAO,SAAA,GAAY,oBAAA,GAAuB,IAAA,CAAK,cAAA;AACrD,EAAA,MAAM,cAAA,GAAiB,kBAAkB,IAAI,CAAA;AAC7C,EAAA,MAAMC,eAAa,IAAIC,kBAAA;AAAA,IACrB,cAAA;AAAA,IACA,IAAA;AAAA,IACA,qBAAA;AAAA,IACA,IAAA,CAAK;AAAA,GACP;AAEA,EAAAD,YAAA,CACG,KAAA,EAAM,CACN,KAAA,CAAM,CAAA,GAAA,KAAO;AACZ,IAAA,MAAA,CAAO,KAAA,CAAM,+BAA+B,GAAG,CAAA;AAC/C,IAAA,kBAAA,CAAmB,IAAA,EAAK;AACxB,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB,CAAC,CAAA,CACA,IAAA,CAAK,MAAM;AAEV,IAAAE,4BAAA,CAAY,CAAA,iBAAA,EAAoB,IAAI,CAAA,8BAAA,CAAgC,CAAA;AACpE,IAAA,MAAA,CAAO,IAAA;AAAA,MACL,iDAAiD,IAAI,CAAA;AAAA,gBAAA;AAAA,KACvD;AAAA,EACF,CAAC,CAAA;AAEH,EAAA,MAAM,mBAAmB,WAAA,EAAY;AAErC,EAAA,IAAI,iBAAA,EAAmB;AACrB,IAAA,OAAA,CAAQ,EAAA,CAAG,QAAQ,YAAY;AAC7B,MAAAC,mBAAA,CAAG,MAAA,CAAO,aAAA,EAAe,EAAE,CAAA;AAAA,IAC7B,CAAC,CAAA;AAAA,EACH;AACF;;;;"}
@@ -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
+ "type": "object",
365
+ "properties": {
366
+ "auth": {
367
+ "type": "object",
368
+ "properties": {
369
+ "autologout": {
370
+ "description": "Autologout feature configuration",
371
+ "type": "object",
372
+ "properties": {
373
+ "enabled": {
374
+ "description": "Enable or disable the autologout feature",
375
+ "visibility": "frontend",
376
+ "type": "boolean"
377
+ },
378
+ "idleTimeoutMinutes": {
379
+ "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
380
+ "visibility": "frontend",
381
+ "type": "number"
382
+ },
383
+ "promptBeforeIdleSeconds": {
384
+ "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
385
+ "visibility": "frontend",
386
+ "type": "number"
387
+ },
388
+ "useWorkerTimers": {
389
+ "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
390
+ "visibility": "frontend",
391
+ "type": "boolean"
392
+ },
393
+ "logoutIfDisconnected": {
394
+ "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
395
+ "visibility": "frontend",
396
+ "type": "boolean"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "$schema": "http://json-schema.org/draft-07/schema#"
404
+ },
405
+ "packageName": "@backstage/core-components"
406
+ },
361
407
  {
362
408
  "path": "../../plugins/techdocs/config.d.ts",
363
409
  "value": {
@@ -419,52 +465,6 @@
419
465
  },
420
466
  "packageName": "@backstage/plugin-techdocs"
421
467
  },
422
- {
423
- "path": "../core-components/config.d.ts",
424
- "value": {
425
- "type": "object",
426
- "properties": {
427
- "auth": {
428
- "type": "object",
429
- "properties": {
430
- "autologout": {
431
- "description": "Autologout feature configuration",
432
- "type": "object",
433
- "properties": {
434
- "enabled": {
435
- "description": "Enable or disable the autologout feature",
436
- "visibility": "frontend",
437
- "type": "boolean"
438
- },
439
- "idleTimeoutMinutes": {
440
- "description": "Number of minutes after which the inactive user is logged out automatically.\nDefault is 60 minutes (1 hour)",
441
- "visibility": "frontend",
442
- "type": "number"
443
- },
444
- "promptBeforeIdleSeconds": {
445
- "description": "Number of seconds before the idle timeout where the user will be asked if it's still active.\nA dialog will be shown.\nDefault is 10 seconds.\nSet to 0 seconds to disable the prompt.",
446
- "visibility": "frontend",
447
- "type": "number"
448
- },
449
- "useWorkerTimers": {
450
- "description": "Enable/disable the usage of worker thread timers instead of main thread timers.\nDefault is true.\nIf you experience some browser incompatibility, you may try to set this to false.",
451
- "visibility": "frontend",
452
- "type": "boolean"
453
- },
454
- "logoutIfDisconnected": {
455
- "description": "Enable/disable the automatic logout also on users that are logged in but with no Backstage tabs open.\nDefault is true.",
456
- "visibility": "frontend",
457
- "type": "boolean"
458
- }
459
- }
460
- }
461
- }
462
- }
463
- },
464
- "$schema": "http://json-schema.org/draft-07/schema#"
465
- },
466
- "packageName": "@backstage/core-components"
467
- },
468
468
  {
469
469
  "path": "../integration/config.d.ts",
470
470
  "value": {
@@ -1044,39 +1044,6 @@
1044
1044
  "app": {
1045
1045
  "type": "object",
1046
1046
  "properties": {
1047
- "experimental": {
1048
- "type": "object",
1049
- "properties": {
1050
- "packages": {
1051
- "visibility": "frontend",
1052
- "deepVisibility": "frontend",
1053
- "deprecated": "This is no longer experimental; use `app.packages` instead.",
1054
- "anyOf": [
1055
- {
1056
- "type": "object",
1057
- "properties": {
1058
- "include": {
1059
- "type": "array",
1060
- "items": {
1061
- "type": "string"
1062
- }
1063
- },
1064
- "exclude": {
1065
- "type": "array",
1066
- "items": {
1067
- "type": "string"
1068
- }
1069
- }
1070
- }
1071
- },
1072
- {
1073
- "const": "all",
1074
- "type": "string"
1075
- }
1076
- ]
1077
- }
1078
- }
1079
- },
1080
1047
  "packages": {
1081
1048
  "description": "Controls what packages are loaded by the new frontend system.",
1082
1049
  "visibility": "frontend",
@@ -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.f9c0ec96.js"></script><script defer="defer" src="/static/module-material-ui.3c48b777.js"></script><script defer="defer" src="/static/module-lodash.c50623b1.js"></script><script defer="defer" src="/static/module-date-fns.bfd1b82f.js"></script><script defer="defer" src="/static/module-mui.c5efba64.js"></script><script defer="defer" src="/static/module-material-table.40a11f4e.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer="defer" src="/static/module-parse5.94980036.js"></script><script defer="defer" src="/static/module-zod.c31bff05.js"></script><script defer="defer" src="/static/module-react-dom.c631e87d.js"></script><script defer="defer" src="/static/module-i18next.c154323c.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.6e061f96.js"></script><script defer="defer" src="/static/module-remix-run.d87774b0.js"></script><script defer="defer" src="/static/vendor.e4357869.js"></script><script defer="defer" src="/static/main.5a90166f.js"></script><link href="/static/main.831e465c.css" rel="stylesheet"><script type="backstage.io/config">[
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.f9c0ec96.js"></script><script defer="defer" src="/static/module-material-ui.3c48b777.js"></script><script defer="defer" src="/static/module-lodash.c50623b1.js"></script><script defer="defer" src="/static/module-date-fns.bfd1b82f.js"></script><script defer="defer" src="/static/module-mui.c5efba64.js"></script><script defer="defer" src="/static/module-material-table.40a11f4e.js"></script><script defer="defer" src="/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer="defer" src="/static/module-parse5.94980036.js"></script><script defer="defer" src="/static/module-zod.c31bff05.js"></script><script defer="defer" src="/static/module-react-dom.c631e87d.js"></script><script defer="defer" src="/static/module-i18next.c154323c.js"></script><script defer="defer" src="/static/module-react-beautiful-dnd.6e061f96.js"></script><script defer="defer" src="/static/module-remix-run.d87774b0.js"></script><script defer="defer" src="/static/vendor.e4357869.js"></script><script defer="defer" src="/static/main.4899331a.js"></script><link href="/static/main.831e465c.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.f9c0ec96.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.3c48b777.js"></script><script defer src="<%= publicPath %>/static/module-lodash.c50623b1.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.bfd1b82f.js"></script><script defer src="<%= publicPath %>/static/module-mui.c5efba64.js"></script><script defer src="<%= publicPath %>/static/module-material-table.40a11f4e.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036.js"></script><script defer src="<%= publicPath %>/static/module-zod.c31bff05.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87d.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.6e061f96.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.d87774b0.js"></script><script defer src="<%= publicPath %>/static/vendor.e4357869.js"></script><script defer src="<%= publicPath %>/static/main.5a90166f.js"></script><link href="<%= publicPath %>/static/main.831e465c.css" rel="stylesheet"></head>
46
+ <meta name="backstage-app-mode" content="public"><meta name="backstage-public-path" content="<%= publicPath %>/"><script defer src="<%= publicPath %>/static/runtime.f9c0ec96.js"></script><script defer src="<%= publicPath %>/static/module-material-ui.3c48b777.js"></script><script defer src="<%= publicPath %>/static/module-lodash.c50623b1.js"></script><script defer src="<%= publicPath %>/static/module-date-fns.bfd1b82f.js"></script><script defer src="<%= publicPath %>/static/module-mui.c5efba64.js"></script><script defer src="<%= publicPath %>/static/module-material-table.40a11f4e.js"></script><script defer src="<%= publicPath %>/static/module-micromark-core-commonmark.909b7d4e.js"></script><script defer src="<%= publicPath %>/static/module-parse5.94980036.js"></script><script defer src="<%= publicPath %>/static/module-zod.c31bff05.js"></script><script defer src="<%= publicPath %>/static/module-react-dom.c631e87d.js"></script><script defer src="<%= publicPath %>/static/module-i18next.c154323c.js"></script><script defer src="<%= publicPath %>/static/module-react-beautiful-dnd.6e061f96.js"></script><script defer src="<%= publicPath %>/static/module-remix-run.d87774b0.js"></script><script defer src="<%= publicPath %>/static/vendor.e4357869.js"></script><script defer src="<%= publicPath %>/static/main.4899331a.js"></script><link href="<%= publicPath %>/static/main.831e465c.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>