i18next-cli 1.46.2 → 1.46.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/dist/cjs/cli.js CHANGED
@@ -28,7 +28,7 @@ const program = new commander.Command();
28
28
  program
29
29
  .name('i18next-cli')
30
30
  .description('A unified, high-performance i18next CLI.')
31
- .version('1.46.2'); // This string is replaced with the actual version at build time by rollup
31
+ .version('1.46.4'); // This string is replaced with the actual version at build time by rollup
32
32
  // new: global config override option
33
33
  program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
34
34
  program
@@ -57,7 +57,8 @@ async function runExtractor(config, options = {}) {
57
57
  spinner.text = `Found ${allKeys.size} unique keys. Updating translation files...`;
58
58
  const results = await translationManager.getTranslations(allKeys, objectKeys, config, {
59
59
  syncPrimaryWithDefaults: options.syncPrimaryWithDefaults,
60
- syncAll: options.syncAll
60
+ syncAll: options.syncAll,
61
+ logger: options.logger
61
62
  });
62
63
  let anyFileUpdated = false;
63
64
  for (const result of results) {
@@ -5,6 +5,7 @@ var glob = require('glob');
5
5
  var nestedObject = require('../../utils/nested-object.js');
6
6
  var fileUtils = require('../../utils/file-utils.js');
7
7
  var defaultValue = require('../../utils/default-value.js');
8
+ var logger = require('../../utils/logger.js');
8
9
 
9
10
  // used for natural language check
10
11
  const chars = [' ', ',', '?', '!', ';'];
@@ -98,18 +99,13 @@ function hasEmptySegments(key, separator) {
98
99
  }
99
100
  /**
100
101
  * Detects a nesting conflict for `key` against the object being built.
102
+ * Returns the conflicting ancestor/descendant key path as a string when a
103
+ * conflict is found, or `null` when there is no conflict.
101
104
  *
102
- * Returns true when:
103
- * - A prefix of `key` already resolves to a *non-object* value in `obj`
104
- * (we cannot descend into a string to set a child).
105
- * - A parent of a segment in `key` would clobber an existing sub-tree
106
- * (the key itself resolves to an object but a new leaf is about to overwrite it
107
- * and the object already has children from a deeper extracted key).
108
- *
109
- * In both cases the caller should skip the conflicting key rather than producing
110
- * a silently-wrong flat fallback.
105
+ * The returned string lets callers produce an actionable error message
106
+ * pointing to the specific key that is already occupying the conflicting path.
111
107
  */
112
- function hasNestingConflict(obj, key, separator) {
108
+ function findNestingConflict(obj, key, separator) {
113
109
  const parts = key.split(separator);
114
110
  let current = obj;
115
111
  for (let i = 0; i < parts.length - 1; i++) {
@@ -117,12 +113,12 @@ function hasNestingConflict(obj, key, separator) {
117
113
  const value = current[part];
118
114
  if (value === undefined || value === null) {
119
115
  // Path does not exist yet — no conflict
120
- return false;
116
+ return null;
121
117
  }
122
118
  if (typeof value !== 'object' || Array.isArray(value)) {
123
119
  // A non-object value already occupies an ancestor segment.
124
120
  // We cannot nest inside a string/number/array.
125
- return true;
121
+ return parts.slice(0, i + 1).join(separator);
126
122
  }
127
123
  current = value;
128
124
  }
@@ -132,9 +128,10 @@ function hasNestingConflict(obj, key, separator) {
132
128
  const leafPart = parts[parts.length - 1];
133
129
  const leafValue = current[leafPart];
134
130
  if (typeof leafValue === 'object' && leafValue !== null && !Array.isArray(leafValue) && Object.keys(leafValue).length > 0) {
135
- return true;
131
+ // The conflicting path is the key itself (it already has nested children)
132
+ return key;
136
133
  }
137
- return false;
134
+ return null;
138
135
  }
139
136
  /**
140
137
  * Recursively sorts the keys of an object.
@@ -212,7 +209,7 @@ function sortObject(obj, config, customSort) {
212
209
  * A helper function to build a new translation object for a single namespace.
213
210
  * This centralizes the core logic of merging keys.
214
211
  */
215
- function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false) {
212
+ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, logger$1 = new logger.ConsoleLogger()) {
216
213
  const { keySeparator = '.', sort = true, removeUnusedKeys = true, primaryLanguage, defaultValue: emptyDefaultValue = '', pluralSeparator = '_', contextSeparator = '_', preserveContextVariants = false, } = config.extract;
217
214
  const nsSep = typeof config.extract.nsSeparator === 'string' ? config.extract.nsSeparator : ':';
218
215
  // Keep the raw configured defaultValue so we can distinguish:
@@ -698,14 +695,16 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
698
695
  // that was already written by a different extracted key, e.g.:
699
696
  // t("a.b") => sets a.b = string
700
697
  // t("a.b.c") => tries to descend into a.b which is already a string
701
- // In that situation we skip the conflicting key rather than producing a
702
- // silently-wrong top-level flat fallback like { "a.b.c": "a.b.c" }.
703
- if (separator && typeof separator === 'string' && hasNestingConflict(newTranslations, key, separator)) {
704
- // Log at most once per key so the output is not spammy
705
- // (the logger reference is captured from the outer scope via closure – it is not
706
- // directly available here, but we can at least avoid crashing silently).
707
- // Callers / tests can verify the key is simply absent from the output.
708
- continue;
698
+ // In that situation we skip the conflicting key and emit a log error so
699
+ // developers see the problem immediately a skipped key becomes a missing
700
+ // translation at runtime.
701
+ if (separator && typeof separator === 'string') {
702
+ const conflictingPath = findNestingConflict(newTranslations, key, separator);
703
+ if (conflictingPath !== null) {
704
+ logger$1.error(`Nesting conflict: key "${key}" conflicts with existing key "${conflictingPath}". ` +
705
+ `"${key}" will be skipped — fix the overlapping key paths in your source code to avoid missing translations at runtime.`);
706
+ continue;
707
+ }
709
708
  }
710
709
  nestedObject.setNestedValue(newTranslations, key, valueToSet, separator);
711
710
  }
@@ -786,7 +785,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
786
785
  * // Results contain update status and new/existing translations for each locale.
787
786
  * ```
788
787
  */
789
- async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false } = {}) {
788
+ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, logger: logger$1 = new logger.ConsoleLogger() } = {}) {
790
789
  config.extract.primaryLanguage ||= config.locales[0] || 'en';
791
790
  config.extract.secondaryLanguages ||= config.locales.filter((l) => l !== config?.extract?.primaryLanguage);
792
791
  const patternsToPreserve = [...(config.extract.preservePatterns || [])];
@@ -874,12 +873,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
874
873
  const nsKeys = keysByNS.get(nsKey) || [];
875
874
  if (nsKey === NO_NS_TOKEN) {
876
875
  // keys without namespace -> merged into top-level of the merged file
877
- const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults);
876
+ const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, undefined, logger$1);
878
877
  Object.assign(newMergedTranslations, built);
879
878
  }
880
879
  else {
881
880
  const existingTranslations = existingMergedFile[nsKey] || {};
882
- newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults);
881
+ newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, undefined, logger$1);
883
882
  }
884
883
  }
885
884
  // Preserve ignored namespaces as-is from the existing merged file
@@ -917,7 +916,7 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
917
916
  const outputPath = fileUtils.getOutputPath(config.extract.output, locale, ns);
918
917
  const fullPath = node_path.resolve(process.cwd(), outputPath);
919
918
  const existingTranslations = await fileUtils.loadTranslationFile(fullPath) || {};
920
- const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll);
919
+ const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
921
920
  const oldContent = JSON.stringify(existingTranslations, null, indentation);
922
921
  const newContent = JSON.stringify(newTranslations, null, indentation);
923
922
  // Push one result per namespace file
package/dist/esm/cli.js CHANGED
@@ -26,7 +26,7 @@ const program = new Command();
26
26
  program
27
27
  .name('i18next-cli')
28
28
  .description('A unified, high-performance i18next CLI.')
29
- .version('1.46.2'); // This string is replaced with the actual version at build time by rollup
29
+ .version('1.46.4'); // This string is replaced with the actual version at build time by rollup
30
30
  // new: global config override option
31
31
  program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
32
32
  program
@@ -55,7 +55,8 @@ async function runExtractor(config, options = {}) {
55
55
  spinner.text = `Found ${allKeys.size} unique keys. Updating translation files...`;
56
56
  const results = await getTranslations(allKeys, objectKeys, config, {
57
57
  syncPrimaryWithDefaults: options.syncPrimaryWithDefaults,
58
- syncAll: options.syncAll
58
+ syncAll: options.syncAll,
59
+ logger: options.logger
59
60
  });
60
61
  let anyFileUpdated = false;
61
62
  for (const result of results) {
@@ -3,6 +3,7 @@ import { glob } from 'glob';
3
3
  import { getNestedKeys, getNestedValue, setNestedValue } from '../../utils/nested-object.js';
4
4
  import { getOutputPath, loadTranslationFile } from '../../utils/file-utils.js';
5
5
  import { resolveDefaultValue } from '../../utils/default-value.js';
6
+ import { ConsoleLogger } from '../../utils/logger.js';
6
7
 
7
8
  // used for natural language check
8
9
  const chars = [' ', ',', '?', '!', ';'];
@@ -96,18 +97,13 @@ function hasEmptySegments(key, separator) {
96
97
  }
97
98
  /**
98
99
  * Detects a nesting conflict for `key` against the object being built.
100
+ * Returns the conflicting ancestor/descendant key path as a string when a
101
+ * conflict is found, or `null` when there is no conflict.
99
102
  *
100
- * Returns true when:
101
- * - A prefix of `key` already resolves to a *non-object* value in `obj`
102
- * (we cannot descend into a string to set a child).
103
- * - A parent of a segment in `key` would clobber an existing sub-tree
104
- * (the key itself resolves to an object but a new leaf is about to overwrite it
105
- * and the object already has children from a deeper extracted key).
106
- *
107
- * In both cases the caller should skip the conflicting key rather than producing
108
- * a silently-wrong flat fallback.
103
+ * The returned string lets callers produce an actionable error message
104
+ * pointing to the specific key that is already occupying the conflicting path.
109
105
  */
110
- function hasNestingConflict(obj, key, separator) {
106
+ function findNestingConflict(obj, key, separator) {
111
107
  const parts = key.split(separator);
112
108
  let current = obj;
113
109
  for (let i = 0; i < parts.length - 1; i++) {
@@ -115,12 +111,12 @@ function hasNestingConflict(obj, key, separator) {
115
111
  const value = current[part];
116
112
  if (value === undefined || value === null) {
117
113
  // Path does not exist yet — no conflict
118
- return false;
114
+ return null;
119
115
  }
120
116
  if (typeof value !== 'object' || Array.isArray(value)) {
121
117
  // A non-object value already occupies an ancestor segment.
122
118
  // We cannot nest inside a string/number/array.
123
- return true;
119
+ return parts.slice(0, i + 1).join(separator);
124
120
  }
125
121
  current = value;
126
122
  }
@@ -130,9 +126,10 @@ function hasNestingConflict(obj, key, separator) {
130
126
  const leafPart = parts[parts.length - 1];
131
127
  const leafValue = current[leafPart];
132
128
  if (typeof leafValue === 'object' && leafValue !== null && !Array.isArray(leafValue) && Object.keys(leafValue).length > 0) {
133
- return true;
129
+ // The conflicting path is the key itself (it already has nested children)
130
+ return key;
134
131
  }
135
- return false;
132
+ return null;
136
133
  }
137
134
  /**
138
135
  * Recursively sorts the keys of an object.
@@ -210,7 +207,7 @@ function sortObject(obj, config, customSort) {
210
207
  * A helper function to build a new translation object for a single namespace.
211
208
  * This centralizes the core logic of merging keys.
212
209
  */
213
- function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false) {
210
+ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, namespace, preservePatterns = [], objectKeys = new Set(), syncPrimaryWithDefaults = false, syncAll = false, logger = new ConsoleLogger()) {
214
211
  const { keySeparator = '.', sort = true, removeUnusedKeys = true, primaryLanguage, defaultValue: emptyDefaultValue = '', pluralSeparator = '_', contextSeparator = '_', preserveContextVariants = false, } = config.extract;
215
212
  const nsSep = typeof config.extract.nsSeparator === 'string' ? config.extract.nsSeparator : ':';
216
213
  // Keep the raw configured defaultValue so we can distinguish:
@@ -696,14 +693,16 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
696
693
  // that was already written by a different extracted key, e.g.:
697
694
  // t("a.b") => sets a.b = string
698
695
  // t("a.b.c") => tries to descend into a.b which is already a string
699
- // In that situation we skip the conflicting key rather than producing a
700
- // silently-wrong top-level flat fallback like { "a.b.c": "a.b.c" }.
701
- if (separator && typeof separator === 'string' && hasNestingConflict(newTranslations, key, separator)) {
702
- // Log at most once per key so the output is not spammy
703
- // (the logger reference is captured from the outer scope via closure – it is not
704
- // directly available here, but we can at least avoid crashing silently).
705
- // Callers / tests can verify the key is simply absent from the output.
706
- continue;
696
+ // In that situation we skip the conflicting key and emit a log error so
697
+ // developers see the problem immediately a skipped key becomes a missing
698
+ // translation at runtime.
699
+ if (separator && typeof separator === 'string') {
700
+ const conflictingPath = findNestingConflict(newTranslations, key, separator);
701
+ if (conflictingPath !== null) {
702
+ logger.error(`Nesting conflict: key "${key}" conflicts with existing key "${conflictingPath}". ` +
703
+ `"${key}" will be skipped — fix the overlapping key paths in your source code to avoid missing translations at runtime.`);
704
+ continue;
705
+ }
707
706
  }
708
707
  setNestedValue(newTranslations, key, valueToSet, separator);
709
708
  }
@@ -784,7 +783,7 @@ function buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale,
784
783
  * // Results contain update status and new/existing translations for each locale.
785
784
  * ```
786
785
  */
787
- async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false } = {}) {
786
+ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaults = false, syncAll = false, logger = new ConsoleLogger() } = {}) {
788
787
  config.extract.primaryLanguage ||= config.locales[0] || 'en';
789
788
  config.extract.secondaryLanguages ||= config.locales.filter((l) => l !== config?.extract?.primaryLanguage);
790
789
  const patternsToPreserve = [...(config.extract.preservePatterns || [])];
@@ -872,12 +871,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
872
871
  const nsKeys = keysByNS.get(nsKey) || [];
873
872
  if (nsKey === NO_NS_TOKEN) {
874
873
  // keys without namespace -> merged into top-level of the merged file
875
- const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults);
874
+ const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, undefined, logger);
876
875
  Object.assign(newMergedTranslations, built);
877
876
  }
878
877
  else {
879
878
  const existingTranslations = existingMergedFile[nsKey] || {};
880
- newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults);
879
+ newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, undefined, logger);
881
880
  }
