i18next-cli 1.10.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/cjs/cli.js +1 -1
- package/dist/cjs/extractor/core/translation-manager.js +1 -1
- package/dist/cjs/extractor/parsers/comment-parser.js +1 -1
- package/dist/esm/cli.js +1 -1
- package/dist/esm/extractor/core/translation-manager.js +1 -1
- package/dist/esm/extractor/parsers/comment-parser.js +1 -1
- package/package.json +1 -1
- package/src/cli.ts +1 -1
- package/src/extractor/core/translation-manager.ts +5 -0
- package/src/extractor/parsers/comment-parser.ts +38 -0
- package/types/extractor/core/translation-manager.d.ts.map +1 -1
- package/types/extractor/parsers/comment-parser.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.10.1](https://github.com/i18next/i18next-cli/compare/v1.10.0...v1.10.1) - 2025-10-07
|
|
9
|
+
|
|
10
|
+
- **Extractor:** Fixed incorrect behavior of the `preservePatterns` option where keys matching the specified patterns were being extracted instead of being excluded from extraction. The option now correctly skips keys that match the glob patterns during both AST-based extraction and comment parsing, preventing re-extraction of keys that already exist in other translation files (e.g., when `BUILDINGS.*` keys exist in `assets.json` but shouldn't be duplicated in `app.json`). This resolves issues where dynamic key references were incorrectly creating duplicate entries in extracted translation files, allowing developers to use patterns like `t('BUILDINGS.ACADEMY.NAME')` directly without workarounds. [#53](https://github.com/i18next/i18next-cli/issues/53)
|
|
11
|
+
|
|
8
12
|
## [1.10.0](https://github.com/i18next/i18next-cli/compare/v1.9.0...v1.10.0) - 2025-10-07
|
|
9
13
|
|
|
10
14
|
### Added
|
package/dist/cjs/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var e=require("commander"),t=require("chokidar"),n=require("glob"),o=require("chalk"),i=require("./config.js"),a=require("./heuristic-config.js"),r=require("./extractor/core/extractor.js");require("node:path"),require("node:fs/promises"),require("jiti");var c=require("./types-generator.js"),s=require("./syncer.js"),l=require("./migrator.js"),u=require("./init.js"),d=require("./linter.js"),g=require("./status.js"),p=require("./locize.js");const f=new e.Command;f.name("i18next-cli").description("A unified, high-performance i18next CLI.").version("1.10.
|
|
2
|
+
"use strict";var e=require("commander"),t=require("chokidar"),n=require("glob"),o=require("chalk"),i=require("./config.js"),a=require("./heuristic-config.js"),r=require("./extractor/core/extractor.js");require("node:path"),require("node:fs/promises"),require("jiti");var c=require("./types-generator.js"),s=require("./syncer.js"),l=require("./migrator.js"),u=require("./init.js"),d=require("./linter.js"),g=require("./status.js"),p=require("./locize.js");const f=new e.Command;f.name("i18next-cli").description("A unified, high-performance i18next CLI.").version("1.10.1"),f.command("extract").description("Extract translation keys from source files and update resource files.").option("-w, --watch","Watch for file changes and re-run the extractor.").option("--ci","Exit with a non-zero status code if any files are updated.").option("--dry-run","Run the extractor without writing any files to disk.").action(async e=>{const a=await i.ensureConfig(),c=async()=>{const t=await r.runExtractor(a,{isWatchMode:e.watch,isDryRun:e.dryRun});e.ci&&t&&(console.error(o.red.bold("\n[CI Mode] Error: Translation files were updated. Please commit the changes.")),console.log(o.yellow("💡 Tip: Tired of committing JSON files? locize syncs your team automatically => https://www.locize.com/docs/getting-started")),console.log(` Learn more: ${o.cyan("npx i18next-cli locize-sync")}`),process.exit(1))};if(await c(),e.watch){console.log("\nWatching for changes...");t.watch(await n.glob(a.extract.input),{ignored:/node_modules/,persistent:!0}).on("change",e=>{console.log(`\nFile changed: ${e}`),c()})}}),f.command("status [locale]").description("Display translation status. Provide a locale for a detailed key-by-key view.").option("-n, --namespace <ns>","Filter the status report by a specific namespace").action(async(e,t)=>{let n=await i.loadConfig();if(!n){console.log(o.blue("No config file found. Attempting to detect project structure..."));const e=await a.detectConfig();e||(console.error(o.red("Could not automatically detect your project structure.")),console.log(`Please create a config file first by running: ${o.cyan("npx i18next-cli init")}`),process.exit(1)),console.log(o.green("Project structure detected successfully!")),n=e}await g.runStatus(n,{detail:e,namespace:t.namespace})}),f.command("types").description("Generate TypeScript definitions from translation resource files.").option("-w, --watch","Watch for file changes and re-run the type generator.").action(async e=>{const o=await i.ensureConfig(),a=()=>c.runTypesGenerator(o);if(await a(),e.watch){console.log("\nWatching for changes...");t.watch(await n.glob(o.types?.input||[]),{persistent:!0}).on("change",e=>{console.log(`\nFile changed: ${e}`),a()})}}),f.command("sync").description("Synchronize secondary language files with the primary language file.").action(async()=>{const e=await i.ensureConfig();await s.runSyncer(e)}),f.command("migrate-config [configPath]").description("Migrate a legacy i18next-parser.config.js to the new format.").action(async e=>{await l.runMigrator(e)}),f.command("init").description("Create a new i18next.config.ts/js file with an interactive setup wizard.").action(u.runInit),f.command("lint").description("Find potential issues like hardcoded strings in your codebase.").option("-w, --watch","Watch for file changes and re-run the linter.").action(async e=>{const r=async()=>{let e=await i.loadConfig();if(!e){console.log(o.blue("No config file found. Attempting to detect project structure..."));const t=await a.detectConfig();t||(console.error(o.red("Could not automatically detect your project structure.")),console.log(`Please create a config file first by running: ${o.cyan("npx i18next-cli init")}`),process.exit(1)),console.log(o.green("Project structure detected successfully!")),e=t}await d.runLinter(e)};if(await r(),e.watch){console.log("\nWatching for changes...");const e=await i.loadConfig();if(e?.extract?.input){t.watch(await n.glob(e.extract.input),{ignored:/node_modules/,persistent:!0}).on("change",e=>{console.log(`\nFile changed: ${e}`),r()})}}}),f.command("locize-sync").description("Synchronize local translations with your locize project.").option("--update-values","Update values of existing translations on locize.").option("--src-lng-only","Check for changes in source language only.").option("--compare-mtime","Compare modification times when syncing.").option("--dry-run","Run the command without making any changes.").action(async e=>{const t=await i.ensureConfig();await p.runLocizeSync(t,e)}),f.command("locize-download").description("Download all translations from your locize project.").action(async e=>{const t=await i.ensureConfig();await p.runLocizeDownload(t,e)}),f.command("locize-migrate").description("Migrate local translation files to a new locize project.").action(async e=>{const t=await i.ensureConfig();await p.runLocizeMigrate(t,e)}),f.parse(process.argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("node:path"),t=require("glob"),s=require("../../utils/nested-object.js"),r=require("../../utils/file-utils.js"),n=require("../../utils/default-value.js");function a(e){const t=`^${e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(t)}function o(e){if("object"!=typeof e||null===e||Array.isArray(e))return e;const t={},s=Object.keys(e).sort((e,t)=>{const s=e.localeCompare(t,void 0,{sensitivity:"base"});return 0===s?e.localeCompare(t,void 0,{sensitivity:"case"}):s});for(const r of s)t[r]=o(e[r]);return t}function l(e,t,r,a,l,i,c){const{keySeparator:u=".",sort:f=!0,removeUnusedKeys:p=!0,primaryLanguage:d,defaultValue:g="",pluralSeparator:y="_"}=r.extract,h=new Set;try{const e=new Intl.PluralRules(a,{type:"cardinal"}),t=new Intl.PluralRules(a,{type:"ordinal"});e.resolvedOptions().pluralCategories.forEach(e=>h.add(e)),t.resolvedOptions().pluralCategories.forEach(e=>h.add(`ordinal_${e}`))}catch(e){const t=new Intl.PluralRules(d||"en",{type:"cardinal"}),s=new Intl.PluralRules(d||"en",{type:"ordinal"});t.resolvedOptions().pluralCategories.forEach(e=>h.add(e)),s.resolvedOptions().pluralCategories.forEach(e=>h.add(`ordinal_${e}`))}const x=e.filter(({key:e,hasCount:t,isOrdinal:s})=>{if(!t)return!0;const r=e.split(y);if(s&&r.includes("ordinal")){const e=r[r.length-1];return h.has(`ordinal_${e}`)}if(t){const e=r[r.length-1];return h.has(e)}return!0});let v=p?{}:JSON.parse(JSON.stringify(t));const w=s.getNestedKeys(t,u??".");for(const e of w)if(i.some(t=>t.test(e))){const r=s.getNestedValue(t,e,u??".");s.setNestedValue(v,e,r,u??".")}for(const{key:e,defaultValue:r}of x){const o=s.getNestedValue(t,e,u??"."),i=!x.some(t=>t.key.startsWith(`${e}${u}`)&&t.key!==e),f="object"==typeof o&&null!==o&&(c.has(e)||!r||r===e),p="object"==typeof o&&null!==o&&i&&!c.has(e)&&!f;if(f){s.setNestedValue(v,e,o,u??".");continue}let y;y=void 0===o||p?a===d?r||e:n.resolveDefaultValue(g,e,l,a):o,s.setNestedValue(v,e,y,u??".")}if(!0===f)return o(v);if("function"==typeof f){const e={},t=Object.keys(v),s=new Map;for(const e of x){const t=!1===u?e.key:e.key.split(u)[0];s.has(t)||s.set(t,e)}t.sort((e,t)=>{if("function"==typeof f){const r=s.get(e),n=s.get(t);if(r&&n)return f(r,n)}return e.localeCompare(t,void 0,{sensitivity:"base"})});for(const s of t)e[s]=v[s];v=e}return v}exports.getTranslations=async function(s,n,o){o.extract.primaryLanguage||=o.locales[0]||"en",o.extract.secondaryLanguages||=o.locales.filter(e=>e!==o?.extract?.primaryLanguage);const i=o.extract.defaultNS??"translation",c=[...o.extract.preservePatterns||[]],u=o.extract.indentation??2;for(const e of n)c.push(`${e}.*`);const f=c.map(a),p=new Map;for(const e of s.values()){const t=e.ns||i;p.has(t)||p.set(t,[]),p.get(t).push(e)}const d=[],g=Array.isArray(o.extract.ignore)?o.extract.ignore:o.extract.ignore?[o.extract.ignore]:[];for(const s of o.locales){if(o.extract.mergeNamespaces||!o.extract.output.includes("{{namespace}}")){const t={},a=r.getOutputPath(o.extract.output,s),i=e.resolve(process.cwd(),a),c=await r.loadTranslationFile(i)||{},g=new Set([...p.keys(),...Object.keys(c)]);for(const e of g){const r=p.get(e)||[],a=c[e]||{};t[e]=l(r,a,o,s,e,f,n)}const y=JSON.stringify(c,null,u),h=JSON.stringify(t,null,u);d.push({path:i,updated:h!==y,newTranslations:t,existingTranslations:c})}else{const a=new Set(p.keys()),i=r.getOutputPath(o.extract.output,s,"*"),c=await t.glob(i,{ignore:g});for(const t of c)a.add(e.basename(t,e.extname(t)));for(const t of a){const a=p.get(t)||[],i=r.getOutputPath(o.extract.output,s,t),c=e.resolve(process.cwd(),i),g=await r.loadTranslationFile(c)||{},y=l(a,g,o,s,t,f,n),h=JSON.stringify(g,null,u),x=JSON.stringify(y,null,u);d.push({path:c,updated:x!==h,newTranslations:y,existingTranslations:g})}}}return d};
|
|
1
|
+
"use strict";var e=require("node:path"),t=require("glob"),s=require("../../utils/nested-object.js"),r=require("../../utils/file-utils.js"),n=require("../../utils/default-value.js");function a(e){const t=`^${e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(t)}function o(e){if("object"!=typeof e||null===e||Array.isArray(e))return e;const t={},s=Object.keys(e).sort((e,t)=>{const s=e.localeCompare(t,void 0,{sensitivity:"base"});return 0===s?e.localeCompare(t,void 0,{sensitivity:"case"}):s});for(const r of s)t[r]=o(e[r]);return t}function l(e,t,r,a,l,i,c){const{keySeparator:u=".",sort:f=!0,removeUnusedKeys:p=!0,primaryLanguage:d,defaultValue:g="",pluralSeparator:y="_"}=r.extract,h=new Set;try{const e=new Intl.PluralRules(a,{type:"cardinal"}),t=new Intl.PluralRules(a,{type:"ordinal"});e.resolvedOptions().pluralCategories.forEach(e=>h.add(e)),t.resolvedOptions().pluralCategories.forEach(e=>h.add(`ordinal_${e}`))}catch(e){const t=new Intl.PluralRules(d||"en",{type:"cardinal"}),s=new Intl.PluralRules(d||"en",{type:"ordinal"});t.resolvedOptions().pluralCategories.forEach(e=>h.add(e)),s.resolvedOptions().pluralCategories.forEach(e=>h.add(`ordinal_${e}`))}const x=e.filter(({key:e,hasCount:t,isOrdinal:s})=>{if(i.some(t=>t.test(e)))return!1;if(!t)return!0;const r=e.split(y);if(s&&r.includes("ordinal")){const e=r[r.length-1];return h.has(`ordinal_${e}`)}if(t){const e=r[r.length-1];return h.has(e)}return!0});let v=p?{}:JSON.parse(JSON.stringify(t));const w=s.getNestedKeys(t,u??".");for(const e of w)if(i.some(t=>t.test(e))){const r=s.getNestedValue(t,e,u??".");s.setNestedValue(v,e,r,u??".")}for(const{key:e,defaultValue:r}of x){const o=s.getNestedValue(t,e,u??"."),i=!x.some(t=>t.key.startsWith(`${e}${u}`)&&t.key!==e),f="object"==typeof o&&null!==o&&(c.has(e)||!r||r===e),p="object"==typeof o&&null!==o&&i&&!c.has(e)&&!f;if(f){s.setNestedValue(v,e,o,u??".");continue}let y;y=void 0===o||p?a===d?r||e:n.resolveDefaultValue(g,e,l,a):o,s.setNestedValue(v,e,y,u??".")}if(!0===f)return o(v);if("function"==typeof f){const e={},t=Object.keys(v),s=new Map;for(const e of x){const t=!1===u?e.key:e.key.split(u)[0];s.has(t)||s.set(t,e)}t.sort((e,t)=>{if("function"==typeof f){const r=s.get(e),n=s.get(t);if(r&&n)return f(r,n)}return e.localeCompare(t,void 0,{sensitivity:"base"})});for(const s of t)e[s]=v[s];v=e}return v}exports.getTranslations=async function(s,n,o){o.extract.primaryLanguage||=o.locales[0]||"en",o.extract.secondaryLanguages||=o.locales.filter(e=>e!==o?.extract?.primaryLanguage);const i=o.extract.defaultNS??"translation",c=[...o.extract.preservePatterns||[]],u=o.extract.indentation??2;for(const e of n)c.push(`${e}.*`);const f=c.map(a),p=new Map;for(const e of s.values()){const t=e.ns||i;p.has(t)||p.set(t,[]),p.get(t).push(e)}const d=[],g=Array.isArray(o.extract.ignore)?o.extract.ignore:o.extract.ignore?[o.extract.ignore]:[];for(const s of o.locales){if(o.extract.mergeNamespaces||!o.extract.output.includes("{{namespace}}")){const t={},a=r.getOutputPath(o.extract.output,s),i=e.resolve(process.cwd(),a),c=await r.loadTranslationFile(i)||{},g=new Set([...p.keys(),...Object.keys(c)]);for(const e of g){const r=p.get(e)||[],a=c[e]||{};t[e]=l(r,a,o,s,e,f,n)}const y=JSON.stringify(c,null,u),h=JSON.stringify(t,null,u);d.push({path:i,updated:h!==y,newTranslations:t,existingTranslations:c})}else{const a=new Set(p.keys()),i=r.getOutputPath(o.extract.output,s,"*"),c=await t.glob(i,{ignore:g});for(const t of c)a.add(e.basename(t,e.extname(t)));for(const t of a){const a=p.get(t)||[],i=r.getOutputPath(o.extract.output,s,t),c=e.resolve(process.cwd(),i),g=await r.loadTranslationFile(c)||{},y=l(a,g,o,s,t,f,n),h=JSON.stringify(g,null,u),x=JSON.stringify(y,null,u);d.push({path:c,updated:x!==h,newTranslations:y,existingTranslations:g})}}}return d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e,t,n,s,a,r=!1){try{const o=r?"ordinal":"cardinal",l=new Set;for(const e of a.locales)try{const t=new Intl.PluralRules(e,{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}catch(e){const t=new Intl.PluralRules("en",{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}const c=Array.from(l).sort(),u=a.extract.pluralSeparator??"_";for(const a of c){const o=r?`${e}${u}ordinal${u}${a}`:`${e}${u}${a}`;s.addKey({key:o,ns:n,defaultValue:t,hasCount:!0,isOrdinal:r})}}catch(a){s.addKey({key:e,ns:n,defaultValue:t})}}function t(e,t,n,s,a,r,o=!1){try{const l=o?"ordinal":"cardinal",c=new Set;for(const e of r.locales)try{const t=new Intl.PluralRules(e,{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}catch(e){const t=new Intl.PluralRules(r.extract.primaryLanguage||"en",{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}const u=Array.from(c).sort(),
|
|
1
|
+
"use strict";function e(e,t,n,s,a,r=!1){try{const o=r?"ordinal":"cardinal",l=new Set;for(const e of a.locales)try{const t=new Intl.PluralRules(e,{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}catch(e){const t=new Intl.PluralRules("en",{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}const c=Array.from(l).sort(),u=a.extract.pluralSeparator??"_";for(const a of c){const o=r?`${e}${u}ordinal${u}${a}`:`${e}${u}${a}`;s.addKey({key:o,ns:n,defaultValue:t,hasCount:!0,isOrdinal:r})}}catch(a){s.addKey({key:e,ns:n,defaultValue:t})}}function t(e,t,n,s,a,r,o=!1){try{const l=o?"ordinal":"cardinal",c=new Set;for(const e of r.locales)try{const t=new Intl.PluralRules(e,{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}catch(e){const t=new Intl.PluralRules(r.extract.primaryLanguage||"en",{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}const u=Array.from(c).sort(),i=r.extract.pluralSeparator??"_";for(const r of u){const l=o?`${e}_${s}${i}ordinal${i}${r}`:`${e}_${s}${i}${r}`;a.addKey({key:l,ns:n,defaultValue:t,hasCount:!0,isOrdinal:o})}}catch(r){a.addKey({key:`${e}_${s}`,ns:n,defaultValue:t})}}function n(e){const t=/^\s*,\s*(['"])(.*?)\1/.exec(e);if(t)return t[2];const n=/^\s*,\s*\{[^}]*defaultValue\s*:\s*(['"])(.*?)\1/.exec(e);return n?n[2]:void 0}function s(e){const t=/^\s*,\s*\{[^}]*ns\s*:\s*(['"])(.*?)\1/.exec(e);if(t)return t[2]}function a(e){const t=/^\s*,\s*\{[^}]*context\s*:\s*(['"])(.*?)\1/.exec(e);if(t)return t[2]}function r(e){const t=/^\s*,\s*\{[^}]*count\s*:\s*(\d+)/.exec(e);if(t)return parseInt(t[1],10)}function o(e){const t=/^\s*,\s*\{[^}]*ordinal\s*:\s*(true|false)/.exec(e);if(t)return"true"===t[1]}function l(e){const t=`^${e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(t)}exports.extractKeysFromComments=function(c,u,i,d){const f=new RegExp("\\bt\\s*\\(\\s*(['\"])([^'\"]+)\\1","g"),p=(i.extract.preservePatterns||[]).map(l),y=function(e){const t=[],n=new Set,s=/\/\/(.*)|\/\*([\s\S]*?)\*\//g;let a;for(;null!==(a=s.exec(e));){const e=(a[1]??a[2]).trim();e&&!n.has(e)&&(n.add(e),t.push(e))}return t}(c);for(const l of y){let c;for(;null!==(c=f.exec(l));){let f,y=c[2];if(!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue;const $=l.slice(c.index+c[0].length),x=n($),h=a($),g=r($),m=o($);let K=!1;const V=i.extract.pluralSeparator??"_";if(y.endsWith(`${V}ordinal`)){if(K=!0,y=y.slice(0,-(V.length+7)),!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue}const k=!0===m||K;f=s($);const w=i.extract.nsSeparator??":";if(!f&&w&&y.includes(w)){const e=y.split(w);if(f=e.shift(),y=e.join(w),!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue}if(!f&&d){const e=d("t");e?.defaultNs&&(f=e.defaultNs)}if(f||(f=i.extract.defaultNS),i.extract.disablePlurals)h?u.addKey({key:`${y}_${h}`,ns:f,defaultValue:x??y}):u.addKey({key:y,ns:f,defaultValue:x??y});else if(h&&g){t(y,x??y,f,h,u,i,k);!1!==i.extract?.generateBasePluralForms&&e(y,x??y,f,u,i,k)}else h?(u.addKey({key:y,ns:f,defaultValue:x??y}),u.addKey({key:`${y}_${h}`,ns:f,defaultValue:x??y})):g?e(y,x??y,f,u,i,k):u.addKey({key:y,ns:f,defaultValue:x??y})}}};
|
package/dist/esm/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{Command as t}from"commander";import o from"chokidar";import{glob as e}from"glob";import n from"chalk";import{ensureConfig as i,loadConfig as a}from"./config.js";import{detectConfig as c}from"./heuristic-config.js";import{runExtractor as r}from"./extractor/core/extractor.js";import"node:path";import"node:fs/promises";import"jiti";import{runTypesGenerator as s}from"./types-generator.js";import{runSyncer as l}from"./syncer.js";import{runMigrator as m}from"./migrator.js";import{runInit as p}from"./init.js";import{runLinter as d}from"./linter.js";import{runStatus as g}from"./status.js";import{runLocizeSync as f,runLocizeDownload as u,runLocizeMigrate as h}from"./locize.js";const w=new t;w.name("i18next-cli").description("A unified, high-performance i18next CLI.").version("1.10.
|
|
2
|
+
import{Command as t}from"commander";import o from"chokidar";import{glob as e}from"glob";import n from"chalk";import{ensureConfig as i,loadConfig as a}from"./config.js";import{detectConfig as c}from"./heuristic-config.js";import{runExtractor as r}from"./extractor/core/extractor.js";import"node:path";import"node:fs/promises";import"jiti";import{runTypesGenerator as s}from"./types-generator.js";import{runSyncer as l}from"./syncer.js";import{runMigrator as m}from"./migrator.js";import{runInit as p}from"./init.js";import{runLinter as d}from"./linter.js";import{runStatus as g}from"./status.js";import{runLocizeSync as f,runLocizeDownload as u,runLocizeMigrate as h}from"./locize.js";const w=new t;w.name("i18next-cli").description("A unified, high-performance i18next CLI.").version("1.10.1"),w.command("extract").description("Extract translation keys from source files and update resource files.").option("-w, --watch","Watch for file changes and re-run the extractor.").option("--ci","Exit with a non-zero status code if any files are updated.").option("--dry-run","Run the extractor without writing any files to disk.").action(async t=>{const a=await i(),c=async()=>{const o=await r(a,{isWatchMode:t.watch,isDryRun:t.dryRun});t.ci&&o&&(console.error(n.red.bold("\n[CI Mode] Error: Translation files were updated. Please commit the changes.")),console.log(n.yellow("💡 Tip: Tired of committing JSON files? locize syncs your team automatically => https://www.locize.com/docs/getting-started")),console.log(` Learn more: ${n.cyan("npx i18next-cli locize-sync")}`),process.exit(1))};if(await c(),t.watch){console.log("\nWatching for changes...");o.watch(await e(a.extract.input),{ignored:/node_modules/,persistent:!0}).on("change",t=>{console.log(`\nFile changed: ${t}`),c()})}}),w.command("status [locale]").description("Display translation status. Provide a locale for a detailed key-by-key view.").option("-n, --namespace <ns>","Filter the status report by a specific namespace").action(async(t,o)=>{let e=await a();if(!e){console.log(n.blue("No config file found. Attempting to detect project structure..."));const t=await c();t||(console.error(n.red("Could not automatically detect your project structure.")),console.log(`Please create a config file first by running: ${n.cyan("npx i18next-cli init")}`),process.exit(1)),console.log(n.green("Project structure detected successfully!")),e=t}await g(e,{detail:t,namespace:o.namespace})}),w.command("types").description("Generate TypeScript definitions from translation resource files.").option("-w, --watch","Watch for file changes and re-run the type generator.").action(async t=>{const n=await i(),a=()=>s(n);if(await a(),t.watch){console.log("\nWatching for changes...");o.watch(await e(n.types?.input||[]),{persistent:!0}).on("change",t=>{console.log(`\nFile changed: ${t}`),a()})}}),w.command("sync").description("Synchronize secondary language files with the primary language file.").action(async()=>{const t=await i();await l(t)}),w.command("migrate-config [configPath]").description("Migrate a legacy i18next-parser.config.js to the new format.").action(async t=>{await m(t)}),w.command("init").description("Create a new i18next.config.ts/js file with an interactive setup wizard.").action(p),w.command("lint").description("Find potential issues like hardcoded strings in your codebase.").option("-w, --watch","Watch for file changes and re-run the linter.").action(async t=>{const i=async()=>{let t=await a();if(!t){console.log(n.blue("No config file found. Attempting to detect project structure..."));const o=await c();o||(console.error(n.red("Could not automatically detect your project structure.")),console.log(`Please create a config file first by running: ${n.cyan("npx i18next-cli init")}`),process.exit(1)),console.log(n.green("Project structure detected successfully!")),t=o}await d(t)};if(await i(),t.watch){console.log("\nWatching for changes...");const t=await a();if(t?.extract?.input){o.watch(await e(t.extract.input),{ignored:/node_modules/,persistent:!0}).on("change",t=>{console.log(`\nFile changed: ${t}`),i()})}}}),w.command("locize-sync").description("Synchronize local translations with your locize project.").option("--update-values","Update values of existing translations on locize.").option("--src-lng-only","Check for changes in source language only.").option("--compare-mtime","Compare modification times when syncing.").option("--dry-run","Run the command without making any changes.").action(async t=>{const o=await i();await f(o,t)}),w.command("locize-download").description("Download all translations from your locize project.").action(async t=>{const o=await i();await u(o,t)}),w.command("locize-migrate").description("Migrate local translation files to a new locize project.").action(async t=>{const o=await i();await h(o,t)}),w.parse(process.argv);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolve as t,basename as e,extname as o}from"node:path";import{glob as r}from"glob";import{getNestedKeys as n,getNestedValue as s,setNestedValue as a}from"../../utils/nested-object.js";import{getOutputPath as i,loadTranslationFile as l}from"../../utils/file-utils.js";import{resolveDefaultValue as c}from"../../utils/default-value.js";function u(t){const e=`^${t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(e)}function f(t){if("object"!=typeof t||null===t||Array.isArray(t))return t;const e={},o=Object.keys(t).sort((t,e)=>{const o=t.localeCompare(e,void 0,{sensitivity:"base"});return 0===o?t.localeCompare(e,void 0,{sensitivity:"case"}):o});for(const r of o)e[r]=f(t[r]);return e}function p(t,e,o,r,i,l,u){const{keySeparator:p=".",sort:d=!0,removeUnusedKeys:y=!0,primaryLanguage:g,defaultValue:m="",pluralSeparator:h="_"}=o.extract,x=new Set;try{const t=new Intl.PluralRules(r,{type:"cardinal"}),e=new Intl.PluralRules(r,{type:"ordinal"});t.resolvedOptions().pluralCategories.forEach(t=>x.add(t)),e.resolvedOptions().pluralCategories.forEach(t=>x.add(`ordinal_${t}`))}catch(t){const e=new Intl.PluralRules(g||"en",{type:"cardinal"}),o=new Intl.PluralRules(g||"en",{type:"ordinal"});e.resolvedOptions().pluralCategories.forEach(t=>x.add(t)),o.resolvedOptions().pluralCategories.forEach(t=>x.add(`ordinal_${t}`))}const w=t.filter(({key:t,hasCount:e,isOrdinal:o})=>{if(!e)return!0;const r=t.split(h);if(o&&r.includes("ordinal")){const t=r[r.length-1];return x.has(`ordinal_${t}`)}if(e){const t=r[r.length-1];return x.has(t)}return!0});let v=y?{}:JSON.parse(JSON.stringify(e));const O=n(e,p??".");for(const t of O)if(l.some(e=>e.test(t))){const o=s(e,t,p??".");a(v,t,o,p??".")}for(const{key:t,defaultValue:o}of w){const n=s(e,t,p??"."),l=!w.some(e=>e.key.startsWith(`${t}${p}`)&&e.key!==t),f="object"==typeof n&&null!==n&&(u.has(t)||!o||o===t),d="object"==typeof n&&null!==n&&l&&!u.has(t)&&!f;if(f){a(v,t,n,p??".");continue}let y;y=void 0===n||d?r===g?o||t:c(m,t,i,r):n,a(v,t,y,p??".")}if(!0===d)return f(v);if("function"==typeof d){const t={},e=Object.keys(v),o=new Map;for(const t of w){const e=!1===p?t.key:t.key.split(p)[0];o.has(e)||o.set(e,t)}e.sort((t,e)=>{if("function"==typeof d){const r=o.get(t),n=o.get(e);if(r&&n)return d(r,n)}return t.localeCompare(e,void 0,{sensitivity:"base"})});for(const o of e)t[o]=v[o];v=t}return v}async function d(n,s,a){a.extract.primaryLanguage||=a.locales[0]||"en",a.extract.secondaryLanguages||=a.locales.filter(t=>t!==a?.extract?.primaryLanguage);const c=a.extract.defaultNS??"translation",f=[...a.extract.preservePatterns||[]],d=a.extract.indentation??2;for(const t of s)f.push(`${t}.*`);const y=f.map(u),g=new Map;for(const t of n.values()){const e=t.ns||c;g.has(e)||g.set(e,[]),g.get(e).push(t)}const m=[],h=Array.isArray(a.extract.ignore)?a.extract.ignore:a.extract.ignore?[a.extract.ignore]:[];for(const n of a.locales){if(a.extract.mergeNamespaces||!a.extract.output.includes("{{namespace}}")){const e={},o=i(a.extract.output,n),r=t(process.cwd(),o),c=await l(r)||{},u=new Set([...g.keys(),...Object.keys(c)]);for(const t of u){const o=g.get(t)||[],r=c[t]||{};e[t]=p(o,r,a,n,t,y,s)}const f=JSON.stringify(c,null,d),h=JSON.stringify(e,null,d);m.push({path:r,updated:h!==f,newTranslations:e,existingTranslations:c})}else{const c=new Set(g.keys()),u=i(a.extract.output,n,"*"),f=await r(u,{ignore:h});for(const t of f)c.add(e(t,o(t)));for(const e of c){const o=g.get(e)||[],r=i(a.extract.output,n,e),c=t(process.cwd(),r),u=await l(c)||{},f=p(o,u,a,n,e,y,s),h=JSON.stringify(u,null,d),x=JSON.stringify(f,null,d);m.push({path:c,updated:x!==h,newTranslations:f,existingTranslations:u})}}}return m}export{d as getTranslations};
|
|
1
|
+
import{resolve as t,basename as e,extname as o}from"node:path";import{glob as r}from"glob";import{getNestedKeys as n,getNestedValue as s,setNestedValue as a}from"../../utils/nested-object.js";import{getOutputPath as i,loadTranslationFile as l}from"../../utils/file-utils.js";import{resolveDefaultValue as c}from"../../utils/default-value.js";function u(t){const e=`^${t.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(e)}function f(t){if("object"!=typeof t||null===t||Array.isArray(t))return t;const e={},o=Object.keys(t).sort((t,e)=>{const o=t.localeCompare(e,void 0,{sensitivity:"base"});return 0===o?t.localeCompare(e,void 0,{sensitivity:"case"}):o});for(const r of o)e[r]=f(t[r]);return e}function p(t,e,o,r,i,l,u){const{keySeparator:p=".",sort:d=!0,removeUnusedKeys:y=!0,primaryLanguage:g,defaultValue:m="",pluralSeparator:h="_"}=o.extract,x=new Set;try{const t=new Intl.PluralRules(r,{type:"cardinal"}),e=new Intl.PluralRules(r,{type:"ordinal"});t.resolvedOptions().pluralCategories.forEach(t=>x.add(t)),e.resolvedOptions().pluralCategories.forEach(t=>x.add(`ordinal_${t}`))}catch(t){const e=new Intl.PluralRules(g||"en",{type:"cardinal"}),o=new Intl.PluralRules(g||"en",{type:"ordinal"});e.resolvedOptions().pluralCategories.forEach(t=>x.add(t)),o.resolvedOptions().pluralCategories.forEach(t=>x.add(`ordinal_${t}`))}const w=t.filter(({key:t,hasCount:e,isOrdinal:o})=>{if(l.some(e=>e.test(t)))return!1;if(!e)return!0;const r=t.split(h);if(o&&r.includes("ordinal")){const t=r[r.length-1];return x.has(`ordinal_${t}`)}if(e){const t=r[r.length-1];return x.has(t)}return!0});let v=y?{}:JSON.parse(JSON.stringify(e));const O=n(e,p??".");for(const t of O)if(l.some(e=>e.test(t))){const o=s(e,t,p??".");a(v,t,o,p??".")}for(const{key:t,defaultValue:o}of w){const n=s(e,t,p??"."),l=!w.some(e=>e.key.startsWith(`${t}${p}`)&&e.key!==t),f="object"==typeof n&&null!==n&&(u.has(t)||!o||o===t),d="object"==typeof n&&null!==n&&l&&!u.has(t)&&!f;if(f){a(v,t,n,p??".");continue}let y;y=void 0===n||d?r===g?o||t:c(m,t,i,r):n,a(v,t,y,p??".")}if(!0===d)return f(v);if("function"==typeof d){const t={},e=Object.keys(v),o=new Map;for(const t of w){const e=!1===p?t.key:t.key.split(p)[0];o.has(e)||o.set(e,t)}e.sort((t,e)=>{if("function"==typeof d){const r=o.get(t),n=o.get(e);if(r&&n)return d(r,n)}return t.localeCompare(e,void 0,{sensitivity:"base"})});for(const o of e)t[o]=v[o];v=t}return v}async function d(n,s,a){a.extract.primaryLanguage||=a.locales[0]||"en",a.extract.secondaryLanguages||=a.locales.filter(t=>t!==a?.extract?.primaryLanguage);const c=a.extract.defaultNS??"translation",f=[...a.extract.preservePatterns||[]],d=a.extract.indentation??2;for(const t of s)f.push(`${t}.*`);const y=f.map(u),g=new Map;for(const t of n.values()){const e=t.ns||c;g.has(e)||g.set(e,[]),g.get(e).push(t)}const m=[],h=Array.isArray(a.extract.ignore)?a.extract.ignore:a.extract.ignore?[a.extract.ignore]:[];for(const n of a.locales){if(a.extract.mergeNamespaces||!a.extract.output.includes("{{namespace}}")){const e={},o=i(a.extract.output,n),r=t(process.cwd(),o),c=await l(r)||{},u=new Set([...g.keys(),...Object.keys(c)]);for(const t of u){const o=g.get(t)||[],r=c[t]||{};e[t]=p(o,r,a,n,t,y,s)}const f=JSON.stringify(c,null,d),h=JSON.stringify(e,null,d);m.push({path:r,updated:h!==f,newTranslations:e,existingTranslations:c})}else{const c=new Set(g.keys()),u=i(a.extract.output,n,"*"),f=await r(u,{ignore:h});for(const t of f)c.add(e(t,o(t)));for(const e of c){const o=g.get(e)||[],r=i(a.extract.output,n,e),c=t(process.cwd(),r),u=await l(c)||{},f=p(o,u,a,n,e,y,s),h=JSON.stringify(u,null,d),x=JSON.stringify(f,null,d);m.push({path:c,updated:x!==h,newTranslations:f,existingTranslations:u})}}}return m}export{d as getTranslations};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e,
|
|
1
|
+
function e(e,u,i,d){const f=new RegExp("\\bt\\s*\\(\\s*(['\"])([^'\"]+)\\1","g"),p=(i.extract.preservePatterns||[]).map(c),y=function(e){const t=[],n=new Set,s=/\/\/(.*)|\/\*([\s\S]*?)\*\//g;let a;for(;null!==(a=s.exec(e));){const e=(a[1]??a[2]).trim();e&&!n.has(e)&&(n.add(e),t.push(e))}return t}(e);for(const e of y){let c;for(;null!==(c=f.exec(e));){let f,y=c[2];if(!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue;const $=e.slice(c.index+c[0].length),x=s($),h=r($),g=o($),m=l($);let V=!1;const k=i.extract.pluralSeparator??"_";if(y.endsWith(`${k}ordinal`)){if(V=!0,y=y.slice(0,-(k.length+7)),!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue}const w=!0===m||V;f=a($);const K=i.extract.nsSeparator??":";if(!f&&K&&y.includes(K)){const e=y.split(K);if(f=e.shift(),y=e.join(K),!y||""===y.trim())continue;if(p.some(e=>e.test(y)))continue}if(!f&&d){const e=d("t");e?.defaultNs&&(f=e.defaultNs)}if(f||(f=i.extract.defaultNS),i.extract.disablePlurals)h?u.addKey({key:`${y}_${h}`,ns:f,defaultValue:x??y}):u.addKey({key:y,ns:f,defaultValue:x??y});else if(h&&g){n(y,x??y,f,h,u,i,w);!1!==i.extract?.generateBasePluralForms&&t(y,x??y,f,u,i,w)}else h?(u.addKey({key:y,ns:f,defaultValue:x??y}),u.addKey({key:`${y}_${h}`,ns:f,defaultValue:x??y})):g?t(y,x??y,f,u,i,w):u.addKey({key:y,ns:f,defaultValue:x??y})}}}function t(e,t,n,s,a,r=!1){try{const o=r?"ordinal":"cardinal",l=new Set;for(const e of a.locales)try{const t=new Intl.PluralRules(e,{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}catch(e){const t=new Intl.PluralRules("en",{type:o});t.resolvedOptions().pluralCategories.forEach(e=>l.add(e))}const c=Array.from(l).sort(),u=a.extract.pluralSeparator??"_";for(const a of c){const o=r?`${e}${u}ordinal${u}${a}`:`${e}${u}${a}`;s.addKey({key:o,ns:n,defaultValue:t,hasCount:!0,isOrdinal:r})}}catch(a){s.addKey({key:e,ns:n,defaultValue:t})}}function n(e,t,n,s,a,r,o=!1){try{const l=o?"ordinal":"cardinal",c=new Set;for(const e of r.locales)try{const t=new Intl.PluralRules(e,{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}catch(e){const t=new Intl.PluralRules(r.extract.primaryLanguage||"en",{type:l});t.resolvedOptions().pluralCategories.forEach(e=>c.add(e))}const u=Array.from(c).sort(),i=r.extract.pluralSeparator??"_";for(const r of u){const l=o?`${e}_${s}${i}ordinal${i}${r}`:`${e}_${s}${i}${r}`;a.addKey({key:l,ns:n,defaultValue:t,hasCount:!0,isOrdinal:o})}}catch(r){a.addKey({key:`${e}_${s}`,ns:n,defaultValue:t})}}function s(e){const t=/^\s*,\s*(['"])(.*?)\1/.exec(e);if(t)return t[2];const n=/^\s*,\s*\{[^}]*defaultValue\s*:\s*(['"])(.*?)\1/.exec(e);return n?n[2]:void 0}function a(e){const t=/^\s*,\s*\{[^}]*ns\s*:\s*(['"])(.*?)\1/.exec(e);if(t)return t[2]}function r(e){const t=/^\s*,\s*\{[^}]*context\s*:\s*(['"])(.*?)\1/.exec(e);if(t)return t[2]}function o(e){const t=/^\s*,\s*\{[^}]*count\s*:\s*(\d+)/.exec(e);if(t)return parseInt(t[1],10)}function l(e){const t=/^\s*,\s*\{[^}]*ordinal\s*:\s*(true|false)/.exec(e);if(t)return"true"===t[1]}function c(e){const t=`^${e.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")}$`;return new RegExp(t)}export{e as extractKeysFromComments};
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -85,6 +85,11 @@ function buildNewTranslationsForNs (
|
|
|
85
85
|
|
|
86
86
|
// Filter nsKeys to only include keys relevant to this language
|
|
87
87
|
const filteredKeys = nsKeys.filter(({ key, hasCount, isOrdinal }) => {
|
|
88
|
+
// FIRST: Check if key matches preservePatterns and should be excluded
|
|
89
|
+
if (preservePatterns.some(re => re.test(key))) {
|
|
90
|
+
return false // Skip keys that match preserve patterns
|
|
91
|
+
}
|
|
92
|
+
|
|
88
93
|
if (!hasCount) {
|
|
89
94
|
// Non-plural keys are always included
|
|
90
95
|
return true
|
|
@@ -33,6 +33,9 @@ export function extractKeysFromComments (
|
|
|
33
33
|
// Use a reliable word boundary (\b) to match 't(...)' but not 'http.get(...)'.
|
|
34
34
|
const keyRegex = new RegExp(`\\b${functionNameToFind}\\s*\\(\\s*(['"])([^'"]+)\\1`, 'g')
|
|
35
35
|
|
|
36
|
+
// Prepare preservePatterns for filtering
|
|
37
|
+
const preservePatterns = (config.extract.preservePatterns || []).map(globToRegex)
|
|
38
|
+
|
|
36
39
|
const commentTexts = collectCommentTexts(code)
|
|
37
40
|
|
|
38
41
|
for (const text of commentTexts) {
|
|
@@ -45,6 +48,11 @@ export function extractKeysFromComments (
|
|
|
45
48
|
continue // Skip empty keys
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
// Check if key matches preservePatterns and should be excluded from extraction
|
|
52
|
+
if (preservePatterns.some(re => re.test(key))) {
|
|
53
|
+
continue // Skip keys that match preserve patterns
|
|
54
|
+
}
|
|
55
|
+
|
|
48
56
|
let ns: string | undefined
|
|
49
57
|
const remainder = text.slice(match.index + match[0].length)
|
|
50
58
|
|
|
@@ -65,6 +73,11 @@ export function extractKeysFromComments (
|
|
|
65
73
|
if (!key || key.trim() === '') {
|
|
66
74
|
continue // Skip keys that become empty after normalization
|
|
67
75
|
}
|
|
76
|
+
|
|
77
|
+
// Re-check preservePatterns after key normalization
|
|
78
|
+
if (preservePatterns.some(re => re.test(key))) {
|
|
79
|
+
continue // Skip normalized keys that match preserve patterns
|
|
80
|
+
}
|
|
68
81
|
}
|
|
69
82
|
|
|
70
83
|
const isOrdinal = ordinal === true || isOrdinalByKey
|
|
@@ -78,6 +91,16 @@ export function extractKeysFromComments (
|
|
|
78
91
|
const parts = key.split(nsSeparator)
|
|
79
92
|
ns = parts.shift()
|
|
80
93
|
key = parts.join(nsSeparator)
|
|
94
|
+
|
|
95
|
+
// Validate that the key didn't become empty after namespace removal
|
|
96
|
+
if (!key || key.trim() === '') {
|
|
97
|
+
continue // Skip keys that become empty after namespace removal
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Re-check preservePatterns after namespace processing
|
|
101
|
+
if (preservePatterns.some(re => re.test(key))) {
|
|
102
|
+
continue // Skip processed keys that match preserve patterns
|
|
103
|
+
}
|
|
81
104
|
}
|
|
82
105
|
|
|
83
106
|
// 3. If no explicit namespace found, try to resolve from scope
|
|
@@ -351,3 +374,18 @@ function parseOrdinalFromComment (remainder: string): boolean | undefined {
|
|
|
351
374
|
|
|
352
375
|
return undefined
|
|
353
376
|
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Converts a glob pattern to a regular expression.
|
|
380
|
+
* Supports basic glob patterns with * wildcards.
|
|
381
|
+
*
|
|
382
|
+
* @param glob - The glob pattern to convert
|
|
383
|
+
* @returns A RegExp that matches the glob pattern
|
|
384
|
+
*
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
387
|
+
function globToRegex (glob: string): RegExp {
|
|
388
|
+
const escaped = glob.replace(/[.+?^${}()|[\]\\]/g, '\\$&')
|
|
389
|
+
const regexString = `^${escaped.replace(/\*/g, '.*')}$`
|
|
390
|
+
return new RegExp(regexString)
|
|
391
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"translation-manager.d.ts","sourceRoot":"","sources":["../../../src/extractor/core/translation-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AA6MnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA8E9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-parser.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/comment-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAC1F,IAAI,
|
|
1
|
+
{"version":3,"file":"comment-parser.d.ts","sourceRoot":"","sources":["../../../src/extractor/parsers/comment-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEtE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,oBAAoB,EAC5B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,GAC1F,IAAI,CA4HN"}
|