@i18nprune/core 0.1.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 +165 -0
- package/dist/adapters-gp1lXp0T.d.ts +12 -0
- package/dist/capabilities-x74cD2Hu.d.ts +48 -0
- package/dist/cleanup.d.ts +64 -0
- package/dist/cleanup.js +3999 -0
- package/dist/config.d.ts +201 -0
- package/dist/config.js +2865 -0
- package/dist/coreContext-DMaWLvmB.d.ts +388 -0
- package/dist/fs-BUYD8ZhA.d.ts +20 -0
- package/dist/generate.d.ts +487 -0
- package/dist/generate.js +9389 -0
- package/dist/humanEmit-ygNlYX-S.d.ts +79 -0
- package/dist/index-BQuLEQ9b.d.ts +7 -0
- package/dist/index-B_ow_Xvr.d.ts +97 -0
- package/dist/index-BgG01AKL.d.ts +287 -0
- package/dist/index-CIzZl4W8.d.ts +124 -0
- package/dist/index-Csm1w7XD.d.ts +58 -0
- package/dist/index-DLwTogCo.d.ts +43 -0
- package/dist/index-DVT26v11.d.ts +61 -0
- package/dist/index-DdjljwMj.d.ts +39 -0
- package/dist/index-DeIw-cZd.d.ts +52 -0
- package/dist/index-X50E1FIX.d.ts +50 -0
- package/dist/index.d.ts +9180 -0
- package/dist/index.js +21888 -0
- package/dist/init.d.ts +86 -0
- package/dist/init.js +848 -0
- package/dist/listWindow-XEFxQZi1.d.ts +30 -0
- package/dist/localeTargetCodes-BBIQjauw.d.ts +11 -0
- package/dist/locales.d.ts +39 -0
- package/dist/locales.js +2288 -0
- package/dist/missing-BVCvgUC8.d.ts +10 -0
- package/dist/missing.d.ts +85 -0
- package/dist/missing.js +5892 -0
- package/dist/modeResolve-cGVaY5Hh.d.ts +25 -0
- package/dist/path-Bfn3SAts.d.ts +11 -0
- package/dist/profile-BwOP9WKh.d.ts +9 -0
- package/dist/providers-0uMEfT6q.d.ts +82 -0
- package/dist/prune-c6hKZCv_.d.ts +33 -0
- package/dist/quality.d.ts +36 -0
- package/dist/quality.js +3868 -0
- package/dist/report-D5-6bVFj.d.ts +8 -0
- package/dist/report-schema.d.ts +102 -0
- package/dist/report-schema.js +42 -0
- package/dist/resumeCandidates-xR13eEwt.d.ts +200 -0
- package/dist/root-2-kCaBvQ.d.ts +1110 -0
- package/dist/runtime/edge.d.ts +21 -0
- package/dist/runtime/edge.js +87 -0
- package/dist/runtime/helpers/sync.d.ts +16 -0
- package/dist/runtime/helpers/sync.js +117 -0
- package/dist/runtime/node.d.ts +24 -0
- package/dist/runtime/node.js +204 -0
- package/dist/runtime/web.d.ts +21 -0
- package/dist/runtime/web.js +84 -0
- package/dist/shared.d.ts +1177 -0
- package/dist/shared.js +4897 -0
- package/dist/sourceContext-1LQg3HiQ.d.ts +36 -0
- package/dist/sourceSurface-mDtwGo1E.d.ts +122 -0
- package/dist/sync.d.ts +86 -0
- package/dist/sync.js +4971 -0
- package/dist/syncSegment-Bx6He2Mu.d.ts +149 -0
- package/dist/targets-EmtKyr6F.d.ts +23 -0
- package/dist/template-CGM-_WLT.d.ts +139 -0
- package/dist/translate-CIHYp7wi.d.ts +77 -0
- package/dist/types/shared.d.ts +21 -0
- package/dist/types/shared.js +1 -0
- package/dist/types.d.ts +1345 -0
- package/dist/types.js +1 -0
- package/dist/validate.d.ts +126 -0
- package/dist/validate.js +3717 -0
- package/package.json +128 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const LIST_WINDOW_DEFAULT_TOP = 200;
|
|
2
|
+
declare const LIST_WINDOW_HARD_CAP = 10000;
|
|
3
|
+
/**
|
|
4
|
+
* Portable list window input that clients can map from flags, UI controls, or API params.
|
|
5
|
+
* `full` means "return as much as possible", still bounded by a hard cap for safety.
|
|
6
|
+
*/
|
|
7
|
+
type ListWindowInput = {
|
|
8
|
+
top?: number;
|
|
9
|
+
full?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ResolveListWindowOptions = {
|
|
12
|
+
defaultTop?: number;
|
|
13
|
+
hardCap?: number;
|
|
14
|
+
};
|
|
15
|
+
type ListWindowResolved = {
|
|
16
|
+
top: number;
|
|
17
|
+
full: boolean;
|
|
18
|
+
limit: number;
|
|
19
|
+
hardCap: number;
|
|
20
|
+
clamped: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Resolve portable list-window input into an engine-ready limit.
|
|
24
|
+
* Safety rule: limit never exceeds `hardCap` (including when `full=true`).
|
|
25
|
+
*/
|
|
26
|
+
declare function resolveListWindow(input: ListWindowInput | undefined, options?: ResolveListWindowOptions): ListWindowResolved;
|
|
27
|
+
/** Apply a resolved list window to an array. */
|
|
28
|
+
declare function applyListWindow<T>(items: readonly T[], window: ListWindowResolved): T[];
|
|
29
|
+
|
|
30
|
+
export { type ListWindowResolved as L, type ResolveListWindowOptions as R, LIST_WINDOW_DEFAULT_TOP as a, LIST_WINDOW_HARD_CAP as b, type ListWindowInput as c, applyListWindow as d, resolveListWindow as r };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { R as RuntimePathPort } from './path-Bfn3SAts.js';
|
|
2
|
+
|
|
3
|
+
type ResolveLocaleTargetCodesInput = {
|
|
4
|
+
commandName: string;
|
|
5
|
+
rawTarget: string;
|
|
6
|
+
localeSlugs: string[];
|
|
7
|
+
sourceLocalePath: string;
|
|
8
|
+
path: RuntimePathPort;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export type { ResolveLocaleTargetCodesInput as R };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { R as RuntimePathPort } from './path-Bfn3SAts.js';
|
|
2
|
+
import { S as SourceLocaleContext, L as LocaleListRow, R as ResolveResumeTargetCodesFromRawInput, A as AssertGenerateTargetCodesInput } from './sourceContext-1LQg3HiQ.js';
|
|
3
|
+
export { R as ResolveLocaleTargetCodesInput } from './localeTargetCodes-BBIQjauw.js';
|
|
4
|
+
import { P as ProjectFilesystemRuntime } from './capabilities-x74cD2Hu.js';
|
|
5
|
+
import { C as CoreContext } from './coreContext-DMaWLvmB.js';
|
|
6
|
+
export { A as ALL_LOCALES_TOKEN, i as isAllLocaleToken, a as parseLocaleCodesList, p as parseSyncLangSelection, b as pickTargetSelector, r as resolveLocaleTargetCodes, c as resolveTargetLocaleSlugs } from './targets-EmtKyr6F.js';
|
|
7
|
+
import './fs-BUYD8ZhA.js';
|
|
8
|
+
import './root-2-kCaBvQ.js';
|
|
9
|
+
import 'zod';
|
|
10
|
+
import './providers-0uMEfT6q.js';
|
|
11
|
+
import './adapters-gp1lXp0T.js';
|
|
12
|
+
|
|
13
|
+
/** Basename of the source locale file, normalized (e.g. `en`, `pt-br`). */
|
|
14
|
+
declare function getSourceLocaleSlug(path: RuntimePathPort, sourceLocalePath: string): string;
|
|
15
|
+
/** Normalized basename of the configured source locale file (same value used in CLI “source of truth” copy). */
|
|
16
|
+
declare function getDisplaySourceLocaleCode(ctx: SourceLocaleContext): string;
|
|
17
|
+
/** Styled, plain-string label; CLI can decorate this for terminal output. */
|
|
18
|
+
declare function buildSourceLocaleTruthLabel(displaySlug: string): string;
|
|
19
|
+
declare function isSourceLocaleSlug(path: RuntimePathPort, candidate: string, sourceLocalePath: string): boolean;
|
|
20
|
+
/** Slugs for **target** locales only — excludes the configured source-of-truth locale. */
|
|
21
|
+
declare function excludeSourceLocaleSlugs(path: RuntimePathPort, slugs: string[], sourceLocalePath: string): string[];
|
|
22
|
+
declare function assertNotSourceTargetLocale(command: string, lang: string, sourceLocalePath: string, ctx: SourceLocaleContext): void;
|
|
23
|
+
|
|
24
|
+
/** Basenames (without `.json`) of root-level locale JSON files under `localesDir`, excluding the source locale. */
|
|
25
|
+
declare function listOtherLocaleCodes(runtime: ProjectFilesystemRuntime, localesDir: string, sourceBase: string): string[];
|
|
26
|
+
|
|
27
|
+
declare function buildLocaleListRows(ctx: CoreContext, localeCodes: string[]): LocaleListRow[];
|
|
28
|
+
|
|
29
|
+
/** All non-source locale codes in the bundle (normalized), or throws if none. */
|
|
30
|
+
declare function resolveResumeAllTargetCodes(ctx: CoreContext, commandName: string): string[];
|
|
31
|
+
/**
|
|
32
|
+
* Resolves **`generate --resume`** targets from an explicit **`--target`** string (or interactive pick).
|
|
33
|
+
*/
|
|
34
|
+
declare function resolveResumeTargetCodesFromRaw(input: ResolveResumeTargetCodesFromRawInput): string[];
|
|
35
|
+
|
|
36
|
+
/** Validates generate targets: not source locale, and present in translation catalog. */
|
|
37
|
+
declare function assertGenerateTargetCodes(input: AssertGenerateTargetCodesInput): void;
|
|
38
|
+
|
|
39
|
+
export { AssertGenerateTargetCodesInput, LocaleListRow, ResolveResumeTargetCodesFromRawInput, SourceLocaleContext, assertGenerateTargetCodes, assertNotSourceTargetLocale, buildLocaleListRows, buildSourceLocaleTruthLabel, excludeSourceLocaleSlugs, getDisplaySourceLocaleCode, getSourceLocaleSlug, isSourceLocaleSlug, listOtherLocaleCodes, resolveResumeAllTargetCodes, resolveResumeTargetCodesFromRaw };
|