@bobfrankston/rmfmail 1.2.49 → 1.2.65
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/android-bootstrap.bundle.js +63 -2
- package/client/android-bootstrap.bundle.js.map +4 -4
- package/client/app.bundle.js +417 -63
- package/client/app.bundle.js.map +3 -3
- package/client/app.js +182 -24
- package/client/app.js.map +1 -1
- package/client/app.ts +166 -21
- package/client/components/calendar-sidebar.js +5 -5
- package/client/components/calendar-sidebar.js.map +1 -1
- package/client/components/calendar-sidebar.ts +5 -5
- package/client/components/folder-tree.js +81 -0
- package/client/components/folder-tree.js.map +1 -1
- package/client/components/folder-tree.ts +70 -0
- package/client/components/message-list.js +282 -38
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +264 -36
- package/client/compose/compose.bundle.js +70 -14
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/compose.css +28 -7
- package/client/compose/compose.js +64 -4
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +66 -4
- package/client/compose/editor.js +23 -7
- package/client/compose/editor.js.map +1 -1
- package/client/compose/editor.ts +23 -7
- package/client/help/search-help.js +4 -3
- package/client/help/search-help.js.map +1 -1
- package/client/help/search-help.ts +4 -3
- package/client/index.html +5 -1
- package/client/lib/api-client.js +4 -2
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +4 -2
- package/client/lib/mailxapi.js +2 -2
- package/client/lib/rmf-tiny.js +39 -6
- package/client/styles/components.css +6 -0
- package/docs/azure.md +58 -0
- package/docs/config-help.md +131 -0
- package/docs/edit-in-word-docx.md +98 -0
- package/docs/host-abstraction-plan.md +169 -0
- package/docs/local-first-plan.md +303 -0
- package/docs/npmglobalize-transitive-workspace-deps.md +107 -0
- package/docs/outlook.md +80 -18
- package/docs/outlook.txt +35 -0
- package/docs/rules-design.md +172 -0
- package/package.json +7 -7
- package/packages/mailx-imap/index.d.ts +48 -1
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +332 -70
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +323 -67
- package/packages/mailx-imap/microsoft-credentials.json +8 -0
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-imap/providers/outlook-api.d.ts +7 -0
- package/packages/mailx-imap/providers/outlook-api.d.ts.map +1 -0
- package/packages/mailx-imap/providers/outlook-api.js +7 -0
- package/packages/mailx-imap/providers/outlook-api.js.map +1 -0
- package/packages/mailx-service/index.d.ts +7 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +8 -8
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +8 -7
- package/packages/mailx-service/jsonrpc.js +1 -1
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +1 -1
- package/packages/mailx-settings/docs/azure.md +58 -0
- package/packages/mailx-settings/docs/config-help.md +131 -0
- package/packages/mailx-settings/docs/edit-in-word-docx.md +98 -0
- package/packages/mailx-settings/docs/host-abstraction-plan.md +169 -0
- package/packages/mailx-settings/docs/local-first-plan.md +303 -0
- package/packages/mailx-settings/docs/npmglobalize-transitive-workspace-deps.md +107 -0
- package/packages/mailx-settings/docs/outlook.md +80 -18
- package/packages/mailx-settings/docs/rules-design.md +172 -0
- package/packages/mailx-settings/index.d.ts.map +1 -1
- package/packages/mailx-settings/index.js +9 -8
- package/packages/mailx-settings/index.js.map +1 -1
- package/packages/mailx-settings/index.ts +9 -8
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/db.d.ts +50 -1
- package/packages/mailx-store/db.d.ts.map +1 -1
- package/packages/mailx-store/db.js +120 -6
- package/packages/mailx-store/db.js.map +1 -1
- package/packages/mailx-store/db.ts +126 -6
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-types/contact-rules.d.ts +1 -1
- package/packages/mailx-types/contact-rules.js +1 -1
- package/packages/mailx-types/contact-rules.js.map +1 -1
- package/packages/mailx-types/contact-rules.jsonc +1 -1
- package/packages/mailx-types/contact-rules.ts +1 -1
- package/packages/mailx-types/package.json +1 -1
|
@@ -2187,7 +2187,7 @@ var init_contact_rules = __esm({
|
|
|
2187
2187
|
"packages/mailx-types/contact-rules.js"() {
|
|
2188
2188
|
"use strict";
|
|
2189
2189
|
CONTACT_RULES = {
|
|
2190
|
-
"rulesVersion": "
|
|
2190
|
+
"rulesVersion": "v4-name-hygiene",
|
|
2191
2191
|
"junk": {
|
|
2192
2192
|
"localExact": "^(no-?reply|do-?not-?reply|noreply|mailer-daemon|postmaster|abuse|automated|bounce(s|d)?|list-?(server|admin|owner|manager)?|notification|notifications?|admin@.*automated|root|daemon|nobody|undisclosed)$",
|
|
2193
2193
|
"localSuffix": "(-bounces|\\+bounces|-noreply|-no-reply|-notifications?|-mailer)$",
|
|
@@ -6527,7 +6527,7 @@ function parseGoogleReason(body) {
|
|
|
6527
6527
|
const m = body.match(/"reason"\s*:\s*"([^"]+)"/);
|
|
6528
6528
|
return m ? m[1] : "";
|
|
6529
6529
|
}
|
|
6530
|
-
var GmailApiProvider = class {
|
|
6530
|
+
var GmailApiProvider = class _GmailApiProvider {
|
|
6531
6531
|
tokenProvider;
|
|
6532
6532
|
constructor(tokenProvider2) {
|
|
6533
6533
|
this.tokenProvider = tokenProvider2;
|
|
@@ -7008,6 +7008,54 @@ Accept: application/json\r
|
|
|
7008
7008
|
return "";
|
|
7009
7009
|
return path;
|
|
7010
7010
|
}
|
|
7011
|
+
/** Gmail system label ids that the API forbids renaming — labels.patch on
|
|
7012
|
+
* any of these returns 400. The folder tree must refuse a rename of the
|
|
7013
|
+
* folders that map to them. */
|
|
7014
|
+
static SYSTEM_LABELS = /* @__PURE__ */ new Set([
|
|
7015
|
+
"INBOX",
|
|
7016
|
+
"SENT",
|
|
7017
|
+
"DRAFT",
|
|
7018
|
+
"TRASH",
|
|
7019
|
+
"SPAM",
|
|
7020
|
+
"CHAT",
|
|
7021
|
+
"IMPORTANT",
|
|
7022
|
+
"STARRED",
|
|
7023
|
+
"UNREAD"
|
|
7024
|
+
]);
|
|
7025
|
+
/** Rename (and/or reparent) a Gmail label. Gmail has no folders — a
|
|
7026
|
+
* "folder" is a label and the hierarchy is encoded in the label NAME as a
|
|
7027
|
+
* slash-path ("Parent/Child"). So both rename-in-place and reparent are the
|
|
7028
|
+
* same operation: PATCH the label to a new full name.
|
|
7029
|
+
*
|
|
7030
|
+
* - `oldPath` is the current label name (== path in our folder model).
|
|
7031
|
+
* - `newName` is the new LEAF name.
|
|
7032
|
+
* - `newParentPath` (optional) is the destination parent label's path; when
|
|
7033
|
+
* given, the new full name becomes `<newParentPath>/<newName>`, otherwise
|
|
7034
|
+
* we keep the old parent prefix and just swap the leaf.
|
|
7035
|
+
*
|
|
7036
|
+
* System labels (INBOX/SENT/…) can't be renamed — reject with a clear
|
|
7037
|
+
* message the UI surfaces. We resolve the label id from the live label list
|
|
7038
|
+
* rather than trusting name-as-id, because a user label's id is an opaque
|
|
7039
|
+
* `Label_NN` on some accounts even though the name matches. */
|
|
7040
|
+
async renameFolder(oldPath, newName, newParentPath) {
|
|
7041
|
+
const sysId = this.folderPathToLabelId(oldPath);
|
|
7042
|
+
if (_GmailApiProvider.SYSTEM_LABELS.has(sysId) || sysId === "") {
|
|
7043
|
+
throw new Error(`"${oldPath}" is a Gmail system label and can't be renamed.`);
|
|
7044
|
+
}
|
|
7045
|
+
const data = await this.fetch("/labels");
|
|
7046
|
+
const labels = data.labels || [];
|
|
7047
|
+
const match = labels.find((l) => l.name === oldPath);
|
|
7048
|
+
if (!match)
|
|
7049
|
+
throw new Error(`Gmail label "${oldPath}" not found`);
|
|
7050
|
+
if (match.type === "system") {
|
|
7051
|
+
throw new Error(`"${oldPath}" is a Gmail system label and can't be renamed.`);
|
|
7052
|
+
}
|
|
7053
|
+
const newFullName = newParentPath && newParentPath.length ? `${newParentPath}/${newName}` : oldPath.includes("/") ? `${oldPath.slice(0, oldPath.lastIndexOf("/"))}/${newName}` : newName;
|
|
7054
|
+
await this.fetch(`/labels/${match.id}`, {
|
|
7055
|
+
method: "PATCH",
|
|
7056
|
+
body: JSON.stringify({ name: newFullName })
|
|
7057
|
+
});
|
|
7058
|
+
}
|
|
7011
7059
|
async getUids(folder) {
|
|
7012
7060
|
const query = `in:${this.folderToLabel(folder)}`;
|
|
7013
7061
|
const ids = await this.listMessageIds(query, 1e4);
|
|
@@ -9231,6 +9279,19 @@ function formatDate(d) {
|
|
|
9231
9279
|
return `${d.getDate()}-${months[d.getMonth()]}-${d.getFullYear()}`;
|
|
9232
9280
|
}
|
|
9233
9281
|
|
|
9282
|
+
// ../../MailApps/mailx-sync/outlook.js
|
|
9283
|
+
var rateState2 = {
|
|
9284
|
+
tokens: 0,
|
|
9285
|
+
lastRefill: 0,
|
|
9286
|
+
cooldownUntil: 0,
|
|
9287
|
+
/** Tokens refilled per second (keeps us well under Graph's per-app caps). */
|
|
9288
|
+
rate: 8,
|
|
9289
|
+
/** Max burst above steady state. */
|
|
9290
|
+
burst: 8
|
|
9291
|
+
};
|
|
9292
|
+
rateState2.tokens = rateState2.burst;
|
|
9293
|
+
rateState2.lastRefill = Date.now();
|
|
9294
|
+
|
|
9234
9295
|
// packages/mailx-store-web/imap-web-provider.js
|
|
9235
9296
|
function toProviderFolder(f, special) {
|
|
9236
9297
|
const flagsLower = (f.flags || []).map((x) => x.toLowerCase());
|