lingo.dev 0.74.7 → 0.74.8
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 +55 -73
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +28 -46
- package/build/cli.mjs.map +1 -1
- package/package.json +3 -3
package/build/cli.cjs
CHANGED
|
@@ -704,21 +704,18 @@ var _promises3 = require('fs/promises'); var _promises4 = _interopRequireDefault
|
|
|
704
704
|
function createTextFileLoader(pathPattern) {
|
|
705
705
|
return createLoader({
|
|
706
706
|
async pull(locale) {
|
|
707
|
-
const
|
|
708
|
-
const
|
|
709
|
-
|
|
710
|
-
if (!exists) {
|
|
711
|
-
return "";
|
|
712
|
-
}
|
|
713
|
-
const result = await _promises4.default.readFile(finalPath, "utf-8");
|
|
714
|
-
return result;
|
|
707
|
+
const result = await readFileForLocale(pathPattern, locale);
|
|
708
|
+
const trimmedResult = result.trim();
|
|
709
|
+
return trimmedResult;
|
|
715
710
|
},
|
|
716
|
-
async push(locale, data) {
|
|
711
|
+
async push(locale, data, _19, originalLocale) {
|
|
717
712
|
const draftPath = pathPattern.replace("[locale]", locale);
|
|
718
713
|
const finalPath = _path2.default.resolve(draftPath);
|
|
719
714
|
const dirPath = _path2.default.dirname(finalPath);
|
|
720
715
|
await _promises4.default.mkdir(dirPath, { recursive: true });
|
|
721
|
-
const
|
|
716
|
+
const trimmedPayload = data.trim();
|
|
717
|
+
const trailingNewLine = await getTrailingNewLine(pathPattern, locale, originalLocale);
|
|
718
|
+
let finalPayload = trimmedPayload + trailingNewLine;
|
|
722
719
|
await _promises4.default.writeFile(finalPath, finalPayload, {
|
|
723
720
|
encoding: "utf-8",
|
|
724
721
|
flag: "w"
|
|
@@ -726,6 +723,26 @@ function createTextFileLoader(pathPattern) {
|
|
|
726
723
|
}
|
|
727
724
|
});
|
|
728
725
|
}
|
|
726
|
+
async function readFileForLocale(pathPattern, locale) {
|
|
727
|
+
const draftPath = pathPattern.replace("[locale]", locale);
|
|
728
|
+
const finalPath = _path2.default.resolve(draftPath);
|
|
729
|
+
const exists = await _promises4.default.access(finalPath).then(() => true).catch(() => false);
|
|
730
|
+
if (!exists) {
|
|
731
|
+
return "";
|
|
732
|
+
}
|
|
733
|
+
return _promises4.default.readFile(finalPath, "utf-8");
|
|
734
|
+
}
|
|
735
|
+
async function getTrailingNewLine(pathPattern, locale, originalLocale) {
|
|
736
|
+
let templateData = await readFileForLocale(pathPattern, locale);
|
|
737
|
+
if (!templateData) {
|
|
738
|
+
templateData = await readFileForLocale(pathPattern, originalLocale);
|
|
739
|
+
}
|
|
740
|
+
if (_optionalChain([templateData, 'optionalAccess', _42 => _42.match, 'call', _43 => _43(/[\r\n]$/)])) {
|
|
741
|
+
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";
|
|
742
|
+
return ending;
|
|
743
|
+
}
|
|
744
|
+
return "";
|
|
745
|
+
}
|
|
729
746
|
|
|
730
747
|
// src/cli/loaders/yaml.ts
|
|
731
748
|
var _yaml = require('yaml'); var _yaml2 = _interopRequireDefault(_yaml);
|
|
@@ -939,7 +956,7 @@ function createHtmlLoader() {
|
|
|
939
956
|
break;
|
|
940
957
|
}
|
|
941
958
|
const siblings = Array.from(parent.childNodes).filter(
|
|
942
|
-
(n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access',
|
|
959
|
+
(n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _48 => _48.textContent, 'optionalAccess', _49 => _49.trim, 'call', _50 => _50()])
|
|
943
960
|
);
|
|
944
961
|
const index = siblings.indexOf(current);
|
|
945
962
|
if (index !== -1) {
|
|
@@ -974,11 +991,11 @@ function createHtmlLoader() {
|
|
|
974
991
|
result[getPath(element, attr)] = value;
|
|
975
992
|
}
|
|
976
993
|
});
|
|
977
|
-
Array.from(element.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access',
|
|
994
|
+
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);
|
|
978
995
|
}
|
|
979
996
|
};
|
|
980
|
-
Array.from(document.head.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access',
|
|
981
|
-
Array.from(document.body.childNodes).filter((n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access',
|
|
997
|
+
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);
|
|
998
|
+
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);
|
|
982
999
|
return result;
|
|
983
1000
|
},
|
|
984
1001
|
async push(locale, data, originalInput) {
|
|
@@ -1000,7 +1017,7 @@ function createHtmlLoader() {
|
|
|
1000
1017
|
for (let i = 0; i < indices.length; i++) {
|
|
1001
1018
|
const index = parseInt(indices[i]);
|
|
1002
1019
|
const siblings = Array.from(parent.childNodes).filter(
|
|
1003
|
-
(n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access',
|
|
1020
|
+
(n) => n.nodeType === 1 || n.nodeType === 3 && _optionalChain([n, 'access', _60 => _60.textContent, 'optionalAccess', _61 => _61.trim, 'call', _62 => _62()])
|
|
1004
1021
|
);
|
|
1005
1022
|
if (index >= siblings.length) {
|
|
1006
1023
|
if (i === indices.length - 1) {
|
|
@@ -1107,7 +1124,7 @@ function isSkippableLine(line) {
|
|
|
1107
1124
|
function parsePropertyLine(line) {
|
|
1108
1125
|
const [key, ...valueParts] = line.split("=");
|
|
1109
1126
|
return {
|
|
1110
|
-
key: _optionalChain([key, 'optionalAccess',
|
|
1127
|
+
key: _optionalChain([key, 'optionalAccess', _63 => _63.trim, 'call', _64 => _64()]) || "",
|
|
1111
1128
|
value: valueParts.join("=").trim()
|
|
1112
1129
|
};
|
|
1113
1130
|
}
|
|
@@ -1189,7 +1206,7 @@ function createXcodeXcstringsLoader() {
|
|
|
1189
1206
|
const resultData = {};
|
|
1190
1207
|
for (const [translationKey, _translationEntity] of Object.entries(input.strings)) {
|
|
1191
1208
|
const rootTranslationEntity = _translationEntity;
|
|
1192
|
-
const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess',
|
|
1209
|
+
const langTranslationEntity = _optionalChain([rootTranslationEntity, 'optionalAccess', _65 => _65.localizations, 'optionalAccess', _66 => _66[locale]]);
|
|
1193
1210
|
if (langTranslationEntity) {
|
|
1194
1211
|
if ("stringUnit" in langTranslationEntity) {
|
|
1195
1212
|
resultData[translationKey] = langTranslationEntity.stringUnit.value;
|
|
@@ -1198,7 +1215,7 @@ function createXcodeXcstringsLoader() {
|
|
|
1198
1215
|
resultData[translationKey] = {};
|
|
1199
1216
|
const pluralForms = langTranslationEntity.variations.plural;
|
|
1200
1217
|
for (const form in pluralForms) {
|
|
1201
|
-
if (_optionalChain([pluralForms, 'access',
|
|
1218
|
+
if (_optionalChain([pluralForms, 'access', _67 => _67[form], 'optionalAccess', _68 => _68.stringUnit, 'optionalAccess', _69 => _69.value])) {
|
|
1202
1219
|
resultData[translationKey][form] = pluralForms[form].stringUnit.value;
|
|
1203
1220
|
}
|
|
1204
1221
|
}
|
|
@@ -1345,7 +1362,7 @@ function createPoDataLoader(params) {
|
|
|
1345
1362
|
Object.entries(entries).forEach(([msgid, entry]) => {
|
|
1346
1363
|
if (msgid && entry.msgid) {
|
|
1347
1364
|
const context = entry.msgctxt || "";
|
|
1348
|
-
const fullEntry = _optionalChain([parsedPo, 'access',
|
|
1365
|
+
const fullEntry = _optionalChain([parsedPo, 'access', _70 => _70.translations, 'access', _71 => _71[context], 'optionalAccess', _72 => _72[msgid]]);
|
|
1349
1366
|
if (fullEntry) {
|
|
1350
1367
|
result[msgid] = fullEntry;
|
|
1351
1368
|
}
|
|
@@ -1355,7 +1372,7 @@ function createPoDataLoader(params) {
|
|
|
1355
1372
|
return result;
|
|
1356
1373
|
},
|
|
1357
1374
|
async push(locale, data, originalInput) {
|
|
1358
|
-
const sections = _optionalChain([originalInput, 'optionalAccess',
|
|
1375
|
+
const sections = _optionalChain([originalInput, 'optionalAccess', _73 => _73.split, 'call', _74 => _74("\n\n"), 'access', _75 => _75.filter, 'call', _76 => _76(Boolean)]) || [];
|
|
1359
1376
|
const result = sections.map((section) => {
|
|
1360
1377
|
const sectionPo = _gettextparser2.default.po.parse(section);
|
|
1361
1378
|
const contextKey = _lodash2.default.keys(sectionPo.translations)[0];
|
|
@@ -1397,7 +1414,7 @@ function createPoContentLoader() {
|
|
|
1397
1414
|
entry.msgid,
|
|
1398
1415
|
{
|
|
1399
1416
|
...entry,
|
|
1400
|
-
msgstr: [_optionalChain([data, 'access',
|
|
1417
|
+
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)
|
|
1401
1418
|
}
|
|
1402
1419
|
]).fromPairs().value();
|
|
1403
1420
|
return result;
|
|
@@ -1643,7 +1660,7 @@ function createDatoClient(params) {
|
|
|
1643
1660
|
only_valid: "true",
|
|
1644
1661
|
ids: !records.length ? void 0 : records.join(",")
|
|
1645
1662
|
}
|
|
1646
|
-
}).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess',
|
|
1663
|
+
}).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _81 => _81.response, 'optionalAccess', _82 => _82.body, 'optionalAccess', _83 => _83.data, 'optionalAccess', _84 => _84[0]]) || error));
|
|
1647
1664
|
},
|
|
1648
1665
|
findRecordsForModel: async (modelId, records) => {
|
|
1649
1666
|
try {
|
|
@@ -1653,9 +1670,9 @@ function createDatoClient(params) {
|
|
|
1653
1670
|
filter: {
|
|
1654
1671
|
type: modelId,
|
|
1655
1672
|
only_valid: "true",
|
|
1656
|
-
ids: !_optionalChain([records, 'optionalAccess',
|
|
1673
|
+
ids: !_optionalChain([records, 'optionalAccess', _85 => _85.length]) ? void 0 : records.join(",")
|
|
1657
1674
|
}
|
|
1658
|
-
}).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess',
|
|
1675
|
+
}).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess', _86 => _86.response, 'optionalAccess', _87 => _87.body, 'optionalAccess', _88 => _88.data, 'optionalAccess', _89 => _89[0]]) || error));
|
|
1659
1676
|
return result;
|
|
1660
1677
|
} catch (_error) {
|
|
1661
1678
|
throw new Error(
|
|
@@ -1669,9 +1686,9 @@ function createDatoClient(params) {
|
|
|
1669
1686
|
},
|
|
1670
1687
|
updateRecord: async (id, payload) => {
|
|
1671
1688
|
try {
|
|
1672
|
-
await dato.items.update(id, payload).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess',
|
|
1689
|
+
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));
|
|
1673
1690
|
} catch (_error) {
|
|
1674
|
-
if (_optionalChain([_error, 'optionalAccess',
|
|
1691
|
+
if (_optionalChain([_error, 'optionalAccess', _94 => _94.attributes, 'optionalAccess', _95 => _95.details, 'optionalAccess', _96 => _96.message])) {
|
|
1675
1692
|
throw new Error(
|
|
1676
1693
|
[
|
|
1677
1694
|
`${_error.attributes.details.message}`,
|
|
@@ -1692,9 +1709,9 @@ function createDatoClient(params) {
|
|
|
1692
1709
|
},
|
|
1693
1710
|
enableFieldLocalization: async (args) => {
|
|
1694
1711
|
try {
|
|
1695
|
-
await dato.fields.update(`${args.modelId}::${args.fieldId}`, { localized: true }).catch((error) => Promise.reject(_optionalChain([error, 'optionalAccess',
|
|
1712
|
+
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));
|
|
1696
1713
|
} catch (_error) {
|
|
1697
|
-
if (_optionalChain([_error, 'optionalAccess',
|
|
1714
|
+
if (_optionalChain([_error, 'optionalAccess', _101 => _101.attributes, 'optionalAccess', _102 => _102.code]) === "NOT_FOUND") {
|
|
1698
1715
|
throw new Error(
|
|
1699
1716
|
[
|
|
1700
1717
|
`Field "${args.fieldId}" not found in model "${args.modelId}".`,
|
|
@@ -1702,7 +1719,7 @@ function createDatoClient(params) {
|
|
|
1702
1719
|
].join("\n\n")
|
|
1703
1720
|
);
|
|
1704
1721
|
}
|
|
1705
|
-
if (_optionalChain([_error, 'optionalAccess',
|
|
1722
|
+
if (_optionalChain([_error, 'optionalAccess', _103 => _103.attributes, 'optionalAccess', _104 => _104.details, 'optionalAccess', _105 => _105.message])) {
|
|
1706
1723
|
throw new Error(
|
|
1707
1724
|
[`${_error.attributes.details.message}`, `Error: ${JSON.stringify(_error, null, 2)}`].join("\n\n")
|
|
1708
1725
|
);
|
|
@@ -1768,7 +1785,7 @@ function createDatoApiLoader(config, onConfigUpdate) {
|
|
|
1768
1785
|
}
|
|
1769
1786
|
}
|
|
1770
1787
|
const records = await dato.findRecordsForModel(modelId);
|
|
1771
|
-
const recordChoices = createRecordChoices(records, _optionalChain([config, 'access',
|
|
1788
|
+
const recordChoices = createRecordChoices(records, _optionalChain([config, 'access', _106 => _106.models, 'access', _107 => _107[modelId], 'optionalAccess', _108 => _108.records]) || [], project);
|
|
1772
1789
|
const selectedRecords = await promptRecordSelection(modelName, recordChoices);
|
|
1773
1790
|
result.models[modelId].records = records.filter((record) => selectedRecords.includes(record.id));
|
|
1774
1791
|
updatedConfig.models[modelId].records = selectedRecords;
|
|
@@ -1780,14 +1797,14 @@ function createDatoApiLoader(config, onConfigUpdate) {
|
|
|
1780
1797
|
},
|
|
1781
1798
|
async pull(locale, input, initCtx) {
|
|
1782
1799
|
const result = {};
|
|
1783
|
-
for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess',
|
|
1784
|
-
let records = _optionalChain([initCtx, 'optionalAccess',
|
|
1800
|
+
for (const modelId of _lodash2.default.keys(_optionalChain([initCtx, 'optionalAccess', _109 => _109.models]) || {})) {
|
|
1801
|
+
let records = _optionalChain([initCtx, 'optionalAccess', _110 => _110.models, 'access', _111 => _111[modelId], 'access', _112 => _112.records]) || [];
|
|
1785
1802
|
const recordIds = records.map((record) => record.id);
|
|
1786
1803
|
records = await dato.findRecords(recordIds);
|
|
1787
1804
|
console.log(`Fetched ${records.length} records for model ${modelId}`);
|
|
1788
1805
|
if (records.length > 0) {
|
|
1789
1806
|
result[modelId] = {
|
|
1790
|
-
fields: _optionalChain([initCtx, 'optionalAccess',
|
|
1807
|
+
fields: _optionalChain([initCtx, 'optionalAccess', _113 => _113.models, 'optionalAccess', _114 => _114[modelId], 'optionalAccess', _115 => _115.fields]) || [],
|
|
1791
1808
|
records
|
|
1792
1809
|
};
|
|
1793
1810
|
}
|
|
@@ -1846,7 +1863,7 @@ function createRecordChoices(records, selectedIds = [], project) {
|
|
|
1846
1863
|
return records.map((record) => ({
|
|
1847
1864
|
name: `${record.id} - https://${project.internal_domain}/editor/item_types/${record.item_type.id}/items/${record.id}`,
|
|
1848
1865
|
value: record.id,
|
|
1849
|
-
checked: _optionalChain([selectedIds, 'optionalAccess',
|
|
1866
|
+
checked: _optionalChain([selectedIds, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117(record.id)])
|
|
1850
1867
|
}));
|
|
1851
1868
|
}
|
|
1852
1869
|
async function promptRecordSelection(modelName, choices) {
|
|
@@ -2113,7 +2130,7 @@ var _nodewebvtt = require('node-webvtt'); var _nodewebvtt2 = _interopRequireDefa
|
|
|
2113
2130
|
function createVttLoader() {
|
|
2114
2131
|
return createLoader({
|
|
2115
2132
|
async pull(locale, input) {
|
|
2116
|
-
const vtt = _optionalChain([_nodewebvtt2.default, 'access',
|
|
2133
|
+
const vtt = _optionalChain([_nodewebvtt2.default, 'access', _118 => _118.parse, 'call', _119 => _119(input), 'optionalAccess', _120 => _120.cues]);
|
|
2117
2134
|
if (Object.keys(vtt).length === 0) {
|
|
2118
2135
|
return {};
|
|
2119
2136
|
} else {
|
|
@@ -2165,7 +2182,7 @@ function variableExtractLoader(params) {
|
|
|
2165
2182
|
for (let i = 0; i < matches.length; i++) {
|
|
2166
2183
|
const match = matches[i];
|
|
2167
2184
|
const currentValue = result[key].value;
|
|
2168
|
-
const newValue = _optionalChain([currentValue, 'optionalAccess',
|
|
2185
|
+
const newValue = _optionalChain([currentValue, 'optionalAccess', _121 => _121.replace, 'call', _122 => _122(match, `{variable:${i}}`)]);
|
|
2169
2186
|
result[key].value = newValue;
|
|
2170
2187
|
result[key].variables[i] = match;
|
|
2171
2188
|
}
|
|
@@ -2179,7 +2196,7 @@ function variableExtractLoader(params) {
|
|
|
2179
2196
|
for (let i = 0; i < valueObj.variables.length; i++) {
|
|
2180
2197
|
const variable = valueObj.variables[i];
|
|
2181
2198
|
const currentValue = result[key];
|
|
2182
|
-
const newValue = _optionalChain([currentValue, 'optionalAccess',
|
|
2199
|
+
const newValue = _optionalChain([currentValue, 'optionalAccess', _123 => _123.replace, 'call', _124 => _124(`{variable:${i}}`, variable)]);
|
|
2183
2200
|
result[key] = newValue;
|
|
2184
2201
|
}
|
|
2185
2202
|
}
|
|
@@ -2294,24 +2311,6 @@ function createPlutilJsonTextLoader() {
|
|
|
2294
2311
|
});
|
|
2295
2312
|
}
|
|
2296
2313
|
|
|
2297
|
-
// src/cli/loaders/new-line.ts
|
|
2298
|
-
function createNewLineLoader() {
|
|
2299
|
-
return createLoader({
|
|
2300
|
-
async pull(locale, input) {
|
|
2301
|
-
return input;
|
|
2302
|
-
},
|
|
2303
|
-
async push(locale, data, originalInput) {
|
|
2304
|
-
if (!data) return "";
|
|
2305
|
-
const trimmed = data.replace(/[\r\n]+$/, "");
|
|
2306
|
-
if (_optionalChain([originalInput, 'optionalAccess', _119 => _119.match, 'call', _120 => _120(/[\r\n]$/)])) {
|
|
2307
|
-
const ending = _optionalChain([originalInput, 'optionalAccess', _121 => _121.includes, 'call', _122 => _122("\r\n")]) ? "\r\n" : _optionalChain([originalInput, 'optionalAccess', _123 => _123.includes, 'call', _124 => _124("\r")]) ? "\r" : "\n";
|
|
2308
|
-
return trimmed + ending;
|
|
2309
|
-
}
|
|
2310
|
-
return trimmed;
|
|
2311
|
-
}
|
|
2312
|
-
});
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
2314
|
// src/cli/loaders/index.ts
|
|
2316
2315
|
function createBucketLoader(bucketType, bucketPathPattern) {
|
|
2317
2316
|
switch (bucketType) {
|
|
@@ -2320,7 +2319,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2320
2319
|
case "android":
|
|
2321
2320
|
return composeLoaders(
|
|
2322
2321
|
createTextFileLoader(bucketPathPattern),
|
|
2323
|
-
createNewLineLoader(),
|
|
2324
2322
|
createAndroidLoader(),
|
|
2325
2323
|
createFlatLoader(),
|
|
2326
2324
|
createSyncLoader(),
|
|
@@ -2329,7 +2327,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2329
2327
|
case "csv":
|
|
2330
2328
|
return composeLoaders(
|
|
2331
2329
|
createTextFileLoader(bucketPathPattern),
|
|
2332
|
-
createNewLineLoader(),
|
|
2333
2330
|
createCsvLoader(),
|
|
2334
2331
|
createFlatLoader(),
|
|
2335
2332
|
createSyncLoader(),
|
|
@@ -2338,7 +2335,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2338
2335
|
case "html":
|
|
2339
2336
|
return composeLoaders(
|
|
2340
2337
|
createTextFileLoader(bucketPathPattern),
|
|
2341
|
-
createNewLineLoader(),
|
|
2342
2338
|
createPrettierLoader({ parser: "html", alwaysFormat: true }),
|
|
2343
2339
|
createHtmlLoader(),
|
|
2344
2340
|
createSyncLoader(),
|
|
@@ -2347,7 +2343,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2347
2343
|
case "json":
|
|
2348
2344
|
return composeLoaders(
|
|
2349
2345
|
createTextFileLoader(bucketPathPattern),
|
|
2350
|
-
createNewLineLoader(),
|
|
2351
2346
|
createPrettierLoader({ parser: "json" }),
|
|
2352
2347
|
createJsonLoader(),
|
|
2353
2348
|
createFlatLoader(),
|
|
@@ -2357,7 +2352,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2357
2352
|
case "markdown":
|
|
2358
2353
|
return composeLoaders(
|
|
2359
2354
|
createTextFileLoader(bucketPathPattern),
|
|
2360
|
-
createNewLineLoader(),
|
|
2361
2355
|
createPrettierLoader({ parser: "markdown" }),
|
|
2362
2356
|
createMarkdownLoader(),
|
|
2363
2357
|
createSyncLoader(),
|
|
@@ -2366,7 +2360,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2366
2360
|
case "po":
|
|
2367
2361
|
return composeLoaders(
|
|
2368
2362
|
createTextFileLoader(bucketPathPattern),
|
|
2369
|
-
createNewLineLoader(),
|
|
2370
2363
|
createPoLoader(),
|
|
2371
2364
|
createFlatLoader(),
|
|
2372
2365
|
createSyncLoader(),
|
|
@@ -2376,7 +2369,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2376
2369
|
case "properties":
|
|
2377
2370
|
return composeLoaders(
|
|
2378
2371
|
createTextFileLoader(bucketPathPattern),
|
|
2379
|
-
createNewLineLoader(),
|
|
2380
2372
|
createPropertiesLoader(),
|
|
2381
2373
|
createSyncLoader(),
|
|
2382
2374
|
createUnlocalizableLoader()
|
|
@@ -2384,7 +2376,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2384
2376
|
case "xcode-strings":
|
|
2385
2377
|
return composeLoaders(
|
|
2386
2378
|
createTextFileLoader(bucketPathPattern),
|
|
2387
|
-
createNewLineLoader(),
|
|
2388
2379
|
createXcodeStringsLoader(),
|
|
2389
2380
|
createSyncLoader(),
|
|
2390
2381
|
createUnlocalizableLoader()
|
|
@@ -2392,7 +2383,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2392
2383
|
case "xcode-stringsdict":
|
|
2393
2384
|
return composeLoaders(
|
|
2394
2385
|
createTextFileLoader(bucketPathPattern),
|
|
2395
|
-
createNewLineLoader(),
|
|
2396
2386
|
createXcodeStringsdictLoader(),
|
|
2397
2387
|
createFlatLoader(),
|
|
2398
2388
|
createSyncLoader(),
|
|
@@ -2401,7 +2391,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2401
2391
|
case "xcode-xcstrings":
|
|
2402
2392
|
return composeLoaders(
|
|
2403
2393
|
createTextFileLoader(bucketPathPattern),
|
|
2404
|
-
createNewLineLoader(),
|
|
2405
2394
|
createPlutilJsonTextLoader(),
|
|
2406
2395
|
createJsonLoader(),
|
|
2407
2396
|
createXcodeXcstringsLoader(),
|
|
@@ -2413,7 +2402,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2413
2402
|
case "yaml":
|
|
2414
2403
|
return composeLoaders(
|
|
2415
2404
|
createTextFileLoader(bucketPathPattern),
|
|
2416
|
-
createNewLineLoader(),
|
|
2417
2405
|
createPrettierLoader({ parser: "yaml" }),
|
|
2418
2406
|
createYamlLoader(),
|
|
2419
2407
|
createFlatLoader(),
|
|
@@ -2423,7 +2411,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2423
2411
|
case "yaml-root-key":
|
|
2424
2412
|
return composeLoaders(
|
|
2425
2413
|
createTextFileLoader(bucketPathPattern),
|
|
2426
|
-
createNewLineLoader(),
|
|
2427
2414
|
createPrettierLoader({ parser: "yaml" }),
|
|
2428
2415
|
createYamlLoader(),
|
|
2429
2416
|
createRootKeyLoader(true),
|
|
@@ -2434,7 +2421,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2434
2421
|
case "flutter":
|
|
2435
2422
|
return composeLoaders(
|
|
2436
2423
|
createTextFileLoader(bucketPathPattern),
|
|
2437
|
-
createNewLineLoader(),
|
|
2438
2424
|
createPrettierLoader({ parser: "json" }),
|
|
2439
2425
|
createJsonLoader(),
|
|
2440
2426
|
createFlutterLoader(),
|
|
@@ -2445,7 +2431,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2445
2431
|
case "xliff":
|
|
2446
2432
|
return composeLoaders(
|
|
2447
2433
|
createTextFileLoader(bucketPathPattern),
|
|
2448
|
-
createNewLineLoader(),
|
|
2449
2434
|
createXliffLoader(),
|
|
2450
2435
|
createFlatLoader(),
|
|
2451
2436
|
createSyncLoader(),
|
|
@@ -2454,7 +2439,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2454
2439
|
case "xml":
|
|
2455
2440
|
return composeLoaders(
|
|
2456
2441
|
createTextFileLoader(bucketPathPattern),
|
|
2457
|
-
createNewLineLoader(),
|
|
2458
2442
|
createXmlLoader(),
|
|
2459
2443
|
createFlatLoader(),
|
|
2460
2444
|
createSyncLoader(),
|
|
@@ -2463,7 +2447,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2463
2447
|
case "srt":
|
|
2464
2448
|
return composeLoaders(
|
|
2465
2449
|
createTextFileLoader(bucketPathPattern),
|
|
2466
|
-
createNewLineLoader(),
|
|
2467
2450
|
createSrtLoader(),
|
|
2468
2451
|
createSyncLoader(),
|
|
2469
2452
|
createUnlocalizableLoader()
|
|
@@ -2478,7 +2461,6 @@ function createBucketLoader(bucketType, bucketPathPattern) {
|
|
|
2478
2461
|
case "vtt":
|
|
2479
2462
|
return composeLoaders(
|
|
2480
2463
|
createTextFileLoader(bucketPathPattern),
|
|
2481
|
-
createNewLineLoader(),
|
|
2482
2464
|
createVttLoader(),
|
|
2483
2465
|
createSyncLoader(),
|
|
2484
2466
|
createUnlocalizableLoader()
|
|
@@ -3175,7 +3157,7 @@ function displaySummary(results) {
|
|
|
3175
3157
|
// package.json
|
|
3176
3158
|
var package_default = {
|
|
3177
3159
|
name: "lingo.dev",
|
|
3178
|
-
version: "0.74.
|
|
3160
|
+
version: "0.74.8",
|
|
3179
3161
|
description: "Lingo.dev CLI",
|
|
3180
3162
|
private: false,
|
|
3181
3163
|
publishConfig: {
|