@platformatic/composer 2.30.0 → 2.30.1-alpha.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/lib/openapi-generator.js +7 -4
- package/lib/proxy.js +4 -1
- package/package.json +10 -10
- package/schema.json +1 -1
package/lib/openapi-generator.js
CHANGED
|
@@ -99,12 +99,15 @@ async function composeOpenAPI (app, opts) {
|
|
|
99
99
|
const newRoutePath = mapRoutePath(routePath)
|
|
100
100
|
|
|
101
101
|
const replyOptions = {}
|
|
102
|
-
const onResponse = (request, reply,
|
|
103
|
-
app.openTelemetry?.endHTTPSpanClient(reply.request.proxedCallSpan, {
|
|
102
|
+
const onResponse = (request, reply, res) => {
|
|
103
|
+
app.openTelemetry?.endHTTPSpanClient(reply.request.proxedCallSpan, {
|
|
104
|
+
statusCode: reply.statusCode,
|
|
105
|
+
headers: res.headers
|
|
106
|
+
})
|
|
104
107
|
if (req.routeOptions.config?.onComposerResponse) {
|
|
105
|
-
req.routeOptions.config?.onComposerResponse(request, reply, stream)
|
|
108
|
+
req.routeOptions.config?.onComposerResponse(request, reply, res.stream)
|
|
106
109
|
} else {
|
|
107
|
-
reply.send(stream)
|
|
110
|
+
reply.send(res.stream)
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
const rewriteRequestHeaders = (request, headers) => {
|
package/lib/proxy.js
CHANGED
|
@@ -170,7 +170,10 @@ module.exports = fp(async function (app, opts) {
|
|
|
170
170
|
return headers
|
|
171
171
|
},
|
|
172
172
|
onResponse: (request, reply, res) => {
|
|
173
|
-
app.openTelemetry?.endHTTPSpanClient(reply.request.proxedCallSpan, {
|
|
173
|
+
app.openTelemetry?.endHTTPSpanClient(reply.request.proxedCallSpan, {
|
|
174
|
+
statusCode: reply.statusCode,
|
|
175
|
+
headers: res.headers
|
|
176
|
+
})
|
|
174
177
|
reply.send(res.stream)
|
|
175
178
|
}
|
|
176
179
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/composer",
|
|
3
|
-
"version": "2.30.0",
|
|
3
|
+
"version": "2.30.1-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"typescript": "^5.5.4",
|
|
31
31
|
"why-is-node-running": "2",
|
|
32
32
|
"ws": "^8.16.0",
|
|
33
|
-
"@platformatic/client": "2.30.0",
|
|
34
|
-
"@platformatic/config": "2.30.0",
|
|
35
|
-
"@platformatic/db": "2.30.0"
|
|
33
|
+
"@platformatic/client": "2.30.1-alpha.0",
|
|
34
|
+
"@platformatic/config": "2.30.1-alpha.0",
|
|
35
|
+
"@platformatic/db": "2.30.1-alpha.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fastify/error": "^4.0.0",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"rfdc": "^1.3.1",
|
|
67
67
|
"semgrator": "^0.3.0",
|
|
68
68
|
"undici": "^7.0.0",
|
|
69
|
-
"@platformatic/generators": "2.30.0",
|
|
70
|
-
"@platformatic/config": "2.30.0",
|
|
71
|
-
"@platformatic/
|
|
72
|
-
"@platformatic/
|
|
73
|
-
"@platformatic/
|
|
74
|
-
"@platformatic/
|
|
69
|
+
"@platformatic/generators": "2.30.1-alpha.0",
|
|
70
|
+
"@platformatic/config": "2.30.1-alpha.0",
|
|
71
|
+
"@platformatic/telemetry": "2.30.1-alpha.0",
|
|
72
|
+
"@platformatic/scalar-theme": "2.30.1-alpha.0",
|
|
73
|
+
"@platformatic/service": "2.30.1-alpha.0",
|
|
74
|
+
"@platformatic/utils": "^2.30.1-alpha.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"test": "pnpm run lint && borp -T --timeout=300000 -c 1 && tsd",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/composer/2.30.0.json",
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/composer/2.30.1-alpha.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Composer",
|
|
5
5
|
"type": "object",
|