opencommit 1.0.2 → 1.0.3

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 +7 -3
  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.1",
15415
+ version: "1.0.2",
15416
15416
  description: "AI generates conventional commits with mind-blowing accuracy.",
15417
15417
  keywords: [
15418
15418
  "git",
@@ -17497,7 +17497,11 @@ var prepareCommitMessageHook = async () => {
17497
17497
  );
17498
17498
  if (typeof commitMessage !== "string")
17499
17499
  throw new Error(commitMessage.error);
17500
- await import_promises2.default.appendFile(messageFilePath, commitMessage);
17500
+ const fileContent = await import_promises2.default.readFile(messageFilePath);
17501
+ await import_promises2.default.writeFile(
17502
+ messageFilePath,
17503
+ commitMessage + "\n" + fileContent.toString()
17504
+ );
17501
17505
  ce(`${source_default.green("\u2714")} commit done`);
17502
17506
  } catch (error) {
17503
17507
  ce(`${source_default.red("\u2716")} ${error}`);
@@ -17553,7 +17557,7 @@ async function commit(isStageAllFlag = false) {
17553
17557
  ce(
17554
17558
  `${source_default.red("Nothing to commit")} \u2014 stage the files ${source_default.hex("0000FF").bold("`git add .`")} and rerun ${source_default.hex("0000FF").bold("`oc`")} command.`
17555
17559
  );
17556
- stagedFilesSpinner.stop("Counting staged files");
17560
+ stagedFilesSpinner.stop("No files are staged");
17557
17561
  const isStageAllAndCommitConfirmedByUser = await Q2({
17558
17562
  message: "Do you want to stage all files and generate commit message?"
17559
17563
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencommit",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "AI generates conventional commits with mind-blowing accuracy.",
5
5
  "keywords": [
6
6
  "git",