@platformatic/runtime 1.28.0 → 1.28.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/api.js +1 -1
- package/lib/app.js +13 -9
- package/package.json +10 -10
package/lib/api.js
CHANGED
|
@@ -33,7 +33,7 @@ class RuntimeApi {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
const app = new PlatformaticApp(service, loaderPort, logger, serviceTelemetryConfig, serverConfig)
|
|
36
|
+
const app = new PlatformaticApp(service, loaderPort, logger, serviceTelemetryConfig, serverConfig, !!config.managementApi)
|
|
37
37
|
|
|
38
38
|
this.#services.set(service.id, app)
|
|
39
39
|
}
|
package/lib/app.js
CHANGED
|
@@ -20,8 +20,9 @@ class PlatformaticApp {
|
|
|
20
20
|
#telemetryConfig
|
|
21
21
|
#serverConfig
|
|
22
22
|
#debouncedRestart
|
|
23
|
+
#hasManagementApi
|
|
23
24
|
|
|
24
|
-
constructor (appConfig, loaderPort, logger, telemetryConfig, serverConfig) {
|
|
25
|
+
constructor (appConfig, loaderPort, logger, telemetryConfig, serverConfig, hasManagementApi) {
|
|
25
26
|
this.appConfig = appConfig
|
|
26
27
|
this.config = null
|
|
27
28
|
this.#hotReload = false
|
|
@@ -31,6 +32,7 @@ class PlatformaticApp {
|
|
|
31
32
|
this.#started = false
|
|
32
33
|
this.#originalWatch = null
|
|
33
34
|
this.#fileWatcher = null
|
|
35
|
+
this.#hasManagementApi = !!hasManagementApi
|
|
34
36
|
this.#logger = logger.child({
|
|
35
37
|
name: this.appConfig.id
|
|
36
38
|
})
|
|
@@ -107,14 +109,16 @@ class PlatformaticApp {
|
|
|
107
109
|
})
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
if (this.#hasManagementApi) {
|
|
113
|
+
configManager.update({
|
|
114
|
+
...configManager.current,
|
|
115
|
+
metrics: {
|
|
116
|
+
...configManager.current.metrics,
|
|
117
|
+
defaultMetrics: { enabled: this.appConfig.entrypoint },
|
|
118
|
+
prefix: snakeCase(this.appConfig.id) + '_'
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
}
|
|
118
122
|
|
|
119
123
|
if (!this.appConfig.entrypoint) {
|
|
120
124
|
configManager.update({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"undici-oidc-interceptor": "^0.5.0",
|
|
35
35
|
"why-is-node-running": "^2.2.2",
|
|
36
36
|
"ws": "^8.16.0",
|
|
37
|
-
"@platformatic/sql-graphql": "1.28.
|
|
38
|
-
"@platformatic/sql-mapper": "1.28.
|
|
37
|
+
"@platformatic/sql-graphql": "1.28.1",
|
|
38
|
+
"@platformatic/sql-mapper": "1.28.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@fastify/error": "^3.4.1",
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"tail-file-stream": "^0.1.0",
|
|
62
62
|
"undici": "^6.9.0",
|
|
63
63
|
"why-is-node-running": "^2.2.2",
|
|
64
|
-
"@platformatic/
|
|
65
|
-
"@platformatic/config": "1.28.
|
|
66
|
-
"@platformatic/generators": "1.28.
|
|
67
|
-
"@platformatic/
|
|
68
|
-
"@platformatic/
|
|
69
|
-
"@platformatic/
|
|
70
|
-
"@platformatic/
|
|
64
|
+
"@platformatic/composer": "1.28.1",
|
|
65
|
+
"@platformatic/config": "1.28.1",
|
|
66
|
+
"@platformatic/generators": "1.28.1",
|
|
67
|
+
"@platformatic/db": "1.28.1",
|
|
68
|
+
"@platformatic/service": "1.28.1",
|
|
69
|
+
"@platformatic/telemetry": "1.28.1",
|
|
70
|
+
"@platformatic/utils": "1.28.1"
|
|
71
71
|
},
|
|
72
72
|
"standard": {
|
|
73
73
|
"ignore": [
|