opencommit 2.1.0 → 2.1.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.
- package/out/cli.cjs +33 -2
- package/package.json +2 -2
package/out/cli.cjs
CHANGED
|
@@ -16272,7 +16272,7 @@ function G3(t, e2) {
|
|
|
16272
16272
|
// package.json
|
|
16273
16273
|
var package_default = {
|
|
16274
16274
|
name: "opencommit",
|
|
16275
|
-
version: "2.0
|
|
16275
|
+
version: "2.1.0",
|
|
16276
16276
|
description: "Auto-generate impressive commits in 1 second. Killing lame commits with AI \u{1F92F}\u{1F52B}",
|
|
16277
16277
|
keywords: [
|
|
16278
16278
|
"git",
|
|
@@ -16313,7 +16313,7 @@ var package_default = {
|
|
|
16313
16313
|
start: "node ./out/cli.cjs",
|
|
16314
16314
|
dev: "ts-node ./src/cli.ts",
|
|
16315
16315
|
build: "rimraf out && node esbuild.config.js",
|
|
16316
|
-
deploy: "npm run build && npm version patch && npm publish --tag latest",
|
|
16316
|
+
deploy: "npm run build:push && npm version patch && git push origin --tags && npm publish --tag latest",
|
|
16317
16317
|
"build:push": "npm run build && git add . && git commit -m 'build' && git push",
|
|
16318
16318
|
lint: "eslint src --ext ts && tsc --noEmit",
|
|
16319
16319
|
format: "prettier --write src"
|
|
@@ -21732,6 +21732,17 @@ var OpenAi = class {
|
|
|
21732
21732
|
}
|
|
21733
21733
|
};
|
|
21734
21734
|
};
|
|
21735
|
+
var getOpenCommitLatestVersion = async () => {
|
|
21736
|
+
try {
|
|
21737
|
+
const { data } = await axios_default.get(
|
|
21738
|
+
"https://unpkg.com/opencommit/package.json"
|
|
21739
|
+
);
|
|
21740
|
+
return data.version;
|
|
21741
|
+
} catch (_6) {
|
|
21742
|
+
ce("Error while getting the latest version of opencommit");
|
|
21743
|
+
return void 0;
|
|
21744
|
+
}
|
|
21745
|
+
};
|
|
21735
21746
|
var api = new OpenAi();
|
|
21736
21747
|
|
|
21737
21748
|
// src/utils/tokenCount.ts
|
|
@@ -22094,6 +22105,25 @@ ${stagedFiles.map((file) => ` ${file}`).join("\n")}`
|
|
|
22094
22105
|
process.exit(0);
|
|
22095
22106
|
}
|
|
22096
22107
|
|
|
22108
|
+
// src/utils/checkIsLatestVersion.ts
|
|
22109
|
+
var checkIsLatestVersion = async () => {
|
|
22110
|
+
const latestVersion = await getOpenCommitLatestVersion();
|
|
22111
|
+
if (latestVersion) {
|
|
22112
|
+
const currentVersion = package_default.version;
|
|
22113
|
+
if (currentVersion !== latestVersion) {
|
|
22114
|
+
console.warn(
|
|
22115
|
+
source_default.yellow(
|
|
22116
|
+
`
|
|
22117
|
+
You are not using the latest stable version of OpenCommit with new features and bug fixes.
|
|
22118
|
+
Current version: ${currentVersion}. Latest version: ${latestVersion}.
|
|
22119
|
+
\u{1F680} To update run: npm i -g opencommit@latest.
|
|
22120
|
+
`
|
|
22121
|
+
)
|
|
22122
|
+
);
|
|
22123
|
+
}
|
|
22124
|
+
}
|
|
22125
|
+
};
|
|
22126
|
+
|
|
22097
22127
|
// src/cli.ts
|
|
22098
22128
|
var extraArgs = process.argv.slice(2);
|
|
22099
22129
|
Z2(
|
|
@@ -22106,6 +22136,7 @@ Z2(
|
|
|
22106
22136
|
help: { description: package_default.description }
|
|
22107
22137
|
},
|
|
22108
22138
|
async () => {
|
|
22139
|
+
await checkIsLatestVersion();
|
|
22109
22140
|
if (await isHookCalled()) {
|
|
22110
22141
|
prepareCommitMessageHook();
|
|
22111
22142
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencommit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"start": "node ./out/cli.cjs",
|
|
42
42
|
"dev": "ts-node ./src/cli.ts",
|
|
43
43
|
"build": "rimraf out && node esbuild.config.js",
|
|
44
|
-
"deploy": "npm run build && npm version patch && npm publish --tag latest",
|
|
44
|
+
"deploy": "npm run build:push && npm version patch && git push origin --tags && npm publish --tag latest",
|
|
45
45
|
"build:push": "npm run build && git add . && git commit -m 'build' && git push",
|
|
46
46
|
"lint": "eslint src --ext ts && tsc --noEmit",
|
|
47
47
|
"format": "prettier --write src"
|