get-shit-done-cc-ui 0.2.7 → 0.2.8

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.
@@ -1,26 +1,33 @@
1
1
  #!/bin/sh
2
- # Resolve the actual package directory (not .bin symlink)
3
- PACKAGE_DIR="$(dirname "$(dirname "$(readlink -f "$0" 2>/dev/null || realpath "$0" 2>/dev/null || echo "$0")")")"
2
+ # Use persistent cache directory (survives npx temp cleanup)
3
+ CACHE_DIR="${HOME}/.cache/get-shit-done-cc-ui"
4
+ BINARY="$CACHE_DIR/gsd-ui-web"
4
5
 
5
- # If still in .bin, find the actual package
6
+ # Resolve package directory for download script
7
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8
+ PACKAGE_DIR="$(dirname "$SCRIPT_DIR")"
9
+
10
+ # If we're in .bin symlink, find actual package
6
11
  if echo "$PACKAGE_DIR" | grep -q "node_modules$"; then
7
12
  PACKAGE_DIR="$PACKAGE_DIR/get-shit-done-cc-ui"
8
13
  fi
9
14
 
10
- BINARY="$PACKAGE_DIR/bin/gsd-ui-web"
11
15
  DOWNLOAD_SCRIPT="$PACKAGE_DIR/lib/download.js"
12
16
 
13
- # Check if binary exists
17
+ # Create cache directory
18
+ mkdir -p "$CACHE_DIR"
19
+
20
+ # Check if binary exists in cache
14
21
  if [ ! -f "$BINARY" ]; then
15
22
  echo "Binary not found. Downloading for your platform..."
23
+ # Set cache dir for download script
24
+ export GSD_CACHE_DIR="$CACHE_DIR"
16
25
  node "$DOWNLOAD_SCRIPT"
17
26
  DOWNLOAD_EXIT=$?
18
27
  if [ $DOWNLOAD_EXIT -ne 0 ]; then
19
28
  exit $DOWNLOAD_EXIT
20
29
  fi
21
- echo ""
22
- echo "Download complete! Run 'npx get-shit-done-cc-ui' again to start."
23
- exit 0
24
30
  fi
25
31
 
32
+ # Run the binary
26
33
  exec "$BINARY" "$@"
@@ -1,25 +1,31 @@
1
1
  @echo off
2
2
  setlocal
3
3
 
4
- :: Find the package directory (resolve symlinks)
4
+ :: Use persistent cache directory
5
+ set "CACHE_DIR=%USERPROFILE%\.cache\get-shit-done-cc-ui"
6
+ set "BINARY=%CACHE_DIR%\gsd-ui-web.exe"
7
+
8
+ :: Find package directory for download script
5
9
  set "SCRIPT_DIR=%~dp0"
6
10
  set "PACKAGE_DIR=%SCRIPT_DIR%.."
7
11
 
8
- :: If we're in node_modules/.bin, find the actual package
12
+ :: If in node_modules/.bin, find actual package
9
13
  if exist "%PACKAGE_DIR%\get-shit-done-cc-ui\package.json" (
10
14
  set "PACKAGE_DIR=%PACKAGE_DIR%\get-shit-done-cc-ui"
11
15
  )
12
16
 
13
- set "BINARY=%PACKAGE_DIR%\bin\gsd-ui-web.exe"
14
17
  set "DOWNLOAD_SCRIPT=%PACKAGE_DIR%\lib\download.js"
15
18
 
19
+ :: Create cache directory
20
+ if not exist "%CACHE_DIR%" mkdir "%CACHE_DIR%"
21
+
22
+ :: Check if binary exists in cache
16
23
  if not exist "%BINARY%" (
17
24
  echo Binary not found. Downloading for your platform...
25
+ set "GSD_CACHE_DIR=%CACHE_DIR%"
18
26
  node "%DOWNLOAD_SCRIPT%"
19
27
  if errorlevel 1 exit /b 1
20
- echo.
21
- echo Download complete! Run 'npx get-shit-done-cc-ui' again to start.
22
- exit /b 0
23
28
  )
24
29
 
30
+ :: Run the binary
25
31
  "%BINARY%" %*
package/lib/download.js CHANGED
@@ -181,10 +181,11 @@ async function downloadBinary() {
181
181
  const isWindows = binaryName.endsWith('.exe');
182
182
  const outputName = isWindows ? 'gsd-ui-web.exe' : 'gsd-ui-web';
183
183
 
184
- const binDir = path.join(__dirname, '..', 'bin');
184
+ // Use cache directory if set (for npx persistence), otherwise package bin
185
+ const binDir = process.env.GSD_CACHE_DIR || path.join(__dirname, '..', 'bin');
185
186
  const binaryPath = path.join(binDir, outputName);
186
187
 
187
- // Ensure bin directory exists
188
+ // Ensure directory exists
188
189
  if (!fs.existsSync(binDir)) {
189
190
  fs.mkdirSync(binDir, { recursive: true });
190
191
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-shit-done-cc-ui",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "GSD-UI - Visual panel for Claude Code terminal workflows",
5
5
  "bin": {
6
6
  "get-shit-done-cc-ui": "./bin/get-shit-done-cc-ui"