@cdklabs/cdk-ecs-codedeploy 0.0.431 → 0.0.432
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 +3 -3
- package/.jsii.tabl.json +1 -1
- package/lib/api-canary/index.js +1 -1
- package/lib/ecs-appspec/index.js +1 -1
- package/lib/ecs-deployment/index.js +1 -1
- package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
- package/node_modules/@aws-sdk/client-codedeploy/package.json +38 -38
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +7 -15
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +7 -15
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +2 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +5 -7
- package/node_modules/@aws-sdk/core/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +9 -9
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +4 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -7
- package/node_modules/@aws-sdk/nested-clients/package.json +38 -36
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
- package/node_modules/@aws-sdk/util-user-agent-browser/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 +5 -5
- 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/package.json +3 -3
- package/node_modules/@smithy/abort-controller/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +6 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +2 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -8
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +1 -1
- package/node_modules/@smithy/core/package.json +11 -11
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- 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 +6 -6
- package/node_modules/@smithy/hash-node/package.json +4 -4
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/is-array-buffer/package.json +2 -2
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/package.json +9 -9
- package/node_modules/@smithy/middleware-serde/package.json +3 -3
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- 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 +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +3 -3
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +8 -8
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-base64/package.json +4 -4
- package/node_modules/@smithy/util-body-length-browser/package.json +2 -2
- package/node_modules/@smithy/util-body-length-node/package.json +2 -2
- package/node_modules/@smithy/util-buffer-from/package.json +3 -3
- package/node_modules/@smithy/util-config-provider/package.json +2 -2
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-hex-encoding/package.json +2 -2
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +8 -8
- package/node_modules/@smithy/util-uri-escape/package.json +2 -2
- package/node_modules/@smithy/util-utf8/package.json +3 -3
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/@smithy/uuid/package.json +2 -2
- 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/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js → fast-xml-builder/src/fxb.js} +50 -50
- 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/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/CHANGELOG.md +23 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/lib/fxp.d.cts +15 -1
- package/node_modules/fast-xml-parser/lib/fxp.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js +2 -0
- package/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/package.json +3 -2
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/fxp.d.ts +16 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/fxp.js +1 -1
- package/node_modules/fast-xml-parser/src/ignoreAttributes.js +18 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/util.js +1 -26
- package/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +106 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OptionsBuilder.js +10 -10
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/BaseOutputBuilder.js +23 -23
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsArrBuilder.js +29 -29
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsObjBuilder.js +39 -39
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/ParserOptionsBuilder.js +17 -17
- package/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XMLParser.js +22 -22
- package/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +105 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/validator.js +34 -34
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +6 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/DocTypeReader.js +1 -1
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/OptionsBuilder.js +2 -0
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/OrderedObjParser.js +27 -5
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/XMLParser.js +21 -21
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/node2json.js +38 -34
- package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/xmlparser/xmlNode.js +10 -10
- package/package.json +6 -6
- 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/lib/fxbuilder.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
- package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js → fast-xml-builder/CHANGELOG.md} +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-builder}/src/ignoreAttributes.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder → fast-xml-builder/src}/prettifyJs2Xml.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/LICENSE +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/README.md +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/cli.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/man.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/cli/read.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/CharsSymbol.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/TagPath.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/TagPathMatcher.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/Xml2JsParser.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XmlPartReader.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/XmlSpecialTagsReader.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/inputSource/BufferSource.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/inputSource/StringSource.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/booleanParser.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/booleanParserExt.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/currency.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/join.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/number.js +0 -0
- /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser → fast-xml-parser}/src/v6/valueParsers/trim.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"./lib/buil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uilder/webpack/universalModuleDefinition","webpack://fxpBuilder/webpack/bootstrap","webpack://fxpBuilder/webpack/runtime/define property getters","webpack://fxpBuilder/webpack/runtime/hasOwnProperty shorthand","webpack://fxpBuilder/webpack/runtime/make namespace object","webpack://fxpBuilder/./src/orderedJs2Xml.js","webpack://fxpBuilder/./src/builder.js","webpack://fxpBuilder/./src/ignoreAttributes.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"fxpBuilder\"] = factory();\n\telse\n\t\troot[\"fxpBuilder\"] = factory();\n})(this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nexport default function toXml(jArray, options) {\n let indentation = \"\";\n if (options.format && options.indentBy.length > 0) {\n indentation = EOL;\n }\n return arrToStr(jArray, options, \"\", indentation);\n}\n\nfunction arrToStr(arr, options, jPath, indentation) {\n let xmlStr = \"\";\n let isPreviousElementTag = false;\n\n\n if (!Array.isArray(arr)) {\n // Non-array values (e.g. string tag values) should be treated as text content\n if (arr !== undefined && arr !== null) {\n let text = arr.toString();\n text = replaceEntitiesValue(text, options);\n return text;\n }\n return \"\";\n }\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n if (tagName === undefined) continue;\n\n let newJPath = \"\";\n if (jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if (tagName === options.textNodeName) {\n let tagText = tagObj[tagName];\n if (!isStopNode(newJPath, options)) {\n tagText = options.tagValueProcessor(tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += tagText;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.cdataPropName) {\n if (isPreviousElementTag) {\n xmlStr += indentation;\n }\n xmlStr += `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n isPreviousElementTag = false;\n continue;\n } else if (tagName === options.commentPropName) {\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n isPreviousElementTag = true;\n continue;\n } else if (tagName[0] === \"?\") {\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n isPreviousElementTag = true;\n continue;\n }\n let newIdentation = indentation;\n if (newIdentation !== \"\") {\n newIdentation += options.indentBy;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tagStart = indentation + `<${tagName}${attStr}`;\n const tagValue = arrToStr(tagObj[tagName], options, newJPath, newIdentation);\n if (options.unpairedTags.indexOf(tagName) !== -1) {\n if (options.suppressUnpairedNode) xmlStr += tagStart + \">\";\n else xmlStr += tagStart + \"/>\";\n } else if ((!tagValue || tagValue.length === 0) && options.suppressEmptyNode) {\n xmlStr += tagStart + \"/>\";\n } else if (tagValue && tagValue.endsWith(\">\")) {\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>`;\n } else {\n xmlStr += tagStart + \">\";\n if (tagValue && indentation !== \"\" && (tagValue.includes(\"/>\") || tagValue.includes(\"</\"))) {\n xmlStr += indentation + options.indentBy + tagValue + indentation;\n } else {\n xmlStr += tagValue;\n }\n xmlStr += `</${tagName}>`;\n }\n isPreviousElementTag = true;\n }\n\n return xmlStr;\n}\n\nfunction propName(obj) {\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;\n if (key !== \":@\") return key;\n }\n}\n\nfunction attr_to_str(attrMap, options) {\n let attrStr = \"\";\n if (attrMap && !options.ignoreAttributes) {\n for (let attr in attrMap) {\n if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if (attrVal === true && options.suppressBooleanAttributes) {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;\n } else {\n attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options) {\n jPath = jPath.substr(0, jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for (let index in options.stopNodes) {\n if (options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\" + tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options) {\n if (textValue && textValue.length > 0 && options.processEntities) {\n for (let i = 0; i < options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n","'use strict';\n//parse Empty Node as self closing node\nimport buildFromOrderedJs from './orderedJs2Xml.js';\nimport getIgnoreAttributesFn from \"./ignoreAttributes.js\";\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function (key, a) {\n return a;\n },\n attributeValueProcessor: function (attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nexport default function Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {\n this.isAttribute = function (/*a*/) {\n return false;\n };\n } else {\n this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function () {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function (jObj) {\n if (this.options.preserveOrder) {\n return buildFromOrderedJs(jObj, this.options);\n } else {\n if (Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1) {\n jObj = {\n [this.options.arrayNodeName]: jObj\n }\n }\n return this.j2x(jObj, 0, []).val;\n }\n};\n\nBuilder.prototype.j2x = function (jObj, level, ajPath) {\n let attrStr = '';\n let val = '';\n const jPath = ajPath.join('.')\n for (let key in jObj) {\n if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key === this.options.cdataPropName) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr && !this.ignoreAttributesFn(attr, jPath)) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n } else if (!attr) {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if (key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if (this.options.oneListGroup) {\n const result = this.j2x(item, level + 1, ajPath.concat(key));\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n } else {\n listTagVal += this.processTextOrObjNode(item, key, level, ajPath)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if (this.options.oneListGroup) {\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level, ajPath)\n }\n }\n }\n return { attrStr: attrStr, val: val };\n};\n\nBuilder.prototype.buildAttrPairStr = function (attrName, val) {\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode(object, key, level, ajPath) {\n const result = this.j2x(object, level + 1, ajPath.concat(key));\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function (val, key, attrStr, level) {\n if (val === \"\") {\n if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n } else {\n\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n\n if (key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n\n // attrStr is an empty string in case the attribute came as undefined or null\n if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n return (this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp);\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n } else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp);\n }\n }\n}\n\nBuilder.prototype.closeTag = function (key) {\n let closeTag = \"\";\n if (this.options.unpairedTags.indexOf(key) !== -1) { //unpaired\n if (!this.options.suppressUnpairedNode) closeTag = \"/\"\n } else if (this.options.suppressEmptyNode) { //empty\n closeTag = \"/\";\n } else {\n closeTag = `></${key}`\n }\n return closeTag;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if (key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n // return this.buildTagStr(level,key, attrStr);\n }\n }\n}\n\nBuilder.prototype.buildTextValNode = function (val, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n } else if (key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr + '?' + this.tagEndChar;\n } else {\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n\n if (textValue === '') {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n } else {\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.replaceEntitiesValue = function (textValue) {\n if (textValue && textValue.length > 0 && this.options.processEntities) {\n for (let i = 0; i < this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix) && name !== this.options.textNodeName) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\n","export default function getIgnoreAttributesFn(ignoreAttributes) {\n if (typeof ignoreAttributes === 'function') {\n return ignoreAttributes\n }\n if (Array.isArray(ignoreAttributes)) {\n return (attrName) => {\n for (const pattern of ignoreAttributes) {\n if (typeof pattern === 'string' && attrName === pattern) {\n return true\n }\n if (pattern instanceof RegExp && pattern.test(attrName)) {\n return true\n }\n }\n }\n }\n return () => false\n}"],"names":["root","factory","exports","module","define","amd","this","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","toXml","jArray","options","indentation","format","indentBy","length","arrToStr","arr","jPath","xmlStr","isPreviousElementTag","Array","isArray","text","toString","replaceEntitiesValue","i","tagObj","tagName","propName","undefined","newJPath","textNodeName","cdataPropName","commentPropName","newIdentation","tagStart","attr_to_str","tagValue","unpairedTags","indexOf","suppressUnpairedNode","suppressEmptyNode","endsWith","includes","attStr","tempInd","piTextNodeName","tagText","isStopNode","tagValueProcessor","keys","attrMap","attrStr","ignoreAttributes","attr","attrVal","attributeValueProcessor","suppressBooleanAttributes","substr","attributeNamePrefix","lastIndexOf","index","stopNodes","textValue","processEntities","entities","entity","replace","regex","val","defaultOptions","attributesGroupName","a","attrName","preserveOrder","RegExp","oneListGroup","Builder","assign","isAttribute","ignoreAttributesFn","_step","_iterator","_createForOfIteratorHelperLoose","done","pattern","test","attrPrefixLen","processTextOrObjNode","indentate","tagEndChar","newLine","object","level","ajPath","result","j2x","concat","buildTextValNode","buildObjectNode","repeat","name","startsWith","build","jObj","buildFromOrderedJs","arrayNodeName","_jObj","join","Date","buildAttrPairStr","newval","arrLen","listTagVal","listTagAttr","j","item","Ks","L","closeTag","tagEndExp","piClosingChar"],"sourceRoot":""}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
type XmlBuilderOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Give a prefix to the attribute name in the resulting JS object
|
|
6
|
+
*
|
|
7
|
+
* Defaults to '@_'
|
|
8
|
+
*/
|
|
9
|
+
attributeNamePrefix?: string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A name to group all attributes of a tag under, or `false` to disable
|
|
13
|
+
*
|
|
14
|
+
* Defaults to `false`
|
|
15
|
+
*/
|
|
16
|
+
attributesGroupName?: false | string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The name of the next node in the resulting JS
|
|
20
|
+
*
|
|
21
|
+
* Defaults to `#text`
|
|
22
|
+
*/
|
|
23
|
+
textNodeName?: string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Whether to ignore attributes when building
|
|
27
|
+
*
|
|
28
|
+
* When `true` - ignores all the attributes
|
|
29
|
+
*
|
|
30
|
+
* When `false` - builds all the attributes
|
|
31
|
+
*
|
|
32
|
+
* When `Array<string | RegExp>` - filters out attributes that match provided patterns
|
|
33
|
+
*
|
|
34
|
+
* When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
|
|
35
|
+
*
|
|
36
|
+
* Defaults to `true`
|
|
37
|
+
*/
|
|
38
|
+
ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Give a property name to set CDATA values to instead of merging to tag's text value
|
|
42
|
+
*
|
|
43
|
+
* Defaults to `false`
|
|
44
|
+
*/
|
|
45
|
+
cdataPropName?: false | string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* If set, parse comments and set as this property
|
|
49
|
+
*
|
|
50
|
+
* Defaults to `false`
|
|
51
|
+
*/
|
|
52
|
+
commentPropName?: false | string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Whether to make output pretty instead of single line
|
|
56
|
+
*
|
|
57
|
+
* Defaults to `false`
|
|
58
|
+
*/
|
|
59
|
+
format?: boolean;
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* If `format` is set to `true`, sets the indent string
|
|
64
|
+
*
|
|
65
|
+
* Defaults to ` `
|
|
66
|
+
*/
|
|
67
|
+
indentBy?: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Give a name to a top-level array
|
|
71
|
+
*
|
|
72
|
+
* Defaults to `undefined`
|
|
73
|
+
*/
|
|
74
|
+
arrayNodeName?: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Create empty tags for tags with no text value
|
|
78
|
+
*
|
|
79
|
+
* Defaults to `false`
|
|
80
|
+
*/
|
|
81
|
+
suppressEmptyNode?: boolean;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Suppress an unpaired tag
|
|
85
|
+
*
|
|
86
|
+
* Defaults to `true`
|
|
87
|
+
*/
|
|
88
|
+
suppressUnpairedNode?: boolean;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Don't put a value for boolean attributes
|
|
92
|
+
*
|
|
93
|
+
* Defaults to `true`
|
|
94
|
+
*/
|
|
95
|
+
suppressBooleanAttributes?: boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Preserve the order of tags in resulting JS object
|
|
99
|
+
*
|
|
100
|
+
* Defaults to `false`
|
|
101
|
+
*/
|
|
102
|
+
preserveOrder?: boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* List of tags without closing tags
|
|
106
|
+
*
|
|
107
|
+
* Defaults to `[]`
|
|
108
|
+
*/
|
|
109
|
+
unpairedTags?: string[];
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Nodes to stop parsing at
|
|
113
|
+
*
|
|
114
|
+
* Defaults to `[]`
|
|
115
|
+
*/
|
|
116
|
+
stopNodes?: string[];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Control how tag value should be parsed. Called only if tag value is not empty
|
|
120
|
+
*
|
|
121
|
+
* @returns {undefined|null} `undefined` or `null` to set original value.
|
|
122
|
+
* @returns {unknown}
|
|
123
|
+
*
|
|
124
|
+
* 1. Different value or value with different data type to set new value.
|
|
125
|
+
* 2. Same value to set parsed value if `parseTagValue: true`.
|
|
126
|
+
*
|
|
127
|
+
* Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
|
|
128
|
+
*/
|
|
129
|
+
tagValueProcessor?: (name: string, value: unknown) => unknown;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Control how attribute value should be parsed
|
|
133
|
+
*
|
|
134
|
+
* @param attrName
|
|
135
|
+
* @param attrValue
|
|
136
|
+
* @param jPath
|
|
137
|
+
* @returns {undefined|null} `undefined` or `null` to set original value
|
|
138
|
+
* @returns {unknown}
|
|
139
|
+
*
|
|
140
|
+
* Defaults to `(attrName, val, jPath) => val`
|
|
141
|
+
*/
|
|
142
|
+
attributeValueProcessor?: (name: string, value: unknown) => unknown;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Whether to process default and DOCTYPE entities
|
|
146
|
+
*
|
|
147
|
+
* Defaults to `true`
|
|
148
|
+
*/
|
|
149
|
+
processEntities?: boolean;
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
oneListGroup?: boolean;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare class XMLBuilder {
|
|
156
|
+
constructor(options?: XmlBuilderOptions);
|
|
157
|
+
build(jObj: any): string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
declare namespace fxpBuilder {
|
|
161
|
+
export {
|
|
162
|
+
XMLBuilder,
|
|
163
|
+
XmlBuilderOptions,
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export = fxpBuilder;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fast-xml-builder",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Build XML from JSON without C/C++ based libraries",
|
|
5
|
+
"main": "./lib/fxb.cjs",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"module": "./src/fxb.js",
|
|
9
|
+
"types": "./src/fxb.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./src/fxb.d.ts",
|
|
14
|
+
"default": "./src/fxb.js"
|
|
15
|
+
},
|
|
16
|
+
"require": {
|
|
17
|
+
"types": "./lib/fxb.d.cts",
|
|
18
|
+
"default": "./lib/fxb.cjs"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "c8 --reporter=lcov --reporter=text jasmine spec/*spec.js",
|
|
24
|
+
"test-types": "tsc --noEmit spec/typings/typings-test.ts",
|
|
25
|
+
"unit": "jasmine",
|
|
26
|
+
"lint": "eslint src/**/*.js spec/**/*.js benchmark/**/*.js",
|
|
27
|
+
"bundle": "webpack --config webpack.cjs.config.js",
|
|
28
|
+
"prettier": "prettier --write src/**/*.js",
|
|
29
|
+
"checkReadiness": "publish-please --dry-run",
|
|
30
|
+
"publish-please": "publish-please",
|
|
31
|
+
"prepublishOnly": "publish-please guard"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"lib",
|
|
35
|
+
"src",
|
|
36
|
+
"CHANGELOG.md"
|
|
37
|
+
],
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/NaturalIntelligence/fast-xml-builder.git"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"xml",
|
|
44
|
+
"json",
|
|
45
|
+
"fast",
|
|
46
|
+
"builder",
|
|
47
|
+
"parser",
|
|
48
|
+
"js2xml",
|
|
49
|
+
"json2xml"
|
|
50
|
+
],
|
|
51
|
+
"author": "Amit Gupta (https://solothought.com)",
|
|
52
|
+
"license": "MIT",
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@babel/core": "^7.13.10",
|
|
55
|
+
"@babel/plugin-transform-runtime": "^7.13.10",
|
|
56
|
+
"@babel/preset-env": "^7.13.10",
|
|
57
|
+
"@babel/register": "^7.13.8",
|
|
58
|
+
"@types/node": "20",
|
|
59
|
+
"babel-loader": "^8.2.2",
|
|
60
|
+
"c8": "^10.1.3",
|
|
61
|
+
"eslint": "^8.3.0",
|
|
62
|
+
"jasmine": "^5.6.0",
|
|
63
|
+
"prettier": "^3.5.1",
|
|
64
|
+
"publish-please": "^5.5.2",
|
|
65
|
+
"typescript": "5",
|
|
66
|
+
"webpack": "^5.64.4",
|
|
67
|
+
"webpack-cli": "^4.9.1",
|
|
68
|
+
"fast-xml-parser": "^5.3.9",
|
|
69
|
+
"he": "^1.2.0"
|
|
70
|
+
},
|
|
71
|
+
"funding": [
|
|
72
|
+
{
|
|
73
|
+
"type": "github",
|
|
74
|
+
"url": "https://github.com/sponsors/NaturalIntelligence"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"dependencies": {}
|
|
78
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export type XmlBuilderOptions = {
|
|
2
|
+
/**
|
|
3
|
+
* Give a prefix to the attribute name in the resulting JS object
|
|
4
|
+
*
|
|
5
|
+
* Defaults to '@_'
|
|
6
|
+
*/
|
|
7
|
+
attributeNamePrefix?: string;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A name to group all attributes of a tag under, or `false` to disable
|
|
11
|
+
*
|
|
12
|
+
* Defaults to `false`
|
|
13
|
+
*/
|
|
14
|
+
attributesGroupName?: false | string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The name of the next node in the resulting JS
|
|
18
|
+
*
|
|
19
|
+
* Defaults to `#text`
|
|
20
|
+
*/
|
|
21
|
+
textNodeName?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Whether to ignore attributes when building
|
|
25
|
+
*
|
|
26
|
+
* When `true` - ignores all the attributes
|
|
27
|
+
*
|
|
28
|
+
* When `false` - builds all the attributes
|
|
29
|
+
*
|
|
30
|
+
* When `Array<string | RegExp>` - filters out attributes that match provided patterns
|
|
31
|
+
*
|
|
32
|
+
* When `Function` - calls the function for each attribute and filters out those for which the function returned `true`
|
|
33
|
+
*
|
|
34
|
+
* Defaults to `true`
|
|
35
|
+
*/
|
|
36
|
+
ignoreAttributes?: boolean | (string | RegExp)[] | ((attrName: string, jPath: string) => boolean);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Give a property name to set CDATA values to instead of merging to tag's text value
|
|
40
|
+
*
|
|
41
|
+
* Defaults to `false`
|
|
42
|
+
*/
|
|
43
|
+
cdataPropName?: false | string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* If set, parse comments and set as this property
|
|
47
|
+
*
|
|
48
|
+
* Defaults to `false`
|
|
49
|
+
*/
|
|
50
|
+
commentPropName?: false | string;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Whether to make output pretty instead of single line
|
|
54
|
+
*
|
|
55
|
+
* Defaults to `false`
|
|
56
|
+
*/
|
|
57
|
+
format?: boolean;
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* If `format` is set to `true`, sets the indent string
|
|
62
|
+
*
|
|
63
|
+
* Defaults to ` `
|
|
64
|
+
*/
|
|
65
|
+
indentBy?: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Give a name to a top-level array
|
|
69
|
+
*
|
|
70
|
+
* Defaults to `undefined`
|
|
71
|
+
*/
|
|
72
|
+
arrayNodeName?: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Create empty tags for tags with no text value
|
|
76
|
+
*
|
|
77
|
+
* Defaults to `false`
|
|
78
|
+
*/
|
|
79
|
+
suppressEmptyNode?: boolean;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Suppress an unpaired tag
|
|
83
|
+
*
|
|
84
|
+
* Defaults to `true`
|
|
85
|
+
*/
|
|
86
|
+
suppressUnpairedNode?: boolean;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Don't put a value for boolean attributes
|
|
90
|
+
*
|
|
91
|
+
* Defaults to `true`
|
|
92
|
+
*/
|
|
93
|
+
suppressBooleanAttributes?: boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Preserve the order of tags in resulting JS object
|
|
97
|
+
*
|
|
98
|
+
* Defaults to `false`
|
|
99
|
+
*/
|
|
100
|
+
preserveOrder?: boolean;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* List of tags without closing tags
|
|
104
|
+
*
|
|
105
|
+
* Defaults to `[]`
|
|
106
|
+
*/
|
|
107
|
+
unpairedTags?: string[];
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Nodes to stop parsing at
|
|
111
|
+
*
|
|
112
|
+
* Defaults to `[]`
|
|
113
|
+
*/
|
|
114
|
+
stopNodes?: string[];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Control how tag value should be parsed. Called only if tag value is not empty
|
|
118
|
+
*
|
|
119
|
+
* @returns {undefined|null} `undefined` or `null` to set original value.
|
|
120
|
+
* @returns {unknown}
|
|
121
|
+
*
|
|
122
|
+
* 1. Different value or value with different data type to set new value.
|
|
123
|
+
* 2. Same value to set parsed value if `parseTagValue: true`.
|
|
124
|
+
*
|
|
125
|
+
* Defaults to `(tagName, val, jPath, hasAttributes, isLeafNode) => val`
|
|
126
|
+
*/
|
|
127
|
+
tagValueProcessor?: (name: string, value: unknown) => unknown;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Control how attribute value should be parsed
|
|
131
|
+
*
|
|
132
|
+
* @param attrName
|
|
133
|
+
* @param attrValue
|
|
134
|
+
* @param jPath
|
|
135
|
+
* @returns {undefined|null} `undefined` or `null` to set original value
|
|
136
|
+
* @returns {unknown}
|
|
137
|
+
*
|
|
138
|
+
* Defaults to `(attrName, val, jPath) => val`
|
|
139
|
+
*/
|
|
140
|
+
attributeValueProcessor?: (name: string, value: unknown) => unknown;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Whether to process default and DOCTYPE entities
|
|
144
|
+
*
|
|
145
|
+
* Defaults to `true`
|
|
146
|
+
*/
|
|
147
|
+
processEntities?: boolean;
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
oneListGroup?: boolean;
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export class XMLBuilder {
|
|
154
|
+
constructor(options?: XmlBuilderOptions);
|
|
155
|
+
build(jObj: any): string;
|
|
156
|
+
}
|