@platformatic/composer 2.35.1 → 2.36.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.
- package/lib/proxy.js +5 -1
- package/package.json +11 -11
- package/schema.json +1 -1
package/lib/proxy.js
CHANGED
|
@@ -5,6 +5,7 @@ const httpProxy = require('@fastify/http-proxy')
|
|
|
5
5
|
const fp = require('fastify-plugin')
|
|
6
6
|
|
|
7
7
|
const kITC = Symbol.for('plt.runtime.itc')
|
|
8
|
+
const kProxyRoute = Symbol('plt.composer.proxy.route')
|
|
8
9
|
|
|
9
10
|
async function resolveServiceProxyParameters (service) {
|
|
10
11
|
// Get meta information from the service, if any, to eventually hook up to a TCP port
|
|
@@ -128,7 +129,7 @@ module.exports = fp(async function (app, opts) {
|
|
|
128
129
|
// Do not show proxied services in Swagger
|
|
129
130
|
if (!service.openapi) {
|
|
130
131
|
app.addHook('onRoute', routeOptions => {
|
|
131
|
-
if (routeOptions.url.startsWith(basePath)) {
|
|
132
|
+
if (routeOptions.config?.[kProxyRoute] && routeOptions.url.startsWith(basePath)) {
|
|
132
133
|
routeOptions.schema ??= {}
|
|
133
134
|
routeOptions.schema.hide = true
|
|
134
135
|
}
|
|
@@ -143,6 +144,9 @@ module.exports = fp(async function (app, opts) {
|
|
|
143
144
|
wsUpstream: url ?? origin,
|
|
144
145
|
undici: dispatcher,
|
|
145
146
|
destroyAgent: false,
|
|
147
|
+
config: {
|
|
148
|
+
[kProxyRoute]: true
|
|
149
|
+
},
|
|
146
150
|
internalRewriteLocationHeader,
|
|
147
151
|
replyOptions: {
|
|
148
152
|
rewriteRequestHeaders: (request, headers) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/composer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.36.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.
|
|
34
|
-
"@platformatic/
|
|
35
|
-
"@platformatic/
|
|
33
|
+
"@platformatic/client": "2.36.1",
|
|
34
|
+
"@platformatic/config": "2.36.1",
|
|
35
|
+
"@platformatic/db": "2.36.1"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@fastify/error": "^4.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"graphql": "^16.8.1",
|
|
57
57
|
"help-me": "^5.0.0",
|
|
58
58
|
"json-schema-traverse": "^1.0.0",
|
|
59
|
-
"mercurius": "^
|
|
59
|
+
"mercurius": "^16.0.0",
|
|
60
60
|
"minimist": "^1.2.8",
|
|
61
61
|
"my-ua-parser": "^2.0.2",
|
|
62
62
|
"nunjucks": "^3.2.4",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"rfdc": "^1.3.1",
|
|
67
67
|
"semgrator": "^0.3.0",
|
|
68
68
|
"undici": "^7.0.0",
|
|
69
|
-
"@platformatic/
|
|
70
|
-
"@platformatic/
|
|
71
|
-
"@platformatic/
|
|
72
|
-
"@platformatic/telemetry": "2.
|
|
73
|
-
"@platformatic/utils": "^2.
|
|
74
|
-
"@platformatic/
|
|
69
|
+
"@platformatic/config": "2.36.1",
|
|
70
|
+
"@platformatic/generators": "2.36.1",
|
|
71
|
+
"@platformatic/scalar-theme": "2.36.1",
|
|
72
|
+
"@platformatic/telemetry": "2.36.1",
|
|
73
|
+
"@platformatic/utils": "^2.36.1",
|
|
74
|
+
"@platformatic/service": "2.36.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.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/composer/2.36.1.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Composer",
|
|
5
5
|
"type": "object",
|