Skip to content

Commit

Permalink
Refactor a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertLucian committed Dec 18, 2024
1 parent 93f1105 commit ccbf274
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/cdklocal
Original file line number Diff line number Diff line change
Expand Up @@ -206,13 +206,14 @@ const patchCurrentAccount = (SDK) => {

const patchToolkitInfo = (ToolkitInfo) => {
const setBucketUrl = function setBucketUrl(object, bucket, domain) {
const newBucketUrl = `https://${domain.replace(`${bucket}.`, "")}:${EDGE_PORT}/${bucket}`;
if (DEBUG_ON) {
console.debug("Old bucketUrl:", object.bucketUrl);
console.debug("New bucketUrl:", `https://${domain.replace(`${bucket}.`, "")}:${EDGE_PORT}/${bucket}`);
console.debug("New bucketUrl:", newBucketUrl);
}
Object.defineProperty(object, "bucketUrl", {
get() {
return `https://${domain.replace(`${bucket}.`, "")}:${EDGE_PORT}/${bucket}`;
return newBucketUrl;
}
});
};
Expand Down

0 comments on commit ccbf274

Please sign in to comment.