@jannael/glinter 1.2.1 → 1.2.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/dist/index.js +6 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -95,32 +95,27 @@ var AVAILABLE_COMMANDS = [
|
|
|
95
95
|
{
|
|
96
96
|
name: "add",
|
|
97
97
|
command: "g add",
|
|
98
|
-
description: "Interactive add"
|
|
99
|
-
allowGitArgs: true
|
|
98
|
+
description: "Interactive add"
|
|
100
99
|
},
|
|
101
100
|
{
|
|
102
101
|
name: "commit",
|
|
103
102
|
command: "g commit",
|
|
104
|
-
description: "Interactive commit"
|
|
105
|
-
allowGitArgs: true
|
|
103
|
+
description: "Interactive commit"
|
|
106
104
|
},
|
|
107
105
|
{
|
|
108
106
|
name: "switch",
|
|
109
107
|
command: "g switch",
|
|
110
|
-
description: "Interactive switch"
|
|
111
|
-
allowGitArgs: true
|
|
108
|
+
description: "Interactive switch"
|
|
112
109
|
},
|
|
113
110
|
{
|
|
114
111
|
name: "alias",
|
|
115
112
|
command: "g alias",
|
|
116
|
-
description: "Show all the aliases"
|
|
117
|
-
allowGitArgs: false
|
|
113
|
+
description: "Show all the aliases"
|
|
118
114
|
},
|
|
119
115
|
{
|
|
120
116
|
name: "setup",
|
|
121
117
|
command: "g setup",
|
|
122
|
-
description: "Setup alias for git and glinter"
|
|
123
|
-
allowGitArgs: true
|
|
118
|
+
description: "Setup alias for git and glinter"
|
|
124
119
|
}
|
|
125
120
|
];
|
|
126
121
|
|
|
@@ -2277,11 +2272,7 @@ var COMMANDS_FN = {
|
|
|
2277
2272
|
// apps/cli/index.ts
|
|
2278
2273
|
var args = Bun.argv.slice(2);
|
|
2279
2274
|
var command = AVAILABLE_COMMANDS.find((command2) => command2.name === args[0]);
|
|
2280
|
-
if (command) {
|
|
2281
|
-
if (args.length > 1 && !command.allowGitArgs) {
|
|
2282
|
-
console.error("This command does not accept any arguments");
|
|
2283
|
-
process.exit(1);
|
|
2284
|
-
}
|
|
2275
|
+
if (command && args.length === 1) {
|
|
2285
2276
|
await COMMANDS_FN[command.name]?.(args.slice(1));
|
|
2286
2277
|
} else {
|
|
2287
2278
|
const proc = Bun.spawn(["git", ...args], {
|