parse 4.0.0-alpha.1 → 4.0.0-alpha.11
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/LICENSE +167 -25
- package/NOTICE +10 -0
- package/README.md +6 -5
- package/dist/parse.js +12838 -21190
- package/dist/parse.min.js +7 -6
- package/dist/parse.weapp.js +7921 -17062
- package/dist/parse.weapp.min.js +7 -6
- package/lib/browser/Analytics.js +2 -27
- package/lib/browser/AnonymousUtils.js +6 -42
- package/lib/browser/Cloud.js +12 -77
- package/lib/browser/CloudCode.js +0 -3
- package/lib/browser/CoreManager.js +46 -191
- package/lib/browser/CryptoController.js +2 -16
- package/lib/browser/EventEmitter.js +1 -8
- package/lib/browser/EventuallyQueue.js +277 -824
- package/lib/browser/FacebookUtils.js +6 -42
- package/lib/browser/IndexedDBStorageController.js +3 -14
- package/lib/browser/InstallationController.js +2 -20
- package/lib/browser/LiveQueryClient.js +105 -213
- package/lib/browser/LiveQuerySubscription.js +10 -39
- package/lib/browser/LocalDatastore.js +451 -1081
- package/lib/browser/LocalDatastoreController.js +145 -602
- package/lib/browser/LocalDatastoreController.react-native.js +137 -573
- package/lib/browser/LocalDatastoreUtils.js +2 -19
- package/lib/browser/ObjectStateMutations.js +18 -121
- package/lib/browser/OfflineQuery.js +61 -222
- package/lib/browser/Parse.js +12 -115
- package/lib/browser/ParseACL.js +33 -148
- package/lib/browser/ParseCLP.js +96 -314
- package/lib/browser/ParseConfig.js +18 -95
- package/lib/browser/ParseError.js +63 -99
- package/lib/browser/ParseFile.js +128 -685
- package/lib/browser/ParseGeoPoint.js +23 -89
- package/lib/browser/ParseHooks.js +1 -34
- package/lib/browser/ParseInstallation.js +4 -32
- package/lib/browser/ParseLiveQuery.js +96 -505
- package/lib/browser/ParseObject.js +665 -1845
- package/lib/browser/ParseOp.js +41 -287
- package/lib/browser/ParsePolygon.js +13 -70
- package/lib/browser/ParseQuery.js +403 -1504
- package/lib/browser/ParseRelation.js +12 -68
- package/lib/browser/ParseRole.js +13 -75
- package/lib/browser/ParseSchema.js +49 -208
- package/lib/browser/ParseSession.js +11 -69
- package/lib/browser/ParseUser.js +274 -1127
- package/lib/browser/Push.js +7 -50
- package/lib/browser/RESTController.js +28 -157
- package/lib/browser/SingleInstanceStateController.js +19 -144
- package/lib/browser/Socket.weapp.js +0 -10
- package/lib/browser/Storage.js +10 -80
- package/lib/browser/StorageController.browser.js +4 -24
- package/lib/browser/StorageController.default.js +4 -24
- package/lib/browser/StorageController.react-native.js +6 -40
- package/lib/browser/StorageController.weapp.js +5 -23
- package/lib/browser/TaskQueue.js +1 -29
- package/lib/browser/UniqueInstanceStateController.js +19 -149
- package/lib/browser/Xhr.weapp.js +0 -17
- package/lib/browser/arrayContainsObject.js +2 -23
- package/lib/browser/canBeSerialized.js +3 -40
- package/lib/browser/decode.js +3 -40
- package/lib/browser/encode.js +9 -77
- package/lib/browser/equals.js +2 -34
- package/lib/browser/escape.js +1 -15
- package/lib/browser/isRevocableSession.js +2 -18
- package/lib/browser/parseDate.js +2 -20
- package/lib/browser/promiseUtils.js +3 -21
- package/lib/browser/unique.js +3 -24
- package/lib/browser/unsavedChildren.js +6 -57
- package/lib/browser/uuid.js +3 -1
- package/lib/node/Analytics.js +1 -25
- package/lib/node/AnonymousUtils.js +5 -44
- package/lib/node/Cloud.js +10 -73
- package/lib/node/CloudCode.js +0 -3
- package/lib/node/CoreManager.js +47 -227
- package/lib/node/CryptoController.js +2 -16
- package/lib/node/EventEmitter.js +1 -8
- package/lib/node/EventuallyQueue.js +16 -123
- package/lib/node/FacebookUtils.js +5 -44
- package/lib/node/IndexedDBStorageController.js +3 -19
- package/lib/node/InstallationController.js +2 -22
- package/lib/node/LiveQueryClient.js +72 -154
- package/lib/node/LiveQuerySubscription.js +7 -26
- package/lib/node/LocalDatastore.js +19 -182
- package/lib/node/LocalDatastoreController.js +6 -45
- package/lib/node/LocalDatastoreController.react-native.js +6 -52
- package/lib/node/LocalDatastoreUtils.js +1 -13
- package/lib/node/ObjectStateMutations.js +13 -100
- package/lib/node/OfflineQuery.js +27 -151
- package/lib/node/Parse.js +11 -108
- package/lib/node/ParseACL.js +32 -157
- package/lib/node/ParseCLP.js +69 -269
- package/lib/node/ParseConfig.js +16 -91
- package/lib/node/ParseError.js +61 -74
- package/lib/node/ParseFile.js +49 -212
- package/lib/node/ParseGeoPoint.js +21 -89
- package/lib/node/ParseHooks.js +0 -35
- package/lib/node/ParseInstallation.js +1 -17
- package/lib/node/ParseLiveQuery.js +10 -43
- package/lib/node/ParseObject.js +229 -964
- package/lib/node/ParseOp.js +31 -262
- package/lib/node/ParsePolygon.js +12 -69
- package/lib/node/ParseQuery.js +169 -888
- package/lib/node/ParseRelation.js +11 -68
- package/lib/node/ParseRole.js +10 -64
- package/lib/node/ParseSchema.js +46 -229
- package/lib/node/ParseSession.js +8 -57
- package/lib/node/ParseUser.js +107 -583
- package/lib/node/Push.js +4 -44
- package/lib/node/RESTController.js +18 -127
- package/lib/node/SingleInstanceStateController.js +17 -137
- package/lib/node/Socket.weapp.js +0 -7
- package/lib/node/Storage.js +10 -90
- package/lib/node/StorageController.browser.js +4 -30
- package/lib/node/StorageController.default.js +5 -28
- package/lib/node/StorageController.react-native.js +6 -47
- package/lib/node/StorageController.weapp.js +6 -28
- package/lib/node/TaskQueue.js +1 -24
- package/lib/node/UniqueInstanceStateController.js +16 -140
- package/lib/node/Xhr.weapp.js +0 -15
- package/lib/node/arrayContainsObject.js +1 -19
- package/lib/node/canBeSerialized.js +2 -35
- package/lib/node/decode.js +1 -33
- package/lib/node/encode.js +3 -61
- package/lib/node/equals.js +0 -27
- package/lib/node/escape.js +1 -13
- package/lib/node/isRevocableSession.js +1 -12
- package/lib/node/parseDate.js +1 -14
- package/lib/node/promiseUtils.js +2 -14
- package/lib/node/unique.js +1 -18
- package/lib/node/unsavedChildren.js +2 -45
- package/lib/node/uuid.js +6 -1
- package/lib/react-native/Analytics.js +0 -9
- package/lib/react-native/AnonymousUtils.js +0 -10
- package/lib/react-native/Cloud.js +0 -26
- package/lib/react-native/CoreManager.js +2 -6
- package/lib/react-native/CryptoController.js +0 -2
- package/lib/react-native/EventEmitter.js +0 -2
- package/lib/react-native/EventuallyQueue.js +156 -711
- package/lib/react-native/FacebookUtils.js +0 -22
- package/lib/react-native/IndexedDBStorageController.js +0 -1
- package/lib/react-native/InstallationController.js +0 -6
- package/lib/react-native/LiveQueryClient.js +46 -157
- package/lib/react-native/LiveQuerySubscription.js +3 -27
- package/lib/react-native/LocalDatastore.js +281 -948
- package/lib/react-native/LocalDatastoreController.js +71 -552
- package/lib/react-native/LocalDatastoreController.react-native.js +91 -526
- package/lib/react-native/LocalDatastoreUtils.js +0 -1
- package/lib/react-native/ObjectStateMutations.js +2 -65
- package/lib/react-native/OfflineQuery.js +25 -196
- package/lib/react-native/Parse.js +0 -65
- package/lib/react-native/ParseACL.js +0 -44
- package/lib/react-native/ParseCLP.js +23 -161
- package/lib/react-native/ParseConfig.js +0 -42
- package/lib/react-native/ParseError.js +1 -21
- package/lib/react-native/ParseFile.js +55 -529
- package/lib/react-native/ParseGeoPoint.js +0 -17
- package/lib/react-native/ParseHooks.js +0 -30
- package/lib/react-native/ParseInstallation.js +1 -23
- package/lib/react-native/ParseLiveQuery.js +55 -472
- package/lib/react-native/ParseObject.js +245 -1246
- package/lib/react-native/ParseOp.js +1 -138
- package/lib/react-native/ParsePolygon.js +0 -24
- package/lib/react-native/ParseQuery.js +182 -874
- package/lib/react-native/ParseRelation.js +0 -25
- package/lib/react-native/ParseRole.js +1 -36
- package/lib/react-native/ParseSchema.js +3 -54
- package/lib/react-native/ParseSession.js +1 -40
- package/lib/react-native/ParseUser.js +95 -773
- package/lib/react-native/Push.js +0 -16
- package/lib/react-native/RESTController.js +12 -109
- package/lib/react-native/SingleInstanceStateController.js +0 -44
- package/lib/react-native/Socket.weapp.js +0 -10
- package/lib/react-native/Storage.js +0 -24
- package/lib/react-native/StorageController.browser.js +0 -2
- package/lib/react-native/StorageController.default.js +0 -1
- package/lib/react-native/StorageController.react-native.js +0 -2
- package/lib/react-native/TaskQueue.js +0 -15
- package/lib/react-native/UniqueInstanceStateController.js +0 -47
- package/lib/react-native/Xhr.weapp.js +0 -16
- package/lib/react-native/arrayContainsObject.js +0 -5
- package/lib/react-native/canBeSerialized.js +0 -18
- package/lib/react-native/decode.js +0 -21
- package/lib/react-native/encode.js +0 -25
- package/lib/react-native/equals.js +0 -18
- package/lib/react-native/escape.js +0 -1
- package/lib/react-native/isRevocableSession.js +0 -1
- package/lib/react-native/parseDate.js +0 -3
- package/lib/react-native/promiseUtils.js +0 -13
- package/lib/react-native/unique.js +0 -4
- package/lib/react-native/unsavedChildren.js +0 -21
- package/lib/react-native/uuid.js +3 -1
- package/lib/weapp/Analytics.js +2 -27
- package/lib/weapp/AnonymousUtils.js +6 -42
- package/lib/weapp/Cloud.js +12 -77
- package/lib/weapp/CloudCode.js +0 -3
- package/lib/weapp/CoreManager.js +46 -191
- package/lib/weapp/CryptoController.js +2 -16
- package/lib/weapp/EventEmitter.js +1 -8
- package/lib/weapp/EventuallyQueue.js +277 -824
- package/lib/weapp/FacebookUtils.js +6 -42
- package/lib/weapp/IndexedDBStorageController.js +3 -14
- package/lib/weapp/InstallationController.js +2 -20
- package/lib/weapp/LiveQueryClient.js +105 -213
- package/lib/weapp/LiveQuerySubscription.js +10 -39
- package/lib/weapp/LocalDatastore.js +451 -1081
- package/lib/weapp/LocalDatastoreController.js +145 -602
- package/lib/weapp/LocalDatastoreController.react-native.js +137 -573
- package/lib/weapp/LocalDatastoreUtils.js +2 -19
- package/lib/weapp/ObjectStateMutations.js +18 -121
- package/lib/weapp/OfflineQuery.js +61 -222
- package/lib/weapp/Parse.js +12 -115
- package/lib/weapp/ParseACL.js +33 -148
- package/lib/weapp/ParseCLP.js +96 -314
- package/lib/weapp/ParseConfig.js +18 -95
- package/lib/weapp/ParseError.js +63 -99
- package/lib/weapp/ParseFile.js +129 -686
- package/lib/weapp/ParseGeoPoint.js +23 -89
- package/lib/weapp/ParseHooks.js +1 -34
- package/lib/weapp/ParseInstallation.js +4 -32
- package/lib/weapp/ParseLiveQuery.js +96 -505
- package/lib/weapp/ParseObject.js +665 -1845
- package/lib/weapp/ParseOp.js +41 -287
- package/lib/weapp/ParsePolygon.js +13 -70
- package/lib/weapp/ParseQuery.js +403 -1504
- package/lib/weapp/ParseRelation.js +12 -68
- package/lib/weapp/ParseRole.js +13 -75
- package/lib/weapp/ParseSchema.js +49 -208
- package/lib/weapp/ParseSession.js +11 -69
- package/lib/weapp/ParseUser.js +274 -1127
- package/lib/weapp/Push.js +7 -50
- package/lib/weapp/RESTController.js +28 -157
- package/lib/weapp/SingleInstanceStateController.js +19 -144
- package/lib/weapp/Socket.weapp.js +0 -10
- package/lib/weapp/Storage.js +10 -80
- package/lib/weapp/StorageController.browser.js +4 -24
- package/lib/weapp/StorageController.default.js +4 -24
- package/lib/weapp/StorageController.react-native.js +6 -40
- package/lib/weapp/StorageController.weapp.js +5 -23
- package/lib/weapp/TaskQueue.js +1 -29
- package/lib/weapp/UniqueInstanceStateController.js +19 -149
- package/lib/weapp/Xhr.weapp.js +0 -17
- package/lib/weapp/arrayContainsObject.js +2 -23
- package/lib/weapp/canBeSerialized.js +3 -40
- package/lib/weapp/decode.js +3 -40
- package/lib/weapp/encode.js +9 -77
- package/lib/weapp/equals.js +2 -34
- package/lib/weapp/escape.js +1 -15
- package/lib/weapp/isRevocableSession.js +2 -18
- package/lib/weapp/parseDate.js +2 -20
- package/lib/weapp/promiseUtils.js +3 -21
- package/lib/weapp/unique.js +3 -24
- package/lib/weapp/unsavedChildren.js +6 -57
- package/lib/weapp/uuid.js +1 -6
- package/package.json +35 -31
- package/PATENTS +0 -37
|
@@ -1,410 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
|
6
|
-
|
|
7
|
-
var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
|
|
8
|
-
|
|
9
|
-
var _Promise2 = require("@babel/runtime-corejs3/core-js-stable/promise");
|
|
10
|
-
|
|
11
|
-
var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
|
|
12
|
-
|
|
13
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
14
|
-
|
|
15
|
-
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
|
16
|
-
|
|
17
|
-
var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
|
|
18
|
-
|
|
19
|
-
var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
|
|
20
|
-
|
|
21
3
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
|
22
|
-
|
|
23
|
-
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
|
24
|
-
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
25
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
26
6
|
value: true
|
|
27
7
|
});
|
|
28
|
-
|
|
29
8
|
exports.default = void 0;
|
|
30
|
-
|
|
31
|
-
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
32
|
-
|
|
33
9
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/promise"));
|
|
34
|
-
|
|
10
|
+
var _indexOf = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));
|
|
11
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
|
35
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
36
|
-
|
|
37
13
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
|
38
|
-
|
|
39
14
|
var _EventEmitter = _interopRequireDefault(require("./EventEmitter"));
|
|
40
|
-
|
|
41
15
|
var _LiveQueryClient = _interopRequireDefault(require("./LiveQueryClient"));
|
|
42
|
-
|
|
43
16
|
var _CoreManager = _interopRequireDefault(require("./CoreManager"));
|
|
17
|
+
/**
|
|
18
|
+
* @flow
|
|
19
|
+
*/
|
|
44
20
|
|
|
45
|
-
function
|
|
46
|
-
"use strict";
|
|
47
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
48
|
-
|
|
49
|
-
_regeneratorRuntime = function () {
|
|
50
|
-
return exports;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
var exports = {},
|
|
54
|
-
Op = Object.prototype,
|
|
55
|
-
hasOwn = Op.hasOwnProperty,
|
|
56
|
-
$Symbol = "function" == typeof _Symbol ? _Symbol : {},
|
|
57
|
-
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
|
58
|
-
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
|
59
|
-
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
60
|
-
|
|
61
|
-
function define(obj, key, value) {
|
|
62
|
-
return _Object$defineProperty(obj, key, {
|
|
63
|
-
value: value,
|
|
64
|
-
enumerable: !0,
|
|
65
|
-
configurable: !0,
|
|
66
|
-
writable: !0
|
|
67
|
-
}), obj[key];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
try {
|
|
71
|
-
define({}, "");
|
|
72
|
-
} catch (err) {
|
|
73
|
-
define = function (obj, key, value) {
|
|
74
|
-
return obj[key] = value;
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
79
|
-
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
|
80
|
-
generator = _Object$create(protoGenerator.prototype),
|
|
81
|
-
context = new Context(tryLocsList || []);
|
|
82
|
-
|
|
83
|
-
return generator._invoke = function (innerFn, self, context) {
|
|
84
|
-
var state = "suspendedStart";
|
|
85
|
-
return function (method, arg) {
|
|
86
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
|
87
|
-
|
|
88
|
-
if ("completed" === state) {
|
|
89
|
-
if ("throw" === method) throw arg;
|
|
90
|
-
return doneResult();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
for (context.method = method, context.arg = arg;;) {
|
|
94
|
-
var delegate = context.delegate;
|
|
95
|
-
|
|
96
|
-
if (delegate) {
|
|
97
|
-
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
98
|
-
|
|
99
|
-
if (delegateResult) {
|
|
100
|
-
if (delegateResult === ContinueSentinel) continue;
|
|
101
|
-
return delegateResult;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
|
106
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
|
107
|
-
context.dispatchException(context.arg);
|
|
108
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
|
109
|
-
state = "executing";
|
|
110
|
-
var record = tryCatch(innerFn, self, context);
|
|
111
|
-
|
|
112
|
-
if ("normal" === record.type) {
|
|
113
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
|
114
|
-
return {
|
|
115
|
-
value: record.arg,
|
|
116
|
-
done: context.done
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
}(innerFn, self, context), generator;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function tryCatch(fn, obj, arg) {
|
|
127
|
-
try {
|
|
128
|
-
return {
|
|
129
|
-
type: "normal",
|
|
130
|
-
arg: fn.call(obj, arg)
|
|
131
|
-
};
|
|
132
|
-
} catch (err) {
|
|
133
|
-
return {
|
|
134
|
-
type: "throw",
|
|
135
|
-
arg: err
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
exports.wrap = wrap;
|
|
141
|
-
var ContinueSentinel = {};
|
|
142
|
-
|
|
143
|
-
function Generator() {}
|
|
144
|
-
|
|
145
|
-
function GeneratorFunction() {}
|
|
146
|
-
|
|
147
|
-
function GeneratorFunctionPrototype() {}
|
|
148
|
-
|
|
149
|
-
var IteratorPrototype = {};
|
|
150
|
-
define(IteratorPrototype, iteratorSymbol, function () {
|
|
151
|
-
return this;
|
|
152
|
-
});
|
|
153
|
-
var getProto = _Object$getPrototypeOf,
|
|
154
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
155
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
|
156
|
-
|
|
157
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype);
|
|
158
|
-
|
|
159
|
-
function defineIteratorMethods(prototype) {
|
|
160
|
-
var _context4;
|
|
161
|
-
|
|
162
|
-
_forEachInstanceProperty(_context4 = ["next", "throw", "return"]).call(_context4, function (method) {
|
|
163
|
-
define(prototype, method, function (arg) {
|
|
164
|
-
return this._invoke(method, arg);
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function AsyncIterator(generator, PromiseImpl) {
|
|
170
|
-
function invoke(method, arg, resolve, reject) {
|
|
171
|
-
var record = tryCatch(generator[method], generator, arg);
|
|
172
|
-
|
|
173
|
-
if ("throw" !== record.type) {
|
|
174
|
-
var result = record.arg,
|
|
175
|
-
value = result.value;
|
|
176
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
177
|
-
invoke("next", value, resolve, reject);
|
|
178
|
-
}, function (err) {
|
|
179
|
-
invoke("throw", err, resolve, reject);
|
|
180
|
-
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
181
|
-
result.value = unwrapped, resolve(result);
|
|
182
|
-
}, function (error) {
|
|
183
|
-
return invoke("throw", error, resolve, reject);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
reject(record.arg);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
var previousPromise;
|
|
191
|
-
|
|
192
|
-
this._invoke = function (method, arg) {
|
|
193
|
-
function callInvokeWithMethodAndArg() {
|
|
194
|
-
return new PromiseImpl(function (resolve, reject) {
|
|
195
|
-
invoke(method, arg, resolve, reject);
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
function maybeInvokeDelegate(delegate, context) {
|
|
204
|
-
var method = delegate.iterator[context.method];
|
|
205
|
-
|
|
206
|
-
if (undefined === method) {
|
|
207
|
-
if (context.delegate = null, "throw" === context.method) {
|
|
208
|
-
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
|
209
|
-
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
return ContinueSentinel;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
216
|
-
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
|
217
|
-
var info = record.arg;
|
|
218
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
function pushTryEntry(locs) {
|
|
222
|
-
var entry = {
|
|
223
|
-
tryLoc: locs[0]
|
|
224
|
-
};
|
|
225
|
-
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function resetTryEntry(entry) {
|
|
229
|
-
var record = entry.completion || {};
|
|
230
|
-
record.type = "normal", delete record.arg, entry.completion = record;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function Context(tryLocsList) {
|
|
234
|
-
this.tryEntries = [{
|
|
235
|
-
tryLoc: "root"
|
|
236
|
-
}], _forEachInstanceProperty(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
function values(iterable) {
|
|
240
|
-
if (iterable) {
|
|
241
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
|
242
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
|
243
|
-
if ("function" == typeof iterable.next) return iterable;
|
|
244
|
-
|
|
245
|
-
if (!isNaN(iterable.length)) {
|
|
246
|
-
var i = -1,
|
|
247
|
-
next = function next() {
|
|
248
|
-
for (; ++i < iterable.length;) {
|
|
249
|
-
if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return next.value = undefined, next.done = !0, next;
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
return next.next = next;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return {
|
|
260
|
-
next: doneResult
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function doneResult() {
|
|
265
|
-
return {
|
|
266
|
-
value: undefined,
|
|
267
|
-
done: !0
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
|
272
|
-
var ctor = "function" == typeof genFun && genFun.constructor;
|
|
273
|
-
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
|
274
|
-
}, exports.mark = function (genFun) {
|
|
275
|
-
return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun;
|
|
276
|
-
}, exports.awrap = function (arg) {
|
|
277
|
-
return {
|
|
278
|
-
__await: arg
|
|
279
|
-
};
|
|
280
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
281
|
-
return this;
|
|
282
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
283
|
-
void 0 === PromiseImpl && (PromiseImpl = _Promise2);
|
|
284
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
285
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
|
286
|
-
return result.done ? result.value : iter.next();
|
|
287
|
-
});
|
|
288
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
|
289
|
-
return this;
|
|
290
|
-
}), define(Gp, "toString", function () {
|
|
291
|
-
return "[object Generator]";
|
|
292
|
-
}), exports.keys = function (object) {
|
|
293
|
-
var keys = [];
|
|
294
|
-
|
|
295
|
-
for (var key in object) {
|
|
296
|
-
keys.push(key);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
return _reverseInstanceProperty(keys).call(keys), function next() {
|
|
300
|
-
for (; keys.length;) {
|
|
301
|
-
var key = keys.pop();
|
|
302
|
-
if (key in object) return next.value = key, next.done = !1, next;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
return next.done = !0, next;
|
|
306
|
-
};
|
|
307
|
-
}, exports.values = values, Context.prototype = {
|
|
308
|
-
constructor: Context,
|
|
309
|
-
reset: function (skipTempReset) {
|
|
310
|
-
var _context5;
|
|
311
|
-
|
|
312
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context5 = this.tryEntries).call(_context5, resetTryEntry), !skipTempReset) for (var name in this) {
|
|
313
|
-
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined);
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
stop: function () {
|
|
317
|
-
this.done = !0;
|
|
318
|
-
var rootRecord = this.tryEntries[0].completion;
|
|
319
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
|
320
|
-
return this.rval;
|
|
321
|
-
},
|
|
322
|
-
dispatchException: function (exception) {
|
|
323
|
-
if (this.done) throw exception;
|
|
324
|
-
var context = this;
|
|
325
|
-
|
|
326
|
-
function handle(loc, caught) {
|
|
327
|
-
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
331
|
-
var entry = this.tryEntries[i],
|
|
332
|
-
record = entry.completion;
|
|
333
|
-
if ("root" === entry.tryLoc) return handle("end");
|
|
334
|
-
|
|
335
|
-
if (entry.tryLoc <= this.prev) {
|
|
336
|
-
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
|
337
|
-
hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
338
|
-
|
|
339
|
-
if (hasCatch && hasFinally) {
|
|
340
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
341
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
342
|
-
} else if (hasCatch) {
|
|
343
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
|
344
|
-
} else {
|
|
345
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
|
346
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
},
|
|
351
|
-
abrupt: function (type, arg) {
|
|
352
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
353
|
-
var entry = this.tryEntries[i];
|
|
354
|
-
|
|
355
|
-
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
|
356
|
-
var finallyEntry = entry;
|
|
357
|
-
break;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
|
362
|
-
var record = finallyEntry ? finallyEntry.completion : {};
|
|
363
|
-
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
|
364
|
-
},
|
|
365
|
-
complete: function (record, afterLoc) {
|
|
366
|
-
if ("throw" === record.type) throw record.arg;
|
|
367
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
|
368
|
-
},
|
|
369
|
-
finish: function (finallyLoc) {
|
|
370
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
371
|
-
var entry = this.tryEntries[i];
|
|
372
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
catch: function (tryLoc) {
|
|
376
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
377
|
-
var entry = this.tryEntries[i];
|
|
378
|
-
|
|
379
|
-
if (entry.tryLoc === tryLoc) {
|
|
380
|
-
var record = entry.completion;
|
|
381
|
-
|
|
382
|
-
if ("throw" === record.type) {
|
|
383
|
-
var thrown = record.arg;
|
|
384
|
-
resetTryEntry(entry);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
return thrown;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
throw new Error("illegal catch attempt");
|
|
392
|
-
},
|
|
393
|
-
delegateYield: function (iterable, resultName, nextLoc) {
|
|
394
|
-
return this.delegate = {
|
|
395
|
-
iterator: values(iterable),
|
|
396
|
-
resultName: resultName,
|
|
397
|
-
nextLoc: nextLoc
|
|
398
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
|
399
|
-
}
|
|
400
|
-
}, exports;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
function getLiveQueryClient()
|
|
404
|
-
/*: LiveQueryClient*/
|
|
405
|
-
{
|
|
21
|
+
function getLiveQueryClient() /*: LiveQueryClient*/{
|
|
406
22
|
return _CoreManager.default.getLiveQueryController().getDefaultLiveQueryClient();
|
|
407
23
|
}
|
|
24
|
+
|
|
408
25
|
/**
|
|
409
26
|
* We expose three events to help you monitor the status of the WebSocket connection:
|
|
410
27
|
*
|
|
@@ -432,34 +49,29 @@ function getLiveQueryClient()
|
|
|
432
49
|
* @class Parse.LiveQuery
|
|
433
50
|
* @static
|
|
434
51
|
*/
|
|
435
|
-
|
|
436
|
-
|
|
437
52
|
var LiveQuery = new _EventEmitter.default();
|
|
53
|
+
|
|
438
54
|
/**
|
|
439
55
|
* After open is called, the LiveQuery will try to send a connect request
|
|
440
56
|
* to the LiveQuery server.
|
|
441
57
|
*/
|
|
442
|
-
|
|
443
|
-
LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
58
|
+
LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
444
59
|
var liveQueryClient;
|
|
445
|
-
return
|
|
446
|
-
while (1) {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
case 4:
|
|
457
|
-
case "end":
|
|
458
|
-
return _context.stop();
|
|
459
|
-
}
|
|
60
|
+
return _regenerator.default.wrap(function (_context) {
|
|
61
|
+
while (1) switch (_context.prev = _context.next) {
|
|
62
|
+
case 0:
|
|
63
|
+
_context.next = 2;
|
|
64
|
+
return getLiveQueryClient();
|
|
65
|
+
case 2:
|
|
66
|
+
liveQueryClient = _context.sent;
|
|
67
|
+
liveQueryClient.open();
|
|
68
|
+
case 4:
|
|
69
|
+
case "end":
|
|
70
|
+
return _context.stop();
|
|
460
71
|
}
|
|
461
72
|
}, _callee);
|
|
462
73
|
}));
|
|
74
|
+
|
|
463
75
|
/**
|
|
464
76
|
* When you're done using LiveQuery, you can call Parse.LiveQuery.close().
|
|
465
77
|
* This function will close the WebSocket connection to the LiveQuery server,
|
|
@@ -467,118 +79,97 @@ LiveQuery.open = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_reg
|
|
|
467
79
|
* If you call query.subscribe() after this, we'll create a new WebSocket
|
|
468
80
|
* connection to the LiveQuery server.
|
|
469
81
|
*/
|
|
470
|
-
|
|
471
|
-
LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
82
|
+
LiveQuery.close = /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
472
83
|
var liveQueryClient;
|
|
473
|
-
return
|
|
474
|
-
while (1) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
case 4:
|
|
485
|
-
case "end":
|
|
486
|
-
return _context2.stop();
|
|
487
|
-
}
|
|
84
|
+
return _regenerator.default.wrap(function (_context2) {
|
|
85
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
86
|
+
case 0:
|
|
87
|
+
_context2.next = 2;
|
|
88
|
+
return getLiveQueryClient();
|
|
89
|
+
case 2:
|
|
90
|
+
liveQueryClient = _context2.sent;
|
|
91
|
+
liveQueryClient.close();
|
|
92
|
+
case 4:
|
|
93
|
+
case "end":
|
|
94
|
+
return _context2.stop();
|
|
488
95
|
}
|
|
489
96
|
}, _callee2);
|
|
490
|
-
}));
|
|
97
|
+
}));
|
|
491
98
|
|
|
99
|
+
// Register a default onError callback to make sure we do not crash on error
|
|
492
100
|
LiveQuery.on('error', function () {});
|
|
493
101
|
var _default = LiveQuery;
|
|
494
102
|
exports.default = _default;
|
|
495
103
|
var defaultLiveQueryClient;
|
|
496
104
|
var DefaultLiveQueryController = {
|
|
497
|
-
setDefaultLiveQueryClient: function
|
|
498
|
-
/*: LiveQueryClient*/
|
|
499
|
-
) {
|
|
105
|
+
setDefaultLiveQueryClient: function (liveQueryClient /*: LiveQueryClient*/) {
|
|
500
106
|
defaultLiveQueryClient = liveQueryClient;
|
|
501
107
|
},
|
|
502
|
-
getDefaultLiveQueryClient: function
|
|
503
|
-
|
|
504
|
-
{
|
|
505
|
-
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
108
|
+
getDefaultLiveQueryClient: function () /*: Promise<LiveQueryClient>*/{
|
|
109
|
+
return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
506
110
|
var _yield$Promise$all, _yield$Promise$all2, currentUser, installationId, sessionToken, liveQueryServerURL, serverURL, protocol, host, applicationId, javascriptKey, masterKey;
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
defaultLiveQueryClient.on('open', function () {
|
|
564
|
-
LiveQuery.emit('open');
|
|
565
|
-
});
|
|
566
|
-
defaultLiveQueryClient.on('close', function () {
|
|
567
|
-
LiveQuery.emit('close');
|
|
568
|
-
});
|
|
569
|
-
return _context3.abrupt("return", defaultLiveQueryClient);
|
|
570
|
-
|
|
571
|
-
case 21:
|
|
572
|
-
case "end":
|
|
573
|
-
return _context3.stop();
|
|
574
|
-
}
|
|
111
|
+
return _regenerator.default.wrap(function (_context3) {
|
|
112
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
113
|
+
case 0:
|
|
114
|
+
if (!defaultLiveQueryClient) {
|
|
115
|
+
_context3.next = 2;
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
return _context3.abrupt("return", defaultLiveQueryClient);
|
|
119
|
+
case 2:
|
|
120
|
+
_context3.next = 4;
|
|
121
|
+
return _promise.default.all([_CoreManager.default.getUserController().currentUserAsync(), _CoreManager.default.getInstallationController().currentInstallationId()]);
|
|
122
|
+
case 4:
|
|
123
|
+
_yield$Promise$all = _context3.sent;
|
|
124
|
+
_yield$Promise$all2 = (0, _slicedToArray2.default)(_yield$Promise$all, 2);
|
|
125
|
+
currentUser = _yield$Promise$all2[0];
|
|
126
|
+
installationId = _yield$Promise$all2[1];
|
|
127
|
+
sessionToken = currentUser ? currentUser.getSessionToken() : undefined;
|
|
128
|
+
liveQueryServerURL = _CoreManager.default.get('LIVEQUERY_SERVER_URL');
|
|
129
|
+
if (!(liveQueryServerURL && (0, _indexOf.default)(liveQueryServerURL).call(liveQueryServerURL, 'ws') !== 0)) {
|
|
130
|
+
_context3.next = 12;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
throw new Error('You need to set a proper Parse LiveQuery server url before using LiveQueryClient');
|
|
134
|
+
case 12:
|
|
135
|
+
// If we can not find Parse.liveQueryServerURL, we try to extract it from Parse.serverURL
|
|
136
|
+
if (!liveQueryServerURL) {
|
|
137
|
+
serverURL = _CoreManager.default.get('SERVER_URL');
|
|
138
|
+
protocol = (0, _indexOf.default)(serverURL).call(serverURL, 'https') === 0 ? 'wss://' : 'ws://';
|
|
139
|
+
host = serverURL.replace(/^https?:\/\//, '');
|
|
140
|
+
liveQueryServerURL = protocol + host;
|
|
141
|
+
_CoreManager.default.set('LIVEQUERY_SERVER_URL', liveQueryServerURL);
|
|
142
|
+
}
|
|
143
|
+
applicationId = _CoreManager.default.get('APPLICATION_ID');
|
|
144
|
+
javascriptKey = _CoreManager.default.get('JAVASCRIPT_KEY');
|
|
145
|
+
masterKey = _CoreManager.default.get('MASTER_KEY');
|
|
146
|
+
defaultLiveQueryClient = new _LiveQueryClient.default({
|
|
147
|
+
applicationId: applicationId,
|
|
148
|
+
serverURL: liveQueryServerURL,
|
|
149
|
+
javascriptKey: javascriptKey,
|
|
150
|
+
masterKey: masterKey,
|
|
151
|
+
sessionToken: sessionToken,
|
|
152
|
+
installationId: installationId
|
|
153
|
+
});
|
|
154
|
+
defaultLiveQueryClient.on('error', function (error) {
|
|
155
|
+
LiveQuery.emit('error', error);
|
|
156
|
+
});
|
|
157
|
+
defaultLiveQueryClient.on('open', function () {
|
|
158
|
+
LiveQuery.emit('open');
|
|
159
|
+
});
|
|
160
|
+
defaultLiveQueryClient.on('close', function () {
|
|
161
|
+
LiveQuery.emit('close');
|
|
162
|
+
});
|
|
163
|
+
return _context3.abrupt("return", defaultLiveQueryClient);
|
|
164
|
+
case 21:
|
|
165
|
+
case "end":
|
|
166
|
+
return _context3.stop();
|
|
575
167
|
}
|
|
576
168
|
}, _callee3);
|
|
577
169
|
}))();
|
|
578
170
|
},
|
|
579
|
-
_clearCachedDefaultClient: function
|
|
171
|
+
_clearCachedDefaultClient: function () {
|
|
580
172
|
defaultLiveQueryClient = null;
|
|
581
173
|
}
|
|
582
174
|
};
|
|
583
|
-
|
|
584
175
|
_CoreManager.default.setLiveQueryController(DefaultLiveQueryController);
|