@snelusha/noto 1.2.6 → 1.2.8
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 +55 -7
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -434,6 +434,11 @@ var command = {
|
|
|
434
434
|
flag: "--push",
|
|
435
435
|
alias: "-p",
|
|
436
436
|
description: "commit and push the changes"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
type: Boolean,
|
|
440
|
+
flag: "--manual",
|
|
441
|
+
description: "commit and push the changes"
|
|
437
442
|
}
|
|
438
443
|
],
|
|
439
444
|
execute: withAuth(
|
|
@@ -441,6 +446,31 @@ var command = {
|
|
|
441
446
|
const spin = p3.spinner();
|
|
442
447
|
try {
|
|
443
448
|
const { diff } = options;
|
|
449
|
+
const manual = options["--manual"];
|
|
450
|
+
if (manual) {
|
|
451
|
+
const message2 = await p3.text({
|
|
452
|
+
message: "edit the generated commit message",
|
|
453
|
+
placeholder: "chore: init repo"
|
|
454
|
+
});
|
|
455
|
+
if (p3.isCancel(message2)) {
|
|
456
|
+
p3.log.error(color3.red("nothing changed!"));
|
|
457
|
+
return await exit(1);
|
|
458
|
+
}
|
|
459
|
+
p3.log.step(color3.green(message2));
|
|
460
|
+
await StorageManager.update((current2) => ({
|
|
461
|
+
...current2,
|
|
462
|
+
lastGeneratedMessage: message2
|
|
463
|
+
}));
|
|
464
|
+
if (options["--apply"]) {
|
|
465
|
+
const success = await commit(message2);
|
|
466
|
+
if (success) {
|
|
467
|
+
p3.log.step(color3.dim("commit successful"));
|
|
468
|
+
} else {
|
|
469
|
+
p3.log.error(color3.red("failed to commit changes"));
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
return await exit(0);
|
|
473
|
+
}
|
|
444
474
|
const type = options["--type"];
|
|
445
475
|
if (typeof type === "string" && !availableTypes.includes(type) || typeof type === "boolean") {
|
|
446
476
|
const type2 = await p3.select({
|
|
@@ -877,6 +907,24 @@ var command4 = {
|
|
|
877
907
|
p6.log.error(
|
|
878
908
|
`branch ${color6.red(branchName)} does not exist in the repository`
|
|
879
909
|
);
|
|
910
|
+
const createBranch = await p6.confirm({
|
|
911
|
+
message: `do you want to create branch ${color6.green(branchName)}?`
|
|
912
|
+
});
|
|
913
|
+
if (p6.isCancel(createBranch)) {
|
|
914
|
+
p6.log.error("aborted");
|
|
915
|
+
return await exit(1);
|
|
916
|
+
}
|
|
917
|
+
if (createBranch) {
|
|
918
|
+
const result3 = await checkoutLocalBranch(branchName);
|
|
919
|
+
if (!result3) {
|
|
920
|
+
p6.log.error(
|
|
921
|
+
`failed to create and checkout ${color6.bold(branchName)}`
|
|
922
|
+
);
|
|
923
|
+
return await exit(1);
|
|
924
|
+
}
|
|
925
|
+
p6.log.success(`created and checked out ${color6.green(branchName)}`);
|
|
926
|
+
return await exit(0);
|
|
927
|
+
}
|
|
880
928
|
return await exit(1);
|
|
881
929
|
}
|
|
882
930
|
if (branchName === currentBranch) {
|
|
@@ -943,10 +991,10 @@ var key = {
|
|
|
943
991
|
usage: "noto config key [options]",
|
|
944
992
|
execute: async (options) => {
|
|
945
993
|
if ((await StorageManager.get()).llm?.apiKey) {
|
|
946
|
-
const
|
|
994
|
+
const confirm3 = await p7.confirm({
|
|
947
995
|
message: "noto api key already configured, do you want to update it?"
|
|
948
996
|
});
|
|
949
|
-
if (p7.isCancel(
|
|
997
|
+
if (p7.isCancel(confirm3) || !confirm3) {
|
|
950
998
|
p7.log.error(color7.red("nothing changed!"));
|
|
951
999
|
return await exit(1);
|
|
952
1000
|
}
|
|
@@ -991,10 +1039,10 @@ var model = {
|
|
|
991
1039
|
return await exit(1);
|
|
992
1040
|
}
|
|
993
1041
|
if (model2 === "gemini-2.5-pro-preview-05-06") {
|
|
994
|
-
const
|
|
1042
|
+
const confirm3 = await p7.confirm({
|
|
995
1043
|
message: "this model does not have free quota tier, do you want to continue?"
|
|
996
1044
|
});
|
|
997
|
-
if (p7.isCancel(
|
|
1045
|
+
if (p7.isCancel(confirm3) || !confirm3) {
|
|
998
1046
|
p7.log.error(color7.red("nothing changed!"));
|
|
999
1047
|
return await exit(1);
|
|
1000
1048
|
}
|
|
@@ -1015,10 +1063,10 @@ var reset = {
|
|
|
1015
1063
|
description: "reset configuration",
|
|
1016
1064
|
usage: "noto config reset",
|
|
1017
1065
|
execute: async () => {
|
|
1018
|
-
const
|
|
1066
|
+
const confirm3 = await p7.confirm({
|
|
1019
1067
|
message: "are you sure you want to reset the configuration?"
|
|
1020
1068
|
});
|
|
1021
|
-
if (p7.isCancel(
|
|
1069
|
+
if (p7.isCancel(confirm3) || !confirm3) {
|
|
1022
1070
|
p7.log.error(color7.red("nothing changed!"));
|
|
1023
1071
|
return await exit(1);
|
|
1024
1072
|
}
|
|
@@ -1099,7 +1147,7 @@ var listCommand = () => {
|
|
|
1099
1147
|
};
|
|
1100
1148
|
|
|
1101
1149
|
// package.json
|
|
1102
|
-
var version = "1.2.
|
|
1150
|
+
var version = "1.2.8";
|
|
1103
1151
|
|
|
1104
1152
|
// src/index.ts
|
|
1105
1153
|
var globalSpec = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snelusha/noto",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "Generate clean commit messages in a snap! ✨",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"@types/node": "^22.15.23",
|
|
45
45
|
"tsup": "^8.5.0",
|
|
46
46
|
"typescript": "^5.8.3",
|
|
47
|
-
"vitest": "^3.2.
|
|
47
|
+
"vitest": "^3.2.4"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@ai-sdk/google": "^1.2.
|
|
50
|
+
"@ai-sdk/google": "^1.2.22",
|
|
51
51
|
"@clack/prompts": "^0.10.1",
|
|
52
|
-
"ai": "^4.3.
|
|
52
|
+
"ai": "^4.3.19",
|
|
53
53
|
"arg": "^5.0.2",
|
|
54
54
|
"clipboardy": "^4.0.0",
|
|
55
55
|
"dedent": "^1.6.0",
|
|
56
56
|
"picocolors": "^1.1.1",
|
|
57
|
-
"simple-git": "^3.
|
|
57
|
+
"simple-git": "^3.28.0",
|
|
58
58
|
"tinyexec": "^0.3.2",
|
|
59
|
-
"zod": "^3.25.
|
|
59
|
+
"zod": "^3.25.76"
|
|
60
60
|
}
|
|
61
61
|
}
|