@kritchoff/agent-browser 0.9.40 → 0.9.42
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/sdk.sh +10 -0
- package/start.sh +4 -3
package/package.json
CHANGED
package/sdk.sh
CHANGED
|
@@ -177,6 +177,13 @@ cmd_stop() {
|
|
|
177
177
|
log_success "Stopped."
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
cmd_clean() {
|
|
181
|
+
log_info "Tearing down environment and releasing ports (using $COMPOSE_FILE)..."
|
|
182
|
+
cd "$SDK_ROOT"
|
|
183
|
+
docker compose -f "$COMPOSE_FILE" down -v --remove-orphans
|
|
184
|
+
log_success "Environment cleaned."
|
|
185
|
+
}
|
|
186
|
+
|
|
180
187
|
cmd_reset() {
|
|
181
188
|
log_info "Performing Fast Browser Reset..."
|
|
182
189
|
export COMPOSE_FILE="$COMPOSE_FILE"
|
|
@@ -202,6 +209,9 @@ case "$1" in
|
|
|
202
209
|
stop)
|
|
203
210
|
cmd_stop
|
|
204
211
|
;;
|
|
212
|
+
clean)
|
|
213
|
+
cmd_clean
|
|
214
|
+
;;
|
|
205
215
|
reset)
|
|
206
216
|
cmd_reset
|
|
207
217
|
;;
|
package/start.sh
CHANGED
|
@@ -74,11 +74,12 @@ if [ -n "$SNAPSHOT_PATH" ]; then
|
|
|
74
74
|
# (This assumes the entrypoint script respects EMULATOR_SNAPSHOT_NAME)
|
|
75
75
|
# For now, we'll rely on the default behavior or standard AVD loading
|
|
76
76
|
|
|
77
|
-
echo " Restarting
|
|
78
|
-
docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" restart android-service
|
|
77
|
+
echo " Restarting services to load snapshot..."
|
|
78
|
+
docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" restart android-service agent-service
|
|
79
79
|
|
|
80
|
-
# Update container
|
|
80
|
+
# Update container IDs after restart
|
|
81
81
|
ANDROID_CONTAINER=$(docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" ps -q android-service)
|
|
82
|
+
AGENT_CONTAINER=$(docker compose -f "${COMPOSE_FILE:-docker-compose.prod.yml}" ps -q agent-service)
|
|
82
83
|
else
|
|
83
84
|
echo -e "${RED}Error: Failed to import snapshot.${NC}"
|
|
84
85
|
exit 1
|