@platformatic/node 3.0.0-rc.2 → 3.0.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/capability.js CHANGED
@@ -198,9 +198,12 @@ export class NodeCapability extends BaseCapability {
198
198
 
199
199
  if (this.childManager) {
200
200
  return this.stopCommand()
201
+ // This is needed if the capability was subclassed
202
+ } else if (!this.#server) {
203
+ return
201
204
  }
202
205
 
203
- if (this.#isFastify) {
206
+ if (this.#isFastify && this.#app) {
204
207
  return this.#app.close()
205
208
  }
206
209
 
@@ -299,6 +302,12 @@ export class NodeCapability extends BaseCapability {
299
302
  }
300
303
 
301
304
  async _listen () {
305
+ // Make this idempotent
306
+ /* c8 ignore next 3 */
307
+ if (this.url) {
308
+ return this.url
309
+ }
310
+
302
311
  const serverOptions = this.serverConfig
303
312
  const listenOptions = { host: serverOptions?.hostname || '127.0.0.1', port: serverOptions?.port || 0 }
304
313
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/node",
3
- "version": "3.0.0-rc.2",
3
+ "version": "3.0.1",
4
4
  "description": "Platformatic Node.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -17,9 +17,9 @@
17
17
  "dependencies": {
18
18
  "json5": "^2.2.3",
19
19
  "light-my-request": "^6.0.0",
20
- "@platformatic/foundation": "3.0.0-rc.2",
21
- "@platformatic/basic": "3.0.0-rc.2",
22
- "@platformatic/generators": "3.0.0-rc.2"
20
+ "@platformatic/basic": "3.0.1",
21
+ "@platformatic/foundation": "3.0.1",
22
+ "@platformatic/generators": "3.0.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "cleaner-spec-reporter": "^0.5.0",
@@ -31,8 +31,8 @@
31
31
  "neostandard": "^0.12.0",
32
32
  "tsx": "^4.19.0",
33
33
  "typescript": "^5.5.4",
34
- "@platformatic/gateway": "3.0.0-rc.2",
35
- "@platformatic/service": "3.0.0-rc.2"
34
+ "@platformatic/gateway": "3.0.1",
35
+ "@platformatic/service": "3.0.1"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=22.18.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/node/3.0.0-rc.2.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/node/3.0.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Node.js Config",
5
5
  "type": "object",