swagger-client 3.15.0 → 3.16.0
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/swagger-client.browser.js +346 -228
- package/dist/swagger-client.browser.min.js +1 -1
- package/dist/swagger-client.browser.min.js.map +1 -1
- package/es/http/fold-formdata-to-request.node.js +2 -2
- package/es/http/index.js +18 -5
- package/lib/http/fold-formdata-to-request.node.js +1 -1
- package/lib/http/index.js +17 -6
- package/package.json +7 -7
|
@@ -2869,17 +2869,15 @@ function isFile(obj, navigatorObj) {
|
|
|
2869
2869
|
return false;
|
|
2870
2870
|
}
|
|
2871
2871
|
|
|
2872
|
-
if (typeof File !== 'undefined' && obj instanceof File) {
|
|
2873
|
-
// eslint-disable-line no-undef
|
|
2872
|
+
if (typeof formdata_node__WEBPACK_IMPORTED_MODULE_20__.File !== 'undefined' && obj instanceof formdata_node__WEBPACK_IMPORTED_MODULE_20__.File) {
|
|
2874
2873
|
return true;
|
|
2875
2874
|
}
|
|
2876
2875
|
|
|
2877
|
-
if (typeof Blob !== 'undefined' && obj instanceof Blob) {
|
|
2878
|
-
// eslint-disable-line no-undef
|
|
2876
|
+
if (typeof formdata_node__WEBPACK_IMPORTED_MODULE_20__.Blob !== 'undefined' && obj instanceof formdata_node__WEBPACK_IMPORTED_MODULE_20__.Blob) {
|
|
2879
2877
|
return true;
|
|
2880
2878
|
}
|
|
2881
2879
|
|
|
2882
|
-
if (
|
|
2880
|
+
if (buffer__WEBPACK_IMPORTED_MODULE_19__.Buffer.isBuffer(obj)) {
|
|
2883
2881
|
return true;
|
|
2884
2882
|
}
|
|
2885
2883
|
|
|
@@ -3063,6 +3061,11 @@ function buildFormData(reqForm) {
|
|
|
3063
3061
|
* Build a new FormData instance, support array as field value
|
|
3064
3062
|
* OAS2.0 - when collectionFormat is multi
|
|
3065
3063
|
* OAS3.0 - when explode of Encoding Object is true
|
|
3064
|
+
*
|
|
3065
|
+
* This function explicitly handles Buffers (for backward compatibility)
|
|
3066
|
+
* if provided as a values to FormData. FormData can only handle USVString
|
|
3067
|
+
* or Blob.
|
|
3068
|
+
*
|
|
3066
3069
|
* @param {Object} reqForm - ori req.form
|
|
3067
3070
|
* @return {FormData} - new FormData instance
|
|
3068
3071
|
*/
|
|
@@ -3089,13 +3092,23 @@ function buildFormData(reqForm) {
|
|
|
3089
3092
|
try {
|
|
3090
3093
|
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
3091
3094
|
var v = _step2.value;
|
|
3092
|
-
|
|
3095
|
+
|
|
3096
|
+
if (buffer__WEBPACK_IMPORTED_MODULE_19__.Buffer.isBuffer(v)) {
|
|
3097
|
+
var blob = new formdata_node__WEBPACK_IMPORTED_MODULE_20__.Blob([v]);
|
|
3098
|
+
formData.append(key, blob);
|
|
3099
|
+
} else {
|
|
3100
|
+
formData.append(key, v);
|
|
3101
|
+
}
|
|
3093
3102
|
}
|
|
3094
3103
|
} catch (err) {
|
|
3095
3104
|
_iterator2.e(err);
|
|
3096
3105
|
} finally {
|
|
3097
3106
|
_iterator2.f();
|
|
3098
3107
|
}
|
|
3108
|
+
} else if (buffer__WEBPACK_IMPORTED_MODULE_19__.Buffer.isBuffer(value)) {
|
|
3109
|
+
var _blob = new formdata_node__WEBPACK_IMPORTED_MODULE_20__.Blob([value]);
|
|
3110
|
+
|
|
3111
|
+
formData.append(key, _blob);
|
|
3099
3112
|
} else {
|
|
3100
3113
|
formData.append(key, value);
|
|
3101
3114
|
}
|
|
@@ -8559,6 +8572,18 @@ var entryVirtual = __webpack_require__(5703);
|
|
|
8559
8572
|
module.exports = entryVirtual('Array').splice;
|
|
8560
8573
|
|
|
8561
8574
|
|
|
8575
|
+
/***/ }),
|
|
8576
|
+
|
|
8577
|
+
/***/ 3830:
|
|
8578
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8579
|
+
|
|
8580
|
+
__webpack_require__(6274);
|
|
8581
|
+
__webpack_require__(7971);
|
|
8582
|
+
var getIteratorMethod = __webpack_require__(2902);
|
|
8583
|
+
|
|
8584
|
+
module.exports = getIteratorMethod;
|
|
8585
|
+
|
|
8586
|
+
|
|
8562
8587
|
/***/ }),
|
|
8563
8588
|
|
|
8564
8589
|
/***/ 6043:
|
|
@@ -8925,7 +8950,7 @@ module.exports = path.WeakMap;
|
|
|
8925
8950
|
/***/ 7385:
|
|
8926
8951
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8927
8952
|
|
|
8928
|
-
var parent = __webpack_require__(
|
|
8953
|
+
var parent = __webpack_require__(7698);
|
|
8929
8954
|
|
|
8930
8955
|
module.exports = parent;
|
|
8931
8956
|
|
|
@@ -8935,7 +8960,7 @@ module.exports = parent;
|
|
|
8935
8960
|
/***/ 1522:
|
|
8936
8961
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8937
8962
|
|
|
8938
|
-
var parent = __webpack_require__(
|
|
8963
|
+
var parent = __webpack_require__(3363);
|
|
8939
8964
|
|
|
8940
8965
|
module.exports = parent;
|
|
8941
8966
|
|
|
@@ -8945,12 +8970,9 @@ module.exports = parent;
|
|
|
8945
8970
|
/***/ 2209:
|
|
8946
8971
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8947
8972
|
|
|
8948
|
-
__webpack_require__(
|
|
8949
|
-
__webpack_require__(7971);
|
|
8950
|
-
__webpack_require__(7634);
|
|
8951
|
-
var getIteratorMethod = __webpack_require__(2902);
|
|
8973
|
+
var parent = __webpack_require__(6243);
|
|
8952
8974
|
|
|
8953
|
-
module.exports =
|
|
8975
|
+
module.exports = parent;
|
|
8954
8976
|
|
|
8955
8977
|
|
|
8956
8978
|
/***/ }),
|
|
@@ -8958,7 +8980,7 @@ module.exports = getIteratorMethod;
|
|
|
8958
8980
|
/***/ 4442:
|
|
8959
8981
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8960
8982
|
|
|
8961
|
-
var parent = __webpack_require__(
|
|
8983
|
+
var parent = __webpack_require__(1955);
|
|
8962
8984
|
|
|
8963
8985
|
module.exports = parent;
|
|
8964
8986
|
|
|
@@ -8978,7 +9000,7 @@ module.exports = parent;
|
|
|
8978
9000
|
/***/ 9447:
|
|
8979
9001
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8980
9002
|
|
|
8981
|
-
var parent = __webpack_require__(
|
|
9003
|
+
var parent = __webpack_require__(9373);
|
|
8982
9004
|
|
|
8983
9005
|
module.exports = parent;
|
|
8984
9006
|
|
|
@@ -8988,7 +9010,7 @@ module.exports = parent;
|
|
|
8988
9010
|
/***/ 1493:
|
|
8989
9011
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8990
9012
|
|
|
8991
|
-
var parent = __webpack_require__(
|
|
9013
|
+
var parent = __webpack_require__(2073);
|
|
8992
9014
|
|
|
8993
9015
|
module.exports = parent;
|
|
8994
9016
|
|
|
@@ -8998,7 +9020,7 @@ module.exports = parent;
|
|
|
8998
9020
|
/***/ 573:
|
|
8999
9021
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9000
9022
|
|
|
9001
|
-
var parent = __webpack_require__(
|
|
9023
|
+
var parent = __webpack_require__(7396);
|
|
9002
9024
|
|
|
9003
9025
|
module.exports = parent;
|
|
9004
9026
|
|
|
@@ -9008,7 +9030,7 @@ module.exports = parent;
|
|
|
9008
9030
|
/***/ 3685:
|
|
9009
9031
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9010
9032
|
|
|
9011
|
-
var parent = __webpack_require__(
|
|
9033
|
+
var parent = __webpack_require__(1910);
|
|
9012
9034
|
|
|
9013
9035
|
module.exports = parent;
|
|
9014
9036
|
|
|
@@ -9018,7 +9040,7 @@ module.exports = parent;
|
|
|
9018
9040
|
/***/ 7533:
|
|
9019
9041
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9020
9042
|
|
|
9021
|
-
var parent = __webpack_require__(
|
|
9043
|
+
var parent = __webpack_require__(9427);
|
|
9022
9044
|
|
|
9023
9045
|
module.exports = parent;
|
|
9024
9046
|
|
|
@@ -9028,7 +9050,7 @@ module.exports = parent;
|
|
|
9028
9050
|
/***/ 9057:
|
|
9029
9051
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9030
9052
|
|
|
9031
|
-
var parent = __webpack_require__(
|
|
9053
|
+
var parent = __webpack_require__(2857);
|
|
9032
9054
|
|
|
9033
9055
|
module.exports = parent;
|
|
9034
9056
|
|
|
@@ -9038,7 +9060,7 @@ module.exports = parent;
|
|
|
9038
9060
|
/***/ 4710:
|
|
9039
9061
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9040
9062
|
|
|
9041
|
-
var parent = __webpack_require__(
|
|
9063
|
+
var parent = __webpack_require__(9534);
|
|
9042
9064
|
|
|
9043
9065
|
module.exports = parent;
|
|
9044
9066
|
|
|
@@ -9048,7 +9070,7 @@ module.exports = parent;
|
|
|
9048
9070
|
/***/ 3799:
|
|
9049
9071
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9050
9072
|
|
|
9051
|
-
var parent = __webpack_require__(
|
|
9073
|
+
var parent = __webpack_require__(3059);
|
|
9052
9074
|
|
|
9053
9075
|
module.exports = parent;
|
|
9054
9076
|
|
|
@@ -9058,7 +9080,7 @@ module.exports = parent;
|
|
|
9058
9080
|
/***/ 9531:
|
|
9059
9081
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9060
9082
|
|
|
9061
|
-
var parent = __webpack_require__(
|
|
9083
|
+
var parent = __webpack_require__(7460);
|
|
9062
9084
|
__webpack_require__(9731);
|
|
9063
9085
|
// TODO: Remove from `core-js@4`
|
|
9064
9086
|
__webpack_require__(5708);
|
|
@@ -9073,7 +9095,7 @@ module.exports = parent;
|
|
|
9073
9095
|
/***/ 6600:
|
|
9074
9096
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9075
9097
|
|
|
9076
|
-
var parent = __webpack_require__(
|
|
9098
|
+
var parent = __webpack_require__(2547);
|
|
9077
9099
|
__webpack_require__(8783);
|
|
9078
9100
|
__webpack_require__(3975);
|
|
9079
9101
|
__webpack_require__(5799);
|
|
@@ -9092,7 +9114,7 @@ module.exports = parent;
|
|
|
9092
9114
|
/***/ 9759:
|
|
9093
9115
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
9094
9116
|
|
|
9095
|
-
var parent = __webpack_require__(
|
|
9117
|
+
var parent = __webpack_require__(6509);
|
|
9096
9118
|
|
|
9097
9119
|
module.exports = parent;
|
|
9098
9120
|
|
|
@@ -10061,6 +10083,17 @@ module.exports = {
|
|
|
10061
10083
|
module.exports = typeof window == 'object';
|
|
10062
10084
|
|
|
10063
10085
|
|
|
10086
|
+
/***/ }),
|
|
10087
|
+
|
|
10088
|
+
/***/ 4470:
|
|
10089
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
10090
|
+
|
|
10091
|
+
var userAgent = __webpack_require__(2861);
|
|
10092
|
+
var global = __webpack_require__(1899);
|
|
10093
|
+
|
|
10094
|
+
module.exports = /iphone|ipod|ipad/i.test(userAgent) && global.Pebble !== undefined;
|
|
10095
|
+
|
|
10096
|
+
|
|
10064
10097
|
/***/ }),
|
|
10065
10098
|
|
|
10066
10099
|
/***/ 2749:
|
|
@@ -10937,6 +10970,7 @@ var global = __webpack_require__(1899);
|
|
|
10937
10970
|
var getOwnPropertyDescriptor = __webpack_require__(9677).f;
|
|
10938
10971
|
var macrotask = __webpack_require__(2941).set;
|
|
10939
10972
|
var IS_IOS = __webpack_require__(2749);
|
|
10973
|
+
var IS_IOS_PEBBLE = __webpack_require__(4470);
|
|
10940
10974
|
var IS_WEBOS_WEBKIT = __webpack_require__(8045);
|
|
10941
10975
|
var IS_NODE = __webpack_require__(6049);
|
|
10942
10976
|
|
|
@@ -10979,7 +11013,7 @@ if (!queueMicrotask) {
|
|
|
10979
11013
|
node.data = toggle = !toggle;
|
|
10980
11014
|
};
|
|
10981
11015
|
// environments with maybe non-completely correct, but existent Promise
|
|
10982
|
-
} else if (Promise && Promise.resolve) {
|
|
11016
|
+
} else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
|
|
10983
11017
|
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
10984
11018
|
promise = Promise.resolve(undefined);
|
|
10985
11019
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
@@ -11835,7 +11869,7 @@ var store = __webpack_require__(3030);
|
|
|
11835
11869
|
(module.exports = function (key, value) {
|
|
11836
11870
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
11837
11871
|
})('versions', []).push({
|
|
11838
|
-
version: '3.16.
|
|
11872
|
+
version: '3.16.1',
|
|
11839
11873
|
mode: IS_PURE ? 'pure' : 'global',
|
|
11840
11874
|
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
11841
11875
|
});
|
|
@@ -14719,6 +14753,16 @@ var parent = __webpack_require__(4493);
|
|
|
14719
14753
|
module.exports = parent;
|
|
14720
14754
|
|
|
14721
14755
|
|
|
14756
|
+
/***/ }),
|
|
14757
|
+
|
|
14758
|
+
/***/ 3363:
|
|
14759
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14760
|
+
|
|
14761
|
+
var parent = __webpack_require__(4034);
|
|
14762
|
+
|
|
14763
|
+
module.exports = parent;
|
|
14764
|
+
|
|
14765
|
+
|
|
14722
14766
|
/***/ }),
|
|
14723
14767
|
|
|
14724
14768
|
/***/ 2908:
|
|
@@ -14739,6 +14783,17 @@ var parent = __webpack_require__(9324);
|
|
|
14739
14783
|
module.exports = parent;
|
|
14740
14784
|
|
|
14741
14785
|
|
|
14786
|
+
/***/ }),
|
|
14787
|
+
|
|
14788
|
+
/***/ 6243:
|
|
14789
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14790
|
+
|
|
14791
|
+
var parent = __webpack_require__(3830);
|
|
14792
|
+
__webpack_require__(7634);
|
|
14793
|
+
|
|
14794
|
+
module.exports = parent;
|
|
14795
|
+
|
|
14796
|
+
|
|
14742
14797
|
/***/ }),
|
|
14743
14798
|
|
|
14744
14799
|
/***/ 8065:
|
|
@@ -14815,6 +14870,16 @@ var parent = __webpack_require__(8557);
|
|
|
14815
14870
|
module.exports = parent;
|
|
14816
14871
|
|
|
14817
14872
|
|
|
14873
|
+
/***/ }),
|
|
14874
|
+
|
|
14875
|
+
/***/ 9373:
|
|
14876
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14877
|
+
|
|
14878
|
+
var parent = __webpack_require__(4570);
|
|
14879
|
+
|
|
14880
|
+
module.exports = parent;
|
|
14881
|
+
|
|
14882
|
+
|
|
14818
14883
|
/***/ }),
|
|
14819
14884
|
|
|
14820
14885
|
/***/ 1798:
|
|
@@ -14875,6 +14940,26 @@ var parent = __webpack_require__(5999);
|
|
|
14875
14940
|
module.exports = parent;
|
|
14876
14941
|
|
|
14877
14942
|
|
|
14943
|
+
/***/ }),
|
|
14944
|
+
|
|
14945
|
+
/***/ 7396:
|
|
14946
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14947
|
+
|
|
14948
|
+
var parent = __webpack_require__(7702);
|
|
14949
|
+
|
|
14950
|
+
module.exports = parent;
|
|
14951
|
+
|
|
14952
|
+
|
|
14953
|
+
/***/ }),
|
|
14954
|
+
|
|
14955
|
+
/***/ 1910:
|
|
14956
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14957
|
+
|
|
14958
|
+
var parent = __webpack_require__(8171);
|
|
14959
|
+
|
|
14960
|
+
module.exports = parent;
|
|
14961
|
+
|
|
14962
|
+
|
|
14878
14963
|
/***/ }),
|
|
14879
14964
|
|
|
14880
14965
|
/***/ 6209:
|
|
@@ -14885,6 +14970,26 @@ var parent = __webpack_require__(3081);
|
|
|
14885
14970
|
module.exports = parent;
|
|
14886
14971
|
|
|
14887
14972
|
|
|
14973
|
+
/***/ }),
|
|
14974
|
+
|
|
14975
|
+
/***/ 9427:
|
|
14976
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14977
|
+
|
|
14978
|
+
var parent = __webpack_require__(286);
|
|
14979
|
+
|
|
14980
|
+
module.exports = parent;
|
|
14981
|
+
|
|
14982
|
+
|
|
14983
|
+
/***/ }),
|
|
14984
|
+
|
|
14985
|
+
/***/ 2857:
|
|
14986
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
14987
|
+
|
|
14988
|
+
var parent = __webpack_require__(2766);
|
|
14989
|
+
|
|
14990
|
+
module.exports = parent;
|
|
14991
|
+
|
|
14992
|
+
|
|
14888
14993
|
/***/ }),
|
|
14889
14994
|
|
|
14890
14995
|
/***/ 4477:
|
|
@@ -14895,6 +15000,16 @@ var parent = __webpack_require__(3288);
|
|
|
14895
15000
|
module.exports = parent;
|
|
14896
15001
|
|
|
14897
15002
|
|
|
15003
|
+
/***/ }),
|
|
15004
|
+
|
|
15005
|
+
/***/ 9534:
|
|
15006
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
15007
|
+
|
|
15008
|
+
var parent = __webpack_require__(498);
|
|
15009
|
+
|
|
15010
|
+
module.exports = parent;
|
|
15011
|
+
|
|
15012
|
+
|
|
14898
15013
|
/***/ }),
|
|
14899
15014
|
|
|
14900
15015
|
/***/ 3059:
|
|
@@ -22547,24 +22662,24 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
22547
22662
|
/* harmony import */ var _module_core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8625);
|
|
22548
22663
|
/* harmony import */ var _module_duplex_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2489);
|
|
22549
22664
|
/* harmony import */ var _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9685);
|
|
22550
|
-
|
|
22551
|
-
|
|
22552
|
-
|
|
22553
|
-
|
|
22554
|
-
|
|
22555
|
-
/**
|
|
22556
|
-
* Default export for backwards compat
|
|
22557
|
-
*/
|
|
22558
|
-
|
|
22559
|
-
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Object.assign({}, _module_core_mjs__WEBPACK_IMPORTED_MODULE_0__, _module_duplex_mjs__WEBPACK_IMPORTED_MODULE_1__, {
|
|
22564
|
-
JsonPatchError: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.PatchError,
|
|
22565
|
-
deepClone: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__._deepClone,
|
|
22566
|
-
escapePathComponent: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.escapePathComponent,
|
|
22567
|
-
unescapePathComponent: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.unescapePathComponent
|
|
22665
|
+
|
|
22666
|
+
|
|
22667
|
+
|
|
22668
|
+
|
|
22669
|
+
|
|
22670
|
+
/**
|
|
22671
|
+
* Default export for backwards compat
|
|
22672
|
+
*/
|
|
22673
|
+
|
|
22674
|
+
|
|
22675
|
+
|
|
22676
|
+
|
|
22677
|
+
|
|
22678
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Object.assign({}, _module_core_mjs__WEBPACK_IMPORTED_MODULE_0__, _module_duplex_mjs__WEBPACK_IMPORTED_MODULE_1__, {
|
|
22679
|
+
JsonPatchError: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.PatchError,
|
|
22680
|
+
deepClone: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__._deepClone,
|
|
22681
|
+
escapePathComponent: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.escapePathComponent,
|
|
22682
|
+
unescapePathComponent: _module_helpers_mjs__WEBPACK_IMPORTED_MODULE_2__.unescapePathComponent
|
|
22568
22683
|
}));
|
|
22569
22684
|
|
|
22570
22685
|
/***/ }),
|
|
@@ -22771,6 +22886,9 @@ function applyOperation(document, operation, validateOperation, mutateDocument,
|
|
|
22771
22886
|
}
|
|
22772
22887
|
while (true) {
|
|
22773
22888
|
key = keys[t];
|
|
22889
|
+
if (key && key.indexOf('~') != -1) {
|
|
22890
|
+
key = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.unescapePathComponent)(key);
|
|
22891
|
+
}
|
|
22774
22892
|
if (banPrototypeModifications && key == '__proto__') {
|
|
22775
22893
|
throw new TypeError('JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README');
|
|
22776
22894
|
}
|
|
@@ -22812,9 +22930,6 @@ function applyOperation(document, operation, validateOperation, mutateDocument,
|
|
|
22812
22930
|
}
|
|
22813
22931
|
}
|
|
22814
22932
|
else {
|
|
22815
|
-
if (key && key.indexOf('~') != -1) {
|
|
22816
|
-
key = (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.unescapePathComponent)(key);
|
|
22817
|
-
}
|
|
22818
22933
|
if (t >= len) {
|
|
22819
22934
|
var returnValue = objOps[operation.op].call(operation, obj, key, document); // Apply patch
|
|
22820
22935
|
if (returnValue.test === false) {
|
|
@@ -22824,6 +22939,11 @@ function applyOperation(document, operation, validateOperation, mutateDocument,
|
|
|
22824
22939
|
}
|
|
22825
22940
|
}
|
|
22826
22941
|
obj = obj[key];
|
|
22942
|
+
// If we have more keys in the path, but the next value isn't a non-null object,
|
|
22943
|
+
// throw an OPERATION_PATH_UNRESOLVABLE error instead of iterating again.
|
|
22944
|
+
if (validateOperation && t < len && (!obj || typeof obj !== "object")) {
|
|
22945
|
+
throw new JsonPatchError('Cannot perform operation at the desired path', 'OPERATION_PATH_UNRESOLVABLE', index, operation, document);
|
|
22946
|
+
}
|
|
22827
22947
|
}
|
|
22828
22948
|
}
|
|
22829
22949
|
}
|
|
@@ -23158,7 +23278,7 @@ function _generate(mirror, obj, patches, path, invertible) {
|
|
|
23158
23278
|
var oldVal = mirror[key];
|
|
23159
23279
|
if ((0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.hasOwnProperty)(obj, key) && !(obj[key] === undefined && oldVal !== undefined && Array.isArray(obj) === false)) {
|
|
23160
23280
|
var newVal = obj[key];
|
|
23161
|
-
if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null) {
|
|
23281
|
+
if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) {
|
|
23162
23282
|
_generate(oldVal, newVal, patches, path + "/" + (0,_helpers_mjs__WEBPACK_IMPORTED_MODULE_0__.escapePathComponent)(key), invertible);
|
|
23163
23283
|
}
|
|
23164
23284
|
else {
|
|
@@ -23226,177 +23346,177 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23226
23346
|
/* harmony export */ "hasUndefined": () => (/* binding */ hasUndefined),
|
|
23227
23347
|
/* harmony export */ "PatchError": () => (/* binding */ PatchError)
|
|
23228
23348
|
/* harmony export */ });
|
|
23229
|
-
/*!
|
|
23230
|
-
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
23231
|
-
* (c) 2017 Joachim Wester
|
|
23232
|
-
* MIT license
|
|
23233
|
-
*/
|
|
23234
|
-
var __extends = (undefined && undefined.__extends) || (function () {
|
|
23235
|
-
var extendStatics = function (d, b) {
|
|
23236
|
-
extendStatics = Object.setPrototypeOf ||
|
|
23237
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23238
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
23239
|
-
return extendStatics(d, b);
|
|
23240
|
-
};
|
|
23241
|
-
return function (d, b) {
|
|
23242
|
-
extendStatics(d, b);
|
|
23243
|
-
function __() { this.constructor = d; }
|
|
23244
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23245
|
-
};
|
|
23246
|
-
})();
|
|
23247
|
-
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
23248
|
-
function hasOwnProperty(obj, key) {
|
|
23249
|
-
return _hasOwnProperty.call(obj, key);
|
|
23250
|
-
}
|
|
23251
|
-
function _objectKeys(obj) {
|
|
23252
|
-
if (Array.isArray(obj)) {
|
|
23253
|
-
var keys = new Array(obj.length);
|
|
23254
|
-
for (var k = 0; k < keys.length; k++) {
|
|
23255
|
-
keys[k] = "" + k;
|
|
23256
|
-
}
|
|
23257
|
-
return keys;
|
|
23258
|
-
}
|
|
23259
|
-
if (Object.keys) {
|
|
23260
|
-
return Object.keys(obj);
|
|
23261
|
-
}
|
|
23262
|
-
var keys = [];
|
|
23263
|
-
for (var i in obj) {
|
|
23264
|
-
if (hasOwnProperty(obj, i)) {
|
|
23265
|
-
keys.push(i);
|
|
23266
|
-
}
|
|
23267
|
-
}
|
|
23268
|
-
return keys;
|
|
23269
|
-
}
|
|
23270
|
-
;
|
|
23271
|
-
/**
|
|
23272
|
-
* Deeply clone the object.
|
|
23273
|
-
* https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
|
|
23274
|
-
* @param {any} obj value to clone
|
|
23275
|
-
* @return {any} cloned obj
|
|
23276
|
-
*/
|
|
23277
|
-
function _deepClone(obj) {
|
|
23278
|
-
switch (typeof obj) {
|
|
23279
|
-
case "object":
|
|
23280
|
-
return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
|
|
23281
|
-
case "undefined":
|
|
23282
|
-
return null; //this is how JSON.stringify behaves for array items
|
|
23283
|
-
default:
|
|
23284
|
-
return obj; //no need to clone primitives
|
|
23285
|
-
}
|
|
23286
|
-
}
|
|
23287
|
-
//3x faster than cached /^\d+$/.test(str)
|
|
23288
|
-
function isInteger(str) {
|
|
23289
|
-
var i = 0;
|
|
23290
|
-
var len = str.length;
|
|
23291
|
-
var charCode;
|
|
23292
|
-
while (i < len) {
|
|
23293
|
-
charCode = str.charCodeAt(i);
|
|
23294
|
-
if (charCode >= 48 && charCode <= 57) {
|
|
23295
|
-
i++;
|
|
23296
|
-
continue;
|
|
23297
|
-
}
|
|
23298
|
-
return false;
|
|
23299
|
-
}
|
|
23300
|
-
return true;
|
|
23301
|
-
}
|
|
23302
|
-
/**
|
|
23303
|
-
* Escapes a json pointer path
|
|
23304
|
-
* @param path The raw pointer
|
|
23305
|
-
* @return the Escaped path
|
|
23306
|
-
*/
|
|
23307
|
-
function escapePathComponent(path) {
|
|
23308
|
-
if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
|
|
23309
|
-
return path;
|
|
23310
|
-
return path.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
23311
|
-
}
|
|
23312
|
-
/**
|
|
23313
|
-
* Unescapes a json pointer path
|
|
23314
|
-
* @param path The escaped pointer
|
|
23315
|
-
* @return The unescaped path
|
|
23316
|
-
*/
|
|
23317
|
-
function unescapePathComponent(path) {
|
|
23318
|
-
return path.replace(/~1/g, '/').replace(/~0/g, '~');
|
|
23319
|
-
}
|
|
23320
|
-
function _getPathRecursive(root, obj) {
|
|
23321
|
-
var found;
|
|
23322
|
-
for (var key in root) {
|
|
23323
|
-
if (hasOwnProperty(root, key)) {
|
|
23324
|
-
if (root[key] === obj) {
|
|
23325
|
-
return escapePathComponent(key) + '/';
|
|
23326
|
-
}
|
|
23327
|
-
else if (typeof root[key] === 'object') {
|
|
23328
|
-
found = _getPathRecursive(root[key], obj);
|
|
23329
|
-
if (found != '') {
|
|
23330
|
-
return escapePathComponent(key) + '/' + found;
|
|
23331
|
-
}
|
|
23332
|
-
}
|
|
23333
|
-
}
|
|
23334
|
-
}
|
|
23335
|
-
return '';
|
|
23336
|
-
}
|
|
23337
|
-
function getPath(root, obj) {
|
|
23338
|
-
if (root === obj) {
|
|
23339
|
-
return '/';
|
|
23340
|
-
}
|
|
23341
|
-
var path = _getPathRecursive(root, obj);
|
|
23342
|
-
if (path === '') {
|
|
23343
|
-
throw new Error("Object not found in root");
|
|
23344
|
-
}
|
|
23345
|
-
return '/' + path;
|
|
23346
|
-
}
|
|
23347
|
-
/**
|
|
23348
|
-
* Recursively checks whether an object has any undefined values inside.
|
|
23349
|
-
*/
|
|
23350
|
-
function hasUndefined(obj) {
|
|
23351
|
-
if (obj === undefined) {
|
|
23352
|
-
return true;
|
|
23353
|
-
}
|
|
23354
|
-
if (obj) {
|
|
23355
|
-
if (Array.isArray(obj)) {
|
|
23356
|
-
for (var i = 0, len = obj.length; i < len; i++) {
|
|
23357
|
-
if (hasUndefined(obj[i])) {
|
|
23358
|
-
return true;
|
|
23359
|
-
}
|
|
23360
|
-
}
|
|
23361
|
-
}
|
|
23362
|
-
else if (typeof obj === "object") {
|
|
23363
|
-
var objKeys = _objectKeys(obj);
|
|
23364
|
-
var objKeysLength = objKeys.length;
|
|
23365
|
-
for (var i = 0; i < objKeysLength; i++) {
|
|
23366
|
-
if (hasUndefined(obj[objKeys[i]])) {
|
|
23367
|
-
return true;
|
|
23368
|
-
}
|
|
23369
|
-
}
|
|
23370
|
-
}
|
|
23371
|
-
}
|
|
23372
|
-
return false;
|
|
23373
|
-
}
|
|
23374
|
-
function patchErrorMessageFormatter(message, args) {
|
|
23375
|
-
var messageParts = [message];
|
|
23376
|
-
for (var key in args) {
|
|
23377
|
-
var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
|
|
23378
|
-
if (typeof value !== 'undefined') {
|
|
23379
|
-
messageParts.push(key + ": " + value);
|
|
23380
|
-
}
|
|
23381
|
-
}
|
|
23382
|
-
return messageParts.join('\n');
|
|
23383
|
-
}
|
|
23384
|
-
var PatchError = /** @class */ (function (_super) {
|
|
23385
|
-
__extends(PatchError, _super);
|
|
23386
|
-
function PatchError(message, name, index, operation, tree) {
|
|
23387
|
-
var _newTarget = this.constructor;
|
|
23388
|
-
var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
|
|
23389
|
-
_this.name = name;
|
|
23390
|
-
_this.index = index;
|
|
23391
|
-
_this.operation = operation;
|
|
23392
|
-
_this.tree = tree;
|
|
23393
|
-
Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
|
|
23394
|
-
_this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
|
|
23395
|
-
return _this;
|
|
23396
|
-
}
|
|
23397
|
-
return PatchError;
|
|
23398
|
-
}(Error));
|
|
23399
|
-
|
|
23349
|
+
/*!
|
|
23350
|
+
* https://github.com/Starcounter-Jack/JSON-Patch
|
|
23351
|
+
* (c) 2017 Joachim Wester
|
|
23352
|
+
* MIT license
|
|
23353
|
+
*/
|
|
23354
|
+
var __extends = (undefined && undefined.__extends) || (function () {
|
|
23355
|
+
var extendStatics = function (d, b) {
|
|
23356
|
+
extendStatics = Object.setPrototypeOf ||
|
|
23357
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
23358
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
23359
|
+
return extendStatics(d, b);
|
|
23360
|
+
};
|
|
23361
|
+
return function (d, b) {
|
|
23362
|
+
extendStatics(d, b);
|
|
23363
|
+
function __() { this.constructor = d; }
|
|
23364
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23365
|
+
};
|
|
23366
|
+
})();
|
|
23367
|
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
23368
|
+
function hasOwnProperty(obj, key) {
|
|
23369
|
+
return _hasOwnProperty.call(obj, key);
|
|
23370
|
+
}
|
|
23371
|
+
function _objectKeys(obj) {
|
|
23372
|
+
if (Array.isArray(obj)) {
|
|
23373
|
+
var keys = new Array(obj.length);
|
|
23374
|
+
for (var k = 0; k < keys.length; k++) {
|
|
23375
|
+
keys[k] = "" + k;
|
|
23376
|
+
}
|
|
23377
|
+
return keys;
|
|
23378
|
+
}
|
|
23379
|
+
if (Object.keys) {
|
|
23380
|
+
return Object.keys(obj);
|
|
23381
|
+
}
|
|
23382
|
+
var keys = [];
|
|
23383
|
+
for (var i in obj) {
|
|
23384
|
+
if (hasOwnProperty(obj, i)) {
|
|
23385
|
+
keys.push(i);
|
|
23386
|
+
}
|
|
23387
|
+
}
|
|
23388
|
+
return keys;
|
|
23389
|
+
}
|
|
23390
|
+
;
|
|
23391
|
+
/**
|
|
23392
|
+
* Deeply clone the object.
|
|
23393
|
+
* https://jsperf.com/deep-copy-vs-json-stringify-json-parse/25 (recursiveDeepCopy)
|
|
23394
|
+
* @param {any} obj value to clone
|
|
23395
|
+
* @return {any} cloned obj
|
|
23396
|
+
*/
|
|
23397
|
+
function _deepClone(obj) {
|
|
23398
|
+
switch (typeof obj) {
|
|
23399
|
+
case "object":
|
|
23400
|
+
return JSON.parse(JSON.stringify(obj)); //Faster than ES5 clone - http://jsperf.com/deep-cloning-of-objects/5
|
|
23401
|
+
case "undefined":
|
|
23402
|
+
return null; //this is how JSON.stringify behaves for array items
|
|
23403
|
+
default:
|
|
23404
|
+
return obj; //no need to clone primitives
|
|
23405
|
+
}
|
|
23406
|
+
}
|
|
23407
|
+
//3x faster than cached /^\d+$/.test(str)
|
|
23408
|
+
function isInteger(str) {
|
|
23409
|
+
var i = 0;
|
|
23410
|
+
var len = str.length;
|
|
23411
|
+
var charCode;
|
|
23412
|
+
while (i < len) {
|
|
23413
|
+
charCode = str.charCodeAt(i);
|
|
23414
|
+
if (charCode >= 48 && charCode <= 57) {
|
|
23415
|
+
i++;
|
|
23416
|
+
continue;
|
|
23417
|
+
}
|
|
23418
|
+
return false;
|
|
23419
|
+
}
|
|
23420
|
+
return true;
|
|
23421
|
+
}
|
|
23422
|
+
/**
|
|
23423
|
+
* Escapes a json pointer path
|
|
23424
|
+
* @param path The raw pointer
|
|
23425
|
+
* @return the Escaped path
|
|
23426
|
+
*/
|
|
23427
|
+
function escapePathComponent(path) {
|
|
23428
|
+
if (path.indexOf('/') === -1 && path.indexOf('~') === -1)
|
|
23429
|
+
return path;
|
|
23430
|
+
return path.replace(/~/g, '~0').replace(/\//g, '~1');
|
|
23431
|
+
}
|
|
23432
|
+
/**
|
|
23433
|
+
* Unescapes a json pointer path
|
|
23434
|
+
* @param path The escaped pointer
|
|
23435
|
+
* @return The unescaped path
|
|
23436
|
+
*/
|
|
23437
|
+
function unescapePathComponent(path) {
|
|
23438
|
+
return path.replace(/~1/g, '/').replace(/~0/g, '~');
|
|
23439
|
+
}
|
|
23440
|
+
function _getPathRecursive(root, obj) {
|
|
23441
|
+
var found;
|
|
23442
|
+
for (var key in root) {
|
|
23443
|
+
if (hasOwnProperty(root, key)) {
|
|
23444
|
+
if (root[key] === obj) {
|
|
23445
|
+
return escapePathComponent(key) + '/';
|
|
23446
|
+
}
|
|
23447
|
+
else if (typeof root[key] === 'object') {
|
|
23448
|
+
found = _getPathRecursive(root[key], obj);
|
|
23449
|
+
if (found != '') {
|
|
23450
|
+
return escapePathComponent(key) + '/' + found;
|
|
23451
|
+
}
|
|
23452
|
+
}
|
|
23453
|
+
}
|
|
23454
|
+
}
|
|
23455
|
+
return '';
|
|
23456
|
+
}
|
|
23457
|
+
function getPath(root, obj) {
|
|
23458
|
+
if (root === obj) {
|
|
23459
|
+
return '/';
|
|
23460
|
+
}
|
|
23461
|
+
var path = _getPathRecursive(root, obj);
|
|
23462
|
+
if (path === '') {
|
|
23463
|
+
throw new Error("Object not found in root");
|
|
23464
|
+
}
|
|
23465
|
+
return '/' + path;
|
|
23466
|
+
}
|
|
23467
|
+
/**
|
|
23468
|
+
* Recursively checks whether an object has any undefined values inside.
|
|
23469
|
+
*/
|
|
23470
|
+
function hasUndefined(obj) {
|
|
23471
|
+
if (obj === undefined) {
|
|
23472
|
+
return true;
|
|
23473
|
+
}
|
|
23474
|
+
if (obj) {
|
|
23475
|
+
if (Array.isArray(obj)) {
|
|
23476
|
+
for (var i = 0, len = obj.length; i < len; i++) {
|
|
23477
|
+
if (hasUndefined(obj[i])) {
|
|
23478
|
+
return true;
|
|
23479
|
+
}
|
|
23480
|
+
}
|
|
23481
|
+
}
|
|
23482
|
+
else if (typeof obj === "object") {
|
|
23483
|
+
var objKeys = _objectKeys(obj);
|
|
23484
|
+
var objKeysLength = objKeys.length;
|
|
23485
|
+
for (var i = 0; i < objKeysLength; i++) {
|
|
23486
|
+
if (hasUndefined(obj[objKeys[i]])) {
|
|
23487
|
+
return true;
|
|
23488
|
+
}
|
|
23489
|
+
}
|
|
23490
|
+
}
|
|
23491
|
+
}
|
|
23492
|
+
return false;
|
|
23493
|
+
}
|
|
23494
|
+
function patchErrorMessageFormatter(message, args) {
|
|
23495
|
+
var messageParts = [message];
|
|
23496
|
+
for (var key in args) {
|
|
23497
|
+
var value = typeof args[key] === 'object' ? JSON.stringify(args[key], null, 2) : args[key]; // pretty print
|
|
23498
|
+
if (typeof value !== 'undefined') {
|
|
23499
|
+
messageParts.push(key + ": " + value);
|
|
23500
|
+
}
|
|
23501
|
+
}
|
|
23502
|
+
return messageParts.join('\n');
|
|
23503
|
+
}
|
|
23504
|
+
var PatchError = /** @class */ (function (_super) {
|
|
23505
|
+
__extends(PatchError, _super);
|
|
23506
|
+
function PatchError(message, name, index, operation, tree) {
|
|
23507
|
+
var _newTarget = this.constructor;
|
|
23508
|
+
var _this = _super.call(this, patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree })) || this;
|
|
23509
|
+
_this.name = name;
|
|
23510
|
+
_this.index = index;
|
|
23511
|
+
_this.operation = operation;
|
|
23512
|
+
_this.tree = tree;
|
|
23513
|
+
Object.setPrototypeOf(_this, _newTarget.prototype); // restore prototype chain, see https://stackoverflow.com/a/48342359
|
|
23514
|
+
_this.message = patchErrorMessageFormatter(message, { name: name, index: index, operation: operation, tree: tree });
|
|
23515
|
+
return _this;
|
|
23516
|
+
}
|
|
23517
|
+
return PatchError;
|
|
23518
|
+
}(Error));
|
|
23519
|
+
|
|
23400
23520
|
|
|
23401
23521
|
|
|
23402
23522
|
/***/ }),
|
|
@@ -23411,18 +23531,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
23411
23531
|
/* harmony export */ "Blob": () => (/* binding */ Blob),
|
|
23412
23532
|
/* harmony export */ "File": () => (/* binding */ File)
|
|
23413
23533
|
/* harmony export */ });
|
|
23414
|
-
function
|
|
23534
|
+
const globalObject = (function () {
|
|
23415
23535
|
if (typeof globalThis !== "undefined") {
|
|
23416
|
-
return globalThis
|
|
23536
|
+
return globalThis;
|
|
23417
23537
|
}
|
|
23418
23538
|
if (typeof self !== "undefined") {
|
|
23419
|
-
return self
|
|
23539
|
+
return self;
|
|
23420
23540
|
}
|
|
23421
|
-
return window
|
|
23422
|
-
}
|
|
23423
|
-
const FormData =
|
|
23424
|
-
const Blob = accessValue("Blob");
|
|
23425
|
-
const File = accessValue("File");
|
|
23541
|
+
return window;
|
|
23542
|
+
}());
|
|
23543
|
+
const { FormData, Blob, File } = globalObject;
|
|
23426
23544
|
|
|
23427
23545
|
|
|
23428
23546
|
/***/ }),
|