lingo.dev 0.111.12 → 0.111.14

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
@@ -3067,7 +3067,7 @@ async function formatDataWithPrettier(data, filePath, options) {
3067
3067
 
3068
3068
 
3069
3069
  var _jsapi = require('@biomejs/js-api');
3070
- var shownWarnings = /* @__PURE__ */ new Set();
3070
+
3071
3071
  function createBiomeLoader(options) {
3072
3072
  return createBaseFormatterLoader(options, async (data, filePath) => {
3073
3073
  return await formatDataWithBiome(data, filePath, options);
@@ -3101,13 +3101,18 @@ async function formatDataWithBiome(data, filePath, options) {
3101
3101
  const projectKey = openResult.projectKey;
3102
3102
  configPath = await findBiomeConfig(filePath);
3103
3103
  if (!configPath && !options.alwaysFormat) {
3104
+ console.log();
3105
+ console.log(
3106
+ `\u26A0\uFE0F Biome config not found for ${path14.default.basename(filePath)} - skipping formatting`
3107
+ );
3104
3108
  return data;
3105
3109
  }
3106
3110
  if (configPath) {
3107
3111
  const configContent = await _promises4.default.readFile(configPath, "utf-8");
3108
3112
  try {
3109
- const config = JSON.parse(configContent);
3110
- biome.applyConfiguration(projectKey, config);
3113
+ const config = _jsoncparser.parse.call(void 0, configContent);
3114
+ const { $schema, vcs, files, ...relevantConfig } = config;
3115
+ biome.applyConfiguration(projectKey, relevantConfig);
3111
3116
  } catch (parseError) {
3112
3117
  throw new Error(
3113
3118
  `Invalid Biome configuration in ${configPath}: ${parseError instanceof Error ? parseError.message : "JSON parse error"}`
@@ -3119,15 +3124,12 @@ async function formatDataWithBiome(data, filePath, options) {
3119
3124
  });
3120
3125
  return formatted.content;
3121
3126
  } catch (error) {
3122
- const ext2 = path14.default.extname(filePath);
3123
- if (!shownWarnings.has(ext2)) {
3124
- shownWarnings.add(ext2);
3125
- console.log();
3126
- console.log(
3127
- `\u26A0\uFE0F Biome does not support ${ext2} files - skipping formatting`
3128
- );
3129
- if (error instanceof Error && error.message) {
3130
- console.log(` ${error.message}`);
3127
+ const errorMessage = error instanceof Error ? error.message || _optionalChain([error, 'access', _133 => _133.stackTrace, 'optionalAccess', _134 => _134.toString, 'call', _135 => _135(), 'access', _136 => _136.split, 'call', _137 => _137("\n"), 'access', _138 => _138[0]]) : "";
3128
+ if (_optionalChain([errorMessage, 'optionalAccess', _139 => _139.includes, 'call', _140 => _140("does not exist in the workspace")])) {
3129
+ } else {
3130
+ console.log(`\u26A0\uFE0F Biome skipped ${path14.default.basename(filePath)}`);
3131
+ if (errorMessage) {
3132
+ console.log(` ${errorMessage}`);
3131
3133
  }
3132
3134
  }
3133
3135
  return data;
@@ -3170,7 +3172,7 @@ function createPoDataLoader(params) {
3170
3172
  Object.entries(entries).forEach(([msgid, entry]) => {
3171
3173
  if (msgid && entry.msgid) {
3172
3174
  const context = entry.msgctxt || "";
3173
- const fullEntry = _optionalChain([parsedPo, 'access', _133 => _133.translations, 'access', _134 => _134[context], 'optionalAccess', _135 => _135[msgid]]);
3175
+ const fullEntry = _optionalChain([parsedPo, 'access', _141 => _141.translations, 'access', _142 => _142[context], 'optionalAccess', _143 => _143[msgid]]);
3174
3176
  if (fullEntry) {
3175
3177
  result[msgid] = fullEntry;
3176
3178
  }
@@ -3180,8 +3182,8 @@ function createPoDataLoader(params) {
3180
3182
  return result;
3181
3183
  },
3182
3184
  async push(locale, data, originalInput, originalLocale, pullInput) {
3183
- const currentSections = _optionalChain([pullInput, 'optionalAccess', _136 => _136.split, 'call', _137 => _137("\n\n"), 'access', _138 => _138.filter, 'call', _139 => _139(Boolean)]) || [];
3184
- const originalSections = _optionalChain([originalInput, 'optionalAccess', _140 => _140.split, 'call', _141 => _141("\n\n"), 'access', _142 => _142.filter, 'call', _143 => _143(Boolean)]) || [];
3185
+ const currentSections = _optionalChain([pullInput, 'optionalAccess', _144 => _144.split, 'call', _145 => _145("\n\n"), 'access', _146 => _146.filter, 'call', _147 => _147(Boolean)]) || [];
3186
+ const originalSections = _optionalChain([originalInput, 'optionalAccess', _148 => _148.split, 'call', _149 => _149("\n\n"), 'access', _150 => _150.filter, 'call', _151 => _151(Boolean)]) || [];
3185
3187
  const result = originalSections.map((section) => {
3186
3188
  const sectionPo = _gettextparser2.default.po.parse(section);
3187
3189
  if (Object.keys(sectionPo.translations).length === 0) {
@@ -3250,8 +3252,8 @@ function createPoContentLoader() {
3250
3252
  {
3251
3253
  ...entry,
3252
3254
  msgstr: [
3253
- _optionalChain([data, 'access', _144 => _144[entry.msgid], 'optionalAccess', _145 => _145.singular]),
3254
- _optionalChain([data, 'access', _146 => _146[entry.msgid], 'optionalAccess', _147 => _147.plural]) || null
3255
+ _optionalChain([data, 'access', _152 => _152[entry.msgid], 'optionalAccess', _153 => _153.singular]),
3256
+ _optionalChain([data, 'access', _154 => _154[entry.msgid], 'optionalAccess', _155 => _155.plural]) || null
3255
3257
  ].filter(Boolean)
3256
3258
  }
3257
3259
  ]).fromPairs().value();
@@ -3373,7 +3375,7 @@ function pullV1(xliffElement, locale, originalLocale) {
3373
3375
  let key = getTransUnitKey(unit);
3374
3376
  if (!key) return;
3375
3377
  if (seenKeys.has(key)) {
3376
- const id = _optionalChain([unit, 'access', _148 => _148.getAttribute, 'call', _149 => _149("id"), 'optionalAccess', _150 => _150.trim, 'call', _151 => _151()]);
3378
+ const id = _optionalChain([unit, 'access', _156 => _156.getAttribute, 'call', _157 => _157("id"), 'optionalAccess', _158 => _158.trim, 'call', _159 => _159()]);
3377
3379
  if (id) {
3378
3380
  key = `${key}#${id}`;
3379
3381
  } else {
@@ -3421,7 +3423,7 @@ function pushV1(dom, xliffElement, locale, translations, originalLocale, origina
3421
3423
  let key = getTransUnitKey(unit);
3422
3424
  if (!key) return;
3423
3425
  if (seenKeys.has(key)) {
3424
- const id = _optionalChain([unit, 'access', _152 => _152.getAttribute, 'call', _153 => _153("id"), 'optionalAccess', _154 => _154.trim, 'call', _155 => _155()]);
3426
+ const id = _optionalChain([unit, 'access', _160 => _160.getAttribute, 'call', _161 => _161("id"), 'optionalAccess', _162 => _162.trim, 'call', _163 => _163()]);
3425
3427
  if (id) {
3426
3428
  key = `${key}#${id}`;
3427
3429
  } else {
@@ -3463,7 +3465,7 @@ function pushV1(dom, xliffElement, locale, translations, originalLocale, origina
3463
3465
  const translationKeys = new Set(Object.keys(translations));
3464
3466
  existingUnits.forEach((unit, key) => {
3465
3467
  if (!translationKeys.has(key)) {
3466
- _optionalChain([unit, 'access', _156 => _156.parentNode, 'optionalAccess', _157 => _157.removeChild, 'call', _158 => _158(unit)]);
3468
+ _optionalChain([unit, 'access', _164 => _164.parentNode, 'optionalAccess', _165 => _165.removeChild, 'call', _166 => _166(unit)]);
3467
3469
  }
3468
3470
  });
3469
3471
  return serializeWithDeclaration(
@@ -3506,18 +3508,18 @@ function traverseUnitsV2(container, fileId, currentPath, result) {
3506
3508
  Array.from(container.children).forEach((child) => {
3507
3509
  const tagName = child.tagName;
3508
3510
  if (tagName === "unit") {
3509
- const unitId = _optionalChain([child, 'access', _159 => _159.getAttribute, 'call', _160 => _160("id"), 'optionalAccess', _161 => _161.trim, 'call', _162 => _162()]);
3511
+ const unitId = _optionalChain([child, 'access', _167 => _167.getAttribute, 'call', _168 => _168("id"), 'optionalAccess', _169 => _169.trim, 'call', _170 => _170()]);
3510
3512
  if (!unitId) return;
3511
3513
  const key = `resources/${fileId}/${currentPath}${unitId}/source`;
3512
3514
  const segment = child.querySelector("segment");
3513
- const source = _optionalChain([segment, 'optionalAccess', _163 => _163.querySelector, 'call', _164 => _164("source")]);
3515
+ const source = _optionalChain([segment, 'optionalAccess', _171 => _171.querySelector, 'call', _172 => _172("source")]);
3514
3516
  if (source) {
3515
3517
  result[key] = extractTextContent(source);
3516
3518
  } else {
3517
3519
  result[key] = unitId;
3518
3520
  }
3519
3521
  } else if (tagName === "group") {
3520
- const groupId = _optionalChain([child, 'access', _165 => _165.getAttribute, 'call', _166 => _166("id"), 'optionalAccess', _167 => _167.trim, 'call', _168 => _168()]);
3522
+ const groupId = _optionalChain([child, 'access', _173 => _173.getAttribute, 'call', _174 => _174("id"), 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()]);
3521
3523
  const newPath = groupId ? `${currentPath}${groupId}/groupUnits/` : currentPath;
3522
3524
  traverseUnitsV2(child, fileId, newPath, result);
3523
3525
  }
@@ -3553,12 +3555,12 @@ function indexUnitsV2(container, fileId, currentPath, index) {
3553
3555
  Array.from(container.children).forEach((child) => {
3554
3556
  const tagName = child.tagName;
3555
3557
  if (tagName === "unit") {
3556
- const unitId = _optionalChain([child, 'access', _169 => _169.getAttribute, 'call', _170 => _170("id"), 'optionalAccess', _171 => _171.trim, 'call', _172 => _172()]);
3558
+ const unitId = _optionalChain([child, 'access', _177 => _177.getAttribute, 'call', _178 => _178("id"), 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]);
3557
3559
  if (!unitId) return;
3558
3560
  const key = `resources/${fileId}/${currentPath}${unitId}/source`;
3559
3561
  index.set(key, child);
3560
3562
  } else if (tagName === "group") {
3561
- const groupId = _optionalChain([child, 'access', _173 => _173.getAttribute, 'call', _174 => _174("id"), 'optionalAccess', _175 => _175.trim, 'call', _176 => _176()]);
3563
+ const groupId = _optionalChain([child, 'access', _181 => _181.getAttribute, 'call', _182 => _182("id"), 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()]);
3562
3564
  const newPath = groupId ? `${currentPath}${groupId}/groupUnits/` : currentPath;
3563
3565
  indexUnitsV2(child, fileId, newPath, index);
3564
3566
  }
@@ -3579,9 +3581,9 @@ function updateUnitV2(unit, value) {
3579
3581
  setTextContent(source, value);
3580
3582
  }
3581
3583
  function getTransUnitKey(transUnit) {
3582
- const resname = _optionalChain([transUnit, 'access', _177 => _177.getAttribute, 'call', _178 => _178("resname"), 'optionalAccess', _179 => _179.trim, 'call', _180 => _180()]);
3584
+ const resname = _optionalChain([transUnit, 'access', _185 => _185.getAttribute, 'call', _186 => _186("resname"), 'optionalAccess', _187 => _187.trim, 'call', _188 => _188()]);
3583
3585
  if (resname) return resname;
3584
- const id = _optionalChain([transUnit, 'access', _181 => _181.getAttribute, 'call', _182 => _182("id"), 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()]);
3586
+ const id = _optionalChain([transUnit, 'access', _189 => _189.getAttribute, 'call', _190 => _190("id"), 'optionalAccess', _191 => _191.trim, 'call', _192 => _192()]);
3585
3587
  if (id) return id;
3586
3588
  const sourceElement = transUnit.querySelector("source");
3587
3589
  if (sourceElement) {
@@ -3638,7 +3640,7 @@ function formatXml(xml) {
3638
3640
  if (cdataNode) {
3639
3641
  return `${indent2}${openTag}<![CDATA[${cdataNode.nodeValue}]]></${tagName}>`;
3640
3642
  }
3641
- const textContent = _optionalChain([element, 'access', _185 => _185.textContent, 'optionalAccess', _186 => _186.trim, 'call', _187 => _187()]) || "";
3643
+ const textContent = _optionalChain([element, 'access', _193 => _193.textContent, 'optionalAccess', _194 => _194.trim, 'call', _195 => _195()]) || "";
3642
3644
  const hasOnlyText = element.childNodes.length === 1 && element.childNodes[0].nodeType === 3;
3643
3645
  if (hasOnlyText && textContent) {
3644
3646
  return `${indent2}${openTag}${textContent}</${tagName}>`;
@@ -3931,7 +3933,7 @@ function createDatoClient(params) {
3931
3933
  ids: !records.length ? void 0 : records.join(",")
3932
3934
  }
3933
3935
  }).catch(
3934
- (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _188 => _188.response, 'optionalAccess', _189 => _189.body, 'optionalAccess', _190 => _190.data, 'optionalAccess', _191 => _191[0]]) || error)
3936
+ (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _196 => _196.response, 'optionalAccess', _197 => _197.body, 'optionalAccess', _198 => _198.data, 'optionalAccess', _199 => _199[0]]) || error)
3935
3937
  );
3936
3938
  },
3937
3939
  findRecordsForModel: async (modelId, records) => {
@@ -3942,10 +3944,10 @@ function createDatoClient(params) {
3942
3944
  filter: {
3943
3945
  type: modelId,
3944
3946
  only_valid: "true",
3945
- ids: !_optionalChain([records, 'optionalAccess', _192 => _192.length]) ? void 0 : records.join(",")
3947
+ ids: !_optionalChain([records, 'optionalAccess', _200 => _200.length]) ? void 0 : records.join(",")
3946
3948
  }
3947
3949
  }).catch(
3948
- (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _193 => _193.response, 'optionalAccess', _194 => _194.body, 'optionalAccess', _195 => _195.data, 'optionalAccess', _196 => _196[0]]) || error)
3950
+ (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _201 => _201.response, 'optionalAccess', _202 => _202.body, 'optionalAccess', _203 => _203.data, 'optionalAccess', _204 => _204[0]]) || error)
3949
3951
  );
3950
3952
  return result;
3951
3953
  } catch (_error) {
@@ -3961,10 +3963,10 @@ function createDatoClient(params) {
3961
3963
  updateRecord: async (id, payload) => {
3962
3964
  try {
3963
3965
  await dato.items.update(id, payload).catch(
3964
- (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _197 => _197.response, 'optionalAccess', _198 => _198.body, 'optionalAccess', _199 => _199.data, 'optionalAccess', _200 => _200[0]]) || error)
3966
+ (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _205 => _205.response, 'optionalAccess', _206 => _206.body, 'optionalAccess', _207 => _207.data, 'optionalAccess', _208 => _208[0]]) || error)
3965
3967
  );
3966
3968
  } catch (_error) {
3967
- if (_optionalChain([_error, 'optionalAccess', _201 => _201.attributes, 'optionalAccess', _202 => _202.details, 'optionalAccess', _203 => _203.message])) {
3969
+ if (_optionalChain([_error, 'optionalAccess', _209 => _209.attributes, 'optionalAccess', _210 => _210.details, 'optionalAccess', _211 => _211.message])) {
3968
3970
  throw new Error(
3969
3971
  [
3970
3972
  `${_error.attributes.details.message}`,
@@ -3986,10 +3988,10 @@ function createDatoClient(params) {
3986
3988
  enableFieldLocalization: async (args) => {
3987
3989
  try {
3988
3990
  await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch(
3989
- (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _204 => _204.response, 'optionalAccess', _205 => _205.body, 'optionalAccess', _206 => _206.data, 'optionalAccess', _207 => _207[0]]) || error)
3991
+ (error) => Promise.reject(_optionalChain([error, 'optionalAccess', _212 => _212.response, 'optionalAccess', _213 => _213.body, 'optionalAccess', _214 => _214.data, 'optionalAccess', _215 => _215[0]]) || error)
3990
3992
  );
3991
3993
  } catch (_error) {
3992
- if (_optionalChain([_error, 'optionalAccess', _208 => _208.attributes, 'optionalAccess', _209 => _209.code]) === "NOT_FOUND") {
3994
+ if (_optionalChain([_error, 'optionalAccess', _216 => _216.attributes, 'optionalAccess', _217 => _217.code]) === "NOT_FOUND") {
3993
3995
  throw new Error(
3994
3996
  [
3995
3997
  `Field "${args.fieldId}" not found in model "${args.modelId}".`,
@@ -3997,7 +3999,7 @@ function createDatoClient(params) {
3997
3999
  ].join("\n\n")
3998
4000
  );
3999
4001
  }
4000
- if (_optionalChain([_error, 'optionalAccess', _210 => _210.attributes, 'optionalAccess', _211 => _211.details, 'optionalAccess', _212 => _212.message])) {
4002
+ if (_optionalChain([_error, 'optionalAccess', _218 => _218.attributes, 'optionalAccess', _219 => _219.details, 'optionalAccess', _220 => _220.message])) {
4001
4003
  throw new Error(
4002
4004
  [
4003
4005
  `${_error.attributes.details.message}`,
@@ -4075,7 +4077,7 @@ function createDatoApiLoader(config, onConfigUpdate) {
4075
4077
  const records = await dato.findRecordsForModel(modelId);
4076
4078
  const recordChoices = createRecordChoices(
4077
4079
  records,
4078
- _optionalChain([config, 'access', _213 => _213.models, 'access', _214 => _214[modelId], 'optionalAccess', _215 => _215.records]) || [],
4080
+ _optionalChain([config, 'access', _221 => _221.models, 'access', _222 => _222[modelId], 'optionalAccess', _223 => _223.records]) || [],
4079
4081
  project
4080
4082
  );
4081
4083
  const selectedRecords = await promptRecordSelection(
@@ -4094,14 +4096,14 @@ function createDatoApiLoader(config, onConfigUpdate) {
4094
4096
  },
4095
4097
  async pull(locale, input2, initCtx) {
4096
4098
  const result = {};
4097
- for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _216 => _216.models]) || {})) {
4098
- let records = _optionalChain([initCtx, 'optionalAccess', _217 => _217.models, 'access', _218 => _218[modelId], 'access', _219 => _219.records]) || [];
4099
+ for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _224 => _224.models]) || {})) {
4100
+ let records = _optionalChain([initCtx, 'optionalAccess', _225 => _225.models, 'access', _226 => _226[modelId], 'access', _227 => _227.records]) || [];
4099
4101
  const recordIds = records.map((record) => record.id);
4100
4102
  records = await dato.findRecords(recordIds);
4101
4103
  console.log(`Fetched ${records.length} records for model ${modelId}`);
4102
4104
  if (records.length > 0) {
4103
4105
  result[modelId] = {
4104
- fields: _optionalChain([initCtx, 'optionalAccess', _220 => _220.models, 'optionalAccess', _221 => _221[modelId], 'optionalAccess', _222 => _222.fields]) || [],
4106
+ fields: _optionalChain([initCtx, 'optionalAccess', _228 => _228.models, 'optionalAccess', _229 => _229[modelId], 'optionalAccess', _230 => _230.fields]) || [],
4105
4107
  records
4106
4108
  };
4107
4109
  }
@@ -4164,7 +4166,7 @@ function createRecordChoices(records, selectedIds = [], project) {
4164
4166
  return records.map((record) => ({
4165
4167
  name: `${record.id} - https://${project.internal_domain}/editor/item_types/${record.item_type.id}/items/${record.id}`,
4166
4168
  value: record.id,
4167
- checked: _optionalChain([selectedIds, 'optionalAccess', _223 => _223.includes, 'call', _224 => _224(record.id)])
4169
+ checked: _optionalChain([selectedIds, 'optionalAccess', _231 => _231.includes, 'call', _232 => _232(record.id)])
4168
4170
  }));
4169
4171
  }
4170
4172
  async function promptRecordSelection(modelName, choices) {
@@ -4483,7 +4485,7 @@ function createVttLoader() {
4483
4485
  if (!input2) {
4484
4486
  return "";
4485
4487
  }
4486
- const vtt = _optionalChain([_nodewebvtt2.default, 'access', _225 => _225.parse, 'call', _226 => _226(input2), 'optionalAccess', _227 => _227.cues]);
4488
+ const vtt = _optionalChain([_nodewebvtt2.default, 'access', _233 => _233.parse, 'call', _234 => _234(input2), 'optionalAccess', _235 => _235.cues]);
4487
4489
  if (Object.keys(vtt).length === 0) {
4488
4490
  return {};
4489
4491
  } else {
@@ -4537,7 +4539,7 @@ function variableExtractLoader(params) {
4537
4539
  for (let i = 0; i < matches.length; i++) {
4538
4540
  const match2 = matches[i];
4539
4541
  const currentValue = result[key].value;
4540
- const newValue = _optionalChain([currentValue, 'optionalAccess', _228 => _228.replace, 'call', _229 => _229(match2, `{variable:${i}}`)]);
4542
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _236 => _236.replace, 'call', _237 => _237(match2, `{variable:${i}}`)]);
4541
4543
  result[key].value = newValue;
4542
4544
  result[key].variables[i] = match2;
4543
4545
  }
@@ -4551,7 +4553,7 @@ function variableExtractLoader(params) {
4551
4553
  for (let i = 0; i < valueObj.variables.length; i++) {
4552
4554
  const variable = valueObj.variables[i];
4553
4555
  const currentValue = result[key];
4554
- const newValue = _optionalChain([currentValue, 'optionalAccess', _230 => _230.replace, 'call', _231 => _231(`{variable:${i}}`, variable)]);
4556
+ const newValue = _optionalChain([currentValue, 'optionalAccess', _238 => _238.replace, 'call', _239 => _239(`{variable:${i}}`, variable)]);
4555
4557
  result[key] = newValue;
4556
4558
  }
4557
4559
  }
@@ -4751,7 +4753,7 @@ function createVueJsonLoader() {
4751
4753
  return createLoader({
4752
4754
  pull: async (locale, input2, ctx) => {
4753
4755
  const parsed = parseVueFile(input2);
4754
- return _nullishCoalesce(_optionalChain([parsed, 'optionalAccess', _232 => _232.i18n, 'optionalAccess', _233 => _233[locale]]), () => ( {}));
4756
+ return _nullishCoalesce(_optionalChain([parsed, 'optionalAccess', _240 => _240.i18n, 'optionalAccess', _241 => _241[locale]]), () => ( {}));
4755
4757
  },
4756
4758
  push: async (locale, data, originalInput) => {
4757
4759
  const parsed = parseVueFile(_nullishCoalesce(originalInput, () => ( "")));
@@ -4936,7 +4938,7 @@ function updateStringsInObjectExpression(objectExpression, data) {
4936
4938
  objectExpression.properties.forEach((prop) => {
4937
4939
  if (!t.isObjectProperty(prop)) return;
4938
4940
  const key = getPropertyKey(prop);
4939
- const incomingVal = _optionalChain([data, 'optionalAccess', _234 => _234[key]]);
4941
+ const incomingVal = _optionalChain([data, 'optionalAccess', _242 => _242[key]]);
4940
4942
  if (incomingVal === void 0) {
4941
4943
  return;
4942
4944
  }
@@ -4972,7 +4974,7 @@ function updateStringsInArrayExpression(arrayExpression, incoming) {
4972
4974
  let modified = false;
4973
4975
  arrayExpression.elements.forEach((element, index) => {
4974
4976
  if (!element) return;
4975
- const incomingVal = _optionalChain([incoming, 'optionalAccess', _235 => _235[index]]);
4977
+ const incomingVal = _optionalChain([incoming, 'optionalAccess', _243 => _243[index]]);
4976
4978
  if (incomingVal === void 0) return;
4977
4979
  if (t.isStringLiteral(element) && typeof incomingVal === "string") {
4978
4980
  if (element.value !== incomingVal) {
@@ -5463,7 +5465,7 @@ var AST = class _AST {
5463
5465
  const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
5464
5466
  if (this.isStart() && !this.type)
5465
5467
  ret.unshift([]);
5466
- if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access', _236 => _236.#parent, 'optionalAccess', _237 => _237.type]) === "!")) {
5468
+ if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access', _244 => _244.#parent, 'optionalAccess', _245 => _245.type]) === "!")) {
5467
5469
  ret.push({});
5468
5470
  }
5469
5471
  return ret;
@@ -5471,7 +5473,7 @@ var AST = class _AST {
5471
5473
  isStart() {
5472
5474
  if (this.#root === this)
5473
5475
  return true;
5474
- if (!_optionalChain([this, 'access', _238 => _238.#parent, 'optionalAccess', _239 => _239.isStart, 'call', _240 => _240()]))
5476
+ if (!_optionalChain([this, 'access', _246 => _246.#parent, 'optionalAccess', _247 => _247.isStart, 'call', _248 => _248()]))
5475
5477
  return false;
5476
5478
  if (this.#parentIndex === 0)
5477
5479
  return true;
@@ -5487,12 +5489,12 @@ var AST = class _AST {
5487
5489
  isEnd() {
5488
5490
  if (this.#root === this)
5489
5491
  return true;
5490
- if (_optionalChain([this, 'access', _241 => _241.#parent, 'optionalAccess', _242 => _242.type]) === "!")
5492
+ if (_optionalChain([this, 'access', _249 => _249.#parent, 'optionalAccess', _250 => _250.type]) === "!")
5491
5493
  return true;
5492
- if (!_optionalChain([this, 'access', _243 => _243.#parent, 'optionalAccess', _244 => _244.isEnd, 'call', _245 => _245()]))
5494
+ if (!_optionalChain([this, 'access', _251 => _251.#parent, 'optionalAccess', _252 => _252.isEnd, 'call', _253 => _253()]))
5493
5495
  return false;
5494
5496
  if (!this.type)
5495
- return _optionalChain([this, 'access', _246 => _246.#parent, 'optionalAccess', _247 => _247.isEnd, 'call', _248 => _248()]);
5497
+ return _optionalChain([this, 'access', _254 => _254.#parent, 'optionalAccess', _255 => _255.isEnd, 'call', _256 => _256()]);
5496
5498
  const pl = this.#parent ? this.#parent.#parts.length : 0;
5497
5499
  return this.#parentIndex === pl - 1;
5498
5500
  }
@@ -5737,7 +5739,7 @@ var AST = class _AST {
5737
5739
  }
5738
5740
  }
5739
5741
  let end = "";
5740
- if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access', _249 => _249.#parent, 'optionalAccess', _250 => _250.type]) === "!") {
5742
+ if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access', _257 => _257.#parent, 'optionalAccess', _258 => _258.type]) === "!") {
5741
5743
  end = "(?:$|\\/)";
5742
5744
  }
5743
5745
  const final2 = start2 + src + end;
@@ -6814,7 +6816,7 @@ function createMdxSectionsSplit2Loader() {
6814
6816
  const content = _lodash2.default.chain(data.sections).values().join("\n\n").value();
6815
6817
  const result = {
6816
6818
  frontmatter: data.frontmatter,
6817
- codePlaceholders: _optionalChain([pullInput, 'optionalAccess', _251 => _251.codePlaceholders]) || {},
6819
+ codePlaceholders: _optionalChain([pullInput, 'optionalAccess', _259 => _259.codePlaceholders]) || {},
6818
6820
  content
6819
6821
  };
6820
6822
  return result;
@@ -7553,7 +7555,7 @@ function createBasicTranslator(model, systemPrompt) {
7553
7555
  ]
7554
7556
  });
7555
7557
  const result = JSON.parse(response.text);
7556
- return _optionalChain([result, 'optionalAccess', _252 => _252.data]) || {};
7558
+ return _optionalChain([result, 'optionalAccess', _260 => _260.data]) || {};
7557
7559
  }
7558
7560
  }
7559
7561
  function extractPayloadChunks(payload) {
@@ -7635,7 +7637,7 @@ function getPureModelProvider(provider) {
7635
7637
 
7636
7638
  ${_chalk2.default.hex(colors.blue)("Docs: https://lingo.dev/go/docs")}
7637
7639
  `;
7638
- switch (_optionalChain([provider, 'optionalAccess', _253 => _253.id])) {
7640
+ switch (_optionalChain([provider, 'optionalAccess', _261 => _261.id])) {
7639
7641
  case "openai": {
7640
7642
  if (!process.env.OPENAI_API_KEY) {
7641
7643
  throw new Error(
@@ -7693,7 +7695,7 @@ function getPureModelProvider(provider) {
7693
7695
  })(provider.model);
7694
7696
  }
7695
7697
  default: {
7696
- throw new Error(createUnsupportedProviderErrorMessage(_optionalChain([provider, 'optionalAccess', _254 => _254.id])));
7698
+ throw new Error(createUnsupportedProviderErrorMessage(_optionalChain([provider, 'optionalAccess', _262 => _262.id])));
7697
7699
  }
7698
7700
  }
7699
7701
  }
@@ -7978,7 +7980,7 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
7978
7980
  validateParams(i18nConfig, flags);
7979
7981
  ora.succeed("Localization configuration is valid");
7980
7982
  ora.start("Connecting to Lingo.dev Localization Engine...");
7981
- const isByokMode = !!_optionalChain([i18nConfig, 'optionalAccess', _255 => _255.provider]);
7983
+ const isByokMode = !!_optionalChain([i18nConfig, 'optionalAccess', _263 => _263.provider]);
7982
7984
  if (isByokMode) {
7983
7985
  authId = null;
7984
7986
  ora.succeed("Using external provider (BYOK mode)");
@@ -7992,16 +7994,16 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
7992
7994
  flags
7993
7995
  });
7994
7996
  let buckets = getBuckets(i18nConfig);
7995
- if (_optionalChain([flags, 'access', _256 => _256.bucket, 'optionalAccess', _257 => _257.length])) {
7997
+ if (_optionalChain([flags, 'access', _264 => _264.bucket, 'optionalAccess', _265 => _265.length])) {
7996
7998
  buckets = buckets.filter(
7997
7999
  (bucket) => flags.bucket.includes(bucket.type)
7998
8000
  );
7999
8001
  }
8000
8002
  ora.succeed("Buckets retrieved");
8001
- if (_optionalChain([flags, 'access', _258 => _258.file, 'optionalAccess', _259 => _259.length])) {
8003
+ if (_optionalChain([flags, 'access', _266 => _266.file, 'optionalAccess', _267 => _267.length])) {
8002
8004
  buckets = buckets.map((bucket) => {
8003
8005
  const paths = bucket.paths.filter(
8004
- (path19) => flags.file.find((file) => _optionalChain([path19, 'access', _260 => _260.pathPattern, 'optionalAccess', _261 => _261.includes, 'call', _262 => _262(file)]))
8006
+ (path19) => flags.file.find((file) => _optionalChain([path19, 'access', _268 => _268.pathPattern, 'optionalAccess', _269 => _269.includes, 'call', _270 => _270(file)]))
8005
8007
  );
8006
8008
  return { ...bucket, paths };
8007
8009
  }).filter((bucket) => bucket.paths.length > 0);
@@ -8022,7 +8024,7 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
8022
8024
  });
8023
8025
  }
8024
8026
  }
8025
- const targetLocales = _optionalChain([flags, 'access', _263 => _263.locale, 'optionalAccess', _264 => _264.length]) ? flags.locale : i18nConfig.locale.targets;
8027
+ const targetLocales = _optionalChain([flags, 'access', _271 => _271.locale, 'optionalAccess', _272 => _272.length]) ? flags.locale : i18nConfig.locale.targets;
8026
8028
  ora.start("Setting up localization cache...");
8027
8029
  const checkLockfileProcessor = createDeltaProcessor("");
8028
8030
  const lockfileExists = await checkLockfileProcessor.checkIfLockExists();
@@ -8299,7 +8301,7 @@ var i18n_default = new (0, _interactivecommander.Command)().command("i18n").desc
8299
8301
  }
8300
8302
  const deltaProcessor = createDeltaProcessor(bucketPath.pathPattern);
8301
8303
  const checksums = await deltaProcessor.createChecksums(sourceData);
8302
- if (!_optionalChain([flags, 'access', _265 => _265.locale, 'optionalAccess', _266 => _266.length])) {
8304
+ if (!_optionalChain([flags, 'access', _273 => _273.locale, 'optionalAccess', _274 => _274.length])) {
8303
8305
  await deltaProcessor.saveChecksums(checksums);
8304
8306
  }
8305
8307
  }
@@ -8423,12 +8425,12 @@ function validateParams(i18nConfig, flags) {
8423
8425
  message: "No buckets found in i18n.json. Please add at least one bucket containing i18n content.",
8424
8426
  docUrl: "bucketNotFound"
8425
8427
  });
8426
- } else if (_optionalChain([flags, 'access', _267 => _267.locale, 'optionalAccess', _268 => _268.some, 'call', _269 => _269((locale) => !i18nConfig.locale.targets.includes(locale))])) {
8428
+ } else if (_optionalChain([flags, 'access', _275 => _275.locale, 'optionalAccess', _276 => _276.some, 'call', _277 => _277((locale) => !i18nConfig.locale.targets.includes(locale))])) {
8427
8429
  throw new ValidationError({
8428
8430
  message: `One or more specified locales do not exist in i18n.json locale.targets. Please add them to the list and try again.`,
8429
8431
  docUrl: "localeTargetNotFound"
8430
8432
  });
8431
- } else if (_optionalChain([flags, 'access', _270 => _270.bucket, 'optionalAccess', _271 => _271.some, 'call', _272 => _272(
8433
+ } else if (_optionalChain([flags, 'access', _278 => _278.bucket, 'optionalAccess', _279 => _279.some, 'call', _280 => _280(
8432
8434
  (bucket) => !i18nConfig.buckets[bucket]
8433
8435
  )])) {
8434
8436
  throw new ValidationError({
@@ -8954,7 +8956,7 @@ function createLingoDotDevLocalizer(explicitApiKey) {
8954
8956
  const response = await engine.whoami();
8955
8957
  return {
8956
8958
  authenticated: !!response,
8957
- username: _optionalChain([response, 'optionalAccess', _273 => _273.email])
8959
+ username: _optionalChain([response, 'optionalAccess', _281 => _281.email])
8958
8960
  };
8959
8961
  } catch (e3) {
8960
8962
  return { authenticated: false };
@@ -9062,7 +9064,7 @@ function createExplicitLocalizer(provider) {
9062
9064
  }
9063
9065
  function createAiSdkLocalizer(params) {
9064
9066
  const skipAuth = params.skipAuth === true;
9065
- const apiKey = process.env[_nullishCoalesce(_optionalChain([params, 'optionalAccess', _274 => _274.apiKeyName]), () => ( ""))];
9067
+ const apiKey = process.env[_nullishCoalesce(_optionalChain([params, 'optionalAccess', _282 => _282.apiKeyName]), () => ( ""))];
9066
9068
  if (!skipAuth && !apiKey || !params.apiKeyName) {
9067
9069
  throw new Error(
9068
9070
  _dedent2.default`
@@ -9187,8 +9189,8 @@ async function setup(input2) {
9187
9189
  throw new Error(
9188
9190
  "No buckets found in i18n.json. Please add at least one bucket containing i18n content."
9189
9191
  );
9190
- } else if (_optionalChain([ctx, 'access', _275 => _275.flags, 'access', _276 => _276.bucket, 'optionalAccess', _277 => _277.some, 'call', _278 => _278(
9191
- (bucket) => !_optionalChain([ctx, 'access', _279 => _279.config, 'optionalAccess', _280 => _280.buckets, 'access', _281 => _281[bucket]])
9192
+ } else if (_optionalChain([ctx, 'access', _283 => _283.flags, 'access', _284 => _284.bucket, 'optionalAccess', _285 => _285.some, 'call', _286 => _286(
9193
+ (bucket) => !_optionalChain([ctx, 'access', _287 => _287.config, 'optionalAccess', _288 => _288.buckets, 'access', _289 => _289[bucket]])
9192
9194
  )])) {
9193
9195
  throw new Error(
9194
9196
  `One or more specified buckets do not exist in i18n.json. Please add them to the list first and try again.`
@@ -9201,7 +9203,7 @@ async function setup(input2) {
9201
9203
  title: "Selecting localization provider",
9202
9204
  task: async (ctx, task) => {
9203
9205
  ctx.localizer = createLocalizer(
9204
- _optionalChain([ctx, 'access', _282 => _282.config, 'optionalAccess', _283 => _283.provider]),
9206
+ _optionalChain([ctx, 'access', _290 => _290.config, 'optionalAccess', _291 => _291.provider]),
9205
9207
  ctx.flags.apiKey
9206
9208
  );
9207
9209
  if (!ctx.localizer) {
@@ -9522,7 +9524,7 @@ function createWorkerTask(args) {
9522
9524
  const processableData = _lodash2.default.chain(sourceData).entries().filter(
9523
9525
  ([key, value]) => delta.added.includes(key) || delta.updated.includes(key) || !!args.ctx.flags.force
9524
9526
  ).filter(
9525
- ([key]) => !assignedTask.onlyKeys.length || _optionalChain([assignedTask, 'access', _284 => _284.onlyKeys, 'optionalAccess', _285 => _285.some, 'call', _286 => _286(
9527
+ ([key]) => !assignedTask.onlyKeys.length || _optionalChain([assignedTask, 'access', _292 => _292.onlyKeys, 'optionalAccess', _293 => _293.some, 'call', _294 => _294(
9526
9528
  (pattern) => minimatch(key, pattern)
9527
9529
  )])
9528
9530
  ).fromPairs().value();
@@ -9585,7 +9587,7 @@ function createWorkerTask(args) {
9585
9587
  finalRenamedTargetData
9586
9588
  );
9587
9589
  const checksums2 = await deltaProcessor.createChecksums(sourceData);
9588
- if (!_optionalChain([args, 'access', _287 => _287.ctx, 'access', _288 => _288.flags, 'access', _289 => _289.targetLocale, 'optionalAccess', _290 => _290.length])) {
9590
+ if (!_optionalChain([args, 'access', _295 => _295.ctx, 'access', _296 => _296.flags, 'access', _297 => _297.targetLocale, 'optionalAccess', _298 => _298.length])) {
9589
9591
  await deltaProcessor.saveChecksums(checksums2);
9590
9592
  }
9591
9593
  });
@@ -9776,13 +9778,13 @@ var flagsSchema2 = _zod.z.object({
9776
9778
 
9777
9779
  // src/cli/cmd/run/_utils.ts
9778
9780
  async function determineAuthId(ctx) {
9779
- const isByokMode = !!_optionalChain([ctx, 'access', _291 => _291.config, 'optionalAccess', _292 => _292.provider]);
9781
+ const isByokMode = !!_optionalChain([ctx, 'access', _299 => _299.config, 'optionalAccess', _300 => _300.provider]);
9780
9782
  if (isByokMode) {
9781
9783
  return null;
9782
9784
  } else {
9783
9785
  try {
9784
- const authStatus = await _optionalChain([ctx, 'access', _293 => _293.localizer, 'optionalAccess', _294 => _294.checkAuth, 'call', _295 => _295()]);
9785
- return _optionalChain([authStatus, 'optionalAccess', _296 => _296.username]) || null;
9786
+ const authStatus = await _optionalChain([ctx, 'access', _301 => _301.localizer, 'optionalAccess', _302 => _302.checkAuth, 'call', _303 => _303()]);
9787
+ return _optionalChain([authStatus, 'optionalAccess', _304 => _304.username]) || null;
9786
9788
  } catch (e4) {
9787
9789
  return null;
9788
9790
  }
@@ -9974,7 +9976,7 @@ var InBranchFlow = class extends IntegrationFlow {
9974
9976
  _child_process.execSync.call(void 0, `git config --global safe.directory ${process.cwd()}`);
9975
9977
  _child_process.execSync.call(void 0, `git config user.name "${gitConfig.userName}"`);
9976
9978
  _child_process.execSync.call(void 0, `git config user.email "${gitConfig.userEmail}"`);
9977
- _optionalChain([this, 'access', _297 => _297.platformKit, 'optionalAccess', _298 => _298.gitConfig, 'call', _299 => _299()]);
9979
+ _optionalChain([this, 'access', _305 => _305.platformKit, 'optionalAccess', _306 => _306.gitConfig, 'call', _307 => _307()]);
9978
9980
  _child_process.execSync.call(void 0, `git fetch origin ${baseBranchName}`, { stdio: "inherit" });
9979
9981
  _child_process.execSync.call(void 0, `git checkout ${baseBranchName} --`, { stdio: "inherit" });
9980
9982
  if (!processOwnCommits) {
@@ -10006,7 +10008,7 @@ var InBranchFlow = class extends IntegrationFlow {
10006
10008
  // src/cli/cmd/ci/flows/pull-request.ts
10007
10009
  var PullRequestFlow = class extends InBranchFlow {
10008
10010
  async preRun() {
10009
- const canContinue = await _optionalChain([super.preRun.bind(this), 'optionalCall', _300 => _300()]);
10011
+ const canContinue = await _optionalChain([super.preRun.bind(this), 'optionalCall', _308 => _308()]);
10010
10012
  if (!canContinue) {
10011
10013
  return false;
10012
10014
  }
@@ -10269,10 +10271,10 @@ var BitbucketPlatformKit = class extends PlatformKit {
10269
10271
  repo_slug: this.platformConfig.repositoryName,
10270
10272
  state: "OPEN"
10271
10273
  }).then(({ data: { values } }) => {
10272
- return _optionalChain([values, 'optionalAccess', _301 => _301.find, 'call', _302 => _302(
10273
- ({ source, destination }) => _optionalChain([source, 'optionalAccess', _303 => _303.branch, 'optionalAccess', _304 => _304.name]) === branch && _optionalChain([destination, 'optionalAccess', _305 => _305.branch, 'optionalAccess', _306 => _306.name]) === this.platformConfig.baseBranchName
10274
+ return _optionalChain([values, 'optionalAccess', _309 => _309.find, 'call', _310 => _310(
10275
+ ({ source, destination }) => _optionalChain([source, 'optionalAccess', _311 => _311.branch, 'optionalAccess', _312 => _312.name]) === branch && _optionalChain([destination, 'optionalAccess', _313 => _313.branch, 'optionalAccess', _314 => _314.name]) === this.platformConfig.baseBranchName
10274
10276
  )]);
10275
- }).then((pr) => _optionalChain([pr, 'optionalAccess', _307 => _307.id]));
10277
+ }).then((pr) => _optionalChain([pr, 'optionalAccess', _315 => _315.id]));
10276
10278
  }
10277
10279
  async closePullRequest({ pullRequestNumber }) {
10278
10280
  await this.bb.repositories.declinePullRequest({
@@ -10368,7 +10370,7 @@ var GitHubPlatformKit = class extends PlatformKit {
10368
10370
  repo: this.platformConfig.repositoryName,
10369
10371
  base: this.platformConfig.baseBranchName,
10370
10372
  state: "open"
10371
- }).then(({ data }) => data[0]).then((pr) => _optionalChain([pr, 'optionalAccess', _308 => _308.number]));
10373
+ }).then(({ data }) => data[0]).then((pr) => _optionalChain([pr, 'optionalAccess', _316 => _316.number]));
10372
10374
  }
10373
10375
  async closePullRequest({ pullRequestNumber }) {
10374
10376
  await this.octokit.rest.pulls.update({
@@ -10495,7 +10497,7 @@ var GitlabPlatformKit = class extends PlatformKit {
10495
10497
  sourceBranch: branch,
10496
10498
  state: "opened"
10497
10499
  });
10498
- return _optionalChain([mergeRequests, 'access', _309 => _309[0], 'optionalAccess', _310 => _310.iid]);
10500
+ return _optionalChain([mergeRequests, 'access', _317 => _317[0], 'optionalAccess', _318 => _318.iid]);
10499
10501
  }
10500
10502
  async closePullRequest({
10501
10503
  pullRequestNumber
@@ -10601,7 +10603,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
10601
10603
  }
10602
10604
  const env = {
10603
10605
  LINGODOTDEV_API_KEY: settings.auth.apiKey,
10604
- LINGODOTDEV_PULL_REQUEST: _optionalChain([options, 'access', _311 => _311.pullRequest, 'optionalAccess', _312 => _312.toString, 'call', _313 => _313()]) || "false",
10606
+ LINGODOTDEV_PULL_REQUEST: _optionalChain([options, 'access', _319 => _319.pullRequest, 'optionalAccess', _320 => _320.toString, 'call', _321 => _321()]) || "false",
10605
10607
  ...options.commitMessage && {
10606
10608
  LINGODOTDEV_COMMIT_MESSAGE: options.commitMessage
10607
10609
  },
@@ -10621,7 +10623,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
10621
10623
  const { isPullRequestMode } = platformKit.config;
10622
10624
  ora.info(`Pull request mode: ${isPullRequestMode ? "on" : "off"}`);
10623
10625
  const flow = isPullRequestMode ? new PullRequestFlow(ora, platformKit) : new InBranchFlow(ora, platformKit);
10624
- const canRun = await _optionalChain([flow, 'access', _314 => _314.preRun, 'optionalCall', _315 => _315()]);
10626
+ const canRun = await _optionalChain([flow, 'access', _322 => _322.preRun, 'optionalCall', _323 => _323()]);
10625
10627
  if (canRun === false) {
10626
10628
  return;
10627
10629
  }
@@ -10631,7 +10633,7 @@ var ci_default = new (0, _interactivecommander.Command)().command("ci").descript
10631
10633
  if (!hasChanges) {
10632
10634
  return;
10633
10635
  }
10634
- await _optionalChain([flow, 'access', _316 => _316.postRun, 'optionalCall', _317 => _317()]);
10636
+ await _optionalChain([flow, 'access', _324 => _324.postRun, 'optionalCall', _325 => _325()]);
10635
10637
  });
10636
10638
  function parseBooleanArg(val) {
10637
10639
  if (val === true) return true;
@@ -10668,8 +10670,8 @@ function exitGracefully(elapsedMs = 0) {
10668
10670
  }
10669
10671
  }
10670
10672
  function checkForPendingOperations() {
10671
- const activeHandles = _optionalChain([process, 'access', _318 => _318._getActiveHandles, 'optionalCall', _319 => _319()]) || [];
10672
- const activeRequests = _optionalChain([process, 'access', _320 => _320._getActiveRequests, 'optionalCall', _321 => _321()]) || [];
10673
+ const activeHandles = _optionalChain([process, 'access', _326 => _326._getActiveHandles, 'optionalCall', _327 => _327()]) || [];
10674
+ const activeRequests = _optionalChain([process, 'access', _328 => _328._getActiveRequests, 'optionalCall', _329 => _329()]) || [];
10673
10675
  const nonStandardHandles = activeHandles.filter((handle) => {
10674
10676
  if (handle === process.stdin || handle === process.stdout || handle === process.stderr) {
10675
10677
  return false;
@@ -10738,17 +10740,17 @@ var status_default = new (0, _interactivecommander.Command)().command("status").
10738
10740
  flags
10739
10741
  });
10740
10742
  let buckets = getBuckets(i18nConfig);
10741
- if (_optionalChain([flags, 'access', _322 => _322.bucket, 'optionalAccess', _323 => _323.length])) {
10743
+ if (_optionalChain([flags, 'access', _330 => _330.bucket, 'optionalAccess', _331 => _331.length])) {
10742
10744
  buckets = buckets.filter(
10743
10745
  (bucket) => flags.bucket.includes(bucket.type)
10744
10746
  );
10745
10747
  }
10746
10748
  ora.succeed("Buckets retrieved");
10747
- if (_optionalChain([flags, 'access', _324 => _324.file, 'optionalAccess', _325 => _325.length])) {
10749
+ if (_optionalChain([flags, 'access', _332 => _332.file, 'optionalAccess', _333 => _333.length])) {
10748
10750
  buckets = buckets.map((bucket) => {
10749
10751
  const paths = bucket.paths.filter(
10750
10752
  (path19) => flags.file.find(
10751
- (file) => _optionalChain([path19, 'access', _326 => _326.pathPattern, 'optionalAccess', _327 => _327.includes, 'call', _328 => _328(file)]) || _optionalChain([path19, 'access', _329 => _329.pathPattern, 'optionalAccess', _330 => _330.match, 'call', _331 => _331(file)]) || minimatch(path19.pathPattern, file)
10753
+ (file) => _optionalChain([path19, 'access', _334 => _334.pathPattern, 'optionalAccess', _335 => _335.includes, 'call', _336 => _336(file)]) || _optionalChain([path19, 'access', _337 => _337.pathPattern, 'optionalAccess', _338 => _338.match, 'call', _339 => _339(file)]) || minimatch(path19.pathPattern, file)
10752
10754
  )
10753
10755
  );
10754
10756
  return { ...bucket, paths };
@@ -10768,7 +10770,7 @@ var status_default = new (0, _interactivecommander.Command)().command("status").
10768
10770
  });
10769
10771
  }
10770
10772
  }
10771
- const targetLocales = _optionalChain([flags, 'access', _332 => _332.locale, 'optionalAccess', _333 => _333.length]) ? flags.locale : i18nConfig.locale.targets;
10773
+ const targetLocales = _optionalChain([flags, 'access', _340 => _340.locale, 'optionalAccess', _341 => _341.length]) ? flags.locale : i18nConfig.locale.targets;
10772
10774
  let totalSourceKeyCount = 0;
10773
10775
  let uniqueKeysToTranslate = 0;
10774
10776
  let totalExistingTranslations = 0;
@@ -11174,12 +11176,12 @@ function validateParams2(i18nConfig, flags) {
11174
11176
  message: "No buckets found in i18n.json. Please add at least one bucket containing i18n content.",
11175
11177
  docUrl: "bucketNotFound"
11176
11178
  });
11177
- } else if (_optionalChain([flags, 'access', _334 => _334.locale, 'optionalAccess', _335 => _335.some, 'call', _336 => _336((locale) => !i18nConfig.locale.targets.includes(locale))])) {
11179
+ } else if (_optionalChain([flags, 'access', _342 => _342.locale, 'optionalAccess', _343 => _343.some, 'call', _344 => _344((locale) => !i18nConfig.locale.targets.includes(locale))])) {
11178
11180
  throw new CLIError({
11179
11181
  message: `One or more specified locales do not exist in i18n.json locale.targets. Please add them to the list and try again.`,
11180
11182
  docUrl: "localeTargetNotFound"
11181
11183
  });
11182
- } else if (_optionalChain([flags, 'access', _337 => _337.bucket, 'optionalAccess', _338 => _338.some, 'call', _339 => _339(
11184
+ } else if (_optionalChain([flags, 'access', _345 => _345.bucket, 'optionalAccess', _346 => _346.some, 'call', _347 => _347(
11183
11185
  (bucket) => !i18nConfig.buckets[bucket]
11184
11186
  )])) {
11185
11187
  throw new CLIError({
@@ -11271,7 +11273,7 @@ async function renderHero2() {
11271
11273
  // package.json
11272
11274
  var package_default = {
11273
11275
  name: "lingo.dev",
11274
- version: "0.111.12",
11276
+ version: "0.111.14",
11275
11277
  description: "Lingo.dev CLI",
11276
11278
  private: false,
11277
11279
  publishConfig: {
@@ -11560,7 +11562,7 @@ var purge_default = new (0, _interactivecommander.Command)().command("purge").de
11560
11562
  if (options.file && options.file.length) {
11561
11563
  buckets = buckets.map((bucket) => {
11562
11564
  const paths = bucket.paths.filter(
11563
- (bucketPath) => _optionalChain([options, 'access', _340 => _340.file, 'optionalAccess', _341 => _341.some, 'call', _342 => _342((f) => bucketPath.pathPattern.includes(f))])
11565
+ (bucketPath) => _optionalChain([options, 'access', _348 => _348.file, 'optionalAccess', _349 => _349.some, 'call', _350 => _350((f) => bucketPath.pathPattern.includes(f))])
11564
11566
  );
11565
11567
  return { ...bucket, paths };
11566
11568
  }).filter((bucket) => bucket.paths.length > 0);