@platformatic/runtime 3.0.6 → 3.1.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 -2
- package/lib/generator.js +1 -1
- package/lib/prom-server.js +9 -0
- package/package.json +16 -16
- package/schema.json +14 -3
package/config.d.ts
CHANGED
package/lib/generator.js
CHANGED
package/lib/prom-server.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import fastifyAccepts from '@fastify/accepts'
|
|
2
2
|
import fastifyBasicAuth from '@fastify/basic-auth'
|
|
3
|
+
import { loadModule } from '@platformatic/foundation'
|
|
3
4
|
import fastify from 'fastify'
|
|
5
|
+
import { createRequire } from 'node:module'
|
|
6
|
+
import { resolve } from 'node:path'
|
|
4
7
|
|
|
5
8
|
const DEFAULT_HOSTNAME = '0.0.0.0'
|
|
6
9
|
const DEFAULT_PORT = 9090
|
|
@@ -218,6 +221,12 @@ export async function startPrometheusServer (runtime, opts) {
|
|
|
218
221
|
})
|
|
219
222
|
}
|
|
220
223
|
|
|
224
|
+
const require = createRequire(resolve(import.meta.filename))
|
|
225
|
+
for (const pluginPath of opts.plugins ?? []) {
|
|
226
|
+
const plugin = await loadModule(require, pluginPath)
|
|
227
|
+
await promServer.register(plugin)
|
|
228
|
+
}
|
|
229
|
+
|
|
221
230
|
await promServer.listen({ port, host })
|
|
222
231
|
return promServer
|
|
223
232
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"typescript": "^5.5.4",
|
|
35
35
|
"undici-oidc-interceptor": "^0.5.0",
|
|
36
36
|
"why-is-node-running": "^2.2.2",
|
|
37
|
-
"@platformatic/
|
|
38
|
-
"@platformatic/
|
|
39
|
-
"@platformatic/
|
|
40
|
-
"@platformatic/
|
|
41
|
-
"@platformatic/
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/
|
|
44
|
-
"@platformatic/sql-mapper": "3.0
|
|
37
|
+
"@platformatic/composer": "3.1.0",
|
|
38
|
+
"@platformatic/db": "3.1.0",
|
|
39
|
+
"@platformatic/node": "3.1.0",
|
|
40
|
+
"@platformatic/gateway": "3.1.0",
|
|
41
|
+
"@platformatic/service": "3.1.0",
|
|
42
|
+
"@platformatic/wattpm-pprof-capture": "3.1.0",
|
|
43
|
+
"@platformatic/sql-graphql": "3.1.0",
|
|
44
|
+
"@platformatic/sql-mapper": "3.1.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -71,15 +71,15 @@
|
|
|
71
71
|
"undici": "^7.0.0",
|
|
72
72
|
"undici-thread-interceptor": "^0.14.0",
|
|
73
73
|
"ws": "^8.16.0",
|
|
74
|
-
"@platformatic/basic": "3.0
|
|
75
|
-
"@platformatic/
|
|
76
|
-
"@platformatic/
|
|
77
|
-
"@platformatic/
|
|
78
|
-
"@platformatic/metrics": "3.0
|
|
79
|
-
"@platformatic/telemetry": "3.0
|
|
74
|
+
"@platformatic/basic": "3.1.0",
|
|
75
|
+
"@platformatic/foundation": "3.1.0",
|
|
76
|
+
"@platformatic/generators": "3.1.0",
|
|
77
|
+
"@platformatic/itc": "3.1.0",
|
|
78
|
+
"@platformatic/metrics": "3.1.0",
|
|
79
|
+
"@platformatic/telemetry": "3.1.0"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
|
-
"node": ">=22.
|
|
82
|
+
"node": ">=22.19.0"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"test": "npm run test:main && npm run test:api && npm run test:cli && npm run test:start && npm run test:multiple-workers",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.0.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.1.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Runtime Config",
|
|
5
5
|
"type": "object",
|
|
@@ -1665,8 +1665,19 @@
|
|
|
1665
1665
|
}
|
|
1666
1666
|
]
|
|
1667
1667
|
},
|
|
1668
|
-
"
|
|
1669
|
-
|
|
1668
|
+
"plugins": {
|
|
1669
|
+
"type": "array",
|
|
1670
|
+
"items": {
|
|
1671
|
+
"anyOf": [
|
|
1672
|
+
{
|
|
1673
|
+
"type": "string",
|
|
1674
|
+
"resolvePath": true
|
|
1675
|
+
}
|
|
1676
|
+
]
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
},
|
|
1680
|
+
"additionalProperties": false
|
|
1670
1681
|
}
|
|
1671
1682
|
]
|
|
1672
1683
|
},
|