gitcoach-cli 1.0.2 → 1.0.3
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/bin/run.js +79 -79
- package/dist/i18n/locales/en.json +393 -365
- package/dist/i18n/locales/es.json +393 -365
- package/dist/i18n/locales/fr.json +393 -365
- package/dist/services/copilot-service.js +11 -11
- package/dist/services/git-service.d.ts +4 -0
- package/dist/services/git-service.d.ts.map +1 -1
- package/dist/services/git-service.js +27 -0
- package/dist/services/git-service.js.map +1 -1
- package/dist/ui/components/prompt.d.ts.map +1 -1
- package/dist/ui/components/prompt.js +14 -4
- package/dist/ui/components/prompt.js.map +1 -1
- package/dist/ui/menus/branch-menu.d.ts +1 -1
- package/dist/ui/menus/branch-menu.d.ts.map +1 -1
- package/dist/ui/menus/branch-menu.js +61 -5
- package/dist/ui/menus/branch-menu.js.map +1 -1
- package/dist/ui/menus/commit-menu.d.ts.map +1 -1
- package/dist/ui/menus/commit-menu.js +10 -1
- package/dist/ui/menus/commit-menu.js.map +1 -1
- package/dist/ui/menus/detached-head-menu.d.ts +4 -0
- package/dist/ui/menus/detached-head-menu.d.ts.map +1 -0
- package/dist/ui/menus/detached-head-menu.js +97 -0
- package/dist/ui/menus/detached-head-menu.js.map +1 -0
- package/dist/ui/menus/main-menu.d.ts.map +1 -1
- package/dist/ui/menus/main-menu.js +17 -1
- package/dist/ui/menus/main-menu.js.map +1 -1
- package/dist/ui/menus/setup-menu.js +105 -105
- package/dist/ui/themes/colored.d.ts +1 -1
- package/dist/ui/themes/colored.d.ts.map +1 -1
- package/dist/ui/themes/colored.js +4 -2
- package/dist/ui/themes/colored.js.map +1 -1
- package/dist/ui/themes/index.d.ts +1 -1
- package/dist/ui/themes/index.d.ts.map +1 -1
- package/dist/ui/themes/monochrome.d.ts +1 -1
- package/dist/ui/themes/monochrome.d.ts.map +1 -1
- package/dist/ui/themes/monochrome.js +2 -1
- package/dist/ui/themes/monochrome.js.map +1 -1
- package/dist/utils/version.d.ts +2 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +3 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +72 -71
package/bin/run.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { dirname, join } from 'node:path';
|
|
5
|
-
import { Config } from '@oclif/core';
|
|
6
|
-
|
|
7
|
-
// Buffer to collect warnings during config load
|
|
8
|
-
let suppressWarnings = true;
|
|
9
|
-
let warningBuffer = [];
|
|
10
|
-
|
|
11
|
-
// Override stderr to suppress SINGLE_COMMAND_CLI warnings
|
|
12
|
-
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
13
|
-
process.stderr.write = (chunk, ...args) => {
|
|
14
|
-
const str = chunk.toString();
|
|
15
|
-
if (suppressWarnings && (str.includes('Symbol(SINGLE_COMMAND_CLI)') || str.includes('ModuleLoadError'))) {
|
|
16
|
-
warningBuffer.push(str);
|
|
17
|
-
return true;
|
|
18
|
-
}
|
|
19
|
-
return originalStderrWrite(chunk, ...args);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
// Override stdout to suppress warnings printed there too
|
|
23
|
-
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
24
|
-
process.stdout.write = (chunk, ...args) => {
|
|
25
|
-
const str = chunk.toString();
|
|
26
|
-
if (suppressWarnings && (str.includes('Symbol(SINGLE_COMMAND_CLI)') || str.includes('ModuleLoadError'))) {
|
|
27
|
-
warningBuffer.push(str);
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
return originalStdoutWrite(chunk, ...args);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// Also suppress Node.js warnings
|
|
34
|
-
process.removeAllListeners('warning');
|
|
35
|
-
process.on('warning', () => {});
|
|
36
|
-
|
|
37
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
38
|
-
const __dirname = dirname(__filename);
|
|
39
|
-
|
|
40
|
-
async function main() {
|
|
41
|
-
const config = await Config.load({ root: join(__dirname, '..') });
|
|
42
|
-
|
|
43
|
-
// Re-enable output after config is loaded
|
|
44
|
-
suppressWarnings = false;
|
|
45
|
-
|
|
46
|
-
// Get args without node and script path
|
|
47
|
-
const args = process.argv.slice(2);
|
|
48
|
-
|
|
49
|
-
// Handle global flags
|
|
50
|
-
if (args.includes('--help') || args.includes('-h')) {
|
|
51
|
-
const { Help } = await import('@oclif/core');
|
|
52
|
-
const help = new Help(config);
|
|
53
|
-
await help.showHelp(args.filter(a => a !== '--help' && a !== '-h'));
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (args.includes('--version') || args.includes('-v')) {
|
|
58
|
-
console.log(`gitcoach/${config.version} ${process.platform}-${process.arch} node-${process.version}`);
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// If no arguments provided, run the main menu (index command)
|
|
63
|
-
if (args.length === 0) {
|
|
64
|
-
// Dynamically import and run the Index command
|
|
65
|
-
const { default: IndexCommand } = await import('../dist/commands/index.js');
|
|
66
|
-
const cmd = new IndexCommand(args, config);
|
|
67
|
-
await cmd.run();
|
|
68
|
-
} else {
|
|
69
|
-
// Otherwise, let oclif handle the command
|
|
70
|
-
await config.runCommand(args[0], args.slice(1));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
main().catch((error) => {
|
|
75
|
-
suppressWarnings = false;
|
|
76
|
-
// Only show error if it's not the SINGLE_COMMAND_CLI warning
|
|
77
|
-
if (!error.message?.includes('Symbol(SINGLE_COMMAND_CLI)')) {
|
|
78
|
-
console.error(error);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
2
|
+
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { Config } from '@oclif/core';
|
|
6
|
+
|
|
7
|
+
// Buffer to collect warnings during config load
|
|
8
|
+
let suppressWarnings = true;
|
|
9
|
+
let warningBuffer = [];
|
|
10
|
+
|
|
11
|
+
// Override stderr to suppress SINGLE_COMMAND_CLI warnings
|
|
12
|
+
const originalStderrWrite = process.stderr.write.bind(process.stderr);
|
|
13
|
+
process.stderr.write = (chunk, ...args) => {
|
|
14
|
+
const str = chunk.toString();
|
|
15
|
+
if (suppressWarnings && (str.includes('Symbol(SINGLE_COMMAND_CLI)') || str.includes('ModuleLoadError'))) {
|
|
16
|
+
warningBuffer.push(str);
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
|
+
return originalStderrWrite(chunk, ...args);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// Override stdout to suppress warnings printed there too
|
|
23
|
+
const originalStdoutWrite = process.stdout.write.bind(process.stdout);
|
|
24
|
+
process.stdout.write = (chunk, ...args) => {
|
|
25
|
+
const str = chunk.toString();
|
|
26
|
+
if (suppressWarnings && (str.includes('Symbol(SINGLE_COMMAND_CLI)') || str.includes('ModuleLoadError'))) {
|
|
27
|
+
warningBuffer.push(str);
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return originalStdoutWrite(chunk, ...args);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
// Also suppress Node.js warnings
|
|
34
|
+
process.removeAllListeners('warning');
|
|
35
|
+
process.on('warning', () => {});
|
|
36
|
+
|
|
37
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
38
|
+
const __dirname = dirname(__filename);
|
|
39
|
+
|
|
40
|
+
async function main() {
|
|
41
|
+
const config = await Config.load({ root: join(__dirname, '..') });
|
|
42
|
+
|
|
43
|
+
// Re-enable output after config is loaded
|
|
44
|
+
suppressWarnings = false;
|
|
45
|
+
|
|
46
|
+
// Get args without node and script path
|
|
47
|
+
const args = process.argv.slice(2);
|
|
48
|
+
|
|
49
|
+
// Handle global flags
|
|
50
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
51
|
+
const { Help } = await import('@oclif/core');
|
|
52
|
+
const help = new Help(config);
|
|
53
|
+
await help.showHelp(args.filter(a => a !== '--help' && a !== '-h'));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (args.includes('--version') || args.includes('-v')) {
|
|
58
|
+
console.log(`gitcoach/${config.version} ${process.platform}-${process.arch} node-${process.version}`);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// If no arguments provided, run the main menu (index command)
|
|
63
|
+
if (args.length === 0) {
|
|
64
|
+
// Dynamically import and run the Index command
|
|
65
|
+
const { default: IndexCommand } = await import('../dist/commands/index.js');
|
|
66
|
+
const cmd = new IndexCommand(args, config);
|
|
67
|
+
await cmd.run();
|
|
68
|
+
} else {
|
|
69
|
+
// Otherwise, let oclif handle the command
|
|
70
|
+
await config.runCommand(args[0], args.slice(1));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
main().catch((error) => {
|
|
75
|
+
suppressWarnings = false;
|
|
76
|
+
// Only show error if it's not the SINGLE_COMMAND_CLI warning
|
|
77
|
+
if (!error.message?.includes('Symbol(SINGLE_COMMAND_CLI)')) {
|
|
78
|
+
console.error(error);
|
|
79
|
+
}
|
|
80
|
+
});
|