@ossy/platform 3.24.1 → 3.25.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/package.json +5 -5
- package/src/runtime.js +2 -1
- package/src/server.js +2 -1
- package/src/ses/poll-inbound-mail.js +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ossy/platform",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.25.0",
|
|
4
4
|
"description": "Ossy application server runtime",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,18 +49,18 @@
|
|
|
49
49
|
"@aws-sdk/util-format-url": "^3.972.17",
|
|
50
50
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
51
51
|
"@ossy/config": "^3.0.9",
|
|
52
|
-
"@ossy/email": "^3.
|
|
52
|
+
"@ossy/email": "^3.25.0",
|
|
53
53
|
"@ossy/event-store": "^3.24.1",
|
|
54
54
|
"@ossy/locale": "^3.4.0",
|
|
55
55
|
"@ossy/manifest": "^3.24.0",
|
|
56
56
|
"@ossy/observability": "^3.24.1",
|
|
57
57
|
"@ossy/policies": "^3.24.1",
|
|
58
|
-
"@ossy/router": "^3.0
|
|
58
|
+
"@ossy/router": "^3.25.0",
|
|
59
59
|
"@ossy/schema": "^3.24.0",
|
|
60
60
|
"@ossy/sdk": "^3.24.0",
|
|
61
61
|
"@ossy/tokens": "^3.24.1",
|
|
62
62
|
"@ossy/users": "^3.24.1",
|
|
63
|
-
"@ossy/workspaces": "^3.
|
|
63
|
+
"@ossy/workspaces": "^3.25.0",
|
|
64
64
|
"cookie-parser": "^1.4.7",
|
|
65
65
|
"dotenv": ">=16.0.0 <18.0.0",
|
|
66
66
|
"express": ">=5.0.0 <6.0.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"Dockerfile",
|
|
82
82
|
"docker-healthcheck.js"
|
|
83
83
|
],
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "00dd4b51a94de7e0399c9dfa59380a53e58c8523"
|
|
85
85
|
}
|
package/src/runtime.js
CHANGED
|
@@ -187,7 +187,8 @@ export async function startRuntime ({ port } = {}) {
|
|
|
187
187
|
const { language, messages, fallbackMessages } = resolveRequestLocale(pageRouter, requestUrl, buildDir, config)
|
|
188
188
|
if (typeof pageEntry.redirect === 'string' && pageEntry.redirect.trim()) {
|
|
189
189
|
const targetId = pageEntry.redirect.trim().replace(/^@/, '')
|
|
190
|
-
const
|
|
190
|
+
const params = pageRouter.getParamsFromUrl(requestUrl)
|
|
191
|
+
const targetPath = pageRouter.getPathname({ id: targetId, language, params })
|
|
191
192
|
if (targetPath) {
|
|
192
193
|
const search = new URL(requestUrl, 'http://localhost').search || ''
|
|
193
194
|
res.redirect(302, `${targetPath}${search}`)
|
package/src/server.js
CHANGED
|
@@ -530,7 +530,8 @@ export async function startServer (options = {}) {
|
|
|
530
530
|
if (typeof pageEntry.redirect === 'string' && pageEntry.redirect.trim()) {
|
|
531
531
|
const { language } = resolveRequestLocale(pageRouter, requestUrl, buildDir, config)
|
|
532
532
|
const targetId = pageEntry.redirect.trim().replace(/^@/, '')
|
|
533
|
-
const
|
|
533
|
+
const params = pageRouter.getParamsFromUrl(requestUrl)
|
|
534
|
+
const targetPath = pageRouter.getPathname({ id: targetId, language, params })
|
|
534
535
|
if (targetPath) {
|
|
535
536
|
const search = new URL(requestUrl, 'http://localhost').search || ''
|
|
536
537
|
res.redirect(302, `${targetPath}${search}`)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DeleteMessageCommand, ReceiveMessageCommand, SQSClient } from '@aws-sdk/client-sqs'
|
|
2
2
|
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3'
|
|
3
3
|
import { fileSesReceipt, sesReceiptFromBody } from '@ossy/email/ses-inbound'
|
|
4
|
+
import { canonicalWorkspaceId } from '@ossy/workspaces/server'
|
|
4
5
|
import { createInProcessSdk } from '../tasks/in-process-sdk.js'
|
|
5
6
|
import { inboundAwsClientConfig } from './inbound-aws-credentials.js'
|
|
6
7
|
|
|
@@ -47,9 +48,12 @@ export function startInboundMailPoller ({ queueUrl, bucket, log } = {}) {
|
|
|
47
48
|
const file = (body) => fileSesReceipt(sesReceiptFromBody(body), {
|
|
48
49
|
bucket,
|
|
49
50
|
getObject: (location) => readObject(objects, location),
|
|
50
|
-
invoke: ({ mime, workspaceId }) =>
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
invoke: async ({ mime, workspaceId }) => {
|
|
52
|
+
const canonical = await canonicalWorkspaceId(workspaceId)
|
|
53
|
+
return createInProcessSdk()
|
|
54
|
+
.forWorkspace(canonical)
|
|
55
|
+
.invoke(ReceiveInbound, { mime, workspaceId: canonical })
|
|
56
|
+
},
|
|
53
57
|
})
|
|
54
58
|
|
|
55
59
|
const run = (async () => {
|