@platformatic/runtime 1.31.1 → 1.33.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/fixtures/management-api-without-metrics/package.json +4 -0
- package/fixtures/management-api-without-metrics/platformatic.json +14 -0
- package/fixtures/management-api-without-metrics/services/service-1/platformatic.json +8 -0
- package/fixtures/monorepo/serviceAppWithMultiplePlugins/platformatic.service.json +2 -1
- package/lib/api-client.js +2 -0
- package/lib/api.js +1 -1
- package/lib/app.js +4 -1
- package/package.json +11 -11
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://platformatic.dev/schemas/v1.22.0/runtime",
|
|
3
|
+
"entrypoint": "service-1",
|
|
4
|
+
"allowCycles": true,
|
|
5
|
+
"hotReload": false,
|
|
6
|
+
"autoload": {
|
|
7
|
+
"path": "./services"
|
|
8
|
+
},
|
|
9
|
+
"server": {
|
|
10
|
+
"hostname": "127.0.0.1",
|
|
11
|
+
"port": 0
|
|
12
|
+
},
|
|
13
|
+
"managementApi": true
|
|
14
|
+
}
|
package/lib/api-client.js
CHANGED
|
@@ -107,6 +107,8 @@ class RuntimeApiClient extends EventEmitter {
|
|
|
107
107
|
async getFormattedMetrics () {
|
|
108
108
|
const { metrics } = await this.getMetrics()
|
|
109
109
|
|
|
110
|
+
if (metrics === null) return null
|
|
111
|
+
|
|
110
112
|
const entrypointDetails = await this.getEntrypointDetails()
|
|
111
113
|
const entrypointConfig = await this.getServiceConfig(entrypointDetails.id)
|
|
112
114
|
const entrypointMetricsPrefix = entrypointConfig.metrics?.prefix
|
package/lib/api.js
CHANGED
package/lib/app.js
CHANGED
|
@@ -246,7 +246,10 @@ class PlatformaticApp {
|
|
|
246
246
|
})
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
if (
|
|
249
|
+
if (
|
|
250
|
+
(this.#hasManagementApi && configManager.current.metrics === undefined) ||
|
|
251
|
+
configManager.current.metrics
|
|
252
|
+
) {
|
|
250
253
|
configManager.update({
|
|
251
254
|
...configManager.current,
|
|
252
255
|
metrics: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"snazzy": "^9.0.0",
|
|
30
30
|
"split2": "^4.2.0",
|
|
31
31
|
"standard": "^17.1.0",
|
|
32
|
-
"tsd": "^0.
|
|
32
|
+
"tsd": "^0.31.0",
|
|
33
33
|
"typescript": "^5.4.2",
|
|
34
34
|
"undici-oidc-interceptor": "^0.5.0",
|
|
35
35
|
"why-is-node-running": "^2.2.2",
|
|
36
|
-
"@platformatic/sql-graphql": "1.
|
|
37
|
-
"@platformatic/sql-mapper": "1.
|
|
36
|
+
"@platformatic/sql-graphql": "1.33.0",
|
|
37
|
+
"@platformatic/sql-mapper": "1.33.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"ws": "^8.16.0",
|
|
@@ -62,13 +62,13 @@
|
|
|
62
62
|
"tail-file-stream": "^0.1.0",
|
|
63
63
|
"undici": "^6.9.0",
|
|
64
64
|
"why-is-node-running": "^2.2.2",
|
|
65
|
-
"@platformatic/composer": "1.
|
|
66
|
-
"@platformatic/config": "1.
|
|
67
|
-
"@platformatic/db": "1.
|
|
68
|
-
"@platformatic/
|
|
69
|
-
"@platformatic/service": "1.
|
|
70
|
-
"@platformatic/
|
|
71
|
-
"@platformatic/utils": "1.
|
|
65
|
+
"@platformatic/composer": "1.33.0",
|
|
66
|
+
"@platformatic/config": "1.33.0",
|
|
67
|
+
"@platformatic/db": "1.33.0",
|
|
68
|
+
"@platformatic/telemetry": "1.33.0",
|
|
69
|
+
"@platformatic/service": "1.33.0",
|
|
70
|
+
"@platformatic/generators": "1.33.0",
|
|
71
|
+
"@platformatic/utils": "1.33.0"
|
|
72
72
|
},
|
|
73
73
|
"standard": {
|
|
74
74
|
"ignore": [
|