@verbaly/compiler 0.64.0 → 0.66.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/dist/index.d.ts CHANGED
@@ -49,6 +49,7 @@ interface TranslateResult {
49
49
  failed: TranslateFailure[];
50
50
  }
51
51
  export declare function translateCatalogs(cfg: ResolvedConfig, catalogs: Catalogs, provider: TranslateProvider, options?: TranslateOptions): Promise<TranslateResult>;
52
+ export declare function mergeTranslations(cfg: ResolvedConfig, locale: string, translated: Catalog, keys: string[]): string[];
52
53
  export declare function formatTranslateFailures(failed: TranslateFailure[]): string[];
53
54
  export declare function resolveProvider(cfg: ResolvedConfig, model?: string): Promise<TranslateProvider>;
54
55
  //#endregion
@@ -146,6 +147,7 @@ interface TaggedMessage {
146
147
  interface UsedKey {
147
148
  key: string;
148
149
  file: string;
150
+ loose?: true;
149
151
  }
150
152
  interface StrayImport {
151
153
  name: string;
@@ -165,7 +167,7 @@ export declare class MessageRegistry {
165
167
  update(file: string, analysis: Analysis): void;
166
168
  remove(file: string): void;
167
169
  messages(): Map<string, TaggedMessage>;
168
- usedKeys(): Map<string, string[]>;
170
+ usedKeys(strict?: boolean): Map<string, string[]>;
169
171
  strayImports(): StrayImport[];
170
172
  parseErrors(): {
171
173
  file: string;
@@ -203,7 +205,7 @@ interface DtsOptions {
203
205
  inlineCatalog?: boolean;
204
206
  }
205
207
  export declare function generateDts(catalog: Catalog, options?: DtsOptions): string;
206
- export declare function writeDts(cfg: ResolvedConfig, catalog: Catalog, file?: string): void;
208
+ export declare function writeDts(cfg: ResolvedConfig, catalog: Catalog, file?: string | false): void;
207
209
  //#endregion
208
210
  //#region src/transform.d.ts
209
211
  interface TransformResult {
@@ -254,11 +256,17 @@ interface BrokenEntry {
254
256
  severity: IssueSeverity;
255
257
  issue: string;
256
258
  }
259
+ interface ExtraEntry {
260
+ locale: string;
261
+ key: string;
262
+ files: string[];
263
+ }
257
264
  interface CheckResult {
258
265
  ok: boolean;
259
266
  missing: MissingEntry[];
260
267
  unknown: UnknownEntry[];
261
268
  broken: BrokenEntry[];
269
+ extra: ExtraEntry[];
262
270
  }
263
271
  export declare function check(cfg: ResolvedConfig, catalogs: Catalogs, registry: MessageRegistry): CheckResult;
264
272
  export declare function formatCheckResult(result: CheckResult, root?: string): string;
@@ -295,6 +303,14 @@ export declare function counted(count: number, noun: string, many?: string): str
295
303
  //#region src/run.d.ts
296
304
  export declare function formatCliError(error: unknown): string;
297
305
  //#endregion
306
+ //#region src/watch.d.ts
307
+ interface TreeOptions {
308
+ keep?: string;
309
+ native?: boolean;
310
+ persistent?: boolean;
311
+ }
312
+ export declare function watchTree(root: string, options: TreeOptions, onFile: (file: string) => void): () => void;
313
+ //#endregion
298
314
  //#region src/doctor.d.ts
299
315
  interface DoctorEntry {
300
316
  level: 'ok' | 'warn' | 'error';
@@ -322,9 +338,14 @@ interface InitResult {
322
338
  host: Host | undefined;
323
339
  configFile: string;
324
340
  next: string[];
341
+ renamed: {
342
+ from: string;
343
+ to: string;
344
+ }[];
345
+ refused: string[];
325
346
  }
326
347
  type Host = 'nuxt' | 'next' | 'sveltekit' | 'astro' | 'vite' | 'webpack' | 'rspack' | 'rollup' | 'esbuild';
327
- export declare function init(options?: InitOptions): Promise<InitResult>;
348
+ export declare function init(input?: InitOptions): Promise<InitResult>;
328
349
  //#endregion
329
350
  //#region src/wrap.d.ts
330
351
  interface WrapEntry {
@@ -381,5 +402,5 @@ interface RenderSiteResult {
381
402
  export declare function renderSite(cfg: ResolvedConfig, options?: RenderSiteOptions): Promise<RenderSiteResult>;
382
403
  export declare function formatRenderWarnings(result: RenderSiteResult, sourceLocale: string): string[];
383
404
  //#endregion
384
- export type { BrokenEntry, BundleConfig, Catalog, Catalogs, CheckResult, DoctorEntry, DoctorResult, Drafts, DtsOptions, GlossaryEntry, Host, InitOptions, InitResult, IssueSeverity, LocaleStatus, MissingEntry, PluginOptions, RedirectConfig, RenderConfig, RenderSiteOptions, RenderSiteResult, ResolvedConfig, RuntimeModuleOptions, StatusResult, StructureIssue, SyncResult, TransformResult, TranslateConfig, TranslateFailure, TranslateOptions, TranslateProgress, TranslateProvider, TranslateRequest, TranslateResult, UnknownEntry, VerbalyConfig, WrapBlocked, WrapEntry, WrapOptions, WrapResult, WrapSkip };
405
+ export type { BrokenEntry, BundleConfig, Catalog, Catalogs, CheckResult, DoctorEntry, DoctorResult, Drafts, DtsOptions, ExtraEntry, GlossaryEntry, Host, InitOptions, InitResult, IssueSeverity, LocaleStatus, MissingEntry, PluginOptions, RedirectConfig, RenderConfig, RenderSiteOptions, RenderSiteResult, ResolvedConfig, RuntimeModuleOptions, StatusResult, StructureIssue, SyncResult, TransformResult, TranslateConfig, TranslateFailure, TranslateOptions, TranslateProgress, TranslateProvider, TranslateRequest, TranslateResult, TreeOptions, UnknownEntry, VerbalyConfig, WrapBlocked, WrapEntry, WrapOptions, WrapResult, WrapSkip };
385
406
  //# sourceMappingURL=index.d.ts.map