Skip to content

Commit

Permalink
feat: migrate bucketEndpointMiddleware (#552)
Browse files Browse the repository at this point in the history
feat: name package

feat: migrate and apply middleware

feat: remove $ input options

feat: remove preformedBucket option
  • Loading branch information
Chase Coalwell authored and trivikr committed Jan 3, 2020
1 parent 0454dd6 commit f0c3222
Show file tree
Hide file tree
Showing 20 changed files with 268 additions and 306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ public class AddBuiltinPlugins implements TypeScriptIntegration {
"PutBucketReplication"
);

private static final Set<String> NON_BUCKET_ENDPOINT_OPERATIONS = SetUtils.of(
"CreateBucket",
"DeleteBucket",
"ListBuckets"
);

@Override
public List<RuntimeClientPlugin> getClientPlugins() {
// Note that order is significant because configurations might
Expand Down Expand Up @@ -112,6 +118,12 @@ public List<RuntimeClientPlugin> getClientPlugins() {
.servicePredicate((m, s) -> testServiceId(s, "Machine Learning"))
.operationPredicate((m, s, o) -> o.getId().getName().equals("Predict"))
.build(),
RuntimeClientPlugin.builder()
.withConventions(AwsDependency.BUCKET_ENDPOINT_MIDDLEWARE.dependency, "BucketEndpoint",
HAS_MIDDLEWARE)
.servicePredicate((m, s) -> testServiceId(s, "S3"))
.operationPredicate((m, s, o) -> !NON_BUCKET_ENDPOINT_OPERATIONS.contains(o.getId().getName()))
.build(),
RuntimeClientPlugin.builder()
.withConventions(AwsDependency.BODY_CHECKSUM.dependency, "ApplyMd5BodyChecksum",
HAS_MIDDLEWARE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public enum AwsDependency implements SymbolDependencyContainer {
STREAM_HASHER_NODE(NORMAL_DEPENDENCY, "@aws-sdk/hash-stream-node", "^0.1.0-preview.4"),
STREAM_HASHER_BROWSER(NORMAL_DEPENDENCY, "@aws-sdk/hash-blob-browser", "^0.1.0-preview.4"),
ROUTE53_MIDDLEWARE(NORMAL_DEPENDENCY, "@aws-sdk/middleware-sdk-route53", "^0.1.0-preview.1"),
BUCKET_ENDPOINT_MIDDLEWARE(NORMAL_DEPENDENCY, "@aws-sdk/middleware-bucket-endpoint", "^0.1.0-preview.5"),
BODY_CHECKSUM(NORMAL_DEPENDENCY, "@aws-sdk/middleware-apply-body-checksum", "^0.1.0-preview.5");

public final String packageName;
Expand Down
4 changes: 0 additions & 4 deletions packages/bucket-endpoint-middleware/README.md

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions packages/middleware-bucket-endpoint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @aws-sdk/middleware-bucket-endpoint

[![NPM version](https://img.shields.io/npm/v/@aws-sdk/middleware-bucket-endpoint/preview.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/middleware-bucket-endpoint.svg)](https://www.npmjs.com/package/@aws-sdk/middleware-bucket-endpoint)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws-sdk/bucket-endpoint-middleware",
"version": "0.1.0-preview.7",
"name": "@aws-sdk/middleware-bucket-endpoint",
"version": "0.1.0-preview.5",
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.test.json",
Expand All @@ -22,4 +22,4 @@
"jest": "^24.7.1",
"typescript": "~3.4.0"
}
}
}
Loading

0 comments on commit f0c3222

Please sign in to comment.