@dialexjs/cli 0.7.2 → 0.9.2

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 CHANGED
@@ -32,7 +32,7 @@ Binaries installed: `dialex` and the shorter alias `dx` (handy in package.json s
32
32
 
33
33
  Initialize or configure Dialex in any project:
34
34
 
35
- - **Automatic Framework Detection**: Identifies Next.js, Fastify, Koa, Hono, Express, NestJS, Elysia, SvelteKit, Astro, Vue, Nuxt, and React/Vite.
35
+ - **Automatic Framework Detection**: Identifies Next.js, React Router, React/Vite, Preact, Solid, Svelte, SvelteKit, Vue, Nuxt, Qwik, Lit, React Native, Astro, Hono, Express, Fastify, Koa, NestJS, Elysia, Hapi, AdonisJS and tRPC from `package.json`.
36
36
  - **Magicast AST Injection**: Manipulates `dialex.config.ts` and registers the module in `nuxt.config.ts` (Nuxt) cleanly.
37
37
  - **Starter Dictionaries**: Emits typed starter dictionary and TypeScript declaration file.
38
38
 
@@ -70,6 +70,15 @@ dialex import translations/tr.xlf
70
70
 
71
71
  Fills missing (or `[TODO]`) strings with a provider you configure in `dialex.config.ts`. Built-in providers for Claude, OpenAI (ChatGPT), Gemini and DeepL are exported from `@dialexjs/cli/translate`. `--dry-run` lists what would be sent without calling anything.
72
72
 
73
+ ### `dialex lock`
74
+
75
+ Records the translations you have as up to date with their current source text (`dialex.lock.json`), so a later edit of the source is noticed. `dialex translate` and `dialex import` record what they write; `dialex check` warns about translations whose source changed, and `--fail-on-stale` makes that an error.
76
+
77
+ ```bash
78
+ dialex lock
79
+ dialex lock --all # also accept translations that are already out of date
80
+ ```
81
+
73
82
  ### `dialex check` (alias: `lint`)
74
83
 
75
84
  CI verification command:
@@ -86,6 +95,16 @@ dialex check
86
95
 
87
96
  ---
88
97
 
98
+ ## Exit codes
99
+
100
+ `0` on success; `1` when the command fails. `dialex check` exits with `1` when it finds errors (warnings never fail it). `dialex import` exits with `0` even when it rejected values; read `success` in its `--json` output. Every command except `init` accepts `--json`.
101
+
102
+ ## Documentation
103
+
104
+ [Commands and options](https://dialex.awaiden.com/cli/) and the [diagnostics reference](https://dialex.awaiden.com/guide/diagnostics.html).
105
+
106
+ ---
107
+
89
108
  ## 📝 Changelog
90
109
 
91
110
  See what changed in each release in the [changelog](https://github.com/awaiden/dialex/blob/main/CHANGELOG.md), or on [GitHub Releases](https://github.com/awaiden/dialex/releases).
package/dist/api.d.mts CHANGED
@@ -1,22 +1,13 @@
1
1
  import { loadFile } from "magicast";
2
- import { DialexConfig } from "dialexjs";
3
- //#region src/utils/dictionary-edit.d.ts
4
- /**
5
- * AST-level helpers for reading and editing `.content.ts` dictionary files.
6
- *
7
- * Magicast's proxy layer cannot represent every value (for example template-literal
8
- * functions), so these helpers work on the underlying AST nodes and use Magicast only
9
- * to parse and print, which preserves the rest of the file's formatting.
10
- *
11
- * Supported shapes:
12
- * - `export default defineDictionary("name", { en: {...}, tr: {...} })`
13
- * - `export default defineDictionary({ name: "name", dictionary: { ... } })`
14
- * - `export default { name: "name", dictionary: { ... } }`
15
- */
16
- type Node = {
2
+ import { DialexConfig, LintRuleSetting } from "dialexjs";
3
+ //#region src/utils/ast.d.ts
4
+ /** A syntax-tree node as magicast (recast/babel) and oxc-style ESTree nodes both look. */
5
+ type AstNode = {
17
6
  type: string;
18
7
  [key: string]: any;
19
8
  };
9
+ //#endregion
10
+ //#region src/utils/dictionary/types.d.ts
20
11
  export declare const TODO_PREFIX = "[TODO] ";
21
12
  interface DictionaryFile {
22
13
  file: string;
@@ -24,7 +15,7 @@ interface DictionaryFile {
24
15
  name?: string;
25
16
  mod: Awaited<ReturnType<typeof loadFile>>;
26
17
  /** The object whose keys are locales. */
27
- localesObj: Node;
18
+ localesObj: AstNode;
28
19
  /** Whether the file ended with a newline when loaded; restored on save. */
29
20
  endsWithNewline: boolean;
30
21
  /**
@@ -52,6 +43,8 @@ interface Leaf {
52
43
  /** Present when `kind` is `"string"`. */
53
44
  value?: string;
54
45
  }
46
+ //#endregion
47
+ //#region src/utils/dictionary/io.d.ts
55
48
  /**
56
49
  * Parses dictionary source text (for example an unsaved editor buffer). Returns `undefined` when
57
50
  * the file does not have an editable shape; throws on syntax errors.
@@ -62,11 +55,15 @@ export declare function loadDictionaryFile(file: string): Promise<DictionaryFile
62
55
  /** The source text with all edits applied, without writing anything. */
63
56
  export declare function renderDictionaryFile(df: DictionaryFile): string;
64
57
  export declare function saveDictionaryFile(df: DictionaryFile): Promise<void>;
58
+ //#endregion
59
+ //#region src/utils/dictionary/read.d.ts
65
60
  export declare function listLocales(df: DictionaryFile): string[];
66
61
  /** Lists every leaf (string, function, or other value) of a locale, in source order. */
67
62
  export declare function listLeaves(df: DictionaryFile, locale: string): Leaf[];
68
63
  export declare function hasPath(df: DictionaryFile, locale: string, path: string[]): boolean;
69
64
  export declare function getString(df: DictionaryFile, locale: string, path: string[]): string | undefined;
65
+ //#endregion
66
+ //#region src/utils/dictionary/write.d.ts
70
67
  type SetResult = "created" | "updated" | "skipped";
71
68
  /**
72
69
  * Sets a string value at `path`. Existing function or non-string values are left alone
@@ -79,6 +76,8 @@ export declare function setString(df: DictionaryFile, locale: string, path: stri
79
76
  * Returns `false` when the source has no such leaf or the target already has one.
80
77
  */
81
78
  export declare function copyLeaf(df: DictionaryFile, fromLocale: string, toLocale: string, path: string[], mapString?: (value: string) => string): boolean;
79
+ //#endregion
80
+ //#region src/utils/dictionary/locations.d.ts
82
81
  /**
83
82
  * Where a locale (no `path`) or a key within it is written. The range covers the property key, so
84
83
  * it is a good place to attach a diagnostic or jump to.
@@ -89,15 +88,7 @@ export declare function dictionaryLocation(df: DictionaryFile): SourceRange | un
89
88
  /** The source code of a leaf's value (a function's source, or a string with its quotes). */
90
89
  export declare function getLeafSource(df: DictionaryFile, locale: string, path: string[]): string | undefined;
91
90
  //#endregion
92
- //#region src/analysis.d.ts
93
- /**
94
- * Project analysis shared by `dialex check` and the editor extension.
95
- *
96
- * It reads dictionaries from the syntax tree, so it never runs project code. Dictionaries that
97
- * cannot be read that way (spreads, computed keys, imported values) are skipped with an `info`
98
- * issue, unless `runtime: true` is passed, in which case they are imported and read from the
99
- * evaluated module (the CLI does this; editors must not).
100
- */
91
+ //#region src/analysis/types.d.ts
101
92
  type IssueLevel = "error" | "warning" | "info";
102
93
  type IssueCode = "invalid-dictionary" | "unanalyzable" | "missing-locale" | "missing-key" | "invalid-locale" | "todo-placeholder" | "stale-translation" | "invalid-icu" | "icu-args-mismatch" | "icu-plural-categories" | "unknown-dictionary" | "unknown-path" | "unused-key" | "unused-dictionary";
103
94
  interface AnalysisIssue {
@@ -121,7 +112,14 @@ interface AnalysisConfig {
121
112
  locales?: string[];
122
113
  include?: string | string[];
123
114
  exclude?: string[];
115
+ /** `lint.rules` of the config: `"off"` drops an issue, `"warn"` and `"error"` set its level. */
116
+ lint?: {
117
+ rules?: Record<string, LintSetting>;
118
+ };
124
119
  }
120
+ type LintLevel = "off" | "warn" | "error";
121
+ /** A rule as written in the config: `"warn"` or `["warn", { ...options }]`. */
122
+ type LintSetting = LintLevel | readonly [LintLevel, unknown?];
125
123
  /**
126
124
  * Remembers parsed dictionaries and scanned source files between `analyzeProject` calls, keyed by
127
125
  * modification time and size, so a long-lived caller (the editor extension) only re-reads what
@@ -139,9 +137,6 @@ interface AnalysisCache {
139
137
  /** The `.gitignore` filter, reused until {@link clearGitignore} is called. */
140
138
  gitignore: Map<string, (absolutePath: string) => boolean>;
141
139
  }
142
- export declare function createAnalysisCache(): AnalysisCache;
143
- /** Forget the cached `.gitignore` rules, for example after a `.gitignore` file changed. */
144
- export declare function clearGitignore(cache: AnalysisCache): void;
145
140
  interface SourceScan {
146
141
  /** Distinct word-like tokens, for the unused-key heuristic. */
147
142
  tokens: string[];
@@ -149,6 +144,8 @@ interface SourceScan {
149
144
  ref: Reference;
150
145
  range: SourceRange;
151
146
  }[];
147
+ /** Dictionary names registered inline with `dictionaries: { name: ... }`. */
148
+ inline: string[];
152
149
  }
153
150
  interface AnalysisOptions {
154
151
  root: string;
@@ -165,6 +162,8 @@ interface AnalysisOptions {
165
162
  lock?: boolean;
166
163
  /** Reuse work between calls. Ignored when `runtime` is set, because that evaluates code. */
167
164
  cache?: AnalysisCache;
165
+ /** Unsaved text of files, by absolute path, used instead of reading them from disk. */
166
+ contents?: ReadonlyMap<string, string>;
168
167
  }
169
168
  interface LeafInfo {
170
169
  kind: "string" | "function" | "other";
@@ -189,8 +188,9 @@ interface AnalysisResult {
189
188
  /** Absolute paths of every dictionary file that matched. */
190
189
  files: string[];
191
190
  sourceFilesScanned: number;
191
+ /** Dictionary names registered in code with `dictionaries: { name: ... }`. Empty without `src`. */
192
+ inlineDictionaries: string[];
192
193
  }
193
- export declare const DEFAULT_SOURCE_GLOB = "**/*.{ts,tsx,js,jsx,mjs,cjs,vue,svelte,astro,mdx}";
194
194
  interface Reference {
195
195
  /** A dictionary name, or a full `dictionary.key.path`. */
196
196
  kind: "dictionary" | "path";
@@ -199,8 +199,6 @@ interface Reference {
199
199
  start: number;
200
200
  end: number;
201
201
  }
202
- /** Finds `getDictionary("x")`-style and `t("x.y.z")` references in source text. */
203
- export declare function scanReferences(text: string): Reference[];
204
202
  interface DictionaryData {
205
203
  name: string;
206
204
  locales: string[];
@@ -216,7 +214,33 @@ type Loaded = {
216
214
  code: IssueCode;
217
215
  message: string;
218
216
  };
217
+ //#endregion
218
+ //#region src/analysis/cache.d.ts
219
+ export declare function createAnalysisCache(): AnalysisCache;
220
+ /** Forget the cached `.gitignore` rules, for example after a `.gitignore` file changed. */
221
+ export declare function clearGitignore(cache: AnalysisCache): void;
222
+ //#endregion
223
+ //#region src/analysis/source-scan.d.ts
224
+ export declare const DEFAULT_SOURCE_GLOB = "**/*.{ts,tsx,js,jsx,mjs,cjs,vue,svelte,astro,mdx}";
225
+ /** References and inline dictionary names found in one source file. */
226
+ export declare function scanText(text: string): {
227
+ references: Reference[];
228
+ inline: string[];
229
+ };
230
+ /**
231
+ * Finds `getDictionary("x")`-style and `t("x.y.z")` references in source text. References inside
232
+ * comments, and on lines a `dialex-ignore` comment covers, are skipped.
233
+ */
234
+ export declare function scanReferences(text: string): Reference[];
235
+ //#endregion
236
+ //#region src/analysis/index.d.ts
237
+ /** Analyzes a project. With `runtime: true`, dictionaries the syntax tree cannot describe are imported. */
219
238
  export declare function analyzeProject(options: AnalysisOptions): Promise<AnalysisResult>;
239
+ /**
240
+ * `analyzeProject` for callers that cannot await, such as lint rules. Reads dictionaries from the
241
+ * syntax tree only: `runtime` is ignored, so project code is never executed.
242
+ */
243
+ export declare function analyzeProjectSync(options: AnalysisOptions): AnalysisResult;
220
244
  /** Project root-relative path with forward slashes, for display. */
221
245
  export declare function relativeFile(root: string, file: string): string;
222
246
  //#endregion
@@ -287,9 +311,15 @@ interface StaticConfig {
287
311
  locales: string[];
288
312
  include: string | string[];
289
313
  exclude: string[];
314
+ /** Where the generated file goes, when the config sets it. */
315
+ output?: string;
290
316
  fallbacks: Record<string, string[]>;
291
317
  prefixDefault: boolean;
292
318
  lazy: boolean | "locale";
319
+ /** Severity and options of each check, by diagnostic code. */
320
+ lint: {
321
+ rules: Record<string, LintRuleSetting>;
322
+ };
293
323
  }
294
324
  interface StaticConfigResult {
295
325
  config: StaticConfig;
@@ -297,6 +327,11 @@ interface StaticConfigResult {
297
327
  file?: string;
298
328
  /** Things that could not be read statically, for example `locales: getLocales()`. */
299
329
  notes: string[];
330
+ /**
331
+ * The config object has a spread or a computed key, so it may set things this reader cannot
332
+ * see. Only running the file gives a trustworthy answer.
333
+ */
334
+ opaque: boolean;
300
335
  }
301
336
  export declare const DEFAULT_STATIC_CONFIG: StaticConfig;
302
337
  /** Reads a config file's source text. Exposed for tests and for unsaved buffers. */
@@ -333,7 +368,7 @@ export declare function loadStaticProject(root: string, configFile?: string): Pr
333
368
  /** `home` + `["nav", "about"]` -> `home.nav.about` */
334
369
  export declare const toKey: (dictionary: string, keyPath: string[]) => string;
335
370
  //#endregion
336
- //#region src/commands/generate.d.ts
371
+ //#region src/commands/generate/types.d.ts
337
372
  interface GenerateOptions {
338
373
  cwd?: string;
339
374
  watch?: boolean;
@@ -365,6 +400,8 @@ interface RenderedGenerate {
365
400
  /** Things worth telling the user, such as a dictionary that could not be split by locale. */
366
401
  notes: string[];
367
402
  }
403
+ //#endregion
404
+ //#region src/commands/generate/render.d.ts
368
405
  /**
369
406
  * Works out `dialex.generated.ts` and `dialex-env.d.ts` for a project without writing anything,
370
407
  * so `check` can tell whether they are up to date.
@@ -373,6 +410,8 @@ interface RenderedGenerate {
373
410
  * back to the locales the dictionaries define.
374
411
  */
375
412
  export declare function renderGenerated(root: string, options?: GenerateOptions): RenderedGenerate;
413
+ //#endregion
414
+ //#region src/commands/generate/write.d.ts
376
415
  export declare function generateDictionaries(root: string, options?: GenerateOptions): {
377
416
  files: string[];
378
417
  outputPath: string;
@@ -380,6 +419,8 @@ export declare function generateDictionaries(root: string, options?: GenerateOpt
380
419
  configFile?: string;
381
420
  notes: string[];
382
421
  };
422
+ //#endregion
423
+ //#region src/commands/generate/watch.d.ts
383
424
  /**
384
425
  * Regenerates when a dictionary or config file is added, edited or removed. chokidar 4+ no longer
385
426
  * understands globs, so this watches the project directory and decides for itself which events
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.mts","names":[],"sources":["../src/utils/dictionary-edit.ts","../src/analysis.ts","../src/utils/files.ts","../src/utils/lockfile.ts","../src/utils/static-config.ts","../src/utils/project.ts","../src/commands/generate.ts"],"mappings":";;;;;;;;;;;;;;;KAiBK;EAAS;GAAe;;qBAEhB;UAII;EACf;;EAEA;EACA,KAAK,QAAQ,kBAAkB;;EAE/B,YAAY;;EAEZ;;;;;;EAMA;;;UAIe;EACf;IAAS;IAAc;;EACvB;IAAO;IAAc;;;KAGX;UAEK;EACf;EACA,MAAM;;EAEN;;;;;;wBAgIc,oBAAoB,cAAc,eAAe;;wBAoB3C,mBAAmB,eAAe,QAAQ;;wBAKhD,qBAAqB,IAAI;wBAKnB,mBAAmB,IAAI,iBAAiB;wBAQ9C,YAAY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AS;;;qBC3GE;;;;;;;;;;;;UAaI;EACf;EACA;EACA,SAAS,eAAe;;;wBAYV,WAAW;;wBAKX,SAAS,eAAe;;wBAiBxB,UAAU,cAAc,MAAM;;;;;wBA2B9B,QAAQ,MAAM,UAAU,gBAAgB,aAAa;;;;;;;;UC/DpD;EACf;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;;UAGe;EACf,QAAQ;;EAER;;EAEA;;qBAMW,uBAAuB;;wBAmFpB,kBAAkB,cAAc,gBAA4B;;wBA+C5D,iBAAiB,cAAc,sBAAsB;;;UChKpD;;EAEf;EACA;EACA,IAAI;;UAGW;EACf;EACA,QAAQ;EACR,cAAc;;EAEd;;EAEA;;;;;;wBA4BoB,YAAY,cAAc,sBAAsB,QAAQ;;;;;wBASxD,kBAAkB,cAAc,sBAAsB,QAAQ;;qBAMvE,QAAK,oBAAsB;;;UCnDvB;EACf;EACA;EACA;EACA;EACA;;;;;EAKA;;UAGe;;EAEf;;EAEA;EACA;;EAEA;EACA;;EAEA;;EAEA;IAAc;IAAc;;;EAE5B;;;;;;;;;wBAcc,gBAAgB,cAAc,UAAS,kBAAuB;wBA8J9D,qBACd,cACA,UAAS;EAET;EACA;EACA;EACA;EACA;;;;;;;wBAmGc,qBACd,cACA,SAAS,iBACT,wBACA,gBAEA;;AAAA,OAAM,8CAA4D"}
1
+ {"version":3,"file":"api.d.mts","names":["Node"],"sources":["../src/utils/ast.ts","../src/utils/dictionary/types.ts","../src/utils/dictionary/io.ts","../src/utils/dictionary/read.ts","../src/utils/dictionary/write.ts","../src/utils/dictionary/locations.ts","../src/analysis/types.ts","../src/analysis/cache.ts","../src/analysis/source-scan.ts","../src/analysis/index.ts","../src/utils/files.ts","../src/utils/lockfile.ts","../src/utils/static-config.ts","../src/utils/project.ts","../src/commands/generate/types.ts","../src/commands/generate/render.ts","../src/commands/generate/write.ts","../src/commands/generate/watch.ts"],"mappings":";;;;KACY;EAAY;GAAe;;;;qBCG1B;UAEI;EACf;;EAEA;E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EAET;EACA;EACA;EACA;EACA;;;;;;;;;wBCHc,qBACd,cACA,SAAS,iBACT,wBACA,gBAEA;;AAAA,OAAM,8CAA4D"}
package/dist/api.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { A as scanFiles, B as locationOf, D as BUILTIN_IGNORE, E as writeLock, F as getString, H as renderDictionaryFile, I as hasPath, L as listLeaves, M as copyLeaf, N as dictionaryLocation, O as SOURCE_BUILTIN_IGNORE, P as getLeafSource, R as listLocales, U as saveDictionaryFile, V as parseDictionaryText, W as setString, _ as relativeFile, a as renderGenerated, b as hashSource, c as DEFAULT_STATIC_CONFIG, g as createAnalysisCache, h as clearGitignore, i as generateDictionaries, j as TODO_PREFIX, k as createGitignoreFilter, l as parseStaticConfig, m as analyzeProject, n as loadStaticProject, p as DEFAULT_SOURCE_GLOB, r as toKey, s as startGenerateWatcher, t as loadProject, u as readStaticConfig, v as scanReferences, w as readLock, x as isStale, y as LOCK_FILE, z as loadDictionaryFile } from "./project-Dz0FbydQ.mjs";
2
- export { BUILTIN_IGNORE, DEFAULT_SOURCE_GLOB, DEFAULT_STATIC_CONFIG, LOCK_FILE, SOURCE_BUILTIN_IGNORE, TODO_PREFIX, analyzeProject, clearGitignore, copyLeaf, createAnalysisCache, createGitignoreFilter, dictionaryLocation, generateDictionaries, getLeafSource, getString, hasPath, hashSource, isStale, listLeaves, listLocales, loadDictionaryFile, loadProject, loadStaticProject, locationOf, parseDictionaryText, parseStaticConfig, readLock, readStaticConfig, relativeFile, renderDictionaryFile, renderGenerated, saveDictionaryFile, scanFiles, scanReferences, setString, startGenerateWatcher, toKey, writeLock };
1
+ import { A as scanFiles, B as listLeaves, D as BUILTIN_IGNORE, E as writeLock, F as locationOf, G as saveDictionaryFile, H as loadDictionaryFile, I as copyLeaf, K as TODO_PREFIX, L as setString, M as createAnalysisCache, N as dictionaryLocation, O as SOURCE_BUILTIN_IGNORE, P as getLeafSource, R as getString, U as parseDictionaryText, V as listLocales, W as renderDictionaryFile, _ as scanReferences, a as generateDictionaries, b as hashSource, c as DEFAULT_STATIC_CONFIG, g as DEFAULT_SOURCE_GLOB, h as relativeFile, j as clearGitignore, k as createGitignoreFilter, l as parseStaticConfig, m as analyzeProjectSync, n as loadStaticProject, o as startGenerateWatcher, p as analyzeProject, r as toKey, s as renderGenerated, t as loadProject, u as readStaticConfig, v as scanText, w as readLock, x as isStale, y as LOCK_FILE, z as hasPath } from "./project-BTpZGNjh.mjs";
2
+ export { BUILTIN_IGNORE, DEFAULT_SOURCE_GLOB, DEFAULT_STATIC_CONFIG, LOCK_FILE, SOURCE_BUILTIN_IGNORE, TODO_PREFIX, analyzeProject, analyzeProjectSync, clearGitignore, copyLeaf, createAnalysisCache, createGitignoreFilter, dictionaryLocation, generateDictionaries, getLeafSource, getString, hasPath, hashSource, isStale, listLeaves, listLocales, loadDictionaryFile, loadProject, loadStaticProject, locationOf, parseDictionaryText, parseStaticConfig, readLock, readStaticConfig, relativeFile, renderDictionaryFile, renderGenerated, saveDictionaryFile, scanFiles, scanReferences, scanText, setString, startGenerateWatcher, toKey, writeLock };