@platformatic/runtime 2.53.0 → 2.53.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/config.d.ts +1 -1
- package/lib/worker/main.js +21 -23
- package/package.json +14 -14
- package/schema.json +1 -1
package/config.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
export type
|
|
8
|
+
export type HttpsSchemasPlatformaticDevPlatformaticRuntime2531Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
package/lib/worker/main.js
CHANGED
|
@@ -168,9 +168,7 @@ async function main () {
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
setGlobalDispatcher(globalDispatcher)
|
|
171
|
+
setGlobalDispatcher(new Agent(dispatcherOpts))
|
|
174
172
|
|
|
175
173
|
const { telemetry } = service
|
|
176
174
|
const hooks = telemetry ? createTelemetryThreadInterceptorHooks() : {}
|
|
@@ -185,28 +183,28 @@ async function main () {
|
|
|
185
183
|
})
|
|
186
184
|
|
|
187
185
|
if (config.httpCache) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
})
|
|
206
|
-
)
|
|
207
|
-
)
|
|
186
|
+
const cacheInterceptor = httpCacheInterceptor({
|
|
187
|
+
store: new RemoteCacheStore({
|
|
188
|
+
onRequest: opts => {
|
|
189
|
+
globalThis.platformatic?.onHttpCacheRequest?.(opts)
|
|
190
|
+
},
|
|
191
|
+
onCacheHit: opts => {
|
|
192
|
+
globalThis.platformatic?.onHttpCacheHit?.(opts)
|
|
193
|
+
},
|
|
194
|
+
onCacheMiss: opts => {
|
|
195
|
+
globalThis.platformatic?.onHttpCacheMiss?.(opts)
|
|
196
|
+
},
|
|
197
|
+
logger: globalThis.platformatic.logger
|
|
198
|
+
}),
|
|
199
|
+
methods: config.httpCache.methods ?? ['GET', 'HEAD'],
|
|
200
|
+
logger: globalThis.platformatic.logger
|
|
201
|
+
})
|
|
202
|
+
composedInterceptors.push(cacheInterceptor)
|
|
208
203
|
}
|
|
209
204
|
|
|
205
|
+
const globalDispatcher = getGlobalDispatcher()
|
|
206
|
+
setGlobalDispatcher(globalDispatcher.compose(composedInterceptors))
|
|
207
|
+
|
|
210
208
|
// If the service is an entrypoint and runtime server config is defined, use it.
|
|
211
209
|
let serverConfig = null
|
|
212
210
|
if (config.server && service.entrypoint) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"typescript": "^5.5.4",
|
|
38
38
|
"undici-oidc-interceptor": "^0.5.0",
|
|
39
39
|
"why-is-node-running": "^2.2.2",
|
|
40
|
-
"@platformatic/composer": "2.53.
|
|
41
|
-
"@platformatic/db": "2.53.
|
|
42
|
-
"@platformatic/node": "2.53.
|
|
43
|
-
"@platformatic/service": "2.53.
|
|
44
|
-
"@platformatic/sql-
|
|
45
|
-
"@platformatic/sql-
|
|
40
|
+
"@platformatic/composer": "2.53.1",
|
|
41
|
+
"@platformatic/db": "2.53.1",
|
|
42
|
+
"@platformatic/node": "2.53.1",
|
|
43
|
+
"@platformatic/service": "2.53.1",
|
|
44
|
+
"@platformatic/sql-mapper": "2.53.1",
|
|
45
|
+
"@platformatic/sql-graphql": "2.53.1"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -76,13 +76,13 @@
|
|
|
76
76
|
"undici": "^7.0.0",
|
|
77
77
|
"undici-thread-interceptor": "^0.13.1",
|
|
78
78
|
"ws": "^8.16.0",
|
|
79
|
-
"@platformatic/basic": "2.53.
|
|
80
|
-
"@platformatic/config": "2.53.
|
|
81
|
-
"@platformatic/generators": "2.53.
|
|
82
|
-
"@platformatic/
|
|
83
|
-
"@platformatic/
|
|
84
|
-
"@platformatic/
|
|
85
|
-
"@platformatic/
|
|
79
|
+
"@platformatic/basic": "2.53.1",
|
|
80
|
+
"@platformatic/config": "2.53.1",
|
|
81
|
+
"@platformatic/generators": "2.53.1",
|
|
82
|
+
"@platformatic/telemetry": "2.53.1",
|
|
83
|
+
"@platformatic/itc": "2.53.1",
|
|
84
|
+
"@platformatic/ts-compiler": "2.53.1",
|
|
85
|
+
"@platformatic/utils": "2.53.1"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
88
|
"test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
|
package/schema.json
CHANGED