fixed bugs
This commit is contained in:
11
lib.js
11
lib.js
@@ -1,9 +1,10 @@
|
||||
#!/usr/bin/env node
|
||||
const { execSync, spawn } = require("child_process");
|
||||
let OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
||||
import inquirer from "inquirer";
|
||||
|
||||
export async function main() {
|
||||
import { execSync } from "child_process";
|
||||
import inquirer from "inquirer";
|
||||
let OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
||||
|
||||
async function main() {
|
||||
console.log("Welcome to AICommit!");
|
||||
if (!OPENAI_API_KEY) {
|
||||
console.error(
|
||||
@@ -91,3 +92,5 @@ async function generateCommitMessage(prompt) {
|
||||
|
||||
return aiCommit.replace(/(\r\n|\n|\r)/gm, "");
|
||||
}
|
||||
|
||||
await main();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "aicommits",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.6",
|
||||
"description": "Writes your git commit messages for you with AI",
|
||||
"main": "cli.js",
|
||||
"bin": {
|
||||
"aicommits": "./cli.js"
|
||||
},
|
||||
"type": "module",
|
||||
"repository": "https://github.com/Nutlope/aicommits",
|
||||
"author": "Hassan El Mghari (@nutlope)",
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user