lingo.dev 0.77.3 → 0.77.4

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
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/cli/index.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/cli/index.ts
2
2
  var _dotenv = require('dotenv'); var _dotenv2 = _interopRequireDefault(_dotenv);
3
3
  var _interactivecommander = require('interactive-commander');
4
4
  var _figlet = require('figlet'); var _figlet2 = _interopRequireDefault(_figlet);
@@ -272,7 +272,7 @@ var _prompts = require('@inquirer/prompts');
272
272
 
273
273
  // src/cli/utils/find-locale-paths.ts
274
274
 
275
- var _glob = require('glob'); var glob2 = _interopRequireWildcard(_glob);
275
+ var _glob = require('glob');
276
276
 
277
277
 
278
278
  function findLocaleFiles(bucket) {
@@ -745,14 +745,19 @@ function expandPlaceholderedGlob(_pathPattern, sourceLocale) {
745
745
  return indexes;
746
746
  }, []);
747
747
  const sourcePathPattern = pathPattern.replaceAll(/\[locale\]/g, sourceLocale);
748
- const sourcePaths = glob2.sync(sourcePathPattern, { follow: true, withFileTypes: true }).filter((file) => file.isFile() || file.isSymbolicLink()).map((file) => file.fullpath()).map((fullpath) => _path2.default.relative(process.cwd(), fullpath));
748
+ const sourcePaths = _glob.glob.sync(sourcePathPattern, { follow: true, withFileTypes: true }).filter((file) => file.isFile() || file.isSymbolicLink()).map((file) => file.fullpath()).map((fullpath) => _path2.default.relative(process.cwd(), fullpath));
749
749
  const placeholderedPaths = sourcePaths.map((sourcePath) => {
750
750
  const sourcePathChunks = sourcePath.split(_path2.default.sep);
751
751
  localeSegmentIndexes.forEach((localeSegmentIndex) => {
752
- const localePlaceholderIndex = _nullishCoalesce(_optionalChain([pathPatternChunks, 'access', _35 => _35[localeSegmentIndex], 'optionalAccess', _36 => _36.indexOf, 'call', _37 => _37("[locale]")]), () => ( -1));
753
- if (localeSegmentIndex >= 0 && localePlaceholderIndex >= 0) {
754
- const placeholderedPathChunk = sourcePathChunks[localeSegmentIndex];
755
- const placeholderedSegment = placeholderedPathChunk.substring(0, localePlaceholderIndex) + "[locale]" + placeholderedPathChunk.substring(localePlaceholderIndex + sourceLocale.length);
752
+ const pathPatternChunk = pathPatternChunks[localeSegmentIndex];
753
+ const sourcePathChunk = sourcePathChunks[localeSegmentIndex];
754
+ const regexp = new RegExp(
755
+ "(" + pathPatternChunk.replaceAll(".", "\\.").replaceAll("*", ".*").replace("[locale]", `)${sourceLocale}(`) + ")"
756
+ );
757
+ const match = sourcePathChunk.match(regexp);
758
+ if (match) {
759
+ const [, prefix, suffix] = match;
760
+ const placeholderedSegment = prefix + "[locale]" + suffix;
756
761
  sourcePathChunks[localeSegmentIndex] = placeholderedSegment;
757
762
  }
758
763
  });
@@ -831,12 +836,12 @@ function composeLoaders(...loaders) {
831
836
  return {
832
837
  init: async () => {
833
838
  for (const loader of loaders) {
834
- await _optionalChain([loader, 'access', _38 => _38.init, 'optionalCall', _39 => _39()]);
839
+ await _optionalChain([loader, 'access', _35 => _35.init, 'optionalCall', _36 => _36()]);
835
840
  }
836
841
  },
837
842
  setDefaultLocale(locale) {
838
843
  for (const loader of loaders) {
839
- _optionalChain([loader, 'access', _40 => _40.setDefaultLocale, 'optionalCall', _41 => _41(locale)]);
844
+ _optionalChain([loader, 'access', _37 => _37.setDefaultLocale, 'optionalCall', _38 => _38(locale)]);
840
845
  }
841
846
  return this;
842
847
  },
@@ -867,7 +872,7 @@ function createLoader(lDefinition) {
867
872
  if (state.initCtx) {
868
873
  return state.initCtx;
869
874
  }
870
- state.initCtx = await _optionalChain([lDefinition, 'access', _42 => _42.init, 'optionalCall', _43 => _43()]);
875
+ state.initCtx = await _optionalChain([lDefinition, 'access', _39 => _39.init, 'optionalCall', _40 => _40()]);
871
876
  return state.initCtx;
872
877
  },
873
878
  setDefaultLocale(locale) {
@@ -956,7 +961,7 @@ function createNormalizeLoader() {
956
961
  return normalized;
957
962
  },
958
963
  push: async (locale, data, originalInput) => {
959
- const keysMap = _nullishCoalesce(_optionalChain([originalInput, 'optionalAccess', _44 => _44.keysMap]), () => ( {}));
964
+ const keysMap = _nullishCoalesce(_optionalChain([originalInput, 'optionalAccess', _41 => _41.keysMap]), () => ( {}));
960
965
  const input2 = mapDenormalizedKeys(data, keysMap);
961
966
  const denormalized = _flat.unflatten.call(void 0, input2, {
962
967
  delimiter: "/",
@@ -1059,8 +1064,8 @@ async function getTrailingNewLine(pathPattern, locale, originalLocale) {
1059
1064
  if (!templateData) {
1060
1065
  templateData = await readFileForLocale(pathPattern, originalLocale);
1061
1066
  }
1062
- if (_optionalChain([templateData, 'optionalAccess', _45 => _45.match, 'call', _46 => _46(/[\r\n]$/)])) {
1063
- const ending = _optionalChain([templateData, 'optionalAccess', _47 => _47.includes, 'call', _48 => _48("\r\n")]) ? "\r\n" : _optionalChain([templateData, 'optionalAccess', _49 => _49.includes, 'call', _50 => _50("\r")]) ? "\r" : "\n";
1067
+ if (_optionalChain([templateData, 'optionalAccess', _42 => _42.match, 'call', _43 => _43(/[\r\n]$/)])) {
1068
+ const ending = _optionalChain([templateData, 'optionalAccess', _44 => _44.includes, 'call', _45 => _45("\r\n")]) ? "\r\n" : _optionalChain([templateData, 'optionalAccess', _46 => _46.includes, 'call', _47 => _47("\r")]) ? "\r" : "\n";
1064
1069
  return ending;
1065
1070
  }
1066
1071
  return "";
@@ -1287,7 +1292,7 @@ function createHtmlLoader() {
1287
1292
  break;
1288
1293
  }
1289
1294
  const siblings = Array.from(parent.childNodes).filter(
1290
- (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _51 => _51.textContent, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()])
1295
+ (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _48 => _48.textContent, 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()])
1291
1296
  );
1292
1297
  const index = siblings.indexOf(current);
1293
1298
  if (index !== -1) {
@@ -1322,11 +1327,11 @@ function createHtmlLoader() {
1322
1327
  result[getPath(element, attr)] = value;
1323
1328
  }
1324
1329
  });
1325
- Array.from(element.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _54 => _54.textContent, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])).forEach(processNode);
1330
+ Array.from(element.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _51 => _51.textContent, 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()])).forEach(processNode);
1326
1331
  }
1327
1332
  };
1328
- Array.from(document.head.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _57 => _57.textContent, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()])).forEach(processNode);
1329
- Array.from(document.body.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _60 => _60.textContent, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])).forEach(processNode);
1333
+ Array.from(document.head.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _54 => _54.textContent, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()])).forEach(processNode);
1334
+ Array.from(document.body.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _57 => _57.textContent, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59()])).forEach(processNode);
1330
1335
  return result;
