@take-out/scripts 0.1.39-1772590052671 → 0.1.39-1772609429143

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": "@take-out/scripts",
3
- "version": "0.1.39-1772590052671",
3
+ "version": "0.1.39-1772609429143",
4
4
  "type": "module",
5
5
  "main": "./src/run.ts",
6
6
  "sideEffects": false,
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@clack/prompts": "^0.8.2",
32
32
  "@lydell/node-pty": "^1.2.0-beta.3",
33
- "@take-out/helpers": "0.1.39-1772590052671",
33
+ "@take-out/helpers": "0.1.39-1772609429143",
34
34
  "picocolors": "^1.1.1"
35
35
  },
36
36
  "peerDependencies": {
@@ -105,6 +105,7 @@ export function handleProcessExit({
105
105
  finalized = true
106
106
  process.off('SIGINT', sigintHandler)
107
107
  process.off('SIGTERM', sigtermHandler)
108
+ process.off('SIGHUP', sighupHandler)
108
109
  process.off('beforeExit', beforeExitHandler)
109
110
  process.exit = originalExit
110
111
 
@@ -127,6 +128,12 @@ export function handleProcessExit({
127
128
  })
128
129
  }
129
130
 
131
+ const sighupHandler = () => {
132
+ cleanup('SIGHUP').then(() => {
133
+ finalizeWithSignal('SIGHUP', 129)
134
+ })
135
+ }
136
+
130
137
  // intercept process.exit to ensure cleanup completes before exiting.
131
138
  // if cleanup is already running, this awaits the SAME promise instead of
132
139
  // early-returning and calling originalExit prematurely.
@@ -141,6 +148,7 @@ export function handleProcessExit({
141
148
  process.on('beforeExit', beforeExitHandler)
142
149
  process.on('SIGINT', sigintHandler)
143
150
  process.on('SIGTERM', sigtermHandler)
151
+ process.on('SIGHUP', sighupHandler)
144
152
 
145
153
  const exit = async (code: number = 0) => {
146
154
  await cleanup('SIGTERM')