From 0b486318d4f8b7e9d586606622ca8e2287fe7605 Mon Sep 17 00:00:00 2001 From: balzack Date: Thu, 13 Jan 2022 23:59:53 -0800 Subject: [PATCH] adding plaeholder for mobile app --- app/mobile/.buckconfig | 6 + app/mobile/.editorconfig | 3 + app/mobile/.eslintrc.js | 4 + app/mobile/.flowconfig | 65 + app/mobile/.gitattributes | 3 + app/mobile/.gitignore | 60 + app/mobile/.prettierrc.js | 7 + app/mobile/.watchmanconfig | 1 + app/mobile/App.js | 51 + app/mobile/__tests__/App-test.js | 14 + app/mobile/android/app/_BUCK | 55 + app/mobile/android/app/build.gradle | 227 + app/mobile/android/app/build_defs.bzl | 19 + app/mobile/android/app/debug.keystore | Bin 0 -> 2257 bytes app/mobile/android/app/proguard-rules.pro | 10 + .../android/app/src/debug/AndroidManifest.xml | 13 + .../debug/java/com/ws/ReactNativeFlipper.java | 72 + .../android/app/src/main/AndroidManifest.xml | 25 + .../src/main/java/com/ws/MainActivity.java | 15 + .../src/main/java/com/ws/MainApplication.java | 80 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 3056 bytes .../res/mipmap-hdpi/ic_launcher_round.png | Bin 0 -> 5024 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 2096 bytes .../res/mipmap-mdpi/ic_launcher_round.png | Bin 0 -> 2858 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 4569 bytes .../res/mipmap-xhdpi/ic_launcher_round.png | Bin 0 -> 7098 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 6464 bytes .../res/mipmap-xxhdpi/ic_launcher_round.png | Bin 0 -> 10676 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 9250 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 0 -> 15523 bytes .../app/src/main/res/values/strings.xml | 3 + .../app/src/main/res/values/styles.xml | 8 + app/mobile/android/build.gradle | 38 + app/mobile/android/gradle.properties | 28 + .../android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 + app/mobile/android/gradlew | 185 + app/mobile/android/gradlew.bat | 89 + app/mobile/android/settings.gradle | 3 + app/mobile/app.json | 4 + app/mobile/babel.config.js | 3 + app/mobile/index.js | 9 + app/mobile/ios/Podfile | 30 + app/mobile/ios/Podfile.lock | 526 + app/mobile/ios/ws.xcodeproj/project.pbxproj | 689 + .../xcshareddata/xcschemes/ws.xcscheme | 88 + .../ws.xcworkspace/contents.xcworkspacedata | 10 + app/mobile/ios/ws/AppDelegate.h | 8 + app/mobile/ios/ws/AppDelegate.m | 62 + .../AppIcon.appiconset/Contents.json | 38 + .../ios/ws/Images.xcassets/Contents.json | 6 + app/mobile/ios/ws/Info.plist | 55 + app/mobile/ios/ws/LaunchScreen.storyboard | 47 + app/mobile/ios/ws/main.m | 9 + app/mobile/ios/wsTests/Info.plist | 24 + app/mobile/ios/wsTests/wsTests.m | 65 + app/mobile/metro.config.js | 17 + app/mobile/package-lock.json | 23844 ++++++++++++++++ app/mobile/package.json | 29 + 59 files changed, 26652 insertions(+) create mode 100644 app/mobile/.buckconfig create mode 100644 app/mobile/.editorconfig create mode 100644 app/mobile/.eslintrc.js create mode 100644 app/mobile/.flowconfig create mode 100644 app/mobile/.gitattributes create mode 100644 app/mobile/.gitignore create mode 100644 app/mobile/.prettierrc.js create mode 100644 app/mobile/.watchmanconfig create mode 100644 app/mobile/App.js create mode 100644 app/mobile/__tests__/App-test.js create mode 100644 app/mobile/android/app/_BUCK create mode 100644 app/mobile/android/app/build.gradle create mode 100644 app/mobile/android/app/build_defs.bzl create mode 100644 app/mobile/android/app/debug.keystore create mode 100644 app/mobile/android/app/proguard-rules.pro create mode 100644 app/mobile/android/app/src/debug/AndroidManifest.xml create mode 100644 app/mobile/android/app/src/debug/java/com/ws/ReactNativeFlipper.java create mode 100644 app/mobile/android/app/src/main/AndroidManifest.xml create mode 100644 app/mobile/android/app/src/main/java/com/ws/MainActivity.java create mode 100644 app/mobile/android/app/src/main/java/com/ws/MainApplication.java create mode 100644 app/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 app/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png create mode 100644 app/mobile/android/app/src/main/res/values/strings.xml create mode 100644 app/mobile/android/app/src/main/res/values/styles.xml create mode 100644 app/mobile/android/build.gradle create mode 100644 app/mobile/android/gradle.properties create mode 100644 app/mobile/android/gradle/wrapper/gradle-wrapper.jar create mode 100644 app/mobile/android/gradle/wrapper/gradle-wrapper.properties create mode 100755 app/mobile/android/gradlew create mode 100644 app/mobile/android/gradlew.bat create mode 100644 app/mobile/android/settings.gradle create mode 100644 app/mobile/app.json create mode 100644 app/mobile/babel.config.js create mode 100644 app/mobile/index.js create mode 100644 app/mobile/ios/Podfile create mode 100644 app/mobile/ios/Podfile.lock create mode 100644 app/mobile/ios/ws.xcodeproj/project.pbxproj create mode 100644 app/mobile/ios/ws.xcodeproj/xcshareddata/xcschemes/ws.xcscheme create mode 100644 app/mobile/ios/ws.xcworkspace/contents.xcworkspacedata create mode 100644 app/mobile/ios/ws/AppDelegate.h create mode 100644 app/mobile/ios/ws/AppDelegate.m create mode 100644 app/mobile/ios/ws/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 app/mobile/ios/ws/Images.xcassets/Contents.json create mode 100644 app/mobile/ios/ws/Info.plist create mode 100644 app/mobile/ios/ws/LaunchScreen.storyboard create mode 100644 app/mobile/ios/ws/main.m create mode 100644 app/mobile/ios/wsTests/Info.plist create mode 100644 app/mobile/ios/wsTests/wsTests.m create mode 100644 app/mobile/metro.config.js create mode 100644 app/mobile/package-lock.json create mode 100644 app/mobile/package.json diff --git a/app/mobile/.buckconfig b/app/mobile/.buckconfig new file mode 100644 index 00000000..934256cb --- /dev/null +++ b/app/mobile/.buckconfig @@ -0,0 +1,6 @@ + +[android] + target = Google Inc.:Google APIs:23 + +[maven_repositories] + central = https://repo1.maven.org/maven2 diff --git a/app/mobile/.editorconfig b/app/mobile/.editorconfig new file mode 100644 index 00000000..7c286132 --- /dev/null +++ b/app/mobile/.editorconfig @@ -0,0 +1,3 @@ +# Windows files +[*.bat] +end_of_line = crlf diff --git a/app/mobile/.eslintrc.js b/app/mobile/.eslintrc.js new file mode 100644 index 00000000..40c6dcd0 --- /dev/null +++ b/app/mobile/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: '@react-native-community', +}; diff --git a/app/mobile/.flowconfig b/app/mobile/.flowconfig new file mode 100644 index 00000000..4320b707 --- /dev/null +++ b/app/mobile/.flowconfig @@ -0,0 +1,65 @@ +[ignore] +; We fork some components by platform +.*/*[.]android.js + +; Ignore "BUCK" generated dirs +/\.buckd/ + +; Ignore polyfills +node_modules/react-native/Libraries/polyfills/.* + +; Flow doesn't support platforms +.*/Libraries/Utilities/LoadingView.js + +[untyped] +.*/node_modules/@react-native-community/cli/.*/.* + +[include] + +[libs] +node_modules/react-native/interface.js +node_modules/react-native/flow/ + +[options] +emoji=true + +exact_by_default=true + +format.bracket_spacing=false + +module.file_ext=.js +module.file_ext=.json +module.file_ext=.ios.js + +munge_underscores=true + +module.name_mapper='^react-native/\(.*\)$' -> '/node_modules/react-native/\1' +module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '/node_modules/react-native/Libraries/Image/RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FlowFixMeProps +suppress_type=$FlowFixMeState + +[lints] +sketchy-null-number=warn +sketchy-null-mixed=warn +sketchy-number=warn +untyped-type-import=warn +nonstrict-import=warn +deprecated-type=warn +unsafe-getters-setters=warn +unnecessary-invariant=warn +signature-verification-failure=warn + +[strict] +deprecated-type +nonstrict-import +sketchy-null +unclear-type +unsafe-getters-setters +untyped-import +untyped-type-import + +[version] +^0.158.0 diff --git a/app/mobile/.gitattributes b/app/mobile/.gitattributes new file mode 100644 index 00000000..45a3dcb2 --- /dev/null +++ b/app/mobile/.gitattributes @@ -0,0 +1,3 @@ +# Windows files should use crlf line endings +# https://help.github.com/articles/dealing-with-line-endings/ +*.bat text eol=crlf diff --git a/app/mobile/.gitignore b/app/mobile/.gitignore new file mode 100644 index 00000000..cc53454e --- /dev/null +++ b/app/mobile/.gitignore @@ -0,0 +1,60 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate + +# Android/IntelliJ +# +build/ +.idea +.gradle +local.properties +*.iml +*.hprof + +# node.js +# +node_modules/ +npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore +!debug.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle + +# CocoaPods +/ios/Pods/ diff --git a/app/mobile/.prettierrc.js b/app/mobile/.prettierrc.js new file mode 100644 index 00000000..84196d95 --- /dev/null +++ b/app/mobile/.prettierrc.js @@ -0,0 +1,7 @@ +module.exports = { + bracketSpacing: false, + jsxBracketSameLine: true, + singleQuote: true, + trailingComma: 'all', + arrowParens: 'avoid', +}; diff --git a/app/mobile/.watchmanconfig b/app/mobile/.watchmanconfig new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/app/mobile/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/app/mobile/App.js b/app/mobile/App.js new file mode 100644 index 00000000..edda80df --- /dev/null +++ b/app/mobile/App.js @@ -0,0 +1,51 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + * + * @format + * @flow strict-local + */ + +import React from 'react'; +import type {Node} from 'react'; +import { + SafeAreaView, + ScrollView, + StatusBar, + StyleSheet, + Text, + useColorScheme, + View, + Button, +} from 'react-native'; + +const App: () => Node = () => { + + const test = () => { + console.log("PRESSED: 7000"); + var ws = new WebSocket('ws://192.168.13.233:7000/status'); + ws.onerror = (e) => { + console.log("error: ", e); + } + ws.onmessage = (e) => { + console.log("message: ", e); + } + ws.onclose = (e) => { + console.log("close: ", e); + } + ws.onopen = (e) => { + console.log("connected"); + ws.send('something'); + } + } + + return ( + + +