@platformatic/service 2.44.1 → 2.44.3

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
@@ -224,6 +224,7 @@ export interface PlatformaticService {
224
224
  }[];
225
225
  }
226
226
  export interface OpenTelemetry {
227
+ enabled?: boolean | string;
227
228
  /**
228
229
  * The name of the service. Defaults to the folder name if not specified.
229
230
  */
package/index.js CHANGED
@@ -143,8 +143,8 @@ platformaticService.configType = 'service'
143
143
  platformaticService.schema = schema
144
144
  platformaticService.configManagerConfig = module.exports.configManagerConfig
145
145
 
146
- function _buildServer (options, app) {
147
- return buildServer(options, app || module.exports)
146
+ function _buildServer (options, app, context) {
147
+ return buildServer(options, app || module.exports, context)
148
148
  }
149
149
 
150
150
  async function buildStackable (options, app = platformaticService, Stackable = ServiceStackable) {
package/lib/start.js CHANGED
@@ -11,6 +11,7 @@ const {
11
11
  const { addLoggerToTheConfig, isDocker } = require('./utils.js')
12
12
  const { randomUUID } = require('crypto')
13
13
  const { fastify } = require('fastify')
14
+ const { features } = require('@platformatic/utils')
14
15
 
15
16
  async function adjustHttpsKeyAndCert (arg) {
16
17
  if (typeof arg === 'string') {
@@ -116,7 +117,8 @@ async function buildServer (options, app, context) {
116
117
  handler.start = async function () {
117
118
  serverContext.url = await handler.listen({
118
119
  host: options.server?.hostname || '127.0.0.1',
119
- port: options.server?.port || 0
120
+ port: options.server?.port || 0,
121
+ reusePort: features.node.reusePort && context?.isProduction
120
122
  })
121
123
  return serverContext.url
122
124
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "2.44.1",
3
+ "version": "2.44.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -77,14 +77,14 @@
77
77
  "rfdc": "^1.3.1",
78
78
  "semgrator": "^0.3.0",
79
79
  "undici": "^7.0.0",
80
- "@platformatic/client": "2.44.1",
81
- "@platformatic/config": "2.44.1",
82
- "@platformatic/generators": "2.44.1",
83
- "@platformatic/metrics": "2.44.1",
84
- "@platformatic/scalar-theme": "2.44.1",
85
- "@platformatic/telemetry": "2.44.1",
86
- "@platformatic/ts-compiler": "2.44.1",
87
- "@platformatic/utils": "2.44.1"
80
+ "@platformatic/client": "2.44.3",
81
+ "@platformatic/config": "2.44.3",
82
+ "@platformatic/generators": "2.44.3",
83
+ "@platformatic/metrics": "2.44.3",
84
+ "@platformatic/scalar-theme": "2.44.3",
85
+ "@platformatic/telemetry": "2.44.3",
86
+ "@platformatic/ts-compiler": "2.44.3",
87
+ "@platformatic/utils": "2.44.3"
88
88
  },
89
89
  "scripts": {
90
90
  "test": "pnpm run lint && borp -T --concurrency=1 --timeout=300000 && tsd",
package/schema.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/service/2.44.1.json",
3
- "version": "2.44.1",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/service/2.44.3.json",
3
+ "version": "2.44.3",
4
4
  "title": "Platformatic Service",
5
5
  "type": "object",
6
6
  "properties": {
@@ -701,6 +701,16 @@
701
701
  "$id": "/OpenTelemetry",
702
702
  "type": "object",
703
703
  "properties": {
704
+ "enabled": {
705
+ "anyOf": [
706
+ {
707
+ "type": "boolean"
708
+ },
709
+ {
710
+ "type": "string"
711
+ }
712
+ ]
713
+ },
704
714
  "serviceName": {
705
715
  "type": "string",
706
716
  "description": "The name of the service. Defaults to the folder name if not specified."