opencommit 1.0.9 → 1.0.11

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 (2) hide show
  1. package/out/cli.cjs +10 -4
  2. package/package.json +1 -1
package/out/cli.cjs CHANGED
@@ -15412,7 +15412,7 @@ function G3(t, e2) {
15412
15412
  // package.json
15413
15413
  var package_default = {
15414
15414
  name: "opencommit",
15415
- version: "1.0.8",
15415
+ version: "1.0.10",
15416
15416
  description: "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
15417
15417
  keywords: [
15418
15418
  "git",
@@ -17334,6 +17334,7 @@ if (!apiKey) {
17334
17334
  ce(
17335
17335
  "For help Look into README https://github.com/di-sukharev/opencommit#setup"
17336
17336
  );
17337
+ process.exit(1);
17337
17338
  }
17338
17339
  var OpenAi = class {
17339
17340
  constructor() {
@@ -17603,11 +17604,16 @@ Z2(
17603
17604
  ignoreArgv: (type) => type === "unknown-flag" || type === "argument",
17604
17605
  help: { description: package_default.description }
17605
17606
  },
17606
- () => {
17607
+ async () => {
17607
17608
  if (isHookCalled) {
17608
- prepareCommitMessageHook();
17609
+ await prepareCommitMessageHook();
17609
17610
  } else {
17610
- commit();
17611
+ await commit();
17612
+ const { stdout } = await execa("npm", ["view", "opencommit", "version"]);
17613
+ if (stdout !== package_default.version)
17614
+ ce(
17615
+ "new opencommit version is available, update with `npm i -g opencommit`"
17616
+ );
17611
17617
  }
17612
17618
  },
17613
17619
  rawArgv
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencommit",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
5
5
  "keywords": [
6
6
  "git",