@platformatic/vite 2.56.0 → 2.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/index.js +14 -0
- package/package.json +7 -7
- package/schema.json +1 -1
package/index.js
CHANGED
|
@@ -124,11 +124,25 @@ export class ViteStackable extends BaseStackable {
|
|
|
124
124
|
|
|
125
125
|
// This is only used in production mode
|
|
126
126
|
async inject (injectParams, onInject) {
|
|
127
|
+
if (this.startHttpTimer && this.endHttpTimer) {
|
|
128
|
+
this.startHttpTimer({ request: injectParams })
|
|
129
|
+
|
|
130
|
+
if (onInject) {
|
|
131
|
+
const originalOnInject = onInject
|
|
132
|
+
onInject = (err, response) => {
|
|
133
|
+
this.endHttpTimer({ request: injectParams, response })
|
|
134
|
+
originalOnInject(err, response)
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
127
139
|
const res = await this.#app.inject(injectParams, onInject)
|
|
128
140
|
|
|
129
141
|
/* c8 ignore next 3 */
|
|
130
142
|
if (onInject) {
|
|
131
143
|
return
|
|
144
|
+
} else if (this.endHttpTimer) {
|
|
145
|
+
this.endHttpTimer({ request: injectParams, response: res })
|
|
132
146
|
}
|
|
133
147
|
|
|
134
148
|
// Since inject might be called from the main thread directly via ITC, let's clean it up
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/vite",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.57.0",
|
|
4
4
|
"description": "Platformatic Vite Stackable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"@fastify/static": "^8.0.0",
|
|
19
19
|
"fastify": "^5.0.0",
|
|
20
20
|
"semver": "^7.6.3",
|
|
21
|
-
"@platformatic/
|
|
22
|
-
"@platformatic/
|
|
23
|
-
"@platformatic/utils": "2.
|
|
24
|
-
"@platformatic/
|
|
21
|
+
"@platformatic/node": "2.57.0",
|
|
22
|
+
"@platformatic/basic": "2.57.0",
|
|
23
|
+
"@platformatic/utils": "2.57.0",
|
|
24
|
+
"@platformatic/config": "2.57.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@fastify/vite": "^7.0.1",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"typescript": "^5.5.4",
|
|
35
35
|
"vite": "^5.4.0",
|
|
36
36
|
"ws": "^8.18.0",
|
|
37
|
-
"@platformatic/
|
|
38
|
-
"@platformatic/
|
|
37
|
+
"@platformatic/composer": "2.57.0",
|
|
38
|
+
"@platformatic/service": "2.57.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"test": "npm run lint && borp --concurrency=1 --no-timeout",
|
package/schema.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.
|
|
2
|
+
"$id": "https://schemas.platformatic.dev/@platformatic/vite/2.57.0.json",
|
|
3
3
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
4
|
"title": "Platformatic Vite Stackable",
|
|
5
5
|
"type": "object",
|