@rubytech/create-maxy 1.0.786 → 1.0.788

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.786",
3
+ "version": "1.0.788",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -603,6 +603,7 @@ function handleRequest(req, res) {
603
603
 
604
604
  // API: POST /connect — submit WiFi credentials
605
605
  if (pathname === "/connect" && req.method === "POST") {
606
+ console.error(`[wifi-provision-server] /connect POST received connecting-flag=${connecting}`);
606
607
  if (connecting) {
607
608
  res.writeHead(409, { "Content-Type": "application/json" });
608
609
  res.end('{"error":"Connection already in progress"}');
@@ -655,8 +656,12 @@ function handleRequest(req, res) {
655
656
  // Use async open+write to avoid blocking the event loop (a FIFO
656
657
  // write blocks until a reader opens the other end).
657
658
  connecting = true;
658
- res.writeHead(202, { "Content-Type": "application/json" });
659
- res.end('{"status":"connecting"}');
659
+ console.error(`[wifi-provision-server] /connect ssid=${JSON.stringify(ssid)} → 200 sync-success hostname=${HOSTNAME}`);
660
+ res.writeHead(200, { "Content-Type": "application/json", "Cache-Control": "no-store" });
661
+ res.end(JSON.stringify({
662
+ success: true,
663
+ hostname: HOSTNAME,
664
+ }));
660
665
 
661
666
  const fifoData = `${ssid}\n${password}`;
662
667
  fs.open(CONNECT_FIFO, "w", (err, fd) => {
@@ -709,7 +714,12 @@ function handleRequest(req, res) {
709
714
  res.end();
710
715
  return;
711
716
  }
712
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
717
+ res.writeHead(200, {
718
+ "Content-Type": "text/html; charset=utf-8",
719
+ "Cache-Control": "no-store, no-cache, must-revalidate",
720
+ "Pragma": "no-cache",
721
+ "Expires": "0",
722
+ });
713
723
  res.end(portalHTML());
714
724
  }
715
725