@bobfrankston/mailx 1.0.161 → 1.0.163

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": "@bobfrankston/mailx",
3
- "version": "1.0.161",
3
+ "version": "1.0.163",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -20,10 +20,10 @@
20
20
  "postinstall": "node bin/postinstall.js"
21
21
  },
22
22
  "dependencies": {
23
- "@bobfrankston/iflow": "^1.0.55",
23
+ "@bobfrankston/iflow": "^1.0.56",
24
24
  "@bobfrankston/miscinfo": "^1.0.7",
25
25
  "@bobfrankston/oauthsupport": "^1.0.20",
26
- "@bobfrankston/msger": "^0.1.211",
26
+ "@bobfrankston/msger": "^0.1.213",
27
27
  "@capacitor/android": "^8.3.0",
28
28
  "@capacitor/cli": "^8.3.0",
29
29
  "@capacitor/core": "^8.3.0",
@@ -21,6 +21,7 @@
21
21
  "exclude": [
22
22
  "node_modules",
23
23
  "cruft",
24
+ "dev",
24
25
  ".git",
25
26
  "tests",
26
27
  "prev"
package/again.cmd DELETED
@@ -1,3 +0,0 @@
1
- call rebuild
2
- ager.ts
3
- mailx -email BobFrankston@Gmail.com
package/bin/ager.js DELETED
@@ -1,57 +0,0 @@
1
- /**
2
- * ager — archive .mailx to c:\temp\.mailx## and preserve OAuth tokens
3
- *
4
- * Moves ~/.mailx to c:\temp\.mailx01 (or next available number),
5
- * then copies the tokens directory back so OAuth doesn't need re-consent.
6
- *
7
- * Usage: node ager.js
8
- */
9
- import fs from "node:fs";
10
- import path from "node:path";
11
- const home = process.env.USERPROFILE || process.env.HOME || ".";
12
- const source = path.join(home, ".mailx");
13
- const tempDir = "C:\\temp";
14
- if (!fs.existsSync(source)) {
15
- console.error(`No .mailx directory at ${source}`);
16
- process.exit(1);
17
- }
18
- // Find next available number
19
- fs.mkdirSync(tempDir, { recursive: true });
20
- let num = 1;
21
- while (fs.existsSync(path.join(tempDir, `.mailx${String(num).padStart(2, "0")}`))) {
22
- num++;
23
- }
24
- const dest = path.join(tempDir, `.mailx${String(num).padStart(2, "0")}`);
25
- // Save tokens before moving
26
- const tokensDir = path.join(source, "tokens");
27
- const hasTokens = fs.existsSync(tokensDir);
28
- const tokenFiles = [];
29
- if (hasTokens) {
30
- const walk = (dir, base) => {
31
- for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
32
- const full = path.join(dir, entry.name);
33
- const rel = path.join(base, entry.name);
34
- if (entry.isDirectory())
35
- walk(full, rel);
36
- else
37
- tokenFiles.push({ rel, data: fs.readFileSync(full) });
38
- }
39
- };
40
- walk(tokensDir, "");
41
- console.log(` Saved ${tokenFiles.length} token file(s)`);
42
- }
43
- // Move .mailx to temp
44
- fs.renameSync(source, dest);
45
- console.log(`Moved ${source} → ${dest}`);
46
- // Restore tokens to fresh .mailx
47
- if (tokenFiles.length > 0) {
48
- const newTokens = path.join(source, "tokens");
49
- for (const { rel, data } of tokenFiles) {
50
- const target = path.join(newTokens, rel);
51
- fs.mkdirSync(path.dirname(target), { recursive: true });
52
- fs.writeFileSync(target, data);
53
- }
54
- console.log(` Restored tokens to ${newTokens}`);
55
- }
56
- console.log("Ready for fresh start.");
57
- //# sourceMappingURL=ager.js.map
package/blowaway.cmd DELETED
@@ -1,3 +0,0 @@
1
- del C:\Users\Bob\.mailx\mailx.db C:\Users\Bob\.mailx\mailx.db-shm C:\Users\Bob\.mailx\mailx.db-wal
2
- if .%1==.all rmdir /s /q C:\Users\Bob\.mailx\mailxstore
3
-
package/killmail.cmd DELETED
@@ -1,13 +0,0 @@
1
- @echo off
2
- REM Kill mailx server (port 9333), launcher, and clean up stale DB locks
3
- REM Safe: only kills mailx processes, never all node.exe
4
-
5
- REM Try graceful exit first, then force kill
6
- curl -s -m 2 http://localhost:9333/api/exit >nul 2>&1
7
- timeout /t 1 /nobreak >nul 2>&1
8
- taskkill /F /IM mailx-app.exe >nul 2>&1 && echo Killed mailx-app.exe || echo mailx-app.exe not running
9
- killport 9333
10
-
11
- REM Clean up stale SQLite WAL/SHM files (left by zombie processes)
12
- if exist "%USERPROFILE%\.mailx\mailx.db-shm" del "%USERPROFILE%\.mailx\mailx.db-shm" && echo Cleaned mailx.db-shm
13
- if exist "%USERPROFILE%\.mailx\mailx.db-wal" del "%USERPROFILE%\.mailx\mailx.db-wal" && echo Cleaned mailx.db-wal
package/launch.psx DELETED
@@ -1,65 +0,0 @@
1
- # Launch mailx email client
2
- #
3
- # Usage: launch.ps1 [-dev] [-prod] [-restart] [-clear]
4
- # -dev (default) Start server with --watch for auto-restart on file changes
5
- # -prod Start server without --watch
6
- # -restart Kill existing server on port 9333 before starting
7
- # -clear Clear WebView2 cache before launching (fixes blank window issues)
8
- #
9
- # The launcher starts the Node server (if not running) and opens a WebView2 window.
10
- # Server: http://localhost:9333
11
- # Log: mailx.log
12
- # Data: ~/.mailx/ (DB, store, settings pointer)
13
-
14
- # Clear WebView2 cache if requested
15
- if ("-clear" -in $args) {
16
- $wv2dir = "$PSScriptRoot\launcher\bin\mailx-app.exe.WebView2"
17
- if (Test-Path $wv2dir) {
18
- Write-Host "Clearing WebView2 cache..."
19
- Remove-Item -Recurse -Force $wv2dir
20
- }
21
- # Remove -clear from args passed to exe
22
- $args = $args | Where-Object { $_ -ne "-clear" }
23
- }
24
-
25
- # Check if mailx-app is already running
26
- $existing = Get-Process -Name "mailx-app" -ErrorAction SilentlyContinue
27
- if ($existing -and ("-restart" -notin $args)) {
28
- Write-Host "mailx is already running (PID $($existing.Id)). Use -restart to force."
29
- # Try to bring the existing window to front
30
- Add-Type @"
31
- using System;
32
- using System.Runtime.InteropServices;
33
- public class Win32 {
34
- [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd);
35
- [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
36
- }
37
- "@
38
- $hwnd = $existing.MainWindowHandle
39
- if ($hwnd -ne [IntPtr]::Zero) {
40
- [Win32]::ShowWindow($hwnd, 9) | Out-Null # SW_RESTORE
41
- [Win32]::SetForegroundWindow($hwnd) | Out-Null
42
- }
43
- exit 0
44
- }
45
-
46
- # Copy latest release build to bin/ if newer
47
- $release = "$PSScriptRoot\launcher\target\release\mailx-app.exe"
48
- $bin = "$PSScriptRoot\launcher\bin\mailx-app.exe"
49
- if ((Test-Path $release) -and (Test-Path $bin)) {
50
- if ((Get-Item $release).LastWriteTime -gt (Get-Item $bin).LastWriteTime) {
51
- Write-Host "Updating launcher binary..."
52
- Copy-Item $release $bin -Force -ErrorAction SilentlyContinue
53
- }
54
- }
55
-
56
- # Try pre-built binary first, then release, then debug
57
- $exe = $bin
58
- if (-not (Test-Path $exe)) { $exe = $release }
59
- if (-not (Test-Path $exe)) { $exe = "$PSScriptRoot\launcher\target\debug\mailx-app.exe" }
60
- if (-not (Test-Path $exe)) {
61
- Write-Host "Launcher not found. Run: launcher\build.cmd"
62
- exit 1
63
- }
64
-
65
- Start-Process $exe -ArgumentList $args
package/rebuild.cmd DELETED
@@ -1,6 +0,0 @@
1
- setlocal
2
- : set MAILX_NATIVE_IMAP=1
3
- call npmglobalize
4
- : call killmail.cmd
5
- : launch.ps1
6
- endlocal
package/showports.cmd DELETED
@@ -1 +0,0 @@
1
- netstat -ano | findstr :9333