lingo.dev 0.82.0 → 0.83.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/cli.cjs CHANGED
@@ -26,9 +26,9 @@ function getSettings(explicitApiKey) {
26
26
  _envVarsInfo();
27
27
  return {
28
28
  auth: {
29
- apiKey: explicitApiKey || env.LINGODOTDEV_API_KEY || _optionalChain([systemFile, 'access', _25 => _25.auth, 'optionalAccess', _26 => _26.apiKey]) || defaults.auth.apiKey,
30
- apiUrl: env.LINGODOTDEV_API_URL || _optionalChain([systemFile, 'access', _27 => _27.auth, 'optionalAccess', _28 => _28.apiUrl]) || defaults.auth.apiUrl,
31
- webUrl: env.LINGODOTDEV_WEB_URL || _optionalChain([systemFile, 'access', _29 => _29.auth, 'optionalAccess', _30 => _30.webUrl]) || defaults.auth.webUrl
29
+ apiKey: explicitApiKey || env.LINGODOTDEV_API_KEY || _optionalChain([systemFile, 'access', _26 => _26.auth, 'optionalAccess', _27 => _27.apiKey]) || defaults.auth.apiKey,
30
+ apiUrl: env.LINGODOTDEV_API_URL || _optionalChain([systemFile, 'access', _28 => _28.auth, 'optionalAccess', _29 => _29.apiUrl]) || defaults.auth.apiUrl,
31
+ webUrl: env.LINGODOTDEV_WEB_URL || _optionalChain([systemFile, 'access', _30 => _30.auth, 'optionalAccess', _31 => _31.webUrl]) || defaults.auth.webUrl
32
32
  }
33
33
  };
34
34
  }
