roamwright 0.61.0 → 0.61.1
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/package.json +1 -1
- package/tools/ios-sim.sh +14 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "roamwright",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.1",
|
|
4
4
|
"description": "A procedural worldbuilding engine built on top of Three.js. Generate landscapes with rivers and changing weather, animate crowds, and explore on foot or in flight.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"threejs",
|
package/tools/ios-sim.sh
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
# SIM_STORAGE_LOG_KEY localStorage key holding the diagnostic log JSON (default: roamwright:log)
|
|
19
19
|
# SIM_DEFAULT_ADDRESS default route address when $1 is omitted
|
|
20
20
|
# SIM_SERVE_SCRIPT relative path to server script supporting SERVE_ENTRY (default: scripts/serve.py)
|
|
21
|
+
# SIM_WAIT seconds to wait for another headless run on this Mac to finish before giving up (default: 600)
|
|
21
22
|
set -eu
|
|
22
23
|
REPO="${SIM_REPO:?SIM_REPO is required}"
|
|
23
24
|
OUT="${SIM_OUT:?SIM_OUT is required}"
|
|
@@ -48,10 +49,19 @@ entry="r=$address&mute${4:+&q=$4}${5:+&$5}"
|
|
|
48
49
|
echo "sim: no built page in $REPO: run make build there first" >&2
|
|
49
50
|
exit 2
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
# One page at a time on this Mac: a headless run already here is waited for (polled every 10 s, up to SIM_WAIT seconds), as the
|
|
53
|
+
# remote runner waits for a free turn, rather than failing a gate at once because another check was a minute from its end.
|
|
54
|
+
busy_here() { [ -d "${TMPDIR:-/tmp}/$TURN_HERE_NAME" ] || pgrep -x chrome-headless-shell >/dev/null || pgrep -qf 'Google Chrome for Testing'; }
|
|
55
|
+
waited=0
|
|
56
|
+
while busy_here; do
|
|
57
|
+
[ "$waited" -lt "${SIM_WAIT:-600}" ] || {
|
|
58
|
+
echo "sim: a headless run has used this Mac for ${waited} s: one page at a time (raise SIM_WAIT to wait longer)" >&2
|
|
59
|
+
exit 2
|
|
60
|
+
}
|
|
61
|
+
[ "$waited" -gt 0 ] || echo "sim: a headless run is using this Mac; waiting up to ${SIM_WAIT:-600} s for it to finish" >&2
|
|
62
|
+
sleep 10
|
|
63
|
+
waited=$((waited + 10))
|
|
64
|
+
done
|
|
55
65
|
mkdir -p "$OUT" "$(dirname "$QUIET")"
|
|
56
66
|
held=
|
|
57
67
|
[ -e "$QUIET" ] || {
|