@platformatic/node 2.0.0-alpha.16 → 2.0.0-alpha.18

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 -0
  2. package/package.json +7 -6
  3. package/schema.json +1 -1
package/index.js CHANGED
@@ -17,6 +17,7 @@ import { Server } from 'node:http'
17
17
  import { resolve as pathResolve, resolve } from 'node:path'
18
18
  import { pathToFileURL } from 'url'
19
19
  import { packageJson, schema } from './lib/schema.js'
20
+ import { setupNodeHTTPTelemetry } from '@platformatic/telemetry'
20
21
 
21
22
  const validFields = [
22
23
  'main',
@@ -91,6 +92,11 @@ export class NodeStackable extends BaseStackable {
91
92
  // at all. Otherwise there is chance we miss the listen event.
92
93
  const serverOptions = this.serverConfig
93
94
  const serverPromise = createServerListener((this.isEntrypoint ? serverOptions?.port : undefined) ?? true)
95
+ // If telemetry is set, configure it
96
+ const telemetryConfig = this.telemetryConfig
97
+ if (telemetryConfig) {
98
+ setupNodeHTTPTelemetry(telemetryConfig, this.logger)
99
+ }
94
100
  this.#module = await importFile(finalEntrypoint)
95
101
  this.#module = this.#module.default || this.#module
96
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/node",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.18",
4
4
  "description": "Platformatic Node.js Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -16,9 +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.0.0-alpha.16",
20
- "@platformatic/utils": "2.0.0-alpha.16",
21
- "@platformatic/config": "2.0.0-alpha.16"
19
+ "@platformatic/basic": "2.0.0-alpha.18",
20
+ "@platformatic/utils": "2.0.0-alpha.18",
21
+ "@platformatic/config": "2.0.0-alpha.18",
22
+ "@platformatic/telemetry": "2.0.0-alpha.18"
22
23
  },
23
24
  "devDependencies": {
24
25
  "borp": "^0.17.0",
@@ -29,8 +30,8 @@
29
30
  "neostandard": "^0.11.1",
30
31
  "tsx": "^4.19.0",
31
32
  "typescript": "^5.5.4",
32
- "@platformatic/composer": "2.0.0-alpha.16",
33
- "@platformatic/service": "2.0.0-alpha.16"
33
+ "@platformatic/service": "2.0.0-alpha.18",
34
+ "@platformatic/composer": "2.0.0-alpha.18"
34
35
  },
35
36
  "scripts": {
36
37
  "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.0.0-alpha.16.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/node/2.0.0-alpha.18.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Node.js Stackable",
5
5
  "type": "object",