@aws-sdk/middleware-bucket-endpoint
Advanced tools
Comparing version 1.0.0-gamma.2 to 1.0.0-gamma.3
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.0.0-gamma.3](https://github.com/aws/aws-sdk-js-v3/compare/@aws-sdk/middleware-bucket-endpoint@1.0.0-gamma.2...@aws-sdk/middleware-bucket-endpoint@1.0.0-gamma.3) (2020-07-13) | ||
### Features | ||
* add code linting and prettify ([#1350](https://github.com/aws/aws-sdk-js-v3/issues/1350)) ([47770fa](https://github.com/aws/aws-sdk-js-v3/commit/47770fa493c3405f193069cd18319882529ff484)) | ||
# 1.0.0-gamma.2 (2020-07-08) | ||
@@ -8,0 +19,0 @@ |
@@ -0,5 +1,5 @@ | ||
import { BuildHandlerOptions, BuildMiddleware, Pluggable, RelativeLocation } from "@aws-sdk/types"; | ||
import { BucketEndpointResolvedConfig } from "./configurations"; | ||
import { BuildHandlerOptions, BuildMiddleware, Pluggable, RelativeLocation } from "@aws-sdk/types"; | ||
export declare function bucketEndpointMiddleware(options: BucketEndpointResolvedConfig): BuildMiddleware<any, any>; | ||
export declare const bucketEndpointMiddlewareOptions: BuildHandlerOptions & RelativeLocation<any, any>; | ||
export declare const getBucketEndpointPlugin: (options: BucketEndpointResolvedConfig) => Pluggable<any, any>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getBucketEndpointPlugin = exports.bucketEndpointMiddlewareOptions = exports.bucketEndpointMiddleware = void 0; | ||
var tslib_1 = require("tslib"); | ||
var protocol_http_1 = require("@aws-sdk/protocol-http"); | ||
var bucketHostname_1 = require("./bucketHostname"); | ||
var protocol_http_1 = require("@aws-sdk/protocol-http"); | ||
function bucketEndpointMiddleware(options) { | ||
@@ -25,3 +26,3 @@ var _this = this; | ||
pathStyleEndpoint: options.forcePathStyle, | ||
tlsCompatible: request.protocol === "https:" | ||
tlsCompatible: request.protocol === "https:", | ||
}), hostname = _a.hostname, bucketEndpoint = _a.bucketEndpoint; | ||
@@ -48,3 +49,3 @@ request.hostname = hostname; | ||
relation: "before", | ||
toMiddleware: "hostHeaderMiddleware" | ||
toMiddleware: "hostHeaderMiddleware", | ||
}; | ||
@@ -54,4 +55,4 @@ exports.getBucketEndpointPlugin = function (options) { return ({ | ||
clientStack.addRelativeTo(bucketEndpointMiddleware(options), exports.bucketEndpointMiddlewareOptions); | ||
} | ||
}, | ||
}); }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVja2V0RW5kcG9pbnRNaWRkbGV3YXJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2J1Y2tldEVuZHBvaW50TWlkZGxld2FyZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxtREFBa0Q7QUFZbEQsd0RBQXFEO0FBRXJELFNBQWdCLHdCQUF3QixDQUN0QyxPQUFxQztJQUR2QyxpQkFzQ0M7SUFuQ0MsT0FBTyxVQUNMLElBQStCLElBQ0QsT0FBQSxVQUM5QixJQUFnQzs7O1lBRWhCLFVBQVUsR0FBSyxJQUFJLENBQUMsS0FBSyxPQUFmLENBQWdCO1lBQ3RDLG1CQUFtQixHQUFHLE9BQU8sQ0FBQyxjQUFjLENBQUM7WUFDN0MsT0FBTyxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUM7WUFDM0IsSUFBSSwyQkFBVyxDQUFDLFVBQVUsQ0FBQyxPQUFPLENBQUMsRUFBRTtnQkFDbkMsSUFBSSxPQUFPLENBQUMsY0FBYyxFQUFFO29CQUMxQixPQUFPLENBQUMsUUFBUSxHQUFHLFVBQVUsQ0FBQztpQkFDL0I7cUJBQU07b0JBQ0MsS0FBK0IsK0JBQWMsQ0FBQzt3QkFDbEQsVUFBVSxZQUFBO3dCQUNWLFlBQVksRUFBRSxPQUFPLENBQUMsUUFBUTt3QkFDOUIsa0JBQWtCLEVBQUUsT0FBTyxDQUFDLHFCQUFxQjt3QkFDakQs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M6IEJ1aWxkSGFuZGxlck9wdGlvbnMgJiBSZWxhdGl2ZUxvY2F0aW9uPGFueSwgYW55PiA9IHtcbiAgc3RlcDogXCJidWlsZFwiLFxuICB0YWdzOiBbXCJCVUNLRVRfRU5EUE9JTlRcIl0sXG4gIG5hbWU6IFwiYnVja2V0RW5kcG9pbnRNaWRkbGV3YXJlXCIsXG4gIHJlbGF0aW9uOiBcImJlZm9yZVwiLFxuICB0b01pZGRsZXdhcmU6IFwiaG9zdEhlYWRlck1pZGRsZXdhcmVcIixcbn07XG5cbmV4cG9ydCBjb25zdCBnZXRCdWNrZXRFbmRwb2ludFBsdWdpbiA9IChvcHRpb25zOiBCdWNrZXRFbmRwb2ludFJlc29sdmVkQ29uZmlnKTogUGx1Z2dhYmxlPGFueSwgYW55PiA9PiAoe1xuICBhcHBseVRvU3RhY2s6IChjbGllbnRTdGFjaykgPT4ge1xuICAgIGNsaWVudFN0YWNrLmFkZFJlbGF0aXZlVG8oYnVja2V0RW5kcG9pbnRNaWRkbGV3YXJlKG9wdGlvbnMpLCBidWNrZXRFbmRwb2ludE1pZGRsZXdhcmVPcHRpb25zKTtcbiAgfSxcbn0pO1xuIl19 |
@@ -13,2 +13,2 @@ export interface BucketHostnameParameters { | ||
} | ||
export declare function bucketHostname({ accelerateEndpoint, baseHostname, bucketName, dualstackEndpoint, pathStyleEndpoint, tlsCompatible }: BucketHostnameParameters): BucketHostname; | ||
export declare function bucketHostname({ accelerateEndpoint, baseHostname, bucketName, dualstackEndpoint, pathStyleEndpoint, tlsCompatible, }: BucketHostnameParameters): BucketHostname; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.bucketHostname = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -16,3 +17,3 @@ var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; | ||
bucketEndpoint: false, | ||
hostname: baseHostname | ||
hostname: baseHostname, | ||
}; | ||
@@ -23,10 +24,6 @@ } | ||
: partitionSuffix(baseHostname), 2), region = _f[0], hostnameSuffix = _f[1]; | ||
if (pathStyleEndpoint || | ||
!isDnsCompatibleBucketName(bucketName) || | ||
(tlsCompatible && DOT_PATTERN.test(bucketName))) { | ||
if (pathStyleEndpoint || !isDnsCompatibleBucketName(bucketName) || (tlsCompatible && DOT_PATTERN.test(bucketName))) { | ||
return { | ||
bucketEndpoint: false, | ||
hostname: dualstackEndpoint | ||
? "s3.dualstack." + region + "." + hostnameSuffix | ||
: baseHostname | ||
hostname: dualstackEndpoint ? "s3.dualstack." + region + "." + hostnameSuffix : baseHostname, | ||
}; | ||
@@ -42,3 +39,3 @@ } | ||
bucketEndpoint: true, | ||
hostname: bucketName + "." + baseHostname | ||
hostname: bucketName + "." + baseHostname, | ||
}; | ||
@@ -55,5 +52,3 @@ } | ||
function isDnsCompatibleBucketName(bucketName) { | ||
return (DOMAIN_PATTERN.test(bucketName) && | ||
!IP_ADDRESS_PATTERN.test(bucketName) && | ||
!DOTS_PATTERN.test(bucketName)); | ||
return DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); | ||
} | ||
@@ -64,2 +59,2 @@ function partitionSuffix(hostname) { | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVja2V0SG9zdG5hbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYnVja2V0SG9zdG5hbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBTSxjQUFjLEdBQUcsc0NBQXNDLENBQUM7QUFDOUQsSUFBTSxrQkFBa0IsR0FBRyxlQUFlLENBQUM7QUFDM0MsSUFBTSxZQUFZLEdBQUcsTUFBTSxDQUFDO0FBQzVCLElBQU0sV0FBVyxHQUFHLElBQUksQ0FBQztBQUN6QixJQUFNLG1CQUFtQixHQUFHLDhCQUE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ZXN0KGJ1Y2tldE5hbWUpICYmICFJUF9BRERSRVNTX1BBVFRFUk4udGVzdChidWNrZXROYW1lKSAmJiAhRE9UU19QQVRURVJOLnRlc3QoYnVja2V0TmFtZSk7XG59XG5cbmZ1bmN0aW9uIHBhcnRpdGlvblN1ZmZpeChob3N0bmFtZTogc3RyaW5nKTogW3N0cmluZywgc3RyaW5nXSB7XG4gIGNvbnN0IHBhcnRzID0gaG9zdG5hbWUubWF0Y2goUzNfSE9TVE5BTUVfUEFUVEVSTikgYXMgUmVnRXhwTWF0Y2hBcnJheTtcblxuICByZXR1cm4gW3BhcnRzWzJdLCBob3N0bmFtZS5yZXBsYWNlKG5ldyBSZWdFeHAoYF4ke3BhcnRzWzBdfWApLCBcIlwiKV07XG59XG4iXX0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveBucketEndpointConfig = void 0; | ||
var tslib_1 = require("tslib"); | ||
@@ -12,2 +13,2 @@ function resolveBucketEndpointConfig(input) { | ||
exports.resolveBucketEndpointConfig = resolveBucketEndpointConfig; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlndXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29uZmlndXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBMEJBLFNBQWdCLDJCQUEyQixDQUN6QyxLQUFvQztJQUdsQyxJQUFBLHlCQUFzQixFQUF0QiwyQ0FBc0IsRUFDdEIseUJBQXNCLEVBQXRCLDJDQUFzQixFQUN0QixnQ0FBNkIsRUFBN0Isa0RBQTZCLEVBQzdCLCtCQUE0QixFQUE1QixpREFBNEIsQ0FDcEI7SUFDViw2Q0FDSyxLQUFLLEtBQ1IsY0FBYyxnQkFBQTtRQUNkLGNBQWMsZ0JBQUE7UUFDZCxxQkFBcUIsdUJBQUE7UUFDckIsb0JBQW9C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cbiAgdXNlRHVhbHN0YWNrRW5kcG9pbnQ6IGJvb2xlYW47XG59XG5cbmV4cG9ydCBmdW5jdGlvbiByZXNvbHZlQnVja2V0RW5kcG9pbnRDb25maWc8VD4oaW5wdXQ6IFQgJiBCdWNrZXRFbmRwb2ludElucHV0Q29uZmlnKTogVCAmIEJ1Y2tldEVuZHBvaW50UmVzb2x2ZWRDb25maWcge1xuICBjb25zdCB7XG4gICAgYnVja2V0RW5kcG9pbnQgPSBmYWxzZSxcbiAgICBmb3JjZVBhdGhTdHlsZSA9IGZhbHNlLFxuICAgIHVzZUFjY2VsZXJhdGVFbmRwb2ludCA9IGZhbHNlLFxuICAgIHVzZUR1YWxzdGFja0VuZHBvaW50ID0gZmFsc2UsXG4gIH0gPSBpbnB1dDtcbiAgcmV0dXJuIHtcbiAgICAuLi5pbnB1dCxcbiAgICBidWNrZXRFbmRwb2ludCxcbiAgICBmb3JjZVBhdGhTdHlsZSxcbiAgICB1c2VBY2NlbGVyYXRlRW5kcG9pbnQsXG4gICAgdXNlRHVhbHN0YWNrRW5kcG9pbnQsXG4gIH07XG59XG4iXX0= |
{ | ||
"name": "@aws-sdk/middleware-bucket-endpoint", | ||
"version": "1.0.0-gamma.2", | ||
"version": "1.0.0-gamma.3", | ||
"scripts": { | ||
@@ -20,12 +20,12 @@ "prepublishOnly": "yarn build:cjs && yarn build:es", | ||
"dependencies": { | ||
"@aws-sdk/protocol-http": "1.0.0-gamma.2", | ||
"@aws-sdk/types": "1.0.0-gamma.2", | ||
"@aws-sdk/protocol-http": "1.0.0-gamma.3", | ||
"@aws-sdk/types": "1.0.0-gamma.3", | ||
"tslib": "^1.8.0" | ||
}, | ||
"devDependencies": { | ||
"@aws-sdk/middleware-stack": "1.0.0-gamma.2", | ||
"@aws-sdk/middleware-stack": "1.0.0-gamma.3", | ||
"@types/jest": "^26.0.4", | ||
"jest": "^26.1.0", | ||
"typescript": "~3.8.3" | ||
"typescript": "~3.9.3" | ||
} | ||
} |
@@ -9,9 +9,3 @@ { | ||
"noEmitHelpers": true, | ||
"lib": [ | ||
"es5", | ||
"es2015.promise", | ||
"es2015.collection", | ||
"es2015.iterable", | ||
"es2015.symbol.wellknown" | ||
], | ||
"lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], | ||
"rootDir": "./src", | ||
@@ -18,0 +12,0 @@ "outDir": "./dist/cjs", |
@@ -9,9 +9,3 @@ { | ||
"noEmitHelpers": true, | ||
"lib": [ | ||
"es5", | ||
"es2015.promise", | ||
"es2015.collection", | ||
"es2015.iterable", | ||
"es2015.symbol.wellknown" | ||
], | ||
"lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"], | ||
"rootDir": "./src", | ||
@@ -18,0 +12,0 @@ "outDir": "./dist/es", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
53326
0
215
+ Added@aws-sdk/protocol-http@1.0.0-gamma.3(transitive)
+ Added@aws-sdk/types@1.0.0-gamma.3(transitive)
- Removed@aws-sdk/protocol-http@1.0.0-gamma.2(transitive)
- Removed@aws-sdk/types@1.0.0-gamma.2(transitive)
Updated@aws-sdk/types@1.0.0-gamma.3