mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-12 23:28:16 -05:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75fa04efd4 | ||
|
|
93019139fb | ||
|
|
ce47c1fe81 | ||
|
|
a880dd6bd2 | ||
|
|
f193bb1d96 | ||
|
|
4cc34dfa5f | ||
|
|
d034238505 | ||
|
|
25acb1c219 | ||
|
|
44c9d48eae | ||
|
|
702eab9ec0 | ||
|
|
e8be3858ab | ||
|
|
50e7cd3576 |
35
out/cli.cjs
35
out/cli.cjs
@@ -16272,7 +16272,7 @@ function G3(t, e2) {
|
||||
// package.json
|
||||
var package_default = {
|
||||
name: "opencommit",
|
||||
version: "2.0.19",
|
||||
version: "2.2.1",
|
||||
description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
|
||||
keywords: [
|
||||
"git",
|
||||
@@ -16313,7 +16313,7 @@ var package_default = {
|
||||
start: "node ./out/cli.cjs",
|
||||
dev: "ts-node ./src/cli.ts",
|
||||
build: "rimraf out && node esbuild.config.js",
|
||||
deploy: "npm run build && npm version patch && npm publish --tag latest",
|
||||
deploy: "npm run build:push && npm version patch && git push && git push --tags && npm publish --tag latest",
|
||||
"build:push": "npm run build && git add . && git commit -m 'build' && git push",
|
||||
lint: "eslint src --ext ts && tsc --noEmit",
|
||||
format: "prettier --write src"
|
||||
@@ -21732,6 +21732,17 @@ var OpenAi = class {
|
||||
}
|
||||
};
|
||||
};
|
||||
var getOpenCommitLatestVersion = async () => {
|
||||
try {
|
||||
const { data } = await axios_default.get(
|
||||
"https://unpkg.com/opencommit/package.json"
|
||||
);
|
||||
return data.version;
|
||||
} catch (_6) {
|
||||
ce("Error while getting the latest version of opencommit");
|
||||
return void 0;
|
||||
}
|
||||
};
|
||||
var api = new OpenAi();
|
||||
|
||||
// src/utils/tokenCount.ts
|
||||
@@ -22094,6 +22105,25 @@ ${stagedFiles.map((file) => ` ${file}`).join("\n")}`
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// src/utils/checkIsLatestVersion.ts
|
||||
var checkIsLatestVersion = async () => {
|
||||
const latestVersion = await getOpenCommitLatestVersion();
|
||||
if (latestVersion) {
|
||||
const currentVersion = package_default.version;
|
||||
if (currentVersion !== latestVersion) {
|
||||
console.warn(
|
||||
source_default.yellow(
|
||||
`
|
||||
You are not using the latest stable version of OpenCommit with new features and bug fixes.
|
||||
Current version: ${currentVersion}. Latest version: ${latestVersion}.
|
||||
\u{1F680} To update run: npm i -g opencommit@latest.
|
||||
`
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// src/cli.ts
|
||||
var extraArgs = process.argv.slice(2);
|
||||
Z2(
|
||||
@@ -22106,6 +22136,7 @@ Z2(
|
||||
help: { description: package_default.description }
|
||||
},
|
||||
async () => {
|
||||
await checkIsLatestVersion();
|
||||
if (await isHookCalled()) {
|
||||
prepareCommitMessageHook();
|
||||
} else {
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "opencommit",
|
||||
"version": "2.0.19",
|
||||
"version": "2.2.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "opencommit",
|
||||
"version": "2.0.19",
|
||||
"version": "2.2.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "opencommit",
|
||||
"version": "2.0.19",
|
||||
"version": "2.2.2",
|
||||
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
||||
"keywords": [
|
||||
"git",
|
||||
@@ -41,7 +41,7 @@
|
||||
"start": "node ./out/cli.cjs",
|
||||
"dev": "ts-node ./src/cli.ts",
|
||||
"build": "rimraf out && node esbuild.config.js",
|
||||
"deploy": "npm run build && npm version patch && npm publish --tag latest",
|
||||
"deploy": "npm run build:push && npm version patch && git push && git push --tags && npm publish --tag latest",
|
||||
"build:push": "npm run build && git add . && git commit -m 'build' && git push",
|
||||
"lint": "eslint src --ext ts && tsc --noEmit",
|
||||
"format": "prettier --write src"
|
||||
|
||||
@@ -7,7 +7,7 @@ import { configCommand } from './commands/config';
|
||||
import { hookCommand, isHookCalled } from './commands/githook.js';
|
||||
import { prepareCommitMessageHook } from './commands/prepare-commit-msg-hook';
|
||||
import { commit } from './commands/commit';
|
||||
// import { checkIsLatestVersion } from './utils/checkIsLatestVersion';
|
||||
import { checkIsLatestVersion } from './utils/checkIsLatestVersion';
|
||||
|
||||
const extraArgs = process.argv.slice(2);
|
||||
|
||||
@@ -21,7 +21,7 @@ cli(
|
||||
help: { description: packageJSON.description }
|
||||
},
|
||||
async () => {
|
||||
// await checkIsLatestVersion();
|
||||
await checkIsLatestVersion();
|
||||
|
||||
if (await isHookCalled()) {
|
||||
prepareCommitMessageHook();
|
||||
|
||||
Reference in New Issue
Block a user