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
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Admin UI routes for the server-rendered API reference.
|
|
4
|
+
//
|
|
5
|
+
// This replaced the bundled swagger-ui page, which shipped the OpenAPI document to the
|
|
6
|
+
// browser and let swagger-ui build the DOM. Here the whole page is HTML by the time it
|
|
7
|
+
// leaves the worker - see lib/api-reference/ for the model.
|
|
8
|
+
//
|
|
9
|
+
// This is the "API Reference" entry in the side menu. /admin/swagger is kept only as a
|
|
10
|
+
// redirect for deep links written against the old page.
|
|
11
|
+
|
|
12
|
+
const Joi = require('joi');
|
|
13
|
+
const Boom = require('@hapi/boom');
|
|
14
|
+
|
|
15
|
+
const { failAction } = require('../tools');
|
|
16
|
+
const { jsonErrorPayload } = require('./route-helpers');
|
|
17
|
+
const tokens = require('../tokens');
|
|
18
|
+
const { getIndexView, getTagView, getNavView, getRedirectView } = require('../api-reference');
|
|
19
|
+
|
|
20
|
+
// Lifetime of the throwaway tokens the reference page mints for its try-it panels. Long
|
|
21
|
+
// enough to read through the docs, short enough that a token left in a browser tab is
|
|
22
|
+
// not a lasting credential.
|
|
23
|
+
const TEMP_TOKEN_TTL = 60 * 60 * 1000;
|
|
24
|
+
|
|
25
|
+
// Only tokens carrying this description are revocable through the reference page. It is
|
|
26
|
+
// what the mint route sets, so a pasted token - which the user owns and may still need -
|
|
27
|
+
// can never be deleted by clearing the field.
|
|
28
|
+
const TEMP_TOKEN_DESCRIPTION = 'Temporary token for the API reference';
|
|
29
|
+
|
|
30
|
+
function init(args) {
|
|
31
|
+
const { server } = args;
|
|
32
|
+
|
|
33
|
+
server.route({
|
|
34
|
+
method: 'GET',
|
|
35
|
+
path: '/admin/reference',
|
|
36
|
+
async handler(request, h) {
|
|
37
|
+
const view = await getIndexView(request);
|
|
38
|
+
|
|
39
|
+
// secondaryNav opts this page into the layout's second navigation column,
|
|
40
|
+
// rendered flush against the main sidebar (views/layout/app.hbs)
|
|
41
|
+
return h.view('reference/index', Object.assign({ pageTitle: 'API Reference', menuReference: true, secondaryNav: 'reference/nav' }, view), {
|
|
42
|
+
layout: 'app'
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Access-token page. A literal segment, so hapi routes it ahead of /{tag} below - no
|
|
48
|
+
// tag slug may be `token` or it would be shadowed, which test/api-reference-test.js
|
|
49
|
+
// asserts against RESERVED_SLUGS.
|
|
50
|
+
server.route({
|
|
51
|
+
method: 'GET',
|
|
52
|
+
path: '/admin/reference/token',
|
|
53
|
+
async handler(request, h) {
|
|
54
|
+
const view = await getNavView(request);
|
|
55
|
+
|
|
56
|
+
return h.view('reference/token', Object.assign({ pageTitle: 'Access token', menuReference: true, secondaryNav: 'reference/nav' }, view), {
|
|
57
|
+
layout: 'app'
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
server.route({
|
|
63
|
+
method: 'GET',
|
|
64
|
+
path: '/admin/reference/{tag}',
|
|
65
|
+
async handler(request, h) {
|
|
66
|
+
const view = await getTagView(request, request.params.tag);
|
|
67
|
+
|
|
68
|
+
if (!view) {
|
|
69
|
+
throw Boom.notFound('Unknown endpoint group');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return h.view('reference/tag', Object.assign({ pageTitle: `${view.tag.name} API`, menuReference: true, secondaryNav: 'reference/nav' }, view), {
|
|
73
|
+
layout: 'app'
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
options: {
|
|
78
|
+
validate: {
|
|
79
|
+
options: {
|
|
80
|
+
stripUnknown: true,
|
|
81
|
+
abortEarly: false,
|
|
82
|
+
convert: true
|
|
83
|
+
},
|
|
84
|
+
failAction,
|
|
85
|
+
params: Joi.object({
|
|
86
|
+
// Slugs are generated by slugify() in lib/api-reference/format.js;
|
|
87
|
+
// anything else cannot match a tag and is rejected before the lookup
|
|
88
|
+
tag: Joi.string()
|
|
89
|
+
.max(64)
|
|
90
|
+
.pattern(/^[a-z0-9-]+$/)
|
|
91
|
+
.required()
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
// Compatibility shim for the retired swagger-ui page. Old versions of EmailEngine, and
|
|
98
|
+
// any bookmark, link here as /admin/swagger#/Tag/operationId; a fragment never reaches
|
|
99
|
+
// the server, so the page maps it in the browser. Links inside this version point at
|
|
100
|
+
// /admin/reference directly.
|
|
101
|
+
server.route({
|
|
102
|
+
method: 'GET',
|
|
103
|
+
path: '/admin/swagger',
|
|
104
|
+
async handler(request, h) {
|
|
105
|
+
const view = await getRedirectView(request);
|
|
106
|
+
|
|
107
|
+
return h.view('reference/redirect', Object.assign({ pageTitle: 'API Reference', menuReference: true }, view), { layout: 'app' });
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Mints a short-lived, api-scoped token for the try-it panels, so trying an endpoint
|
|
112
|
+
// does not mean creating a permanent credential and remembering to delete it.
|
|
113
|
+
server.route({
|
|
114
|
+
method: 'POST',
|
|
115
|
+
path: '/admin/reference/token',
|
|
116
|
+
|
|
117
|
+
async handler(request) {
|
|
118
|
+
try {
|
|
119
|
+
// Same gate as POST /admin/tokens/new, for the same reason: a token is
|
|
120
|
+
// never invalidated once minted, so an unauthenticated caller must not be
|
|
121
|
+
// able to obtain one. `server.auth.default('session')` is applied
|
|
122
|
+
// conditionally and only in the worker that observed the password being
|
|
123
|
+
// set, so this keys on whether THIS request carries an admin session
|
|
124
|
+
// rather than on the global secured-state.
|
|
125
|
+
if (!request.auth.isAuthenticated) {
|
|
126
|
+
throw Boom.forbidden('Can not provision an access token without an authenticated admin session');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const expires = Date.now() + TEMP_TOKEN_TTL;
|
|
130
|
+
|
|
131
|
+
const token = await tokens.provision({
|
|
132
|
+
ip: request.app.ip,
|
|
133
|
+
remoteAddress: request.app.ip,
|
|
134
|
+
description: TEMP_TOKEN_DESCRIPTION,
|
|
135
|
+
scopes: ['api'],
|
|
136
|
+
expires
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
return { success: true, token, expires };
|
|
140
|
+
} catch (err) {
|
|
141
|
+
request.logger.error({ msg: 'Failed to mint a temporary reference token', err, remoteAddress: request.app.ip });
|
|
142
|
+
return jsonErrorPayload(err);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Revokes a token minted above, so clearing it in the UI actually removes it rather
|
|
148
|
+
// than leaving a working credential in Redis until it expires on its own.
|
|
149
|
+
server.route({
|
|
150
|
+
method: 'POST',
|
|
151
|
+
path: '/admin/reference/token/revoke',
|
|
152
|
+
|
|
153
|
+
async handler(request) {
|
|
154
|
+
try {
|
|
155
|
+
if (!request.auth.isAuthenticated) {
|
|
156
|
+
throw Boom.forbidden('Can not revoke an access token without an authenticated admin session');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Refuse anything this page did not mint. An admin can delete any token
|
|
160
|
+
// from the Access Tokens page anyway, so this is not a privilege boundary -
|
|
161
|
+
// it stops the reference page from destroying a token the user pasted in.
|
|
162
|
+
let tokenData;
|
|
163
|
+
try {
|
|
164
|
+
tokenData = await tokens.get(request.payload.token, false, { allowExpired: true });
|
|
165
|
+
} catch (err) {
|
|
166
|
+
// already gone, or never existed - nothing left to revoke
|
|
167
|
+
return { success: true, deleted: false };
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (tokenData.description !== TEMP_TOKEN_DESCRIPTION) {
|
|
171
|
+
throw Boom.forbidden('Only tokens minted by the API reference can be revoked here');
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
await tokens.delete(request.payload.token, { remoteAddress: request.app.ip });
|
|
175
|
+
|
|
176
|
+
return { success: true, deleted: true };
|
|
177
|
+
} catch (err) {
|
|
178
|
+
request.logger.error({ msg: 'Failed to revoke a temporary reference token', err, remoteAddress: request.app.ip });
|
|
179
|
+
return jsonErrorPayload(err);
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
options: {
|
|
184
|
+
validate: {
|
|
185
|
+
options: { stripUnknown: true, abortEarly: false, convert: true },
|
|
186
|
+
failAction,
|
|
187
|
+
payload: Joi.object({
|
|
188
|
+
token: Joi.string().length(64).hex().required().description('The token to revoke')
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
module.exports = init;
|
|
@@ -326,7 +326,18 @@ function throwAsBoom(err) {
|
|
|
326
326
|
throw error;
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
// Shapes an error for the admin UI's JSON endpoints, which answer 200 with `success: false`
|
|
330
|
+
// rather than an HTTP error - the client branches on the body. Boom errors keep their status
|
|
331
|
+
// and message; anything else degrades to its code.
|
|
332
|
+
function jsonErrorPayload(err) {
|
|
333
|
+
if (Boom.isBoom(err)) {
|
|
334
|
+
return Object.assign({ success: false }, err.output.payload);
|
|
335
|
+
}
|
|
336
|
+
return { success: false, error: err.code || 'Error', message: err.message };
|
|
337
|
+
}
|
|
338
|
+
|
|
329
339
|
module.exports = {
|
|
340
|
+
jsonErrorPayload,
|
|
330
341
|
OPEN_AI_MODELS,
|
|
331
342
|
cachedTemplates,
|
|
332
343
|
getOpenAiModels,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailengine-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.77.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"productTitle": "EmailEngine",
|
|
6
6
|
"description": "Email Sync Engine",
|
|
@@ -11,16 +11,17 @@
|
|
|
11
11
|
"dev": "EE_OPENAPI_VERBOSE=true EENGINE_LOG_RAW=true node --tls-keylog=keylog.txt server --dbs.redis='redis://127.0.0.1:6379/9' --api.port=7003 --api.host=0.0.0.0 | tee $HOME/ee.log.dev.txt | pino-pretty",
|
|
12
12
|
"single": "EE_OPENAPI_VERBOSE=true EENGINE_LOG_RAW=true EENGINE_SECRET=your-encryption-key EENGINE_WORKERS=1 node --inspect server --dbs.redis='redis://127.0.0.1:6379/6' --api.port=7003 --api.host=0.0.0.0 | tee $HOME/ee.log.single.txt | pino-pretty",
|
|
13
13
|
"gmail": "EE_OPENAPI_VERBOSE=true EENGINE_LOG_RAW=true EENGINE_SECRET=your-encryption-key EENGINE_WORKERS=2 EENGINE_CORS_ORIGIN='*' node --inspect server --dbs.redis='redis://127.0.0.1:6379/11' --api.port=7003 --api.host=0.0.0.0 | tee $HOME/ee.log.gmail.txt | pino-pretty",
|
|
14
|
-
"test": "
|
|
15
|
-
"test:unit": "NODE_ENV=test
|
|
16
|
-
"test:integration": "NODE_ENV=test
|
|
14
|
+
"test": "npm run lint:src && npm run test:unit && npm run test:integration",
|
|
15
|
+
"test:unit": "NODE_ENV=test node test/run-tests.js unit",
|
|
16
|
+
"test:integration": "NODE_ENV=test node test/run-tests.js integration",
|
|
17
17
|
"test:dovecot": "./test/dovecot/run-dovecot-tests.sh",
|
|
18
18
|
"test:e2e": "playwright test",
|
|
19
19
|
"test:e2e:install": "playwright install --with-deps chromium",
|
|
20
|
-
"lint": "npx eslint 'lib/**/*.js' 'workers/**/*.js' 'test/**/*.js' server.js
|
|
20
|
+
"lint": "npx eslint 'lib/**/*.js' 'workers/**/*.js' 'test/**/*.js' server.js",
|
|
21
|
+
"lint:src": "npx eslint 'lib/**/*.js' 'workers/**/*.js' server.js",
|
|
21
22
|
"swagger": "./getswagger.sh",
|
|
22
23
|
"build:css": "tailwindcss -i static/css/src/app.tailwind.css -o static/css/flyonui.css --minify",
|
|
23
|
-
"build-source": "rm -rf node_modules && npm install && rm -rf node_modules && npm ci --omit=dev && rm -rf node_modules/ace-builds node_modules/@postalsys/ee-client && ./update-info.sh",
|
|
24
|
+
"build-source": "rm -rf node_modules && npm install && rm -rf node_modules && npm ci --omit=dev && rm -rf node_modules/ace-builds node_modules/@postalsys/ee-client && ./prepare-bundle-deps.sh && ./update-info.sh",
|
|
24
25
|
"build-dist": "pkg --compress Brotli package.json && npm install && node winconf.js",
|
|
25
26
|
"build-dist-fast": "pkg --debug package.json && npm install && node winconf.js",
|
|
26
27
|
"licenses": "node list-generate.js",
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
},
|
|
50
51
|
"homepage": "https://emailengine.app/",
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@bull-board/api": "8.
|
|
53
|
-
"@bull-board/hapi": "8.
|
|
53
|
+
"@bull-board/api": "8.5.0",
|
|
54
|
+
"@bull-board/hapi": "8.5.0",
|
|
54
55
|
"@elastic/elasticsearch": "8.15.3",
|
|
55
56
|
"@hapi/accept": "6.0.3",
|
|
56
57
|
"@hapi/bell": "13.1.0",
|
|
@@ -63,21 +64,21 @@
|
|
|
63
64
|
"@phc/pbkdf2": "1.1.14",
|
|
64
65
|
"@postalsys/bounce-classifier": "3.0.0",
|
|
65
66
|
"@postalsys/certs": "1.0.16",
|
|
66
|
-
"@postalsys/ee-client": "1.
|
|
67
|
+
"@postalsys/ee-client": "1.7.0",
|
|
67
68
|
"@postalsys/email-ai-tools": "1.13.15",
|
|
68
|
-
"@postalsys/email-content": "0.1.
|
|
69
|
+
"@postalsys/email-content": "0.1.2",
|
|
69
70
|
"@postalsys/email-text-tools": "2.4.11",
|
|
70
71
|
"@postalsys/gettext": "4.1.1",
|
|
71
72
|
"@postalsys/joi-messages": "1.0.5",
|
|
72
73
|
"@postalsys/templates": "2.0.1",
|
|
73
|
-
"@sentry/node": "10.
|
|
74
|
+
"@sentry/node": "10.69.0",
|
|
74
75
|
"@simplewebauthn/browser": "13.3.0",
|
|
75
76
|
"@simplewebauthn/server": "13.3.2",
|
|
76
77
|
"@zone-eu/mailsplit": "5.4.14",
|
|
77
78
|
"@zone-eu/wild-config": "1.7.6",
|
|
78
79
|
"ace-builds": "1.44.0",
|
|
79
80
|
"base32.js": "0.1.0",
|
|
80
|
-
"bullmq": "5.81.
|
|
81
|
+
"bullmq": "5.81.3",
|
|
81
82
|
"compare-versions": "6.1.1",
|
|
82
83
|
"dotenv": "17.4.2",
|
|
83
84
|
"encoding-japanese": "2.2.0",
|
|
@@ -86,16 +87,15 @@
|
|
|
86
87
|
"handlebars": "4.7.9",
|
|
87
88
|
"hapi-auth-bearer-token": "8.0.0",
|
|
88
89
|
"hapi-pino": "13.0.0",
|
|
89
|
-
"hapi-swagger": "17.3.2",
|
|
90
90
|
"he": "1.2.0",
|
|
91
91
|
"html-to-text": "10.0.0",
|
|
92
92
|
"ical.js": "1.5.0",
|
|
93
93
|
"iconv-lite": "0.7.3",
|
|
94
|
-
"imapflow": "1.6.
|
|
94
|
+
"imapflow": "1.6.5",
|
|
95
95
|
"ioredfour": "1.4.2",
|
|
96
96
|
"ioredis": "5.11.1",
|
|
97
97
|
"ipaddr.js": "2.4.0",
|
|
98
|
-
"joi": "
|
|
98
|
+
"joi": "18.2.3",
|
|
99
99
|
"libbase64": "1.3.0",
|
|
100
100
|
"libmime": "5.4.1",
|
|
101
101
|
"libqp": "2.1.1",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"minimist": "1.2.8",
|
|
105
105
|
"msgpack5": "6.0.2",
|
|
106
106
|
"murmurhash": "2.0.1",
|
|
107
|
-
"nanoid": "3.3.
|
|
107
|
+
"nanoid": "3.3.17",
|
|
108
108
|
"nodemailer": "9.0.3",
|
|
109
109
|
"pino": "10.3.1",
|
|
110
110
|
"prom-client": "15.1.3",
|
|
@@ -121,9 +121,9 @@
|
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
123
|
"@eslint/js": "10.0.1",
|
|
124
|
-
"@iconify-json/tabler": "1.2.
|
|
124
|
+
"@iconify-json/tabler": "1.2.38",
|
|
125
125
|
"@iconify/tailwind4": "1.2.3",
|
|
126
|
-
"@playwright/test": "1.62.
|
|
126
|
+
"@playwright/test": "1.62.1",
|
|
127
127
|
"@tailwindcss/cli": "4.3.3",
|
|
128
128
|
"acorn": "8.18.0",
|
|
129
129
|
"acorn-walk": "8.3.5",
|
|
@@ -131,9 +131,6 @@
|
|
|
131
131
|
"eerawlog": "1.5.5",
|
|
132
132
|
"eslint": "10.8.0",
|
|
133
133
|
"flyonui": "2.4.1",
|
|
134
|
-
"grunt": "1.6.3",
|
|
135
|
-
"grunt-cli": "1.5.0",
|
|
136
|
-
"grunt-shell-spawn": "0.5.0",
|
|
137
134
|
"pino-pretty": "13.1.3",
|
|
138
135
|
"prettier": "3.9.6",
|
|
139
136
|
"resedit": "3.0.2",
|
|
@@ -143,10 +140,7 @@
|
|
|
143
140
|
"xgettext-template": "5.0.0"
|
|
144
141
|
},
|
|
145
142
|
"overrides": {
|
|
146
|
-
"@asamuzakjp/css-color": "4.1.1"
|
|
147
|
-
"grunt": {
|
|
148
|
-
"js-yaml": "3.15.0"
|
|
149
|
-
}
|
|
143
|
+
"@asamuzakjp/css-color": "4.1.1"
|
|
150
144
|
},
|
|
151
145
|
"engines": {
|
|
152
146
|
"node": ">=20.x"
|
|
@@ -164,7 +158,6 @@
|
|
|
164
158
|
"views/**/*",
|
|
165
159
|
"lib/lua/**/*",
|
|
166
160
|
"node_modules/bull/lib/commands/**/*",
|
|
167
|
-
"node_modules/swagger-ui-dist/**/*",
|
|
168
161
|
"translations/**/*",
|
|
169
162
|
"node_modules/@postalsys/joi-messages/translations/*",
|
|
170
163
|
"node_modules/@postalsys/bounce-classifier/model/**/*",
|
package/playwright.config.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = defineConfig({
|
|
|
30
30
|
projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
|
|
31
31
|
webServer: {
|
|
32
32
|
// Flush the isolated e2e Redis DB so every run starts from a clean, unconfigured instance.
|
|
33
|
-
command: 'node test/
|
|
33
|
+
command: 'node test/helpers/flush-redis.js && node server.js',
|
|
34
34
|
url: BASE_URL,
|
|
35
35
|
timeout: 120000,
|
|
36
36
|
// Always boot fresh: the suite asserts fresh-instance behaviour (enabling auth, activating
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Fixups applied to the production node_modules tree before pkg bundles it.
|
|
4
|
+
#
|
|
5
|
+
# pkg walks every file a package's `exports` map points at and runs it through esbuild.
|
|
6
|
+
# A file esbuild transforms to nothing leaves pkg dereferencing an undefined result, and
|
|
7
|
+
# it dies with "Cannot read properties of undefined (reading 'tokens')" naming whichever
|
|
8
|
+
# of our own files happened to pull the package in - which points at the wrong place
|
|
9
|
+
# entirely. Fixed upstream in neither pkg 6.21 nor 6.22.
|
|
10
|
+
#
|
|
11
|
+
# Run from npm run build-source, after `npm ci --omit=dev` has produced the tree that
|
|
12
|
+
# actually gets bundled.
|
|
13
|
+
|
|
14
|
+
set -e
|
|
15
|
+
|
|
16
|
+
# @standard-schema/spec (joi >=18) is a types-only package: its runtime export is
|
|
17
|
+
# literally `{}` (see dist/index.cjs) and joi names it only in an `import type` inside
|
|
18
|
+
# lib/index.d.ts, which TypeScript erases. Its ESM entry point dist/index.js is therefore
|
|
19
|
+
# a 0-byte file, which is the one pkg cannot swallow.
|
|
20
|
+
#
|
|
21
|
+
# The file is restored to what an empty ES module should look like rather than deleted:
|
|
22
|
+
# the package stays resolvable, so a future joi that does require it at runtime keeps
|
|
23
|
+
# working instead of failing inside a shipped binary.
|
|
24
|
+
EMPTY_ESM="node_modules/@standard-schema/spec/dist/index.js"
|
|
25
|
+
if [ -f "$EMPTY_ESM" ] && [ ! -s "$EMPTY_ESM" ]; then
|
|
26
|
+
echo "export {};" >"$EMPTY_ESM"
|
|
27
|
+
echo "patched empty ESM entry point: $EMPTY_ESM"
|
|
28
|
+
fi
|