mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
* add ollama support --------- Co-authored-by: di-sukharev <dim.sukharev@gmail.com> Co-authored-by: GPT10 <57486732+di-sukharev@users.noreply.github.com> Co-authored-by: Jaroslaw Weber <jaroslaw.weber@adriel.com>
14 lines
377 B
TypeScript
14 lines
377 B
TypeScript
import { outro } from "@clack/prompts";
|
|
import { execa } from "execa";
|
|
|
|
export const getOpenCommitLatestVersion = async (): Promise<
|
|
string | undefined
|
|
> => {
|
|
try {
|
|
const { stdout } = await execa('npm', ['view', 'opencommit', 'version']);
|
|
return stdout;
|
|
} catch (_) {
|
|
outro('Error while getting the latest version of opencommit');
|
|
return undefined;
|
|
}
|
|
}; |