@diplodoc/cli 4.19.1 → 4.19.2

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/build/index.js CHANGED
@@ -142810,7 +142810,7 @@ function processAssetsHtmlRun({ outputBundlePath }) {
142810
142810
  copyFiles(ASSETS_FOLDER, outputBundlePath, bundleAssetFilePath);
142811
142811
  }
142812
142812
  function processAssetsMdRun({ args, tmpOutputFolder }) {
142813
- const { allowCustomResources, resources } = argv_default2.getConfig();
142813
+ const { input: inputFolderPath, allowCustomResources, resources } = argv_default2.getConfig();
142814
142814
  const pathToConfig = args.config || (0, import_path20.join)(args.input, YFM_CONFIG_FILENAME);
142815
142815
  const pathToRedirects = (0, import_path20.join)(args.input, REDIRECTS_FILENAME);
142816
142816
  const pathToLintConfig = (0, import_path20.join)(args.input, LINT_CONFIG_FILENAME);
@@ -142827,13 +142827,14 @@ function processAssetsMdRun({ args, tmpOutputFolder }) {
142827
142827
  );
142828
142828
  copyFiles(args.input, tmpOutputFolder, resourcePaths);
142829
142829
  }
142830
- const yamlFiles = (0, import_walk_sync2.default)(args.input, {
142831
- globs: ["**/*.yaml"],
142832
- directories: false,
142833
- includeBasePath: true,
142834
- ignore: ["**/toc.yaml", (0, import_path20.resolve)(pathToRedirects)]
142835
- });
142836
- yamlFiles.forEach((yamlFile) => {
142830
+ const tocYamlFiles = tocs_default.getNavigationPaths().reduce((acc, file) => {
142831
+ if (file.endsWith(".yaml")) {
142832
+ const resolvedPathToFile = (0, import_path20.resolve)(inputFolderPath, file);
142833
+ acc.push(resolvedPathToFile);
142834
+ }
142835
+ return acc;
142836
+ }, []);
142837
+ tocYamlFiles.forEach((yamlFile) => {
142837
142838
  const content = load((0, import_fs7.readFileSync)(yamlFile, "utf8"));
142838
142839
  if (!Object.prototype.hasOwnProperty.call(content, "blocks")) {
142839
142840
  return;
@@ -153614,7 +153615,7 @@ import_yargs.default.command(build).command(publish).command(translate).option("
153614
153615
  default: false,
153615
153616
  describe: "Run in quiet mode. Don't write logs to stdout",
153616
153617
  type: "boolean"
153617
- }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.19.1" : "").help().parse((0, import_helpers.hideBin)(process.argv), {}, (err, { strict }, output) => {
153618
+ }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.19.2" : "").help().parse((0, import_helpers.hideBin)(process.argv), {}, (err, { strict }, output) => {
153618
153619
  console.timeEnd(MAIN_TIMER_ID);
153619
153620
  if (err) {
153620
153621
  console.error(err);