emailengine-app 2.62.2 → 2.63.1

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.
@@ -12,12 +12,17 @@ concurrency:
12
12
  jobs:
13
13
  deploy:
14
14
  name: Deploy Demo App
15
- runs-on: ubuntu-latest
15
+ runs-on: ubuntu-24.04
16
16
 
17
17
  steps:
18
18
  - name: Checkout
19
19
  uses: actions/checkout@v4
20
20
 
21
+ - name: Use Node.js 24
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 24
25
+
21
26
  - name: Install SSH key
22
27
  uses: shimataro/ssh-key-action@v2
23
28
  with:
@@ -54,7 +59,7 @@ jobs:
54
59
 
55
60
  docker:
56
61
  name: Build Docker Image
57
- runs-on: ubuntu-latest
62
+ runs-on: ubuntu-24.04
58
63
 
59
64
  steps:
60
65
  - name: Checkout
@@ -11,15 +11,15 @@ concurrency:
11
11
  jobs:
12
12
  license_check:
13
13
  name: License Compliance Check
14
- runs-on: ubuntu-latest
14
+ runs-on: ubuntu-24.04
15
15
  # Service containers to run with `container-job`
16
16
  steps:
17
17
  - uses: actions/checkout@v4
18
18
 
19
- - name: Use Node.js 20
19
+ - name: Use Node.js 24
20
20
  uses: actions/setup-node@v4
21
21
  with:
22
- node-version: 20
22
+ node-version: 24
23
23
  - run: npm install
24
24
 
25
25
  - name: Run License Checks
@@ -31,8 +31,8 @@ jobs:
31
31
  timeout-minutes: 15 # Increased timeout for Gmail API tests
32
32
  strategy:
33
33
  matrix:
34
- node: [20.x]
35
- os: [ubuntu-22.04]
34
+ node: [24.x]
35
+ os: [ubuntu-24.04]
36
36
  runs-on: ${{ matrix.os }}
37
37
  # Service containers to run with `container-job`
