-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcompletion-handlers.ts
More file actions
33 lines (31 loc) · 1015 Bytes
/
completion-handlers.ts
File metadata and controls
33 lines (31 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* Main entry point for package manager completion handlers
* Delegates to specific package manager handlers
*/
import type { PackageManagerCompletion } from './package-manager-completion.js';
import { setupPnpmCompletions } from './handlers/pnpm-handler.js';
import { setupNpmCompletions } from './handlers/npm-handler.js';
import { setupYarnCompletions } from './handlers/yarn-handler.js';
import { setupBunCompletions } from './handlers/bun-handler.js';
export async function setupCompletionForPackageManager(
packageManager: string,
completion: PackageManagerCompletion
): Promise<void> {
switch (packageManager) {
case 'pnpm':
await setupPnpmCompletions(completion);
break;
case 'npm':
await setupNpmCompletions(completion);
break;
case 'yarn':
await setupYarnCompletions(completion);
break;
case 'bun':
await setupBunCompletions(completion);
break;
default:
// silently ignore unknown package managers
break;
}
}