@platformatic/gateway 3.0.0-alpha.8 → 3.0.0-rc.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/config.d.ts CHANGED
@@ -469,6 +469,7 @@ export interface PlatformaticGatewayConfig {
469
469
  };
470
470
  startTimeout?: number;
471
471
  restartOnError?: boolean | number;
472
+ exitOnUnhandledErrors?: boolean;
472
473
  gracefulShutdown?: {
473
474
  runtime: number | string;
474
475
  application: number | string;
package/lib/capability.js CHANGED
@@ -54,18 +54,16 @@ export class GatewayCapability extends ServiceCapability {
54
54
  if (this.dependencies) {
55
55
  const workers = await globalThis[kITC].send('getWorkers')
56
56
 
57
- const started = new Set()
57
+ const unstarted = new Set(this.dependencies)
58
58
  for (const worker of Object.values(workers)) {
59
59
  if (worker.status === 'started') {
60
- started.add(worker.application)
60
+ unstarted.delete(worker.application)
61
61
  }
62
62
  }
63
63
 
64
- for (const dependency of this.dependencies) {
65
- if (!started.has(dependency)) {
66
- globalThis[kITC].notify('event', { event: 'unhealthy' })
67
- return false
68
- }
64
+ if (unstarted.size > 0) {
65
+ globalThis[kITC].notify('event', { event: 'unhealthy' })
66
+ return false
69
67
  }
70
68
  }
71
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/gateway",
3
- "version": "3.0.0-alpha.8",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "typescript": "^5.5.4",
33
33
  "why-is-node-running": "2",
34
34
  "ws": "^8.16.0",
35
- "@platformatic/db": "3.0.0-alpha.8"
35
+ "@platformatic/db": "3.0.0-rc.1"
36
36
  },
37
37
  "dependencies": {
38
38
  "@fastify/error": "^4.0.0",
@@ -63,11 +63,11 @@
63
63
  "rfdc": "^1.3.1",
64
64
  "semgrator": "^0.3.0",
65
65
  "undici": "^7.0.0",
66
- "@platformatic/basic": "3.0.0-alpha.8",
67
- "@platformatic/foundation": "^3.0.0-alpha.8",
68
- "@platformatic/scalar-theme": "3.0.0-alpha.8",
69
- "@platformatic/service": "3.0.0-alpha.8",
70
- "@platformatic/telemetry": "3.0.0-alpha.8"
66
+ "@platformatic/basic": "3.0.0-rc.1",
67
+ "@platformatic/foundation": "^3.0.0-rc.1",
68
+ "@platformatic/scalar-theme": "3.0.0-rc.1",
69
+ "@platformatic/service": "3.0.0-rc.1",
70
+ "@platformatic/telemetry": "3.0.0-rc.1"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=22.18.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.0.0-alpha.8.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/gateway/3.0.0-rc.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Gateway Config",
5
5
  "type": "object",
@@ -1800,6 +1800,10 @@
1800
1800
  }
1801
1801
  ]
1802
1802
  },
1803
+ "exitOnUnhandledErrors": {
1804
+ "default": true,
1805
+ "type": "boolean"
1806
+ },
1803
1807
  "gracefulShutdown": {
1804
1808
  "type": "object",
1805
1809
  "properties": {