@rubytech/create-maxy 1.0.787 → 1.0.789

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.
Files changed (22) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/scripts/wifi-provision-server/server.js +9 -13
  3. package/payload/server/chunk-FEEKJZOY.js +9841 -0
  4. package/payload/server/maxy-edge.js +1 -1
  5. package/payload/server/public/assets/{Checkbox-C_KxaLc-.js → Checkbox-DZgcVkLU.js} +1 -1
  6. package/payload/server/public/assets/{admin-xbKPR6ZI.js → admin-pSseUJFx.js} +1 -1
  7. package/payload/server/public/assets/data-Dbl98u-8.js +1 -0
  8. package/payload/server/public/assets/graph-B6QNcEdZ.js +1 -0
  9. package/payload/server/public/assets/{jsx-runtime-BZtBxBng.css → jsx-runtime-CSZKQ_0M.css} +1 -1
  10. package/payload/server/public/assets/{page-CjTfZ3O6.js → page-DUiVzuAl.js} +1 -1
  11. package/payload/server/public/assets/{page-DEWgk_nR.js → page-DzXDy3ON.js} +1 -1
  12. package/payload/server/public/assets/{public-CehiL-qZ.js → public--QCAsuXZ.js} +1 -1
  13. package/payload/server/public/assets/{share-2-BG1VXt3z.js → share-2-DHxwin_o.js} +1 -1
  14. package/payload/server/public/assets/{useVoiceRecorder-1Dvb-yHn.js → useVoiceRecorder-DNApywpF.js} +1 -1
  15. package/payload/server/public/data.html +5 -5
  16. package/payload/server/public/graph.html +6 -6
  17. package/payload/server/public/index.html +8 -8
  18. package/payload/server/public/public.html +5 -5
  19. package/payload/server/server.js +1 -1
  20. package/payload/server/public/assets/data-D23IzpJ2.js +0 -1
  21. package/payload/server/public/assets/graph-D2AS9zFS.js +0 -1
  22. /package/payload/server/public/assets/{jsx-runtime-DrneHL3t.js → jsx-runtime-Fjep7VIt.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.787",
3
+ "version": "1.0.789",
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,21 +656,11 @@ 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
- // Return success immediately with the post-connect URL info.
659
- // Why not poll for verification? The AP and station modes are
660
- // mutually exclusive on a single radio: as soon as the bash
661
- // script tears down hostapd to run `nmcli connect`, the phone
662
- // loses its connection to 192.168.4.1 and any subsequent
663
- // `/result` poll dies. The success page must be in the phone's
664
- // hands BEFORE the AP goes away. We send the hostname (.local
665
- // resolution works on iOS/macOS) and the operator can paste
666
- // the URL into a browser if .local fails on their device.
667
- res.writeHead(200, { "Content-Type": "application/json" });
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" });
668
661
  res.end(JSON.stringify({
669
662
  success: true,
670
663
  hostname: HOSTNAME,
671
- // ip is intentionally absent: we don't yet know the new
672
- // home-WiFi IP and the AP IP (192.168.4.1) is about to die.
673
664
  }));
674
665
 
675
666
  const fifoData = `${ssid}\n${password}`;
@@ -723,7 +714,12 @@ function handleRequest(req, res) {
723
714
  res.end();
724
715
  return;
725
716
  }
726
- 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
+ });
727
723
  res.end(portalHTML());
728
724
  }
729
725