@platformatic/runtime 2.30.1-alpha.0 → 2.30.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/http-cache.js +3 -0
- 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 HttpsSchemasPlatformaticDevPlatformaticRuntime2301Json = {
|
|
9
9
|
[k: string]: unknown;
|
|
10
10
|
} & {
|
|
11
11
|
$schema?: string;
|
package/lib/worker/http-cache.js
CHANGED
|
@@ -132,6 +132,8 @@ const httpCacheInterceptor = (interceptorOpts) => {
|
|
|
132
132
|
const originOnResponseStart = handler.onResponseStart.bind(handler)
|
|
133
133
|
handler.onResponseStart = (ac, statusCode, headers, statusMessage) => {
|
|
134
134
|
const cacheEntryId = headers[kCacheIdHeader] ?? headers[CACHE_ID_HEADER]
|
|
135
|
+
const isCacheHit = headers.age !== undefined
|
|
136
|
+
|
|
135
137
|
if (cacheEntryId) {
|
|
136
138
|
// Setting a cache id header on cache hit
|
|
137
139
|
headers[CACHE_ID_HEADER] = cacheEntryId
|
|
@@ -142,6 +144,7 @@ const httpCacheInterceptor = (interceptorOpts) => {
|
|
|
142
144
|
const { span } = clientSpansAls.getStore()
|
|
143
145
|
if (span) {
|
|
144
146
|
span.setAttribute('http.cache.id', cacheEntryId)
|
|
147
|
+
span.setAttribute('http.cache.hit', isCacheHit.toString())
|
|
145
148
|
}
|
|
146
149
|
} catch (err) {
|
|
147
150
|
interceptorOpts.logger.error(err, 'Error setting cache id on span')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/runtime",
|
|
3
|
-
"version": "2.30.1
|
|
3
|
+
"version": "2.30.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"typescript": "^5.5.4",
|
|
36
36
|
"undici-oidc-interceptor": "^0.5.0",
|
|
37
37
|
"why-is-node-running": "^2.2.2",
|
|
38
|
-
"@platformatic/composer": "2.30.1
|
|
39
|
-
"@platformatic/
|
|
40
|
-
"@platformatic/
|
|
41
|
-
"@platformatic/
|
|
42
|
-
"@platformatic/
|
|
43
|
-
"@platformatic/
|
|
38
|
+
"@platformatic/composer": "2.30.1",
|
|
39
|
+
"@platformatic/node": "2.30.1",
|
|
40
|
+
"@platformatic/sql-graphql": "2.30.1",
|
|
41
|
+
"@platformatic/sql-mapper": "2.30.1",
|
|
42
|
+
"@platformatic/service": "2.30.1",
|
|
43
|
+
"@platformatic/db": "2.30.1"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@fastify/accepts": "^5.0.0",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"undici": "^7.0.0",
|
|
75
75
|
"undici-thread-interceptor": "^0.10.3",
|
|
76
76
|
"ws": "^8.16.0",
|
|
77
|
-
"@platformatic/basic": "2.30.1
|
|
78
|
-
"@platformatic/
|
|
79
|
-
"@platformatic/
|
|
80
|
-
"@platformatic/itc": "2.30.1
|
|
81
|
-
"@platformatic/telemetry": "2.30.1
|
|
82
|
-
"@platformatic/
|
|
83
|
-
"@platformatic/
|
|
77
|
+
"@platformatic/basic": "2.30.1",
|
|
78
|
+
"@platformatic/generators": "2.30.1",
|
|
79
|
+
"@platformatic/config": "2.30.1",
|
|
80
|
+
"@platformatic/itc": "2.30.1",
|
|
81
|
+
"@platformatic/telemetry": "2.30.1",
|
|
82
|
+
"@platformatic/ts-compiler": "2.30.1",
|
|
83
|
+
"@platformatic/utils": "2.30.1"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"test": "npm run lint && borp --concurrency=1 --timeout=300000 && tsd",
|
package/schema.json
CHANGED