@menapo/vi18n 0.1.2 → 0.2.0

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.
Files changed (75) hide show
  1. package/README.md +19 -0
  2. package/dist/{apply-FAHl1R6T.js → apply-Bg-3rB2m.js} +4 -4
  3. package/dist/{captured-CTjjDF5o.js → captured-DfLk50Ji.js} +1 -1
  4. package/dist/{check-DwFwOB1d.js → check-CunekuYs.js} +16 -7
  5. package/dist/cli.js +1 -1
  6. package/dist/{collisions-uMTuq36M.js → collisions-CDSdtLQm.js} +2 -2
  7. package/dist/{compile-CEvH-6sY.js → compile-hva0qjhZ.js} +6 -6
  8. package/dist/config.d.ts +1 -1
  9. package/dist/config.js +2 -2
  10. package/dist/{diagnostics-1onDF6Ua.js → diagnostics-LgIWyeSp.js} +2 -1
  11. package/dist/{duplicates-CsUXRX2J.js → duplicates-8cudcHNj.js} +1 -1
  12. package/dist/{engine-Bf7nVigL.js → engine-ecRD8-IE.js} +11 -11
  13. package/dist/engine.d.ts +1 -1
  14. package/dist/{exchange-DYG9RZoT.js → exchange-DjwlrTQ9.js} +3 -3
  15. package/dist/{exclude-vMnm3lqU.js → exclude-BFETmvde.js} +1 -1
  16. package/dist/{export-BYq0gfLd.js → export-D2tsqWIr.js} +6 -6
  17. package/dist/{extract-CYtuEo8u.js → extract-BxYchVmY.js} +7 -7
  18. package/dist/{formats-ChV1LVH_.js → formats-BaryZ2N7.js} +3 -3
  19. package/dist/{i18next-D66Icz3L.js → i18next-COO6o0tX.js} +6 -6
  20. package/dist/i18next-Dr7DCQlQ.js +1 -0
  21. package/dist/{import-BApbQlmm.js → import-vSC29Cn4.js} +6 -6
  22. package/dist/index.d.ts +1 -1
  23. package/dist/{init-J7AwwA5e.js → init-Cc7A-8VX.js} +9 -9
  24. package/dist/{library-BfSOBeBd.js → library-tp_xqzSY.js} +2 -2
  25. package/dist/{lingui-Ee2farVo.js → lingui-BnnlqGXT.js} +8 -8
  26. package/dist/lint.js +7 -6
  27. package/dist/{load-BFLLqY8x.js → load-BSIeGJ5v.js} +8 -6
  28. package/dist/{load-CMwhukZ4.js → load-SSrAeJVB.js} +5 -3
  29. package/dist/{locales-DxLDrx-h.js → locales-D0U-yVRm.js} +4 -4
  30. package/dist/{lsp-BC7xDGON.js → lsp-DvC11pBZ.js} +2 -2
  31. package/dist/{mcp-Cka8ywDF.js → mcp-D2zzOTBy.js} +2 -2
  32. package/dist/{merge-driver-B04Apm29.js → merge-driver-BLI8OtAc.js} +6 -6
  33. package/dist/migrate-1r43OBfe.js +1 -0
  34. package/dist/{migrate-D7TNl6SD.js → migrate-ChDGhlC-.js} +11 -11
  35. package/dist/{openai-RWw0YlAx.js → openai-CLn4puY8.js} +1 -1
  36. package/dist/{output-CF9uvk_-.js → output-D5tAt8q4.js} +3 -3
  37. package/dist/parse.d.ts +1 -1
  38. package/dist/{pipeline-sgl_q_op.js → pipeline-BJSkkRYC.js} +7 -7
  39. package/dist/{pipeline-B30irGMD.js → pipeline-BeCc441z.js} +1 -1
  40. package/dist/{project-DSzWKU3C.js → project-B5KIO0q-.js} +9 -9
  41. package/dist/{pseudo-DNbNNVGP.js → pseudo-B2DUpoLu.js} +2 -1
  42. package/dist/{react-intl-tzGIk6G3.js → react-intl-C8JehBBL.js} +6 -6
  43. package/dist/rename-ZVGq9ZG1.js +577 -0
  44. package/dist/repeated-uuI1tUGg.js +85 -0
  45. package/dist/{restore-BG_zMpSj.js → restore-xlBIrtRt.js} +8 -8
  46. package/dist/{rewrite-hAcRJwiZ.js → rewrite-BwzXoBiA.js} +1 -1
  47. package/dist/{run-CFzR3V93.js → run-CQ9pDLSa.js} +50 -23
  48. package/dist/scan-worker.d.ts +1 -1
  49. package/dist/scan-worker.js +1 -1
  50. package/dist/{server-ceuzzkal.js → server-Br8tAuG2.js} +28 -8
  51. package/dist/{server-WlxZH0oX.js → server-DJRpUQVZ.js} +793 -12
  52. package/dist/server.d.ts +1 -1
  53. package/dist/server.js +7 -1
  54. package/dist/{sitemap-796jJKUT.js → sitemap-CSAkm6oi.js} +4 -4
  55. package/dist/{sources-DuOdM02f.js → sources-DNVbYsgs.js} +4 -3
  56. package/dist/{status-CTH3qI-0.js → status-q6M3rBrh.js} +3 -3
  57. package/dist/{sync-CpL0Qsgw.js → sync-BNIAwMhR.js} +6 -6
  58. package/dist/test.d.ts +1 -1
  59. package/dist/test.js +53 -12
  60. package/dist/{translate-BrfVRkjl.js → translate-BP4iVhOR.js} +6 -6
  61. package/dist/{types-BaG1LboH.d.ts → types-B4wNX6PA.d.ts} +4 -2
  62. package/dist/{types-Cy2bPdSg.d.ts → types-_4UdFhR9.d.ts} +10 -1
  63. package/dist/{types-Ds_vebja.js → types-xR2exI3L.js} +1 -0
  64. package/dist/{units-VVLgQ7x7.js → units-DPPfCN7j.js} +3 -3
  65. package/dist/{validate-zv4-IZyZ.js → validate-CgzaDdOY.js} +2 -2
  66. package/dist/{version-BFs370Ce.js → version-DC-J5WvV.js} +2 -2
  67. package/dist/{vite-scan-DFKSGVE9.js → vite-scan-kM8Ta3rO.js} +6 -6
  68. package/dist/vite.d.ts +1 -1
  69. package/dist/vite.js +20 -16
  70. package/dist/{vue-i18n-CBmZqHbG.js → vue-i18n-_uIXlFVh.js} +6 -6
  71. package/dist/{which-BpyJyBkX.js → which-DFWk_KwN.js} +8 -8
  72. package/dist/{worker-BjzVqJVO.js → worker-zlhNj4y3.js} +4 -4
  73. package/package.json +1 -1
  74. package/dist/i18next-1waHziMy.js +0 -1
  75. package/dist/migrate-khCY8TE0.js +0 -1
