@verbaly/compiler 0.80.0 → 0.82.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 +20 -18
- package/dist/{claude-DelQkcx5.js → claude-D31sQLmS.js} +3 -2
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +78 -41
- package/dist/index.js +2 -2
- package/dist/{run-DTmm0EUF.js → run-We8xWd57.js} +1170 -812
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -42,6 +42,8 @@ npx verbaly render # pre-fill data-verbaly HTML per locale (SSG, kills t
|
|
|
42
42
|
|
|
43
43
|
Reads `verbaly.config.{js,mjs,ts,mts,json}` (a TypeScript config is read as written, including imports without an extension, and needs nothing installed for it). Generates `locales/<locale>.json` (portable JSON, flat or nested, whichever the file already is) and the TypeScript types of your messages, [where your framework looks for them](#-typed-keys-and-where-the-types-live).
|
|
44
44
|
|
|
45
|
+
`--locales es,pt` narrows a command to those languages. It picks among the ones the project has: a language it does not have is an error that lists them and says how to start a new one, so a typo never reads as a language with nothing to do.
|
|
46
|
+
|
|
45
47
|
## 🚦 The gate: `check` in CI, a report in every build
|
|
46
48
|
|
|
47
49
|
`verbaly check` is the only command that exits 1. Run it in CI: it is the strict gate, and it asks four questions.
|
|
@@ -160,9 +162,9 @@ In CI, write the types before you check them, since a fresh clone has none: `npx
|
|
|
160
162
|
|
|
161
163
|
## 🚚 Coming from i18next
|
|
162
164
|
|
|
163
|
-
`npx verbaly init` keeps the catalogs a project already has: it points the config at `src/locales`, or wherever they are, instead of starting a second set, and its next steps name `migrate` when your dependencies have i18next. `npx verbaly migrate` reports what it would change in those catalogs, and `--write` applies it: `{{name}}` becomes `{name}`, and a brace i18next showed as text is doubled, so it stays text. A format, an unescape or a nesting is left to you, each with its reason. `verbaly.lock` remembers which languages were converted, so a later run, like `--plurals` to merge `_one` and `_other` into one message, never reads them as i18next again.
|
|
165
|
+
`npx verbaly init` keeps the catalogs a project already has: it points the config at `src/locales`, or wherever they are, instead of starting a second set, and its next steps name `migrate` when your dependencies have i18next. `npx verbaly migrate` reports what it would change in those catalogs, and `--write` applies it: `{{name}}` becomes `{name}`, and a brace i18next showed as text is doubled, so it stays text. A format, an unescape or a nesting is left to you, each with its reason, and every run lists the ones still waiting. `verbaly.lock` remembers which languages were converted, so a later run, like `--plurals` to merge `_one` and `_other` into one message, never reads them as i18next again.
|
|
164
166
|
|
|
165
|
-
While i18next still serves some screens, give it `interpolation: { prefix: '{', suffix: '}' }` and both libraries read the converted files.
|
|
167
|
+
While i18next still serves some screens, give it `interpolation: { prefix: '{', suffix: '}' }` and both libraries read the converted files. A `t` or a `Trans` a component still takes from react-i18next, next-i18next, next-translate, ttag or Lingui is left exactly as written, so you can move one component at a time.
|
|
166
168
|
|
|
167
169
|
## 🤖 Machine translation
|
|
168
170
|
|
|
@@ -266,7 +268,7 @@ npx verbaly export --format po # gettext PO (msgctxt = key, works with an
|
|
|
266
268
|
npx verbaly import verbaly-export/es.xlf # fill the catalog back
|
|
267
269
|
```
|
|
268
270
|
|
|
269
|
-
`export` writes one file per target locale with the source text alongside the current translation (`--missing` exports only the untranslated entries). Every entry carries **where the text lives in your source** (XLIFF `location` notes, a `location` column in CSV, `#:` comments in PO), so translators and TMS tools see the context instead of guessing it. In XLIFF, `{params}` and rich tags travel as **protected inline codes with semantic ids** (`<ph id="name"/>`, `<pc id="em">`), so TMS editors show them as untouchable chips instead of editable raw syntax. `import` reads XLIFF 2.0/1.2, CSV or PO back (PO entries flagged `fuzzy` count as untranslated) and **validates every entry like `translate` does**: a translation that drops a `{param}`, a variant block or an `<em>` tag is rejected and reported, so a translator's typo can't break your UI. Existing translations are kept unless `--overwrite`; `--dry-run` previews everything.
|
|
271
|
+
`export` writes one file per target locale with the source text alongside the current translation (`--missing` exports only the untranslated entries). Every entry carries **where the text lives in your source** (XLIFF `location` notes, a `location` column in CSV, `#:` comments in PO), so translators and TMS tools see the context instead of guessing it. In XLIFF, `{params}` and rich tags travel as **protected inline codes with semantic ids** (`<ph id="name"/>`, `<pc id="em">`), so TMS editors show them as untouchable chips instead of editable raw syntax. `import` reads XLIFF 2.0/1.2, CSV or PO back (PO entries flagged `fuzzy` count as untranslated, and a CSV a spreadsheet saved with semicolons or tabs reads like one with commas) and **validates every entry like `translate` does**: a translation that drops a `{param}`, a variant block or an `<em>` tag is rejected and reported, so a translator's typo can't break your UI. Existing translations are kept unless `--overwrite`; `--dry-run` previews everything.
|
|
270
272
|
|
|
271
273
|
A file names its language the way its tool writes it, so `import` reads that name as one of your locales: gettext's `pt_BR` (or a `PT-br`) fills the `pt-BR` you have. A file for a new language starts its catalog, under the tag's proper spelling, unless your config lists its `locales`: then a language outside that list is skipped with a warning and exit code 1, because the app would never load it. Add the locale to the list first, or pass `--locale`.
|
|
272
274
|
|
|
@@ -351,21 +353,21 @@ The package exports two layers, and **nothing else is public**. Anything you can
|
|
|
351
353
|
|
|
352
354
|
**Building an integration.** This is exactly what `@verbaly/vite`, `@verbaly/unplugin`, `@verbaly/next`, `@verbaly/astro`, `@verbaly/nuxt`, `@verbaly/mcp` and `@verbaly/studio` consume, so a third one has everything they have:
|
|
353
355
|
|
|
354
|
-
| Area | Exports
|
|
355
|
-
| ----------------- |
|
|
356
|
-
| Setup | `init` · types `Host` `InitOptions` `InitResult`
|
|
357
|
-
| Config & catalogs | `loadConfig` `resolveConfig` `targetLocales` `loadCatalogs` `readCatalog` `parseCatalog` `writeCatalog` `clientCatalogs` `needsIcu` `needsRelative` · types `Catalog` `Catalogs`
|
|
358
|
-
| Extraction | `syncProject` `extractProject` `collectOrigins` `syncCatalogs` `shippedCatalogs` `pruneCatalogs` `MessageRegistry` `stableKey` `watchTree` · types `SyncProjectResult` `SyncResult` `TreeOptions`
|
|
359
|
-
| Codegen | `generateDts` `writeDts` `generateRuntimeModule` `generateLocaleModule` · types `DtsOptions` `RuntimeModuleOptions`
|
|
360
|
-
| Bundler plumbing | `transformSource` `transformCode` `runBuildGate` `writeBuildTypes` `createSourceFilter` `reportOutsideInclude` `isTransformTarget` `resolveVirtualId` `loadVirtualModule` `APP_ID` `LOCALE_IMPORT` `RESOLVED_VIRTUAL_ID` `LOCALE_MODULE_PREFIX` `SOURCE_FILE_RE` · types `PluginOptions` `TransformResult` |
|
|
361
|
-
| The gate | `check` `validateMessage` `validatePair` `formatCheckResult` `formatCheckWarnings` `collisionEntries` `formatCollision` `formatFinding` `createDevReporter` · types `Finding` `DevReporter` `CheckResult` `MissingEntry` `UnknownEntry` `BrokenEntry` `ExtraEntry` `CollisionEntry` `DivergentEntry` `OutdatedEntry` `SourceSite` `StructureIssue` `IssueSeverity` |
|
|
362
|
-
| Coverage | `status` `formatStatusResult` `counted` · types `StatusResult` `LocaleStatus`
|
|
363
|
-
| Review state | `loadDrafts` `saveDrafts` `markDrafts` `clearDrafts` `effectiveDrafts` `loadState` `readState` `updateState` `recordTranslations` `outdatedTranslations` `STATE_FILE` · types `Drafts` `State` `Fingerprints` `TranslationWrite`
|
|
364
|
-
| Translation | `translateCatalogs` `mergeTranslations` `writeDrafts` `resolveProvider` `formatTranslateFailures` · types `DraftEntry` `WriteDraftsResult`
|
|
365
|
-
| Diagnosis | `doctor` `formatDoctorEntry` `formatDoctorHealth` · types `DoctorResult` `DoctorEntry`
|
|
366
|
-
| Onboarding | `wrapProject` · types `WrapResult` `WrapEntry` `WrapSkip` `WrapBlocked` `WrapOptions`
|
|
367
|
-
| Static rendering | `renderSite` `formatRenderWarnings` · types `RenderSiteOptions` `RenderSiteResult`
|
|
368
|
-
| Error output | `formatCliError`
|
|
356
|
+
| Area | Exports |
|
|
357
|
+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
358
|
+
| Setup | `init` · types `Host` `InitOptions` `InitResult` |
|
|
359
|
+
| Config & catalogs | `loadConfig` `resolveConfig` `targetLocales` `loadCatalogs` `readCatalog` `parseCatalog` `writeCatalog` `clientCatalogs` `needsIcu` `needsRelative` · types `Catalog` `Catalogs` |
|
|
360
|
+
| Extraction | `syncProject` `extractProject` `collectOrigins` `syncCatalogs` `shippedCatalogs` `pruneCatalogs` `MessageRegistry` `stableKey` `watchTree` · types `SyncProjectResult` `SyncResult` `TreeOptions` |
|
|
361
|
+
| Codegen | `generateDts` `writeDts` `generateRuntimeModule` `generateLocaleModule` · types `DtsOptions` `RuntimeModuleOptions` |
|
|
362
|
+
| Bundler plumbing | `transformSource` `transformCode` `runBuildGate` `writeBuildTypes` `createSourceFilter` `reportOutsideInclude` `isTransformTarget` `resolveVirtualId` `loadVirtualModule` `clientModules` `APP_ID` `LOCALE_IMPORT` `RESOLVED_VIRTUAL_ID` `LOCALE_MODULE_PREFIX` `SOURCE_FILE_RE` · types `PluginOptions` `TransformResult` |
|
|
363
|
+
| The gate | `check` `relativeCheck` `validateMessage` `validatePair` `formatCheckResult` `formatCheckWarnings` `collisionEntries` `formatCollision` `formatFinding` `createDevReporter` · types `Finding` `DevReporter` `CheckResult` `MissingEntry` `UnknownEntry` `BrokenEntry` `ExtraEntry` `CollisionEntry` `DivergentEntry` `OutdatedEntry` `SourceSite` `StructureIssue` `IssueSeverity` |
|
|
364
|
+
| Coverage | `status` `formatStatusResult` `counted` · types `StatusResult` `LocaleStatus` |
|
|
365
|
+
| Review state | `loadDrafts` `saveDrafts` `markDrafts` `clearDrafts` `effectiveDrafts` `loadState` `readState` `updateState` `recordTranslations` `outdatedTranslations` `STATE_FILE` · types `Drafts` `State` `Fingerprints` `TranslationWrite` |
|
|
366
|
+
| Translation | `translateProject` `translateCatalogs` `mergeTranslations` `writeDrafts` `resolveProvider` `formatTranslateFailures` · types `TranslateProjectOptions` `TranslateProjectResult` `DraftEntry` `WriteDraftsResult` |
|
|
367
|
+
| Diagnosis | `doctor` `formatDoctorEntry` `formatDoctorHealth` · types `DoctorResult` `DoctorEntry` |
|
|
368
|
+
| Onboarding | `wrapProject` `formatWrapResult` · types `WrapResult` `WrapEntry` `WrapSkip` `WrapBlocked` `WrapOptions` |
|
|
369
|
+
| Static rendering | `renderSite` `formatRenderWarnings` · types `RenderSiteOptions` `RenderSiteResult` |
|
|
370
|
+
| Error output | `formatCliError` |
|
|
369
371
|
|
|
370
372
|
A minimal plugin is `loadConfig` + `loadCatalogs` once, then `transformSource` per file and `runBuildGate` at the end:
|
|
371
373
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mt as counted, xt as isModuleNotFound } from "./run-We8xWd57.js";
|
|
2
2
|
// src/exchange/providers/claude.ts
|
|
3
3
|
const DEFAULT_MODEL = "claude-sonnet-5-5";
|
|
4
4
|
const FALLBACK_MODELS = /* @__PURE__ */ new Set([
|
|
5
5
|
"claude-sonnet-5-5",
|
|
6
6
|
"claude-opus-5-5",
|
|
7
7
|
"claude-opus-5",
|
|
8
|
-
"claude-fable-5-1"
|
|
8
|
+
"claude-fable-5-1",
|
|
9
|
+
"claude-fable-5-2"
|
|
9
10
|
]);
|
|
10
11
|
const FALLBACK_BETA = "server-side-fallback-2026-07-01";
|
|
11
12
|
function thinkingFor(model) {
|
package/dist/cli.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,46 @@ export declare class MessageRegistry {
|
|
|
80
80
|
origins(): Map<string, string[]>;
|
|
81
81
|
private inOrder;
|
|
82
82
|
}
|
|
83
|
+
export declare const STATE_FILE = "verbaly.lock";
|
|
84
|
+
type Drafts = Record<string, string[]>;
|
|
85
|
+
type Fingerprints = Record<string, Record<string, string>>;
|
|
86
|
+
interface State {
|
|
87
|
+
drafts: Drafts;
|
|
88
|
+
fingerprints: Fingerprints;
|
|
89
|
+
migrated?: string[];
|
|
90
|
+
}
|
|
91
|
+
interface OutdatedEntry {
|
|
92
|
+
locale: string;
|
|
93
|
+
key: string;
|
|
94
|
+
}
|
|
95
|
+
interface StateRead {
|
|
96
|
+
state: State;
|
|
97
|
+
problem?: string;
|
|
98
|
+
conflict?: true;
|
|
99
|
+
}
|
|
100
|
+
interface WrittenTranslation {
|
|
101
|
+
key: string;
|
|
102
|
+
text: string;
|
|
103
|
+
source?: string;
|
|
104
|
+
}
|
|
105
|
+
interface TranslationWrite {
|
|
106
|
+
locale: string;
|
|
107
|
+
entries: WrittenTranslation[];
|
|
108
|
+
draft?: boolean;
|
|
109
|
+
}
|
|
110
|
+
interface LockEntry {
|
|
111
|
+
file: string;
|
|
112
|
+
from?: string;
|
|
113
|
+
merged?: true;
|
|
114
|
+
}
|
|
115
|
+
export declare function loadState(cfg: ResolvedConfig): State;
|
|
116
|
+
export declare function readState(cfg: ResolvedConfig): StateRead;
|
|
117
|
+
export declare function updateState(cfg: ResolvedConfig, catalogs: Catalogs): State;
|
|
118
|
+
export declare function recordTranslations(cfg: ResolvedConfig, source: Catalog, writes: TranslationWrite[]): State;
|
|
119
|
+
export declare function effectiveDrafts(drafts: Drafts, catalogs: Catalogs): Drafts;
|
|
120
|
+
export declare function markDrafts(drafts: Drafts, locale: string, keys: string[]): void;
|
|
121
|
+
export declare function clearDrafts(drafts: Drafts, locale: string, keys?: string[]): void;
|
|
122
|
+
export declare function outdatedTranslations(cfg: ResolvedConfig, catalogs: Catalogs, fingerprints: Fingerprints): OutdatedEntry[];
|
|
83
123
|
interface TranslateRequest {
|
|
84
124
|
sourceLocale: string;
|
|
85
125
|
targetLocale: string;
|
|
@@ -128,6 +168,7 @@ interface WriteDraftsResult {
|
|
|
128
168
|
kept: string[];
|
|
129
169
|
invalid: string[];
|
|
130
170
|
unknown: string[];
|
|
171
|
+
lock?: LockEntry;
|
|
131
172
|
}
|
|
132
173
|
interface WriteDraftsOptions {
|
|
133
174
|
overwrite?: boolean;
|
|
@@ -223,46 +264,6 @@ export declare function shippedCatalogs(cfg: ResolvedConfig, catalogs: Catalogs,
|
|
|
223
264
|
newKeys?: boolean;
|
|
224
265
|
}): Catalogs;
|
|
225
266
|
export declare function pruneCatalogs(cfg: ResolvedConfig, catalogs: Catalogs, registry: MessageRegistry): Record<string, string[]>;
|
|
226
|
-
export declare const STATE_FILE = "verbaly.lock";
|
|
227
|
-
type Drafts = Record<string, string[]>;
|
|
228
|
-
type Fingerprints = Record<string, Record<string, string>>;
|
|
229
|
-
interface State {
|
|
230
|
-
drafts: Drafts;
|
|
231
|
-
fingerprints: Fingerprints;
|
|
232
|
-
migrated?: string[];
|
|
233
|
-
}
|
|
234
|
-
interface OutdatedEntry {
|
|
235
|
-
locale: string;
|
|
236
|
-
key: string;
|
|
237
|
-
}
|
|
238
|
-
interface StateRead {
|
|
239
|
-
state: State;
|
|
240
|
-
problem?: string;
|
|
241
|
-
conflict?: true;
|
|
242
|
-
}
|
|
243
|
-
interface WrittenTranslation {
|
|
244
|
-
key: string;
|
|
245
|
-
text: string;
|
|
246
|
-
source?: string;
|
|
247
|
-
}
|
|
248
|
-
interface TranslationWrite {
|
|
249
|
-
locale: string;
|
|
250
|
-
entries: WrittenTranslation[];
|
|
251
|
-
draft?: boolean;
|
|
252
|
-
}
|
|
253
|
-
interface LockEntry {
|
|
254
|
-
file: string;
|
|
255
|
-
from?: string;
|
|
256
|
-
merged?: true;
|
|
257
|
-
}
|
|
258
|
-
export declare function loadState(cfg: ResolvedConfig): State;
|
|
259
|
-
export declare function readState(cfg: ResolvedConfig): StateRead;
|
|
260
|
-
export declare function updateState(cfg: ResolvedConfig, catalogs: Catalogs): State;
|
|
261
|
-
export declare function recordTranslations(cfg: ResolvedConfig, source: Catalog, writes: TranslationWrite[]): State;
|
|
262
|
-
export declare function effectiveDrafts(drafts: Drafts, catalogs: Catalogs): Drafts;
|
|
263
|
-
export declare function markDrafts(drafts: Drafts, locale: string, keys: string[]): void;
|
|
264
|
-
export declare function clearDrafts(drafts: Drafts, locale: string, keys?: string[]): void;
|
|
265
|
-
export declare function outdatedTranslations(cfg: ResolvedConfig, catalogs: Catalogs, fingerprints: Fingerprints): OutdatedEntry[];
|
|
266
267
|
interface SourceSite {
|
|
267
268
|
file: string;
|
|
268
269
|
line?: number;
|
|
@@ -316,8 +317,15 @@ type Finding = ({
|
|
|
316
317
|
export declare function collisionEntries(registry: MessageRegistry): CollisionEntry[];
|
|
317
318
|
export declare function formatCollision({ key, sites }: CollisionEntry, root?: string): string;
|
|
318
319
|
export declare function formatFinding(finding: Finding, root?: string): string;
|
|
320
|
+
interface DevSync {
|
|
321
|
+
findings: Finding[];
|
|
322
|
+
catalogs: Catalogs;
|
|
323
|
+
state?: State;
|
|
324
|
+
stateProblem?: string;
|
|
325
|
+
}
|
|
319
326
|
interface DevReporter {
|
|
320
327
|
report(channel: string, findings: Finding[]): void;
|
|
328
|
+
sync(cfg: ResolvedConfig, result: DevSync, edited: (finding: ReplacedEntry) => boolean | undefined): void;
|
|
321
329
|
}
|
|
322
330
|
export declare function createDevReporter(root: string, print?: (line: string) => void, cap?: number): DevReporter;
|
|
323
331
|
interface SyncProjectOptions {
|
|
@@ -343,6 +351,22 @@ interface SyncProjectResult {
|
|
|
343
351
|
stateProblem?: string;
|
|
344
352
|
}
|
|
345
353
|
export declare function syncProject(cfg: ResolvedConfig, options?: SyncProjectOptions): Promise<SyncProjectResult>;
|
|
354
|
+
interface TranslateProjectOptions {
|
|
355
|
+
locales?: string[];
|
|
356
|
+
dryRun?: boolean;
|
|
357
|
+
model?: string;
|
|
358
|
+
provider?: TranslateProvider;
|
|
359
|
+
onProgress?: (progress: TranslateProgress) => void;
|
|
360
|
+
}
|
|
361
|
+
interface TranslateProjectResult {
|
|
362
|
+
pending: Record<string, string[]>;
|
|
363
|
+
written: Record<string, string[]>;
|
|
364
|
+
kept: Record<string, string[]>;
|
|
365
|
+
invalid: Record<string, string[]>;
|
|
366
|
+
failed: TranslateFailure[];
|
|
367
|
+
lock?: LockEntry;
|
|
368
|
+
}
|
|
369
|
+
export declare function translateProject(cfg: ResolvedConfig, options?: TranslateProjectOptions): Promise<TranslateProjectResult>;
|
|
346
370
|
export declare function stableKey(message: string): string;
|
|
347
371
|
interface RuntimeModuleOptions {
|
|
348
372
|
localeImport?: (locale: string) => string;
|
|
@@ -380,6 +404,11 @@ export declare const RESOLVED_VIRTUAL_ID: string;
|
|
|
380
404
|
export declare const LOCALE_MODULE_PREFIX = "\0virtual:verbaly/locale/";
|
|
381
405
|
export declare const SOURCE_FILE_RE: RegExp;
|
|
382
406
|
export declare function resolveVirtualId(id: string): string | undefined;
|
|
407
|
+
interface ClientModules {
|
|
408
|
+
runtime(): string;
|
|
409
|
+
locale(locale: string): string;
|
|
410
|
+
}
|
|
411
|
+
export declare function clientModules(cfg: ResolvedConfig, catalogs: Catalogs, options?: Pick<RuntimeModuleOptions, 'localeImport' | 'extraExports'>): ClientModules;
|
|
383
412
|
export declare function loadVirtualModule(id: string, cfg: ResolvedConfig, catalogs: Catalogs): string | undefined;
|
|
384
413
|
export declare function isTransformTarget(id: string): boolean;
|
|
385
414
|
export declare function createSourceFilter(cfg: ResolvedConfig): (id: string) => boolean;
|
|
@@ -432,6 +461,7 @@ interface CheckResult {
|
|
|
432
461
|
divergent: DivergentEntry[];
|
|
433
462
|
outdated: OutdatedEntry[];
|
|
434
463
|
}
|
|
464
|
+
export declare function relativeCheck(root: string, result: CheckResult): CheckResult;
|
|
435
465
|
export declare function check(cfg: ResolvedConfig, catalogs: Catalogs, registry: MessageRegistry, fingerprints?: Fingerprints): CheckResult;
|
|
436
466
|
export declare function formatCheckResult(result: CheckResult, root?: string): string;
|
|
437
467
|
interface CheckReportOptions {
|
|
@@ -513,6 +543,7 @@ interface WrapBlocked {
|
|
|
513
543
|
file: string;
|
|
514
544
|
texts: number;
|
|
515
545
|
client: boolean;
|
|
546
|
+
binding: string;
|
|
516
547
|
}
|
|
517
548
|
interface WrapResult {
|
|
518
549
|
files: number;
|
|
@@ -525,6 +556,12 @@ interface WrapOptions {
|
|
|
525
556
|
write?: boolean;
|
|
526
557
|
}
|
|
527
558
|
export declare function wrapProject(cfg: ResolvedConfig, options?: WrapOptions): Promise<WrapResult>;
|
|
559
|
+
interface WrapReport {
|
|
560
|
+
counts: string;
|
|
561
|
+
lines: string[];
|
|
562
|
+
files: number;
|
|
563
|
+
}
|
|
564
|
+
export declare function formatWrapResult(result: WrapResult, write: boolean): WrapReport;
|
|
528
565
|
interface RenderSiteOptions {
|
|
529
566
|
site?: string;
|
|
530
567
|
locales?: string[];
|
|
@@ -547,4 +584,4 @@ interface RenderSiteResult {
|
|
|
547
584
|
}
|
|
548
585
|
export declare function renderSite(cfg: ResolvedConfig, options?: RenderSiteOptions): Promise<RenderSiteResult>;
|
|
549
586
|
export declare function formatRenderWarnings(result: RenderSiteResult, sourceLocale: string): string[];
|
|
550
|
-
export type { BrokenEntry, BundleConfig, Catalog, Catalogs, CheckResult, CollisionEntry, DevReporter, DivergentEntry, DoctorEntry, DoctorResult, DraftEntry, Drafts, DtsOptions, ExtraEntry, Finding, Fingerprints, GlossaryEntry, Host, InitOptions, InitResult, IssueSeverity, LocaleStatus, MissingEntry, OutdatedEntry, PluginOptions, RedirectConfig, RenderConfig, RenderSiteOptions, RenderSiteResult, ResolvedConfig, RuntimeModuleOptions, SourceSite, State, StatusResult, StructureIssue, SyncProjectResult, SyncResult, TransformResult, TranslateConfig, TranslateFailure, TranslateOptions, TranslateProgress, TranslateProvider, TranslateRequest, TranslateResult, TranslationWrite, TreeOptions, UnknownEntry, VerbalyConfig, WrapBlocked, WrapEntry, WrapOptions, WrapResult, WrapSkip, WriteDraftsResult };
|
|
587
|
+
export type { BrokenEntry, BundleConfig, Catalog, Catalogs, CheckResult, ClientModules, CollisionEntry, DevReporter, DivergentEntry, DoctorEntry, DoctorResult, DraftEntry, Drafts, DtsOptions, ExtraEntry, Finding, Fingerprints, GlossaryEntry, Host, InitOptions, InitResult, IssueSeverity, LocaleStatus, MissingEntry, OutdatedEntry, PluginOptions, RedirectConfig, RenderConfig, RenderSiteOptions, RenderSiteResult, ResolvedConfig, RuntimeModuleOptions, SourceSite, State, StatusResult, StructureIssue, SyncProjectResult, SyncResult, TransformResult, TranslateConfig, TranslateFailure, TranslateOptions, TranslateProgress, TranslateProjectOptions, TranslateProjectResult, TranslateProvider, TranslateRequest, TranslateResult, TranslationWrite, TreeOptions, UnknownEntry, VerbalyConfig, WrapBlocked, WrapEntry, WrapOptions, WrapResult, WrapSkip, WriteDraftsResult };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as generateLocaleModule, A as relativeCheck, B as formatCollision, C as runBuildGate, Ct as resolveConfig, D as check, E as transformCode, F as translateCatalogs, G as loadState, H as STATE_FILE, I as writeDrafts, J as readState, K as markDrafts, L as syncProject, M as formatTranslateFailures, N as mergeTranslations, O as formatCheckResult, P as resolveProvider, Q as generateDts, R as collisionEntries, S as resolveVirtualId, St as loadConfig, T as writeBuildTypes, U as clearDrafts, V as formatFinding, W as effectiveDrafts, X as saveState, Y as recordTranslations, Z as updateState, _ as SOURCE_FILE_RE, _t as needsRelative, a as formatRenderWarnings, at as extractProject, b as isTransformTarget, bt as writeCatalog, c as watchTree, ct as syncCatalogs, d as formatDoctorHealth, dt as LOCALE_IMPORT, et as generateRuntimeModule, f as formatStatusResult, ft as MessageRegistry, g as RESOLVED_VIRTUAL_ID, gt as needsIcu, h as LOCALE_MODULE_PREFIX, ht as loadCatalogs, i as wrapProject, it as collectOrigins, j as translateProject, k as formatCheckWarnings, l as doctor, lt as stableKey, m as reportOutsideInclude, mt as counted, nt as validateMessage, o as renderSite, ot as pruneCatalogs, p as status, pt as clientCatalogs, q as outdatedTranslations, r as formatWrapResult, rt as validatePair, s as init, st as shippedCatalogs, t as formatCliError, tt as writeDts, u as formatDoctorEntry, ut as APP_ID, v as clientModules, vt as parseCatalog, w as transformSource, wt as targetLocales, x as loadVirtualModule, y as createSourceFilter, yt as readCatalog, z as createDevReporter } from "./run-We8xWd57.js";
|
|
2
2
|
// src/catalog/drafts.ts
|
|
3
3
|
function loadDrafts(cfg) {
|
|
4
4
|
return loadState(cfg).drafts;
|
|
@@ -10,4 +10,4 @@ function saveDrafts(cfg, drafts) {
|
|
|
10
10
|
drafts
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
-
export { APP_ID, LOCALE_IMPORT, LOCALE_MODULE_PREFIX, MessageRegistry, RESOLVED_VIRTUAL_ID, SOURCE_FILE_RE, STATE_FILE, check, clearDrafts, clientCatalogs, collectOrigins, collisionEntries, counted, createDevReporter, createSourceFilter, doctor, effectiveDrafts, extractProject, formatCheckResult, formatCheckWarnings, formatCliError, formatCollision, formatDoctorEntry, formatDoctorHealth, formatFinding, formatRenderWarnings, formatStatusResult, formatTranslateFailures, generateDts, generateLocaleModule, generateRuntimeModule, init, isTransformTarget, loadCatalogs, loadConfig, loadDrafts, loadState, loadVirtualModule, markDrafts, mergeTranslations, needsIcu, needsRelative, outdatedTranslations, parseCatalog, pruneCatalogs, readCatalog, readState, recordTranslations, renderSite, reportOutsideInclude, resolveConfig, resolveProvider, resolveVirtualId, runBuildGate, saveDrafts, shippedCatalogs, stableKey, status, syncCatalogs, syncProject, targetLocales, transformCode, transformSource, translateCatalogs, updateState, validateMessage, validatePair, watchTree, wrapProject, writeBuildTypes, writeCatalog, writeDrafts, writeDts };
|
|
13
|
+
export { APP_ID, LOCALE_IMPORT, LOCALE_MODULE_PREFIX, MessageRegistry, RESOLVED_VIRTUAL_ID, SOURCE_FILE_RE, STATE_FILE, check, clearDrafts, clientCatalogs, clientModules, collectOrigins, collisionEntries, counted, createDevReporter, createSourceFilter, doctor, effectiveDrafts, extractProject, formatCheckResult, formatCheckWarnings, formatCliError, formatCollision, formatDoctorEntry, formatDoctorHealth, formatFinding, formatRenderWarnings, formatStatusResult, formatTranslateFailures, formatWrapResult, generateDts, generateLocaleModule, generateRuntimeModule, init, isTransformTarget, loadCatalogs, loadConfig, loadDrafts, loadState, loadVirtualModule, markDrafts, mergeTranslations, needsIcu, needsRelative, outdatedTranslations, parseCatalog, pruneCatalogs, readCatalog, readState, recordTranslations, relativeCheck, renderSite, reportOutsideInclude, resolveConfig, resolveProvider, resolveVirtualId, runBuildGate, saveDrafts, shippedCatalogs, stableKey, status, syncCatalogs, syncProject, targetLocales, transformCode, transformSource, translateCatalogs, translateProject, updateState, validateMessage, validatePair, watchTree, wrapProject, writeBuildTypes, writeCatalog, writeDrafts, writeDts };
|