@diplodoc/cli 4.32.3 → 4.33.1

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
@@ -250999,16 +250999,15 @@ function prepareComplexDescription(baseDescription, value) {
250999
250999
  }, baseDescription);
251000
251000
  }
251001
251001
  function concatConstraint(description3, constraint, constraintLabel, notWrapValueIntoCode = false) {
251002
- if (typeof constraint !== "undefined") {
251003
- return concatNewLine(
251004
- description3,
251005
- `<span class="openapi-description-annotation">${constraintLabel}</span> ${prepareConstraintValue(
251006
- constraint,
251007
- notWrapValueIntoCode
251008
- )}`
251009
- );
251002
+ if (typeof constraint === "undefined") {
251003
+ return description3;
251010
251004
  }
251011
- return description3;
251005
+ constraint = prepareConstraintValue(constraint, notWrapValueIntoCode);
251006
+ description3 = description3.replace(/\n$/, "");
251007
+ return `${description3}
251008
+
251009
+ *${constraintLabel}*{.openapi-description-annotation} ${constraint}
251010
+ `;
251012
251011
  }
251013
251012
  function prepareConstraintValue(value, notWrapValueIntoCode) {
251014
251013
  if (typeof value === "boolean") {
@@ -254347,7 +254346,7 @@ var import_fs7 = require("fs");
254347
254346
  var import_shelljs3 = __toESM2(require("shelljs"));
254348
254347
  var import_path19 = require("path");
254349
254348
  var import_ssr2 = require("@diplodoc/client/ssr");
254350
- var import_utils16 = __toESM2(require_utils2());
254349
+ var import_utils15 = __toESM2(require_utils2());
254351
254350
  var import_utilsFS3 = __toESM2(require_utilsFS());
254352
254351
  function processAssets({ args: args2, outputFormat, outputBundlePath, tmpOutputFolder }) {
254353
254352
  switch (outputFormat) {
@@ -254413,7 +254412,7 @@ function processAssetsMdRun({ args: args2, tmpOutputFolder }) {
254413
254412
  const linkHasMediaExt = new RegExp(
254414
254413
  /^\S.*\.(svg|png|gif|jpg|jpeg|bmp|webp|ico)$/gm
254415
254414
  ).test(link2);
254416
- if (linkHasMediaExt && (0, import_utils16.isLocalUrl)(link2) && checkPathExists(link2, yamlFile)) {
254415
+ if (linkHasMediaExt && (0, import_utils15.isLocalUrl)(link2) && checkPathExists(link2, yamlFile)) {
254417
254416
  const linkAbsolutePath = (0, import_utilsFS3.resolveRelativePath)(yamlFile, link2);
254418
254417
  const linkRootPath = linkAbsolutePath.replace(`${inputFolderPath}${import_path19.sep}`, "");
254419
254418
  acc.push(linkRootPath);
@@ -254773,8 +254772,8 @@ function MdFileTransformer(content, transformOptions) {
254773
254772
  var import_path23 = require("path");
254774
254773
  var import_log8 = __toESM2(require_log());
254775
254774
  var import_yfmlint = __toESM2(require_yfmlint2());
254776
- var import_utils20 = __toESM2(require_utils2());
254777
- var import_utils21 = __toESM2(require_utils15());
254775
+ var import_utils19 = __toESM2(require_utils2());
254776
+ var import_utils20 = __toESM2(require_utils15());
254778
254777
  var import_ssr4 = require("@diplodoc/client/ssr");
254779
254778
  var import_fs10 = require("fs");
254780
254779
  var import_chalk5 = __toESM2(require_source());
@@ -254806,14 +254805,14 @@ function YamlFileLinter(content, lintOptions) {
254806
254805
  const { input: input2, lintConfig } = argv_default2.getConfig();
254807
254806
  const { path: filePath } = lintOptions;
254808
254807
  const currentFilePath = (0, import_path23.resolve)(input2, filePath);
254809
- const logLevel = (0, import_utils21.getLogLevel)({
254808
+ const logLevel = (0, import_utils20.getLogLevel)({
254810
254809
  logLevelsConfig: lintConfig["log-levels"],
254811
254810
  ruleNames: ["YAML001"],
254812
254811
  defaultLevel: import_log8.default.LogLevels.ERROR
254813
254812
  });
254814
254813
  const contentLinks = findAllValuesByKeys(load(content), import_ssr4.LINK_KEYS);
254815
254814
  const localLinks = contentLinks.filter(
254816
- (link2) => getLinksWithExtension(link2) && (0, import_utils20.isLocalUrl)(link2)
254815
+ (link2) => getLinksWithExtension(link2) && (0, import_utils19.isLocalUrl)(link2)
254817
254816
  );
254818
254817
  return localLinks.forEach(
254819
254818
  (link2) => checkPathExists(link2, currentFilePath) || import_log8.default[logLevel](`Link is unreachable: ${(0, import_chalk5.bold)(link2)} in ${(0, import_chalk5.bold)(currentFilePath)}`)
@@ -261385,7 +261384,7 @@ function handler(args2) {
261385
261384
  const tmpInputFolder = (0, import_path31.resolve)(args2.output, TMP_INPUT_FOLDER);
261386
261385
  const tmpOutputFolder = (0, import_path31.resolve)(args2.output, TMP_OUTPUT_FOLDER);
261387
261386
  if (true) {
261388
- console.log(`Using v${"4.32.3"} version`);
261387
+ console.log(`Using v${"4.33.1"} version`);
261389
261388
  }
261390
261389
  try {
261391
261390
  argv_default2.init(__spreadProps(__spreadValues({}, args2), {
@@ -261496,7 +261495,7 @@ var parser3 = import_yargs.default.command(build).option("config", {
261496
261495
  default: false,
261497
261496
  describe: "Run in quiet mode. Don't write logs to stdout",
261498
261497
  type: "boolean"
261499
- }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.32.3" : "").help();
261498
+ }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.33.1" : "").help();
261500
261499
  var Build = class extends BaseProgram(command, {
261501
261500
  config: {
261502
261501
  // scope: 'build',
@@ -266043,7 +266042,7 @@ var Program = class extends BaseProgram("Program", {
266043
266042
  constructor() {
266044
266043
  super(...arguments);
266045
266044
  this.command = new Command2(NAME).helpOption(true).allowUnknownOption(false).version(
266046
- true ? "4.32.3" : "",
266045
+ true ? "4.33.1" : "",
266047
266046
  "--version",
266048
266047
  "Output the version number"
266049
266048
  ).usage(USAGE);