-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2403878
commit ca714b5
Showing
2 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Command } from "@commander-js/extra-typings"; | ||
import { Logger } from "npmlog"; | ||
import type { DebugLog } from "../domain/logging"; | ||
import type { ReadTextFile } from "../io/fs"; | ||
import { withErrorLogger } from "./error-logging"; | ||
|
||
/** | ||
* Makes the `openupm ls` cli command with the given dependencies. | ||
* @param readTextFile IO function for reading a text file. | ||
* @param debugLog IO function for debug-logs. | ||
* @param log Logger for cli output. | ||
* @returns The command. | ||
*/ | ||
export function makeLsCmd( | ||
readTextFile: ReadTextFile, | ||
debugLog: DebugLog, | ||
log: Logger | ||
) { | ||
return new Command("ls") | ||
.aliases(["list"]) | ||
.summary("list all currently installed packages") | ||
.description( | ||
`Print the names and versions of all installed packages. | ||
openupm ls` | ||
) | ||
.action(withErrorLogger(log, async function (options) {})); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters