@akiojin/gwt 4.3.1 → 4.4.0
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/cli/ui/components/App.d.ts.map +1 -1
- package/dist/cli/ui/components/App.js +12 -61
- package/dist/cli/ui/components/App.js.map +1 -1
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts +20 -0
- package/dist/cli/ui/components/common/SpinnerIcon.d.ts.map +1 -0
- package/dist/cli/ui/components/common/SpinnerIcon.js +61 -0
- package/dist/cli/ui/components/common/SpinnerIcon.js.map +1 -0
- package/dist/cli/ui/components/parts/Stats.d.ts +2 -5
- package/dist/cli/ui/components/parts/Stats.d.ts.map +1 -1
- package/dist/cli/ui/components/parts/Stats.js +16 -3
- package/dist/cli/ui/components/parts/Stats.js.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts +6 -2
- package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -1
- package/dist/cli/ui/components/screens/BranchListScreen.js +95 -42
- package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -1
- package/dist/cli/ui/hooks/useAppInput.d.ts +1 -0
- package/dist/cli/ui/hooks/useAppInput.d.ts.map +1 -1
- package/dist/cli/ui/hooks/useAppInput.js +2 -1
- package/dist/cli/ui/hooks/useAppInput.js.map +1 -1
- package/dist/cli/ui/hooks/useGitData.d.ts +1 -0
- package/dist/cli/ui/hooks/useGitData.d.ts.map +1 -1
- package/dist/cli/ui/hooks/useGitData.js +43 -15
- package/dist/cli/ui/hooks/useGitData.js.map +1 -1
- package/dist/cli/ui/types.d.ts +4 -0
- package/dist/cli/ui/types.d.ts.map +1 -1
- package/dist/git.d.ts +2 -0
- package/dist/git.d.ts.map +1 -1
- package/dist/git.js +38 -14
- package/dist/git.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/cli/ui/__tests__/components/screens/BranchListScreen.test.tsx +208 -0
- package/src/cli/ui/__tests__/hooks/useGitData.nonblocking.test.tsx +158 -0
- package/src/cli/ui/components/App.tsx +22 -77
- package/src/cli/ui/components/common/SpinnerIcon.tsx +86 -0
- package/src/cli/ui/components/parts/Stats.tsx +24 -3
- package/src/cli/ui/components/screens/BranchListScreen.tsx +117 -45
- package/src/cli/ui/hooks/useAppInput.ts +2 -1
- package/src/cli/ui/hooks/useGitData.ts +101 -18
- package/src/cli/ui/screens/__tests__/BranchActionSelectorScreen.test.tsx +46 -1
- package/src/cli/ui/types.ts +5 -0
- package/src/git.ts +48 -17
- package/src/index.ts +14 -1
package/src/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
3
5
|
import {
|
|
4
6
|
isGitRepository,
|
|
5
7
|
getRepositoryRoot,
|
|
@@ -914,8 +916,19 @@ export async function main(): Promise<void> {
|
|
|
914
916
|
await runInteractiveLoop();
|
|
915
917
|
}
|
|
916
918
|
|
|
919
|
+
export function isEntryPoint(metaUrl: string, argv1?: string): boolean {
|
|
920
|
+
if (!argv1) {
|
|
921
|
+
return false;
|
|
922
|
+
}
|
|
923
|
+
try {
|
|
924
|
+
return fileURLToPath(metaUrl) === path.resolve(argv1);
|
|
925
|
+
} catch {
|
|
926
|
+
return false;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
917
930
|
// Run the application if this module is executed directly
|
|
918
|
-
if (import.meta.url
|
|
931
|
+
if (isEntryPoint(import.meta.url, process.argv[1])) {
|
|
919
932
|
main().catch(async (error) => {
|
|
920
933
|
console.error("Fatal error:", error);
|
|
921
934
|
await waitForErrorAcknowledgement();
|