@snelusha/noto 1.1.3 → 1.1.5
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 +31 -22
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -63,6 +63,7 @@ var AvailableModelsSchema = z.enum([
|
|
|
63
63
|
"gemini-1.5-pro",
|
|
64
64
|
"gemini-1.5-pro-latest",
|
|
65
65
|
"gemini-2.0-flash-001",
|
|
66
|
+
"gemini-2.0-flash-lite-preview-02-05",
|
|
66
67
|
"gemini-2.5-pro-exp-03-25"
|
|
67
68
|
]);
|
|
68
69
|
|
|
@@ -289,6 +290,9 @@ var models = {
|
|
|
289
290
|
"gemini-1.5-pro": google("gemini-1.5-pro"),
|
|
290
291
|
"gemini-1.5-pro-latest": google("gemini-1.5-pro-latest"),
|
|
291
292
|
"gemini-2.0-flash-001": google("gemini-2.0-flash-001"),
|
|
293
|
+
"gemini-2.0-flash-lite-preview-02-05": google(
|
|
294
|
+
"gemini-2.0-flash-lite-preview-02-05"
|
|
295
|
+
),
|
|
292
296
|
"gemini-2.5-pro-exp-03-25": google("gemini-2.5-pro-exp-03-25")
|
|
293
297
|
};
|
|
294
298
|
var availableModels = Object.keys(models);
|
|
@@ -575,7 +579,7 @@ var command2 = {
|
|
|
575
579
|
p4.log.error(color4.red("failed to commit changes"));
|
|
576
580
|
}
|
|
577
581
|
}
|
|
578
|
-
|
|
582
|
+
return await exit(0);
|
|
579
583
|
},
|
|
580
584
|
{ enabled: false }
|
|
581
585
|
)
|
|
@@ -634,6 +638,12 @@ var del = {
|
|
|
634
638
|
flag: "--force",
|
|
635
639
|
alias: "-f",
|
|
636
640
|
description: "force delete a branch"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
type: Boolean,
|
|
644
|
+
flag: "--all",
|
|
645
|
+
alias: "-a",
|
|
646
|
+
description: "select all branches except the current one"
|
|
637
647
|
}
|
|
638
648
|
],
|
|
639
649
|
execute: withRepository(
|
|
@@ -645,13 +655,15 @@ var del = {
|
|
|
645
655
|
);
|
|
646
656
|
return await exit(1);
|
|
647
657
|
}
|
|
658
|
+
const currentBranch = await getCurrentBranch();
|
|
648
659
|
const branches = await getBranches();
|
|
649
|
-
if (!branches) {
|
|
660
|
+
if (!currentBranch || !branches) {
|
|
650
661
|
p5.log.error("failed to fetch branches");
|
|
651
662
|
return await exit(1);
|
|
652
663
|
}
|
|
653
664
|
const selectedBranches = await p5.multiselect({
|
|
654
665
|
message: "select branches to delete",
|
|
666
|
+
initialValues: options["--all"] ? branches.filter((b) => b !== currentBranch) : [],
|
|
655
667
|
options: branches.map((branch) => ({
|
|
656
668
|
value: branch,
|
|
657
669
|
label: color5.bold(branch),
|
|
@@ -667,7 +679,6 @@ var del = {
|
|
|
667
679
|
return await exit(1);
|
|
668
680
|
}
|
|
669
681
|
const force = options["--force"];
|
|
670
|
-
const currentBranch = await getCurrentBranch();
|
|
671
682
|
if (currentBranch && selectedBranches.includes(currentBranch)) {
|
|
672
683
|
p5.log.error("cannot delete current branch");
|
|
673
684
|
return await exit(1);
|
|
@@ -693,6 +704,12 @@ var command3 = {
|
|
|
693
704
|
flag: "--remote",
|
|
694
705
|
alias: "-r",
|
|
695
706
|
description: "list branches including remotes"
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
type: Boolean,
|
|
710
|
+
flag: "--delete",
|
|
711
|
+
alias: "-d",
|
|
712
|
+
description: "delete a branch"
|
|
696
713
|
}
|
|
697
714
|
],
|
|
698
715
|
execute: withRepository(
|
|
@@ -704,6 +721,7 @@ var command3 = {
|
|
|
704
721
|
);
|
|
705
722
|
return await exit(1);
|
|
706
723
|
}
|
|
724
|
+
if (options["--delete"]) return del.execute(options);
|
|
707
725
|
const remote = options["--remote"];
|
|
708
726
|
const branches = await getBranches(remote);
|
|
709
727
|
if (!branches) {
|
|
@@ -849,7 +867,7 @@ var key = {
|
|
|
849
867
|
}
|
|
850
868
|
}));
|
|
851
869
|
p7.log.success(color7.green("noto api key configured!"));
|
|
852
|
-
|
|
870
|
+
await exit(0);
|
|
853
871
|
}
|
|
854
872
|
};
|
|
855
873
|
var model = {
|
|
@@ -869,15 +887,6 @@ var model = {
|
|
|
869
887
|
p7.log.error(color7.red("nothing changed!"));
|
|
870
888
|
return await exit(1);
|
|
871
889
|
}
|
|
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
890
|
await StorageManager.update((current2) => ({
|
|
882
891
|
...current2,
|
|
883
892
|
llm: {
|
|
@@ -886,7 +895,7 @@ var model = {
|
|
|
886
895
|
}
|
|
887
896
|
}));
|
|
888
897
|
p7.log.success(color7.green("model configured!"));
|
|
889
|
-
|
|
898
|
+
await exit(0);
|
|
890
899
|
}
|
|
891
900
|
};
|
|
892
901
|
var reset = {
|
|
@@ -903,7 +912,7 @@ var reset = {
|
|
|
903
912
|
}
|
|
904
913
|
await StorageManager.clear();
|
|
905
914
|
p7.log.success(color7.green("configuration reset!"));
|
|
906
|
-
|
|
915
|
+
await exit(0);
|
|
907
916
|
}
|
|
908
917
|
};
|
|
909
918
|
var subCommands = [key, model, reset];
|
|
@@ -913,7 +922,7 @@ var command5 = {
|
|
|
913
922
|
usage: "noto config [subcommand]",
|
|
914
923
|
execute: async (options) => {
|
|
915
924
|
const command6 = await p7.select({
|
|
916
|
-
message: "
|
|
925
|
+
message: "select a subcommand",
|
|
917
926
|
options: subCommands.map((cmd2) => ({
|
|
918
927
|
label: cmd2.description,
|
|
919
928
|
value: cmd2.name
|
|
@@ -944,25 +953,25 @@ var help = {
|
|
|
944
953
|
const command6 = getCommand(options._[0]);
|
|
945
954
|
if (command6 && command6.name !== "help") {
|
|
946
955
|
console.log();
|
|
947
|
-
console.log(color8.bold("
|
|
956
|
+
console.log(color8.bold("usage"));
|
|
948
957
|
console.log(` ${command6.usage}`);
|
|
949
958
|
console.log();
|
|
950
|
-
console.log(color8.bold("
|
|
959
|
+
console.log(color8.bold("description"));
|
|
951
960
|
console.log(` ${command6.description}`);
|
|
952
961
|
console.log();
|
|
953
962
|
} else {
|
|
954
963
|
const commands2 = listCommand();
|
|
955
964
|
console.log();
|
|
956
|
-
console.log(color8.bold("
|
|
965
|
+
console.log(color8.bold("usage"));
|
|
957
966
|
console.log(` noto [command] [options]`);
|
|
958
967
|
console.log();
|
|
959
|
-
console.log(color8.bold("
|
|
968
|
+
console.log(color8.bold("commands"));
|
|
960
969
|
commands2.forEach((command7) => {
|
|
961
970
|
console.log(
|
|
962
971
|
` ${color8.bold(command7.name)} ${color8.dim(command7.description)}`
|
|
963
972
|
);
|
|
964
973
|
});
|
|
965
|
-
|
|
974
|
+
await exit(0);
|
|
966
975
|
}
|
|
967
976
|
}
|
|
968
977
|
};
|
|
@@ -978,7 +987,7 @@ var listCommand = () => {
|
|
|
978
987
|
};
|
|
979
988
|
|
|
980
989
|
// package.json
|
|
981
|
-
var version = "1.1.
|
|
990
|
+
var version = "1.1.5";
|
|
982
991
|
|
|
983
992
|
// src/index.ts
|
|
984
993
|
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.5",
|
|
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,15 +48,15 @@
|
|
|
48
48
|
"vitest": "^3.1.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@ai-sdk/google": "^1.2.
|
|
51
|
+
"@ai-sdk/google": "^1.2.12",
|
|
52
52
|
"@clack/prompts": "^0.10.1",
|
|
53
|
-
"ai": "^4.3.
|
|
53
|
+
"ai": "^4.3.9",
|
|
54
54
|
"arg": "^5.0.2",
|
|
55
55
|
"clipboardy": "^4.0.0",
|
|
56
56
|
"dedent": "^1.5.3",
|
|
57
57
|
"picocolors": "^1.1.1",
|
|
58
58
|
"simple-git": "^3.27.0",
|
|
59
59
|
"tinyexec": "^0.3.2",
|
|
60
|
-
"zod": "^3.24.
|
|
60
|
+
"zod": "^3.24.3"
|
|
61
61
|
}
|
|
62
62
|
}
|