@diplodoc/cli 4.28.2 → 4.29.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
@@ -8384,7 +8384,7 @@ var require_cycles = __commonJS2({
8384
8384
  removeLine(lastLineNumber);
8385
8385
  moveLines({ start: lastLineNumber + 1, end: linesTotal, offset: offsetRestLines });
8386
8386
  }
8387
- function inlineConditions({ forTag, vars, content, match: match2, path: path2, lastIndex, sourceMap, linesTotal }) {
8387
+ function inlineConditions({ forTag, vars: vars2, content, match: match2, path: path2, lastIndex, sourceMap, linesTotal }) {
8388
8388
  let res = "";
8389
8389
  const firstLineNumber = (0, sourceMap_1.getLineNumber)(content, forTag.startPos);
8390
8390
  const lastLineNumber = (0, sourceMap_1.getLineNumber)(content, lastIndex);
@@ -8393,13 +8393,13 @@ var require_cycles = __commonJS2({
8393
8393
  const forTemplate = content.substring(forRawLastIndex, contentLastIndex);
8394
8394
  const resFirstLineNumber = (0, sourceMap_1.getLineNumber)(content, forRawLastIndex + 1);
8395
8395
  const resLastLineNumber = (0, sourceMap_1.getLineNumber)(content, contentLastIndex + 1);
8396
- let collection = (0, evaluation_1.evalExp)(forTag.collectionName, vars);
8396
+ let collection = (0, evaluation_1.evalExp)(forTag.collectionName, vars2);
8397
8397
  if (!collection || !Array.isArray(collection)) {
8398
8398
  collection = [];
8399
8399
  log_1.log.error(`${(0, chalk_1.bold)(forTag.collectionName)} is undefined or not iterable`);
8400
8400
  }
8401
8401
  collection.forEach((item) => {
8402
- const newVars = Object.assign(Object.assign({}, vars), { [forTag.variableName]: item });
8402
+ const newVars = Object.assign(Object.assign({}, vars2), { [forTag.variableName]: item });
8403
8403
  res += (0, index_1.default)(forTemplate, newVars, path2).trimRight();
8404
8404
  });
8405
8405
  const contentLinesTotal = res.split("\n").length - 1;
@@ -8432,7 +8432,7 @@ var require_cycles = __commonJS2({
8432
8432
  idx: leftPart.length
8433
8433
  };
8434
8434
  }
8435
- module2.exports = function cycles(originInput, vars, path2, settings = {}) {
8435
+ module2.exports = function cycles(originInput, vars2, path2, settings = {}) {
8436
8436
  const { sourceMap } = settings;
8437
8437
  const R_LIQUID = /({%-?([\s\S]*?)-?%})/g;
8438
8438
  const FOR_SYNTAX = new RegExp(`(\\w+)\\s+in\\s+(${lexical_1.variable.source})`);
@@ -8483,7 +8483,7 @@ var require_cycles = __commonJS2({
8483
8483
  }
8484
8484
  const { idx, result } = inlineConditions({
8485
8485
  forTag,
8486
- vars,
8486
+ vars: vars2,
8487
8487
  content: input2,
8488
8488
  match: match2,
8489
8489
  path: path2,
@@ -8631,10 +8631,10 @@ var require_conditions = __commonJS2({
8631
8631
  }
8632
8632
  }
8633
8633
  };
8634
- function inlineConditions(content, ifTag, vars, strict2) {
8634
+ function inlineConditions(content, ifTag, vars2, strict2) {
8635
8635
  let ifCon = null;
8636
8636
  for (const condition of ifTag) {
8637
- const value = (0, evaluation_1.evalExp)(condition.expr, vars, strict2);
8637
+ const value = (0, evaluation_1.evalExp)(condition.expr, vars2, strict2);
8638
8638
  if (condition.expr && value === evaluation_1.NoValue) {
8639
8639
  return {
8640
8640
  result: content,
@@ -8658,7 +8658,7 @@ var require_conditions = __commonJS2({
8658
8658
  ifCon
8659
8659
  };
8660
8660
  }
8661
- module2.exports = function conditions(input2, vars, path2, settings) {
8661
+ module2.exports = function conditions(input2, vars2, path2, settings) {
8662
8662
  const sourceMap = (settings === null || settings === void 0 ? void 0 : settings.sourceMap) || {};
8663
8663
  const strict2 = (settings === null || settings === void 0 ? void 0 : settings.strict) || false;
8664
8664
  const tagStack = [];
@@ -8693,7 +8693,7 @@ var require_conditions = __commonJS2({
8693
8693
  break;
8694
8694
  }
8695
8695
  ifTag.closeCondition(match2[1], match2.index);
8696
- const { result, lastIndex, ifCon } = inlineConditions(input2, ifTag, vars, strict2);
8696
+ const { result, lastIndex, ifCon } = inlineConditions(input2, ifTag, vars2, strict2);
8697
8697
  resourcemap(input2, ifTag, ifCon, (0, sourceMap_1.createSourceMapApi)(sourceMap));
8698
8698
  R_LIQUID.lastIndex = lastIndex;
8699
8699
  input2 = result;
@@ -8741,9 +8741,9 @@ var require_liquid = __commonJS2({
8741
8741
  result += string.slice(carriage);
8742
8742
  return result;
8743
8743
  };
8744
- function saveCode(str2, vars, codes, path2, substitutions) {
8744
+ function saveCode(str2, vars2, codes, path2, substitutions) {
8745
8745
  return replace2(fence, fence, (code3) => {
8746
- const codeWithVars = substitutions ? (0, substitutions_1.default)(code3, vars, path2) : code3;
8746
+ const codeWithVars = substitutions ? (0, substitutions_1.default)(code3, vars2, path2) : code3;
8747
8747
  const index = codes.push(codeWithVars) - 1;
8748
8748
  const codeLines = codeWithVars.split("\n");
8749
8749
  const emptyLines = codeLines.length > 1 ? "\n".repeat(codeLines.length) : "";
@@ -8753,7 +8753,7 @@ var require_liquid = __commonJS2({
8753
8753
  function repairCode(str2, codes) {
8754
8754
  return replace2(fence, fence, (code3) => codes[Number(code3)], str2);
8755
8755
  }
8756
- function liquid5(originInput, vars, path2, settings) {
8756
+ function liquid7(originInput, vars2, path2, settings) {
8757
8757
  const { cycles = true, conditions = true, substitutions = true, conditionsInCode = false, keepNotVar = false, withSourceMap } = settings || {};
8758
8758
  argv_1.default.init({
8759
8759
  cycles,
@@ -8764,7 +8764,7 @@ var require_liquid = __commonJS2({
8764
8764
  withSourceMap
8765
8765
  });
8766
8766
  const codes = [];
8767
- let output2 = conditionsInCode ? originInput : saveCode(originInput, vars, codes, path2, substitutions);
8767
+ let output2 = conditionsInCode ? originInput : saveCode(originInput, vars2, codes, path2, substitutions);
8768
8768
  let sourceMap = {};
8769
8769
  if (withSourceMap) {
8770
8770
  const lines = output2.split("\n");
@@ -8774,14 +8774,14 @@ var require_liquid = __commonJS2({
8774
8774
  }, {});
8775
8775
  }
8776
8776
  if (cycles) {
8777
- output2 = (0, cycles_1.default)(output2, vars, path2, { sourceMap });
8777
+ output2 = (0, cycles_1.default)(output2, vars2, path2, { sourceMap });
8778
8778
  }
8779
8779
  if (conditions) {
8780
8780
  const strict2 = conditions === "strict";
8781
- output2 = (0, conditions_1.default)(output2, vars, path2, { sourceMap, strict: strict2 });
8781
+ output2 = (0, conditions_1.default)(output2, vars2, path2, { sourceMap, strict: strict2 });
8782
8782
  }
8783
8783
  if (substitutions) {
8784
- output2 = (0, substitutions_1.default)(output2, vars, path2);
8784
+ output2 = (0, substitutions_1.default)(output2, vars2, path2);
8785
8785
  }
8786
8786
  output2 = conditionsInCode ? output2 : repairCode(output2, codes);
8787
8787
  codes.length = 0;
@@ -8793,7 +8793,7 @@ var require_liquid = __commonJS2({
8793
8793
  }
8794
8794
  return output2;
8795
8795
  }
8796
- exports2.default = liquid5;
8796
+ exports2.default = liquid7;
8797
8797
  }
8798
8798
  });
8799
8799
 
@@ -8827,9 +8827,9 @@ var require_utilsFS = __commonJS2({
8827
8827
  }
8828
8828
  exports2.resolveRelativePath = resolveRelativePath4;
8829
8829
  function getFileTokens(path2, state, options5) {
8830
- const { getVarsPerFile: getVarsPerFile2, vars, disableLiquid, disableLint, lintMarkdown, disableTitleRefSubstitution, disableCircularError, inheritVars = true, conditionsInCode } = options5;
8830
+ const { getVarsPerFile: getVarsPerFile2, vars: vars2, disableLiquid, disableLint, lintMarkdown, disableTitleRefSubstitution, disableCircularError, inheritVars = true, conditionsInCode } = options5;
8831
8831
  let content;
8832
- const builtVars = (getVarsPerFile2 && !inheritVars ? getVarsPerFile2(path2) : vars) || {};
8832
+ const builtVars = (getVarsPerFile2 && !inheritVars ? getVarsPerFile2(path2) : vars2) || {};
8833
8833
  if (filesCache[path2]) {
8834
8834
  content = filesCache[path2];
8835
8835
  } else {
@@ -136432,12 +136432,12 @@ and ensure you are accounting for this risk.
136432
136432
  enforceHtmlBoundary: false,
136433
136433
  parseStyleAttributes: true
136434
136434
  };
136435
- sanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge5) {
136436
- merge5 = merge5 === void 0 ? true : merge5;
136435
+ sanitizeHtml.simpleTransform = function(newTagName, newAttribs, merge6) {
136436
+ merge6 = merge6 === void 0 ? true : merge6;
136437
136437
  newAttribs = newAttribs || {};
136438
136438
  return function(tagName, attribs) {
136439
136439
  let attrib;
136440
- if (merge5) {
136440
+ if (merge6) {
136441
136441
  for (attrib in newAttribs) {
136442
136442
  attribs[attrib] = newAttribs[attrib];
136443
136443
  }
@@ -137168,7 +137168,7 @@ var require_static = __commonJS2({
137168
137168
  return false;
137169
137169
  }
137170
137170
  exports2.contains = contains;
137171
- function merge5(arr1, arr2) {
137171
+ function merge6(arr1, arr2) {
137172
137172
  if (!isArrayLike2(arr1) || !isArrayLike2(arr2)) {
137173
137173
  return;
137174
137174
  }
@@ -137180,7 +137180,7 @@ var require_static = __commonJS2({
137180
137180
  arr1.length = newLength;
137181
137181
  return arr1;
137182
137182
  }
137183
- exports2.merge = merge5;
137183
+ exports2.merge = merge6;
137184
137184
  function isArrayLike2(item) {
137185
137185
  if (Array.isArray(item)) {
137186
137186
  return true;
@@ -151460,10 +151460,10 @@ var require_md = __commonJS2({
151460
151460
  return { parse: parse5, compile, env };
151461
151461
  }
151462
151462
  function initPlugins(md, options5) {
151463
- const { vars = {}, path: path2, extractTitle, conditionsInCode = false, disableLiquid = false, linkify = false, linkifyTlds, leftDelimiter = "{", rightDelimiter = "}", plugins: plugins2 = plugins_1.default } = options5, customOptions = __rest4(options5, ["vars", "path", "extractTitle", "conditionsInCode", "disableLiquid", "linkify", "linkifyTlds", "leftDelimiter", "rightDelimiter", "plugins"]);
151463
+ const { vars: vars2 = {}, path: path2, extractTitle, conditionsInCode = false, disableLiquid = false, linkify = false, linkifyTlds, leftDelimiter = "{", rightDelimiter = "}", plugins: plugins2 = plugins_1.default } = options5, customOptions = __rest4(options5, ["vars", "path", "extractTitle", "conditionsInCode", "disableLiquid", "linkify", "linkifyTlds", "leftDelimiter", "rightDelimiter", "plugins"]);
151464
151464
  const pluginOptions = Object.assign(Object.assign({}, customOptions), {
151465
151465
  conditionsInCode,
151466
- vars,
151466
+ vars: vars2,
151467
151467
  path: path2,
151468
151468
  extractTitle,
151469
151469
  disableLiquid,
@@ -158826,7 +158826,7 @@ var require_lodash = __commonJS2({
158826
158826
  });
158827
158827
  return result2;
158828
158828
  }
158829
- var merge5 = createAssigner(function(object, source2, srcIndex) {
158829
+ var merge6 = createAssigner(function(object, source2, srcIndex) {
158830
158830
  baseMerge(object, source2, srcIndex);
158831
158831
  });
158832
158832
  var mergeWith = createAssigner(function(object, source2, srcIndex, customizer) {
@@ -159516,7 +159516,7 @@ var require_lodash = __commonJS2({
159516
159516
  lodash.matches = matches;
159517
159517
  lodash.matchesProperty = matchesProperty;
159518
159518
  lodash.memoize = memoize;
159519
- lodash.merge = merge5;
159519
+ lodash.merge = merge6;
159520
159520
  lodash.mergeWith = mergeWith;
159521
159521
  lodash.method = method2;
159522
159522
  lodash.methodOf = methodOf;
@@ -167798,7 +167798,7 @@ var require_uri_all = __commonJS2({
167798
167798
  typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global2.URI = global2.URI || {});
167799
167799
  })(exports2, function(exports3) {
167800
167800
  "use strict";
167801
- function merge5() {
167801
+ function merge6() {
167802
167802
  for (var _len = arguments.length, sets = Array(_len), _key = 0; _key < _len; _key++) {
167803
167803
  sets[_key] = arguments[_key];
167804
167804
  }
@@ -167836,18 +167836,18 @@ var require_uri_all = __commonJS2({
167836
167836
  return obj;
167837
167837
  }
167838
167838
  function buildExps(isIRI2) {
167839
- var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge5(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge5(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge5(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge5(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge5(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge5(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge5(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge5(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge5(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge5("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
167839
+ var ALPHA$$ = "[A-Za-z]", CR$ = "[\\x0D]", DIGIT$$ = "[0-9]", DQUOTE$$ = "[\\x22]", HEXDIG$$2 = merge6(DIGIT$$, "[A-Fa-f]"), LF$$ = "[\\x0A]", SP$$ = "[\\x20]", PCT_ENCODED$2 = subexp(subexp("%[EFef]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$2 + "%" + HEXDIG$$2 + HEXDIG$$2) + "|" + subexp("%" + HEXDIG$$2 + HEXDIG$$2)), GEN_DELIMS$$ = "[\\:\\/\\?\\#\\[\\]\\@]", SUB_DELIMS$$ = "[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]", RESERVED$$ = merge6(GEN_DELIMS$$, SUB_DELIMS$$), UCSCHAR$$ = isIRI2 ? "[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]" : "[]", IPRIVATE$$ = isIRI2 ? "[\\uE000-\\uF8FF]" : "[]", UNRESERVED$$2 = merge6(ALPHA$$, DIGIT$$, "[\\-\\.\\_\\~]", UCSCHAR$$), SCHEME$ = subexp(ALPHA$$ + merge6(ALPHA$$, DIGIT$$, "[\\+\\-\\.]") + "*"), USERINFO$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge6(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]")) + "*"), DEC_OCTET$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("[1-9]" + DIGIT$$) + "|" + DIGIT$$), DEC_OCTET_RELAXED$ = subexp(subexp("25[0-5]") + "|" + subexp("2[0-4]" + DIGIT$$) + "|" + subexp("1" + DIGIT$$ + DIGIT$$) + "|" + subexp("0?[1-9]" + DIGIT$$) + "|0?0?" + DIGIT$$), IPV4ADDRESS$ = subexp(DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$ + "\\." + DEC_OCTET_RELAXED$), H16$ = subexp(HEXDIG$$2 + "{1,4}"), LS32$ = subexp(subexp(H16$ + "\\:" + H16$) + "|" + IPV4ADDRESS$), IPV6ADDRESS1$ = subexp(subexp(H16$ + "\\:") + "{6}" + LS32$), IPV6ADDRESS2$ = subexp("\\:\\:" + subexp(H16$ + "\\:") + "{5}" + LS32$), IPV6ADDRESS3$ = subexp(subexp(H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{4}" + LS32$), IPV6ADDRESS4$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,1}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{3}" + LS32$), IPV6ADDRESS5$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,2}" + H16$) + "?\\:\\:" + subexp(H16$ + "\\:") + "{2}" + LS32$), IPV6ADDRESS6$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,3}" + H16$) + "?\\:\\:" + H16$ + "\\:" + LS32$), IPV6ADDRESS7$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,4}" + H16$) + "?\\:\\:" + LS32$), IPV6ADDRESS8$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,5}" + H16$) + "?\\:\\:" + H16$), IPV6ADDRESS9$ = subexp(subexp(subexp(H16$ + "\\:") + "{0,6}" + H16$) + "?\\:\\:"), IPV6ADDRESS$ = subexp([IPV6ADDRESS1$, IPV6ADDRESS2$, IPV6ADDRESS3$, IPV6ADDRESS4$, IPV6ADDRESS5$, IPV6ADDRESS6$, IPV6ADDRESS7$, IPV6ADDRESS8$, IPV6ADDRESS9$].join("|")), ZONEID$ = subexp(subexp(UNRESERVED$$2 + "|" + PCT_ENCODED$2) + "+"), IPV6ADDRZ$ = subexp(IPV6ADDRESS$ + "\\%25" + ZONEID$), IPV6ADDRZ_RELAXED$ = subexp(IPV6ADDRESS$ + subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + ZONEID$), IPVFUTURE$ = subexp("[vV]" + HEXDIG$$2 + "+\\." + merge6(UNRESERVED$$2, SUB_DELIMS$$, "[\\:]") + "+"), IP_LITERAL$ = subexp("\\[" + subexp(IPV6ADDRZ_RELAXED$ + "|" + IPV6ADDRESS$ + "|" + IPVFUTURE$) + "\\]"), REG_NAME$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge6(UNRESERVED$$2, SUB_DELIMS$$)) + "*"), HOST$ = subexp(IP_LITERAL$ + "|" + IPV4ADDRESS$ + "(?!" + REG_NAME$ + ")|" + REG_NAME$), PORT$ = subexp(DIGIT$$ + "*"), AUTHORITY$ = subexp(subexp(USERINFO$ + "@") + "?" + HOST$ + subexp("\\:" + PORT$) + "?"), PCHAR$ = subexp(PCT_ENCODED$2 + "|" + merge6(UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@]")), SEGMENT$ = subexp(PCHAR$ + "*"), SEGMENT_NZ$ = subexp(PCHAR$ + "+"), SEGMENT_NZ_NC$ = subexp(subexp(PCT_ENCODED$2 + "|" + merge6(UNRESERVED$$2, SUB_DELIMS$$, "[\\@]")) + "+"), PATH_ABEMPTY$ = subexp(subexp("\\/" + SEGMENT$) + "*"), PATH_ABSOLUTE$ = subexp("\\/" + subexp(SEGMENT_NZ$ + PATH_ABEMPTY$) + "?"), PATH_NOSCHEME$ = subexp(SEGMENT_NZ_NC$ + PATH_ABEMPTY$), PATH_ROOTLESS$ = subexp(SEGMENT_NZ$ + PATH_ABEMPTY$), PATH_EMPTY$ = "(?!" + PCHAR$ + ")", PATH$ = subexp(PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), QUERY$ = subexp(subexp(PCHAR$ + "|" + merge6("[\\/\\?]", IPRIVATE$$)) + "*"), FRAGMENT$ = subexp(subexp(PCHAR$ + "|[\\/\\?]") + "*"), HIER_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$), URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), RELATIVE_PART$ = subexp(subexp("\\/\\/" + AUTHORITY$ + PATH_ABEMPTY$) + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$), RELATIVE$ = subexp(RELATIVE_PART$ + subexp("\\?" + QUERY$) + "?" + subexp("\\#" + FRAGMENT$) + "?"), URI_REFERENCE$ = subexp(URI$ + "|" + RELATIVE$), ABSOLUTE_URI$ = subexp(SCHEME$ + "\\:" + HIER_PART$ + subexp("\\?" + QUERY$) + "?"), GENERIC_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", RELATIVE_REF$ = "^(){0}" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_NOSCHEME$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", ABSOLUTE_REF$ = "^(" + SCHEME$ + ")\\:" + subexp(subexp("\\/\\/(" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?)") + "?(" + PATH_ABEMPTY$ + "|" + PATH_ABSOLUTE$ + "|" + PATH_ROOTLESS$ + "|" + PATH_EMPTY$ + ")") + subexp("\\?(" + QUERY$ + ")") + "?$", SAMEDOC_REF$ = "^" + subexp("\\#(" + FRAGMENT$ + ")") + "?$", AUTHORITY_REF$ = "^" + subexp("(" + USERINFO$ + ")@") + "?(" + HOST$ + ")" + subexp("\\:(" + PORT$ + ")") + "?$";
167840
167840
  return {
167841
- NOT_SCHEME: new RegExp(merge5("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
167842
- NOT_USERINFO: new RegExp(merge5("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167843
- NOT_HOST: new RegExp(merge5("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167844
- NOT_PATH: new RegExp(merge5("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167845
- NOT_PATH_NOSCHEME: new RegExp(merge5("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167846
- NOT_QUERY: new RegExp(merge5("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
167847
- NOT_FRAGMENT: new RegExp(merge5("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
167848
- ESCAPE: new RegExp(merge5("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167841
+ NOT_SCHEME: new RegExp(merge6("[^]", ALPHA$$, DIGIT$$, "[\\+\\-\\.]"), "g"),
167842
+ NOT_USERINFO: new RegExp(merge6("[^\\%\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167843
+ NOT_HOST: new RegExp(merge6("[^\\%\\[\\]\\:]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167844
+ NOT_PATH: new RegExp(merge6("[^\\%\\/\\:\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167845
+ NOT_PATH_NOSCHEME: new RegExp(merge6("[^\\%\\/\\@]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167846
+ NOT_QUERY: new RegExp(merge6("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]", IPRIVATE$$), "g"),
167847
+ NOT_FRAGMENT: new RegExp(merge6("[^\\%]", UNRESERVED$$2, SUB_DELIMS$$, "[\\:\\@\\/\\?]"), "g"),
167848
+ ESCAPE: new RegExp(merge6("[^]", UNRESERVED$$2, SUB_DELIMS$$), "g"),
167849
167849
  UNRESERVED: new RegExp(UNRESERVED$$2, "g"),
167850
- OTHER_CHARS: new RegExp(merge5("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"),
167850
+ OTHER_CHARS: new RegExp(merge6("[^\\%]", UNRESERVED$$2, RESERVED$$), "g"),
167851
167851
  PCT_ENCODED: new RegExp(PCT_ENCODED$2, "g"),
167852
167852
  IPV4ADDRESS: new RegExp("^(" + IPV4ADDRESS$ + ")$"),
167853
167853
  IPV6ADDRESS: new RegExp("^\\[?(" + IPV6ADDRESS$ + ")" + subexp(subexp("\\%25|\\%(?!" + HEXDIG$$2 + "{2})") + "(" + ZONEID$ + ")") + "?\\]?$")
@@ -168651,12 +168651,12 @@ var require_uri_all = __commonJS2({
168651
168651
  var PCT_ENCODED$ = subexp(subexp("%[EFef]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%[89A-Fa-f]" + HEXDIG$$ + "%" + HEXDIG$$ + HEXDIG$$) + "|" + subexp("%" + HEXDIG$$ + HEXDIG$$));
168652
168652
  var ATEXT$$ = "[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]";
168653
168653
  var QTEXT$$ = "[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]";
168654
- var VCHAR$$ = merge5(QTEXT$$, '[\\"\\\\]');
168654
+ var VCHAR$$ = merge6(QTEXT$$, '[\\"\\\\]');
168655
168655
  var SOME_DELIMS$$ = "[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]";
168656
168656
  var UNRESERVED = new RegExp(UNRESERVED$$, "g");
168657
168657
  var PCT_ENCODED = new RegExp(PCT_ENCODED$, "g");
168658
- var NOT_LOCAL_PART = new RegExp(merge5("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
168659
- var NOT_HFNAME = new RegExp(merge5("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
168658
+ var NOT_LOCAL_PART = new RegExp(merge6("[^]", ATEXT$$, "[\\.]", '[\\"]', VCHAR$$), "g");
168659
+ var NOT_HFNAME = new RegExp(merge6("[^]", UNRESERVED$$, SOME_DELIMS$$), "g");
168660
168660
  var NOT_HFVALUE = NOT_HFNAME;
168661
168661
  function decodeUnreserved(str2) {
168662
168662
  var decStr = pctDecChars(str2);
@@ -180832,8 +180832,8 @@ var require_options2 = __commonJS2({
180832
180832
  var httpResolver = require_http2();
180833
180833
  module2.exports = $RefParserOptions;
180834
180834
  function $RefParserOptions(options5) {
180835
- merge5(this, $RefParserOptions.defaults);
180836
- merge5(this, options5);
180835
+ merge6(this, $RefParserOptions.defaults);
180836
+ merge6(this, options5);
180837
180837
  }
180838
180838
  $RefParserOptions.defaults = {
180839
180839
  /**
@@ -180886,7 +180886,7 @@ var require_options2 = __commonJS2({
180886
180886
  circular: true
180887
180887
  }
180888
180888
  };
180889
- function merge5(target2, source2) {
180889
+ function merge6(target2, source2) {
180890
180890
  if (isMergeable(source2)) {
180891
180891
  let keys = Object.keys(source2);
180892
180892
  for (let i = 0; i < keys.length; i++) {
@@ -180894,7 +180894,7 @@ var require_options2 = __commonJS2({
180894
180894
  let sourceSetting = source2[key];
180895
180895
  let targetSetting = target2[key];
180896
180896
  if (isMergeable(sourceSetting)) {
180897
- target2[key] = merge5(targetSetting || {}, sourceSetting);
180897
+ target2[key] = merge6(targetSetting || {}, sourceSetting);
180898
180898
  } else if (sourceSetting !== void 0) {
180899
180899
  target2[key] = sourceSetting;
180900
180900
  }
@@ -183285,10 +183285,10 @@ var require_merge4 = __commonJS2({
183285
183285
  "use strict";
183286
183286
  var baseMerge = require_baseMerge();
183287
183287
  var createAssigner = require_createAssigner();
183288
- var merge5 = createAssigner(function(object, source2, srcIndex) {
183288
+ var merge6 = createAssigner(function(object, source2, srcIndex) {
183289
183289
  baseMerge(object, source2, srcIndex);
183290
183290
  });
183291
- module2.exports = merge5;
183291
+ module2.exports = merge6;
183292
183292
  }
183293
183293
  });
183294
183294
 
@@ -185055,7 +185055,7 @@ var require_he = __commonJS2({
185055
185055
  }
185056
185056
  return false;
185057
185057
  };
185058
- var merge5 = function(options5, defaults3) {
185058
+ var merge6 = function(options5, defaults3) {
185059
185059
  if (!options5) {
185060
185060
  return defaults3;
185061
185061
  }
@@ -185101,7 +185101,7 @@ var require_he = __commonJS2({
185101
185101
  throw Error("Parse error: " + message);
185102
185102
  };
185103
185103
  var encode3 = function(string, options5) {
185104
- options5 = merge5(options5, encode3.options);
185104
+ options5 = merge6(options5, encode3.options);
185105
185105
  var strict2 = options5.strict;
185106
185106
  if (strict2 && regexInvalidRawCodePoint.test(string)) {
185107
185107
  parseError("forbidden code point");
@@ -185156,7 +185156,7 @@ var require_he = __commonJS2({
185156
185156
  "decimal": false
185157
185157
  };
185158
185158
  var decode = function(html, options5) {
185159
- options5 = merge5(options5, decode.options);
185159
+ options5 = merge6(options5, decode.options);
185160
185160
  var strict2 = options5.strict;
185161
185161
  if (strict2 && regexInvalidEntity.test(html)) {
185162
185162
  parseError("malformed character reference");
@@ -191217,8 +191217,8 @@ var require_lib21 = __commonJS2({
191217
191217
  var liquid_1 = __importDefault4(require_liquid());
191218
191218
  var md_1 = __importDefault4(require_md());
191219
191219
  function applyLiquid(input2, options5) {
191220
- const { vars = {}, path: path2, conditionsInCode = false, disableLiquid = false, isLiquided = false } = options5;
191221
- return disableLiquid || isLiquided ? input2 : (0, liquid_1.default)(input2, vars, path2, { conditionsInCode });
191220
+ const { vars: vars2 = {}, path: path2, conditionsInCode = false, disableLiquid = false, isLiquided = false } = options5;
191221
+ return disableLiquid || isLiquided ? input2 : (0, liquid_1.default)(input2, vars2, path2, { conditionsInCode });
191222
191222
  }
191223
191223
  function handleError(error, path2) {
191224
191224
  log_1.log.error(`Error occurred${path2 ? ` in ${(0, chalk_1.bold)(path2)}` : ""}`);
@@ -199180,7 +199180,7 @@ var require_dist_node2 = __commonJS2({
199180
199180
  }
199181
199181
  return obj;
199182
199182
  }
199183
- function merge5(defaults3, route, options5) {
199183
+ function merge6(defaults3, route, options5) {
199184
199184
  if (typeof route === "string") {
199185
199185
  let [method2, url3] = route.split(" ");
199186
199186
  options5 = Object.assign(url3 ? { method: method2, url: url3 } : { url: method2 }, options5);
@@ -199416,15 +199416,15 @@ var require_dist_node2 = __commonJS2({
199416
199416
  );
199417
199417
  }
199418
199418
  function endpointWithDefaults(defaults3, route, options5) {
199419
- return parse5(merge5(defaults3, route, options5));
199419
+ return parse5(merge6(defaults3, route, options5));
199420
199420
  }
199421
199421
  function withDefaults(oldDefaults, newDefaults) {
199422
- const DEFAULTS2 = merge5(oldDefaults, newDefaults);
199422
+ const DEFAULTS2 = merge6(oldDefaults, newDefaults);
199423
199423
  const endpoint22 = endpointWithDefaults.bind(null, DEFAULTS2);
199424
199424
  return Object.assign(endpoint22, {
199425
199425
  DEFAULTS: DEFAULTS2,
199426
199426
  defaults: withDefaults.bind(null, DEFAULTS2),
199427
- merge: merge5.bind(null, DEFAULTS2),
199427
+ merge: merge6.bind(null, DEFAULTS2),
199428
199428
  parse: parse5
199429
199429
  });
199430
199430
  }
@@ -249647,10 +249647,10 @@ var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
249647
249647
  function concatNewLine(prefix2, suffix) {
249648
249648
  return prefix2.trim().length ? `${prefix2}<br>${suffix}` : suffix;
249649
249649
  }
249650
- function matchFilter(filter3, vars, action) {
249650
+ function matchFilter(filter3, vars2, action) {
249651
249651
  const { endpoint: endpointExpr, tag: tagExpr } = filter3 || {};
249652
- const matchTag = tagExpr ? (tag2) => (0, import_evaluation.evalExp)(tagExpr, __spreadProps2(__spreadValues2({}, tag2), { vars })) : null;
249653
- const matchEndpoint = endpointExpr ? (endpoint3) => (0, import_evaluation.evalExp)(endpointExpr, __spreadProps2(__spreadValues2({}, endpoint3), { vars })) : null;
249652
+ const matchTag = tagExpr ? (tag2) => (0, import_evaluation.evalExp)(tagExpr, __spreadProps2(__spreadValues2({}, tag2), { vars: vars2 })) : null;
249653
+ const matchEndpoint = endpointExpr ? (endpoint3) => (0, import_evaluation.evalExp)(endpointExpr, __spreadProps2(__spreadValues2({}, endpoint3), { vars: vars2 })) : null;
249654
249654
  return (spec) => {
249655
249655
  const { tags: tags2, endpoints: endpoints2 } = spec;
249656
249656
  for (const endpoint3 of endpoints2) {
@@ -250860,7 +250860,7 @@ function includerFunction(params) {
250860
250860
  readBasePath,
250861
250861
  writeBasePath,
250862
250862
  tocPath,
250863
- vars,
250863
+ vars: vars2,
250864
250864
  passedParams: { input: input2, leadingPage = {}, filter: filter3, noindex, hidden: hidden3, sandbox: sandbox2, tags: tags2 = {} },
250865
250865
  index
250866
250866
  } = params;
@@ -250882,7 +250882,7 @@ function includerFunction(params) {
250882
250882
  refs_default.init(allRefs);
250883
250883
  const writePath = (0, import_path3.join)(writeBasePath, tocDirPath, params.item.include.path);
250884
250884
  yield (0, import_promises2.mkdir)(writePath, { recursive: true });
250885
- yield generateToc({ data, writePath, leadingPage, filter: filter3, vars });
250885
+ yield generateToc({ data, writePath, leadingPage, filter: filter3, vars: vars2 });
250886
250886
  yield generateContent({
250887
250887
  data,
250888
250888
  writePath,
@@ -250890,7 +250890,7 @@ function includerFunction(params) {
250890
250890
  contentPath,
250891
250891
  filter: filter3,
250892
250892
  noindex,
250893
- vars,
250893
+ vars: vars2,
250894
250894
  hidden: hidden3,
250895
250895
  allRefs,
250896
250896
  sandbox: sandbox2
@@ -250922,11 +250922,11 @@ function assertLeadingPageMode(mode) {
250922
250922
  function generateToc(params) {
250923
250923
  return __async2(this, null, function* () {
250924
250924
  var _a3, _b2;
250925
- const { data, writePath, leadingPage, filter: filter3, vars } = params;
250925
+ const { data, writePath, leadingPage, filter: filter3, vars: vars2 } = params;
250926
250926
  const leadingPageName = (_a3 = leadingPage == null ? void 0 : leadingPage.name) != null ? _a3 : LEADING_PAGE_NAME_DEFAULT;
250927
250927
  const leadingPageMode = (_b2 = leadingPage == null ? void 0 : leadingPage.mode) != null ? _b2 : LeadingPageMode.Leaf;
250928
250928
  assertLeadingPageMode(leadingPageMode);
250929
- const filterContent = filterUsefullContent(filter3, vars);
250929
+ const filterContent = filterUsefullContent(filter3, vars2);
250930
250930
  const { tags: tags2, endpoints: endpoints2 } = filterContent(parsers_default.paths(data, parsers_default.tags(data)));
250931
250931
  const toc = {
250932
250932
  name: INCLUDER_NAME,
@@ -250977,13 +250977,13 @@ function addLeadingPage(section2, mode, name5, href) {
250977
250977
  function generateContent(params) {
250978
250978
  return __async2(this, null, function* () {
250979
250979
  var _a3, _b2;
250980
- const { data, writePath, leadingPage, filter: filter3, noindex, hidden: hidden3, vars, sandbox: sandbox2, contentPath } = params;
250980
+ const { data, writePath, leadingPage, filter: filter3, noindex, hidden: hidden3, vars: vars2, sandbox: sandbox2, contentPath } = params;
250981
250981
  const customLeadingPageDir = (0, import_path3.dirname)(contentPath);
250982
- const filterContent = filterUsefullContent(filter3, vars);
250983
- const applyNoindex = matchFilter(noindex || {}, vars, (endpoint3) => {
250982
+ const filterContent = filterUsefullContent(filter3, vars2);
250983
+ const applyNoindex = matchFilter(noindex || {}, vars2, (endpoint3) => {
250984
250984
  endpoint3.noindex = true;
250985
250985
  });
250986
- const applyHidden = matchFilter(hidden3 || {}, vars, (endpoint3) => {
250986
+ const applyHidden = matchFilter(hidden3 || {}, vars2, (endpoint3) => {
250987
250987
  endpoint3.hidden = true;
250988
250988
  });
250989
250989
  const leadingPageSpecRenderMode = (_b2 = (_a3 = leadingPage == null ? void 0 : leadingPage.spec) == null ? void 0 : _a3.renderMode) != null ? _b2 : SPEC_RENDER_MODE_DEFAULT;
@@ -251047,14 +251047,14 @@ function handleEndpointRender(endpoint3, pathPrefix) {
251047
251047
  hidden: endpoint3.hidden
251048
251048
  };
251049
251049
  }
251050
- function filterUsefullContent(filter3, vars) {
251050
+ function filterUsefullContent(filter3, vars2) {
251051
251051
  if (!filter3) {
251052
251052
  return (spec) => spec;
251053
251053
  }
251054
251054
  return (spec) => {
251055
251055
  const endpointsByTag = /* @__PURE__ */ new Map();
251056
251056
  const tags2 = /* @__PURE__ */ new Map();
251057
- matchFilter(filter3, vars, (endpoint3, tag2) => {
251057
+ matchFilter(filter3, vars2, (endpoint3, tag2) => {
251058
251058
  var _a3;
251059
251059
  const tagId = (_a3 = tag2 == null ? void 0 : tag2.id) != null ? _a3 : null;
251060
251060
  const collection = endpointsByTag.get(tagId) || [];
@@ -251588,15 +251588,15 @@ var import_path8 = require("path");
251588
251588
  // src/services/utils.ts
251589
251589
  var import_evaluation2 = __toESM2(require_evaluation());
251590
251590
  var import_liquid = __toESM2(require_liquid());
251591
- function filterFiles(items, itemsKey, vars, options5) {
251591
+ function filterFiles(items, itemsKey, vars2, options5) {
251592
251592
  if (!Array.isArray(items)) {
251593
251593
  return [];
251594
251594
  }
251595
251595
  const reducer = (results, item) => {
251596
- if (shouldProcessItem(item, vars, options5)) {
251596
+ if (shouldProcessItem(item, vars2, options5)) {
251597
251597
  const prop = item[itemsKey];
251598
251598
  if (prop) {
251599
- const filteredProperty = filterFiles(prop, itemsKey, vars, options5);
251599
+ const filteredProperty = filterFiles(prop, itemsKey, vars2, options5);
251600
251600
  if (filteredProperty.length) {
251601
251601
  results.push(__spreadProps(__spreadValues({}, item), {
251602
251602
  [itemsKey]: filteredProperty
@@ -251610,7 +251610,7 @@ function filterFiles(items, itemsKey, vars, options5) {
251610
251610
  };
251611
251611
  return items.reduce(reducer, []);
251612
251612
  }
251613
- function filterTextItems(items, vars, options5) {
251613
+ function filterTextItems(items, vars2, options5) {
251614
251614
  if (!Array.isArray(items)) {
251615
251615
  return items;
251616
251616
  }
@@ -251619,7 +251619,7 @@ function filterTextItems(items, vars, options5) {
251619
251619
  result.push(item);
251620
251620
  return result;
251621
251621
  }
251622
- const useItem = shouldProcessItem(item, vars, options5);
251622
+ const useItem = shouldProcessItem(item, vars2, options5);
251623
251623
  if (useItem) {
251624
251624
  if (Array.isArray(item.text)) {
251625
251625
  result.push(...item.text);
@@ -251630,17 +251630,17 @@ function filterTextItems(items, vars, options5) {
251630
251630
  return result;
251631
251631
  }, []);
251632
251632
  }
251633
- function firstFilterTextItems(items, vars, options5) {
251634
- const filteredItems = filterTextItems(items, vars, options5);
251633
+ function firstFilterTextItems(items, vars2, options5) {
251634
+ const filteredItems = filterTextItems(items, vars2, options5);
251635
251635
  if (!Array.isArray(filteredItems)) {
251636
251636
  return filteredItems || "";
251637
251637
  }
251638
251638
  return filteredItems[0] || "";
251639
251639
  }
251640
- function firstFilterItem(itemOrItems, vars, options5) {
251640
+ function firstFilterItem(itemOrItems, vars2, options5) {
251641
251641
  const items = Array.isArray(itemOrItems) ? itemOrItems : [itemOrItems];
251642
251642
  const filteredItems = items.reduce((result, item) => {
251643
- const useItem = shouldProcessItem(item, vars, options5);
251643
+ const useItem = shouldProcessItem(item, vars2, options5);
251644
251644
  if (useItem) {
251645
251645
  result.push(item);
251646
251646
  }
@@ -251648,12 +251648,12 @@ function firstFilterItem(itemOrItems, vars, options5) {
251648
251648
  }, []);
251649
251649
  return filteredItems[0];
251650
251650
  }
251651
- function shouldProcessItem(item, vars, options5) {
251651
+ function shouldProcessItem(item, vars2, options5) {
251652
251652
  const { resolveConditions, removeHiddenTocItems } = options5 || {};
251653
251653
  let useItem = true;
251654
251654
  if (resolveConditions) {
251655
251655
  const { when } = item;
251656
- useItem = when === true || when === void 0 || typeof when === "string" && (0, import_evaluation2.default)(when, vars);
251656
+ useItem = when === true || when === void 0 || typeof when === "string" && (0, import_evaluation2.default)(when, vars2);
251657
251657
  delete item.when;
251658
251658
  }
251659
251659
  if (useItem && removeHiddenTocItems) {
@@ -251662,26 +251662,26 @@ function shouldProcessItem(item, vars, options5) {
251662
251662
  }
251663
251663
  return useItem;
251664
251664
  }
251665
- function liquidFields(fields2, vars, path2) {
251665
+ function liquidFields(fields2, vars2, path2) {
251666
251666
  if (typeof fields2 === "string") {
251667
- return liquidField(fields2, vars, path2);
251667
+ return liquidField(fields2, vars2, path2);
251668
251668
  }
251669
251669
  if (!Array.isArray(fields2)) {
251670
251670
  return fields2;
251671
251671
  }
251672
251672
  return fields2.map((item) => {
251673
251673
  if (typeof item === "string") {
251674
- return liquidField(item, vars, path2);
251674
+ return liquidField(item, vars2, path2);
251675
251675
  }
251676
251676
  return item;
251677
251677
  });
251678
251678
  }
251679
- function liquidField(input2, vars, path2) {
251679
+ function liquidField(input2, vars2, path2) {
251680
251680
  const { applyPresets, resolveConditions } = argv_default2.getConfig();
251681
251681
  if (!applyPresets && !resolveConditions) {
251682
251682
  return input2;
251683
251683
  }
251684
- return (0, import_liquid.default)(input2, vars, path2, {
251684
+ return (0, import_liquid.default)(input2, vars2, path2, {
251685
251685
  substitutions: applyPresets,
251686
251686
  conditions: resolveConditions,
251687
251687
  keepNotVar: true,
@@ -252432,7 +252432,7 @@ function init3(custom = []) {
252432
252432
  includersMap[includer.name] = includer;
252433
252433
  }
252434
252434
  }
252435
- function applyIncluders(path2, item, vars) {
252435
+ function applyIncluders(path2, item, vars2) {
252436
252436
  return __async(this, null, function* () {
252437
252437
  var _a3;
252438
252438
  if (!((_a3 = item.include) == null ? void 0 : _a3.includers)) {
@@ -252451,7 +252451,7 @@ function applyIncluders(path2, item, vars) {
252451
252451
  const _c2 = _b2, { name: name5 } = _c2, rest = __objRest(_c2, ["name"]);
252452
252452
  const includer = getIncluder(name5);
252453
252453
  const passedParams = __spreadValues({}, rest);
252454
- yield applyIncluder({ path: path2, item, includer, passedParams, index, vars });
252454
+ yield applyIncluder({ path: path2, item, includer, passedParams, index, vars: vars2 });
252455
252455
  }
252456
252456
  item.include.path = (0, import_path14.join)(item.include.path, "toc.yaml");
252457
252457
  index++;
@@ -252498,7 +252498,7 @@ function includerExists(includer) {
252498
252498
  function applyIncluder(args2) {
252499
252499
  return __async(this, null, function* () {
252500
252500
  const { rootInput: readBasePath, input: writeBasePath } = argv_default2.getConfig();
252501
- const { path: path2, item, includer, passedParams, index, vars } = args2;
252501
+ const { path: path2, item, includer, passedParams, index, vars: vars2 } = args2;
252502
252502
  const params = {
252503
252503
  tocPath: path2,
252504
252504
  passedParams,
@@ -252506,7 +252506,7 @@ function applyIncluder(args2) {
252506
252506
  item,
252507
252507
  readBasePath,
252508
252508
  writeBasePath,
252509
- vars
252509
+ vars: vars2
252510
252510
  };
252511
252511
  return yield includer.includerFunction(params);
252512
252512
  });
@@ -252542,7 +252542,7 @@ function add(path2) {
252542
252542
  output: outputFolderPath,
252543
252543
  outputFormat,
252544
252544
  ignoreStage,
252545
- vars
252545
+ vars: vars2
252546
252546
  } = argv_default2.getConfig();
252547
252547
  const pathToDir = (0, import_path15.dirname)(path2);
252548
252548
  const content = (0, import_fs4.readFileSync)((0, import_path15.resolve)(inputFolderPath, path2), "utf8");
@@ -252550,7 +252550,7 @@ function add(path2) {
252550
252550
  if (parsedToc.stage === ignoreStage) {
252551
252551
  return;
252552
252552
  }
252553
- const combinedVars = __spreadValues(__spreadValues({}, preset_default.get(pathToDir)), vars);
252553
+ const combinedVars = __spreadValues(__spreadValues({}, preset_default.get(pathToDir)), vars2);
252554
252554
  if (parsedToc.title) {
252555
252555
  parsedToc.title = firstFilterTextItems(parsedToc.title, combinedVars, {
252556
252556
  resolveConditions: true
@@ -252610,13 +252610,13 @@ function addNavigation(path2) {
252610
252610
  prepareNavigationPaths(parsedToc, pathToDir);
252611
252611
  });
252612
252612
  }
252613
- function processTocItems(path2, items, tocDir, sourcesDir, vars) {
252613
+ function processTocItems(path2, items, tocDir, sourcesDir, vars2) {
252614
252614
  return __async(this, null, function* () {
252615
252615
  const { resolveConditions, removeHiddenTocItems } = argv_default2.getConfig();
252616
252616
  let preparedItems = items;
252617
252617
  if (resolveConditions || removeHiddenTocItems) {
252618
252618
  try {
252619
- preparedItems = filterFiles(items, "items", vars, {
252619
+ preparedItems = filterFiles(items, "items", vars2, {
252620
252620
  resolveConditions,
252621
252621
  removeHiddenTocItems
252622
252622
  });
@@ -252624,7 +252624,7 @@ function processTocItems(path2, items, tocDir, sourcesDir, vars) {
252624
252624
  import_log3.default.error(`Error while filtering toc file: ${path2}. Error message: ${error}`);
252625
252625
  }
252626
252626
  }
252627
- return _replaceIncludes(path2, preparedItems, tocDir, sourcesDir, vars);
252627
+ return _replaceIncludes(path2, preparedItems, tocDir, sourcesDir, vars2);
252628
252628
  });
252629
252629
  }
252630
252630
  function getForPath(path2) {
@@ -252722,12 +252722,12 @@ function _replaceIncludesHrefs(items, includeTocDir, tocDir) {
252722
252722
  return acc.concat(tocItem);
252723
252723
  }, []);
252724
252724
  }
252725
- function _liquidSubstitutions(input2, vars, path2) {
252725
+ function _liquidSubstitutions(input2, vars2, path2) {
252726
252726
  const { outputFormat, applyPresets } = argv_default2.getConfig();
252727
252727
  if (outputFormat === "md" && !applyPresets) {
252728
252728
  return input2;
252729
252729
  }
252730
- return (0, import_liquid2.default)(input2, vars, path2, {
252730
+ return (0, import_liquid2.default)(input2, vars2, path2, {
252731
252731
  conditions: false,
252732
252732
  substitutions: true
252733
252733
  });
@@ -252735,17 +252735,17 @@ function _liquidSubstitutions(input2, vars, path2) {
252735
252735
  function addIncludeTocPath(includeTocPath) {
252736
252736
  includedTocPaths.add(includeTocPath);
252737
252737
  }
252738
- function _replaceIncludes(path2, items, tocDir, sourcesDir, vars) {
252738
+ function _replaceIncludes(path2, items, tocDir, sourcesDir, vars2) {
252739
252739
  return __async(this, null, function* () {
252740
252740
  const result = [];
252741
252741
  for (const item of items) {
252742
252742
  let includedInlineItems = null;
252743
252743
  if (item.name) {
252744
252744
  const tocPath = (0, import_path15.join)(tocDir, "toc.yaml");
252745
- item.name = _liquidSubstitutions(item.name, vars, tocPath);
252745
+ item.name = _liquidSubstitutions(item.name, vars2, tocPath);
252746
252746
  }
252747
252747
  try {
252748
- yield applyIncluders(path2, item, vars);
252748
+ yield applyIncluders(path2, item, vars2);
252749
252749
  } catch (err) {
252750
252750
  if (err instanceof Error || err instanceof IncludersError) {
252751
252751
  const message = err.toString();
@@ -252773,7 +252773,7 @@ function _replaceIncludes(path2, items, tocDir, sourcesDir, vars) {
252773
252773
  includedTocItems,
252774
252774
  baseTocDir,
252775
252775
  sourcesDir,
252776
- vars
252776
+ vars2
252777
252777
  );
252778
252778
  if (mode === "link" /* LINK */) {
252779
252779
  includedTocItems = _replaceIncludesHrefs(
@@ -252797,7 +252797,7 @@ function _replaceIncludes(path2, items, tocDir, sourcesDir, vars) {
252797
252797
  delete item.include;
252798
252798
  }
252799
252799
  } else if (item.items) {
252800
- item.items = yield processTocItems(path2, item.items, tocDir, sourcesDir, vars);
252800
+ item.items = yield processTocItems(path2, item.items, tocDir, sourcesDir, vars2);
252801
252801
  }
252802
252802
  if (includedInlineItems) {
252803
252803
  result.push(...includedInlineItems);
@@ -252913,12 +252913,12 @@ var import_fs6 = require("fs");
252913
252913
  var import_log4 = __toESM2(require_log());
252914
252914
  function filterFile(path2) {
252915
252915
  var _a3, _b2;
252916
- const { input: inputFolderPath, vars } = argv_default2.getConfig();
252916
+ const { input: inputFolderPath, vars: vars2 } = argv_default2.getConfig();
252917
252917
  const pathToDir = (0, import_path18.dirname)(path2);
252918
252918
  const filePath = (0, import_path18.resolve)(inputFolderPath, path2);
252919
252919
  const content = (0, import_fs6.readFileSync)(filePath, "utf8");
252920
252920
  const parsedIndex = load(content);
252921
- const combinedVars = __spreadValues(__spreadValues({}, preset_default.get(pathToDir)), vars);
252921
+ const combinedVars = __spreadValues(__spreadValues({}, preset_default.get(pathToDir)), vars2);
252922
252922
  try {
252923
252923
  const title2 = firstFilterTextItems(parsedIndex.title, combinedVars, {
252924
252924
  resolveConditions: true
@@ -253185,12 +253185,12 @@ function resolveMd2Md(options5) {
253185
253185
  const { inputPath, outputPath, metadata } = options5;
253186
253186
  const { input: input2, output: output2, changelogs: changelogsSetting } = argv_default2.getConfig();
253187
253187
  const resolvedInputPath = (0, import_path21.resolve)(input2, inputPath);
253188
- const vars = getVarsPerFile(inputPath);
253188
+ const vars2 = getVarsPerFile(inputPath);
253189
253189
  const content = yield getContentWithUpdatedMetadata(
253190
253190
  (0, import_fs8.readFileSync)(resolvedInputPath, "utf8"),
253191
253191
  metadata,
253192
- vars.__system,
253193
- vars.__metadata
253192
+ vars2.__system,
253193
+ vars2.__metadata
253194
253194
  );
253195
253195
  const { result, changelogs } = transformMd2Md(content, {
253196
253196
  path: resolvedInputPath,
@@ -253198,7 +253198,7 @@ function resolveMd2Md(options5) {
253198
253198
  root: (0, import_path21.resolve)(input2),
253199
253199
  destRoot: (0, import_path21.resolve)(output2),
253200
253200
  collectOfPlugins: plugins_exports.getCollectOfPlugins(),
253201
- vars,
253201
+ vars: vars2,
253202
253202
  log: import_log6.default,
253203
253203
  copyFile: copyFile2
253204
253204
  });
@@ -253245,9 +253245,9 @@ function copyFile2(targetPath, targetDestPath, options5) {
253245
253245
  import_shelljs5.default.cp(targetPath, targetDestPath);
253246
253246
  }
253247
253247
  }
253248
- function liquidMd2Md(input2, vars, path2) {
253248
+ function liquidMd2Md(input2, vars2, path2) {
253249
253249
  const { applyPresets, resolveConditions, conditionsInCode } = argv_default2.getConfig();
253250
- return (0, import_liquid3.default)(input2, vars, path2, {
253250
+ return (0, import_liquid3.default)(input2, vars2, path2, {
253251
253251
  conditions: resolveConditions,
253252
253252
  substitutions: applyPresets,
253253
253253
  conditionsInCode,
@@ -253258,7 +253258,7 @@ function liquidMd2Md(input2, vars, path2) {
253258
253258
  function transformMd2Md(input2, options5) {
253259
253259
  const { disableLiquid, changelogs: changelogsSetting } = argv_default2.getConfig();
253260
253260
  const {
253261
- vars = {},
253261
+ vars: vars2 = {},
253262
253262
  path: path2,
253263
253263
  root,
253264
253264
  destPath,
@@ -253270,12 +253270,12 @@ function transformMd2Md(input2, options5) {
253270
253270
  let output2 = input2;
253271
253271
  const changelogs = [];
253272
253272
  if (!disableLiquid) {
253273
- const liquidResult = liquidMd2Md(input2, vars, path2);
253273
+ const liquidResult = liquidMd2Md(input2, vars2, path2);
253274
253274
  output2 = liquidResult.output;
253275
253275
  }
253276
253276
  if (collectOfPlugins) {
253277
253277
  output2 = collectOfPlugins(output2, {
253278
- vars,
253278
+ vars: vars2,
253279
253279
  path: path2,
253280
253280
  root,
253281
253281
  destPath,
@@ -253317,13 +253317,13 @@ var getFileMeta = (_0) => __async(void 0, [_0], function* ({ fileExtension, meta
253317
253317
  const content = (0, import_fs9.readFileSync)(resolvedPath, "utf8");
253318
253318
  const transformFn = FileTransformer[fileExtension];
253319
253319
  const { result } = transformFn(content, { path: inputPath });
253320
- const vars = getVarsPerFile(inputPath);
253320
+ const vars2 = getVarsPerFile(inputPath);
253321
253321
  const updatedMetadata = (metadata == null ? void 0 : metadata.isContributorsEnabled) ? yield getVCSMetadata(metadata, content, result == null ? void 0 : result.meta) : result == null ? void 0 : result.meta;
253322
253322
  const fileMeta = fileExtension === ".yaml" ? (_b2 = (_a3 = result == null ? void 0 : result.data) == null ? void 0 : _a3.meta) != null ? _b2 : {} : updatedMetadata;
253323
253323
  if (!Array.isArray(fileMeta == null ? void 0 : fileMeta.metadata)) {
253324
253324
  fileMeta.metadata = [fileMeta == null ? void 0 : fileMeta.metadata].filter(Boolean);
253325
253325
  }
253326
- fileMeta.metadata = fileMeta.metadata.concat(((_c2 = vars.__metadata) == null ? void 0 : _c2.filter(Boolean)) || []);
253326
+ fileMeta.metadata = fileMeta.metadata.concat(((_c2 = vars2.__metadata) == null ? void 0 : _c2.filter(Boolean)) || []);
253327
253327
  if (allowCustomResources) {
253328
253328
  const { script, style } = (metadata == null ? void 0 : metadata.resources) || {};
253329
253329
  fileMeta.style = (fileMeta.style || []).concat(style || []).map(fixRelativePath(inputPath));
@@ -253438,9 +253438,9 @@ function YamlFileTransformer(content, transformOptions) {
253438
253438
  result: { data }
253439
253439
  };
253440
253440
  }
253441
- function liquidMd2Html(input2, vars, path2) {
253441
+ function liquidMd2Html(input2, vars2, path2) {
253442
253442
  const { conditionsInCode } = argv_default2.getConfig();
253443
- return (0, import_liquid4.default)(input2, vars, path2, {
253443
+ return (0, import_liquid4.default)(input2, vars2, path2, {
253444
253444
  conditionsInCode,
253445
253445
  withSourceMap: true
253446
253446
  });
@@ -253449,12 +253449,12 @@ function MdFileTransformer(content, transformOptions) {
253449
253449
  const _a3 = argv_default2.getConfig(), { input: input2 } = _a3, options5 = __objRest(_a3, ["input"]);
253450
253450
  const { path: filePath } = transformOptions;
253451
253451
  const plugins2 = plugins_exports.getPlugins();
253452
- const vars = getVarsPerFile(filePath);
253452
+ const vars2 = getVarsPerFile(filePath);
253453
253453
  const root = (0, import_path22.resolve)(input2);
253454
253454
  const path2 = (0, import_path22.resolve)(input2, filePath);
253455
253455
  return (0, import_transform.default)(content, __spreadProps(__spreadValues({}, options5), {
253456
253456
  plugins: plugins2,
253457
- vars,
253457
+ vars: vars2,
253458
253458
  root,
253459
253459
  path: path2,
253460
253460
  assetsPublicPath: getAssetsPublicPath(filePath),
@@ -253519,7 +253519,7 @@ function MdFileLinter(content, lintOptions) {
253519
253519
  const _a3 = argv_default2.getConfig(), { input: input2, lintConfig, disableLiquid, outputFormat } = _a3, options5 = __objRest(_a3, ["input", "lintConfig", "disableLiquid", "outputFormat"]);
253520
253520
  const { path: filePath } = lintOptions;
253521
253521
  const plugins2 = outputFormat === "md" ? [] : plugins_exports.getPlugins();
253522
- const vars = getVarsPerFile(filePath);
253522
+ const vars2 = getVarsPerFile(filePath);
253523
253523
  const root = (0, import_path23.resolve)(input2);
253524
253524
  const path2 = (0, import_path23.resolve)(input2, filePath);
253525
253525
  let preparedContent = content;
@@ -253527,7 +253527,7 @@ function MdFileLinter(content, lintOptions) {
253527
253527
  const lintMarkdown = function lintMarkdown2(opts) {
253528
253528
  const { input: localInput, path: localPath, sourceMap: sourceMap2 } = opts;
253529
253529
  const pluginOptions = __spreadProps(__spreadValues({}, options5), {
253530
- vars,
253530
+ vars: vars2,
253531
253531
  root,
253532
253532
  path: localPath,
253533
253533
  lintMarkdown: lintMarkdown2,
@@ -253551,9 +253551,9 @@ function MdFileLinter(content, lintOptions) {
253551
253551
  if (!disableLiquid) {
253552
253552
  let liquidResult;
253553
253553
  if (outputFormat === "md") {
253554
- liquidResult = liquidMd2Md(content, vars, path2);
253554
+ liquidResult = liquidMd2Md(content, vars2, path2);
253555
253555
  } else {
253556
- liquidResult = liquidMd2Html(content, vars, path2);
253556
+ liquidResult = liquidMd2Html(content, vars2, path2);
253557
253557
  }
253558
253558
  preparedContent = liquidResult.output;
253559
253559
  sourceMap = liquidResult.sourceMap;
@@ -255782,11 +255782,11 @@ function mergeTask(customArgs) {
255782
255782
  commands: ["merge", ...customArgs],
255783
255783
  format: "utf-8",
255784
255784
  parser(stdOut, stdErr) {
255785
- const merge5 = parseMergeResult(stdOut, stdErr);
255786
- if (merge5.failed) {
255787
- throw new GitResponseError(merge5);
255785
+ const merge6 = parseMergeResult(stdOut, stdErr);
255786
+ if (merge6.failed) {
255787
+ throw new GitResponseError(merge6);
255788
255788
  }
255789
- return merge5;
255789
+ return merge6;
255790
255790
  }
255791
255791
  };
255792
255792
  }
@@ -260189,7 +260189,7 @@ var parser3 = import_yargs.default.command(build).option("config", {
260189
260189
  default: false,
260190
260190
  describe: "Run in quiet mode. Don't write logs to stdout",
260191
260191
  type: "boolean"
260192
- }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.28.2" : "").help();
260192
+ }).group(["config", "strict", "quiet", "help", "version"], "Common options:").version(true ? "4.29.0" : "").help();
260193
260193
  var Build = class extends BaseProgram(command, {
260194
260194
  config: {
260195
260195
  // scope: 'build',
@@ -260449,7 +260449,7 @@ var Publish = class extends BaseProgram("Publish", {
260449
260449
 
260450
260450
  // src/commands/translate/index.ts
260451
260451
  var import_assert4 = require("assert");
260452
- var import_lodash12 = __toESM2(require_lodash());
260452
+ var import_lodash13 = __toESM2(require_lodash());
260453
260453
  var import_tapable2 = __toESM2(require_lib14());
260454
260454
 
260455
260455
  // src/commands/translate/config.ts
@@ -260526,6 +260526,18 @@ var exclude = option({
260526
260526
  `,
260527
260527
  parser: toArray2
260528
260528
  });
260529
+ var vars = option({
260530
+ flags: "-v, --vars <json>",
260531
+ desc: `
260532
+ Pass list of variables directly to translation.
260533
+ Variables should be passed in JSON format.
260534
+ Translation command ignores any presets.yaml.
260535
+
260536
+ Example:
260537
+ {{PROGRAM}} -i ./ -o ./build -v '{"name":"test"}'
260538
+ `,
260539
+ parser: (value) => JSON.parse(value)
260540
+ });
260529
260541
  var dryRun = option({
260530
260542
  flags: "--dry-run",
260531
260543
  desc: "Do not execute target translation provider, but only calculate required quota."
@@ -260547,6 +260559,7 @@ var options3 = {
260547
260559
  files,
260548
260560
  include,
260549
260561
  exclude,
260562
+ vars,
260550
260563
  dryRun,
260551
260564
  useSource
260552
260565
  };
@@ -260555,9 +260568,10 @@ var options3 = {
260555
260568
  var import_node_assert2 = require("assert");
260556
260569
  var import_node_path7 = require("path");
260557
260570
  var import_promises7 = require("fs/promises");
260558
- var import_lodash10 = __toESM2(require_lodash());
260571
+ var import_lodash11 = __toESM2(require_lodash());
260559
260572
  var import_chalk9 = __toESM2(require_source());
260560
260573
  var import_async3 = __toESM2(require_async());
260574
+ var import_liquid5 = __toESM2(require_liquid());
260561
260575
 
260562
260576
  // src/commands/translate/utils/fs.ts
260563
260577
  var import_node_path5 = require("path");
@@ -260678,6 +260692,7 @@ var import_node_assert = require("assert");
260678
260692
  var import_node_path6 = require("path");
260679
260693
  var import_node_fs = require("fs");
260680
260694
  var import_glob5 = __toESM2(require_glob());
260695
+ var import_lodash10 = __toESM2(require_lodash());
260681
260696
  function resolveSource(config2, args2) {
260682
260697
  const value = defined("source", args2, config2);
260683
260698
  if (value) {
@@ -260757,6 +260772,9 @@ function resolveFiles(input2, files2, include2, exclude2, lang, exts) {
260757
260772
  (0, import_node_assert.ok)(pathsInScope(result, input2), "Insecure access to paths out of project scope!");
260758
260773
  return result;
260759
260774
  }
260775
+ function resolveVars(config2, args2) {
260776
+ return (0, import_lodash10.merge)(config2.vars || {}, args2.vars);
260777
+ }
260760
260778
 
260761
260779
  // src/commands/translate/commands/extract.ts
260762
260780
  var MAX_CONCURRENCY = 50;
@@ -260784,6 +260802,7 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260784
260802
  options3.files,
260785
260803
  options3.include,
260786
260804
  options3.exclude,
260805
+ options3.vars,
260787
260806
  options3.config(YFM_CONFIG_FILENAME)
260788
260807
  ];
260789
260808
  this.logger = new ExtractLogger();
@@ -260791,7 +260810,7 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260791
260810
  apply(program2) {
260792
260811
  super.apply(program2);
260793
260812
  this.hooks.Config.tap("Translate.Extract", (config2, args2) => {
260794
- const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash10.pick)(args2, [
260813
+ const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash11.pick)(args2, [
260795
260814
  "input",
260796
260815
  "output",
260797
260816
  "quiet",
@@ -260809,6 +260828,7 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260809
260828
  source2.language,
260810
260829
  [".md", ".yaml"]
260811
260830
  );
260831
+ const vars2 = resolveVars(config2, args2);
260812
260832
  return Object.assign(config2, {
260813
260833
  input: input2,
260814
260834
  output: output2 || input2,
@@ -260818,13 +260838,14 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260818
260838
  target: target2,
260819
260839
  files: files2,
260820
260840
  include: include2,
260821
- exclude: exclude2
260841
+ exclude: exclude2,
260842
+ vars: vars2
260822
260843
  });
260823
260844
  });
260824
260845
  }
260825
260846
  action() {
260826
260847
  return __async(this, null, function* () {
260827
- const { input: input2, output: output2, files: files2, source: source2, target: targets } = this.config;
260848
+ const { input: input2, output: output2, files: files2, source: source2, target: targets, vars: vars2 } = this.config;
260828
260849
  this.logger.setup(this.config);
260829
260850
  for (const target2 of targets) {
260830
260851
  (0, import_node_assert2.ok)(source2.language && source2.locale, "Invalid source language-locale config");
@@ -260833,7 +260854,8 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260833
260854
  source: source2,
260834
260855
  target: target2,
260835
260856
  input: input2,
260836
- output: output2
260857
+ output: output2,
260858
+ vars: vars2
260837
260859
  });
260838
260860
  yield (0, import_async3.eachLimit)(
260839
260861
  files2,
@@ -260860,7 +260882,7 @@ var Extract = class extends BaseProgram("Translate.Extract", {
260860
260882
  }
260861
260883
  };
260862
260884
  function pipeline2(params) {
260863
- const { input: input2, output: output2, source: source2, target: target2 } = params;
260885
+ const { input: input2, output: output2, source: source2, target: target2, vars: vars2 } = params;
260864
260886
  const inputRoot = (0, import_node_path7.resolve)(input2);
260865
260887
  const outputRoot = (0, import_node_path7.resolve)(output2);
260866
260888
  return (path2) => __async(this, null, function* () {
@@ -260876,7 +260898,14 @@ function pipeline2(params) {
260876
260898
  if ([".yaml"].includes(ext3) && !schemas.length) {
260877
260899
  return;
260878
260900
  }
260879
- const content = yield loadFile(inputPath);
260901
+ let content = yield loadFile(inputPath);
260902
+ if (Object.keys(vars2).length && typeof content === "string") {
260903
+ content = (0, import_liquid5.default)(content, vars2, inputPath, {
260904
+ conditions: "strict",
260905
+ substitutions: false,
260906
+ cycles: false
260907
+ });
260908
+ }
260880
260909
  yield (0, import_promises7.mkdir)((0, import_node_path7.dirname)(xliffPath), { recursive: true });
260881
260910
  const { xliff, skeleton, units } = extract2(content, {
260882
260911
  source: source2,
@@ -260893,7 +260922,7 @@ function pipeline2(params) {
260893
260922
  // src/commands/translate/commands/compose.ts
260894
260923
  var import_node_path8 = require("path");
260895
260924
  var import_promises8 = require("fs/promises");
260896
- var import_lodash11 = __toESM2(require_lodash());
260925
+ var import_lodash12 = __toESM2(require_lodash());
260897
260926
  var import_chalk10 = __toESM2(require_source());
260898
260927
  var import_async4 = __toESM2(require_async());
260899
260928
  var MAX_CONCURRENCY2 = 50;
@@ -260926,7 +260955,7 @@ var Compose = class extends BaseProgram("Translate.Compose", {
260926
260955
  apply(program2) {
260927
260956
  super.apply(program2);
260928
260957
  this.hooks.Config.tap("Translate.Compose", (config2, args2) => {
260929
- const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash11.pick)(args2, [
260958
+ const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash12.pick)(args2, [
260930
260959
  "input",
260931
260960
  "output",
260932
260961
  "quiet",
@@ -261117,15 +261146,15 @@ var _global = (() => {
261117
261146
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
261118
261147
  })();
261119
261148
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
261120
- function merge4() {
261149
+ function merge5() {
261121
261150
  const { caseless } = isContextDefined(this) && this || {};
261122
261151
  const result = {};
261123
261152
  const assignValue = (val2, key) => {
261124
261153
  const targetKey = caseless && findKey(result, key) || key;
261125
261154
  if (isPlainObject(result[targetKey]) && isPlainObject(val2)) {
261126
- result[targetKey] = merge4(result[targetKey], val2);
261155
+ result[targetKey] = merge5(result[targetKey], val2);
261127
261156
  } else if (isPlainObject(val2)) {
261128
- result[targetKey] = merge4({}, val2);
261157
+ result[targetKey] = merge5({}, val2);
261129
261158
  } else if (isArray2(val2)) {
261130
261159
  result[targetKey] = val2.slice();
261131
261160
  } else {
@@ -261350,7 +261379,7 @@ var utils_default = {
261350
261379
  isTypedArray,
261351
261380
  isFileList,
261352
261381
  forEach: forEach2,
261353
- merge: merge4,
261382
+ merge: merge5,
261354
261383
  extend: extend3,
261355
261384
  trim: trim2,
261356
261385
  stripBOM,
@@ -263560,9 +263589,9 @@ function mergeConfig(config1, config2) {
263560
263589
  headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
263561
263590
  };
263562
263591
  utils_default.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
263563
- const merge5 = mergeMap[prop] || mergeDeepProperties;
263564
- const configValue = merge5(config1[prop], config2[prop], prop);
263565
- utils_default.isUndefined(configValue) && merge5 !== mergeDirectKeys || (config3[prop] = configValue);
263592
+ const merge6 = mergeMap[prop] || mergeDeepProperties;
263593
+ const configValue = merge6(config1[prop], config2[prop], prop);
263594
+ utils_default.isUndefined(configValue) && merge6 !== mergeDirectKeys || (config3[prop] = configValue);
263566
263595
  });
263567
263596
  return config3;
263568
263597
  }
@@ -264089,6 +264118,7 @@ function bytes(texts) {
264089
264118
  }
264090
264119
 
264091
264120
  // src/commands/translate/providers/yandex/provider.ts
264121
+ var import_liquid6 = __toESM2(require_liquid());
264092
264122
  var REQUESTS_LIMIT = 15;
264093
264123
  var BYTES_LIMIT = 1e4;
264094
264124
  var RETRY_LIMIT = 3;
@@ -264106,7 +264136,7 @@ var Provider = class {
264106
264136
  }
264107
264137
  translate(files2, config2) {
264108
264138
  return __async(this, null, function* () {
264109
- const { input: input2, output: output2, auth: auth2, folder: folder2, source: source2, target: targets, dryRun: dryRun2 } = config2;
264139
+ const { input: input2, output: output2, auth: auth2, folder: folder2, source: source2, target: targets, vars: vars2, dryRun: dryRun2 } = config2;
264110
264140
  try {
264111
264141
  for (const target2 of targets) {
264112
264142
  const translatorParams = {
@@ -264117,6 +264147,7 @@ var Provider = class {
264117
264147
  targetLanguage: target2.language,
264118
264148
  // yandexCloudTranslateGlossaryPairs,
264119
264149
  folderId: folder2,
264150
+ vars: vars2,
264120
264151
  dryRun: dryRun2
264121
264152
  };
264122
264153
  const cache2 = /* @__PURE__ */ new Map();
@@ -264260,7 +264291,7 @@ function requester(params, cache2) {
264260
264291
  return request2;
264261
264292
  }
264262
264293
  function translator(params, split) {
264263
- const { input: input2, output: output2, sourceLanguage, targetLanguage } = params;
264294
+ const { input: input2, output: output2, sourceLanguage, targetLanguage, vars: vars2 } = params;
264264
264295
  const inputRoot = (0, import_node_path9.resolve)(input2);
264265
264296
  const outputRoot = (0, import_node_path9.resolve)(output2);
264266
264297
  return (path2) => __async(this, null, function* () {
@@ -264270,7 +264301,14 @@ function translator(params, split) {
264270
264301
  }
264271
264302
  const inputPath = (0, import_node_path9.join)(inputRoot, path2);
264272
264303
  const outputPath = (0, import_node_path9.join)(outputRoot, path2.replace(sourceLanguage, targetLanguage));
264273
- const content = yield loadFile(inputPath);
264304
+ let content = yield loadFile(inputPath);
264305
+ if (Object.keys(vars2).length && typeof content === "string") {
264306
+ content = (0, import_liquid6.default)(content, vars2, inputPath, {
264307
+ conditions: "strict",
264308
+ substitutions: false,
264309
+ cycles: false
264310
+ });
264311
+ }
264274
264312
  yield (0, import_promises9.mkdir)((0, import_node_path9.dirname)(outputPath), { recursive: true });
264275
264313
  if (!content) {
264276
264314
  yield dumpFile(outputPath, content);
@@ -264506,6 +264544,7 @@ var Translate = class _Translate extends BaseProgram("Translate", {
264506
264544
  options3.files,
264507
264545
  options3.include,
264508
264546
  options3.exclude,
264547
+ options3.vars,
264509
264548
  options3.dryRun,
264510
264549
  options3.config(YFM_CONFIG_FILENAME)
264511
264550
  ];
@@ -264532,7 +264571,7 @@ var Translate = class _Translate extends BaseProgram("Translate", {
264532
264571
  module2.apply(this);
264533
264572
  }
264534
264573
  this.hooks.Config.tap("Translate", (config2, args2) => {
264535
- const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash12.pick)(args2, [
264574
+ const { input: input2, output: output2, quiet: quiet2, strict: strict2 } = (0, import_lodash13.pick)(args2, [
264536
264575
  "input",
264537
264576
  "output",
264538
264577
  "quiet",
@@ -264550,6 +264589,7 @@ var Translate = class _Translate extends BaseProgram("Translate", {
264550
264589
  source2.language,
264551
264590
  [".md", ".yaml"]
264552
264591
  );
264592
+ const vars2 = resolveVars(config2, args2);
264553
264593
  return Object.assign(config2, {
264554
264594
  input: input2,
264555
264595
  output: output2 || input2,
@@ -264560,6 +264600,7 @@ var Translate = class _Translate extends BaseProgram("Translate", {
264560
264600
  files: files2,
264561
264601
  include: include2,
264562
264602
  exclude: exclude2,
264603
+ vars: vars2,
264563
264604
  provider: defined("provider", args2, config2),
264564
264605
  dryRun: defined("dryRun", args2, config2) || false
264565
264606
  });
@@ -264596,7 +264637,7 @@ var Program = class extends BaseProgram("Program", {
264596
264637
  constructor() {
264597
264638
  super(...arguments);
264598
264639
  this.command = new Command2(NAME).helpOption(true).allowUnknownOption(false).version(
264599
- true ? "4.28.2" : "",
264640
+ true ? "4.29.0" : "",
264600
264641
  "--version",
264601
264642
  "Output the version number"
264602
264643
  ).usage(USAGE);