@aws-amplify/api-graphql 4.0.1-console-preview.431c340.0 → 4.0.1-console-preview.0bbe168.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.
@@ -1,4 +1,4 @@
1
- import { ZenObservable } from 'zen-observable-ts';
1
+ import { Observer } from 'rxjs';
2
2
  export interface SubscriptionObserver<T> {
3
3
  closed: boolean;
4
4
  next(value: T): void;
@@ -24,4 +24,4 @@ export declare enum ConnectionState {
24
24
  ConnectedPendingKeepAlive = "ConnectedPendingKeepAlive"
25
25
  }
26
26
  export declare type PubSubContent = Record<string, unknown> | string;
27
- export declare type PubSubContentObserver = ZenObservable.SubscriptionObserver<PubSubContent>;
27
+ export declare type PubSubContentObserver = Observer<PubSubContent>;
@@ -1,4 +1,4 @@
1
- import Observable from 'zen-observable-ts';
1
+ import { Observable } from 'rxjs';
2
2
  import { ConnectionState } from '../types/PubSub';
3
3
  declare type LinkedConnectionState = 'connected' | 'disconnected';
4
4
  declare type LinkedHealthState = 'healthy' | 'unhealthy';
@@ -3,7 +3,7 @@
3
3
  // SPDX-License-Identifier: Apache-2.0
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  var tslib_1 = require("tslib");
6
- var zen_observable_ts_1 = tslib_1.__importDefault(require("zen-observable-ts"));
6
+ var rxjs_1 = require("rxjs");
7
7
  var PubSub_1 = require("../types/PubSub");
8
8
  var ReachabilityMonitor_1 = require("./ReachabilityMonitor");
9
9
  exports.CONNECTION_CHANGE = {
@@ -41,7 +41,7 @@ var ConnectionStateMonitor = /** @class */ (function () {
41
41
  (_b = _this._initialNetworkStateSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
42
42
  });
43
43
  this._linkedConnectionStateObservable =
44
- new zen_observable_ts_1.default(function (connectionStateObserver) {
44
+ new rxjs_1.Observable(function (connectionStateObserver) {
45
45
  connectionStateObserver.next(_this._linkedConnectionState);
46
46
  _this._linkedConnectionStateObserver = connectionStateObserver;
47
47
  });
@@ -84,14 +84,14 @@ var ConnectionStateMonitor = /** @class */ (function () {
84
84
  // states without changing the overall connection state.
85
85
  // After translating from linked states to ConnectionState, then remove any duplicates
86
86
  return this._linkedConnectionStateObservable
87
- .map(function (value) {
87
+ .pipe(rxjs_1.map(function (value) {
88
88
  return _this.connectionStatesTranslator(value);
89
- })
90
- .filter(function (current) {
89
+ }))
90
+ .pipe(rxjs_1.filter(function (current) {
91
91
  var toInclude = current !== previous;
92
92
  previous = current;
93
93
  return toInclude;
94
- });
94
+ }));
95
95
  },
96
96
  enumerable: true,
97
97
  configurable: true
@@ -100,6 +100,7 @@ var ConnectionStateMonitor = /** @class */ (function () {
100
100
  * Updates local connection state and emits the full state to the observer.
101
101
  */
102
102
  ConnectionStateMonitor.prototype.record = function (statusUpdates) {
103
+ var _a;
103
104
  // Maintain the network monitor
104
105
  if (statusUpdates.intendedConnectionState === 'connected') {
105
106
  this.enableNetworkMonitoring();
@@ -110,7 +111,7 @@ var ConnectionStateMonitor = /** @class */ (function () {
110
111
  // Maintain the socket state
111
112
  var newSocketStatus = tslib_1.__assign(tslib_1.__assign({}, this._linkedConnectionState), statusUpdates);
112
113
  this._linkedConnectionState = tslib_1.__assign({}, newSocketStatus);
113
- this._linkedConnectionStateObserver.next(this._linkedConnectionState);
114
+ (_a = this._linkedConnectionStateObserver) === null || _a === void 0 ? void 0 : _a.next(this._linkedConnectionState);
114
115
  };
115
116
  /*
116
117
  * Translate the ConnectionState structure into a specific ConnectionState string literal union
@@ -1,3 +1 @@
1
- export declare const ReachabilityMonitor: () => import("zen-observable-ts").default<{
2
- online: boolean;
3
- }>;
1
+ export declare const ReachabilityMonitor: () => any;
@@ -1,3 +1 @@
1
- export declare const ReachabilityMonitor: () => import("zen-observable-ts").default<{
2
- online: boolean;
3
- }>;
1
+ export declare const ReachabilityMonitor: () => any;
@@ -1,4 +1,4 @@
1
- import { Observer } from 'zen-observable-ts';
1
+ import { Observer } from 'rxjs';
2
2
  export declare enum ReconnectEvent {
3
3
  START_RECONNECT = "START_RECONNECT",
4
4
  HALT_RECONNECT = "HALT_RECONNECT"
@@ -1,4 +1,4 @@
1
- import Observable from 'zen-observable-ts';
1
+ import { Observable } from 'rxjs';
2
2
  import { PubSubContentObserver } from '../../types/PubSub';
3
3
  import { SUBSCRIPTION_STATUS } from '../constants';
4
4
  import { GraphQLAuthMode } from '@aws-amplify/core/lib-esm/singleton/API/types';
@@ -1,7 +1,7 @@
1
1
  import { __assign, __awaiter, __generator, __read } from "tslib";
2
2
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  // SPDX-License-Identifier: Apache-2.0
4
- import Observable from 'zen-observable-ts';
4
+ import { Observable } from 'rxjs';
5
5
  import { GraphQLError } from 'graphql';
6
6
  import * as url from 'url';
7
7
  import { v4 as uuid } from 'uuid';