feat: update dependencies, node

This commit is contained in:
xHyroM 2022-10-29 10:03:51 +02:00
parent 0ec953ee6d
commit 29cb413d63
507 changed files with 84113 additions and 61309 deletions

View file

@ -262,7 +262,7 @@
* @const
* @type {string}
*/
msRestVersion: "2.6.1",
msRestVersion: "2.6.2",
/**
* Specifies HTTP.
*
@ -1897,10 +1897,24 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
var _a, _b;
var parser = new DOMParser();
// Policy to make our code Trusted Types compliant.
// https://github.com/w3c/webappsec-trusted-types
// We are calling DOMParser.parseFromString() to parse XML payload from Azure services.
// The parsed DOM object is not exposed to outside. Scripts are disabled when parsing
// according to the spec. There are no HTML/XSS security concerns on the usage of
// parseFromString() here.
var ttPolicy;
if (typeof self.trustedTypes !== "undefined") {
ttPolicy = self.trustedTypes.createPolicy("@azure/ms-rest-js#xml.browser", {
createHTML: function (s) { return s; },
});
}
function parseXML(str) {
var _a;
try {
var dom = parser.parseFromString(str, "application/xml");
var dom = parser.parseFromString(((_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML(str)) !== null && _a !== void 0 ? _a : str), "application/xml");
throwIfError(dom);
var obj = domToObject(dom.childNodes[0]);
return Promise.resolve(obj);
@ -1911,8 +1925,9 @@
}
var errorNS = "";
try {
errorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0]
.namespaceURI;
var invalidXML = ((_a = ttPolicy === null || ttPolicy === void 0 ? void 0 : ttPolicy.createHTML("INVALID")) !== null && _a !== void 0 ? _a : "INVALID");
errorNS = (_b = parser.parseFromString(invalidXML, "text/xml").getElementsByTagName("parsererror")[0]
.namespaceURI) !== null && _b !== void 0 ? _b : "";
}
catch (ignored) {
// Most browsers will return a document containing <parsererror>, but IE will throw.