gitforest 1.1.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitforest",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "TUI for managing multiple Git repositories and GitHub integration",
5
5
  "module": "src/index.tsx",
6
6
  "type": "module",
@@ -6,7 +6,7 @@ import { DirectoriesStep } from "./DirectoriesStep.tsx";
6
6
  import { GitHubAuthStep } from "./GitHubAuthStep.tsx";
7
7
  import { CompleteStep } from "./CompleteStep.tsx";
8
8
 
9
- type Step = "welcome" | "directories" | "github" | "complete";
9
+ type Step = "welcome" | "directories" | "github" | "complete" | "done";
10
10
 
11
11
  interface DirectoryConfig {
12
12
  path: string;
@@ -27,6 +27,7 @@ export interface OnboardingWizardProps {
27
27
 
28
28
  export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps) {
29
29
  const [currentStep, setCurrentStep] = useState<Step>("welcome");
30
+ const [shouldExit, setShouldExit] = useState(false);
30
31
  const [directories, setDirectories] = useState<DirectoryConfig[]>([]);
31
32
  const [githubAuth, setGithubAuth] = useState<GitHubAuthState>({
32
33
  authenticated: false,
@@ -66,9 +67,10 @@ export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps
66
67
  // Config created successfully, show complete step
67
68
  setCurrentStep("complete");
68
69
  setIsCreatingConfig(false);
69
- // Auto-complete after showing success
70
+ // Auto-complete after showing success, then exit
70
71
  setTimeout(() => {
71
72
  onComplete(config);
73
+ setShouldExit(true);
72
74
  }, 2000);
73
75
  } catch (error) {
74
76
  setConfigError(error instanceof Error ? error.message : "Failed to create config");
@@ -96,6 +98,11 @@ export function OnboardingWizard({ onComplete, onCancel }: OnboardingWizardProps
96
98
  }
97
99
  };
98
100
 
101
+ // Exit the wizard when shouldExit is true
102
+ if (shouldExit) {
103
+ return null;
104
+ }
105
+
99
106
  return (
100
107
  <Box flexDirection="column">
101
108
  {currentStep === "welcome" && (
package/src/index.tsx CHANGED
@@ -261,6 +261,7 @@ async function runOnboardingWizard(): Promise<void> {
261
261
  />
262
262
  );
263
263
 
264
+ // Wait for completion or cancellation
264
265
  await waitUntilExit();
265
266
 
266
267
  if (cancelled) {