nestjs-i18n
Advanced tools
Comparing version 5.1.0 to 6.0.0
@@ -6,3 +6,4 @@ "use strict"; | ||
const fs = require("fs"); | ||
const parse_1 = require("../../lib/utils/parse"); | ||
const file_1 = require("../../lib/utils/file"); | ||
const i18n_json_parser_1 = require("../../lib/parsers/i18n.json.parser"); | ||
const _ = require("lodash"); | ||
@@ -18,10 +19,9 @@ const chalk = require("chalk"); | ||
} | ||
const languages = (await parse_1.getDirectories(i18nPath)).map(dir => path.relative(i18nPath, dir)); | ||
const languages = (await file_1.getDirectories(i18nPath)).map(dir => path.relative(i18nPath, dir)); | ||
console.log(chalk.bold('found languages:'), chalk.bold.yellow(languages.join(','))); | ||
const translations = await parse_1.parseTranslations({ | ||
const jsonParser = new i18n_json_parser_1.I18nJsonParser({ | ||
path: i18nPath, | ||
filePattern: '*.json', | ||
saveMissing: false, | ||
fallbackLanguage: 'NOT_USED', | ||
}); | ||
const translations = await jsonParser.parse(); | ||
let uniqueKeys = []; | ||
@@ -28,0 +28,0 @@ for (let translationsKey in translations) { |
@@ -8,1 +8,4 @@ "use strict"; | ||
exports.I18N_RESOLVERS = 'I18nResolvers'; | ||
exports.I18N_PARSER_OPTIONS = 'I18nParserOptions'; | ||
exports.I18N_LANGUAGES_SUBJECT = 'I18nLanguagesSubject'; | ||
exports.I18N_TRANSLATIONS_SUBJECT = 'I18nTranslationsSubject'; |
@@ -1,17 +0,20 @@ | ||
{"/home/toon/Projects/nestjs-i18n/src/lib/i18n.constants.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.constants.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":42}},"1":{"start":{"line":2,"column":13},"end":{"line":2,"column":52}},"2":{"start":{"line":3,"column":13},"end":{"line":3,"column":46}},"3":{"start":{"line":4,"column":13},"end":{"line":4,"column":59}},"4":{"start":{"line":5,"column":13},"end":{"line":5,"column":46}}},"fnMap":{},"branchMap":{},"s":{"0":6,"1":6,"2":6,"3":6,"4":6},"f":{},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/i18n.context.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.context.ts","statementMap":{"0":{"start":{"line":5,"column":13},"end":{"line":5,"column":37}},"1":{"start":{"line":6,"column":21},"end":{"line":6,"column":41}},"2":{"start":{"line":10,"column":4},"end":{"line":13,"column":6}},"3":{"start":{"line":14,"column":4},"end":{"line":14,"column":48}},"4":{"start":{"line":3,"column":0},"end":{"line":3,"column":13}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":2},"end":{"line":4,"column":null}},"loc":{"start":{"line":6,"column":41},"end":{"line":7,"column":6}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":11}},"loc":{"start":{"line":9,"column":25},"end":{"line":15,"column":3}}}},"branchMap":{},"s":{"0":10,"1":10,"2":10,"3":10,"4":6},"f":{"0":10,"1":10},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/i18n.module.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.module.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":null}},"2":{"start":{"line":17,"column":0},"end":{"line":17,"column":54}},"3":{"start":{"line":18,"column":0},"end":{"line":18,"column":80}},"4":{"start":{"line":27,"column":0},"end":{"line":27,"column":64}},"5":{"start":{"line":28,"column":0},"end":{"line":28,"column":29}},"6":{"start":{"line":29,"column":0},"end":{"line":29,"column":79}},"7":{"start":{"line":30,"column":0},"end":{"line":30,"column":58}},"8":{"start":{"line":31,"column":0},"end":{"line":31,"column":91}},"9":{"start":{"line":32,"column":0},"end":{"line":32,"column":45}},"10":{"start":{"line":34,"column":15},"end":{"line":34,"column":40}},"11":{"start":{"line":36,"column":45},"end":{"line":40,"column":2}},"12":{"start":{"line":44,"column":23},"end":{"line":241,"column":null}},"13":{"start":{"line":46,"column":21},"end":{"line":46,"column":38}},"14":{"start":{"line":47,"column":21},"end":{"line":47,"column":32}},"15":{"start":{"line":52,"column":6},"end":{"line":54,"column":55}},"16":{"start":{"line":56,"column":4},"end":{"line":68,"column":null}},"17":{"start":{"line":57,"column":6},"end":{"line":65,"column":11}},"18":{"start":{"line":60,"column":10},"end":{"line":64,"column":15}},"19":{"start":{"line":63,"column":14},"end":{"line":63,"column":57}},"20":{"start":{"line":67,"column":6},"end":{"line":67,"column":60}},"21":{"start":{"line":72,"column":4},"end":{"line":72,"column":48}},"22":{"start":{"line":73,"column":39},"end":{"line":76,"column":6}},"23":{"start":{"line":78,"column":33},"end":{"line":88,"column":6}},"24":{"start":{"line":81,"column":8},"end":{"line":86,"column":null}},"25":{"start":{"line":82,"column":10},"end":{"line":82,"column":50}},"26":{"start":{"line":84,"column":10},"end":{"line":84,"column":55}},"27":{"start":{"line":85,"column":10},"end":{"line":85,"column":20}},"28":{"start":{"line":90,"column":31},"end":{"line":100,"column":6}},"29":{"start":{"line":93,"column":8},"end":{"line":98,"column":null}},"30":{"start":{"line":94,"column":10},"end":{"line":94,"column":45}},"31":{"start":{"line":96,"column":10},"end":{"line":96,"column":54}},"32":{"start":{"line":97,"column":10},"end":{"line":97,"column":20}},"33":{"start":{"line":102,"column":30},"end":{"line":105,"column":6}},"34":{"start":{"line":107,"column":4},"end":{"line":120,"column":6}},"35":{"start":{"line":124,"column":33},"end":{"line":124,"column":73}},"36":{"start":{"line":125,"column":37},"end":{"line":125,"column":74}},"37":{"start":{"line":126,"column":35},"end":{"line":126,"column":70}},"38":{"start":{"line":127,"column":30},"end":{"line":130,"column":6}},"39":{"start":{"line":131,"column":4},"end":{"line":145,"column":6}},"40":{"start":{"line":151,"column":4},"end":{"line":157,"column":null}},"41":{"start":{"line":152,"column":6},"end":{"line":156,"column":8}},"42":{"start":{"line":158,"column":4},"end":{"line":163,"column":6}},"43":{"start":{"line":161,"column":8},"end":{"line":161,"column":48}},"44":{"start":{"line":167,"column":4},"end":{"line":179,"column":6}},"45":{"start":{"line":170,"column":8},"end":{"line":170,"column":52}},"46":{"start":{"line":171,"column":8},"end":{"line":176,"column":null}},"47":{"start":{"line":172,"column":10},"end":{"line":172,"column":50}},"48":{"start":{"line":174,"column":10},"end":{"line":174,"column":55}},"49":{"start":{"line":175,"column":10},"end":{"line":175,"column":20}},"50":{"start":{"line":183,"column":4},"end":{"line":195,"column":6}},"51":{"start":{"line":186,"column":8},"end":{"line":186,"column":52}},"52":{"start":{"line":187,"column":8},"end":{"line":192,"column":null}},"53":{"start":{"line":188,"column":10},"end":{"line":188,"column":45}},"54":{"start":{"line":190,"column":10},"end":{"line":190,"column":55}},"55":{"start":{"line":191,"column":10},"end":{"line":191,"column":20}},"56":{"start":{"line":199,"column":4},"end":{"line":199,"column":48}},"57":{"start":{"line":201,"column":4},"end":{"line":201,"column":59}},"58":{"start":{"line":202,"column":4},"end":{"line":204,"column":null}},"59":{"start":{"line":203,"column":6},"end":{"line":203,"column":55}},"60":{"start":{"line":206,"column":4},"end":{"line":206,"column":19}},"61":{"start":{"line":210,"column":4},"end":{"line":239,"column":13}},"62":{"start":{"line":213,"column":8},"end":{"line":236,"column":null}},"63":{"start":{"line":214,"column":27},"end":{"line":214,"column":51}},"64":{"start":{"line":215,"column":31},"end":{"line":215,"column":72}},"65":{"start":{"line":216,"column":10},"end":{"line":220,"column":13}},"66":{"start":{"line":221,"column":10},"end":{"line":224,"column":13}},"67":{"start":{"line":223,"column":30},"end":{"line":223,"column":46}},"68":{"start":{"line":226,"column":31},"end":{"line":226,"column":73}},"69":{"start":{"line":227,"column":10},"end":{"line":231,"column":20}},"70":{"start":{"line":232,"column":10},"end":{"line":235,"column":13}},"71":{"start":{"line":234,"column":30},"end":{"line":234,"column":39}},"72":{"start":{"line":238,"column":8},"end":{"line":238,"column":25}},"73":{"start":{"line":44,"column":13},"end":{"line":241,"column":null}},"74":{"start":{"line":44,"column":13},"end":{"line":44,"column":23}}},"fnMap":{"0":{"name":"(anonymous_2)","decl":{"start":{"line":45,"column":2},"end":{"line":45,"column":null}},"loc":{"start":{"line":47,"column":41},"end":{"line":48,"column":6}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":50,"column":2},"end":{"line":50,"column":11}},"loc":{"start":{"line":50,"column":40},"end":{"line":69,"column":3}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":59,"column":14},"end":{"line":59,"column":36}},"loc":{"start":{"line":59,"column":39},"end":{"line":65,"column":9}}},"3":{"name":"(anonymous_5)","decl":{"start":{"line":62,"column":35},"end":{"line":62,"column":36}},"loc":{"start":{"line":62,"column":54},"end":{"line":64,"column":13}}},"4":{"name":"(anonymous_6)","decl":{"start":{"line":71,"column":2},"end":{"line":71,"column":8}},"loc":{"start":{"line":71,"column":37},"end":{"line":121,"column":3}}},"5":{"name":"(anonymous_7)","decl":{"start":{"line":80,"column":18},"end":{"line":80,"column":23}},"loc":{"start":{"line":80,"column":55},"end":{"line":87,"column":7}}},"6":{"name":"(anonymous_8)","decl":{"start":{"line":92,"column":18},"end":{"line":92,"column":23}},"loc":{"start":{"line":92,"column":48},"end":{"line":99,"column":7}}},"7":{"name":"(anonymous_9)","decl":{"start":{"line":123,"column":2},"end":{"line":123,"column":8}},"loc":{"start":{"line":123,"column":47},"end":{"line":146,"column":3}}},"8":{"name":"(anonymous_10)","decl":{"start":{"line":148,"column":10},"end":{"line":148,"column":16}},"loc":{"start":{"line":149,"column":29},"end":{"line":164,"column":3}}},"9":{"name":"(anonymous_11)","decl":{"start":{"line":160,"column":18},"end":{"line":160,"column":23}},"loc":{"start":{"line":161,"column":8},"end":{"line":161,"column":48}}},"10":{"name":"(anonymous_12)","decl":{"start":{"line":166,"column":10},"end":{"line":166,"column":16}},"loc":{"start":{"line":166,"column":47},"end":{"line":180,"column":3}}},"11":{"name":"(anonymous_13)","decl":{"start":{"line":169,"column":18},"end":{"line":169,"column":23}},"loc":{"start":{"line":169,"column":75},"end":{"line":177,"column":7}}},"12":{"name":"(anonymous_14)","decl":{"start":{"line":182,"column":10},"end":{"line":182,"column":16}},"loc":{"start":{"line":182,"column":45},"end":{"line":196,"column":3}}},"13":{"name":"(anonymous_15)","decl":{"start":{"line":185,"column":18},"end":{"line":185,"column":23}},"loc":{"start":{"line":185,"column":68},"end":{"line":193,"column":7}}},"14":{"name":"(anonymous_16)","decl":{"start":{"line":198,"column":10},"end":{"line":198,"column":16}},"loc":{"start":{"line":198,"column":57},"end":{"line":207,"column":3}}},"15":{"name":"(anonymous_17)","decl":{"start":{"line":209,"column":10},"end":{"line":209,"column":16}},"loc":{"start":{"line":209,"column":73},"end":{"line":240,"column":3}}},"16":{"name":"(anonymous_18)","decl":{"start":{"line":212,"column":26},"end":{"line":212,"column":27}},"loc":{"start":{"line":212,"column":43},"end":{"line":239,"column":7}}},"17":{"name":"(anonymous_19)","decl":{"start":{"line":223,"column":24},"end":{"line":223,"column":27}},"loc":{"start":{"line":223,"column":30},"end":{"line":223,"column":46}}},"18":{"name":"(anonymous_20)","decl":{"start":{"line":234,"column":24},"end":{"line":234,"column":27}},"loc":{"start":{"line":234,"column":30},"end":{"line":234,"column":39}}}},"branchMap":{"0":{"loc":{"start":{"line":52,"column":6},"end":{"line":52,"column":38}},"type":"binary-expr","locations":[{"start":{"line":52,"column":6},"end":{"line":52,"column":38}},{"start":{"line":53,"column":6},"end":{"line":53,"column":50}},{"start":{"line":54,"column":6},"end":{"line":54,"column":55}}]},"1":{"loc":{"start":{"line":56,"column":4},"end":{"line":68,"column":null}},"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":68,"column":null}},{"start":{"line":56,"column":4},"end":{"line":68,"column":null}}]},"2":{"loc":{"start":{"line":104,"column":16},"end":{"line":104,"column":33}},"type":"binary-expr","locations":[{"start":{"line":104,"column":16},"end":{"line":104,"column":33}},{"start":{"line":104,"column":37},"end":{"line":104,"column":39}}]},"3":{"loc":{"start":{"line":129,"column":16},"end":{"line":129,"column":33}},"type":"binary-expr","locations":[{"start":{"line":129,"column":16},"end":{"line":129,"column":33}},{"start":{"line":129,"column":37},"end":{"line":129,"column":39}}]},"4":{"loc":{"start":{"line":133,"column":15},"end":{"line":133,"column":30}},"type":"binary-expr","locations":[{"start":{"line":133,"column":15},"end":{"line":133,"column":30}},{"start":{"line":133,"column":34},"end":{"line":133,"column":36}}]},"5":{"loc":{"start":{"line":151,"column":4},"end":{"line":157,"column":null}},"type":"if","locations":[{"start":{"line":151,"column":4},"end":{"line":157,"column":null}},{"start":{"line":151,"column":4},"end":{"line":157,"column":null}}]},"6":{"loc":{"start":{"line":155,"column":16},"end":{"line":155,"column":30}},"type":"binary-expr","locations":[{"start":{"line":155,"column":16},"end":{"line":155,"column":30}},{"start":{"line":155,"column":34},"end":{"line":155,"column":36}}]},"7":{"loc":{"start":{"line":162,"column":15},"end":{"line":162,"column":31}},"type":"binary-expr","locations":[{"start":{"line":162,"column":15},"end":{"line":162,"column":31}},{"start":{"line":162,"column":35},"end":{"line":162,"column":54}}]},"8":{"loc":{"start":{"line":202,"column":4},"end":{"line":204,"column":null}},"type":"if","locations":[{"start":{"line":202,"column":4},"end":{"line":204,"column":null}},{"start":{"line":202,"column":4},"end":{"line":204,"column":null}}]},"9":{"loc":{"start":{"line":210,"column":12},"end":{"line":210,"column":21}},"type":"binary-expr","locations":[{"start":{"line":210,"column":12},"end":{"line":210,"column":21}},{"start":{"line":210,"column":25},"end":{"line":210,"column":27}}]},"10":{"loc":{"start":{"line":213,"column":8},"end":{"line":236,"column":null}},"type":"if","locations":[{"start":{"line":213,"column":8},"end":{"line":236,"column":null}},{"start":{"line":213,"column":8},"end":{"line":236,"column":null}}]},"11":{"loc":{"start":{"line":213,"column":12},"end":{"line":213,"column":35}},"type":"binary-expr","locations":[{"start":{"line":213,"column":12},"end":{"line":213,"column":35}},{"start":{"line":213,"column":39},"end":{"line":213,"column":66}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":6,"12":6,"13":10,"14":10,"15":3,"16":3,"17":1,"18":1,"19":16,"20":2,"21":8,"22":8,"23":8,"24":8,"25":8,"26":0,"27":0,"28":8,"29":8,"30":8,"31":0,"32":0,"33":8,"34":8,"35":2,"36":2,"37":2,"38":2,"39":2,"40":2,"41":2,"42":0,"43":0,"44":2,"45":2,"46":2,"47":2,"48":0,"49":0,"50":2,"51":2,"52":2,"53":2,"54":0,"55":0,"56":12,"57":12,"58":12,"59":1,"60":12,"61":10,"62":4,"63":2,"64":2,"65":2,"66":2,"67":2,"68":2,"69":2,"70":2,"71":2,"72":4,"73":6,"74":6},"f":{"0":10,"1":3,"2":1,"3":16,"4":8,"5":8,"6":8,"7":2,"8":2,"9":0,"10":2,"11":2,"12":2,"13":2,"14":12,"15":10,"16":4,"17":2,"18":2},"b":{"0":[3,3,3],"1":[1,2],"2":[8,0],"3":[2,2],"4":[2,2],"5":[2,0],"6":[2,2],"7":[0,0],"8":[1,11],"9":[10,2],"10":[2,2],"11":[4,2]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/index.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/index.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":33}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":31}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":40}},"4":{"start":{"line":7,"column":0},"end":{"line":7,"column":54}},"5":{"start":{"line":14,"column":0},"end":{"line":14,"column":49}},"6":{"start":{"line":15,"column":0},"end":{"line":15,"column":54}},"7":{"start":{"line":16,"column":0},"end":{"line":16,"column":61}},"8":{"start":{"line":17,"column":0},"end":{"line":17,"column":44}},"9":{"start":{"line":20,"column":0},"end":{"line":20,"column":44}},"10":{"start":{"line":21,"column":0},"end":{"line":21,"column":43}},"11":{"start":{"line":22,"column":0},"end":{"line":22,"column":44}}},"fnMap":{},"branchMap":{},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":6,"9":6,"10":6,"11":6},"f":{},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-lang.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-lang.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"1":{"start":{"line":3,"column":13},"end":{"line":10,"column":3}},"2":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":54}},"4":{"start":{"line":9,"column":2},"end":{"line":9,"column":49}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":66}},"6":{"start":{"line":17,"column":34},"end":{"line":17,"column":37}},"7":{"start":{"line":18,"column":2},"end":{"line":18,"column":26}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":45},"end":{"line":3,"column":46}},"loc":{"start":{"line":3,"column":59},"end":{"line":10,"column":1}}},"1":{"name":"resolveI18nLanguageFromRestRequest","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":43}},"loc":{"start":{"line":12,"column":47},"end":{"line":14,"column":1}}},"2":{"name":"resolveI18nLanguageFromGraphQLContext","decl":{"start":{"line":16,"column":9},"end":{"line":16,"column":46}},"loc":{"start":{"line":16,"column":50},"end":{"line":19,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"type":"if","locations":[{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},{"start":{"line":6,"column":2},"end":{"line":8,"column":null}}]},"1":{"loc":{"start":{"line":13,"column":9},"end":{"line":13,"column":21}},"type":"binary-expr","locations":[{"start":{"line":13,"column":9},"end":{"line":13,"column":21}},{"start":{"line":13,"column":26},"end":{"line":13,"column":64}}]},"2":{"loc":{"start":{"line":13,"column":36},"end":{"line":13,"column":52}},"type":"cond-expr","locations":[{"start":{"line":13,"column":36},"end":{"line":13,"column":52}},{"start":{"line":13,"column":55},"end":{"line":13,"column":64}}]}},"s":{"0":6,"1":6,"2":15,"3":4,"4":11,"5":11,"6":4,"7":4},"f":{"0":15,"1":11,"2":4},"b":{"0":[4,11],"1":[11,0],"2":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-languages.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-languages.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":51}},"2":{"start":{"line":4,"column":13},"end":{"line":6,"column":2}},"3":{"start":{"line":5,"column":2},"end":{"line":5,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":29},"end":{"line":4,"column":32}},"loc":{"start":{"line":4,"column":34},"end":{"line":6,"column":1}}}},"branchMap":{},"s":{"0":6,"1":6,"2":6,"3":0},"f":{"0":0},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-resolver-options.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-resolver-options.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":50}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":16}},"4":{"start":{"line":9,"column":2},"end":{"line":11,"column":4}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":75}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":16}}},"fnMap":{"0":{"name":"getI18nResolverOptionsToken","decl":{"start":{"line":4,"column":16},"end":{"line":4,"column":43}},"loc":{"start":{"line":4,"column":60},"end":{"line":6,"column":1}}},"1":{"name":"I18nResolverOptions","decl":{"start":{"line":8,"column":16},"end":{"line":8,"column":35}},"loc":{"start":{"line":8,"column":35},"end":{"line":12,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":18}},"loc":{"start":{"line":9,"column":72},"end":{"line":11,"column":3}}}},"branchMap":{},"s":{"0":6,"1":6,"2":22,"3":6,"4":18,"5":18,"6":6},"f":{"0":22,"1":18,"2":18},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":46}},"2":{"start":{"line":5,"column":13},"end":{"line":12,"column":3}},"3":{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},"4":{"start":{"line":9,"column":4},"end":{"line":9,"column":73}},"5":{"start":{"line":11,"column":2},"end":{"line":11,"column":68}},"6":{"start":{"line":15,"column":2},"end":{"line":18,"column":4}},"7":{"start":{"line":22,"column":34},"end":{"line":22,"column":37}},"8":{"start":{"line":23,"column":2},"end":{"line":23,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":41},"end":{"line":5,"column":42}},"loc":{"start":{"line":5,"column":55},"end":{"line":12,"column":1}}},"1":{"name":"resolveI18nServiceFromRestRequest","decl":{"start":{"line":14,"column":9},"end":{"line":14,"column":42}},"loc":{"start":{"line":14,"column":46},"end":{"line":19,"column":1}}},"2":{"name":"resolveI18nServiceFromGraphQLContext","decl":{"start":{"line":21,"column":9},"end":{"line":21,"column":45}},"loc":{"start":{"line":21,"column":49},"end":{"line":24,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},{"start":{"line":8,"column":2},"end":{"line":10,"column":null}}]},"1":{"loc":{"start":{"line":16,"column":4},"end":{"line":16,"column":16}},"type":"binary-expr","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":16}},{"start":{"line":16,"column":21},"end":{"line":16,"column":59}}]},"2":{"loc":{"start":{"line":16,"column":31},"end":{"line":16,"column":47}},"type":"cond-expr","locations":[{"start":{"line":16,"column":31},"end":{"line":16,"column":47}},{"start":{"line":16,"column":50},"end":{"line":16,"column":59}}]},"3":{"loc":{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},"type":"binary-expr","locations":[{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},{"start":{"line":17,"column":24},"end":{"line":17,"column":65}}]},"4":{"loc":{"start":{"line":17,"column":34},"end":{"line":17,"column":53}},"type":"cond-expr","locations":[{"start":{"line":17,"column":34},"end":{"line":17,"column":53}},{"start":{"line":17,"column":56},"end":{"line":17,"column":65}}]}},"s":{"0":6,"1":6,"2":6,"3":10,"4":0,"5":10,"6":10,"7":0,"8":0},"f":{"0":10,"1":10,"2":0},"b":{"0":[0,10],"1":[10,0],"2":[0,0],"3":[10,0],"4":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/middleware/i18n-language-middleware.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/middleware/i18n-language-middleware.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":8,"column":0},"end":{"line":8,"column":65}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":55}},"3":{"start":{"line":11,"column":0},"end":{"line":11,"column":41}},"4":{"start":{"line":12,"column":0},"end":{"line":12,"column":46}},"5":{"start":{"line":16,"column":0},"end":{"line":56,"column":null}},"6":{"start":{"line":19,"column":21},"end":{"line":19,"column":45}},"7":{"start":{"line":21,"column":21},"end":{"line":21,"column":56}},"8":{"start":{"line":22,"column":21},"end":{"line":22,"column":34}},"9":{"start":{"line":23,"column":21},"end":{"line":23,"column":32}},"10":{"start":{"line":27,"column":19},"end":{"line":27,"column":23}},"11":{"start":{"line":29,"column":4},"end":{"line":37,"column":null}},"12":{"start":{"line":30,"column":23},"end":{"line":30,"column":48}},"13":{"start":{"line":32,"column":6},"end":{"line":32,"column":39}},"14":{"start":{"line":34,"column":6},"end":{"line":36,"column":null}},"15":{"start":{"line":35,"column":8},"end":{"line":35,"column":14}},"16":{"start":{"line":38,"column":4},"end":{"line":38,"column":65}},"17":{"start":{"line":39,"column":4},"end":{"line":39,"column":39}},"18":{"start":{"line":41,"column":4},"end":{"line":41,"column":11}},"19":{"start":{"line":45,"column":4},"end":{"line":54,"column":null}},"20":{"start":{"line":46,"column":6},"end":{"line":51,"column":null}},"21":{"start":{"line":47,"column":25},"end":{"line":47,"column":49}},"22":{"start":{"line":48,"column":8},"end":{"line":48,"column":58}},"23":{"start":{"line":50,"column":8},"end":{"line":50,"column":69}},"24":{"start":{"line":53,"column":6},"end":{"line":53,"column":31}},"25":{"start":{"line":16,"column":13},"end":{"line":56,"column":null}},"26":{"start":{"line":16,"column":13},"end":{"line":16,"column":35}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":17,"column":2},"end":{"line":17,"column":null}},"loc":{"start":{"line":23,"column":41},"end":{"line":24,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":26,"column":2},"end":{"line":26,"column":7}},"loc":{"start":{"line":26,"column":48},"end":{"line":42,"column":3}}},"2":{"name":"(anonymous_6)","decl":{"start":{"line":44,"column":10},"end":{"line":44,"column":15}},"loc":{"start":{"line":44,"column":49},"end":{"line":55,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":34,"column":6},"end":{"line":36,"column":null}},"type":"if","locations":[{"start":{"line":34,"column":6},"end":{"line":36,"column":null}},{"start":{"line":34,"column":6},"end":{"line":36,"column":null}}]},"1":{"loc":{"start":{"line":38,"column":19},"end":{"line":38,"column":27}},"type":"binary-expr","locations":[{"start":{"line":38,"column":19},"end":{"line":38,"column":27}},{"start":{"line":38,"column":31},"end":{"line":38,"column":64}}]},"2":{"loc":{"start":{"line":45,"column":4},"end":{"line":54,"column":null}},"type":"if","locations":[{"start":{"line":45,"column":4},"end":{"line":54,"column":null}},{"start":{"line":45,"column":4},"end":{"line":54,"column":null}}]},"3":{"loc":{"start":{"line":46,"column":6},"end":{"line":51,"column":null}},"type":"if","locations":[{"start":{"line":46,"column":6},"end":{"line":51,"column":null}},{"start":{"line":46,"column":6},"end":{"line":51,"column":null}}]},"4":{"loc":{"start":{"line":46,"column":10},"end":{"line":46,"column":33}},"type":"binary-expr","locations":[{"start":{"line":46,"column":10},"end":{"line":46,"column":33}},{"start":{"line":46,"column":37},"end":{"line":46,"column":64}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":3,"7":3,"8":3,"9":3,"10":35,"11":35,"12":68,"13":68,"14":68,"15":29,"16":35,"17":35,"18":35,"19":68,"20":50,"21":31,"22":31,"23":19,"24":18,"25":6,"26":6},"f":{"0":3,"1":35,"2":68},"b":{"0":[29,39],"1":[35,6],"2":[50,18],"3":[31,19],"4":[50,31]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/cookie.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/cookie.resolver.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":84}},"3":{"start":{"line":10,"column":0},"end":{"line":29,"column":null}},"4":{"start":{"line":13,"column":21},"end":{"line":13,"column":45}},"5":{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},"6":{"start":{"line":18,"column":6},"end":{"line":18,"column":53}},"7":{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},"8":{"start":{"line":21,"column":6},"end":{"line":25,"column":null}},"9":{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},"10":{"start":{"line":23,"column":10},"end":{"line":23,"column":50}},"11":{"start":{"line":27,"column":4},"end":{"line":27,"column":21}},"12":{"start":{"line":10,"column":13},"end":{"line":29,"column":null}},"13":{"start":{"line":10,"column":13},"end":{"line":10,"column":27}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":11,"column":2},"end":{"line":11,"column":null}},"loc":{"start":{"line":13,"column":53},"end":{"line":14,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":16,"column":2},"end":{"line":16,"column":9}},"loc":{"start":{"line":16,"column":13},"end":{"line":28,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":45},"end":{"line":13,"column":53}},"type":"default-arg","locations":[{"start":{"line":13,"column":45},"end":{"line":13,"column":53}}]},"1":{"loc":{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},{"start":{"line":17,"column":4},"end":{"line":19,"column":null}}]},"2":{"loc":{"start":{"line":17,"column":8},"end":{"line":17,"column":20}},"type":"binary-expr","locations":[{"start":{"line":17,"column":8},"end":{"line":17,"column":20}},{"start":{"line":17,"column":24},"end":{"line":17,"column":42}}]},"3":{"loc":{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},"type":"if","locations":[{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},{"start":{"line":20,"column":4},"end":{"line":26,"column":null}}]},"4":{"loc":{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},"type":"if","locations":[{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},{"start":{"line":22,"column":8},"end":{"line":24,"column":null}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":3,"5":14,"6":8,"7":14,"8":8,"9":8,"10":8,"11":6,"12":6,"13":6},"f":{"0":3,"1":14},"b":{"0":[3],"1":[8,6],"2":[14,14],"3":[8,6],"4":[8,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/header.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/header.resolver.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":84}},"2":{"start":{"line":7,"column":0},"end":{"line":25,"column":null}},"3":{"start":{"line":10,"column":12},"end":{"line":10,"column":29}},"4":{"start":{"line":16,"column":4},"end":{"line":21,"column":null}},"5":{"start":{"line":17,"column":6},"end":{"line":20,"column":null}},"6":{"start":{"line":18,"column":8},"end":{"line":18,"column":32}},"7":{"start":{"line":19,"column":8},"end":{"line":19,"column":14}},"8":{"start":{"line":23,"column":4},"end":{"line":23,"column":16}},"9":{"start":{"line":7,"column":13},"end":{"line":25,"column":null}},"10":{"start":{"line":7,"column":13},"end":{"line":7,"column":27}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":8,"column":2},"end":{"line":8,"column":null}},"loc":{"start":{"line":10,"column":48},"end":{"line":11,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":13,"column":2},"end":{"line":13,"column":9}},"loc":{"start":{"line":13,"column":18},"end":{"line":24,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":10,"column":29},"end":{"line":10,"column":48}},"type":"default-arg","locations":[{"start":{"line":10,"column":29},"end":{"line":10,"column":48}}]},"1":{"loc":{"start":{"line":17,"column":6},"end":{"line":20,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":6},"end":{"line":20,"column":null}},{"start":{"line":17,"column":6},"end":{"line":20,"column":null}}]}},"s":{"0":6,"1":6,"2":6,"3":3,"4":23,"5":23,"6":9,"7":9,"8":23,"9":6,"10":6},"f":{"0":3,"1":23},"b":{"0":[3],"1":[9,14]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/query.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/query.resolver.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":84}},"2":{"start":{"line":6,"column":0},"end":{"line":21,"column":null}},"3":{"start":{"line":7,"column":45},"end":{"line":7,"column":59}},"4":{"start":{"line":12,"column":4},"end":{"line":17,"column":null}},"5":{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},"6":{"start":{"line":14,"column":8},"end":{"line":14,"column":30}},"7":{"start":{"line":15,"column":8},"end":{"line":15,"column":14}},"8":{"start":{"line":19,"column":4},"end":{"line":19,"column":16}},"9":{"start":{"line":6,"column":13},"end":{"line":21,"column":null}},"10":{"start":{"line":6,"column":13},"end":{"line":6,"column":26}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":7,"column":2},"end":{"line":7,"column":15}},"loc":{"start":{"line":7,"column":59},"end":{"line":7,"column":63}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":9}},"loc":{"start":{"line":9,"column":18},"end":{"line":20,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},"type":"if","locations":[{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},{"start":{"line":13,"column":6},"end":{"line":16,"column":null}}]},"1":{"loc":{"start":{"line":13,"column":10},"end":{"line":13,"column":32}},"type":"binary-expr","locations":[{"start":{"line":13,"column":10},"end":{"line":13,"column":32}},{"start":{"line":13,"column":36},"end":{"line":13,"column":64}}]}},"s":{"0":6,"1":6,"2":6,"3":2,"4":31,"5":81,"6":12,"7":12,"8":31,"9":6,"10":6},"f":{"0":2,"1":31},"b":{"0":[12,69],"1":[81,81]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n-request-scope.service.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n-request-scope.service.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":39}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":45}},"3":{"start":{"line":6,"column":0},"end":{"line":24,"column":null}},"4":{"start":{"line":10,"column":38},"end":{"line":10,"column":null}},"5":{"start":{"line":11,"column":21},"end":{"line":11,"column":34}},"6":{"start":{"line":13,"column":4},"end":{"line":14,"column":63}},"7":{"start":{"line":18,"column":4},"end":{"line":21,"column":6}},"8":{"start":{"line":22,"column":4},"end":{"line":22,"column":52}},"9":{"start":{"line":6,"column":13},"end":{"line":24,"column":null}},"10":{"start":{"line":6,"column":13},"end":{"line":6,"column":36}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":null}},"loc":{"start":{"line":11,"column":45},"end":{"line":15,"column":3}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":17,"column":9},"end":{"line":17,"column":18}},"loc":{"start":{"line":17,"column":32},"end":{"line":23,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":6},"end":{"line":14,"column":18}},"type":"binary-expr","locations":[{"start":{"line":14,"column":6},"end":{"line":14,"column":18}},{"start":{"line":14,"column":23},"end":{"line":14,"column":61}}]},"1":{"loc":{"start":{"line":14,"column":33},"end":{"line":14,"column":49}},"type":"cond-expr","locations":[{"start":{"line":14,"column":33},"end":{"line":14,"column":49}},{"start":{"line":14,"column":52},"end":{"line":14,"column":61}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":31,"5":31,"6":31,"7":10,"8":10,"9":6,"10":6},"f":{"0":31,"1":10},"b":{"0":[31,0],"1":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n.service.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n.service.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":60}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":40}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":10,"column":0},"end":{"line":10,"column":25}},"4":{"start":{"line":11,"column":0},"end":{"line":11,"column":28}},"5":{"start":{"line":12,"column":0},"end":{"line":12,"column":29}},"6":{"start":{"line":15,"column":0},"end":{"line":112,"column":null}},"7":{"start":{"line":18,"column":21},"end":{"line":18,"column":45}},"8":{"start":{"line":20,"column":21},"end":{"line":20,"column":50}},"9":{"start":{"line":22,"column":21},"end":{"line":22,"column":49}},"10":{"start":{"line":23,"column":21},"end":{"line":23,"column":29}},"11":{"start":{"line":33,"column":4},"end":{"line":36,"column":6}},"12":{"start":{"line":38,"column":27},"end":{"line":38,"column":34}},"13":{"start":{"line":40,"column":35},"end":{"line":40,"column":58}},"14":{"start":{"line":42,"column":4},"end":{"line":61,"column":null}},"15":{"start":{"line":48,"column":6},"end":{"line":50,"column":null}},"16":{"start":{"line":49,"column":8},"end":{"line":49,"column":47}},"17":{"start":{"line":52,"column":6},"end":{"line":60,"column":null}},"18":{"start":{"line":53,"column":24},"end":{"line":53,"column":75}},"19":{"start":{"line":54,"column":8},"end":{"line":54,"column":35}},"20":{"start":{"line":56,"column":8},"end":{"line":59,"column":11}},"21":{"start":{"line":63,"column":22},"end":{"line":63,"column":49}},"22":{"start":{"line":65,"column":4},"end":{"line":70,"column":null}},"23":{"start":{"line":66,"column":6},"end":{"line":69,"column":8}},"24":{"start":{"line":71,"column":4},"end":{"line":71,"column":30}},"25":{"start":{"line":75,"column":4},"end":{"line":75,"column":35}},"26":{"start":{"line":79,"column":28},"end":{"line":79,"column":70}},"27":{"start":{"line":80,"column":4},"end":{"line":83,"column":null}},"28":{"start":{"line":81,"column":6},"end":{"line":81,"column":74}},"29":{"start":{"line":82,"column":6},"end":{"line":82,"column":13}},"30":{"start":{"line":85,"column":21},"end":{"line":85,"column":35}},"31":{"start":{"line":86,"column":21},"end":{"line":86,"column":37}},"32":{"start":{"line":87,"column":27},"end":{"line":87,"column":45}},"33":{"start":{"line":89,"column":21},"end":{"line":89,"column":70}},"34":{"start":{"line":92,"column":22},"end":{"line":92,"column":24}},"35":{"start":{"line":93,"column":4},"end":{"line":96,"column":null}},"36":{"start":{"line":94,"column":26},"end":{"line":94,"column":73}},"37":{"start":{"line":95,"column":6},"end":{"line":95,"column":44}},"38":{"start":{"line":100,"column":4},"end":{"line":102,"column":null}},"39":{"start":{"line":101,"column":6},"end":{"line":101,"column":13}},"40":{"start":{"line":105,"column":4},"end":{"line":105,"column":57}},"41":{"start":{"line":107,"column":4},"end":{"line":107,"column":69}},"42":{"start":{"line":108,"column":4},"end":{"line":110,"column":6}},"43":{"start":{"line":15,"column":13},"end":{"line":112,"column":null}},"44":{"start":{"line":15,"column":13},"end":{"line":15,"column":24}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":16,"column":2},"end":{"line":16,"column":null}},"loc":{"start":{"line":23,"column":35},"end":{"line":24,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":26,"column":9},"end":{"line":26,"column":18}},"loc":{"start":{"line":31,"column":5},"end":{"line":72,"column":3}}},"2":{"name":"(anonymous_6)","decl":{"start":{"line":74,"column":9},"end":{"line":74,"column":30}},"loc":{"start":{"line":74,"column":30},"end":{"line":76,"column":3}}},"3":{"name":"(anonymous_7)","decl":{"start":{"line":78,"column":10},"end":{"line":78,"column":32}},"loc":{"start":{"line":78,"column":62},"end":{"line":111,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":42,"column":4},"end":{"line":61,"column":null}},"type":"if","locations":[{"start":{"line":42,"column":4},"end":{"line":61,"column":null}},{"start":{"line":42,"column":4},"end":{"line":61,"column":null}}]},"1":{"loc":{"start":{"line":43,"column":6},"end":{"line":43,"column":42}},"type":"binary-expr","locations":[{"start":{"line":43,"column":6},"end":{"line":43,"column":42}},{"start":{"line":44,"column":6},"end":{"line":44,"column":37}},{"start":{"line":45,"column":7},"end":{"line":45,"column":31}},{"start":{"line":45,"column":35},"end":{"line":45,"column":78}}]},"2":{"loc":{"start":{"line":48,"column":6},"end":{"line":50,"column":null}},"type":"if","locations":[{"start":{"line":48,"column":6},"end":{"line":50,"column":null}},{"start":{"line":48,"column":6},"end":{"line":50,"column":null}}]},"3":{"loc":{"start":{"line":52,"column":6},"end":{"line":60,"column":null}},"type":"if","locations":[{"start":{"line":52,"column":6},"end":{"line":60,"column":null}},{"start":{"line":52,"column":6},"end":{"line":60,"column":null}}]},"4":{"loc":{"start":{"line":65,"column":4},"end":{"line":70,"column":null}},"type":"if","locations":[{"start":{"line":65,"column":4},"end":{"line":70,"column":null}},{"start":{"line":65,"column":4},"end":{"line":70,"column":null}}]},"5":{"loc":{"start":{"line":65,"column":8},"end":{"line":65,"column":19}},"type":"binary-expr","locations":[{"start":{"line":65,"column":8},"end":{"line":65,"column":19}},{"start":{"line":65,"column":24},"end":{"line":65,"column":28}},{"start":{"line":65,"column":33},"end":{"line":65,"column":54}},{"start":{"line":65,"column":58},"end":{"line":65,"column":73}}]},"6":{"loc":{"start":{"line":68,"column":36},"end":{"line":68,"column":46}},"type":"cond-expr","locations":[{"start":{"line":68,"column":36},"end":{"line":68,"column":46}},{"start":{"line":68,"column":49},"end":{"line":68,"column":55}}]},"7":{"loc":{"start":{"line":68,"column":36},"end":{"line":68,"column":40}},"type":"binary-expr","locations":[{"start":{"line":68,"column":36},"end":{"line":68,"column":40}},{"start":{"line":68,"column":44},"end":{"line":68,"column":46}}]},"8":{"loc":{"start":{"line":71,"column":11},"end":{"line":71,"column":22}},"type":"binary-expr","locations":[{"start":{"line":71,"column":11},"end":{"line":71,"column":22}},{"start":{"line":71,"column":26},"end":{"line":71,"column":29}}]},"9":{"loc":{"start":{"line":80,"column":4},"end":{"line":83,"column":null}},"type":"if","locations":[{"start":{"line":80,"column":4},"end":{"line":83,"column":null}},{"start":{"line":80,"column":4},"end":{"line":83,"column":null}}]},"10":{"loc":{"start":{"line":93,"column":4},"end":{"line":96,"column":null}},"type":"if","locations":[{"start":{"line":93,"column":4},"end":{"line":96,"column":null}},{"start":{"line":93,"column":4},"end":{"line":96,"column":null}}]},"11":{"loc":{"start":{"line":100,"column":4},"end":{"line":102,"column":null}},"type":"if","locations":[{"start":{"line":100,"column":4},"end":{"line":102,"column":null}},{"start":{"line":100,"column":4},"end":{"line":102,"column":null}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":10,"8":10,"9":10,"10":10,"11":67,"12":67,"13":67,"14":67,"15":10,"16":4,"17":10,"18":3,"19":3,"20":3,"21":64,"22":64,"23":3,"24":64,"25":1,"26":4,"27":4,"28":0,"29":0,"30":4,"31":4,"32":4,"33":4,"34":4,"35":4,"36":2,"37":2,"38":4,"39":1,"40":3,"41":3,"42":3,"43":6,"44":6},"f":{"0":10,"1":67,"2":1,"3":4},"b":{"0":[10,57],"1":[67,66,66,66],"2":[4,6],"3":[3,7],"4":[3,61],"5":[64,57,54,0],"6":[2,1],"7":[2,0],"8":[64,7],"9":[0,4],"10":[2,2],"11":[1,3]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/utils/parse.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/utils/parse.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":29}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":29}},"3":{"start":{"line":6,"column":0},"end":{"line":6,"column":33}},"4":{"start":{"line":8,"column":16},"end":{"line":8,"column":37}},"5":{"start":{"line":9,"column":14},"end":{"line":9,"column":33}},"6":{"start":{"line":10,"column":15},"end":{"line":10,"column":35}},"7":{"start":{"line":11,"column":17},"end":{"line":11,"column":39}},"8":{"start":{"line":17,"column":2},"end":{"line":17,"column":44}},"9":{"start":{"line":24,"column":20},"end":{"line":24,"column":53}},"10":{"start":{"line":25,"column":2},"end":{"line":25,"column":58}},"11":{"start":{"line":25,"column":40},"end":{"line":25,"column":56}},"12":{"start":{"line":28,"column":20},"end":{"line":29,"column":37}},"13":{"start":{"line":29,"column":2},"end":{"line":29,"column":37}},"14":{"start":{"line":31,"column":13},"end":{"line":37,"column":2}},"15":{"start":{"line":32,"column":15},"end":{"line":32,"column":36}},"16":{"start":{"line":33,"column":2},"end":{"line":36,"column":4}},"17":{"start":{"line":34,"column":21},"end":{"line":34,"column":44}},"18":{"start":{"line":39,"column":17},"end":{"line":55,"column":1}},"19":{"start":{"line":40,"column":15},"end":{"line":40,"column":62}},"20":{"start":{"line":42,"column":2},"end":{"line":54,"column":69}},"21":{"start":{"line":44,"column":6},"end":{"line":52,"column":null}},"22":{"start":{"line":45,"column":8},"end":{"line":49,"column":null}},"23":{"start":{"line":46,"column":10},"end":{"line":46,"column":74}},"24":{"start":{"line":48,"column":10},"end":{"line":48,"column":52}},"25":{"start":{"line":51,"column":8},"end":{"line":51,"column":21}},"26":{"start":{"line":54,"column":13},"end":{"line":54,"column":67}},"27":{"start":{"line":58,"column":19},"end":{"line":58,"column":58}},"28":{"start":{"line":60,"column":2},"end":{"line":62,"column":4}},"29":{"start":{"line":61,"column":4},"end":{"line":61,"column":32}},"30":{"start":{"line":57,"column":0},"end":{"line":57,"column":7}},"31":{"start":{"line":68,"column":19},"end":{"line":68,"column":58}},"32":{"start":{"line":70,"column":40},"end":{"line":70,"column":42}},"33":{"start":{"line":72,"column":2},"end":{"line":74,"column":null}},"34":{"start":{"line":73,"column":4},"end":{"line":73,"column":63}},"35":{"start":{"line":76,"column":2},"end":{"line":80,"column":null}},"36":{"start":{"line":77,"column":4},"end":{"line":79,"column":6}},"37":{"start":{"line":82,"column":20},"end":{"line":82,"column":47}},"38":{"start":{"line":84,"column":18},"end":{"line":84,"column":73}},"39":{"start":{"line":86,"column":16},"end":{"line":92,"column":25}},"40":{"start":{"line":87,"column":26},"end":{"line":87,"column":48}},"41":{"start":{"line":90,"column":4},"end":{"line":90,"column":59}},"42":{"start":{"line":91,"column":4},"end":{"line":91,"column":17}},"43":{"start":{"line":94,"column":2},"end":{"line":116,"column":null}},"44":{"start":{"line":95,"column":17},"end":{"line":95,"column":22}},"45":{"start":{"line":97,"column":16},"end":{"line":97,"column":78}},"46":{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},"47":{"start":{"line":100,"column":6},"end":{"line":100,"column":20}},"48":{"start":{"line":103,"column":17},"end":{"line":103,"column":57}},"49":{"start":{"line":105,"column":19},"end":{"line":105,"column":52}},"50":{"start":{"line":107,"column":21},"end":{"line":107,"column":39}},"51":{"start":{"line":109,"column":4},"end":{"line":115,"column":null}},"52":{"start":{"line":110,"column":6},"end":{"line":114,"column":9}},"53":{"start":{"line":111,"column":8},"end":{"line":111,"column":76}},"54":{"start":{"line":112,"column":8},"end":{"line":113,"column":29}},"55":{"start":{"line":118,"column":2},"end":{"line":118,"column":22}},"56":{"start":{"line":65,"column":0},"end":{"line":65,"column":7}}},"fnMap":{"0":{"name":"mapAsync","decl":{"start":{"line":13,"column":9},"end":{"line":13,"column":17}},"loc":{"start":{"line":15,"column":65},"end":{"line":18,"column":1}}},"1":{"name":"filterAsync","decl":{"start":{"line":20,"column":15},"end":{"line":20,"column":26}},"loc":{"start":{"line":22,"column":71},"end":{"line":26,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":25,"column":22},"end":{"line":25,"column":23}},"loc":{"start":{"line":25,"column":40},"end":{"line":25,"column":56}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":28,"column":20},"end":{"line":28,"column":25}},"loc":{"start":{"line":29,"column":2},"end":{"line":29,"column":37}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":31,"column":30},"end":{"line":31,"column":35}},"loc":{"start":{"line":31,"column":55},"end":{"line":37,"column":1}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":34,"column":13},"end":{"line":34,"column":17}},"loc":{"start":{"line":34,"column":21},"end":{"line":34,"column":44}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":39,"column":17},"end":{"line":39,"column":22}},"loc":{"start":{"line":39,"column":60},"end":{"line":55,"column":1}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":43,"column":28},"end":{"line":43,"column":33}},"loc":{"start":{"line":43,"column":60},"end":{"line":53,"column":5}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":54,"column":8},"end":{"line":54,"column":9}},"loc":{"start":{"line":54,"column":13},"end":{"line":54,"column":67}}},"9":{"name":"getLanguages","decl":{"start":{"line":57,"column":22},"end":{"line":57,"column":34}},"loc":{"start":{"line":57,"column":55},"end":{"line":63,"column":1}}},"10":{"name":"(anonymous_10)","decl":{"start":{"line":60,"column":46},"end":{"line":60,"column":49}},"loc":{"start":{"line":61,"column":4},"end":{"line":61,"column":32}}},"11":{"name":"parseTranslations","decl":{"start":{"line":65,"column":22},"end":{"line":65,"column":39}},"loc":{"start":{"line":66,"column":22},"end":{"line":119,"column":1}}},"12":{"name":"(anonymous_12)","decl":{"start":{"line":87,"column":21},"end":{"line":87,"column":22}},"loc":{"start":{"line":87,"column":26},"end":{"line":87,"column":48}}},"13":{"name":"(anonymous_13)","decl":{"start":{"line":89,"column":11},"end":{"line":89,"column":16}},"loc":{"start":{"line":89,"column":33},"end":{"line":92,"column":3}}},"14":{"name":"(anonymous_14)","decl":{"start":{"line":110,"column":48},"end":{"line":110,"column":52}},"loc":{"start":{"line":110,"column":55},"end":{"line":114,"column":7}}}},"branchMap":{"0":{"loc":{"start":{"line":45,"column":8},"end":{"line":49,"column":null}},"type":"if","locations":[{"start":{"line":45,"column":8},"end":{"line":49,"column":null}},{"start":{"line":45,"column":8},"end":{"line":49,"column":null}}]},"1":{"loc":{"start":{"line":46,"column":18},"end":{"line":46,"column":53}},"type":"binary-expr","locations":[{"start":{"line":46,"column":18},"end":{"line":46,"column":53}},{"start":{"line":46,"column":58},"end":{"line":46,"column":73}}]},"2":{"loc":{"start":{"line":48,"column":17},"end":{"line":48,"column":27}},"type":"binary-expr","locations":[{"start":{"line":48,"column":17},"end":{"line":48,"column":27}},{"start":{"line":48,"column":31},"end":{"line":48,"column":51}}]},"3":{"loc":{"start":{"line":54,"column":56},"end":{"line":54,"column":57}},"type":"cond-expr","locations":[{"start":{"line":54,"column":56},"end":{"line":54,"column":57}},{"start":{"line":54,"column":60},"end":{"line":54,"column":66}}]},"4":{"loc":{"start":{"line":72,"column":2},"end":{"line":74,"column":null}},"type":"if","locations":[{"start":{"line":72,"column":2},"end":{"line":74,"column":null}},{"start":{"line":72,"column":2},"end":{"line":74,"column":null}}]},"5":{"loc":{"start":{"line":76,"column":2},"end":{"line":80,"column":null}},"type":"if","locations":[{"start":{"line":76,"column":2},"end":{"line":80,"column":null}},{"start":{"line":76,"column":2},"end":{"line":80,"column":null}}]},"6":{"loc":{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},"type":"if","locations":[{"start":{"line":99,"column":4},"end":{"line":101,"column":null}},{"start":{"line":99,"column":4},"end":{"line":101,"column":null}}]},"7":{"loc":{"start":{"line":110,"column":20},"end":{"line":110,"column":29}},"type":"cond-expr","locations":[{"start":{"line":110,"column":20},"end":{"line":110,"column":29}},{"start":{"line":110,"column":32},"end":{"line":110,"column":37}}]},"8":{"loc":{"start":{"line":111,"column":52},"end":{"line":111,"column":70}},"type":"cond-expr","locations":[{"start":{"line":111,"column":52},"end":{"line":111,"column":70}},{"start":{"line":111,"column":73},"end":{"line":111,"column":75}}]},"9":{"loc":{"start":{"line":112,"column":39},"end":{"line":112,"column":41}},"type":"cond-expr","locations":[{"start":{"line":112,"column":39},"end":{"line":112,"column":41}},{"start":{"line":112,"column":44},"end":{"line":112,"column":56}}]}},"s":{"0":6,"1":6,"2":6,"3":6,"4":6,"5":6,"6":6,"7":6,"8":50,"9":50,"10":50,"11":150,"12":6,"13":80,"14":6,"15":20,"16":20,"17":80,"18":6,"19":30,"20":30,"21":70,"22":70,"23":0,"24":70,"25":0,"26":28,"27":20,"28":20,"29":40,"30":6,"31":10,"32":10,"33":10,"34":0,"35":10,"36":0,"37":10,"38":10,"39":10,"40":20,"41":30,"42":30,"43":10,"44":28,"45":28,"46":28,"47":10,"48":28,"49":28,"50":28,"51":28,"52":124,"53":134,"54":134,"55":10,"56":6},"f":{"0":50,"1":50,"2":150,"3":80,"4":20,"5":80,"6":30,"7":70,"8":28,"9":20,"10":40,"11":10,"12":20,"13":30,"14":134},"b":{"0":[0,70],"1":[0,0],"2":[70,50],"3":[0,28],"4":[0,10],"5":[0,10],"6":[10,18],"7":[10,114],"8":[114,20],"9":[20,114]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/utils/util.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/utils/util.ts","statementMap":{"0":{"start":{"line":4,"column":2},"end":{"line":7,"column":4}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":16}}},"fnMap":{"0":{"name":"shouldResolve","decl":{"start":{"line":3,"column":16},"end":{"line":3,"column":29}},"loc":{"start":{"line":3,"column":51},"end":{"line":8,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":4},"end":{"line":5,"column":27}},"type":"binary-expr","locations":[{"start":{"line":5,"column":4},"end":{"line":5,"column":27}},{"start":{"line":6,"column":5},"end":{"line":6,"column":28}},{"start":{"line":6,"column":32},"end":{"line":6,"column":59}}]}},"s":{"0":76,"1":6},"f":{"0":76},"b":{"0":[76,55,33]}} | ||
{"/home/toon/Projects/nestjs-i18n/src/lib/i18n.constants.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.constants.ts","statementMap":{"0":{"start":{"line":1,"column":13},"end":{"line":1,"column":42}},"1":{"start":{"line":2,"column":13},"end":{"line":2,"column":52}},"2":{"start":{"line":3,"column":13},"end":{"line":3,"column":46}},"3":{"start":{"line":4,"column":13},"end":{"line":4,"column":59}},"4":{"start":{"line":5,"column":13},"end":{"line":5,"column":46}},"5":{"start":{"line":6,"column":13},"end":{"line":6,"column":55}},"6":{"start":{"line":9,"column":13},"end":{"line":9,"column":61}},"7":{"start":{"line":10,"column":13},"end":{"line":10,"column":67}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5},"f":{},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/i18n.context.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.context.ts","statementMap":{"0":{"start":{"line":5,"column":13},"end":{"line":5,"column":37}},"1":{"start":{"line":6,"column":21},"end":{"line":6,"column":41}},"2":{"start":{"line":10,"column":4},"end":{"line":13,"column":6}},"3":{"start":{"line":14,"column":4},"end":{"line":14,"column":48}},"4":{"start":{"line":3,"column":0},"end":{"line":3,"column":13}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":2},"end":{"line":4,"column":null}},"loc":{"start":{"line":6,"column":41},"end":{"line":7,"column":6}}},"1":{"name":"(anonymous_1)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":11}},"loc":{"start":{"line":9,"column":25},"end":{"line":15,"column":3}}}},"branchMap":{},"s":{"0":12,"1":12,"2":12,"3":12,"4":5},"f":{"0":12,"1":12},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/i18n.module.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/i18n.module.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":null}},"2":{"start":{"line":19,"column":0},"end":{"line":19,"column":54}},"3":{"start":{"line":20,"column":0},"end":{"line":20,"column":80}},"4":{"start":{"line":29,"column":0},"end":{"line":29,"column":79}},"5":{"start":{"line":30,"column":0},"end":{"line":30,"column":58}},"6":{"start":{"line":31,"column":0},"end":{"line":31,"column":91}},"7":{"start":{"line":32,"column":0},"end":{"line":32,"column":45}},"8":{"start":{"line":34,"column":0},"end":{"line":34,"column":51}},"9":{"start":{"line":35,"column":0},"end":{"line":35,"column":null}},"10":{"start":{"line":42,"column":15},"end":{"line":42,"column":40}},"11":{"start":{"line":44,"column":45},"end":{"line":46,"column":2}},"12":{"start":{"line":50,"column":23},"end":{"line":332,"column":null}},"13":{"start":{"line":52,"column":21},"end":{"line":52,"column":38}},"14":{"start":{"line":53,"column":21},"end":{"line":53,"column":32}},"15":{"start":{"line":58,"column":6},"end":{"line":60,"column":55}},"16":{"start":{"line":62,"column":4},"end":{"line":74,"column":null}},"17":{"start":{"line":63,"column":6},"end":{"line":71,"column":11}},"18":{"start":{"line":66,"column":10},"end":{"line":70,"column":15}},"19":{"start":{"line":69,"column":14},"end":{"line":69,"column":57}},"20":{"start":{"line":73,"column":6},"end":{"line":73,"column":60}},"21":{"start":{"line":78,"column":4},"end":{"line":78,"column":48}},"22":{"start":{"line":80,"column":33},"end":{"line":80,"column":66}},"23":{"start":{"line":81,"column":35},"end":{"line":81,"column":75}},"24":{"start":{"line":83,"column":39},"end":{"line":86,"column":6}},"25":{"start":{"line":88,"column":46},"end":{"line":91,"column":6}},"26":{"start":{"line":93,"column":53},"end":{"line":96,"column":6}},"27":{"start":{"line":98,"column":56},"end":{"line":101,"column":6}},"28":{"start":{"line":103,"column":58},"end":{"line":106,"column":6}},"29":{"start":{"line":108,"column":33},"end":{"line":126,"column":6}},"30":{"start":{"line":113,"column":8},"end":{"line":122,"column":null}},"31":{"start":{"line":114,"column":30},"end":{"line":114,"column":50}},"32":{"start":{"line":115,"column":10},"end":{"line":119,"column":null}},"33":{"start":{"line":116,"column":12},"end":{"line":116,"column":58}},"34":{"start":{"line":118,"column":12},"end":{"line":118,"column":53}},"35":{"start":{"line":121,"column":10},"end":{"line":121,"column":55}},"36":{"start":{"line":123,"column":8},"end":{"line":123,"column":53}},"37":{"start":{"line":128,"column":31},"end":{"line":144,"column":6}},"38":{"start":{"line":131,"column":8},"end":{"line":140,"column":null}},"39":{"start":{"line":132,"column":28},"end":{"line":132,"column":52}},"40":{"start":{"line":133,"column":10},"end":{"line":137,"column":null}},"41":{"start":{"line":134,"column":12},"end":{"line":134,"column":54}},"42":{"start":{"line":136,"column":12},"end":{"line":136,"column":49}},"43":{"start":{"line":139,"column":10},"end":{"line":139,"column":55}},"44":{"start":{"line":141,"column":8},"end":{"line":141,"column":51}},"45":{"start":{"line":146,"column":30},"end":{"line":149,"column":6}},"46":{"start":{"line":151,"column":4},"end":{"line":168,"column":6}},"47":{"start":{"line":172,"column":33},"end":{"line":172,"column":73}},"48":{"start":{"line":173,"column":37},"end":{"line":173,"column":74}},"49":{"start":{"line":174,"column":35},"end":{"line":174,"column":70}},"50":{"start":{"line":175,"column":39},"end":{"line":175,"column":78}},"51":{"start":{"line":177,"column":33},"end":{"line":177,"column":66}},"52":{"start":{"line":178,"column":35},"end":{"line":178,"column":75}},"53":{"start":{"line":180,"column":45},"end":{"line":183,"column":6}},"54":{"start":{"line":185,"column":58},"end":{"line":188,"column":6}},"55":{"start":{"line":190,"column":56},"end":{"line":193,"column":6}},"56":{"start":{"line":195,"column":58},"end":{"line":198,"column":6}},"57":{"start":{"line":200,"column":4},"end":{"line":218,"column":6}},"58":{"start":{"line":224,"column":4},"end":{"line":230,"column":null}},"59":{"start":{"line":225,"column":6},"end":{"line":229,"column":8}},"60":{"start":{"line":231,"column":4},"end":{"line":236,"column":6}},"61":{"start":{"line":234,"column":8},"end":{"line":234,"column":48}},"62":{"start":{"line":240,"column":4},"end":{"line":246,"column":6}},"63":{"start":{"line":243,"column":8},"end":{"line":243,"column":37}},"64":{"start":{"line":250,"column":4},"end":{"line":269,"column":6}},"65":{"start":{"line":256,"column":8},"end":{"line":265,"column":null}},"66":{"start":{"line":257,"column":30},"end":{"line":257,"column":50}},"67":{"start":{"line":258,"column":10},"end":{"line":262,"column":null}},"68":{"start":{"line":259,"column":12},"end":{"line":259,"column":55}},"69":{"start":{"line":261,"column":12},"end":{"line":261,"column":50}},"70":{"start":{"line":264,"column":10},"end":{"line":264,"column":55}},"71":{"start":{"line":266,"column":8},"end":{"line":266,"column":50}},"72":{"start":{"line":273,"column":4},"end":{"line":292,"column":6}},"73":{"start":{"line":279,"column":8},"end":{"line":288,"column":null}},"74":{"start":{"line":280,"column":28},"end":{"line":280,"column":52}},"75":{"start":{"line":281,"column":10},"end":{"line":285,"column":null}},"76":{"start":{"line":282,"column":12},"end":{"line":282,"column":50}},"77":{"start":{"line":284,"column":12},"end":{"line":284,"column":45}},"78":{"start":{"line":287,"column":10},"end":{"line":287,"column":55}},"79":{"start":{"line":289,"column":8},"end":{"line":289,"column":47}},"80":{"start":{"line":296,"column":4},"end":{"line":296,"column":48}},"81":{"start":{"line":297,"column":4},"end":{"line":297,"column":19}},"82":{"start":{"line":301,"column":4},"end":{"line":330,"column":13}},"83":{"start":{"line":304,"column":8},"end":{"line":327,"column":null}},"84":{"start":{"line":305,"column":27},"end":{"line":305,"column":51}},"85":{"start":{"line":306,"column":31},"end":{"line":306,"column":72}},"86":{"start":{"line":307,"column":10},"end":{"line":311,"column":13}},"87":{"start":{"line":312,"column":10},"end":{"line":315,"column":13}},"88":{"start":{"line":314,"column":30},"end":{"line":314,"column":46}},"89":{"start":{"line":317,"column":31},"end":{"line":317,"column":73}},"90":{"start":{"line":318,"column":10},"end":{"line":322,"column":20}},"91":{"start":{"line":323,"column":10},"end":{"line":326,"column":13}},"92":{"start":{"line":325,"column":30},"end":{"line":325,"column":39}},"93":{"start":{"line":329,"column":8},"end":{"line":329,"column":25}},"94":{"start":{"line":50,"column":13},"end":{"line":332,"column":null}},"95":{"start":{"line":50,"column":13},"end":{"line":50,"column":23}}},"fnMap":{"0":{"name":"(anonymous_2)","decl":{"start":{"line":51,"column":2},"end":{"line":51,"column":null}},"loc":{"start":{"line":53,"column":41},"end":{"line":54,"column":6}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":56,"column":2},"end":{"line":56,"column":11}},"loc":{"start":{"line":56,"column":40},"end":{"line":75,"column":3}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":65,"column":14},"end":{"line":65,"column":36}},"loc":{"start":{"line":65,"column":39},"end":{"line":71,"column":9}}},"3":{"name":"(anonymous_5)","decl":{"start":{"line":68,"column":35},"end":{"line":68,"column":36}},"loc":{"start":{"line":68,"column":54},"end":{"line":70,"column":13}}},"4":{"name":"(anonymous_6)","decl":{"start":{"line":77,"column":2},"end":{"line":77,"column":8}},"loc":{"start":{"line":77,"column":37},"end":{"line":169,"column":3}}},"5":{"name":"(anonymous_7)","decl":{"start":{"line":110,"column":18},"end":{"line":110,"column":23}},"loc":{"start":{"line":112,"column":48},"end":{"line":124,"column":7}}},"6":{"name":"(anonymous_8)","decl":{"start":{"line":130,"column":18},"end":{"line":130,"column":23}},"loc":{"start":{"line":130,"column":78},"end":{"line":142,"column":7}}},"7":{"name":"(anonymous_9)","decl":{"start":{"line":171,"column":2},"end":{"line":171,"column":8}},"loc":{"start":{"line":171,"column":47},"end":{"line":219,"column":3}}},"8":{"name":"(anonymous_10)","decl":{"start":{"line":221,"column":10},"end":{"line":221,"column":16}},"loc":{"start":{"line":222,"column":29},"end":{"line":237,"column":3}}},"9":{"name":"(anonymous_11)","decl":{"start":{"line":233,"column":18},"end":{"line":233,"column":23}},"loc":{"start":{"line":234,"column":8},"end":{"line":234,"column":48}}},"10":{"name":"(anonymous_12)","decl":{"start":{"line":239,"column":10},"end":{"line":239,"column":16}},"loc":{"start":{"line":239,"column":49},"end":{"line":247,"column":3}}},"11":{"name":"(anonymous_13)","decl":{"start":{"line":242,"column":18},"end":{"line":242,"column":23}},"loc":{"start":{"line":242,"column":63},"end":{"line":244,"column":7}}},"12":{"name":"(anonymous_14)","decl":{"start":{"line":249,"column":10},"end":{"line":249,"column":16}},"loc":{"start":{"line":249,"column":47},"end":{"line":270,"column":3}}},"13":{"name":"(anonymous_15)","decl":{"start":{"line":252,"column":18},"end":{"line":252,"column":23}},"loc":{"start":{"line":255,"column":48},"end":{"line":267,"column":7}}},"14":{"name":"(anonymous_16)","decl":{"start":{"line":272,"column":10},"end":{"line":272,"column":16}},"loc":{"start":{"line":272,"column":45},"end":{"line":293,"column":3}}},"15":{"name":"(anonymous_17)","decl":{"start":{"line":275,"column":18},"end":{"line":275,"column":23}},"loc":{"start":{"line":278,"column":41},"end":{"line":290,"column":7}}},"16":{"name":"(anonymous_18)","decl":{"start":{"line":295,"column":10},"end":{"line":295,"column":16}},"loc":{"start":{"line":295,"column":57},"end":{"line":298,"column":3}}},"17":{"name":"(anonymous_19)","decl":{"start":{"line":300,"column":10},"end":{"line":300,"column":16}},"loc":{"start":{"line":300,"column":73},"end":{"line":331,"column":3}}},"18":{"name":"(anonymous_20)","decl":{"start":{"line":303,"column":26},"end":{"line":303,"column":27}},"loc":{"start":{"line":303,"column":43},"end":{"line":330,"column":7}}},"19":{"name":"(anonymous_21)","decl":{"start":{"line":314,"column":24},"end":{"line":314,"column":27}},"loc":{"start":{"line":314,"column":30},"end":{"line":314,"column":46}}},"20":{"name":"(anonymous_22)","decl":{"start":{"line":325,"column":24},"end":{"line":325,"column":27}},"loc":{"start":{"line":325,"column":30},"end":{"line":325,"column":39}}}},"branchMap":{"0":{"loc":{"start":{"line":58,"column":6},"end":{"line":58,"column":38}},"type":"binary-expr","locations":[{"start":{"line":58,"column":6},"end":{"line":58,"column":38}},{"start":{"line":59,"column":6},"end":{"line":59,"column":50}},{"start":{"line":60,"column":6},"end":{"line":60,"column":55}}]},"1":{"loc":{"start":{"line":62,"column":4},"end":{"line":74,"column":null}},"type":"if","locations":[{"start":{"line":62,"column":4},"end":{"line":74,"column":null}},{"start":{"line":62,"column":4},"end":{"line":74,"column":null}}]},"2":{"loc":{"start":{"line":115,"column":10},"end":{"line":119,"column":null}},"type":"if","locations":[{"start":{"line":115,"column":10},"end":{"line":119,"column":null}},{"start":{"line":115,"column":10},"end":{"line":119,"column":null}}]},"3":{"loc":{"start":{"line":133,"column":10},"end":{"line":137,"column":null}},"type":"if","locations":[{"start":{"line":133,"column":10},"end":{"line":137,"column":null}},{"start":{"line":133,"column":10},"end":{"line":137,"column":null}}]},"4":{"loc":{"start":{"line":148,"column":16},"end":{"line":148,"column":33}},"type":"binary-expr","locations":[{"start":{"line":148,"column":16},"end":{"line":148,"column":33}},{"start":{"line":148,"column":37},"end":{"line":148,"column":39}}]},"5":{"loc":{"start":{"line":182,"column":16},"end":{"line":182,"column":33}},"type":"binary-expr","locations":[{"start":{"line":182,"column":16},"end":{"line":182,"column":33}},{"start":{"line":182,"column":37},"end":{"line":182,"column":39}}]},"6":{"loc":{"start":{"line":202,"column":15},"end":{"line":202,"column":30}},"type":"binary-expr","locations":[{"start":{"line":202,"column":15},"end":{"line":202,"column":30}},{"start":{"line":202,"column":34},"end":{"line":202,"column":36}}]},"7":{"loc":{"start":{"line":224,"column":4},"end":{"line":230,"column":null}},"type":"if","locations":[{"start":{"line":224,"column":4},"end":{"line":230,"column":null}},{"start":{"line":224,"column":4},"end":{"line":230,"column":null}}]},"8":{"loc":{"start":{"line":228,"column":16},"end":{"line":228,"column":30}},"type":"binary-expr","locations":[{"start":{"line":228,"column":16},"end":{"line":228,"column":30}},{"start":{"line":228,"column":34},"end":{"line":228,"column":36}}]},"9":{"loc":{"start":{"line":235,"column":15},"end":{"line":235,"column":31}},"type":"binary-expr","locations":[{"start":{"line":235,"column":15},"end":{"line":235,"column":31}},{"start":{"line":235,"column":35},"end":{"line":235,"column":54}}]},"10":{"loc":{"start":{"line":258,"column":10},"end":{"line":262,"column":null}},"type":"if","locations":[{"start":{"line":258,"column":10},"end":{"line":262,"column":null}},{"start":{"line":258,"column":10},"end":{"line":262,"column":null}}]},"11":{"loc":{"start":{"line":281,"column":10},"end":{"line":285,"column":null}},"type":"if","locations":[{"start":{"line":281,"column":10},"end":{"line":285,"column":null}},{"start":{"line":281,"column":10},"end":{"line":285,"column":null}}]},"12":{"loc":{"start":{"line":301,"column":12},"end":{"line":301,"column":21}},"type":"binary-expr","locations":[{"start":{"line":301,"column":12},"end":{"line":301,"column":21}},{"start":{"line":301,"column":25},"end":{"line":301,"column":27}}]},"13":{"loc":{"start":{"line":304,"column":8},"end":{"line":327,"column":null}},"type":"if","locations":[{"start":{"line":304,"column":8},"end":{"line":327,"column":null}},{"start":{"line":304,"column":8},"end":{"line":327,"column":null}}]},"14":{"loc":{"start":{"line":304,"column":12},"end":{"line":304,"column":35}},"type":"binary-expr","locations":[{"start":{"line":304,"column":12},"end":{"line":304,"column":35}},{"start":{"line":304,"column":39},"end":{"line":304,"column":66}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":10,"14":10,"15":3,"16":3,"17":1,"18":1,"19":18,"20":2,"21":8,"22":8,"23":8,"24":8,"25":8,"26":8,"27":8,"28":8,"29":8,"30":8,"31":8,"32":8,"33":1,"34":7,"35":0,"36":8,"37":8,"38":8,"39":8,"40":8,"41":1,"42":7,"43":0,"44":8,"45":8,"46":8,"47":2,"48":2,"49":2,"50":2,"51":2,"52":2,"53":2,"54":2,"55":2,"56":2,"57":2,"58":2,"59":2,"60":0,"61":0,"62":2,"63":2,"64":2,"65":2,"66":2,"67":2,"68":0,"69":2,"70":0,"71":2,"72":2,"73":2,"74":2,"75":2,"76":0,"77":2,"78":0,"79":2,"80":8,"81":8,"82":10,"83":4,"84":2,"85":2,"86":2,"87":2,"88":2,"89":2,"90":2,"91":2,"92":2,"93":4,"94":5,"95":5},"f":{"0":10,"1":3,"2":1,"3":18,"4":8,"5":8,"6":8,"7":2,"8":2,"9":0,"10":2,"11":2,"12":2,"13":2,"14":2,"15":2,"16":8,"17":10,"18":4,"19":2,"20":2},"b":{"0":[3,3,3],"1":[1,2],"2":[1,7],"3":[1,7],"4":[8,0],"5":[2,2],"6":[2,2],"7":[2,0],"8":[2,2],"9":[0,0],"10":[0,2],"11":[0,2],"12":[10,2],"13":[2,2],"14":[4,2]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/index.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/index.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":30}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":null}},"2":{"start":{"line":3,"column":2},"end":{"line":3,"column":null}},"3":{"start":{"line":4,"column":2},"end":{"line":4,"column":null}},"4":{"start":{"line":5,"column":2},"end":{"line":5,"column":null}},"5":{"start":{"line":6,"column":2},"end":{"line":6,"column":null}},"6":{"start":{"line":7,"column":2},"end":{"line":7,"column":null}},"7":{"start":{"line":8,"column":2},"end":{"line":8,"column":null}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":31}},"9":{"start":{"line":13,"column":0},"end":{"line":13,"column":40}},"10":{"start":{"line":14,"column":0},"end":{"line":14,"column":54}},"11":{"start":{"line":22,"column":0},"end":{"line":22,"column":49}},"12":{"start":{"line":23,"column":0},"end":{"line":23,"column":54}},"13":{"start":{"line":24,"column":0},"end":{"line":24,"column":61}},"14":{"start":{"line":25,"column":0},"end":{"line":25,"column":44}},"15":{"start":{"line":28,"column":0},"end":{"line":28,"column":44}},"16":{"start":{"line":29,"column":0},"end":{"line":29,"column":53}},"17":{"start":{"line":30,"column":0},"end":{"line":30,"column":43}},"18":{"start":{"line":31,"column":0},"end":{"line":31,"column":44}},"19":{"start":{"line":34,"column":0},"end":{"line":34,"column":38}},"20":{"start":{"line":35,"column":0},"end":{"line":35,"column":43}}},"fnMap":{},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":5,"16":5,"17":5,"18":5,"19":5,"20":5},"f":{},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-lang.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-lang.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"1":{"start":{"line":3,"column":13},"end":{"line":10,"column":3}},"2":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"3":{"start":{"line":7,"column":4},"end":{"line":7,"column":54}},"4":{"start":{"line":9,"column":2},"end":{"line":9,"column":49}},"5":{"start":{"line":13,"column":2},"end":{"line":13,"column":66}},"6":{"start":{"line":17,"column":34},"end":{"line":17,"column":37}},"7":{"start":{"line":18,"column":2},"end":{"line":18,"column":26}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":45},"end":{"line":3,"column":46}},"loc":{"start":{"line":3,"column":59},"end":{"line":10,"column":1}}},"1":{"name":"resolveI18nLanguageFromRestRequest","decl":{"start":{"line":12,"column":9},"end":{"line":12,"column":43}},"loc":{"start":{"line":12,"column":47},"end":{"line":14,"column":1}}},"2":{"name":"resolveI18nLanguageFromGraphQLContext","decl":{"start":{"line":16,"column":9},"end":{"line":16,"column":46}},"loc":{"start":{"line":16,"column":50},"end":{"line":19,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},"type":"if","locations":[{"start":{"line":6,"column":2},"end":{"line":8,"column":null}},{"start":{"line":6,"column":2},"end":{"line":8,"column":null}}]},"1":{"loc":{"start":{"line":13,"column":9},"end":{"line":13,"column":21}},"type":"binary-expr","locations":[{"start":{"line":13,"column":9},"end":{"line":13,"column":21}},{"start":{"line":13,"column":26},"end":{"line":13,"column":64}}]},"2":{"loc":{"start":{"line":13,"column":36},"end":{"line":13,"column":52}},"type":"cond-expr","locations":[{"start":{"line":13,"column":36},"end":{"line":13,"column":52}},{"start":{"line":13,"column":55},"end":{"line":13,"column":64}}]}},"s":{"0":5,"1":5,"2":16,"3":4,"4":12,"5":12,"6":4,"7":4},"f":{"0":16,"1":12,"2":4},"b":{"0":[4,12],"1":[12,0],"2":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-languages.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-languages.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":51}},"2":{"start":{"line":4,"column":13},"end":{"line":6,"column":2}},"3":{"start":{"line":5,"column":2},"end":{"line":5,"column":32}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":4,"column":29},"end":{"line":4,"column":32}},"loc":{"start":{"line":4,"column":34},"end":{"line":6,"column":1}}}},"branchMap":{},"s":{"0":5,"1":5,"2":5,"3":0},"f":{"0":0},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-resolver-options.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n-resolver-options.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":43}},"2":{"start":{"line":5,"column":2},"end":{"line":5,"column":50}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":16}},"4":{"start":{"line":9,"column":2},"end":{"line":11,"column":4}},"5":{"start":{"line":10,"column":4},"end":{"line":10,"column":75}},"6":{"start":{"line":8,"column":0},"end":{"line":8,"column":16}}},"fnMap":{"0":{"name":"getI18nResolverOptionsToken","decl":{"start":{"line":4,"column":16},"end":{"line":4,"column":43}},"loc":{"start":{"line":4,"column":60},"end":{"line":6,"column":1}}},"1":{"name":"I18nResolverOptions","decl":{"start":{"line":8,"column":16},"end":{"line":8,"column":35}},"loc":{"start":{"line":8,"column":35},"end":{"line":12,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":9,"column":9},"end":{"line":9,"column":18}},"loc":{"start":{"line":9,"column":72},"end":{"line":11,"column":3}}}},"branchMap":{},"s":{"0":5,"1":5,"2":19,"3":5,"4":15,"5":15,"6":5},"f":{"0":19,"1":15,"2":15},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n.decorator.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/decorators/i18n.decorator.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":54}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":46}},"2":{"start":{"line":5,"column":13},"end":{"line":12,"column":3}},"3":{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},"4":{"start":{"line":9,"column":4},"end":{"line":9,"column":73}},"5":{"start":{"line":11,"column":2},"end":{"line":11,"column":68}},"6":{"start":{"line":15,"column":2},"end":{"line":18,"column":4}},"7":{"start":{"line":22,"column":34},"end":{"line":22,"column":37}},"8":{"start":{"line":23,"column":2},"end":{"line":23,"column":49}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":41},"end":{"line":5,"column":42}},"loc":{"start":{"line":5,"column":55},"end":{"line":12,"column":1}}},"1":{"name":"resolveI18nServiceFromRestRequest","decl":{"start":{"line":14,"column":9},"end":{"line":14,"column":42}},"loc":{"start":{"line":14,"column":46},"end":{"line":19,"column":1}}},"2":{"name":"resolveI18nServiceFromGraphQLContext","decl":{"start":{"line":21,"column":9},"end":{"line":21,"column":45}},"loc":{"start":{"line":21,"column":49},"end":{"line":24,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},"type":"if","locations":[{"start":{"line":8,"column":2},"end":{"line":10,"column":null}},{"start":{"line":8,"column":2},"end":{"line":10,"column":null}}]},"1":{"loc":{"start":{"line":16,"column":4},"end":{"line":16,"column":16}},"type":"binary-expr","locations":[{"start":{"line":16,"column":4},"end":{"line":16,"column":16}},{"start":{"line":16,"column":21},"end":{"line":16,"column":59}}]},"2":{"loc":{"start":{"line":16,"column":31},"end":{"line":16,"column":47}},"type":"cond-expr","locations":[{"start":{"line":16,"column":31},"end":{"line":16,"column":47}},{"start":{"line":16,"column":50},"end":{"line":16,"column":59}}]},"3":{"loc":{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},"type":"binary-expr","locations":[{"start":{"line":17,"column":4},"end":{"line":17,"column":19}},{"start":{"line":17,"column":24},"end":{"line":17,"column":65}}]},"4":{"loc":{"start":{"line":17,"column":34},"end":{"line":17,"column":53}},"type":"cond-expr","locations":[{"start":{"line":17,"column":34},"end":{"line":17,"column":53}},{"start":{"line":17,"column":56},"end":{"line":17,"column":65}}]}},"s":{"0":5,"1":5,"2":5,"3":12,"4":0,"5":12,"6":12,"7":0,"8":0},"f":{"0":12,"1":12,"2":0},"b":{"0":[0,12],"1":[12,0],"2":[0,0],"3":[12,0],"4":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/middleware/i18n-language-middleware.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/middleware/i18n-language-middleware.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":null}},"1":{"start":{"line":8,"column":0},"end":{"line":8,"column":65}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":55}},"3":{"start":{"line":11,"column":0},"end":{"line":11,"column":41}},"4":{"start":{"line":12,"column":0},"end":{"line":12,"column":46}},"5":{"start":{"line":16,"column":0},"end":{"line":60,"column":null}},"6":{"start":{"line":19,"column":21},"end":{"line":19,"column":45}},"7":{"start":{"line":21,"column":21},"end":{"line":21,"column":56}},"8":{"start":{"line":22,"column":21},"end":{"line":22,"column":34}},"9":{"start":{"line":23,"column":21},"end":{"line":23,"column":32}},"10":{"start":{"line":27,"column":19},"end":{"line":27,"column":23}},"11":{"start":{"line":29,"column":4},"end":{"line":29,"column":39}},"12":{"start":{"line":30,"column":4},"end":{"line":42,"column":null}},"13":{"start":{"line":31,"column":23},"end":{"line":31,"column":48}},"14":{"start":{"line":33,"column":6},"end":{"line":33,"column":39}},"15":{"start":{"line":35,"column":6},"end":{"line":37,"column":null}},"16":{"start":{"line":36,"column":8},"end":{"line":36,"column":55}},"17":{"start":{"line":39,"column":6},"end":{"line":41,"column":null}},"18":{"start":{"line":40,"column":8},"end":{"line":40,"column":14}},"19":{"start":{"line":43,"column":4},"end":{"line":43,"column":65}},"20":{"start":{"line":45,"column":4},"end":{"line":45,"column":11}},"21":{"start":{"line":49,"column":4},"end":{"line":58,"column":null}},"22":{"start":{"line":50,"column":6},"end":{"line":55,"column":null}},"23":{"start":{"line":51,"column":25},"end":{"line":51,"column":49}},"24":{"start":{"line":52,"column":8},"end":{"line":52,"column":58}},"25":{"start":{"line":54,"column":8},"end":{"line":54,"column":69}},"26":{"start":{"line":57,"column":6},"end":{"line":57,"column":31}},"27":{"start":{"line":16,"column":13},"end":{"line":60,"column":null}},"28":{"start":{"line":16,"column":13},"end":{"line":16,"column":35}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":17,"column":2},"end":{"line":17,"column":null}},"loc":{"start":{"line":23,"column":41},"end":{"line":24,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":26,"column":2},"end":{"line":26,"column":7}},"loc":{"start":{"line":26,"column":48},"end":{"line":46,"column":3}}},"2":{"name":"(anonymous_6)","decl":{"start":{"line":48,"column":10},"end":{"line":48,"column":15}},"loc":{"start":{"line":48,"column":49},"end":{"line":59,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":35,"column":6},"end":{"line":37,"column":null}},"type":"if","locations":[{"start":{"line":35,"column":6},"end":{"line":37,"column":null}},{"start":{"line":35,"column":6},"end":{"line":37,"column":null}}]},"1":{"loc":{"start":{"line":39,"column":6},"end":{"line":41,"column":null}},"type":"if","locations":[{"start":{"line":39,"column":6},"end":{"line":41,"column":null}},{"start":{"line":39,"column":6},"end":{"line":41,"column":null}}]},"2":{"loc":{"start":{"line":43,"column":19},"end":{"line":43,"column":27}},"type":"binary-expr","locations":[{"start":{"line":43,"column":19},"end":{"line":43,"column":27}},{"start":{"line":43,"column":31},"end":{"line":43,"column":64}}]},"3":{"loc":{"start":{"line":49,"column":4},"end":{"line":58,"column":null}},"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":58,"column":null}},{"start":{"line":49,"column":4},"end":{"line":58,"column":null}}]},"4":{"loc":{"start":{"line":50,"column":6},"end":{"line":55,"column":null}},"type":"if","locations":[{"start":{"line":50,"column":6},"end":{"line":55,"column":null}},{"start":{"line":50,"column":6},"end":{"line":55,"column":null}}]},"5":{"loc":{"start":{"line":50,"column":10},"end":{"line":50,"column":33}},"type":"binary-expr","locations":[{"start":{"line":50,"column":10},"end":{"line":50,"column":33}},{"start":{"line":50,"column":37},"end":{"line":50,"column":64}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":3,"7":3,"8":3,"9":3,"10":40,"11":40,"12":40,"13":96,"14":96,"15":96,"16":12,"17":96,"18":34,"19":40,"20":40,"21":96,"22":48,"23":36,"24":36,"25":12,"26":48,"27":5,"28":5},"f":{"0":3,"1":40,"2":96},"b":{"0":[12,84],"1":[34,62],"2":[40,6],"3":[48,48],"4":[36,12],"5":[48,36]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/parsers/i18n.json.parser.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/parsers/i18n.json.parser.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":43}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":56}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":57}},"3":{"start":{"line":4,"column":0},"end":{"line":4,"column":29}},"4":{"start":{"line":5,"column":0},"end":{"line":5,"column":25}},"5":{"start":{"line":6,"column":0},"end":{"line":6,"column":57}},"6":{"start":{"line":7,"column":0},"end":{"line":7,"column":29}},"7":{"start":{"line":8,"column":0},"end":{"line":8,"column":33}},"8":{"start":{"line":10,"column":0},"end":{"line":10,"column":null}},"9":{"start":{"line":16,"column":0},"end":{"line":16,"column":37}},"10":{"start":{"line":17,"column":0},"end":{"line":17,"column":43}},"11":{"start":{"line":18,"column":17},"end":{"line":18,"column":39}},"12":{"start":{"line":19,"column":15},"end":{"line":19,"column":35}},"13":{"start":{"line":27,"column":55},"end":{"line":30,"column":2}},"14":{"start":{"line":32,"column":0},"end":{"line":154,"column":null}},"15":{"start":{"line":41,"column":4},"end":{"line":41,"column":12}},"16":{"start":{"line":39,"column":12},"end":{"line":39,"column":42}},"17":{"start":{"line":35,"column":10},"end":{"line":35,"column":50}},"18":{"start":{"line":42,"column":4},"end":{"line":42,"column":49}},"19":{"start":{"line":44,"column":4},"end":{"line":50,"column":null}},"20":{"start":{"line":45,"column":6},"end":{"line":49,"column":11}},"21":{"start":{"line":48,"column":10},"end":{"line":48,"column":34}},"22":{"start":{"line":54,"column":4},"end":{"line":56,"column":null}},"23":{"start":{"line":55,"column":6},"end":{"line":55,"column":33}},"24":{"start":{"line":60,"column":4},"end":{"line":65,"column":null}},"25":{"start":{"line":61,"column":6},"end":{"line":64,"column":8}},"26":{"start":{"line":63,"column":41},"end":{"line":63,"column":62}},"27":{"start":{"line":66,"column":4},"end":{"line":66,"column":33}},"28":{"start":{"line":70,"column":4},"end":{"line":75,"column":null}},"29":{"start":{"line":71,"column":6},"end":{"line":74,"column":8}},"30":{"start":{"line":73,"column":41},"end":{"line":73,"column":65}},"31":{"start":{"line":76,"column":4},"end":{"line":76,"column":36}},"32":{"start":{"line":80,"column":21},"end":{"line":80,"column":65}},"33":{"start":{"line":82,"column":42},"end":{"line":82,"column":44}},"34":{"start":{"line":84,"column":4},"end":{"line":86,"column":null}},"35":{"start":{"line":85,"column":6},"end":{"line":85,"column":65}},"36":{"start":{"line":88,"column":4},"end":{"line":92,"column":null}},"37":{"start":{"line":89,"column":6},"end":{"line":91,"column":8}},"38":{"start":{"line":94,"column":22},"end":{"line":94,"column":49}},"39":{"start":{"line":96,"column":20},"end":{"line":97,"column":null}},"40":{"start":{"line":100,"column":18},"end":{"line":106,"column":27}},"41":{"start":{"line":101,"column":28},"end":{"line":101,"column":50}},"42":{"start":{"line":104,"column":6},"end":{"line":104,"column":61}},"43":{"start":{"line":105,"column":6},"end":{"line":105,"column":19}},"44":{"start":{"line":108,"column":4},"end":{"line":132,"column":null}},"45":{"start":{"line":109,"column":19},"end":{"line":109,"column":24}},"46":{"start":{"line":111,"column":18},"end":{"line":113,"column":27}},"47":{"start":{"line":115,"column":6},"end":{"line":117,"column":null}},"48":{"start":{"line":116,"column":8},"end":{"line":116,"column":22}},"49":{"start":{"line":119,"column":19},"end":{"line":119,"column":59}},"50":{"start":{"line":121,"column":21},"end":{"line":121,"column":54}},"51":{"start":{"line":123,"column":23},"end":{"line":123,"column":41}},"52":{"start":{"line":125,"column":6},"end":{"line":131,"column":null}},"53":{"start":{"line":126,"column":8},"end":{"line":130,"column":11}},"54":{"start":{"line":127,"column":10},"end":{"line":127,"column":78}},"55":{"start":{"line":128,"column":10},"end":{"line":129,"column":31}},"56":{"start":{"line":134,"column":4},"end":{"line":134,"column":24}},"57":{"start":{"line":138,"column":21},"end":{"line":138,"column":65}},"58":{"start":{"line":139,"column":4},"end":{"line":141,"column":6}},"59":{"start":{"line":140,"column":6},"end":{"line":140,"column":34}},"60":{"start":{"line":145,"column":4},"end":{"line":145,"column":48}},"61":{"start":{"line":147,"column":4},"end":{"line":147,"column":59}},"62":{"start":{"line":148,"column":4},"end":{"line":150,"column":null}},"63":{"start":{"line":149,"column":6},"end":{"line":149,"column":55}},"64":{"start":{"line":152,"column":4},"end":{"line":152,"column":19}},"65":{"start":{"line":32,"column":13},"end":{"line":154,"column":null}},"66":{"start":{"line":32,"column":13},"end":{"line":32,"column":27}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":37,"column":2},"end":{"line":37,"column":null}},"loc":{"start":{"line":39,"column":42},"end":{"line":51,"column":3}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":47,"column":19},"end":{"line":47,"column":24}},"loc":{"start":{"line":47,"column":27},"end":{"line":49,"column":9}}},"2":{"name":"(anonymous_6)","decl":{"start":{"line":53,"column":2},"end":{"line":53,"column":7}},"loc":{"start":{"line":53,"column":23},"end":{"line":57,"column":3}}},"3":{"name":"(anonymous_7)","decl":{"start":{"line":59,"column":2},"end":{"line":59,"column":7}},"loc":{"start":{"line":59,"column":17},"end":{"line":67,"column":3}}},"4":{"name":"(anonymous_8)","decl":{"start":{"line":63,"column":35},"end":{"line":63,"column":38}},"loc":{"start":{"line":63,"column":41},"end":{"line":63,"column":62}}},"5":{"name":"(anonymous_9)","decl":{"start":{"line":69,"column":2},"end":{"line":69,"column":7}},"loc":{"start":{"line":69,"column":13},"end":{"line":77,"column":3}}},"6":{"name":"(anonymous_10)","decl":{"start":{"line":73,"column":35},"end":{"line":73,"column":38}},"loc":{"start":{"line":73,"column":41},"end":{"line":73,"column":65}}},"7":{"name":"(anonymous_11)","decl":{"start":{"line":79,"column":10},"end":{"line":79,"column":15}},"loc":{"start":{"line":79,"column":33},"end":{"line":135,"column":3}}},"8":{"name":"(anonymous_12)","decl":{"start":{"line":101,"column":23},"end":{"line":101,"column":24}},"loc":{"start":{"line":101,"column":28},"end":{"line":101,"column":50}}},"9":{"name":"(anonymous_13)","decl":{"start":{"line":103,"column":13},"end":{"line":103,"column":18}},"loc":{"start":{"line":103,"column":35},"end":{"line":106,"column":5}}},"10":{"name":"(anonymous_14)","decl":{"start":{"line":126,"column":50},"end":{"line":126,"column":54}},"loc":{"start":{"line":126,"column":57},"end":{"line":130,"column":9}}},"11":{"name":"(anonymous_15)","decl":{"start":{"line":137,"column":10},"end":{"line":137,"column":15}},"loc":{"start":{"line":137,"column":30},"end":{"line":142,"column":3}}},"12":{"name":"(anonymous_16)","decl":{"start":{"line":139,"column":48},"end":{"line":139,"column":51}},"loc":{"start":{"line":140,"column":6},"end":{"line":140,"column":34}}},"13":{"name":"(anonymous_17)","decl":{"start":{"line":144,"column":10},"end":{"line":144,"column":25}},"loc":{"start":{"line":144,"column":56},"end":{"line":153,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":44,"column":4},"end":{"line":50,"column":null}},"type":"if","locations":[{"start":{"line":44,"column":4},"end":{"line":50,"column":null}},{"start":{"line":44,"column":4},"end":{"line":50,"column":null}}]},"1":{"loc":{"start":{"line":54,"column":4},"end":{"line":56,"column":null}},"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":56,"column":null}},{"start":{"line":54,"column":4},"end":{"line":56,"column":null}}]},"2":{"loc":{"start":{"line":60,"column":4},"end":{"line":65,"column":null}},"type":"if","locations":[{"start":{"line":60,"column":4},"end":{"line":65,"column":null}},{"start":{"line":60,"column":4},"end":{"line":65,"column":null}}]},"3":{"loc":{"start":{"line":70,"column":4},"end":{"line":75,"column":null}},"type":"if","locations":[{"start":{"line":70,"column":4},"end":{"line":75,"column":null}},{"start":{"line":70,"column":4},"end":{"line":75,"column":null}}]},"4":{"loc":{"start":{"line":84,"column":4},"end":{"line":86,"column":null}},"type":"if","locations":[{"start":{"line":84,"column":4},"end":{"line":86,"column":null}},{"start":{"line":84,"column":4},"end":{"line":86,"column":null}}]},"5":{"loc":{"start":{"line":88,"column":4},"end":{"line":92,"column":null}},"type":"if","locations":[{"start":{"line":88,"column":4},"end":{"line":92,"column":null}},{"start":{"line":88,"column":4},"end":{"line":92,"column":null}}]},"6":{"loc":{"start":{"line":115,"column":6},"end":{"line":117,"column":null}},"type":"if","locations":[{"start":{"line":115,"column":6},"end":{"line":117,"column":null}},{"start":{"line":115,"column":6},"end":{"line":117,"column":null}}]},"7":{"loc":{"start":{"line":126,"column":22},"end":{"line":126,"column":31}},"type":"cond-expr","locations":[{"start":{"line":126,"column":22},"end":{"line":126,"column":31}},{"start":{"line":126,"column":34},"end":{"line":126,"column":39}}]},"8":{"loc":{"start":{"line":127,"column":54},"end":{"line":127,"column":72}},"type":"cond-expr","locations":[{"start":{"line":127,"column":54},"end":{"line":127,"column":72}},{"start":{"line":127,"column":75},"end":{"line":127,"column":77}}]},"9":{"loc":{"start":{"line":128,"column":41},"end":{"line":128,"column":43}},"type":"cond-expr","locations":[{"start":{"line":128,"column":41},"end":{"line":128,"column":43}},{"start":{"line":128,"column":46},"end":{"line":128,"column":58}}]},"10":{"loc":{"start":{"line":148,"column":4},"end":{"line":150,"column":null}},"type":"if","locations":[{"start":{"line":148,"column":4},"end":{"line":150,"column":null}},{"start":{"line":148,"column":4},"end":{"line":150,"column":null}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":5,"8":5,"9":5,"10":5,"11":5,"12":5,"13":5,"14":5,"15":10,"16":10,"17":10,"18":10,"19":10,"20":1,"21":1,"22":4,"23":1,"24":13,"25":1,"26":1,"27":12,"28":13,"29":1,"30":1,"31":12,"32":14,"33":14,"34":14,"35":0,"36":14,"37":0,"38":14,"39":14,"40":14,"41":30,"42":44,"43":44,"44":14,"45":45,"46":45,"47":45,"48":14,"49":45,"50":45,"51":45,"52":45,"53":189,"54":205,"55":205,"56":14,"57":28,"58":28,"59":60,"60":10,"61":10,"62":10,"63":1,"64":10,"65":5,"66":5},"f":{"0":10,"1":1,"2":4,"3":13,"4":1,"5":13,"6":1,"7":14,"8":30,"9":44,"10":205,"11":28,"12":60,"13":10},"b":{"0":[1,9],"1":[1,3],"2":[1,12],"3":[1,12],"4":[0,14],"5":[0,14],"6":[14,31],"7":[14,175],"8":[175,30],"9":[30,175],"10":[1,9]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/parsers/i18n.parser.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/parsers/i18n.parser.ts","statementMap":{"0":{"start":{"line":4,"column":0},"end":{"line":4,"column":22}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":5,"column":2},"end":{"line":5,"column":17}},"loc":{"start":{"line":5,"column":2},"end":{"line":5,"column":18}}}},"branchMap":{},"s":{"0":5},"f":{"0":10},"b":{}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/accept-language.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/accept-language.resolver.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"1":{"start":{"line":6,"column":0},"end":{"line":6,"column":46}},"2":{"start":{"line":9,"column":0},"end":{"line":20,"column":null}},"3":{"start":{"line":13,"column":17},"end":{"line":13,"column":47}},"4":{"start":{"line":14,"column":4},"end":{"line":17,"column":null}},"5":{"start":{"line":15,"column":35},"end":{"line":15,"column":50}},"6":{"start":{"line":16,"column":6},"end":{"line":16,"column":63}},"7":{"start":{"line":18,"column":4},"end":{"line":18,"column":16}},"8":{"start":{"line":9,"column":13},"end":{"line":20,"column":null}},"9":{"start":{"line":9,"column":13},"end":{"line":9,"column":35}}},"fnMap":{"0":{"name":"(anonymous_2)","decl":{"start":{"line":10,"column":2},"end":{"line":10,"column":17}},"loc":{"start":{"line":10,"column":2},"end":{"line":10,"column":18}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":12,"column":2},"end":{"line":12,"column":7}},"loc":{"start":{"line":12,"column":24},"end":{"line":19,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":4},"end":{"line":17,"column":null}},"type":"if","locations":[{"start":{"line":14,"column":4},"end":{"line":17,"column":null}},{"start":{"line":14,"column":4},"end":{"line":17,"column":null}}]}},"s":{"0":5,"1":5,"2":5,"3":12,"4":12,"5":6,"6":6,"7":6,"8":5,"9":5},"f":{"0":2,"1":12},"b":{"0":[6,6]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/cookie.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/cookie.resolver.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":33}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"2":{"start":{"line":4,"column":0},"end":{"line":4,"column":84}},"3":{"start":{"line":10,"column":0},"end":{"line":29,"column":null}},"4":{"start":{"line":13,"column":21},"end":{"line":13,"column":45}},"5":{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},"6":{"start":{"line":18,"column":6},"end":{"line":18,"column":53}},"7":{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},"8":{"start":{"line":21,"column":6},"end":{"line":25,"column":null}},"9":{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},"10":{"start":{"line":23,"column":10},"end":{"line":23,"column":50}},"11":{"start":{"line":27,"column":4},"end":{"line":27,"column":21}},"12":{"start":{"line":10,"column":13},"end":{"line":29,"column":null}},"13":{"start":{"line":10,"column":13},"end":{"line":10,"column":27}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":11,"column":2},"end":{"line":11,"column":null}},"loc":{"start":{"line":13,"column":53},"end":{"line":14,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":16,"column":2},"end":{"line":16,"column":9}},"loc":{"start":{"line":16,"column":13},"end":{"line":28,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":45},"end":{"line":13,"column":53}},"type":"default-arg","locations":[{"start":{"line":13,"column":45},"end":{"line":13,"column":53}}]},"1":{"loc":{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":4},"end":{"line":19,"column":null}},{"start":{"line":17,"column":4},"end":{"line":19,"column":null}}]},"2":{"loc":{"start":{"line":17,"column":8},"end":{"line":17,"column":20}},"type":"binary-expr","locations":[{"start":{"line":17,"column":8},"end":{"line":17,"column":20}},{"start":{"line":17,"column":24},"end":{"line":17,"column":42}}]},"3":{"loc":{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},"type":"if","locations":[{"start":{"line":20,"column":4},"end":{"line":26,"column":null}},{"start":{"line":20,"column":4},"end":{"line":26,"column":null}}]},"4":{"loc":{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},"type":"if","locations":[{"start":{"line":22,"column":8},"end":{"line":24,"column":null}},{"start":{"line":22,"column":8},"end":{"line":24,"column":null}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":3,"5":20,"6":8,"7":20,"8":8,"9":8,"10":8,"11":12,"12":5,"13":5},"f":{"0":3,"1":20},"b":{"0":[3],"1":[8,12],"2":[20,20],"3":[8,12],"4":[8,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/header.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/header.resolver.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":84}},"2":{"start":{"line":7,"column":0},"end":{"line":30,"column":null}},"3":{"start":{"line":10,"column":12},"end":{"line":10,"column":29}},"4":{"start":{"line":16,"column":4},"end":{"line":26,"column":null}},"5":{"start":{"line":17,"column":6},"end":{"line":21,"column":null}},"6":{"start":{"line":18,"column":8},"end":{"line":20,"column":10}},"7":{"start":{"line":22,"column":6},"end":{"line":25,"column":null}},"8":{"start":{"line":23,"column":8},"end":{"line":23,"column":32}},"9":{"start":{"line":24,"column":8},"end":{"line":24,"column":14}},"10":{"start":{"line":28,"column":4},"end":{"line":28,"column":16}},"11":{"start":{"line":7,"column":13},"end":{"line":30,"column":null}},"12":{"start":{"line":7,"column":13},"end":{"line":7,"column":27}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":8,"column":2},"end":{"line":8,"column":null}},"loc":{"start":{"line":10,"column":31},"end":{"line":11,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":13,"column":2},"end":{"line":13,"column":9}},"loc":{"start":{"line":13,"column":18},"end":{"line":29,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":10,"column":29},"end":{"line":10,"column":31}},"type":"default-arg","locations":[{"start":{"line":10,"column":29},"end":{"line":10,"column":31}}]},"1":{"loc":{"start":{"line":17,"column":6},"end":{"line":21,"column":null}},"type":"if","locations":[{"start":{"line":17,"column":6},"end":{"line":21,"column":null}},{"start":{"line":17,"column":6},"end":{"line":21,"column":null}}]},"2":{"loc":{"start":{"line":22,"column":6},"end":{"line":25,"column":null}},"type":"if","locations":[{"start":{"line":22,"column":6},"end":{"line":25,"column":null}},{"start":{"line":22,"column":6},"end":{"line":25,"column":null}}]}},"s":{"0":5,"1":5,"2":5,"3":3,"4":28,"5":28,"6":0,"7":28,"8":8,"9":8,"10":28,"11":5,"12":5},"f":{"0":3,"1":28},"b":{"0":[0],"1":[0,28],"2":[8,20]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/query.resolver.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/resolvers/query.resolver.ts","statementMap":{"0":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":84}},"2":{"start":{"line":6,"column":0},"end":{"line":21,"column":null}},"3":{"start":{"line":7,"column":45},"end":{"line":7,"column":59}},"4":{"start":{"line":12,"column":4},"end":{"line":17,"column":null}},"5":{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},"6":{"start":{"line":14,"column":8},"end":{"line":14,"column":30}},"7":{"start":{"line":15,"column":8},"end":{"line":15,"column":14}},"8":{"start":{"line":19,"column":4},"end":{"line":19,"column":16}},"9":{"start":{"line":6,"column":13},"end":{"line":21,"column":null}},"10":{"start":{"line":6,"column":13},"end":{"line":6,"column":26}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":7,"column":2},"end":{"line":7,"column":15}},"loc":{"start":{"line":7,"column":59},"end":{"line":7,"column":63}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":9}},"loc":{"start":{"line":9,"column":18},"end":{"line":20,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},"type":"if","locations":[{"start":{"line":13,"column":6},"end":{"line":16,"column":null}},{"start":{"line":13,"column":6},"end":{"line":16,"column":null}}]},"1":{"loc":{"start":{"line":13,"column":10},"end":{"line":13,"column":32}},"type":"binary-expr","locations":[{"start":{"line":13,"column":10},"end":{"line":13,"column":32}},{"start":{"line":13,"column":36},"end":{"line":13,"column":64}}]}},"s":{"0":5,"1":5,"2":5,"3":2,"4":36,"5":96,"6":12,"7":12,"8":36,"9":5,"10":5},"f":{"0":2,"1":36},"b":{"0":[12,84],"1":[96,96]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n-request-scope.service.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n-request-scope.service.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":59}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":39}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":45}},"3":{"start":{"line":6,"column":0},"end":{"line":24,"column":null}},"4":{"start":{"line":10,"column":38},"end":{"line":10,"column":null}},"5":{"start":{"line":11,"column":21},"end":{"line":11,"column":34}},"6":{"start":{"line":13,"column":4},"end":{"line":14,"column":63}},"7":{"start":{"line":18,"column":4},"end":{"line":21,"column":6}},"8":{"start":{"line":22,"column":4},"end":{"line":22,"column":52}},"9":{"start":{"line":6,"column":13},"end":{"line":24,"column":null}},"10":{"start":{"line":6,"column":13},"end":{"line":6,"column":36}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":9,"column":2},"end":{"line":9,"column":null}},"loc":{"start":{"line":11,"column":45},"end":{"line":15,"column":3}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":17,"column":9},"end":{"line":17,"column":18}},"loc":{"start":{"line":17,"column":32},"end":{"line":23,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":14,"column":6},"end":{"line":14,"column":18}},"type":"binary-expr","locations":[{"start":{"line":14,"column":6},"end":{"line":14,"column":18}},{"start":{"line":14,"column":23},"end":{"line":14,"column":61}}]},"1":{"loc":{"start":{"line":14,"column":33},"end":{"line":14,"column":49}},"type":"cond-expr","locations":[{"start":{"line":14,"column":33},"end":{"line":14,"column":49}},{"start":{"line":14,"column":52},"end":{"line":14,"column":61}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":36,"5":36,"6":36,"7":12,"8":12,"9":5,"10":5},"f":{"0":36,"1":12},"b":{"0":[36,0],"1":[0,0]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n.service.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/services/i18n.service.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":60}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":40}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":null}},"3":{"start":{"line":15,"column":0},"end":{"line":15,"column":51}},"4":{"start":{"line":16,"column":0},"end":{"line":16,"column":52}},"5":{"start":{"line":17,"column":0},"end":{"line":17,"column":51}},"6":{"start":{"line":20,"column":0},"end":{"line":104,"column":null}},"7":{"start":{"line":23,"column":21},"end":{"line":23,"column":45}},"8":{"start":{"line":25,"column":21},"end":{"line":25,"column":35}},"9":{"start":{"line":27,"column":21},"end":{"line":27,"column":41}},"10":{"start":{"line":28,"column":21},"end":{"line":28,"column":29}},"11":{"start":{"line":29,"column":21},"end":{"line":29,"column":29}},"12":{"start":{"line":31,"column":21},"end":{"line":31,"column":39}},"13":{"start":{"line":33,"column":21},"end":{"line":33,"column":42}},"14":{"start":{"line":43,"column":4},"end":{"line":46,"column":6}},"15":{"start":{"line":48,"column":27},"end":{"line":48,"column":34}},"16":{"start":{"line":50,"column":35},"end":{"line":52,"column":11}},"17":{"start":{"line":54,"column":4},"end":{"line":68,"column":null}},"18":{"start":{"line":59,"column":6},"end":{"line":67,"column":null}},"19":{"start":{"line":60,"column":24},"end":{"line":60,"column":75}},"20":{"start":{"line":61,"column":8},"end":{"line":61,"column":35}},"21":{"start":{"line":63,"column":8},"end":{"line":66,"column":11}},"22":{"start":{"line":70,"column":22},"end":{"line":72,"column":11}},"23":{"start":{"line":74,"column":4},"end":{"line":79,"column":null}},"24":{"start":{"line":75,"column":6},"end":{"line":78,"column":8}},"25":{"start":{"line":80,"column":4},"end":{"line":80,"column":30}},"26":{"start":{"line":84,"column":4},"end":{"line":84,"column":61}},"27":{"start":{"line":88,"column":25},"end":{"line":88,"column":50}},"28":{"start":{"line":89,"column":4},"end":{"line":95,"column":null}},"29":{"start":{"line":90,"column":6},"end":{"line":92,"column":8}},"30":{"start":{"line":94,"column":6},"end":{"line":94,"column":50}},"31":{"start":{"line":97,"column":22},"end":{"line":97,"column":51}},"32":{"start":{"line":98,"column":4},"end":{"line":102,"column":null}},"33":{"start":{"line":99,"column":6},"end":{"line":99,"column":76}},"34":{"start":{"line":101,"column":6},"end":{"line":101,"column":44}},"35":{"start":{"line":20,"column":13},"end":{"line":104,"column":null}},"36":{"start":{"line":20,"column":13},"end":{"line":20,"column":24}}},"fnMap":{"0":{"name":"(anonymous_4)","decl":{"start":{"line":21,"column":2},"end":{"line":21,"column":null}},"loc":{"start":{"line":33,"column":74},"end":{"line":34,"column":6}}},"1":{"name":"(anonymous_5)","decl":{"start":{"line":36,"column":9},"end":{"line":36,"column":14}},"loc":{"start":{"line":41,"column":5},"end":{"line":81,"column":3}}},"2":{"name":"(anonymous_6)","decl":{"start":{"line":83,"column":9},"end":{"line":83,"column":14}},"loc":{"start":{"line":83,"column":36},"end":{"line":85,"column":3}}},"3":{"name":"(anonymous_7)","decl":{"start":{"line":87,"column":9},"end":{"line":87,"column":14}},"loc":{"start":{"line":87,"column":22},"end":{"line":103,"column":3}}}},"branchMap":{"0":{"loc":{"start":{"line":54,"column":4},"end":{"line":68,"column":null}},"type":"if","locations":[{"start":{"line":54,"column":4},"end":{"line":68,"column":null}},{"start":{"line":54,"column":4},"end":{"line":68,"column":null}}]},"1":{"loc":{"start":{"line":55,"column":6},"end":{"line":55,"column":42}},"type":"binary-expr","locations":[{"start":{"line":55,"column":6},"end":{"line":55,"column":42}},{"start":{"line":56,"column":6},"end":{"line":56,"column":37}},{"start":{"line":57,"column":7},"end":{"line":57,"column":31}},{"start":{"line":57,"column":35},"end":{"line":57,"column":78}}]},"2":{"loc":{"start":{"line":59,"column":6},"end":{"line":67,"column":null}},"type":"if","locations":[{"start":{"line":59,"column":6},"end":{"line":67,"column":null}},{"start":{"line":59,"column":6},"end":{"line":67,"column":null}}]},"3":{"loc":{"start":{"line":71,"column":8},"end":{"line":71,"column":35}},"type":"cond-expr","locations":[{"start":{"line":71,"column":8},"end":{"line":71,"column":35}},{"start":{"line":72,"column":8},"end":{"line":72,"column":11}}]},"4":{"loc":{"start":{"line":74,"column":4},"end":{"line":79,"column":null}},"type":"if","locations":[{"start":{"line":74,"column":4},"end":{"line":79,"column":null}},{"start":{"line":74,"column":4},"end":{"line":79,"column":null}}]},"5":{"loc":{"start":{"line":74,"column":8},"end":{"line":74,"column":19}},"type":"binary-expr","locations":[{"start":{"line":74,"column":8},"end":{"line":74,"column":19}},{"start":{"line":74,"column":24},"end":{"line":74,"column":28}},{"start":{"line":74,"column":33},"end":{"line":74,"column":54}},{"start":{"line":74,"column":58},"end":{"line":74,"column":73}}]},"6":{"loc":{"start":{"line":77,"column":36},"end":{"line":77,"column":46}},"type":"cond-expr","locations":[{"start":{"line":77,"column":36},"end":{"line":77,"column":46}},{"start":{"line":77,"column":49},"end":{"line":77,"column":55}}]},"7":{"loc":{"start":{"line":77,"column":36},"end":{"line":77,"column":40}},"type":"binary-expr","locations":[{"start":{"line":77,"column":36},"end":{"line":77,"column":40}},{"start":{"line":77,"column":44},"end":{"line":77,"column":46}}]},"8":{"loc":{"start":{"line":80,"column":11},"end":{"line":80,"column":22}},"type":"binary-expr","locations":[{"start":{"line":80,"column":11},"end":{"line":80,"column":22}},{"start":{"line":80,"column":26},"end":{"line":80,"column":29}}]},"9":{"loc":{"start":{"line":89,"column":4},"end":{"line":95,"column":null}},"type":"if","locations":[{"start":{"line":89,"column":4},"end":{"line":95,"column":null}},{"start":{"line":89,"column":4},"end":{"line":95,"column":null}}]},"10":{"loc":{"start":{"line":98,"column":4},"end":{"line":102,"column":null}},"type":"if","locations":[{"start":{"line":98,"column":4},"end":{"line":102,"column":null}},{"start":{"line":98,"column":4},"end":{"line":102,"column":null}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":5,"7":10,"8":10,"9":10,"10":10,"11":10,"12":10,"13":10,"14":70,"15":70,"16":70,"17":70,"18":6,"19":2,"20":2,"21":2,"22":68,"23":68,"24":3,"25":68,"26":9,"27":3,"28":3,"29":0,"30":3,"31":3,"32":3,"33":0,"34":3,"35":5,"36":5},"f":{"0":10,"1":70,"2":9,"3":3},"b":{"0":[6,64],"1":[70,69,69,69],"2":[2,4],"3":[68,0],"4":[3,65],"5":[68,64,61,0],"6":[2,1],"7":[2,0],"8":[68,4],"9":[0,3],"10":[0,3]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/utils/file.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/utils/file.ts","statementMap":{"0":{"start":{"line":1,"column":0},"end":{"line":1,"column":25}},"1":{"start":{"line":2,"column":0},"end":{"line":2,"column":29}},"2":{"start":{"line":3,"column":0},"end":{"line":3,"column":33}},"3":{"start":{"line":5,"column":16},"end":{"line":5,"column":37}},"4":{"start":{"line":6,"column":14},"end":{"line":6,"column":33}},"5":{"start":{"line":7,"column":15},"end":{"line":7,"column":35}},"6":{"start":{"line":13,"column":2},"end":{"line":13,"column":44}},"7":{"start":{"line":9,"column":0},"end":{"line":9,"column":16}},"8":{"start":{"line":20,"column":20},"end":{"line":20,"column":53}},"9":{"start":{"line":21,"column":2},"end":{"line":21,"column":58}},"10":{"start":{"line":21,"column":40},"end":{"line":21,"column":56}},"11":{"start":{"line":16,"column":0},"end":{"line":16,"column":7}},"12":{"start":{"line":24,"column":13},"end":{"line":25,"column":38}},"13":{"start":{"line":25,"column":2},"end":{"line":25,"column":37}},"14":{"start":{"line":27,"column":13},"end":{"line":33,"column":2}},"15":{"start":{"line":28,"column":15},"end":{"line":28,"column":36}},"16":{"start":{"line":29,"column":2},"end":{"line":32,"column":4}},"17":{"start":{"line":30,"column":21},"end":{"line":30,"column":44}},"18":{"start":{"line":35,"column":13},"end":{"line":51,"column":2}},"19":{"start":{"line":36,"column":15},"end":{"line":36,"column":62}},"20":{"start":{"line":38,"column":2},"end":{"line":50,"column":69}},"21":{"start":{"line":40,"column":6},"end":{"line":48,"column":null}},"22":{"start":{"line":41,"column":8},"end":{"line":45,"column":null}},"23":{"start":{"line":42,"column":10},"end":{"line":42,"column":74}},"24":{"start":{"line":44,"column":10},"end":{"line":44,"column":52}},"25":{"start":{"line":47,"column":8},"end":{"line":47,"column":21}},"26":{"start":{"line":50,"column":13},"end":{"line":50,"column":67}}},"fnMap":{"0":{"name":"mapAsync","decl":{"start":{"line":9,"column":16},"end":{"line":9,"column":24}},"loc":{"start":{"line":11,"column":65},"end":{"line":14,"column":1}}},"1":{"name":"filterAsync","decl":{"start":{"line":16,"column":22},"end":{"line":16,"column":33}},"loc":{"start":{"line":18,"column":71},"end":{"line":22,"column":1}}},"2":{"name":"(anonymous_2)","decl":{"start":{"line":21,"column":22},"end":{"line":21,"column":23}},"loc":{"start":{"line":21,"column":40},"end":{"line":21,"column":56}}},"3":{"name":"(anonymous_3)","decl":{"start":{"line":24,"column":27},"end":{"line":24,"column":32}},"loc":{"start":{"line":25,"column":2},"end":{"line":25,"column":37}}},"4":{"name":"(anonymous_4)","decl":{"start":{"line":27,"column":30},"end":{"line":27,"column":35}},"loc":{"start":{"line":27,"column":55},"end":{"line":33,"column":1}}},"5":{"name":"(anonymous_5)","decl":{"start":{"line":30,"column":13},"end":{"line":30,"column":17}},"loc":{"start":{"line":30,"column":21},"end":{"line":30,"column":44}}},"6":{"name":"(anonymous_6)","decl":{"start":{"line":35,"column":24},"end":{"line":35,"column":29}},"loc":{"start":{"line":35,"column":67},"end":{"line":51,"column":1}}},"7":{"name":"(anonymous_7)","decl":{"start":{"line":39,"column":28},"end":{"line":39,"column":33}},"loc":{"start":{"line":39,"column":60},"end":{"line":49,"column":5}}},"8":{"name":"(anonymous_8)","decl":{"start":{"line":50,"column":8},"end":{"line":50,"column":9}},"loc":{"start":{"line":50,"column":13},"end":{"line":50,"column":67}}}},"branchMap":{"0":{"loc":{"start":{"line":41,"column":8},"end":{"line":45,"column":null}},"type":"if","locations":[{"start":{"line":41,"column":8},"end":{"line":45,"column":null}},{"start":{"line":41,"column":8},"end":{"line":45,"column":null}}]},"1":{"loc":{"start":{"line":42,"column":18},"end":{"line":42,"column":53}},"type":"binary-expr","locations":[{"start":{"line":42,"column":18},"end":{"line":42,"column":53}},{"start":{"line":42,"column":58},"end":{"line":42,"column":73}}]},"2":{"loc":{"start":{"line":44,"column":17},"end":{"line":44,"column":27}},"type":"binary-expr","locations":[{"start":{"line":44,"column":17},"end":{"line":44,"column":27}},{"start":{"line":44,"column":31},"end":{"line":44,"column":51}}]},"3":{"loc":{"start":{"line":50,"column":56},"end":{"line":50,"column":57}},"type":"cond-expr","locations":[{"start":{"line":50,"column":56},"end":{"line":50,"column":57}},{"start":{"line":50,"column":60},"end":{"line":50,"column":66}}]}},"s":{"0":5,"1":5,"2":5,"3":5,"4":5,"5":5,"6":72,"7":5,"8":72,"9":72,"10":221,"11":5,"12":5,"13":116,"14":5,"15":28,"16":28,"17":116,"18":5,"19":44,"20":44,"21":105,"22":105,"23":0,"24":105,"25":0,"26":45},"f":{"0":72,"1":72,"2":221,"3":116,"4":28,"5":116,"6":44,"7":105,"8":45},"b":{"0":[0,105],"1":[0,0],"2":[105,75],"3":[0,45]}} | ||
,"/home/toon/Projects/nestjs-i18n/src/lib/utils/util.ts": {"path":"/home/toon/Projects/nestjs-i18n/src/lib/utils/util.ts","statementMap":{"0":{"start":{"line":4,"column":2},"end":{"line":7,"column":4}},"1":{"start":{"line":3,"column":0},"end":{"line":3,"column":16}}},"fnMap":{"0":{"name":"shouldResolve","decl":{"start":{"line":3,"column":16},"end":{"line":3,"column":29}},"loc":{"start":{"line":3,"column":51},"end":{"line":8,"column":1}}}},"branchMap":{"0":{"loc":{"start":{"line":5,"column":4},"end":{"line":5,"column":27}},"type":"binary-expr","locations":[{"start":{"line":5,"column":4},"end":{"line":5,"column":27}},{"start":{"line":6,"column":5},"end":{"line":6,"column":28}},{"start":{"line":6,"column":32},"end":{"line":6,"column":59}}]}},"s":{"0":106,"1":5},"f":{"0":106},"b":{"0":[106,92,38]}} | ||
} |
@@ -6,6 +6,4 @@ export declare const I18N_OPTIONS = "I18nOptions"; | ||
export declare const I18N_RESOLVERS = "I18nResolvers"; | ||
export interface I18nTranslation { | ||
[key: string]: { | ||
[key: string]: string; | ||
}; | ||
} | ||
export declare const I18N_PARSER_OPTIONS = "I18nParserOptions"; | ||
export declare const I18N_LANGUAGES_SUBJECT = "I18nLanguagesSubject"; | ||
export declare const I18N_TRANSLATIONS_SUBJECT = "I18nTranslationsSubject"; |
@@ -8,2 +8,5 @@ "use strict"; | ||
exports.I18N_RESOLVERS = 'I18nResolvers'; | ||
exports.I18N_PARSER_OPTIONS = 'I18nParserOptions'; | ||
exports.I18N_LANGUAGES_SUBJECT = 'I18nLanguagesSubject'; | ||
exports.I18N_TRANSLATIONS_SUBJECT = 'I18nTranslationsSubject'; | ||
//# sourceMappingURL=i18n.constants.js.map |
@@ -6,3 +6,3 @@ import { I18nService } from './services/i18n.service'; | ||
constructor(detectedLanguage: string, service: I18nService); | ||
translate(key: any, options?: any): any; | ||
translate(key: any, options?: any): Promise<string>; | ||
} |
@@ -12,2 +12,3 @@ import { DynamicModule, MiddlewareConsumer, NestModule } from '@nestjs/common'; | ||
private static createAsyncOptionsProvider; | ||
private static createAsyncParserOptionsProvider; | ||
private static createAsyncTranslationProvider; | ||
@@ -14,0 +15,0 @@ private static createAsyncLanguagesProvider; |
@@ -17,4 +17,2 @@ "use strict"; | ||
const i18n_request_scope_service_1 = require("./services/i18n-request-scope.service"); | ||
const parse_1 = require("./utils/parse"); | ||
const path = require("path"); | ||
const i18n_language_middleware_1 = require("./middleware/i18n-language-middleware"); | ||
@@ -24,7 +22,7 @@ const core_1 = require("@nestjs/core"); | ||
const util_1 = require("./utils/util"); | ||
const i18n_parser_1 = require("./parsers/i18n.parser"); | ||
const rxjs_1 = require("rxjs"); | ||
const logger = new common_1.Logger('I18nService'); | ||
const defaultOptions = { | ||
filePattern: '*.json', | ||
resolvers: [], | ||
saveMissing: true, | ||
}; | ||
@@ -57,2 +55,4 @@ let I18nModule = I18nModule_1 = class I18nModule { | ||
options = this.sanitizeI18nOptions(options); | ||
const i18nLanguagesSubject = new rxjs_1.BehaviorSubject([]); | ||
const i18nTranslationSubject = new rxjs_1.BehaviorSubject({}); | ||
const i18nOptions = { | ||
@@ -62,25 +62,55 @@ provide: i18n_constants_1.I18N_OPTIONS, | ||
}; | ||
const i18nParserProvider = { | ||
provide: i18n_parser_1.I18nParser, | ||
useClass: options.parser, | ||
}; | ||
const i18nParserOptionsProvider = { | ||
provide: i18n_constants_1.I18N_PARSER_OPTIONS, | ||
useValue: options.parserOptions, | ||
}; | ||
const i18nLanguagesSubjectProvider = { | ||
provide: i18n_constants_1.I18N_LANGUAGES_SUBJECT, | ||
useValue: i18nLanguagesSubject, | ||
}; | ||
const i18nTranslationSubjectProvider = { | ||
provide: i18n_constants_1.I18N_TRANSLATIONS_SUBJECT, | ||
useValue: i18nTranslationSubject, | ||
}; | ||
const translationsProvider = { | ||
provide: i18n_constants_1.I18N_TRANSLATIONS, | ||
useFactory: async () => { | ||
useFactory: async (parser) => { | ||
try { | ||
return await parse_1.parseTranslations(options); | ||
const translation = await parser.parse(); | ||
if (translation instanceof rxjs_1.Observable) { | ||
translation.subscribe(i18nTranslationSubject); | ||
} | ||
else { | ||
i18nTranslationSubject.next(translation); | ||
} | ||
} | ||
catch (e) { | ||
logger.error('parsing translation error', e); | ||
return {}; | ||
} | ||
return i18nTranslationSubject.asObservable(); | ||
}, | ||
inject: [i18n_parser_1.I18nParser], | ||
}; | ||
const languagessProvider = { | ||
provide: i18n_constants_1.I18N_LANGUAGES, | ||
useFactory: async () => { | ||
useFactory: async (parser) => { | ||
try { | ||
return await parse_1.getLanguages(options); | ||
const languages = await parser.languages(); | ||
if (languages instanceof rxjs_1.Observable) { | ||
languages.subscribe(i18nLanguagesSubject); | ||
} | ||
else { | ||
i18nLanguagesSubject.next(languages); | ||
} | ||
} | ||
catch (e) { | ||
logger.error('failed getting languages', e); | ||
return []; | ||
logger.error('parsing translation error', e); | ||
} | ||
return i18nLanguagesSubject.asObservable(); | ||
}, | ||
inject: [i18n_parser_1.I18nParser], | ||
}; | ||
@@ -101,2 +131,6 @@ const resolversProvider = { | ||
resolversProvider, | ||
i18nParserProvider, | ||
i18nParserOptionsProvider, | ||
i18nLanguagesSubjectProvider, | ||
i18nTranslationSubjectProvider, | ||
...this.createResolverProviders(options.resolvers), | ||
@@ -111,2 +145,5 @@ ], | ||
const asyncLanguagesProvider = this.createAsyncLanguagesProvider(); | ||
const asyncParserOptionsProvider = this.createAsyncParserOptionsProvider(); | ||
const i18nLanguagesSubject = new rxjs_1.BehaviorSubject([]); | ||
const i18nTranslationSubject = new rxjs_1.BehaviorSubject({}); | ||
const resolversProvider = { | ||
@@ -116,2 +153,14 @@ provide: i18n_constants_1.I18N_RESOLVERS, | ||
}; | ||
const i18nParserProvider = { | ||
provide: i18n_parser_1.I18nParser, | ||
useClass: options.parser, | ||
}; | ||
const i18nLanguagesSubjectProvider = { | ||
provide: i18n_constants_1.I18N_LANGUAGES_SUBJECT, | ||
useValue: i18nLanguagesSubject, | ||
}; | ||
const i18nTranslationSubjectProvider = { | ||
provide: i18n_constants_1.I18N_TRANSLATIONS_SUBJECT, | ||
useValue: i18nTranslationSubject, | ||
}; | ||
return { | ||
@@ -125,5 +174,9 @@ module: I18nModule_1, | ||
asyncLanguagesProvider, | ||
asyncParserOptionsProvider, | ||
i18n_service_1.I18nService, | ||
i18n_request_scope_service_1.I18nRequestScopeService, | ||
resolversProvider, | ||
i18nParserProvider, | ||
i18nLanguagesSubjectProvider, | ||
i18nTranslationSubjectProvider, | ||
...this.createResolverProviders(options.resolvers), | ||
@@ -148,16 +201,30 @@ ], | ||
} | ||
static createAsyncParserOptionsProvider() { | ||
return { | ||
provide: i18n_constants_1.I18N_PARSER_OPTIONS, | ||
useFactory: async (options) => { | ||
return options.parserOptions; | ||
}, | ||
inject: [i18n_constants_1.I18N_OPTIONS], | ||
}; | ||
} | ||
static createAsyncTranslationProvider() { | ||
return { | ||
provide: i18n_constants_1.I18N_TRANSLATIONS, | ||
useFactory: async (options) => { | ||
options = this.sanitizeI18nOptions(options); | ||
useFactory: async (parser, translationsSubject) => { | ||
try { | ||
return await parse_1.parseTranslations(options); | ||
const translation = await parser.parse(); | ||
if (translation instanceof rxjs_1.Observable) { | ||
translation.subscribe(translationsSubject); | ||
} | ||
else { | ||
translationsSubject.next(translation); | ||
} | ||
} | ||
catch (e) { | ||
logger.error('parsing translation error', e); | ||
return {}; | ||
} | ||
return translationsSubject.asObservable(); | ||
}, | ||
inject: [i18n_constants_1.I18N_OPTIONS], | ||
inject: [i18n_parser_1.I18nParser, i18n_constants_1.I18N_TRANSLATIONS_SUBJECT], | ||
}; | ||
@@ -168,13 +235,18 @@ } | ||
provide: i18n_constants_1.I18N_LANGUAGES, | ||
useFactory: async (options) => { | ||
options = this.sanitizeI18nOptions(options); | ||
useFactory: async (parser, languagesSubject) => { | ||
try { | ||
return await parse_1.getLanguages(options); | ||
const languages = await parser.languages(); | ||
if (languages instanceof rxjs_1.Observable) { | ||
languages.subscribe(languagesSubject); | ||
} | ||
else { | ||
languagesSubject.next(languages); | ||
} | ||
} | ||
catch (e) { | ||
logger.error('parsing translation error', e); | ||
return []; | ||
} | ||
return languagesSubject.asObservable(); | ||
}, | ||
inject: [i18n_constants_1.I18N_OPTIONS], | ||
inject: [i18n_parser_1.I18nParser, i18n_constants_1.I18N_LANGUAGES_SUBJECT], | ||
}; | ||
@@ -184,6 +256,2 @@ } | ||
options = Object.assign(Object.assign({}, defaultOptions), options); | ||
options.path = path.normalize(options.path + path.sep); | ||
if (!options.filePattern.startsWith('*.')) { | ||
options.filePattern = '*.' + options.filePattern; | ||
} | ||
return options; | ||
@@ -190,0 +258,0 @@ } |
export * from './i18n.module'; | ||
export * from './i18n.constants'; | ||
export { I18N_OPTIONS, I18N_TRANSLATIONS, I18N_LANGUAGES, I18N_RESOLVER_OPTIONS, I18N_RESOLVERS, I18N_PARSER_OPTIONS, } from './i18n.constants'; | ||
export * from './i18n.context'; | ||
@@ -8,2 +8,3 @@ export * from './services/i18n.service'; | ||
export * from './interfaces/i18n-language-resolver.interface'; | ||
export * from './interfaces/i18n-translation.interface'; | ||
export * from './decorators/i18n-lang.decorator'; | ||
@@ -17,1 +18,3 @@ export * from './decorators/i18n-languages.decorator'; | ||
export * from './resolvers/cookie.resolver'; | ||
export * from './parsers/i18n.parser'; | ||
export * from './parsers/i18n.json.parser'; |
@@ -7,3 +7,9 @@ "use strict"; | ||
__export(require("./i18n.module")); | ||
__export(require("./i18n.constants")); | ||
var i18n_constants_1 = require("./i18n.constants"); | ||
exports.I18N_OPTIONS = i18n_constants_1.I18N_OPTIONS; | ||
exports.I18N_TRANSLATIONS = i18n_constants_1.I18N_TRANSLATIONS; | ||
exports.I18N_LANGUAGES = i18n_constants_1.I18N_LANGUAGES; | ||
exports.I18N_RESOLVER_OPTIONS = i18n_constants_1.I18N_RESOLVER_OPTIONS; | ||
exports.I18N_RESOLVERS = i18n_constants_1.I18N_RESOLVERS; | ||
exports.I18N_PARSER_OPTIONS = i18n_constants_1.I18N_PARSER_OPTIONS; | ||
__export(require("./i18n.context")); | ||
@@ -20,2 +26,4 @@ __export(require("./services/i18n.service")); | ||
__export(require("./resolvers/cookie.resolver")); | ||
__export(require("./parsers/i18n.parser")); | ||
__export(require("./parsers/i18n.json.parser")); | ||
//# sourceMappingURL=index.js.map |
export interface I18nResolver<TRequest = any> { | ||
resolve(req: TRequest): string | string[] | undefined; | ||
resolve(req: TRequest): Promise<string> | string | string[] | undefined; | ||
} |
import { Type } from '@nestjs/common'; | ||
import { ModuleMetadata } from '@nestjs/common/interfaces'; | ||
import { I18nResolver } from './i18n-language-resolver.interface'; | ||
import { I18nParser } from '../parsers/i18n.parser'; | ||
export declare type ResolverWithOptions = { | ||
@@ -8,10 +9,9 @@ use: Type<I18nResolver>; | ||
}; | ||
export declare type I18nOptionsWithoutResolvers = Omit<I18nOptions, 'resolvers'>; | ||
export declare type I18nOptionsWithoutResolvers = Omit<I18nOptions, 'resolvers' | 'parser'>; | ||
export declare type I18nOptionResolver = ResolverWithOptions | Type<I18nResolver> | I18nResolver; | ||
export interface I18nOptions { | ||
path: string; | ||
fallbackLanguage: string; | ||
filePattern?: string; | ||
resolvers?: I18nOptionResolver[]; | ||
saveMissing?: boolean; | ||
parser: Type<I18nParser>; | ||
parserOptions: any; | ||
} | ||
@@ -27,3 +27,4 @@ export interface I18nOptionsFactory { | ||
resolvers?: I18nOptionResolver[]; | ||
parser: Type<I18nParser>; | ||
inject?: any[]; | ||
} |
@@ -33,2 +33,5 @@ "use strict"; | ||
language = resolver.resolve(req); | ||
if (language instanceof Promise) { | ||
language = await language; | ||
} | ||
if (language !== undefined) { | ||
@@ -35,0 +38,0 @@ break; |
import { I18nResolver } from '../index'; | ||
export declare class AcceptLanguageResolver implements I18nResolver { | ||
constructor(); | ||
resolve(req: any): any; | ||
resolve(req: any): Promise<any>; | ||
} |
@@ -16,7 +16,7 @@ "use strict"; | ||
constructor() { } | ||
resolve(req) { | ||
async resolve(req) { | ||
const lang = req.headers['accept-language']; | ||
if (lang) { | ||
const service = req.i18nService; | ||
return accept_language_parser_1.pick(service.getSupportedLanguages(), lang); | ||
return accept_language_parser_1.pick(await service.getSupportedLanguages(), lang); | ||
} | ||
@@ -23,0 +23,0 @@ return lang; |
@@ -7,3 +7,3 @@ import { I18nService } from './i18n.service'; | ||
constructor(req: any, i18nService: I18nService); | ||
translate(key: any, options?: any): any; | ||
translate(key: any, options?: any): Promise<string>; | ||
} |
import { Logger } from '@nestjs/common'; | ||
import { I18nTranslation } from '../i18n.constants'; | ||
import { I18nOptions } from '..'; | ||
import { I18nTranslation } from '../interfaces/i18n-translation.interface'; | ||
import { Observable, BehaviorSubject } from 'rxjs'; | ||
import { I18nParser } from '../parsers/i18n.parser'; | ||
export declare class I18nService { | ||
@@ -9,3 +11,6 @@ private readonly i18nOptions; | ||
private readonly logger; | ||
constructor(i18nOptions: I18nOptions, translations: I18nTranslation, supportedLanguages: string[], logger: Logger); | ||
private readonly parser; | ||
private readonly languagesSubject; | ||
private readonly translationsSubject; | ||
constructor(i18nOptions: I18nOptions, translations: Observable<I18nTranslation>, supportedLanguages: Observable<string[]>, logger: Logger, parser: I18nParser, languagesSubject: BehaviorSubject<string[]>, translationsSubject: BehaviorSubject<I18nTranslation>); | ||
translate(key: string, options?: { | ||
@@ -18,5 +23,5 @@ lang?: string; | ||
}; | ||
}): any; | ||
getSupportedLanguages(): string[]; | ||
private saveMissingTranslation; | ||
}): Promise<string>; | ||
getSupportedLanguages(): Promise<string[]>; | ||
refresh(): Promise<void>; | ||
} |
@@ -18,7 +18,7 @@ "use strict"; | ||
const i18n_constants_1 = require("../i18n.constants"); | ||
const fs = require("fs"); | ||
const _ = require("lodash"); | ||
const path = require("path"); | ||
const rxjs_1 = require("rxjs"); | ||
const i18n_parser_1 = require("../parsers/i18n.parser"); | ||
const operators_1 = require("rxjs/operators"); | ||
let I18nService = class I18nService { | ||
constructor(i18nOptions, translations, supportedLanguages, logger) { | ||
constructor(i18nOptions, translations, supportedLanguages, logger, parser, languagesSubject, translationsSubject) { | ||
this.i18nOptions = i18nOptions; | ||
@@ -28,13 +28,13 @@ this.translations = translations; | ||
this.logger = logger; | ||
this.parser = parser; | ||
this.languagesSubject = languagesSubject; | ||
this.translationsSubject = translationsSubject; | ||
} | ||
translate(key, options) { | ||
async translate(key, options) { | ||
options = Object.assign({ lang: this.i18nOptions.fallbackLanguage }, options); | ||
const { lang, args } = options; | ||
const translationsByLanguage = this.translations[lang]; | ||
const translationsByLanguage = (await this.translations.pipe(operators_1.take(1)).toPromise())[lang]; | ||
if (translationsByLanguage === undefined || | ||
translationsByLanguage === null || | ||
(!!translationsByLanguage && !translationsByLanguage.hasOwnProperty(key))) { | ||
if (this.i18nOptions.saveMissing === true) { | ||
this.saveMissingTranslation(key, lang); | ||
} | ||
if (lang !== this.i18nOptions.fallbackLanguage) { | ||
@@ -49,3 +49,5 @@ const message = `Translation "${key}" in "${lang}" does not exist.`; | ||
} | ||
let translation = translationsByLanguage[key]; | ||
let translation = translationsByLanguage | ||
? translationsByLanguage[key] | ||
: key; | ||
if (translation && (args || (args instanceof Array && args.length > 0))) { | ||
@@ -56,26 +58,20 @@ translation = format(translation, ...(args instanceof Array ? args || [] : [args])); | ||
} | ||
getSupportedLanguages() { | ||
return this.supportedLanguages; | ||
async getSupportedLanguages() { | ||
return this.supportedLanguages.pipe(operators_1.take(1)).toPromise(); | ||
} | ||
saveMissingTranslation(key, language) { | ||
const filePathMissing = path.join(this.i18nOptions.path, language); | ||
if (!fs.existsSync(filePathMissing)) { | ||
this.logger.error(`Cannot find path to store missing translations`); | ||
return; | ||
async refresh() { | ||
const translations = await this.parser.parse(); | ||
if (translations instanceof rxjs_1.Observable) { | ||
this.translationsSubject.next(await translations.pipe(operators_1.take(1)).toPromise()); | ||
} | ||
const keyParts = key.split('.'); | ||
const filePart = keyParts.shift(); | ||
const keyWithoutFile = keyParts.join('.'); | ||
const filePath = path.join(filePathMissing, `${filePart}.missing`); | ||
let jsonContent = {}; | ||
if (fs.existsSync(filePath)) { | ||
const fileContent = fs.readFileSync(filePath, { encoding: 'utf8' }); | ||
jsonContent = JSON.parse(fileContent); | ||
else { | ||
this.translationsSubject.next(translations); | ||
} | ||
if (_.has(jsonContent, keyWithoutFile)) { | ||
return; | ||
const languages = await this.parser.languages(); | ||
if (languages instanceof rxjs_1.Observable) { | ||
this.languagesSubject.next(await languages.pipe(operators_1.take(1)).toPromise()); | ||
} | ||
jsonContent = _.set(jsonContent, keyWithoutFile, ''); | ||
fs.writeFileSync(filePath, JSON.stringify(jsonContent, null, 2)); | ||
this.logger.error(`The key "${keyWithoutFile}" for language: ${language} was added to the file "${filePart}.missing" (@ ${filePath} )`); | ||
else { | ||
this.languagesSubject.next(languages); | ||
} | ||
} | ||
@@ -88,5 +84,12 @@ }; | ||
__param(2, common_1.Inject(i18n_constants_1.I18N_LANGUAGES)), | ||
__metadata("design:paramtypes", [Object, Object, Array, common_1.Logger]) | ||
__param(5, common_1.Inject(i18n_constants_1.I18N_LANGUAGES_SUBJECT)), | ||
__param(6, common_1.Inject(i18n_constants_1.I18N_TRANSLATIONS_SUBJECT)), | ||
__metadata("design:paramtypes", [Object, rxjs_1.Observable, | ||
rxjs_1.Observable, | ||
common_1.Logger, | ||
i18n_parser_1.I18nParser, | ||
rxjs_1.BehaviorSubject, | ||
rxjs_1.BehaviorSubject]) | ||
], I18nService); | ||
exports.I18nService = I18nService; | ||
//# sourceMappingURL=i18n.service.js.map |
{ | ||
"name": "nestjs-i18n", | ||
"version": "5.1.0", | ||
"version": "6.0.0", | ||
"description": "", | ||
@@ -60,2 +60,3 @@ "author": "Toon van Strijp", | ||
"chalk": "^3.0.0", | ||
"chokidar": "^3.3.1", | ||
"commander": "^4.1.1", | ||
@@ -65,2 +66,3 @@ "cookie": "^0.4.0", | ||
"lodash": "^4.17.0", | ||
"rxjs": "^6.5.4", | ||
"string-format": "^2.0.0" | ||
@@ -67,0 +69,0 @@ }, |
121
README.md
@@ -16,2 +16,4 @@ [![Build Status](https://travis-ci.org/ToonvanStrijp/nestjs-i18n.svg?branch=master)](https://travis-ci.org/ToonvanStrijp/nestjs-i18n) [![Greenkeeper badge](https://badges.greenkeeper.io/ToonvanStrijp/nestjs-i18n.svg)](https://greenkeeper.io/) | ||
Build in we have a JSON parser (`I18nJsonParser`) this parser handles to following structure | ||
### Structure | ||
@@ -62,5 +64,7 @@ | ||
I18nModule.forRoot({ | ||
path: path.join(__dirname, '/i18n'), | ||
filePattern: '*.json', | ||
fallbackLanguage: 'en', | ||
parser: I18nJsonParser, | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n/'), | ||
}, | ||
}), | ||
@@ -84,6 +88,8 @@ ], | ||
useFactory: (configService: ConfigurationService) => ({ | ||
path: configService.i18nPath, | ||
fallbackLanguage: configService.fallbackLanguage, // e.g., 'en' | ||
filePattern: configService.i18nFilePattern, // e.g., '*.i18n.json' | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n/'), | ||
}, | ||
}), | ||
parser: I18nJsonParser, | ||
inject: [ConfigurationService], | ||
@@ -97,2 +103,62 @@ }), | ||
## Live reloading / Refreshing translations | ||
To use live reloading use the `watch` option in the `I18nJsonParser`. The `I18nJsonParser` watches the `i18n` folder for changes and when needed updates the `translations` or `languages`. | ||
```typescript | ||
I18nModule.forRoot({ | ||
fallbackLanguage: 'en', | ||
parser: I18nJsonParser, | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n/'), | ||
// add this to enable live translations | ||
watch: true, | ||
}, | ||
}); | ||
``` | ||
To refresh your translations and languages manually: | ||
```typescript | ||
await this.i18nService.refresh(); | ||
``` | ||
### Parser | ||
A default JSON parser (`I18nJsonParser`) is included. | ||
To implement your own `I18nParser` take a look at this example [i18n.json.parser.ts](https://github.com/ToonvanStrijp/nestjs-i18n/blob/master/src/lib/parsers/i18n.json.parser.ts). | ||
#### Live translations / languages | ||
To provide live translations you can return an observable within the extended `I18nParser` class. For and implementation example you can take a look at the [i18n.json.parser.ts](https://github.com/ToonvanStrijp/nestjs-i18n/blob/master/src/lib/parsers/i18n.json.parser.ts). | ||
```typescript | ||
export class I18nMysqlParser extends I18nParser { | ||
constructor( | ||
@Inject(I18N_PARSER_OPTIONS) | ||
private options: I18nJsonParserOptions, | ||
) { | ||
super(); | ||
} | ||
async languages(): Promise<string[] | Observable<string[]>> { | ||
// for example do a database call here | ||
return observableOf(['nl', 'en']); | ||
} | ||
async parse(): Promise<I18nTranslation | Observable<I18nTranslation>> { | ||
// for example do a database call here | ||
return observableOf({ | ||
nl: { | ||
HELLO: 'Hallo', | ||
}, | ||
en: { | ||
HELLO: 'Hello', | ||
}, | ||
}); | ||
} | ||
} | ||
``` | ||
### Language Resolvers | ||
@@ -106,4 +172,7 @@ | ||
I18nModule.forRoot({ | ||
path: path.join(__dirname, '/i18n/'), | ||
fallbackLanguage: 'en', | ||
parser: I18nJsonParser, | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n/'), | ||
}, | ||
resolvers: [ | ||
@@ -124,8 +193,8 @@ { use: QueryResolver, options: ['lang', 'locale', 'l'] }, | ||
| Resolver | Default value | | ||
| ------------------------ | ----------------- | | ||
| `QueryResolver` | `none` | | ||
| `HeaderResolver` | `none` | | ||
| `AcceptLanguageResolver` | `N/A` | | ||
| `CookieResolver` | `lang` | | ||
| Resolver | Default value | | ||
| ------------------------ | ------------- | | ||
| `QueryResolver` | `none` | | ||
| `HeaderResolver` | `none` | | ||
| `AcceptLanguageResolver` | `N/A` | | ||
| `CookieResolver` | `lang` | | ||
@@ -158,5 +227,7 @@ To implement your own resolver (or custom logic) use the `I18nResolver` interface. The resolvers are provided via the nestjs dependency injection, this way you can inject your own services if needed. | ||
I18nModule.forRoot({ | ||
path: path.join(__dirname, '/i18n/'), | ||
fallbackLanguage: 'en', | ||
saveMissing: false, | ||
parser: I18nJsonParser, | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n/'), | ||
}, | ||
resolvers: [{ use: QueryResolver, options: ['lang', 'locale', 'l'] }], | ||
@@ -172,7 +243,9 @@ }); | ||
return { | ||
path: path.join(__dirname, '/i18n'), | ||
fallbackLanguage: 'en', | ||
saveMissing: false, | ||
parserOptions: { | ||
path: path.join(__dirname, '/i18n'), | ||
}, | ||
}; | ||
}, | ||
parser: I18nJsonParser, | ||
resolvers: [{ use: QueryResolver, options: ['lang', 'locale', 'l'] }], | ||
@@ -246,18 +319,2 @@ }); | ||
### Missing Translations | ||
If you require a translation that is missing, `I18n` will log an error. However, you can also write these missing translations to a new file in order to help translating your application later on. | ||
This behaviour can be controlled via the `saveMissing: boolean` attribute when adding the `I18nModule` to your application. Thereby, `true` describes the following behaviour: | ||
Say, you request the translation `mail.registration.subject` in a `de` language, and this specific key is missing. This will create a `de/mail.missing` file in your `i18n` folder and add the following content: | ||
```json | ||
{ | ||
"registration": { | ||
"subject": "" | ||
} | ||
} | ||
``` | ||
# CLI | ||
@@ -274,4 +331,6 @@ | ||
- from V6.0.0 on we implemented the `I18nParser`, by using this we can easily support different formats other than JSON. To migrate to this change look at the [Quick start](#quick-start) above. There are some changes in the declaration of the `I18nModule`. | ||
- from V4.0.0 on we changed the signature of the `translate` method, the language is now optional, if no language is given it'll fallback to the `fallbackLanguage` | ||
- from V3.0.0 on we load translations based on their directory name instead of file name. Change your translations files to the structure above: [info](https://github.com/ToonvanStrijp/nestjs-i18n#structure) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2195199
155
327
11
2208
+ Addedchokidar@^3.3.1
+ Addedrxjs@^6.5.4
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)