emailengine-app 2.69.0 → 2.70.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/deploy.yml +6 -3
- package/.github/workflows/release.yaml +2 -0
- package/CHANGELOG.md +19 -0
- package/Gruntfile.js +3 -1
- package/data/google-crawlers.json +1 -1
- package/getswagger.sh +40 -4
- package/gettext-extract.js +163 -0
- package/lib/account.js +73 -47
- package/lib/api-routes/account-routes.js +231 -71
- package/lib/api-routes/blocklist-routes.js +25 -18
- package/lib/api-routes/chat-routes.js +32 -14
- package/lib/api-routes/delivery-test-routes.js +30 -5
- package/lib/api-routes/export-routes.js +27 -2
- package/lib/api-routes/gateway-routes.js +63 -12
- package/lib/api-routes/license-routes.js +18 -4
- package/lib/api-routes/mailbox-routes.js +33 -7
- package/lib/api-routes/message-routes.js +200 -58
- package/lib/api-routes/oauth2-app-routes.js +90 -24
- package/lib/api-routes/outbox-routes.js +16 -4
- package/lib/api-routes/pubsub-routes.js +8 -4
- package/lib/api-routes/route-helpers.js +14 -1
- package/lib/api-routes/settings-routes.js +51 -25
- package/lib/api-routes/stats-routes.js +37 -3
- package/lib/api-routes/submit-routes.js +31 -42
- package/lib/api-routes/template-routes.js +54 -21
- package/lib/api-routes/token-routes.js +67 -67
- package/lib/api-routes/webhook-route-routes.js +37 -8
- package/lib/autodetect-imap-settings.js +0 -2
- package/lib/consts.js +5 -0
- package/lib/email-client/base-client.js +28 -6
- package/lib/email-client/gmail-client.js +119 -112
- package/lib/email-client/imap/subconnection.js +0 -1
- package/lib/email-client/imap/sync-operations.js +1 -1
- package/lib/email-client/imap-client.js +36 -17
- package/lib/email-client/notification-handler.js +1 -4
- package/lib/email-client/outlook-client.js +49 -62
- package/lib/export.js +37 -1
- package/lib/feature-flags.js +2 -2
- package/lib/gateway.js +4 -9
- package/lib/get-raw-email.js +5 -5
- package/lib/imapproxy/imap-core/lib/imap-connection.js +0 -1
- package/lib/logger.js +24 -21
- package/lib/metrics-collector.js +0 -2
- package/lib/oauth2-apps.js +13 -4
- package/lib/outbox.js +24 -40
- package/lib/redis-operations.js +1 -1
- package/lib/schemas.js +403 -83
- package/lib/sentry.js +139 -0
- package/lib/settings.js +9 -3
- package/lib/stream-encrypt.js +1 -1
- package/lib/templates.js +1 -1
- package/lib/tokens.js +5 -3
- package/lib/tools.js +2 -4
- package/lib/ui-routes/account-routes.js +7 -4
- package/lib/ui-routes/admin-config-routes.js +16 -3
- package/lib/ui-routes/oauth-config-routes.js +0 -2
- package/lib/ui-routes/route-helpers.js +0 -2
- package/lib/ui-routes/unsubscribe-routes.js +0 -2
- package/lib/webhooks.js +8 -4
- package/package.json +9 -8
- package/sbom.json +1 -1
- package/server.js +8 -23
- package/static/licenses.html +152 -292
- package/translations/messages.pot +122 -122
- package/update-info.sh +19 -1
- package/views/config/logging.hbs +48 -0
- package/workers/api.js +11 -32
- package/workers/documents.js +2 -22
- package/workers/export.js +16 -50
- package/workers/imap-proxy.js +3 -23
- package/workers/imap.js +2 -22
- package/workers/smtp.js +2 -22
- package/workers/submit.js +6 -24
- package/workers/webhooks.js +2 -22
package/server.js
CHANGED
|
@@ -107,29 +107,9 @@ const bounceClassifier = require('@postalsys/bounce-classifier');
|
|
|
107
107
|
|
|
108
108
|
const v8 = require('node:v8');
|
|
109
109
|
|
|
110
|
-
// Initialize
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
Bugsnag.start({
|
|
114
|
-
apiKey: readEnvValue('BUGSNAG_API_KEY'),
|
|
115
|
-
appVersion: packageData.version,
|
|
116
|
-
logger: {
|
|
117
|
-
debug(...args) {
|
|
118
|
-
logger.debug({ msg: args.shift(), worker: 'main', source: 'bugsnag', args: args.length ? args : undefined });
|
|
119
|
-
},
|
|
120
|
-
info(...args) {
|
|
121
|
-
logger.debug({ msg: args.shift(), worker: 'main', source: 'bugsnag', args: args.length ? args : undefined });
|
|
122
|
-
},
|
|
123
|
-
warn(...args) {
|
|
124
|
-
logger.warn({ msg: args.shift(), worker: 'main', source: 'bugsnag', args: args.length ? args : undefined });
|
|
125
|
-
},
|
|
126
|
-
error(...args) {
|
|
127
|
-
logger.error({ msg: args.shift(), worker: 'main', source: 'bugsnag', args: args.length ? args : undefined });
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
});
|
|
131
|
-
logger.notifyError = Bugsnag.notify.bind(Bugsnag);
|
|
132
|
-
}
|
|
110
|
+
// Initialize Sentry error tracking if a DSN is provided
|
|
111
|
+
const { initSentry } = require('./lib/sentry');
|
|
112
|
+
initSentry('main');
|
|
133
113
|
|
|
134
114
|
// Import additional dependencies
|
|
135
115
|
const pathlib = require('path');
|
|
@@ -1970,6 +1950,11 @@ let licenseCheckHandler = async opts => {
|
|
|
1970
1950
|
}
|
|
1971
1951
|
}
|
|
1972
1952
|
}
|
|
1953
|
+
|
|
1954
|
+
// Workers were respawned after license activation. Assign any accounts that
|
|
1955
|
+
// accumulated in the unassigned set while workers were suspended, as the
|
|
1956
|
+
// worker ready handler only reassigns after crashes (reassignmentPending)
|
|
1957
|
+
assignAccounts().catch(err => logger.error({ msg: 'Unable to assign accounts after license activation', err }));
|
|
1973
1958
|
}
|
|
1974
1959
|
} finally {
|
|
1975
1960
|
checkingLicense = false;
|