aicommits 0.0.4 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -0
  2. package/lib.js +6 -3
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -23,6 +23,8 @@ It currently can only support git diffs of up to 200 lines of code. I'm working
23
23
  Now:
24
24
 
25
25
  - Rewrite this in node to publish as an npm package
26
+ - Fix screenshot on npm
27
+ - add an npm ignore and add demo to README as well
26
28
 
27
29
  Future tasks:
28
30
 
package/lib.js CHANGED
@@ -1,9 +1,10 @@
1
1
  #!/usr/bin/env node
2
- const { execSync, spawn } = require("child_process");
3
- let OPENAI_API_KEY = process.env.OPENAI_API_KEY;
2
+
3
+ import { execSync } from "child_process";
4
4
  import inquirer from "inquirer";
5
+ let OPENAI_API_KEY = process.env.OPENAI_API_KEY;
5
6
 
6
- export async function main() {
7
+ async function main() {
7
8
  console.log("Welcome to AICommit!");
8
9
  if (!OPENAI_API_KEY) {
9
10
  console.error(
@@ -91,3 +92,5 @@ async function generateCommitMessage(prompt) {
91
92
 
92
93
  return aiCommit.replace(/(\r\n|\n|\r)/gm, "");
93
94
  }
95
+
96
+ await main();
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "aicommits",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Writes your git commit messages for you with AI",
5
5
  "main": "cli.js",
6
6
  "bin": {
7
- "gpt-commit": "./cli.js"
7
+ "aicommits": "./cli.js"
8
8
  },
9
+ "type": "module",
9
10
  "repository": "https://github.com/Nutlope/aicommits",
10
11
  "author": "Hassan El Mghari (@nutlope)",
11
12
  "license": "MIT",