@aws-sdk/xml-builder
Advanced tools
@@ -1,5 +0,4 @@ | ||
| 'use strict'; | ||
| const { parseXML } = require("./xml-parser"); | ||
| exports.parseXML = parseXML; | ||
| var xmlParser = require('./xml-parser'); | ||
| const ATTR_ESCAPE_RE = /[&<>"]/g; | ||
@@ -129,4 +128,3 @@ const ATTR_ESCAPE_MAP = { | ||
| exports.parseXML = xmlParser.parseXML; | ||
| exports.XmlNode = XmlNode; | ||
| exports.XmlText = XmlText; |
@@ -1,5 +0,2 @@ | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.EntityDecoderImpl = exports.CURRENCY = exports.COMMON_HTML = exports.XML = void 0; | ||
| exports.XML = { | ||
| const XML = { | ||
| amp: "&", | ||
@@ -11,2 +8,3 @@ apos: "'", | ||
| }; | ||
| exports.XML = XML; | ||
| exports.COMMON_HTML = { | ||
@@ -114,3 +112,3 @@ nbsp: "\u00a0", | ||
| } | ||
| const EntityDecoderImpl = class EntityDecoderImpl { | ||
| exports.EntityDecoderImpl = class EntityDecoderImpl { | ||
| _limit; | ||
@@ -139,3 +137,3 @@ _maxTotalExpansions; | ||
| this._numericAllowed = options.numericAllowed ?? true; | ||
| this._baseMap = mergeEntityMaps(exports.XML, options.namedEntities || null); | ||
| this._baseMap = mergeEntityMaps(XML, options.namedEntities || null); | ||
| this._externalMap = Object.create(null); | ||
@@ -339,2 +337,1 @@ this._inputMap = Object.create(null); | ||
| }; | ||
| exports.EntityDecoderImpl = EntityDecoderImpl; |
@@ -1,6 +0,3 @@ | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.parseXML = parseXML; | ||
| let parser; | ||
| function parseXML(xmlString) { | ||
| exports.parseXML = function parseXML(xmlString) { | ||
| if (!parser) { | ||
@@ -60,2 +57,2 @@ parser = new DOMParser(); | ||
| }; | ||
| } | ||
| }; |
@@ -1,8 +0,5 @@ | ||
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.parseXML = parseXML; | ||
| const fast_xml_parser_1 = require("fast-xml-parser"); | ||
| const nodable_entities_1 = require("./xml-external/nodable_entities"); | ||
| const entityDecoder = new nodable_entities_1.EntityDecoderImpl({ | ||
| namedEntities: { ...nodable_entities_1.XML, ...nodable_entities_1.COMMON_HTML, ...nodable_entities_1.CURRENCY }, | ||
| const { XMLParser } = require("fast-xml-parser"); | ||
| const { COMMON_HTML, CURRENCY, EntityDecoderImpl, XML } = require("./xml-external/nodable_entities"); | ||
| const entityDecoder = new EntityDecoderImpl({ | ||
| namedEntities: { ...XML, ...COMMON_HTML, ...CURRENCY }, | ||
| numericAllowed: true, | ||
@@ -16,3 +13,3 @@ limit: { | ||
| }); | ||
| const parser = new fast_xml_parser_1.XMLParser({ | ||
| const parser = new XMLParser({ | ||
| attributeNamePrefix: "", | ||
@@ -46,4 +43,4 @@ processEntities: { | ||
| }); | ||
| function parseXML(xmlString) { | ||
| exports.parseXML = function parseXML(xmlString) { | ||
| return parser.parse(xmlString, true); | ||
| } | ||
| }; |
+4
-4
| { | ||
| "name": "@aws-sdk/xml-builder", | ||
| "version": "3.972.29", | ||
| "version": "3.972.30", | ||
| "description": "XML utilities for the AWS SDK", | ||
@@ -13,7 +13,7 @@ "dependencies": { | ||
| "build:cjs": "node ../../scripts/compilation/inline", | ||
| "build:es": "tsc -p tsconfig.es.json", | ||
| "build:es": "premove dist-es && tsc -p tsconfig.es.json", | ||
| "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"", | ||
| "build:types": "tsc -p tsconfig.types.json", | ||
| "build:types": "premove dist-types && tsc -p tsconfig.types.json", | ||
| "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", | ||
| "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", | ||
| "clean": "premove dist-cjs dist-es dist-types", | ||
| "test": "yarn g:vitest run", | ||
@@ -20,0 +20,0 @@ "test:watch": "yarn g:vitest watch" |
57802
-0.85%1397
-0.71%