diff --git a/schema.json b/schema.json index 24b6874a..5355333a 100644 --- a/schema.json +++ b/schema.json @@ -25,34 +25,37 @@ } }, "path": { + "description": "Path to folder with localization files for push/pull commands.", "type": "string" }, "format": { + "description": "Format of the exported files.", "type": "string" }, "languages": { + "description": "List of languages to pull. Leave unspecified to export them all.", "type": "array", "items": { "type": "string" } }, "states": { + "description": "List of translation states to include. Defaults all except untranslated.", "type": "array", "items": { "enum": ["UNTRANSLATED", "TRANSLATED", "REVIEWED"] } }, "delimiter": { + "description": "Structure delimiter to use. By default, Tolgee interprets `.` as a nested structure. You can change the delimiter, or disable structure formatting by not specifying any value to the option.", "type": ["string", "null"] }, "namespaces": { + "description": "List of namespaces to pull. Defaults to all namespaces.", "type": "array", "items": { "type": "string" } - }, - "sdk": { - "enum": ["react", "vue", "svelte"] } } } diff --git a/src/commands/push.ts b/src/commands/push.ts index 84182501..52f3aa8b 100644 --- a/src/commands/push.ts +++ b/src/commands/push.ts @@ -175,9 +175,6 @@ export default (config: Schema) => .name('push') .description('Pushes translations to Tolgee') .argument('[path]', 'Path to the files to push to Tolgee') - .addOption( - new Option('-p, --path [path]', 'Path to the files to push to Tolgee') - ) .addOption( new Option( '-f, --force-mode ', diff --git a/src/schema.d.ts b/src/schema.d.ts index 0a8e9dab..1f924313 100644 --- a/src/schema.d.ts +++ b/src/schema.d.ts @@ -26,12 +26,29 @@ export interface Schema { * File glob patterns to include */ patterns?: string[]; + /** + * Path to folder with localization files for push/pull commands. + */ path?: string; + /** + * Format of the exported files. + */ format?: string; + /** + * List of languages to pull. Leave unspecified to export them all. + */ languages?: string[]; + /** + * List of translation states to include. Defaults all except untranslated. + */ states?: ("UNTRANSLATED" | "TRANSLATED" | "REVIEWED")[]; + /** + * Structure delimiter to use. By default, Tolgee interprets `.` as a nested structure. You can change the delimiter, or disable structure formatting by not specifying any value to the option. + */ delimiter?: string | null; + /** + * List of namespaces to pull. Defaults to all namespaces. + */ namespaces?: string[]; - sdk?: "react" | "vue" | "svelte"; [k: string]: unknown; } diff --git a/test/__fixtures__/invalidTolgeeRcSdk/.tolgeerc b/test/__fixtures__/invalidTolgeeRcSdk/.tolgeerc deleted file mode 100644 index b92adb9c..00000000 --- a/test/__fixtures__/invalidTolgeeRcSdk/.tolgeerc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "sdk": "azeaeza" -} diff --git a/test/unit/config.test.ts b/test/unit/config.test.ts index 898487c5..42d469b6 100644 --- a/test/unit/config.test.ts +++ b/test/unit/config.test.ts @@ -191,12 +191,4 @@ describe('.tolgeerc', () => { cwd.mockReturnValue(testWd); return expect(loadTolgeeRc()).rejects.toThrow('projectId'); }); - - it('rejects invalid SDK', async () => { - const testWd = fileURLToPath( - new URL('./invalidTolgeeRcSdk', FIXTURES_PATH) - ); - cwd.mockReturnValue(testWd); - return expect(loadTolgeeRc()).rejects.toThrow('sdk'); - }); });