@speed.press/kit
Advanced tools
+1
-1
| { | ||
| "name": "@speed.press/kit", | ||
| "version": "1.7.1", | ||
| "version": "1.7.2", | ||
| "description": "Convert WordPress sites into pixel-faithful Astro frontends", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -113,3 +113,3 @@ <?php | ||
| 'xcloud_headless_main', | ||
| __( 'Connection Settings', 'xcloud-headless-bridge' ), | ||
| '', // The card renders its own heading — a section title would duplicate it. | ||
| fn() => null, | ||
@@ -152,4 +152,4 @@ self::PAGE_SLUG | ||
| . 'value="' . esc_attr( $value ) . '" class="regular-text" ' | ||
| . 'placeholder="https://your-astro-site.com/api/webhook" />'; | ||
| echo '<p class="description">' . esc_html__( 'The webhook endpoint on your Astro frontend that receives content change events.', 'xcloud-headless-bridge' ) . '</p>'; | ||
| . 'placeholder="https://your-astro-site.com/api/regenerate" />'; | ||
| echo '<p class="description">' . esc_html__( 'The webhook endpoint on your Astro frontend that receives content change events — for Speed.Press / xCloud Headless sites this is https://<your-domain>/api/regenerate.', 'xcloud-headless-bridge' ) . '</p>'; | ||
| } | ||
@@ -156,0 +156,0 @@ |
| #!/bin/sh | ||
| set -e | ||
| # Container supervisor. Busybox ash (node:*-alpine) has no reliable `wait -n`, | ||
| # so we poll with `kill -0` instead. nginx is the critical process — if it dies | ||
| # the container exits (non-zero) for the orchestrator to restart. The | ||
| # regenerator is a sidecar: if it dies we restart just it, so nginx keeps | ||
| # serving and any already-applied live patches survive. | ||
| # Start regenerator service in background | ||
| node /app/regenerator/server.js & | ||
| REGEN_PID=$! | ||
| start_regen() { | ||
| node /app/regenerator/server.js & | ||
| REGEN_PID=$! | ||
| } | ||
| # Start nginx in foreground | ||
| shutdown() { | ||
| kill "$REGEN_PID" "$NGINX_PID" 2>/dev/null | ||
| exit 0 | ||
| } | ||
| trap shutdown TERM INT | ||
| start_regen | ||
| nginx -g 'daemon off;' & | ||
| NGINX_PID=$! | ||
| # Wait for either process to exit; if one dies, kill the other | ||
| wait -n $REGEN_PID $NGINX_PID | ||
| kill $REGEN_PID $NGINX_PID 2>/dev/null || true | ||
| while kill -0 "$NGINX_PID" 2>/dev/null; do | ||
| if ! kill -0 "$REGEN_PID" 2>/dev/null; then | ||
| echo "[start] regenerator exited — restarting sidecar" | ||
| start_regen | ||
| fi | ||
| sleep 2 | ||
| done | ||
| echo "[start] nginx exited — stopping container" | ||
| kill "$REGEN_PID" 2>/dev/null || true | ||
| exit 1 |
@@ -20,2 +20,12 @@ #!/usr/bin/env node | ||
| // A bad webhook or a transient fault must never take the sidecar (and with it | ||
| // the whole container) down — log and keep serving. Content-update failures | ||
| // are already caught per-event; these are the last-resort backstops. | ||
| process.on('uncaughtException', (err) => { | ||
| console.error('[regenerator] uncaughtException (ignored):', err && err.stack || err); | ||
| }); | ||
| process.on('unhandledRejection', (reason) => { | ||
| console.error('[regenerator] unhandledRejection (ignored):', reason && reason.stack || reason); | ||
| }); | ||
| const PORT = parseInt(process.env.REGENERATOR_PORT || '8080', 10); | ||
@@ -22,0 +32,0 @@ const WEBHOOK_SECRET = process.env.WEBHOOK_SECRET || ''; |
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
403968
0.29%7289
0.12%