emailengine-app 2.89.0 → 2.91.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.
Files changed (120) hide show
  1. package/.ncurc.js +19 -8
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +73 -0
  4. package/Dockerfile +7 -3
  5. package/ENVIRONMENT.md +24 -23
  6. package/README.md +1 -1
  7. package/bin/healthcheck.js +1 -1
  8. package/copy-static-files.sh +0 -8
  9. package/data/google-crawlers.json +1 -1
  10. package/encrypt.js +1 -4
  11. package/lib/account/field-codec.js +396 -0
  12. package/lib/account-assignment.js +26 -9
  13. package/lib/account.js +196 -462
  14. package/lib/api-routes/account-routes.js +49 -6
  15. package/lib/api-routes/route-metadata.js +5 -2
  16. package/lib/api-routes/submit-routes.js +15 -2
  17. package/lib/api-token-auth.js +342 -274
  18. package/lib/arf-detect.js +174 -149
  19. package/lib/attachment-size.js +29 -0
  20. package/lib/autodetect-imap-settings.js +482 -296
  21. package/lib/consts.js +5 -5
  22. package/lib/db.js +1 -4
  23. package/lib/email-client/base-client.js +907 -780
  24. package/lib/email-client/gmail-client.js +557 -450
  25. package/lib/email-client/imap/cid-parts.js +61 -0
  26. package/lib/email-client/imap/mailbox.js +376 -422
  27. package/lib/email-client/imap/sync-operations.js +239 -178
  28. package/lib/email-client/imap-client.js +5 -5
  29. package/lib/email-client/message-builder.js +4 -5
  30. package/lib/email-client/new-message-steps.js +168 -2
  31. package/lib/email-client/outlook/graph-message.js +266 -0
  32. package/lib/email-client/outlook/subscription-expiry.js +30 -0
  33. package/lib/email-client/outlook-client.js +652 -808
  34. package/lib/get-raw-email.js +338 -232
  35. package/lib/get-secret.js +1 -4
  36. package/lib/imapproxy/imap-server.js +5 -5
  37. package/lib/license-subscription.js +60 -0
  38. package/lib/load-env.js +48 -0
  39. package/lib/logger-consts.js +37 -1
  40. package/lib/logger.js +1 -4
  41. package/lib/mail-probe.js +157 -0
  42. package/lib/mcp/tools.js +244 -207
  43. package/lib/metric-values.js +76 -0
  44. package/lib/metrics.js +320 -0
  45. package/lib/oauth/gmail.js +39 -120
  46. package/lib/oauth/http-request.js +195 -0
  47. package/lib/oauth/mail-ru.js +33 -60
  48. package/lib/oauth/outlook.js +37 -137
  49. package/lib/oauth/pubsub/google.js +176 -117
  50. package/lib/oauth2-apps.js +440 -463
  51. package/lib/openapi/build-document.js +10 -10
  52. package/lib/read-env-value.js +31 -7
  53. package/lib/redis-backend-warnings.js +70 -0
  54. package/lib/route-descriptors.js +78 -0
  55. package/lib/schemas.js +10 -1
  56. package/lib/sentry-integrations.js +299 -0
  57. package/lib/sentry.js +75 -27
  58. package/lib/sso-routes.js +249 -0
  59. package/lib/sso.js +29 -6
  60. package/lib/tools.js +17 -28
  61. package/lib/ui-routes/account-edit-form.js +198 -0
  62. package/lib/ui-routes/account-page.js +241 -0
  63. package/lib/ui-routes/account-routes.js +46 -349
  64. package/lib/ui-routes/account-setup.js +1 -1
  65. package/lib/ui-routes/auth-routes.js +10 -10
  66. package/lib/ui-routes/provider-signin.js +187 -0
  67. package/lib/ui-routes/route-helpers.js +1 -1
  68. package/lib/ui-routes/unsubscribe-routes.js +2 -2
  69. package/lib/ui-view-context.js +328 -0
  70. package/lib/utils/public-suffix.js +22 -101
  71. package/lib/web-safe-html.js +20 -7
  72. package/lib/worker-metrics.js +82 -0
  73. package/list-generate.js +2 -5
  74. package/package.json +28 -24
  75. package/sbom.json +360 -1030
  76. package/scripts/refresh-test-tokens.js +1 -1
  77. package/server.js +400 -677
  78. package/static/css/flyonui.css +1 -1
  79. package/static/css/public.css +55 -1
  80. package/static/css/src/app.tailwind.css +18 -0
  81. package/static/js/ee-client.js +2619 -645
  82. package/static/js/ui.js +12 -2
  83. package/static/licenses.html +224 -764
  84. package/translations/de.mo +0 -0
  85. package/translations/de.po +429 -390
  86. package/translations/en.mo +0 -0
  87. package/translations/en.po +342 -257
  88. package/translations/es.mo +0 -0
  89. package/translations/es.po +440 -395
  90. package/translations/et.mo +0 -0
  91. package/translations/et.po +425 -375
  92. package/translations/fr.mo +0 -0
  93. package/translations/fr.po +425 -383
  94. package/translations/it.mo +0 -0
  95. package/translations/it.po +441 -394
  96. package/translations/ja.mo +0 -0
  97. package/translations/ja.po +408 -335
  98. package/translations/messages.pot +188 -130
  99. package/translations/nl.mo +0 -0
  100. package/translations/nl.po +419 -382
  101. package/translations/pl.mo +0 -0
  102. package/translations/pl.po +425 -379
  103. package/translations/sv.mo +0 -0
  104. package/translations/sv.po +440 -388
  105. package/translations/tr.mo +0 -0
  106. package/translations/tr.po +441 -387
  107. package/views/account-identity-error.hbs +1 -1
  108. package/views/account-workspace-error.hbs +2 -2
  109. package/views/accounts/browse.hbs +19 -1
  110. package/views/accounts/register/imap-server.hbs +22 -7
  111. package/views/accounts/register/imap.hbs +3 -0
  112. package/views/accounts/register/index.hbs +1 -27
  113. package/views/accounts/register/provider-signin.hbs +58 -0
  114. package/views/oauth-scope-error.hbs +1 -1
  115. package/views/partials/provider_signin_button.hbs +30 -0
  116. package/views/queues/index.hbs +1 -1
  117. package/views/redirect.hbs +1 -1
  118. package/views/unsubscribe.hbs +6 -6
  119. package/workers/api.js +20 -451
  120. package/data/public_suffix_list.dat +0 -16698
