@snelusha/noto 1.1.8 → 1.2.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/README.md +2 -8
- package/dist/index.js +16 -23
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -98,16 +98,10 @@ noto --type # or simply noto -t
|
|
|
98
98
|
noto --type chore # or simply noto -t chore
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Combine all flags to specify the commit type, and apply the generated commit message in one go:
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
noto --
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Combine all flags to specify the commit type, open the interactive editor, and apply the generated commit message in one go:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
noto --edit --type feat --apply # or simply: noto -e -t feat -a
|
|
104
|
+
noto --type feat --apply # or simply: noto -t feat -a
|
|
111
105
|
```
|
|
112
106
|
|
|
113
107
|
This command will generate a commit message for a "feat" commit, let you refine it interactively, and then apply it directly to your current commit.
|
package/dist/index.js
CHANGED
|
@@ -65,7 +65,8 @@ var AvailableModelsSchema = z.enum([
|
|
|
65
65
|
"gemini-2.0-flash-001",
|
|
66
66
|
"gemini-2.0-flash-exp",
|
|
67
67
|
"gemini-2.0-flash-lite-preview-02-05",
|
|
68
|
-
"gemini-2.5-pro-exp-03-25"
|
|
68
|
+
"gemini-2.5-pro-exp-03-25",
|
|
69
|
+
"gemini-2.5-flash-preview-04-17"
|
|
69
70
|
]);
|
|
70
71
|
|
|
71
72
|
// src/utils/storage.ts
|
|
@@ -296,7 +297,8 @@ var models = {
|
|
|
296
297
|
"gemini-2.0-flash-lite-preview-02-05": google(
|
|
297
298
|
"gemini-2.0-flash-lite-preview-02-05"
|
|
298
299
|
),
|
|
299
|
-
"gemini-2.5-pro-exp-03-25": google("gemini-2.5-pro-exp-03-25")
|
|
300
|
+
"gemini-2.5-pro-exp-03-25": google("gemini-2.5-pro-exp-03-25"),
|
|
301
|
+
"gemini-2.5-flash-preview-04-17": google("gemini-2.5-flash-preview-04-17")
|
|
300
302
|
};
|
|
301
303
|
var availableModels = Object.keys(models);
|
|
302
304
|
var getModel = async () => {
|
|
@@ -401,12 +403,6 @@ var command = {
|
|
|
401
403
|
flag: "--push",
|
|
402
404
|
alias: "-p",
|
|
403
405
|
description: "commit and push the changes"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
type: Boolean,
|
|
407
|
-
flag: "--edit",
|
|
408
|
-
alias: "-e",
|
|
409
|
-
description: "edit the generated commit message"
|
|
410
406
|
}
|
|
411
407
|
],
|
|
412
408
|
execute: withAuth(
|
|
@@ -414,7 +410,6 @@ var command = {
|
|
|
414
410
|
const spin = p3.spinner();
|
|
415
411
|
try {
|
|
416
412
|
const { diff } = options;
|
|
417
|
-
const isEditMode = options["--edit"];
|
|
418
413
|
const type = options["--type"];
|
|
419
414
|
if (typeof type === "string" && !availableTypes.includes(type) || typeof type === "boolean") {
|
|
420
415
|
const type2 = await p3.select({
|
|
@@ -436,20 +431,18 @@ var command = {
|
|
|
436
431
|
} else {
|
|
437
432
|
message = INIT_COMMIT_MESSAGE;
|
|
438
433
|
}
|
|
439
|
-
spin.stop(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
return await exit(1);
|
|
449
|
-
}
|
|
450
|
-
message = editedMessage;
|
|
451
|
-
p3.log.step(color3.green(message));
|
|
434
|
+
spin.stop(color3.white(message));
|
|
435
|
+
const editedMessage = await p3.text({
|
|
436
|
+
message: "edit the generated commit message",
|
|
437
|
+
initialValue: message,
|
|
438
|
+
placeholder: message
|
|
439
|
+
});
|
|
440
|
+
if (p3.isCancel(editedMessage)) {
|
|
441
|
+
p3.log.error(color3.red("nothing changed!"));
|
|
442
|
+
return await exit(1);
|
|
452
443
|
}
|
|
444
|
+
message = editedMessage;
|
|
445
|
+
p3.log.step(color3.green(message));
|
|
453
446
|
await StorageManager.update((current2) => ({
|
|
454
447
|
...current2,
|
|
455
448
|
lastGeneratedMessage: message
|
|
@@ -1002,7 +995,7 @@ var listCommand = () => {
|
|
|
1002
995
|
};
|
|
1003
996
|
|
|
1004
997
|
// package.json
|
|
1005
|
-
var version = "1.
|
|
998
|
+
var version = "1.2.0";
|
|
1006
999
|
|
|
1007
1000
|
// src/index.ts
|
|
1008
1001
|
var globalSpec = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snelusha/noto",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Generate clean commit messages in a snap! ✨",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"build": "tsup --clean",
|
|
29
|
-
"dev": "tsup --clean --watch",
|
|
30
29
|
"test": "tsup --clean && vitest",
|
|
31
30
|
"clean": "git clean -xdf .cache .turbo node_modules"
|
|
32
31
|
},
|
|
@@ -42,15 +41,15 @@
|
|
|
42
41
|
"cli"
|
|
43
42
|
],
|
|
44
43
|
"devDependencies": {
|
|
45
|
-
"@types/node": "^22.15.
|
|
44
|
+
"@types/node": "^22.15.3",
|
|
46
45
|
"tsup": "^8.4.0",
|
|
47
46
|
"typescript": "^5.8.3",
|
|
48
47
|
"vitest": "^3.1.2"
|
|
49
48
|
},
|
|
50
49
|
"dependencies": {
|
|
51
|
-
"@ai-sdk/google": "^1.2.
|
|
50
|
+
"@ai-sdk/google": "^1.2.14",
|
|
52
51
|
"@clack/prompts": "^0.10.1",
|
|
53
|
-
"ai": "^4.3.
|
|
52
|
+
"ai": "^4.3.12",
|
|
54
53
|
"arg": "^5.0.2",
|
|
55
54
|
"clipboardy": "^4.0.0",
|
|
56
55
|
"dedent": "^1.5.3",
|