Skip to content

Commit a2f7ab4

Browse files
committed
chore: update esbuild
fix: do not end s3 put object connection before object is actually stored
1 parent 3a2f32a commit a2f7ab4

File tree

4 files changed

+929
-1001
lines changed

4 files changed

+929
-1001
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, fixes/v5]
66
jobs:
77
generate:
88
runs-on: ubuntu-latest

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-aws-lambda",
3-
"version": "5.0.1",
3+
"version": "5.0.2",
44
"description": "AWS Application Load Balancer and API Gateway - Lambda dev tool for Serverless. Allows Express synthax in handlers. Supports packaging, local invoking and offline ALB, APG, S3, SNS, SQS, DynamoDB Stream server mocking.",
55
"author": "Inqnuam",
66
"license": "MIT",
@@ -69,7 +69,7 @@
6969
"ajv": "^8.17.1",
7070
"ajv-formats": "^3.0.1",
7171
"archiver": "^5.3.1",
72-
"esbuild": "0.24.2",
72+
"esbuild": "0.25.2",
7373
"fast-xml-parser": "^4.5.1",
7474
"local-aws-sqs": "^1.0.2",
7575
"serve-static": "^1.16.2"

src/plugins/s3/actions/PutObjectAction.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ export class PutObjectAction extends S3LocalService {
128128
const savingFile = createWriteStream(filePath);
129129

130130
savingFile.on("close", async () => {
131-
res.end();
132-
133131
try {
134132
const fileStat = await stat(filePath);
135133
const ETag = calulcateETag(await readFile(filePath));
@@ -155,6 +153,7 @@ export class PutObjectAction extends S3LocalService {
155153
};
156154
const sourceIPAddress = req.socket.remoteAddress?.split(":")?.[3] ?? "127.0.0.1";
157155

156+
res.end();
158157
await triggerEvent(S3LocalService.callableLambdas, {
159158
bucket: this.bucket,
160159
key: this.key,

0 commit comments

Comments
 (0)