serverless-offline 9.1.4 → 9.1.5
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dedicatedTo": "Blue, a great migrating bird.",
|
|
3
3
|
"name": "serverless-offline",
|
|
4
|
-
"version": "9.1.
|
|
4
|
+
"version": "9.1.5",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "./src/index.js",
|
|
@@ -41,19 +41,6 @@ export default class ChildProcessRunner {
|
|
|
41
41
|
},
|
|
42
42
|
)
|
|
43
43
|
|
|
44
|
-
let message
|
|
45
|
-
|
|
46
|
-
try {
|
|
47
|
-
message = new Promise((res, rej) => {
|
|
48
|
-
childProcess.on('message', (data) => {
|
|
49
|
-
if (data.error) rej(data.error)
|
|
50
|
-
else res(data)
|
|
51
|
-
})
|
|
52
|
-
})
|
|
53
|
-
} finally {
|
|
54
|
-
childProcess.kill()
|
|
55
|
-
}
|
|
56
|
-
|
|
57
44
|
childProcess.send({
|
|
58
45
|
context,
|
|
59
46
|
event,
|
|
@@ -63,12 +50,21 @@ export default class ChildProcessRunner {
|
|
|
63
50
|
let result
|
|
64
51
|
|
|
65
52
|
try {
|
|
66
|
-
result = await
|
|
53
|
+
result = await new Promise((res, rej) => {
|
|
54
|
+
childProcess.on('message', (data) => {
|
|
55
|
+
if (data.error) {
|
|
56
|
+
rej(data.error)
|
|
57
|
+
return
|
|
58
|
+
}
|
|
59
|
+
res(data)
|
|
60
|
+
})
|
|
61
|
+
})
|
|
67
62
|
} catch (err) {
|
|
68
63
|
// TODO
|
|
69
64
|
log.error(err)
|
|
70
|
-
|
|
71
65
|
throw err
|
|
66
|
+
} finally {
|
|
67
|
+
childProcess.kill()
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
return result
|