dev-classes 1.3.28 → 1.3.29

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.
@@ -23,6 +23,14 @@ export declare class SocketApi {
23
23
  static getState: () => SocketApi_StateProps_P;
24
24
  static on: typeof SocketApi.wsApi.on & typeof SocketApi.events.subscribe;
25
25
  static off: typeof SocketApi.wsApi.on & typeof SocketApi.events.subscribe;
26
+ static getRequestSave: () => {
27
+ payload: {
28
+ [key: string]: any;
29
+ action: string;
30
+ };
31
+ reqId: string;
32
+ cb: any;
33
+ }[];
26
34
  static getStatusSocket: () => import('./deps/WsApi').WsApiE_StatusConnect_OR;
27
35
  static close: () => void;
28
36
  static init: (options: WsApi_Options_P & SocketApi_Options_P) => void;
@@ -7,8 +7,8 @@ var f = (o, e, s) => {
7
7
  e instanceof WeakSet ? e.add(o) : e.set(o, s);
8
8
  };
9
9
  import { DelaysPromise as R } from "../DelaysPromise/DelaysPromise.js";
10
- import { NetworkInformationCordova as d } from "../Utils/NetworkInformation/classes/NetworkInformationCordova.js";
11
- import { NetworkInformationPC as v } from "../Utils/NetworkInformation/classes/NetworkInformationPC.js";
10
+ import { NetworkInformationCordova as v } from "../Utils/NetworkInformation/classes/NetworkInformationCordova.js";
11
+ import { NetworkInformationPC as d } from "../Utils/NetworkInformation/classes/NetworkInformationPC.js";
12
12
  import { EventSubscribers as g } from "../Utils/EventSubscribers/EventSubscribers.js";
13
13
  import { NetworkInformation as O } from "../Utils/NetworkInformation/NetworkInformation.js";
14
14
  import { WsApi as S } from "./deps/WsApi/WsApi.js";
@@ -71,7 +71,7 @@ r = new WeakSet(), A = function() {
71
71
  isNetworkStatus: navigator.onLine
72
72
  }), n(t, "options", {
73
73
  isReConnectNetworkOnline: !1
74
- }), n(t, "wsApi", new S()), n(t, "delay", new R()), n(t, "internet", new O([new v(), new d()])), n(t, "events", new g(["timeOffReConnect", "reConnect"])), n(t, "saveID", {
74
+ }), n(t, "wsApi", new S()), n(t, "delay", new R()), n(t, "internet", new O([new d(), new v()])), n(t, "events", new g(["timeOffReConnect", "reConnect"])), n(t, "saveID", {
75
75
  idReConnect: null,
76
76
  checkConnect: null
77
77
  }), n(t, "stateDefault", t.copyState(t.state)), n(t, "setInfoConnect", (e) => {
@@ -91,8 +91,7 @@ n(t, "getState", () => t.state), n(t, "on", (e, s) => {
91
91
  t.wsApi.getRegisteredEvents().includes(e) ? t.wsApi.on(e, s) : t.events.subscribe(e, s);
92
92
  }), n(t, "off", (e, s) => {
93
93
  t.wsApi.getRegisteredEvents().includes(e) ? t.wsApi.off(e, s) : t.events.unsubscribe(e, s);
94
- }), // static getRequestSave = SocketApi.wsApi.getRequestSave;
95
- n(t, "getStatusSocket", t.wsApi.getStatusSocket), n(t, "close", () => {
94
+ }), n(t, "getRequestSave", t.wsApi.getRequestSave), n(t, "getStatusSocket", t.wsApi.getStatusSocket), n(t, "close", () => {
96
95
  t.state.isActiveReConnect ? t.stopReConnect(!1) : t.wsApi.close();
97
96
  }), n(t, "init", (e) => {
98
97
  const { WsOptions: s, SocketApiOptions: i } = t.splitOptions(e);
@@ -100,11 +99,6 @@ n(t, "getStatusSocket", t.wsApi.getStatusSocket), n(t, "close", () => {
100
99
  c ? t.online() : t.offline();
101
100
  }), t.setOptions(i), t.wsApi.init(s);
102
101
  }), /*------------------------------------------------------------------------------------------------------*/
103
- // useEffect(() => {
104
- // if((isReConnectSocket && (!isNetworkStatus || statusWS === 'ready'))){
105
- // SocketApi.stopReConnect();
106
- // }
107
- // },[isReConnectSocket, isNetworkStatus, statusWS]);
108
102
  n(t, "socketReConnect", () => {
109
103
  if (t.wsApi.getIsInitWS())
110
104
  if (console.log("reconnect"), t.saveID.idReConnect)
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "git+https://github.com/SinGlEBW/dev-classes.git"
12
12
  },
13
13
  "license": "MIT",
14
- "version": "1.3.28",
14
+ "version": "1.3.29",
15
15
  "type": "module",
16
16
  "module": "./dist/index.js",
17
17
  "main": "./dist/index.js",