@@ -191,6 +191,7 @@ body.ee-page {
191
191
  font-size: 1.25rem;
192
192
  font-weight: 600;
193
193
  margin: 0 0 1.5rem;
194
+ text-wrap: balance;
194
195
  }
195
196
 
196
197
  :where(.ee-card-body h2) {
@@ -627,10 +628,18 @@ a.ee-link:hover::before {
627
628
  padding: 1rem;
628
629
  border-radius: var(--ee-radius-box);
629
630
  background-color: color-mix(in oklab, var(--ee-alert-color) 10%, var(--ee-surface));
630
- color: var(--ee-alert-color);
631
+ /* the text is pulled toward the body color: the status colors themselves (amber and cyan
632
+ * especially) are too light to read as text on their own tinted background */
633
+ color: color-mix(in oklab, var(--ee-alert-color) 45%, var(--ee-text));
631
634
  text-align: start;
632
635
  }
633
636
 
637
+ /* the icon keeps the full status color, which is what tells the alerts apart at a glance */
638
+ .ee-alert > .ee-icon {
639
+ flex: none;
640
+ color: var(--ee-alert-color);
641
+ }
642
+
634
643
  .ee-alert-info {
635
644
  --ee-alert-color: var(--ee-info);
636
645
  }
@@ -918,6 +927,51 @@ dialog.ee-modal.ee-modal-wide {
918
927
  cursor: default;
919
928
  }
920
929
 
930
+ /* OAuth2 sign-in offered on the IMAP path (accounts/register/provider-signin):
931
+ * the address and the reason above the provider buttons, and the IMAP way out
932
+ * below them, set apart so it reads as the exception */
933
+ .ee-provider-lead {
934
+ max-width: 30rem;
935
+ margin: 0 auto 1.5rem;
936
+ text-align: center;
937
+ }
938
+
939
+ .ee-provider-lead p {
940
+ margin: 0 0 0.5rem;
941
+ }
942
+
943
+ /* short centered copy: even out the lines instead of leaving a word, or in Japanese a few
944
+ * characters, on a line of its own */
945
+ .ee-provider-lead p,
946
+ .ee-provider-alt .ee-hint {
947
+ text-wrap: balance;
948
+ }
949
+
950
+ .ee-provider-email {
951
+ overflow-wrap: anywhere;
952
+ }
953
+
954
+ .ee-provider-alt {
955
+ display: flex;
956
+ flex-direction: column;
957
+ align-items: center;
958
+ gap: 0.25rem;
959
+ max-width: 30rem;
960
+ margin: 1.5rem auto 0;
961
+ padding-top: 1.25rem;
962
+ border-top: 1px solid color-mix(in oklab, var(--ee-text) 15%, transparent);
963
+ text-align: center;
964
+ }
965
+
966
+ /* Translated labels can wrap without extending beyond the text column. */
967
+ .ee-provider-alt > .ee-btn {
968
+ max-width: 100%;
969
+ height: auto;
970
+ min-height: 1.875rem;
971
+ padding-block: 0.25rem;
972
+ white-space: normal;
973
+ }
974
+
921
975
  /* provider sign-in images (e.g. the Google / Microsoft branded buttons) */
922
976
  .ee-provider-image {
923
977
  display: block;
@@ -158,6 +158,14 @@
158
158
  z-index: 60;
159
159
  max-width: 20rem;
160
160
  }
161
+ /* the message browser (ee-client 2) docks its compose panel at z-index 2000,
162
+ * above the page. The dialogs it asks through confirmMethod/alertMethod
163
+ * ("Unsaved message", "Delete message") are the page's own modals, so they
164
+ * stack above that panel, or the panel covers their buttons. */
165
+ #confirmModal,
166
+ #alertModal {
167
+ z-index: 2100;
168
+ }
161
169
  .tooltip .tooltip-body {
162
170
  /* block, not inline: an inline body fragments its background into one
163
171
  * box per wrapped line */
@@ -195,6 +203,16 @@
195
203
  --link-color: var(--color-primary);
196
204
  }
197
205
 
206
+ /* The message browser widget (@postalsys/ee-client on the account Browse page) takes its accent
207
+ * from these. It puts white text on --ee-accent in both themes, so that stays the light theme's
208
+ * primary above; --ee-accent-light is what it uses for text and outlines in dark mode, the dark
209
+ * theme's lighter primary. */
210
+ #email-client {
211
+ --ee-accent: #4c5cc5;
212
+ --ee-accent-hover: color-mix(in oklab, #4c5cc5 85%, black);
213
+ --ee-accent-light: #7b86dc;
214
+ }
215
+
198
216
  /* FlyonUI lays a tab strip out as a nowrap flex row with no overflow handling, so one
199
217
  * wider than its column pushes the whole page sideways instead of adapting: an API reference
200
218
  * operation documents up to eight status codes. Wrapping rather than scrolling because these