@platformatic/watt-extra 0.1.3 → 0.1.4
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/watt.js +3 -3
- package/package.json +4 -4
package/lib/watt.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { readFile } from 'node:fs/promises'
|
|
2
2
|
import { join, resolve } from 'node:path'
|
|
3
3
|
import { createRequire } from 'node:module'
|
|
4
|
-
import { loadConfiguration } from '@platformatic/runtime'
|
|
5
4
|
|
|
6
5
|
const require = createRequire(import.meta.url)
|
|
7
6
|
|
|
@@ -125,6 +124,7 @@ class Watt {
|
|
|
125
124
|
async #loadAppConfig () {
|
|
126
125
|
this.#logger.info('Loading app config')
|
|
127
126
|
try {
|
|
127
|
+
const { loadConfiguration } = this.#require('@platformatic/runtime')
|
|
128
128
|
const config = await loadConfiguration(this.#appDir)
|
|
129
129
|
return config
|
|
130
130
|
} catch (err) {
|
|
@@ -198,7 +198,7 @@ class Watt {
|
|
|
198
198
|
port: this.#env.PLT_METRICS_PORT || 9090,
|
|
199
199
|
labels: {
|
|
200
200
|
serviceId: 'main',
|
|
201
|
-
applicationId: this.#instanceConfig
|
|
201
|
+
applicationId: this.#instanceConfig?.applicationId,
|
|
202
202
|
instanceId: this.#instanceId,
|
|
203
203
|
},
|
|
204
204
|
}
|
|
@@ -381,7 +381,7 @@ class Watt {
|
|
|
381
381
|
url:
|
|
382
382
|
this.#instanceConfig?.iccServices?.riskEngine?.url + '/v1/traces',
|
|
383
383
|
headers: {
|
|
384
|
-
'x-platformatic-application-id': this.#instanceConfig
|
|
384
|
+
'x-platformatic-application-id': this.#instanceConfig?.applicationId,
|
|
385
385
|
},
|
|
386
386
|
keepAlive: true,
|
|
387
387
|
httpAgentOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/watt-extra",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "The Platformatic runtime manager",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
"@fastify/error": "^4.2.0",
|
|
33
33
|
"@platformatic/runtime": "^3.0.1",
|
|
34
34
|
"@platformatic/wattpm-pprof-capture": "^3.0.1",
|
|
35
|
-
"undici-cache-redis": "^1.0.0",
|
|
36
|
-
"undici-slicer-interceptor": "^0.4.1",
|
|
37
|
-
"undici-traffic-interceptor": "^0.1.4",
|
|
38
35
|
"avvio": "^9.1.0",
|
|
39
36
|
"chalk": "^4.1.2",
|
|
40
37
|
"commist": "^3.2.0",
|
|
@@ -45,6 +42,9 @@
|
|
|
45
42
|
"pino": "^9.7.0",
|
|
46
43
|
"pino-pretty": "^13.0.0",
|
|
47
44
|
"undici": "^7.11.0",
|
|
45
|
+
"undici-cache-redis": "^1.0.0",
|
|
46
|
+
"undici-slicer-interceptor": "^0.4.1",
|
|
47
|
+
"undici-traffic-interceptor": "^0.1.4",
|
|
48
48
|
"ws": "^8.18.3"
|
|
49
49
|
}
|
|
50
50
|
}
|