i18next-cli 1.51.6 → 1.51.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/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/translation-manager.js +2 -2
- package/dist/cjs/extractor/parsers/call-expression-handler.js +42 -18
- package/dist/cjs/extractor/parsers/expression-resolver.js +28 -4
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/translation-manager.js +2 -2
- package/dist/esm/extractor/parsers/call-expression-handler.js +42 -18
- package/dist/esm/extractor/parsers/expression-resolver.js +28 -4
- package/package.json +1 -1
- package/types/extractor/parsers/call-expression-handler.d.ts +10 -7
- package/types/extractor/parsers/call-expression-handler.d.ts.map +1 -1
- package/types/extractor/parsers/expression-resolver.d.ts.map +1 -1
package/dist/cjs/cli.js
CHANGED
|
@@ -31,7 +31,7 @@ const program = new commander.Command();
|
|
|
31
31
|
program
|
|
32
32
|
.name('i18next-cli')
|
|
33
33
|
.description('A unified, high-performance i18next CLI.')
|
|
34
|
-
.version('1.51.
|
|
34
|
+
.version('1.51.8'); // This string is replaced with the actual version at build time by rollup
|
|
35
35
|
// new: global config override option
|
|
36
36
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
37
37
|
program
|
|
@@ -925,12 +925,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
925
925
|
const nsKeys = keysByNS.get(nsKey) || [];
|
|
926
926
|
if (isTopLevel(nsKey)) {
|
|
927
927
|
// keys without namespace -> merged into top-level of the merged file
|
|
928
|
-
const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults,
|
|
928
|
+
const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
|
|
929
929
|
Object.assign(newMergedTranslations, built);
|
|
930
930
|
}
|
|
931
931
|
else {
|
|
932
932
|
const existingTranslations = existingMergedFile[nsKey] || {};
|
|
933
|
-
newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults,
|
|
933
|
+
newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger$1);
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
936
|
// Preserve ignored namespaces as-is from the existing merged file
|
|
@@ -619,9 +619,9 @@ class CallExpressionHandler {
|
|
|
619
619
|
const keysToProcess = [];
|
|
620
620
|
let isSelectorAPI = false;
|
|
621
621
|
if (firstArg.type === 'ArrowFunctionExpression') {
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
624
|
-
keysToProcess.push(
|
|
622
|
+
const keys = this.extractKeysFromSelector(firstArg);
|
|
623
|
+
if (keys.length > 0) {
|
|
624
|
+
keysToProcess.push(...keys);
|
|
625
625
|
isSelectorAPI = true;
|
|
626
626
|
}
|
|
627
627
|
}
|
|
@@ -641,20 +641,23 @@ class CallExpressionHandler {
|
|
|
641
641
|
};
|
|
642
642
|
}
|
|
643
643
|
/**
|
|
644
|
-
* Extracts translation key from selector API arrow function.
|
|
644
|
+
* Extracts translation key(s) from selector API arrow function.
|
|
645
645
|
*
|
|
646
646
|
* Processes selector expressions like:
|
|
647
|
-
* - `$ => $.path.to.key` → 'path.to.key'
|
|
648
|
-
* - `$ => $.app['title'].main` → 'app.title.main'
|
|
649
|
-
* - `$ => { return $.nested.key; }` → 'nested.key'
|
|
647
|
+
* - `$ => $.path.to.key` → ['path.to.key']
|
|
648
|
+
* - `$ => $.app['title'].main` → ['app.title.main']
|
|
649
|
+
* - `$ => { return $.nested.key; }` → ['nested.key']
|
|
650
|
+
* - `$ => $.table.columns[field]` → ['table.columns.name', 'table.columns.age']
|
|
651
|
+
* (when `field` resolves to `"name" | "age"`)
|
|
650
652
|
*
|
|
651
653
|
* Handles both dot notation and bracket notation, respecting
|
|
652
|
-
* the configured key separator or flat key structure.
|
|
654
|
+
* the configured key separator or flat key structure. Dynamic
|
|
655
|
+
* bracket expressions are resolved via the expression resolver.
|
|
653
656
|
*
|
|
654
657
|
* @param node - Arrow function expression from selector call
|
|
655
|
-
* @returns Extracted key
|
|
658
|
+
* @returns Extracted key paths, or empty array if not statically analyzable
|
|
656
659
|
*/
|
|
657
|
-
|
|
660
|
+
extractKeysFromSelector(node) {
|
|
658
661
|
let body = node.body;
|
|
659
662
|
// Handle block bodies, e.g., $ => { return $.key; }
|
|
660
663
|
if (body.type === 'BlockStatement') {
|
|
@@ -663,34 +666,55 @@ class CallExpressionHandler {
|
|
|
663
666
|
body = returnStmt.argument;
|
|
664
667
|
}
|
|
665
668
|
else {
|
|
666
|
-
return
|
|
669
|
+
return [];
|
|
667
670
|
}
|
|
668
671
|
}
|
|
669
672
|
let current = body;
|
|
673
|
+
// Each element is an array of possible values for that position in the key path
|
|
670
674
|
const parts = [];
|
|
671
675
|
// Recursively walk down MemberExpressions
|
|
672
676
|
while (current.type === 'MemberExpression') {
|
|
673
677
|
const prop = current.property;
|
|
674
678
|
if (prop.type === 'Identifier') {
|
|
675
679
|
// This handles dot notation: .key
|
|
676
|
-
parts.unshift(prop.value);
|
|
680
|
+
parts.unshift([prop.value]);
|
|
677
681
|
}
|
|
678
682
|
else if (prop.type === 'Computed' && prop.expression.type === 'StringLiteral') {
|
|
679
|
-
// This handles bracket notation: ['key']
|
|
680
|
-
parts.unshift(prop.expression.value);
|
|
683
|
+
// This handles bracket notation with string literal: ['key']
|
|
684
|
+
parts.unshift([prop.expression.value]);
|
|
685
|
+
}
|
|
686
|
+
else if (prop.type === 'Computed' && prop.expression) {
|
|
687
|
+
// This is a dynamic property like [myVar] — try to resolve it
|
|
688
|
+
const resolved = this.expressionResolver.resolvePossibleKeyStringValues(prop.expression);
|
|
689
|
+
if (resolved.length > 0) {
|
|
690
|
+
parts.unshift(resolved);
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
return [];
|
|
694
|
+
}
|
|
681
695
|
}
|
|
682
696
|
else {
|
|
683
|
-
|
|
684
|
-
return null;
|
|
697
|
+
return [];
|
|
685
698
|
}
|
|
686
699
|
current = current.object;
|
|
687
700
|
}
|
|
688
701
|
if (parts.length > 0) {
|
|
689
702
|
const keySeparator = this.config.extract.keySeparator;
|
|
690
703
|
const joiner = typeof keySeparator === 'string' ? keySeparator : '.';
|
|
691
|
-
|
|
704
|
+
// Compute the cartesian product of all parts to generate all possible keys
|
|
705
|
+
let combinations = [[]];
|
|
706
|
+
for (const part of parts) {
|
|
707
|
+
const newCombinations = [];
|
|
708
|
+
for (const combo of combinations) {
|
|
709
|
+
for (const value of part) {
|
|
710
|
+
newCombinations.push([...combo, value]);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
combinations = newCombinations;
|
|
714
|
+
}
|
|
715
|
+
return combinations.map(combo => combo.join(joiner));
|
|
692
716
|
}
|
|
693
|
-
return
|
|
717
|
+
return [];
|
|
694
718
|
}
|
|
695
719
|
/**
|
|
696
720
|
* Generates plural form keys based on the primary language's plural rules.
|
|
@@ -377,7 +377,9 @@ class ExpressionResolver {
|
|
|
377
377
|
*/
|
|
378
378
|
resolvePossibleStringValuesFromExpression(expression, returnEmptyStrings = false) {
|
|
379
379
|
// Support selector-style arrow functions used by the selector API:
|
|
380
|
-
// e.g. ($) => $.path.to.key -> 'path.to.key'
|
|
380
|
+
// e.g. ($) => $.path.to.key -> ['path.to.key']
|
|
381
|
+
// e.g. ($) => $.table.columns[field] -> ['table.columns.name', 'table.columns.age']
|
|
382
|
+
// (when `field` resolves to "name" | "age")
|
|
381
383
|
if (expression.type === 'ArrowFunctionExpression') {
|
|
382
384
|
try {
|
|
383
385
|
let body = expression.body;
|
|
@@ -392,14 +394,25 @@ class ExpressionResolver {
|
|
|
392
394
|
}
|
|
393
395
|
}
|
|
394
396
|
let current = body;
|
|
397
|
+
// Each element is an array of possible values for that position
|
|
395
398
|
const parts = [];
|
|
396
399
|
while (current && current.type === 'MemberExpression') {
|
|
397
400
|
const prop = current.property;
|
|
398
401
|
if (prop.type === 'Identifier') {
|
|
399
|
-
parts.unshift(prop.value);
|
|
402
|
+
parts.unshift([prop.value]);
|
|
400
403
|
}
|
|
401
404
|
else if (prop.type === 'Computed' && prop.expression && prop.expression.type === 'StringLiteral') {
|
|
402
|
-
parts.unshift(prop.expression.value);
|
|
405
|
+
parts.unshift([prop.expression.value]);
|
|
406
|
+
}
|
|
407
|
+
else if (prop.type === 'Computed' && prop.expression) {
|
|
408
|
+
// Dynamic bracket: try to resolve the expression to possible string values
|
|
409
|
+
const resolved = this.resolvePossibleStringValuesFromExpression(prop.expression, returnEmptyStrings);
|
|
410
|
+
if (resolved.length > 0) {
|
|
411
|
+
parts.unshift(resolved);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
return [];
|
|
415
|
+
}
|
|
403
416
|
}
|
|
404
417
|
else {
|
|
405
418
|
return [];
|
|
@@ -407,7 +420,18 @@ class ExpressionResolver {
|
|
|
407
420
|
current = current.object;
|
|
408
421
|
}
|
|
409
422
|
if (parts.length > 0) {
|
|
410
|
-
|
|
423
|
+
// Compute cartesian product of all parts
|
|
424
|
+
let combinations = [[]];
|
|
425
|
+
for (const part of parts) {
|
|
426
|
+
const newCombinations = [];
|
|
427
|
+
for (const combo of combinations) {
|
|
428
|
+
for (const value of part) {
|
|
429
|
+
newCombinations.push([...combo, value]);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
combinations = newCombinations;
|
|
433
|
+
}
|
|
434
|
+
return combinations.map(combo => combo.join('.'));
|
|
411
435
|
}
|
|
412
436
|
}
|
|
413
437
|
catch {
|
package/dist/esm/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ const program = new Command();
|
|
|
29
29
|
program
|
|
30
30
|
.name('i18next-cli')
|
|
31
31
|
.description('A unified, high-performance i18next CLI.')
|
|
32
|
-
.version('1.51.
|
|
32
|
+
.version('1.51.8'); // This string is replaced with the actual version at build time by rollup
|
|
33
33
|
// new: global config override option
|
|
34
34
|
program.option('-c, --config <path>', 'Path to i18next-cli config file (overrides detection)');
|
|
35
35
|
program
|
|
@@ -923,12 +923,12 @@ async function getTranslations(keys, objectKeys, config, { syncPrimaryWithDefaul
|
|
|
923
923
|
const nsKeys = keysByNS.get(nsKey) || [];
|
|
924
924
|
if (isTopLevel(nsKey)) {
|
|
925
925
|
// keys without namespace -> merged into top-level of the merged file
|
|
926
|
-
const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults,
|
|
926
|
+
const built = buildNewTranslationsForNs(nsKeys, existingMergedFile, config, locale, undefined, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
|
|
927
927
|
Object.assign(newMergedTranslations, built);
|
|
928
928
|
}
|
|
929
929
|
else {
|
|
930
930
|
const existingTranslations = existingMergedFile[nsKey] || {};
|
|
931
|
-
newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults,
|
|
931
|
+
newMergedTranslations[nsKey] = buildNewTranslationsForNs(nsKeys, existingTranslations, config, locale, nsKey, preservePatterns, objectKeys, syncPrimaryWithDefaults, syncAll, logger);
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
// Preserve ignored namespaces as-is from the existing merged file
|
|
@@ -617,9 +617,9 @@ class CallExpressionHandler {
|
|
|
617
617
|
const keysToProcess = [];
|
|
618
618
|
let isSelectorAPI = false;
|
|
619
619
|
if (firstArg.type === 'ArrowFunctionExpression') {
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
keysToProcess.push(
|
|
620
|
+
const keys = this.extractKeysFromSelector(firstArg);
|
|
621
|
+
if (keys.length > 0) {
|
|
622
|
+
keysToProcess.push(...keys);
|
|
623
623
|
isSelectorAPI = true;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
@@ -639,20 +639,23 @@ class CallExpressionHandler {
|
|
|
639
639
|
};
|
|
640
640
|
}
|
|
641
641
|
/**
|
|
642
|
-
* Extracts translation key from selector API arrow function.
|
|
642
|
+
* Extracts translation key(s) from selector API arrow function.
|
|
643
643
|
*
|
|
644
644
|
* Processes selector expressions like:
|
|
645
|
-
* - `$ => $.path.to.key` → 'path.to.key'
|
|
646
|
-
* - `$ => $.app['title'].main` → 'app.title.main'
|
|
647
|
-
* - `$ => { return $.nested.key; }` → 'nested.key'
|
|
645
|
+
* - `$ => $.path.to.key` → ['path.to.key']
|
|
646
|
+
* - `$ => $.app['title'].main` → ['app.title.main']
|
|
647
|
+
* - `$ => { return $.nested.key; }` → ['nested.key']
|
|
648
|
+
* - `$ => $.table.columns[field]` → ['table.columns.name', 'table.columns.age']
|
|
649
|
+
* (when `field` resolves to `"name" | "age"`)
|
|
648
650
|
*
|
|
649
651
|
* Handles both dot notation and bracket notation, respecting
|
|
650
|
-
* the configured key separator or flat key structure.
|
|
652
|
+
* the configured key separator or flat key structure. Dynamic
|
|
653
|
+
* bracket expressions are resolved via the expression resolver.
|
|
651
654
|
*
|
|
652
655
|
* @param node - Arrow function expression from selector call
|
|
653
|
-
* @returns Extracted key
|
|
656
|
+
* @returns Extracted key paths, or empty array if not statically analyzable
|
|
654
657
|
*/
|
|
655
|
-
|
|
658
|
+
extractKeysFromSelector(node) {
|
|
656
659
|
let body = node.body;
|
|
657
660
|
// Handle block bodies, e.g., $ => { return $.key; }
|
|
658
661
|
if (body.type === 'BlockStatement') {
|
|
@@ -661,34 +664,55 @@ class CallExpressionHandler {
|
|
|
661
664
|
body = returnStmt.argument;
|
|
662
665
|
}
|
|
663
666
|
else {
|
|
664
|
-
return
|
|
667
|
+
return [];
|
|
665
668
|
}
|
|
666
669
|
}
|
|
667
670
|
let current = body;
|
|
671
|
+
// Each element is an array of possible values for that position in the key path
|
|
668
672
|
const parts = [];
|
|
669
673
|
// Recursively walk down MemberExpressions
|
|
670
674
|
while (current.type === 'MemberExpression') {
|
|
671
675
|
const prop = current.property;
|
|
672
676
|
if (prop.type === 'Identifier') {
|
|
673
677
|
// This handles dot notation: .key
|
|
674
|
-
parts.unshift(prop.value);
|
|
678
|
+
parts.unshift([prop.value]);
|
|
675
679
|
}
|
|
676
680
|
else if (prop.type === 'Computed' && prop.expression.type === 'StringLiteral') {
|
|
677
|
-
// This handles bracket notation: ['key']
|
|
678
|
-
parts.unshift(prop.expression.value);
|
|
681
|
+
// This handles bracket notation with string literal: ['key']
|
|
682
|
+
parts.unshift([prop.expression.value]);
|
|
683
|
+
}
|
|
684
|
+
else if (prop.type === 'Computed' && prop.expression) {
|
|
685
|
+
// This is a dynamic property like [myVar] — try to resolve it
|
|
686
|
+
const resolved = this.expressionResolver.resolvePossibleKeyStringValues(prop.expression);
|
|
687
|
+
if (resolved.length > 0) {
|
|
688
|
+
parts.unshift(resolved);
|
|
689
|
+
}
|
|
690
|
+
else {
|
|
691
|
+
return [];
|
|
692
|
+
}
|
|
679
693
|
}
|
|
680
694
|
else {
|
|
681
|
-
|
|
682
|
-
return null;
|
|
695
|
+
return [];
|
|
683
696
|
}
|
|
684
697
|
current = current.object;
|
|
685
698
|
}
|
|
686
699
|
if (parts.length > 0) {
|
|
687
700
|
const keySeparator = this.config.extract.keySeparator;
|
|
688
701
|
const joiner = typeof keySeparator === 'string' ? keySeparator : '.';
|
|
689
|
-
|
|
702
|
+
// Compute the cartesian product of all parts to generate all possible keys
|
|
703
|
+
let combinations = [[]];
|
|
704
|
+
for (const part of parts) {
|
|
705
|
+
const newCombinations = [];
|
|
706
|
+
for (const combo of combinations) {
|
|
707
|
+
for (const value of part) {
|
|
708
|
+
newCombinations.push([...combo, value]);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
combinations = newCombinations;
|
|
712
|
+
}
|
|
713
|
+
return combinations.map(combo => combo.join(joiner));
|
|
690
714
|
}
|
|
691
|
-
return
|
|
715
|
+
return [];
|
|
692
716
|
}
|
|
693
717
|
/**
|
|
694
718
|
* Generates plural form keys based on the primary language's plural rules.
|
|
@@ -375,7 +375,9 @@ class ExpressionResolver {
|
|
|
375
375
|
*/
|
|
376
376
|
resolvePossibleStringValuesFromExpression(expression, returnEmptyStrings = false) {
|
|
377
377
|
// Support selector-style arrow functions used by the selector API:
|
|
378
|
-
// e.g. ($) => $.path.to.key -> 'path.to.key'
|
|
378
|
+
// e.g. ($) => $.path.to.key -> ['path.to.key']
|
|
379
|
+
// e.g. ($) => $.table.columns[field] -> ['table.columns.name', 'table.columns.age']
|
|
380
|
+
// (when `field` resolves to "name" | "age")
|
|
379
381
|
if (expression.type === 'ArrowFunctionExpression') {
|
|
380
382
|
try {
|
|
381
383
|
let body = expression.body;
|
|
@@ -390,14 +392,25 @@ class ExpressionResolver {
|
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
394
|
let current = body;
|
|
395
|
+
// Each element is an array of possible values for that position
|
|
393
396
|
const parts = [];
|
|
394
397
|
while (current && current.type === 'MemberExpression') {
|
|
395
398
|
const prop = current.property;
|
|
396
399
|
if (prop.type === 'Identifier') {
|
|
397
|
-
parts.unshift(prop.value);
|
|
400
|
+
parts.unshift([prop.value]);
|
|
398
401
|
}
|
|
399
402
|
else if (prop.type === 'Computed' && prop.expression && prop.expression.type === 'StringLiteral') {
|
|
400
|
-
parts.unshift(prop.expression.value);
|
|
403
|
+
parts.unshift([prop.expression.value]);
|
|
404
|
+
}
|
|
405
|
+
else if (prop.type === 'Computed' && prop.expression) {
|
|
406
|
+
// Dynamic bracket: try to resolve the expression to possible string values
|
|
407
|
+
const resolved = this.resolvePossibleStringValuesFromExpression(prop.expression, returnEmptyStrings);
|
|
408
|
+
if (resolved.length > 0) {
|
|
409
|
+
parts.unshift(resolved);
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
return [];
|
|
413
|
+
}
|
|
401
414
|
}
|
|
402
415
|
else {
|
|
403
416
|
return [];
|
|
@@ -405,7 +418,18 @@ class ExpressionResolver {
|
|
|
405
418
|
current = current.object;
|
|
406
419
|
}
|
|
407
420
|
if (parts.length > 0) {
|
|
408
|
-
|
|
421
|
+
// Compute cartesian product of all parts
|
|
422
|
+
let combinations = [[]];
|
|
423
|
+
for (const part of parts) {
|
|
424
|
+
const newCombinations = [];
|
|
425
|
+
for (const combo of combinations) {
|
|
426
|
+
for (const value of part) {
|
|
427
|
+
newCombinations.push([...combo, value]);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
combinations = newCombinations;
|
|
431
|
+
}
|
|
432
|
+
return combinations.map(combo => combo.join('.'));
|
|
409
433
|
}
|
|
410
434
|
}
|
|
411
435
|
catch {
|
package/package.json
CHANGED
|
@@ -49,20 +49,23 @@ export declare class CallExpressionHandler {
|
|
|
49
49
|
*/
|
|
50
50
|
private handleCallExpressionArgument;
|
|
51
51
|
/**
|
|
52
|
-
* Extracts translation key from selector API arrow function.
|
|
52
|
+
* Extracts translation key(s) from selector API arrow function.
|
|
53
53
|
*
|
|
54
54
|
* Processes selector expressions like:
|
|
55
|
-
* - `$ => $.path.to.key` → 'path.to.key'
|
|
56
|
-
* - `$ => $.app['title'].main` → 'app.title.main'
|
|
57
|
-
* - `$ => { return $.nested.key; }` → 'nested.key'
|
|
55
|
+
* - `$ => $.path.to.key` → ['path.to.key']
|
|
56
|
+
* - `$ => $.app['title'].main` → ['app.title.main']
|
|
57
|
+
* - `$ => { return $.nested.key; }` → ['nested.key']
|
|
58
|
+
* - `$ => $.table.columns[field]` → ['table.columns.name', 'table.columns.age']
|
|
59
|
+
* (when `field` resolves to `"name" | "age"`)
|
|
58
60
|
*
|
|
59
61
|
* Handles both dot notation and bracket notation, respecting
|
|
60
|
-
* the configured key separator or flat key structure.
|
|
62
|
+
* the configured key separator or flat key structure. Dynamic
|
|
63
|
+
* bracket expressions are resolved via the expression resolver.
|
|
61
64
|
*
|
|
62
65
|
* @param node - Arrow function expression from selector call
|
|
63
|
-
* @returns Extracted key
|
|
66
|
+
* @returns Extracted key paths, or empty array if not statically analyzable
|
|
64
67
|
*/
|
|
65
|
-
private
|
|
68
|
+
private extractKeysFromSelector;
|
|
66
69
|
/**
|
|
67
70
|
* Generates plural form keys based on the primary language's plural rules.
|
|
68
71
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-expression-handler.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/call-expression-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA6C,MAAM,WAAW,CAAA;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAgB,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAY7D,qBAAa,qBAAqB;IAChC,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,kBAAkB,CAAoB;IACvC,UAAU,cAAoB;IACrC,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,iBAAiB,CAAsC;gBAG7D,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC7C,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,MAAM,MAAM,EAC5B,cAAc,EAAE,MAAM,MAAM,EAC5B,iBAAiB,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAA2B;IAW3E;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,IAAI;IAyYxG;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,oBAAoB;IAkF5B,OAAO,CAAC,wBAAwB;IAyEhC;;;;;;OAMG;IACH,OAAO,CAAC,4BAA4B;IA8BpC
|
|
1
|
+
{"version":3,"file":"call-expression-handler.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/call-expression-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA6C,MAAM,WAAW,CAAA;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAgB,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAY7D,qBAAa,qBAAqB;IAChC,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,MAAM,CAAuC;IACrD,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,kBAAkB,CAAoB;IACvC,UAAU,cAAoB;IACrC,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,cAAc,CAAc;IACpC,OAAO,CAAC,iBAAiB,CAAsC;gBAG7D,MAAM,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,EAC7C,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,MAAM,MAAM,EAC5B,cAAc,EAAE,MAAM,MAAM,EAC5B,iBAAiB,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAA2B;IAW3E;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,GAAG,SAAS,GAAG,IAAI;IAyYxG;;OAEG;IACH,OAAO,CAAC,iBAAiB;IA4B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