@platformatic/runtime 2.5.3 → 2.5.4

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
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime253Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime254Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
package/lib/config.js CHANGED
@@ -140,9 +140,14 @@ async function _transformConfig (configManager, args) {
140
140
  }
141
141
 
142
142
  if (!hasValidEntrypoint) {
143
- throw typeof config.entrypoint !== 'undefined'
144
- ? new errors.InvalidEntrypointError(config.entrypoint)
145
- : new errors.MissingEntrypointError()
143
+ if (config.entrypoint) {
144
+ throw new errors.InvalidEntrypointError(config.entrypoint)
145
+ } else if (services.length >= 1) {
146
+ throw new errors.MissingEntrypointError()
147
+ }
148
+ // If there are no services, and no entrypoint it's an empty app.
149
+ // It won't start, but we should be able to parse and operate on it,
150
+ // like adding other services.
146
151
  }
147
152
 
148
153
  configManager.current.services = services
package/lib/runtime.js CHANGED
@@ -127,6 +127,9 @@ class Runtime extends EventEmitter {
127
127
  }
128
128
 
129
129
  async start () {
130
+ if (typeof this.#configManager.current.entrypoint === 'undefined') {
131
+ throw new errors.MissingEntrypointError()
132
+ }
130
133
  this.#updateStatus('starting')
131
134
 
132
135
  // Important: do not use Promise.all here since it won't properly manage dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "2.5.3",
3
+ "version": "2.5.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -34,11 +34,11 @@
34
34
  "typescript": "^5.5.4",
35
35
  "undici-oidc-interceptor": "^0.5.0",
36
36
  "why-is-node-running": "^2.2.2",
37
- "@platformatic/composer": "2.5.3",
38
- "@platformatic/db": "2.5.3",
39
- "@platformatic/service": "2.5.3",
40
- "@platformatic/sql-graphql": "2.5.3",
41
- "@platformatic/sql-mapper": "2.5.3"
37
+ "@platformatic/composer": "2.5.4",
38
+ "@platformatic/service": "2.5.4",
39
+ "@platformatic/db": "2.5.4",
40
+ "@platformatic/sql-graphql": "2.5.4",
41
+ "@platformatic/sql-mapper": "2.5.4"
42
42
  },
43
43
  "dependencies": {
44
44
  "@fastify/error": "^4.0.0",
@@ -69,13 +69,13 @@
69
69
  "undici": "^6.9.0",
70
70
  "undici-thread-interceptor": "^0.7.0",
71
71
  "ws": "^8.16.0",
72
- "@platformatic/basic": "2.5.3",
73
- "@platformatic/config": "2.5.3",
74
- "@platformatic/generators": "2.5.3",
75
- "@platformatic/itc": "2.5.3",
76
- "@platformatic/telemetry": "2.5.3",
77
- "@platformatic/ts-compiler": "2.5.3",
78
- "@platformatic/utils": "2.5.3"
72
+ "@platformatic/basic": "2.5.4",
73
+ "@platformatic/itc": "2.5.4",
74
+ "@platformatic/config": "2.5.4",
75
+ "@platformatic/telemetry": "2.5.4",
76
+ "@platformatic/generators": "2.5.4",
77
+ "@platformatic/ts-compiler": "2.5.4",
78
+ "@platformatic/utils": "2.5.4"
79
79
  },
80
80
  "scripts": {
81
81
  "test": "npm run lint && borp --concurrency=1 --timeout=180000 && tsd",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.5.3.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.5.4.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {