@snelusha/noto 1.1.3 → 1.1.4
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 +20 -22
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -575,7 +575,7 @@ var command2 = {
|
|
|
575
575
|
p4.log.error(color4.red("failed to commit changes"));
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
|
|
578
|
+
return await exit(0);
|
|
579
579
|
},
|
|
580
580
|
{ enabled: false }
|
|
581
581
|
)
|
|
@@ -634,6 +634,12 @@ var del = {
|
|
|
634
634
|
flag: "--force",
|
|
635
635
|
alias: "-f",
|
|
636
636
|
description: "force delete a branch"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
type: Boolean,
|
|
640
|
+
flag: "--all",
|
|
641
|
+
alias: "-a",
|
|
642
|
+
description: "select all branches except the current one"
|
|
637
643
|
}
|
|
638
644
|
],
|
|
639
645
|
execute: withRepository(
|
|
@@ -645,13 +651,15 @@ var del = {
|
|
|
645
651
|
);
|
|
646
652
|
return await exit(1);
|
|
647
653
|
}
|
|
654
|
+
const currentBranch = await getCurrentBranch();
|
|
648
655
|
const branches = await getBranches();
|
|
649
|
-
if (!branches) {
|
|
656
|
+
if (!currentBranch || !branches) {
|
|
650
657
|
p5.log.error("failed to fetch branches");
|
|
651
658
|
return await exit(1);
|
|
652
659
|
}
|
|
653
660
|
const selectedBranches = await p5.multiselect({
|
|
654
661
|
message: "select branches to delete",
|
|
662
|
+
initialValues: options["--all"] ? branches.filter((b) => b !== currentBranch) : [],
|
|
655
663
|
options: branches.map((branch) => ({
|
|
656
664
|
value: branch,
|
|
657
665
|
label: color5.bold(branch),
|
|
@@ -667,7 +675,6 @@ var del = {
|
|
|
667
675
|
return await exit(1);
|
|
668
676
|
}
|
|
669
677
|
const force = options["--force"];
|
|
670
|
-
const currentBranch = await getCurrentBranch();
|
|
671
678
|
if (currentBranch && selectedBranches.includes(currentBranch)) {
|
|
672
679
|
p5.log.error("cannot delete current branch");
|
|
673
680
|
return await exit(1);
|
|
@@ -849,7 +856,7 @@ var key = {
|
|
|
849
856
|
}
|
|
850
857
|
}));
|
|
851
858
|
p7.log.success(color7.green("noto api key configured!"));
|
|
852
|
-
|
|
859
|
+
await exit(0);
|
|
853
860
|
}
|
|
854
861
|
};
|
|
855
862
|
var model = {
|
|
@@ -869,15 +876,6 @@ var model = {
|
|
|
869
876
|
p7.log.error(color7.red("nothing changed!"));
|
|
870
877
|
return await exit(1);
|
|
871
878
|
}
|
|
872
|
-
if (model2 === "gemini-2.5-pro-exp-03-25") {
|
|
873
|
-
const confirm2 = await p7.confirm({
|
|
874
|
-
message: "this model has a rate limit of 5 RPM (requests per minute) 50 requests per day, do you want to continue?"
|
|
875
|
-
});
|
|
876
|
-
if (p7.isCancel(confirm2) || !confirm2) {
|
|
877
|
-
p7.log.error(color7.red("nothing changed!"));
|
|
878
|
-
return await exit(1);
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
879
|
await StorageManager.update((current2) => ({
|
|
882
880
|
...current2,
|
|
883
881
|
llm: {
|
|
@@ -886,7 +884,7 @@ var model = {
|
|
|
886
884
|
}
|
|
887
885
|
}));
|
|
888
886
|
p7.log.success(color7.green("model configured!"));
|
|
889
|
-
|
|
887
|
+
await exit(0);
|
|
890
888
|
}
|
|
891
889
|
};
|
|
892
890
|
var reset = {
|
|
@@ -903,7 +901,7 @@ var reset = {
|
|
|
903
901
|
}
|
|
904
902
|
await StorageManager.clear();
|
|
905
903
|
p7.log.success(color7.green("configuration reset!"));
|
|
906
|
-
|
|
904
|
+
await exit(0);
|
|
907
905
|
}
|
|
908
906
|
};
|
|
909
907
|
var subCommands = [key, model, reset];
|
|
@@ -913,7 +911,7 @@ var command5 = {
|
|
|
913
911
|
usage: "noto config [subcommand]",
|
|
914
912
|
execute: async (options) => {
|
|
915
913
|
const command6 = await p7.select({
|
|
916
|
-
message: "
|
|
914
|
+
message: "select a subcommand",
|
|
917
915
|
options: subCommands.map((cmd2) => ({
|
|
918
916
|
label: cmd2.description,
|
|
919
917
|
value: cmd2.name
|
|
@@ -944,25 +942,25 @@ var help = {
|
|
|
944
942
|
const command6 = getCommand(options._[0]);
|
|
945
943
|
if (command6 && command6.name !== "help") {
|
|
946
944
|
console.log();
|
|
947
|
-
console.log(color8.bold("
|
|
945
|
+
console.log(color8.bold("usage"));
|
|
948
946
|
console.log(` ${command6.usage}`);
|
|
949
947
|
console.log();
|
|
950
|
-
console.log(color8.bold("
|
|
948
|
+
console.log(color8.bold("description"));
|
|
951
949
|
console.log(` ${command6.description}`);
|
|
952
950
|
console.log();
|
|
953
951
|
} else {
|
|
954
952
|
const commands2 = listCommand();
|
|
955
953
|
console.log();
|
|
956
|
-
console.log(color8.bold("
|
|
954
|
+
console.log(color8.bold("usage"));
|
|
957
955
|
console.log(` noto [command] [options]`);
|
|
958
956
|
console.log();
|
|
959
|
-
console.log(color8.bold("
|
|
957
|
+
console.log(color8.bold("commands"));
|
|
960
958
|
commands2.forEach((command7) => {
|
|
961
959
|
console.log(
|
|
962
960
|
` ${color8.bold(command7.name)} ${color8.dim(command7.description)}`
|
|
963
961
|
);
|
|
964
962
|
});
|
|
965
|
-
|
|
963
|
+
await exit(0);
|
|
966
964
|
}
|
|
967
965
|
}
|
|
968
966
|
};
|
|
@@ -978,7 +976,7 @@ var listCommand = () => {
|
|
|
978
976
|
};
|
|
979
977
|
|
|
980
978
|
// package.json
|
|
981
|
-
var version = "1.1.
|
|
979
|
+
var version = "1.1.4";
|
|
982
980
|
|
|
983
981
|
// src/index.ts
|
|
984
982
|
var globalSpec = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snelusha/noto",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "Generate clean commit messages in a snap! ✨",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"noto": "./bin/noto.mjs"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
|
-
"clean": "rm -rf .turbo node_modules dist",
|
|
29
28
|
"build": "tsup --clean",
|
|
30
29
|
"dev": "tsup --clean --watch",
|
|
31
|
-
"test": "tsup --clean && vitest"
|
|
30
|
+
"test": "tsup --clean && vitest",
|
|
31
|
+
"clean": "git clean -xdf .cache .turbo node_modules"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"vitest": "^3.1.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@ai-sdk/google": "^1.2.
|
|
51
|
+
"@ai-sdk/google": "^1.2.11",
|
|
52
52
|
"@clack/prompts": "^0.10.1",
|
|
53
|
-
"ai": "^4.3.
|
|
53
|
+
"ai": "^4.3.7",
|
|
54
54
|
"arg": "^5.0.2",
|
|
55
55
|
"clipboardy": "^4.0.0",
|
|
56
56
|
"dedent": "^1.5.3",
|