@platformatic/runtime 2.52.1-alpha.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  * and run json-schema-to-typescript to regenerate this file.
6
6
  */
7
7
 
8
- export type HttpsSchemasPlatformaticDevPlatformaticRuntime2521Alpha0Json = {
8
+ export type HttpsSchemasPlatformaticDevPlatformaticRuntime2531Json = {
9
9
  [k: string]: unknown;
10
10
  } & {
11
11
  $schema?: string;
@@ -168,9 +168,7 @@ async function main () {
168
168
  }
169
169
  }
170
170
 
171
- const globalDispatcher = new Agent(dispatcherOpts).compose(composedInterceptors)
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
- setGlobalDispatcher(
189
- getGlobalDispatcher().compose(
190
- httpCacheInterceptor({
191
- store: new RemoteCacheStore({
192
- onRequest: opts => {
193
- globalThis.platformatic?.onHttpCacheRequest?.(opts)
194
- },
195
- onCacheHit: opts => {
196
- globalThis.platformatic?.onHttpCacheHit?.(opts)
197
- },
198
- onCacheMiss: opts => {
199
- globalThis.platformatic?.onHttpCacheMiss?.(opts)
200
- },
201
- logger: globalThis.platformatic.logger
202
- }),
203
- methods: config.httpCache.methods ?? ['GET', 'HEAD'],
204
- logger: globalThis.platformatic.logger
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.52.1-alpha.0",
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.52.1-alpha.0",
41
- "@platformatic/node": "2.52.1-alpha.0",
42
- "@platformatic/service": "2.52.1-alpha.0",
43
- "@platformatic/sql-graphql": "2.52.1-alpha.0",
44
- "@platformatic/sql-mapper": "2.52.1-alpha.0",
45
- "@platformatic/db": "2.52.1-alpha.0"
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.52.1-alpha.0",
80
- "@platformatic/config": "2.52.1-alpha.0",
81
- "@platformatic/generators": "2.52.1-alpha.0",
82
- "@platformatic/itc": "2.52.1-alpha.0",
83
- "@platformatic/telemetry": "2.52.1-alpha.0",
84
- "@platformatic/ts-compiler": "2.52.1-alpha.0",
85
- "@platformatic/utils": "2.52.1-alpha.0"
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.52.1-alpha.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/2.53.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "type": "object",
5
5
  "properties": {