emailengine-app 2.75.0 → 2.77.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 +0 -10
- package/.ncurc.js +14 -2
- package/.release-please-manifest.json +3 -0
- package/CHANGELOG.md +38 -0
- package/README.md +1 -1
- package/config/e2e.toml +1 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +71 -4
- package/lib/address-strategies.js +18 -0
- package/lib/api-reference/code-samples.js +194 -0
- package/lib/api-reference/format.js +179 -0
- package/lib/api-reference/index.js +205 -0
- package/lib/api-reference/model.js +336 -0
- package/lib/api-reference/schema-tree.js +366 -0
- package/lib/api-routes/account-routes.js +117 -37
- package/lib/api-routes/behavior-notes.js +54 -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/route-helpers.js +3 -0
- 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 +213 -56
- 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/consts.js +7 -0
- package/lib/email-client/base-client.js +230 -31
- package/lib/email-client/gmail/send-request.js +16 -1
- package/lib/email-client/gmail-client.js +89 -5
- package/lib/email-client/imap-client.js +103 -1
- package/lib/email-client/message-builder.js +24 -7
- package/lib/email-client/outlook/send-request.js +18 -1
- package/lib/email-client/outlook-client.js +79 -4
- package/lib/enum-descriptions.js +130 -0
- package/lib/imapproxy/imap-server.js +30 -26
- package/lib/imapproxy/upstream-client.js +38 -0
- package/lib/oauth2-apps.js +9 -3
- 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/routes-ui.js +5 -1
- package/lib/schemas.js +76 -17
- package/lib/swagger-options.js +173 -0
- package/lib/tokens.js +69 -5
- package/lib/ui-routes/admin-entities-routes.js +3 -0
- package/lib/ui-routes/dashboard-routes.js +2 -26
- package/lib/ui-routes/reference-routes.js +195 -0
- package/lib/ui-routes/route-helpers.js +11 -0
- package/package.json +19 -26
- package/playwright.config.js +1 -1
- package/prepare-bundle-deps.sh +28 -0
- package/release-please-config.json +11 -0
- package/sbom.json +0 -1
- package/server.js +22 -2
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +90 -0
- package/static/js/ee-client.js +238 -8
- package/static/js/reference.js +736 -0
- package/static/js/ui.js +61 -33
- package/static/licenses.html +16 -16
- package/translations/messages.pot +13 -13
- 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 +18 -7
- 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 +93 -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 +24 -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 +37 -215
- package/Gruntfile.js +0 -58
- package/views/swagger/index.hbs +0 -82
package/server.js
CHANGED
|
@@ -250,6 +250,12 @@ const REQUIRE_API_AUTH = hasEnvValue('EENGINE_REQUIRE_API_AUTH') ? getBoolean(re
|
|
|
250
250
|
// Opt-out for the license-validation feature beacon (telemetry rides on the existing license call)
|
|
251
251
|
const BEACON_DISABLED = hasEnvValue('EENGINE_BEACON_DISABLED') ? getBoolean(readEnvValue('EENGINE_BEACON_DISABLED')) : false;
|
|
252
252
|
|
|
253
|
+
// Opt-out for the GitHub releases update check, the only background network
|
|
254
|
+
// call that is not tied to a subscription license. With this and a perpetual
|
|
255
|
+
// license an instance makes no background calls at all (strict-egress and
|
|
256
|
+
// air-gapped deployments).
|
|
257
|
+
const UPDATE_CHECK_DISABLED = hasEnvValue('EENGINE_UPDATE_CHECK_DISABLED') ? getBoolean(readEnvValue('EENGINE_UPDATE_CHECK_DISABLED')) : false;
|
|
258
|
+
|
|
253
259
|
// OAuth2 token access configuration
|
|
254
260
|
const ENABLE_OAUTH_TOKENS_API = hasEnvValue('EENGINE_ENABLE_OAUTH_TOKENS_API') ? getBoolean(readEnvValue('EENGINE_ENABLE_OAUTH_TOKENS_API')) : null;
|
|
255
261
|
|
|
@@ -2000,6 +2006,12 @@ function checkActiveLicense() {
|
|
|
2000
2006
|
*/
|
|
2001
2007
|
let processCheckUpgrade = async () => {
|
|
2002
2008
|
try {
|
|
2009
|
+
if (UPDATE_CHECK_DISABLED) {
|
|
2010
|
+
// Clear any marker stored before the check was disabled, otherwise
|
|
2011
|
+
// the dashboard banner would advertise a stale version forever
|
|
2012
|
+
await redis.hdel(`${REDIS_PREFIX}settings`, 'upgrade');
|
|
2013
|
+
return;
|
|
2014
|
+
}
|
|
2003
2015
|
let updateInfo = await checkForUpgrade();
|
|
2004
2016
|
if (updateInfo.canUpgrade) {
|
|
2005
2017
|
logger.info({ msg: 'EmailEngine update available', updateInfo });
|
|
@@ -2765,8 +2777,16 @@ async function onCommand(worker, message) {
|
|
|
2765
2777
|
return;
|
|
2766
2778
|
|
|
2767
2779
|
case 'new':
|
|
2768
|
-
// Handle new account
|
|
2769
|
-
|
|
2780
|
+
// Handle new account.
|
|
2781
|
+
//
|
|
2782
|
+
// `unassigned` is `false` until assignAccounts() loads the account list from Redis on
|
|
2783
|
+
// its first run, which waits for an IMAP worker to report ready. An account created
|
|
2784
|
+
// before that used to throw here and fail the request with a 500. Skipping the add is
|
|
2785
|
+
// safe rather than merely quiet: the account is already in `ia:accounts` by the time
|
|
2786
|
+
// this message is sent, so the first load picks it up.
|
|
2787
|
+
if (unassigned) {
|
|
2788
|
+
unassigned.add(message.account);
|
|
2789
|
+
}
|
|
2770
2790
|
assignAccounts()
|
|
2771
2791
|
.then(() => sendWebhook(message.account, ACCOUNT_ADDED_NOTIFY, { account: message.account }))
|
|
2772
2792
|
.catch(err => logger.error({ msg: 'Account assignment failed', n: 3, err }));
|