Closed aheissenberger closed 2 months ago
@magne4000 Thank you for your Feedback - do you need more changes?
I have a question related to the template functions $README.md.ts
. I would like to use this to manipulate a yaml file but there is no reader for yaml and I am not allowed to import any other packages. I know I can embed the yaml in a string and manipulate the string, but I would prefer to read an existing yaml file, convert it to json and than export it again back to yaml.
I have a question related to the template functions
$README.md.ts
. I would like to use this to manipulate a yaml file but there is no reader for yaml and I am not allowed to import any other packages. I know I can embed the yaml in a string and manipulate the string, but I would prefer to read an existing yaml file, convert it to json and than export it again back to yaml.
I created a new loadYaml
util. It's untested but fairly simple. If you need to update/fix it, it shouldn't be too difficult.
@magne4000 Thank you for your Feedback - do you need more changes?
I don't think so. I just need to try it out before merging :)
How to run a specific pnpm test:e2e
- I have added one and would like to only run this test e.g. FRAMEWORK+aws-lambda-serverless.spec.ts
@aheissenberger, pnpm run test:e2e --filter solid,express
@magne4000 the problem with the e2e test failing sometimes but not allways is not related to this changes
pnpm run test:e2e --keep --summarize --filter solid --steps build,test
I had this error also on my macOS system.
Yes it sometimes happens due to some temp files being created, I usually just rerun the test manually.
@aheissenberger Please be sure to toggle this PR back to "Ready for review" once you consider I can review it again and test it.
@aheissenberger Please be sure to toggle this PR back to "Ready for review" once you consider I can review it again and test it.
I have restarted with this:
How would you suggest to modle this requirement:
My current idea is:
aws-lambda
which will add the wrapper to hono, hatip,..aws-cdk
which provides a sample configuration to deploy to AWSWith Universal Middleware directly supporting AWS Lambda there would be no need to add one of the serverless server frameworks like hono or hattip.
there are multiple targets to deploy on AWS: AWS Lambda, Lambda@Edge which need different Wrappers for Hono
If possible, we just edit hono-entry.ts
. If that's too complex, let's just create other wrapper files like hono-entry-aws-edge.ts
.
I would suggest to choose just one at first, to limit the scope of the PR. That way I'll also be able to improve Bati's internal for future requirements
there are multiple ways to create the requires infrastructure on AWS and deploy: AWS CDK, Serverless Framework, SST.dev, ...
Same as above, choose one for now. This adds a lot of complexity to supports multiple of those I feel.
a feature called aws-lambda which will add the wrapper to hono, hatip,.. a feature called aws-cdk which provides a sample configuration to deploy to AWS
My goal is to have features with options soon for this kind of use cases. Usage would be: pnpm create bati --react --aws=lambda,cdk
. I'll prioritize this. But for now, if we choose only CDK and Lamda, we can avoid creating another feature. Just put both in aws
feature for now.
With Universal Middleware directly supporting AWS Lambda there would be no need to add one of the serverless server frameworks like hono or hattip.
It will not be straightforward to implement (in universal-middleware
) and integrate (in bati
), so you can assume that you will probably have finished this PR before I had time to properly support all this.
https://github.com/vikejs/bati/discussions/335
currently supports:
dist/client/assets
/assets
to the s3 bucket and all other requests to the lambda