@bobfrankston/mailx 1.0.287 → 1.0.288
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/bin/mailx.js +10 -2
- package/package.json +1 -1
package/bin/mailx.js
CHANGED
|
@@ -661,9 +661,17 @@ async function runTest() {
|
|
|
661
661
|
console.log("Test complete. Check your inbox for the test message(s).");
|
|
662
662
|
process.exit(0);
|
|
663
663
|
}
|
|
664
|
-
/** Register this client on GDrive — writes/updates clients.jsonc with device info
|
|
664
|
+
/** Register this client on GDrive — writes/updates clients.jsonc with device info.
|
|
665
|
+
* Best-effort: silently skips when cloud isn't ready (fresh install, expired
|
|
666
|
+
* token). The scary "No cloud configured" banner must NOT fire for this. */
|
|
665
667
|
async function registerClient(settings) {
|
|
666
|
-
const { cloudRead, cloudWrite } = await import("@bobfrankston/mailx-settings");
|
|
668
|
+
const { cloudRead, cloudWrite, getStorageInfo } = await import("@bobfrankston/mailx-settings");
|
|
669
|
+
// Check if cloud is actually ready before attempting a write — cloudWrite
|
|
670
|
+
// calls setCloudError which pushes an error banner to the UI. We'd rather
|
|
671
|
+
// silently skip than show "No cloud configured" at startup.
|
|
672
|
+
const info = getStorageInfo();
|
|
673
|
+
if (info.mode === "local" || !info.provider || info.provider === "local")
|
|
674
|
+
return;
|
|
667
675
|
// Device ID: stable per machine, stored locally
|
|
668
676
|
const deviceIdPath = path.join(os.homedir(), ".mailx", "device-id");
|
|
669
677
|
let deviceId;
|