package/README.md CHANGED
@@ -90,6 +90,25 @@ The same pages, with the benchmarks, build as a site from
90
90
  [`site/`](https://github.com/menapo/kit/tree/main/site) in the
91
91
  repository; `vp run --filter @menapo/site dev` serves it locally.
92
92
 
93
+ ## For agents
94
+
95
+ Read [Start here](https://github.com/menapo/kit/blob/main/packages/vi18n/docs/guide/start-here.md),
96
+ then the [Cookbook](https://github.com/menapo/kit/blob/main/packages/vi18n/docs/guide/cookbook.md)
97
+ for your task. Signatures are in the
98
+ [API reference](https://github.com/menapo/kit/blob/main/packages/vi18n/docs/guide/reference.md);
99
+ an error message is looked up in
100
+ [Troubleshooting](https://github.com/menapo/kit/blob/main/packages/vi18n/docs/guide/troubleshooting.md).
101
+
102
+ - Entry points: `@menapo/vi18n` (app code), `/server`, `/parse`, `/vite`,
103
+ `/config`, `/lint`, `/test`, and the `vi18n` CLI. Never import `/engine`, and
104
+ there is no `/react`, `/vue` or `/svelte`.
105
+ - A message is one string literal, with values as ICU arguments.
106
+ - `t()` runs inside a function, a component or a request; at module level use
107
+ `msg()`.
108
+ - A plain `t()` result never goes into HTML: use `richHtml()`.
109
+ - Reword a message with `vi18n rename`, not by editing catalogs.
110
+ - Run `vp` only, and commit `vi18n.gen.ts` and `locales/`.
111
+
93
112
  ## Entry points
94
113
 
95
114
  | Import | For |
@@ -1,7 +1,7 @@
1
- import { r as resolveDuplicates } from "./duplicates-CsUXRX2J.js";
2
- import { E as entryKey, j as withSubject, k as translationErrors } from "./library-BfSOBeBd.js";
3
- import { h as isManualId, p as tryCanonicalize } from "./validate-zv4-IZyZ.js";
4
- import { r as entrySource } from "./units-VVLgQ7x7.js";
1
+ import { r as resolveDuplicates } from "./duplicates-8cudcHNj.js";
2
+ import { E as entryKey, j as withSubject, k as translationErrors } from "./library-tp_xqzSY.js";
3
+ import { g as isManualId, m as tryCanonicalize } from "./validate-CgzaDdOY.js";
4
+ import { r as entrySource } from "./units-DPPfCN7j.js";
5
5
  // src/core/exchange/apply.ts
6
6
  /**
7
7
  * Applying imported rows and restored entries to a catalog (PLAN §4.3, §4.4,
@@ -1,4 +1,4 @@
1
- import { O as listImports, _ as insertImport, b as skipTrivia, c as USE_T, d as markersOf, f as TYPE_KEYS, g as forEachBindingName, h as directives, m as childNodes, o as GLUE, p as afterDirective, u as isIgnored, v as isNode, x as unwrap, y as keyName } from "./sources-DuOdM02f.js";
1
+ import { _ as insertImport, b as skipTrivia, c as USE_T, d as markersOf, f as TYPE_KEYS, g as forEachBindingName, h as directives, k as listImports, m as childNodes, o as GLUE, p as afterDirective, u as isIgnored, v as isNode, x as unwrap, y as keyName } from "./sources-DNVbYsgs.js";
2
2
  // src/core/extract/hooks.ts
3
3
  /** Preferred local of the `__vi18nUseT` import: hook-shaped, see the module comment. */
4
4
  const USE_T_LOCAL = "useVi18nT";
@@ -1,8 +1,9 @@
1
- import { t as findCollisions } from "./collisions-uMTuq36M.js";
2
- import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-CsUXRX2J.js";
3
- import { C as idSchemeMismatch, S as checkTranslation, c as occurrencesOf, l as ownStatus, m as scan, n as catalogFile, o as loadCatalogs, p as referencedMessages, s as loadProject, w as syntaxOfEntry } from "./project-DSzWKU3C.js";
4
- import { r as plural, t as countBySeverity } from "./output-CF9uvk_-.js";
5
- import { r as EXIT, t as CHECK_CATEGORIES } from "./types-Ds_vebja.js";
1
+ import { t as findCollisions } from "./collisions-CDSdtLQm.js";
2
+ import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-8cudcHNj.js";
3
+ import { n as repeatedDiagnostics, r as repeatedTexts } from "./repeated-uuI1tUGg.js";
4
+ import { C as idSchemeMismatch, S as checkTranslation, c as occurrencesOf, l as ownStatus, m as scan, n as catalogFile, o as loadCatalogs, p as referencedMessages, s as loadProject, w as syntaxOfEntry } from "./project-B5KIO0q-.js";
5
+ import { r as plural, t as countBySeverity } from "./output-D5tAt8q4.js";
6
+ import { r as EXIT, t as CHECK_CATEGORIES } from "./types-xR2exI3L.js";
6
7
  // src/cli/commands/check.ts
7
8
  /**
8
9
  * `vi18n check [missing] [placeholders] [syntax] [--ci] [--format …]`
@@ -12,7 +13,8 @@ import { r as EXIT, t as CHECK_CATEGORIES } from "./types-Ds_vebja.js";
12
13
  *
13
14
  * - syntax: catalogs that do not parse, invalid sources and translations,
14
15
  * wrapped lines, duplicates, foreign contexts, collisions, id-scheme drift,
15
- * and the code's own extraction errors;
16
+ * the code's own extraction errors, and a text written at many call sites
17
+ * (`extraction.repeatedText`);
16
18
  * - placeholders: everything `validateTranslation` finds in a translation
17
19
  * (argument and tag mismatches, plural categories, length, apostrophes);
18
20
  * - missing: referenced messages without a usable own translation per target
@@ -36,7 +38,7 @@ async function check(ctx, flags) {
36
38
  const scanned = await scan(project);
37
39
  const loaded = await loadCatalogs(project);
38
40
  const referenced = referencedMessages(project, scanned.messages, loaded.set);
39
- if (selected.has("syntax")) found.syntax.push(...scanned.diagnostics.filter(isSyntaxFinding), ...loaded.diagnostics, ...referenced.diagnostics, ...findCollisions(occurrencesOf(scanned), loaded.set, project.codec, { referenced: new Set(project.config.extraction.keep) }));
41
+ if (selected.has("syntax")) found.syntax.push(...scanned.diagnostics.filter(isSyntaxFinding), ...loaded.diagnostics, ...referenced.diagnostics, ...findCollisions(occurrencesOf(scanned), loaded.set, project.codec, { referenced: new Set(project.config.extraction.keep) }), ...repeated(project, scanned));
40
42
  const sources = new SourceCache(project.codec, referenced.identities);
41
43
  for (const locale of project.config.locales) checkLocale(project, locale, loaded.set.get(locale), {
42
44
  identities: referenced.identities,
@@ -46,6 +48,13 @@ async function check(ctx, flags) {
46
48
  });
47
49
  return finish(ctx, flags, categories, found);
48
50
  }
51
+ /** `extract-repeated-text` warnings: one text at `extraction.repeatedText` call sites or more. */
52
+ function repeated(project, scanned) {
53
+ const threshold = project.config.extraction.repeatedText;
54
+ if (threshold === false) return [];
55
+ const occurrences = scanned.files.flatMap((file) => file.occurrences);
56
+ return repeatedDiagnostics(repeatedTexts(occurrences, threshold));
57
+ }
49
58
  /** One locale's findings in the selected categories. */
50
59
  function checkLocale(project, locale, catalog, { identities, sources, selected, found }) {
51
60
  const { config } = project;
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "./run-CFzR3V93.js";
2
+ import { t as run } from "./run-CQ9pDLSa.js";
3
3
  import { createInterface } from "node:readline/promises";
4
4
  // src/cli/bin.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { r as resolveDuplicates } from "./duplicates-CsUXRX2J.js";
2
- import { E as entryKey, T as entryCanonical, b as compareText } from "./library-BfSOBeBd.js";
1
+ import { r as resolveDuplicates } from "./duplicates-8cudcHNj.js";
2
+ import { E as entryKey, T as entryCanonical, b as compareText } from "./library-tp_xqzSY.js";
3
3
  // src/core/catalog/collisions.ts
4
4
  const DELETED_HINT = "; if that message was deleted, run vi18n extract first";
5
5
  function posix(path) {
@@ -1,10 +1,10 @@
1
- import { t as findCollisions } from "./collisions-uMTuq36M.js";
2
- import { c as assetCatalogsModule, l as serverCatalogVersion, o as serverCatalogJson, s as SERVER_FILES, t as compileLocales, u as serverCatalogsDir } from "./locales-DxLDrx-h.js";
3
- import { c as toRuntimeConfig } from "./load-BFLLqY8x.js";
1
+ import { t as findCollisions } from "./collisions-CDSdtLQm.js";
2
+ import { c as assetCatalogsModule, l as serverCatalogVersion, o as serverCatalogJson, s as SERVER_FILES, t as compileLocales, u as serverCatalogsDir } from "./locales-D0U-yVRm.js";
3
+ import { c as toRuntimeConfig } from "./load-BSIeGJ5v.js";
4
4
  import { n as readIfExists, r as writeFileAtomic } from "./fs-ezCMZeDV.js";
5
- import { a as table, i as rootRelative, r as plural } from "./output-CF9uvk_-.js";
6
- import { a as hasErrors, c as occurrencesOf, f as readErrors, i as computeDrift, m as scan, o as loadCatalogs, r as compareText, s as loadProject } from "./project-DSzWKU3C.js";
7
- import { r as EXIT } from "./types-Ds_vebja.js";
5
+ import { a as table, i as rootRelative, r as plural } from "./output-D5tAt8q4.js";
6
+ import { a as hasErrors, c as occurrencesOf, f as readErrors, i as computeDrift, m as scan, o as loadCatalogs, r as compareText, s as loadProject } from "./project-B5KIO0q-.js";
7
+ import { r as EXIT } from "./types-xR2exI3L.js";
8
8
  import { join, resolve } from "node:path";
9
9
  import { mkdir, readdir, rm } from "node:fs/promises";
10
10
  // src/cli/commands/compile.ts
package/dist/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Vi18nConfig, c as OpenAICompatibleOptions, d as ProviderResponse, f as Tier, l as ProviderOptions, m as TranslationProvider, n as OutputOptions, o as AiItem, p as TranslateOptions, r as PseudoLocale, s as BatchOptions, t as Level, u as ProviderRequest, v as LocaleStrategy, y as UrlStrategy } from "./types-Cy2bPdSg.js";
1
+ import { a as Vi18nConfig, c as OpenAICompatibleOptions, d as ProviderResponse, f as Tier, l as ProviderOptions, m as TranslationProvider, n as OutputOptions, o as AiItem, p as TranslateOptions, r as PseudoLocale, s as BatchOptions, t as Level, u as ProviderRequest, v as LocaleStrategy, y as UrlStrategy } from "./types-_4UdFhR9.js";
2
2
  /**
3
3
  * Types a `vi18n.config.ts`. The config is validated when it is loaded
4
4
  * (`vi18n` plugin, CLI), where errors can name the file.
package/dist/config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as localizedPathsFor } from "./url-Bpc6wLea.js";
2
- import { i as DEFAULT_CONFIG } from "./diagnostics-1onDF6Ua.js";
3
- import { n as openaiCompatible } from "./openai-RWw0YlAx.js";
2
+ import { i as DEFAULT_CONFIG } from "./diagnostics-LgIWyeSp.js";
3
+ import { n as openaiCompatible } from "./openai-CLn4puY8.js";
4
4
  // src/config/index.ts
5
5
  /**
6
6
  * `@menapo/vi18n/config` implementation (docs/INTERNALS.md §3.4). Loaded by
@@ -49,7 +49,8 @@ const DEFAULT_CONFIG = {
49
49
  aliases: [],
50
50
  globals: [],
51
51
  keep: [],
52
- dependencies: []
52
+ dependencies: [],
53
+ repeatedText: 3
53
54
  },
54
55
  ids: { length: ID_LENGTH.default },
55
56
  catalogs: {
@@ -1,4 +1,4 @@
1
- import { D as flagKey, E as entryKey, O as stricterLimit, S as defineFields, v as STATE_RANK } from "./library-BfSOBeBd.js";
1
+ import { D as flagKey, E as entryKey, O as stricterLimit, S as defineFields, v as STATE_RANK } from "./library-tp_xqzSY.js";
2
2
  // src/core/catalog/duplicates.ts
3
3
  /** Entries grouped by key; only keys seen more than once. Null when there are none. */
4
4
  function duplicateGroups(catalog, codec) {
@@ -1,10 +1,10 @@
1
- import { n as isDiagnosticError } from "./diagnostics-1onDF6Ua.js";
2
- import { F as isIncluded, I as listProjectFiles } from "./library-BfSOBeBd.js";
3
- import { i as rootRelative, o as errorMessage, r as plural } from "./output-CF9uvk_-.js";
4
- import { g as usageError, r as compareText, s as loadProject } from "./project-DSzWKU3C.js";
5
- import "./types-Ds_vebja.js";
6
- import { _ as toManualId, a as finishMigration, b as translationProblems, d as positionOf, i as encodeMarkup, j as jsString, t as MESSAGES_MODULE, y as rewriteSummary } from "./migrate-D7TNl6SD.js";
7
- import { n as RUNTIME_MODULE, r as renderPlan } from "./rewrite-hAcRJwiZ.js";
1
+ import { n as isDiagnosticError } from "./diagnostics-LgIWyeSp.js";
2
+ import { F as isIncluded, I as listProjectFiles } from "./library-tp_xqzSY.js";
3
+ import { i as rootRelative, o as errorMessage, r as plural } from "./output-D5tAt8q4.js";
4
+ import { g as usageError, r as compareText, s as loadProject } from "./project-B5KIO0q-.js";
5
+ import "./types-xR2exI3L.js";
6
+ import { _ as toManualId, a as finishMigration, b as translationProblems, d as positionOf, i as encodeMarkup, j as jsString, t as MESSAGES_MODULE, y as rewriteSummary } from "./migrate-ChDGhlC-.js";
7
+ import { n as RUNTIME_MODULE, r as renderPlan } from "./rewrite-BwzXoBiA.js";
8
8
  import { basename, dirname, extname, join, relative, resolve } from "node:path";
9
9
  import { readFile, readdir, stat } from "node:fs/promises";
10
10
  // src/cli/commands/migrate/engine.ts
@@ -218,10 +218,10 @@ function assignIds(keys, defs, keepIds, codec) {
218
218
  }
219
219
  async function createAdapter(library) {
220
220
  switch (library) {
221
- case "i18next": return (await import("./i18next-1waHziMy.js")).createI18nextAdapter();
222
- case "react-intl": return (await import("./react-intl-tzGIk6G3.js")).createReactIntlAdapter();
223
- case "lingui": return (await import("./lingui-Ee2farVo.js")).createLinguiAdapter();
224
- case "vue-i18n": return (await import("./vue-i18n-CBmZqHbG.js")).createVueI18nAdapter();
221
+ case "i18next": return (await import("./i18next-Dr7DCQlQ.js")).createI18nextAdapter();
222
+ case "react-intl": return (await import("./react-intl-C8JehBBL.js")).createReactIntlAdapter();
223
+ case "lingui": return (await import("./lingui-BnnlqGXT.js")).createLinguiAdapter();
224
+ case "vue-i18n": return (await import("./vue-i18n-_uIXlFVh.js")).createVueI18nAdapter();
225
225
  }
226
226
  }
227
227
  /** Where the `msg()` table goes: beside the source catalog when that is extracted, else in the first include root. */
package/dist/engine.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import "./types-BaG1LboH.js";
1
+ import "./types-B4wNX6PA.js";
2
2
  /** The part of `import.meta.hot` the editor uses. */
3
3
  interface DevHot {
4
4
  on(event: string, listener: (data: never) => void): void;
@@ -1,6 +1,6 @@
1
- import { h as updateCatalogFile } from "./library-BfSOBeBd.js";
2
- import { s as sourceIndexOf } from "./units-VVLgQ7x7.js";
3
- import { t as VERSION } from "./version-BFs370Ce.js";
1
+ import { h as updateCatalogFile } from "./library-tp_xqzSY.js";
2
+ import { s as sourceIndexOf } from "./units-DPPfCN7j.js";
3
+ import { t as VERSION } from "./version-DC-J5WvV.js";
4
4
  // src/cli/exchange.ts
5
5
  /**
6
6
  * What `export`, `import` and `restore` share: the source texts exchange
@@ -1,4 +1,4 @@
1
- import { g as isValidManualId } from "./validate-zv4-IZyZ.js";
1
+ import { _ as isValidManualId } from "./validate-CgzaDdOY.js";
2
2
  // src/core/config/exclude.ts
3
3
  /**
4
4
  * `ai.exclude` entries (PLAN §4.6, §5.20; INTERNALS §2.15): a configured
@@ -1,9 +1,9 @@
1
- import { n as serializeExport } from "./formats-ChV1LVH_.js";
2
- import { a as exchangeUnits, n as EXTENSIONS } from "./units-VVLgQ7x7.js";
3
- import { n as sourceContext } from "./exchange-DYG9RZoT.js";
4
- import { r as plural } from "./output-CF9uvk_-.js";
5
- import { f as readErrors, g as usageError, h as targetLocales, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-DSzWKU3C.js";
6
- import { r as EXIT } from "./types-Ds_vebja.js";
1
+ import { n as serializeExport } from "./formats-BaryZ2N7.js";
2
+ import { a as exchangeUnits, n as EXTENSIONS } from "./units-DPPfCN7j.js";
3
+ import { n as sourceContext } from "./exchange-DjwlrTQ9.js";
4
+ import { r as plural } from "./output-D5tAt8q4.js";
5
+ import { f as readErrors, g as usageError, h as targetLocales, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-B5KIO0q-.js";
6
+ import { r as EXIT } from "./types-xR2exI3L.js";
7
7
  import { join, resolve } from "node:path";
8
8
  import { mkdir, writeFile } from "node:fs/promises";
9
9
  // src/cli/commands/export.ts
@@ -1,10 +1,10 @@
1
- import { t as findCollisions } from "./collisions-uMTuq36M.js";
2
- import { F as isIncluded, h as updateCatalogFile, n as libraryCoverage, s as catalogPath } from "./library-BfSOBeBd.js";
3
- import { a as writeGenFile, n as syncCatalogs, s as scanProject, t as syncCatalog } from "./sync-CpL0Qsgw.js";
4
- import { t as VERSION } from "./version-BFs370Ce.js";
5
- import { a as table, i as rootRelative, o as errorMessage, r as plural } from "./output-CF9uvk_-.js";
6
- import { a as hasErrors, c as occurrencesOf, f as readErrors, g as usageError, i as computeDrift, m as scan, o as loadCatalogs, s as loadProject } from "./project-DSzWKU3C.js";
7
- import { r as EXIT } from "./types-Ds_vebja.js";
1
+ import { t as findCollisions } from "./collisions-CDSdtLQm.js";
2
+ import { F as isIncluded, h as updateCatalogFile, n as libraryCoverage, s as catalogPath } from "./library-tp_xqzSY.js";
3
+ import { a as writeGenFile, n as syncCatalogs, s as scanProject, t as syncCatalog } from "./sync-BNIAwMhR.js";
4
+ import { t as VERSION } from "./version-DC-J5WvV.js";
5
+ import { a as table, i as rootRelative, o as errorMessage, r as plural } from "./output-D5tAt8q4.js";
6
+ import { a as hasErrors, c as occurrencesOf, f as readErrors, g as usageError, i as computeDrift, m as scan, o as loadCatalogs, s as loadProject } from "./project-B5KIO0q-.js";
7
+ import { r as EXIT } from "./types-xR2exI3L.js";
8
8
  import { dirname, resolve } from "node:path";
9
9
  import { watch } from "node:fs";
10
10
  import { stat } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
- import { _ as parseJsonCatalog, g as parsePo, p as serializeCatalog, w as emptyHeader, x as createEntry } from "./library-BfSOBeBd.js";
2
- import { t as VERSION } from "./version-BFs370Ce.js";
3
- import { i as exchangeKey, o as parseExchangeKey } from "./units-VVLgQ7x7.js";
1
+ import { _ as parseJsonCatalog, g as parsePo, p as serializeCatalog, w as emptyHeader, x as createEntry } from "./library-tp_xqzSY.js";
2
+ import { t as VERSION } from "./version-DC-J5WvV.js";
3
+ import { i as exchangeKey, o as parseExchangeKey } from "./units-DPPfCN7j.js";
4
4
  // src/core/exchange/csv.ts
5
5
  /**
6
6
  * RFC 4180 CSV for `vi18n export --format csv` (PLAN §4.4 P2). The writer
@@ -1,9 +1,9 @@
1
- import { n as isDiagnosticError } from "./diagnostics-1onDF6Ua.js";
2
- import { C as langFromId, w as parseModule } from "./sources-DuOdM02f.js";
3
- import { t as pluralCategories, y as printICU } from "./validate-zv4-IZyZ.js";
4
- import { o as errorMessage } from "./output-CF9uvk_-.js";
5
- import { A as isNode, B as objectProperties, C as attributeString, D as inJsxChildren, E as identifierName, F as jsxNameNodes, H as templateKeyPattern, I as keyName, M as jsxAttributes, N as jsxChildren, P as jsxName, S as attributeExpression, T as cleanJsxText, V as stringValue, W as unwrap, j as jsString, w as childEntries, x as analyzeModule, z as memberParts } from "./migrate-D7TNl6SD.js";
6
- import { t as ModuleBuilder } from "./rewrite-hAcRJwiZ.js";
1
+ import { n as isDiagnosticError } from "./diagnostics-LgIWyeSp.js";
2
+ import { C as langFromId, w as parseModule } from "./sources-DNVbYsgs.js";
3
+ import { b as printICU, t as pluralCategories } from "./validate-CgzaDdOY.js";
4
+ import { o as errorMessage } from "./output-D5tAt8q4.js";
5
+ import { A as isNode, B as objectProperties, C as attributeString, D as inJsxChildren, E as identifierName, F as jsxNameNodes, H as templateKeyPattern, I as keyName, M as jsxAttributes, N as jsxChildren, P as jsxName, S as attributeExpression, T as cleanJsxText, V as stringValue, W as unwrap, j as jsString, w as childEntries, x as analyzeModule, z as memberParts } from "./migrate-ChDGhlC-.js";
6
+ import { t as ModuleBuilder } from "./rewrite-BwzXoBiA.js";
7
7
  import { extname } from "node:path";
8
8
  import { createHash } from "node:crypto";
9
9
  import { readFileSync } from "node:fs";
@@ -0,0 +1 @@
1
+ export { n as createI18nextAdapter } from "./i18next-COO6o0tX.js";
@@ -1,9 +1,9 @@
1
- import { t as applyImport } from "./apply-FAHl1R6T.js";
2
- import { t as readImport } from "./formats-ChV1LVH_.js";
3
- import { i as rootRelative, o as errorMessage, r as plural } from "./output-CF9uvk_-.js";
4
- import { n as sourceContext, t as applyToCatalog } from "./exchange-DYG9RZoT.js";
5
- import { f as readErrors, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-DSzWKU3C.js";
6
- import { r as EXIT } from "./types-Ds_vebja.js";
1
+ import { t as applyImport } from "./apply-Bg-3rB2m.js";
2
+ import { t as readImport } from "./formats-BaryZ2N7.js";
3
+ import { i as rootRelative, o as errorMessage, r as plural } from "./output-D5tAt8q4.js";
4
+ import { n as sourceContext, t as applyToCatalog } from "./exchange-DjwlrTQ9.js";
5
+ import { f as readErrors, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-B5KIO0q-.js";
6
+ import { r as EXIT } from "./types-xR2exI3L.js";
7
7
  import { basename, extname, resolve } from "node:path";
8
8
  import { readFile } from "node:fs/promises";
9
9
  // src/cli/commands/import.ts
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Locale, D as ValuesOf, E as RichValuesOf, S as LibraryMessages, T as RichPartsValuesOf, _ as TagHandler, a as Message, b as Values, c as MissingHandler, d as RichHtmlFunction, f as RichPart, g as TFunction, i as HtmlTagHandler, l as MissingInfo, n as Descriptor, o as MessageKey, p as RichPartsFunction, r as Fmt, s as MessageRef, t as DateInput, u as RichFunction, v as TemporalInput, w as Register, x as DefaultTags, y as Translator } from "./types-BaG1LboH.js";
1
+ import { C as Locale, D as ValuesOf, E as RichValuesOf, S as LibraryMessages, T as RichPartsValuesOf, _ as TagHandler, a as Message, b as Values, c as MissingHandler, d as RichHtmlFunction, f as RichPart, g as TFunction, i as HtmlTagHandler, l as MissingInfo, n as Descriptor, o as MessageKey, p as RichPartsFunction, r as Fmt, s as MessageRef, t as DateInput, u as RichFunction, v as TemporalInput, w as Register, x as DefaultTags, y as Translator } from "./types-B4wNX6PA.js";
2
2
  export declare const t: TFunction;
3
3
  /**
4
4
  * Declares a message without rendering it; the build turns the call into its
@@ -1,13 +1,13 @@
1
- import { n as isDiagnosticError, r as CONFIG_FILE } from "./diagnostics-1onDF6Ua.js";
2
- import { C as emptyCatalog, o as catalogLayout, p as serializeCatalog, s as catalogPath } from "./library-BfSOBeBd.js";
3
- import { i as resolveConfig, n as isWorkspaceRoot, r as loadConfig } from "./load-BFLLqY8x.js";
4
- import { m as idScheme, u as toPosix } from "./validate-zv4-IZyZ.js";
5
- import { t as VERSION } from "./version-BFs370Ce.js";
6
- import { a as writeGenFile, r as GEN_FILE } from "./sync-CpL0Qsgw.js";
1
+ import { n as isDiagnosticError, r as CONFIG_FILE } from "./diagnostics-LgIWyeSp.js";
2
+ import { C as emptyCatalog, o as catalogLayout, p as serializeCatalog, s as catalogPath } from "./library-tp_xqzSY.js";
3
+ import { i as resolveConfig, n as isWorkspaceRoot, r as loadConfig } from "./load-BSIeGJ5v.js";
4
+ import { d as toPosix, h as idScheme } from "./validate-CgzaDdOY.js";
5
+ import { t as VERSION } from "./version-DC-J5WvV.js";
6
+ import { a as writeGenFile, r as GEN_FILE } from "./sync-BNIAwMhR.js";
7
7
  import { r as writeFileAtomic, t as findViteConfig } from "./fs-ezCMZeDV.js";
8
- import { g as usageError, t as CliExit } from "./project-DSzWKU3C.js";
9
- import { r as EXIT } from "./types-Ds_vebja.js";
10
- import { C as langFromId, i as stripJsonc, w as parseModule, x as unwrap } from "./sources-DuOdM02f.js";
8
+ import { g as usageError, t as CliExit } from "./project-B5KIO0q-.js";
9
+ import { r as EXIT } from "./types-xR2exI3L.js";
10
+ import { C as langFromId, i as stripJsonc, w as parseModule, x as unwrap } from "./sources-DNVbYsgs.js";
11
11
  import { createRequire } from "node:module";
12
12
  import { basename, dirname, extname, isAbsolute, join, relative, resolve } from "node:path";
13
13
  import { existsSync, readFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
- import { n as isDiagnosticError, t as diagnosticError } from "./diagnostics-1onDF6Ua.js";
2
- import { c as mapLimit, h as isManualId, i as MISSING, l as modulePath, o as hasExtension, p as tryCanonicalize, r as validateTranslation, s as isMissing$1, u as toPosix } from "./validate-zv4-IZyZ.js";
1
+ import { n as isDiagnosticError, t as diagnosticError } from "./diagnostics-LgIWyeSp.js";
2
+ import { a as MISSING, c as isMissing$1, d as toPosix, g as isManualId, l as mapLimit, m as tryCanonicalize, r as validateTranslation, s as hasExtension, u as modulePath } from "./validate-CgzaDdOY.js";
3
3
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
4
4
  import { hash, randomBytes } from "node:crypto";
5
5
  import { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
@@ -1,11 +1,11 @@
1
- import { g as parsePo } from "./library-BfSOBeBd.js";
2
- import { n as isDiagnosticError } from "./diagnostics-1onDF6Ua.js";
3
- import { s as decodeEntities } from "./worker-BjzVqJVO.js";
4
- import { C as langFromId, w as parseModule } from "./sources-DuOdM02f.js";
5
- import { y as printICU } from "./validate-zv4-IZyZ.js";
6
- import { _ as linguiId, c as newNaming, d as richCall, f as selfClosingTags, l as reactTypes, o as elementHandler, p as siteHandlers, s as entry, t as MODULE_EXTENSIONS, u as renameTags, v as parseJson } from "./i18next-D66Icz3L.js";
7
- import { B as objectProperties, C as attributeString, D as inJsxChildren, E as identifierName, F as jsxNameNodes, I as keyName, M as jsxAttributes, P as jsxName, S as attributeExpression, V as stringValue, W as unwrap, w as childEntries, x as analyzeModule, z as memberParts } from "./migrate-D7TNl6SD.js";
8
- import { t as ModuleBuilder } from "./rewrite-hAcRJwiZ.js";
1
+ import { g as parsePo } from "./library-tp_xqzSY.js";
2
+ import { n as isDiagnosticError } from "./diagnostics-LgIWyeSp.js";
3
+ import { s as decodeEntities } from "./worker-zlhNj4y3.js";
4
+ import { C as langFromId, w as parseModule } from "./sources-DNVbYsgs.js";
5
+ import { b as printICU } from "./validate-CgzaDdOY.js";
6
+ import { _ as linguiId, c as newNaming, d as richCall, f as selfClosingTags, l as reactTypes, o as elementHandler, p as siteHandlers, s as entry, t as MODULE_EXTENSIONS, u as renameTags, v as parseJson } from "./i18next-COO6o0tX.js";
7
+ import { B as objectProperties, C as attributeString, D as inJsxChildren, E as identifierName, F as jsxNameNodes, I as keyName, M as jsxAttributes, P as jsxName, S as attributeExpression, V as stringValue, W as unwrap, w as childEntries, x as analyzeModule, z as memberParts } from "./migrate-ChDGhlC-.js";
8
+ import { t as ModuleBuilder } from "./rewrite-BwzXoBiA.js";
9
9
  import { extname } from "node:path";
10
10
  import { readFileSync } from "node:fs";
11
11
  // src/cli/commands/migrate/lingui.ts
package/dist/lint.js CHANGED
@@ -1,8 +1,8 @@
1
- import { t as VERSION } from "./version-BFs370Ce.js";
2
- import { a as DEFAULT_IMPORT_SOURCES } from "./diagnostics-1onDF6Ua.js";
3
- import { b as parseICU, f as createCodec, v as normalizeSource, x as quoteStarts } from "./validate-zv4-IZyZ.js";
4
- import { C as langFromId, E as lineStartsOf, a as scanModule, l as findMarkers, r as sourceSpecifiers, u as isIgnored } from "./sources-DuOdM02f.js";
5
- import { t as findCapturedValues } from "./captured-CTjjDF5o.js";
1
+ import { t as VERSION } from "./version-DC-J5WvV.js";
2
+ import { a as DEFAULT_IMPORT_SOURCES } from "./diagnostics-LgIWyeSp.js";
3
+ import { S as quoteStarts, p as createCodec, x as parseICU, y as normalizeSource } from "./validate-CgzaDdOY.js";
4
+ import { C as langFromId, E as lineStartsOf, a as scanModule, l as findMarkers, r as sourceSpecifiers, u as isIgnored } from "./sources-DNVbYsgs.js";
5
+ import { t as findCapturedValues } from "./captured-DfLk50Ji.js";
6
6
  import { extname } from "node:path";
7
7
  // src/lint/analysis.ts
8
8
  /**
@@ -83,7 +83,8 @@ function sourceConfig(settings) {
83
83
  aliases: settings.aliases,
84
84
  globals: settings.globals,
85
85
  keep: [],
86
- dependencies: []
86
+ dependencies: [],
87
+ repeatedText: false
87
88
  }
88
89
  };
89
90
  sourceConfigs.set(settings, config);
@@ -1,7 +1,7 @@
1
- import { a as DEFAULT_IMPORT_SOURCES, i as DEFAULT_CONFIG, o as ID_LENGTH, r as CONFIG_FILE, s as PSEUDO_LOCALES, t as diagnosticError } from "./diagnostics-1onDF6Ua.js";
2
- import { u as toPosix } from "./validate-zv4-IZyZ.js";
3
- import { P as displayPath } from "./library-BfSOBeBd.js";
4
- import { t as excludeKind } from "./exclude-vMnm3lqU.js";
1
+ import { a as DEFAULT_IMPORT_SOURCES, i as DEFAULT_CONFIG, o as ID_LENGTH, r as CONFIG_FILE, s as PSEUDO_LOCALES, t as diagnosticError } from "./diagnostics-LgIWyeSp.js";
2
+ import { d as toPosix } from "./validate-CgzaDdOY.js";
3
+ import { P as displayPath } from "./library-tp_xqzSY.js";
4
+ import { t as excludeKind } from "./exclude-BFETmvde.js";
5
5
  import { basename, dirname, join, resolve } from "node:path";
6
6
  import { readFile, stat } from "node:fs/promises";
7
7
  import { pathToFileURL } from "node:url";
@@ -138,7 +138,8 @@ const configSchema = z.strictObject({
138
138
  aliases: z.array(text).optional(),
139
139
  globals: z.array(text).optional(),
140
140
  keep: z.array(text).optional(),
141
- dependencies: z.array(z.string().regex(/^(?:@[a-z0-9][\w.~-]*\/)?[a-z0-9][\w.~-]*$/, { error: "must be a package name, like \"@acme/ui\"" })).refine((names) => new Set(names).size === names.length, { error: "lists a package twice" }).optional()
141
+ dependencies: z.array(z.string().regex(/^(?:@[a-z0-9][\w.~-]*\/)?[a-z0-9][\w.~-]*$/, { error: "must be a package name, like \"@acme/ui\"" })).refine((names) => new Set(names).size === names.length, { error: "lists a package twice" }).optional(),
142
+ repeatedText: z.union([z.literal(false), intIn(2, 1e3)]).optional()
142
143
  }).optional(),
143
144
  ids: z.strictObject({ length: intIn(ID_LENGTH.min, ID_LENGTH.max).optional() }).optional(),
144
145
  catalogs: z.strictObject({
@@ -736,7 +737,8 @@ function resolveExtraction(given) {
736
737
  aliases: [...user.aliases ?? d.aliases],
737
738
  globals: [...user.globals ?? d.globals],
738
739
  keep: [...user.keep ?? d.keep],
739
- dependencies: [...user.dependencies ?? d.dependencies]
740
+ dependencies: [...user.dependencies ?? d.dependencies],
741
+ repeatedText: user.repeatedText ?? d.repeatedText
740
742
  };
741
743
  }
742
744
  function resolveCatalogs(given, root) {
@@ -1,4 +1,4 @@
1
- import { a as ID_LENGTH, i as DEFAULT_IMPORT_SOURCES, n as CONFIG_FILE, o as PSEUDO_LOCALES, r as DEFAULT_CONFIG, t as pseudoLocalize } from "./pseudo-DNbNNVGP.js";
1
+ import { a as ID_LENGTH, i as DEFAULT_IMPORT_SOURCES, n as CONFIG_FILE, o as PSEUDO_LOCALES, r as DEFAULT_CONFIG, t as pseudoLocalize } from "./pseudo-B2DUpoLu.js";
2
2
  import { a as printICU, d as diagnosticError, f as isDiagnosticError, i as normalizeSource, r as isPlainText, s as parseSource, t as compileMessage } from "./compile-DqkofbiO.js";
3
3
  import { n as validateTranslation } from "./validate-PGgMsasz.js";
4
4
  import { hash } from "node:crypto";
@@ -2338,7 +2338,8 @@ const configSchema = z.strictObject({
2338
2338
  aliases: z.array(text).optional(),
2339
2339
  globals: z.array(text).optional(),
2340
2340
  keep: z.array(text).optional(),
2341
- dependencies: z.array(z.string().regex(/^(?:@[a-z0-9][\w.~-]*\/)?[a-z0-9][\w.~-]*$/, { error: "must be a package name, like \"@acme/ui\"" })).refine((names) => new Set(names).size === names.length, { error: "lists a package twice" }).optional()
2341
+ dependencies: z.array(z.string().regex(/^(?:@[a-z0-9][\w.~-]*\/)?[a-z0-9][\w.~-]*$/, { error: "must be a package name, like \"@acme/ui\"" })).refine((names) => new Set(names).size === names.length, { error: "lists a package twice" }).optional(),
2342
+ repeatedText: z.union([z.literal(false), intIn(2, 1e3)]).optional()
2342
2343
  }).optional(),
2343
2344
  ids: z.strictObject({ length: intIn(ID_LENGTH.min, ID_LENGTH.max).optional() }).optional(),
2344
2345
  catalogs: z.strictObject({
@@ -2871,7 +2872,8 @@ function resolveExtraction(given) {
2871
2872
  aliases: [...user.aliases ?? d.aliases],
2872
2873
  globals: [...user.globals ?? d.globals],
2873
2874
  keep: [...user.keep ?? d.keep],
2874
- dependencies: [...user.dependencies ?? d.dependencies]
2875
+ dependencies: [...user.dependencies ?? d.dependencies],
2876
+ repeatedText: user.repeatedText ?? d.repeatedText
2875
2877
  };
2876
2878
  }
2877
2879
  function resolveCatalogs(given, root) {
@@ -1,7 +1,7 @@
1
- import { n as isDiagnosticError, s as PSEUDO_LOCALES } from "./diagnostics-1onDF6Ua.js";
2
- import { _ as parseIdScheme, h as isManualId } from "./validate-zv4-IZyZ.js";
3
- import { A as usableTranslation, E as entryKey, P as displayPath, T as entryCanonical, m as severityOf, o as catalogLayout } from "./library-BfSOBeBd.js";
4
- import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-CsUXRX2J.js";
1
+ import { n as isDiagnosticError, s as PSEUDO_LOCALES } from "./diagnostics-LgIWyeSp.js";
2
+ import { g as isManualId, v as parseIdScheme } from "./validate-CgzaDdOY.js";
3
+ import { A as usableTranslation, E as entryKey, P as displayPath, T as entryCanonical, m as severityOf, o as catalogLayout } from "./library-tp_xqzSY.js";
4
+ import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-8cudcHNj.js";
5
5
  import { hash } from "node:crypto";
6
6
  // src/core/compile/hash8.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { r as EXIT } from "./types-Ds_vebja.js";
1
+ import { r as EXIT } from "./types-xR2exI3L.js";
2
2
  import { t as protocolConsole } from "./stdio-FWIVU3P4.js";
3
3
  // src/cli/commands/lsp.ts
4
4
  /**
@@ -10,7 +10,7 @@ import { t as protocolConsole } from "./stdio-FWIVU3P4.js";
10
10
  async function lsp(ctx, _flags) {
11
11
  const streams = ctx.io.streams;
12
12
  if (streams === void 0) throw new Error("vi18n lsp needs the process's stdin and stdout");
13
- const { startLanguageServer } = await import("./server-WlxZH0oX.js");
13
+ const { startLanguageServer } = await import("./server-DJRpUQVZ.js");
14
14
  const restore = protocolConsole(streams.output);
15
15
  try {
16
16
  return {
@@ -1,10 +1,10 @@
1
1
  import { t as protocolConsole } from "./stdio-FWIVU3P4.js";
2
- import { r as EXIT } from "./types-Ds_vebja.js";
2
+ import { r as EXIT } from "./types-xR2exI3L.js";
3
3
  // src/cli/commands/mcp.ts
4
4
  async function mcp(ctx, _flags) {
5
5
  const streams = ctx.io.streams;
6
6
  if (streams === void 0) throw new Error("vi18n mcp needs the process's stdin and stdout");
7
- const { serveMcp } = await import("./server-ceuzzkal.js");
7
+ const { serveMcp } = await import("./server-Br8tAuG2.js");
8
8
  const restore = protocolConsole(streams.output);
9
9
  try {
10
10
  await serveMcp({
@@ -1,9 +1,9 @@
1
- import { D as flagKey, O as stricterLimit, d as parseCatalogBytes, o as catalogLayout, p as serializeCatalog, v as STATE_RANK, y as catalogIdentity } from "./library-BfSOBeBd.js";
2
- import { r as loadConfig } from "./load-BFLLqY8x.js";
3
- import { n as isDiagnosticError } from "./diagnostics-1onDF6Ua.js";
4
- import { t as VERSION } from "./version-BFs370Ce.js";
5
- import { o as errorMessage, r as plural } from "./output-CF9uvk_-.js";
6
- import { r as EXIT } from "./types-Ds_vebja.js";
1
+ import { D as flagKey, O as stricterLimit, d as parseCatalogBytes, o as catalogLayout, p as serializeCatalog, v as STATE_RANK, y as catalogIdentity } from "./library-tp_xqzSY.js";
2
+ import { r as loadConfig } from "./load-BSIeGJ5v.js";
3
+ import { n as isDiagnosticError } from "./diagnostics-LgIWyeSp.js";
4
+ import { t as VERSION } from "./version-DC-J5WvV.js";
5
+ import { o as errorMessage, r as plural } from "./output-D5tAt8q4.js";
6
+ import { r as EXIT } from "./types-xR2exI3L.js";
7
7
  import { dirname, resolve } from "node:path";
8
8
  import { readFile, writeFile } from "node:fs/promises";
9
9
  import { promisify } from "node:util";
@@ -0,0 +1 @@
1
+ export { c as migrate } from "./migrate-ChDGhlC-.js";
@@ -1,14 +1,14 @@
1
- import { E as entryKey, F as isIncluded, I as listProjectFiles, M as sourceMatches, h as updateCatalogFile, p as serializeCatalog, s as catalogPath } from "./library-BfSOBeBd.js";
2
- import { n as isDiagnosticError } from "./diagnostics-1onDF6Ua.js";
3
- import { C as langFromId, w as parseModule } from "./sources-DuOdM02f.js";
4
- import { g as isValidManualId, r as validateTranslation, y as printICU } from "./validate-zv4-IZyZ.js";
5
- import { t as syncCatalog } from "./sync-CpL0Qsgw.js";
6
- import { t as VERSION } from "./version-BFs370Ce.js";
7
- import { i as rootRelative, o as errorMessage, r as plural } from "./output-CF9uvk_-.js";
1
+ import { E as entryKey, F as isIncluded, I as listProjectFiles, M as sourceMatches, h as updateCatalogFile, p as serializeCatalog, s as catalogPath } from "./library-tp_xqzSY.js";
2
+ import { n as isDiagnosticError } from "./diagnostics-LgIWyeSp.js";
3
+ import { C as langFromId, w as parseModule } from "./sources-DNVbYsgs.js";
4
+ import { _ as isValidManualId, b as printICU, r as validateTranslation } from "./validate-CgzaDdOY.js";
5
+ import { t as syncCatalog } from "./sync-BNIAwMhR.js";
6
+ import { t as VERSION } from "./version-DC-J5WvV.js";
7
+ import { i as rootRelative, o as errorMessage, r as plural } from "./output-D5tAt8q4.js";
8
8
  import { r as writeFileAtomic } from "./fs-ezCMZeDV.js";
9
- import { a as hasErrors, g as usageError, o as loadCatalogs, r as compareText, s as loadProject } from "./project-DSzWKU3C.js";
10
- import { s as decodeEntities } from "./worker-BjzVqJVO.js";
11
- import { r as EXIT } from "./types-Ds_vebja.js";
9
+ import { a as hasErrors, g as usageError, o as loadCatalogs, r as compareText, s as loadProject } from "./project-B5KIO0q-.js";
10
+ import { s as decodeEntities } from "./worker-zlhNj4y3.js";
11
+ import { r as EXIT } from "./types-xR2exI3L.js";
12
12
  import { basename, dirname, extname, join, resolve } from "node:path";
13
13
  import { readFile } from "node:fs/promises";
14
14
  // src/cli/commands/migrate/js.ts
@@ -1668,7 +1668,7 @@ function positionOf(text, offset) {
1668
1668
  }
1669
1669
  async function migrate(ctx, flags) {
1670
1670
  if (flags.from !== "saas-i18n") {
1671
- const { migrateLibrary } = await import("./engine-Bf7nVigL.js");
1671
+ const { migrateLibrary } = await import("./engine-ecRD8-IE.js");
1672
1672
  return migrateLibrary(ctx, {
1673
1673
  ...flags,
1674
1674
  from: flags.from
@@ -1,4 +1,4 @@
1
- import { t as diagnosticError } from "./diagnostics-1onDF6Ua.js";
1
+ import { t as diagnosticError } from "./diagnostics-LgIWyeSp.js";
2
2
  /** Longest wait between retries, whatever the server asks for. */
3
3
  const MAX_DELAY_MS = 6e4;
4
4
  /** Error bodies are quoted in messages; past this they are noise. */
@@ -1,6 +1,6 @@
1
- import { u as toPosix } from "./validate-zv4-IZyZ.js";
2
- import "./library-BfSOBeBd.js";
3
- import { t as VERSION } from "./version-BFs370Ce.js";
1
+ import { d as toPosix } from "./validate-CgzaDdOY.js";
2
+ import "./library-tp_xqzSY.js";
3
+ import { t as VERSION } from "./version-DC-J5WvV.js";
4
4
  import { dirname, isAbsolute, join, relative, resolve } from "node:path";
5
5
  import { existsSync } from "node:fs";
6
6
  // src/cli/errors.ts
package/dist/parse.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as Message, b as Values, s as MessageRef } from "./types-BaG1LboH.js";
1
+ import { a as Message, b as Values, s as MessageRef } from "./types-B4wNX6PA.js";
2
2
  interface ParseOptions {
3
3
  /**
4
4
  * `"auto"` (default): ICU MessageFormat, or MessageFormat 2 when the text