@bobfrankston/rmfmail 1.0.619 → 1.0.620
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/client/app.ts +1 -0
- package/client/index.html +86 -1
- package/package.json +3 -3
package/client/app.ts
CHANGED
package/client/index.html
CHANGED
|
@@ -7,11 +7,96 @@
|
|
|
7
7
|
<!-- Title and other app-name-bearing elements are rewritten by
|
|
8
8
|
propagateAppName() in app.ts at module load. APP_NAME is the
|
|
9
9
|
single source of truth — never duplicate the literal here. -->
|
|
10
|
+
<!-- Boot timeline. `_t0` is captured the instant <head> parses; later
|
|
11
|
+
marks log against this baseline. Pair with daemon-side `[boot N ms]`
|
|
12
|
+
lines (bin/mailx.ts) to see the full cold-start picture without
|
|
13
|
+
theorizing. -->
|
|
14
|
+
<script>
|
|
15
|
+
window.__t0 = performance.now();
|
|
16
|
+
window.__btick = function (label) {
|
|
17
|
+
var dt = (performance.now() - window.__t0).toFixed(0).padStart(5, " ");
|
|
18
|
+
console.log("[wv " + dt + " ms] " + label);
|
|
19
|
+
};
|
|
20
|
+
window.__btick("html parse start");
|
|
21
|
+
</script>
|
|
10
22
|
<link rel="icon" type="image/svg+xml" href="favicon.svg">
|
|
11
23
|
<link rel="stylesheet" href="styles/variables.css">
|
|
12
24
|
<link rel="stylesheet" href="styles/components.css">
|
|
13
25
|
<link rel="stylesheet" href="styles/layout.css">
|
|
14
|
-
|
|
26
|
+
<!-- Import map: resolves @bobfrankston/* package specifiers used by the
|
|
27
|
+
in-WebView Android bootstrap. Unused on desktop (msger pre-injects
|
|
28
|
+
mailxapi via initScript before any page script runs); harmless to
|
|
29
|
+
include because nothing else imports those specifiers on the
|
|
30
|
+
desktop side. Single HTML for both shells; CSS handles narrow vs
|
|
31
|
+
wide layout, runtime detect handles bootstrap, no html fork. -->
|
|
32
|
+
<script type="importmap">
|
|
33
|
+
{
|
|
34
|
+
"imports": {
|
|
35
|
+
"@bobfrankston/mailx-store-web": "../packages/mailx-store-web/index.js",
|
|
36
|
+
"@bobfrankston/mailx-store-web/": "../packages/mailx-store-web/",
|
|
37
|
+
"@bobfrankston/mailx-types": "../packages/mailx-types/index.js",
|
|
38
|
+
"@bobfrankston/iflow-direct": "../node_modules/@bobfrankston/iflow-direct/index.js",
|
|
39
|
+
"@bobfrankston/iflow-direct/": "../node_modules/@bobfrankston/iflow-direct/",
|
|
40
|
+
"@bobfrankston/smtp-direct": "../node_modules/@bobfrankston/smtp-direct/index.js",
|
|
41
|
+
"@bobfrankston/smtp-direct/": "../node_modules/@bobfrankston/smtp-direct/",
|
|
42
|
+
"@bobfrankston/tcp-transport": "../node_modules/@bobfrankston/tcp-transport/index.js",
|
|
43
|
+
"@bobfrankston/tcp-transport/": "../node_modules/@bobfrankston/tcp-transport/",
|
|
44
|
+
"@bobfrankston/mailx-sync": "../node_modules/@bobfrankston/mailx-sync/index.js",
|
|
45
|
+
"@bobfrankston/mailx-sync/": "../node_modules/@bobfrankston/mailx-sync/",
|
|
46
|
+
"sql.js": "../packages/mailx-store-web/sql-wasm-esm.js"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
<!-- Early error handlers — ship problems to logit when running in
|
|
51
|
+
a context that can reach the network (Android shell). msger
|
|
52
|
+
desktop has its own console + log-file path, so these are a
|
|
53
|
+
no-op there (fetch may fail silently — that's fine). -->
|
|
54
|
+
<script>
|
|
55
|
+
function _mailxLogit(prefix, msg) {
|
|
56
|
+
try { fetch("https://rmf39.aaz.lt/logit/" + encodeURIComponent(prefix + ": " + msg) + "?log=mailx-android").catch(function(){}); } catch (e) {}
|
|
57
|
+
}
|
|
58
|
+
window.addEventListener("unhandledrejection", function(e) {
|
|
59
|
+
var msg = (e.reason && e.reason.message) || e.reason || "unknown";
|
|
60
|
+
var el = document.getElementById("startup-status");
|
|
61
|
+
if (el) el.textContent = "UNHANDLED: " + msg;
|
|
62
|
+
_mailxLogit("JS/REJECT", msg);
|
|
63
|
+
});
|
|
64
|
+
window.onerror = function(msg, src, line) {
|
|
65
|
+
var el = document.getElementById("startup-status");
|
|
66
|
+
if (el) el.textContent = "ERROR: " + msg;
|
|
67
|
+
_mailxLogit("JS/ERR", msg + " " + src + ":" + line);
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
<!-- Boot router. msger's initScript injects window.mailxapi BEFORE any
|
|
71
|
+
page script runs; if it's already there, we're on desktop, just
|
|
72
|
+
load the app. If it's missing, we're in a context (Android MAUI
|
|
73
|
+
WebView, browser) where the in-WebView bootstrap has to install
|
|
74
|
+
mailxapi via IndexedDB + Gmail API — call initAndroid first.
|
|
75
|
+
Single source-of-truth for which boot path runs; no URL params,
|
|
76
|
+
no user-agent sniffing, no html fork. -->
|
|
77
|
+
<script type="module">
|
|
78
|
+
window.__btick && window.__btick("module script entry");
|
|
79
|
+
try {
|
|
80
|
+
if (!window.mailxapi) {
|
|
81
|
+
window.__btick && window.__btick("android-bootstrap import begin");
|
|
82
|
+
const m = await import("@bobfrankston/mailx-store-web/android-bootstrap.js");
|
|
83
|
+
window.__btick && window.__btick("android-bootstrap module loaded");
|
|
84
|
+
await m.initAndroid();
|
|
85
|
+
window.__btick && window.__btick("initAndroid done");
|
|
86
|
+
} else {
|
|
87
|
+
window.__btick && window.__btick("desktop bootstrap (mailxapi pre-injected)");
|
|
88
|
+
}
|
|
89
|
+
window.__btick && window.__btick("app.js import begin");
|
|
90
|
+
await import("./app.js");
|
|
91
|
+
window.__btick && window.__btick("app.js loaded");
|
|
92
|
+
} catch (e) {
|
|
93
|
+
const msg = "BOOTSTRAP FAILED: " + (e.message || e) + "\n" + (e.stack || "");
|
|
94
|
+
const el = document.getElementById("startup-status");
|
|
95
|
+
if (el) el.textContent = msg;
|
|
96
|
+
console.error(msg);
|
|
97
|
+
_mailxLogit("JS/FATAL", msg.substring(0, 500));
|
|
98
|
+
}
|
|
99
|
+
</script>
|
|
15
100
|
</head>
|
|
16
101
|
<body>
|
|
17
102
|
<header class="toolbar">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/rmfmail",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.620",
|
|
4
4
|
"description": "Local-first email client with IMAP sync and standalone native app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/mailx.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@bobfrankston/iflow-direct": "^0.1.39",
|
|
37
37
|
"@bobfrankston/mailx-host": "^0.1.11",
|
|
38
|
-
"@bobfrankston/mailx-imap": "^0.1.
|
|
38
|
+
"@bobfrankston/mailx-imap": "^0.1.34",
|
|
39
39
|
"@bobfrankston/mailx-sync": "^0.1.16",
|
|
40
40
|
"@bobfrankston/miscinfo": "^1.0.10",
|
|
41
41
|
"@bobfrankston/msger": "^0.1.378",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"dependencies": {
|
|
105
105
|
"@bobfrankston/iflow-direct": "^0.1.39",
|
|
106
106
|
"@bobfrankston/mailx-host": "^0.1.11",
|
|
107
|
-
"@bobfrankston/mailx-imap": "^0.1.
|
|
107
|
+
"@bobfrankston/mailx-imap": "^0.1.34",
|
|
108
108
|
"@bobfrankston/mailx-sync": "^0.1.16",
|
|
109
109
|
"@bobfrankston/miscinfo": "^1.0.10",
|
|
110
110
|
"@bobfrankston/msger": "^0.1.378",
|