create-nuxt-base 2.6.2 → 2.6.4
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/.oxfmtrc.jsonc +4 -0
- package/CHANGELOG.md +5 -2
- package/nuxt-base-template/.claude/agent-memory/lt-dev-npm-package-maintainer/MEMORY.md +1 -1
- package/nuxt-base-template/.claude/agent-memory/lt-dev-security-reviewer/MEMORY.md +1 -1
- package/nuxt-base-template/.claude/agent-memory/lt-dev-security-reviewer/project_dep_maintenance.md +1 -1
- package/nuxt-base-template/.editorconfig +18 -0
- package/nuxt-base-template/CLAUDE.md +2 -1
- package/nuxt-base-template/README.md +1 -1
- package/nuxt-base-template/package.json +9 -9
- package/nuxt-base-template/pnpm-lock.yaml +448 -389
- package/nuxt-base-template/scripts/check-server-start.sh +36 -21
- package/package.json +1 -1
|
@@ -1,37 +1,52 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
|
|
2
|
+
# Verify the built Nuxt server boots and stays up, then exit cleanly.
|
|
3
|
+
#
|
|
4
|
+
# Previously this script also streamed logs via a parallel `tail -f` and waited
|
|
5
|
+
# on both PIDs on EXIT. On macOS / bash that pattern hangs intermittently:
|
|
6
|
+
# `tail -f` does not always honor SIGTERM while blocked on the kqueue file
|
|
7
|
+
# watch, so `wait $TAIL_PID` blocks indefinitely and the surrounding
|
|
8
|
+
# `pnpm run check` never returns. We now skip the live stream and print the
|
|
9
|
+
# relevant log excerpt at the end instead.
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
LOG_FILE=$(mktemp)
|
|
11
|
+
set -e
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
# The build step already ran before this script is called
|
|
9
|
-
node .output/server/index.mjs > "$LOG_FILE" 2>&1 &
|
|
10
|
-
SERVER_PID=$!
|
|
13
|
+
LOG_FILE=$(mktemp -t nuxt-check-server.XXXXXX)
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
cleanup() {
|
|
16
|
+
if [[ -n "${SERVER_PID:-}" ]]; then
|
|
17
|
+
# SIGTERM first, then SIGKILL if still alive after ~2s. We do NOT `wait`
|
|
18
|
+
# on the child — it was the original hang. Nitro can take a moment to
|
|
19
|
+
# unwind its listeners; the escalation gives it that moment.
|
|
20
|
+
kill "$SERVER_PID" 2>/dev/null || true
|
|
21
|
+
for _ in 1 2 3 4; do
|
|
22
|
+
kill -0 "$SERVER_PID" 2>/dev/null || break
|
|
23
|
+
sleep 0.5
|
|
24
|
+
done
|
|
25
|
+
kill -9 "$SERVER_PID" 2>/dev/null || true
|
|
26
|
+
fi
|
|
27
|
+
rm -f "$LOG_FILE"
|
|
28
|
+
}
|
|
29
|
+
trap cleanup EXIT
|
|
15
30
|
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
node .output/server/index.mjs >"$LOG_FILE" 2>&1 &
|
|
32
|
+
SERVER_PID=$!
|
|
33
|
+
# Remove from job table so bash does not print "Terminated: 15" on SIGTERM
|
|
34
|
+
disown "$SERVER_PID" 2>/dev/null || true
|
|
18
35
|
|
|
19
|
-
|
|
20
|
-
for i in $(seq 1 60); do
|
|
36
|
+
for _ in $(seq 1 60); do
|
|
21
37
|
if grep -q "Listening on\|Nitro ready\|Local:" "$LOG_FILE" 2>/dev/null; then
|
|
22
|
-
|
|
38
|
+
tail -n 5 "$LOG_FILE"
|
|
23
39
|
echo "Server started successfully - check complete"
|
|
24
40
|
exit 0
|
|
25
41
|
fi
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
echo "Server process exited unexpectedly"
|
|
42
|
+
if ! kill -0 "$SERVER_PID" 2>/dev/null; then
|
|
43
|
+
echo "Server process exited unexpectedly. Full log:"
|
|
44
|
+
cat "$LOG_FILE"
|
|
30
45
|
exit 1
|
|
31
46
|
fi
|
|
32
47
|
sleep 1
|
|
33
48
|
done
|
|
34
49
|
|
|
35
|
-
echo ""
|
|
36
|
-
|
|
50
|
+
echo "Server failed to start within 60 seconds. Last 30 log lines:"
|
|
51
|
+
tail -n 30 "$LOG_FILE"
|
|
37
52
|
exit 1
|
package/package.json
CHANGED