@aws-sdk/middleware-sdk-route53 3.485.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,51 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getChangeResourceRecordSetsPlugin = exports.changeResourceRecordSetsMiddlewareOptions = exports.changeResourceRecordSetsMiddleware = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
function changeResourceRecordSetsMiddleware() {
|
|
6
|
-
return (next) => async (args) => {
|
|
7
|
-
const { ChangeBatch } = args.input;
|
|
8
|
-
const Changes = [];
|
|
9
|
-
for (const change of ChangeBatch.Changes) {
|
|
10
|
-
const { AliasTarget } = change.ResourceRecordSet;
|
|
11
|
-
if (AliasTarget) {
|
|
12
|
-
Changes.push({
|
|
13
|
-
...change,
|
|
14
|
-
ResourceRecordSet: {
|
|
15
|
-
...change.ResourceRecordSet,
|
|
16
|
-
AliasTarget: {
|
|
17
|
-
...AliasTarget,
|
|
18
|
-
HostedZoneId: AliasTarget.HostedZoneId.replace(constants_1.IDENTIFIER_PREFIX_PATTERN, ""),
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
Changes.push(change);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return next({
|
|
28
|
-
...args,
|
|
29
|
-
input: {
|
|
30
|
-
...args.input,
|
|
31
|
-
ChangeBatch: {
|
|
32
|
-
...ChangeBatch,
|
|
33
|
-
Changes,
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
exports.changeResourceRecordSetsMiddleware = changeResourceRecordSetsMiddleware;
|
|
40
|
-
exports.changeResourceRecordSetsMiddlewareOptions = {
|
|
41
|
-
step: "initialize",
|
|
42
|
-
tags: ["ROUTE53_IDS", "CHANGE_RESOURCE_RECORD_SETS"],
|
|
43
|
-
name: "changeResourceRecordSetsMiddleware",
|
|
44
|
-
override: true,
|
|
45
|
-
};
|
|
46
|
-
const getChangeResourceRecordSetsPlugin = (unused) => ({
|
|
47
|
-
applyToStack: (clientStack) => {
|
|
48
|
-
clientStack.add(changeResourceRecordSetsMiddleware(), exports.changeResourceRecordSetsMiddlewareOptions);
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
exports.getChangeResourceRecordSetsPlugin = getChangeResourceRecordSetsPlugin;
|
|
1
|
+
module.exports = require("./index.js");
|
package/dist-cjs/constants.js
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getIdNormalizerPlugin = exports.idNormalizerMiddlewareOptions = exports.idNormalizerMiddleware = void 0;
|
|
4
|
-
const constants_1 = require("./constants");
|
|
5
|
-
const IDENTIFIER_PARAMETERS = ["DelegationSetId", "HostedZoneId", "Id"];
|
|
6
|
-
function idNormalizerMiddleware() {
|
|
7
|
-
return (next) => async (args) => {
|
|
8
|
-
const input = { ...args.input };
|
|
9
|
-
for (const paramName of IDENTIFIER_PARAMETERS) {
|
|
10
|
-
const param = input[paramName];
|
|
11
|
-
if (param) {
|
|
12
|
-
input[paramName] = param.replace(constants_1.IDENTIFIER_PREFIX_PATTERN, "");
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return next({
|
|
16
|
-
...args,
|
|
17
|
-
input,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
exports.idNormalizerMiddleware = idNormalizerMiddleware;
|
|
22
|
-
exports.idNormalizerMiddlewareOptions = {
|
|
23
|
-
step: "initialize",
|
|
24
|
-
tags: ["ROUTE53_IDS"],
|
|
25
|
-
name: "idNormalizerMiddleware",
|
|
26
|
-
override: true,
|
|
27
|
-
};
|
|
28
|
-
const getIdNormalizerPlugin = (unused) => ({
|
|
29
|
-
applyToStack: (clientStack) => {
|
|
30
|
-
clientStack.add(idNormalizerMiddleware(), exports.idNormalizerMiddlewareOptions);
|
|
31
|
-
},
|
|
32
|
-
});
|
|
33
|
-
exports.getIdNormalizerPlugin = getIdNormalizerPlugin;
|
|
1
|
+
module.exports = require("./index.js");
|
package/dist-cjs/index.js
CHANGED
|
@@ -1,5 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var src_exports = {};
|
|
22
|
+
__export(src_exports, {
|
|
23
|
+
changeResourceRecordSetsMiddleware: () => changeResourceRecordSetsMiddleware,
|
|
24
|
+
changeResourceRecordSetsMiddlewareOptions: () => changeResourceRecordSetsMiddlewareOptions,
|
|
25
|
+
getChangeResourceRecordSetsPlugin: () => getChangeResourceRecordSetsPlugin,
|
|
26
|
+
getIdNormalizerPlugin: () => getIdNormalizerPlugin,
|
|
27
|
+
idNormalizerMiddleware: () => idNormalizerMiddleware,
|
|
28
|
+
idNormalizerMiddlewareOptions: () => idNormalizerMiddlewareOptions
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(src_exports);
|
|
31
|
+
|
|
32
|
+
// src/constants.ts
|
|
33
|
+
var IDENTIFIER_PREFIX_PATTERN = /^\/(hostedzone|change|delegationset)\//;
|
|
34
|
+
|
|
35
|
+
// src/change-resource-record-sets.ts
|
|
36
|
+
function changeResourceRecordSetsMiddleware() {
|
|
37
|
+
return (next) => async (args) => {
|
|
38
|
+
const { ChangeBatch } = args.input;
|
|
39
|
+
const Changes = [];
|
|
40
|
+
for (const change of ChangeBatch.Changes) {
|
|
41
|
+
const { AliasTarget } = change.ResourceRecordSet;
|
|
42
|
+
if (AliasTarget) {
|
|
43
|
+
Changes.push({
|
|
44
|
+
...change,
|
|
45
|
+
ResourceRecordSet: {
|
|
46
|
+
...change.ResourceRecordSet,
|
|
47
|
+
AliasTarget: {
|
|
48
|
+
...AliasTarget,
|
|
49
|
+
HostedZoneId: AliasTarget.HostedZoneId.replace(IDENTIFIER_PREFIX_PATTERN, "")
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
Changes.push(change);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return next({
|
|
58
|
+
...args,
|
|
59
|
+
input: {
|
|
60
|
+
...args.input,
|
|
61
|
+
ChangeBatch: {
|
|
62
|
+
...ChangeBatch,
|
|
63
|
+
Changes
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
__name(changeResourceRecordSetsMiddleware, "changeResourceRecordSetsMiddleware");
|
|
70
|
+
var changeResourceRecordSetsMiddlewareOptions = {
|
|
71
|
+
step: "initialize",
|
|
72
|
+
tags: ["ROUTE53_IDS", "CHANGE_RESOURCE_RECORD_SETS"],
|
|
73
|
+
name: "changeResourceRecordSetsMiddleware",
|
|
74
|
+
override: true
|
|
75
|
+
};
|
|
76
|
+
var getChangeResourceRecordSetsPlugin = /* @__PURE__ */ __name((unused) => ({
|
|
77
|
+
applyToStack: (clientStack) => {
|
|
78
|
+
clientStack.add(changeResourceRecordSetsMiddleware(), changeResourceRecordSetsMiddlewareOptions);
|
|
79
|
+
}
|
|
80
|
+
}), "getChangeResourceRecordSetsPlugin");
|
|
81
|
+
|
|
82
|
+
// src/id-normalizer.ts
|
|
83
|
+
var IDENTIFIER_PARAMETERS = ["DelegationSetId", "HostedZoneId", "Id"];
|
|
84
|
+
function idNormalizerMiddleware() {
|
|
85
|
+
return (next) => async (args) => {
|
|
86
|
+
const input = { ...args.input };
|
|
87
|
+
for (const paramName of IDENTIFIER_PARAMETERS) {
|
|
88
|
+
const param = input[paramName];
|
|
89
|
+
if (param) {
|
|
90
|
+
input[paramName] = param.replace(IDENTIFIER_PREFIX_PATTERN, "");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return next({
|
|
94
|
+
...args,
|
|
95
|
+
input
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
__name(idNormalizerMiddleware, "idNormalizerMiddleware");
|
|
100
|
+
var idNormalizerMiddlewareOptions = {
|
|
101
|
+
step: "initialize",
|
|
102
|
+
tags: ["ROUTE53_IDS"],
|
|
103
|
+
name: "idNormalizerMiddleware",
|
|
104
|
+
override: true
|
|
105
|
+
};
|
|
106
|
+
var getIdNormalizerPlugin = /* @__PURE__ */ __name((unused) => ({
|
|
107
|
+
applyToStack: (clientStack) => {
|
|
108
|
+
clientStack.add(idNormalizerMiddleware(), idNormalizerMiddlewareOptions);
|
|
109
|
+
}
|
|
110
|
+
}), "getIdNormalizerPlugin");
|
|
111
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
112
|
+
0 && (module.exports = {
|
|
113
|
+
changeResourceRecordSetsMiddleware,
|
|
114
|
+
changeResourceRecordSetsMiddlewareOptions,
|
|
115
|
+
getChangeResourceRecordSetsPlugin,
|
|
116
|
+
getIdNormalizerPlugin,
|
|
117
|
+
idNormalizerMiddleware,
|
|
118
|
+
idNormalizerMiddlewareOptions
|
|
119
|
+
});
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/middleware-sdk-route53",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.495.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
6
|
-
"build:cjs": "
|
|
6
|
+
"build:cjs": "node ../../scripts/compilation/inline middleware-sdk-route53",
|
|
7
7
|
"build:es": "tsc -p tsconfig.es.json",
|
|
8
8
|
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
|
|
9
9
|
"build:types": "tsc -p tsconfig.types.json",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@aws-sdk/types": "3.
|
|
25
|
-
"@smithy/types": "^2.
|
|
24
|
+
"@aws-sdk/types": "3.495.0",
|
|
25
|
+
"@smithy/types": "^2.9.0",
|
|
26
26
|
"tslib": "^2.5.0"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|