@devries-cameron20 / composio-1 / commits / 48f3ebe2a
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor(cli): type the install test helper's shell param with the Shell union

The helper widened shell to string and cast it back to the union, bypassing the checker. Export Shell from install.cmd.ts and use it directly.

jkomyno committed Aug 3, 2026 at 20:26 UTC 48f3ebe2a1e63dcce48ea1a9f8171b8b6dc3aa45
2 files changed +4 -4
ts/packages/cli/src/commands/install.cmd.ts
+1 -1
@@ -33,7 +33,7 @@ const shellOpt = Options.choice('shell', SHELLS).pipe(
33 // Types
34 // ---------------------------------------------------------------------------
35
36 -type Shell = (typeof SHELLS)[number];
36 +export type Shell = (typeof SHELLS)[number];
37
38 interface ShellConfig {
39 readonly shell: Shell;
ts/packages/cli/test/src/commands/install.cmd.test.ts
+3 -3
@@ -5,7 +5,7 @@ import { describe, expect, layer } from '@effect/vitest';
5 import { Effect, Exit } from 'effect';
6 import { FileSystem } from '@effect/platform';
7 import { NodeOs } from 'src/services/node-os';
8 -import { installShellIntegration } from 'src/commands/install.cmd';
8 +import { installShellIntegration, type Shell } from 'src/commands/install.cmd';
9 import { makeTerminalUI } from 'src/services/terminal-ui';
10 import { cli, TestLive, MockConsole } from 'test/__utils__';
11
@@ -39,13 +39,13 @@ const install = (
39 params: {
40 readonly completions?: boolean;
41 readonly execPath?: string;
42 - readonly shell?: string;
42 + readonly shell?: Shell;
43 } = {}
44 ) =>
45 installShellIntegration({
46 completions: params.completions ?? false,
47 execPath: params.execPath ?? TEST_EXEC_PATH,
48 - shell: params.shell as 'zsh' | 'bash' | 'fish' | undefined,
48 + shell: params.shell,
49 });
50
51 // NOTE: `@effect/vitest`'s `layer(...)` builds one shared TestLive instance