@sleeperhq/mini-core 1.4.3 → 1.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleeperhq/mini-core",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Core library frameworks for developing Sleeper Mini Apps.",
5
5
  "main": "index.ts",
6
6
  "types": "index.d.ts",
@@ -2,7 +2,7 @@ import React, {useEffect, useRef, useState} from 'react';
2
2
  import {Platform} from 'react-native';
3
3
  import {Config, SocketMessage} from '../types';
4
4
  import { ScriptLocatorResolver, ScriptManager, Federated } from '@callstack/repack/client';
5
- import NetInfo from '@react-native-community/netinfo';
5
+ import NetInfo, { NetInfoState } from '@react-native-community/netinfo';
6
6
  import TcpSocket from 'react-native-tcp-socket';
7
7
  import { fetchMainVersionMap, getMainUrl } from './url_resolver';
8
8
 
@@ -179,8 +179,10 @@ const DevServer = props => {
179
179
  }
180
180
 
181
181
  const startSocket = async () => {
182
- const netInfo = await NetInfo.fetch();
182
+ const netInfo: NetInfoState = await NetInfo.fetch();
183
+
183
184
  const netInfoDetails = netInfo?.details;
185
+ // @ts-ignore
184
186
  const ipAddress = netInfoDetails?.ipAddress;
185
187
 
186
188
  if (!netInfoDetails || !('ipAddress' in netInfoDetails)) {
@@ -1,6 +1,6 @@
1
1
  export * from '../../declarations/types/index.d';
2
2
  export { default as Context } from '../../declarations/sleeper_context.d';
3
- export { default as SocketMessage } from '../../declarations/sleeper_message.d';
3
+ export type { default as SocketMessage } from '../../declarations/sleeper_message.d';
4
4
 
5
5
  export type Config = {
6
6
  name: string,