lingo.dev 0.117.19 → 0.117.21
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 +15 -10
- package/build/cli.cjs.map +1 -1
- package/build/cli.mjs +15 -10
- package/build/cli.mjs.map +1 -1
- package/package.json +2 -2
package/build/cli.mjs
CHANGED
|
@@ -1596,8 +1596,10 @@ function createLoader(lDefinition) {
|
|
|
1596
1596
|
const state = {
|
|
1597
1597
|
defaultLocale: void 0,
|
|
1598
1598
|
originalInput: void 0,
|
|
1599
|
-
pullInput
|
|
1600
|
-
|
|
1599
|
+
// Store pullInput and pullOutput per-locale to avoid race conditions
|
|
1600
|
+
// when multiple locales are processed concurrently
|
|
1601
|
+
pullInputByLocale: /* @__PURE__ */ new Map(),
|
|
1602
|
+
pullOutputByLocale: /* @__PURE__ */ new Map(),
|
|
1601
1603
|
initCtx: void 0
|
|
1602
1604
|
};
|
|
1603
1605
|
return {
|
|
@@ -1628,7 +1630,7 @@ function createLoader(lDefinition) {
|
|
|
1628
1630
|
if (locale === state.defaultLocale) {
|
|
1629
1631
|
state.originalInput = input2 || null;
|
|
1630
1632
|
}
|
|
1631
|
-
state.
|
|
1633
|
+
state.pullInputByLocale.set(locale, input2 || null);
|
|
1632
1634
|
const result = await lDefinition.pull(
|
|
1633
1635
|
locale,
|
|
1634
1636
|
input2,
|
|
@@ -1636,7 +1638,7 @@ function createLoader(lDefinition) {
|
|
|
1636
1638
|
state.defaultLocale,
|
|
1637
1639
|
state.originalInput
|
|
1638
1640
|
);
|
|
1639
|
-
state.
|
|
1641
|
+
state.pullOutputByLocale.set(locale, result);
|
|
1640
1642
|
return result;
|
|
1641
1643
|
},
|
|
1642
1644
|
async push(locale, data) {
|
|
@@ -1646,13 +1648,15 @@ function createLoader(lDefinition) {
|
|
|
1646
1648
|
if (state.originalInput === void 0) {
|
|
1647
1649
|
throw new Error("Cannot push data without pulling first");
|
|
1648
1650
|
}
|
|
1651
|
+
const pullInput = state.pullInputByLocale.get(locale) ?? state.pullInputByLocale.get(state.defaultLocale) ?? null;
|
|
1652
|
+
const pullOutput = state.pullOutputByLocale.get(locale) ?? state.pullOutputByLocale.get(state.defaultLocale) ?? null;
|
|
1649
1653
|
const pushResult = await lDefinition.push(
|
|
1650
1654
|
locale,
|
|
1651
1655
|
data,
|
|
1652
1656
|
state.originalInput,
|
|
1653
1657
|
state.defaultLocale,
|
|
1654
|
-
|
|
1655
|
-
|
|
1658
|
+
pullInput,
|
|
1659
|
+
pullOutput
|
|
1656
1660
|
);
|
|
1657
1661
|
return pushResult;
|
|
1658
1662
|
}
|
|
@@ -11124,9 +11128,6 @@ var i18n_default = new Command14().command("i18n").description(
|
|
|
11124
11128
|
"Stop immediately on first error instead of continuing to process remaining buckets and locales (fail-fast mode)"
|
|
11125
11129
|
).action(async function(options) {
|
|
11126
11130
|
updateGitignore();
|
|
11127
|
-
await trackEvent(null, "cmd.i18n.start", {
|
|
11128
|
-
rawOptions: options
|
|
11129
|
-
});
|
|
11130
11131
|
const ora = Ora9();
|
|
11131
11132
|
let flags;
|
|
11132
11133
|
try {
|
|
@@ -11174,6 +11175,10 @@ var i18n_default = new Command14().command("i18n").description(
|
|
|
11174
11175
|
authId = auth.id;
|
|
11175
11176
|
ora.succeed(`Authenticated as ${auth.email}`);
|
|
11176
11177
|
}
|
|
11178
|
+
await trackEvent(authId, "cmd.i18n.start", {
|
|
11179
|
+
i18nConfig,
|
|
11180
|
+
flags
|
|
11181
|
+
});
|
|
11177
11182
|
let buckets = getBuckets(i18nConfig);
|
|
11178
11183
|
if (flags.bucket?.length) {
|
|
11179
11184
|
buckets = buckets.filter(
|
|
@@ -14713,7 +14718,7 @@ async function renderHero2() {
|
|
|
14713
14718
|
// package.json
|
|
14714
14719
|
var package_default = {
|
|
14715
14720
|
name: "lingo.dev",
|
|
14716
|
-
version: "0.117.
|
|
14721
|
+
version: "0.117.21",
|
|
14717
14722
|
description: "Lingo.dev CLI",
|
|
14718
14723
|
private: false,
|
|
14719
14724
|
repository: {
|