diff --git a/package-lock.json b/package-lock.json index b3bde6e..3437f70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@elevenlabs/cli", - "version": "0.1.0", + "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@elevenlabs/cli", - "version": "0.1.0", + "version": "0.1.1", "license": "MIT", "dependencies": { "@elevenlabs/elevenlabs-js": "2.18.0", diff --git a/package.json b/package.json index ad54536..2513281 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@elevenlabs/cli", - "version": "0.1.0", + "version": "0.1.1", "description": "CLI tool to manage ElevenLabs agents", "type": "module", "keywords": [ diff --git a/src/agents/commands/index.ts b/src/agents/commands/index.ts index c9dfc89..f895330 100644 --- a/src/agents/commands/index.ts +++ b/src/agents/commands/index.ts @@ -25,7 +25,7 @@ export function createAgentsCommand(): Command { agents.option('-h, --help', 'Display help information'); // Custom action when agents command is run without subcommands - agents.action(async (options) => { + agents.action(async () => { const { waitUntilExit } = render( React.createElement(AgentsHelpView) ); diff --git a/src/agents/commands/utils.ts b/src/agents/commands/utils.ts index 6f40989..b733213 100644 --- a/src/agents/commands/utils.ts +++ b/src/agents/commands/utils.ts @@ -20,7 +20,7 @@ export async function getAgentName(configPath: string): Promise { return config.name || 'Unnamed Agent'; } return 'Unknown Agent'; - } catch (error) { + } catch { return 'Unknown Agent'; } } diff --git a/src/auth/commands/index.ts b/src/auth/commands/index.ts index c4e737a..988af80 100644 --- a/src/auth/commands/index.ts +++ b/src/auth/commands/index.ts @@ -19,7 +19,7 @@ export function createAuthCommand(): Command { auth.option('-h, --help', 'Display help information'); // Custom action when auth command is run without subcommands - auth.action(async (options) => { + auth.action(async () => { const { waitUntilExit } = render( React.createElement(AuthHelpView) ); diff --git a/src/components/commands/add.ts b/src/components/commands/add.ts index 4966d6e..4ccf83d 100644 --- a/src/components/commands/add.ts +++ b/src/components/commands/add.ts @@ -1,5 +1,6 @@ import { Command } from 'commander'; import { spawnSync } from 'child_process'; +import { URL } from 'url'; export function createAddCommand(): Command { return new Command('add') diff --git a/src/components/commands/index.ts b/src/components/commands/index.ts index b679a9d..c477ef8 100644 --- a/src/components/commands/index.ts +++ b/src/components/commands/index.ts @@ -16,7 +16,7 @@ export function createComponentsCommand(): Command { components.option('-h, --help', 'Display help information'); // Custom action when components command is run without subcommands - components.action(async (options) => { + components.action(async () => { const { waitUntilExit } = render( React.createElement(ComponentsHelpView) ); diff --git a/src/shared/auth.ts b/src/shared/auth.ts index f666a8f..df653f9 100644 --- a/src/shared/auth.ts +++ b/src/shared/auth.ts @@ -78,7 +78,7 @@ async function migrateLegacyApiKey(): Promise { // Remove legacy file await fs.remove(legacyFile); - } catch (error) { + } catch { // If migration fails, silently continue } } @@ -97,7 +97,7 @@ async function loadApiKeys(): Promise { const content = await fs.readFile(keysFile, 'utf-8'); return JSON.parse(content) as ApiKeysStorage; } - } catch (error) { + } catch { // If file is corrupted, start fresh } @@ -142,7 +142,7 @@ export async function retrieveApiKey(environment: string = 'prod'): Promise } else { await saveApiKeys(storage); } - } catch (error) { + } catch { // Ignore errors } } @@ -186,7 +186,7 @@ export async function listEnvironments(): Promise { try { const storage = await loadApiKeys(); return Object.keys(storage); - } catch (error) { + } catch { return []; } } \ No newline at end of file diff --git a/src/shared/config.ts b/src/shared/config.ts index 1a4968c..9369362 100644 --- a/src/shared/config.ts +++ b/src/shared/config.ts @@ -43,7 +43,7 @@ export async function loadConfig(): Promise { const configContent = await fs.readFile(configPath, 'utf-8'); return JSON.parse(configContent); } - } catch (error) { + } catch { // If config file is corrupted or unreadable, start fresh console.warn('Warning: Config file corrupted, starting fresh'); } diff --git a/src/tests/commands/impl.ts b/src/tests/commands/impl.ts index 31e1408..1da33fe 100644 --- a/src/tests/commands/impl.ts +++ b/src/tests/commands/impl.ts @@ -50,7 +50,7 @@ async function addTest(name: string, templateType: string = "basic-llm", environ try { testsConfig = await readConfig(testsConfigPath); - } catch (error) { + } catch { // Initialize tests.json if it doesn't exist testsConfig = { tests: [] }; await writeConfig(testsConfigPath, testsConfig); @@ -242,7 +242,7 @@ async function pullTestsFromEnvironment(options: { test?: string; outputDir: str try { testsConfig = await readConfig(testsConfigPath); - } catch (error) { + } catch { testsConfig = { tests: [] }; await writeConfig(testsConfigPath, testsConfig); console.log(`Created ${TESTS_CONFIG_FILE}`); diff --git a/src/tests/commands/index.ts b/src/tests/commands/index.ts index 0300213..c6712f7 100644 --- a/src/tests/commands/index.ts +++ b/src/tests/commands/index.ts @@ -19,7 +19,7 @@ export function createTestsCommand(): Command { tests.option('-h, --help', 'Display help information'); // Custom action when tests command is run without subcommands - tests.action(async (options) => { + tests.action(async () => { const { waitUntilExit } = render( React.createElement(TestsHelpView) ); diff --git a/src/tools/commands/impl.ts b/src/tools/commands/impl.ts index ac168a7..ca77181 100644 --- a/src/tools/commands/impl.ts +++ b/src/tools/commands/impl.ts @@ -45,7 +45,7 @@ async function addTool(name: string, type: 'webhook' | 'client', configPath?: st try { toolsConfig = await readToolsConfig(toolsConfigPath); - } catch (error) { + } catch { // Initialize tools.json if it doesn't exist toolsConfig = { tools: [] }; await writeToolsConfig(toolsConfigPath, toolsConfig); diff --git a/src/tools/commands/index.ts b/src/tools/commands/index.ts index 25019b0..45b15cc 100644 --- a/src/tools/commands/index.ts +++ b/src/tools/commands/index.ts @@ -19,7 +19,7 @@ export function createToolsCommand(): Command { tools.option('-h, --help', 'Display help information'); // Custom action when tools command is run without subcommands - tools.action(async (options) => { + tools.action(async () => { const { waitUntilExit } = render( React.createElement(ToolsHelpView) );