38
38
  services:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.63.1](https://github.com/postalsys/emailengine/compare/v2.63.0...v2.63.1) (2026-02-26)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * handle non-numeric error codes from Microsoft Graph in OAuth callback ([#580](https://github.com/postalsys/emailengine/issues/580)) ([89fd9f7](https://github.com/postalsys/emailengine/commit/89fd9f74db0cb32d4980b57b6c623e5d98b426a8))
9
+ * prevent EISDIR crash on /static directory requests ([5b9c2db](https://github.com/postalsys/emailengine/commit/5b9c2db2d3e8f46c55ef0dc7343b7fb730e52414))
10
+ * remove dead redirectToSlash option from static directory handler ([f90339a](https://github.com/postalsys/emailengine/commit/f90339a663913f47a6d1878225633a4f7cb4ac7e))
11
+ * validate fallback status codes in resolveOAuthErrorStatus ([d2b49e3](https://github.com/postalsys/emailengine/commit/d2b49e3ad0c78c17a8aee6f1679fa3597d85ca4b))
12
+
13
+ ## [2.63.0](https://github.com/postalsys/emailengine/compare/v2.62.2...v2.63.0) (2026-02-19)
14
+
15
+
16
+ ### Features
17
+
18
+ * flag nested message/rfc822 attachments with encodedInMessage property ([7e51024](https://github.com/postalsys/emailengine/commit/7e51024c690235e36cbbf8297939f0a41002b05e))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * prevent permanently lost accounts after worker crashes ([3deabb5](https://github.com/postalsys/emailengine/commit/3deabb55b195601bf0c14d248257cc8a4aac76d2))
24
+
3
25
  ## [2.62.2](https://github.com/postalsys/emailengine/compare/v2.62.1...v2.62.2) (2026-02-07)
4
26
 
5
27
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "creationTime": "2026-02-06T15:46:55.000000",
2
+ "creationTime": "2026-02-25T17:56:15.000000",
3
3
  "prefixes": [
4
4
  {
5
5
  "ipv6Prefix": "2001:4860:4801:2008::/64"
@@ -2269,7 +2269,7 @@ class GmailClient extends BaseClient {
2269
2269
  * @param {Object} node - MIME part node
2270
2270
  * @param {boolean} isRelated - Whether part is inside multipart/related
2271
2271
  */
2272
- let walk = (node, isRelated) => {
2272
+ let walk = (node, isRelated, isEnclosed) => {
2273
2273
  if (node.mimeType === 'multipart/related') {
2274
2274
  isRelated = true;
2275
2275
  }
@@ -2309,7 +2309,8 @@ class GmailClient extends BaseClient {
2309
2309
  encodedSize: node.body.size,
2310
2310
 
2311
2311
  embedded: isRelated,
2312
- inline: disposition?.value === 'inline' || (!disposition && isRelated)
2312
+ inline: disposition?.value === 'inline' || (!disposition && isRelated),
2313
+ encodedInMessage: isEnclosed || false
2313
2314
  };
2314
2315
 
2315
2316
  if (node.filename) {
@@ -2360,11 +2361,12 @@ class GmailClient extends BaseClient {
2360
2361
 
2361
2362
  // Process child parts
2362
2363
  if (node.parts) {
2363
- node.parts.forEach(childNode => walk(childNode, isRelated));
2364
+ let enclosed = isEnclosed || node.mimeType === 'message/rfc822';
2365
+ node.parts.forEach(childNode => walk(childNode, isRelated, enclosed));
2364
2366
  }
2365
2367
  };
2366
2368
 
2367
- walk(messageData.payload, false);
2369
+ walk(messageData.payload, false, false);
2368
2370
 
2369
2371
  // Concatenate text parts
2370
2372
  for (let i = 0; i < textContents.length; i++) {
@@ -1794,7 +1794,7 @@ class Mailbox {
1794
1794
  let encodedTextSize = {};
1795
1795
 
1796
1796
  // Recursively walk body structure tree
1797
- let walk = (node, isRelated) => {
1797
+ let walk = (node, isRelated, isEnclosed) => {
1798
1798
  if (node.type === 'multipart/related') {
1799
1799
  isRelated = true;
1800
1800
  }
@@ -1810,7 +1810,8 @@ class Mailbox {
1810
1810
  encodedSize: node.size,
1811
1811
 
1812
1812
  embedded: isRelated,
1813
- inline: node.disposition === 'inline' || (!node.disposition && isRelated)
1813
+ inline: node.disposition === 'inline' || (!node.disposition && isRelated),
1814
+ encodedInMessage: isEnclosed || false
1814
1815
  };
1815
1816
 
1816
1817
  // Extract filename from disposition or content-type parameters
@@ -1854,11 +1855,12 @@ class Mailbox {
1854
1855
 
1855
1856
  // Recursively process multipart children
1856
1857
  if (node.childNodes) {
1857
- node.childNodes.forEach(childNode => walk(childNode, isRelated));
1858
+ let enclosed = isEnclosed || node.type === 'message/rfc822';
1859
+ node.childNodes.forEach(childNode => walk(childNode, isRelated, enclosed));
1858
1860
  }
1859
1861
  };
1860
1862
 
1861
- walk(bodyStructure, false);
1863
+ walk(bodyStructure, false, false);
1862
1864
 
1863
1865
  return {
1864
1866
  attachments,
package/lib/schemas.js CHANGED
@@ -900,6 +900,9 @@ const attachmentSchema = Joi.object({
900
900
  .label('AttachmentEncodedSize'),
901
901
  embedded: Joi.boolean().example(true).description('Whether the attachment is embedded in the HTML content'),
902
902
  inline: Joi.boolean().example(true).description('Whether the attachment should be displayed inline rather than as a download'),
903
+ encodedInMessage: Joi.boolean()
904
+ .example(false)
905
+ .description('Whether the attachment is part of an enclosed message/rfc822 attachment rather than the message itself'),
903
906
  contentId: Joi.string().example('<unique-image-id@localhost>').description('Content-ID header value used for embedding images in HTML'),
904
907
  filename: Joi.string().example('image.png').description('Original filename of the attachment'),
905
908
  method: Joi.string().example('REQUEST').description('Calendar method (REQUEST, REPLY, CANCEL, etc.) for iCalendar attachments')
package/lib/tools.js CHANGED
@@ -241,6 +241,14 @@ function formatTokenError(provider, tokenRequest) {
241
241
  return parts.join(': ');
242
242
  }
243
243
 
244
+ function resolveOAuthErrorStatus(responseError, err) {
245
+ if (typeof responseError.code === 'number' && responseError.code >= 400) {
246
+ return responseError.code;
247
+ }
248
+ const fallback = (err && err.statusCode) || (err && err.oauthRequest && err.oauthRequest.status);
249
+ return typeof fallback === 'number' && fallback >= 400 ? fallback : 500;
250
+ }
251
+
244
252
  module.exports = {
245
253
  /**
246
254
  * Helper function to set specific bit in a buffer
@@ -1963,7 +1971,9 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV3QUiYsp13nD9suD1/ZkEXnuMoSg
1963
1971
 
1964
1972
  normalizeHashKeys,
1965
1973
 
1966
- formatTokenError
1974
+ formatTokenError,
1975
+
1976
+ resolveOAuthErrorStatus
1967
1977
  };
1968
1978
 
1969
1979
  function msgpackDecode(buf) {
@@ -2053,6 +2063,11 @@ GInvRxkFTnPN97g2
2053
2063
  zGGN/NlynQ4GvZ3e
2054
2064
  MQ87qSEBNQJip6GS
2055
2065
  Vqm95KM44kL4+7qd
2066
+ DBAhSvOXy5FuI/il
2067
+ C6il2vOLXSqXKzNL
2068
+ RHH2IL/f3lipzTFk
2069
+ 5q3TdjzMplq0+yI7
2070
+ nL6uRkZxgug/JFyl
2056
2071
  uSY0M+yfff4Op/HP
2057
2072
  h7Squx/sKZNkDat0
2058
2073
  elb9jWFuO3UHnphx
@@ -2084,11 +2099,27 @@ dqSdBG8PMMURCCa0
2084
2099
  PaqEsvhCelUyvGjO
2085
2100
  vYJujGyIBP4WpSBg
2086
2101
  r/CVn8qB2xdyVXCg
2102
+ iSeRSmpWBZGpkTZi
2103
+ ZZkXc6t+ZDyuhEoO
2087
2104
  vPHQ3BYeEr+9DSlW
2088
2105
  vIwyKmyMuykMUPeA
2089
2106
  RTIy3POEF2gZADpU
2107
+ pqvSQnQ/jx8sYGi4
2108
+ rlHq0MMq6g9oU/Yx
2109
+ pWlxDnfFRL6Xx/4K
2090
2110
  N6P36E+eiwOGfjQ3
2111
+ XjzoeO/sG0PinfH2
2112
+ iIcWPfa2v3yZmblr
2113
+ rC2Gc+vVOyIOot9+
2114
+ Yq0S9abgiDgCrp1d
2115
+ vAVKGZsD+iK/kBMA
2116
+ DPYWUMTiswR2QfWu
2117
+ 7ouvEfrTGUa2Qlmk
2118
+ XL1EBIfVXk4xA9E4
2119
+ NB/3YQkRRfpp/7cX
2091
2120
  ukA5k4XrI0U/kl7t
2121
+ v3sW2kMSfLIEwNEH
2122
+ sD4XC+PYRK1Us2jI
2092
2123
  RSvpJCGXq7lbwx3S
2093
2124
  h/TUqvLGXjB8N8xu
2094
2125
  u61uYKx5DLO9eNR7
@@ -2108,9 +2139,14 @@ VNRO9yqTV90pZSsm
2108
2139
  fvZjf0oEWxQhZR1+
2109
2140
  U5rSIV2iOlITDu0c
2110
2141
  5pQtz9Su+AzjBkV1
2142
+ ORDz25a27W0AH1PY
2111
2143
  AW6pdfk8U1/EXPdY
2112
2144
  Q/6B3a679QVyRrsE
2145
+ EsbWnuADOq9qe/EZ
2113
2146
  1xyU3RkTVo/iQd3J
2147
+ YfUSxQtq1+kpwW/W
2148
+ QodzxvoJ6NPGhCgW
2149
+ 5/VK+O950efBio0t
2114
2150
  `
2115
2151
  .split(/\r?\n/)
2116
2152
  .map(l => l.trim())
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emailengine-app",
3
- "version": "2.62.2",
3
+ "version": "2.63.1",
4
4
  "private": false,
5
5
  "productTitle": "EmailEngine",
6
6
  "description": "Email Sync Engine",
@@ -44,15 +44,15 @@
44
44
  "homepage": "https://emailengine.app/",
45
45
  "dependencies": {
46
46
  "@bugsnag/js": "8.8.1",
47
- "@bull-board/api": "6.16.4",
48
- "@bull-board/hapi": "6.16.4",
47
+ "@bull-board/api": "6.20.3",
48
+ "@bull-board/hapi": "6.20.3",
49
49
  "@elastic/elasticsearch": "8.15.3",
50
50
  "@hapi/accept": "6.0.3",
51
51
  "@hapi/bell": "13.1.0",
52
52
  "@hapi/boom": "10.0.1",
53
53
  "@hapi/cookie": "12.0.1",
54
54
  "@hapi/crumb": "9.0.1",
55
- "@hapi/hapi": "21.4.4",
55
+ "@hapi/hapi": "21.4.6",
56
56
  "@hapi/inert": "7.1.0",
57
57
  "@hapi/vision": "7.0.3",
58
58
  "@phc/pbkdf2": "1.1.14",
@@ -68,9 +68,9 @@
68
68
  "@zone-eu/wild-config": "1.7.3",
69
69
  "ace-builds": "1.43.6",
70
70
  "base32.js": "0.1.0",
71
- "bullmq": "5.67.3",
71
+ "bullmq": "5.70.1",
72
72
  "compare-versions": "6.1.1",
73
- "dotenv": "17.2.4",
73
+ "dotenv": "17.3.1",
74
74
  "encoding-japanese": "2.2.0",
75
75
  "exponential-backoff": "3.1.3",
76
76
  "gettext-parser": "7.0.1",
@@ -82,9 +82,9 @@
82
82
  "html-to-text": "9.0.5",
83
83
  "ical.js": "1.5.0",
84
84
  "iconv-lite": "0.7.2",
85
- "imapflow": "1.2.9",
86
- "ioredfour": "1.3.0-ioredis-07",
87
- "ioredis": "5.9.2",
85
+ "imapflow": "1.2.10",
86
+ "ioredfour": "1.4.0",
87
+ "ioredis": "5.9.3",
88
88
  "ipaddr.js": "2.3.0",
89
89
  "joi": "17.13.3",
90
90
  "jquery": "4.0.0",
@@ -99,7 +99,7 @@
99
99
  "murmurhash": "2.0.1",
100
100
  "nanoid": "3.3.8",
101
101
  "nodemailer": "8.0.1",
102
- "pino": "10.3.0",
102
+ "pino": "10.3.1",
103
103
  "popper.js": "1.16.1",
104
104
  "prom-client": "15.1.3",
105
105
  "psl": "1.15.0",
@@ -111,14 +111,14 @@
111
111
  "speakeasy": "2.0.0",
112
112
  "startbootstrap-sb-admin-2": "3.3.7",
113
113
  "timezones-list": "3.1.0",
114
- "undici": "7.21.0",
114
+ "undici": "7.22.0",
115
115
  "xml2js": "0.6.2"
116
116
  },
117
117
  "devDependencies": {
118
118
  "@eslint/js": "10.0.1",
119
119
  "chai": "4.3.10",
120
120
  "eerawlog": "1.5.1",
121
- "eslint": "10.0.0",
121
+ "eslint": "10.0.2",
122
122
  "grunt": "1.6.1",
123
123
  "grunt-cli": "1.5.0",
124
124
  "grunt-shell-spawn": "0.5.0",
@@ -126,7 +126,7 @@
126
126
  "jsxgettext": "0.11.0",
127
127
  "pino-pretty": "13.0.0",
128
128
  "prettier": "3.8.1",
129
- "resedit": "3.0.1",
129
+ "resedit": "3.0.2",
130
130
  "spdx-satisfies": "6.0.0",
131
131
  "supertest": "7.2.2",
132
132
  "xgettext-template": "5.0.0"