1331
1336
  },
1332
1337
  async push(locale, data, originalInput) {
@@ -1348,7 +1353,7 @@ function createHtmlLoader() {
1348
1353
  for (let i = 0; i < indices.length; i++) {
1349
1354
  const index = parseInt(indices[i]);
1350
1355
  const siblings = Array.from(parent.childNodes).filter(
1351
- (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _63 => _63.textContent, 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()])
1356
+ (n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _60 => _60.textContent, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])
1352
1357
  );
1353
1358
  if (index >= siblings.length) {
1354
1359
  if (i === indices.length - 1) {
@@ -1455,7 +1460,7 @@ function isSkippableLine(line) {
1455
1460
  function parsePropertyLine(line) {
1456
1461
  const [key, ...valueParts] = line.split("=");
1457
1462
  return {
1458
- key: _optionalChain([key, 'optionalAccess', _66 => _66.trim, 'call', _67 => _67()]) || "",
1463
+ key: _optionalChain([key, 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()]) || "",
1459
1464
  value: valueParts.join("=").trim()
1460
1465
  };
1461
1466
  }
@@ -1537,7 +1542,7 @@ function createXcodeXcstringsLoader() {
1537
1542
  const resultData = {};
1538
1543
  for (const [translationKey, _translationEntity] of Object.entries(input2.strings)) {
1539
1544
  const rootTranslationEntity = _translationEntity;
1540
- const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess', _68 => _68.localizations, 'optionalAccess', _69 => _69[locale]]);
1545
+ const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess', _65 => _65.localizations, 'optionalAccess', _66 => _66[locale]]);
1541
1546
  if (langTranslationEntity) {
1542
1547
  if ("stringUnit" in langTranslationEntity) {
1543
1548
  resultData[translationKey] = langTranslationEntity.stringUnit.value;
@@ -1546,7 +1551,7 @@ function createXcodeXcstringsLoader() {
1546
1551
  resultData[translationKey] = {};
1547
1552
  const pluralForms = langTranslationEntity.variations.plural;
1548
1553
  for (const form in pluralForms) {
1549
- if (_optionalChain([pluralForms, 'access', _70 => _70[form], 'optionalAccess', _71 => _71.stringUnit, 'optionalAccess', _72 => _72.value])) {
1554
+ if (_optionalChain([pluralForms, 'access', _67 => _67[form], 'optionalAccess', _68 => _68.stringUnit, 'optionalAccess', _69 => _69.value])) {
1550
1555
  resultData[translationKey][form] = pluralForms[form].stringUnit.value;
1551
1556
  }
1552
1557
  }
@@ -1696,7 +1701,7 @@ function createPoDataLoader(params) {
1696
1701
  Object.entries(entries).forEach(([msgid, entry]) => {
1697
1702
  if (msgid && entry.msgid) {
1698
1703
  const context = entry.msgctxt || "";
1699
- const fullEntry = _optionalChain([parsedPo, 'access', _73 => _73.translations, 'access', _74 => _74[context], 'optionalAccess', _75 => _75[msgid]]);
1704
+ const fullEntry = _optionalChain([parsedPo, 'access', _70 => _70.translations, 'access', _71 => _71[context], 'optionalAccess', _72 => _72[msgid]]);
1700
1705
  if (fullEntry) {
1701
1706
  result[msgid] = fullEntry;
1702
1707
  }
@@ -1706,7 +1711,7 @@ function createPoDataLoader(params) {
1706
1711
  return result;
1707
1712
  },
1708
1713
  async push(locale, data, originalInput) {
1709
- const sections = _optionalChain([originalInput, 'optionalAccess', _76 => _76.split, 'call', _77 => _77("\n\n"), 'access', _78 => _78.filter, 'call', _79 => _79(Boolean)]) || [];
1714
+ const sections = _optionalChain([originalInput, 'optionalAccess', _73 => _73.split, 'call', _74 => _74("\n\n"), 'access', _75 => _75.filter, 'call', _76 => _76(Boolean)]) || [];
1710
1715
  const result = sections.map((section) => {
1711
1716
  const sectionPo = _gettextparser2.default.po.parse(section);
1712
1717
  const contextKey = _lodash2.default.keys(sectionPo.translations)[0];
@@ -1748,7 +1753,7 @@ function createPoContentLoader() {
1748
1753
  entry.msgid,
1749
1754
  {
1750
1755
  ...entry,
1751
- msgstr: [_optionalChain([data, 'access', _80 => _80[entry.msgid], 'optionalAccess', _81 => _81.singular]), _optionalChain([data, 'access', _82 => _82[entry.msgid], 'optionalAccess', _83 => _83.plural]) || null].filter(Boolean)
1756
+ msgstr: [_optionalChain([data, 'access', _77 => _77[entry.msgid], 'optionalAccess', _78 => _78.singular]), _optionalChain([data, 'access', _79 => _79[entry.msgid], 'optionalAccess', _80 => _80.plural]) || null].filter(Boolean)
1752
1757
  }
1753
1758
  ]).fromPairs().value();
1754
1759
  return result;
@@ -1994,7 +1999,7 @@ function createDatoClient(params) {
1994
1999
  only_valid: "true",
1995
2000
  ids: !records.length ? void 0 : records.join(",")
1996
2001
  }
1997
- }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _84 => _84.response, 'optionalAccess', _85 => _85.body, 'optionalAccess', _86 => _86.data, 'optionalAccess', _87 => _87[0]]) || error));
2002
+ }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _81 => _81.response, 'optionalAccess', _82 => _82.body, 'optionalAccess', _83 => _83.data, 'optionalAccess', _84 => _84[0]]) || error));
1998
2003
  },
1999
2004
  findRecordsForModel: async (modelId, records) => {
2000
2005
  try {
@@ -2004,9 +2009,9 @@ function createDatoClient(params) {
2004
2009
  filter: {
2005
2010
  type: modelId,
2006
2011
  only_valid: "true",
2007
- ids: !_optionalChain([records, 'optionalAccess', _88 => _88.length]) ? void 0 : records.join(",")
2012
+ ids: !_optionalChain([records, 'optionalAccess', _85 => _85.length]) ? void 0 : records.join(",")
2008
2013
  }
2009
- }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _89 => _89.response, 'optionalAccess', _90 => _90.body, 'optionalAccess', _91 => _91.data, 'optionalAccess', _92 => _92[0]]) || error));
2014
+ }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _86 => _86.response, 'optionalAccess', _87 => _87.body, 'optionalAccess', _88 => _88.data, 'optionalAccess', _89 => _89[0]]) || error));
2010
2015
  return result;
