feat(s3-asset): add httpUrl and s3ObjectUrl#7509
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
2ebf967 to
3317f8b
Compare
|
Added the test as suggested. Another option would be something like this: const escape = (str: string) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
const region = escape(stack.region);
const urlSuffix = escape(stack.urlSuffix);
const bucketName = escape(assetLocation.bucketName);
const objectKey = escape(assetLocation.objectKey);
const {
httpUrl,
s3ObjectUrl,
s3Url,
} = assetLocation;
test.ok(RegExp(`^https://s3\.${region}\.${urlSuffix}/${bucketName}/${objectKey}$`).test(httpUrl));
test.ok(RegExp(`^s3://${bucketName}/${objectKey}$`).test(s3ObjectUrl));
test.equal(s3Url, httpUrl); // for backwards compatibility |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@christophgysin Looks like we (I) waited to long...and now there is a conflict. Can you have a look? Looks great otherwise 👍 |
|
@iliapolo I will update the PR |
3317f8b to
f2c7dd6
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
@eladb It seems that the Semantic Pull Request job is stuck? Is there anything I can do to move this forward? |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Commit Message
feat(s3-asset): add httpUrl/s3ObjectUrl (#7509)
fixes #7221
End Commit Message
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license