@ms-cloudpack/remote-cache 0.10.11 → 0.10.12
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/dist/{AzureRemoteCacheClient-JTZ6AKHH.js → AzureRemoteCacheClient-AY675HJK.js} +125 -80
- package/dist/{chunk-AAHKL65V.js → chunk-E464X2TG.js} +73 -52
- package/dist/{chunk-EEDK736F.js → chunk-EZBP4ZKN.js} +112 -111
- package/dist/{getCredential-GVAO2BWN.js → getCredential-OSAAVWZC.js} +112 -99
- package/dist/index.js +5 -5
- package/package.json +3 -3
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
require_commonjs5,
|
|
14
14
|
require_commonjs6,
|
|
15
15
|
tslib_es6_exports
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-E464X2TG.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__name,
|
|
@@ -734,9 +734,9 @@ var require_commonjs8 = __commonJS({
|
|
|
734
734
|
}
|
|
735
735
|
});
|
|
736
736
|
|
|
737
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
737
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/util.js
|
|
738
738
|
var require_util2 = __commonJS({
|
|
739
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
739
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/util.js"(exports) {
|
|
740
740
|
"use strict";
|
|
741
741
|
var nameStartChar = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
|
742
742
|
var nameChar = nameStartChar + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
|
@@ -793,9 +793,9 @@ var require_util2 = __commonJS({
|
|
|
793
793
|
}
|
|
794
794
|
});
|
|
795
795
|
|
|
796
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
796
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/validator.js
|
|
797
797
|
var require_validator = __commonJS({
|
|
798
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
798
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/validator.js"(exports) {
|
|
799
799
|
"use strict";
|
|
800
800
|
var util = require_util2();
|
|
801
801
|
var defaultOptions = {
|
|
@@ -1117,9 +1117,9 @@ var require_validator = __commonJS({
|
|
|
1117
1117
|
}
|
|
1118
1118
|
});
|
|
1119
1119
|
|
|
1120
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1120
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/OptionsBuilder.js
|
|
1121
1121
|
var require_OptionsBuilder = __commonJS({
|
|
1122
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1122
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/OptionsBuilder.js"(exports) {
|
|
1123
1123
|
var defaultOptions = {
|
|
1124
1124
|
preserveOrder: false,
|
|
1125
1125
|
attributeNamePrefix: "@_",
|
|
@@ -1141,11 +1141,11 @@ var require_OptionsBuilder = __commonJS({
|
|
|
1141
1141
|
leadingZeros: true,
|
|
1142
1142
|
eNotation: true
|
|
1143
1143
|
},
|
|
1144
|
-
tagValueProcessor: /* @__PURE__ */ __name(function(tagName,
|
|
1145
|
-
return
|
|
1144
|
+
tagValueProcessor: /* @__PURE__ */ __name(function(tagName, val) {
|
|
1145
|
+
return val;
|
|
1146
1146
|
}, "tagValueProcessor"),
|
|
1147
|
-
attributeValueProcessor: /* @__PURE__ */ __name(function(attrName,
|
|
1148
|
-
return
|
|
1147
|
+
attributeValueProcessor: /* @__PURE__ */ __name(function(attrName, val) {
|
|
1148
|
+
return val;
|
|
1149
1149
|
}, "attributeValueProcessor"),
|
|
1150
1150
|
stopNodes: [],
|
|
1151
1151
|
//nested tags will not be parsed even for errors
|
|
@@ -1172,9 +1172,9 @@ var require_OptionsBuilder = __commonJS({
|
|
|
1172
1172
|
}
|
|
1173
1173
|
});
|
|
1174
1174
|
|
|
1175
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1175
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/xmlNode.js
|
|
1176
1176
|
var require_xmlNode = __commonJS({
|
|
1177
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1177
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/xmlNode.js"(exports, module) {
|
|
1178
1178
|
"use strict";
|
|
1179
1179
|
var _XmlNode = class _XmlNode {
|
|
1180
1180
|
constructor(tagname) {
|
|
@@ -1182,9 +1182,9 @@ var require_xmlNode = __commonJS({
|
|
|
1182
1182
|
this.child = [];
|
|
1183
1183
|
this[":@"] = {};
|
|
1184
1184
|
}
|
|
1185
|
-
add(key,
|
|
1185
|
+
add(key, val) {
|
|
1186
1186
|
if (key === "__proto__") key = "#__proto__";
|
|
1187
|
-
this.child.push({ [key]:
|
|
1187
|
+
this.child.push({ [key]: val });
|
|
1188
1188
|
}
|
|
1189
1189
|
addChild(node) {
|
|
1190
1190
|
if (node.tagname === "__proto__") node.tagname = "#__proto__";
|
|
@@ -1201,9 +1201,9 @@ var require_xmlNode = __commonJS({
|
|
|
1201
1201
|
}
|
|
1202
1202
|
});
|
|
1203
1203
|
|
|
1204
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1204
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/DocTypeReader.js
|
|
1205
1205
|
var require_DocTypeReader = __commonJS({
|
|
1206
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1206
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/DocTypeReader.js"(exports, module) {
|
|
1207
1207
|
var util = require_util2();
|
|
1208
1208
|
function readDocType(xmlData, i) {
|
|
1209
1209
|
const entities = {};
|
|
@@ -1216,6 +1216,7 @@ var require_DocTypeReader = __commonJS({
|
|
|
1216
1216
|
if (xmlData[i] === "<" && !comment) {
|
|
1217
1217
|
if (hasBody && isEntity(xmlData, i)) {
|
|
1218
1218
|
i += 7;
|
|
1219
|
+
let entityName, val;
|
|
1219
1220
|
[entityName, val, i] = readEntityExp(xmlData, i + 1);
|
|
1220
1221
|
if (val.indexOf("&") === -1)
|
|
1221
1222
|
entities[validateEntityName(entityName)] = {
|
|
@@ -1257,18 +1258,18 @@ var require_DocTypeReader = __commonJS({
|
|
|
1257
1258
|
}
|
|
1258
1259
|
__name(readDocType, "readDocType");
|
|
1259
1260
|
function readEntityExp(xmlData, i) {
|
|
1260
|
-
let
|
|
1261
|
+
let entityName = "";
|
|
1261
1262
|
for (; i < xmlData.length && (xmlData[i] !== "'" && xmlData[i] !== '"'); i++) {
|
|
1262
|
-
|
|
1263
|
+
entityName += xmlData[i];
|
|
1263
1264
|
}
|
|
1264
|
-
|
|
1265
|
-
if (
|
|
1265
|
+
entityName = entityName.trim();
|
|
1266
|
+
if (entityName.indexOf(" ") !== -1) throw new Error("External entites are not supported");
|
|
1266
1267
|
const startChar = xmlData[i++];
|
|
1267
|
-
let
|
|
1268
|
+
let val = "";
|
|
1268
1269
|
for (; i < xmlData.length && xmlData[i] !== startChar; i++) {
|
|
1269
|
-
|
|
1270
|
+
val += xmlData[i];
|
|
1270
1271
|
}
|
|
1271
|
-
return [
|
|
1272
|
+
return [entityName, val, i];
|
|
1272
1273
|
}
|
|
1273
1274
|
__name(readEntityExp, "readEntityExp");
|
|
1274
1275
|
function isComment(xmlData, i) {
|
|
@@ -1386,9 +1387,9 @@ var require_strnum = __commonJS({
|
|
|
1386
1387
|
}
|
|
1387
1388
|
});
|
|
1388
1389
|
|
|
1389
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1390
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/ignoreAttributes.js
|
|
1390
1391
|
var require_ignoreAttributes = __commonJS({
|
|
1391
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1392
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/ignoreAttributes.js"(exports, module) {
|
|
1392
1393
|
function getIgnoreAttributesFn(ignoreAttributes) {
|
|
1393
1394
|
if (typeof ignoreAttributes === "function") {
|
|
1394
1395
|
return ignoreAttributes;
|
|
@@ -1412,9 +1413,9 @@ var require_ignoreAttributes = __commonJS({
|
|
|
1412
1413
|
}
|
|
1413
1414
|
});
|
|
1414
1415
|
|
|
1415
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1416
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/OrderedObjParser.js
|
|
1416
1417
|
var require_OrderedObjParser = __commonJS({
|
|
1417
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1418
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/OrderedObjParser.js"(exports, module) {
|
|
1418
1419
|
"use strict";
|
|
1419
1420
|
var util = require_util2();
|
|
1420
1421
|
var xmlNode = require_xmlNode();
|
|
@@ -1477,26 +1478,26 @@ var require_OrderedObjParser = __commonJS({
|
|
|
1477
1478
|
}
|
|
1478
1479
|
}
|
|
1479
1480
|
__name(addExternalEntities, "addExternalEntities");
|
|
1480
|
-
function parseTextData(
|
|
1481
|
-
if (
|
|
1481
|
+
function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode, escapeEntities) {
|
|
1482
|
+
if (val !== void 0) {
|
|
1482
1483
|
if (this.options.trimValues && !dontTrim) {
|
|
1483
|
-
|
|
1484
|
+
val = val.trim();
|
|
1484
1485
|
}
|
|
1485
|
-
if (
|
|
1486
|
-
if (!escapeEntities)
|
|
1487
|
-
const newval = this.options.tagValueProcessor(tagName,
|
|
1486
|
+
if (val.length > 0) {
|
|
1487
|
+
if (!escapeEntities) val = this.replaceEntitiesValue(val);
|
|
1488
|
+
const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);
|
|
1488
1489
|
if (newval === null || newval === void 0) {
|
|
1489
|
-
return
|
|
1490
|
-
} else if (typeof newval !== typeof
|
|
1490
|
+
return val;
|
|
1491
|
+
} else if (typeof newval !== typeof val || newval !== val) {
|
|
1491
1492
|
return newval;
|
|
1492
1493
|
} else if (this.options.trimValues) {
|
|
1493
|
-
return parseValue(
|
|
1494
|
+
return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);
|
|
1494
1495
|
} else {
|
|
1495
|
-
const trimmedVal =
|
|
1496
|
-
if (trimmedVal ===
|
|
1497
|
-
return parseValue(
|
|
1496
|
+
const trimmedVal = val.trim();
|
|
1497
|
+
if (trimmedVal === val) {
|
|
1498
|
+
return parseValue(val, this.options.parseTagValue, this.options.numberParseOptions);
|
|
1498
1499
|
} else {
|
|
1499
|
-
return
|
|
1500
|
+
return val;
|
|
1500
1501
|
}
|
|
1501
1502
|
}
|
|
1502
1503
|
}
|
|
@@ -1638,12 +1639,12 @@ var require_OrderedObjParser = __commonJS({
|
|
|
1638
1639
|
const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
|
|
1639
1640
|
const tagExp = xmlData.substring(i + 9, closeIndex);
|
|
1640
1641
|
textData = this.saveTextToParentTag(textData, currentNode, jPath);
|
|
1641
|
-
let
|
|
1642
|
-
if (
|
|
1642
|
+
let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);
|
|
1643
|
+
if (val == void 0) val = "";
|
|
1643
1644
|
if (this.options.cdataPropName) {
|
|
1644
1645
|
currentNode.add(this.options.cdataPropName, [{ [this.options.textNodeName]: tagExp }]);
|
|
1645
1646
|
} else {
|
|
1646
|
-
currentNode.add(this.options.textNodeName,
|
|
1647
|
+
currentNode.add(this.options.textNodeName, val);
|
|
1647
1648
|
}
|
|
1648
1649
|
i = closeIndex + 2;
|
|
1649
1650
|
} else {
|
|
@@ -1746,25 +1747,25 @@ var require_OrderedObjParser = __commonJS({
|
|
|
1746
1747
|
}
|
|
1747
1748
|
}
|
|
1748
1749
|
__name(addChild, "addChild");
|
|
1749
|
-
var replaceEntitiesValue = /* @__PURE__ */ __name(function(
|
|
1750
|
+
var replaceEntitiesValue = /* @__PURE__ */ __name(function(val) {
|
|
1750
1751
|
if (this.options.processEntities) {
|
|
1751
|
-
for (let
|
|
1752
|
-
const entity = this.docTypeEntities[
|
|
1753
|
-
|
|
1752
|
+
for (let entityName in this.docTypeEntities) {
|
|
1753
|
+
const entity = this.docTypeEntities[entityName];
|
|
1754
|
+
val = val.replace(entity.regx, entity.val);
|
|
1754
1755
|
}
|
|
1755
|
-
for (let
|
|
1756
|
-
const entity = this.lastEntities[
|
|
1757
|
-
|
|
1756
|
+
for (let entityName in this.lastEntities) {
|
|
1757
|
+
const entity = this.lastEntities[entityName];
|
|
1758
|
+
val = val.replace(entity.regex, entity.val);
|
|
1758
1759
|
}
|
|
1759
1760
|
if (this.options.htmlEntities) {
|
|
1760
|
-
for (let
|
|
1761
|
-
const entity = this.htmlEntities[
|
|
1762
|
-
|
|
1761
|
+
for (let entityName in this.htmlEntities) {
|
|
1762
|
+
const entity = this.htmlEntities[entityName];
|
|
1763
|
+
val = val.replace(entity.regex, entity.val);
|
|
1763
1764
|
}
|
|
1764
1765
|
}
|
|
1765
|
-
|
|
1766
|
+
val = val.replace(this.ampEntity.regex, this.ampEntity.val);
|
|
1766
1767
|
}
|
|
1767
|
-
return
|
|
1768
|
+
return val;
|
|
1768
1769
|
}, "replaceEntitiesValue");
|
|
1769
1770
|
function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {
|
|
1770
1771
|
if (textData) {
|
|
@@ -1902,15 +1903,15 @@ var require_OrderedObjParser = __commonJS({
|
|
|
1902
1903
|
}
|
|
1903
1904
|
}
|
|
1904
1905
|
__name(readStopNodeData, "readStopNodeData");
|
|
1905
|
-
function parseValue(
|
|
1906
|
-
if (shouldParse && typeof
|
|
1907
|
-
const newval =
|
|
1906
|
+
function parseValue(val, shouldParse, options) {
|
|
1907
|
+
if (shouldParse && typeof val === "string") {
|
|
1908
|
+
const newval = val.trim();
|
|
1908
1909
|
if (newval === "true") return true;
|
|
1909
1910
|
else if (newval === "false") return false;
|
|
1910
|
-
else return toNumber(
|
|
1911
|
+
else return toNumber(val, options);
|
|
1911
1912
|
} else {
|
|
1912
|
-
if (util.isExist(
|
|
1913
|
-
return
|
|
1913
|
+
if (util.isExist(val)) {
|
|
1914
|
+
return val;
|
|
1914
1915
|
} else {
|
|
1915
1916
|
return "";
|
|
1916
1917
|
}
|
|
@@ -1921,9 +1922,9 @@ var require_OrderedObjParser = __commonJS({
|
|
|
1921
1922
|
}
|
|
1922
1923
|
});
|
|
1923
1924
|
|
|
1924
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1925
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/node2json.js
|
|
1925
1926
|
var require_node2json = __commonJS({
|
|
1926
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
1927
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/node2json.js"(exports) {
|
|
1927
1928
|
"use strict";
|
|
1928
1929
|
function prettify(node, options) {
|
|
1929
1930
|
return compress(node, options);
|
|
@@ -1944,26 +1945,26 @@ var require_node2json = __commonJS({
|
|
|
1944
1945
|
} else if (property === void 0) {
|
|
1945
1946
|
continue;
|
|
1946
1947
|
} else if (tagObj[property]) {
|
|
1947
|
-
let
|
|
1948
|
-
const isLeaf = isLeafTag(
|
|
1948
|
+
let val = compress(tagObj[property], options, newJpath);
|
|
1949
|
+
const isLeaf = isLeafTag(val, options);
|
|
1949
1950
|
if (tagObj[":@"]) {
|
|
1950
|
-
assignAttributes(
|
|
1951
|
-
} else if (Object.keys(
|
|
1952
|
-
|
|
1953
|
-
} else if (Object.keys(
|
|
1954
|
-
if (options.alwaysCreateTextNode)
|
|
1955
|
-
else
|
|
1951
|
+
assignAttributes(val, tagObj[":@"], newJpath, options);
|
|
1952
|
+
} else if (Object.keys(val).length === 1 && val[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) {
|
|
1953
|
+
val = val[options.textNodeName];
|
|
1954
|
+
} else if (Object.keys(val).length === 0) {
|
|
1955
|
+
if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
|
|
1956
|
+
else val = "";
|
|
1956
1957
|
}
|
|
1957
1958
|
if (compressedObj[property] !== void 0 && compressedObj.hasOwnProperty(property)) {
|
|
1958
1959
|
if (!Array.isArray(compressedObj[property])) {
|
|
1959
1960
|
compressedObj[property] = [compressedObj[property]];
|
|
1960
1961
|
}
|
|
1961
|
-
compressedObj[property].push(
|
|
1962
|
+
compressedObj[property].push(val);
|
|
1962
1963
|
} else {
|
|
1963
1964
|
if (options.isArray(property, newJpath, isLeaf)) {
|
|
1964
|
-
compressedObj[property] = [
|
|
1965
|
+
compressedObj[property] = [val];
|
|
1965
1966
|
} else {
|
|
1966
|
-
compressedObj[property] =
|
|
1967
|
+
compressedObj[property] = val;
|
|
1967
1968
|
}
|
|
1968
1969
|
}
|
|
1969
1970
|
}
|
|
@@ -2013,9 +2014,9 @@ var require_node2json = __commonJS({
|
|
|
2013
2014
|
}
|
|
2014
2015
|
});
|
|
2015
2016
|
|
|
2016
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2017
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/XMLParser.js
|
|
2017
2018
|
var require_XMLParser = __commonJS({
|
|
2018
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2019
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlparser/XMLParser.js"(exports, module) {
|
|
2019
2020
|
var { buildOptions } = require_OptionsBuilder();
|
|
2020
2021
|
var OrderedObjParser = require_OrderedObjParser();
|
|
2021
2022
|
var { prettify } = require_node2json();
|
|
@@ -2073,9 +2074,9 @@ var require_XMLParser = __commonJS({
|
|
|
2073
2074
|
}
|
|
2074
2075
|
});
|
|
2075
2076
|
|
|
2076
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2077
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlbuilder/orderedJs2Xml.js
|
|
2077
2078
|
var require_orderedJs2Xml = __commonJS({
|
|
2078
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2079
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlbuilder/orderedJs2Xml.js"(exports, module) {
|
|
2079
2080
|
var EOL = "\n";
|
|
2080
2081
|
function toXml(jArray, options) {
|
|
2081
2082
|
let indentation = "";
|
|
@@ -2204,9 +2205,9 @@ var require_orderedJs2Xml = __commonJS({
|
|
|
2204
2205
|
}
|
|
2205
2206
|
});
|
|
2206
2207
|
|
|
2207
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2208
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlbuilder/json2xml.js
|
|
2208
2209
|
var require_json2xml = __commonJS({
|
|
2209
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2210
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/xmlbuilder/json2xml.js"(exports, module) {
|
|
2210
2211
|
"use strict";
|
|
2211
2212
|
var buildFromOrderedJs = require_orderedJs2Xml();
|
|
2212
2213
|
var getIgnoreAttributesFn = require_ignoreAttributes();
|
|
@@ -2283,24 +2284,24 @@ var require_json2xml = __commonJS({
|
|
|
2283
2284
|
};
|
|
2284
2285
|
Builder.prototype.j2x = function(jObj, level, ajPath) {
|
|
2285
2286
|
let attrStr = "";
|
|
2286
|
-
let
|
|
2287
|
+
let val = "";
|
|
2287
2288
|
const jPath = ajPath.join(".");
|
|
2288
2289
|
for (let key in jObj) {
|
|
2289
2290
|
if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;
|
|
2290
2291
|
if (typeof jObj[key] === "undefined") {
|
|
2291
2292
|
if (this.isAttribute(key)) {
|
|
2292
|
-
|
|
2293
|
+
val += "";
|
|
2293
2294
|
}
|
|
2294
2295
|
} else if (jObj[key] === null) {
|
|
2295
2296
|
if (this.isAttribute(key)) {
|
|
2296
|
-
|
|
2297
|
+
val += "";
|
|
2297
2298
|
} else if (key[0] === "?") {
|
|
2298
|
-
|
|
2299
|
+
val += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
|
|
2299
2300
|
} else {
|
|
2300
|
-
|
|
2301
|
+
val += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
|
|
2301
2302
|
}
|
|
2302
2303
|
} else if (jObj[key] instanceof Date) {
|
|
2303
|
-
|
|
2304
|
+
val += this.buildTextValNode(jObj[key], key, "", level);
|
|
2304
2305
|
} else if (typeof jObj[key] !== "object") {
|
|
2305
2306
|
const attr = this.isAttribute(key);
|
|
2306
2307
|
if (attr && !this.ignoreAttributesFn(attr, jPath)) {
|
|
@@ -2308,9 +2309,9 @@ var require_json2xml = __commonJS({
|
|
|
2308
2309
|
} else if (!attr) {
|
|
2309
2310
|
if (key === this.options.textNodeName) {
|
|
2310
2311
|
let newval = this.options.tagValueProcessor(key, "" + jObj[key]);
|
|
2311
|
-
|
|
2312
|
+
val += this.replaceEntitiesValue(newval);
|
|
2312
2313
|
} else {
|
|
2313
|
-
|
|
2314
|
+
val += this.buildTextValNode(jObj[key], key, "", level);
|
|
2314
2315
|
}
|
|
2315
2316
|
}
|
|
2316
2317
|
} else if (Array.isArray(jObj[key])) {
|
|
@@ -2321,8 +2322,8 @@ var require_json2xml = __commonJS({
|
|
|
2321
2322
|
const item = jObj[key][j];
|
|
2322
2323
|
if (typeof item === "undefined") {
|
|
2323
2324
|
} else if (item === null) {
|
|
2324
|
-
if (key[0] === "?")
|
|
2325
|
-
else
|
|
2325
|
+
if (key[0] === "?") val += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
|
|
2326
|
+
else val += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
|
|
2326
2327
|
} else if (typeof item === "object") {
|
|
2327
2328
|
if (this.options.oneListGroup) {
|
|
2328
2329
|
const result = this.j2x(item, level + 1, ajPath.concat(key));
|
|
@@ -2346,7 +2347,7 @@ var require_json2xml = __commonJS({
|
|
|
2346
2347
|
if (this.options.oneListGroup) {
|
|
2347
2348
|
listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
|
|
2348
2349
|
}
|
|
2349
|
-
|
|
2350
|
+
val += listTagVal;
|
|
2350
2351
|
} else {
|
|
2351
2352
|
if (this.options.attributesGroupName && key === this.options.attributesGroupName) {
|
|
2352
2353
|
const Ks = Object.keys(jObj[key]);
|
|
@@ -2355,18 +2356,18 @@ var require_json2xml = __commonJS({
|
|
|
2355
2356
|
attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]]);
|
|
2356
2357
|
}
|
|
2357
2358
|
} else {
|
|
2358
|
-
|
|
2359
|
+
val += this.processTextOrObjNode(jObj[key], key, level, ajPath);
|
|
2359
2360
|
}
|
|
2360
2361
|
}
|
|
2361
2362
|
}
|
|
2362
|
-
return { attrStr, val
|
|
2363
|
+
return { attrStr, val };
|
|
2363
2364
|
};
|
|
2364
|
-
Builder.prototype.buildAttrPairStr = function(attrName,
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
if (this.options.suppressBooleanAttributes &&
|
|
2365
|
+
Builder.prototype.buildAttrPairStr = function(attrName, val) {
|
|
2366
|
+
val = this.options.attributeValueProcessor(attrName, "" + val);
|
|
2367
|
+
val = this.replaceEntitiesValue(val);
|
|
2368
|
+
if (this.options.suppressBooleanAttributes && val === "true") {
|
|
2368
2369
|
return " " + attrName;
|
|
2369
|
-
} else return " " + attrName + '="' +
|
|
2370
|
+
} else return " " + attrName + '="' + val + '"';
|
|
2370
2371
|
};
|
|
2371
2372
|
function processTextOrObjNode(object, key, level, ajPath) {
|
|
2372
2373
|
const result = this.j2x(object, level + 1, ajPath.concat(key));
|
|
@@ -2377,8 +2378,8 @@ var require_json2xml = __commonJS({
|
|
|
2377
2378
|
}
|
|
2378
2379
|
}
|
|
2379
2380
|
__name(processTextOrObjNode, "processTextOrObjNode");
|
|
2380
|
-
Builder.prototype.buildObjectNode = function(
|
|
2381
|
-
if (
|
|
2381
|
+
Builder.prototype.buildObjectNode = function(val, key, attrStr, level) {
|
|
2382
|
+
if (val === "") {
|
|
2382
2383
|
if (key[0] === "?") return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
|
|
2383
2384
|
else {
|
|
2384
2385
|
return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar;
|
|
@@ -2390,12 +2391,12 @@ var require_json2xml = __commonJS({
|
|
|
2390
2391
|
piClosingChar = "?";
|
|
2391
2392
|
tagEndExp = "";
|
|
2392
2393
|
}
|
|
2393
|
-
if ((attrStr || attrStr === "") &&
|
|
2394
|
-
return this.indentate(level) + "<" + key + attrStr + piClosingChar + ">" +
|
|
2394
|
+
if ((attrStr || attrStr === "") && val.indexOf("<") === -1) {
|
|
2395
|
+
return this.indentate(level) + "<" + key + attrStr + piClosingChar + ">" + val + tagEndExp;
|
|
2395
2396
|
} else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {
|
|
2396
|
-
return this.indentate(level) + `<!--${
|
|
2397
|
+
return this.indentate(level) + `<!--${val}-->` + this.newLine;
|
|
2397
2398
|
} else {
|
|
2398
|
-
return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar +
|
|
2399
|
+
return this.indentate(level) + "<" + key + attrStr + piClosingChar + this.tagEndChar + val + this.indentate(level) + tagEndExp;
|
|
2399
2400
|
}
|
|
2400
2401
|
}
|
|
2401
2402
|
};
|
|
@@ -2410,15 +2411,15 @@ var require_json2xml = __commonJS({
|
|
|
2410
2411
|
}
|
|
2411
2412
|
return closeTag;
|
|
2412
2413
|
};
|
|
2413
|
-
Builder.prototype.buildTextValNode = function(
|
|
2414
|
+
Builder.prototype.buildTextValNode = function(val, key, attrStr, level) {
|
|
2414
2415
|
if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {
|
|
2415
|
-
return this.indentate(level) + `<![CDATA[${
|
|
2416
|
+
return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;
|
|
2416
2417
|
} else if (this.options.commentPropName !== false && key === this.options.commentPropName) {
|
|
2417
|
-
return this.indentate(level) + `<!--${
|
|
2418
|
+
return this.indentate(level) + `<!--${val}-->` + this.newLine;
|
|
2418
2419
|
} else if (key[0] === "?") {
|
|
2419
2420
|
return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
|
|
2420
2421
|
} else {
|
|
2421
|
-
let textValue = this.options.tagValueProcessor(key,
|
|
2422
|
+
let textValue = this.options.tagValueProcessor(key, val);
|
|
2422
2423
|
textValue = this.replaceEntitiesValue(textValue);
|
|
2423
2424
|
if (textValue === "") {
|
|
2424
2425
|
return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar;
|
|
@@ -2452,9 +2453,9 @@ var require_json2xml = __commonJS({
|
|
|
2452
2453
|
}
|
|
2453
2454
|
});
|
|
2454
2455
|
|
|
2455
|
-
// ../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2456
|
+
// ../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/fxp.js
|
|
2456
2457
|
var require_fxp = __commonJS({
|
|
2457
|
-
"../../node_modules/.store/fast-xml-parser-npm-4.5.
|
|
2458
|
+
"../../node_modules/.store/fast-xml-parser-npm-4.5.1-77d072daa3/package/src/fxp.js"(exports, module) {
|
|
2458
2459
|
"use strict";
|
|
2459
2460
|
var validator = require_validator();
|
|
2460
2461
|
var XMLParser = require_XMLParser();
|