@platformatic/runtime 1.5.0 → 1.5.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/build-server.js +14 -0
- package/lib/config.js +3 -3
- package/lib/schema.js +19 -1
- package/package.json +9 -9
package/lib/build-server.js
CHANGED
|
@@ -6,7 +6,17 @@ const { buildServer: buildServerService } = require('@platformatic/service')
|
|
|
6
6
|
const { loadConfig } = require('./load-config')
|
|
7
7
|
|
|
8
8
|
async function buildServerRuntime (options = {}) {
|
|
9
|
+
const {
|
|
10
|
+
serviceMap,
|
|
11
|
+
loggingPort,
|
|
12
|
+
loggingMetadata
|
|
13
|
+
} = options
|
|
14
|
+
|
|
9
15
|
if (!options.configManager) {
|
|
16
|
+
delete options.serviceMap
|
|
17
|
+
delete options.loggingPort
|
|
18
|
+
delete options.loggingMetadata
|
|
19
|
+
|
|
10
20
|
// Instantiate a new config manager from the current options.
|
|
11
21
|
const cm = new ConfigManager({
|
|
12
22
|
...platformaticRuntime.configManagerConfig,
|
|
@@ -14,6 +24,10 @@ async function buildServerRuntime (options = {}) {
|
|
|
14
24
|
})
|
|
15
25
|
await cm.parseAndValidate()
|
|
16
26
|
|
|
27
|
+
cm.current.loggingPort = loggingPort
|
|
28
|
+
cm.current.loggingMetadata = loggingMetadata
|
|
29
|
+
cm.current.serviceMap = serviceMap
|
|
30
|
+
|
|
17
31
|
if (typeof options === 'string') {
|
|
18
32
|
options = { configManager: cm }
|
|
19
33
|
} else {
|
package/lib/config.js
CHANGED
|
@@ -39,7 +39,7 @@ async function _transformConfig (configManager) {
|
|
|
39
39
|
|
|
40
40
|
configManager.current.allowCycles = !!configManager.current.allowCycles
|
|
41
41
|
configManager.current.serviceMap = new Map()
|
|
42
|
-
configManager.current.inspectorOptions =
|
|
42
|
+
configManager.current.inspectorOptions = undefined
|
|
43
43
|
|
|
44
44
|
let hasValidEntrypoint = false
|
|
45
45
|
|
|
@@ -276,10 +276,10 @@ async function wrapConfigInRuntimeConfig ({ configManager, args }) {
|
|
|
276
276
|
coerceTypes: true,
|
|
277
277
|
allErrors: true,
|
|
278
278
|
strict: false
|
|
279
|
-
}
|
|
279
|
+
},
|
|
280
|
+
transformConfig () { return _transformConfig(this) }
|
|
280
281
|
})
|
|
281
282
|
|
|
282
|
-
await _transformConfig(cm)
|
|
283
283
|
await cm.parseAndValidate()
|
|
284
284
|
return cm
|
|
285
285
|
}
|
package/lib/schema.js
CHANGED
|
@@ -88,6 +88,23 @@ const platformaticRuntimeSchema = {
|
|
|
88
88
|
allowCycles: {
|
|
89
89
|
type: 'boolean'
|
|
90
90
|
},
|
|
91
|
+
inspectorOptions: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
properties: {
|
|
94
|
+
host: {
|
|
95
|
+
type: 'string'
|
|
96
|
+
},
|
|
97
|
+
port: {
|
|
98
|
+
type: 'number'
|
|
99
|
+
},
|
|
100
|
+
breakFirstLine: {
|
|
101
|
+
type: 'boolean'
|
|
102
|
+
},
|
|
103
|
+
hotReloadDisabled: {
|
|
104
|
+
type: 'boolean'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
91
108
|
$schema: {
|
|
92
109
|
type: 'string'
|
|
93
110
|
}
|
|
@@ -95,7 +112,8 @@ const platformaticRuntimeSchema = {
|
|
|
95
112
|
anyOf: [
|
|
96
113
|
{ required: ['autoload', 'entrypoint'] },
|
|
97
114
|
{ required: ['services', 'entrypoint'] }
|
|
98
|
-
]
|
|
115
|
+
],
|
|
116
|
+
additionalProperties: false
|
|
99
117
|
}
|
|
100
118
|
|
|
101
119
|
module.exports.schema = platformaticRuntimeSchema
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"standard": "^17.1.0",
|
|
28
28
|
"tsd": "^0.29.0",
|
|
29
29
|
"typescript": "^5.2.2",
|
|
30
|
-
"@platformatic/sql-graphql": "1.5.
|
|
31
|
-
"@platformatic/sql-mapper": "1.5.
|
|
30
|
+
"@platformatic/sql-graphql": "1.5.1",
|
|
31
|
+
"@platformatic/sql-mapper": "1.5.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@fastify/error": "^3.4.0",
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
"pino": "^8.16.0",
|
|
47
47
|
"pino-pretty": "^10.2.3",
|
|
48
48
|
"undici": "^5.26.3",
|
|
49
|
-
"@platformatic/composer": "1.5.
|
|
50
|
-
"@platformatic/config": "1.5.
|
|
51
|
-
"@platformatic/db": "1.5.
|
|
52
|
-
"@platformatic/service": "1.5.
|
|
53
|
-
"@platformatic/telemetry": "1.5.
|
|
54
|
-
"@platformatic/utils": "1.5.
|
|
49
|
+
"@platformatic/composer": "1.5.1",
|
|
50
|
+
"@platformatic/config": "1.5.1",
|
|
51
|
+
"@platformatic/db": "1.5.1",
|
|
52
|
+
"@platformatic/service": "1.5.1",
|
|
53
|
+
"@platformatic/telemetry": "1.5.1",
|
|
54
|
+
"@platformatic/utils": "1.5.1"
|
|
55
55
|
},
|
|
56
56
|
"standard": {
|
|
57
57
|
"ignore": [
|