git-stack-cli 1.15.0 → 1.15.1
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 -4
- package/dist/cjs/index.cjs +150 -83
- package/package.json +2 -1
- package/scripts/link.ts +14 -0
- package/src/app/App.tsx +39 -31
- package/src/app/AutoUpdate.tsx +9 -24
- package/src/app/CherryPickCheck.tsx +1 -2
- package/src/app/Debug.tsx +3 -5
- package/src/app/DependencyCheck.tsx +6 -6
- package/src/app/DetectInitialPR.tsx +2 -8
- package/src/app/DirtyCheck.tsx +15 -1
- package/src/app/Exit.tsx +1 -5
- package/src/app/FormatText.tsx +1 -5
- package/src/app/GatherMetadata.tsx +6 -13
- package/src/app/GithubApiError.tsx +1 -1
- package/src/app/HandleCtrlCSigint.tsx +1 -12
- package/src/app/LocalCommitStatus.tsx +1 -3
- package/src/app/LogTimestamp.tsx +1 -5
- package/src/app/ManualRebase.tsx +4 -8
- package/src/app/MultiSelect.tsx +2 -2
- package/src/app/PostRebaseStatus.tsx +2 -0
- package/src/app/PreManualRebase.tsx +3 -5
- package/src/app/RebaseCheck.tsx +1 -2
- package/src/app/SelectCommitRanges.tsx +6 -10
- package/src/app/Status.tsx +1 -1
- package/src/app/StatusTable.tsx +1 -4
- package/src/app/Store.tsx +5 -1
- package/src/app/SyncGithub.tsx +4 -16
- package/src/app/Table.tsx +4 -14
- package/src/app/TextInput.tsx +2 -7
- package/src/app/VerboseDebugInfo.tsx +1 -5
- package/src/app/YesNoPrompt.tsx +42 -31
- package/src/command.ts +8 -17
- package/src/commands/Fixup.tsx +15 -22
- package/src/commands/Log.tsx +3 -7
- package/src/commands/Rebase.tsx +6 -8
- package/src/components/ErrorBoundary.tsx +79 -0
- package/src/components/ExitingGate.tsx +27 -0
- package/src/core/CommitMetadata.ts +1 -1
- package/src/core/GitReviseTodo.test.ts +3 -3
- package/src/core/GitReviseTodo.ts +2 -8
- package/src/core/Metadata.test.ts +4 -4
- package/src/core/StackSummaryTable.ts +3 -3
- package/src/core/chalk.ts +1 -5
- package/src/core/cli.ts +2 -2
- package/src/core/github.tsx +7 -13
- package/src/core/pretty_json.ts +1 -6
- package/src/github/gh.auth_status.test.ts +2 -6
- package/src/index.tsx +24 -3
package/src/index.tsx
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
/* eslint-disable no-console */
|
|
4
|
+
|
|
3
5
|
import * as React from "react";
|
|
4
6
|
|
|
5
7
|
import * as Ink from "ink-cjs";
|
|
@@ -13,6 +15,20 @@ import { pretty_json } from "~/core/pretty_json";
|
|
|
13
15
|
try {
|
|
14
16
|
const argv = await command();
|
|
15
17
|
|
|
18
|
+
process.on("uncaughtException", (error) => {
|
|
19
|
+
console.error("🚨 uncaughtException");
|
|
20
|
+
console.error(error);
|
|
21
|
+
maybe_verbose_help();
|
|
22
|
+
process.exit(237);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
process.on("unhandledRejection", (reason, _promise) => {
|
|
26
|
+
console.error("🚨 unhandledRejection");
|
|
27
|
+
console.error(reason);
|
|
28
|
+
maybe_verbose_help();
|
|
29
|
+
process.exit(238);
|
|
30
|
+
});
|
|
31
|
+
|
|
16
32
|
const ink = Ink.render(<App />, {
|
|
17
33
|
// If true, each update will be rendered as a separate output, without replacing the previous one.
|
|
18
34
|
// debug: true,
|
|
@@ -32,12 +48,17 @@ import { pretty_json } from "~/core/pretty_json";
|
|
|
32
48
|
Store.getState().actions.debug(pretty_json(argv as any));
|
|
33
49
|
|
|
34
50
|
await ink.waitUntilExit();
|
|
51
|
+
|
|
52
|
+
function maybe_verbose_help() {
|
|
53
|
+
if (!argv.verbose) {
|
|
54
|
+
console.error();
|
|
55
|
+
console.error("Try again with `--verbose` to see more information.");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
35
58
|
} catch (err) {
|
|
36
|
-
// eslint-disable-next-line no-console
|
|
37
59
|
console.error(err);
|
|
38
|
-
process.exit(
|
|
60
|
+
process.exit(236);
|
|
39
61
|
}
|
|
40
62
|
})().catch((err) => {
|
|
41
|
-
// eslint-disable-next-line no-console
|
|
42
63
|
console.error(err);
|
|
43
64
|
});
|