@platformatic/foundation 3.55.0 → 3.57.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/lib/node.js +29 -3
- package/lib/schema.js +11 -0
- package/package.json +4 -4
package/lib/node.js
CHANGED
|
@@ -26,14 +26,18 @@ export function checkNodeVersionForApplications () {
|
|
|
26
26
|
which undici version Node bundles. This can be dropped once undici aligns the
|
|
27
27
|
symbols across versions: https://github.com/nodejs/undici/pull/5319
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
const kMirroredGlobalDispatcher = Symbol.for('platformatic.undici.mirroredGlobalDispatcher')
|
|
30
|
+
const kMirroredLegacyGlobalDispatcher = Symbol.for('platformatic.undici.mirroredLegacyGlobalDispatcher')
|
|
31
|
+
|
|
32
|
+
export function mirrorGlobalDispatcherForBuiltinFetch (dispatcher, legacyDispatcher = dispatcher) {
|
|
30
33
|
for (const version of [1, 2]) {
|
|
31
34
|
const symbol = Symbol.for(`undici.globalDispatcher.${version}`)
|
|
32
35
|
const descriptor = Object.getOwnPropertyDescriptor(globalThis, symbol)
|
|
36
|
+
const value = version === 1 ? legacyDispatcher : dispatcher
|
|
33
37
|
|
|
34
38
|
if (!descriptor) {
|
|
35
39
|
Object.defineProperty(globalThis, symbol, {
|
|
36
|
-
value
|
|
40
|
+
value,
|
|
37
41
|
writable: true,
|
|
38
42
|
enumerable: false,
|
|
39
43
|
configurable: false
|
|
@@ -41,9 +45,31 @@ export function mirrorGlobalDispatcherForBuiltinFetch (dispatcher) {
|
|
|
41
45
|
} else if (descriptor.writable) {
|
|
42
46
|
// The symbol is created as non-configurable but writable, so a plain
|
|
43
47
|
// assignment is the only legal way to update an already-defined slot.
|
|
44
|
-
globalThis[symbol] =
|
|
48
|
+
globalThis[symbol] = value
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
globalThis[kMirroredGlobalDispatcher] = dispatcher
|
|
53
|
+
globalThis[kMirroredLegacyGlobalDispatcher] = legacyDispatcher
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function getGlobalDispatcherFromKnownUndiciSymbols () {
|
|
57
|
+
const mirroredDispatcher = globalThis[kMirroredGlobalDispatcher]
|
|
58
|
+
const mirroredLegacyDispatcher = globalThis[kMirroredLegacyGlobalDispatcher]
|
|
59
|
+
const legacyDispatcher = globalThis[Symbol.for('undici.globalDispatcher.1')]
|
|
60
|
+
const dispatcher = globalThis[Symbol.for('undici.globalDispatcher.2')]
|
|
61
|
+
|
|
62
|
+
if (mirroredDispatcher) {
|
|
63
|
+
if (dispatcher && dispatcher !== mirroredDispatcher) {
|
|
64
|
+
return dispatcher
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (legacyDispatcher && legacyDispatcher !== (mirroredLegacyDispatcher ?? mirroredDispatcher)) {
|
|
68
|
+
return legacyDispatcher
|
|
45
69
|
}
|
|
46
70
|
}
|
|
71
|
+
|
|
72
|
+
return dispatcher ?? legacyDispatcher
|
|
47
73
|
}
|
|
48
74
|
|
|
49
75
|
export const features = {
|
package/lib/schema.js
CHANGED
|
@@ -649,6 +649,16 @@ export const openTelemetryExporter = {
|
|
|
649
649
|
path: {
|
|
650
650
|
type: 'string',
|
|
651
651
|
description: 'The path to write the traces to. Only for file exporter.'
|
|
652
|
+
},
|
|
653
|
+
protocol: {
|
|
654
|
+
type: 'string',
|
|
655
|
+
enum: ['http', 'grpc'],
|
|
656
|
+
description: 'The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.'
|
|
657
|
+
},
|
|
658
|
+
transport: {
|
|
659
|
+
type: 'string',
|
|
660
|
+
enum: ['http', 'grpc'],
|
|
661
|
+
description: 'Alias for protocol. Only for the otlp exporter. Defaults to http.'
|
|
652
662
|
}
|
|
653
663
|
}
|
|
654
664
|
},
|
|
@@ -1211,6 +1221,7 @@ export const runtimeProperties = {
|
|
|
1211
1221
|
},
|
|
1212
1222
|
hostname: { type: 'string' },
|
|
1213
1223
|
endpoint: { type: 'string' },
|
|
1224
|
+
https: server.properties.https,
|
|
1214
1225
|
auth: {
|
|
1215
1226
|
type: 'object',
|
|
1216
1227
|
properties: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/foundation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.57.0",
|
|
4
4
|
"description": "Platformatic Foundation",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/platformatic/platformatic#readme",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@fastify/deepmerge": "^
|
|
19
|
+
"@fastify/deepmerge": "^3.0.0",
|
|
20
20
|
"@fastify/error": "^4.0.0",
|
|
21
21
|
"@iarna/toml": "^2.2.5",
|
|
22
22
|
"@watchable/unpromise": "^1.0.2",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"pino": "^9.9.0",
|
|
31
31
|
"pino-pretty": "^13.0.0",
|
|
32
32
|
"semver": "^7.6.3",
|
|
33
|
-
"undici": "7.
|
|
33
|
+
"undici": "7.27.2",
|
|
34
34
|
"yaml": "^2.4.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"c8": "^
|
|
37
|
+
"c8": "^11.0.0",
|
|
38
38
|
"cleaner-spec-reporter": "^0.5.0",
|
|
39
39
|
"eslint": "9",
|
|
40
40
|
"fastify": "^5.7.0",
|