Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@smithy/middleware-endpoint

Package Overview
Dependencies
Maintainers
2
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smithy/middleware-endpoint - npm Package Compare versions

Comparing version 2.5.0 to 2.5.1

6

dist-cjs/index.js

@@ -57,9 +57,9 @@ var __defProp = Object.defineProperty;

var isArnBucketName = /* @__PURE__ */ __name((bucketName) => {
const [arn, partition, service, region, account, typeOrId] = bucketName.split(":");
const [arn, partition, service, , , bucket] = bucketName.split(":");
const isArn = arn === "arn" && bucketName.split(":").length >= 6;
const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5;
const isValidArn = Boolean(isArn && partition && service && bucket);
if (isArn && !isValidArn) {
throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
}
return arn === "arn" && !!partition && !!service && !!account && !!typeOrId;
return isValidArn;
}, "isArnBucketName");

@@ -66,0 +66,0 @@

@@ -30,9 +30,9 @@ export const resolveParamsForS3 = async (endpointParams) => {

export const isArnBucketName = (bucketName) => {
const [arn, partition, service, region, account, typeOrId] = bucketName.split(":");
const [arn, partition, service, , , bucket] = bucketName.split(":");
const isArn = arn === "arn" && bucketName.split(":").length >= 6;
const isValidArn = [arn, partition, service, account, typeOrId].filter(Boolean).length === 5;
const isValidArn = Boolean(isArn && partition && service && bucket);
if (isArn && !isValidArn) {
throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
}
return arn === "arn" && !!partition && !!service && !!account && !!typeOrId;
return isValidArn;
};
{
"name": "@smithy/middleware-endpoint",
"version": "2.5.0",
"version": "2.5.1",
"scripts": {

@@ -5,0 +5,0 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc