@aws-amplify/datastore 5.0.1-console-preview.b278dcb.0 → 5.0.1-console-preview.3d7f188.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.
@@ -1361,7 +1361,9 @@ var DataStore = /** @class */ (function () {
1361
1361
  next: function (_a) {
1362
1362
  var type = _a.type, data = _a.data;
1363
1363
  // In the Browser, we can begin returning data once subscriptions are in place.
1364
- var readyType = sync_1.ControlMessage.SYNC_ENGINE_STORAGE_SUBSCRIBED;
1364
+ var readyType = (0, utils_1.isBrowser)()
1365
+ ? sync_1.ControlMessage.SYNC_ENGINE_STORAGE_SUBSCRIBED
1366
+ : sync_1.ControlMessage.SYNC_ENGINE_SYNC_QUERIES_READY;
1365
1367
  if (type === readyType) {
1366
1368
  _this.initResolve();
1367
1369
  }
@@ -7,8 +7,7 @@ var IndexedDBAdapter_1 = __importDefault(require("../IndexedDBAdapter"));
7
7
  var AsyncStorageAdapter_1 = __importDefault(require("../AsyncStorageAdapter"));
8
8
  var utils_1 = require("@aws-amplify/core/internals/utils");
9
9
  var getDefaultAdapter = function () {
10
- var isBrowser = true; // TODO(v6): Update this for SSR
11
- if ((isBrowser && window.indexedDB) || ((0, utils_1.isWebWorker)() && self.indexedDB)) {
10
+ if ((utils_1.isBrowser && window.indexedDB) || ((0, utils_1.isWebWorker)() && self.indexedDB)) {
12
11
  return IndexedDBAdapter_1.default;
13
12
  }
14
13
  return AsyncStorageAdapter_1.default;
@@ -88,12 +88,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
88
88
  exports.MutationProcessor = exports.safeJitteredBackoff = void 0;
89
89
  var internals_1 = require("@aws-amplify/api/internals");
90
90
  var utils_1 = require("@aws-amplify/core/internals/utils");
91
- var core_1 = require("@aws-amplify/core");
92
91
  var rxjs_1 = require("rxjs");
93
92
  var types_1 = require("../../types");
94
93
  var util_1 = require("../../util");
95
94
  var utils_2 = require("../utils");
96
95
  var errorMaps_1 = require("./errorMaps");
96
+ var core_1 = require("@aws-amplify/core");
97
97
  var MAX_ATTEMPTS = 10;
98
98
  var logger = new core_1.ConsoleLogger('DataStore');
99
99
  var MutationProcessor = /** @class */ (function () {
package/lib/sync/utils.js CHANGED
@@ -87,9 +87,9 @@ exports.getIdentifierValue = exports.getTokenForCustomAuth = exports.getClientSi
87
87
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
88
88
  // SPDX-License-Identifier: Apache-2.0
89
89
  var api_1 = require("@aws-amplify/api");
90
- var core_1 = require("@aws-amplify/core");
91
90
  var types_1 = require("../types");
92
91
  var util_1 = require("../util");
92
+ var core_1 = require("@aws-amplify/core");
93
93
  var logger = new core_1.ConsoleLogger('DataStore');
94
94
  var GraphQLOperationType;
95
95
  (function (GraphQLOperationType) {