@aws-sdk/middleware-sdk-s3
Advanced tools
Comparing version 0.1.0-preview.4 to 1.0.0-alpha.1
@@ -5,2 +5,2 @@ "use strict"; | ||
tslib_1.__exportStar(require("./validate-bucket-name"), exports); | ||
//# sourceMappingURL=index.js.map | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUVBQXVDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSBcIi4vdmFsaWRhdGUtYnVja2V0LW5hbWVcIjtcbiJdfQ== |
@@ -1,2 +0,4 @@ | ||
import { Handler } from "@aws-sdk/types"; | ||
export declare const validateBucketName: (next: Handler<any, any>) => Handler<any, any>; | ||
import { InitializeHandlerOptions, InitializeMiddleware, Pluggable } from "@aws-sdk/types"; | ||
export declare function validateBucketNameMiddleware(): InitializeMiddleware<any, any>; | ||
export declare const validateBucketNameMiddlewareOptions: InitializeHandlerOptions; | ||
export declare const getValidateBucketNamePlugin: (unused: any) => Pluggable<any, any>; |
"use strict"; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var tslib_1 = require("tslib"); | ||
exports.validateBucketName = function (next) { return function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var input, err; | ||
return tslib_1.__generator(this, function (_a) { | ||
input = args.input; | ||
if (typeof input.Bucket === "string" && input.Bucket.indexOf("/") >= 0) { | ||
err = new Error("Bucket name shouldn't contain '/', received '" + input.Bucket + "'"); | ||
err.name = "InvalidBucketName"; | ||
throw err; | ||
} | ||
return [2 /*return*/, next(tslib_1.__assign({}, args))]; | ||
}); | ||
}); }; }; | ||
//# sourceMappingURL=validate-bucket-name.js.map | ||
function validateBucketNameMiddleware() { | ||
var _this = this; | ||
return function (next) { return function (args) { return tslib_1.__awaiter(_this, void 0, void 0, function () { | ||
var input, err; | ||
return tslib_1.__generator(this, function (_a) { | ||
input = args.input; | ||
if (typeof input.Bucket === "string" && input.Bucket.indexOf("/") >= 0) { | ||
err = new Error("Bucket name shouldn't contain '/', received '" + input.Bucket + "'"); | ||
err.name = "InvalidBucketName"; | ||
throw err; | ||
} | ||
return [2 /*return*/, next(tslib_1.__assign({}, args))]; | ||
}); | ||
}); }; }; | ||
} | ||
exports.validateBucketNameMiddleware = validateBucketNameMiddleware; | ||
exports.validateBucketNameMiddlewareOptions = { | ||
step: "initialize", | ||
tags: ["VALIDATE_BUCKET_NAME"], | ||
name: "validateBucketNameMiddleware" | ||
}; | ||
exports.getValidateBucketNamePlugin = function (unused) { return ({ | ||
applyToStack: function (clientStack) { | ||
clientStack.add(validateBucketNameMiddleware(), exports.validateBucketNameMiddlewareOptions); | ||
} | ||
}); }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGUtYnVja2V0LW5hbWUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvdmFsaWRhdGUtYnVja2V0LW5hbWUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBVUEsU0FBZ0IsNEJBQTRCO0lBQTVDLGlCQWdCQztJQWZDLE9BQU8sVUFDTCxJQUFvQyxJQUNELE9BQUEsVUFDbkMsSUFBcUM7OztZQUU3QixLQUFLLEdBQUssSUFBSSxNQUFULENBQVU7WUFDdkIsSUFBSSxPQUFPLEtBQUssQ0FBQyxNQUFNLEtBQUssUUFBUSxJQUFJLEtBQUssQ0FBQyxNQUFNLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsRUFBRTtnQkFDaEUsR0FBRyxHQUFHLElBQUksS0FBSyxDQUNuQixrREFBZ0QsS0FBSyxDQUFDLE1BQU0sTUFBRyxDQUNoRSxDQUFDO2dCQUNGLEdBQUcsQ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W50U3RhY2suYWRkKFxuICAgICAgdmFsaWRhdGVCdWNrZXROYW1lTWlkZGxld2FyZSgpLFxuICAgICAgdmFsaWRhdGVCdWNrZXROYW1lTWlkZGxld2FyZU9wdGlvbnNcbiAgICApO1xuICB9XG59KTtcbiJdfQ== |
@@ -6,2 +6,26 @@ # Change Log | ||
# 1.0.0-alpha.1 (2020-01-08) | ||
### Bug Fixes | ||
* middleware name and tags ([#486](https://github.com/aws/aws-sdk-js-v3/issues/486)) ([8a3bcce](https://github.com/aws/aws-sdk-js-v3/commit/8a3bcce)) | ||
# 0.6.0 (2019-10-30) | ||
# 0.3.0 (2019-09-09) | ||
### Features | ||
* **s3:** throw error when bucket name contains "/" ([#314](https://github.com/aws/aws-sdk-js-v3/issues/314)) ([a610e2c](https://github.com/aws/aws-sdk-js-v3/commit/a610e2c)) | ||
# 0.1.0-preview.4 (2019-10-30) | ||
@@ -8,0 +32,0 @@ |
{ | ||
"name": "@aws-sdk/middleware-sdk-s3", | ||
"version": "0.1.0-preview.4", | ||
"version": "1.0.0-alpha.1", | ||
"scripts": { | ||
@@ -20,3 +20,3 @@ "prepublishOnly": "tsc", | ||
"devDependencies": { | ||
"@aws-sdk/types": "^0.1.0-preview.7", | ||
"@aws-sdk/types": "^1.0.0-alpha.1", | ||
"@types/jest": "^24.0.12", | ||
@@ -23,0 +23,0 @@ "jest": "^24.7.1", |
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
19087
59
9