Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: codegen for switch to fast-xml-parser #819

Merged
merged 4 commits into from
Feb 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions clients/client-auto-scaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-auto-scaling/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryAttachInstancesCommand(
input: AttachInstancesCommandInput,
Expand Down Expand Up @@ -9070,7 +9070,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-cloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,12 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0",
"uuid": "^3.4.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"@types/uuid": "^3.4.7",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-cloudformation/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";
import { v4 as generateIdempotencyToken } from "uuid";

export async function serializeAws_queryCancelUpdateStackCommand(
Expand Down Expand Up @@ -10330,7 +10330,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-cloudfront/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"@aws-sdk/xml-builder": "^1.0.0-alpha.4",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-cloudfront/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ import {
XmlNode as __XmlNode,
XmlText as __XmlText
} from "@aws-sdk/xml-builder";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_restXmlCreateCloudFrontOriginAccessIdentityCommand(
input: CreateCloudFrontOriginAccessIdentityCommandInput,
Expand Down Expand Up @@ -12229,7 +12229,12 @@ const collectBodyString = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-cloudsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-cloudsearch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryBuildSuggestersCommand(
input: BuildSuggestersCommandInput,
Expand Down Expand Up @@ -5498,7 +5498,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-cloudwatch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-cloudwatch/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryDeleteAlarmsCommand(
input: DeleteAlarmsCommandInput,
Expand Down Expand Up @@ -5751,7 +5751,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-docdb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-docdb/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryAddTagsToResourceCommand(
input: AddTagsToResourceCommandInput,
Expand Down Expand Up @@ -9480,7 +9480,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,12 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0",
"uuid": "^3.4.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"@types/uuid": "^3.4.7",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-ec2/protocols/Aws_ec2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2818,7 +2818,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";
import { v4 as generateIdempotencyToken } from "uuid";

export async function serializeAws_ec2AcceptReservedInstancesExchangeQuoteCommand(
Expand Down Expand Up @@ -70709,7 +70709,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-elastic-beanstalk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-elastic-beanstalk/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryAbortEnvironmentUpdateCommand(
input: AbortEnvironmentUpdateCommandInput,
Expand Down Expand Up @@ -8569,7 +8569,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-elastic-load-balancing-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryAddListenerCertificatesCommand(
input: AddListenerCertificatesCommandInput,
Expand Down Expand Up @@ -8585,7 +8585,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-elastic-load-balancing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
9 changes: 7 additions & 2 deletions clients/client-elastic-load-balancing/protocols/Aws_query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ import {
ResponseMetadata as __ResponseMetadata,
SerdeContext as __SerdeContext
} from "@aws-sdk/types";
import { parse as pixlParse } from "pixl-xml";
import { parse as xmlParse } from "fast-xml-parser";

export async function serializeAws_queryAddTagsCommand(
input: AddTagsCommandInput,
Expand Down Expand Up @@ -5992,7 +5992,12 @@ const buildHttpRpcRequest = (
const parseBody = (streamBody: any, context: __SerdeContext): any => {
return collectBodyString(streamBody, context).then(encoded => {
if (encoded.length) {
return pixlParse(encoded);
const parsedObj = xmlParse(encoded, {
attributeNamePrefix: "",
ignoreAttributes: false,
parseNodeValue: false
});
return parsedObj[Object.keys(parsedObj)[0]];
}
return {};
});
Expand Down
3 changes: 1 addition & 2 deletions clients/client-elasticache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@
"@aws-sdk/util-user-agent-node": "^1.0.0-alpha.7",
"@aws-sdk/util-utf8-browser": "^1.0.0-alpha.2",
"@aws-sdk/util-utf8-node": "^1.0.0-alpha.2",
"pixl-xml": "^1.0.13",
"fast-xml-parser": "^3.16.0",
"tslib": "^1.8.0"
},
"devDependencies": {
"@types/node": "^12.7.5",
"@types/pixl-xml": "^1.0.1",
"rimraf": "^3.0.0",
"tslib": "^1.8.0",
"typedoc": "^0.15.0",
Expand Down
Loading