@snelusha/noto 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -36,6 +36,12 @@ Optionally, if you wish to configure a different Gemini model (the default model
36
36
  noto config model
37
37
  ```
38
38
 
39
+ If you ever need to reset your configuration, you can now run:
40
+
41
+ ```bash
42
+ noto config reset
43
+ ```
44
+
39
45
  ## Usage
40
46
 
41
47
  Generate a new commit message:
package/dist/index.js CHANGED
@@ -118,6 +118,10 @@ var StorageManager = class {
118
118
  await this.load();
119
119
  return JSON.parse(JSON.stringify(this.storage));
120
120
  }
121
+ static async clear() {
122
+ this.storage = {};
123
+ await this.save();
124
+ }
121
125
  };
122
126
 
123
127
  // src/utils/process.ts
@@ -550,7 +554,24 @@ var model = {
550
554
  console.log();
551
555
  }
552
556
  };
553
- var subCommands = [key, model];
557
+ var reset = {
558
+ name: "reset",
559
+ description: "reset configuration",
560
+ usage: "noto config reset",
561
+ execute: async () => {
562
+ const confirm2 = await p5.confirm({
563
+ message: "are you sure you want to reset the configuration?"
564
+ });
565
+ if (p5.isCancel(confirm2) || !confirm2) {
566
+ p5.log.error(color5.red("nothing changed!"));
567
+ return await exit(1);
568
+ }
569
+ await StorageManager.clear();
570
+ p5.log.success(color5.green("configuration reset!"));
571
+ console.log();
572
+ }
573
+ };
574
+ var subCommands = [key, model, reset];
554
575
  var command3 = {
555
576
  name: "config",
556
577
  description: "configure noto",
@@ -585,7 +606,7 @@ var getCommand = (name, cmds = commands) => {
585
606
  };
586
607
 
587
608
  // package.json
588
- var version = "1.0.0";
609
+ var version = "1.0.2";
589
610
 
590
611
  // src/index.ts
591
612
  var globalSpec = {
@@ -611,7 +632,7 @@ function main() {
611
632
  );
612
633
  if (subCommand) {
613
634
  selectedCommand = subCommand;
614
- commandArgs = commandArgs.slice(1);
635
+ commandArgs = commandArgs.slice(2);
615
636
  }
616
637
  }
617
638
  const commandSpec = (selectedCommand.options ?? []).reduce((acc, opt) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snelusha/noto",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Generate clean commit messages in a snap! ✨",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,21 +40,21 @@
40
40
  "cli"
41
41
  ],
42
42
  "devDependencies": {
43
- "@types/node": "^22.12.0",
44
- "tsup": "^8.3.6",
45
- "typescript": "^5.7.3"
43
+ "@types/node": "^22.13.10",
44
+ "tsup": "^8.4.0",
45
+ "typescript": "^5.8.2"
46
46
  },
47
47
  "dependencies": {
48
- "@ai-sdk/google": "^1.1.14",
48
+ "@ai-sdk/google": "^1.1.20",
49
49
  "@clack/prompts": "^0.10.0",
50
- "ai": "^4.1.40",
50
+ "ai": "^4.1.54",
51
51
  "arg": "^5.0.2",
52
52
  "clipboardy": "^4.0.0",
53
53
  "dedent": "^1.5.3",
54
54
  "picocolors": "^1.1.1",
55
55
  "simple-git": "^3.27.0",
56
56
  "tinyexec": "^0.3.2",
57
- "vitest": "^3.0.5",
57
+ "vitest": "^3.0.8",
58
58
  "zod": "^3.24.2"
59
59
  }
60
60
  }