git-stack-cli 2.6.0 → 2.6.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/dist/js/index.js +281 -260
- package/package.json +1 -1
- package/scripts/bun-build.ts +5 -0
- package/src/app/App.tsx +8 -5
- package/src/app/AutoUpdate.tsx +72 -54
- package/src/app/GatherMetadata.tsx +2 -24
- package/src/app/Main.tsx +0 -4
- package/src/app/MultiSelect.tsx +1 -8
- package/src/app/RequireBranch.tsx +67 -0
- package/src/app/SelectCommitRanges.tsx +5 -5
- package/src/app/Status.tsx +1 -5
- package/src/app/Store.tsx +2 -1
- package/src/commands/Rebase.tsx +50 -36
- package/src/components/ColorTest.tsx +49 -0
- package/src/core/cli.ts +2 -0
- package/src/core/colors.ts +4 -2
- package/src/app/PreSelectCommitRanges.tsx +0 -29
package/src/core/cli.ts
CHANGED
|
@@ -7,6 +7,7 @@ type SpawnOptions = Parameters<typeof child.spawn>[2];
|
|
|
7
7
|
|
|
8
8
|
type Options = SpawnOptions & {
|
|
9
9
|
ignoreExitCode?: boolean;
|
|
10
|
+
onOutput?: (data: string) => void;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
type Return = {
|
|
@@ -51,6 +52,7 @@ export async function cli(
|
|
|
51
52
|
function write_output(value: string) {
|
|
52
53
|
output += value;
|
|
53
54
|
state.actions.debug(value, id);
|
|
55
|
+
options.onOutput?.(value);
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
childProcess.stdout?.on("data", (data: Buffer) => {
|
package/src/core/colors.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ink uses chalk internally
|
|
2
2
|
// https://github.com/vadimdemedes/ink#color
|
|
3
3
|
|
|
4
|
-
export const colors = {
|
|
4
|
+
export const colors = Object.freeze({
|
|
5
5
|
red: "rgb(248, 81, 73)",
|
|
6
6
|
// red-emphasis rgb(218, 54, 51)
|
|
7
7
|
|
|
@@ -20,4 +20,6 @@ export const colors = {
|
|
|
20
20
|
gray: "rgb(110, 118, 129)",
|
|
21
21
|
|
|
22
22
|
lightGray: "rgb(125, 133, 144)",
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
white: "whiteBright",
|
|
25
|
+
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { Store } from "~/app/Store";
|
|
4
|
-
import { YesNoPrompt } from "~/app/YesNoPrompt";
|
|
5
|
-
|
|
6
|
-
export function PreSelectCommitRanges() {
|
|
7
|
-
const actions = Store.useActions();
|
|
8
|
-
const argv = Store.useState((state) => state.argv);
|
|
9
|
-
|
|
10
|
-
React.useEffect(() => {
|
|
11
|
-
if (argv.force) {
|
|
12
|
-
Store.setState((state) => {
|
|
13
|
-
state.step = "select-commit-ranges";
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}, [argv]);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<YesNoPrompt
|
|
20
|
-
message="Some commits are new or outdated, would you like to select new commit ranges?"
|
|
21
|
-
onYes={() => {
|
|
22
|
-
actions.set((state) => {
|
|
23
|
-
state.step = "select-commit-ranges";
|
|
24
|
-
});
|
|
25
|
-
}}
|
|
26
|
-
onNo={() => actions.exit(0)}
|
|
27
|
-
/>
|
|
28
|
-
);
|
|
29
|
-
}
|