Merge pull request #16519 from JosiahCraw/feature/add-proxy-support-for-techdocs-awsS3

feat: add support for HTTPS proxy for AWS S3 requests in Techdocs
This commit is contained in:
Morgan Bentell
2023-02-27 09:38:39 +01:00
committed by GitHub
9 changed files with 56 additions and 24 deletions
+1
View File
@@ -77,6 +77,7 @@ Options:
--azureAccountKey <AZURE ACCOUNT KEY>
--awsRoleArn <AWS ROLE ARN>
--awsEndpoint <AWS ENDPOINT>
--awsProxy <HTTPS Proxy>
--awsS3sse <AWS SSE>
--awsS3ForcePathStyle
--awsBucketRootPath <AWS BUCKET ROOT PATH>
@@ -173,6 +173,10 @@ export function registerCommands(program: Command) {
'--awsEndpoint <AWS ENDPOINT>',
'Optional AWS endpoint to send requests to.',
)
.option(
'--awsProxy <HTTPS Proxy>',
'Optional Proxy to use for AWS requests.',
)
.option('--awsS3sse <AWS SSE>', 'Optional AWS S3 Server Side Encryption.')
.option(
'--awsS3ForcePathStyle',
@@ -94,6 +94,7 @@ export class PublisherConfig {
...(opts.awsEndpoint && { endpoint: opts.awsEndpoint }),
...(opts.awsS3ForcePathStyle && { s3ForcePathStyle: true }),
...(opts.awsS3sse && { sse: opts.awsS3sse }),
...(opts.awsProxy && { httpsProxy: opts.awsProxy }),
},
};
}