@cremini/skillpack 1.1.5 → 1.1.7
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/README.md +84 -45
- package/dist/cli.js +3221 -192
- package/package.json +1 -1
- package/templates/start.bat +27 -0
- package/templates/start.sh +30 -1
package/package.json
CHANGED
package/templates/start.bat
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
@echo off
|
|
2
2
|
cd /d "%~dp0"
|
|
3
|
+
|
|
4
|
+
rem First-run flag
|
|
5
|
+
set "FIRST_RUN=1"
|
|
6
|
+
|
|
7
|
+
:loop
|
|
8
|
+
set "SKILLPACK_FIRST_RUN=%FIRST_RUN%"
|
|
9
|
+
set "PACK_ROOT=%~dp0"
|
|
3
10
|
npx -y @cremini/skillpack run .
|
|
11
|
+
set "EXIT_CODE=%errorlevel%"
|
|
12
|
+
|
|
13
|
+
set "FIRST_RUN=0"
|
|
14
|
+
|
|
15
|
+
rem Only restart on exit code 75 (/restart command)
|
|
16
|
+
if %EXIT_CODE% equ 75 (
|
|
17
|
+
echo.
|
|
18
|
+
echo Restarting...
|
|
19
|
+
timeout /t 1 /nobreak >nul
|
|
20
|
+
goto loop
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
rem All other exit codes (0, 64, crash, Ctrl+C, kill, etc.) → stop
|
|
24
|
+
if %EXIT_CODE% equ 64 (
|
|
25
|
+
echo.
|
|
26
|
+
echo Shutdown complete.
|
|
27
|
+
) else if %EXIT_CODE% neq 0 (
|
|
28
|
+
echo.
|
|
29
|
+
echo Process exited with code %EXIT_CODE%.
|
|
30
|
+
)
|
package/templates/start.sh
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
cd "$(dirname "$0")"
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
# First-run flag (controls browser auto-open on first launch only)
|
|
5
|
+
FIRST_RUN=1
|
|
6
|
+
|
|
7
|
+
while true; do
|
|
8
|
+
SKILLPACK_FIRST_RUN="$FIRST_RUN" \
|
|
9
|
+
PACK_ROOT="$(pwd)" \
|
|
10
|
+
npx -y @cremini/skillpack run .
|
|
11
|
+
EXIT_CODE=$?
|
|
12
|
+
|
|
13
|
+
FIRST_RUN=0
|
|
14
|
+
|
|
15
|
+
# Only restart on exit code 75 (/restart command)
|
|
16
|
+
if [ "$EXIT_CODE" -eq 75 ]; then
|
|
17
|
+
echo ""
|
|
18
|
+
echo " Restarting..."
|
|
19
|
+
sleep 1
|
|
20
|
+
continue
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# All other exit codes (0, 64, crash, Ctrl+C, kill, etc.) → stop
|
|
24
|
+
if [ "$EXIT_CODE" -eq 64 ]; then
|
|
25
|
+
echo ""
|
|
26
|
+
echo " Shutdown complete."
|
|
27
|
+
elif [ "$EXIT_CODE" -ne 0 ]; then
|
|
28
|
+
echo ""
|
|
29
|
+
echo " Process exited with code $EXIT_CODE."
|
|
30
|
+
fi
|
|
31
|
+
break
|
|
32
|
+
done
|