├── .babelrc ├── .eslintignore ├── .fastlane └── Fastfile ├── .flowconfig ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── android ├── app │ ├── BUCK │ ├── build.gradle │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── rocknative │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── keystores │ ├── BUCK │ └── debug.keystore.properties └── settings.gradle ├── changelog.md ├── dangerfile.js ├── flow-typed └── npm │ ├── @jongold │ └── further_vx.x.x.js │ ├── apollo-client_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── babel-jest_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── babel-plugin-lodash_vx.x.x.js │ ├── babel-plugin-root-import_vx.x.x.js │ ├── babel-plugin-transform-async-to-generator_vx.x.x.js │ ├── babel-plugin-transform-class-properties_vx.x.x.js │ ├── babel-plugin-transform-flow-strip-types_vx.x.x.js │ ├── babel-plugin-transform-react-require_vx.x.x.js │ ├── babel-preset-env_vx.x.x.js │ ├── babel-preset-es2015_vx.x.x.js │ ├── babel-preset-react-native_vx.x.x.js │ ├── babel-preset-react_vx.x.x.js │ ├── chromedriver_vx.x.x.js │ ├── codecov_vx.x.x.js │ ├── concurrently_vx.x.x.js │ ├── copy-webpack-plugin_vx.x.x.js │ ├── cross-env_vx.x.x.js │ ├── danger_vx.x.x.js │ ├── enzyme-to-json_vx.x.x.js │ ├── enzyme_v2.3.x.js │ ├── eslint-loader_vx.x.x.js │ ├── eslint-plugin-prettier_vx.x.x.js │ ├── eslint-plugin-react-native_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ ├── eslint_vx.x.x.js │ ├── flow-bin_v0.x.x.js │ ├── flow-coverage-report_vx.x.x.js │ ├── fugazi_vx.x.x.js │ ├── graphql-server-lambda_vx.x.x.js │ ├── graphql-tag_vx.x.x.js │ ├── graphql-tools_vx.x.x.js │ ├── html-webpack-plugin_vx.x.x.js │ ├── jest_v19.x.x.js │ ├── lambda-wrapper_vx.x.x.js │ ├── lint-staged_vx.x.x.js │ ├── now_vx.x.x.js │ ├── offline-plugin_vx.x.x.js │ ├── pre-commit_vx.x.x.js │ ├── preact-compat_vx.x.x.js │ ├── prettier_vx.x.x.js │ ├── ramda_vx.x.x.js │ ├── react-addons-test-utils_v15.x.x.js │ ├── react-apollo_vx.x.x.js │ ├── react-helmet_vx.x.x.js │ ├── react-hot-loader_vx.x.x.js │ ├── react-native-web_vx.x.x.js │ ├── react-native-windows_vx.x.x.js │ ├── react-router-dom_v4.x.x.js │ ├── react-router-native_v4.x.x.js │ ├── react-router_v4.x.x.js │ ├── react-test-renderer_vx.x.x.js │ ├── recompose_vx.x.x.js │ ├── rnpm-plugin-windows_vx.x.x.js │ ├── selenium-webdriver_vx.x.x.js │ ├── serverless-offline_vx.x.x.js │ ├── serverless_vx.x.x.js │ ├── webpack-assets-manifest_vx.x.x.js │ ├── webpack-bundle-analyzer_vx.x.x.js │ ├── webpack-dev-server_vx.x.x.js │ ├── webpack-hot-middleware_vx.x.x.js │ ├── webpack-merge_vx.x.x.js │ ├── webpack_vx.x.x.js │ └── zip-webpack-plugin_vx.x.x.js ├── index.android.js ├── index.browser.js ├── index.ios.js ├── index.server.js ├── index.windows.js ├── ios ├── RockNative-tvOS │ └── Info.plist ├── RockNative-tvOSTests │ └── Info.plist ├── RockNative.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── RockNative-tvOS.xcscheme │ │ └── RockNative.xcscheme ├── RockNative │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── main.m └── RockNativeTests │ ├── Info.plist │ └── RockNativeTests.m ├── package.json ├── src ├── __tests__ │ ├── __snapshots__ │ │ └── index.js.snap │ ├── e2e │ │ ├── firstTest.spec.js │ │ ├── init.js │ │ └── mocha.opts │ ├── index.integration.js │ └── index.js ├── blocks │ ├── Counter │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── counter.native.js.snap │ │ │ │ ├── counter.web.js.snap │ │ │ │ └── index.js.snap │ │ │ ├── counter.native.js │ │ │ ├── counter.web.js │ │ │ └── index.js │ │ ├── counter.native.js │ │ ├── counter.web.js │ │ └── index.js │ └── HelloWorld │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── helloWorld.native.js.snap │ │ │ ├── helloWorld.web.js.snap │ │ │ └── index.js.snap │ │ ├── helloWorld.native.js │ │ ├── helloWorld.web.js │ │ └── index.js │ │ ├── helloWorld.native.js │ │ ├── helloWorld.web.js │ │ └── index.js ├── data │ └── graphql │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── index.js.snap │ │ ├── index.js │ │ ├── networkInterface.js │ │ └── networkInterface.server.js │ │ ├── index.js │ │ ├── networkInterface.js │ │ ├── networkInterface.server.js │ │ └── util │ │ ├── __tests__ │ │ ├── index.js │ │ └── index.native.js │ │ ├── index.js │ │ └── index.native.js ├── index.js ├── junction │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── index.js.snap │ │ └── index.js │ └── index.js ├── layouts │ ├── Horizontal │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── horizontal.native.js.snap │ │ │ │ └── horizontal.web.js.snap │ │ │ ├── horizontal.native.js │ │ │ ├── horizontal.web.js │ │ │ └── index.js │ │ ├── horizontal.native.js │ │ ├── horizontal.web.js │ │ └── index.js │ ├── Vertical │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ ├── vertical.native.js.snap │ │ │ │ └── vertical.web.js.snap │ │ │ ├── index.js │ │ │ ├── vertical.native.js │ │ │ └── vertical.web.js │ │ ├── index.js │ │ ├── vertical.native.js │ │ └── vertical.web.js │ └── index.js ├── runtime │ ├── __tests__ │ │ └── graphql.js │ ├── graphql.js │ ├── registry │ │ ├── __tests__ │ │ │ ├── index.browser.js │ │ │ └── index.js │ │ ├── index.browser.js │ │ ├── index.js │ │ └── util │ │ │ ├── __tests__ │ │ │ └── browser.js │ │ │ ├── browser.js │ │ │ └── types.js │ ├── route-info │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── index.js.snap │ │ │ └── index.js │ │ └── index.js │ └── ssr │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ ├── html.js.snap │ │ │ └── renderBody.js.snap │ │ ├── endRequest.js │ │ ├── html.js │ │ ├── index.js │ │ ├── redirect.js │ │ ├── renderBody.js │ │ ├── withApp.js │ │ └── withMeta.js │ │ ├── endRequest.js │ │ ├── html.js │ │ ├── index.js │ │ ├── redirect.js │ │ ├── renderBody.js │ │ ├── withApp.js │ │ └── withMeta.js └── test-utils │ └── WebDriver.js ├── web ├── deploy.sh ├── handler.js ├── serverless.yml ├── webpack.base.js ├── webpack.client.js ├── webpack.server.js └── webpack.vendor.js ├── windows ├── .gitignore ├── RockNative.sln └── RockNative │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png │ ├── MainPage.cs │ ├── Package.appxmanifest │ ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml │ ├── RockNative.csproj │ ├── RockNative_TemporaryKey.pfx │ └── project.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "react", 4 | "react-native" 5 | ], 6 | "plugins": [ 7 | "transform-react-require", 8 | "transform-flow-strip-types", 9 | "transform-class-properties", 10 | "syntax-dynamic-import", 11 | ["babel-plugin-root-import", { 12 | "rootPathSuffix": "src" 13 | }], 14 | ["lodash", { "id": ["recompose", "ramda"] }], 15 | "import-glob" 16 | ], 17 | "env": { 18 | "node": { 19 | "presets": [ 20 | ] 21 | }, 22 | "test": { 23 | "plugins": [ 24 | "babel-plugin-dynamic-import-node" 25 | ] 26 | }, 27 | "browser": { 28 | "presets": [ 29 | ["env", { 30 | "targets": { 31 | "browsers": ["last 2 versions", "safari >= 7"] 32 | } 33 | }] 34 | ] 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/dist/* 2 | **/webpack.config.* 3 | **/web/* 4 | **/flow-typed 5 | -------------------------------------------------------------------------------- /.fastlane/Fastfile: -------------------------------------------------------------------------------- 1 | fastlane_version "2.13.0" 2 | 3 | default_platform :ios 4 | 5 | platform :ios do 6 | desc "Install App Store Certificates" 7 | lane :development do 8 | match( 9 | type: "development", 10 | git_url: ENV['CERTIFICATES_REPO'], 11 | app_identifier: [ "cc.newspring.newspringapp", "com.subsplashstudio31.NewSpring-Church" ], 12 | username: ENV["APPLE_ID"], 13 | ) 14 | end 15 | 16 | desc "Install App Store Certificates" 17 | lane :production do 18 | match( 19 | type: "appstore", 20 | git_url: ENV['CERTIFICATES_REPO'], 21 | app_identifier: [ "cc.newspring.newspringapp", "com.subsplashstudio31.NewSpring-Church" ], 22 | username: ENV["APPLE_ID"], 23 | ) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [include] 2 | 3 | [ignore] 4 | # We fork some components by platform. This gives duplicate provider 5 | # errors if we don't ignore. From base react-native .flowconfig 6 | .*/*[.]android.js 7 | 8 | # Additional libraries we need to ignore because of flow errors in 9 | # the libraries. 10 | .*/node_modules/animated/.* 11 | .*/node_modules/react-native-web/.* 12 | .*/node_modules/react-native-windows/.* 13 | .*/node_modules/flow-coverage-report/.* 14 | 15 | # Directories to ignore. 16 | .*/__tests__/.* 17 | .*/\.git/.* 18 | .*/\.travis/.* 19 | .*/dangerfile.js 20 | web/ 21 | 22 | [libs] 23 | node_modules/react-native/Libraries/react-native/react-native-interface.js 24 | node_modules/react-native/flow 25 | flow-typed/ 26 | 27 | [options] 28 | module.system=haste 29 | 30 | # prefer native files over web for type checking 31 | # https://github.com/facebook/flow/issues/945 32 | module.file_ext=.native.js 33 | module.file_ext=.ios.js 34 | module.file_ext=.web.js 35 | module.file_ext=.browser.js 36 | module.file_ext=.js 37 | module.file_ext=.jsx 38 | 39 | emoji=true 40 | 41 | munge_underscores=true 42 | 43 | experimental.strict_type_args=false 44 | 45 | module.name_mapper='^\/\(.*\)$' -> '/\1' 46 | 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\)$' -> 'RelativeImageStub' 47 | 48 | suppress_type=$FlowIssue 49 | suppress_type=$FlowFixMe 50 | suppress_type=$FlowIgnore 51 | 52 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\) 53 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+ 54 | suppress_comment=\\(.\\|\n\\)*\\$FlowIgnore 55 | 56 | unsafe.enable_getters_and_setters=true 57 | 58 | [version] 59 | ^0.38.0 60 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Steps to Reproduce 2 | 3 | Describe how to reproduce this issue. 4 | 5 | 1. Do a thing 6 | 2. Do another thing 7 | 3. etc. 8 | 9 | ### Buggy Behavior 10 | 11 | Describe the thing that happens that is the issue. 12 | 13 | ### Expected Behavior 14 | 15 | Describe what should actually happen. 16 | 17 | ### Screenshots 18 | 19 | Screenshots of the issue are greatly appreciated. 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Feature / Fixed Issue(s) 2 | - Description of feature and expected functionality/issue that has been fixed in this PR. 3 | 4 | # Screenshots 5 | - If applicable, include screenshots of UI/style changes. 6 | 7 | # Platform support 8 | - [ ] iOS 9 | - [ ] android 10 | - [ ] server 11 | - [ ] web 12 | - [ ] windows 13 | 14 | # Reporting Bugs 15 | If you find an issue, a bug, or something that seems weird, thank you! That is extremely helpful. You can report this kind of feedback using our [GitHub Issues page](https://github.com/NewSpring/Rock-Native/issues). Here are a few things that are great to include in an issue: 16 | 17 | - Reference to this pull request. 18 | - Steps to reproduce the issue 19 | - Explanation of the buggy behavior 20 | - Explanation of the expected behavior 21 | - Screenshots of the app if helpful 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # nyc test coverage 18 | .nyc_output 19 | 20 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 21 | .grunt 22 | 23 | # node-waf configuration 24 | .lock-wscript 25 | 26 | # Compiled binary addons (http://nodejs.org/api/addons.html) 27 | build/Release 28 | 29 | # Dependency directories 30 | node_modules 31 | jspm_packages 32 | 33 | # Optional npm cache directory 34 | .npm 35 | 36 | # should we move back to npm for ease of use? 37 | package-lock.json 38 | 39 | # Optional REPL history 40 | .node_repl_history 41 | 42 | .DS_Store 43 | 44 | # Fastlane Extras 45 | .fastlane/report.xml 46 | .fastlane/README.md 47 | 48 | # Build files 49 | ios/build 50 | android/.gradle 51 | android/build 52 | android/app/build 53 | dist 54 | *.zip 55 | 56 | # Editor configuration 57 | .vscode 58 | .vs 59 | 60 | # Serverless directories 61 | .serverless 62 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | sudo: required 3 | language: node_js 4 | node_js: 5 | - '6' 6 | cache: 7 | yarn: true 8 | directories: 9 | - node_modules 10 | addons: 11 | sauce_connect: 12 | username: $SAUCE_USERNAME 13 | access_key: $SAUCE_ACCESS_KEY 14 | before_install: 15 | - export CHROME_BIN=/usr/bin/google-chrome 16 | - export DISPLAY=:99.0 17 | - sh -e /etc/init.d/xvfb start 18 | - sudo apt-get update 19 | - sudo apt-get install -y libappindicator1 fonts-liberation 20 | - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb 21 | - sudo dpkg -i google-chrome*.deb 22 | - npm i -g now commit-status 23 | - yarn --ignore-engines 24 | - yarn server-build 25 | - yarn server & 26 | # skip install since its done above 27 | install: true 28 | script: 29 | - jdk_switcher use oraclejdk8 30 | - yarn danger 31 | - yarn lint 32 | - yarn flow 33 | - yarn coverage 34 | # deploy: 35 | # skip_cleanup: true 36 | # provider: script 37 | # script: sh $TRAVIS_BUILD_DIR/web/deploy.sh 38 | # on: 39 | # all_branches: true 40 | # condition: "$TRAVIS_PULL_REQUEST == true" 41 | notifications: 42 | slack: 43 | secure: K7QHkmHJr3n+hT7buOU/lQGNzBchPy7RjMWwm8uo8fhCyb4dxt+6Db1JUsZJFHs0pOTaPVWdEZKgXnZfjhG6Ge0q+Qdy8ywIyZ9k67KPkRihnvSEIbDKaSZUAJxgmaTp/8CYHHjT8udQNLjgiPH6hBcoDd+jT2810lBEPlPUHpBgYZkTwYVsTxtFb5Ybh7OAHZkENwT7ZiE4OZPRHi+uentoF4HlqociThlU/L5o2lNAkd8ZrlMNKP8o6On5RXsd3oDcqaW/y3jDVRqrknp+iCe9P0LHLa/NZjgl68V7JnnC7HWf3JbSzoJXga+14JnKyZPbzcMg/tiU8xDxCR+4MpZaF9t2kHsYI32loCeW+LjIhAZnuxUafHxK5SeoZLWDliuSnV+GHE2NSz3M7siOX+KfY31GyxxadIo52x4l+YJACO5Dmo3OOVyFsScIY+hCEuRjO3eYzfyVD/Z560nexRsnhhrO3HpSHiKsRGNWEJfXZzcXPBCncj7nZW6gHZxSrolr3ZRVWZRuBi6M2ZNZoJhMbmg19blBdLsKtU82n8e45MLuaRBL6S2BjiKu/e29WXo7iQnjCp/A0N1rNNNJzlhD2NaVu8lmNlmuSTWqs1IWUCQdO3gTspCxRat758zuRoRGCt9qeZp+G8Pj8GxuDtB68/LOZJSzvDXWkkyzqKQ= 44 | env: 45 | global: 46 | - secure: KY9TSR3C3BCAU/igF+8PkV1AQseH1cMQZdqY7jT+wwBWExIJUmt+wnTsORPijC8GoHxscnMG9pzPqws7BCYTT480Mos7cxxynVW+maULC+o43Lw4Con/SjDGLJSCm5xdmoirUpOTTnxocA5IlZEe9JZc/73x/xwgGNXDfWzuABoY3KV+mbuuckCizBVMa/l0YULvcvWjzyr9e1Bjo2w26q0kuhBsHLi1PHheEBmfWrAD0ScL9+r4eBwTUvJoMR/RHK19Er2DaMg7070wDyzfvbUYK8dgBJsB2fbCGk0qldpR+Q4aAoWI/DT+XvnfcZPdslMi72CCgjNKyZJjHkMAz8XGbdqLMRJfhBS5lCYnVA7gig0LJgIbT5HGRBvuLVAiyxTMoiVMeeO+W9AwIkPyI7EZLD2mg0I9TIIwzzoHqxsyO5kmwQkALiuTpLcWJKj5Wmydv/kEf1o3V83sKdIAnNSOoGklYRlN4HCrBjTwyfizRj9+KbwYAGCoUI5D8vk86Z/hpp+7ypBBV4063aECdQLI9guTDf/vuvfADQsKJdftQaeshO1zjedsH6vSD+sVuQvBCEaX8cX9k5UxmzTTpCNr8GlmaYYCOYNcYIupmnWvokndT8KLdQToYf+bxxHmLF4/Z8MF0aFxkXBrH/vHhJNUFWP0sCWLLN6izbsO+qA= 47 | - secure: Y6UDxIjZWV0IkbzfZd+4G5EBmRepcYNDPFR+eEwpHdMoQND6U+zMLAjdq6kJvGh4gpKVNObmhETmcWJQuCpaCNIPgnBj0yRe3ttTS1mxA5NcQzKoyyLygbeTI7/5GF0NlOa4OpLzaMi+M6T863Zk2UOPxXXr5tU9gz1LP0cw1YWyJ/2TpKiXjMuUG7yEkRHP3jEKVSqhNcUKKKWhkPF1UroAci1GToSenRcTwzavbkWJuB5HsXieiKCQwCCCkG4RwUj+DcEFL8uzEatICkuJu8H7NciGzjeSgTg0/NOOKH2lTrnYYlvyKmV/YxReLitzBt/eSqKzdVyl0kvlJbtJF+SHP+KS7NcJFT6t8C572t+fZIe49vchBFD5IWnHH7hpvpcYnLD9xBggBLvF1zGxk5iqDC1SNXADl7Cgzz8pFA0dpo9yfHiDLtRciGNH3kLPMvybN1dxNH+bXsjP92WHeVmnqJoVVwCmi9IDUiuQFnJbu5BKJS5TybQqmWY7hff673HPYasyLf7swAQ6F6a7VGTaH60kmuWNm0HEHxu4JQ6IODCoXvJK+rA3XNQIWlrBQ02NYGZb2JfjARhMWqkMcmCxDeAQzU9+/LeCnqw9/rINKm2WuOokBdAKssYspgrTq3pHCzE++qbIjBo3Se1+EfGXgDrlj3zRS3tCvXq8h80= 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rock-Native 2 | ![Rock RMS](https://raw.githubusercontent.com/SparkDevNetwork/Rock/develop/Images/github-banner.png) 3 | 4 | Rock RMS is an open source Relationship Management System (RMS) and Application 5 | Framework. While Rock specializes in serving the unique needs of churches it's 6 | useful in a wide range of service industries. Rock-Native is the native runtime for Rock to run on iOS, Android, Windows, tvOS, and web using technologies including react-native, webpack, apollo, and more. 7 | 8 | Our main developer starting point site is [the wiki](https://github.com/NewSpring/Rock-Native/wiki). 9 | 10 | ## Learn More 11 | 12 | [![Greenkeeper badge](https://badges.greenkeeper.io/NewSpring/Rock-Native.svg)](https://greenkeeper.io/)[![codecov](https://codecov.io/gh/NewSpring/Rock-Native/branch/master/graph/badge.svg)](https://codecov.io/gh/NewSpring/Rock-Native) 13 | 14 | Jump over to the [Rock website](http://www.rockrms.com/) to find out more. Keep up to date by: 15 | 16 | * [Reading the Rock blog](http://www.rockrms.com/Rock/Connect) 17 | * [Following RockRMS on Twitter](http://www.twitter.com/therockrms) 18 | * [Liking RockRMS on Facebook](http://www.facebook.com/therockrms) 19 | * [Reading the Rock Community Q & A](http://www.rockrms.com/Rock/Ask) 20 | 21 | ## Installing 22 | 23 | - Clone the project. 24 | - Run `yarn` to install project dependencies. 25 | - If you haven't run a react native project in the past, you may need to do additional setup to run the project in a simulator. 26 | - For setup instructions, go [here](https://facebook.github.io/react-native/docs/getting-started.html). 27 | 28 | ## Running Locally 29 | ### Android 30 | **Mac Users:** If you are trying to run an android emulator and the emulator will not start, make sure you are _not_ running Docker for Mac. They don't seem to like each other. 31 | 32 | - You must first be running a virtual device (or actual device connected to Android Studio) before attempting to start the project. See above instructions if you don't have a virtual device set up. 33 | - Run `yarn android` to start the app on the device. 34 | 35 | ### iOS 36 | - Run `yarn ios` 37 | 38 | ### tvOS 39 | - Open the xcode project under `ios/`. 40 | - Make sure a tvOS simulator is installed in `Preferences > Components`. 41 | - To run on a tvOS simulator, click `rockNative` on the top bar next to the play and stop buttons. 42 | - Choose rockNative-tvOS as your target, and choose an appropriate simulator. 43 | - Click play in XCode. 44 | 45 | ### Web 46 | - Run `yarn web` 47 | 48 | ## Contributing 49 | 50 | For more information about contributing PRs and issues, see our [Contribution Guidelines](https://github.com/NewSpring/Rock-Native/wiki/Contribution-Guidelines). 51 | 52 | [Good First PR](https://github.com/NewSpring/Rock-Native/labels/Good%20First%20PR) is a great starting point for people new to this project. 53 | 54 | ## License 55 | 56 | By contributing to Rock-Native, you agree that your contributions will be licensed under our [NewSpring Church Community License Agreement](https://github.com/NewSpring/Rock-Native/wiki/License). 57 | -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.rocknative', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.rocknative', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 12 | 13 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rocknative/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.rocknative; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "RockNative"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/rocknative/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.rocknative; 2 | 3 | import android.app.Application; 4 | 5 | import com.facebook.react.ReactApplication; 6 | import com.learnium.RNDeviceInfo.RNDeviceInfo; 7 | import com.facebook.react.ReactNativeHost; 8 | import com.facebook.react.ReactPackage; 9 | import com.facebook.react.shell.MainReactPackage; 10 | import com.facebook.soloader.SoLoader; 11 | 12 | import java.util.Arrays; 13 | import java.util.List; 14 | 15 | public class MainApplication extends Application implements ReactApplication { 16 | 17 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 18 | @Override 19 | public boolean getUseDeveloperSupport() { 20 | return BuildConfig.DEBUG; 21 | } 22 | 23 | @Override 24 | protected List getPackages() { 25 | return Arrays.asList( 26 | new MainReactPackage(), 27 | new RNDeviceInfo() 28 | ); 29 | } 30 | }; 31 | 32 | @Override 33 | public ReactNativeHost getReactNativeHost() { 34 | return mReactNativeHost; 35 | } 36 | 37 | @Override 38 | public void onCreate() { 39 | super.onCreate(); 40 | SoLoader.init(this, /* native exopackage */ false); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | RockNative 3 | 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.2.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = 'debug', 3 | store = 'debug.keystore', 4 | properties = 'debug.keystore.properties', 5 | visibility = [ 6 | 'PUBLIC', 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'RockNative' 2 | include ':react-native-device-info' 3 | project(':react-native-device-info').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android') 4 | 5 | include ':app' 6 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](http://keepachangelog.com/) 6 | and this project adheres to [Semantic Versioning](http://semver.org/). 7 | 8 | ## [0.0.1] - UNRELEASED 9 | 10 | ### Added 11 | - initial repo management and project setup (@delianides) 12 | - windows universal app platform as build target (@jbaxleyiii) 13 | - setup graphql and server to be run on AWS Lambda + API Gateway (@jbaxleyiii) 14 | - intergrated apollo with SSR and client / native (@jbaxleyiii) 15 | 16 | ### Fixed 17 | - updating the changelog is a warning 18 | 19 | ### Changed 20 | - Updated the LICENSE file and the package.json to include the license. 21 | - Updated the README to include the link to the license file in the repo's wiki. 22 | - Tested base counter 23 | - remove .of operator from junction until more thought is given (@jbaxleyiii) 24 | -------------------------------------------------------------------------------- /flow-typed/npm/@jongold/further_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d4621d14991cc7b62f78b321cb0e2fb5 2 | // flow-typed version: <>/@jongold/further_v^1.0.3/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * '@jongold/further' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module '@jongold/further' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module '@jongold/further/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module '@jongold/further/lib/index.js' { 31 | declare module.exports: $Exports<'@jongold/further/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0f6d8bc0ff62b787d919aaed3e741a4b 2 | // flow-typed version: <>/babel-cli_v^6.24.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 24b3a8e92da7cc00dc06397f328fb5de 2 | // flow-typed version: <>/babel-eslint_v^6.1.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/babylon-to-espree/attachComments' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/babylon-to-espree/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/babylon-to-espree/toAST' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/babylon-to-espree/toToken' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/babylon-to-espree/toTokens' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-eslint/babylon-to-espree/attachComments.js' { 51 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; 52 | } 53 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { 54 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; 55 | } 56 | declare module 'babel-eslint/babylon-to-espree/index.js' { 57 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; 58 | } 59 | declare module 'babel-eslint/babylon-to-espree/toAST.js' { 60 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; 61 | } 62 | declare module 'babel-eslint/babylon-to-espree/toToken.js' { 63 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; 64 | } 65 | declare module 'babel-eslint/babylon-to-espree/toTokens.js' { 66 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; 67 | } 68 | declare module 'babel-eslint/index' { 69 | declare module.exports: $Exports<'babel-eslint'>; 70 | } 71 | declare module 'babel-eslint/index.js' { 72 | declare module.exports: $Exports<'babel-eslint'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-jest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b05f022782e4e8ce40d76adfcc64d8f0 2 | // flow-typed version: <>/babel-jest_v19.0.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-jest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-jest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-jest/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-jest/build/index.js' { 31 | declare module.exports: $Exports<'babel-jest/build/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7c372547e05fb925d41ea9b803a4568c 2 | // flow-typed version: <>/babel-loader_v^6.4.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-loader/lib/fs-cache' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-loader/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-loader/lib/resolve-rc' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-loader/lib/utils/exists' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-loader/lib/utils/read' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-loader/lib/utils/relative' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-loader/lib/fs-cache.js' { 51 | declare module.exports: $Exports<'babel-loader/lib/fs-cache'>; 52 | } 53 | declare module 'babel-loader/lib/index.js' { 54 | declare module.exports: $Exports<'babel-loader/lib/index'>; 55 | } 56 | declare module 'babel-loader/lib/resolve-rc.js' { 57 | declare module.exports: $Exports<'babel-loader/lib/resolve-rc'>; 58 | } 59 | declare module 'babel-loader/lib/utils/exists.js' { 60 | declare module.exports: $Exports<'babel-loader/lib/utils/exists'>; 61 | } 62 | declare module 'babel-loader/lib/utils/read.js' { 63 | declare module.exports: $Exports<'babel-loader/lib/utils/read'>; 64 | } 65 | declare module 'babel-loader/lib/utils/relative.js' { 66 | declare module.exports: $Exports<'babel-loader/lib/utils/relative'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-lodash_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7631bbcdafcdd3cc6f95e0201e574751 2 | // flow-typed version: <>/babel-plugin-lodash_v^3.2.11/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-lodash' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-lodash' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-lodash/lib/config' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-lodash/lib/importModule' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-plugin-lodash/lib/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-plugin-lodash/lib/Map' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-plugin-lodash/lib/MapCache' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-plugin-lodash/lib/mapping' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-plugin-lodash/lib/ModuleCache' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-plugin-lodash/lib/Package' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-plugin-lodash/lib/Store' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-plugin-lodash/lib/util' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'babel-plugin-lodash/lib/config.js' { 67 | declare module.exports: $Exports<'babel-plugin-lodash/lib/config'>; 68 | } 69 | declare module 'babel-plugin-lodash/lib/importModule.js' { 70 | declare module.exports: $Exports<'babel-plugin-lodash/lib/importModule'>; 71 | } 72 | declare module 'babel-plugin-lodash/lib/index.js' { 73 | declare module.exports: $Exports<'babel-plugin-lodash/lib/index'>; 74 | } 75 | declare module 'babel-plugin-lodash/lib/Map.js' { 76 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Map'>; 77 | } 78 | declare module 'babel-plugin-lodash/lib/MapCache.js' { 79 | declare module.exports: $Exports<'babel-plugin-lodash/lib/MapCache'>; 80 | } 81 | declare module 'babel-plugin-lodash/lib/mapping.js' { 82 | declare module.exports: $Exports<'babel-plugin-lodash/lib/mapping'>; 83 | } 84 | declare module 'babel-plugin-lodash/lib/ModuleCache.js' { 85 | declare module.exports: $Exports<'babel-plugin-lodash/lib/ModuleCache'>; 86 | } 87 | declare module 'babel-plugin-lodash/lib/Package.js' { 88 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Package'>; 89 | } 90 | declare module 'babel-plugin-lodash/lib/Store.js' { 91 | declare module.exports: $Exports<'babel-plugin-lodash/lib/Store'>; 92 | } 93 | declare module 'babel-plugin-lodash/lib/util.js' { 94 | declare module.exports: $Exports<'babel-plugin-lodash/lib/util'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-root-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2d55750a6b29225fb9204c65108fb6cf 2 | // flow-typed version: <>/babel-plugin-root-import_v^5.1.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-root-import' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-root-import' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-root-import/build/helper' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-root-import/build/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-root-import/build/helper.js' { 35 | declare module.exports: $Exports<'babel-plugin-root-import/build/helper'>; 36 | } 37 | declare module 'babel-plugin-root-import/build/index.js' { 38 | declare module.exports: $Exports<'babel-plugin-root-import/build/index'>; 39 | } 40 | declare module 'babel-plugin-root-import/index' { 41 | declare module.exports: $Exports<'babel-plugin-root-import'>; 42 | } 43 | declare module 'babel-plugin-root-import/index.js' { 44 | declare module.exports: $Exports<'babel-plugin-root-import'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-async-to-generator_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 58f5595cdf4313a5e0409df225b88ffc 2 | // flow-typed version: <>/babel-plugin-transform-async-to-generator_v^6.24.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-async-to-generator' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-async-to-generator' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-async-to-generator/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-async-to-generator/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-async-to-generator/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-class-properties_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 97b3b4751e727fbe7e70afdf3fd7ba88 2 | // flow-typed version: <>/babel-plugin-transform-class-properties_v^6.24.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-class-properties' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-class-properties' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-class-properties/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-class-properties/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-class-properties/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-flow-strip-types_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 147af63ef1970e66fe8225d36f3df862 2 | // flow-typed version: <>/babel-plugin-transform-flow-strip-types_v^6.22.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-flow-strip-types' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-flow-strip-types' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-flow-strip-types/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-flow-strip-types/lib/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-flow-strip-types/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-transform-react-require_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 248416be69b71c9a9a22c02921389a0b 2 | // flow-typed version: <>/babel-plugin-transform-react-require_v^1.0.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-transform-react-require' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-transform-react-require' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-transform-react-require/dist/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-plugin-transform-react-require/dist/index.js' { 31 | declare module.exports: $Exports<'babel-plugin-transform-react-require/dist/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a9e9e20159d0d70225af1414bce5657e 2 | // flow-typed version: <>/babel-preset-env_v^1.4.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-env/data/built-in-features' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-env/data/plugin-features' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-env/lib/default-includes' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-env/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-env/lib/module-transformations' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-env/lib/normalize-options' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'babel-preset-env/data/built-in-features.js' { 55 | declare module.exports: $Exports<'babel-preset-env/data/built-in-features'>; 56 | } 57 | declare module 'babel-preset-env/data/plugin-features.js' { 58 | declare module.exports: $Exports<'babel-preset-env/data/plugin-features'>; 59 | } 60 | declare module 'babel-preset-env/lib/default-includes.js' { 61 | declare module.exports: $Exports<'babel-preset-env/lib/default-includes'>; 62 | } 63 | declare module 'babel-preset-env/lib/index.js' { 64 | declare module.exports: $Exports<'babel-preset-env/lib/index'>; 65 | } 66 | declare module 'babel-preset-env/lib/module-transformations.js' { 67 | declare module.exports: $Exports<'babel-preset-env/lib/module-transformations'>; 68 | } 69 | declare module 'babel-preset-env/lib/normalize-options.js' { 70 | declare module.exports: $Exports<'babel-preset-env/lib/normalize-options'>; 71 | } 72 | declare module 'babel-preset-env/lib/transform-polyfill-require-plugin.js' { 73 | declare module.exports: $Exports<'babel-preset-env/lib/transform-polyfill-require-plugin'>; 74 | } 75 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-es2015_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f7e46bf77d2b98cacafa866f00a492a5 2 | // flow-typed version: <>/babel-preset-es2015_v^6.24.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-es2015' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-es2015' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-es2015/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-es2015/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-es2015/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react-native_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7a681077836866d42b4150b0a03b51d8 2 | // flow-typed version: <>/babel-preset-react-native_v1.9.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react-native' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react-native' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react-native/configs/hmr' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-preset-react-native/configs/internal' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-preset-react-native/configs/main' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-preset-react-native/lib/resolvePlugins' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-preset-react-native/plugins' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-preset-react-native/transforms/transform-symbol-member' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-preset-react-native/configs/hmr.js' { 51 | declare module.exports: $Exports<'babel-preset-react-native/configs/hmr'>; 52 | } 53 | declare module 'babel-preset-react-native/configs/internal.js' { 54 | declare module.exports: $Exports<'babel-preset-react-native/configs/internal'>; 55 | } 56 | declare module 'babel-preset-react-native/configs/main.js' { 57 | declare module.exports: $Exports<'babel-preset-react-native/configs/main'>; 58 | } 59 | declare module 'babel-preset-react-native/index' { 60 | declare module.exports: $Exports<'babel-preset-react-native'>; 61 | } 62 | declare module 'babel-preset-react-native/index.js' { 63 | declare module.exports: $Exports<'babel-preset-react-native'>; 64 | } 65 | declare module 'babel-preset-react-native/lib/resolvePlugins.js' { 66 | declare module.exports: $Exports<'babel-preset-react-native/lib/resolvePlugins'>; 67 | } 68 | declare module 'babel-preset-react-native/plugins.js' { 69 | declare module.exports: $Exports<'babel-preset-react-native/plugins'>; 70 | } 71 | declare module 'babel-preset-react-native/transforms/transform-symbol-member.js' { 72 | declare module.exports: $Exports<'babel-preset-react-native/transforms/transform-symbol-member'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 37b5c757e8232e26c7c69d79e973681b 2 | // flow-typed version: <>/babel-preset-react_v^6.23.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-react/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-react/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-react/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/chromedriver_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 37fe9761456ef6f450a51a8df8668dd4 2 | // flow-typed version: <>/chromedriver_v^2.29.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'chromedriver' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'chromedriver' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'chromedriver/install' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'chromedriver/lib/chromedriver' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'chromedriver/testInstall' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'chromedriver/install.js' { 39 | declare module.exports: $Exports<'chromedriver/install'>; 40 | } 41 | declare module 'chromedriver/lib/chromedriver.js' { 42 | declare module.exports: $Exports<'chromedriver/lib/chromedriver'>; 43 | } 44 | declare module 'chromedriver/testInstall.js' { 45 | declare module.exports: $Exports<'chromedriver/testInstall'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/concurrently_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 59c607fcdf234e233dd046ad7a93db08 2 | // flow-typed version: <>/concurrently_v^3.4.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'concurrently' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'concurrently' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'concurrently/src/main' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'concurrently/test/support/signal' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'concurrently/test/test-functional' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'concurrently/test/utils' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'concurrently/tst' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'concurrently/src/main.js' { 47 | declare module.exports: $Exports<'concurrently/src/main'>; 48 | } 49 | declare module 'concurrently/test/support/signal.js' { 50 | declare module.exports: $Exports<'concurrently/test/support/signal'>; 51 | } 52 | declare module 'concurrently/test/test-functional.js' { 53 | declare module.exports: $Exports<'concurrently/test/test-functional'>; 54 | } 55 | declare module 'concurrently/test/utils.js' { 56 | declare module.exports: $Exports<'concurrently/test/utils'>; 57 | } 58 | declare module 'concurrently/tst.js' { 59 | declare module.exports: $Exports<'concurrently/tst'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/cross-env_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2172acee9ecf6fbe4fd6aeae965c755c 2 | // flow-typed version: <>/cross-env_v^4.0.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'cross-env' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'cross-env' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'cross-env/dist/bin/cross-env' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'cross-env/dist/command' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'cross-env/dist/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'cross-env/dist/variable' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'cross-env/dist/bin/cross-env.js' { 43 | declare module.exports: $Exports<'cross-env/dist/bin/cross-env'>; 44 | } 45 | declare module 'cross-env/dist/command.js' { 46 | declare module.exports: $Exports<'cross-env/dist/command'>; 47 | } 48 | declare module 'cross-env/dist/index.js' { 49 | declare module.exports: $Exports<'cross-env/dist/index'>; 50 | } 51 | declare module 'cross-env/dist/variable.js' { 52 | declare module.exports: $Exports<'cross-env/dist/variable'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/enzyme-to-json_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a73684909908a8670d527002552db0cb 2 | // flow-typed version: <>/enzyme-to-json_v^1.5.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'enzyme-to-json' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'enzyme-to-json' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'enzyme-to-json/build/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'enzyme-to-json/build/mount' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'enzyme-to-json/build/render' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'enzyme-to-json/build/serializer' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'enzyme-to-json/build/shallow' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'enzyme-to-json/build/utils' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'enzyme-to-json/serializer' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'enzyme-to-json/build/index.js' { 55 | declare module.exports: $Exports<'enzyme-to-json/build/index'>; 56 | } 57 | declare module 'enzyme-to-json/build/mount.js' { 58 | declare module.exports: $Exports<'enzyme-to-json/build/mount'>; 59 | } 60 | declare module 'enzyme-to-json/build/render.js' { 61 | declare module.exports: $Exports<'enzyme-to-json/build/render'>; 62 | } 63 | declare module 'enzyme-to-json/build/serializer.js' { 64 | declare module.exports: $Exports<'enzyme-to-json/build/serializer'>; 65 | } 66 | declare module 'enzyme-to-json/build/shallow.js' { 67 | declare module.exports: $Exports<'enzyme-to-json/build/shallow'>; 68 | } 69 | declare module 'enzyme-to-json/build/utils.js' { 70 | declare module.exports: $Exports<'enzyme-to-json/build/utils'>; 71 | } 72 | declare module 'enzyme-to-json/serializer.js' { 73 | declare module.exports: $Exports<'enzyme-to-json/serializer'>; 74 | } 75 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7e9a4134d4a28a0589224d2194ed0ec2 2 | // flow-typed version: <>/eslint-loader_v^1.6.3/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-loader/index' { 29 | declare module.exports: $Exports<'eslint-loader'>; 30 | } 31 | declare module 'eslint-loader/index.js' { 32 | declare module.exports: $Exports<'eslint-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ec8713ed474bea85d1fafd2586b5ac71 2 | // flow-typed version: <>/eslint-plugin-prettier_v^2.0.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-prettier/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-prettier/lib/rules/prettier' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-prettier/tests/lib/rules/prettier' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'eslint-plugin-prettier/lib/index.js' { 39 | declare module.exports: $Exports<'eslint-plugin-prettier/lib/index'>; 40 | } 41 | declare module 'eslint-plugin-prettier/lib/rules/prettier.js' { 42 | declare module.exports: $Exports<'eslint-plugin-prettier/lib/rules/prettier'>; 43 | } 44 | declare module 'eslint-plugin-prettier/tests/lib/rules/prettier.js' { 45 | declare module.exports: $Exports<'eslint-plugin-prettier/tests/lib/rules/prettier'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-react-native_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7c26f7379198ab193144ea0cb1921d8b 2 | // flow-typed version: <>/eslint-plugin-react-native_v^2.3.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-react-native' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-react-native' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-react-native/lib/rules/no-color-literals' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-react-native/lib/rules/no-inline-styles' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-react-native/lib/rules/no-unused-styles' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-react-native/lib/rules/split-platform-components' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-react-native/lib/util/Components' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-react-native/lib/util/stylesheet' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-react-native/lib/util/variable' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'eslint-plugin-react-native/index' { 55 | declare module.exports: $Exports<'eslint-plugin-react-native'>; 56 | } 57 | declare module 'eslint-plugin-react-native/index.js' { 58 | declare module.exports: $Exports<'eslint-plugin-react-native'>; 59 | } 60 | declare module 'eslint-plugin-react-native/lib/rules/no-color-literals.js' { 61 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-color-literals'>; 62 | } 63 | declare module 'eslint-plugin-react-native/lib/rules/no-inline-styles.js' { 64 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-inline-styles'>; 65 | } 66 | declare module 'eslint-plugin-react-native/lib/rules/no-unused-styles.js' { 67 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/no-unused-styles'>; 68 | } 69 | declare module 'eslint-plugin-react-native/lib/rules/split-platform-components.js' { 70 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/rules/split-platform-components'>; 71 | } 72 | declare module 'eslint-plugin-react-native/lib/util/Components.js' { 73 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/Components'>; 74 | } 75 | declare module 'eslint-plugin-react-native/lib/util/stylesheet.js' { 76 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/stylesheet'>; 77 | } 78 | declare module 'eslint-plugin-react-native/lib/util/variable.js' { 79 | declare module.exports: $Exports<'eslint-plugin-react-native/lib/util/variable'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/fugazi_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5b31f832b3656d2ff7789647a7294614 2 | // flow-typed version: <>/fugazi_v^0.5.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'fugazi' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'fugazi' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'fugazi/index' { 29 | declare module.exports: $Exports<'fugazi'>; 30 | } 31 | declare module 'fugazi/index.js' { 32 | declare module.exports: $Exports<'fugazi'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/graphql-server-lambda_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 488a4e60cc8e8d9d09192a24e9d809c3 2 | // flow-typed version: <>/graphql-server-lambda_v^0.7.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'graphql-server-lambda' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'graphql-server-lambda' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'graphql-server-lambda/dist/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'graphql-server-lambda/dist/lambdaApollo' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'graphql-server-lambda/dist/index.js' { 35 | declare module.exports: $Exports<'graphql-server-lambda/dist/index'>; 36 | } 37 | declare module 'graphql-server-lambda/dist/lambdaApollo.js' { 38 | declare module.exports: $Exports<'graphql-server-lambda/dist/lambdaApollo'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/graphql-tag_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 36be9d00d5fd708329a7a52160e625a3 2 | // flow-typed version: <>/graphql-tag_v^2.0.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'graphql-tag' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'graphql-tag' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'graphql-tag/lib/graphql-tag.umd' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'graphql-tag/loader' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'graphql-tag/package/lib/graphql-tag.umd' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'graphql-tag/src/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'graphql-tag/lib/graphql-tag.umd.js' { 43 | declare module.exports: $Exports<'graphql-tag/lib/graphql-tag.umd'>; 44 | } 45 | declare module 'graphql-tag/loader.js' { 46 | declare module.exports: $Exports<'graphql-tag/loader'>; 47 | } 48 | declare module 'graphql-tag/package/lib/graphql-tag.umd.js' { 49 | declare module.exports: $Exports<'graphql-tag/package/lib/graphql-tag.umd'>; 50 | } 51 | declare module 'graphql-tag/src/index.js' { 52 | declare module.exports: $Exports<'graphql-tag/src/index'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/graphql-tools_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: eeb06759d8fc124ef111e8bb17f2b320 2 | // flow-typed version: <>/graphql-tools_v^0.11.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'graphql-tools' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'graphql-tools' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'graphql-tools/dist/autopublish' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'graphql-tools/dist/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'graphql-tools/dist/Interfaces' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'graphql-tools/dist/Logger' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'graphql-tools/dist/mock' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'graphql-tools/dist/schemaGenerator' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'graphql-tools/dist/autopublish.js' { 51 | declare module.exports: $Exports<'graphql-tools/dist/autopublish'>; 52 | } 53 | declare module 'graphql-tools/dist/index.js' { 54 | declare module.exports: $Exports<'graphql-tools/dist/index'>; 55 | } 56 | declare module 'graphql-tools/dist/Interfaces.js' { 57 | declare module.exports: $Exports<'graphql-tools/dist/Interfaces'>; 58 | } 59 | declare module 'graphql-tools/dist/Logger.js' { 60 | declare module.exports: $Exports<'graphql-tools/dist/Logger'>; 61 | } 62 | declare module 'graphql-tools/dist/mock.js' { 63 | declare module.exports: $Exports<'graphql-tools/dist/mock'>; 64 | } 65 | declare module 'graphql-tools/dist/schemaGenerator.js' { 66 | declare module.exports: $Exports<'graphql-tools/dist/schemaGenerator'>; 67 | } 68 | -------------------------------------------------------------------------------- /flow-typed/npm/html-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: f054d5c8e131390bece3b43f1da76f6f 2 | // flow-typed version: <>/html-webpack-plugin_v^2.28.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'html-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'html-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'html-webpack-plugin/lib/chunksorter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'html-webpack-plugin/lib/compiler' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'html-webpack-plugin/lib/errors' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'html-webpack-plugin/lib/loader' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'html-webpack-plugin/index' { 43 | declare module.exports: $Exports<'html-webpack-plugin'>; 44 | } 45 | declare module 'html-webpack-plugin/index.js' { 46 | declare module.exports: $Exports<'html-webpack-plugin'>; 47 | } 48 | declare module 'html-webpack-plugin/lib/chunksorter.js' { 49 | declare module.exports: $Exports<'html-webpack-plugin/lib/chunksorter'>; 50 | } 51 | declare module 'html-webpack-plugin/lib/compiler.js' { 52 | declare module.exports: $Exports<'html-webpack-plugin/lib/compiler'>; 53 | } 54 | declare module 'html-webpack-plugin/lib/errors.js' { 55 | declare module.exports: $Exports<'html-webpack-plugin/lib/errors'>; 56 | } 57 | declare module 'html-webpack-plugin/lib/loader.js' { 58 | declare module.exports: $Exports<'html-webpack-plugin/lib/loader'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/lambda-wrapper_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 2779019a92798ce083d5204d1dd6e4ba 2 | // flow-typed version: <>/lambda-wrapper_v^0.1.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'lambda-wrapper' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'lambda-wrapper' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'lambda-wrapper/lambdaWrapper-test' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'lambda-wrapper/test/test-wrapper' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'lambda-wrapper/index' { 35 | declare module.exports: $Exports<'lambda-wrapper'>; 36 | } 37 | declare module 'lambda-wrapper/index.js' { 38 | declare module.exports: $Exports<'lambda-wrapper'>; 39 | } 40 | declare module 'lambda-wrapper/lambdaWrapper-test.js' { 41 | declare module.exports: $Exports<'lambda-wrapper/lambdaWrapper-test'>; 42 | } 43 | declare module 'lambda-wrapper/test/test-wrapper.js' { 44 | declare module.exports: $Exports<'lambda-wrapper/test/test-wrapper'>; 45 | } 46 | -------------------------------------------------------------------------------- /flow-typed/npm/lint-staged_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 49a52169f7e577224a0ec55a5c76da39 2 | // flow-typed version: <>/lint-staged_v^3.4.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'lint-staged' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'lint-staged' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'lint-staged/src/findBin' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'lint-staged/src/generateTasks' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'lint-staged/src/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'lint-staged/src/runScript' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'lint-staged/test/__mocks__/execa' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'lint-staged/test/__mocks__/npm-which' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'lint-staged/test/findBin.spec' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'lint-staged/test/generateTasks.spec' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'lint-staged/test/runScript.spec' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'lint-staged/wallaby' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'lint-staged/index' { 67 | declare module.exports: $Exports<'lint-staged'>; 68 | } 69 | declare module 'lint-staged/index.js' { 70 | declare module.exports: $Exports<'lint-staged'>; 71 | } 72 | declare module 'lint-staged/src/findBin.js' { 73 | declare module.exports: $Exports<'lint-staged/src/findBin'>; 74 | } 75 | declare module 'lint-staged/src/generateTasks.js' { 76 | declare module.exports: $Exports<'lint-staged/src/generateTasks'>; 77 | } 78 | declare module 'lint-staged/src/index.js' { 79 | declare module.exports: $Exports<'lint-staged/src/index'>; 80 | } 81 | declare module 'lint-staged/src/runScript.js' { 82 | declare module.exports: $Exports<'lint-staged/src/runScript'>; 83 | } 84 | declare module 'lint-staged/test/__mocks__/execa.js' { 85 | declare module.exports: $Exports<'lint-staged/test/__mocks__/execa'>; 86 | } 87 | declare module 'lint-staged/test/__mocks__/npm-which.js' { 88 | declare module.exports: $Exports<'lint-staged/test/__mocks__/npm-which'>; 89 | } 90 | declare module 'lint-staged/test/findBin.spec.js' { 91 | declare module.exports: $Exports<'lint-staged/test/findBin.spec'>; 92 | } 93 | declare module 'lint-staged/test/generateTasks.spec.js' { 94 | declare module.exports: $Exports<'lint-staged/test/generateTasks.spec'>; 95 | } 96 | declare module 'lint-staged/test/runScript.spec.js' { 97 | declare module.exports: $Exports<'lint-staged/test/runScript.spec'>; 98 | } 99 | declare module 'lint-staged/wallaby.js' { 100 | declare module.exports: $Exports<'lint-staged/wallaby'>; 101 | } 102 | -------------------------------------------------------------------------------- /flow-typed/npm/pre-commit_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1c8ccacbc06cff265c2d720cd385df52 2 | // flow-typed version: <>/pre-commit_v^1.2.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'pre-commit' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'pre-commit' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'pre-commit/install' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'pre-commit/test' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'pre-commit/uninstall' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'pre-commit/index' { 39 | declare module.exports: $Exports<'pre-commit'>; 40 | } 41 | declare module 'pre-commit/index.js' { 42 | declare module.exports: $Exports<'pre-commit'>; 43 | } 44 | declare module 'pre-commit/install.js' { 45 | declare module.exports: $Exports<'pre-commit/install'>; 46 | } 47 | declare module 'pre-commit/test.js' { 48 | declare module.exports: $Exports<'pre-commit/test'>; 49 | } 50 | declare module 'pre-commit/uninstall.js' { 51 | declare module.exports: $Exports<'pre-commit/uninstall'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/react-addons-test-utils_v15.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 418080affa1bc580bffb4be69a4899be 2 | // flow-typed version: 41f45a7d8c/react-addons-test-utils_v15.x.x/flow_>=v0.23.x 3 | 4 | declare type ReactAddonTest$FunctionOrComponentClass = React$Component | Function; 5 | declare module 'react-addons-test-utils' { 6 | declare var Simulate: { 7 | [eventName: string]: (element: Element, eventData?: Object) => void; 8 | }; 9 | declare function renderIntoDocument(instance: React$Element): React$Component; 10 | declare function mockComponent(componentClass: ReactAddonTest$FunctionOrComponentClass, mockTagName?: string): Object; 11 | declare function isElement(element: React$Element): boolean; 12 | declare function isElementOfType(element: React$Element, componentClass: ReactAddonTest$FunctionOrComponentClass): boolean; 13 | declare function isDOMComponent(instance: React$Component): boolean; 14 | declare function isCompositeComponent(instance: React$Component): boolean; 15 | declare function isCompositeComponentWithType(instance: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): boolean; 16 | declare function findAllInRenderedTree(tree: React$Component, test: (child: React$Component) => boolean): Array>; 17 | declare function scryRenderedDOMComponentsWithClass(tree: React$Component, className: string): Array; 18 | declare function findRenderedDOMComponentWithClass(tree: React$Component, className: string): ?Element; 19 | declare function scryRenderedDOMComponentsWithTag(tree: React$Component, tagName: string): Array; 20 | declare function findRenderedDOMComponentWithTag(tree: React$Component, tagName: string): ?Element; 21 | declare function scryRenderedComponentsWithType(tree: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): Array>; 22 | declare function findRenderedComponentWithType(tree: React$Component, componentClass: ReactAddonTest$FunctionOrComponentClass): ?React$Component; 23 | declare class ReactShallowRender { 24 | render(element: React$Element): void; 25 | getRenderOutput(): React$Element; 26 | } 27 | declare function createRenderer(): ReactShallowRender; 28 | } 29 | -------------------------------------------------------------------------------- /flow-typed/npm/react-apollo_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 54f61fa16c45bb1b366cbbbebe068a71 2 | // flow-typed version: <>/react-apollo_v^1.1.1/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-apollo' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-apollo' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-apollo/dist/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-apollo/dist/index.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-apollo/lib/ApolloProvider' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-apollo/lib/browser' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-apollo/lib/graphql' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-apollo/lib/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-apollo/lib/parser' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-apollo/lib/server' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-apollo/lib/shallowEqual' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-apollo/lib/test-utils' { 62 | declare module.exports: any; 63 | } 64 | 65 | // Filename aliases 66 | declare module 'react-apollo/dist/index.js' { 67 | declare module.exports: $Exports<'react-apollo/dist/index'>; 68 | } 69 | declare module 'react-apollo/dist/index.min.js' { 70 | declare module.exports: $Exports<'react-apollo/dist/index.min'>; 71 | } 72 | declare module 'react-apollo/lib/ApolloProvider.js' { 73 | declare module.exports: $Exports<'react-apollo/lib/ApolloProvider'>; 74 | } 75 | declare module 'react-apollo/lib/browser.js' { 76 | declare module.exports: $Exports<'react-apollo/lib/browser'>; 77 | } 78 | declare module 'react-apollo/lib/graphql.js' { 79 | declare module.exports: $Exports<'react-apollo/lib/graphql'>; 80 | } 81 | declare module 'react-apollo/lib/index.js' { 82 | declare module.exports: $Exports<'react-apollo/lib/index'>; 83 | } 84 | declare module 'react-apollo/lib/parser.js' { 85 | declare module.exports: $Exports<'react-apollo/lib/parser'>; 86 | } 87 | declare module 'react-apollo/lib/server.js' { 88 | declare module.exports: $Exports<'react-apollo/lib/server'>; 89 | } 90 | declare module 'react-apollo/lib/shallowEqual.js' { 91 | declare module.exports: $Exports<'react-apollo/lib/shallowEqual'>; 92 | } 93 | declare module 'react-apollo/lib/test-utils.js' { 94 | declare module.exports: $Exports<'react-apollo/lib/test-utils'>; 95 | } 96 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-native_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e7a824f2288c8af8e1527ab21ee67d47 2 | // flow-typed version: 53afdde167/react-router-native_v4.x.x/flow_>=v0.38.x 3 | 4 | declare module 'react-router-native' { 5 | declare export type GetUserConfirmation = 6 | (message: string, callback: (confirmed: boolean) => void) => void 7 | 8 | declare type LocationShape = { 9 | pathname?: string, 10 | search?: string, 11 | hash?: string, 12 | state?: any, 13 | } 14 | 15 | declare export class NativeRouter extends React$Component { 16 | props: { 17 | getUserConfirmation?: GetUserConfirmation, 18 | keyLength?: number, 19 | children?: React$Element<*>, 20 | } 21 | } 22 | 23 | declare export class Link extends React$Component { 24 | props: { 25 | to: string | LocationShape, 26 | replace?: boolean, 27 | children?: React$Element<*>, 28 | } 29 | } 30 | 31 | declare export class DeepLinking extends React$Component {} 32 | 33 | declare export class AndroidBackButton extends React$Component {} 34 | } 35 | -------------------------------------------------------------------------------- /flow-typed/npm/rnpm-plugin-windows_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b4767a268db6ef8226050deba635eb64 2 | // flow-typed version: <>/rnpm-plugin-windows_v^0.2.4/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rnpm-plugin-windows' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'rnpm-plugin-windows' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'rnpm-plugin-windows/src/common' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rnpm-plugin-windows/src/windows' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'rnpm-plugin-windows/src/wpf' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'rnpm-plugin-windows/index' { 39 | declare module.exports: $Exports<'rnpm-plugin-windows'>; 40 | } 41 | declare module 'rnpm-plugin-windows/index.js' { 42 | declare module.exports: $Exports<'rnpm-plugin-windows'>; 43 | } 44 | declare module 'rnpm-plugin-windows/src/common.js' { 45 | declare module.exports: $Exports<'rnpm-plugin-windows/src/common'>; 46 | } 47 | declare module 'rnpm-plugin-windows/src/windows.js' { 48 | declare module.exports: $Exports<'rnpm-plugin-windows/src/windows'>; 49 | } 50 | declare module 'rnpm-plugin-windows/src/wpf.js' { 51 | declare module.exports: $Exports<'rnpm-plugin-windows/src/wpf'>; 52 | } 53 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-assets-manifest_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 542aa44931416edcaa3b53870ac06b54 2 | // flow-typed version: <>/webpack-assets-manifest_v^0.6.2/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-assets-manifest' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-assets-manifest' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-assets-manifest/src/CompilationAsset' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-assets-manifest/src/WebpackAssetsManifest' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-assets-manifest/test/CompilationAsset-test' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-assets-manifest/test/fixtures/client' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-assets-manifest/test/fixtures/configs' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-assets-manifest/test/fixtures/hello' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-assets-manifest/test/fixtures/makeCompiler' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-assets-manifest/test/fixtures/server' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-assets-manifest/test/WebpackAssetsManifest-test' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'webpack-assets-manifest/src/CompilationAsset.js' { 63 | declare module.exports: $Exports<'webpack-assets-manifest/src/CompilationAsset'>; 64 | } 65 | declare module 'webpack-assets-manifest/src/WebpackAssetsManifest.js' { 66 | declare module.exports: $Exports<'webpack-assets-manifest/src/WebpackAssetsManifest'>; 67 | } 68 | declare module 'webpack-assets-manifest/test/CompilationAsset-test.js' { 69 | declare module.exports: $Exports<'webpack-assets-manifest/test/CompilationAsset-test'>; 70 | } 71 | declare module 'webpack-assets-manifest/test/fixtures/client.js' { 72 | declare module.exports: $Exports<'webpack-assets-manifest/test/fixtures/client'>; 73 | } 74 | declare module 'webpack-assets-manifest/test/fixtures/configs.js' { 75 | declare module.exports: $Exports<'webpack-assets-manifest/test/fixtures/configs'>; 76 | } 77 | declare module 'webpack-assets-manifest/test/fixtures/hello.js' { 78 | declare module.exports: $Exports<'webpack-assets-manifest/test/fixtures/hello'>; 79 | } 80 | declare module 'webpack-assets-manifest/test/fixtures/makeCompiler.js' { 81 | declare module.exports: $Exports<'webpack-assets-manifest/test/fixtures/makeCompiler'>; 82 | } 83 | declare module 'webpack-assets-manifest/test/fixtures/server.js' { 84 | declare module.exports: $Exports<'webpack-assets-manifest/test/fixtures/server'>; 85 | } 86 | declare module 'webpack-assets-manifest/test/WebpackAssetsManifest-test.js' { 87 | declare module.exports: $Exports<'webpack-assets-manifest/test/WebpackAssetsManifest-test'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-merge_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 20b25fe7d13965b2ee98297d6e05f7ab 2 | // flow-typed version: <>/webpack-merge_v^4.1.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-merge' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-merge' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-merge/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-merge/lib/join-arrays-smart' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-merge/lib/join-arrays' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-merge/lib/unique' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-merge/lib/unite-rules' { 42 | declare module.exports: any; 43 | } 44 | 45 | // Filename aliases 46 | declare module 'webpack-merge/lib/index.js' { 47 | declare module.exports: $Exports<'webpack-merge/lib/index'>; 48 | } 49 | declare module 'webpack-merge/lib/join-arrays-smart.js' { 50 | declare module.exports: $Exports<'webpack-merge/lib/join-arrays-smart'>; 51 | } 52 | declare module 'webpack-merge/lib/join-arrays.js' { 53 | declare module.exports: $Exports<'webpack-merge/lib/join-arrays'>; 54 | } 55 | declare module 'webpack-merge/lib/unique.js' { 56 | declare module.exports: $Exports<'webpack-merge/lib/unique'>; 57 | } 58 | declare module 'webpack-merge/lib/unite-rules.js' { 59 | declare module.exports: $Exports<'webpack-merge/lib/unite-rules'>; 60 | } 61 | -------------------------------------------------------------------------------- /flow-typed/npm/zip-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 4036fcfe1b8e088e6e98b55f94e896b3 2 | // flow-typed version: <>/zip-webpack-plugin_v^1.1.0/flow_v0.38.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'zip-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'zip-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'zip-webpack-plugin/index' { 29 | declare module.exports: $Exports<'zip-webpack-plugin'>; 30 | } 31 | declare module 'zip-webpack-plugin/index.js' { 32 | declare module.exports: $Exports<'zip-webpack-plugin'>; 33 | } 34 | -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { AppRegistry } from "react-native"; 3 | import { NativeRouter } from "react-router-native"; 4 | import { ApolloClient, ApolloProvider as Provider } from "react-apollo"; 5 | 6 | import createNetworkInterface from "./src/data/graphql/networkInterface"; 7 | import RockNative from "./src"; 8 | 9 | const client = new ApolloClient({ 10 | networkInterface: createNetworkInterface(), 11 | }); 12 | 13 | const App = () => ( 14 | 15 | 16 | 17 | 18 | 19 | ); 20 | 21 | AppRegistry.registerComponent("RockNative", () => App); 22 | -------------------------------------------------------------------------------- /index.browser.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { render } from "react-dom"; 3 | import { BrowserRouter } from "react-router-dom"; 4 | import { ApolloClient, ApolloProvider as Provider } from "react-apollo"; 5 | 6 | import createNetworkInterface from "./src/data/graphql/networkInterface"; 7 | 8 | import RockNative from "./src"; 9 | 10 | // offline support 11 | if (process.env.NODE_ENV === "production") { 12 | require("offline-plugin/runtime").install(); 13 | } 14 | 15 | const withHeader = { 16 | applyBatchMiddleware(request, next) { 17 | if (!request.options.headers) { 18 | if (fetch.Headers) { 19 | request.options.headers = new fetch.Headers(); 20 | } else { 21 | request.options.headers = new Headers(); 22 | } 23 | } 24 | next(); 25 | }, 26 | }; 27 | const identifierMiddleware = { 28 | applyBatchMiddleware(req, next) { 29 | // req.headers.platform = "WEB"; 30 | // req.headers.version = "1.2.0"; // ENV variables 31 | next(); 32 | }, 33 | }; 34 | 35 | const start = Component => { 36 | const networkInterface = createNetworkInterface().use([ 37 | withHeader, 38 | identifierMiddleware /*, withUser */, 39 | ]); 40 | 41 | const client = new ApolloClient({ 42 | networkInterface, 43 | connectToDevTools: process.env.NODE_ENV !== "production", 44 | initialState: window.__APOLLO_STATE__ || {}, 45 | }); 46 | render( 47 | 48 | 49 | 50 | 51 | , 52 | document.getElementById("rock-native"), 53 | ); 54 | }; 55 | 56 | start(RockNative); 57 | 58 | // Hot Module Replacement API 59 | if (process.env.NODE_ENV !== "production" && module.hot) { 60 | // $FlowIgnore 61 | module.hot.accept("./src", () => { 62 | const newRockNative = require("./src").default; 63 | start(newRockNative); 64 | }); 65 | } 66 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { AppRegistry } from "react-native"; 3 | import { NativeRouter } from "react-router-native"; 4 | import { ApolloClient, ApolloProvider as Provider } from "react-apollo"; 5 | 6 | import createNetworkInterface from "./src/data/graphql/networkInterface"; 7 | import RockNative from "./src"; 8 | 9 | const client = new ApolloClient({ 10 | networkInterface: createNetworkInterface(), 11 | }); 12 | 13 | const App = () => ( 14 | 15 | 16 | 17 | 18 | 19 | ); 20 | 21 | AppRegistry.registerComponent("RockNative", () => App); 22 | -------------------------------------------------------------------------------- /index.server.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import render from "./src/runtime/ssr"; 3 | import { 4 | graphqlEndpoint as graphql, 5 | graphiqlEndpoint as graphiql, 6 | } from "./src/runtime/graphql"; 7 | 8 | // load the app 9 | import RockNative from "./src"; 10 | 11 | // load the manifests 12 | // $FlowIgnore 13 | import client from "./web/dist/manifests/client.json"; 14 | // $FlowIgnore 15 | import vendor from "./web/dist/manifests/vendor.json"; 16 | 17 | export const ssr = render(RockNative, { manifests: { client, vendor } }); 18 | export { graphql, graphiql }; 19 | -------------------------------------------------------------------------------- /index.windows.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { AppRegistry } from "react-native"; 3 | // import { NativeRouter } from "native-router"; 4 | import { ApolloClient, ApolloProvider as Provider } from "react-apollo"; 5 | 6 | import createNetworkInterface from "./src/data/graphql/networkInterface"; 7 | import RockNative from "./src"; 8 | 9 | const client = new ApolloClient({ 10 | networkInterface: createNetworkInterface(), 11 | }); 12 | 13 | // XXX need to add windows support for react-native :( 14 | const App = () => ( 15 | 16 | 17 | 18 | ); 19 | 20 | AppRegistry.registerComponent("RockNative", () => App); 21 | -------------------------------------------------------------------------------- /ios/RockNative-tvOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UIViewControllerBasedStatusBarAppearance 38 | 39 | NSLocationWhenInUseUsageDescription 40 | 41 | NSAppTransportSecurity 42 | 43 | 44 | NSExceptionDomains 45 | 46 | localhost 47 | 48 | NSExceptionAllowsInsecureHTTPLoads 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /ios/RockNative-tvOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/RockNative/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/RockNative/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import 13 | #import 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"RockNative" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/RockNative/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/RockNative/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | RockNative 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | NSLocationWhenInUseUsageDescription 42 | 43 | NSAppTransportSecurity 44 | 45 | 46 | NSExceptionDomains 47 | 48 | localhost 49 | 50 | NSExceptionAllowsInsecureHTTPLoads 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /ios/RockNative/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/RockNativeTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/RockNativeTests/RockNativeTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import 14 | #import 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface RockNativeTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation RockNativeTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /src/__tests__/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`App entry point should render the components 1`] = ` 4 | 7 | `; 8 | -------------------------------------------------------------------------------- /src/__tests__/e2e/firstTest.spec.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /* 4 | * 5 | * 6 | * The following would look something like what we'd need for jest 7 | * see https://github.com/wix/detox/issues/143 8 | * 9 | import detox from "detox"; 10 | const config = require("../package.json").detox; 11 | 12 | beforeAll(async () => { 13 | await detox.init(config); 14 | }); 15 | 16 | afterAll(async () => { 17 | await detox.cleanup(); 18 | }); 19 | */ 20 | 21 | describe("Rock Native End-to-End", () => { 22 | beforeEach(async () => { 23 | await device.reloadReactNative(); 24 | }); 25 | 26 | it('should say hello world', async () => { 27 | await expect(element(by.id('mainZone').withDescendant(by.text("Hello World")))).toExist(); 28 | }); 29 | 30 | it('should tap increment', async () => { 31 | await element(by.id('increment')).multiTap(2); 32 | await expect(element(by.id("counterOutput"))).toHaveText("Counter is at 2 on ios"); 33 | }); 34 | 35 | it('should tap decrement', async () => { 36 | await element(by.id('decrement')).multiTap(3); 37 | await expect(element(by.id("counterOutput"))).toHaveText("Counter is at -3 on ios"); 38 | }); 39 | }) 40 | -------------------------------------------------------------------------------- /src/__tests__/e2e/init.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | require("babel-polyfill"); 4 | const detox = require("detox"); 5 | const config = require("../../../package.json").detox; 6 | 7 | before(async () => { 8 | await detox.init(config); 9 | }); 10 | 11 | after(async () => { 12 | await detox.cleanup(); 13 | }); 14 | -------------------------------------------------------------------------------- /src/__tests__/e2e/mocha.opts: -------------------------------------------------------------------------------- 1 | --recursive --timeout 120000 --bail -------------------------------------------------------------------------------- /src/__tests__/index.integration.js: -------------------------------------------------------------------------------- 1 | import Driver from "../test-utils/WebDriver"; 2 | 3 | const { By } = Driver.utils; 4 | const driver = Driver.create(); 5 | 6 | describe("counter", () => { 7 | beforeEach(() => { 8 | driver.get("http://localhost:3000"); 9 | }); 10 | afterAll(() => { 11 | driver.quit(); 12 | }); 13 | 14 | it("should load page", async () => { 15 | const title = await driver.getTitle(); 16 | expect(title).toEqual("Awesome counter app"); 17 | }); 18 | 19 | it("has data from the server", async () => { 20 | const elements = await driver.findElements(By.tagName("h4")); 21 | const text = await elements[0].getText(); 22 | expect(text).toEqual("GraphQL returned hello world with a response of 200"); 23 | }); 24 | 25 | it("finds buttons", async () => { 26 | const elements = await driver.findElements(By.tagName("button")); 27 | expect(elements.length).toEqual(2); 28 | }); 29 | 30 | it("should find total count", async () => { 31 | const elements = await driver.findElements(By.tagName("span")); 32 | const text = await elements[0].getText(); 33 | expect(text).toContain("0"); 34 | }); 35 | 36 | it("should identify platform web", async () => { 37 | const elements = await driver.findElements(By.tagName("span")); 38 | const text = await elements[0].getText(); 39 | expect(text).toContain("web"); 40 | }); 41 | 42 | it("should increment with click on increment button", async () => { 43 | const [increment] = await driver.findElements(By.tagName("button")); 44 | 45 | increment.click(); 46 | 47 | const [count] = await driver.findElements(By.tagName("span")); 48 | const text = await count.getText(); 49 | expect(text).toContain("1"); 50 | }); 51 | 52 | it("should decrement with click on decrement button", async () => { 53 | const els = await driver.findElements(By.tagName("button")); 54 | const decrement = els[1]; 55 | 56 | decrement.click(); 57 | 58 | const [count] = await driver.findElements(By.tagName("span")); 59 | const text = await count.getText(); 60 | expect(text).toContain("-1"); 61 | }); 62 | 63 | it("should allow to be decremented to negative values", async () => { 64 | const els = await driver.findElements(By.tagName("button")); 65 | 66 | const decrement = els[1]; 67 | 68 | decrement.click(); 69 | decrement.click(); 70 | 71 | const [count] = await driver.findElements(By.tagName("span")); 72 | const text = await count.getText(); 73 | expect(text).toContain("-2"); 74 | }); 75 | 76 | it("should follow multiple interactions", async () => { 77 | const [up, down] = await driver.findElements(By.tagName("button")); 78 | 79 | down.click(); 80 | down.click(); 81 | up.click(); 82 | up.click(); 83 | down.click(); 84 | up.click(); 85 | up.click(); 86 | down.click(); 87 | up.click(); 88 | up.click(); 89 | 90 | const [count] = await driver.findElements(By.tagName("span")); 91 | const text = await count.getText(); 92 | expect(text).toContain("2"); 93 | }); 94 | }); 95 | -------------------------------------------------------------------------------- /src/blocks/Counter/__tests__/__snapshots__/counter.web.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`loading state 1`] = ` 4 |
11 |

12 | loading... 13 |

14 | 15 | Counter is at 16 | 1 17 | on web 18 | 19 |
20 | 25 | 30 |
31 | `; 32 | 33 | exports[`shows a counter count on web 1`] = ` 34 |
41 | 42 | Counter is at 43 | 1 44 | on web 45 | 46 |
47 | 52 | 57 |
58 | `; 59 | 60 | exports[`shows data from the server 1`] = ` 61 |
68 |

69 | GraphQL returned 70 | hello world 71 | with a response of 72 | 200 73 |

74 | 75 | Counter is at 76 | 1 77 | on web 78 | 79 |
80 | 85 | 90 |
91 | `; 92 | -------------------------------------------------------------------------------- /src/blocks/Counter/__tests__/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`counter should load page 1`] = ` 4 | 12 | 18 | Counter is at 19 | 0 20 | on 21 | ios 22 | 23 | 26 | 27 | 28 | ); 29 | 30 | export default Counter; 31 | -------------------------------------------------------------------------------- /src/blocks/Counter/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { withState, withHandlers } from "recompose"; 3 | import Style from "@jongold/further"; 4 | import { graphql } from "react-apollo"; 5 | import gql from "graphql-tag"; 6 | 7 | import Junction from "../../junction"; 8 | import Counter from "./counter"; 9 | 10 | type IWithSampleData = { 11 | loading: boolean, 12 | sample?: { 13 | code: number, 14 | message: string, 15 | }, 16 | }; 17 | 18 | export const SAMPLE_QUERY = gql`{ sample { code message } }`; 19 | export const sampleDataPropsReducer = ({ 20 | data, 21 | }: { 22 | data: IWithSampleData, 23 | }): IWithSampleData => ({ ...data }); 24 | // XXX lets make awesome flow typings for this 25 | export const withSampleData = graphql(SAMPLE_QUERY, { 26 | props: sampleDataPropsReducer, 27 | }); 28 | 29 | type IWithState = { 30 | counter: number, 31 | setCounter: Function, 32 | }; 33 | 34 | export const state = withState( 35 | "counter", // state name 36 | "setCounter", // updater name 37 | ({ defaultValue }) => defaultValue || 0, // default 38 | ); 39 | 40 | export type IWithHandlers = { 41 | increment: Function, 42 | decrement: Function, 43 | } & IWithState; 44 | 45 | export const actions = withHandlers({ 46 | increment: ({ setCounter }) => () => setCounter(n => n + 1), 47 | decrement: ({ setCounter }) => () => setCounter(n => n - 1), 48 | }); 49 | 50 | export const counterStyle = Style.of({ 51 | flex: 1, 52 | }); 53 | 54 | export type ICounter = IWithSampleData & IWithHandlers; 55 | 56 | // XXX also how can we make flow typing this killer? 57 | // ideally each HOC would pass its prop types which would combine 58 | export default Junction() 59 | .with(withSampleData) 60 | .with(state) 61 | .with(actions) 62 | .render(Counter); 63 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/__snapshots__/helloWorld.native.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Hello World Native should render the Hello World component for native 1`] = ` 4 | 19 | Hello World 20 | 21 | `; 22 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/__snapshots__/helloWorld.web.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Hello World Web should render the Hello World component for web 1`] = ` 4 |

15 | Hello World 16 |

17 | `; 18 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Hello World should render Hello World component 1`] = ` 4 | 19 | Hello World 20 | 21 | `; 22 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/helloWorld.native.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import HelloWorld from "../helloWorld.native.js"; 4 | 5 | const generateComponent = additionalProps => ( 6 | 7 | ); 8 | 9 | describe("Hello World Native", () => { 10 | it("should render the Hello World component for native", () => { 11 | const tree = shallow(generateComponent()); 12 | expect(tree).toBeDefined(); 13 | expect(shallowToJson(tree)).toMatchSnapshot(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/helloWorld.web.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import HelloWorld from "../helloWorld.web.js"; 4 | 5 | const generateComponent = additionalProps => ( 6 | 7 | ); 8 | 9 | describe("Hello World Web", () => { 10 | it("should render the Hello World component for web", () => { 11 | const tree = shallow(generateComponent()); 12 | expect(tree).toBeDefined(); 13 | expect(shallowToJson(tree)).toMatchSnapshot(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import HelloWorld, { helloStyle } from "../"; 4 | 5 | const generateComponent = additionalProps => ( 6 | 7 | ); 8 | 9 | describe("Hello Style", () => { 10 | it("should resolve to object and match styles", () => { 11 | expect(typeof helloStyle.resolve()).toBe("object"); 12 | expect(helloStyle.resolve()).toEqual({ 13 | flex: 1, 14 | marginTop: 16, 15 | paddingTop: 32, 16 | justifyContent: "center", 17 | alignItems: "center", 18 | }); 19 | }); 20 | }); 21 | 22 | describe("Hello World", () => { 23 | it("should render Hello World component", () => { 24 | const tree = shallow(generateComponent()); 25 | expect(tree).toBeDefined(); 26 | expect(shallowToJson(tree)).toMatchSnapshot(); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/helloWorld.native.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { Text } from "react-native"; 3 | import { helloStyle } from "./"; 4 | 5 | export const HelloWorld = () => ( 6 | Hello World 7 | ); 8 | HelloWorld.displayName = "HelloWorld"; 9 | 10 | export default HelloWorld; 11 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/helloWorld.web.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { helloStyle } from "./"; 3 | 4 | export const HelloWorld = () => ( 5 |

Hello World

6 | ); 7 | 8 | export default HelloWorld; 9 | -------------------------------------------------------------------------------- /src/blocks/HelloWorld/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Style from "@jongold/further"; 4 | import HelloWorld from "./helloWorld"; 5 | 6 | export const helloStyle = Style.of({ 7 | flex: 1, 8 | marginTop: 16, 9 | paddingTop: 32, 10 | justifyContent: "center", 11 | alignItems: "center", 12 | }); 13 | 14 | export default HelloWorld; 15 | -------------------------------------------------------------------------------- /src/data/graphql/__tests__/__snapshots__/index.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`typeDefs should match a snapshot 1`] = ` 4 | " 5 | type Response { 6 | code: Int! 7 | message: String 8 | } 9 | 10 | type Page { 11 | id: Int! 12 | layout: String! 13 | blocks: [Block] 14 | } 15 | 16 | type Block { 17 | id: Int! 18 | path: String! 19 | zone: String!, 20 | order: Int!, 21 | } 22 | 23 | # the schema allows the following query: 24 | type Query { 25 | sample: Response 26 | getRouteInfo(path: String!): Page 27 | } 28 | 29 | schema { 30 | query: Query 31 | } 32 | " 33 | `; 34 | -------------------------------------------------------------------------------- /src/data/graphql/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import { typeDefs, resolvers, graphql } from "../"; 2 | 3 | describe("typeDefs", () => { 4 | it("should match a snapshot", () => { 5 | expect(typeDefs).toMatchSnapshot(); 6 | }); 7 | }); 8 | 9 | describe("resolvers", () => { 10 | const { Query, Response, Page, Block } = resolvers; 11 | 12 | describe("Query", () => { 13 | const { sample } = Query; 14 | it("has an expected shape", () => { 15 | expect(sample()).toEqual({ code: 200, message: "hello world" }); 16 | }); 17 | }); 18 | 19 | describe("getRouteInfo", () => { 20 | const { getRouteInfo } = Query; 21 | 22 | it("has resolve", () => { 23 | expect(getRouteInfo).toBeDefined(); 24 | }); 25 | 26 | it("returns a sample registry if path is root", () => { 27 | expect(getRouteInfo(null, { path: "/" })).toEqual({ 28 | id: 1, 29 | layout: "Horizontal", 30 | blocks: [ 31 | { id: 3, order: 1, zone: "main", path: "HelloWorld" }, 32 | { id: 2, order: 1, zone: "secondary", path: "HelloWorld" }, 33 | { id: 1, order: 0, zone: "secondary", path: "Counter" }, 34 | ], 35 | }); 36 | }); 37 | }); 38 | 39 | describe("Response", () => { 40 | const data = Query.sample(); 41 | const { code, message } = Response; 42 | it("has a code method", () => { 43 | expect(code(data)).toEqual(200); 44 | }); 45 | it("has a message method", () => { 46 | expect(message(data)).toEqual("hello world"); 47 | }); 48 | }); 49 | 50 | describe("Page", () => { 51 | const { id, blocks, layout } = Page; 52 | it("has an id method", () => { 53 | expect(id({ id: 5 })).toEqual(5); 54 | }); 55 | it("has a layout method", () => { 56 | expect(layout({ layout: "foo" })).toEqual("foo"); 57 | }); 58 | it("has a blocks method", () => { 59 | expect(blocks({ blocks: [{ id: 1 }, { id: 2 }] })).toEqual([ 60 | { id: 1 }, 61 | { id: 2 }, 62 | ]); 63 | }); 64 | }); 65 | 66 | describe("Block", () => { 67 | const { id, path, zone, order } = Block; 68 | it("has an id method", () => { 69 | expect(id({ id: 1 })).toEqual(1); 70 | }); 71 | it("has a zone method", () => { 72 | expect(zone({ zone: "main" })).toEqual("main"); 73 | }); 74 | it("has an order method", () => { 75 | expect(order({ order: 1 })).toEqual(1); 76 | }); 77 | it("has a path method", () => { 78 | expect(path({ path: "Hello" })).toEqual("Hello"); 79 | }); 80 | }); 81 | }); 82 | 83 | describe("graphql", () => { 84 | it("has a sample root level query field", async () => { 85 | const { data } = await graphql("{ sample { code message } }"); 86 | expect(data).toEqual({ sample: { code: 200, message: "hello world" } }); 87 | }); 88 | }); 89 | 90 | describe("getRouteInfo", () => { 91 | it("exists", () => {}); 92 | }); 93 | -------------------------------------------------------------------------------- /src/data/graphql/__tests__/networkInterface.js: -------------------------------------------------------------------------------- 1 | import createNetworkInterface from "../networkInterface"; 2 | 3 | jest.mock("react-native-device-info", () => ({ 4 | getBundleId: () => "com.wow", 5 | getVersion: () => "1.2.3", 6 | })); 7 | 8 | it("should have the uri included", () => { 9 | const networkInterface = createNetworkInterface(); 10 | expect(networkInterface._uri).toEqual("http://localhost:3000/graphql"); 11 | }); 12 | 13 | it("should have have a batchInterval of 10 ms", () => { 14 | const networkInterface = createNetworkInterface(); 15 | expect(networkInterface.batcher.batchInterval).toEqual(10); 16 | }); 17 | 18 | describe("middleware", () => { 19 | it("has batchMiddleware", () => { 20 | const networkInterface = createNetworkInterface(); 21 | expect(networkInterface._middlewares[0].applyBatchMiddleware).toBeDefined(); 22 | }); 23 | 24 | it("adds headers to request", () => { 25 | const networkInterface = createNetworkInterface(); 26 | const middleware = networkInterface._middlewares[0].applyBatchMiddleware; 27 | const options = {}; 28 | middleware({ options }, jest.fn()); 29 | expect(options).toEqual({ 30 | headers: { clientId: "com.wow_ios", version: "1.2.3" }, 31 | }); 32 | }); 33 | it("modifies existing headers", () => { 34 | const networkInterface = createNetworkInterface(); 35 | const middleware = networkInterface._middlewares[0].applyBatchMiddleware; 36 | const options = { headers: { foo: "bar" } }; 37 | middleware({ options }, jest.fn()); 38 | expect(options).toEqual({ 39 | headers: { clientId: "com.wow_ios", version: "1.2.3", foo: "bar" }, 40 | }); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /src/data/graphql/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { graphql as graphqljs } from "graphql"; 3 | import { makeExecutableSchema } from "graphql-tools"; 4 | import { print } from "graphql/language/printer"; 5 | import type { ExecutionResult, DocumentNode } from "graphql"; 6 | 7 | export const typeDefs = ` 8 | type Response { 9 | code: Int! 10 | message: String 11 | } 12 | 13 | type Page { 14 | id: Int! 15 | layout: String! 16 | blocks: [Block] 17 | } 18 | 19 | type Block { 20 | id: Int! 21 | path: String! 22 | zone: String!, 23 | order: Int!, 24 | } 25 | 26 | # the schema allows the following query: 27 | type Query { 28 | sample: Response 29 | getRouteInfo(path: String!): Page 30 | } 31 | 32 | schema { 33 | query: Query 34 | } 35 | `; 36 | 37 | type ISample = { 38 | code: number, 39 | message: string, 40 | }; 41 | 42 | type IBlock = { 43 | id: number, 44 | path: string, 45 | order: number, 46 | zone: string, 47 | }; 48 | 49 | type IPage = { 50 | id: number, 51 | layout: string, 52 | blocks: IBlock[], 53 | }; 54 | 55 | export const resolvers = { 56 | Query: { 57 | sample: (): ISample => ({ code: 200, message: "hello world" }), 58 | getRouteInfo: () => { 59 | return { 60 | id: 1, 61 | layout: "Horizontal", 62 | blocks: [ 63 | { path: "HelloWorld", id: 3, zone: "main", order: 1 }, 64 | { path: "HelloWorld", id: 2, zone: "secondary", order: 1 }, 65 | { path: "Counter", id: 1, zone: "secondary", order: 0 }, 66 | ], 67 | }; 68 | }, 69 | }, 70 | Response: { 71 | code: ({ code }: ISample): number => code, 72 | message: ({ message }: ISample): string => message, 73 | }, 74 | Page: { 75 | id: ({ id }: IPage) => id, 76 | layout: ({ layout }: IPage) => layout, 77 | blocks: ({ blocks }: IPage) => blocks, 78 | }, 79 | Block: { 80 | id: ({ id }: IBlock) => id, 81 | zone: ({ zone }: IBlock) => zone, 82 | order: ({ order }: IBlock) => order, 83 | path: ({ path }: IBlock) => path, 84 | }, 85 | }; 86 | 87 | export const schema = makeExecutableSchema({ typeDefs, resolvers }); 88 | 89 | export const safeQuery = (query: string | DocumentNode): string => 90 | typeof query === "string" ? query : print(query); 91 | // this is a curried schema execution function 92 | // use it to execute queries for SSR and testing 93 | export const graphql = ( 94 | query: string | DocumentNode, 95 | root?: mixed, 96 | context?: mixed, 97 | variables?: ?{ [key: string]: mixed }, 98 | operationName?: ?string, 99 | ): Promise => 100 | graphqljs(schema, safeQuery(query), root, context, variables, operationName); 101 | -------------------------------------------------------------------------------- /src/data/graphql/networkInterface.js: -------------------------------------------------------------------------------- 1 | //@flow 2 | import { createBatchingNetworkInterface } from "react-apollo"; 3 | import { platform, bundleId, version } from "./util"; 4 | 5 | export default () => 6 | createBatchingNetworkInterface({ 7 | uri: "http://localhost:3000/graphql", 8 | batchInterval: 10, 9 | }).use([ 10 | { 11 | applyBatchMiddleware(req, next) { 12 | if (!req.options.headers) { 13 | req.options.headers = {}; // create the header object if needed 14 | } 15 | req.options.headers["clientId"] = `${bundleId()}_${platform()}`; 16 | req.options.headers["version"] = version(); 17 | next(); 18 | }, 19 | }, 20 | ]); 21 | -------------------------------------------------------------------------------- /src/data/graphql/util/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import { platform, bundleId, version } from "../index.js"; 2 | 3 | it("should have platform of web", () => { 4 | expect(platform()).toEqual("web"); 5 | }); 6 | 7 | it("should use window location for bundle", () => { 8 | global.window = { location: { hostname: "wow" } }; 9 | expect(bundleId()).toEqual("wow"); 10 | }); 11 | 12 | it("should use env for version", () => { 13 | global.process.env.BUILD = "1.2.3"; 14 | expect(version()).toEqual("1.2.3"); 15 | }); 16 | -------------------------------------------------------------------------------- /src/data/graphql/util/__tests__/index.native.js: -------------------------------------------------------------------------------- 1 | import { platform, bundleId, version } from "../"; 2 | 3 | jest.mock("react-native-device-info", () => ({ 4 | getBundleId: () => "com.wow", 5 | getVersion: () => "1.2.3", 6 | })); 7 | 8 | it("should have platform of web", () => { 9 | // RN defaults to ios 10 | expect(platform()).toEqual("ios"); 11 | }); 12 | 13 | it("should use deviceInfo for bundle", () => { 14 | expect(bundleId()).toEqual("com.wow"); 15 | }); 16 | 17 | it("should deviceInfo for version", () => { 18 | expect(version()).toEqual("1.2.3"); 19 | }); 20 | -------------------------------------------------------------------------------- /src/data/graphql/util/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export const platform = () => "web"; 4 | export const bundleId = () => 5 | window && window.location && window.location.hostname 6 | ? window.location.hostname 7 | : ""; 8 | export const version = () => 9 | process && process.env && process.env.BUILD ? process.env.BUILD : ""; 10 | -------------------------------------------------------------------------------- /src/data/graphql/util/index.native.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { Platform } from "react-native"; 3 | import DeviceInfo from "react-native-device-info"; 4 | 5 | export const bundleId = () => DeviceInfo.getBundleId(); 6 | export const platform = () => Platform.OS; 7 | export const version = () => DeviceInfo.getVersion(); 8 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import Style from "@jongold/further"; 3 | import { 4 | compose, 5 | curry, 6 | groupBy, 7 | adjust, 8 | sortBy, 9 | map, 10 | fromPairs, 11 | toPairs, 12 | lensProp, 13 | defaultTo, 14 | view, 15 | } from "ramda"; 16 | import { branch, mapProps } from "recompose"; 17 | import { withRouter } from "react-router"; 18 | 19 | import Junction from "./junction"; 20 | 21 | import loadComponents from "./runtime/registry"; 22 | import loadRouteData from "./runtime/route-info"; 23 | 24 | import type { ILayoutProps, IState } from "./runtime/registry/util/types"; 25 | 26 | export const layoutStyle = Style.of({ flex: 1 }); 27 | 28 | export const Loading = () => null; 29 | export const loadingCheck = compose( 30 | defaultTo(false), 31 | view(lensProp("loading")), 32 | ); 33 | export const loadingState = branch(loadingCheck, () => Loading); 34 | 35 | export const groupObject = curry((fn, keys) => groupBy(fn, keys)); 36 | export const zoneFromBlock = view(lensProp("zone")); 37 | export const mapValues = curry((fn, obj) => 38 | fromPairs(map(adjust(fn, 1), toPairs(obj))), 39 | ); 40 | export const order = mapValues(sortBy(view(lensProp("order")))); 41 | 42 | export const blocksToZones = mapProps((props: IState) => ({ 43 | Layout: props.Layout, 44 | zones: order(groupObject(zoneFromBlock, props.components)), 45 | })); 46 | 47 | export default Junction() 48 | .with(withRouter) 49 | .with(loadRouteData) 50 | .with(loadingState) 51 | .with(loadComponents) 52 | .with(blocksToZones) 53 | .render(({ Layout, zones }: ILayoutProps) => ); 54 | -------------------------------------------------------------------------------- /src/junction/__tests__/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { Text, View, Platform, Button } from "react-native"; 3 | import { withState, withHandlers } from "recompose"; 4 | import React from "react"; 5 | import renderer from "react-test-renderer"; 6 | 7 | import Junction from "~/junction"; 8 | 9 | const state = withState( 10 | "counter", 11 | "setCounter", 12 | ({ defaultValue }) => defaultValue || 0, 13 | ); 14 | 15 | const actions = withHandlers({ 16 | increment: ({ setCounter }) => () => setCounter(n => n + 1), 17 | decrement: ({ setCounter }) => () => setCounter(n => n - 1), 18 | }); 19 | 20 | const Counter = ({ 21 | increment, 22 | counter, 23 | decrement, 24 | }: { 25 | increment: Function, 26 | counter: number, 27 | decrement: Function, 28 | }) => ( 29 | 30 | Counter is at {counter} on {Platform.OS} 31 | 20 | // 21 | // 22 | // ); 23 | 24 | // export default Junction() 25 | // .with(state) 26 | // .with(actions) 27 | // .render(Comp) 28 | 29 | function Junction(f = A => A) { 30 | if (!(this instanceof Junction)) return new Junction(f); 31 | this.__value = f; 32 | return this; 33 | } 34 | 35 | Junction.prototype.render = function(A) { 36 | return this.__value(A); 37 | }; 38 | 39 | // does .of make sense? 40 | // .of :: Applicative Component -> Junction Component 41 | // Junction.prototype.of = function(A) { 42 | // return new Junction(() => A); 43 | // }; 44 | // Junction.of = Junction.prototype.of; 45 | 46 | // #map :: Function Junction => Junction a ~> (a -> b) -> Junction b 47 | Junction.prototype.map = function(f) { 48 | return new Junction(f(this.__value)); 49 | }; 50 | 51 | // #with :: 52 | Junction.prototype.with = function(f) { 53 | if (f instanceof Junction) f = f.__value; 54 | return this.map(g => A => g(f(A))); 55 | }; 56 | 57 | export default Junction; 58 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/__tests__/__snapshots__/horizontal.native.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Horizontal Native Layout should render Horizontal layout component 1`] = ` 4 | 5 | 6 | 11 | Native Horizontal Layout 12 | 13 | 14 | 24 | 27 | 33 | 34 | 37 | 43 | 44 | 45 | 46 | `; 47 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/__tests__/__snapshots__/horizontal.web.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Horizontal Web Layout should render Horizontal layout component 1`] = ` 4 |
5 |
6 | Web Horizontal Layout 7 |
8 |
18 |
19 | 25 | 31 |
32 |
33 | 39 |
40 |
41 |
42 | `; 43 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/__tests__/horizontal.native.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import Horizontal from "../horizontal.native.js"; 4 | import Counter from "../../../blocks/Counter"; 5 | import HelloWorld from "../../../blocks/HelloWorld"; 6 | 7 | const layoutProps = { 8 | zones: { 9 | secondary: [{ id: 1, path: "Counter", Component: Counter, order: 0 }], 10 | main: [{ id: 2, path: "HelloWorld", Component: HelloWorld, order: 1 }], 11 | }, 12 | }; 13 | 14 | const generateComponent = additionalProps => ( 15 | 16 | ); 17 | 18 | describe("Horizontal Native Layout", () => { 19 | it("should render Horizontal layout component", () => { 20 | const tree = shallow(generateComponent()); 21 | expect(tree).toBeDefined(); 22 | expect(shallowToJson(tree)).toMatchSnapshot(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/__tests__/horizontal.web.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import Horizontal from "../horizontal.web.js"; 4 | import Counter from "../../../blocks/Counter"; 5 | import HelloWorld from "../../../blocks/HelloWorld"; 6 | 7 | const layoutProps = { 8 | zones: { 9 | main: [ 10 | { id: 1, path: "Counter", Component: Counter, order: 0 }, 11 | { id: 2, path: "HelloWorld", Component: HelloWorld, order: 1 }, 12 | ], 13 | secondary: [{ id: 2, path: "HelloWorld", Component: HelloWorld, order: 1 }], 14 | }, 15 | }; 16 | 17 | const generateComponent = additionalProps => ( 18 | 19 | ); 20 | 21 | describe("Horizontal Web Layout", () => { 22 | it("should render Horizontal layout component", () => { 23 | const tree = shallow(generateComponent()); 24 | expect(tree).toBeDefined(); 25 | expect(shallowToJson(tree)).toMatchSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import { layoutStyle } from "../"; 2 | 3 | describe("Layout Style", () => { 4 | it("should resolve to object and match styles", () => { 5 | expect(typeof layoutStyle.resolve()).toBe("object"); 6 | expect(layoutStyle.resolve()).toEqual({ 7 | flexDirection: "row", 8 | justifyContent: "center", 9 | height: "100%", 10 | marginTop: "50%", 11 | }); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/horizontal.native.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { View, Text } from "react-native"; 3 | 4 | import { render } from "../"; 5 | import { layoutStyle } from "./"; 6 | 7 | import type { ILayoutProps } from "../../runtime/registry/util/types"; 8 | 9 | export default ({ zones }: ILayoutProps) => ( 10 | 11 | 12 | 13 | Native Horizontal Layout 14 | 15 | 16 | 17 | 18 | {/* main zone */} 19 | 20 | {zones.main.map(render)} 21 | 22 | 23 | {/* secondary zone */} 24 | 25 | {zones.secondary.map(render)} 26 | 27 | 28 | 29 | 30 | ); 31 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/horizontal.web.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import { render } from "../"; 4 | import { layoutStyle } from "./"; 5 | 6 | import type { ILayoutProps } from "../../runtime/registry/util/types"; 7 | 8 | export default ({ zones }: ILayoutProps) => ( 9 |
10 |
11 | Web Horizontal Layout 12 |
13 |
14 | {/* main zone */} 15 |
16 | {zones.main && zones.main.map(render)} 17 |
18 | {/* secondary zone */} 19 |
20 | {zones.secondary && zones.secondary.map(render)} 21 |
22 |
23 |
24 | ); 25 | -------------------------------------------------------------------------------- /src/layouts/Horizontal/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Style from "@jongold/further"; 4 | import Horizontal from "./horizontal"; 5 | 6 | export const layoutStyle = Style.of({ 7 | flexDirection: "row", 8 | justifyContent: "center", 9 | height: "100%", 10 | marginTop: "50%", 11 | }); 12 | 13 | export default Horizontal; 14 | -------------------------------------------------------------------------------- /src/layouts/Vertical/__tests__/__snapshots__/vertical.native.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Vertical Native Layout should render Vertical layout component 1`] = ` 4 | 5 | 6 | 11 | Native Vertical Layout 12 | 13 | 14 | 23 | 26 | 31 | 32 | 33 | 38 | 39 | 40 | 41 | `; 42 | -------------------------------------------------------------------------------- /src/layouts/Vertical/__tests__/__snapshots__/vertical.web.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Vertical Web Layout should render Vertical layout component 1`] = ` 4 |
5 |
6 | Web Vertical Layout 7 |
8 |
17 |
18 | 23 | 28 |
29 |
30 | 35 |
36 |
37 |
38 | `; 39 | -------------------------------------------------------------------------------- /src/layouts/Vertical/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import { layoutStyle } from "../"; 2 | 3 | describe("Layout Style", () => { 4 | it("should resolve to object and match styles", () => { 5 | expect(typeof layoutStyle.resolve()).toBe("object"); 6 | expect(layoutStyle.resolve()).toEqual({ 7 | flexDirection: "column", 8 | alignItems: "center", 9 | height: "50%", 10 | }); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /src/layouts/Vertical/__tests__/vertical.native.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import Vertical from "../vertical.native.js"; 4 | import Counter from "../../../blocks/Counter"; 5 | import HelloWorld from "../../../blocks/HelloWorld"; 6 | 7 | const layoutProps = { 8 | zones: { 9 | main: [{ id: 1, path: "Counter", Component: Counter }], 10 | secondary: [{ id: 2, path: "HelloWorld", Component: HelloWorld }], 11 | }, 12 | }; 13 | 14 | const generateComponent = additionalProps => ( 15 | 16 | ); 17 | 18 | describe("Vertical Native Layout", () => { 19 | it("should render Vertical layout component", () => { 20 | const tree = shallow(generateComponent()); 21 | expect(tree).toBeDefined(); 22 | expect(shallowToJson(tree)).toMatchSnapshot(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /src/layouts/Vertical/__tests__/vertical.web.js: -------------------------------------------------------------------------------- 1 | import { shallow } from "enzyme"; 2 | import { shallowToJson } from "enzyme-to-json"; 3 | import Vertical from "../vertical.web.js"; 4 | import Counter from "../../../blocks/Counter"; 5 | import HelloWorld from "../../../blocks/HelloWorld"; 6 | 7 | const layoutProps = { 8 | zones: { 9 | main: [ 10 | { id: 1, path: "Counter", Component: Counter }, 11 | { id: 2, path: "HelloWorld", Component: HelloWorld }, 12 | ], 13 | secondary: [{ id: 2, path: "HelloWorld", Component: HelloWorld }], 14 | }, 15 | }; 16 | 17 | const generateComponent = additionalProps => ( 18 | 19 | ); 20 | 21 | describe("Vertical Web Layout", () => { 22 | it("should render Vertical layout component", () => { 23 | const tree = shallow(generateComponent()); 24 | expect(tree).toBeDefined(); 25 | expect(shallowToJson(tree)).toMatchSnapshot(); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/layouts/Vertical/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import Style from "@jongold/further"; 4 | import Vertical from "./vertical"; 5 | 6 | export const layoutStyle = Style.of({ 7 | flexDirection: "column", 8 | alignItems: "center", 9 | height: "50%", 10 | }); 11 | 12 | export default Vertical; 13 | -------------------------------------------------------------------------------- /src/layouts/Vertical/vertical.native.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { View, Text } from "react-native"; 3 | 4 | import { render } from "../"; 5 | import { layoutStyle } from "./"; 6 | 7 | import type { ILayoutProps } from "../../runtime/registry/util/types"; 8 | 9 | export default ({ zones }: ILayoutProps) => ( 10 | 11 | 12 | 13 | Native Vertical Layout 14 | 15 | 16 | 17 | 18 | {/* main zone */} 19 | 20 | {zones.main && zones.main.map(render)} 21 | 22 | 23 | {/* secondary zone */} 24 | 25 | {zones.secondary && zones.secondary.map(render)} 26 | 27 | 28 | 29 | 30 | ); 31 | -------------------------------------------------------------------------------- /src/layouts/Vertical/vertical.web.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import { render } from "../"; 4 | import { layoutStyle } from "./"; 5 | 6 | import type { ILayoutProps } from "../../runtime/registry/util/types"; 7 | 8 | export default ({ zones }: ILayoutProps) => ( 9 |
10 |
11 | Web Vertical Layout 12 |
13 |
14 |
15 | {zones.main && zones.main.map(render)} 16 |
17 | {/* secondary zone */} 18 |
19 | {zones.secondary && zones.secondary.map(render)} 20 |
21 |
22 |
23 | ); 24 | -------------------------------------------------------------------------------- /src/layouts/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import type { IBlockDefinition } from "../runtime/registry/util/types"; 4 | 5 | export const render = ({ ...rest, id, Component }: IBlockDefinition) => ( 6 | 7 | ); 8 | -------------------------------------------------------------------------------- /src/runtime/__tests__/graphql.js: -------------------------------------------------------------------------------- 1 | import { wrap } from "lambda-wrapper"; 2 | 3 | import { 4 | createContextFromRequestEvent, 5 | withCors, 6 | graphqlEndpoint, 7 | graphiqlEndpoint, 8 | } from "../graphql"; 9 | 10 | describe("createContextFromRequestEvent", () => { 11 | it("includes a userId if authorization is passed", () => { 12 | const { userId } = createContextFromRequestEvent({ 13 | headers: { authorization: "1234" }, 14 | }); 15 | expect(userId).toEqual("1234"); 16 | }); 17 | it("includes an ip if passed", () => { 18 | const { ip } = createContextFromRequestEvent({ 19 | requestContext: { identity: { sourceIp: "1234" } }, 20 | }); 21 | expect(ip).toEqual("1234"); 22 | }); 23 | it("does't throw if missing info", () => { 24 | const { ip, userId } = createContextFromRequestEvent({}); 25 | expect(ip).toBeUndefined(); 26 | expect(userId).toBeUndefined(); 27 | }); 28 | it("sets dev based on stage", () => { 29 | const { isDev } = createContextFromRequestEvent({ 30 | requestContext: { stage: "dev" }, 31 | }); 32 | expect(isDev).toEqual(true); 33 | }); 34 | it("sets dev based on stage", () => { 35 | const { isDev } = createContextFromRequestEvent({ 36 | requestContext: { stage: "prod" }, 37 | }); 38 | expect(isDev).toEqual(false); 39 | }); 40 | }); 41 | 42 | describe("withCors", () => { 43 | it("sets the ACAO on the output headers", () => { 44 | const cb = jest.fn(() => {}); 45 | const output = { headers: {} }; 46 | const error = "foo"; 47 | 48 | withCors(cb)(error, output); 49 | expect(cb).toBeCalledWith("foo", { 50 | headers: { 51 | "Access-Control-Allow-Origin": "*", 52 | }, 53 | }); 54 | }); 55 | }); 56 | 57 | describe("graphqlEndpoint", () => { 58 | it("returns a response from the sample root query", async () => { 59 | const event = { 60 | httpMethod: "POST", 61 | body: JSON.stringify({ 62 | query: "{ sample { code message } }", 63 | }), 64 | }; 65 | const { statusCode, body, headers } = await wrap({ 66 | handler: graphqlEndpoint, 67 | }).run(event); 68 | expect(statusCode).toEqual(200); 69 | expect(JSON.parse(body)).toEqual({ 70 | data: { sample: { code: 200, message: "hello world" } }, 71 | }); 72 | expect(headers["Content-Type"]).toEqual("application/json"); 73 | expect(headers["Access-Control-Allow-Origin"]).toEqual("*"); 74 | }); 75 | }); 76 | 77 | describe("graphiqlEndpoint", () => { 78 | it("returns a mini react app", async () => { 79 | const event = { 80 | httpMethod: "GET", 81 | isOffline: true, 82 | }; 83 | const { statusCode, body, headers } = await wrap({ 84 | handler: graphiqlEndpoint, 85 | }).run(event); 86 | expect(statusCode).toEqual(200); 87 | expect(body).toMatch(/GraphiQL/); 88 | expect(headers["Content-Type"]).toEqual("text/html"); 89 | }); 90 | }); 91 | -------------------------------------------------------------------------------- /src/runtime/graphql.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { graphqlLambda, graphiqlLambda } from "graphql-server-lambda"; 3 | 4 | import { schema } from "../data/graphql"; 5 | 6 | // XXX move these to a typings file for lambda 7 | import type { ILambdaEvent, ILambdaContext } from "./ssr/withApp"; 8 | 9 | export type ILambdaOutput = { 10 | headers: { [key: string]: string }, 11 | }; 12 | 13 | export type ILambdaCallback = (error: mixed, output: ILambdaOutput) => void; 14 | 15 | export type IContext = { 16 | userId?: string, 17 | ip?: string, 18 | isDev: boolean, 19 | }; 20 | 21 | export const createContextFromRequestEvent = ( 22 | event: ILambdaEvent, 23 | ): IContext => { 24 | const { headers, requestContext } = event; 25 | return { 26 | platform: headers && headers.platform, 27 | version: headers && headers.version, 28 | userId: headers && headers.authorization, 29 | ip: requestContext && 30 | requestContext.identity && 31 | requestContext.identity.sourceIp, 32 | isDev: requestContext && requestContext.stage === "dev", 33 | }; 34 | }; 35 | 36 | // enable cors 37 | export const withCors = (cb: ILambdaCallback): ILambdaCallback => ( 38 | error, 39 | output, 40 | ) => { 41 | output.headers["Access-Control-Allow-Origin"] = "*"; 42 | cb(error, output); 43 | }; 44 | 45 | export const graphqlEndpoint = ( 46 | event: ILambdaEvent, 47 | ctx: ILambdaContext, 48 | cb: ILambdaCallback, 49 | ) => graphqlLambda({ schema })(event, ctx, withCors(cb)); 50 | 51 | export const graphiqlEndpoint = ( 52 | event: ILambdaEvent, 53 | ctx: ILambdaContext, 54 | cb: ILambdaCallback, 55 | ) => { 56 | const stage = event.isOffline ? "" : `/${event.requestContext.stage}`; 57 | return graphiqlLambda({ endpointURL: `${stage}/graphql` })(event, ctx, cb); 58 | }; 59 | -------------------------------------------------------------------------------- /src/runtime/registry/__tests__/index.browser.js: -------------------------------------------------------------------------------- 1 | import registry, { loader } from "../index.browser.js"; 2 | import Junction from "../../../junction"; 3 | 4 | import { newLifecycle } from "../util/browser"; 5 | 6 | function mockFunctions() { 7 | const original = require.requireActual("../util/browser"); 8 | return { 9 | ...original, //Pass down all the exported objects 10 | newLifecycle: jest.fn(original.newLifecycle), 11 | }; 12 | } 13 | jest.mock("../util/browser", () => mockFunctions()); 14 | 15 | describe("loader", () => { 16 | it("uses the lifecycle hoc", () => { 17 | const WithLoader = loader(() => null); 18 | expect(typeof WithLoader).toBe("function"); 19 | expect(WithLoader.displayName).toBe("lifecycle(Component)"); 20 | }); 21 | it("is called with dynamic imports", async () => { 22 | const [blocks, layouts] = newLifecycle.mock.calls[0]; 23 | const { default: Block } = await blocks("Counter"); 24 | const { default: Layout } = await layouts("Horizontal"); 25 | expect(typeof Block).toEqual("function"); 26 | expect(typeof Layout).toEqual("function"); 27 | }); 28 | }); 29 | 30 | describe("registry", () => { 31 | it("should wrap with junction", () => { 32 | expect(registry).toBeInstanceOf(Junction); 33 | }); 34 | 35 | it("should be wrapped with correct hoc's", () => { 36 | const component = registry.render(
); 37 | // displayName is generated by recompose 38 | expect(component.displayName).toBe( 39 | "withState(lifecycle(mapProps(branch(Component))))", 40 | ); 41 | }); 42 | }); 43 | -------------------------------------------------------------------------------- /src/runtime/registry/__tests__/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @jest-environment jsdom 3 | */ 4 | 5 | import { mount } from "enzyme"; 6 | import { loadBlocks, mapOverBlocks, loadLayout } from "../"; 7 | 8 | const sampleProps = { 9 | registry: { 10 | layout: "Vertical", 11 | blocks: [ 12 | { path: "Counter", stuff: "hey" }, 13 | { path: "HelloWorld", stuff: "there" }, 14 | { path: "C", stuff: "dawg" }, 15 | ], 16 | }, 17 | randomStuff: "waddup", 18 | }; 19 | 20 | describe("props mapOverBlocks", () => { 21 | it("returns a default array if no registry", () => { 22 | expect(mapOverBlocks({ id: 1 })).toEqual({ id: 1, components: [] }); 23 | }); 24 | it("passes additional props without change", () => { 25 | expect(mapOverBlocks(sampleProps).randomStuff).toBe("waddup"); 26 | }); 27 | 28 | it("returns an object with a components key", () => { 29 | expect(mapOverBlocks(sampleProps).components).toBeDefined(); 30 | }); 31 | 32 | it("passes the additional block details without change", () => { 33 | expect(mapOverBlocks(sampleProps).components[0].stuff).toBe("hey"); 34 | }); 35 | 36 | it("passes path through to the final component object", () => { 37 | expect(mapOverBlocks(sampleProps).components[0].path).toBe("Counter"); 38 | }); 39 | 40 | it("loads the components", () => { 41 | const components = mapOverBlocks(sampleProps).components; 42 | expect(typeof components[0].Component).toBe("function"); 43 | expect(typeof components[1].Component).toBe("function"); 44 | }); 45 | }); 46 | 47 | describe("loadBlocks", () => { 48 | it("should create a hoc with mapped props", () => { 49 | const markup = jest.fn(() =>

hello

); 50 | const C = loadBlocks(markup); 51 | mount(); 52 | const props = markup.mock.calls[0][0]; 53 | expect(props.components).toBeDefined(); 54 | }); 55 | }); 56 | 57 | describe("loadLayout", () => { 58 | it("should create a HOC with mapped props", () => { 59 | const markup = jest.fn(() =>

hello

); 60 | const C = loadLayout(markup); 61 | mount(); 62 | const props = markup.mock.calls[0][0]; 63 | expect(props.Layout).toBeDefined(); 64 | }); 65 | }); 66 | -------------------------------------------------------------------------------- /src/runtime/registry/index.browser.js: -------------------------------------------------------------------------------- 1 | /* 2 | * XXX: We can't flowtype this file without v.0.45.0, because that 3 | * was the version that dynamic import support was added. We can't 4 | * upgrade to 0.45.0 yet, because react-native isn't typed with that version 5 | * https://github.com/facebook/flow/pull/3544 6 | */ 7 | import Junction from "../../junction"; 8 | import { 9 | newLifecycle, 10 | state, 11 | mapImports, 12 | shouldShowLoader, 13 | } from "./util/browser"; 14 | 15 | /* 16 | * Dynamic import registry for the browser 17 | * It returns a component which dynamically loads blocks from the /blocks folder 18 | * as well as loads a layout from the layout folders 19 | * given a data shape describing what needs to be loaded 20 | * 21 | * It is an async rerender component so it has local state of the blocks in use 22 | * It also manages a loading state :yay: 23 | * 24 | */ 25 | export const loader = newLifecycle( 26 | // layout => Promise.resolve({ default: () =>
{layout}
}), 27 | path => import(`./../../blocks/${path}/index.js`), // load da blocks 28 | layout => import(`./../../layouts/${layout}/index.js`), // load da layouts 29 | // layout => Promise.resolve(() =>
{layout}
) 30 | ); 31 | 32 | /* 33 | * state: sync, 34 | * loader: async (lifecycle), 35 | * shouldShowLoader: async 36 | */ 37 | export default Junction() 38 | .with(state) 39 | .with(loader) 40 | .with(mapImports) 41 | .with(shouldShowLoader); 42 | -------------------------------------------------------------------------------- /src/runtime/registry/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import { mapProps } from "recompose"; 4 | import Junction from "../../junction"; 5 | 6 | import type { IRegistryRequest } from "./util/types"; 7 | 8 | // $FlowIgnore 9 | import * as availableBlocks from "glob:../../blocks/*"; 10 | // $FlowIgnore 11 | import * as availableLayouts from "glob:../../layouts/*"; 12 | 13 | export const mapOverBlocks = ({ 14 | ...rest, 15 | registry, 16 | }: { 17 | registry: IRegistryRequest, 18 | }) => ({ 19 | ...rest, 20 | components: registry 21 | ? registry.blocks.map(({ ...details, path }) => ({ 22 | ...details, 23 | path, 24 | Component: availableBlocks[path], 25 | })) 26 | : [], 27 | }); 28 | 29 | export const loadBlocks = mapProps(mapOverBlocks); 30 | 31 | export const loadLayout = mapProps( 32 | ({ ...rest, registry }: { registry: IRegistryRequest }) => ({ 33 | ...rest, 34 | registry, 35 | Layout: availableLayouts[registry.layout], 36 | }), 37 | ); 38 | 39 | export default Junction().with(loadLayout).with(loadBlocks); 40 | -------------------------------------------------------------------------------- /src/runtime/registry/util/types.js: -------------------------------------------------------------------------------- 1 | import type { Component } from "react"; 2 | 3 | export type ILayoutProps = { 4 | zones: { [key: string]: IBlockDescription[] }, 5 | Layout: Component, 6 | }; 7 | 8 | export type IBlockDescription = { 9 | path: string, 10 | order: number, 11 | zone: string, 12 | Component?: Component, 13 | }; 14 | 15 | export type IRegistryRequest = { 16 | layout: string, 17 | blocks: IBlockDescription[], 18 | }; 19 | 20 | export type IState = { 21 | components: ?(IBlockDescription[]), 22 | Layout?: Component, 23 | }; 24 | 25 | export type IRegistryProps = { 26 | registry: IRegistryRequest, 27 | imports: IState, 28 | }; 29 | -------------------------------------------------------------------------------- /src/runtime/route-info/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import routeInfo, { LOCATION_QUERY, options, props } from "../"; 2 | 3 | describe("Location Query", () => { 4 | it("exists", () => { 5 | expect(LOCATION_QUERY).toMatchSnapshot(); 6 | }); 7 | }); 8 | 9 | describe("options reducer", () => { 10 | it("returns an object with correct data shape", () => { 11 | const result = options({ location: { pathname: "boi" } }); 12 | expect(result.variables).toBeDefined(); 13 | expect(result.variables.path).toBeDefined(); 14 | expect(result).toEqual({ 15 | variables: { 16 | path: "boi", 17 | }, 18 | }); 19 | }); 20 | 21 | it("formats path to null if no location passed in", () => { 22 | const result = options(); 23 | expect(result.variables.path).toEqual(null); 24 | }); 25 | }); 26 | 27 | describe("props reducer", () => { 28 | it("returns loading state if no data passed in", () => { 29 | expect(props()).toEqual({ loading: true }); 30 | }); 31 | 32 | it("returns loading state if data but no route data", () => { 33 | expect( 34 | props({ 35 | data: "hey", 36 | }), 37 | ).toEqual({ loading: true }); 38 | }); 39 | 40 | it("returns registry prop if route data present", () => { 41 | expect( 42 | props({ 43 | data: { getRouteInfo: "yo" }, 44 | }), 45 | ).toEqual({ registry: "yo" }); 46 | }); 47 | }); 48 | 49 | describe("routeInfo", () => { 50 | it("returns a function that makes an apollo hoc", () => { 51 | expect(typeof routeInfo).toEqual("function"); 52 | expect(routeInfo(() => null).displayName).toEqual("Apollo(Component)"); 53 | }); 54 | }); 55 | -------------------------------------------------------------------------------- /src/runtime/route-info/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | /* 4 | This component gets called/updated with every route change. 5 | Using the route info, it makes an API call and returns a json object 6 | with block information. 7 | */ 8 | import { graphql } from "react-apollo"; 9 | import gql from "graphql-tag"; 10 | import type { IRegistryRequest } from "../registry/util/types.js"; 11 | 12 | export const LOCATION_QUERY = gql` 13 | query GetRouteInfo($path: String!){ 14 | getRouteInfo(path: $path) { 15 | id 16 | layout 17 | blocks { 18 | id 19 | zone 20 | order 21 | path 22 | } 23 | } 24 | } 25 | `; 26 | 27 | type IOptions = { 28 | location: ?{ 29 | pathname: string, 30 | }, 31 | }; 32 | export const options = ({ location }: IOptions = { location: null }) => ({ 33 | variables: { path: location ? location.pathname : null }, 34 | }); 35 | 36 | type IProps = { 37 | data: { 38 | getRouteInfo: IRegistryRequest, 39 | }, 40 | }; 41 | export const props = ({ data }: IProps = { data: { getRouteInfo: null } }) => { 42 | if (data && data.getRouteInfo) { 43 | return { registry: data.getRouteInfo }; 44 | } 45 | return { loading: true }; 46 | }; 47 | 48 | export default graphql(LOCATION_QUERY, { options, props }); 49 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/__snapshots__/html.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`html includes a body 1`] = ` 4 | " 5 | 6 | 7 | 8 | 9 | 10 | Sample 11 | 12 | stylesheet goes here 13 | 14 | 15 |
hello world
16 | 17 | 18 | 19 | 20 | " 21 | `; 22 | 23 | exports[`html places scripts at the bottom of the body 1`] = ` 24 | " 25 | 26 | 27 | 28 | 29 | 30 | Sample 31 | 32 | stylesheet goes here 33 | 34 | 35 |
hello world
36 | 37 | 38 | 39 | 40 | " 41 | `; 42 | 43 | exports[`html returns back a known shape of stringified markup 1`] = ` 44 | " 45 | 46 | 47 | 48 | 49 | 50 | Sample 51 | 52 | stylesheet goes here 53 | 54 | 55 |
foo
56 | 57 | 58 | 59 | 60 | " 61 | `; 62 | 63 | exports[`withHtml converts scripts, body, and metadata into an html key 1`] = ` 64 | " 65 | 66 | 67 | 68 | 69 | 70 | Sample 71 | 72 | stylesheet goes here 73 | 74 | 75 |
hello world
76 | 77 | 78 | 79 | 80 | " 81 | `; 82 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/__snapshots__/renderBody.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`renders the body of the app into a static router context 1`] = `"

Home

"`; 4 | 5 | exports[`renders the body of the app into a static router context based on route 1`] = `"

Hello World

"`; 6 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/endRequest.js: -------------------------------------------------------------------------------- 1 | import end from "../endRequest"; 2 | 3 | it("calls succeed on the context", () => { 4 | const ctx = { 5 | succeed: jest.fn(() => {}), 6 | }; 7 | 8 | end({ ctx }); 9 | expect(ctx.succeed).toBeCalled(); 10 | }); 11 | 12 | it("calls succeed on the context with the correct info", () => { 13 | const ctx = { 14 | succeed: jest.fn(() => {}), 15 | }; 16 | 17 | end({ ctx, html: "hello" }); 18 | expect(ctx.succeed).toBeCalled(); 19 | expect(ctx.succeed).toBeCalledWith({ 20 | statusCode: 200, 21 | headers: { 22 | "Content-Type": "text/html", 23 | "Access-Control-Allow-Origin": "*", 24 | }, 25 | body: "hello", 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/html.js: -------------------------------------------------------------------------------- 1 | import withHtml, { html } from "../html"; 2 | 3 | const metadata = { 4 | title: { 5 | toString: () => "Sample", 6 | }, 7 | meta: { 8 | toString: () => "", 9 | }, 10 | link: { 11 | toString: () => "stylesheet goes here", 12 | }, 13 | htmlAttributes: { 14 | toString: () => "", 15 | }, 16 | bodyAttributes: { 17 | toString: () => "", 18 | }, 19 | }; 20 | 21 | describe("html", () => { 22 | it("returns back a known shape of stringified markup", () => { 23 | expect(html(metadata, "foo")).toMatchSnapshot(); 24 | }); 25 | it("includes a body", () => { 26 | expect(html(metadata, "
hello world
")).toMatchSnapshot(); 27 | }); 28 | it("places scripts at the bottom of the body", () => { 29 | expect( 30 | html(metadata, "
hello world
", ""), 31 | ).toMatchSnapshot(); 32 | }); 33 | }); 34 | 35 | describe("withHtml", () => { 36 | it("converts scripts, body, and metadata into an html key", () => { 37 | const initial = { 38 | metadata, 39 | body: "
hello world
", 40 | other: "keys", 41 | are: "okay", 42 | and: "passed", 43 | config: { 44 | manifests: { 45 | vendor: { 46 | foo: "bar", 47 | }, 48 | client: { 49 | bar: "foo", 50 | }, 51 | }, 52 | }, 53 | }; 54 | 55 | const result = withHtml(initial); 56 | expect(result.html).toMatchSnapshot(); 57 | expect(result.metadata).toBeUndefined(); 58 | expect(result.other).toEqual("keys"); 59 | expect(result.are).toEqual("okay"); 60 | }); 61 | }); 62 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Route, Redirect } from "react-router"; 3 | 4 | import handler from "../"; 5 | 6 | const event = { 7 | path: "/", 8 | }; 9 | 10 | const context = { 11 | __result: false, 12 | done: jest.fn(e => { 13 | context.__result = e; 14 | }), 15 | succeed: jest.fn(result => { 16 | context.__result = result; 17 | }), 18 | }; 19 | 20 | const App = () =>

Hello World

; 21 | 22 | describe("ssr", () => { 23 | beforeEach(() => { 24 | context.succeed.mockClear(); 25 | context.done.mockClear(); 26 | delete context.__result; 27 | }); 28 | 29 | it("resolves a simple app correctly", async () => { 30 | await handler(App)(event, context); 31 | expect(context.succeed).toBeCalled(); 32 | expect(context.__result.body).toMatch(/Hello World/); 33 | }); 34 | 35 | it("resolves an app with a route correctly", async () => { 36 | const Hello = () =>

Hai World

; 37 | const LocalApp = () => ( 38 |
39 | 40 |
41 | ); 42 | await handler(LocalApp)(event, context); 43 | expect(context.succeed).toBeCalled(); 44 | expect(context.__result.body).toMatch(/Hai World/); 45 | }); 46 | 47 | it("resolves an app with a route correctly", async () => { 48 | const LocalApp = () => ( 49 |
50 | 55 |
56 | ); 57 | await handler(LocalApp)(event, context); 58 | expect(context.succeed.mock.calls.length).toEqual(0); 59 | expect(context.done).toBeCalled(); 60 | expect(context.__result.name).toEqual("/login"); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/redirect.js: -------------------------------------------------------------------------------- 1 | import redirect from "../redirect"; 2 | 3 | it("calls done on the context", () => { 4 | const ctx = { 5 | done: jest.fn(() => {}), 6 | }; 7 | const context = { url: "/home" }; 8 | redirect({ ctx, context }); 9 | expect(ctx.done).toBeCalled(); 10 | }); 11 | 12 | it("calls done with the correct url", () => { 13 | const ctx = { 14 | done: jest.fn(err => (ctx._error = err)), 15 | }; 16 | const context = { url: "/home" }; 17 | redirect({ ctx, context }); 18 | expect(ctx.done).toBeCalled(); 19 | expect(ctx._error.name).toEqual("/home"); 20 | }); 21 | 22 | it("calls done with the correct error", () => { 23 | const ctx = { 24 | done: jest.fn(err => (ctx._error = err)), 25 | }; 26 | const context = { url: "/home" }; 27 | redirect({ ctx, context }); 28 | expect(ctx.done).toBeCalled(); 29 | expect(ctx._error.message).toMatch( 30 | /HandlerDemo.ResponseFound Redirection: Resource found elsewhere/, 31 | ); 32 | expect(ctx._error instanceof Error).toEqual(true); 33 | }); 34 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/renderBody.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Route } from "react-router"; 3 | import render from "../renderBody"; 4 | 5 | const Home = () =>

Home

; 6 | const Hello = () =>

Hello World

; 7 | const App = () => ( 8 |
9 | 10 | 11 |
12 | ); 13 | 14 | it("renders the body of the app into a static router context", async () => { 15 | const ctx = {}; 16 | const context = {}; 17 | const result = await render({ 18 | ctx, 19 | context, 20 | event: { path: "/" }, 21 | App, 22 | }); 23 | 24 | expect(result.body).toMatchSnapshot(); 25 | }); 26 | 27 | it("renders the body of the app into a static router context based on route", async () => { 28 | const ctx = {}; 29 | const context = {}; 30 | const result = await render({ 31 | ctx, 32 | context, 33 | event: { path: "/hello" }, 34 | App, 35 | }); 36 | 37 | expect(result.body).toMatchSnapshot(); 38 | }); 39 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/withApp.js: -------------------------------------------------------------------------------- 1 | import withApp from "../withApp"; 2 | 3 | it("returns a function when given a component", () => { 4 | const handler = withApp(() =>
hello world
); 5 | expect(typeof handler).toEqual("function"); 6 | }); 7 | 8 | it("adds ctx, event, and the component to a resulting object", () => { 9 | const App = () =>
hello world
; 10 | const event = { path: "here" }; 11 | const ctx = { done: jest.fn(), succeed: jest.fn() }; 12 | const result = withApp(App)(event, ctx); 13 | expect(result).toEqual({ 14 | ctx, 15 | event, 16 | context: {}, 17 | App, 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /src/runtime/ssr/__tests__/withMeta.js: -------------------------------------------------------------------------------- 1 | import Helmet from "react-helmet"; 2 | import withMeta from "../withMeta"; 3 | 4 | jest.mock("react-helmet", () => ({ 5 | renderStatic: jest.fn(() => ({ foo: "bar" })), 6 | })); 7 | 8 | it("passes down the rest of the object with an additional metadata object", () => { 9 | const result = withMeta({ foobar: true }); 10 | expect(result).toEqual({ 11 | foobar: true, 12 | metadata: { 13 | foo: "bar", 14 | }, 15 | }); 16 | 17 | expect(Helmet.renderStatic).toBeCalled(); 18 | }); 19 | -------------------------------------------------------------------------------- /src/runtime/ssr/endRequest.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import type { ILambdaContext } from "./withApp"; 4 | 5 | export default ({ ctx, html }: { ctx: ILambdaContext, html: string }): void => 6 | ctx.succeed({ 7 | statusCode: 200, 8 | headers: { 9 | "Content-Type": "text/html", 10 | "Access-Control-Allow-Origin": "*", 11 | }, 12 | body: html, 13 | }); 14 | -------------------------------------------------------------------------------- /src/runtime/ssr/html.js: -------------------------------------------------------------------------------- 1 | import { values } from "ramda"; 2 | import type { Head } from "react-helmet"; 3 | 4 | import type { IConfig } from "./withApp"; 5 | import type { IRenderResult } from "./renderBody"; 6 | 7 | export const createScripts = ( 8 | { manifests: { client, vendor } }: IConfig = { manifests: {} }, 9 | ): string => 10 | values(vendor) 11 | .concat(values(client)) 12 | .map(src => ``) 13 | .join(""); 14 | 15 | export const html = ( 16 | metadata: Head, 17 | body: string, 18 | scripts: string = "", 19 | initialState: mixed = {}, 20 | ): string => ` 21 | 22 | 23 | 24 | 25 | 26 | ${metadata.title.toString()} 27 | ${metadata.meta.toString()} 28 | ${metadata.link.toString()} 29 | 30 | 31 |
${body}
32 | 33 | ${scripts} 34 | 35 | 36 | `; 37 | 38 | export default ({ 39 | body, 40 | initialState, 41 | metadata, 42 | config, 43 | ...rest 44 | }): IRenderResult => ({ 45 | ...rest, 46 | html: html(metadata, body, createScripts(config), initialState), 47 | }); 48 | -------------------------------------------------------------------------------- /src/runtime/ssr/index.js: -------------------------------------------------------------------------------- 1 | // import "babel-polyfill"; 2 | import { compose } from "ramda"; 3 | import { ifElse } from "fugazi"; 4 | 5 | import endRequest from "./endRequest"; 6 | import redirect from "./redirect"; 7 | import renderBody from "./renderBody"; 8 | import withApp from "./withApp"; 9 | import withHtml from "./html"; 10 | import withMeta from "./withMeta"; 11 | 12 | // async ifElse 13 | export const shouldRedirect = ifElse( 14 | state => state.then(({ context }) => context.url), 15 | state => state.then(redirect), 16 | state => state.then(compose(endRequest, withHtml, withMeta)), 17 | ); 18 | 19 | export default (App, config) => 20 | compose(shouldRedirect, renderBody, withApp(App, config)); 21 | -------------------------------------------------------------------------------- /src/runtime/ssr/redirect.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import type { ILambdaContext } from "./withApp"; 4 | 5 | type IReactRouterContext = { 6 | url: string, 7 | }; 8 | 9 | export default ({ 10 | ctx, 11 | context, 12 | }: { 13 | ctx: ILambdaContext, 14 | context: IReactRouterContext, 15 | }): void => { 16 | const err = new Error( 17 | "HandlerDemo.ResponseFound Redirection: Resource found elsewhere", 18 | ); 19 | err.name = context.url; 20 | ctx.done(err, {}); 21 | }; 22 | -------------------------------------------------------------------------------- /src/runtime/ssr/renderBody.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | // import "babel-polyfill"; 3 | import React from "react"; 4 | import { renderToString } from "react-dom/server"; 5 | import { StaticRouter } from "react-router"; 6 | 7 | import { 8 | getDataFromTree, 9 | ApolloClient, 10 | ApolloProvider as Provider, 11 | } from "react-apollo"; 12 | 13 | import createNetworkInterface from "../../data/graphql/networkInterface.server"; 14 | // import { createContextFromRequestEvent } from "../graphql"; 15 | 16 | import type { ILambdaContext, ILambdaEvent, IConfig } from "./withApp"; 17 | 18 | type StaticRouterContext = { 19 | url?: string, 20 | }; 21 | 22 | type IRenderShape = { 23 | event: ILambdaEvent, 24 | context: StaticRouterContext, 25 | ctx: ILambdaContext, 26 | App: any, // can't figure out this flow error 27 | config: IConfig, 28 | }; 29 | 30 | type IRenderResult = { 31 | context: StaticRouterContext, 32 | ctx: ILambdaContext, 33 | body: string, 34 | config: IConfig, 35 | initialState: mixed, 36 | }; 37 | 38 | export default async ({ 39 | event, 40 | context, 41 | ctx, 42 | App, 43 | config, 44 | }: IRenderShape): Promise => { 45 | const networkInterface = createNetworkInterface(); 46 | // networkInterface.use([ 47 | // { 48 | // applyMiddleware: (payload: { context: mixed }, next) => { 49 | // payload.context = createContextFromRequestEvent(event); 50 | // next(); 51 | // }, 52 | // }, 53 | // ]); 54 | 55 | // this is where we would add custom middleware for creating context 56 | const client = new ApolloClient({ 57 | networkInterface, 58 | ssrMode: true, 59 | }); 60 | 61 | const RockNative = ( 62 | 63 | 64 | 65 | 66 | 67 | ); 68 | 69 | // load data from db using graphql connected components 70 | await getDataFromTree(RockNative); 71 | 72 | return { 73 | context, 74 | ctx, 75 | config, 76 | body: renderToString(RockNative), 77 | initialState: { apollo: client.getInitialState() }, 78 | }; 79 | }; 80 | -------------------------------------------------------------------------------- /src/runtime/ssr/withApp.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | import type { Component } from "react"; 4 | 5 | type StaticRouterContext = { 6 | url?: string, 7 | }; 8 | 9 | export type IResponseData = { 10 | statusCode: number, 11 | headers: { [header: string]: string }, 12 | body: string, 13 | }; 14 | 15 | export type ILambdaContext = { 16 | done: (err: Error, payload: any) => void, 17 | succeed: IResponseData => void, 18 | }; 19 | 20 | export type ILambdaEvent = { 21 | path: string, 22 | headers: { 23 | [key: string]: string, 24 | authorization?: string, 25 | }, 26 | requestContext: { 27 | stage: string, 28 | identity?: { 29 | sourceIp: string, 30 | }, 31 | }, 32 | }; 33 | 34 | export type IConfig = { 35 | manifests?: ?{ [key: string]: string }, 36 | }; 37 | 38 | export default (App: Component, config: IConfig) => ( 39 | event: ILambdaEvent, 40 | ctx: ILambdaContext, 41 | ): { 42 | event: ILambdaEvent, 43 | ctx: ILambdaContext, 44 | context: StaticRouterContext, 45 | App: Component, 46 | config: IConfig, 47 | } => ({ 48 | event, 49 | ctx, 50 | context: {}, 51 | App, 52 | config, 53 | }); 54 | -------------------------------------------------------------------------------- /src/runtime/ssr/withMeta.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import Helmet from "react-helmet"; 3 | import type { Head } from "react-helmet"; 4 | 5 | type IMetaDataResult = { 6 | [key: any]: any, 7 | metadata: Head, 8 | }; 9 | 10 | export default (x: any): IMetaDataResult => ({ 11 | ...x, 12 | metadata: Helmet.renderStatic(), 13 | }); 14 | -------------------------------------------------------------------------------- /src/test-utils/WebDriver.js: -------------------------------------------------------------------------------- 1 | if (jasmine) jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000; 2 | import "chromedriver"; 3 | import webdriver from "selenium-webdriver"; 4 | 5 | // FUTURE: See https://www.npmjs.com/package/selenium-standalone for standalone server 6 | 7 | // const username = process.env.SAUCE_USERNAME; 8 | // const accessKey = process.env.SAUCE_ACCESS_KEY; 9 | 10 | export default { 11 | create: function(/* env */) { 12 | // XXX turn back on saucelabs? Maybe? 13 | // if (process.env.TRAVIS_JOB_NUMBER) { 14 | // return new webdriver.Builder() 15 | // .withCapabilities({ 16 | // browserName: "chrome", 17 | // version: "56", 18 | // "tunnel-identifier": process.env.TRAVIS_JOB_NUMBER, 19 | // build: process.env.TRAVIS_BUILD_NUMBER, 20 | // }) 21 | // .usingServer( 22 | // "http://" + username + ":" + accessKey + "@localhost:4445/wd/hub", 23 | // ) 24 | // .build(); 25 | // } 26 | return new webdriver.Builder().forBrowser("chrome").build(); 27 | }, 28 | utils: webdriver, 29 | }; 30 | -------------------------------------------------------------------------------- /web/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | # build the project 3 | npm run web-build 4 | # deploy to now 5 | URL=$(now ./web --docker -e NODE_ENV=production --token ${NOW_TOKEN}) 6 | # alias to now 7 | now --token ${NOW_TOKEN} alias set ${URL} ${TRAVIS_BRANCH}.now.sh 8 | # respond to github with link 9 | commit-status "success" "web-deploy" "PR deployed succesfully!" https://${TRAVIS_BRANCH}.now.sh -------------------------------------------------------------------------------- /web/handler.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./server").RockNative; -------------------------------------------------------------------------------- /web/serverless.yml: -------------------------------------------------------------------------------- 1 | service: rock-native 2 | 3 | provider: 4 | name: aws 5 | runtime: nodejs6.10 6 | 7 | package: 8 | artifact: dist.zip 9 | 10 | plugins: 11 | - serverless-offline 12 | 13 | functions: 14 | ssr: 15 | handler: handler.ssr 16 | events: 17 | - http: 18 | method: get 19 | path: /{proxy+} 20 | graphql: 21 | handler: handler.graphql 22 | events: 23 | - http: 24 | method: post 25 | path: /graphql 26 | graphiql: 27 | handler: handler.graphiql 28 | events: 29 | - http: 30 | method: get 31 | path: /graphql 32 | -------------------------------------------------------------------------------- /web/webpack.base.js: -------------------------------------------------------------------------------- 1 | module.exports = isDevBuild => ({ 2 | stats: { modules: false }, 3 | // performance: { 4 | // hints: isDevBuild ? true : false, 5 | // }, 6 | output: { 7 | filename: "[name].js", 8 | publicPath: "/dist/", // Webpack dev middleware, if enabled, handles requests for this URL prefix 9 | }, 10 | module: { 11 | rules: [ 12 | { 13 | test: /\.js?$/, 14 | exclude: /(node_modules|__tests__)/, 15 | use: "babel-loader", 16 | }, 17 | ], 18 | }, 19 | plugins: [], 20 | }); 21 | -------------------------------------------------------------------------------- /web/webpack.server.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const webpack = require("webpack"); 3 | const merge = require("webpack-merge"); 4 | const CopyWebpackPlugin = require("copy-webpack-plugin"); 5 | const ZipPlugin = require("zip-webpack-plugin"); 6 | 7 | const sharedConfig = require("./webpack.base"); 8 | 9 | module.exports = env => { 10 | const isDevBuild = !(env && env.prod); 11 | 12 | // Configuration for server-side (prerendering) bundle suitable for running in Node 13 | const serverBundleConfig = merge(sharedConfig(isDevBuild), { 14 | resolve: { 15 | mainFields: ["main"], 16 | extensions: [".server.js", ".web.js", ".js"], 17 | }, 18 | entry: { 19 | server: [ 20 | "regenerator-runtime/runtime", 21 | path.join(__dirname, "..", "./index.server.js"), 22 | ], 23 | }, 24 | plugins: [ 25 | new webpack.ContextReplacementPlugin(/blocks/, /^index\.js/, false), 26 | new webpack.DllReferencePlugin({ 27 | context: __dirname, 28 | manifest: require(path.join( 29 | __dirname, 30 | "dist", 31 | "server", 32 | "vendor-manifest.json" 33 | )), 34 | sourceType: "commonjs2", 35 | name: "./vendor", 36 | }), 37 | new CopyWebpackPlugin([ 38 | { 39 | from: path.join(__dirname, "handler.js"), 40 | to: path.join(__dirname, "dist", "server"), 41 | }, 42 | { from: path.join(__dirname, "dist", "server", "vendor.js") }, 43 | ]), 44 | ].concat( 45 | isDevBuild 46 | ? [new webpack.NoEmitOnErrorsPlugin(), new webpack.NamedModulesPlugin()] 47 | : [ 48 | new ZipPlugin({ 49 | path: "./../../", 50 | filename: "dist.zip", 51 | include: [/\.js$/], 52 | }), 53 | ] 54 | ), 55 | output: { 56 | libraryTarget: "commonjs", 57 | library: "RockNative", 58 | path: path.join(__dirname, "dist", "server"), 59 | }, 60 | target: "node", 61 | devtool: "inline-source-map", 62 | }); 63 | 64 | return serverBundleConfig; 65 | }; 66 | -------------------------------------------------------------------------------- /web/webpack.vendor.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const webpack = require("webpack"); 3 | const merge = require("webpack-merge"); 4 | const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); 5 | const WebpackAssetsManifest = require("webpack-assets-manifest"); 6 | 7 | module.exports = env => { 8 | const isDevBuild = !(env && env.prod); 9 | 10 | const sharedConfig = { 11 | stats: { modules: false }, 12 | resolve: { 13 | extensions: [".js"], 14 | }, 15 | module: { 16 | rules: [], 17 | }, 18 | entry: { 19 | vendor: [ 20 | "react", 21 | "react-dom", 22 | "react-router", 23 | "react-helmet", 24 | "react-apollo", 25 | "apollo-client", 26 | "graphql-tag", 27 | ], 28 | }, 29 | output: { 30 | publicPath: "/dist/", 31 | filename: "[name].js", 32 | library: "[name]_[hash]", 33 | }, 34 | plugins: [ 35 | new webpack.DefinePlugin({ 36 | "process.env.NODE_ENV": isDevBuild ? '"development"' : '"production"', 37 | }), 38 | ], 39 | }; 40 | 41 | const clientBundleConfig = merge(sharedConfig, { 42 | entry: { 43 | vendor: ["react-router-dom"], 44 | }, 45 | output: { 46 | path: path.join(__dirname, "dist", "client"), 47 | filename: isDevBuild ? "[name].js" : "[name]-[hash].js", 48 | chunkFilename: "[id]-[hash].js", 49 | }, 50 | module: { 51 | rules: [], 52 | }, 53 | plugins: [ 54 | new webpack.DllPlugin({ 55 | path: path.join(__dirname, "dist", "client", "[name]-manifest.json"), 56 | name: "[name]_[hash]", 57 | }), 58 | new WebpackAssetsManifest({ 59 | output: "../manifests/vendor.json", 60 | publicPath: ( 61 | isDevBuild ? "//localhost:8080/dist/client/" : process.env.CDN_URL 62 | ), 63 | }), 64 | ].concat( 65 | isDevBuild 66 | ? [] 67 | : [ 68 | new webpack.optimize.UglifyJsPlugin(), 69 | new BundleAnalyzerPlugin({ 70 | analyzerMode: "disabled", 71 | generateStatsFile: true, 72 | statsFilename: path.join( 73 | __dirname, 74 | "dist", 75 | "stats", 76 | "vendor.json" 77 | ), 78 | logLevel: "silent", 79 | }), 80 | ] 81 | ), 82 | }); 83 | 84 | const serverBundleConfig = merge(sharedConfig, { 85 | target: "node", 86 | resolve: { mainFields: ["main"] }, 87 | output: { 88 | path: path.join(__dirname, "dist", "server"), 89 | libraryTarget: "commonjs2", 90 | }, 91 | module: { 92 | rules: [], 93 | }, 94 | entry: { 95 | vendor: [ 96 | "react-dom/server", 97 | "graphql-server-lambda", 98 | "graphql", 99 | "graphql-tools", 100 | ], 101 | }, 102 | plugins: [ 103 | new webpack.DllPlugin({ 104 | path: path.join(__dirname, "dist", "server", "[name]-manifest.json"), 105 | name: "[name]_[hash]", 106 | }), 107 | ], 108 | }); 109 | 110 | return [clientBundleConfig, serverBundleConfig]; 111 | }; 112 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | *AppPackages* 2 | *BundleArtifacts* 3 | *ReactAssets* 4 | 5 | #OS junk files 6 | [Tt]humbs.db 7 | *.DS_Store 8 | 9 | #Visual Studio files 10 | *.[Oo]bj 11 | *.user 12 | *.aps 13 | *.pch 14 | *.vspscc 15 | *.vssscc 16 | *_i.c 17 | *_p.c 18 | *.ncb 19 | *.suo 20 | *.tlb 21 | *.tlh 22 | *.bak 23 | *.[Cc]ache 24 | *.ilk 25 | *.log 26 | *.lib 27 | *.sbr 28 | *.sdf 29 | *.opensdf 30 | *.opendb 31 | *.unsuccessfulbuild 32 | ipch/ 33 | [Oo]bj/ 34 | [Bb]in 35 | [Dd]ebug*/ 36 | [Rr]elease*/ 37 | Ankh.NoLoad 38 | 39 | # Visual C++ cache files 40 | ipch/ 41 | *.aps 42 | *.ncb 43 | *.opendb 44 | *.opensdf 45 | *.sdf 46 | *.cachefile 47 | *.VC.db 48 | *.VC.VC.opendb 49 | 50 | #MonoDevelop 51 | *.pidb 52 | *.userprefs 53 | 54 | #Tooling 55 | _ReSharper*/ 56 | *.resharper 57 | [Tt]est[Rr]esult* 58 | *.sass-cache 59 | 60 | #Project files 61 | [Bb]uild/ 62 | 63 | #Subversion files 64 | .svn 65 | 66 | # Office Temp Files 67 | ~$* 68 | 69 | # vim Temp Files 70 | *~ 71 | 72 | #NuGet 73 | packages/ 74 | *.nupkg 75 | 76 | #ncrunch 77 | *ncrunch* 78 | *crunch*.local.xml 79 | 80 | # visual studio database projects 81 | *.dbmdl 82 | 83 | #Test files 84 | *.testsettings 85 | 86 | #Other files 87 | *.DotSettings 88 | .vs/ 89 | *project.lock.json 90 | -------------------------------------------------------------------------------- /windows/RockNative/App.xaml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /windows/RockNative/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/StoreLogo.png -------------------------------------------------------------------------------- /windows/RockNative/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /windows/RockNative/MainPage.cs: -------------------------------------------------------------------------------- 1 | using ReactNative; 2 | using ReactNative.Modules.Core; 3 | using ReactNative.Shell; 4 | using System.Collections.Generic; 5 | 6 | namespace RockNative 7 | { 8 | class MainPage : ReactPage 9 | { 10 | public override string MainComponentName 11 | { 12 | get 13 | { 14 | return "RockNative"; 15 | } 16 | } 17 | 18 | #if BUNDLE 19 | public override string JavaScriptBundleFile 20 | { 21 | get 22 | { 23 | return "ms-appx:///ReactAssets/index.windows.bundle"; 24 | } 25 | } 26 | #endif 27 | 28 | public override List Packages 29 | { 30 | get 31 | { 32 | return new List 33 | { 34 | new MainReactPackage(), 35 | }; 36 | } 37 | } 38 | 39 | public override bool UseDeveloperSupport 40 | { 41 | get 42 | { 43 | #if !BUNDLE || DEBUG 44 | return true; 45 | #else 46 | return false; 47 | #endif 48 | } 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /windows/RockNative/Package.appxmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | RockNative 18 | React Native for UWP 19 | Assets\StoreLogo.png 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /windows/RockNative/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("RockNative")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("RockNative")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /windows/RockNative/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /windows/RockNative/RockNative_TemporaryKey.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NewSpring/Rock-Native/3abb01519373938db6b7fdef6465796c3b5db3e3/windows/RockNative/RockNative_TemporaryKey.pfx -------------------------------------------------------------------------------- /windows/RockNative/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2" 4 | }, 5 | "frameworks": { 6 | "uap10.0": {} 7 | }, 8 | "runtimes": { 9 | "win10-arm": {}, 10 | "win10-arm-aot": {}, 11 | "win10-x86": {}, 12 | "win10-x86-aot": {}, 13 | "win10-x64": {}, 14 | "win10-x64-aot": {} 15 | } 16 | } 17 | --------------------------------------------------------------------------------