@quikcommit/cli 2.0.0 → 3.1.0
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/dist/index.js +8 -9
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -153,8 +153,7 @@ var init_api = __esm({
|
|
|
153
153
|
});
|
|
154
154
|
if (!res.ok) {
|
|
155
155
|
const err = await res.json().catch(() => ({ error: res.statusText }));
|
|
156
|
-
|
|
157
|
-
if (planRequiredMsg && code === "PLAN_REQUIRED") {
|
|
156
|
+
if (planRequiredMsg && err.code === "PLAN_REQUIRED") {
|
|
158
157
|
throw new Error(planRequiredMsg);
|
|
159
158
|
}
|
|
160
159
|
throw new Error(err.error ?? `HTTP ${res.status}`);
|
|
@@ -1091,7 +1090,7 @@ var init_exports = {};
|
|
|
1091
1090
|
__export(init_exports, {
|
|
1092
1091
|
init: () => init
|
|
1093
1092
|
});
|
|
1094
|
-
|
|
1093
|
+
function init(options) {
|
|
1095
1094
|
let hooksDir;
|
|
1096
1095
|
try {
|
|
1097
1096
|
hooksDir = (0, import_child_process5.execFileSync)("git", ["rev-parse", "--git-path", "hooks"], {
|
|
@@ -1182,7 +1181,7 @@ function mapCommitlintToRules(config2) {
|
|
|
1182
1181
|
if (!config2 || typeof config2 !== "object") return null;
|
|
1183
1182
|
const c = config2;
|
|
1184
1183
|
const rules = {};
|
|
1185
|
-
const
|
|
1184
|
+
const _ext = c.extends;
|
|
1186
1185
|
const rulesConfig = c.rules;
|
|
1187
1186
|
if (Array.isArray(rulesConfig?.["type-enum"]) && rulesConfig["type-enum"].length >= 3) {
|
|
1188
1187
|
const [, , value] = rulesConfig["type-enum"];
|
|
@@ -1309,7 +1308,7 @@ var config_exports = {};
|
|
|
1309
1308
|
__export(config_exports, {
|
|
1310
1309
|
config: () => config
|
|
1311
1310
|
});
|
|
1312
|
-
|
|
1311
|
+
function config(args) {
|
|
1313
1312
|
if (args.length === 0) {
|
|
1314
1313
|
showConfig();
|
|
1315
1314
|
return;
|
|
@@ -1323,7 +1322,7 @@ async function config(args) {
|
|
|
1323
1322
|
console.error(" Keys: model, api_url, provider");
|
|
1324
1323
|
process.exit(1);
|
|
1325
1324
|
}
|
|
1326
|
-
|
|
1325
|
+
setConfig(key, value);
|
|
1327
1326
|
return;
|
|
1328
1327
|
}
|
|
1329
1328
|
if (sub === "reset") {
|
|
@@ -1346,7 +1345,7 @@ function showConfig() {
|
|
|
1346
1345
|
console.log(` excludes: ${cfg.excludes.join(", ")}`);
|
|
1347
1346
|
}
|
|
1348
1347
|
}
|
|
1349
|
-
|
|
1348
|
+
function setConfig(key, value) {
|
|
1350
1349
|
const cfg = getConfig();
|
|
1351
1350
|
const updates = {};
|
|
1352
1351
|
if (key === "model") {
|
|
@@ -1900,7 +1899,7 @@ async function main() {
|
|
|
1900
1899
|
}
|
|
1901
1900
|
if (command === "init") {
|
|
1902
1901
|
const { init: init2 } = await Promise.resolve().then(() => (init_init(), init_exports));
|
|
1903
|
-
|
|
1902
|
+
init2({ uninstall: values.uninstall });
|
|
1904
1903
|
return;
|
|
1905
1904
|
}
|
|
1906
1905
|
if (command === "team") {
|
|
@@ -1912,7 +1911,7 @@ async function main() {
|
|
|
1912
1911
|
if (command === "config") {
|
|
1913
1912
|
const { config: config2 } = await Promise.resolve().then(() => (init_config2(), config_exports));
|
|
1914
1913
|
const positionals = argv.filter((a) => !a.startsWith("-") && a !== "config");
|
|
1915
|
-
|
|
1914
|
+
config2(positionals);
|
|
1916
1915
|
return;
|
|
1917
1916
|
}
|
|
1918
1917
|
if (command === "upgrade") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quikcommit/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "AI-powered conventional commit messages",
|
|
5
5
|
"bin": {
|
|
6
6
|
"qc": "./dist/index.js"
|
|
@@ -32,13 +32,14 @@
|
|
|
32
32
|
"vitest": "~4.0.18"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@quikcommit/shared": "
|
|
35
|
+
"@quikcommit/shared": "3.1.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "node build.mjs",
|
|
39
39
|
"typecheck": "tsc --noEmit",
|
|
40
40
|
"start": "node dist/index.js",
|
|
41
41
|
"test": "vitest run",
|
|
42
|
-
"lint": "
|
|
42
|
+
"lint": "eslint .",
|
|
43
|
+
"lint:fix": "eslint . --fix"
|
|
43
44
|
}
|
|
44
45
|
}
|