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

@aws-sdk/middleware-sdk-route53

Package Overview
Dependencies
Maintainers
5
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/middleware-sdk-route53 - npm Package Compare versions

Comparing version 3.186.0 to 3.188.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
**Note:** Version bump only for package @aws-sdk/middleware-sdk-route53
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)

@@ -8,0 +16,0 @@

70

dist-es/change-resource-record-sets.js

@@ -1,37 +0,37 @@

import { __assign, __awaiter, __generator, __values } from "tslib";
import { IDENTIFIER_PREFIX_PATTERN } from "./constants";
export function changeResourceRecordSetsMiddleware() {
var _this = this;
return function (next) {
return function (args) { return __awaiter(_this, void 0, void 0, function () {
var ChangeBatch, Changes, _a, _b, change, AliasTarget;
var e_1, _c;
return __generator(this, function (_d) {
ChangeBatch = args.input.ChangeBatch;
Changes = [];
try {
for (_a = __values(ChangeBatch.Changes), _b = _a.next(); !_b.done; _b = _a.next()) {
change = _b.value;
AliasTarget = change.ResourceRecordSet.AliasTarget;
if (AliasTarget) {
Changes.push(__assign(__assign({}, change), { ResourceRecordSet: __assign(__assign({}, change.ResourceRecordSet), { AliasTarget: __assign(__assign({}, AliasTarget), { HostedZoneId: AliasTarget.HostedZoneId.replace(IDENTIFIER_PREFIX_PATTERN, "") }) }) }));
}
else {
Changes.push(change);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
}
finally { if (e_1) throw e_1.error; }
}
return [2, next(__assign(__assign({}, args), { input: __assign(__assign({}, args.input), { ChangeBatch: __assign(__assign({}, ChangeBatch), { Changes: Changes }) }) }))];
});
}); };
return (next) => async (args) => {
const { ChangeBatch } = args.input;
const Changes = [];
for (const change of ChangeBatch.Changes) {
const { AliasTarget } = change.ResourceRecordSet;
if (AliasTarget) {
Changes.push({
...change,
ResourceRecordSet: {
...change.ResourceRecordSet,
AliasTarget: {
...AliasTarget,
HostedZoneId: AliasTarget.HostedZoneId.replace(IDENTIFIER_PREFIX_PATTERN, ""),
},
},
});
}
else {
Changes.push(change);
}
}
return next({
...args,
input: {
...args.input,
ChangeBatch: {
...ChangeBatch,
Changes,
},
},
});
};
}
export var changeResourceRecordSetsMiddlewareOptions = {
export const changeResourceRecordSetsMiddlewareOptions = {
step: "initialize",

@@ -42,6 +42,6 @@ tags: ["ROUTE53_IDS", "CHANGE_RESOURCE_RECORD_SETS"],

};
export var getChangeResourceRecordSetsPlugin = function (unused) { return ({
applyToStack: function (clientStack) {
export const getChangeResourceRecordSetsPlugin = (unused) => ({
applyToStack: (clientStack) => {
clientStack.add(changeResourceRecordSetsMiddleware(), changeResourceRecordSetsMiddlewareOptions);
},
}); };
});

@@ -1,1 +0,1 @@

export var IDENTIFIER_PREFIX_PATTERN = /^\/(hostedzone|change|delegationset)\//;
export const IDENTIFIER_PREFIX_PATTERN = /^\/(hostedzone|change|delegationset)\//;

@@ -1,34 +0,19 @@

import { __assign, __awaiter, __generator, __values } from "tslib";
import { IDENTIFIER_PREFIX_PATTERN } from "./constants";
var IDENTIFIER_PARAMETERS = ["DelegationSetId", "HostedZoneId", "Id"];
const IDENTIFIER_PARAMETERS = ["DelegationSetId", "HostedZoneId", "Id"];
export function idNormalizerMiddleware() {
var _this = this;
return function (next) {
return function (args) { return __awaiter(_this, void 0, void 0, function () {
var input, IDENTIFIER_PARAMETERS_1, IDENTIFIER_PARAMETERS_1_1, paramName, param;
var e_1, _a;
return __generator(this, function (_b) {
input = __assign({}, args.input);
try {
for (IDENTIFIER_PARAMETERS_1 = __values(IDENTIFIER_PARAMETERS), IDENTIFIER_PARAMETERS_1_1 = IDENTIFIER_PARAMETERS_1.next(); !IDENTIFIER_PARAMETERS_1_1.done; IDENTIFIER_PARAMETERS_1_1 = IDENTIFIER_PARAMETERS_1.next()) {
paramName = IDENTIFIER_PARAMETERS_1_1.value;
param = input[paramName];
if (param) {
input[paramName] = param.replace(IDENTIFIER_PREFIX_PATTERN, "");
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (IDENTIFIER_PARAMETERS_1_1 && !IDENTIFIER_PARAMETERS_1_1.done && (_a = IDENTIFIER_PARAMETERS_1.return)) _a.call(IDENTIFIER_PARAMETERS_1);
}
finally { if (e_1) throw e_1.error; }
}
return [2, next(__assign(__assign({}, args), { input: input }))];
});
}); };
return (next) => async (args) => {
const input = { ...args.input };
for (const paramName of IDENTIFIER_PARAMETERS) {
const param = input[paramName];
if (param) {
input[paramName] = param.replace(IDENTIFIER_PREFIX_PATTERN, "");
}
}
return next({
...args,
input,
});
};
}
export var idNormalizerMiddlewareOptions = {
export const idNormalizerMiddlewareOptions = {
step: "initialize",

@@ -39,6 +24,6 @@ tags: ["ROUTE53_IDS"],

};
export var getIdNormalizerPlugin = function (unused) { return ({
applyToStack: function (clientStack) {
export const getIdNormalizerPlugin = (unused) => ({
applyToStack: (clientStack) => {
clientStack.add(idNormalizerMiddleware(), idNormalizerMiddlewareOptions);
},
}); };
});
{
"name": "@aws-sdk/middleware-sdk-route53",
"version": "3.186.0",
"version": "3.188.0",
"scripts": {

@@ -23,3 +23,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

"dependencies": {
"@aws-sdk/types": "3.186.0",
"@aws-sdk/types": "3.188.0",
"tslib": "^2.3.1"

@@ -26,0 +26,0 @@ },

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