ework-aio 0.5.21 → 0.5.22
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/scripts/e2e-install.sh +48 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ework-aio",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.22",
|
|
4
4
|
"description": "All-in-one installer for ework (issue tracker) + ework-daemon (AI bridge) + opencode-ework (plugin). One command: npm i -g ework-aio && ework-aio install.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/scripts/e2e-install.sh
CHANGED
|
@@ -709,6 +709,54 @@ case "$DELIVERIES_CODE" in
|
|
|
709
709
|
;;
|
|
710
710
|
esac
|
|
711
711
|
|
|
712
|
+
# Phase 5.8: router integration (webhook routing layer)
|
|
713
|
+
echo
|
|
714
|
+
echo "====================================================="
|
|
715
|
+
echo "Phase 5.8: router integration"
|
|
716
|
+
echo "====================================================="
|
|
717
|
+
|
|
718
|
+
ROUTER_PORT=3104
|
|
719
|
+
info "router health: GET http://127.0.0.1:$ROUTER_PORT/api/health"
|
|
720
|
+
ROUTIER_HEALTH_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \
|
|
721
|
+
--max-time 5 "http://127.0.0.1:$ROUTER_PORT/api/health" 2>/dev/null || echo "000")
|
|
722
|
+
case "$ROUTIER_HEALTH_CODE" in
|
|
723
|
+
200)
|
|
724
|
+
pass "router /api/health responds (200)"
|
|
725
|
+
;;
|
|
726
|
+
000)
|
|
727
|
+
info "router not running (binary not installed in this env) — skipping router tests"
|
|
728
|
+
;;
|
|
729
|
+
*)
|
|
730
|
+
info "router health returned HTTP $ROUTIER_HEALTH_CODE"
|
|
731
|
+
;;
|
|
732
|
+
esac
|
|
733
|
+
|
|
734
|
+
if [[ "$ROUTIER_HEALTH_CODE" == "200" ]]; then
|
|
735
|
+
info "router strategy: GET /api/strategy"
|
|
736
|
+
STRATEGY_RESP=$(curl -sS --max-time 5 "http://127.0.0.1:$ROUTER_PORT/api/strategy" 2>/dev/null || echo "")
|
|
737
|
+
if echo "$STRATEGY_RESP" | grep -q "strategy"; then
|
|
738
|
+
pass "router strategy endpoint responds"
|
|
739
|
+
else
|
|
740
|
+
info "router strategy response: $STRATEGY_RESP"
|
|
741
|
+
fi
|
|
742
|
+
|
|
743
|
+
info "router forwards webhook to daemon (POST /webhook/gitea)"
|
|
744
|
+
ROUTER_FORWARD_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \
|
|
745
|
+
--max-time 10 \
|
|
746
|
+
-X POST \
|
|
747
|
+
-H "Content-Type: application/json" \
|
|
748
|
+
-d '{"action":"opened","issue":{"number":99999,"title":"router-test","body":"e2e router forward test","state":"open","user":{"login":"e2e"}},"repository":{"owner":{"login":"e2e"},"name":"test"}}' \
|
|
749
|
+
"http://127.0.0.1:$ROUTER_PORT/webhook/gitea" 2>/dev/null || echo "000")
|
|
750
|
+
case "$ROUTER_FORWARD_CODE" in
|
|
751
|
+
200|204)
|
|
752
|
+
pass "router accepted webhook (HTTP $ROUTER_FORWARD_CODE)"
|
|
753
|
+
;;
|
|
754
|
+
*)
|
|
755
|
+
info "router forward returned HTTP $ROUTER_FORWARD_CODE (daemon may not be reachable from router)"
|
|
756
|
+
;;
|
|
757
|
+
esac
|
|
758
|
+
fi
|
|
759
|
+
|
|
712
760
|
# Phase 7: multi-daemon coordination (requires MySQL shared DB)
|
|
713
761
|
# -----------------------------------------------------------------------------
|
|
714
762
|
if grep -q 'WORK_DB_DRIVER=mysql' "$DATA_DIR/ework-daemon/.env" 2>/dev/null; then
|