@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.
- package/README.md +19 -0
- package/dist/{apply-FAHl1R6T.js → apply-Bg-3rB2m.js} +4 -4
- package/dist/{captured-CTjjDF5o.js → captured-DfLk50Ji.js} +1 -1
- package/dist/{check-DwFwOB1d.js → check-CunekuYs.js} +16 -7
- package/dist/cli.js +1 -1
- package/dist/{collisions-uMTuq36M.js → collisions-CDSdtLQm.js} +2 -2
- package/dist/{compile-CEvH-6sY.js → compile-hva0qjhZ.js} +6 -6
- package/dist/config.d.ts +1 -1
- package/dist/config.js +2 -2
- package/dist/{diagnostics-1onDF6Ua.js → diagnostics-LgIWyeSp.js} +2 -1
- package/dist/{duplicates-CsUXRX2J.js → duplicates-8cudcHNj.js} +1 -1
- package/dist/{engine-Bf7nVigL.js → engine-ecRD8-IE.js} +11 -11
- package/dist/engine.d.ts +1 -1
- package/dist/{exchange-DYG9RZoT.js → exchange-DjwlrTQ9.js} +3 -3
- package/dist/{exclude-vMnm3lqU.js → exclude-BFETmvde.js} +1 -1
- package/dist/{export-BYq0gfLd.js → export-D2tsqWIr.js} +6 -6
- package/dist/{extract-CYtuEo8u.js → extract-BxYchVmY.js} +7 -7
- package/dist/{formats-ChV1LVH_.js → formats-BaryZ2N7.js} +3 -3
- package/dist/{i18next-D66Icz3L.js → i18next-COO6o0tX.js} +6 -6
- package/dist/i18next-Dr7DCQlQ.js +1 -0
- package/dist/{import-BApbQlmm.js → import-vSC29Cn4.js} +6 -6
- package/dist/index.d.ts +1 -1
- package/dist/{init-J7AwwA5e.js → init-Cc7A-8VX.js} +9 -9
- package/dist/{library-BfSOBeBd.js → library-tp_xqzSY.js} +2 -2
- package/dist/{lingui-Ee2farVo.js → lingui-BnnlqGXT.js} +8 -8
- package/dist/lint.js +7 -6
- package/dist/{load-BFLLqY8x.js → load-BSIeGJ5v.js} +8 -6
- package/dist/{load-CMwhukZ4.js → load-SSrAeJVB.js} +5 -3
- package/dist/{locales-DxLDrx-h.js → locales-D0U-yVRm.js} +4 -4
- package/dist/{lsp-BC7xDGON.js → lsp-DvC11pBZ.js} +2 -2
- package/dist/{mcp-Cka8ywDF.js → mcp-D2zzOTBy.js} +2 -2
- package/dist/{merge-driver-B04Apm29.js → merge-driver-BLI8OtAc.js} +6 -6
- package/dist/migrate-1r43OBfe.js +1 -0
- package/dist/{migrate-D7TNl6SD.js → migrate-ChDGhlC-.js} +11 -11
- package/dist/{openai-RWw0YlAx.js → openai-CLn4puY8.js} +1 -1
- package/dist/{output-CF9uvk_-.js → output-D5tAt8q4.js} +3 -3
- package/dist/parse.d.ts +1 -1
- package/dist/{pipeline-sgl_q_op.js → pipeline-BJSkkRYC.js} +7 -7
- package/dist/{pipeline-B30irGMD.js → pipeline-BeCc441z.js} +1 -1
- package/dist/{project-DSzWKU3C.js → project-B5KIO0q-.js} +9 -9
- package/dist/{pseudo-DNbNNVGP.js → pseudo-B2DUpoLu.js} +2 -1
- package/dist/{react-intl-tzGIk6G3.js → react-intl-C8JehBBL.js} +6 -6
- package/dist/rename-ZVGq9ZG1.js +577 -0
- package/dist/repeated-uuI1tUGg.js +85 -0
- package/dist/{restore-BG_zMpSj.js → restore-xlBIrtRt.js} +8 -8
- package/dist/{rewrite-hAcRJwiZ.js → rewrite-BwzXoBiA.js} +1 -1
- package/dist/{run-CFzR3V93.js → run-CQ9pDLSa.js} +50 -23
- package/dist/scan-worker.d.ts +1 -1
- package/dist/scan-worker.js +1 -1
- package/dist/{server-ceuzzkal.js → server-Br8tAuG2.js} +28 -8
- package/dist/{server-WlxZH0oX.js → server-DJRpUQVZ.js} +793 -12
- package/dist/server.d.ts +1 -1
- package/dist/server.js +7 -1
- package/dist/{sitemap-796jJKUT.js → sitemap-CSAkm6oi.js} +4 -4
- package/dist/{sources-DuOdM02f.js → sources-DNVbYsgs.js} +4 -3
- package/dist/{status-CTH3qI-0.js → status-q6M3rBrh.js} +3 -3
- package/dist/{sync-CpL0Qsgw.js → sync-BNIAwMhR.js} +6 -6
- package/dist/test.d.ts +1 -1
- package/dist/test.js +53 -12
- package/dist/{translate-BrfVRkjl.js → translate-BP4iVhOR.js} +6 -6
- package/dist/{types-BaG1LboH.d.ts → types-B4wNX6PA.d.ts} +4 -2
- package/dist/{types-Cy2bPdSg.d.ts → types-_4UdFhR9.d.ts} +10 -1
- package/dist/{types-Ds_vebja.js → types-xR2exI3L.js} +1 -0
- package/dist/{units-VVLgQ7x7.js → units-DPPfCN7j.js} +3 -3
- package/dist/{validate-zv4-IZyZ.js → validate-CgzaDdOY.js} +2 -2
- package/dist/{version-BFs370Ce.js → version-DC-J5WvV.js} +2 -2
- package/dist/{vite-scan-DFKSGVE9.js → vite-scan-kM8Ta3rO.js} +6 -6
- package/dist/vite.d.ts +1 -1
- package/dist/vite.js +20 -16
- package/dist/{vue-i18n-CBmZqHbG.js → vue-i18n-_uIXlFVh.js} +6 -6
- package/dist/{which-BpyJyBkX.js → which-DFWk_KwN.js} +8 -8
- package/dist/{worker-BjzVqJVO.js → worker-zlhNj4y3.js} +4 -4
- package/package.json +1 -1
- package/dist/i18next-1waHziMy.js +0 -1
- 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-
|
|
2
|
-
import { E as entryKey, j as withSubject, k as translationErrors } from "./library-
|
|
3
|
-
import {
|
|
4
|
-
import { r as entrySource } from "./units-
|
|
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 {
|
|
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-
|
|
2
|
-
import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { r as
|
|
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
|
-
*
|
|
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
|
-
import { r as resolveDuplicates } from "./duplicates-
|
|
2
|
-
import { E as entryKey, T as entryCanonical, b as compareText } from "./library-
|
|
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-
|
|
2
|
-
import { c as assetCatalogsModule, l as serverCatalogVersion, o as serverCatalogJson, s as SERVER_FILES, t as compileLocales, u as serverCatalogsDir } from "./locales-
|
|
3
|
-
import { c as toRuntimeConfig } from "./load-
|
|
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-
|
|
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-
|
|
7
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
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-
|
|
3
|
-
import { n as openaiCompatible } from "./openai-
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as flagKey, E as entryKey, O as stricterLimit, S as defineFields, v as STATE_RANK } from "./library-
|
|
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-
|
|
2
|
-
import { F as isIncluded, I as listProjectFiles } from "./library-
|
|
3
|
-
import { i as rootRelative, o as errorMessage, r as plural } from "./output-
|
|
4
|
-
import { g as usageError, r as compareText, s as loadProject } from "./project-
|
|
5
|
-
import "./types-
|
|
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-
|
|
7
|
-
import { n as RUNTIME_MODULE, r as renderPlan } from "./rewrite-
|
|
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-
|
|
222
|
-
case "react-intl": return (await import("./react-intl-
|
|
223
|
-
case "lingui": return (await import("./lingui-
|
|
224
|
-
case "vue-i18n": return (await import("./vue-i18n-
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { h as updateCatalogFile } from "./library-
|
|
2
|
-
import { s as sourceIndexOf } from "./units-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
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,9 +1,9 @@
|
|
|
1
|
-
import { n as serializeExport } from "./formats-
|
|
2
|
-
import { a as exchangeUnits, n as EXTENSIONS } from "./units-
|
|
3
|
-
import { n as sourceContext } from "./exchange-
|
|
4
|
-
import { r as plural } from "./output-
|
|
5
|
-
import { f as readErrors, g as usageError, h as targetLocales, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-
|
|
6
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
2
|
-
import { F as isIncluded, h as updateCatalogFile, n as libraryCoverage, s as catalogPath } from "./library-
|
|
3
|
-
import { a as writeGenFile, n as syncCatalogs, s as scanProject, t as syncCatalog } from "./sync-
|
|
4
|
-
import { t as VERSION } from "./version-
|
|
5
|
-
import { a as table, i as rootRelative, o as errorMessage, r as plural } from "./output-
|
|
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-
|
|
7
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
2
|
-
import { t as VERSION } from "./version-
|
|
3
|
-
import { i as exchangeKey, o as parseExchangeKey } from "./units-
|
|
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-
|
|
2
|
-
import { C as langFromId, w as parseModule } from "./sources-
|
|
3
|
-
import {
|
|
4
|
-
import { o as errorMessage } from "./output-
|
|
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-
|
|
6
|
-
import { t as ModuleBuilder } from "./rewrite-
|
|
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-
|
|
2
|
-
import { t as readImport } from "./formats-
|
|
3
|
-
import { i as rootRelative, o as errorMessage, r as plural } from "./output-
|
|
4
|
-
import { n as sourceContext, t as applyToCatalog } from "./exchange-
|
|
5
|
-
import { f as readErrors, o as loadCatalogs, s as loadProject, t as CliExit } from "./project-
|
|
6
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
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-
|
|
2
|
-
import { C as emptyCatalog, o as catalogLayout, p as serializeCatalog, s as catalogPath } from "./library-
|
|
3
|
-
import { i as resolveConfig, n as isWorkspaceRoot, r as loadConfig } from "./load-
|
|
4
|
-
import {
|
|
5
|
-
import { t as VERSION } from "./version-
|
|
6
|
-
import { a as writeGenFile, r as GEN_FILE } from "./sync-
|
|
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-
|
|
9
|
-
import { r as EXIT } from "./types-
|
|
10
|
-
import { C as langFromId, i as stripJsonc, w as parseModule, x as unwrap } from "./sources-
|
|
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-
|
|
2
|
-
import {
|
|
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-
|
|
2
|
-
import { n as isDiagnosticError } from "./diagnostics-
|
|
3
|
-
import { s as decodeEntities } from "./worker-
|
|
4
|
-
import { C as langFromId, w as parseModule } from "./sources-
|
|
5
|
-
import {
|
|
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-
|
|
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-
|
|
8
|
-
import { t as ModuleBuilder } from "./rewrite-
|
|
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-
|
|
2
|
-
import { a as DEFAULT_IMPORT_SOURCES } from "./diagnostics-
|
|
3
|
-
import {
|
|
4
|
-
import { C as langFromId, E as lineStartsOf, a as scanModule, l as findMarkers, r as sourceSpecifiers, u as isIgnored } from "./sources-
|
|
5
|
-
import { t as findCapturedValues } from "./captured-
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { P as displayPath } from "./library-
|
|
4
|
-
import { t as excludeKind } from "./exclude-
|
|
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-
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { A as usableTranslation, E as entryKey, P as displayPath, T as entryCanonical, m as severityOf, o as catalogLayout } from "./library-
|
|
4
|
-
import { r as resolveDuplicates, t as duplicateDiagnostics } from "./duplicates-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
2
|
-
import { r as loadConfig } from "./load-
|
|
3
|
-
import { n as isDiagnosticError } from "./diagnostics-
|
|
4
|
-
import { t as VERSION } from "./version-
|
|
5
|
-
import { o as errorMessage, r as plural } from "./output-
|
|
6
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
2
|
-
import { n as isDiagnosticError } from "./diagnostics-
|
|
3
|
-
import { C as langFromId, w as parseModule } from "./sources-
|
|
4
|
-
import {
|
|
5
|
-
import { t as syncCatalog } from "./sync-
|
|
6
|
-
import { t as VERSION } from "./version-
|
|
7
|
-
import { i as rootRelative, o as errorMessage, r as plural } from "./output-
|
|
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-
|
|
10
|
-
import { s as decodeEntities } from "./worker-
|
|
11
|
-
import { r as EXIT } from "./types-
|
|
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-
|
|
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-
|
|
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 {
|
|
2
|
-
import "./library-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
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-
|
|
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
|