882
881
  }
883
882
  // Preserve ignored namespaces as-is from the existing merged file
@@ -915,7 +914,7 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
915
914
  const outputPath = getOutputPath(config.extract.output, locale, ns);
916
915
  const fullPath = resolve(process.cwd(), outputPath);
917
916
  const existingTranslations = await loadTranslationFile(fullPath) || {};
918
- const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll);
917
+ const newTranslations = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, ns, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
919
918
  const oldContent = JSON.stringify(existingTranslations, null, indentation);
920
919
  const newContent = JSON.stringify(newTranslations, null, indentation);
921
920
  // Push one result per namespace file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18next-cli",
3
- "version": "1.46.2",
3
+ "version": "1.46.4",
4
4
  "description": "A unified, high-performance i18next CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +1 @@
1
- {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/extractor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAMtF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CACX,GACL,OAAO,CAAC;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAsE1D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC7C,MAAM,GAAE,MAA4B,EACpC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CA8Gf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,uBAA+B,EAAE,GAAE;IAAE,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAAO,sDAO3I"}
1
+ {"version":3,"file":"extractor.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/extractor.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAMtF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAK5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,oBAAoB,EAC5B,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;CACX,GACL,OAAO,CAAC;IAAE,cAAc,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,CAAC,CAuE1D;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC7C,MAAM,GAAE,MAA4B,EACpC,UAAU,CAAC,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,IAAI,CAAC,CA8Gf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,OAAO,CAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,uBAA+B,EAAE,GAAE;IAAE,uBAAuB,CAAC,EAAE,OAAO,CAAA;CAAO,sDAO3I"}
@@ -1,4 +1,4 @@
1
- import { TranslationResult, ExtractedKey, I18nextToolkitConfig } from '../../types';
1
+ import { TranslationResult, ExtractedKey, I18nextToolkitConfig, Logger } from '../../types';
2
2
  /**
3
3
  * Processes extracted translation keys and generates translation files for all configured locales.
4
4
  *
@@ -28,8 +28,9 @@ import { TranslationResult, ExtractedKey, I18nextToolkitConfig } from '../../typ
28
28
  * // Results contain update status and new/existing translations for each locale.
29
29
  * ```
30
30
  */
31
- export declare function getTranslations(keys: Map<string, ExtractedKey>, objectKeys: Set<string>, config: I18nextToolkitConfig, { syncPrimaryWithDefaults, syncAll }?: {
31
+ export declare function getTranslations(keys: Map<string, ExtractedKey>, objectKeys: Set<string>, config: I18nextToolkitConfig, { syncPrimaryWithDefaults, syncAll, logger }?: {
32
32
  syncPrimaryWithDefaults?: boolean;
33
33
  syncAll?: boolean;
34
+ logger?: Logger;
34
35
  }): Promise<TranslationResult[]>;
35
36
  //# sourceMappingURL=translation-manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AA82BnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,oBAAoB,EAC5B,EACE,uBAA+B,EAC/B,OAAe,EAChB,GAAE;IACD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;CACb,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA8J9B"}
1
+ {"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAg3B3F;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,oBAAoB,EAC5B,EACE,uBAA+B,EAC/B,OAAe,EACf,MAA4B,EAC7B,GAAE;IACD,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CACX,GACL,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA8J9B"}