@platformatic/service 2.0.0-alpha.8 → 2.0.0
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 +10 -1
- package/index.js +19 -13
- package/lib/plugins/metrics.js +1 -1
- package/lib/plugins/openapi.js +1 -0
- package/lib/plugins/plugins.js +5 -5
- package/lib/root-endpoint/public/images/platformatic-logo-dark.svg +30 -8
- package/lib/root-endpoint/public/images/platformatic-logo-light.svg +30 -8
- package/lib/root-endpoint/public/index.html +10 -6
- package/lib/schema.js +1 -1
- package/lib/stackable.js +26 -9
- package/lib/start.js +13 -0
- package/lib/upgrade.js +0 -3
- package/lib/utils.js +12 -10
- package/lib/versions/2.0.0.js +11 -0
- package/package.json +26 -27
- package/schema.json +27 -3
package/config.d.ts
CHANGED
|
@@ -31,7 +31,13 @@ export interface PlatformaticService {
|
|
|
31
31
|
logger?:
|
|
32
32
|
| boolean
|
|
33
33
|
| {
|
|
34
|
-
level
|
|
34
|
+
level: (
|
|
35
|
+
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
36
|
+
| {
|
|
37
|
+
[k: string]: unknown;
|
|
38
|
+
}
|
|
39
|
+
) &
|
|
40
|
+
string;
|
|
35
41
|
transport?:
|
|
36
42
|
| {
|
|
37
43
|
target?: string;
|
|
@@ -61,6 +67,9 @@ export interface PlatformaticService {
|
|
|
61
67
|
};
|
|
62
68
|
[k: string]: unknown;
|
|
63
69
|
};
|
|
70
|
+
loggerInstance?: {
|
|
71
|
+
[k: string]: unknown;
|
|
72
|
+
};
|
|
64
73
|
serializerOpts?: {
|
|
65
74
|
schema?: {
|
|
66
75
|
[k: string]: unknown;
|
package/index.js
CHANGED
|
@@ -104,7 +104,7 @@ module.exports.configManagerConfig = {
|
|
|
104
104
|
useDefaults: true,
|
|
105
105
|
coerceTypes: true,
|
|
106
106
|
allErrors: true,
|
|
107
|
-
strict: false
|
|
107
|
+
strict: false
|
|
108
108
|
},
|
|
109
109
|
async transformConfig () {
|
|
110
110
|
// Set watch to true by default. This is not possible
|
|
@@ -134,7 +134,7 @@ module.exports.configManagerConfig = {
|
|
|
134
134
|
this.current.watch.ignore.push(outDir + '/**/*')
|
|
135
135
|
}
|
|
136
136
|
},
|
|
137
|
-
upgrade
|
|
137
|
+
upgrade
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
platformaticService.configType = 'service'
|
|
@@ -145,33 +145,39 @@ function _buildServer (options, app) {
|
|
|
145
145
|
return buildServer(options, app || module.exports)
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
async function buildStackable (
|
|
149
|
-
options,
|
|
150
|
-
app = platformaticService,
|
|
151
|
-
Stackable = ServiceStackable
|
|
152
|
-
) {
|
|
148
|
+
async function buildStackable (options, app = platformaticService, Stackable = ServiceStackable) {
|
|
153
149
|
let configManager = options.configManager
|
|
154
150
|
|
|
155
151
|
if (configManager === undefined) {
|
|
156
152
|
if (typeof options.config === 'string') {
|
|
157
|
-
({ configManager } = await loadConfig(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
153
|
+
;({ configManager } = await loadConfig(
|
|
154
|
+
{},
|
|
155
|
+
['-c', options.config],
|
|
156
|
+
app,
|
|
157
|
+
{
|
|
158
|
+
onMissingEnv: options.onMissingEnv,
|
|
159
|
+
context: options.context
|
|
160
|
+
},
|
|
161
|
+
true
|
|
162
|
+
))
|
|
161
163
|
} else {
|
|
162
164
|
configManager = new ConfigManager({
|
|
163
165
|
...app.configManagerConfig,
|
|
164
166
|
source: options.config,
|
|
167
|
+
dirname: options.context?.directory
|
|
165
168
|
})
|
|
166
169
|
await configManager.parseAndValidate()
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
const stackable = new Stackable({
|
|
171
|
-
init: () => buildServer(
|
|
174
|
+
init: () => buildServer({
|
|
175
|
+
configManager,
|
|
176
|
+
...configManager.current,
|
|
177
|
+
}, app, options.context),
|
|
172
178
|
stackable: app,
|
|
173
179
|
configManager,
|
|
174
|
-
context: options.context
|
|
180
|
+
context: options.context
|
|
175
181
|
})
|
|
176
182
|
|
|
177
183
|
return stackable
|
package/lib/plugins/metrics.js
CHANGED
|
@@ -170,7 +170,7 @@ async function createMetricsServer (app, hostname, port) {
|
|
|
170
170
|
httpServer.on('request', handler)
|
|
171
171
|
return httpServer
|
|
172
172
|
},
|
|
173
|
-
|
|
173
|
+
loggerInstance: app.log.child({ name: 'prometheus' }),
|
|
174
174
|
})
|
|
175
175
|
|
|
176
176
|
app.addHook('onClose', async () => {
|
package/lib/plugins/openapi.js
CHANGED
package/lib/plugins/plugins.js
CHANGED
|
@@ -32,12 +32,12 @@ async function loadPlugins (app, opts) {
|
|
|
32
32
|
|
|
33
33
|
if (outDir) {
|
|
34
34
|
isOutDirAccessible = await isFileAccessible(outDir)
|
|
35
|
-
}
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
if (opts.context?.isProduction && !isOutDirAccessible) {
|
|
37
|
+
throw new Error(
|
|
38
|
+
`Cannot access directory '${outDir}'. Please run the 'build' command before running in production mode.`
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
if (config.plugins.paths && isOutDirAccessible) {
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 568.18 568.18">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
stroke: #00fe84;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cls-1, .cls-2 {
|
|
10
|
+
fill: none;
|
|
11
|
+
stroke-linecap: round;
|
|
12
|
+
stroke-linejoin: round;
|
|
13
|
+
stroke-width: 16.34px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cls-2 {
|
|
17
|
+
stroke: #fff;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
</defs>
|
|
21
|
+
<g>
|
|
22
|
+
<line class="cls-1" x1="148.26" y1="317.46" x2="148.26" y2="389.92"/>
|
|
23
|
+
<polyline class="cls-1" points="176.75 303.19 234.68 336.63 321.11 286.74 321.11 186.94 234.68 137.04 148.26 186.94 148.26 273.55"/>
|
|
24
|
+
<polyline class="cls-1" points="176.75 334.87 176.75 303.19 205.15 285.91"/>
|
|
25
|
+
</g>
|
|
26
|
+
<polyline class="cls-2" points="466.14 259.75 501.19 280.47 501.19 301.18 466.14 321.89"/>
|
|
27
|
+
<polyline class="cls-2" points="106.23 210.58 66.98 233.24 66.98 334.38 105.4 356.56"/>
|
|
28
|
+
<polyline class="cls-2" points="176.75 376.88 176.75 399.34 234.33 431.14 278.53 405.35 278.17 358.41"/>
|
|
29
|
+
<polyline class="cls-2" points="321.66 332.06 321.66 356.76 363.05 380.98 423.55 344.88 423.55 246.39 364.01 212.25"/>
|
|
30
|
+
</svg>
|
|
@@ -1,8 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 568.18 568.18">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
stroke: #00050b;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cls-1, .cls-2 {
|
|
10
|
+
fill: none;
|
|
11
|
+
stroke-linecap: round;
|
|
12
|
+
stroke-linejoin: round;
|
|
13
|
+
stroke-width: 16.73px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.cls-2 {
|
|
17
|
+
stroke: #00fe84;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
</defs>
|
|
21
|
+
<g>
|
|
22
|
+
<line class="cls-2" x1="144.97" y1="318.27" x2="144.97" y2="392.48"/>
|
|
23
|
+
<polyline class="cls-2" points="174.15 303.65 233.49 337.91 322.01 286.8 322.01 184.58 233.49 133.48 144.97 184.58 144.97 273.29"/>
|
|
24
|
+
<polyline class="cls-2" points="174.15 336.1 174.15 303.66 203.24 285.96"/>
|
|
25
|
+
</g>
|
|
26
|
+
<polyline class="cls-1" points="470.56 259.16 506.46 280.38 506.46 301.59 470.56 322.81"/>
|
|
27
|
+
<polyline class="cls-1" points="101.92 208.8 61.72 232.01 61.72 335.6 101.07 358.32"/>
|
|
28
|
+
<polyline class="cls-1" points="174.15 379.13 174.15 402.14 233.12 434.7 278.4 408.29 278.03 360.22"/>
|
|
29
|
+
<polyline class="cls-1" points="322.57 333.23 322.57 358.53 364.96 383.33 426.93 346.35 426.93 245.48 365.94 210.51"/>
|
|
30
|
+
</svg>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="./images/favicon.ico" />
|
|
6
6
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800&display=swap" rel="stylesheet">
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
8
|
<title>Platformatic Service</title>
|
|
@@ -204,7 +204,11 @@
|
|
|
204
204
|
</div>
|
|
205
205
|
|
|
206
206
|
<script>
|
|
207
|
-
|
|
207
|
+
let currentPath = window.location.pathname
|
|
208
|
+
|
|
209
|
+
if (!currentPath.endsWith('/')) {
|
|
210
|
+
currentPath += '/'
|
|
211
|
+
}
|
|
208
212
|
|
|
209
213
|
const openApiLink = document.getElementById('openapi-link')
|
|
210
214
|
openApiLink.href = currentPath + 'documentation'
|
|
@@ -215,18 +219,18 @@
|
|
|
215
219
|
const prefersLightScheme = window.matchMedia('(prefers-color-scheme: light)');
|
|
216
220
|
if (prefersLightScheme.matches) {
|
|
217
221
|
document.body.classList.add('light-theme');
|
|
218
|
-
document.getElementById('logo').src = 'images/platformatic-logo-light.svg'
|
|
222
|
+
document.getElementById('logo').src = currentPath + 'images/platformatic-logo-light.svg'
|
|
219
223
|
} else {
|
|
220
224
|
document.body.classList.remove('light-theme');
|
|
221
|
-
document.getElementById('logo').src = 'images/platformatic-logo-dark.svg'
|
|
225
|
+
document.getElementById('logo').src = currentPath + 'images/platformatic-logo-dark.svg'
|
|
222
226
|
}
|
|
223
227
|
|
|
224
228
|
const toggleLightMode = function() {
|
|
225
229
|
document.body.classList.toggle('light-theme');
|
|
226
230
|
if (document.body.classList.contains('light-theme')) {
|
|
227
|
-
document.getElementById('logo').src = 'images/platformatic-logo-light.svg'
|
|
231
|
+
document.getElementById('logo').src = currentPath + 'images/platformatic-logo-light.svg'
|
|
228
232
|
} else {
|
|
229
|
-
document.getElementById('logo').src = 'images/platformatic-logo-dark.svg'
|
|
233
|
+
document.getElementById('logo').src = currentPath + 'images/platformatic-logo-dark.svg'
|
|
230
234
|
}
|
|
231
235
|
}
|
|
232
236
|
</script>
|
package/lib/schema.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
const pkg = require('../package.json')
|
|
6
6
|
const openApiDefs = require('./openapi-schema-defs')
|
|
7
7
|
const telemetry = require('@platformatic/telemetry').schema
|
|
8
|
-
const { server, cors, watch } = require('@platformatic/utils').schemaComponents
|
|
8
|
+
const { fastifyServer: server, cors, watch } = require('@platformatic/utils').schemaComponents
|
|
9
9
|
|
|
10
10
|
const plugins = {
|
|
11
11
|
type: 'object',
|
package/lib/stackable.js
CHANGED
|
@@ -6,6 +6,7 @@ const pino = require('pino')
|
|
|
6
6
|
const httpMetrics = require('@platformatic/fastify-http-metrics')
|
|
7
7
|
const { extractTypeScriptCompileOptionsFromConfig } = require('./compile')
|
|
8
8
|
const { compile } = require('@platformatic/ts-compiler')
|
|
9
|
+
const { deepmerge } = require('@platformatic/utils')
|
|
9
10
|
|
|
10
11
|
class ServiceStackable {
|
|
11
12
|
constructor (options) {
|
|
@@ -64,9 +65,9 @@ class ServiceStackable {
|
|
|
64
65
|
const compileOptions = {
|
|
65
66
|
...typeScriptCompileOptions,
|
|
66
67
|
cwd,
|
|
67
|
-
logger: this.
|
|
68
|
+
logger: this.logger
|
|
68
69
|
}
|
|
69
|
-
if (!await compile(compileOptions)) {
|
|
70
|
+
if (!(await compile(compileOptions))) {
|
|
70
71
|
throw new Error(`Failed to compile ${cwd}`)
|
|
71
72
|
}
|
|
72
73
|
}
|
|
@@ -82,8 +83,9 @@ class ServiceStackable {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
async getConfig () {
|
|
85
|
-
const config = this.configManager.current
|
|
86
|
-
|
|
86
|
+
const config = Object.assign({}, this.configManager.current)
|
|
87
|
+
config.server = Object.assign({}, config.server)
|
|
88
|
+
const logger = config.server.loggerInstance
|
|
87
89
|
|
|
88
90
|
if (logger) {
|
|
89
91
|
config.server.logger = {}
|
|
@@ -93,9 +95,15 @@ class ServiceStackable {
|
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
delete config.server.loggerInstance
|
|
99
|
+
|
|
96
100
|
return config
|
|
97
101
|
}
|
|
98
102
|
|
|
103
|
+
async getEnv () {
|
|
104
|
+
return this.configManager.env
|
|
105
|
+
}
|
|
106
|
+
|
|
99
107
|
async getWatchConfig () {
|
|
100
108
|
const config = this.configManager.current
|
|
101
109
|
|
|
@@ -207,7 +215,7 @@ class ServiceStackable {
|
|
|
207
215
|
config.metrics = metricsConfig
|
|
208
216
|
}
|
|
209
217
|
if (serverConfig) {
|
|
210
|
-
config.server = serverConfig
|
|
218
|
+
config.server = deepmerge(config.server ?? {}, serverConfig ?? {})
|
|
211
219
|
}
|
|
212
220
|
|
|
213
221
|
if ((hasManagementApi && config.metrics === undefined) || config.metrics) {
|
|
@@ -236,18 +244,27 @@ class ServiceStackable {
|
|
|
236
244
|
}
|
|
237
245
|
|
|
238
246
|
#initLogger () {
|
|
239
|
-
|
|
240
|
-
|
|
247
|
+
if (this.configManager.current.server?.loggerInstance) {
|
|
248
|
+
this.logger = this.configManager.current.server?.loggerInstance
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
this.configManager.current.server ??= {}
|
|
253
|
+
this.loggerConfig = deepmerge(this.context.loggerConfig ?? {}, this.configManager.current.server?.logger ?? {})
|
|
241
254
|
|
|
242
255
|
const pinoOptions = {
|
|
243
|
-
level: level ?? 'trace'
|
|
256
|
+
level: this.loggerConfig?.level ?? 'trace'
|
|
244
257
|
}
|
|
245
258
|
|
|
246
259
|
if (this.context?.serviceId) {
|
|
247
260
|
pinoOptions.name = this.context.serviceId
|
|
248
261
|
}
|
|
249
262
|
|
|
250
|
-
this.
|
|
263
|
+
this.logger = pino(pinoOptions)
|
|
264
|
+
|
|
265
|
+
// Only one of logger and loggerInstance should be set
|
|
266
|
+
delete this.configManager.current.server.logger
|
|
267
|
+
this.configManager.current.server.loggerInstance = this.logger
|
|
251
268
|
}
|
|
252
269
|
}
|
|
253
270
|
|
package/lib/start.js
CHANGED
|
@@ -56,12 +56,25 @@ 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
|
+
}
|
|
65
|
+
|
|
59
66
|
let configManager = options.configManager
|
|
60
67
|
if (!configManager) {
|
|
61
68
|
// instantiate a new config manager from current options
|
|
62
69
|
configManager = new ConfigManager({ ...app.configManagerConfig, source: options })
|
|
63
70
|
await configManager.parseAndValidate()
|
|
64
71
|
}
|
|
72
|
+
|
|
73
|
+
if (loggerInstance) {
|
|
74
|
+
configManager.current.server ||= {}
|
|
75
|
+
delete configManager.current.server.logger
|
|
76
|
+
configManager.current.server.loggerInstance = loggerInstance
|
|
77
|
+
}
|
|
65
78
|
return configManager
|
|
66
79
|
}
|
|
67
80
|
|
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
|
}
|
package/lib/utils.js
CHANGED
|
@@ -21,17 +21,19 @@ function addLoggerToTheConfig (config) {
|
|
|
21
21
|
config.server = {}
|
|
22
22
|
}
|
|
23
23
|
// Set the logger if not present
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
if (!config.server.loggerInstance) {
|
|
25
|
+
let logger = config.server.logger
|
|
26
|
+
if (!logger) {
|
|
27
|
+
config.server.logger = { level: 'info' }
|
|
28
|
+
logger = config.server.logger
|
|
29
|
+
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
// If TTY use pino-pretty
|
|
32
|
+
if (isatty(1)) {
|
|
33
|
+
if (!logger.transport) {
|
|
34
|
+
logger.transport = {
|
|
35
|
+
target: 'pino-pretty',
|
|
36
|
+
}
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/service",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@fastify/aws-lambda": "^
|
|
21
|
-
"@fastify/compress": "^
|
|
20
|
+
"@fastify/aws-lambda": "^5.0.0",
|
|
21
|
+
"@fastify/compress": "^8.0.0",
|
|
22
22
|
"bindings": "^1.5.0",
|
|
23
23
|
"borp": "^0.17.0",
|
|
24
24
|
"eslint": "9",
|
|
25
25
|
"json-schema-to-typescript": "^15.0.0",
|
|
26
26
|
"neostandard": "^0.11.1",
|
|
27
27
|
"openapi-types": "^12.1.3",
|
|
28
|
-
"pino-abstract-transport": "^
|
|
28
|
+
"pino-abstract-transport": "^2.0.0",
|
|
29
29
|
"self-cert": "^2.0.0",
|
|
30
30
|
"split2": "^4.2.0",
|
|
31
31
|
"strip-ansi": "^7.1.0",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"yaml": "^2.4.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@fastify/accepts": "^
|
|
41
|
-
"@fastify/autoload": "^
|
|
42
|
-
"@fastify/basic-auth": "^
|
|
43
|
-
"@fastify/cors": "^
|
|
44
|
-
"@fastify/deepmerge": "^
|
|
45
|
-
"@fastify/error": "^
|
|
46
|
-
"@fastify/static": "^
|
|
47
|
-
"@fastify/swagger": "^
|
|
48
|
-
"@fastify/under-pressure": "^
|
|
49
|
-
"@mercuriusjs/federation": "^
|
|
40
|
+
"@fastify/accepts": "^5.0.0",
|
|
41
|
+
"@fastify/autoload": "^6.0.0",
|
|
42
|
+
"@fastify/basic-auth": "^6.0.0",
|
|
43
|
+
"@fastify/cors": "^10.0.0",
|
|
44
|
+
"@fastify/deepmerge": "^2.0.0",
|
|
45
|
+
"@fastify/error": "^4.0.0",
|
|
46
|
+
"@fastify/static": "^8.0.0",
|
|
47
|
+
"@fastify/swagger": "^9.0.0",
|
|
48
|
+
"@fastify/under-pressure": "^9.0.0",
|
|
49
|
+
"@mercuriusjs/federation": "^4.0.0",
|
|
50
50
|
"@platformatic/fastify-http-metrics": "^0.1.0",
|
|
51
51
|
"@scalar/fastify-api-reference": "^1.19.5",
|
|
52
52
|
"@types/ws": "^8.5.10",
|
|
@@ -61,29 +61,28 @@
|
|
|
61
61
|
"env-schema": "^5.2.1",
|
|
62
62
|
"es-main": "^1.3.0",
|
|
63
63
|
"execa": "^8.0.1",
|
|
64
|
-
"fastify": "^
|
|
65
|
-
"fastify-metrics": "^
|
|
66
|
-
"fastify-
|
|
67
|
-
"fastify-plugin": "^4.5.1",
|
|
64
|
+
"fastify": "^5.0.0",
|
|
65
|
+
"fastify-metrics": "^12.0.0",
|
|
66
|
+
"fastify-plugin": "^5.0.0",
|
|
68
67
|
"graphql": "^16.9.0",
|
|
69
68
|
"help-me": "^5.0.0",
|
|
70
|
-
"mercurius": "^
|
|
69
|
+
"mercurius": "^15.0.0",
|
|
71
70
|
"minimist": "^1.2.8",
|
|
72
71
|
"my-ua-parser": "^2.0.2",
|
|
73
72
|
"ora": "^6.3.1",
|
|
74
|
-
"pino": "^
|
|
73
|
+
"pino": "^9.0.0",
|
|
75
74
|
"pino-pretty": "^11.0.0",
|
|
76
75
|
"prom-client": "^15.1.2",
|
|
77
76
|
"rfdc": "^1.3.1",
|
|
78
77
|
"semgrator": "^0.3.0",
|
|
79
78
|
"undici": "^6.9.0",
|
|
80
|
-
"@platformatic/
|
|
81
|
-
"@platformatic/
|
|
82
|
-
"@platformatic/
|
|
83
|
-
"@platformatic/
|
|
84
|
-
"@platformatic/
|
|
85
|
-
"@platformatic/
|
|
86
|
-
"@platformatic/utils": "2.0.0
|
|
79
|
+
"@platformatic/config": "2.0.0",
|
|
80
|
+
"@platformatic/scalar-theme": "2.0.0",
|
|
81
|
+
"@platformatic/ts-compiler": "2.0.0",
|
|
82
|
+
"@platformatic/telemetry": "2.0.0",
|
|
83
|
+
"@platformatic/generators": "2.0.0",
|
|
84
|
+
"@platformatic/client": "2.0.0",
|
|
85
|
+
"@platformatic/utils": "2.0.0"
|
|
87
86
|
},
|
|
88
87
|
"scripts": {
|
|
89
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
|
|
3
|
-
"version": "2.0.0
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/service/2.0.0.json",
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"title": "Platformatic Service",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"properties": {
|
|
@@ -93,7 +93,24 @@
|
|
|
93
93
|
"type": "object",
|
|
94
94
|
"properties": {
|
|
95
95
|
"level": {
|
|
96
|
-
"type": "string"
|
|
96
|
+
"type": "string",
|
|
97
|
+
"default": "info",
|
|
98
|
+
"oneOf": [
|
|
99
|
+
{
|
|
100
|
+
"enum": [
|
|
101
|
+
"fatal",
|
|
102
|
+
"error",
|
|
103
|
+
"warn",
|
|
104
|
+
"info",
|
|
105
|
+
"debug",
|
|
106
|
+
"trace",
|
|
107
|
+
"silent"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"pattern": "^\\{.+\\}$"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
97
114
|
},
|
|
98
115
|
"transport": {
|
|
99
116
|
"anyOf": [
|
|
@@ -154,10 +171,17 @@
|
|
|
154
171
|
"additionalProperties": false
|
|
155
172
|
}
|
|
156
173
|
},
|
|
174
|
+
"required": [
|
|
175
|
+
"level"
|
|
176
|
+
],
|
|
177
|
+
"default": {},
|
|
157
178
|
"additionalProperties": true
|
|
158
179
|
}
|
|
159
180
|
]
|
|
160
181
|
},
|
|
182
|
+
"loggerInstance": {
|
|
183
|
+
"type": "object"
|
|
184
|
+
},
|
|
161
185
|
"serializerOpts": {
|
|
162
186
|
"type": "object",
|
|
163
187
|
"properties": {
|