@@ -99,7 +99,7 @@ Please use LINGODOTDEV_API_KEY instead.
99
99
  function _envVarsInfo() {
100
100
  const env = _loadEnv();
101
101
  const systemFile = _loadSystemFile();
102
- if (env.LINGODOTDEV_API_KEY && _optionalChain([systemFile, 'access', _31 => _31.auth, 'optionalAccess', _32 => _32.apiKey])) {
102
+ if (env.LINGODOTDEV_API_KEY && _optionalChain([systemFile, 'access', _32 => _32.auth, 'optionalAccess', _33 => _33.apiKey])) {
103
103
  console.info(
104
104
  "\x1B[36m%s\x1B[0m",
105
105
  `\u2139\uFE0F Using LINGODOTDEV_API_KEY env var instead of credentials from login flow (saved in .lingodotdevrc)`
@@ -154,7 +154,7 @@ function createAuthenticator(params) {
154
154
  });
155
155
  if (res.ok) {
156
156
  const payload = await res.json();
157
- if (!_optionalChain([payload, 'optionalAccess', _33 => _33.email])) {
157
+ if (!_optionalChain([payload, 'optionalAccess', _34 => _34.email])) {
158
158
  return null;
159
159
  }
160
160
  return {
@@ -774,7 +774,7 @@ var init_default = new (0, _interactivecommander.InteractiveCommand)().command("
774
774
  });
775
775
  const auth2 = await newAuthenticator.whoami();
776
776
  if (auth2) {
777
- _ora2.default.call(void 0, ).succeed(`Authenticated as ${_optionalChain([auth2, 'optionalAccess', _34 => _34.email])}`);
777
+ _ora2.default.call(void 0, ).succeed(`Authenticated as ${_optionalChain([auth2, 'optionalAccess', _35 => _35.email])}`);
778
778
  } else {
779
779
  _ora2.default.call(void 0, ).fail("Authentication failed.");
780
780
  }
@@ -854,7 +854,7 @@ var locale_default = new (0, _interactivecommander.Command)().command("locale").
854
854
  function getBuckets(i18nConfig) {
855
855
  const result = Object.entries(i18nConfig.buckets).map(([bucketType, bucketEntry]) => {
856
856
  const includeItems = bucketEntry.include.map((item) => resolveBucketItem(item));
857
- const excludeItems = _optionalChain([bucketEntry, 'access', _35 => _35.exclude, 'optionalAccess', _36 => _36.map, 'call', _37 => _37((item) => resolveBucketItem(item))]);
857
+ const excludeItems = _optionalChain([bucketEntry, 'access', _36 => _36.exclude, 'optionalAccess', _37 => _37.map, 'call', _38 => _38((item) => resolveBucketItem(item))]);
858
858
  const config = {
859
859
  type: bucketType,
860
860
  paths: extractPathPatterns(i18nConfig.locale.source, includeItems, excludeItems)
@@ -878,7 +878,7 @@ function extractPathPatterns(sourceLocale, include, exclude) {
878
878
  })
879
879
  )
880
880
  );
881
- const excludedPatterns = _optionalChain([exclude, 'optionalAccess', _38 => _38.flatMap, 'call', _39 => _39(
881
+ const excludedPatterns = _optionalChain([exclude, 'optionalAccess', _39 => _39.flatMap, 'call', _40 => _40(
882
882
  (pattern) => expandPlaceholderedGlob(pattern.path, __spec.resolveOverriddenLocale.call(void 0, sourceLocale, pattern.delimiter)).map(
883
883
  (pathPattern) => ({
884
884
  pathPattern,
@@ -1003,12 +1003,12 @@ function composeLoaders(...loaders) {
1003
1003
  return {
1004
1004
  init: async () => {
1005
1005
  for (const loader of loaders) {
1006
- await _optionalChain([loader, 'access', _40 => _40.init, 'optionalCall', _41 => _41()]);
1006
+ await _optionalChain([loader, 'access', _41 => _41.init, 'optionalCall', _42 => _42()]);
1007
1007
  }
1008
1008
  },
1009
1009
  setDefaultLocale(locale) {
1010
1010
  for (const loader of loaders) {
1011
- _optionalChain([loader, 'access', _42 => _42.setDefaultLocale, 'optionalCall', _43 => _43(locale)]);
1011
+ _optionalChain([loader, 'access', _43 => _43.setDefaultLocale, 'optionalCall', _44 => _44(locale)]);
1012
1012
  }
1013
1013
  return this;
1014
1014
  },
@@ -1039,7 +1039,7 @@ function createLoader(lDefinition) {
1039
1039
  if (state.initCtx) {
1040
1040
  return state.initCtx;
1041
1041
  }
1042
- state.initCtx = await _optionalChain([lDefinition, 'access', _44 => _44.init, 'optionalCall', _45 => _45()]);
1042
+ state.initCtx = await _optionalChain([lDefinition, 'access', _45 => _45.init, 'optionalCall', _46 => _46()]);
1043
1043
  return state.initCtx;
1044
1044
  },
1045
1045
  setDefaultLocale(locale) {
@@ -1128,7 +1128,7 @@ function createNormalizeLoader() {
1128
1128
  return normalized;
1129
1129
  },
1130
1130
  push: async (locale, data, originalInput) => {
1131
- const keysMap = _nullishCoalesce(_optionalChain([originalInput, 'optionalAccess', _46 => _46.keysMap]), () => ( {}));
1131
+ const keysMap = _nullishCoalesce(_optionalChain([originalInput, 'optionalAccess', _47 => _47.keysMap]), () => ( {}));
1132
1132
  const input2 = mapDenormalizedKeys(data, keysMap);
1133
1133
  const denormalized = _flat.unflatten.call(void 0, input2, {
1134
1134
  delimiter: "/",
@@ -1202,7 +1202,7 @@ function createTextFileLoader(pathPattern) {
1202
1202
  const trimmedResult = result.trim();
1203
1203
  return trimmedResult;
1204
1204
  },
1205
- async push(locale, data, _24, originalLocale) {
1205
+ async push(locale, data, _25, originalLocale) {
1206
1206
  const draftPath = pathPattern.replaceAll("[locale]", locale);
1207
1207
  const finalPath = path15.default.resolve(draftPath);
1208
1208
  const dirPath = path15.default.dirname(finalPath);
@@ -1231,8 +1231,8 @@ async function getTrailingNewLine(pathPattern, locale, originalLocale) {
1231
1231
  if (!templateData) {
1232
1232
  templateData = await readFileForLocale(pathPattern, originalLocale);
1233
1233
  }
1234
- if (_optionalChain([templateData, 'optionalAccess', _47 => _47.match, 'call', _48 => _48(/[\r\n]$/)])) {
1235
- const ending = _optionalChain([templateData, 'optionalAccess', _49 => _49.includes, 'call', _50 => _50("\r\n")]) ? "\r\n" : _optionalChain([templateData, 'optionalAccess', _51 => _51.includes, 'call', _52 => _52("\r")]) ? "\r" : "\n";
1234
+ if (_optionalChain([templateData, 'optionalAccess', _48 => _48.match, 'call', _49 => _49(/[\r\n]$/)])) {
1235
+ const ending = _optionalChain([templateData, 'optionalAccess', _50 => _50.includes, 'call', _51 => _51("\r\n")]) ? "\r\n" : _optionalChain([templateData, 'optionalAccess', _52 => _52.includes, 'call', _53 => _53("\r")]) ? "\r" : "\n";
1236
1236
  return ending;
1237
1237
  }
1238
1238
  return "";
@@ -1487,7 +1487,7 @@ function createHtmlLoader() {
1487
1487
  break;
1488
1488
  }
1489
1489
  const siblings = Array.from(parent.childNodes).filter(
1490
- (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _53 => _53.textContent, 'optionalAccess', _54 => _54.trim, 'call', _55 => _55()])
1490
+ (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _54 => _54.textContent, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])
1491
1491
  );
1492
1492
  const index = siblings.indexOf(current);
1493
1493
  if (index !== -1) {
@@ -1522,11 +1522,11 @@ function createHtmlLoader() {
1522
1522
  result[getPath(element, attr)] = value;
1523
1523
  }
1524
1524
  });
1525
- Array.from(element.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _56 => _56.textContent, 'optionalAccess', _57 => _57.trim, 'call', _58 => _58()])).forEach(processNode);
1525
+ Array.from(element.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _57 => _57.textContent, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()])).forEach(processNode);
1526
1526
  }
1527
1527
  };
1528
- Array.from(document.head.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _59 => _59.textContent, 'optionalAccess', _60 => _60.trim, 'call', _61 => _61()])).forEach(processNode);
1529
- Array.from(document.body.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _62 => _62.textContent, 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()])).forEach(processNode);
1528
+ Array.from(document.head.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _60 => _60.textContent, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])).forEach(processNode);
1529
+ Array.from(document.body.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _63 => _63.textContent, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()])).forEach(processNode);
1530
1530
  return result;
1531
1531
  },
1532
1532
  async push(locale, data, originalInput) {
@@ -1548,7 +1548,7 @@ function createHtmlLoader() {
1548
1548
  for (let i = 0; i < indices.length; i++) {
1549
1549
  const index = parseInt(indices[i]);
1550
1550
  const siblings = Array.from(parent.childNodes).filter(
1551
- (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _65 => _65.textContent, 'optionalAccess', _66 => _66.trim, 'call', _67 => _67()])
1551
+ (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _66 => _66.textContent, 'optionalAccess', _67 => _67.trim, 'call', _68 => _68()])
1552
1552
  );
1553
1553
  if (index >= siblings.length) {
1554
1554
  if (i === indices.length - 1) {
@@ -1599,7 +1599,7 @@ function createMarkdownLoader() {
1599
1599
  yaml: yamlEngine
1600
1600
  }
1601
1601
  });
1602
- const sections = content.split(SECTION_REGEX).map((section) => _nullishCoalesce(_optionalChain([section, 'optionalAccess', _68 => _68.trim, 'call', _69 => _69()]), () => ( ""))).filter(Boolean);
1602
+ const sections = content.split(SECTION_REGEX).map((section) => _nullishCoalesce(_optionalChain([section, 'optionalAccess', _69 => _69.trim, 'call', _70 => _70()]), () => ( ""))).filter(Boolean);
1603
1603
  return {
1604
1604
  ...Object.fromEntries(
1605
1605
  sections.map((section, index) => [`${MD_SECTION_PREFIX}${index}`, section]).filter(([, section]) => Boolean(section))
@@ -1611,7 +1611,7 @@ function createMarkdownLoader() {
1611
1611
  const frontmatter = Object.fromEntries(
1612
1612
  Object.entries(data).filter(([key]) => key.startsWith(FM_ATTR_PREFIX)).map(([key, value]) => [key.replace(FM_ATTR_PREFIX, ""), value])
1613
1613
  );
1614
- let content = Object.entries(data).filter(([key]) => key.startsWith(MD_SECTION_PREFIX)).sort(([a], [b]) => Number(a.split("-").pop()) - Number(b.split("-").pop())).map(([, value]) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _70 => _70.trim, 'call', _71 => _71()]), () => ( ""))).filter(Boolean).join("\n\n");
1614
+ let content = Object.entries(data).filter(([key]) => key.startsWith(MD_SECTION_PREFIX)).sort(([a], [b]) => Number(a.split("-").pop()) - Number(b.split("-").pop())).map(([, value]) => _nullishCoalesce(_optionalChain([value, 'optionalAccess', _71 => _71.trim, 'call', _72 => _72()]), () => ( ""))).filter(Boolean).join("\n\n");
1615
1615
  if (Object.keys(frontmatter).length > 0) {
1616
1616
  content = `
1617
1617
  ${content}`;
@@ -1625,6 +1625,45 @@ ${content}`;
1625
1625
  });
1626
1626
  }
1627
1627
 
1628
+ // src/cli/loaders/mdx.ts
1629
+
1630
+ var _unified = require('unified');
1631
+ var _remarkparse = require('remark-parse'); var _remarkparse2 = _interopRequireDefault(_remarkparse);
1632
+ var _remarkmdx = require('remark-mdx'); var _remarkmdx2 = _interopRequireDefault(_remarkmdx);
1633
+ var _remarkfrontmatter = require('remark-frontmatter'); var _remarkfrontmatter2 = _interopRequireDefault(_remarkfrontmatter);
1634
+ var _remarkgfm = require('remark-gfm'); var _remarkgfm2 = _interopRequireDefault(_remarkgfm);
1635
+ var _remarkstringify = require('remark-stringify'); var _remarkstringify2 = _interopRequireDefault(_remarkstringify);
1636
+ var _remarkmdxfrontmatter = require('remark-mdx-frontmatter'); var _remarkmdxfrontmatter2 = _interopRequireDefault(_remarkmdxfrontmatter);
1637
+ var _vfile = require('vfile');
1638
+ function createMdxFormatLoader() {
1639
+ const parser = _unified.unified.call(void 0, ).use(_remarkparse2.default).use(_remarkmdx2.default).use(_remarkfrontmatter2.default, ["yaml"]).use(_remarkmdxfrontmatter2.default).use(_remarkgfm2.default);
1640
+ const serializer = _unified.unified.call(void 0, ).use(_remarkstringify2.default).use(_remarkmdx2.default).use(_remarkfrontmatter2.default, ["yaml"]).use(_remarkmdxfrontmatter2.default).use(_remarkgfm2.default);
1641
+ return createLoader({
1642
+ async pull(locale, input2) {
1643
+ const file = new (0, _vfile.VFile)(input2);
1644
+ const ast = parser.parse(file);
1645
+ return JSON.parse(JSON.stringify(ast));
1646
+ },
1647
+ async push(locale, data) {
1648
+ const ast = data;
1649
+ const file = serializer.stringify(ast);
1650
+ return String(file);
1651
+ }
1652
+ });
1653
+ }
1654
+ function createMdxStructureLoader() {
1655
+ return createLoader({
1656
+ async pull(locale, input2) {
1657
+ const result = _lodash2.default.chain(input2).pickBy((value, key) => key.endsWith("/value")).value();
1658
+ return result;
1659
+ },
1660
+ async push(locale, data, originalInput) {
1661
+ const result = _lodash2.default.merge({}, originalInput, data);
1662
+ return result;
1663
+ }
1664
+ });
1665
+ }
1666
+
1628
1667
  // src/cli/loaders/properties.ts
1629
1668
  function createPropertiesLoader() {
1630
1669
  return createLoader({
@@ -1644,7 +1683,7 @@ function createPropertiesLoader() {
1644
1683
  return result;
1645
1684
  },
1646
1685
  async push(locale, payload) {
1647
- const result = Object.entries(payload).filter(([_24, value]) => value != null).map(([key, value]) => `${key}=${value}`).join("\n");
1686
+ const result = Object.entries(payload).filter(([_25, value]) => value != null).map(([key, value]) => `${key}=${value}`).join("\n");
1648
1687
  return result;
1649
1688
  }
1650
1689
  });
@@ -1655,7 +1694,7 @@ function isSkippableLine(line) {
1655
1694
  function parsePropertyLine(line) {
1656
1695
  const [key, ...valueParts] = line.split("=");
1657
1696
  return {
1658
- key: _optionalChain([key, 'optionalAccess', _72 => _72.trim, 'call', _73 => _73()]) || "",
1697
+ key: _optionalChain([key, 'optionalAccess', _73 => _73.trim, 'call', _74 => _74()]) || "",
1659
1698
  value: valueParts.join("=").trim()
1660
1699
  };
1661
1700
  }
@@ -1741,7 +1780,7 @@ function createXcodeXcstringsLoader(defaultLocale) {
1741
1780
  if (rootTranslationEntity.shouldTranslate === false) {
1742
1781
  continue;
1743
1782
  }
1744
- const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess', _74 => _74.localizations, 'optionalAccess', _75 => _75[locale]]);
1783
+ const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess', _75 => _75.localizations, 'optionalAccess', _76 => _76[locale]]);
1745
1784
  if (langTranslationEntity) {
1746
1785
  if ("stringUnit" in langTranslationEntity) {
1747
1786
  resultData[translationKey] = langTranslationEntity.stringUnit.value;
@@ -1750,7 +1789,7 @@ function createXcodeXcstringsLoader(defaultLocale) {
1750
1789
  resultData[translationKey] = {};
1751
1790
  const pluralForms = langTranslationEntity.variations.plural;
1752
1791
  for (const form in pluralForms) {
1753
- if (_optionalChain([pluralForms, 'access', _76 => _76[form], 'optionalAccess', _77 => _77.stringUnit, 'optionalAccess', _78 => _78.value])) {
1792
+ if (_optionalChain([pluralForms, 'access', _77 => _77[form], 'optionalAccess', _78 => _78.stringUnit, 'optionalAccess', _79 => _79.value])) {
1754
1793
  resultData[translationKey][form] = pluralForms[form].stringUnit.value;
1755
1794
  }
1756
1795
  }
@@ -1774,7 +1813,7 @@ function createXcodeXcstringsLoader(defaultLocale) {
1774
1813
  const hasDoNotTranslateFlag = originalInput && originalInput.strings && originalInput.strings[key] && originalInput.strings[key].shouldTranslate === false;
1775
1814
  if (typeof value === "string") {
1776
1815
  langDataToMerge.strings[key] = {
1777
- extractionState: _optionalChain([originalInput, 'optionalAccess', _79 => _79.strings, 'optionalAccess', _80 => _80[key], 'optionalAccess', _81 => _81.extractionState]),
1816
+ extractionState: _optionalChain([originalInput, 'optionalAccess', _80 => _80.strings, 'optionalAccess', _81 => _81[key], 'optionalAccess', _82 => _82.extractionState]),
1778
1817
  localizations: {
1779
1818
  [locale]: {
1780
1819
  stringUnit: {
@@ -1893,10 +1932,10 @@ function createUnlocalizableLoader(isCacheRestore = false, returnUnlocalizedKeys
1893
1932
  }
1894
1933
  }
1895
1934
  return false;
1896
- }).map(([key, _24]) => key);
1897
- const result = _lodash2.default.omitBy(input2, (_24, key) => passthroughKeys.includes(key));
1935
+ }).map(([key, _25]) => key);
1936
+ const result = _lodash2.default.omitBy(input2, (_25, key) => passthroughKeys.includes(key));
1898
1937
  if (returnUnlocalizedKeys) {
1899
- result.unlocalizable = _lodash2.default.omitBy(input2, (_24, key) => !passthroughKeys.includes(key));
1938
+ result.unlocalizable = _lodash2.default.omitBy(input2, (_25, key) => !passthroughKeys.includes(key));
1900
1939
  }
1901
1940
  return result;
1902
1941
  },
@@ -1935,7 +1974,7 @@ function createPoDataLoader(params) {
1935
1974
  Object.entries(entries).forEach(([msgid, entry]) => {
1936
1975
  if (msgid && entry.msgid) {
1937
1976
  const context = entry.msgctxt || "";
1938
- const fullEntry = _optionalChain([parsedPo, 'access', _82 => _82.translations, 'access', _83 => _83[context], 'optionalAccess', _84 => _84[msgid]]);
1977
+ const fullEntry = _optionalChain([parsedPo, 'access', _83 => _83.translations, 'access', _84 => _84[context], 'optionalAccess', _85 => _85[msgid]]);
1939
1978
  if (fullEntry) {
1940
1979
  result[msgid] = fullEntry;
1941
1980
  }
@@ -1945,7 +1984,7 @@ function createPoDataLoader(params) {
1945
1984
  return result;
1946
1985
  },
1947
1986
  async push(locale, data, originalInput) {
1948
- const sections = _optionalChain([originalInput, 'optionalAccess', _85 => _85.split, 'call', _86 => _86("\n\n"), 'access', _87 => _87.filter, 'call', _88 => _88(Boolean)]) || [];
1987
+ const sections = _optionalChain([originalInput, 'optionalAccess', _86 => _86.split, 'call', _87 => _87("\n\n"), 'access', _88 => _88.filter, 'call', _89 => _89(Boolean)]) || [];
1949
1988
  const result = sections.map((section) => {
1950
1989
  const sectionPo = _gettextparser2.default.po.parse(section);
1951
1990
  const contextKey = _lodash2.default.keys(sectionPo.translations)[0];
@@ -1987,7 +2026,7 @@ function createPoContentLoader() {
1987
2026
  entry.msgid,
1988
2027
  {
1989
2028
  ...entry,
1990
- msgstr: [_optionalChain([data, 'access', _89 => _89[entry.msgid], 'optionalAccess', _90 => _90.singular]), _optionalChain([data, 'access', _91 => _91[entry.msgid], 'optionalAccess', _92 => _92.plural]) || null].filter(Boolean)
2029
+ msgstr: [_optionalChain([data, 'access', _90 => _90[entry.msgid], 'optionalAccess', _91 => _91.singular]), _optionalChain([data, 'access', _92 => _92[entry.msgid], 'optionalAccess', _93 => _93.plural]) || null].filter(Boolean)
1991
2030
  }
1992
2031
  ]).fromPairs().value();
1993
2032
  return result;
@@ -2233,7 +2272,7 @@ function createDatoClient(params) {
2233
2272
  only_valid: "true",
2234
2273
  ids: !records.length ? void 0 : records.join(",")
2235
2274
  }
2236
- }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _93 => _93.response, 'optionalAccess', _94 => _94.body, 'optionalAccess', _95 => _95.data, 'optionalAccess', _96 => _96[0]]) || error));
2275
+ }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _94 => _94.response, 'optionalAccess', _95 => _95.body, 'optionalAccess', _96 => _96.data, 'optionalAccess', _97 => _97[0]]) || error));
2237
2276
  },
2238
2277
  findRecordsForModel: async (modelId, records) => {
2239
2278
  try {
@@ -2243,9 +2282,9 @@ function createDatoClient(params) {
2243
2282
  filter: {
2244
2283
  type: modelId,
2245
2284
  only_valid: "true",
2246
- ids: !_optionalChain([records, 'optionalAccess', _97 => _97.length]) ? void 0 : records.join(",")
2285
+ ids: !_optionalChain([records, 'optionalAccess', _98 => _98.length]) ? void 0 : records.join(",")
2247
2286
  }
2248
- }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _98 => _98.response, 'optionalAccess', _99 => _99.body, 'optionalAccess', _100 => _100.data, 'optionalAccess', _101 => _101[0]]) || error));
2287
+ }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _99 => _99.response, 'optionalAccess', _100 => _100.body, 'optionalAccess', _101 => _101.data, 'optionalAccess', _102 => _102[0]]) || error));
2249
2288
  return result;
2250
2289
  } catch (_error) {
2251
2290
  throw new Error(
@@ -2259,9 +2298,9 @@ function createDatoClient(params) {
2259
2298
  },
2260
2299
  updateRecord: async (id, payload) => {
2261
2300
  try {
2262
- await dato.items.update(id, payload).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _102 => _102.response, 'optionalAccess', _103 => _103.body, 'optionalAccess', _104 => _104.data, 'optionalAccess', _105 => _105[0]]) || error));
2301
+ await dato.items.update(id, payload).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _103 => _103.response, 'optionalAccess', _104 => _104.body, 'optionalAccess', _105 => _105.data, 'optionalAccess', _106 => _106[0]]) || error));
2263
2302
  } catch (_error) {
2264
- if (_optionalChain([_error, 'optionalAccess', _106 => _106.attributes, 'optionalAccess', _107 => _107.details, 'optionalAccess', _108 => _108.message])) {
2303
+ if (_optionalChain([_error, 'optionalAccess', _107 => _107.attributes, 'optionalAccess', _108 => _108.details, 'optionalAccess', _109 => _109.message])) {
2265
2304
  throw new Error(
2266
2305
  [
2267
2306
  `${_error.attributes.details.message}`,
@@ -2282,9 +2321,9 @@ function createDatoClient(params) {
2282
2321
  },
2283
2322
  enableFieldLocalization: async (args) => {
2284
2323
  try {
2285
- await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _109 => _109.response, 'optionalAccess', _110 => _110.body, 'optionalAccess', _111 => _111.data, 'optionalAccess', _112 => _112[0]]) || error));
2324
+ await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _110 => _110.response, 'optionalAccess', _111 => _111.body, 'optionalAccess', _112 => _112.data, 'optionalAccess', _113 => _113[0]]) || error));
2286
2325
  } catch (_error) {
2287
- if (_optionalChain([_error, 'optionalAccess', _113 => _113.attributes, 'optionalAccess', _114 => _114.code]) === "NOT_FOUND") {
2326
+ if (_optionalChain([_error, 'optionalAccess', _114 => _114.attributes, 'optionalAccess', _115 => _115.code]) === "NOT_FOUND") {
2288
2327
  throw new Error(
2289
2328
  [
2290
2329
  `Field "${args.fieldId}" not found in model "${args.modelId}".`,
@@ -2292,7 +2331,7 @@ function createDatoClient(params) {
2292
2331
  ].join("\n\n")
2293
2332
  );
2294
2333
  }
2295
- if (_optionalChain([_error, 'optionalAccess', _115 => _115.attributes, 'optionalAccess', _116 => _116.details, 'optionalAccess', _117 => _117.message])) {
2334
+ if (_optionalChain([_error, 'optionalAccess', _116 => _116.attributes, 'optionalAccess', _117 => _117.details, 'optionalAccess', _118 => _118.message])) {
2296
2335
  throw new Error(
2297
2336
  [`${_error.attributes.details.message}`, `Error: ${JSON.stringify(_error, null, 2)}`].join("\n\n")
2298
2337
  );
@@ -2358,7 +2397,7 @@ function createDatoApiLoader(config, onConfigUpdate) {
2358
2397
  }
2359
2398
  }
2360
2399
  const records = await dato.findRecordsForModel(modelId);
2361
- const recordChoices = createRecordChoices(records, _optionalChain([config, 'access', _118 => _118.models, 'access', _119 => _119[modelId], 'optionalAccess', _120 => _120.records]) || [], project);
2400
+ const recordChoices = createRecordChoices(records, _optionalChain([config, 'access', _119 => _119.models, 'access', _120 => _120[modelId], 'optionalAccess', _121 => _121.records]) || [], project);
2362
2401
  const selectedRecords = await promptRecordSelection(modelName, recordChoices);
2363
2402
  result.models[modelId].records = records.filter((record) => selectedRecords.includes(record.id));
2364
2403
  updatedConfig.models[modelId].records = selectedRecords;
@@ -2370,14 +2409,14 @@ function createDatoApiLoader(config, onConfigUpdate) {
2370
2409
  },
2371
2410
  async pull(locale, input2, initCtx) {
2372
2411
  const result = {};
2373
- for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _121 => _121.models]) || {})) {
2374
- let records = _optionalChain([initCtx, 'optionalAccess', _122 => _122.models, 'access', _123 => _123[modelId], 'access', _124 => _124.records]) || [];
2412
+ for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _122 => _122.models]) || {})) {
2413
+ let records = _optionalChain([initCtx, 'optionalAccess', _123 => _123.models, 'access', _124 => _124[modelId], 'access', _125 => _125.records]) || [];
2375
2414
  const recordIds = records.map((record) => record.id);
2376
2415
  records = await dato.findRecords(recordIds);
2377
2416
  console.log(`Fetched ${records.length} records for model ${modelId}`);
2378
2417
  if (records.length > 0) {
2379
2418
  result[modelId] = {
2380
- fields: _optionalChain([initCtx, 'optionalAccess', _125 => _125.models, 'optionalAccess', _126 => _126[modelId], 'optionalAccess', _127 => _127.fields]) || [],
2419
+ fields: _optionalChain([initCtx, 'optionalAccess', _126 => _126.models, 'optionalAccess', _127 => _127[modelId], 'optionalAccess', _128 => _128.fields]) || [],
2381
2420
  records
2382
2421
  };
2383
2422
  }
@@ -2436,7 +2475,7 @@ function createRecordChoices(records, selectedIds = [], project) {
2436
2475
  return records.map((record) => ({
2437
2476
  name: `${record.id} - https://${project.internal_domain}/editor/item_types/${record.item_type.id}/items/${record.id}`,
2438
2477
  value: record.id,
2439
- checked: _optionalChain([selectedIds, 'optionalAccess', _128 => _128.includes, 'call', _129 => _129(record.id)])
2478
+ checked: _optionalChain([selectedIds, 'optionalAccess', _129 => _129.includes, 'call', _130 => _130(record.id)])
2440
2479
  }));
2441
2480
  }
2442
2481
  async function promptRecordSelection(modelName, choices) {
@@ -2703,7 +2742,7 @@ var _nodewebvtt = require('node-webvtt'); var _nodewebvtt2 = _interopRequireDefa
2703
2742
  function createVttLoader() {
2704
2743
  return createLoader({
2705
2744
  async pull(locale, input2) {
2706
- const vtt = _optionalChain([_nodewebvtt2.default, 'access', _130 => _130.parse, 'call', _131 => _131(input2), 'optionalAccess', _132 => _132.cues]);
2745
+ const vtt = _optionalChain([_nodewebvtt2.default, 'access', _131 => _131.parse, 'call', _132 => _132(input2), 'optionalAccess', _133 => _133.cues]);
2707
2746
  if (Object.keys(vtt).length === 0) {
2708
2747
  return {};
2709
2748
  } else {
@@ -2756,7 +2795,7 @@ function variableExtractLoader(params) {
2756
2795
  for (let i = 0; i < matches.length; i++) {
2757
2796
  const match = matches[i];
2758
2797
  const currentValue = result[key].value;
2759
- const newValue = _optionalChain([currentValue, 'optionalAccess', _133 => _133.replace, 'call', _134 => _134(match, `{variable:${i}}`)]);
2798
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _134 => _134.replace, 'call', _135 => _135(match, `{variable:${i}}`)]);
2760
2799
  result[key].value = newValue;
2761
2800
  result[key].variables[i] = match;
2762
2801
  }
@@ -2770,7 +2809,7 @@ function variableExtractLoader(params) {
2770
2809
  for (let i = 0; i < valueObj.variables.length; i++) {
2771
2810
  const variable = valueObj.variables[i];
2772
2811
  const currentValue = result[key];
2773
- const newValue = _optionalChain([currentValue, 'optionalAccess', _135 => _135.replace, 'call', _136 => _136(`{variable:${i}}`, variable)]);
2812
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _136 => _136.replace, 'call', _137 => _137(`{variable:${i}}`, variable)]);
2774
2813
  result[key] = newValue;
2775
2814
  }
2776
2815
  }
@@ -2951,7 +2990,7 @@ function createVueJsonLoader() {
2951
2990
  return createLoader({
2952
2991
  pull: async (locale, input2, ctx) => {
2953
2992
  const parsed = parseVueFile(input2);
2954
- return _nullishCoalesce(_optionalChain([parsed, 'optionalAccess', _137 => _137.i18n, 'optionalAccess', _138 => _138[locale]]), () => ( {}));
2993
+ return _nullishCoalesce(_optionalChain([parsed, 'optionalAccess', _138 => _138.i18n, 'optionalAccess', _139 => _139[locale]]), () => ( {}));
2955
2994
  },
2956
2995
  push: async (locale, data, originalInput) => {
2957
2996
  const parsed = parseVueFile(_nullishCoalesce(originalInput, () => ( "")));
@@ -3013,9 +3052,9 @@ function createInjectLocaleLoader(injectLocaleKeys) {
3013
3052
 
3014
3053
  function createLockedKeysLoader(lockedKeys, isCacheRestore = false) {
3015
3054
  return createLoader({
3016
- pull: async (locale, data) => _lodash2.default.chain(data).pickBy((value, key) => !lockedKeys.includes(key)).value(),
3055
+ pull: async (locale, data) => _lodash2.default.chain(data).pickBy((value, key) => !lockedKeys.some((lockedKey) => key.startsWith(lockedKey))).value(),
3017
3056
  push: async (locale, data, originalInput) => {
3018
- const lockedSubObject = _lodash2.default.chain(originalInput).pickBy((value, key) => lockedKeys.includes(key)).value();
3057
+ const lockedSubObject = _lodash2.default.chain(originalInput).pickBy((value, key) => lockedKeys.some((lockedKey) => key.startsWith(lockedKey))).value();
3019
3058
  if (isCacheRestore) {
3020
3059
  return _lodash2.default.merge({}, data, lockedSubObject);
3021
3060
  } else {
@@ -3073,6 +3112,16 @@ function createBucketLoader(bucketType, bucketPathPattern, options, lockedKeys)
3073
3112
  createSyncLoader(),
3074
3113
  createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3075
3114
  );
3115
+ case "mdx":
3116
+ return composeLoaders(
3117
+ createTextFileLoader(bucketPathPattern),
3118
+ createPrettierLoader({ parser: "mdx", bucketPathPattern }),
3119
+ createMdxFormatLoader(),
3120
+ createFlatLoader(),
3121
+ createMdxStructureLoader(),
3122
+ createSyncLoader(),
3123
+ createUnlocalizableLoader(options.isCacheRestore, options.returnUnlocalizedKeys)
3124
+ );
3076
3125
  case "po":
3077
3126
  return composeLoaders(
3078
3127
  createTextFileLoader(bucketPathPattern),
@@ -3352,7 +3401,7 @@ function createBasicTranslator(model, systemPrompt) {
3352
3401
  ]
3353
3402
  });
3354
3403
  const result = JSON.parse(response.text);
3355
- return _optionalChain([result, 'optionalAccess', _139 => _139.data]) || {};
3404
+ return _optionalChain([result, 'optionalAccess', _140 => _140.data]) || {};
3356
3405
  };
3357
3406
  }
3358
3407
 
@@ -3370,7 +3419,7 @@ function createProcessor(provider, params) {
3370
3419
  }
3371
3420
  }
3372
3421
  function getPureModelProvider(provider) {
3373
- switch (_optionalChain([provider, 'optionalAccess', _140 => _140.id])) {
3422
+ switch (_optionalChain([provider, 'optionalAccess', _141 => _141.id])) {
3374
3423
  case "openai":
3375
3424
  if (!process.env.OPENAI_API_KEY) {
3376
3425
  throw new Error("OPENAI_API_KEY is not set.");
@@ -3387,7 +3436,7 @@ function getPureModelProvider(provider) {
3387
3436
  apiKey: process.env.ANTHROPIC_API_KEY
3388
3437
  })(provider.model);
3389
3438
  default:
3390
- throw new Error(`Unsupported provider: ${_optionalChain([provider, 'optionalAccess', _141 => _141.id])}`);
3439
+ throw new Error(`Unsupported provider: ${_optionalChain([provider, 'optionalAccess', _142 => _142.id])}`);
3391
3440
  }
3392
3441
  }
3393
3442
 
@@ -3589,13 +3638,13 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
3589
3638
  flags
3590
3639
  });
3591
3640
  let buckets = getBuckets(i18nConfig);
3592
- if (_optionalChain([flags, 'access', _142 => _142.bucket, 'optionalAccess', _143 => _143.length])) {
3641
+ if (_optionalChain([flags, 'access', _143 => _143.bucket, 'optionalAccess', _144 => _144.length])) {
3593
3642
  buckets = buckets.filter((bucket) => flags.bucket.includes(bucket.type));
3594
3643
  }
3595
3644
  ora.succeed("Buckets retrieved");
3596
- if (_optionalChain([flags, 'access', _144 => _144.file, 'optionalAccess', _145 => _145.length])) {
3645
+ if (_optionalChain([flags, 'access', _145 => _145.file, 'optionalAccess', _146 => _146.length])) {
3597
3646
  buckets = buckets.map((bucket) => {
3598
- const paths = bucket.paths.filter((path18) => flags.file.find((file) => _optionalChain([path18, 'access', _146 => _146.pathPattern, 'optionalAccess', _147 => _147.match, 'call', _148 => _148(file)])));
3647
+ const paths = bucket.paths.filter((path18) => flags.file.find((file) => _optionalChain([path18, 'access', _147 => _147.pathPattern, 'optionalAccess', _148 => _148.match, 'call', _149 => _149(file)])));
3599
3648
  return { ...bucket, paths };
3600
3649
  }).filter((bucket) => bucket.paths.length > 0);
3601
3650
  if (buckets.length === 0) {
@@ -3611,7 +3660,7 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
3611
3660
  });
3612
3661
  }
3613
3662
  }
3614
- const targetLocales = _optionalChain([flags, 'access', _149 => _149.locale, 'optionalAccess', _150 => _150.length]) ? flags.locale : i18nConfig.locale.targets;
3663
+ const targetLocales = _optionalChain([flags, 'access', _150 => _150.locale, 'optionalAccess', _151 => _151.length]) ? flags.locale : i18nConfig.locale.targets;
3615
3664
  ora.start("Setting up localization cache...");
3616
3665
  const checkLockfileProcessor = createDeltaProcessor("");
3617
3666
  const lockfileExists = await checkLockfileProcessor.checkIfLockExists();
@@ -3848,7 +3897,7 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
3848
3897
  });
3849
3898
  let processableData = _lodash2.default.chain(sourceData).entries().filter(([key, value]) => delta.added.includes(key) || delta.updated.includes(key) || !!flags.force).fromPairs().value();
3850
3899
  if (flags.key) {
3851
- processableData = _lodash2.default.pickBy(processableData, (_24, key) => key === flags.key);
3900
+ processableData = _lodash2.default.pickBy(processableData, (_25, key) => key === flags.key);
3852
3901
  }
3853
3902
  if (flags.verbose) {
3854
3903
  bucketOra.info(JSON.stringify(processableData, null, 2));
@@ -3999,12 +4048,12 @@ function validateParams(i18nConfig, flags) {
3999
4048
  message: "No buckets found in i18n.json. Please add at least one bucket containing i18n content.",
4000
4049
  docUrl: "bucketNotFound"
4001
4050
  });
4002
- } else if (_optionalChain([flags, 'access', _151 => _151.locale, 'optionalAccess', _152 => _152.some, 'call', _153 => _153((locale) => !i18nConfig.locale.targets.includes(locale))])) {
4051
+ } else if (_optionalChain([flags, 'access', _152 => _152.locale, 'optionalAccess', _153 => _153.some, 'call', _154 => _154((locale) => !i18nConfig.locale.targets.includes(locale))])) {
4003
4052
  throw new CLIError({
4004
4053
  message: `One or more specified locales do not exist in i18n.json locale.targets. Please add them to the list and try again.`,
4005
4054
  docUrl: "localeTargetNotFound"
4006
4055
  });
4007
- } else if (_optionalChain([flags, 'access', _154 => _154.bucket, 'optionalAccess', _155 => _155.some, 'call', _156 => _156((bucket) => !i18nConfig.buckets[bucket])])) {
4056
+ } else if (_optionalChain([flags, 'access', _155 => _155.bucket, 'optionalAccess', _156 => _156.some, 'call', _157 => _157((bucket) => !i18nConfig.buckets[bucket])])) {
4008
4057
  throw new CLIError({
4009
4058
  message: `One or more specified buckets do not exist in i18n.json. Please add them to the list and try again.`,
4010
4059
  docUrl: "bucketNotFound"
@@ -4314,7 +4363,7 @@ var _stdiojs = require('@modelcontextprotocol/sdk/server/stdio.js');
4314
4363
  var _mcpjs = require('@modelcontextprotocol/sdk/server/mcp.js');
4315
4364
 
4316
4365
 
4317
- var mcp_default = new (0, _interactivecommander.Command)().command("mcp").description("Use Lingo.dev model context provider with your AI agent").helpOption("-h, --help", "Show help").action(async (_24, program) => {
4366
+ var mcp_default = new (0, _interactivecommander.Command)().command("mcp").description("Use Lingo.dev model context provider with your AI agent").helpOption("-h, --help", "Show help").action(async (_25, program) => {
4318
4367
  const apiKey = program.args[0];
4319
4368
  const settings = getSettings(apiKey);
4320
4369
  if (!settings.auth.apiKey) {
@@ -4437,7 +4486,7 @@ var InBranchFlow = class extends IntegrationFlow {
4437
4486
  _child_process.execSync.call(void 0, `git config --global safe.directory ${process.cwd()}`);
4438
4487
  _child_process.execSync.call(void 0, `git config user.name "${gitConfig.userName}"`);
4439
4488
  _child_process.execSync.call(void 0, `git config user.email "${gitConfig.userEmail}"`);
4440
- _optionalChain([this, 'access', _157 => _157.platformKit, 'optionalAccess', _158 => _158.gitConfig, 'call', _159 => _159()]);
4489
+ _optionalChain([this, 'access', _158 => _158.platformKit, 'optionalAccess', _159 => _159.gitConfig, 'call', _160 => _160()]);
4441
4490
  _child_process.execSync.call(void 0, `git fetch origin ${baseBranchName}`, { stdio: "inherit" });
4442
4491
  _child_process.execSync.call(void 0, `git checkout ${baseBranchName} --`, { stdio: "inherit" });
4443
4492
  if (!processOwnCommits) {
@@ -4462,7 +4511,7 @@ var InBranchFlow = class extends IntegrationFlow {
4462
4511
  // ../../action/src/flows/pull-request.ts
4463
4512
  var PullRequestFlow = class extends InBranchFlow {
4464
4513
  async preRun() {
4465
- const canContinue = await _optionalChain([super.preRun.bind(this), 'optionalCall', _160 => _160()]);
4514
+ const canContinue = await _optionalChain([super.preRun.bind(this), 'optionalCall', _161 => _161()]);
4466
4515
  if (!canContinue) {
4467
4516
  return false;
4468
4517
  }
@@ -4680,10 +4729,10 @@ var BitbucketPlatformKit = class extends PlatformKit {
4680
4729
  repo_slug: this.platformConfig.repositoryName,
4681
4730
  state: "OPEN"
4682
4731
  }).then(({ data: { values } }) => {
4683
- return _optionalChain([values, 'optionalAccess', _161 => _161.find, 'call', _162 => _162(
4684
- ({ source, destination }) => _optionalChain([source, 'optionalAccess', _163 => _163.branch, 'optionalAccess', _164 => _164.name]) === branch && _optionalChain([destination, 'optionalAccess', _165 => _165.branch, 'optionalAccess', _166 => _166.name]) === this.platformConfig.baseBranchName
4732
+ return _optionalChain([values, 'optionalAccess', _162 => _162.find, 'call', _163 => _163(
4733
+ ({ source, destination }) => _optionalChain([source, 'optionalAccess', _164 => _164.branch, 'optionalAccess', _165 => _165.name]) === branch && _optionalChain([destination, 'optionalAccess', _166 => _166.branch, 'optionalAccess', _167 => _167.name]) === this.platformConfig.baseBranchName
4685
4734
  )]);
4686
- }).then((pr) => _optionalChain([pr, 'optionalAccess', _167 => _167.id]));
4735
+ }).then((pr) => _optionalChain([pr, 'optionalAccess', _168 => _168.id]));
4687
4736
  }
4688
4737
  async closePullRequest({ pullRequestNumber }) {
4689
4738
  await this.bb.repositories.declinePullRequest({
@@ -4769,7 +4818,7 @@ var GitHubPlatformKit = class extends PlatformKit {
4769
4818
  repo: this.platformConfig.repositoryName,
4770
4819
  base: this.platformConfig.baseBranchName,
4771
4820
  state: "open"
4772
- }).then(({ data }) => data[0]).then((pr) => _optionalChain([pr, 'optionalAccess', _168 => _168.number]));
4821
+ }).then(({ data }) => data[0]).then((pr) => _optionalChain([pr, 'optionalAccess', _169 => _169.number]));
4773
4822
  }
4774
4823
  async closePullRequest({ pullRequestNumber }) {
4775
4824
  await this.octokit.rest.pulls.update({
@@ -4882,7 +4931,7 @@ var GitlabPlatformKit = class extends PlatformKit {
4882
4931
  sourceBranch: branch,
4883
4932
  state: "opened"
4884
4933
  });
4885
- return _optionalChain([mergeRequests, 'access', _169 => _169[0], 'optionalAccess', _170 => _170.iid]);
4934
+ return _optionalChain([mergeRequests, 'access', _170 => _170[0], 'optionalAccess', _171 => _171.iid]);
4886
4935
  }
4887
4936
  async closePullRequest({ pullRequestNumber }) {
4888
4937
  await this.gitlab.MergeRequests.edit(this.platformConfig.gitlabProjectId, pullRequestNumber, {
@@ -4935,7 +4984,7 @@ async function main() {
4935
4984
  const { isPullRequestMode } = platformKit.config;
4936
4985
  ora.info(`Pull request mode: ${isPullRequestMode ? "on" : "off"}`);
4937
4986
  const flow = isPullRequestMode ? new PullRequestFlow(ora, platformKit) : new InBranchFlow(ora, platformKit);
4938
- const canRun = await _optionalChain([flow, 'access', _171 => _171.preRun, 'optionalCall', _172 => _172()]);
4987
+ const canRun = await _optionalChain([flow, 'access', _172 => _172.preRun, 'optionalCall', _173 => _173()]);
4939
4988
  if (canRun === false) {
4940
4989
  return;
4941
4990
  }
@@ -4943,7 +4992,7 @@ async function main() {
4943
4992
  if (!hasChanges) {
4944
4993
  return;
4945
4994
  }
4946
- await _optionalChain([flow, 'access', _173 => _173.postRun, 'optionalCall', _174 => _174()]);
4995
+ await _optionalChain([flow, 'access', _174 => _174.postRun, 'optionalCall', _175 => _175()]);
4947
4996
  }
4948
4997
 
4949
4998
  // src/cli/cmd/ci.ts
@@ -4965,7 +5014,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
4965
5014
  }
4966
5015
  const env = {
4967
5016
  LINGODOTDEV_API_KEY: settings.auth.apiKey,
4968
- LINGODOTDEV_PULL_REQUEST: _optionalChain([options, 'access', _175 => _175.pullRequest, 'optionalAccess', _176 => _176.toString, 'call', _177 => _177()]) || "false",
5017
+ LINGODOTDEV_PULL_REQUEST: _optionalChain([options, 'access', _176 => _176.pullRequest, 'optionalAccess', _177 => _177.toString, 'call', _178 => _178()]) || "false",
4969
5018
  ...options.commitMessage && { LINGODOTDEV_COMMIT_MESSAGE: options.commitMessage },
4970
5019
  ...options.pullRequestTitle && { LINGODOTDEV_PULL_REQUEST_TITLE: options.pullRequestTitle },
4971
5020
  ...options.workingDirectory && { LINGODOTDEV_WORKING_DIRECTORY: options.workingDirectory },
@@ -4978,7 +5027,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
4978
5027
  // package.json
4979
5028
  var package_default = {
4980
5029
  name: "lingo.dev",
4981
- version: "0.82.0",
5030
+ version: "0.83.0",
4982
5031
  description: "Lingo.dev CLI",
4983
5032
  private: false,
4984
5033
  publishConfig: {
@@ -5044,6 +5093,7 @@ var package_default = {
5044
5093
  "@lingo.dev/_spec": "workspace:*",
5045
5094
  "@modelcontextprotocol/sdk": "^1.5.0",
5046
5095
  "@paralleldrive/cuid2": "^2.2.2",
5096
+ "@types/mdast": "^4.0.4",
5047
5097
  ai: "^4.3.2",
5048
5098
  bitbucket: "^2.12.0",
5049
5099
  chalk: "^5.4.1",
@@ -5073,6 +5123,11 @@ var package_default = {
5073
5123
  "markdown-it": "^14.1.0",
5074
5124
  "markdown-it-front-matter": "^0.2.4",
5075
5125
  marked: "^15.0.6",
5126
+ "mdast-util-from-markdown": "^2.0.2",
5127
+ "mdast-util-frontmatter": "^2.0.1",
5128
+ "mdast-util-gfm": "^3.1.0",
5129
+ "mdast-util-mdx": "^3.0.0",
5130
+ "mdast-util-to-markdown": "^2.1.2",
5076
5131
  "node-webvtt": "^1.9.4",
5077
5132
  "object-hash": "^3.0.0",
5078
5133
  octokit: "^4.0.2",
@@ -5084,9 +5139,18 @@ var package_default = {
5084
5139
  "posthog-node": "^4.11.2",
5085
5140
  prettier: "^3.4.2",
5086
5141
  "properties-parser": "^0.6.0",
5142
+ "remark-frontmatter": "^5.0.0",
5143
+ "remark-gfm": "^4.0.1",
5144
+ "remark-mdx": "^3.1.0",
5145
+ "remark-mdx-frontmatter": "^5.1.0",
5146
+ "remark-parse": "^11.0.0",
5147
+ "remark-stringify": "^11.0.0",
5087
5148
  slugify: "^1.6.6",
5088
5149
  "srt-parser-2": "^1.2.3",
5089
5150
  typescript: "^5.7.2",
5151
+ unified: "^11.0.5",
5152
+ "unist-util-visit": "^5.0.0",
5153
+ vfile: "^6.0.3",
5090
5154
  vitest: "^2.1.8",
5091
5155
  xliff: "^6.2.1",
5092
5156
  xml2js: "^0.6.2",