@platformatic/node 2.5.4 → 2.5.5-alpha.2

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.
Files changed (3) hide show
  1. package/index.js +6 -16
  2. package/package.json +7 -7
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -53,9 +53,6 @@ export class NodeStackable extends BaseStackable {
53
53
  #isFastify
54
54
  #isKoa
55
55
 
56
- #startHttpTimer
57
- #endHttpTimer
58
-
59
56
  constructor (options, root, configManager) {
60
57
  super('nodejs', packageJson.version, options, root, configManager)
61
58
  }
@@ -141,7 +138,7 @@ export class NodeStackable extends BaseStackable {
141
138
  }
142
139
 
143
140
  async stop () {
144
- if (this.subprocess) {
141
+ if (this.childManager) {
145
142
  return this.stopCommand()
146
143
  }
147
144
 
@@ -166,13 +163,6 @@ export class NodeStackable extends BaseStackable {
166
163
  })
167
164
  }
168
165
 
169
- async collectMetrics ({ startHttpTimer, endHttpTimer }) {
170
- this.#startHttpTimer = startHttpTimer
171
- this.#endHttpTimer = endHttpTimer
172
-
173
- return { defaultMetrics: true, httpMetrics: true }
174
- }
175
-
176
166
  async build () {
177
167
  const command = this.configManager.current.application.commands.build
178
168
 
@@ -200,13 +190,13 @@ export class NodeStackable extends BaseStackable {
200
190
  this.logger.trace({ injectParams, url: this.url }, 'injecting via request')
201
191
  res = await injectViaRequest(this.url, injectParams, onInject)
202
192
  } else {
203
- if (this.#startHttpTimer && this.#endHttpTimer) {
204
- this.#startHttpTimer({ request: injectParams })
193
+ if (this.startHttpTimer && this.endHttpTimer) {
194
+ this.startHttpTimer({ request: injectParams })
205
195
 
206
196
  if (onInject) {
207
197
  const originalOnInject = onInject
208
198
  onInject = (err, response) => {
209
- this.#endHttpTimer({ request: injectParams, response })
199
+ this.endHttpTimer({ request: injectParams, response })
210
200
  originalOnInject(err, response)
211
201
  }
212
202
  }
@@ -220,8 +210,8 @@ export class NodeStackable extends BaseStackable {
220
210
  res = await inject(this.#dispatcher ?? this.#app, injectParams, onInject)
221
211
  }
222
212
 
223
- if (this.#endHttpTimer && !onInject) {
224
- this.#endHttpTimer({ request: injectParams, response: res })
213
+ if (this.endHttpTimer && !onInject) {
214
+ this.endHttpTimer({ request: injectParams, response: res })
225
215
  }
226
216
  }
227
217
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/node",
3
- "version": "2.5.4",
3
+ "version": "2.5.5-alpha.2",
4
4
  "description": "Platformatic Node.js Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -16,10 +16,10 @@
16
16
  "homepage": "https://github.com/platformatic/platformatic#readme",
17
17
  "dependencies": {
18
18
  "light-my-request": "^6.0.0",
19
- "@platformatic/basic": "2.5.4",
20
- "@platformatic/config": "2.5.4",
21
- "@platformatic/utils": "2.5.4",
22
- "@platformatic/telemetry": "2.5.4"
19
+ "@platformatic/basic": "2.5.5-alpha.2",
20
+ "@platformatic/utils": "2.5.5-alpha.2",
21
+ "@platformatic/telemetry": "2.5.5-alpha.2",
22
+ "@platformatic/config": "2.5.5-alpha.2"
23
23
  },
24
24
  "devDependencies": {
25
25
  "borp": "^0.17.0",
@@ -31,8 +31,8 @@
31
31
  "neostandard": "^0.11.1",
32
32
  "tsx": "^4.19.0",
33
33
  "typescript": "^5.5.4",
34
- "@platformatic/composer": "2.5.4",
35
- "@platformatic/service": "2.5.4"
34
+ "@platformatic/composer": "2.5.5-alpha.2",
35
+ "@platformatic/service": "2.5.5-alpha.2"
36
36
  },
37
37
  "scripts": {
38
38
  "test": "npm run lint && borp --concurrency=1 --no-timeout",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/node/2.5.4.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/node/2.5.5-alpha.2.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Node.js Stackable",
5
5
  "type": "object",