Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure CJS-only build for Lambda@Edge and return null instead of error before target-app-versions.json creation #121

Merged
merged 3 commits into from
Feb 19, 2025

Conversation

rjwu95
Copy link
Contributor

@rjwu95 rjwu95 commented Feb 19, 2025

This PR includes the following changes:
1. Modify build output to generate only CJS
• Lambda@Edge supports only CommonJS (CJS), so the build process is adjusted to produce only CJS output.
2. Return null instead of throwing an error when target-app-versions.json is not yet created
• Previously, an error was thrown if target-app-versions.json was missing.
• Now, it returns null to prevent unnecessary failures.

These changes improve compatibility with Lambda@Edge and enhance error handling. 🚀

@gronxb gronxb merged commit 78ea16c into gronxb:feature/init-aws Feb 19, 2025
1 check passed
gronxb added a commit that referenced this pull request Feb 23, 2025
* feat(aws): init project

* feat: s3Database

* feat: target-app-versions.json

* feat: not used sdk v2 used s3 sdk

* fix: env

* fix: access token

* fix: fixme

* fix: sso

* feat: comment

* feat: sso

* feat: crendential-providers

* feat(lambda): add S3-based metadata retrieval in Lambda handler (#91)

* feat(lambda): add S3-based metadata retrieval in Lambda handler

- Implemented Lambda handler to fetch metadata from S3
- Added getUpdateInfo function to process update metadata
- Ensured proper error handling and response formatting

* remove comment

* feat: Add functionality to fetch targetAppVersionList.json from CloudFront in Lambda@Edge

* Update plugins/aws/lambda/index.ts

Co-authored-by: Sungyu Kang <[email protected]>

* Update plugins/aws/lambda/index.ts

Co-authored-by: Sungyu Kang <[email protected]>

---------

Co-authored-by: 유건 <[email protected]>
Co-authored-by: Sungyu Kang <[email protected]>

* Fix Lambda@Edge type (#94)

* fix: lambda ts lint (#96)

* fix: lambda ts lint

* rollback test code

* Update plugins/aws/package.json

Co-authored-by: Sungyu Kang <[email protected]>

* refactor: update lambda runtime to latest version

---------

Co-authored-by: Sungyu Kang <[email protected]>

* fix: build

* feat: iam

* fix: biome

* fix: biome

* fix: biome

* feat: IAM

* refactor: iam and update lambda

* fix: wait deploy

* fix: lambda

* fix: bundle Lambda@Edge dependencies into a single file (#113)

* fix: bundle Lambda@Edge dependencies into a single file

 - minor Lambda fix
 - remove mistakenly committed file

* Update plugins/aws/lambda/index.ts

Co-authored-by: Sungyu Kang <[email protected]>

---------

Co-authored-by: Sungyu Kang <[email protected]>

* fix: biome

* fix: lambda index noExternal

* fix: Fix error in Lambda@Edge by replacing return with callback (#116)

* fix: biome

* Ensure CJS-only build for Lambda@Edge and return null instead of error before target-app-versions.json creation (#121)

* fix: return null instead of throwing an error when target-app-versions.json is not yet created

* fix: Modify build output to generate only CJS since Lambda@Edge supports only CJS

* run code formatter

* fix: filter lambda iam

* fix: zip

* refactor: zip

* feat: improve dx

* fix: eng

* fix: detail

* fix: detail

* fix: detail

* fix: next step

* feat: permission list

* feat: env comment

* feat: test

* fix: update test case

* feat: refactor

* fix: lambda

* fix: message

* fix: path

* fix: name

* fix: name

* fix: few

* fix: session

* fix: bump

* fix: test

* perf: infra

* fix: no arm

* fix: init origin-request

* feat: behavior api

* feat: hono

* fix: types

* feat: signed url

* fix: lmabda

* fix: eng

* feat: test code

* fix: test

* fix: test

* fix: mock type

---------

Co-authored-by: Gun Yu <[email protected]>
Co-authored-by: 유건 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants