@dialexjs/cli 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +86 -3
- package/dist/api.d.mts +246 -0
- package/dist/api.d.mts.map +1 -0
- package/dist/api.mjs +2 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +1083 -0
- package/dist/index.mjs.map +1 -0
- package/dist/project-gkFBurqG.mjs +992 -0
- package/dist/project-gkFBurqG.mjs.map +1 -0
- package/dist/translate/index.d.mts +92 -0
- package/dist/translate/index.d.mts.map +1 -0
- package/dist/translate/index.mjs +289 -0
- package/dist/translate/index.mjs.map +1 -0
- package/package.json +50 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Halil Aydın
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @dialexjs/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
> High-performance CLI tool for Dialex internationalization (codegen, scaffolding, CI parity checking).
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@dialexjs/cli)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 📦 Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Locally in project (Recommended)
|
|
14
|
+
npm install -D @dialexjs/cli dialexjs
|
|
15
|
+
bun add -d @dialexjs/cli dialexjs
|
|
16
|
+
|
|
17
|
+
# Or globally
|
|
18
|
+
npm install -g @dialexjs/cli
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Binaries installed: `dialexjs` and alias `dx`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🛠️ Commands
|
|
26
|
+
|
|
27
|
+
### `dialex init`
|
|
28
|
+
|
|
29
|
+
Initialize or configure Dialex in any project:
|
|
30
|
+
|
|
31
|
+
- **Automatic Framework Detection**: Identifies Next.js, Fastify, Koa, Hono, Express, NestJS, Elysia, SvelteKit, Astro, Vue, Nuxt, and React/Vite.
|
|
32
|
+
- **Magicast AST Injection**: Manipulates `dialex.config.ts` and injects Vite plugins into `vite.config.ts` (React, Vue) and the module into `nuxt.config.ts` (Nuxt) cleanly.
|
|
33
|
+
- **Starter Dictionaries**: Emits typed starter dictionary and TypeScript declaration file.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Interactive:
|
|
37
|
+
dialex init
|
|
38
|
+
|
|
39
|
+
# Headless / CI:
|
|
40
|
+
dialex init --framework fastify --default-locale en --locales en,tr -y
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `dialex generate` (alias: `gen`)
|
|
44
|
+
|
|
45
|
+
Compiles `.content.ts` dictionaries into static TypeScript modules for zero-overhead server execution:
|
|
46
|
+
|
|
47
|
+
- Outputs `src/i18n.generated.ts` (static dictionary map).
|
|
48
|
+
- Outputs `src/dialex-env.d.ts` (type registry augmentation).
|
|
49
|
+
- **Watch Mode (`-w` / `--watch`)**: Continuously monitors dictionary changes and updates bundles instantaneously.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
dialex generate
|
|
53
|
+
dialex generate --watch
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `dialex export` / `dialex import`
|
|
57
|
+
|
|
58
|
+
Round-trip strings with translators as JSON, CSV or XLIFF 1.2, without editing TypeScript.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
dialex export -f xliff -o translations
|
|
62
|
+
dialex import translations/tr.xlf
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `dialex translate`
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
### `dialex check` (alias: `lint`)
|
|
70
|
+
|
|
71
|
+
CI verification command:
|
|
72
|
+
|
|
73
|
+
- Checks translation parity across all registered locales.
|
|
74
|
+
- Detects missing keys or untracked locale entries (including nested keys).
|
|
75
|
+
- Flags `getDictionary("x")` / `t("x.y")` calls that point at nothing, and warns about possibly unused keys.
|
|
76
|
+
- `--fix` inserts missing keys marked `[TODO]`; `--json` and `--github` produce machine-readable output.
|
|
77
|
+
- Exits with code `1` on parity errors, ideal for pre-commit hooks and GitHub Actions.
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
dialex check
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## 📄 License
|
|
86
|
+
|
|
87
|
+
MIT © [awaiden](https://github.com/awaiden)
|
package/dist/api.d.mts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { loadFile } from "magicast";
|
|
2
|
+
import { I18nConfig } 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 = {
|
|
17
|
+
type: string;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
export declare const TODO_PREFIX = "[TODO] ";
|
|
21
|
+
interface DictionaryFile {
|
|
22
|
+
file: string;
|
|
23
|
+
/** Dictionary name from `defineDictionary("name", ...)` or the `name` property, if literal. */
|
|
24
|
+
name?: string;
|
|
25
|
+
mod: Awaited<ReturnType<typeof loadFile>>;
|
|
26
|
+
/** The object whose keys are locales. */
|
|
27
|
+
localesObj: Node;
|
|
28
|
+
/** Whether the file ended with a newline when loaded; restored on save. */
|
|
29
|
+
endsWithNewline: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* `false` when part of the dictionary cannot be read statically (spreads, computed keys, or a
|
|
32
|
+
* locale whose content is not an object literal). Leaf lists and parity checks are unreliable
|
|
33
|
+
* for such files.
|
|
34
|
+
*/
|
|
35
|
+
complete: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** A zero-based line/column range, as used by editors. */
|
|
38
|
+
interface SourceRange {
|
|
39
|
+
start: {
|
|
40
|
+
line: number;
|
|
41
|
+
column: number;
|
|
42
|
+
};
|
|
43
|
+
end: {
|
|
44
|
+
line: number;
|
|
45
|
+
column: number;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
type LeafKind = "string" | "function" | "other";
|
|
49
|
+
interface Leaf {
|
|
50
|
+
path: string[];
|
|
51
|
+
kind: LeafKind;
|
|
52
|
+
/** Present when `kind` is `"string"`. */
|
|
53
|
+
value?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Parses dictionary source text (for example an unsaved editor buffer). Returns `undefined` when
|
|
57
|
+
* the file does not have an editable shape; throws on syntax errors.
|
|
58
|
+
*/
|
|
59
|
+
export declare function parseDictionaryText(file: string, text: string): DictionaryFile | undefined;
|
|
60
|
+
/** Loads a dictionary file; returns `undefined` when its shape is not editable. */
|
|
61
|
+
export declare function loadDictionaryFile(file: string): Promise<DictionaryFile | undefined>;
|
|
62
|
+
/** The source text with all edits applied, without writing anything. */
|
|
63
|
+
export declare function renderDictionaryFile(df: DictionaryFile): string;
|
|
64
|
+
export declare function saveDictionaryFile(df: DictionaryFile): Promise<void>;
|
|
65
|
+
export declare function listLocales(df: DictionaryFile): string[];
|
|
66
|
+
/** Lists every leaf (string, function, or other value) of a locale, in source order. */
|
|
67
|
+
export declare function listLeaves(df: DictionaryFile, locale: string): Leaf[];
|
|
68
|
+
export declare function hasPath(df: DictionaryFile, locale: string, path: string[]): boolean;
|
|
69
|
+
export declare function getString(df: DictionaryFile, locale: string, path: string[]): string | undefined;
|
|
70
|
+
type SetResult = "created" | "updated" | "skipped";
|
|
71
|
+
/**
|
|
72
|
+
* Sets a string value at `path`. Existing function or non-string values are left alone
|
|
73
|
+
* (`"skipped"`) because they cannot be translated as plain text.
|
|
74
|
+
*/
|
|
75
|
+
export declare function setString(df: DictionaryFile, locale: string, path: string[], value: string): SetResult;
|
|
76
|
+
/**
|
|
77
|
+
* Copies the leaf at `path` from one locale to another. String values can be rewritten with
|
|
78
|
+
* `mapString` (for example to add a `[TODO]` marker); other values are copied verbatim.
|
|
79
|
+
* Returns `false` when the source has no such leaf or the target already has one.
|
|
80
|
+
*/
|
|
81
|
+
export declare function copyLeaf(df: DictionaryFile, fromLocale: string, toLocale: string, path: string[], mapString?: (value: string) => string): boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Where a locale (no `path`) or a key within it is written. The range covers the property key, so
|
|
84
|
+
* it is a good place to attach a diagnostic or jump to.
|
|
85
|
+
*/
|
|
86
|
+
export declare function locationOf(df: DictionaryFile, locale: string, path?: string[]): SourceRange | undefined;
|
|
87
|
+
/** The source text of the dictionary object itself (the object whose keys are locales). */
|
|
88
|
+
export declare function dictionaryLocation(df: DictionaryFile): SourceRange | undefined;
|
|
89
|
+
/** The source code of a leaf's value (a function's source, or a string with its quotes). */
|
|
90
|
+
export declare function getLeafSource(df: DictionaryFile, locale: string, path: string[]): string | undefined;
|
|
91
|
+
//#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
|
+
*/
|
|
101
|
+
type IssueLevel = "error" | "warning" | "info";
|
|
102
|
+
type IssueCode = "invalid-dictionary" | "unanalyzable" | "missing-locale" | "missing-key" | "invalid-locale" | "todo-placeholder" | "invalid-icu" | "icu-args-mismatch" | "icu-plural-categories" | "unknown-dictionary" | "unknown-path" | "unused-key" | "unused-dictionary";
|
|
103
|
+
interface AnalysisIssue {
|
|
104
|
+
/** Absolute path of the file the issue is in. */
|
|
105
|
+
file: string;
|
|
106
|
+
level: IssueLevel;
|
|
107
|
+
code: IssueCode;
|
|
108
|
+
message: string;
|
|
109
|
+
/** Where to point, when known. Lines and columns are zero-based. */
|
|
110
|
+
range?: SourceRange;
|
|
111
|
+
/** The dictionary the issue is about, when it is about one. */
|
|
112
|
+
dictionary?: string;
|
|
113
|
+
locale?: string;
|
|
114
|
+
/** Key path within the dictionary. */
|
|
115
|
+
path?: string[];
|
|
116
|
+
/** For `missing-key`: a locale that has the key, to copy it from. */
|
|
117
|
+
sourceLocale?: string;
|
|
118
|
+
}
|
|
119
|
+
interface AnalysisConfig {
|
|
120
|
+
defaultLocale?: string;
|
|
121
|
+
locales?: string[];
|
|
122
|
+
include?: string | string[];
|
|
123
|
+
}
|
|
124
|
+
interface AnalysisOptions {
|
|
125
|
+
root: string;
|
|
126
|
+
config: AnalysisConfig;
|
|
127
|
+
/** Source globs to scan for dictionary references. Pass `[]` to skip scanning. */
|
|
128
|
+
src?: string[];
|
|
129
|
+
/** Import dictionaries the syntax tree cannot fully describe. Runs project code. */
|
|
130
|
+
runtime?: boolean;
|
|
131
|
+
/** Extra ignore globs, relative to `root`. */
|
|
132
|
+
ignore?: string[];
|
|
133
|
+
/** Report possibly unused keys and dictionaries. @default true */
|
|
134
|
+
unused?: boolean;
|
|
135
|
+
}
|
|
136
|
+
interface LeafInfo {
|
|
137
|
+
kind: "string" | "function" | "other";
|
|
138
|
+
value?: string;
|
|
139
|
+
}
|
|
140
|
+
interface AnalyzedDictionary {
|
|
141
|
+
name: string;
|
|
142
|
+
/** Absolute path. */
|
|
143
|
+
file: string;
|
|
144
|
+
/** Locales in source order. */
|
|
145
|
+
locales: string[];
|
|
146
|
+
/** `locale -> dotted path -> leaf` */
|
|
147
|
+
leaves: Map<string, Map<string, LeafInfo>>;
|
|
148
|
+
/** Union of dotted leaf paths across locales, in order of first appearance. */
|
|
149
|
+
paths: string[];
|
|
150
|
+
/** The parsed file, present when it was read statically. */
|
|
151
|
+
df?: DictionaryFile;
|
|
152
|
+
}
|
|
153
|
+
interface AnalysisResult {
|
|
154
|
+
issues: AnalysisIssue[];
|
|
155
|
+
dictionaries: AnalyzedDictionary[];
|
|
156
|
+
/** Absolute paths of every dictionary file that matched. */
|
|
157
|
+
files: string[];
|
|
158
|
+
sourceFilesScanned: number;
|
|
159
|
+
}
|
|
160
|
+
export declare const DEFAULT_SOURCE_GLOB = "**/*.{ts,tsx,js,jsx,mjs,cjs,vue,svelte,astro,mdx}";
|
|
161
|
+
interface Reference {
|
|
162
|
+
/** A dictionary name, or a full `dictionary.key.path`. */
|
|
163
|
+
kind: "dictionary" | "path";
|
|
164
|
+
value: string;
|
|
165
|
+
/** Offsets of the string's contents (without the quotes) in the scanned text. */
|
|
166
|
+
start: number;
|
|
167
|
+
end: number;
|
|
168
|
+
}
|
|
169
|
+
/** Finds `getDictionary("x")`-style and `t("x.y.z")` references in source text. */
|
|
170
|
+
export declare function scanReferences(text: string): Reference[];
|
|
171
|
+
export declare function analyzeProject(options: AnalysisOptions): Promise<AnalysisResult>;
|
|
172
|
+
/** Project root-relative path with forward slashes, for display. */
|
|
173
|
+
export declare function relativeFile(root: string, file: string): string;
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/utils/static-config.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* The parts of `dialex.config` that tooling needs, read **without running the file**. Editors must
|
|
178
|
+
* not execute workspace code (it may be untrusted), so values are read from the syntax tree and
|
|
179
|
+
* only literals are understood.
|
|
180
|
+
*/
|
|
181
|
+
interface StaticConfig {
|
|
182
|
+
defaultLocale: string;
|
|
183
|
+
locales: string[];
|
|
184
|
+
include: string | string[];
|
|
185
|
+
fallbacks: Record<string, string[]>;
|
|
186
|
+
prefixDefault: boolean;
|
|
187
|
+
lazy: boolean;
|
|
188
|
+
}
|
|
189
|
+
interface StaticConfigResult {
|
|
190
|
+
config: StaticConfig;
|
|
191
|
+
/** The file the values came from, if any. */
|
|
192
|
+
file?: string;
|
|
193
|
+
/** Things that could not be read statically, for example `locales: getLocales()`. */
|
|
194
|
+
notes: string[];
|
|
195
|
+
}
|
|
196
|
+
export declare const DEFAULT_STATIC_CONFIG: StaticConfig;
|
|
197
|
+
/** Reads a config file's source text. Exposed for tests and for unsaved buffers. */
|
|
198
|
+
export declare function parseStaticConfig(text: string, file?: string): StaticConfigResult;
|
|
199
|
+
/** Reads `dialex.config.*` (or `i18n.config.*`) from `root`, or from `configFile` if given. */
|
|
200
|
+
export declare function readStaticConfig(root: string, configFile?: string): StaticConfigResult;
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/utils/project.d.ts
|
|
203
|
+
interface ProjectDictionary {
|
|
204
|
+
/** Path relative to the project root. */
|
|
205
|
+
rel: string;
|
|
206
|
+
name: string;
|
|
207
|
+
df: DictionaryFile;
|
|
208
|
+
}
|
|
209
|
+
interface Project {
|
|
210
|
+
root: string;
|
|
211
|
+
config: I18nConfig;
|
|
212
|
+
dictionaries: ProjectDictionary[];
|
|
213
|
+
/** Dictionary files that could not be parsed into an editable shape. */
|
|
214
|
+
unsupported: string[];
|
|
215
|
+
/** Config values that could not be read statically (static loading only). */
|
|
216
|
+
notes: string[];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Resolves the config (running `dialex.config.*` through the loader, which executes it) and loads
|
|
220
|
+
* every dictionary file for AST-level reading and editing.
|
|
221
|
+
*/
|
|
222
|
+
export declare function loadProject(root: string, configFile?: string): Promise<Project>;
|
|
223
|
+
/**
|
|
224
|
+
* Like `loadProject`, but reads the config from the syntax tree without executing it. Use this in
|
|
225
|
+
* editors and anywhere project code must not run.
|
|
226
|
+
*/
|
|
227
|
+
export declare function loadStaticProject(root: string, configFile?: string): Promise<Project>;
|
|
228
|
+
/** `home` + `["nav", "about"]` -> `home.nav.about` */
|
|
229
|
+
export declare const toKey: (dictionary: string, keyPath: string[]) => string;
|
|
230
|
+
//#endregion
|
|
231
|
+
//#region src/commands/generate.d.ts
|
|
232
|
+
interface GenerateOptions {
|
|
233
|
+
cwd?: string;
|
|
234
|
+
watch?: boolean;
|
|
235
|
+
output?: string;
|
|
236
|
+
config?: string;
|
|
237
|
+
json?: boolean;
|
|
238
|
+
}
|
|
239
|
+
export declare function generateDictionaries(root: string, options?: GenerateOptions): {
|
|
240
|
+
files: string[];
|
|
241
|
+
outputPath: string;
|
|
242
|
+
dtsPath: string;
|
|
243
|
+
};
|
|
244
|
+
//#endregion
|
|
245
|
+
export type { AnalysisConfig, AnalysisIssue, AnalysisOptions, AnalysisResult, AnalyzedDictionary, DictionaryFile, GenerateOptions, IssueCode, IssueLevel, Leaf, LeafInfo, LeafKind, Project, ProjectDictionary, Reference, SourceRange, StaticConfig, StaticConfigResult };
|
|
246
|
+
//# sourceMappingURL=api.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.mts","names":[],"sources":["../src/utils/dictionary-edit.ts","../src/analysis.ts","../src/utils/static-config.ts","../src/utils/project.ts","../src/commands/generate.ts"],"mappings":";;;;;;;;;;;;;;;KAgBK;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,IAAI;;wBAahB,WAAW,IAAI,gBAAgB,iBAAiB;wBAoChD,QAAQ,IAAI,gBAAgB,gBAAgB;wBAI5C,UAAU,IAAI,gBAAgB,gBAAgB;KA+BlD;;;;;wBAMI,UACd,IAAI,gBACJ,gBACA,gBACA,gBACC;;;;;;wBAsBa,SACd,IAAI,gBACJ,oBACA,kBACA,gBACA,aAAa;;;;;wBAwCC,WACd,IAAI,gBACJ,gBACA,kBACC;;wBAMa,mBAAmB,IAAI,iBAAiB;;wBAKxC,cACd,IAAI,gBACJ,gBACA;;;;;;;;;;;KCnXU;KAEA;UAeK;;EAEf;EACA,OAAO;EACP,MAAM;EACN;;EAEA,QAAQ;;EAER;EACA;;EAEA;;EAEA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;UAGe;EACf;EACA;;UAGe;EACf;;EAEA;;EAEA;;EAEA,QAAQ,YAAY,YAAY;;EAEhC;;EAEA,KAAK;;UAGU;EACf,QAAQ;EACR,cAAc;;EAEd;EACA;;qBAKW;UAqBI;;EAEf;EACA;;EAEA;EACA;;;wBAIc,eAAe,eAAe;wBA4IxB,eAAe,SAAS,kBAAkB,QAAQ;;wBA+NxD,aAAa,cAAc;;;;;;;;UCte1B;EACf;EACA;EACA;EACA,WAAW;EACX;EACA;;UAGe;EACf,QAAQ;;EAER;;EAEA;;qBAMW,uBAAuB;;wBAiFpB,kBAAkB,cAAc,gBAA4B;;wBA8C5D,iBAAiB,cAAc,sBAAsB;;;UC5JpD;;EAEf;EACA;EACA,IAAI;;UAGW;EACf;EACA,QAAQ;EACR,cAAc;;EAEd;;EAEA;;;;;;wBAgCoB,YAAY,cAAc,sBAAsB,QAAQ;;;;;wBASxD,kBAAkB,cAAc,sBAAsB,QAAQ;;qBAMvE,QAAK,oBAAsB;;;UC7DvB;EACf;EACA;EACA;EACA;EACA;;wBAGc,qBACd,cACA,UAAS;EAET;EACA;EACA"}
|
package/dist/api.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { C as saveDictionaryFile, S as renderDictionaryFile, T as generateDictionaries, _ as listLeaves, a as parseStaticConfig, b as locationOf, c as analyzeProject, d as TODO_PREFIX, f as copyLeaf, g as hasPath, h as getString, i as DEFAULT_STATIC_CONFIG, l as relativeFile, m as getLeafSource, n as loadStaticProject, o as readStaticConfig, p as dictionaryLocation, r as toKey, s as DEFAULT_SOURCE_GLOB, t as loadProject, u as scanReferences, v as listLocales, w as setString, x as parseDictionaryText, y as loadDictionaryFile } from "./project-gkFBurqG.mjs";
|
|
2
|
+
export { DEFAULT_SOURCE_GLOB, DEFAULT_STATIC_CONFIG, TODO_PREFIX, analyzeProject, copyLeaf, dictionaryLocation, generateDictionaries, getLeafSource, getString, hasPath, listLeaves, listLocales, loadDictionaryFile, loadProject, loadStaticProject, locationOf, parseDictionaryText, parseStaticConfig, readStaticConfig, relativeFile, renderDictionaryFile, saveDictionaryFile, scanReferences, setString, toKey };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|