@platformatic/composer 2.30.0 → 2.30.1-alpha.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.
@@ -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, { stream }) => {
103
- app.openTelemetry?.endHTTPSpanClient(reply.request.proxedCallSpan, { statusCode: reply.statusCode })
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, { statusCode: reply.statusCode })
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.1",
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.1",
34
+ "@platformatic/config": "2.30.1-alpha.1",
35
+ "@platformatic/db": "2.30.1-alpha.1"
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/scalar-theme": "2.30.0",
72
- "@platformatic/telemetry": "2.30.0",
73
- "@platformatic/utils": "^2.30.0",
74
- "@platformatic/service": "2.30.0"
69
+ "@platformatic/generators": "2.30.1-alpha.1",
70
+ "@platformatic/config": "2.30.1-alpha.1",
71
+ "@platformatic/scalar-theme": "2.30.1-alpha.1",
72
+ "@platformatic/telemetry": "2.30.1-alpha.1",
73
+ "@platformatic/utils": "^2.30.1-alpha.1",
74
+ "@platformatic/service": "2.30.1-alpha.1"
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.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Composer",
5
5
  "type": "object",