lingo.dev 0.92.15 → 0.92.16

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.mjs CHANGED
@@ -1096,7 +1096,8 @@ function createLoader(lDefinition) {
1096
1096
  locale,
1097
1097
  input2,
1098
1098
  state.initCtx,
1099
- state.defaultLocale
1099
+ state.defaultLocale,
1100
+ state.originalInput
1100
1101
  );
1101
1102
  state.pullOutput = result;
1102
1103
  return result;
@@ -2922,11 +2923,12 @@ function createVariableLoader(params) {
2922
2923
  function variableExtractLoader(params) {
2923
2924
  const specifierPattern = getFormatSpecifierPattern(params.type);
2924
2925
  return createLoader({
2925
- pull: async (locale, input2) => {
2926
+ pull: async (locale, input2, initXtx, originalLocale, originalInput) => {
2926
2927
  const result = {};
2927
2928
  const inputValues = _16.omitBy(input2, _16.isEmpty);
2928
2929
  for (const [key, value] of Object.entries(inputValues)) {
2929
- const matches = value.match(specifierPattern) || [];
2930
+ const originalValue = originalInput[key];
2931
+ const matches = originalValue.match(specifierPattern) || [];
2930
2932
  result[key] = result[key] || {
2931
2933
  value,
2932
2934
  variables: []
@@ -2941,7 +2943,7 @@ function variableExtractLoader(params) {
2941
2943
  }
2942
2944
  return result;
2943
2945
  },
2944
- push: async (locale, data) => {
2946
+ push: async (locale, data, originalInput, originalDefaultLocale, pullInput, pullOutput) => {
2945
2947
  const result = {};
2946
2948
  for (const [key, valueObj] of Object.entries(data)) {
2947
2949
  result[key] = valueObj.value;
@@ -2964,7 +2966,7 @@ function variableContentLoader() {
2964
2966
  },
2965
2967
  push: async (locale, data, originalInput, defaultLocale, pullInput) => {
2966
2968
  const result = _16.cloneDeep(
2967
- pullInput || {}
2969
+ originalInput || {}
2968
2970
  );
2969
2971
  for (const [key, originalValueObj] of Object.entries(result)) {
2970
2972
  result[key] = {
@@ -2991,7 +2993,7 @@ function getFormatSpecifierPattern(type) {
2991
2993
  import _17 from "lodash";
2992
2994
  function createSyncLoader() {
2993
2995
  return createLoader({
2994
- async pull(locale, input2, originalInput) {
2996
+ async pull(locale, input2, initCtx, originalLocale, originalInput) {
2995
2997
  if (!originalInput) {
2996
2998
  return input2;
2997
2999
  }
@@ -6367,7 +6369,7 @@ async function renderHero() {
6367
6369
  // package.json
6368
6370
  var package_default = {
6369
6371
  name: "lingo.dev",
6370
- version: "0.92.15",
6372
+ version: "0.92.16",
6371
6373
  description: "Lingo.dev CLI",
6372
6374
  private: false,
6373
6375
  publishConfig: {