@tarojs/rn-runner 3.5.6 → 3.5.7-alpha.1
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/__tests__/__snapshots__/components.spec.ts.snap +35 -97
- package/dist/index.js +75 -185
- package/dist/index.js.map +1 -1
- package/package.json +15 -21
- package/src/index.ts +75 -208
- package/templates/index.js +1 -0
- package/templates/metro.config.js +8 -0
- package/__tests__/build.spec.ts +0 -17
- package/__tests__/config.spec.ts +0 -35
- package/dist/config/conditional-file-store.js +0 -57
- package/dist/config/conditional-file-store.js.map +0 -1
- package/dist/config/config-holder.js +0 -76
- package/dist/config/config-holder.js.map +0 -1
- package/dist/config/index.js +0 -57
- package/dist/config/index.js.map +0 -1
- package/dist/config/preview.js +0 -102
- package/dist/config/preview.js.map +0 -1
- package/dist/config/terminal-reporter.js +0 -103
- package/dist/config/terminal-reporter.js.map +0 -1
- package/dist/utils.js +0 -29
- package/dist/utils.js.map +0 -1
- package/src/config/conditional-file-store.ts +0 -47
- package/src/config/config-holder.ts +0 -70
- package/src/config/index.ts +0 -76
- package/src/config/preview.ts +0 -114
- package/src/config/terminal-reporter.ts +0 -96
- package/src/utils.ts +0 -27
package/src/utils.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { networkInterfaces } from 'os'
|
|
2
|
-
|
|
3
|
-
export function getOpenHost () {
|
|
4
|
-
let result
|
|
5
|
-
const interfaces = networkInterfaces()
|
|
6
|
-
for (const devName in interfaces) {
|
|
7
|
-
const isEnd = interfaces[devName]?.some(item => {
|
|
8
|
-
// 取IPv4, 不为127.0.0.1的内网ip
|
|
9
|
-
if (['IPv4', 4, '4'].includes(item.family) && item.address !== '127.0.0.1' && !item.internal) {
|
|
10
|
-
result = item.address
|
|
11
|
-
return true
|
|
12
|
-
}
|
|
13
|
-
return false
|
|
14
|
-
})
|
|
15
|
-
// 若获取到ip, 结束遍历
|
|
16
|
-
if (isEnd) {
|
|
17
|
-
break
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return result
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const PLAYGROUNDREPO = 'https://github.com/wuba/taro-playground'
|
|
24
|
-
|
|
25
|
-
export const PLAYGROUNDINFO = `use [Taro Playground App](${PLAYGROUNDREPO}) to scan`
|
|
26
|
-
|
|
27
|
-
export const isWin = /^win/.test(process.platform)
|