@truto/truto-jsonata 1.0.51 → 1.0.52
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/browser/index.js +83 -20
- package/dist/browser/index.js.map +4 -4
- package/dist/cjs/index.cjs +83 -20
- package/dist/cjs/index.cjs.map +4 -4
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -35068,8 +35068,23 @@ var require_formats = __commonJS((exports2, module2) => {
|
|
|
35068
35068
|
// node_modules/qs/lib/utils.js
|
|
35069
35069
|
var require_utils2 = __commonJS((exports2, module2) => {
|
|
35070
35070
|
var formats = require_formats();
|
|
35071
|
+
var getSideChannel = require_side_channel();
|
|
35071
35072
|
var has2 = Object.prototype.hasOwnProperty;
|
|
35072
35073
|
var isArray4 = Array.isArray;
|
|
35074
|
+
var overflowChannel = getSideChannel();
|
|
35075
|
+
var markOverflow = function markOverflow(obj, maxIndex) {
|
|
35076
|
+
overflowChannel.set(obj, maxIndex);
|
|
35077
|
+
return obj;
|
|
35078
|
+
};
|
|
35079
|
+
var isOverflow = function isOverflow(obj) {
|
|
35080
|
+
return overflowChannel.has(obj);
|
|
35081
|
+
};
|
|
35082
|
+
var getMaxIndex = function getMaxIndex(obj) {
|
|
35083
|
+
return overflowChannel.get(obj);
|
|
35084
|
+
};
|
|
35085
|
+
var setMaxIndex = function setMaxIndex(obj, maxIndex) {
|
|
35086
|
+
overflowChannel.set(obj, maxIndex);
|
|
35087
|
+
};
|
|
35073
35088
|
var hexTable = function() {
|
|
35074
35089
|
var array = [];
|
|
35075
35090
|
for (var i2 = 0;i2 < 256; ++i2) {
|
|
@@ -35109,7 +35124,11 @@ var require_utils2 = __commonJS((exports2, module2) => {
|
|
|
35109
35124
|
if (isArray4(target)) {
|
|
35110
35125
|
target.push(source);
|
|
35111
35126
|
} else if (target && typeof target === "object") {
|
|
35112
|
-
if (
|
|
35127
|
+
if (isOverflow(target)) {
|
|
35128
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
35129
|
+
target[newIndex] = source;
|
|
35130
|
+
setMaxIndex(target, newIndex);
|
|
35131
|
+
} else if (options3 && (options3.plainObjects || options3.allowPrototypes) || !has2.call(Object.prototype, source)) {
|
|
35113
35132
|
target[source] = true;
|
|
35114
35133
|
}
|
|
35115
35134
|
} else {
|
|
@@ -35118,6 +35137,15 @@ var require_utils2 = __commonJS((exports2, module2) => {
|
|
|
35118
35137
|
return target;
|
|
35119
35138
|
}
|
|
35120
35139
|
if (!target || typeof target !== "object") {
|
|
35140
|
+
if (isOverflow(source)) {
|
|
35141
|
+
var sourceKeys = Object.keys(source);
|
|
35142
|
+
var result = options3 && options3.plainObjects ? { __proto__: null, 0: target } : { 0: target };
|
|
35143
|
+
for (var m = 0;m < sourceKeys.length; m++) {
|
|
35144
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
35145
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
35146
|
+
}
|
|
35147
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
35148
|
+
}
|
|
35121
35149
|
return [target].concat(source);
|
|
35122
35150
|
}
|
|
35123
35151
|
var mergeTarget = target;
|
|
@@ -35240,8 +35268,18 @@ var require_utils2 = __commonJS((exports2, module2) => {
|
|
|
35240
35268
|
}
|
|
35241
35269
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
35242
35270
|
};
|
|
35243
|
-
var combine = function combine(a, b) {
|
|
35244
|
-
|
|
35271
|
+
var combine = function combine(a, b, arrayLimit, plainObjects) {
|
|
35272
|
+
if (isOverflow(a)) {
|
|
35273
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
35274
|
+
a[newIndex] = b;
|
|
35275
|
+
setMaxIndex(a, newIndex);
|
|
35276
|
+
return a;
|
|
35277
|
+
}
|
|
35278
|
+
var result = [].concat(a, b);
|
|
35279
|
+
if (result.length > arrayLimit) {
|
|
35280
|
+
return markOverflow(arrayToObject(result, { plainObjects }), result.length - 1);
|
|
35281
|
+
}
|
|
35282
|
+
return result;
|
|
35245
35283
|
};
|
|
35246
35284
|
var maybeMap = function maybeMap(val, fn) {
|
|
35247
35285
|
if (isArray4(val)) {
|
|
@@ -35261,6 +35299,7 @@ var require_utils2 = __commonJS((exports2, module2) => {
|
|
|
35261
35299
|
decode,
|
|
35262
35300
|
encode,
|
|
35263
35301
|
isBuffer: isBuffer3,
|
|
35302
|
+
isOverflow,
|
|
35264
35303
|
isRegExp: isRegExp3,
|
|
35265
35304
|
maybeMap,
|
|
35266
35305
|
merge
|
|
@@ -35591,9 +35630,11 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35591
35630
|
val = options3.strictNullHandling ? null : "";
|
|
35592
35631
|
} else {
|
|
35593
35632
|
key = options3.decoder(part.slice(0, pos), defaults.decoder, charset2, "key");
|
|
35594
|
-
|
|
35595
|
-
|
|
35596
|
-
|
|
35633
|
+
if (key !== null) {
|
|
35634
|
+
val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options3, isArray4(obj[key]) ? obj[key].length : 0), function(encodedVal) {
|
|
35635
|
+
return options3.decoder(encodedVal, defaults.decoder, charset2, "value");
|
|
35636
|
+
});
|
|
35637
|
+
}
|
|
35597
35638
|
}
|
|
35598
35639
|
if (val && options3.interpretNumericEntities && charset2 === "iso-8859-1") {
|
|
35599
35640
|
val = interpretNumericEntities(String(val));
|
|
@@ -35601,11 +35642,13 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35601
35642
|
if (part.indexOf("[]=") > -1) {
|
|
35602
35643
|
val = isArray4(val) ? [val] : val;
|
|
35603
35644
|
}
|
|
35604
|
-
|
|
35605
|
-
|
|
35606
|
-
|
|
35607
|
-
|
|
35608
|
-
|
|
35645
|
+
if (key !== null) {
|
|
35646
|
+
var existing = has2.call(obj, key);
|
|
35647
|
+
if (existing && options3.duplicates === "combine") {
|
|
35648
|
+
obj[key] = utils.combine(obj[key], val, options3.arrayLimit, options3.plainObjects);
|
|
35649
|
+
} else if (!existing || options3.duplicates === "last") {
|
|
35650
|
+
obj[key] = val;
|
|
35651
|
+
}
|
|
35609
35652
|
}
|
|
35610
35653
|
}
|
|
35611
35654
|
return obj;
|
|
@@ -35621,7 +35664,11 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35621
35664
|
var obj;
|
|
35622
35665
|
var root3 = chain[i2];
|
|
35623
35666
|
if (root3 === "[]" && options3.parseArrays) {
|
|
35624
|
-
|
|
35667
|
+
if (utils.isOverflow(leaf)) {
|
|
35668
|
+
obj = leaf;
|
|
35669
|
+
} else {
|
|
35670
|
+
obj = options3.allowEmptyArrays && (leaf === "" || options3.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf, options3.arrayLimit, options3.plainObjects);
|
|
35671
|
+
}
|
|
35625
35672
|
} else {
|
|
35626
35673
|
obj = options3.plainObjects ? { __proto__: null } : {};
|
|
35627
35674
|
var cleanRoot = root3.charAt(0) === "[" && root3.charAt(root3.length - 1) === "]" ? root3.slice(1, -1) : root3;
|
|
@@ -35640,14 +35687,19 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35640
35687
|
}
|
|
35641
35688
|
return leaf;
|
|
35642
35689
|
};
|
|
35643
|
-
var
|
|
35644
|
-
if (!givenKey) {
|
|
35645
|
-
return;
|
|
35646
|
-
}
|
|
35690
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options3) {
|
|
35647
35691
|
var key = options3.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
|
|
35692
|
+
if (options3.depth <= 0) {
|
|
35693
|
+
if (!options3.plainObjects && has2.call(Object.prototype, key)) {
|
|
35694
|
+
if (!options3.allowPrototypes) {
|
|
35695
|
+
return;
|
|
35696
|
+
}
|
|
35697
|
+
}
|
|
35698
|
+
return [key];
|
|
35699
|
+
}
|
|
35648
35700
|
var brackets = /(\[[^[\]]*])/;
|
|
35649
35701
|
var child = /(\[[^[\]]*])/g;
|
|
35650
|
-
var segment =
|
|
35702
|
+
var segment = brackets.exec(key);
|
|
35651
35703
|
var parent2 = segment ? key.slice(0, segment.index) : key;
|
|
35652
35704
|
var keys2 = [];
|
|
35653
35705
|
if (parent2) {
|
|
@@ -35659,9 +35711,10 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35659
35711
|
keys2.push(parent2);
|
|
35660
35712
|
}
|
|
35661
35713
|
var i2 = 0;
|
|
35662
|
-
while (
|
|
35714
|
+
while ((segment = child.exec(key)) !== null && i2 < options3.depth) {
|
|
35663
35715
|
i2 += 1;
|
|
35664
|
-
|
|
35716
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
35717
|
+
if (!options3.plainObjects && has2.call(Object.prototype, segmentContent)) {
|
|
35665
35718
|
if (!options3.allowPrototypes) {
|
|
35666
35719
|
return;
|
|
35667
35720
|
}
|
|
@@ -35674,6 +35727,16 @@ var require_parse = __commonJS((exports2, module2) => {
|
|
|
35674
35727
|
}
|
|
35675
35728
|
keys2.push("[" + key.slice(segment.index) + "]");
|
|
35676
35729
|
}
|
|
35730
|
+
return keys2;
|
|
35731
|
+
};
|
|
35732
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options3, valuesParsed) {
|
|
35733
|
+
if (!givenKey) {
|
|
35734
|
+
return;
|
|
35735
|
+
}
|
|
35736
|
+
var keys2 = splitKeyIntoSegments(givenKey, options3);
|
|
35737
|
+
if (!keys2) {
|
|
35738
|
+
return;
|
|
35739
|
+
}
|
|
35677
35740
|
return parseObject(keys2, val, options3, valuesParsed);
|
|
35678
35741
|
};
|
|
35679
35742
|
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
@@ -76902,4 +76965,4 @@ function trutoJsonata(expression) {
|
|
|
76902
76965
|
return registerJsonataExtensions(import_jsonata.default(expression));
|
|
76903
76966
|
}
|
|
76904
76967
|
|
|
76905
|
-
//# debugId=
|
|
76968
|
+
//# debugId=D25F93F30C06ABA764756E2164756E21
|