@diplodoc/cli 4.19.0 → 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 +11 -10
- package/build/index.js.map +2 -2
- package/package.json +6 -6
- package/src/cmd/translate/utils/fs.ts +1 -1
- package/src/steps/processAssets.ts +11 -9
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
|
|
142831
|
-
|
|
142832
|
-
|
|
142833
|
-
|
|
142834
|
-
|
|
142835
|
-
|
|
142836
|
-
|
|
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;
|
|
@@ -149854,7 +149855,7 @@ var import_glob4 = __toESM2(require_glob());
|
|
|
149854
149855
|
var import_translation = require("@diplodoc/translation");
|
|
149855
149856
|
var import_node_path = require("path");
|
|
149856
149857
|
var import_promises4 = require("fs/promises");
|
|
149857
|
-
var ROOT = (0, import_node_path.dirname)(require.resolve("
|
|
149858
|
+
var ROOT = (0, import_node_path.dirname)(require.resolve("@diplodoc/cli/package"));
|
|
149858
149859
|
function last2(array) {
|
|
149859
149860
|
return array[array.length - 1];
|
|
149860
149861
|
}
|
|
@@ -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.
|
|
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);
|