Skip to content

Commit

Permalink
Merge branch 'dev-0.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
birdofpreyru committed Apr 12, 2024
2 parents 038d9fd + 85ca857 commit 1cef6e8
Show file tree
Hide file tree
Showing 9 changed files with 655 additions and 831 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defaults: &defaults
docker:
- image: cimg/node:lts

version: 2
version: 2.1
jobs:
test:
<<: *defaults
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.1
v20.12.2
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
[copyFileAssets()]: https://github.com/birdofpreyru/react-native-fs?tab=readme-ov-file#copyfileassets
[Error]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error
[Example App]: https://github.com/birdofpreyru/react-native-static-server/tree/master/example
[Expo Example App]: https://github.com/jole141/expo-examples/tree/react-native-static-server
[Expo]: https://expo.dev
[getDeviceType()]: https://www.npmjs.com/package/react-native-device-info#getDeviceType
[Issue#8]: https://github.com/birdofpreyru/react-native-static-server/issues/8
[jole141]: https://github.com/jole141
[Lighttpd]: https://www.lighttpd.net
[MainBundlePath]: https://www.npmjs.com/package/@dr.pogodin/react-native-fs#mainbundlepath
[mod_alias]: https://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_alias
Expand Down Expand Up @@ -118,7 +121,12 @@ and [old][Old Architecture] RN architectures.
- Building for Android target on Windows host
([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22Windows+-%3E+Android%22)).
Prefer building for Android on macOS or Ubuntu host.

- [Expo] ([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3AExpo)).

Though, presumably the library in its current state already works fine
with [Expo] &mdash; see [Issue#8] and [Expo Example App] by [jole141].

- [tvOS](https://developer.apple.com/tvos) ([open issues](https://github.com/birdofpreyru/react-native-static-server/issues?q=is%3Aissue+is%3Aopen+label%3AtvOS)).


Expand Down Expand Up @@ -184,11 +192,11 @@ and [old][Old Architecture] RN architectures.
$ pod install
```
- For [Expo]: \
_It probably works with some additional setup (see
[Issue#8](https://github.com/birdofpreyru/react-native-static-server/issues/8)),
however at the moment we don't support it officially. If anybody wants
to help with this, contributions to the documentation / codebase are welcome._
- For [Expo]:
Presumably, it works with some additional setup (see [Issue#8] and
[Expo Example App] by [jole141]; though it is not officially supported
(tested) for new releases.
- For **Mac Catalyst**:
- Disable Flipper in your app's Podfile.
Expand Down
8 changes: 4 additions & 4 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PODS:
- boost (1.83.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- dr-pogodin-react-native-fs (2.24.1):
- dr-pogodin-react-native-fs (2.24.4):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
Expand Down Expand Up @@ -981,7 +981,7 @@ PODS:
- React-Mapbuffer (0.73.6):
- glog
- React-debug
- react-native-webview (13.8.1):
- react-native-webview (13.8.4):
- glog
- hermes-engine
- RCT-Folly (= 2022.05.16.00)
Expand Down Expand Up @@ -1424,7 +1424,7 @@ SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
dr-pogodin-react-native-fs: 1dbe759b5855245c5f968aa8994d0db22041d73f
dr-pogodin-react-native-fs: 1104ecc47f2e717b60a67c52f981fd26885ddd56
dr-pogodin-react-native-static-server: 4d885462b4e22d5a96335fb24b77cc0d6823ac4e
FBLazyVector: f64d1e2ea739b4d8f7e4740cde18089cd97fe864
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
Expand Down Expand Up @@ -1462,7 +1462,7 @@ SPEC CHECKSUMS:
React-jsitracing: 4fed160d939e93a39049481f47744af246a7ac2c
React-logger: 3eb80a977f0d9669468ef641a5e1fabbc50a09ec
React-Mapbuffer: 84ea43c6c6232049135b1550b8c60b2faac19fab
react-native-webview: 95083ac8aed57e568ed309c06d5157196000bc93
react-native-webview: 84b5ff28cc8cfcc2bb955e9456f8d482be3ecb18
React-nativeconfig: b4d4e9901d4cabb57be63053fd2aa6086eb3c85f
React-NativeModulesApple: cd26e56d56350e123da0c1e3e4c76cb58a05e1ee
React-perflogger: 5f49905de275bac07ac7ea7f575a70611fa988f2
Expand Down
14 changes: 7 additions & 7 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
"windows": "react-native run-windows"
},
"dependencies": {
"@dr.pogodin/react-native-fs": "^2.24.1",
"@dr.pogodin/react-native-fs": "^2.24.4",
"react": "18.2.0",
"react-native": "0.73.6",
"react-native-webview": "^13.8.1",
"react-native-windows": "^0.73.10"
"react-native-webview": "^13.8.4",
"react-native-windows": "^0.73.11"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/runtime": "^7.24.0",
"@babel/core": "^7.24.4",
"@babel/preset-env": "^7.24.4",
"@babel/runtime": "^7.24.4",
"@react-native/babel-preset": "^0.73.21",
"@react-native/metro-config": "^0.73.5",
"@react-native/typescript-config": "^0.73.1",
"babel-plugin-module-resolver": "^5.0.0",
"metro-config": "^0.80.6",
"metro-config": "^0.80.8",
"pod-install": "^0.2.0"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default function App() {
<WebView
cacheMode="LOAD_NO_CACHE"
// This way we can receive messages sent by the WebView content.
onMessage={(event) => {
onMessage={(event: any) => {
const message = event.nativeEvent.data;
Alert.alert('Got a message from the WebView content', message);
}}
Expand All @@ -192,7 +192,7 @@ export default function App() {
// there when links inside WebView are pressed. However, it is worth
// to re-test, troubleshoot, and probably fix. It works fine both
// Android and iOS.
onShouldStartLoadWithRequest={(request) => {
onShouldStartLoadWithRequest={(request: any) => {
const load = request.url.startsWith(origin);
if (!load) {
Linking.openURL(request.url);
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@
"registry": "https://registry.npmjs.org/"
},
"devDependencies": {
"@dr.pogodin/react-native-fs": "^2.24.1",
"@dr.pogodin/react-native-fs": "^2.24.4",
"@react-native/eslint-config": "^0.73.2",
"@types/jest": "^29.5.12",
"@types/react": "^18.2.66",
"@types/react": "^18.2.77",
"@types/uuid": "^9.0.8",
"del-cli": "^5.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"jest": "^29.7.0",
"metro-config": "^0.80.6",
"metro-config": "^0.80.8",
"pod-install": "^0.2.0",
"prettier": "^3.2.5",
"react": "18.2.0",
"react-native": "0.73.6",
"react-native-builder-bob": "^0.23.2",
"react-native-windows": "^0.73.10",
"typescript": "^5.4.2"
"react-native-windows": "^0.73.11",
"typescript": "^5.4.5"
},
"resolutions": {
"@types/react": "^18.2.48"
Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class StaticServer {
}

async _handleAppStateChange(appState: AppStateStatus) {
const starting = appState === 'active';
const starting = appState === 'active' || appState === 'inactive';
try {
if (starting) await this.start('App entered foreground');
else await this._stop('App entered background');
Expand Down
Loading

0 comments on commit 1cef6e8

Please sign in to comment.