Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
refactor(cli): type the install test helper's shell param with the Shell union
jkomyno48f3ebe2a1e6
diff --git a/ts/packages/cli/src/commands/install.cmd.ts b/ts/packages/cli/src/commands/install.cmd.tsindex 6e22bf616..0a2cd903b 100644--- a/ts/packages/cli/src/commands/install.cmd.ts+++ b/ts/packages/cli/src/commands/install.cmd.ts@@ -33,7 +33,7 @@ const shellOpt = Options.choice('shell', SHELLS).pipe(// Types// ----------------------------------------------------------------------------type Shell = (typeof SHELLS)[number];+export type Shell = (typeof SHELLS)[number];interface ShellConfig {readonly shell: Shell;diff --git a/ts/packages/cli/test/src/commands/install.cmd.test.ts b/ts/packages/cli/test/src/commands/install.cmd.test.tsindex ff98d4adb..dee1edb4a 100644--- a/ts/packages/cli/test/src/commands/install.cmd.test.ts+++ b/ts/packages/cli/test/src/commands/install.cmd.test.ts@@ -5,7 +5,7 @@ import { describe, expect, layer } from '@effect/vitest';import { Effect, Exit } from 'effect';import { FileSystem } from '@effect/platform';import { NodeOs } from 'src/services/node-os';-import { installShellIntegration } from 'src/commands/install.cmd';+import { installShellIntegration, type Shell } from 'src/commands/install.cmd';import { makeTerminalUI } from 'src/services/terminal-ui';import { cli, TestLive, MockConsole } from 'test/__utils__';@@ -39,13 +39,13 @@ const install = (params: {readonly completions?: boolean;readonly execPath?: string;- readonly shell?: string;+ readonly shell?: Shell;} = {}) =>installShellIntegration({completions: params.completions ?? false,execPath: params.execPath ?? TEST_EXEC_PATH,- shell: params.shell as 'zsh' | 'bash' | 'fish' | undefined,+ shell: params.shell,});// NOTE: `@effect/vitest`'s `layer(...)` builds one shared TestLive instance