@jjrawlins/cdk-diff-pr-github-action 1.9.0 → 1.9.2
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.
- package/.jsii +4 -4
- package/cdkdiffprgithubaction/CdkDiffStackWorkflowProps.go +18 -0
- package/cdkdiffprgithubaction/CdkDriftDetectionWorkflowProps.go +12 -0
- package/cdkdiffprgithubaction/README.md +29 -0
- package/cdkdiffprgithubaction/go.mod +1 -1
- package/cdkdiffprgithubaction/jsii/jsii.go +2 -2
- package/cdkdiffprgithubaction/version +1 -1
- package/lib/CdkDiffIamTemplate.js +2 -2
- package/lib/CdkDiffIamTemplateStackSet.js +2 -2
- package/lib/CdkDiffStackWorkflow.js +1 -1
- package/lib/CdkDriftDetectionWorkflow.js +1 -1
- package/lib/CdkDriftIamTemplate.js +2 -2
- package/node_modules/@aws-sdk/client-cloudformation/package.json +13 -13
- package/node_modules/@aws-sdk/core/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/package.json +12 -12
- package/node_modules/@aws-sdk/token-providers/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +36 -19
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedTypeScriptVersion.js +9 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPaths.js +17 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +17 -12
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedTypeScriptVersion.d.ts +8 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getTypeScriptPackageJsonPaths.d.ts +10 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedTypeScriptVersion.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPaths.d.ts +3 -0
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +1 -0
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +1 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +23 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +15 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +3 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +16 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +1 -26
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +87 -87
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +10 -10
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +23 -23
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +29 -29
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +39 -39
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +17 -17
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +22 -22
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +85 -85
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +34 -34
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +5 -284
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +1 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +2 -0
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +27 -5
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +21 -21
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +38 -34
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +10 -10
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2 -8
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -8
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +18 -4
- package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +18 -4
- package/node_modules/@smithy/fetch-http-handler/package.json +1 -1
- package/node_modules/@smithy/middleware-endpoint/package.json +2 -2
- package/node_modules/@smithy/middleware-retry/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +21 -8
- package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +16 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +3 -4
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +3 -4
- package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +9 -0
- package/node_modules/@smithy/node-http-handler/package.json +1 -1
- package/node_modules/@smithy/smithy-client/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
- package/node_modules/@smithy/util-stream/package.json +3 -3
- package/node_modules/fast-xml-builder/LICENSE +21 -0
- package/node_modules/fast-xml-builder/README.md +23 -0
- package/node_modules/fast-xml-builder/lib/builder.cjs +1 -0
- package/node_modules/fast-xml-builder/lib/builder.min.js +2 -0
- package/node_modules/fast-xml-builder/lib/builder.min.js.map +1 -0
- package/node_modules/fast-xml-builder/lib/fxb.d.cts +167 -0
- package/node_modules/fast-xml-builder/package.json +78 -0
- package/node_modules/fast-xml-builder/src/fxb.d.ts +156 -0
- package/node_modules/fast-xml-builder/src/fxb.js +285 -0
- package/node_modules/fast-xml-builder/src/ignoreAttributes.js +18 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder → fast-xml-builder/src}/orderedJs2Xml.js +14 -3
- package/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
- package/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPath.js +0 -14
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getTypeScriptPackageJsonPath.d.ts +0 -9
- package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPath.d.ts +0 -1
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/prettifyJs2Xml.js → fast-xml-builder/CHANGELOG.md} +0 -0
package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js
CHANGED
|
@@ -10,8 +10,8 @@ const METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
|
|
|
10
10
|
* @param {any} options
|
|
11
11
|
* @returns
|
|
12
12
|
*/
|
|
13
|
-
export default function prettify(node, options){
|
|
14
|
-
return compress(
|
|
13
|
+
export default function prettify(node, options) {
|
|
14
|
+
return compress(node, options);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -21,78 +21,82 @@ export default function prettify(node, options){
|
|
|
21
21
|
* @param {string} jPath
|
|
22
22
|
* @returns object
|
|
23
23
|
*/
|
|
24
|
-
function compress(arr, options, jPath){
|
|
24
|
+
function compress(arr, options, jPath) {
|
|
25
25
|
let text;
|
|
26
|
-
const compressedObj = {};
|
|
26
|
+
const compressedObj = {}; //This is intended to be a plain object
|
|
27
27
|
for (let i = 0; i < arr.length; i++) {
|
|
28
28
|
const tagObj = arr[i];
|
|
29
29
|
const property = propName(tagObj);
|
|
30
30
|
let newJpath = "";
|
|
31
|
-
if(jPath === undefined) newJpath = property;
|
|
31
|
+
if (jPath === undefined) newJpath = property;
|
|
32
32
|
else newJpath = jPath + "." + property;
|
|
33
33
|
|
|
34
|
-
if(property === options.textNodeName){
|
|
35
|
-
if(text === undefined) text = tagObj[property];
|
|
34
|
+
if (property === options.textNodeName) {
|
|
35
|
+
if (text === undefined) text = tagObj[property];
|
|
36
36
|
else text += "" + tagObj[property];
|
|
37
|
-
}else if(property === undefined){
|
|
37
|
+
} else if (property === undefined) {
|
|
38
38
|
continue;
|
|
39
|
-
}else if(tagObj[property]){
|
|
40
|
-
|
|
39
|
+
} else if (tagObj[property]) {
|
|
40
|
+
|
|
41
41
|
let val = compress(tagObj[property], options, newJpath);
|
|
42
42
|
const isLeaf = isLeafTag(val, options);
|
|
43
|
-
if (tagObj[METADATA_SYMBOL] !== undefined) {
|
|
44
|
-
val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata
|
|
45
|
-
}
|
|
46
43
|
|
|
47
|
-
if(tagObj[":@"]){
|
|
48
|
-
assignAttributes(
|
|
49
|
-
}else if(Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode){
|
|
44
|
+
if (tagObj[":@"]) {
|
|
45
|
+
assignAttributes(val, tagObj[":@"], newJpath, options);
|
|
46
|
+
} else if (Object.keys(val).length === 1 && val[options.textNodeName] !== undefined && !options.alwaysCreateTextNode) {
|
|
50
47
|
val = val[options.textNodeName];
|
|
51
|
-
}else if(Object.keys(val).length === 0){
|
|
52
|
-
if(options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
48
|
+
} else if (Object.keys(val).length === 0) {
|
|
49
|
+
if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
53
50
|
else val = "";
|
|
54
51
|
}
|
|
55
52
|
|
|
56
|
-
if(
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
if (tagObj[METADATA_SYMBOL] !== undefined && typeof val === "object" && val !== null) {
|
|
54
|
+
val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL]; // copy over metadata
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if (compressedObj[property] !== undefined && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
|
|
59
|
+
if (!Array.isArray(compressedObj[property])) {
|
|
60
|
+
compressedObj[property] = [compressedObj[property]];
|
|
59
61
|
}
|
|
60
62
|
compressedObj[property].push(val);
|
|
61
|
-
}else{
|
|
63
|
+
} else {
|
|
62
64
|
//TODO: if a node is not an array, then check if it should be an array
|
|
63
65
|
//also determine if it is a leaf node
|
|
64
|
-
if (options.isArray(property, newJpath, isLeaf
|
|
66
|
+
if (options.isArray(property, newJpath, isLeaf)) {
|
|
65
67
|
compressedObj[property] = [val];
|
|
66
|
-
}else{
|
|
68
|
+
} else {
|
|
67
69
|
compressedObj[property] = val;
|
|
68
70
|
}
|
|
69
71
|
}
|
|
70
72
|
}
|
|
71
|
-
|
|
73
|
+
|
|
72
74
|
}
|
|
73
75
|
// if(text && text.length > 0) compressedObj[options.textNodeName] = text;
|
|
74
|
-
if(typeof text === "string"){
|
|
75
|
-
if(text.length > 0) compressedObj[options.textNodeName] = text;
|
|
76
|
-
}else if(text !== undefined) compressedObj[options.textNodeName] = text;
|
|
76
|
+
if (typeof text === "string") {
|
|
77
|
+
if (text.length > 0) compressedObj[options.textNodeName] = text;
|
|
78
|
+
} else if (text !== undefined) compressedObj[options.textNodeName] = text;
|
|
79
|
+
|
|
80
|
+
|
|
77
81
|
return compressedObj;
|
|
78
82
|
}
|
|
79
83
|
|
|
80
|
-
function propName(obj){
|
|
84
|
+
function propName(obj) {
|
|
81
85
|
const keys = Object.keys(obj);
|
|
82
86
|
for (let i = 0; i < keys.length; i++) {
|
|
83
87
|
const key = keys[i];
|
|
84
|
-
if(key !== ":@") return key;
|
|
88
|
+
if (key !== ":@") return key;
|
|
85
89
|
}
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
function assignAttributes(obj, attrMap, jpath, options){
|
|
92
|
+
function assignAttributes(obj, attrMap, jpath, options) {
|
|
89
93
|
if (attrMap) {
|
|
90
94
|
const keys = Object.keys(attrMap);
|
|
91
95
|
const len = keys.length; //don't make it inline
|
|
92
96
|
for (let i = 0; i < len; i++) {
|
|
93
97
|
const atrrName = keys[i];
|
|
94
98
|
if (options.isArray(atrrName, jpath + "." + atrrName, true, true)) {
|
|
95
|
-
obj[atrrName] = [
|
|
99
|
+
obj[atrrName] = [attrMap[atrrName]];
|
|
96
100
|
} else {
|
|
97
101
|
obj[atrrName] = attrMap[atrrName];
|
|
98
102
|
}
|
|
@@ -100,10 +104,10 @@ function assignAttributes(obj, attrMap, jpath, options){
|
|
|
100
104
|
}
|
|
101
105
|
}
|
|
102
106
|
|
|
103
|
-
function isLeafTag(obj, options){
|
|
107
|
+
function isLeafTag(obj, options) {
|
|
104
108
|
const { textNodeName } = options;
|
|
105
109
|
const propCount = Object.keys(obj).length;
|
|
106
|
-
|
|
110
|
+
|
|
107
111
|
if (propCount === 0) {
|
|
108
112
|
return true;
|
|
109
113
|
}
|
package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js
CHANGED
|
@@ -8,23 +8,23 @@ if (typeof Symbol !== "function") {
|
|
|
8
8
|
METADATA_SYMBOL = Symbol("XML Node Metadata");
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export default class XmlNode{
|
|
11
|
+
export default class XmlNode {
|
|
12
12
|
constructor(tagname) {
|
|
13
13
|
this.tagname = tagname;
|
|
14
14
|
this.child = []; //nested tags, text, cdata, comments in order
|
|
15
|
-
this[":@"] =
|
|
15
|
+
this[":@"] = Object.create(null); //attributes map
|
|
16
16
|
}
|
|
17
|
-
add(key,val){
|
|
17
|
+
add(key, val) {
|
|
18
18
|
// this.child.push( {name : key, val: val, isCdata: isCdata });
|
|
19
|
-
if(key === "__proto__") key = "#__proto__";
|
|
20
|
-
this.child.push(
|
|
19
|
+
if (key === "__proto__") key = "#__proto__";
|
|
20
|
+
this.child.push({ [key]: val });
|
|
21
21
|
}
|
|
22
22
|
addChild(node, startIndex) {
|
|
23
|
-
if(node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
24
|
-
if(node[":@"] && Object.keys(node[":@"]).length > 0){
|
|
25
|
-
this.child.push(
|
|
26
|
-
}else{
|
|
27
|
-
this.child.push(
|
|
23
|
+
if (node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
24
|
+
if (node[":@"] && Object.keys(node[":@"]).length > 0) {
|
|
25
|
+
this.child.push({ [node.tagname]: node.child, [":@"]: node[":@"] });
|
|
26
|
+
} else {
|
|
27
|
+
this.child.push({ [node.tagname]: node.child });
|
|
28
28
|
}
|
|
29
29
|
// if requested, add the startIndex
|
|
30
30
|
if (startIndex !== undefined) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/xml-builder",
|
|
3
|
-
"version": "3.972.
|
|
3
|
+
"version": "3.972.9",
|
|
4
4
|
"description": "XML utilities for the AWS SDK",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@smithy/types": "^4.13.0",
|
|
7
|
-
"fast-xml-parser": "5.
|
|
7
|
+
"fast-xml-parser": "5.4.1",
|
|
8
8
|
"tslib": "^2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
@@ -929,24 +929,18 @@ class CborShapeDeserializer extends protocols.SerdeContext {
|
|
|
929
929
|
if (ns.isListSchema()) {
|
|
930
930
|
const newArray = [];
|
|
931
931
|
const memberSchema = ns.getValueSchema();
|
|
932
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
933
932
|
for (const item of value) {
|
|
934
933
|
const itemValue = this.readValue(memberSchema, item);
|
|
935
|
-
|
|
936
|
-
newArray.push(itemValue);
|
|
937
|
-
}
|
|
934
|
+
newArray.push(itemValue);
|
|
938
935
|
}
|
|
939
936
|
return newArray;
|
|
940
937
|
}
|
|
941
938
|
const newObject = {};
|
|
942
939
|
if (ns.isMapSchema()) {
|
|
943
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
944
940
|
const targetSchema = ns.getValueSchema();
|
|
945
941
|
for (const key of Object.keys(value)) {
|
|
946
942
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
947
|
-
|
|
948
|
-
newObject[key] = itemValue;
|
|
949
|
-
}
|
|
943
|
+
newObject[key] = itemValue;
|
|
950
944
|
}
|
|
951
945
|
}
|
|
952
946
|
else if (ns.isStructSchema()) {
|
|
@@ -154,24 +154,18 @@ export class CborShapeDeserializer extends SerdeContext {
|
|
|
154
154
|
if (ns.isListSchema()) {
|
|
155
155
|
const newArray = [];
|
|
156
156
|
const memberSchema = ns.getValueSchema();
|
|
157
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
158
157
|
for (const item of value) {
|
|
159
158
|
const itemValue = this.readValue(memberSchema, item);
|
|
160
|
-
|
|
161
|
-
newArray.push(itemValue);
|
|
162
|
-
}
|
|
159
|
+
newArray.push(itemValue);
|
|
163
160
|
}
|
|
164
161
|
return newArray;
|
|
165
162
|
}
|
|
166
163
|
const newObject = {};
|
|
167
164
|
if (ns.isMapSchema()) {
|
|
168
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
169
165
|
const targetSchema = ns.getValueSchema();
|
|
170
166
|
for (const key of Object.keys(value)) {
|
|
171
167
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
172
|
-
|
|
173
|
-
newObject[key] = itemValue;
|
|
174
|
-
}
|
|
168
|
+
newObject[key] = itemValue;
|
|
175
169
|
}
|
|
176
170
|
}
|
|
177
171
|
else if (ns.isStructSchema()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/core",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.7",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "yarn lint && concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline core",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@smithy/util-base64": "^4.3.1",
|
|
86
86
|
"@smithy/util-body-length-browser": "^4.2.1",
|
|
87
87
|
"@smithy/util-middleware": "^4.2.10",
|
|
88
|
-
"@smithy/util-stream": "^4.5.
|
|
88
|
+
"@smithy/util-stream": "^4.5.16",
|
|
89
89
|
"@smithy/util-utf8": "^4.2.1",
|
|
90
90
|
"@smithy/uuid": "^1.1.1",
|
|
91
91
|
"tslib": "^2.6.2"
|
|
@@ -54,8 +54,7 @@ class FetchHttpHandler {
|
|
|
54
54
|
const keepAlive = this.config.keepAlive === true;
|
|
55
55
|
const credentials = this.config.credentials;
|
|
56
56
|
if (abortSignal?.aborted) {
|
|
57
|
-
const abortError =
|
|
58
|
-
abortError.name = "AbortError";
|
|
57
|
+
const abortError = buildAbortError(abortSignal);
|
|
59
58
|
return Promise.reject(abortError);
|
|
60
59
|
}
|
|
61
60
|
let path = request.path;
|
|
@@ -130,8 +129,7 @@ class FetchHttpHandler {
|
|
|
130
129
|
if (abortSignal) {
|
|
131
130
|
raceOfPromises.push(new Promise((resolve, reject) => {
|
|
132
131
|
const onAbort = () => {
|
|
133
|
-
const abortError =
|
|
134
|
-
abortError.name = "AbortError";
|
|
132
|
+
const abortError = buildAbortError(abortSignal);
|
|
135
133
|
reject(abortError);
|
|
136
134
|
};
|
|
137
135
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -157,6 +155,22 @@ class FetchHttpHandler {
|
|
|
157
155
|
return this.config ?? {};
|
|
158
156
|
}
|
|
159
157
|
}
|
|
158
|
+
function buildAbortError(abortSignal) {
|
|
159
|
+
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
160
|
+
? abortSignal.reason
|
|
161
|
+
: undefined;
|
|
162
|
+
if (reason) {
|
|
163
|
+
if (reason instanceof Error) {
|
|
164
|
+
return reason;
|
|
165
|
+
}
|
|
166
|
+
const abortError = new Error(String(reason));
|
|
167
|
+
abortError.name = "AbortError";
|
|
168
|
+
return abortError;
|
|
169
|
+
}
|
|
170
|
+
const abortError = new Error("Request aborted");
|
|
171
|
+
abortError.name = "AbortError";
|
|
172
|
+
return abortError;
|
|
173
|
+
}
|
|
160
174
|
|
|
161
175
|
const streamCollector = async (stream) => {
|
|
162
176
|
if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") {
|
|
@@ -36,8 +36,7 @@ export class FetchHttpHandler {
|
|
|
36
36
|
const keepAlive = this.config.keepAlive === true;
|
|
37
37
|
const credentials = this.config.credentials;
|
|
38
38
|
if (abortSignal?.aborted) {
|
|
39
|
-
const abortError =
|
|
40
|
-
abortError.name = "AbortError";
|
|
39
|
+
const abortError = buildAbortError(abortSignal);
|
|
41
40
|
return Promise.reject(abortError);
|
|
42
41
|
}
|
|
43
42
|
let path = request.path;
|
|
@@ -112,8 +111,7 @@ export class FetchHttpHandler {
|
|
|
112
111
|
if (abortSignal) {
|
|
113
112
|
raceOfPromises.push(new Promise((resolve, reject) => {
|
|
114
113
|
const onAbort = () => {
|
|
115
|
-
const abortError =
|
|
116
|
-
abortError.name = "AbortError";
|
|
114
|
+
const abortError = buildAbortError(abortSignal);
|
|
117
115
|
reject(abortError);
|
|
118
116
|
};
|
|
119
117
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -139,3 +137,19 @@ export class FetchHttpHandler {
|
|
|
139
137
|
return this.config ?? {};
|
|
140
138
|
}
|
|
141
139
|
}
|
|
140
|
+
function buildAbortError(abortSignal) {
|
|
141
|
+
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
142
|
+
? abortSignal.reason
|
|
143
|
+
: undefined;
|
|
144
|
+
if (reason) {
|
|
145
|
+
if (reason instanceof Error) {
|
|
146
|
+
return reason;
|
|
147
|
+
}
|
|
148
|
+
const abortError = new Error(String(reason));
|
|
149
|
+
abortError.name = "AbortError";
|
|
150
|
+
return abortError;
|
|
151
|
+
}
|
|
152
|
+
const abortError = new Error("Request aborted");
|
|
153
|
+
abortError.name = "AbortError";
|
|
154
|
+
return abortError;
|
|
155
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.21",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-endpoint",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.23.
|
|
28
|
+
"@smithy/core": "^3.23.7",
|
|
29
29
|
"@smithy/middleware-serde": "^4.2.11",
|
|
30
30
|
"@smithy/node-config-provider": "^4.3.10",
|
|
31
31
|
"@smithy/shared-ini-file-loader": "^4.4.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.38",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline middleware-retry",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@smithy/node-config-provider": "^4.3.10",
|
|
38
38
|
"@smithy/protocol-http": "^5.3.10",
|
|
39
39
|
"@smithy/service-error-classification": "^4.2.10",
|
|
40
|
-
"@smithy/smithy-client": "^4.12.
|
|
40
|
+
"@smithy/smithy-client": "^4.12.1",
|
|
41
41
|
"@smithy/types": "^4.13.0",
|
|
42
42
|
"@smithy/util-middleware": "^4.2.10",
|
|
43
43
|
"@smithy/util-retry": "^4.2.10",
|
|
@@ -7,6 +7,23 @@ var https = require('https');
|
|
|
7
7
|
var stream = require('stream');
|
|
8
8
|
var http2 = require('http2');
|
|
9
9
|
|
|
10
|
+
function buildAbortError(abortSignal) {
|
|
11
|
+
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
12
|
+
? abortSignal.reason
|
|
13
|
+
: undefined;
|
|
14
|
+
if (reason) {
|
|
15
|
+
if (reason instanceof Error) {
|
|
16
|
+
return reason;
|
|
17
|
+
}
|
|
18
|
+
const abortError = new Error(String(reason));
|
|
19
|
+
abortError.name = "AbortError";
|
|
20
|
+
return abortError;
|
|
21
|
+
}
|
|
22
|
+
const abortError = new Error("Request aborted");
|
|
23
|
+
abortError.name = "AbortError";
|
|
24
|
+
return abortError;
|
|
25
|
+
}
|
|
26
|
+
|
|
10
27
|
const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
|
|
11
28
|
|
|
12
29
|
const getTransformedHeaders = (headers) => {
|
|
@@ -287,8 +304,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
287
304
|
_reject(arg);
|
|
288
305
|
};
|
|
289
306
|
if (abortSignal?.aborted) {
|
|
290
|
-
const abortError =
|
|
291
|
-
abortError.name = "AbortError";
|
|
307
|
+
const abortError = buildAbortError(abortSignal);
|
|
292
308
|
reject(abortError);
|
|
293
309
|
return;
|
|
294
310
|
}
|
|
@@ -356,8 +372,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
356
372
|
if (abortSignal) {
|
|
357
373
|
const onAbort = () => {
|
|
358
374
|
req.destroy();
|
|
359
|
-
const abortError =
|
|
360
|
-
abortError.name = "AbortError";
|
|
375
|
+
const abortError = buildAbortError(abortSignal);
|
|
361
376
|
reject(abortError);
|
|
362
377
|
};
|
|
363
378
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -570,8 +585,7 @@ class NodeHttp2Handler {
|
|
|
570
585
|
};
|
|
571
586
|
if (abortSignal?.aborted) {
|
|
572
587
|
fulfilled = true;
|
|
573
|
-
const abortError =
|
|
574
|
-
abortError.name = "AbortError";
|
|
588
|
+
const abortError = buildAbortError(abortSignal);
|
|
575
589
|
reject(abortError);
|
|
576
590
|
return;
|
|
577
591
|
}
|
|
@@ -633,8 +647,7 @@ class NodeHttp2Handler {
|
|
|
633
647
|
if (abortSignal) {
|
|
634
648
|
const onAbort = () => {
|
|
635
649
|
req.close();
|
|
636
|
-
const abortError =
|
|
637
|
-
abortError.name = "AbortError";
|
|
650
|
+
const abortError = buildAbortError(abortSignal);
|
|
638
651
|
rejectWithDestroy(abortError);
|
|
639
652
|
};
|
|
640
653
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export function buildAbortError(abortSignal) {
|
|
2
|
+
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
3
|
+
? abortSignal.reason
|
|
4
|
+
: undefined;
|
|
5
|
+
if (reason) {
|
|
6
|
+
if (reason instanceof Error) {
|
|
7
|
+
return reason;
|
|
8
|
+
}
|
|
9
|
+
const abortError = new Error(String(reason));
|
|
10
|
+
abortError.name = "AbortError";
|
|
11
|
+
return abortError;
|
|
12
|
+
}
|
|
13
|
+
const abortError = new Error("Request aborted");
|
|
14
|
+
abortError.name = "AbortError";
|
|
15
|
+
return abortError;
|
|
16
|
+
}
|
|
@@ -2,6 +2,7 @@ import { HttpResponse } from "@smithy/protocol-http";
|
|
|
2
2
|
import { buildQueryString } from "@smithy/querystring-builder";
|
|
3
3
|
import { Agent as hAgent, request as hRequest } from "http";
|
|
4
4
|
import { Agent as hsAgent, request as hsRequest } from "https";
|
|
5
|
+
import { buildAbortError } from "./build-abort-error";
|
|
5
6
|
import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants";
|
|
6
7
|
import { getTransformedHeaders } from "./get-transformed-headers";
|
|
7
8
|
import { setConnectionTimeout } from "./set-connection-timeout";
|
|
@@ -110,8 +111,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
110
111
|
_reject(arg);
|
|
111
112
|
};
|
|
112
113
|
if (abortSignal?.aborted) {
|
|
113
|
-
const abortError =
|
|
114
|
-
abortError.name = "AbortError";
|
|
114
|
+
const abortError = buildAbortError(abortSignal);
|
|
115
115
|
reject(abortError);
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
@@ -179,8 +179,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
179
179
|
if (abortSignal) {
|
|
180
180
|
const onAbort = () => {
|
|
181
181
|
req.destroy();
|
|
182
|
-
const abortError =
|
|
183
|
-
abortError.name = "AbortError";
|
|
182
|
+
const abortError = buildAbortError(abortSignal);
|
|
184
183
|
reject(abortError);
|
|
185
184
|
};
|
|
186
185
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HttpResponse } from "@smithy/protocol-http";
|
|
2
2
|
import { buildQueryString } from "@smithy/querystring-builder";
|
|
3
3
|
import { constants } from "http2";
|
|
4
|
+
import { buildAbortError } from "./build-abort-error";
|
|
4
5
|
import { getTransformedHeaders } from "./get-transformed-headers";
|
|
5
6
|
import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager";
|
|
6
7
|
import { writeRequestBody } from "./write-request-body";
|
|
@@ -55,8 +56,7 @@ export class NodeHttp2Handler {
|
|
|
55
56
|
};
|
|
56
57
|
if (abortSignal?.aborted) {
|
|
57
58
|
fulfilled = true;
|
|
58
|
-
const abortError =
|
|
59
|
-
abortError.name = "AbortError";
|
|
59
|
+
const abortError = buildAbortError(abortSignal);
|
|
60
60
|
reject(abortError);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
@@ -118,8 +118,7 @@ export class NodeHttp2Handler {
|
|
|
118
118
|
if (abortSignal) {
|
|
119
119
|
const onAbort = () => {
|
|
120
120
|
req.close();
|
|
121
|
-
const abortError =
|
|
122
|
-
abortError.name = "AbortError";
|
|
121
|
+
const abortError = buildAbortError(abortSignal);
|
|
123
122
|
rejectWithDestroy(abortError);
|
|
124
123
|
};
|
|
125
124
|
if (typeof abortSignal.addEventListener === "function") {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds an abort error, using the AbortSignal's reason if available.
|
|
3
|
+
*
|
|
4
|
+
* @param abortSignal - Optional AbortSignal that may contain a reason.
|
|
5
|
+
* @returns An Error with name "AbortError". If the signal has a reason that's
|
|
6
|
+
* already an Error, returns it directly. Otherwise creates a new Error
|
|
7
|
+
* with the reason as the message, or "Request aborted" if no reason.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildAbortError(abortSignal?: unknown): Error;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds an abort error, using the AbortSignal's reason if available.
|
|
3
|
+
*
|
|
4
|
+
* @param abortSignal - Optional AbortSignal that may contain a reason.
|
|
5
|
+
* @returns An Error with name "AbortError". If the signal has a reason that's
|
|
6
|
+
* already an Error, returns it directly. Otherwise creates a new Error
|
|
7
|
+
* with the reason as the message, or "Request aborted" if no reason.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildAbortError(abortSignal?: unknown): Error;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/smithy-client",
|
|
3
|
-
"version": "4.12.
|
|
3
|
+
"version": "4.12.1",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline smithy-client",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.23.
|
|
31
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
30
|
+
"@smithy/core": "^3.23.7",
|
|
31
|
+
"@smithy/middleware-endpoint": "^4.4.21",
|
|
32
32
|
"@smithy/middleware-stack": "^4.2.10",
|
|
33
33
|
"@smithy/protocol-http": "^5.3.10",
|
|
34
34
|
"@smithy/types": "^4.13.0",
|
|
35
|
-
"@smithy/util-stream": "^4.5.
|
|
35
|
+
"@smithy/util-stream": "^4.5.16",
|
|
36
36
|
"tslib": "^2.6.2"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/util-defaults-mode-browser",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.37",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline util-defaults-mode-browser",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@smithy/property-provider": "^4.2.10",
|
|
28
|
-
"@smithy/smithy-client": "^4.12.
|
|
28
|
+
"@smithy/smithy-client": "^4.12.1",
|
|
29
29
|
"@smithy/types": "^4.13.0",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/util-defaults-mode-node",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.40",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline util-defaults-mode-node",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@smithy/credential-provider-imds": "^4.2.10",
|
|
29
29
|
"@smithy/node-config-provider": "^4.3.10",
|
|
30
30
|
"@smithy/property-provider": "^4.2.10",
|
|
31
|
-
"@smithy/smithy-client": "^4.12.
|
|
31
|
+
"@smithy/smithy-client": "^4.12.1",
|
|
32
32
|
"@smithy/types": "^4.13.0",
|
|
33
33
|
"tslib": "^2.6.2"
|
|
34
34
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/util-stream",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.16",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
|
|
6
6
|
"build:cjs": "node ../../scripts/inline util-stream",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"license": "Apache-2.0",
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@smithy/fetch-http-handler": "^5.3.
|
|
33
|
-
"@smithy/node-http-handler": "^4.4.
|
|
32
|
+
"@smithy/fetch-http-handler": "^5.3.12",
|
|
33
|
+
"@smithy/node-http-handler": "^4.4.13",
|
|
34
34
|
"@smithy/types": "^4.13.0",
|
|
35
35
|
"@smithy/util-base64": "^4.3.1",
|
|
36
36
|
"@smithy/util-buffer-from": "^4.2.1",
|