@ms-cloudpack/remote-cache 0.11.77 → 0.11.79

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/NOTICE.txt CHANGED
@@ -1261,7 +1261,7 @@ SOFTWARE.
1261
1261
 
1262
1262
  ----
1263
1263
 
1264
- fast-xml-builder 1.1.5 - MIT
1264
+ fast-xml-builder 1.2.0 - MIT
1265
1265
  https://github.com/NaturalIntelligence/fast-xml-builder
1266
1266
 
1267
1267
  Author: Amit Gupta (https://solothought.com)
@@ -3585,6 +3585,13 @@ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3585
3585
 
3586
3586
  ----
3587
3587
 
3588
+ xml-naming 0.1.0 - MIT
3589
+ https://github.com/NaturalIntelligence/xml-naming
3590
+
3591
+ Author: Amit Gupta (https://solothought.com)
3592
+
3593
+ ----
3594
+
3588
3595
  yocto-queue 0.1.0 - MIT
3589
3596
  https://github.com/sindresorhus/yocto-queue
3590
3597
 
@@ -16770,7 +16770,7 @@ var require_AzureBlobCacheStorage = __commonJS({
16770
16770
  this.getContainerClient = () => Promise.resolve(options.containerClient);
16771
16771
  } else {
16772
16772
  const { connectionString, container, credential } = options;
16773
- this.getContainerClient = () => import("./esm-DMIAQHJU.js").then(({ BlobServiceClient }) => {
16773
+ this.getContainerClient = () => import("./esm-FYSF76KZ.js").then(({ BlobServiceClient }) => {
16774
16774
  const blobServiceClient = credential ? new BlobServiceClient(connectionString, credential) : BlobServiceClient.fromConnectionString(connectionString);
16775
16775
  const containerClient = blobServiceClient.getContainerClient(container);
16776
16776
  return containerClient;
@@ -10277,10 +10277,73 @@ var init_XMLParser = __esm({
10277
10277
  }
10278
10278
  });
10279
10279
 
10280
- // ../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/orderedJs2Xml.js
10280
+ // ../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/util.js
10281
+ function safeComment(val) {
10282
+ return String(val).replace(/--/g, "- -").replace(/--/g, "- -").replace(/-$/, "- ");
10283
+ }
10284
+ function safeCdata(val) {
10285
+ return String(val).replace(/\]\]>/g, "]]]]><![CDATA[>");
10286
+ }
10287
+ function escapeAttribute(val) {
10288
+ return String(val).replace(/"/g, "&quot;").replace(/'/g, "&apos;");
10289
+ }
10290
+ var init_util3 = __esm({
10291
+ "../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/util.js"() {
10292
+ __name(safeComment, "safeComment");
10293
+ __name(safeCdata, "safeCdata");
10294
+ __name(escapeAttribute, "escapeAttribute");
10295
+ }
10296
+ });
10297
+
10298
+ // ../../node_modules/.store/xml-naming-npm-0.1.0-6def6e9a28/package/src/index.js
10299
+ var nameStartChar10, nameChar10, nameStartChar11, nameChar11, buildRegexes, regexes10, regexes11, getRegexes, qName;
10300
+ var init_src3 = __esm({
10301
+ "../../node_modules/.store/xml-naming-npm-0.1.0-6def6e9a28/package/src/index.js"() {
10302
+ nameStartChar10 = ":A-Za-z_\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD";
10303
+ nameChar10 = nameStartChar10 + "\\-\\.\\d\xB7\u0300-\u036F\u203F-\u2040";
10304
+ nameStartChar11 = ":A-Za-z_\xC0-\u02FF\u0370-\u037D\u037F-\u0486\u0488-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}";
10305
+ nameChar11 = nameStartChar11 + "\\-\\.\\d\xB7\u0300-\u036F\u0487\u203F-\u2040";
10306
+ buildRegexes = /* @__PURE__ */ __name((startChar, char, flags = "") => {
10307
+ const ncStart = startChar.replace(":", "");
10308
+ const ncChar = char.replace(":", "");
10309
+ const ncNamePat = `[${ncStart}][${ncChar}]*`;
10310
+ return {
10311
+ name: new RegExp(`^[${startChar}][${char}]*$`, flags),
10312
+ ncName: new RegExp(`^${ncNamePat}$`, flags),
10313
+ qName: new RegExp(`^${ncNamePat}(?::${ncNamePat})?$`, flags),
10314
+ nmToken: new RegExp(`^[${char}]+$`, flags),
10315
+ nmTokens: new RegExp(`^[${char}]+(?:\\s+[${char}]+)*$`, flags)
10316
+ };
10317
+ }, "buildRegexes");
10318
+ regexes10 = buildRegexes(nameStartChar10, nameChar10);
10319
+ regexes11 = buildRegexes(nameStartChar11, nameChar11, "u");
10320
+ getRegexes = /* @__PURE__ */ __name((xmlVersion = "1.0") => xmlVersion === "1.1" ? regexes11 : regexes10, "getRegexes");
10321
+ qName = /* @__PURE__ */ __name((str, { xmlVersion = "1.0" } = {}) => getRegexes(xmlVersion).qName.test(str), "qName");
10322
+ }
10323
+ });
10324
+
10325
+ // ../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/orderedJs2Xml.js
10326
+ function detectXmlVersionFromArray(jArray, options) {
10327
+ if (!Array.isArray(jArray) || jArray.length === 0) return "1.0";
10328
+ const first = jArray[0];
10329
+ const firstKey = propName2(first);
10330
+ if (firstKey === "?xml") {
10331
+ const attrs = first[":@"];
10332
+ if (attrs) {
10333
+ const versionKey = options.attributeNamePrefix + "version";
10334
+ if (attrs[versionKey]) return attrs[versionKey];
10335
+ }
10336
+ }
10337
+ return "1.0";
10338
+ }
10339
+ function resolveTagName(name, isAttribute2, options, matcher, xmlVersion) {
10340
+ if (!options.sanitizeName) return name;
10341
+ if (qName(name, { xmlVersion })) return name;
10342
+ return options.sanitizeName(name, { isAttribute: isAttribute2, matcher: matcher.readOnly() });
10343
+ }
10281
10344
  function toXml(jArray, options) {
10282
10345
  let indentation = "";
10283
- if (options.format && options.indentBy.length > 0) {
10346
+ if (options.format) {
10284
10347
  indentation = EOL2;
10285
10348
  }
10286
10349
  const stopNodeExpressions = [];
@@ -10294,10 +10357,11 @@ function toXml(jArray, options) {
10294
10357
  }
10295
10358
  }
10296
10359
  }
10360
+ const xmlVersion = detectXmlVersionFromArray(jArray, options);
10297
10361
  const matcher = new Matcher();
10298
- return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions);
10362
+ return arrToStr(jArray, options, indentation, matcher, stopNodeExpressions, xmlVersion);
10299
10363
  }
10300
- function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
10364
+ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions, xmlVersion) {
10301
10365
  let xmlStr = "";
10302
10366
  let isPreviousElementTag = false;
10303
10367
  if (options.maxNestedTags && matcher.getDepth() > options.maxNestedTags) {
@@ -10313,13 +10377,15 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
10313
10377
  }
10314
10378
  for (let i = 0; i < arr.length; i++) {
10315
10379
  const tagObj = arr[i];
10316
- const tagName = propName2(tagObj);
10317
- if (tagName === void 0) continue;
10380
+ const rawTagName = propName2(tagObj);
10381
+ if (rawTagName === void 0) continue;
10382
+ const isSpecialName = rawTagName === options.textNodeName || rawTagName === options.cdataPropName || rawTagName === options.commentPropName || rawTagName[0] === "?";
10383
+ const tagName = isSpecialName ? rawTagName : resolveTagName(rawTagName, false, options, matcher, xmlVersion);
10318
10384
  const attrValues = extractAttributeValues(tagObj[":@"], options);
10319
10385
  matcher.push(tagName, attrValues);
10320
10386
  const isStopNode = checkStopNode(matcher, stopNodeExpressions);
10321
10387
  if (tagName === options.textNodeName) {
10322
- let tagText = tagObj[tagName];
10388
+ let tagText = tagObj[rawTagName];
10323
10389
  if (!isStopNode) {
10324
10390
  tagText = options.tagValueProcessor(tagName, tagText);
10325
10391
  tagText = replaceEntitiesValue2(tagText, options);
@@ -10335,25 +10401,23 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
10335
10401
  if (isPreviousElementTag) {
10336
10402
  xmlStr += indentation;
10337
10403
  }
10338
- const val = tagObj[tagName][0][options.textNodeName];
10339
- const safeVal = String(val).replace(/\]\]>/g, "]]]]><![CDATA[>");
10404
+ const val = tagObj[rawTagName][0][options.textNodeName];
10405
+ const safeVal = safeCdata(val);
10340
10406
  xmlStr += `<![CDATA[${safeVal}]]>`;
10341
10407
  isPreviousElementTag = false;
10342
10408
  matcher.pop();
10343
10409
  continue;
10344
10410
  } else if (tagName === options.commentPropName) {
10345
- const val = tagObj[tagName][0][options.textNodeName];
10346
- const safeVal = String(val).replace(/--/g, "- -").replace(/-$/, "- ");
10411
+ const val = tagObj[rawTagName][0][options.textNodeName];
10412
+ const safeVal = safeComment(val);
10347
10413
  xmlStr += indentation + `<!--${safeVal}-->`;
10348
10414
  isPreviousElementTag = true;
10349
10415
  matcher.pop();
10350
10416
  continue;
10351
10417
  } else if (tagName[0] === "?") {
10352
- const attStr2 = attr_to_str(tagObj[":@"], options, isStopNode);
10418
+ const attStr2 = attr_to_str(tagObj[":@"], options, isStopNode, matcher, xmlVersion);
10353
10419
  const tempInd = tagName === "?xml" ? "" : indentation;
10354
- let piTextNodeName = tagObj[tagName][0][options.textNodeName];
10355
- piTextNodeName = piTextNodeName.length !== 0 ? " " + piTextNodeName : "";
10356
- xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr2}?>`;
10420
+ xmlStr += tempInd + `<${tagName}${attStr2}?>`;
10357
10421
  isPreviousElementTag = true;
10358
10422
  matcher.pop();
10359
10423
  continue;
@@ -10362,13 +10426,13 @@ function arrToStr(arr, options, indentation, matcher, stopNodeExpressions) {
10362
10426
  if (newIdentation !== "") {
10363
10427
  newIdentation += options.indentBy;
10364
10428
  }
10365
- const attStr = attr_to_str(tagObj[":@"], options, isStopNode);
10429
+ const attStr = attr_to_str(tagObj[":@"], options, isStopNode, matcher, xmlVersion);
10366
10430
  const tagStart = indentation + `<${tagName}${attStr}`;
10367
10431
  let tagValue;
10368
10432
  if (isStopNode) {
10369
- tagValue = getRawContent2(tagObj[tagName], options);
10433
+ tagValue = getRawContent2(tagObj[rawTagName], options);
10370
10434
  } else {
10371
- tagValue = arrToStr(tagObj[tagName], options, newIdentation, matcher, stopNodeExpressions);
10435
+ tagValue = arrToStr(tagObj[rawTagName], options, newIdentation, matcher, stopNodeExpressions, xmlVersion);
10372
10436
  }
10373
10437
  if (options.unpairedTags.indexOf(tagName) !== -1) {
10374
10438
  if (options.suppressUnpairedNode) xmlStr += tagStart + ">";
@@ -10398,7 +10462,7 @@ function extractAttributeValues(attrMap, options) {
10398
10462
  for (let attr in attrMap) {
10399
10463
  if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
10400
10464
  const cleanAttrName = attr.startsWith(options.attributeNamePrefix) ? attr.substr(options.attributeNamePrefix.length) : attr;
10401
- attrValues[cleanAttrName] = attrMap[attr];
10465
+ attrValues[cleanAttrName] = escapeAttribute(attrMap[attr]);
10402
10466
  hasAttrs = true;
10403
10467
  }
10404
10468
  return hasAttrs ? attrValues : null;
@@ -10443,7 +10507,7 @@ function attr_to_str_raw(attrMap, options) {
10443
10507
  if (attrVal === true && options.suppressBooleanAttributes) {
10444
10508
  attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
10445
10509
  } else {
10446
- attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
10510
+ attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${escapeAttribute(attrVal)}"`;
10447
10511
  }
10448
10512
  }
10449
10513
  }
@@ -10457,11 +10521,13 @@ function propName2(obj) {
10457
10521
  if (key !== ":@") return key;
10458
10522
  }
10459
10523
  }
