@diplodoc/cli 4.10.0-beta.0 → 4.10.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/build/index.js CHANGED
@@ -120,22 +120,6 @@ var LINT_CONFIG_FILENAME = ".yfmlint";
120
120
  var SINGLE_PAGE_FILENAME = "single-page.html";
121
121
  var SINGLE_PAGE_DATA_FILENAME = "single-page.json";
122
122
  var CUSTOM_STYLE = "custom-style";
123
- var RTL_LANGS = [
124
- "ar",
125
- "arc",
126
- "ckb",
127
- "dv",
128
- "fa",
129
- "ha",
130
- "he",
131
- "khw",
132
- "ks",
133
- "ps",
134
- "sd",
135
- "ur",
136
- "uz_AF",
137
- "yi"
138
- ];
139
123
  var ResourceType = /* @__PURE__ */ ((ResourceType2) => {
140
124
  ResourceType2["style"] = "style";
141
125
  ResourceType2["script"] = "script";
@@ -539,10 +523,9 @@ function generateStaticMarkup(props, pathToBundle) {
539
523
  const resources = getResources({ style, script });
540
524
  const { staticContent } = argv_default.getConfig();
541
525
  const html = staticContent ? (0, import_ssr.render)(props) : "";
542
- const isRTL = RTL_LANGS.includes(props.lang);
543
526
  return `
544
527
  <!DOCTYPE html>
545
- <html lang="${props.lang}" dir="${isRTL ? "rtl" : "ltr"}">
528
+ <html lang="${props.lang}">
546
529
  <head>
547
530
  <meta charset="utf-8">
548
531
  ${getMetadata(props.data.meta)}
@@ -553,7 +536,7 @@ function generateStaticMarkup(props, pathToBundle) {
553
536
  height: 100vh;
554
537
  }
555
538
  </style>
556
- ${import_manifest.default.css.filter((file) => isRTL === file.includes(".rtl.css")).map(dst(pathToBundle)).map((src) => `<link type="text/css" rel="stylesheet" href="${src}" />`).join("\n")}
539
+ ${import_manifest.default.css.map(dst(pathToBundle)).map((src) => `<link type="text/css" rel="stylesheet" href="${src}" />`).join("\n")}
557
540
  ${plugins_exports.getHeadContent()}
558
541
  ${resources}
559
542
  </head>
@@ -2193,7 +2176,7 @@ function resolveMd2HTML(options) {
2193
2176
  const tocBase = toc && toc.base ? toc.base : "";
2194
2177
  const pathToFileDir = pathToDir === tocBase ? "" : pathToDir.replace(`${tocBase}${import_path20.sep}`, "");
2195
2178
  const relativePathToIndex = (0, import_path20.relative)(pathToDir, `${tocBase}${import_path20.sep}`);
2196
- const { input, lang, langs, allowCustomResources } = argv_default.getConfig();
2179
+ const { input, lang, allowCustomResources } = argv_default.getConfig();
2197
2180
  const resolvedPath = (0, import_path20.resolve)(input, inputPath);
2198
2181
  const content = (0, import_fs7.readFileSync)(resolvedPath, "utf8");
2199
2182
  const transformFn = FileTransformer[fileExtension];
@@ -2211,7 +2194,6 @@ function resolveMd2HTML(options) {
2211
2194
  fileMeta.style = [];
2212
2195
  fileMeta.script = [];
2213
2196
  }
2214
- const tocLang = langs.includes(tocBase) && tocBase;
2215
2197
  const props = {
2216
2198
  data: __spreadProps(__spreadValues({
2217
2199
  leading: inputPath.endsWith(".yaml"),
@@ -2222,7 +2204,7 @@ function resolveMd2HTML(options) {
2222
2204
  router: {
2223
2205
  pathname: (0, import_path20.join)(relativePathToIndex, pathToFileDir, (0, import_path20.basename)(outputPath))
2224
2206
  },
2225
- lang: lang || tocLang || "ru" /* RU */
2207
+ lang: lang || "ru" /* RU */
2226
2208
  };
2227
2209
  const outputDir = (0, import_path20.dirname)(outputPath);
2228
2210
  const relativePathToBundle = (0, import_path20.relative)((0, import_path20.resolve)(outputDir), (0, import_path20.resolve)(outputBundlePath));
@@ -3523,7 +3505,7 @@ function handler(args) {
3523
3505
  yield upload({
3524
3506
  input: userOutputFolder,
3525
3507
  region: storageRegion,
3526
- ignore,
3508
+ ignore: [...ignore, TMP_INPUT_FOLDER, TMP_OUTPUT_FOLDER],
3527
3509
  endpoint,
3528
3510
  bucket,
3529
3511
  prefix,
@@ -4229,7 +4211,7 @@ import_yargs.default.command(build).command(publish).command(xliff).command(tran
4229
4211
  default: false,
4230
4212
  describe: "Run in quiet mode. Don't write logs to stdout",
4231
4213
  type: "boolean"
4232
- }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.10.0-beta.0" : "").help().parse((0, import_helpers.hideBin)(process.argv), {}, (err, { strict }, output) => {
4214
+ }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.10.0" : "").help().parse((0, import_helpers.hideBin)(process.argv), {}, (err, { strict }, output) => {
4233
4215
  console.timeEnd(MAIN_TIMER_ID);
4234
4216
  if (err) {
4235
4217
  console.error(err);