@aws-amplify/datastore 3.7.6-unstable.2 → 3.7.6
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/CHANGELOG.md +11 -0
- package/dist/aws-amplify-datastore.js +223 -225
- package/dist/aws-amplify-datastore.js.map +1 -1
- package/dist/aws-amplify-datastore.min.js +2 -2
- package/dist/aws-amplify-datastore.min.js.map +1 -1
- package/lib/datastore/datastore.js +7 -5
- package/lib/datastore/datastore.js.map +1 -1
- package/lib/sync/index.d.ts +1 -3
- package/lib/sync/index.js +1 -3
- package/lib/sync/index.js.map +1 -1
- package/lib-esm/datastore/datastore.js +7 -5
- package/lib-esm/datastore/datastore.js.map +1 -1
- package/lib-esm/sync/index.d.ts +1 -3
- package/lib-esm/sync/index.js +1 -3
- package/lib-esm/sync/index.js.map +1 -1
- package/package.json +7 -7
- package/src/datastore/datastore.ts +6 -6
- package/src/sync/index.ts +23 -32
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.7.6](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.7.5...@aws-amplify/datastore@3.7.6) (2022-02-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **datastore:** correctly apply config values ([#9542](https://github.com/aws-amplify/amplify-js/issues/9542)) ([3f8b838](https://github.com/aws-amplify/amplify-js/commit/3f8b83869becf5f9963d61e6f7cfe695badb3b53))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [3.7.5](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/datastore@3.7.4...@aws-amplify/datastore@3.7.5) (2022-01-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-amplify/datastore
|
|
@@ -27857,220 +27857,6 @@ function isnan (val) {
|
|
|
27857
27857
|
|
|
27858
27858
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "../../node_modules/webpack/buildin/global.js")))
|
|
27859
27859
|
|
|
27860
|
-
/***/ }),
|
|
27861
|
-
|
|
27862
|
-
/***/ "../../node_modules/cookie/index.js":
|
|
27863
|
-
/*!*****************************************************!*\
|
|
27864
|
-
!*** /root/amplify-js/node_modules/cookie/index.js ***!
|
|
27865
|
-
\*****************************************************/
|
|
27866
|
-
/*! no static exports found */
|
|
27867
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
27868
|
-
|
|
27869
|
-
"use strict";
|
|
27870
|
-
/*!
|
|
27871
|
-
* cookie
|
|
27872
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
|
27873
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
27874
|
-
* MIT Licensed
|
|
27875
|
-
*/
|
|
27876
|
-
|
|
27877
|
-
|
|
27878
|
-
|
|
27879
|
-
/**
|
|
27880
|
-
* Module exports.
|
|
27881
|
-
* @public
|
|
27882
|
-
*/
|
|
27883
|
-
|
|
27884
|
-
exports.parse = parse;
|
|
27885
|
-
exports.serialize = serialize;
|
|
27886
|
-
|
|
27887
|
-
/**
|
|
27888
|
-
* Module variables.
|
|
27889
|
-
* @private
|
|
27890
|
-
*/
|
|
27891
|
-
|
|
27892
|
-
var decode = decodeURIComponent;
|
|
27893
|
-
var encode = encodeURIComponent;
|
|
27894
|
-
var pairSplitRegExp = /; */;
|
|
27895
|
-
|
|
27896
|
-
/**
|
|
27897
|
-
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
27898
|
-
*
|
|
27899
|
-
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
27900
|
-
* field-vchar = VCHAR / obs-text
|
|
27901
|
-
* obs-text = %x80-FF
|
|
27902
|
-
*/
|
|
27903
|
-
|
|
27904
|
-
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
27905
|
-
|
|
27906
|
-
/**
|
|
27907
|
-
* Parse a cookie header.
|
|
27908
|
-
*
|
|
27909
|
-
* Parse the given cookie header string into an object
|
|
27910
|
-
* The object has the various cookies as keys(names) => values
|
|
27911
|
-
*
|
|
27912
|
-
* @param {string} str
|
|
27913
|
-
* @param {object} [options]
|
|
27914
|
-
* @return {object}
|
|
27915
|
-
* @public
|
|
27916
|
-
*/
|
|
27917
|
-
|
|
27918
|
-
function parse(str, options) {
|
|
27919
|
-
if (typeof str !== 'string') {
|
|
27920
|
-
throw new TypeError('argument str must be a string');
|
|
27921
|
-
}
|
|
27922
|
-
|
|
27923
|
-
var obj = {}
|
|
27924
|
-
var opt = options || {};
|
|
27925
|
-
var pairs = str.split(pairSplitRegExp);
|
|
27926
|
-
var dec = opt.decode || decode;
|
|
27927
|
-
|
|
27928
|
-
for (var i = 0; i < pairs.length; i++) {
|
|
27929
|
-
var pair = pairs[i];
|
|
27930
|
-
var eq_idx = pair.indexOf('=');
|
|
27931
|
-
|
|
27932
|
-
// skip things that don't look like key=value
|
|
27933
|
-
if (eq_idx < 0) {
|
|
27934
|
-
continue;
|
|
27935
|
-
}
|
|
27936
|
-
|
|
27937
|
-
var key = pair.substr(0, eq_idx).trim()
|
|
27938
|
-
var val = pair.substr(++eq_idx, pair.length).trim();
|
|
27939
|
-
|
|
27940
|
-
// quoted values
|
|
27941
|
-
if ('"' == val[0]) {
|
|
27942
|
-
val = val.slice(1, -1);
|
|
27943
|
-
}
|
|
27944
|
-
|
|
27945
|
-
// only assign once
|
|
27946
|
-
if (undefined == obj[key]) {
|
|
27947
|
-
obj[key] = tryDecode(val, dec);
|
|
27948
|
-
}
|
|
27949
|
-
}
|
|
27950
|
-
|
|
27951
|
-
return obj;
|
|
27952
|
-
}
|
|
27953
|
-
|
|
27954
|
-
/**
|
|
27955
|
-
* Serialize data into a cookie header.
|
|
27956
|
-
*
|
|
27957
|
-
* Serialize the a name value pair into a cookie string suitable for
|
|
27958
|
-
* http headers. An optional options object specified cookie parameters.
|
|
27959
|
-
*
|
|
27960
|
-
* serialize('foo', 'bar', { httpOnly: true })
|
|
27961
|
-
* => "foo=bar; httpOnly"
|
|
27962
|
-
*
|
|
27963
|
-
* @param {string} name
|
|
27964
|
-
* @param {string} val
|
|
27965
|
-
* @param {object} [options]
|
|
27966
|
-
* @return {string}
|
|
27967
|
-
* @public
|
|
27968
|
-
*/
|
|
27969
|
-
|
|
27970
|
-
function serialize(name, val, options) {
|
|
27971
|
-
var opt = options || {};
|
|
27972
|
-
var enc = opt.encode || encode;
|
|
27973
|
-
|
|
27974
|
-
if (typeof enc !== 'function') {
|
|
27975
|
-
throw new TypeError('option encode is invalid');
|
|
27976
|
-
}
|
|
27977
|
-
|
|
27978
|
-
if (!fieldContentRegExp.test(name)) {
|
|
27979
|
-
throw new TypeError('argument name is invalid');
|
|
27980
|
-
}
|
|
27981
|
-
|
|
27982
|
-
var value = enc(val);
|
|
27983
|
-
|
|
27984
|
-
if (value && !fieldContentRegExp.test(value)) {
|
|
27985
|
-
throw new TypeError('argument val is invalid');
|
|
27986
|
-
}
|
|
27987
|
-
|
|
27988
|
-
var str = name + '=' + value;
|
|
27989
|
-
|
|
27990
|
-
if (null != opt.maxAge) {
|
|
27991
|
-
var maxAge = opt.maxAge - 0;
|
|
27992
|
-
|
|
27993
|
-
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
27994
|
-
throw new TypeError('option maxAge is invalid')
|
|
27995
|
-
}
|
|
27996
|
-
|
|
27997
|
-
str += '; Max-Age=' + Math.floor(maxAge);
|
|
27998
|
-
}
|
|
27999
|
-
|
|
28000
|
-
if (opt.domain) {
|
|
28001
|
-
if (!fieldContentRegExp.test(opt.domain)) {
|
|
28002
|
-
throw new TypeError('option domain is invalid');
|
|
28003
|
-
}
|
|
28004
|
-
|
|
28005
|
-
str += '; Domain=' + opt.domain;
|
|
28006
|
-
}
|
|
28007
|
-
|
|
28008
|
-
if (opt.path) {
|
|
28009
|
-
if (!fieldContentRegExp.test(opt.path)) {
|
|
28010
|
-
throw new TypeError('option path is invalid');
|
|
28011
|
-
}
|
|
28012
|
-
|
|
28013
|
-
str += '; Path=' + opt.path;
|
|
28014
|
-
}
|
|
28015
|
-
|
|
28016
|
-
if (opt.expires) {
|
|
28017
|
-
if (typeof opt.expires.toUTCString !== 'function') {
|
|
28018
|
-
throw new TypeError('option expires is invalid');
|
|
28019
|
-
}
|
|
28020
|
-
|
|
28021
|
-
str += '; Expires=' + opt.expires.toUTCString();
|
|
28022
|
-
}
|
|
28023
|
-
|
|
28024
|
-
if (opt.httpOnly) {
|
|
28025
|
-
str += '; HttpOnly';
|
|
28026
|
-
}
|
|
28027
|
-
|
|
28028
|
-
if (opt.secure) {
|
|
28029
|
-
str += '; Secure';
|
|
28030
|
-
}
|
|
28031
|
-
|
|
28032
|
-
if (opt.sameSite) {
|
|
28033
|
-
var sameSite = typeof opt.sameSite === 'string'
|
|
28034
|
-
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
28035
|
-
|
|
28036
|
-
switch (sameSite) {
|
|
28037
|
-
case true:
|
|
28038
|
-
str += '; SameSite=Strict';
|
|
28039
|
-
break;
|
|
28040
|
-
case 'lax':
|
|
28041
|
-
str += '; SameSite=Lax';
|
|
28042
|
-
break;
|
|
28043
|
-
case 'strict':
|
|
28044
|
-
str += '; SameSite=Strict';
|
|
28045
|
-
break;
|
|
28046
|
-
case 'none':
|
|
28047
|
-
str += '; SameSite=None';
|
|
28048
|
-
break;
|
|
28049
|
-
default:
|
|
28050
|
-
throw new TypeError('option sameSite is invalid');
|
|
28051
|
-
}
|
|
28052
|
-
}
|
|
28053
|
-
|
|
28054
|
-
return str;
|
|
28055
|
-
}
|
|
28056
|
-
|
|
28057
|
-
/**
|
|
28058
|
-
* Try decoding a string using a decoding function.
|
|
28059
|
-
*
|
|
28060
|
-
* @param {string} str
|
|
28061
|
-
* @param {function} decode
|
|
28062
|
-
* @private
|
|
28063
|
-
*/
|
|
28064
|
-
|
|
28065
|
-
function tryDecode(str, decode) {
|
|
28066
|
-
try {
|
|
28067
|
-
return decode(str);
|
|
28068
|
-
} catch (e) {
|
|
28069
|
-
return str;
|
|
28070
|
-
}
|
|
28071
|
-
}
|
|
28072
|
-
|
|
28073
|
-
|
|
28074
27860
|
/***/ }),
|
|
28075
27861
|
|
|
28076
27862
|
/***/ "../../node_modules/graphql/error/GraphQLError.mjs":
|
|
@@ -48778,7 +48564,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48778
48564
|
|
|
48779
48565
|
"use strict";
|
|
48780
48566
|
__webpack_require__.r(__webpack_exports__);
|
|
48781
|
-
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ "../../node_modules/cookie/index.js");
|
|
48567
|
+
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ "../../node_modules/universal-cookie/node_modules/cookie/index.js");
|
|
48782
48568
|
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cookie__WEBPACK_IMPORTED_MODULE_0__);
|
|
48783
48569
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "../../node_modules/universal-cookie/es6/utils.js");
|
|
48784
48570
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
@@ -48895,7 +48681,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48895
48681
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseCookies", function() { return parseCookies; });
|
|
48896
48682
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isParsingCookie", function() { return isParsingCookie; });
|
|
48897
48683
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readCookie", function() { return readCookie; });
|
|
48898
|
-
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ "../../node_modules/cookie/index.js");
|
|
48684
|
+
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! cookie */ "../../node_modules/universal-cookie/node_modules/cookie/index.js");
|
|
48899
48685
|
/* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(cookie__WEBPACK_IMPORTED_MODULE_0__);
|
|
48900
48686
|
|
|
48901
48687
|
function hasDocumentCookie() {
|
|
@@ -48952,6 +48738,220 @@ function cleanupCookieValue(value) {
|
|
|
48952
48738
|
}
|
|
48953
48739
|
|
|
48954
48740
|
|
|
48741
|
+
/***/ }),
|
|
48742
|
+
|
|
48743
|
+
/***/ "../../node_modules/universal-cookie/node_modules/cookie/index.js":
|
|
48744
|
+
/*!***********************************************************************************!*\
|
|
48745
|
+
!*** /root/amplify-js/node_modules/universal-cookie/node_modules/cookie/index.js ***!
|
|
48746
|
+
\***********************************************************************************/
|
|
48747
|
+
/*! no static exports found */
|
|
48748
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
48749
|
+
|
|
48750
|
+
"use strict";
|
|
48751
|
+
/*!
|
|
48752
|
+
* cookie
|
|
48753
|
+
* Copyright(c) 2012-2014 Roman Shtylman
|
|
48754
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
48755
|
+
* MIT Licensed
|
|
48756
|
+
*/
|
|
48757
|
+
|
|
48758
|
+
|
|
48759
|
+
|
|
48760
|
+
/**
|
|
48761
|
+
* Module exports.
|
|
48762
|
+
* @public
|
|
48763
|
+
*/
|
|
48764
|
+
|
|
48765
|
+
exports.parse = parse;
|
|
48766
|
+
exports.serialize = serialize;
|
|
48767
|
+
|
|
48768
|
+
/**
|
|
48769
|
+
* Module variables.
|
|
48770
|
+
* @private
|
|
48771
|
+
*/
|
|
48772
|
+
|
|
48773
|
+
var decode = decodeURIComponent;
|
|
48774
|
+
var encode = encodeURIComponent;
|
|
48775
|
+
|
|
48776
|
+
/**
|
|
48777
|
+
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
48778
|
+
*
|
|
48779
|
+
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
|
|
48780
|
+
* field-vchar = VCHAR / obs-text
|
|
48781
|
+
* obs-text = %x80-FF
|
|
48782
|
+
*/
|
|
48783
|
+
|
|
48784
|
+
var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;
|
|
48785
|
+
|
|
48786
|
+
/**
|
|
48787
|
+
* Parse a cookie header.
|
|
48788
|
+
*
|
|
48789
|
+
* Parse the given cookie header string into an object
|
|
48790
|
+
* The object has the various cookies as keys(names) => values
|
|
48791
|
+
*
|
|
48792
|
+
* @param {string} str
|
|
48793
|
+
* @param {object} [options]
|
|
48794
|
+
* @return {object}
|
|
48795
|
+
* @public
|
|
48796
|
+
*/
|
|
48797
|
+
|
|
48798
|
+
function parse(str, options) {
|
|
48799
|
+
if (typeof str !== 'string') {
|
|
48800
|
+
throw new TypeError('argument str must be a string');
|
|
48801
|
+
}
|
|
48802
|
+
|
|
48803
|
+
var obj = {}
|
|
48804
|
+
var opt = options || {};
|
|
48805
|
+
var pairs = str.split(';')
|
|
48806
|
+
var dec = opt.decode || decode;
|
|
48807
|
+
|
|
48808
|
+
for (var i = 0; i < pairs.length; i++) {
|
|
48809
|
+
var pair = pairs[i];
|
|
48810
|
+
var index = pair.indexOf('=')
|
|
48811
|
+
|
|
48812
|
+
// skip things that don't look like key=value
|
|
48813
|
+
if (index < 0) {
|
|
48814
|
+
continue;
|
|
48815
|
+
}
|
|
48816
|
+
|
|
48817
|
+
var key = pair.substring(0, index).trim()
|
|
48818
|
+
|
|
48819
|
+
// only assign once
|
|
48820
|
+
if (undefined == obj[key]) {
|
|
48821
|
+
var val = pair.substring(index + 1, pair.length).trim()
|
|
48822
|
+
|
|
48823
|
+
// quoted values
|
|
48824
|
+
if (val[0] === '"') {
|
|
48825
|
+
val = val.slice(1, -1)
|
|
48826
|
+
}
|
|
48827
|
+
|
|
48828
|
+
obj[key] = tryDecode(val, dec);
|
|
48829
|
+
}
|
|
48830
|
+
}
|
|
48831
|
+
|
|
48832
|
+
return obj;
|
|
48833
|
+
}
|
|
48834
|
+
|
|
48835
|
+
/**
|
|
48836
|
+
* Serialize data into a cookie header.
|
|
48837
|
+
*
|
|
48838
|
+
* Serialize the a name value pair into a cookie string suitable for
|
|
48839
|
+
* http headers. An optional options object specified cookie parameters.
|
|
48840
|
+
*
|
|
48841
|
+
* serialize('foo', 'bar', { httpOnly: true })
|
|
48842
|
+
* => "foo=bar; httpOnly"
|
|
48843
|
+
*
|
|
48844
|
+
* @param {string} name
|
|
48845
|
+
* @param {string} val
|
|
48846
|
+
* @param {object} [options]
|
|
48847
|
+
* @return {string}
|
|
48848
|
+
* @public
|
|
48849
|
+
*/
|
|
48850
|
+
|
|
48851
|
+
function serialize(name, val, options) {
|
|
48852
|
+
var opt = options || {};
|
|
48853
|
+
var enc = opt.encode || encode;
|
|
48854
|
+
|
|
48855
|
+
if (typeof enc !== 'function') {
|
|
48856
|
+
throw new TypeError('option encode is invalid');
|
|
48857
|
+
}
|
|
48858
|
+
|
|
48859
|
+
if (!fieldContentRegExp.test(name)) {
|
|
48860
|
+
throw new TypeError('argument name is invalid');
|
|
48861
|
+
}
|
|
48862
|
+
|
|
48863
|
+
var value = enc(val);
|
|
48864
|
+
|
|
48865
|
+
if (value && !fieldContentRegExp.test(value)) {
|
|
48866
|
+
throw new TypeError('argument val is invalid');
|
|
48867
|
+
}
|
|
48868
|
+
|
|
48869
|
+
var str = name + '=' + value;
|
|
48870
|
+
|
|
48871
|
+
if (null != opt.maxAge) {
|
|
48872
|
+
var maxAge = opt.maxAge - 0;
|
|
48873
|
+
|
|
48874
|
+
if (isNaN(maxAge) || !isFinite(maxAge)) {
|
|
48875
|
+
throw new TypeError('option maxAge is invalid')
|
|
48876
|
+
}
|
|
48877
|
+
|
|
48878
|
+
str += '; Max-Age=' + Math.floor(maxAge);
|
|
48879
|
+
}
|
|
48880
|
+
|
|
48881
|
+
if (opt.domain) {
|
|
48882
|
+
if (!fieldContentRegExp.test(opt.domain)) {
|
|
48883
|
+
throw new TypeError('option domain is invalid');
|
|
48884
|
+
}
|
|
48885
|
+
|
|
48886
|
+
str += '; Domain=' + opt.domain;
|
|
48887
|
+
}
|
|
48888
|
+
|
|
48889
|
+
if (opt.path) {
|
|
48890
|
+
if (!fieldContentRegExp.test(opt.path)) {
|
|
48891
|
+
throw new TypeError('option path is invalid');
|
|
48892
|
+
}
|
|
48893
|
+
|
|
48894
|
+
str += '; Path=' + opt.path;
|
|
48895
|
+
}
|
|
48896
|
+
|
|
48897
|
+
if (opt.expires) {
|
|
48898
|
+
if (typeof opt.expires.toUTCString !== 'function') {
|
|
48899
|
+
throw new TypeError('option expires is invalid');
|
|
48900
|
+
}
|
|
48901
|
+
|
|
48902
|
+
str += '; Expires=' + opt.expires.toUTCString();
|
|
48903
|
+
}
|
|
48904
|
+
|
|
48905
|
+
if (opt.httpOnly) {
|
|
48906
|
+
str += '; HttpOnly';
|
|
48907
|
+
}
|
|
48908
|
+
|
|
48909
|
+
if (opt.secure) {
|
|
48910
|
+
str += '; Secure';
|
|
48911
|
+
}
|
|
48912
|
+
|
|
48913
|
+
if (opt.sameSite) {
|
|
48914
|
+
var sameSite = typeof opt.sameSite === 'string'
|
|
48915
|
+
? opt.sameSite.toLowerCase() : opt.sameSite;
|
|
48916
|
+
|
|
48917
|
+
switch (sameSite) {
|
|
48918
|
+
case true:
|
|
48919
|
+
str += '; SameSite=Strict';
|
|
48920
|
+
break;
|
|
48921
|
+
case 'lax':
|
|
48922
|
+
str += '; SameSite=Lax';
|
|
48923
|
+
break;
|
|
48924
|
+
case 'strict':
|
|
48925
|
+
str += '; SameSite=Strict';
|
|
48926
|
+
break;
|
|
48927
|
+
case 'none':
|
|
48928
|
+
str += '; SameSite=None';
|
|
48929
|
+
break;
|
|
48930
|
+
default:
|
|
48931
|
+
throw new TypeError('option sameSite is invalid');
|
|
48932
|
+
}
|
|
48933
|
+
}
|
|
48934
|
+
|
|
48935
|
+
return str;
|
|
48936
|
+
}
|
|
48937
|
+
|
|
48938
|
+
/**
|
|
48939
|
+
* Try decoding a string using a decoding function.
|
|
48940
|
+
*
|
|
48941
|
+
* @param {string} str
|
|
48942
|
+
* @param {function} decode
|
|
48943
|
+
* @private
|
|
48944
|
+
*/
|
|
48945
|
+
|
|
48946
|
+
function tryDecode(str, decode) {
|
|
48947
|
+
try {
|
|
48948
|
+
return decode(str);
|
|
48949
|
+
} catch (e) {
|
|
48950
|
+
return str;
|
|
48951
|
+
}
|
|
48952
|
+
}
|
|
48953
|
+
|
|
48954
|
+
|
|
48955
48955
|
/***/ }),
|
|
48956
48956
|
|
|
48957
48957
|
/***/ "../../node_modules/url/url.js":
|
|
@@ -82304,7 +82304,7 @@ function () {
|
|
|
82304
82304
|
|
|
82305
82305
|
case 6:
|
|
82306
82306
|
_a.syncPredicates = _b.sent();
|
|
82307
|
-
this.sync = new _sync__WEBPACK_IMPORTED_MODULE_7__["SyncEngine"](schema, namespaceResolver, syncClasses, userClasses, this.storage, modelInstanceCreator, this.
|
|
82307
|
+
this.sync = new _sync__WEBPACK_IMPORTED_MODULE_7__["SyncEngine"](schema, namespaceResolver, syncClasses, userClasses, this.storage, modelInstanceCreator, this.conflictHandler, this.errorHandler, this.syncPredicates, this.amplifyConfig, this.authModeStrategy);
|
|
82308
82308
|
fullSyncIntervalInMilliseconds = this.fullSyncInterval * 1000 * 60;
|
|
82309
82309
|
syncSubscription = this.sync.start({
|
|
82310
82310
|
fullSyncInterval: fullSyncIntervalInMilliseconds
|
|
@@ -82912,16 +82912,16 @@ function () {
|
|
|
82912
82912
|
|
|
82913
82913
|
|
|
82914
82914
|
_this.amplifyConfig.authProviders = configDataStore && configDataStore.authProviders || configAuthProviders;
|
|
82915
|
-
_this.syncExpressions = configDataStore && configDataStore.syncExpressions || _this.syncExpressions
|
|
82916
|
-
_this.maxRecordsToSync = configDataStore && configDataStore.maxRecordsToSync || configMaxRecordsToSync || 10000; // store on config object, so that Sync, Subscription, and Mutation processors can have access
|
|
82915
|
+
_this.syncExpressions = configDataStore && configDataStore.syncExpressions || configSyncExpressions || _this.syncExpressions;
|
|
82916
|
+
_this.maxRecordsToSync = configDataStore && configDataStore.maxRecordsToSync || configMaxRecordsToSync || _this.maxRecordsToSync || 10000; // store on config object, so that Sync, Subscription, and Mutation processors can have access
|
|
82917
82917
|
|
|
82918
82918
|
_this.amplifyConfig.maxRecordsToSync = _this.maxRecordsToSync;
|
|
82919
|
-
_this.syncPageSize = configDataStore && configDataStore.syncPageSize || configSyncPageSize || 1000; // store on config object, so that Sync, Subscription, and Mutation processors can have access
|
|
82919
|
+
_this.syncPageSize = configDataStore && configDataStore.syncPageSize || configSyncPageSize || _this.syncPageSize || 1000; // store on config object, so that Sync, Subscription, and Mutation processors can have access
|
|
82920
82920
|
|
|
82921
82921
|
_this.amplifyConfig.syncPageSize = _this.syncPageSize;
|
|
82922
|
-
_this.fullSyncInterval = configDataStore && configDataStore.fullSyncInterval || _this.fullSyncInterval ||
|
|
82922
|
+
_this.fullSyncInterval = configDataStore && configDataStore.fullSyncInterval || configFullSyncInterval || _this.fullSyncInterval || 24 * 60; // 1 day
|
|
82923
82923
|
|
|
82924
|
-
_this.storageAdapter = configDataStore && configDataStore.storageAdapter || _this.storageAdapter ||
|
|
82924
|
+
_this.storageAdapter = configDataStore && configDataStore.storageAdapter || configStorageAdapter || _this.storageAdapter || undefined;
|
|
82925
82925
|
_this.sessionId = _this.retrieveSessionId();
|
|
82926
82926
|
};
|
|
82927
82927
|
|
|
@@ -89836,7 +89836,7 @@ var ControlMessage;
|
|
|
89836
89836
|
var SyncEngine =
|
|
89837
89837
|
/** @class */
|
|
89838
89838
|
function () {
|
|
89839
|
-
function SyncEngine(schema, namespaceResolver, modelClasses, userModelClasses, storage, modelInstanceCreator,
|
|
89839
|
+
function SyncEngine(schema, namespaceResolver, modelClasses, userModelClasses, storage, modelInstanceCreator, conflictHandler, errorHandler, syncPredicates, amplifyConfig, authModeStrategy) {
|
|
89840
89840
|
if (amplifyConfig === void 0) {
|
|
89841
89841
|
amplifyConfig = {};
|
|
89842
89842
|
}
|
|
@@ -89847,8 +89847,6 @@ function () {
|
|
|
89847
89847
|
this.userModelClasses = userModelClasses;
|
|
89848
89848
|
this.storage = storage;
|
|
89849
89849
|
this.modelInstanceCreator = modelInstanceCreator;
|
|
89850
|
-
this.maxRecordsToSync = maxRecordsToSync;
|
|
89851
|
-
this.syncPageSize = syncPageSize;
|
|
89852
89850
|
this.syncPredicates = syncPredicates;
|
|
89853
89851
|
this.amplifyConfig = amplifyConfig;
|
|
89854
89852
|
this.authModeStrategy = authModeStrategy;
|