@travetto/compiler 4.0.6 → 4.0.7
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/compiler",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.7",
|
|
4
4
|
"description": "The compiler infrastructure for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@types/node": "^20.11.16"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@travetto/cli": "^4.0.
|
|
39
|
+
"@travetto/cli": "^4.0.5"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
42
|
"@travetto/cli": {
|
package/support/server/server.ts
CHANGED
|
@@ -121,7 +121,7 @@ export class CompilerServer {
|
|
|
121
121
|
async #disconnectActive(): Promise<void> {
|
|
122
122
|
log.info('Server disconnect requested');
|
|
123
123
|
this.info.iteration = Date.now();
|
|
124
|
-
await CommonUtil.
|
|
124
|
+
await CommonUtil.blockingTimeout(20);
|
|
125
125
|
for (const el of Object.values(this.#listeners)) {
|
|
126
126
|
try { el.res.end(); } catch { }
|
|
127
127
|
}
|
package/support/util.ts
CHANGED
|
@@ -59,12 +59,19 @@ export class CommonUtil {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
62
|
-
* Non-blocking timeout
|
|
62
|
+
* Non-blocking timeout
|
|
63
63
|
*/
|
|
64
64
|
static nonBlockingTimeout(time: number): Promise<void> {
|
|
65
65
|
return timers.setTimeout(time, undefined, { ref: false }).catch(() => { });
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Blocking timeout
|
|
70
|
+
*/
|
|
71
|
+
static blockingTimeout(time: number): Promise<void> {
|
|
72
|
+
return timers.setTimeout(time, undefined, { ref: true }).catch(() => { });
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
/**
|
|
69
76
|
* Queue new macrotask
|
|
70
77
|
*/
|