2011
2016
  } catch (_error) {
2012
2017
  throw new Error(
@@ -2020,9 +2025,9 @@ function createDatoClient(params) {
2020
2025
  },
2021
2026
  updateRecord: async (id, payload) => {
2022
2027
  try {
2023
- await dato.items.update(id, payload).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _93 => _93.response, 'optionalAccess', _94 => _94.body, 'optionalAccess', _95 => _95.data, 'optionalAccess', _96 => _96[0]]) || error));
2028
+ await dato.items.update(id, payload).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _90 => _90.response, 'optionalAccess', _91 => _91.body, 'optionalAccess', _92 => _92.data, 'optionalAccess', _93 => _93[0]]) || error));
2024
2029
  } catch (_error) {
2025
- if (_optionalChain([_error, 'optionalAccess', _97 => _97.attributes, 'optionalAccess', _98 => _98.details, 'optionalAccess', _99 => _99.message])) {
2030
+ if (_optionalChain([_error, 'optionalAccess', _94 => _94.attributes, 'optionalAccess', _95 => _95.details, 'optionalAccess', _96 => _96.message])) {
2026
2031
  throw new Error(
2027
2032
  [
2028
2033
  `${_error.attributes.details.message}`,
@@ -2043,9 +2048,9 @@ function createDatoClient(params) {
2043
2048
  },
2044
2049
  enableFieldLocalization: async (args) => {
2045
2050
  try {
2046
- await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _100 => _100.response, 'optionalAccess', _101 => _101.body, 'optionalAccess', _102 => _102.data, 'optionalAccess', _103 => _103[0]]) || error));
2051
+ await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _97 => _97.response, 'optionalAccess', _98 => _98.body, 'optionalAccess', _99 => _99.data, 'optionalAccess', _100 => _100[0]]) || error));
2047
2052
  } catch (_error) {
2048
- if (_optionalChain([_error, 'optionalAccess', _104 => _104.attributes, 'optionalAccess', _105 => _105.code]) === "NOT_FOUND") {
2053
+ if (_optionalChain([_error, 'optionalAccess', _101 => _101.attributes, 'optionalAccess', _102 => _102.code]) === "NOT_FOUND") {
2049
2054
  throw new Error(
2050
2055
  [
2051
2056
  `Field "${args.fieldId}" not found in model "${args.modelId}".`,
@@ -2053,7 +2058,7 @@ function createDatoClient(params) {
2053
2058
  ].join("\n\n")
2054
2059
  );
2055
2060
  }
2056
- if (_optionalChain([_error, 'optionalAccess', _106 => _106.attributes, 'optionalAccess', _107 => _107.details, 'optionalAccess', _108 => _108.message])) {
2061
+ if (_optionalChain([_error, 'optionalAccess', _103 => _103.attributes, 'optionalAccess', _104 => _104.details, 'optionalAccess', _105 => _105.message])) {
2057
2062
  throw new Error(
2058
2063
  [`${_error.attributes.details.message}`, `Error: ${JSON.stringify(_error, null, 2)}`].join("\n\n")
2059
2064
  );
@@ -2119,7 +2124,7 @@ function createDatoApiLoader(config, onConfigUpdate) {
2119
2124
  }
2120
2125
  }
2121
2126
  const records = await dato.findRecordsForModel(modelId);
2122
- const recordChoices = createRecordChoices(records, _optionalChain([config, 'access', _109 => _109.models, 'access', _110 => _110[modelId], 'optionalAccess', _111 => _111.records]) || [], project);
2127
+ const recordChoices = createRecordChoices(records, _optionalChain([config, 'access', _106 => _106.models, 'access', _107 => _107[modelId], 'optionalAccess', _108 => _108.records]) || [], project);
2123
2128
  const selectedRecords = await promptRecordSelection(modelName, recordChoices);
2124
2129
  result.models[modelId].records = records.filter((record) => selectedRecords.includes(record.id));
2125
2130
  updatedConfig.models[modelId].records = selectedRecords;
@@ -2131,14 +2136,14 @@ function createDatoApiLoader(config, onConfigUpdate) {
2131
2136
  },
2132
2137
  async pull(locale, input2, initCtx) {
2133
2138
  const result = {};
2134
- for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _112 => _112.models]) || {})) {
2135
- let records = _optionalChain([initCtx, 'optionalAccess', _113 => _113.models, 'access', _114 => _114[modelId], 'access', _115 => _115.records]) || [];
2139
+ for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _109 => _109.models]) || {})) {
2140
+ let records = _optionalChain([initCtx, 'optionalAccess', _110 => _110.models, 'access', _111 => _111[modelId], 'access', _112 => _112.records]) || [];
2136
2141
  const recordIds = records.map((record) => record.id);
2137
2142
  records = await dato.findRecords(recordIds);
2138
2143
  console.log(`Fetched ${records.length} records for model ${modelId}`);
2139
2144
  if (records.length > 0) {
2140
2145
  result[modelId] = {
2141
- fields: _optionalChain([initCtx, 'optionalAccess', _116 => _116.models, 'optionalAccess', _117 => _117[modelId], 'optionalAccess', _118 => _118.fields]) || [],
2146
+ fields: _optionalChain([initCtx, 'optionalAccess', _113 => _113.models, 'optionalAccess', _114 => _114[modelId], 'optionalAccess', _115 => _115.fields]) || [],
2142
2147
  records
2143
2148
  };
2144
2149
  }
@@ -2197,7 +2202,7 @@ function createRecordChoices(records, selectedIds = [], project) {
2197
2202
  return records.map((record) => ({
2198
2203
  name: `${record.id} - https://${project.internal_domain}/editor/item_types/${record.item_type.id}/items/${record.id}`,
2199
2204
  value: record.id,
2200
- checked: _optionalChain([selectedIds, 'optionalAccess', _119 => _119.includes, 'call', _120 => _120(record.id)])
2205
+ checked: _optionalChain([selectedIds, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117(record.id)])
2201
2206
  }));
2202
2207
  }
2203
2208
  async function promptRecordSelection(modelName, choices) {
@@ -2464,7 +2469,7 @@ var _nodewebvtt = require('node-webvtt'); var _nodewebvtt2 = _interopRequireDefa
2464
2469
  function createVttLoader() {
2465
2470
  return createLoader({
2466
2471
  async pull(locale, input2) {
2467
- const vtt = _optionalChain([_nodewebvtt2.default, 'access', _121 => _121.parse, 'call', _122 => _122(input2), 'optionalAccess', _123 => _123.cues]);
2472
+ const vtt = _optionalChain([_nodewebvtt2.default, 'access', _118 => _118.parse, 'call', _119 => _119(input2), 'optionalAccess', _120 => _120.cues]);
2468
2473
  if (Object.keys(vtt).length === 0) {
2469
2474
  return {};
2470
2475
  } else {
@@ -2516,7 +2521,7 @@ function variableExtractLoader(params) {
2516
2521
  for (let i = 0; i < matches.length; i++) {
2517
2522
  const match = matches[i];
2518
2523
  const currentValue = result[key].value;
2519
- const newValue = _optionalChain([currentValue, 'optionalAccess', _124 => _124.replace, 'call', _125 => _125(match, `{variable:${i}}`)]);
2524
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _121 => _121.replace, 'call', _122 => _122(match, `{variable:${i}}`)]);
2520
2525
  result[key].value = newValue;
2521
2526
  result[key].variables[i] = match;
2522
2527
  }
@@ -2530,7 +2535,7 @@ function variableExtractLoader(params) {
2530
2535
  for (let i = 0; i < valueObj.variables.length; i++) {
2531
2536
  const variable = valueObj.variables[i];
2532
2537
  const currentValue = result[key];
2533
- const newValue = _optionalChain([currentValue, 'optionalAccess', _126 => _126.replace, 'call', _127 => _127(`{variable:${i}}`, variable)]);
2538
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _123 => _123.replace, 'call', _124 => _124(`{variable:${i}}`, variable)]);
2534
2539
  result[key] = newValue;
2535
2540
  }
2536
2541
  }
@@ -3039,11 +3044,11 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
3039
3044
  const auth = await validateAuth(settings);
3040
3045
  ora.succeed(`Authenticated as ${auth.email}`);
3041
3046
  let buckets = getBuckets(i18nConfig);
3042
- if (_optionalChain([flags, 'access', _128 => _128.bucket, 'optionalAccess', _129 => _129.length])) {
3047
+ if (_optionalChain([flags, 'access', _125 => _125.bucket, 'optionalAccess', _126 => _126.length])) {
3043
3048
  buckets = buckets.filter((bucket) => flags.bucket.includes(bucket.type));
3044
3049
  }
3045
3050
  ora.succeed("Buckets retrieved");
3046
- const targetLocales = _optionalChain([flags, 'access', _130 => _130.locale, 'optionalAccess', _131 => _131.length]) ? flags.locale : i18nConfig.locale.targets;
3051
+ const targetLocales = _optionalChain([flags, 'access', _127 => _127.locale, 'optionalAccess', _128 => _128.length]) ? flags.locale : i18nConfig.locale.targets;
3047
3052
  const lockfileHelper = createLockfileHelper();
3048
3053
  ora.start("Ensuring i18n.lock exists...");
3049
3054
  if (!lockfileHelper.isLockfileExists()) {
@@ -3333,12 +3338,12 @@ function validateParams(i18nConfig, flags) {
3333
3338
  message: "No buckets found in i18n.json. Please add at least one bucket containing i18n content.",
3334
3339
  docUrl: "bucketNotFound"
3335
3340
  });
3336
- } else if (_optionalChain([flags, 'access', _132 => _132.locale, 'optionalAccess', _133 => _133.some, 'call', _134 => _134((locale) => !i18nConfig.locale.targets.includes(locale))])) {
3341
+ } else if (_optionalChain([flags, 'access', _129 => _129.locale, 'optionalAccess', _130 => _130.some, 'call', _131 => _131((locale) => !i18nConfig.locale.targets.includes(locale))])) {
3337
3342
  throw new CLIError({
3338
3343
  message: `One or more specified locales do not exist in i18n.json locale.targets. Please add them to the list and try again.`,
3339
3344
  docUrl: "localeTargetNotFound"
3340
3345
  });
3341
- } else if (_optionalChain([flags, 'access', _135 => _135.bucket, 'optionalAccess', _136 => _136.some, 'call', _137 => _137((bucket) => !i18nConfig.buckets[bucket])])) {
3346
+ } else if (_optionalChain([flags, 'access', _132 => _132.bucket, 'optionalAccess', _133 => _133.some, 'call', _134 => _134((bucket) => !i18nConfig.buckets[bucket])])) {
3342
3347
  throw new CLIError({
3343
3348
  message: `One or more specified buckets do not exist in i18n.json. Please add them to the list and try again.`,
3344
3349
  docUrl: "bucketNotFound"
@@ -3618,7 +3623,7 @@ var mcp_default = new (0, _interactivecommander.Command)().command("mcp").descri
3618
3623
  // package.json
3619
3624
  var package_default = {
3620
3625
  name: "lingo.dev",
3621
- version: "0.77.3",
3626
+ version: "0.77.4",
3622
3627
  description: "Lingo.dev CLI",
3623
3628
  private: false,
3624
3629
  publishConfig: {