mirror of
https://github.com/garrytan/gstack.git
synced 2026-06-17 15:20:11 +02:00
Merge remote-tracking branch 'origin/main' into garrytan/cairo-v3
# Conflicts: # CHANGELOG.md # VERSION # package.json
This commit is contained in:
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# gstack-ios-qa-daemon — Mac-side daemon that brokers tailnet/loopback traffic
|
||||
# to a connected iPhone running the in-app StateServer over the CoreDevice USB
|
||||
# tunnel. Single-instance via flock on ~/.gstack/ios-qa-daemon.pid.
|
||||
#
|
||||
# Usage:
|
||||
# gstack-ios-qa-daemon # loopback-only (local USB)
|
||||
# gstack-ios-qa-daemon --tailnet # additionally open tailnet listener
|
||||
#
|
||||
# Environment:
|
||||
# GSTACK_IOS_DAEMON_PORT — loopback listener port (default 9099)
|
||||
# GSTACK_IOS_TARGET_UDID — target iOS device UDID (optional; otherwise
|
||||
# the first paired connected device is used)
|
||||
# GSTACK_IOS_TARGET_BUNDLE_ID — bundle ID of the iOS app hosting StateServer
|
||||
# (default com.gstack.iosqa.fixture)
|
||||
#
|
||||
# Readiness protocol: prints `READY: port=<n> pid=<pid>` to stdout once both
|
||||
# listeners are bound. Spawners read stdin with a ~5s timeout to confirm.
|
||||
#
|
||||
# Exits cleanly when no active loopback clients are connected AND no remote
|
||||
# session tokens are outstanding.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
GSTACK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
ENTRY="$GSTACK_DIR/ios-qa/daemon/src/index.ts"
|
||||
|
||||
if [ ! -f "$ENTRY" ]; then
|
||||
echo "gstack-ios-qa-daemon: missing $ENTRY (gstack install incomplete?)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v bun >/dev/null 2>&1; then
|
||||
echo "gstack-ios-qa-daemon: bun runtime not on PATH — install from https://bun.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec bun run "$ENTRY" "$@"
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
# gstack-ios-qa-mint — manage the tailnet allowlist for remote iOS QA agents.
|
||||
#
|
||||
# This is the owner-grant path: it writes identities into the local allowlist
|
||||
# so a remote agent on the tailnet can self-service mint a session token via
|
||||
# POST /auth/mint against the daemon.
|
||||
#
|
||||
# Run `gstack-ios-qa-mint --help` for full usage.
|
||||
#
|
||||
# Allowlist file: ~/.gstack/ios-qa-allowlist.json (mode 0600).
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
GSTACK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
ENTRY="$GSTACK_DIR/ios-qa/daemon/src/cli-mint.ts"
|
||||
|
||||
if [ ! -f "$ENTRY" ]; then
|
||||
echo "gstack-ios-qa-mint: missing $ENTRY (gstack install incomplete?)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v bun >/dev/null 2>&1; then
|
||||
echo "gstack-ios-qa-mint: bun runtime not on PATH — install from https://bun.sh" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec bun run "$ENTRY" "$@"
|
||||
Reference in New Issue
Block a user