@vocoder/cli 0.12.0 → 0.12.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 +3 -3
- package/dist/bin.mjs +31 -62
- package/dist/bin.mjs.map +1 -1
- package/dist/{chunk-XUCVAFBG.mjs → chunk-2Q3JPWWV.mjs} +5 -5
- package/dist/{chunk-XUCVAFBG.mjs.map → chunk-2Q3JPWWV.mjs.map} +1 -1
- package/dist/lib.d.mts +7 -6
- package/dist/lib.mjs +1 -1
- package/dist/lib.mjs.map +1 -1
- package/package.json +3 -3
package/dist/lib.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Supported app industry classifications.
|
|
3
|
-
* Set once in vocoder.config.ts; synced to
|
|
3
|
+
* Set once in vocoder.config.ts; synced to App at extraction time.
|
|
4
4
|
* Cannot be edited from the dashboard — config file is the source of truth.
|
|
5
5
|
*
|
|
6
6
|
* Keep in sync with APP_INDUSTRIES in
|
|
@@ -32,13 +32,13 @@ interface VocoderConfig {
|
|
|
32
32
|
* The industry or domain of this application.
|
|
33
33
|
* Used to improve translation quality for domain-specific terminology
|
|
34
34
|
* and to isolate cache entries by industry in the global translation cache.
|
|
35
|
-
* Synced to
|
|
35
|
+
* Synced to App at extraction time.
|
|
36
36
|
*/
|
|
37
37
|
appIndustry?: AppIndustry;
|
|
38
38
|
/**
|
|
39
39
|
* Project-wide default formality level for translations.
|
|
40
40
|
* Can be overridden per-string via <T formality="..."> on the AI plan.
|
|
41
|
-
* Synced to
|
|
41
|
+
* Synced to App at extraction time.
|
|
42
42
|
*/
|
|
43
43
|
formality?: Formality;
|
|
44
44
|
}
|
|
@@ -266,7 +266,7 @@ declare class VocoderAPI {
|
|
|
266
266
|
requestedMaxWaitMs?: number;
|
|
267
267
|
clientRunId?: string;
|
|
268
268
|
force?: boolean;
|
|
269
|
-
/** From vocoder.config.ts — synced to
|
|
269
|
+
/** From vocoder.config.ts — synced to App on every push */
|
|
270
270
|
appIndustry?: string;
|
|
271
271
|
}, repoIdentity?: RepoIdentityPayload): Promise<TranslationBatchResponse>;
|
|
272
272
|
/**
|
|
@@ -482,10 +482,10 @@ declare class VocoderAPI {
|
|
|
482
482
|
hasWholeRepoApp: boolean;
|
|
483
483
|
}>;
|
|
484
484
|
/**
|
|
485
|
-
* Add a new
|
|
485
|
+
* Add a new App to an existing project (monorepo: new app directory).
|
|
486
486
|
* Does not check plan limits — no new project is created.
|
|
487
487
|
*/
|
|
488
|
-
|
|
488
|
+
createApp(userToken: string, params: {
|
|
489
489
|
projectId: string;
|
|
490
490
|
appDir: string;
|
|
491
491
|
sourceLocale: string;
|
|
@@ -561,6 +561,7 @@ declare function getSetupSnippets(params: {
|
|
|
561
561
|
ecosystem: DetectedEcosystem;
|
|
562
562
|
sourceLocale: string;
|
|
563
563
|
targetBranches: string[];
|
|
564
|
+
appDir?: string;
|
|
564
565
|
}): SetupSnippets;
|
|
565
566
|
|
|
566
567
|
export { type APIProjectConfig, type AuthData, type DetectedEcosystem, type DetectedFramework, type ExtractedString, type LimitErrorResponse, type LocalDetectionResult, type LocaleInfo, type LocalesMap, type PackageManager, type SetupSnippets, type StoredAuthStatus, StringExtractor, type SyncPolicyConfig, type SyncPolicyErrorResponse, type TranslationBatchResponse, type TranslationSnapshotResponse, type TranslationStatusResponse, VocoderAPI, VocoderAPIError, type VocoderConfig, buildInstallCommand, clearAuthData, defineConfig, detectLocalEcosystem, getPackagesToInstall, getSetupSnippets, loadVocoderConfig, readAuthData, verifyStoredAuth, writeAuthData };
|
package/dist/lib.mjs
CHANGED
package/dist/lib.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../config/src/index.ts"],"sourcesContent":["/**\n * Supported app industry classifications.\n * Set once in vocoder.config.ts; synced to
|
|
1
|
+
{"version":3,"sources":["../../config/src/index.ts"],"sourcesContent":["/**\n * Supported app industry classifications.\n * Set once in vocoder.config.ts; synced to App at extraction time.\n * Cannot be edited from the dashboard — config file is the source of truth.\n *\n * Keep in sync with APP_INDUSTRIES in\n * vocoder-app/lib/vocoder/translation/context-constants.ts.\n */\nexport type AppIndustry =\n\t| \"ecommerce\"\n\t| \"saas\"\n\t| \"healthcare\"\n\t| \"fintech\"\n\t| \"gaming\"\n\t| \"education\"\n\t| \"media\"\n\t| \"productivity\";\n\n/**\n * Translation formality level.\n * Can be set project-wide in vocoder.config.ts or overridden per-string\n * via <T formality=\"formal\"> (requires allowAiTranslations plan).\n */\nexport type Formality = \"formal\" | \"informal\" | \"neutral\";\n\nexport interface VocoderConfig {\n\t/** Glob patterns for files to extract strings from. */\n\tinclude?: string[];\n\t/** Glob patterns to exclude. */\n\texclude?: string[];\n\t/**\n\t * Git branches that trigger string extraction and translation.\n\t * Synced to the Vocoder dashboard on each push — change here to update.\n\t */\n\ttargetBranches?: string[];\n\t/**\n\t * Directory to write translated locale files after sync (optional).\n\t * If set, `vocoder sync` writes {locale}.json files to this path.\n\t */\n\tlocalesPath?: string;\n\t/**\n\t * The industry or domain of this application.\n\t * Used to improve translation quality for domain-specific terminology\n\t * and to isolate cache entries by industry in the global translation cache.\n\t * Synced to App at extraction time.\n\t */\n\tappIndustry?: AppIndustry;\n\t/**\n\t * Project-wide default formality level for translations.\n\t * Can be overridden per-string via <T formality=\"...\"> on the AI plan.\n\t * Synced to App at extraction time.\n\t */\n\tformality?: Formality;\n}\n\n/** Type helper for vocoder.config.ts — provides autocomplete and type checking. */\nexport function defineConfig(config: VocoderConfig): VocoderConfig {\n\treturn config;\n}\n\n/**\n * Canonical translation bundle format shared by the build plugin and CLI.\n * Both read and write this shape — keeps cache files identical regardless of\n * which tool produced them.\n *\n * translations: locale → sourceKey (hash) → translated text\n * config.locales: locale metadata snapshot for the runtime\n */\nexport interface VocoderTranslationData {\n\tconfig: {\n\t\tsourceLocale: string;\n\t\ttargetLocales: string[];\n\t\tlocales: Record<string, {\n\t\t\tnativeName: string;\n\t\t\tdir?: \"rtl\";\n\t\t\tcurrencyCode?: string;\n\t\t\tordinalForms?: { type: \"suffix\"; suffixes: { zero?: string; one?: string; two?: string; few?: string; many?: string; other: string } } | { type: \"word\"; words: Record<string, Record<number, string>> };\n\t\t}>;\n\t};\n\ttranslations: Record<string, Record<string, string>>;\n\tupdatedAt: string | null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAwDO,SAAS,aAAa,QAAsC;AAClE,SAAO;AACR;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vocoder/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "CLI tool for Vocoder translation workflow",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"tsup": "^8.0.0",
|
|
52
52
|
"typescript": "^5.4.0",
|
|
53
53
|
"vitest": "^1.0.0",
|
|
54
|
-
"@vocoder/extractor": "0.12.
|
|
55
|
-
"@vocoder/config": "0.12.
|
|
54
|
+
"@vocoder/extractor": "0.12.2",
|
|
55
|
+
"@vocoder/config": "0.12.2"
|
|
56
56
|
},
|
|
57
57
|
"engines": {
|
|
58
58
|
"node": ">=18"
|