@platformatic/runtime 2.71.1-alpha.0 → 2.73.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 +1 -1
- package/lib/generator/runtime-generator.js +2 -2
- package/lib/prom-server.js +7 -3
- package/package.json +15 -15
- package/schema.json +1 -1
package/config.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type HttpsSchemasPlatformaticDevPlatformaticRuntime2730Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
|
@@ -218,7 +218,7 @@ class RuntimeGenerator extends BaseGenerator {
|
|
|
218
218
|
this.addFile({
|
|
219
219
|
path: '',
|
|
220
220
|
file: '.env.sample',
|
|
221
|
-
contents: envObjectToString(this.config.
|
|
221
|
+
contents: envObjectToString(this.config.defaultEnv)
|
|
222
222
|
})
|
|
223
223
|
|
|
224
224
|
if (!this.existingConfig) {
|
|
@@ -586,7 +586,7 @@ class WrappedGenerator extends BaseGenerator {
|
|
|
586
586
|
this.addFile({
|
|
587
587
|
path: '',
|
|
588
588
|
file: '.env.sample',
|
|
589
|
-
contents: (await this.#readExistingFile('.env.sample', '', '\n')) + envObjectToString(this.config.
|
|
589
|
+
contents: (await this.#readExistingFile('.env.sample', '', '\n')) + envObjectToString(this.config.defaultEnv)
|
|
590
590
|
})
|
|
591
591
|
}
|
|
592
592
|
|
package/lib/prom-server.js
CHANGED
|
@@ -77,6 +77,7 @@ async function startPrometheusServer (runtime, opts) {
|
|
|
77
77
|
const auth = opts.auth ?? null
|
|
78
78
|
|
|
79
79
|
const promServer = fastify({ name: 'Prometheus server' })
|
|
80
|
+
promServer.register(require('@fastify/accepts'))
|
|
80
81
|
|
|
81
82
|
let onRequestHook
|
|
82
83
|
if (auth) {
|
|
@@ -122,9 +123,12 @@ async function startPrometheusServer (runtime, opts) {
|
|
|
122
123
|
logLevel: 'warn',
|
|
123
124
|
onRequest: onRequestHook,
|
|
124
125
|
handler: async (req, reply) => {
|
|
125
|
-
|
|
126
|
-
const
|
|
127
|
-
|
|
126
|
+
const accepts = req.accepts()
|
|
127
|
+
const reqType = !accepts.type('text/plain') && accepts.type('application/json') ? 'json' : 'text'
|
|
128
|
+
if (reqType === 'text') {
|
|
129
|
+
reply.type('text/plain')
|
|
130
|
+
}
|
|
131
|
+
return (await runtime.getMetrics(reqType)).metrics
|
|
128
132
|
},
|
|
129
133
|
})
|
|
130
134
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.73.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"typescript": "^5.5.4",
|
|
38
38
|
"undici-oidc-interceptor": "^0.5.0",
|
|
39
39
|
"why-is-node-running": "^2.2.2",
|
|
40
|
-
"@platformatic/
|
|
41
|
-
"@platformatic/
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/
|
|
44
|
-
"@platformatic/
|
|
45
|
-
"@platformatic/
|
|
40
|
+
"@platformatic/composer": "2.73.0",
|
|
41
|
+
"@platformatic/db": "2.73.0",
|
|
42
|
+
"@platformatic/node": "2.73.0",
|
|
43
|
+
"@platformatic/service": "2.73.0",
|
|
44
|
+
"@platformatic/sql-graphql": "2.73.0",
|
|
45
|
+
"@platformatic/sql-mapper": "2.73.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -76,14 +76,14 @@
|
|
|
76
76
|
"undici": "^7.0.0",
|
|
77
77
|
"undici-thread-interceptor": "^0.14.0",
|
|
78
78
|
"ws": "^8.16.0",
|
|
79
|
-
"@platformatic/basic": "2.
|
|
80
|
-
"@platformatic/config": "2.
|
|
81
|
-
"@platformatic/generators": "2.
|
|
82
|
-
"@platformatic/metrics": "2.
|
|
83
|
-
"@platformatic/itc": "2.
|
|
84
|
-
"@platformatic/
|
|
85
|
-
"@platformatic/
|
|
86
|
-
"@platformatic/
|
|
79
|
+
"@platformatic/basic": "2.73.0",
|
|
80
|
+
"@platformatic/config": "2.73.0",
|
|
81
|
+
"@platformatic/generators": "2.73.0",
|
|
82
|
+
"@platformatic/metrics": "2.73.0",
|
|
83
|
+
"@platformatic/itc": "2.73.0",
|
|
84
|
+
"@platformatic/ts-compiler": "2.73.0",
|
|
85
|
+
"@platformatic/telemetry": "2.73.0",
|
|
86
|
+
"@platformatic/utils": "2.73.0"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"test": "pnpm run lint && borp --concurrency=1 --timeout=1200000 && tsd",
|
package/schema.json
CHANGED