@platformatic/service 2.0.0-alpha.18 → 2.0.0-alpha.19

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/start.js CHANGED
@@ -56,12 +56,26 @@ async function createServer (serverContext) {
56
56
  return root
57
57
  }
58
58
  async function buildConfigManager (options, app) {
59
+ const loggerInstance = options.server?.loggerInstance
60
+ if (loggerInstance) {
61
+ delete options.server.loggerInstance
62
+ options.server ||= {}
63
+ options.server.logger = { level: loggerInstance.level }
64
+ process._rawDebug('loggerInstance', options.server.logger)
65
+ }
66
+
59
67
  let configManager = options.configManager
60
68
  if (!configManager) {
61
69
  // instantiate a new config manager from current options
62
70
  configManager = new ConfigManager({ ...app.configManagerConfig, source: options })
63
71
  await configManager.parseAndValidate()
64
72
  }
73
+
74
+ if (loggerInstance) {
75
+ configManager.current.server ||= {}
76
+ delete configManager.current.server.logger
77
+ configManager.current.server.loggerInstance = loggerInstance
78
+ }
65
79
  return configManager
66
80
  }
67
81
 
package/lib/upgrade.js CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict'
2
2
 
3
3
  const { join } = require('path')
4
- const pkg = require('../package.json')
5
4
 
6
5
  module.exports = async function upgrade (config, version) {
7
6
  const { semgrator } = await import('semgrator')
@@ -19,7 +18,5 @@ module.exports = async function upgrade (config, version) {
19
18
  result = updated.result
20
19
  }
21
20
 
22
- result.$schema = `https://schemas.platformatic.dev/@platformatic/service/${pkg.version}.json`
23
-
24
21
  return result
25
22
  }
@@ -0,0 +1,11 @@
1
+ 'use strict'
2
+
3
+ const pkg = require('../../package.json')
4
+
5
+ module.exports = {
6
+ version: '2.0.0',
7
+ up: function (config) {
8
+ config.$schema = `https://schemas.platformatic.dev/@platformatic/service/${pkg.version}.json`
9
+ return config
10
+ }
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/service",
3
- "version": "2.0.0-alpha.18",
3
+ "version": "2.0.0-alpha.19",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -76,13 +76,13 @@
76
76
  "rfdc": "^1.3.1",
77
77
  "semgrator": "^0.3.0",
78
78
  "undici": "^6.9.0",
79
- "@platformatic/client": "2.0.0-alpha.18",
80
- "@platformatic/config": "2.0.0-alpha.18",
81
- "@platformatic/telemetry": "2.0.0-alpha.18",
82
- "@platformatic/scalar-theme": "2.0.0-alpha.18",
83
- "@platformatic/ts-compiler": "2.0.0-alpha.18",
84
- "@platformatic/utils": "2.0.0-alpha.18",
85
- "@platformatic/generators": "2.0.0-alpha.18"
79
+ "@platformatic/client": "2.0.0-alpha.19",
80
+ "@platformatic/generators": "2.0.0-alpha.19",
81
+ "@platformatic/scalar-theme": "2.0.0-alpha.19",
82
+ "@platformatic/config": "2.0.0-alpha.19",
83
+ "@platformatic/ts-compiler": "2.0.0-alpha.19",
84
+ "@platformatic/utils": "2.0.0-alpha.19",
85
+ "@platformatic/telemetry": "2.0.0-alpha.19"
86
86
  },
87
87
  "scripts": {
88
88
  "test": "pnpm run lint && borp -T --concurrency=1 --timeout=180000 && tsd",
package/schema.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/service/2.0.0-alpha.18.json",
3
- "version": "2.0.0-alpha.18",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/service/2.0.0-alpha.19.json",
3
+ "version": "2.0.0-alpha.19",
4
4
  "title": "Platformatic Service",
5
5
  "type": "object",
6
6
  "properties": {