@sleeperhq/mini-core 1.4.3 → 1.4.5
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 +14 -14
- package/src/dev_server/index.tsx +4 -2
- package/src/types/index.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sleeperhq/mini-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Core library frameworks for developing Sleeper Mini Apps.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -36,19 +36,19 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@callstack/repack": "blitzstudios/repack.git#callstack-repack-v2.7.0-gitpkg",
|
|
38
38
|
"@callstack/repack-dev-server": "blitzstudios/repack.git#callstack-repack-dev-server-v1.0.7-gitpkg",
|
|
39
|
-
"@react-native-community/cli": "6.
|
|
39
|
+
"@react-native-community/cli": "6.1.0",
|
|
40
40
|
"@react-native-community/cli-types": "6.0.0",
|
|
41
41
|
"@react-native-community/netinfo": "9.3.7",
|
|
42
42
|
"axios": "0.15.3",
|
|
43
|
-
"babel-loader": "
|
|
44
|
-
"react-native-fast-image": "
|
|
45
|
-
"react-native-interactable": "
|
|
43
|
+
"babel-loader": "9.1.2",
|
|
44
|
+
"react-native-fast-image": "https://github.com/blitzstudios/react-native-fast-image.git#release/1.1",
|
|
45
|
+
"react-native-interactable": "https://github.com/blitzstudios/react-native-interactable",
|
|
46
46
|
"react-native-linear-gradient": "2.5.6",
|
|
47
47
|
"react-native-rename": "^3.2.12",
|
|
48
|
-
"react-refresh": "0.
|
|
48
|
+
"react-refresh": "0.14.0",
|
|
49
49
|
"react-test-renderer": "17.0.2",
|
|
50
|
-
"terser-webpack-plugin": "
|
|
51
|
-
"webpack": "
|
|
50
|
+
"terser-webpack-plugin": "5.3.6",
|
|
51
|
+
"webpack": "5.75.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"react": "17.0.2",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"react-native-svg": "13.7.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@babel/core": "
|
|
60
|
-
"@babel/preset-typescript": "
|
|
61
|
-
"@babel/runtime": "
|
|
59
|
+
"@babel/core": "7.15.8",
|
|
60
|
+
"@babel/preset-typescript": "7.21.4",
|
|
61
|
+
"@babel/runtime": "7.15.4",
|
|
62
62
|
"@react-native-community/eslint-config": "^2.0.0",
|
|
63
63
|
"@types/react-native": "0.67.7",
|
|
64
64
|
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"lodash": "4.17.21",
|
|
70
70
|
"metro-react-native-babel-preset": "^0.66.2",
|
|
71
71
|
"react-native-tcp-socket": "6.0.6",
|
|
72
|
-
"typescript": "
|
|
72
|
+
"typescript": "5.0.4"
|
|
73
73
|
},
|
|
74
74
|
"resolutions": {
|
|
75
|
-
"react-devtools-core": "
|
|
76
|
-
"@pmmmwh/react-refresh-webpack-plugin": "
|
|
75
|
+
"react-devtools-core": "4.23.0",
|
|
76
|
+
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10"
|
|
77
77
|
},
|
|
78
78
|
"jest": {
|
|
79
79
|
"preset": "react-native"
|
package/src/dev_server/index.tsx
CHANGED
|
@@ -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)) {
|
package/src/types/index.ts
CHANGED
|
@@ -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,
|