@platformatic/gateway 3.29.1 → 3.30.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/proxy.js CHANGED
@@ -11,9 +11,21 @@ const kProxyRoute = Symbol('plt.gateway.proxy.route')
11
11
 
12
12
  const urlPattern = /^https?:\/\//
13
13
 
14
+ function isLocalApplication (application) {
15
+ if (!application.origin) {
16
+ return true
17
+ }
18
+
19
+ return application.origin.endsWith('.plt.local')
20
+ }
21
+
14
22
  async function resolveApplicationProxyParameters (application) {
15
23
  // Get meta information from the application, if any, to eventually hook up to a TCP port
16
- const allMeta = (await globalThis[kITC]?.send('getApplicationMeta', application.id)) ?? {}
24
+ // Only fetch meta for local applications - remote applications won't be in the runtime
25
+ let allMeta = {}
26
+ if (isLocalApplication(application)) {
27
+ allMeta = (await globalThis[kITC]?.send('getApplicationMeta', application.id)) ?? {}
28
+ }
17
29
  const meta = allMeta.gateway ?? allMeta.composer ?? { prefix: application.id }
18
30
 
19
31
  // If no prefix could be found, assume the application id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/gateway",
3
- "version": "3.29.1",
3
+ "version": "3.30.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -33,7 +33,7 @@
33
33
  "typescript": "^5.5.4",
34
34
  "why-is-node-running": "2",
35
35
  "ws": "^8.16.0",
36
- "@platformatic/db": "3.29.1"
36
+ "@platformatic/db": "3.30.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "@fastify/error": "^4.0.0",
@@ -49,7 +49,7 @@
49
49
  "console-table-printer": "^2.12.0",
50
50
  "execa": "^9.0.0",
51
51
  "fast-deep-equal": "^3.1.3",
52
- "fastify": "^5.0.0",
52
+ "fastify": "^5.7.0",
53
53
  "fastify-plugin": "^5.0.0",
54
54
  "graphql": "^16.8.1",
55
55
  "help-me": "^5.0.0",
@@ -64,11 +64,11 @@
64
64
  "rfdc": "^1.3.1",
65
65
  "semgrator": "^0.3.0",
66
66
  "undici": "^7.0.0",
67
- "@platformatic/basic": "3.29.1",
68
- "@platformatic/scalar-theme": "3.29.1",
69
- "@platformatic/foundation": "^3.29.1",
70
- "@platformatic/service": "3.29.1",
71
- "@platformatic/telemetry": "3.29.1"
67
+ "@platformatic/basic": "3.30.0",
68
+ "@platformatic/scalar-theme": "3.30.0",
69
+ "@platformatic/service": "3.30.0",
70
+ "@platformatic/telemetry": "3.30.0",
71
+ "@platformatic/foundation": "^3.30.0"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.29.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.30.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Gateway Config",
5
5
  "type": "object",