10460
- function attr_to_str(attrMap, options, isStopNode) {
10524
+ function attr_to_str(attrMap, options, isStopNode, matcher, xmlVersion) {
10461
10525
  let attrStr = "";
10462
10526
  if (attrMap && !options.ignoreAttributes) {
10463
10527
  for (let attr in attrMap) {
10464
10528
  if (!Object.prototype.hasOwnProperty.call(attrMap, attr)) continue;
10529
+ const cleanAttrName = attr.substr(options.attributeNamePrefix.length);
10530
+ const resolvedAttrName = isStopNode ? cleanAttrName : resolveTagName(cleanAttrName, true, options, matcher, xmlVersion);
10465
10531
  let attrVal;
10466
10532
  if (isStopNode) {
10467
10533
  attrVal = attrMap[attr];
@@ -10470,9 +10536,9 @@ function attr_to_str(attrMap, options, isStopNode) {
10470
10536
  attrVal = replaceEntitiesValue2(attrVal, options);
10471
10537
  }
10472
10538
  if (attrVal === true && options.suppressBooleanAttributes) {
10473
- attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}`;
10539
+ attrStr += ` ${resolvedAttrName}`;
10474
10540
  } else {
10475
- attrStr += ` ${attr.substr(options.attributeNamePrefix.length)}="${attrVal}"`;
10541
+ attrStr += ` ${resolvedAttrName}="${escapeAttribute(attrVal)}"`;
10476
10542
  }
10477
10543
  }
10478
10544
  }
@@ -10498,9 +10564,13 @@ function replaceEntitiesValue2(textValue, options) {
10498
10564
  }
10499
10565
  var EOL2;
10500
10566
  var init_orderedJs2Xml = __esm({
10501
- "../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/orderedJs2Xml.js"() {
10567
+ "../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/orderedJs2Xml.js"() {
10502
10568
  init_src2();
10569
+ init_util3();
10570
+ init_src3();
10503
10571
  EOL2 = "\n";
10572
+ __name(detectXmlVersionFromArray, "detectXmlVersionFromArray");
10573
+ __name(resolveTagName, "resolveTagName");
10504
10574
  __name(toXml, "toXml");
10505
10575
  __name(arrToStr, "arrToStr");
10506
10576
  __name(extractAttributeValues, "extractAttributeValues");
@@ -10513,7 +10583,7 @@ var init_orderedJs2Xml = __esm({
10513
10583
  }
10514
10584
  });
10515
10585
 
10516
- // ../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/ignoreAttributes.js
10586
+ // ../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/ignoreAttributes.js
10517
10587
  function getIgnoreAttributesFn2(ignoreAttributes) {
10518
10588
  if (typeof ignoreAttributes === "function") {
10519
10589
  return ignoreAttributes;
@@ -10533,12 +10603,12 @@ function getIgnoreAttributesFn2(ignoreAttributes) {
10533
10603
  return () => false;
10534
10604
  }
10535
10605
  var init_ignoreAttributes2 = __esm({
10536
- "../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/ignoreAttributes.js"() {
10606
+ "../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/ignoreAttributes.js"() {
10537
10607
  __name(getIgnoreAttributesFn2, "getIgnoreAttributesFn");
10538
10608
  }
10539
10609
  });
10540
10610
 
10541
- // ../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/fxb.js
10611
+ // ../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/fxb.js
10542
10612
  function Builder(options) {
10543
10613
  this.options = Object.assign({}, defaultOptions3, options);
10544
10614
  if (this.options.stopNodes && Array.isArray(this.options.stopNodes)) {
@@ -10582,7 +10652,24 @@ function Builder(options) {
10582
10652
  this.newLine = "";
10583
10653
  }
10584
10654
  }
10585
- function processTextOrObjNode(object, key, level, matcher) {
10655
+ function detectXmlVersionFromObj(jObj, options) {
10656
+ const decl = jObj["?xml"];
10657
+ if (decl && typeof decl === "object") {
10658
+ if (options.attributesGroupName && decl[options.attributesGroupName]) {
10659
+ const v2 = decl[options.attributesGroupName][options.attributeNamePrefix + "version"];
10660
+ if (v2) return v2;
10661
+ }
10662
+ const v = decl[options.attributeNamePrefix + "version"];
10663
+ if (v) return v;
10664
+ }
10665
+ return "1.0";
10666
+ }
10667
+ function resolveTagName2(name, isAttribute2, options, matcher, xmlVersion) {
10668
+ if (!options.sanitizeName) return name;
10669
+ if (qName(name, { xmlVersion })) return name;
10670
+ return options.sanitizeName(name, { isAttribute: isAttribute2, matcher: matcher.readOnly() });
10671
+ }
10672
+ function processTextOrObjNode(object, key, level, matcher, xmlVersion) {
10586
10673
  const attrValues = this.extractAttributes(object);
10587
10674
  matcher.push(key, attrValues);
10588
10675
  const isStopNode = this.checkStopNode(matcher);
@@ -10592,9 +10679,11 @@ function processTextOrObjNode(object, key, level, matcher) {
10592
10679
  matcher.pop();
10593
10680
  return this.buildObjectNode(rawContent2, key, attrStr, level);
10594
10681
  }
10595
- const result = this.j2x(object, level + 1, matcher);
10682
+ const result = this.j2x(object, level + 1, matcher, xmlVersion);
10596
10683
  matcher.pop();
10597
- if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {
10684
+ if (key[0] === "?") {
10685
+ return this.buildTextValNode("", key, result.attrStr, level, matcher);
10686
+ } else if (object[this.options.textNodeName] !== void 0 && Object.keys(object).length === 1) {
10598
10687
  return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level, matcher);
10599
10688
  } else {
10600
10689
  return this.buildObjectNode(result.val, key, result.attrStr, level);
@@ -10612,11 +10701,13 @@ function isAttribute(name) {
10612
10701
  }
10613
10702
  var defaultOptions3;
10614
10703
  var init_fxb = __esm({
10615
- "../../node_modules/.store/fast-xml-builder-npm-1.1.5-960811683a/package/src/fxb.js"() {
10704
+ "../../node_modules/.store/fast-xml-builder-npm-1.2.0-7008dbf494/package/src/fxb.js"() {
10616
10705
  "use strict";
10617
10706
  init_orderedJs2Xml();
10618
10707
  init_ignoreAttributes2();
10619
10708
  init_src2();
10709
+ init_util3();
10710
+ init_src3();
10620
10711
  defaultOptions3 = {
10621
10712
  attributeNamePrefix: "@_",
10622
10713
  attributesGroupName: false,
@@ -10651,10 +10742,17 @@ var init_fxb = __esm({
10651
10742
  // transformAttributeName: false,
10652
10743
  oneListGroup: false,
10653
10744
  maxNestedTags: 100,
10654
- jPath: true
10745
+ jPath: true,
10655
10746
  // When true, callbacks receive string jPath; when false, receive Matcher instance
10747
+ sanitizeName: false
10748
+ // false = allow all names as-is (default, backward-compatible).
10749
+ // Set to a function (name, { isAttribute, matcher }) => string to
10750
+ // validate/sanitize tag and attribute names. Throw inside the function
10751
+ // to reject an invalid name.
10656
10752
  };
10657
10753
  __name(Builder, "Builder");
10754
+ __name(detectXmlVersionFromObj, "detectXmlVersionFromObj");
10755
+ __name(resolveTagName2, "resolveTagName");
10658
10756
  Builder.prototype.build = function(jObj) {
10659
10757
  if (this.options.preserveOrder) {
10660
10758
  return toXml(jObj, this.options);
@@ -10665,10 +10763,11 @@ var init_fxb = __esm({
10665
10763
  };
10666
10764
  }
10667
10765
  const matcher = new Matcher();
10668
- return this.j2x(jObj, 0, matcher).val;
10766
+ const xmlVersion = detectXmlVersionFromObj(jObj, this.options);
10767
+ return this.j2x(jObj, 0, matcher, xmlVersion).val;
10669
10768
  }
10670
10769
  };
10671
- Builder.prototype.j2x = function(jObj, level, matcher) {
10770
+ Builder.prototype.j2x = function(jObj, level, matcher, xmlVersion) {
10672
10771
  let attrStr = "";
10673
10772
  let val = "";
10674
10773
  if (this.options.maxNestedTags && matcher.getDepth() >= this.options.maxNestedTags) {
@@ -10678,6 +10777,8 @@ var init_fxb = __esm({
10678
10777
  const isCurrentStopNode = this.checkStopNode(matcher);
10679
10778
  for (let key in jObj) {
10680
10779
  if (!Object.prototype.hasOwnProperty.call(jObj, key)) continue;
10780
+ const isSpecialKey = key === this.options.textNodeName || key === this.options.cdataPropName || key === this.options.commentPropName || this.options.attributesGroupName && key === this.options.attributesGroupName || this.isAttribute(key) || key[0] === "?";
10781
+ const resolvedKey = isSpecialKey ? key : resolveTagName2(key, false, this.options, matcher, xmlVersion);
10681
10782
  if (typeof jObj[key] === "undefined") {
10682
10783
  if (this.isAttribute(key)) {
10683
10784
  val += "";
@@ -10685,36 +10786,37 @@ var init_fxb = __esm({
10685
10786
  } else if (jObj[key] === null) {
10686
10787
  if (this.isAttribute(key)) {
10687
10788
  val += "";
10688
- } else if (key === this.options.cdataPropName) {
10789
+ } else if (resolvedKey === this.options.cdataPropName || resolvedKey === this.options.commentPropName) {
10689
10790
  val += "";
10690
- } else if (key[0] === "?") {
10691
- val += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
10791
+ } else if (resolvedKey[0] === "?") {
10792
+ val += this.indentate(level) + "<" + resolvedKey + "?" + this.tagEndChar;
10692
10793
  } else {
10693
- val += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
10794
+ val += this.indentate(level) + "<" + resolvedKey + "/" + this.tagEndChar;
10694
10795
  }
10695
10796
  } else if (jObj[key] instanceof Date) {
10696
- val += this.buildTextValNode(jObj[key], key, "", level, matcher);
10797
+ val += this.buildTextValNode(jObj[key], resolvedKey, "", level, matcher);
10697
10798
  } else if (typeof jObj[key] !== "object") {
10698
10799
  const attr = this.isAttribute(key);
10699
10800
  if (attr && !this.ignoreAttributesFn(attr, jPath)) {
10700
- attrStr += this.buildAttrPairStr(attr, "" + jObj[key], isCurrentStopNode);
10801
+ const resolvedAttr = resolveTagName2(attr, true, this.options, matcher, xmlVersion);
10802
+ attrStr += this.buildAttrPairStr(resolvedAttr, "" + jObj[key], isCurrentStopNode);
10701
10803
  } else if (!attr) {
10702
10804
  if (key === this.options.textNodeName) {
10703
10805
  let newval = this.options.tagValueProcessor(key, "" + jObj[key]);
10704
10806
  val += this.replaceEntitiesValue(newval);
10705
10807
  } else {
10706
- matcher.push(key);
10808
+ matcher.push(resolvedKey);
10707
10809
  const isStopNode = this.checkStopNode(matcher);
10708
10810
  matcher.pop();
10709
10811
  if (isStopNode) {
10710
10812
  const textValue = "" + jObj[key];
10711
10813
  if (textValue === "") {
10712
- val += this.indentate(level) + "<" + key + this.closeTag(key) + this.tagEndChar;
10814
+ val += this.indentate(level) + "<" + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;
10713
10815
  } else {
10714
- val += this.indentate(level) + "<" + key + ">" + textValue + "</" + key + this.tagEndChar;
10816
+ val += this.indentate(level) + "<" + resolvedKey + ">" + textValue + "</" + resolvedKey + this.tagEndChar;
10715
10817
  }
10716
10818
  } else {
10717
- val += this.buildTextValNode(jObj[key], key, "", level, matcher);
10819
+ val += this.buildTextValNode(jObj[key], resolvedKey, "", level, matcher);
10718
10820
  }
10719
10821
  }
10720
10822
  }
@@ -10726,44 +10828,44 @@ var init_fxb = __esm({
10726
10828
  const item = jObj[key][j];
10727
10829
  if (typeof item === "undefined") {
10728
10830
  } else if (item === null) {
10729
- if (key[0] === "?") val += this.indentate(level) + "<" + key + "?" + this.tagEndChar;
10730
- else val += this.indentate(level) + "<" + key + "/" + this.tagEndChar;
10831
+ if (resolvedKey[0] === "?") val += this.indentate(level) + "<" + resolvedKey + "?" + this.tagEndChar;
10832
+ else val += this.indentate(level) + "<" + resolvedKey + "/" + this.tagEndChar;
10731
10833
  } else if (typeof item === "object") {
10732
10834
  if (this.options.oneListGroup) {
10733
- matcher.push(key);
10734
- const result = this.j2x(item, level + 1, matcher);
10835
+ matcher.push(resolvedKey);
10836
+ const result = this.j2x(item, level + 1, matcher, xmlVersion);
10735
10837
  matcher.pop();
10736
10838
  listTagVal += result.val;
10737
10839
  if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
10738
10840
  listTagAttr += result.attrStr;
10739
10841
  }
10740
10842
  } else {
10741
- listTagVal += this.processTextOrObjNode(item, key, level, matcher);
10843
+ listTagVal += this.processTextOrObjNode(item, resolvedKey, level, matcher, xmlVersion);
10742
10844
  }
10743
10845
  } else {
10744
10846
  if (this.options.oneListGroup) {
10745
- let textValue = this.options.tagValueProcessor(key, item);
10847
+ let textValue = this.options.tagValueProcessor(resolvedKey, item);
10746
10848
  textValue = this.replaceEntitiesValue(textValue);
10747
10849
  listTagVal += textValue;
10748
10850
  } else {
10749
- matcher.push(key);
10851
+ matcher.push(resolvedKey);
10750
10852
  const isStopNode = this.checkStopNode(matcher);
10751
10853
  matcher.pop();
10752
10854
  if (isStopNode) {
10753
10855
  const textValue = "" + item;
10754
10856
  if (textValue === "") {
10755
- listTagVal += this.indentate(level) + "<" + key + this.closeTag(key) + this.tagEndChar;
10857
+ listTagVal += this.indentate(level) + "<" + resolvedKey + this.closeTag(resolvedKey) + this.tagEndChar;
10756
10858
  } else {
10757
- listTagVal += this.indentate(level) + "<" + key + ">" + textValue + "</" + key + this.tagEndChar;
10859
+ listTagVal += this.indentate(level) + "<" + resolvedKey + ">" + textValue + "</" + resolvedKey + this.tagEndChar;
10758
10860
  }
10759
10861
  } else {
10760
- listTagVal += this.buildTextValNode(item, key, "", level, matcher);
10862
+ listTagVal += this.buildTextValNode(item, resolvedKey, "", level, matcher);
10761
10863
  }
10762
10864
  }
10763
10865
  }
10764
10866
  }
10765
10867
  if (this.options.oneListGroup) {
10766
- listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);
10868
+ listTagVal = this.buildObjectNode(listTagVal, resolvedKey, listTagAttr, level);
10767
10869
  }
10768
10870
  val += listTagVal;
10769
10871
  } else {
@@ -10771,10 +10873,11 @@ var init_fxb = __esm({
10771
10873
  const Ks = Object.keys(jObj[key]);
10772
10874
  const L = Ks.length;
10773
10875
  for (let j = 0; j < L; j++) {
10774
- attrStr += this.buildAttrPairStr(Ks[j], "" + jObj[key][Ks[j]], isCurrentStopNode);
10876
+ const resolvedAttr = resolveTagName2(Ks[j], true, this.options, matcher, xmlVersion);
10877
+ attrStr += this.buildAttrPairStr(resolvedAttr, "" + jObj[key][Ks[j]], isCurrentStopNode);
10775
10878
  }
10776
10879
  } else {
10777
- val += this.processTextOrObjNode(jObj[key], key, level, matcher);
10880
+ val += this.processTextOrObjNode(jObj[key], resolvedKey, level, matcher, xmlVersion);
10778
10881
  }
10779
10882
  }
10780
10883
  }
@@ -10787,7 +10890,7 @@ var init_fxb = __esm({
10787
10890
  }
10788
10891
  if (this.options.suppressBooleanAttributes && val === "true") {
10789
10892
  return " " + attrName;
10790
- } else return " " + attrName + '="' + val + '"';
10893
+ } else return " " + attrName + '="' + escapeAttribute(val) + '"';
10791
10894
  };
10792
10895
  __name(processTextOrObjNode, "processTextOrObjNode");
10793
10896
  Builder.prototype.extractAttributes = function(obj) {
@@ -10799,7 +10902,7 @@ var init_fxb = __esm({
10799
10902
  for (let attrKey in attrGroup) {
10800
10903
  if (!Object.prototype.hasOwnProperty.call(attrGroup, attrKey)) continue;
10801
10904
  const cleanKey = attrKey.startsWith(this.options.attributeNamePrefix) ? attrKey.substring(this.options.attributeNamePrefix.length) : attrKey;
10802
- attrValues[cleanKey] = attrGroup[attrKey];
10905
+ attrValues[cleanKey] = escapeAttribute(attrGroup[attrKey]);
10803
10906
  hasAttrs = true;
10804
10907
  }
10805
10908
  } else {
@@ -10807,7 +10910,7 @@ var init_fxb = __esm({
10807
10910
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
10808
10911
  const attr = this.isAttribute(key);
10809
10912
  if (attr) {
10810
- attrValues[attr] = obj[key];
10913
+ attrValues[attr] = escapeAttribute(obj[key]);
10811
10914
  hasAttrs = true;
10812
10915
  }
10813
10916
  }
@@ -10897,6 +11000,8 @@ var init_fxb = __esm({
10897
11000
  else {
10898
11001
  return this.indentate(level) + "<" + key + attrStr + this.closeTag(key) + this.tagEndChar;
10899
11002
  }
11003
+ } else if (key[0] === "?") {
11004
+ return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
10900
11005
  } else {
10901
11006
  let tagEndExp = "</" + key + this.tagEndChar;
10902
11007
  let piClosingChar = "";
@@ -10935,10 +11040,10 @@ var init_fxb = __esm({
10935
11040
  };
10936
11041
  Builder.prototype.buildTextValNode = function(val, key, attrStr, level, matcher) {
10937
11042
  if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {
10938
- const safeVal = String(val).replace(/\]\]>/g, "]]]]><![CDATA[>");
11043
+ const safeVal = safeCdata(val);
10939
11044
  return this.indentate(level) + `<![CDATA[${safeVal}]]>` + this.newLine;
10940
11045
  } else if (this.options.commentPropName !== false && key === this.options.commentPropName) {
10941
- const safeVal = String(val).replace(/--/g, "- -").replace(/-$/, "- ");
11046
+ const safeVal = safeComment(val);
10942
11047
  return this.indentate(level) + `<!--${safeVal}-->` + this.newLine;
10943
11048
  } else if (key[0] === "?") {
10944
11049
  return this.indentate(level) + "<" + key + attrStr + "?" + this.tagEndChar;
@@ -27173,7 +27278,7 @@ var init_operationsInterfaces = __esm({
27173
27278
  });
27174
27279
 
27175
27280
  // ../../node_modules/.store/@azure-storage-blob-npm-12.31.0-1a3cdded19/package/dist/esm/generated/src/index.js
27176
- var init_src3 = __esm({
27281
+ var init_src4 = __esm({
27177
27282
  "../../node_modules/.store/@azure-storage-blob-npm-12.31.0-1a3cdded19/package/dist/esm/generated/src/index.js"() {
27178
27283
  init_models();
27179
27284
  init_storageClient();
@@ -27185,7 +27290,7 @@ var init_src3 = __esm({
27185
27290
  var StorageContextClient;
27186
27291
  var init_StorageContextClient = __esm({
27187
27292
  "../../node_modules/.store/@azure-storage-blob-npm-12.31.0-1a3cdded19/package/dist/esm/StorageContextClient.js"() {
27188
- init_src3();
27293
+ init_src4();
27189
27294
  StorageContextClient = class extends StorageClient {
27190
27295
  static {
27191
27296
  __name(this, "StorageContextClient");
@@ -49,7 +49,7 @@ import {
49
49
  isPipelineLike,
50
50
  logger,
51
51
  newPipeline
52
- } from "./chunk-DTZKESCD.js";
52
+ } from "./chunk-XII3BYIY.js";
53
53
  import "./chunk-BOUMQX3J.js";
54
54
  import "./chunk-HONSOHFT.js";
55
55
  import "./chunk-GKUS2JGY.js";
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  serializationPolicy,
35
35
  serializationPolicyName,
36
36
  stringifyXML
37
- } from "./chunk-DTZKESCD.js";
37
+ } from "./chunk-XII3BYIY.js";
38
38
  import {
39
39
  require_commonjs
40
40
  } from "./chunk-MIWDHAQF.js";
@@ -153,7 +153,7 @@ async function createRemoteCacheClient(params) {
153
153
  const { telemetryClient } = context;
154
154
  return telemetryClient.tracer.startActiveSpan("CREATE_REMOTE_CACHE_CLIENT", async () => {
155
155
  const { getCredential } = await import("./getCredential-Y4HWJOQE.js");
156
- const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-S57Z5QDW.js");
156
+ const { AzureRemoteCacheClient } = await import("./AzureRemoteCacheClient-S655UBV6.js");
157
157
  const { ReporterDecorator } = await import("./ReporterDecorator-DNRF2TDF.js");
158
158
  const { getListOfBlobs } = await import("./getListOfBlobs-EKSDNQNV.js");
159
159
  const credential = await getCredential(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/remote-cache",
3
- "version": "0.11.77",
3
+ "version": "0.11.79",
4
4
  "description": "Manages syncing the local Cloudpack cached assets to/from a remote storage service.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -23,11 +23,11 @@
23
23
  "test": "cloudpack-scripts test"
24
24
  },
25
25
  "dependencies": {
26
- "@ms-cloudpack/common-types": "^0.34.2",
27
- "@ms-cloudpack/environment": "^0.1.4",
28
- "@ms-cloudpack/retry": "^0.1.5",
29
- "@ms-cloudpack/task-reporter": "^0.21.2",
30
- "@ms-cloudpack/telemetry": "^0.12.1",
26
+ "@ms-cloudpack/common-types": "^0.34.4",
27
+ "@ms-cloudpack/environment": "^0.1.6",
28
+ "@ms-cloudpack/retry": "^0.1.7",
29
+ "@ms-cloudpack/task-reporter": "^0.21.4",
30
+ "@ms-cloudpack/telemetry": "^0.12.3",
31
31
  "@napi-rs/keyring": "1.2.0",
32
32
  "mime-types": "^3.0.0",
33
33
  "node-dpapi-prebuilt": "^1.0.3"