arashi 1.11.1 → 1.11.2

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/arashi.bat CHANGED
@@ -1,6 +1,6 @@
1
1
  @echo off
2
- REM Wrapper for arashi.exe to support piping to tools like fzf on Windows
3
- REM This closes stdin before executing the binary
2
+ REM Wrapper for arashi.exe on Windows
3
+ REM Preserve stdin so interactive commands like `arashi switch` can prompt
4
4
 
5
5
  REM Get the directory where this script is located
6
6
  set "SCRIPT_DIR=%~dp0"
@@ -17,6 +17,5 @@ if not exist "%BINARY%" (
17
17
  exit /b 1
18
18
  )
19
19
 
20
- REM Execute the binary with stdin closed
21
- REM In Windows, we use <NUL to close/redirect stdin
22
- "%BINARY%" %* <NUL
20
+ REM Execute the binary with inherited stdio
21
+ "%BINARY%" %*
package/bin/arashi.js CHANGED
@@ -10,6 +10,29 @@ const __dirname = dirname(__filename);
10
10
  const argv = process.argv.slice(2);
11
11
  const isWindows = process.platform === "win32";
12
12
 
13
+ const resolveBinaryPath = () => {
14
+ const defaultBinary = isWindows ? "arashi.bin.exe" : "arashi.bin";
15
+ const defaultBinaryPath = join(__dirname, defaultBinary);
16
+
17
+ if (existsSync(defaultBinaryPath)) {
18
+ return defaultBinaryPath;
19
+ }
20
+
21
+ if (isWindows) {
22
+ return join(__dirname, "arashi-windows-x64.exe");
23
+ }
24
+
25
+ if (process.platform === "darwin" && process.arch === "arm64") {
26
+ return join(__dirname, "arashi-macos-arm64");
27
+ }
28
+
29
+ if (process.platform === "linux" && process.arch === "x64") {
30
+ return join(__dirname, "arashi-linux-x64");
31
+ }
32
+
33
+ return defaultBinaryPath;
34
+ };
35
+
13
36
  const ensureInstalled = () => {
14
37
  const wrapper = isWindows ? "arashi.bat" : "arashi";
15
38
  const wrapperPath = join(__dirname, wrapper);
@@ -62,12 +85,12 @@ const ensureInstalled = () => {
62
85
  };
63
86
 
64
87
  ensureInstalled();
65
-
66
88
  const wrapper = isWindows ? "arashi.bat" : "arashi";
67
89
  const wrapperPath = join(__dirname, wrapper);
90
+ const binaryPath = resolveBinaryPath();
68
91
 
69
92
  const child = isWindows
70
- ? spawn(process.env.ComSpec ?? "cmd.exe", ["/d", "/s", "/c", wrapperPath, ...argv], {
93
+ ? spawn(binaryPath, argv, {
71
94
  stdio: "inherit",
72
95
  windowsHide: false,
73
96
  })
package/bin/arashi.ps1 CHANGED
@@ -1,5 +1,5 @@
1
- # PowerShell wrapper for arashi.exe to support piping to tools like fzf
2
- # This closes stdin before executing the binary
1
+ # PowerShell wrapper for arashi.exe on Windows
2
+ # Preserve stdin so interactive commands like `arashi switch` can prompt
3
3
 
4
4
  $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
5
5
  $Binary = Join-Path $ScriptDir "arashi.bin.exe"
@@ -15,7 +15,10 @@ if (-not (Test-Path $Binary)) {
15
15
  exit 1
16
16
  }
17
17
 
18
- # PowerShell way to close stdin and execute
19
- # We redirect stdin from $null which effectively closes it
20
- $process = Start-Process -FilePath $Binary -ArgumentList $args -NoNewWindow -Wait -PassThru -RedirectStandardInput $null
21
- exit $process.ExitCode
18
+ # Execute with inherited stdio so prompts remain interactive
19
+ & $Binary @args
20
+ if ($LASTEXITCODE -ne $null) {
21
+ exit $LASTEXITCODE
22
+ }
23
+
24
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arashi",
3
- "version": "1.11.1",
3
+ "version": "1.11.2",
4
4
  "description": "Git worktree manager for meta-repositories - The eye of the storm for your development workflow",
5
5
  "keywords": [
6
6
  "cli",
@@ -54,7 +54,7 @@
54
54
  "build:mac": "bun build src/index.ts --compile --target=bun-darwin-arm64 --outfile bin/arashi-macos-arm64",
55
55
  "build:linux": "bun build src/index.ts --compile --target=bun-linux-x64 --outfile bin/arashi-linux-x64",
56
56
  "build:windows": "bun build src/index.ts --compile --target=bun-windows-x64 --outfile bin/arashi-windows-x64.exe",
57
- "test": "bun test",
57
+ "test": "bun run scripts/test/run-tests.ts",
58
58
  "typecheck": "tsc --noEmit",
59
59
  "lint": "oxlint -D no-explicit-any .",
60
60
  "lint:fix": "oxlint --fix -D no-explicit-any .",