emailengine-app 2.76.0 → 2.78.0
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/.github/workflows/release.yaml +24 -19
- package/.github/workflows/test.yml +80 -0
- package/.ncurc.js +14 -2
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +54 -0
- package/README.md +1 -1
- package/bin/emailengine.js +1 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +72 -5
- package/lib/account/expected-identity.js +88 -0
- package/lib/account.js +75 -26
- package/lib/address-strategies.js +18 -0
- package/lib/api-reference/code-samples.js +194 -0
- package/lib/api-reference/format.js +193 -0
- package/lib/api-reference/index.js +222 -0
- package/lib/api-reference/model.js +338 -0
- package/lib/api-reference/schema-tree.js +366 -0
- package/lib/api-routes/account-routes.js +136 -39
- package/lib/api-routes/behavior-notes.js +57 -0
- package/lib/api-routes/blocklist-routes.js +9 -9
- package/lib/api-routes/changes-routes.js +6 -4
- package/lib/api-routes/chat-routes.js +3 -3
- package/lib/api-routes/delivery-test-routes.js +24 -6
- package/lib/api-routes/export-routes.js +14 -12
- package/lib/api-routes/gateway-routes.js +11 -11
- package/lib/api-routes/license-routes.js +7 -7
- package/lib/api-routes/mailbox-routes.js +18 -9
- package/lib/api-routes/message-routes.js +55 -35
- package/lib/api-routes/oauth2-app-routes.js +22 -16
- package/lib/api-routes/outbox-routes.js +7 -7
- package/lib/api-routes/pubsub-routes.js +3 -3
- package/lib/api-routes/settings-routes.js +10 -9
- package/lib/api-routes/stats-routes.js +3 -3
- package/lib/api-routes/submit-routes.js +58 -8
- package/lib/api-routes/template-routes.js +13 -13
- package/lib/api-routes/token-routes.js +15 -10
- package/lib/api-routes/webhook-route-routes.js +5 -5
- package/lib/append-list.js +3 -14
- package/lib/arf-detect.js +23 -1
- package/lib/autodetect-imap-settings.js +40 -16
- package/lib/base32.js +30 -0
- package/lib/bounce-detect.js +182 -62
- package/lib/consts.js +7 -0
- package/lib/egress-filter.js +89 -8
- package/lib/email-client/base-client.js +72 -82
- package/lib/email-client/gmail-client.js +3 -3
- package/lib/email-client/imap/listing-diff.js +3 -3
- package/lib/email-client/imap/mailbox.js +5 -69
- package/lib/email-client/imap-client.js +3 -2
- package/lib/email-client/message-builder.js +13 -13
- package/lib/email-client/outlook-client.js +1 -1
- package/lib/enum-descriptions.js +130 -0
- package/lib/export.js +1 -1
- package/lib/gateway.js +1 -1
- package/lib/get-raw-email.js +1 -1
- package/lib/imapproxy/imap-core/lib/imap-connection.js +2 -2
- package/lib/imapproxy/imap-core/lib/imap-server.js +2 -2
- package/lib/imapproxy/imap-server.js +42 -28
- package/lib/imapproxy/upstream-client.js +38 -0
- package/lib/license-beacon.js +1 -1
- package/lib/llm-pre-process.js +1 -1
- package/lib/msgpack.js +62 -0
- package/lib/oauth/decode-jwt-payload.js +39 -0
- package/lib/oauth/outlook-identity.js +61 -0
- package/lib/oauth/retry-setup.js +38 -0
- package/lib/oauth2-apps.js +10 -4
- package/lib/openapi/build-document.js +318 -0
- package/lib/openapi/index.js +95 -0
- package/lib/openapi/joi-schema.js +523 -0
- package/lib/outbox.js +66 -3
- package/lib/pre-process.js +1 -1
- package/lib/read-env-value.js +37 -0
- package/lib/routes-ui.js +5 -1
- package/lib/schemas.js +88 -17
- package/lib/swagger-options.js +173 -0
- package/lib/templates.js +1 -1
- package/lib/tokens.js +70 -6
- package/lib/tools.js +117 -48
- package/lib/totp.js +67 -0
- package/lib/ui-routes/account-routes.js +91 -15
- package/lib/ui-routes/admin-config-routes.js +2 -7
- package/lib/ui-routes/admin-entities-routes.js +3 -0
- package/lib/ui-routes/auth-routes.js +6 -24
- package/lib/ui-routes/dashboard-routes.js +2 -26
- package/lib/ui-routes/reference-routes.js +198 -0
- package/lib/ui-routes/route-helpers.js +39 -0
- package/lib/utils/is-email.js +34 -0
- package/lib/utils/to-camel-case.js +17 -0
- package/lib/webhook-egress.js +37 -0
- package/lib/webhooks.js +1 -1
- package/package.json +27 -31
- package/prepare-bundle-deps.sh +28 -0
- package/release-please-config.json +11 -0
- package/sbom.json +1 -1
- package/server.js +11 -3
- package/static/css/flyonui.css +1 -1
- package/static/css/public.css +3 -0
- package/static/css/src/app.tailwind.css +113 -0
- package/static/js/app.js +69 -0
- package/static/js/ee-client.js +238 -8
- package/static/js/reference.js +1021 -0
- package/static/js/ui.js +61 -33
- package/static/licenses.html +658 -1560
- package/translations/README.md +64 -0
- package/translations/de.mo +0 -0
- package/translations/de.po +164 -120
- package/translations/en.po +200 -161
- package/translations/et.mo +0 -0
- package/translations/et.po +163 -120
- package/translations/fr.mo +0 -0
- package/translations/fr.po +163 -120
- package/translations/ja.mo +0 -0
- package/translations/ja.po +163 -120
- package/translations/messages.pot +84 -54
- package/translations/nl.mo +0 -0
- package/translations/nl.po +164 -120
- package/translations/pl.mo +0 -0
- package/translations/pl.po +163 -120
- package/views/account-identity-error.hbs +34 -0
- package/views/accounts/edit.hbs +1 -0
- package/views/accounts/register/imap.hbs +12 -2
- package/views/config/ai.hbs +1 -1
- package/views/config/document-store/chat.hbs +5 -5
- package/views/config/document-store/index.hbs +2 -2
- package/views/config/document-store/pre-processing/index.hbs +1 -1
- package/views/config/email-processing.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -1
- package/views/config/license.hbs +1 -1
- package/views/config/oauth/index.hbs +3 -3
- package/views/config/security.hbs +1 -1
- package/views/config/smtp.hbs +2 -2
- package/views/dashboard.hbs +1 -1
- package/views/layout/app.hbs +43 -8
- package/views/oauth-scope-error.hbs +1 -1
- package/views/partials/oauth_form.hbs +4 -4
- package/views/partials/reference/anchor-link.hbs +20 -0
- package/views/partials/reference/disclosure.hbs +37 -0
- package/views/partials/reference/nav.hbs +120 -0
- package/views/partials/reference/operation.hbs +127 -0
- package/views/partials/reference/params.hbs +20 -0
- package/views/partials/reference/schema-node.hbs +99 -0
- package/views/partials/reference/schema.hbs +19 -0
- package/views/partials/reference/section-heading.hbs +16 -0
- package/views/partials/reference/token-alert.hbs +49 -0
- package/views/partials/reference/try-field.hbs +31 -0
- package/views/partials/reference/try-it.hbs +78 -0
- package/views/partials/side_menu.hbs +1 -1
- package/views/partials/ui/badge.hbs +4 -2
- package/views/partials/ui/page-header.hbs +1 -1
- package/views/partials/ui/search-input.hbs +31 -0
- package/views/partials/ui/setting-ref.hbs +1 -1
- package/views/partials/ui/stat-card.hbs +4 -2
- package/views/partials/ui/tab.hbs +6 -1
- package/views/partials/ui/tabs.hbs +2 -2
- package/views/reference/index.hbs +76 -0
- package/views/reference/redirect.hbs +49 -0
- package/views/reference/tag.hbs +28 -0
- package/views/reference/token.hbs +49 -0
- package/views/tokens/index.hbs +9 -1
- package/views/webhooks/index.hbs +3 -3
- package/workers/api.js +194 -302
- package/workers/imap.js +1 -1
- package/workers/submit.js +1 -1
- package/workers/webhooks.js +2 -13
- package/views/swagger/index.hbs +0 -82
package/static/js/ui.js
CHANGED
|
@@ -250,41 +250,34 @@ window.paintCertData = certData => {
|
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
252
|
|
|
253
|
-
//
|
|
254
|
-
//
|
|
255
|
-
//
|
|
256
|
-
//
|
|
257
|
-
//
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
// inputs or ACE editors, which only render the visible lines).
|
|
261
|
-
document.addEventListener('click', e => {
|
|
262
|
-
let btn = e.target.closest('.copy-btn');
|
|
263
|
-
if (!btn) {
|
|
253
|
+
// Keyboard hints that spell a modifier differently on macOS (ui/search-input
|
|
254
|
+
// renders `shortcut` with an optional `shortcutMac`). The server cannot know
|
|
255
|
+
// the platform, so it emits the Ctrl form and the Mac spelling rides along in
|
|
256
|
+
// data-mac; this swaps it in. Generic on purpose - the next page that binds a
|
|
257
|
+
// hotkey gets the right label without reaching into the partial's markup.
|
|
258
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
259
|
+
if (!/mac/i.test((navigator.userAgentData && navigator.userAgentData.platform) || navigator.platform || '')) {
|
|
264
260
|
return;
|
|
265
261
|
}
|
|
266
|
-
// toolbar copy controls are <a href="#"> links
|
|
267
|
-
e.preventDefault();
|
|
268
|
-
|
|
269
|
-
let value;
|
|
270
|
-
if ('copyValue' in btn.dataset) {
|
|
271
|
-
// literal value carried on the button itself (e.g. the per-row ids in
|
|
272
|
-
// ui/entity-id) - no target element needed
|
|
273
|
-
value = btn.dataset.copyValue;
|
|
274
|
-
} else {
|
|
275
|
-
let target = btn.dataset.copyTarget ? document.querySelector(btn.dataset.copyTarget) : null;
|
|
276
|
-
if (!target) {
|
|
277
|
-
return;
|
|
278
|
-
}
|
|
279
262
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
value = aceEntry.editor.getValue();
|
|
283
|
-
} else {
|
|
284
|
-
value = 'value' in target ? target.value : target.textContent;
|
|
285
|
-
}
|
|
263
|
+
for (let elm of document.querySelectorAll('kbd[data-mac]')) {
|
|
264
|
+
elm.textContent = elm.dataset.mac;
|
|
286
265
|
}
|
|
266
|
+
});
|
|
287
267
|
|
|
268
|
+
// Writes a string to the clipboard and confirms it on the button that asked
|
|
269
|
+
// for it (the copy icon flips to a checkmark, a failure raises a toast).
|
|
270
|
+
// Uses the async Clipboard API where available; self-hosted installs served
|
|
271
|
+
// over plain HTTP are not a secure context, so those fall back to execCommand
|
|
272
|
+
// on a throwaway textarea (a selection on the source element itself would not
|
|
273
|
+
// work for password inputs or ACE editors, which only render the visible
|
|
274
|
+
// lines).
|
|
275
|
+
//
|
|
276
|
+
// Exposed rather than kept inside the delegated handler below because not
|
|
277
|
+
// every copyable value can be pointed at: the API reference's copy-as-curl
|
|
278
|
+
// serializes its try-it form at click time, so there is no element holding the
|
|
279
|
+
// text and no data attribute it could have been rendered into.
|
|
280
|
+
window.uiCopyText = (value, btn) => {
|
|
288
281
|
let copied;
|
|
289
282
|
if (navigator.clipboard && window.isSecureContext) {
|
|
290
283
|
copied = navigator.clipboard.writeText(value).then(
|
|
@@ -309,16 +302,51 @@ document.addEventListener('click', e => {
|
|
|
309
302
|
copied = Promise.resolve(ok);
|
|
310
303
|
}
|
|
311
304
|
|
|
312
|
-
copied.then(ok => {
|
|
305
|
+
return copied.then(ok => {
|
|
313
306
|
if (!ok) {
|
|
314
307
|
window.showToast('Failed to copy to clipboard', 'alert-triangle');
|
|
315
|
-
return;
|
|
308
|
+
return false;
|
|
316
309
|
}
|
|
317
|
-
let icon = btn.querySelector('[class*="icon-"]');
|
|
310
|
+
let icon = btn && btn.querySelector('[class*="icon-"]');
|
|
318
311
|
if (icon && icon.classList.replace('icon-[tabler--copy]', 'icon-[tabler--check]')) {
|
|
319
312
|
window.setTimeout(() => icon.classList.replace('icon-[tabler--check]', 'icon-[tabler--copy]'), 1500);
|
|
320
313
|
}
|
|
314
|
+
return true;
|
|
321
315
|
});
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
// Copy-to-clipboard buttons: a .copy-btn with data-copy-target="#selector"
|
|
319
|
+
// copies the target's value (inputs), ACE editor content (a mounted
|
|
320
|
+
// ui/code-editor div) or text content. Delegated, so buttons inside
|
|
321
|
+
// dynamically injected markup work without re-binding.
|
|
322
|
+
document.addEventListener('click', e => {
|
|
323
|
+
let btn = e.target.closest('.copy-btn');
|
|
324
|
+
if (!btn) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
// toolbar copy controls are <a href="#"> links
|
|
328
|
+
e.preventDefault();
|
|
329
|
+
|
|
330
|
+
let value;
|
|
331
|
+
if ('copyValue' in btn.dataset) {
|
|
332
|
+
// literal value carried on the button itself (e.g. the per-row ids in
|
|
333
|
+
// ui/entity-id) - no target element needed
|
|
334
|
+
value = btn.dataset.copyValue;
|
|
335
|
+
} else {
|
|
336
|
+
let target = btn.dataset.copyTarget ? document.querySelector(btn.dataset.copyTarget) : null;
|
|
337
|
+
if (!target) {
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
let aceEntry = uiAceInstances.get(target);
|
|
342
|
+
if (aceEntry) {
|
|
343
|
+
value = aceEntry.editor.getValue();
|
|
344
|
+
} else {
|
|
345
|
+
value = 'value' in target ? target.value : target.textContent;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
window.uiCopyText(value, btn);
|
|
322
350
|
});
|
|
323
351
|
|
|
324
352
|
// Resource-list row delete: a .list-delete-btn (rendered by ui/row-actions in
|