├── .eslintrc.json ├── .gitignore ├── .nvmrc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── CREDITS.md ├── README.md ├── elm-package.json ├── examples ├── kitchenSink │ ├── elm-package.json │ ├── package.json │ ├── public │ │ ├── firebase.json.example │ │ └── index.html │ ├── src │ │ └── Main.elm │ └── yarn.lock └── writer │ ├── elm-package.json │ ├── package.json │ ├── public │ └── index.html │ ├── src │ └── Main.elm │ └── yarn.lock ├── package.json ├── src ├── Firebase.elm ├── Firebase │ ├── Authentication.elm │ ├── Authentication │ │ ├── Types.elm │ │ └── User.elm │ ├── Database.elm │ ├── Database │ │ ├── OnDisconnect.elm │ │ ├── Query.elm │ │ ├── Reference.elm │ │ ├── Snapshot.elm │ │ └── Types.elm │ └── Errors.elm └── Native │ ├── Authentication.js │ ├── Authentication │ └── User.js │ ├── Database.js │ ├── Database │ ├── OnDisconnect.js │ ├── Query.js │ ├── Reference.js │ └── Snapshot.js │ ├── Firebase.js │ └── Shared.js ├── tests ├── .gitignore ├── Main.elm ├── Tests.elm └── elm-package.json └── yarn.lock /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true 4 | }, 5 | "extends": "eslint:recommended", 6 | "rules": { 7 | "indent": [ 8 | "error", 9 | 2 10 | ], 11 | "linebreak-style": [ 12 | "error", 13 | "unix" 14 | ], 15 | "quotes": [ 16 | "error", 17 | "double" 18 | ], 19 | "semi": [ 20 | "error", 21 | "never" 22 | ], 23 | "consistent-return": 2 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | elm-stuff 2 | node_modules 3 | 4 | examples/kitchenSink/public/firebase.json 5 | examples/kitchenSink/public/main.js 6 | examples/writer/public/main.js 7 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 6.9.5 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | To contribute to this list, just add a new date at the top of the list using an h2 `##` and add h3 `###` headings for Fixed, Added, Known Bugs 4 | 5 | 6 | ## May 2, 2017 7 | 8 | ### Fixed 9 | 10 | *Nothing* 11 | 12 | ### Added 13 | 14 | - Merged in [PR#26](https://github.com/pairshaped/elm-firebase/pull/26) by [@ryanucode](https://github.com/ryanucode), adding support for `projectId : String` in `Firebase.Config`. 15 | 16 | ### Known Bugs 17 | 18 | - [#27](https://github.com/pairshaped/elm-firebase/issues/27) Runtime exceptions can be generated by passing empty strings to many of the references and query methods, spotted by [@ryanucode](https://github.com/ryanucode) 19 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Code Standards 2 | 3 | ## Submitting a PR 4 | 5 | Here is a checklist of things you should do before submitting a PR. 6 | 7 | - Test the code. If there isn't a reasonable test or example demonstrating the new feature or fix, please write one. 8 | - Ensure all the code is checked with `yarn eslint` and `yarn elm-format` so it conforms to any code standards set in this project. 9 | - Be descriptive in the PR about what changes have occured - if it is a bug fix, demonstrate and explain the bug, and explain how your code fixes it. If it is a new feature, explain what it does and why it should be included. 10 | - Maintain your PR branch so there are no merge conflicts. The turn-around time for merging may not always be immediate, and your branch may get out of sync. 11 | 12 | # Contributor Covenant Code of Conduct 13 | 14 | ## Our Pledge 15 | 16 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 17 | 18 | ## Our Standards 19 | 20 | Examples of behavior that contributes to creating a positive environment include: 21 | 22 | - Using welcoming and inclusive language 23 | - Being respectful of differing viewpoints and experiences 24 | - Gracefully accepting constructive criticism 25 | - Focusing on what is best for the community 26 | - Showing empathy towards other community members 27 | 28 | Examples of unacceptable behavior by participants include: 29 | 30 | - The use of sexualized language or imagery and unwelcome sexual attention or advances 31 | - Trolling, insulting/derogatory comments, and personal or political attacks 32 | - Public or private harassment 33 | - Publishing others' private information, such as a physical or electronic address, without explicit permission 34 | - Other conduct which could reasonably be considered inappropriate in a professional setting 35 | 36 | ## Our Responsibilities 37 | 38 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 41 | 42 | ## Scope 43 | 44 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 45 | 46 | ## Enforcement 47 | 48 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at dev@pairshaped.ca. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 49 | 50 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 51 | 52 | ## Attribution 53 | 54 | This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4. 55 | -------------------------------------------------------------------------------- /CREDITS.md: -------------------------------------------------------------------------------- 1 | ## Credits 2 | 3 | - [@tilmans](https://github.com/tilmans) - Early adopter, and guinea pig for all that code I should have tested and haven't yet. 4 | - [@ucode](https://github.com/ucode) - Brought the new firebase environment initialization to my attention. 5 | - [@ryanucode](https://github.com/ryanucode) - PR to include `projectId` in `Firebase.Config` 6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Important Note: 2 | 3 | The library is no longer being maintained and hasn't been updated to work with Elm 0.19. You're better off using ports instead. 4 | 5 | # WARNING 6 | 7 | ## The state of this library 8 | 9 | The current state of this is very limited, and this is very much in **alpha**. Consider the API in flux. 10 | 11 | It is completely possible that master will be broken at any given time until we hit a stable 1.x. 12 | 13 | ## Elm guarantees 14 | 15 | In it's current state, **elm-firebase completely removes any runtime guarantees that Elm provides**. This is because firebase is a close-source black box, full of mystery and wonder, which makes it very untestable. When you use this library, you are risking, as [@rtfeldman](https://github.com/rtfeldman) put it; "wrapping a JS library where you can't even know how it works is just bound to cost you hours of debugging down the line". 16 | 17 | With that in mind, feel free to play with this, but use it at your own risk. 18 | 19 | # Alternatives 20 | 21 | - [elmfire](https://github.com/ThomasWeiser/elmfire) 22 | - Using elm [port modules](https://guide.elm-lang.org/interop/javascript.html) 23 | 24 | # elm-firebase 25 | 26 | **elm-firebase** is a set of bindings between Elm >= 0.18 and Firebase 3.x. 27 | 28 | ## Goals 29 | 30 | - Be as close to the javascript api as possible. 31 | - Follow the elm architecture. 32 | 33 | ## Getting started 34 | 35 | ### Elm 36 | 37 | First, you'll need to install [elm-github-install](https://github.com/gdotdesign/elm-github-install). 38 | 39 | ```bash 40 | $ npm install elm-github-install -g 41 | ``` 42 | 43 | Then you can add elm-firebase to your elm-package.json like so: 44 | 45 | ```json 46 | { 47 | "dependencies": { 48 | "pairshaped/elm-firebase": "0.0.13 <= v < 1.0.0" 49 | }, 50 | "dependency-sources": { 51 | "pairshaped/elm-firebase": { 52 | "url": "https://github.com/pairshaped/elm-firebase", 53 | "ref": "0.0.13" 54 | } 55 | } 56 | } 57 | ``` 58 | 59 | Now you're ready to install! 60 | 61 | ```bash 62 | $ elm-github-install 63 | ``` 64 | 65 | ### Your HTML files 66 | 67 | You'll need to include the firebase javascripts yourself. That could either mean bower, webpack+npm, or using the gstatic cdn. 68 | 69 | Here are a list of firebase versions that have or will be tested: 70 | 71 | | Version | Works? | CDN Link | 72 | |---------|----------|----------| 73 | | 3.6.9 | YES | https://www.gstatic.com/firebasejs/3.6.9/firebase.js | 74 | | 3.7.1 | Probably | https://www.gstatic.com/firebasejs/3.7.1/firebase.js | 75 | | 3.7.4 | YES | https://www.gstatic.com/firebasejs/3.7.4/firebase.js | 76 | | 3.8.0 | Probably | https://www.gstatic.com/firebasejs/3.8.0/firebase.js | 77 | | 3.9.0 | YES | https://www.gstatic.com/firebasejs/3.9.0/firebase.js | 78 | 79 | If you run into a weird or unexplainable bug, please ensure you are using a version that has been tested and verified. 80 | 81 | I expect all the 3.x firebase versions to work but sticking to known versions will help eliminate potential bugs if a method's behaviour is changed. 82 | 83 | ## Key differences to the library keep things simple in Elm 84 | 85 | - `snapshot.val()` maps to `Firebase.Database.Snapshot.value snapshot` rather than `Firebase.Database.Snapshot.val snapshot`. I chose to be more explicit because I thought `val` wasn't as meaningful as it could be. 86 | - `reference.on`, `reference.off`, `query.on`, and `query.off` map to singular subscription methods: `Firebase.Database.Reference.on` and `Firebase.Database.Query.on` respectively. 87 | When you're done, just remove your subscription from `Sub.batch` and elm-firebase will do the rest! 88 | 89 | ## Connecting to your firebase database 90 | 91 | ```elm 92 | import Html 93 | import Firebase 94 | import Firebase.Database.Types 95 | import Firebase.Database.Reference 96 | import Firebase.Database.Snapshot 97 | 98 | 99 | 100 | main = 101 | Html.program 102 | { init = init 103 | , update = update 104 | , subscriptions = \_ -> Sub.none 105 | , view = -- ... 106 | } 107 | 108 | type alias Model = 109 | { app : Firebase.App 110 | , db : Firebase.Database.Types.Database 111 | } 112 | 113 | 114 | init : ( Model, Cmd Msg ) 115 | init = 116 | let 117 | app : Firebase.App 118 | app = 119 | Firebase.init 120 | { apiKey = "your firebase api key" 121 | , databaseURL = "https://your-firebase-app.firebaseio.com" 122 | , -- These are necessary for just connecting to your database 123 | authDomain = "" 124 | , storageBucket = "" 125 | , messagingSenderId = "" 126 | , projectId = "" 127 | } 128 | 129 | {- 130 | It's not necessary to store the database, but it will make it easier 131 | since all your database interactions are going to either be in `update` 132 | or `subscriptions`, and both have access to your model. 133 | -} 134 | db : Firebase.Database.Types.Database 135 | db = 136 | Firebase.Database.init app 137 | 138 | initialModel : Model 139 | initialModel = 140 | { app = app 141 | , db = db 142 | } 143 | in 144 | ( initialModel 145 | , Cmd.none 146 | ) 147 | ``` 148 | 149 | ## Getting the value of a reference 150 | 151 | ```elm 152 | import Firebase 153 | import Firebase.Database.Types 154 | import Firebase.Database.Reference 155 | import Firebase.Database.Snapshot 156 | 157 | 158 | 159 | -- Same main/model/init stuff as above... 160 | 161 | 162 | type Msg 163 | = GetValueOfFoo 164 | | FooValue Firebase.Database.Types.Snapshot 165 | 166 | 167 | update : Msg -> Model -> ( Model, Cmd Msg ) 168 | update msg model = 169 | GetValueOfFoo -> 170 | let 171 | fooRef : Firebase.Database.Types.Reference 172 | fooRef = 173 | model.db 174 | |> Firebase.Database.ref (Just "foo") 175 | in 176 | ( model 177 | , Task.perform FooValue (Firebase.Database.Reference.once "value" fooRef) 178 | ) 179 | 180 | FooValue snapshot -> 181 | let 182 | {- 183 | This decodes the value of "/foo" as a string. 184 | -} 185 | value : Result String String 186 | value = 187 | snapshot 188 | |> Firebase.Database.Snapshot.value -- Gives us a Json.Decode.Value 189 | |> Json.Decode.decodeValue Json.Decode.string -- Convert into a Result String a (where a is a String) 190 | |> Debug.log "FooValue.value.result" -- Output the result (either `Err decodeMessage` or `Ok value`) 191 | in 192 | ( model 193 | , Cmd.none 194 | ) 195 | ``` 196 | 197 | 198 | ## Subscribing to changes of a reference 199 | 200 | ```elm 201 | import Firebase 202 | import Firebase.Database.Types 203 | import Firebase.Database.Reference 204 | import Firebase.Database.Snapshot 205 | 206 | 207 | 208 | main = 209 | Html.program 210 | { init = init 211 | , update = update 212 | , subscriptions = subscriptions 213 | , view = -- ... 214 | } 215 | 216 | 217 | 218 | -- Same model/init as above... 219 | 220 | 221 | type Msg 222 | = FooValue Firebase.Database.Types.Snapshot 223 | 224 | 225 | update : Msg -> Model -> ( Model, Cmd Msg ) 226 | update msg model = 227 | FooValue snapshot -> 228 | let 229 | {- 230 | This decodes the value of "/foo" as a string. 231 | -} 232 | value : Result String String 233 | value = 234 | snapshot 235 | |> Firebase.Database.Snapshot.value -- Gives us a Json.Decode.Value 236 | |> Json.Decode.decodeValue Json.Decode.string -- Convert into a Result String a (where a is a String) 237 | |> Debug.log "FooValue.value.result" -- Output the result (either `Err decodeMessage` or `Ok value`) 238 | in 239 | ( model 240 | , Cmd.none 241 | ) 242 | 243 | 244 | subscriptions : Model -> Sub Msg 245 | subscriptions model = 246 | let 247 | fooRef : Firebase.Database.Types.Reference 248 | fooRef = 249 | model.db 250 | |> Firebase.Database.ref (Just "foo") 251 | in 252 | Sub.batch 253 | [ Firebase.Database.Reference.on "value" fooRef FooValue 254 | ] 255 | ``` 256 | 257 | ## Example 258 | 259 | Based on excellent advice from [@pdamoc](https://github.com/pdamoc), here is [elm-firebase-todomvc](https://github.com/mrozbarry/elm-firebase-todomvc), and a live demo [here](https://elm-firebase-todomvc.firebaseapp.com/). 260 | 261 | Check out the [kitchen sink](./examples/kitchenSink/src/Main.elm) or [writer](./examples/writer/src/Main.elm) examples for information. 262 | 263 | # Special Thanks 264 | 265 | See [credits](./CREDITS.md) for a list of people who have contributed code, ideas, and support. 266 | -------------------------------------------------------------------------------- /elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.13", 3 | "summary": "Firebase bindings for elm", 4 | "repository": "https://github.com/pairshaped/elm-firebase.git", 5 | "license": "BSD3", 6 | "source-directories": [ 7 | "src" 8 | ], 9 | "exposed-modules": [ 10 | "Firebase", 11 | "Firebase.Errors", 12 | "Firebase.Database", 13 | "Firebase.Database.Query", 14 | "Firebase.Database.Reference", 15 | "Firebase.Database.Snapshot", 16 | "Firebase.Database.OnDisconnect", 17 | "Firebase.Database.Types", 18 | "Firebase.Authentication", 19 | "Firebase.Authentication.Types", 20 | "Firebase.Authentication.User" 21 | ], 22 | "native-modules": true, 23 | "dependencies": { 24 | "elm-lang/core": "5.1.1 <= v < 6.0.0" 25 | }, 26 | "elm-version": "0.18.0 <= v < 0.19.0" 27 | } 28 | -------------------------------------------------------------------------------- /examples/kitchenSink/elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "summary": "elm-firebase example that loads everything", 4 | "repository": "https://github.com/pairshaped/elm-firebase.git", 5 | "license": "BSD3", 6 | "native-modules": true, 7 | "source-directories": [ 8 | ".", 9 | "../../src" 10 | ], 11 | "exposed-modules": [], 12 | "dependencies": { 13 | "elm-lang/core": "5.1.1 <= v < 6.0.0", 14 | "elm-lang/html": "2.0.0 <= v < 3.0.0" 15 | }, 16 | "elm-version": "0.18.0 <= v < 0.19.0" 17 | } 18 | -------------------------------------------------------------------------------- /examples/kitchenSink/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kitchen-sink", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.html", 6 | "scripts": { 7 | "serve": "elm-live src/Main.elm --output=public/main.js --dir=public" 8 | }, 9 | "author": "mrozbarry", 10 | "license": "BSD-3-Clause", 11 | "dependencies": { 12 | }, 13 | "devDependencies": { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/kitchenSink/public/firebase.json.example: -------------------------------------------------------------------------------- 1 | { 2 | "apiKey": "", 3 | "authDomain": "", 4 | "databaseURL": "", 5 | "storageBucket": "", 6 | "messagingSenderId": "", 7 | "projectId": "" 8 | } 9 | -------------------------------------------------------------------------------- /examples/kitchenSink/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | This demo requires a bit of setup to get going. 10 |
11 | You will need: 12 |
    13 |
  1. A browser that supports fetch()
  2. 14 |
  3. A json file describing your firebase config, see the example structure.
    When you create a firebase database, there will be a butotn on the dashboard "Add Firebase to your web app", just copy the values of the config variable, and make sure you add quotes around the object keys for proper json support.
  4. 15 |
16 |
17 |
18 | 19 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /examples/kitchenSink/src/Main.elm: -------------------------------------------------------------------------------- 1 | module Main exposing (..) 2 | 3 | import Html exposing (Html, div, text, button) 4 | import Html.Events exposing (onClick) 5 | import Html.Attributes exposing (value) 6 | import Task exposing (Task) 7 | import Json.Decode 8 | import Dict exposing (Dict) 9 | import Firebase 10 | import Firebase.Errors exposing (Error) 11 | import Firebase.Database 12 | import Firebase.Database.Query 13 | import Firebase.Database.Reference 14 | import Firebase.Database.Snapshot 15 | import Firebase.Database.Types exposing (Database, Query, Reference, Snapshot) 16 | import Firebase.Authentication 17 | import Firebase.Authentication.User 18 | import Firebase.Authentication.Types exposing (Auth, User) 19 | 20 | 21 | -- Entry Point 22 | 23 | 24 | main = 25 | let 26 | subscriptions : Model -> Sub Msg 27 | subscriptions model = 28 | let 29 | subscribeToReference : List (Sub Msg) 30 | subscribeToReference = 31 | if model.subscription then 32 | [ Firebase.Database.Reference.on "value" model.subRef SubscriptionChange ] 33 | else 34 | [] 35 | 36 | subscribeToQuery : List (Sub Msg) 37 | subscribeToQuery = 38 | [ Firebase.Database.Query.on "value" model.subQuery CollectionQuery ] 39 | in 40 | Sub.batch 41 | (List.append subscribeToReference subscribeToQuery) 42 | in 43 | Html.programWithFlags 44 | { init = init 45 | , update = update 46 | , subscriptions = subscriptions 47 | , view = view 48 | } 49 | 50 | 51 | 52 | -- Model 53 | 54 | 55 | type alias Model = 56 | { app : Firebase.App 57 | , demo : Maybe String 58 | , test : Maybe { foo : String } 59 | , collection : Maybe (Dict String Int) 60 | , subscription : Bool 61 | , subRef : Reference 62 | , subQuery : Query 63 | , currentUser : Maybe User 64 | } 65 | 66 | 67 | type alias Flags = 68 | { apiKey : String 69 | , authDomain : String 70 | , databaseURL : String 71 | , storageBucket : String 72 | , messagingSenderId : String 73 | , projectId : String 74 | } 75 | 76 | 77 | initialModel : Flags -> Model 78 | initialModel firebaseConfig = 79 | let 80 | app : Firebase.App 81 | app = 82 | Firebase.init firebaseConfig 83 | 84 | database : Database 85 | database = 86 | app 87 | |> Firebase.Database.init 88 | 89 | subRef : Reference 90 | subRef = 91 | database 92 | |> Firebase.Database.ref (Just "subscriptionTest") 93 | 94 | subQuery : Query 95 | subQuery = 96 | database 97 | |> Firebase.Database.ref (Just "collection") 98 | |> Firebase.Database.Reference.orderByValue 99 | |> Firebase.Database.Query.limitToLast 3 100 | in 101 | { app = app 102 | , demo = Nothing 103 | , test = Nothing 104 | , collection = Nothing 105 | , subscription = True 106 | , subRef = subRef 107 | , subQuery = subQuery 108 | , currentUser = Nothing 109 | } 110 | 111 | 112 | init : Flags -> ( Model, Cmd Msg ) 113 | init flags = 114 | let 115 | model : Model 116 | model = 117 | initialModel flags 118 | 119 | ref : Reference 120 | ref = 121 | model.app 122 | |> Firebase.Database.init 123 | |> Firebase.Database.ref (Just "demo") 124 | in 125 | ( model 126 | , Task.perform ReadDemo (Firebase.Database.Reference.once "value" ref) 127 | ) 128 | 129 | 130 | 131 | -- Update 132 | 133 | 134 | type Msg 135 | = ReadDemo Snapshot 136 | | SubscriptionChange Snapshot 137 | | ToggleSubscription 138 | | CollectionQuery Snapshot 139 | | SignInAnonymously 140 | | SignedIn (Result Error User) 141 | | SignOut 142 | | GetApp 143 | | NoOp () 144 | 145 | 146 | update : Msg -> Model -> ( Model, Cmd Msg ) 147 | update msg model = 148 | case msg of 149 | ReadDemo snapshot -> 150 | let 151 | demo : Maybe String 152 | demo = 153 | snapshot 154 | |> Firebase.Database.Snapshot.value 155 | |> Json.Decode.decodeValue (Json.Decode.string) 156 | |> Result.withDefault "" 157 | |> Just 158 | in 159 | ( { model | demo = demo } 160 | , Cmd.none 161 | ) 162 | 163 | SubscriptionChange snapshot -> 164 | let 165 | value : Maybe { foo : String } 166 | value = 167 | let 168 | decoder = 169 | Json.Decode.map 170 | assembleFooObj 171 | (Json.Decode.field "foo" Json.Decode.string) 172 | 173 | assembleFooObj foo = 174 | { foo = foo } 175 | in 176 | snapshot 177 | |> Firebase.Database.Snapshot.value 178 | |> Json.Decode.decodeValue decoder 179 | |> Result.toMaybe 180 | in 181 | ( { model | test = value } 182 | , Cmd.none 183 | ) 184 | 185 | ToggleSubscription -> 186 | ( { model | subscription = not model.subscription } 187 | , Cmd.none 188 | ) 189 | 190 | CollectionQuery snapshot -> 191 | let 192 | value : Maybe (Dict String Int) 193 | value = 194 | let 195 | decoder = 196 | (Json.Decode.dict Json.Decode.int) 197 | in 198 | snapshot 199 | |> Firebase.Database.Snapshot.value 200 | |> Json.Decode.decodeValue decoder 201 | |> Result.toMaybe 202 | in 203 | ( { model | collection = value } 204 | , Cmd.none 205 | ) 206 | 207 | SignInAnonymously -> 208 | let 209 | auth : Auth 210 | auth = 211 | model.app 212 | |> Firebase.Authentication.init 213 | in 214 | ( model 215 | , Task.attempt SignedIn (Firebase.Authentication.signInAnonymously auth) 216 | ) 217 | 218 | SignedIn (Ok user) -> 219 | ( { model | currentUser = Just user } 220 | , Cmd.none 221 | ) 222 | 223 | SignedIn (Err err) -> 224 | let 225 | _ = 226 | Debug.log "SignedIn.fail" err 227 | in 228 | ( { model | currentUser = Nothing } 229 | , Cmd.none 230 | ) 231 | 232 | SignOut -> 233 | let 234 | auth : Auth 235 | auth = 236 | model.app 237 | |> Firebase.Authentication.init 238 | in 239 | ( { model | currentUser = Nothing } 240 | , Task.perform NoOp (Firebase.Authentication.signOut auth) 241 | ) 242 | 243 | GetApp -> 244 | let 245 | _ = 246 | Debug.log "Firebase app" (Firebase.app ()) 247 | in 248 | update (NoOp ()) model 249 | 250 | NoOp _ -> 251 | ( model 252 | , Cmd.none 253 | ) 254 | 255 | 256 | 257 | -- View 258 | 259 | 260 | view : Model -> Html Msg 261 | view model = 262 | div 263 | [] 264 | [ div [] [ text ("Firebase " ++ Firebase.sdkVersion ++ " basic api test") ] 265 | , div [] [ text ("App.name = " ++ (Firebase.name model.app)) ] 266 | , div [] [ text ("App.options = " ++ (toString (Firebase.options model.app))) ] 267 | , div [] [ text ("Number of firebase apps = " ++ (toString <| List.length (Firebase.apps ()))) ] 268 | , div [] [ text ("Demo value = " ++ (toString model.demo)) ] 269 | , div [] [ text ("Subscription value = " ++ (toString model.test)) ] 270 | , button 271 | [ onClick ToggleSubscription 272 | ] 273 | [ text 274 | ("Turn subscription " 275 | ++ (if model.subscription then 276 | "Off" 277 | else 278 | "On" 279 | ) 280 | ) 281 | ] 282 | , div [] [ text ("Collection query = " ++ (toString model.collection)) ] 283 | , viewSignIn model.currentUser 284 | , button 285 | [ onClick GetApp ] 286 | [ text "Check console for current app" ] 287 | ] 288 | 289 | 290 | viewSignIn : Maybe User -> Html Msg 291 | viewSignIn maybeUser = 292 | case maybeUser of 293 | Just user -> 294 | div 295 | [] 296 | [ div [] [ text "Successfully authenticated" ] 297 | , div [] [ text ("Is anonymous? " ++ (toString (Firebase.Authentication.User.isAnonymous user))) ] 298 | , button [ onClick SignOut ] [ text "Sign out" ] 299 | ] 300 | 301 | Nothing -> 302 | button [ onClick SignInAnonymously ] [ text "Sign in anonymously" ] 303 | -------------------------------------------------------------------------------- /examples/kitchenSink/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /examples/writer/elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "summary": "elm-firebase example that tests writes", 4 | "repository": "https://github.com/pairshaped/elm-firebase.git", 5 | "license": "BSD3", 6 | "native-modules": true, 7 | "source-directories": [ 8 | ".", 9 | "../../src" 10 | ], 11 | "exposed-modules": [], 12 | "dependencies": { 13 | "elm-lang/core": "5.1.1 <= v < 6.0.0", 14 | "elm-lang/html": "2.0.0 <= v < 3.0.0" 15 | }, 16 | "elm-version": "0.18.0 <= v < 0.19.0" 17 | } 18 | -------------------------------------------------------------------------------- /examples/writer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kitchen-sink", 3 | "version": "0.0.0", 4 | "description": "", 5 | "main": "index.html", 6 | "scripts": { 7 | "serve": "elm-live src/Main.elm --output=public/main.js --dir=public" 8 | }, 9 | "author": "mrozbarry", 10 | "license": "BSD-3-Clause", 11 | "dependencies": { 12 | }, 13 | "devDependencies": { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/writer/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /examples/writer/src/Main.elm: -------------------------------------------------------------------------------- 1 | module Main exposing (..) 2 | 3 | import Html exposing (Html, div, text, button, label, input, hr, textarea) 4 | import Html.Events exposing (onClick, onInput) 5 | import Html.Attributes exposing (value, for, id, disabled, readonly) 6 | import Task exposing (Task) 7 | import Json.Encode 8 | import Dict exposing (Dict) 9 | import Firebase 10 | import Firebase.Errors exposing (Error) 11 | import Firebase.Database 12 | import Firebase.Database.Reference 13 | import Firebase.Database.Snapshot 14 | import Firebase.Database.Types exposing (Database, Reference, Snapshot) 15 | import Firebase.Authentication 16 | import Firebase.Authentication.Types exposing (User) 17 | 18 | 19 | -- Entry Point 20 | 21 | 22 | main = 23 | let 24 | subscriptions : Model -> Sub Msg 25 | subscriptions model = 26 | case model.reference of 27 | Just ref -> 28 | Sub.batch 29 | [ Firebase.Database.Reference.on "value" ref UpdatedSnapshot 30 | ] 31 | 32 | Nothing -> 33 | Sub.none 34 | in 35 | Html.program 36 | { init = init 37 | , update = update 38 | , subscriptions = subscriptions 39 | , view = view 40 | } 41 | 42 | 43 | 44 | -- Model 45 | 46 | 47 | type alias Model = 48 | { config : Firebase.Config 49 | , app : Maybe Firebase.App 50 | , path : Maybe String 51 | , reference : Maybe Reference 52 | , latestSnapshot : String 53 | , child : String 54 | , value : String 55 | } 56 | 57 | 58 | initialModel : Model 59 | initialModel = 60 | { config = 61 | { apiKey = "" 62 | , authDomain = "" 63 | , databaseURL = "" 64 | , storageBucket = "" 65 | , messagingSenderId = "" 66 | , projectId = "" 67 | } 68 | , app = Nothing 69 | , path = Nothing 70 | , reference = Nothing 71 | , latestSnapshot = "" 72 | , child = "" 73 | , value = "" 74 | } 75 | 76 | 77 | init : ( Model, Cmd Msg ) 78 | init = 79 | ( initialModel 80 | , Cmd.none 81 | ) 82 | 83 | 84 | 85 | -- Update 86 | 87 | 88 | type Msg 89 | = ChangeApiKey String 90 | | ChangeDatabaseURL String 91 | | SetApplication 92 | | UnsetApplication 93 | | ChangePath String 94 | | SetPathReference 95 | | UpdatedSnapshot Snapshot 96 | | ChangeChild String 97 | | ChangeValue String 98 | | SetChildValue 99 | | NoOp () 100 | | WriteStatus (Result Error ()) 101 | 102 | 103 | update : Msg -> Model -> ( Model, Cmd Msg ) 104 | update msg model = 105 | case msg of 106 | ChangeApiKey apiKey -> 107 | let 108 | config : Firebase.Config -> Firebase.Config 109 | config prevConfig = 110 | { prevConfig | apiKey = apiKey } 111 | in 112 | ( { model | config = config model.config } 113 | , Cmd.none 114 | ) 115 | 116 | ChangeDatabaseURL databaseURL -> 117 | let 118 | config : Firebase.Config -> Firebase.Config 119 | config prevConfig = 120 | { prevConfig | databaseURL = databaseURL } 121 | in 122 | ( { model | config = config model.config } 123 | , Cmd.none 124 | ) 125 | 126 | SetApplication -> 127 | let 128 | app : Firebase.App 129 | app = 130 | Firebase.init model.config 131 | 132 | nextModel : Model 133 | nextModel = 134 | { model | app = Just app, path = Nothing, child = "", value = "" } 135 | in 136 | update SetPathReference nextModel 137 | 138 | UnsetApplication -> 139 | case model.app of 140 | Nothing -> 141 | ( model 142 | , Cmd.none 143 | ) 144 | 145 | Just app -> 146 | ( { model | app = Nothing, path = Nothing, child = "", value = "" } 147 | , Task.perform NoOp (Firebase.deinit app) 148 | ) 149 | 150 | ChangePath path -> 151 | let 152 | nextPath : Maybe String 153 | nextPath = 154 | if path == "" then 155 | Nothing 156 | else 157 | Just path 158 | in 159 | ( { model | path = nextPath } 160 | , Cmd.none 161 | ) 162 | 163 | SetPathReference -> 164 | let 165 | reference : Maybe Reference 166 | reference = 167 | case model.app of 168 | Just app -> 169 | app 170 | |> Firebase.Database.init 171 | |> Firebase.Database.ref model.path 172 | |> Just 173 | 174 | Nothing -> 175 | Nothing 176 | in 177 | ( { model | reference = reference } 178 | , Cmd.none 179 | ) 180 | 181 | UpdatedSnapshot snapshot -> 182 | let 183 | latestSnapshot : String 184 | latestSnapshot = 185 | Firebase.Database.Snapshot.value snapshot 186 | |> Json.Encode.encode 2 187 | in 188 | ( { model | latestSnapshot = latestSnapshot } 189 | , Cmd.none 190 | ) 191 | 192 | ChangeChild child -> 193 | ( { model | child = child } 194 | , Cmd.none 195 | ) 196 | 197 | ChangeValue value -> 198 | ( { model | value = value } 199 | , Cmd.none 200 | ) 201 | 202 | SetChildValue -> 203 | let 204 | value : Json.Encode.Value 205 | value = 206 | if model.value == "" then 207 | Json.Encode.null 208 | else 209 | Json.Encode.string model.value 210 | 211 | command : Cmd Msg 212 | command = 213 | case model.reference of 214 | Just ref -> 215 | ref 216 | |> Firebase.Database.Reference.child model.child 217 | |> Firebase.Database.Reference.set value 218 | |> Task.attempt WriteStatus 219 | 220 | Nothing -> 221 | Cmd.none 222 | in 223 | ( model 224 | , command 225 | ) 226 | 227 | NoOp () -> 228 | ( model 229 | , Cmd.none 230 | ) 231 | 232 | WriteStatus (Ok _) -> 233 | let 234 | _ = 235 | Debug.log "Firebase write success" 236 | in 237 | ( model 238 | , Cmd.none 239 | ) 240 | 241 | WriteStatus (Err _) -> 242 | let 243 | _ = 244 | Debug.log "Firebase write fail" 245 | in 246 | ( model 247 | , Cmd.none 248 | ) 249 | 250 | 251 | 252 | -- View 253 | 254 | 255 | view : Model -> Html Msg 256 | view model = 257 | case model.app of 258 | Nothing -> 259 | let 260 | disableSetApplication : Bool 261 | disableSetApplication = 262 | ((String.isEmpty model.config.apiKey) 263 | && (String.isEmpty model.config.databaseURL) 264 | ) 265 | in 266 | div 267 | [] 268 | [ div [] [ text "Firebase Config" ] 269 | , div 270 | [] 271 | [ label [ for "firebase-api-key" ] [ text "Api Key: " ] 272 | , input [ id "firebase-api-key", onInput ChangeApiKey, value model.config.apiKey ] [] 273 | ] 274 | , div 275 | [] 276 | [ label [ for "firebase-database-url" ] [ text "Database URL: " ] 277 | , input [ id "firebase-database-url", onInput ChangeDatabaseURL, value model.config.databaseURL ] [] 278 | ] 279 | , div 280 | [] 281 | [ button [ onClick SetApplication, disabled disableSetApplication ] [ text "Connect to firebase app" ] 282 | ] 283 | ] 284 | 285 | Just _ -> 286 | div 287 | [] 288 | [ div [] [ text "Firebase Config" ] 289 | , div [] [ text ("Api Key: " ++ model.config.apiKey) ] 290 | , div [] [ text ("Database URL: " ++ model.config.databaseURL) ] 291 | , button [ onClick UnsetApplication ] [ text "Disconnect from firebase app" ] 292 | , viewPath model 293 | ] 294 | 295 | 296 | viewPath : Model -> Html Msg 297 | viewPath model = 298 | let 299 | path : String 300 | path = 301 | Maybe.withDefault "" model.path 302 | in 303 | div 304 | [] 305 | [ hr [] [] 306 | , div [] [ text "Set database root path" ] 307 | , div 308 | [] 309 | [ label [ for "path" ] [ text "Root path (can be blank): " ] 310 | , input [ id "path", onInput ChangePath, value path ] [] 311 | ] 312 | , button [ onClick SetPathReference ] [ text "Subscribe" ] 313 | , viewUpdate model 314 | ] 315 | 316 | 317 | viewUpdate : Model -> Html Msg 318 | viewUpdate model = 319 | div 320 | [] 321 | [ hr [] [] 322 | , textarea [ readonly True, value model.latestSnapshot ] [] 323 | , div 324 | [] 325 | [ label [ for "child" ] [ text "Child path: " ] 326 | , input [ id "child", onInput ChangeChild, value model.child ] [] 327 | ] 328 | , div 329 | [] 330 | [ label [ for "value" ] [ text "New value (strings/empties only): " ] 331 | , input [ id "value", onInput ChangeValue, value model.value ] [] 332 | ] 333 | , button [ onClick SetChildValue ] [ text "Set child value" ] 334 | ] 335 | -------------------------------------------------------------------------------- /examples/writer/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "elm-firebase", 3 | "version": "0.0.1", 4 | "description": "Firebase 3 bindings for elm", 5 | "main": "index.js", 6 | "scripts": { 7 | "eslint": "./node_modules/.bin/eslint --fix ./src/Native/**/*.js", 8 | "elm-format": "elm-format src/**/*.elm", 9 | "test": "./node_modules/elm-test/bin/elm-test", 10 | "firebaseServer": "./node_modules/firebase-server/bin/firebase-server" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/pairshaped/elm-firebase.git" 15 | }, 16 | "keywords": [ 17 | "elm", 18 | "firebase", 19 | "firebase-v3" 20 | ], 21 | "author": "Pairshaped, Inc", 22 | "license": "MIT", 23 | "bugs": { 24 | "url": "https://github.com/pairshaped/elm-firebase/issues" 25 | }, 26 | "homepage": "https://github.com/pairshaped/elm-firebase#readme", 27 | "devDependencies": { 28 | "eslint": "^3.16.1", 29 | "elm-test": "^0.18.2", 30 | "firebase": "^3.6.10", 31 | "firebase-server": "^0.9.1" 32 | }, 33 | "dependencies": { 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Firebase.elm: -------------------------------------------------------------------------------- 1 | module Firebase 2 | exposing 3 | ( App 4 | , Config 5 | , sdkVersion 6 | , apps 7 | , app 8 | , init 9 | , initWithName 10 | , deinit 11 | , name 12 | , options 13 | ) 14 | 15 | {-| elm-firebase is a near 1-to-1 wrapper around the [Firebase 3](https://firebase.google.com) javascript library. 16 | 17 | # Definitions 18 | @docs App, Config 19 | 20 | # App methods 21 | @docs app, init, initWithName, deinit, name, options 22 | 23 | # Helpers 24 | @docs sdkVersion, apps 25 | 26 | -} 27 | 28 | import Task exposing (Task) 29 | import Native.Firebase 30 | import Native.Shared 31 | 32 | 33 | -- Model 34 | 35 | 36 | {-| App is a wrapper around [firebase.app.App](https://firebase.google.com/docs/reference/js/firebase.app.App) 37 | 38 | This represents an instance of `firebase.app.App` 39 | -} 40 | type App 41 | = App 42 | 43 | 44 | {-| Config is a helper type to configure your app. 45 | 46 | In the firebase project dashboard overview, you can get the values for this record by clicking *Add Firebase to your web app*. 47 | -} 48 | type alias Config = 49 | { apiKey : String 50 | , authDomain : String 51 | , databaseURL : String 52 | , storageBucket : String 53 | , messagingSenderId : String 54 | , projectId : String 55 | } 56 | 57 | 58 | 59 | -- Firebase methods 60 | 61 | 62 | {-| Get the sdk version that is loaded on the webpage. 63 | 64 | Firebase.sdkVersion -- Result: 3.0.0 65 | 66 | Maps to `firebase.SDK_VERSION` 67 | -} 68 | sdkVersion : String 69 | sdkVersion = 70 | Native.Firebase.sdkVersion 71 | 72 | 73 | {-| Get a list of all the apps that have been initialized in firebase. 74 | 75 | Maps to `firebase.apps()` 76 | -} 77 | apps : () -> List App 78 | apps = 79 | Native.Firebase.apps 80 | 81 | 82 | {-| Get the currently initialized app if there is one 83 | 84 | Maps to `firebase.app` 85 | -} 86 | 87 | app : () -> Maybe App 88 | app = 89 | Native.Firebase.app 90 | 91 | 92 | {-| Find an app with a given name 93 | 94 | To get the default app: 95 | 96 | ``` 97 | app : Maybe Firebase.App 98 | app = 99 | Firebase.getAppByName "[DEFAULT]" 100 | ``` 101 | 102 | Does not map to a Firebase method, it's just a convenience 103 | -} 104 | getAppByName : String -> Maybe App 105 | getAppByName appName = 106 | apps () 107 | |> List.filter (\app -> (name app) == appName) 108 | |> List.head 109 | 110 | 111 | -- App Methods 112 | 113 | 114 | {-| Given a configuration, initialize a new firebase app instance 115 | 116 | You will need access to the app to get the associated database, authentication, etc. 117 | 118 | Maps to `firebase.initializeApp(configuration, null)` 119 | -} 120 | init : Config -> App 121 | init = 122 | Native.Firebase.init 123 | 124 | 125 | {-| Given a configuration and string, initialize a new firebase app instance 126 | 127 | If you are using multiple firebase apps in your elm application, you will need to 128 | use this method to specify names to your apps. 129 | 130 | Maps to `window.firebase.initializeApp(configuration, name)` 131 | -} 132 | initWithName : Config -> String -> App 133 | initWithName = 134 | Native.Firebase.initWithName 135 | 136 | 137 | {-| Given an application, deinitialize it 138 | 139 | Maps to `firebase.app.App#delete()` 140 | -} 141 | deinit : App -> Task x () 142 | deinit = 143 | Native.Firebase.deinit 144 | 145 | 146 | {-| Given an application, return it's name. 147 | 148 | Often times, this will return "[DEFAULT]" 149 | 150 | Maps to `firebase.app.App#name` 151 | -} 152 | name : App -> String 153 | name = 154 | Native.Firebase.name 155 | 156 | 157 | {-| Given an application, the configuration options 158 | 159 | Maps to `firebase.app.App#options` 160 | -} 161 | options : App -> Config 162 | options = 163 | Native.Firebase.options 164 | -------------------------------------------------------------------------------- /src/Firebase/Authentication.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Authentication 2 | exposing 3 | ( init 4 | , currentUser 5 | , confirmPasswordReset 6 | , createUserWithEmailAndPassword 7 | , fetchProvidersForEmail 8 | , sendPasswordResetEmail 9 | , signInAnonymously 10 | , signInWithEmailAndPassword 11 | , signOut 12 | , verifyPasswordResetCode 13 | ) 14 | 15 | import Task exposing (Task) 16 | import Firebase 17 | import Firebase.Errors exposing (Error) 18 | import Firebase.Authentication.Types exposing (Auth, User) 19 | import Native.Authentication 20 | 21 | 22 | {- TODO: I'm currently skipping the following methods: 23 | 24 | * auth.applyActionCode 25 | * auth.checkActionCode 26 | * auth.getRedirectResult 27 | * auth.onAuthStateChanges 28 | 29 | I will look into adding these later if there are any needs 30 | -} 31 | -- Methods 32 | 33 | 34 | init : Firebase.App -> Auth 35 | init = 36 | Native.Authentication.init 37 | 38 | 39 | currentUser : Auth -> Maybe User 40 | currentUser = 41 | Native.Authentication.currentUser 42 | 43 | 44 | confirmPasswordReset : String -> String -> Auth -> Task Error () 45 | confirmPasswordReset = 46 | Native.Authentication.confirmPasswordReset 47 | 48 | 49 | createUserWithEmailAndPassword : String -> String -> Auth -> Task Error User 50 | createUserWithEmailAndPassword = 51 | Native.Authentication.createUserWithEmailAndPassword 52 | 53 | 54 | fetchProvidersForEmail : String -> Auth -> Task x (List String) 55 | fetchProvidersForEmail = 56 | Native.Authentication.fetchProvidersForEmail 57 | 58 | 59 | sendPasswordResetEmail : String -> Auth -> Task x () 60 | sendPasswordResetEmail = 61 | Native.Authentication.sendPasswordResetEmail 62 | 63 | 64 | signInAnonymously : Auth -> Task Error User 65 | signInAnonymously = 66 | Native.Authentication.signInAnonymously 67 | 68 | 69 | signInWithEmailAndPassword : String -> String -> Auth -> Task Error User 70 | signInWithEmailAndPassword = 71 | Native.Authentication.signInWithEmailAndPassword 72 | 73 | 74 | signOut : Auth -> Task x () 75 | signOut = 76 | Native.Authentication.signOut 77 | 78 | 79 | verifyPasswordResetCode : String -> Auth -> Task x String 80 | verifyPasswordResetCode = 81 | Native.Authentication.verifyPasswordResetCode 82 | -------------------------------------------------------------------------------- /src/Firebase/Authentication/Types.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Authentication.Types exposing (Auth, User) 2 | 3 | type Auth = Auth 4 | type User = User 5 | -------------------------------------------------------------------------------- /src/Firebase/Authentication/User.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Authentication.User 2 | exposing 3 | ( displayName 4 | , email 5 | , emailVerified 6 | , isAnonymous 7 | , photoURL 8 | , providerId 9 | , uid 10 | , reload 11 | , toJSON 12 | ) 13 | 14 | 15 | import Json.Decode 16 | import Task exposing (Task) 17 | import Firebase.Authentication.Types exposing (User) 18 | import Native.Authentication.User 19 | 20 | 21 | {- TODO: 22 | * user.providerData 23 | * refreshToken 24 | * delete 25 | * getToken 26 | * link 27 | * linkWithPopup 28 | * linkWithRedirect 29 | * reauthenticate 30 | * sendEmailVerifiecation 31 | * unlink 32 | * updateEmail 33 | * updatedPassword 34 | * updateProfile 35 | 36 | -} 37 | 38 | -- Property Methods 39 | 40 | 41 | displayName : User -> String 42 | displayName = 43 | Native.Authentication.User.displayName 44 | 45 | 46 | email : User -> String 47 | email = 48 | Native.Authentication.User.email 49 | 50 | 51 | emailVerified : User -> Bool 52 | emailVerified = 53 | Native.Authentication.User.emailVerified 54 | 55 | 56 | isAnonymous : User -> Bool 57 | isAnonymous = 58 | Native.Authentication.User.isAnonymous 59 | 60 | 61 | photoURL : User -> Maybe String 62 | photoURL = 63 | Native.Authentication.User.photoURL 64 | 65 | 66 | providerId : User -> String 67 | providerId = 68 | Native.Authentication.User.providerId 69 | 70 | 71 | uid : User -> String 72 | uid = 73 | Native.Authentication.User.uid 74 | 75 | 76 | -- User Function Methods 77 | 78 | 79 | reload : User -> Task x () 80 | reload = 81 | Native.Authentication.User.reload 82 | 83 | 84 | toJSON : User -> Json.Decode.Value 85 | toJSON = 86 | Native.Authentication.User.toJSON 87 | -------------------------------------------------------------------------------- /src/Firebase/Database.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Database 2 | exposing 3 | ( init 4 | , ref 5 | ) 6 | 7 | {-| Firebase.Database handles database initialization and getting an initial reference 8 | 9 | # Methods 10 | @docs init, ref 11 | -} 12 | 13 | import Firebase 14 | import Native.Database 15 | import Firebase.Database.Types exposing (Database, Reference) 16 | 17 | 18 | {-| Given a Firebase.App, return its Database object 19 | 20 | Maps to `firebase.app.App#database()` 21 | -} 22 | init : Firebase.App -> Database 23 | init = 24 | Native.Database.init 25 | 26 | 27 | {-| Given a Firebase.App, return its Database object 28 | 29 | Maps to `firebase.app.App#database()` 30 | -} 31 | ref : Maybe String -> Database -> Reference 32 | ref = 33 | Native.Database.ref 34 | -------------------------------------------------------------------------------- /src/Firebase/Database/OnDisconnect.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Database.OnDisconnect 2 | exposing 3 | ( cancel 4 | , remove 5 | , set 6 | , setWithPriority 7 | , update 8 | , updateMulti 9 | ) 10 | 11 | 12 | import Json.Encode 13 | import Task exposing (Task) 14 | import Firebase.Database.Types exposing (OnDisconnect) 15 | import Firebase.Errors exposing (Error) 16 | import Native.Database.OnDisconnect 17 | 18 | 19 | cancel : OnDisconnect -> Task Error () 20 | cancel = 21 | Native.Database.OnDisconnect.cancel 22 | 23 | 24 | remove : OnDisconnect -> Task Error () 25 | remove = 26 | Native.Database.OnDisconnect.remove 27 | 28 | 29 | set : Json.Encode.Value -> OnDisconnect -> Task Error () 30 | set = 31 | Native.Database.OnDisconnect.set 32 | 33 | 34 | setWithPriority : Json.Encode.Value -> Json.Encode.Value -> OnDisconnect -> Task Error () 35 | setWithPriority = 36 | Native.Database.OnDisconnect.setWithPriority 37 | 38 | 39 | update : Json.Encode.Value -> OnDisconnect -> Task Error () 40 | update = 41 | Native.Database.OnDisconnect.update 42 | 43 | 44 | updateMulti : List ( String, Json.Encode.Value ) -> OnDisconnect -> Task Error () 45 | updateMulti updates onDisconnect = 46 | update (Json.Encode.object updates) onDisconnect 47 | -------------------------------------------------------------------------------- /src/Firebase/Database/Query.elm: -------------------------------------------------------------------------------- 1 | effect module Firebase.Database.Query 2 | where { subscription = MySub } 3 | exposing 4 | ( ref 5 | , startAt 6 | , endAt 7 | , equalTo 8 | , limitToFirst 9 | , limitToLast 10 | , once 11 | , on 12 | , isEqual 13 | ) 14 | 15 | {-| Firebase Database Queries 16 | 17 | Queries are always built off `Firebase.Database.Reference` calls. See `Firebase.Database.Reference.orderBy*` methods to see how to kick off a query. 18 | 19 | # Utility 20 | 21 | @docs ref, isEqual 22 | 23 | # Query qualifiers 24 | 25 | @docs startAt, endAt, equalTo, limitToFirst, limitToLast 26 | 27 | # Query execution 28 | 29 | @docs once, on 30 | 31 | For more information on all of these functions, see [the firebase docs](https://firebase.google.com/docs/reference/js/firebase.database.Query) 32 | 33 | -} 34 | 35 | import Json.Encode 36 | import Task exposing (Task) 37 | import Firebase.Database.Types exposing (Query, Reference, Snapshot) 38 | import Native.Database.Query 39 | 40 | 41 | {-| Given a query, return it's base reference 42 | 43 | myRef : Firebase.Database.Types.Reference 44 | myRef = 45 | myDatabase 46 | |> Firebase.Database.ref (Just "foo") 47 | |> Firebase.Database.child "bar" 48 | 49 | myQuery : Firebase.Database.Types.Query 50 | myQuery = 51 | myRef 52 | |> Firebase.Database.Reference.orderByKey 53 | 54 | myQueryRef : Firebase.Database.Types.Reference 55 | myQueryRef = 56 | Firebase.Database.Query.ref myQuery 57 | 58 | Firebase.Database.Reference.isEqual myRef myQueryRef 59 | -- => True 60 | 61 | See [firebase.database.Query#ref](https://firebase.google.com/docs/reference/js/firebase.database.Query#ref) for more information 62 | -} 63 | ref : Query -> Reference 64 | ref = 65 | Native.Database.Query.ref 66 | 67 | 68 | {-| Given two queries, detect if they are the same. 69 | 70 | According to the firebase documentation, "Two `Query` objects are equivalent if they represent the same location, have the same query parameters, and are from the same instance of `firebase.app.App`. Equivalent queries share the same sort order, limits, and starting and ending points." 71 | 72 | See [firebase.database.Query#isEqual](https://firebase.google.com/docs/reference/js/firebase.database.Query#isEqual) 73 | -} 74 | isEqual : Query -> Query -> Bool 75 | isEqual = 76 | Native.Database.Query.isEqual 77 | 78 | 79 | {-| Given a Json value, optional string key, and query, specify the start point of a query. 80 | 81 | Start at specifies the first value (is inclusive). If key is specified, you can decrease the total scope of the search. 82 | 83 | The behaviour of startAt changes based on the ordering specified from the reference: 84 | 85 | - orderByChild: value represents the value of the specified child 86 | - orderByKey: value represents the the key 87 | - orderByValue: value represents the first instance of the given value 88 | - orderByPriority: value represents the priority (either a float or string). In all likelihood, you won't use this one. 89 | 90 | If you're not using the optional key, pass a `Nothing` in its place. 91 | 92 | See [firebase.database.Query#startAt](https://firebase.google.com/docs/reference/js/firebase.database.Query#startAt) 93 | -} 94 | startAt : Json.Encode.Value -> Maybe String -> Query -> Query 95 | startAt = 96 | Native.Database.Query.startAt 97 | 98 | 99 | {-| Given a Json value, optional string key, and query, specify the end point of a query. 100 | 101 | End at specifies the last value (is inclusive). If key is specified, you can decrease the total scope of the search. 102 | 103 | The behaviour of endAt changes based on the ordering specified from the reference: 104 | 105 | - orderByChild: value represents the value of the specified child 106 | - orderByKey: value represents the the key 107 | - orderByValue: value represents the last instance of the given value 108 | - orderByPriority: value represents the priority (either a float or string). In all likelihood, you won't use this one. 109 | 110 | If you're not using the optional key, pass a `Nothing` in its place. 111 | 112 | See [firebase.database.Query#endAt](https://firebase.google.com/docs/reference/js/firebase.database.Query#endAt) 113 | -} 114 | endAt : Json.Encode.Value -> Maybe String -> Query -> Query 115 | endAt = 116 | Native.Database.Query.endAt 117 | 118 | 119 | {-| Given a Json value, optional string key, and query, specify the target value of a query. 120 | 121 | Equal to specifies the exact value. If key is specified, you can decrease the total scope of the search. 122 | 123 | The behaviour of equalTo changes based on the ordering specified from the reference: 124 | 125 | - orderByChild: value represents the value of the specified child 126 | - orderByKey: value represents the the key 127 | - orderByValue: value represents all instances of the given value 128 | - orderByPriority: value represents the priority (either a float or string). In all likelihood, you won't use this one. 129 | 130 | If you're not using the optional key, pass a `Nothing` in its place. 131 | 132 | See [firebase.database.Query#equalTo](https://firebase.google.com/docs/reference/js/firebase.database.Query#equalTo) 133 | -} 134 | equalTo : Json.Encode.Value -> Maybe String -> Query -> Query 135 | equalTo = 136 | Native.Database.Query.equalTo 137 | 138 | 139 | {-| Given an integer limitation and query, specify to use only the first n objects from the resulting query. 140 | 141 | See [firebase.database.Query#limitToFirst](https://firebase.google.com/docs/reference/js/firebase.database.Query#limitToFirst) 142 | -} 143 | limitToFirst : Int -> Query -> Query 144 | limitToFirst = 145 | Native.Database.Query.limitToFirst 146 | 147 | 148 | {-| Given an integer limitation and query, specify to use only the last n objects from the resulting query. 149 | 150 | See [firebase.database.Query#limitToLast](https://firebase.google.com/docs/reference/js/firebase.database.Query#limitToLast) 151 | -} 152 | limitToLast : Int -> Query -> Query 153 | limitToLast = 154 | Native.Database.Query.limitToLast 155 | 156 | 157 | {-| Given an event type and query, return a task to capture the result of the query. 158 | 159 | Event types include: 160 | 161 | - `"value"` - get the value of the objects matching the query. 162 | - `"child_added"` - get the first new child in the current query. 163 | - `"child_changed"` - get the first modified child in the current query. 164 | - `"child_removed"` - get the first child modified to by null in the current query. 165 | - `"child_moved"` - get the object where the key has changed in the current query. 166 | 167 | Most likely, with one-off queries using `.once`, you'll be using `"value"`. 168 | 169 | See [firebase.database.Query#once](https://firebase.google.com/docs/reference/js/firebase.database.Query#once) 170 | -} 171 | once : String -> Query -> Task x Snapshot 172 | once = 173 | Native.Database.Query.once 174 | 175 | 176 | {-| Given an event type and query, return a subscription to this query 177 | 178 | Even types include: 179 | 180 | - `"value"` - watch all values matching this query 181 | - `"child_added"` - watch for all new children added matching this query 182 | - `"child_changed"` - watch for all modified children matching this query 183 | - `"child_removed"` - watch for all children that stop matching this query or are deleted 184 | - `"child_moved"` - watch for all children with modified keys matching this query 185 | 186 | See [firebase.database.Query#once](https://firebase.google.com/docs/reference/js/firebase.database.Query#once) 187 | -} 188 | on : String -> Query -> (Snapshot -> msg) -> Sub msg 189 | on event query tagger = 190 | subscription (MySub event query tagger) 191 | 192 | 193 | 194 | -- Effect manager 195 | 196 | 197 | type MySub msg 198 | = MySub String Query (Snapshot -> msg) 199 | 200 | 201 | 202 | -- TODO: What/how does this work. 203 | 204 | 205 | subMap : (a -> b) -> MySub a -> MySub b 206 | subMap func subMsg = 207 | case subMsg of 208 | MySub event ref tagger -> 209 | MySub event ref (tagger >> func) 210 | 211 | 212 | 213 | -- Effect management/State 214 | 215 | 216 | type alias State msg = 217 | { subs : List (MySub msg) 218 | } 219 | 220 | 221 | init : Task x (State msg) 222 | init = 223 | Task.succeed 224 | { subs = [] 225 | } 226 | 227 | 228 | type SelfMsg msg 229 | = ManageSubscriptions { toAdd : List (MySub msg), toRemove : List (MySub msg) } 230 | | Update (Snapshot -> msg) Snapshot 231 | 232 | 233 | 234 | -- Do task 1, discard it's return value, then do task 2 235 | 236 | 237 | (&>) t1 t2 = 238 | Task.andThen (\_ -> t2) t1 239 | 240 | 241 | onEffects : 242 | Platform.Router msg (SelfMsg msg) 243 | -> List (MySub msg) 244 | -> State msg 245 | -> Task never (State msg) 246 | onEffects router newSubs oldState = 247 | let 248 | toAdd : List (MySub msg) 249 | toAdd = 250 | let 251 | notSubscribed (MySub newEvent newQuery _) = 252 | oldState.subs 253 | |> List.filter (\(MySub event query _) -> event == newEvent && (isEqual query newQuery)) 254 | |> List.isEmpty 255 | in 256 | newSubs 257 | |> List.filter notSubscribed 258 | 259 | toRemove : List (MySub msg) 260 | toRemove = 261 | let 262 | subscribed (MySub oldEvent oldQuery _) = 263 | newSubs 264 | |> List.filter (\(MySub event query _) -> event == oldEvent && (isEqual query oldQuery)) 265 | |> List.isEmpty 266 | in 267 | oldState.subs 268 | |> List.filter subscribed 269 | in 270 | Platform.sendToSelf 271 | router 272 | (ManageSubscriptions { toAdd = toAdd, toRemove = toRemove }) 273 | &> Task.succeed { oldState | subs = newSubs } 274 | 275 | 276 | onSelfMsg : Platform.Router msg (SelfMsg msg) -> SelfMsg msg -> State msg -> Task x (State msg) 277 | onSelfMsg router selfMsg oldState = 278 | case selfMsg of 279 | ManageSubscriptions { toAdd, toRemove } -> 280 | let 281 | addAll : Task x (State msg) -> Task x (State msg) 282 | addAll initialState = 283 | List.foldl 284 | addSubscription 285 | initialState 286 | toAdd 287 | 288 | addSubscription : MySub msg -> Task x (State msg) -> Task x (State msg) 289 | addSubscription mySub lastTask = 290 | let 291 | nativeTask : String -> Query -> (Snapshot -> msg) -> Task x () 292 | nativeTask event query tagger = 293 | Native.Database.Query.on 294 | event 295 | query 296 | (\snapshot -> Platform.sendToSelf router (Update tagger snapshot)) 297 | in 298 | case mySub of 299 | MySub event query tagger -> 300 | (nativeTask event query tagger) 301 | &> lastTask 302 | 303 | removeAll : Task x (State msg) -> Task x (State msg) 304 | removeAll initialState = 305 | List.foldl 306 | removeSubscription 307 | initialState 308 | toRemove 309 | 310 | removeSubscription : MySub msg -> Task x (State msg) -> Task x (State msg) 311 | removeSubscription mySub lastTask = 312 | case mySub of 313 | MySub event query tagger -> 314 | let 315 | nativeTask : String -> Query -> Task x () 316 | nativeTask event query = 317 | Native.Database.Query.off 318 | event 319 | query 320 | in 321 | (nativeTask event query) 322 | &> lastTask 323 | in 324 | (Task.succeed oldState) 325 | |> removeAll 326 | |> addAll 327 | 328 | Update tagger snapshot -> 329 | Platform.sendToApp router (tagger snapshot) 330 | &> Task.succeed oldState 331 | -------------------------------------------------------------------------------- /src/Firebase/Database/Reference.elm: -------------------------------------------------------------------------------- 1 | effect module Firebase.Database.Reference 2 | where { subscription = MySub } 3 | exposing 4 | ( key 5 | , parent 6 | , child 7 | , set 8 | , update 9 | , updateMulti 10 | , push 11 | , remove 12 | , orderByChild 13 | , orderByKey 14 | , orderByPriority 15 | , orderByValue 16 | , toString 17 | , once 18 | , on 19 | , isEqual 20 | ) 21 | 22 | import Json.Encode 23 | import Task exposing (Task) 24 | import Firebase.Database.Types exposing (Reference, Snapshot, Query, OnDisconnect) 25 | import Firebase.Errors exposing (Error) 26 | import Native.Database.Reference 27 | 28 | 29 | key : Reference -> String 30 | key = 31 | Native.Database.Reference.key 32 | 33 | 34 | parent : Reference -> Reference 35 | parent = 36 | Native.Database.Reference.parent 37 | 38 | 39 | child : String -> Reference -> Reference 40 | child = 41 | Native.Database.Reference.child 42 | 43 | 44 | set : Json.Encode.Value -> Reference -> Task Error () 45 | set = 46 | Native.Database.Reference.set 47 | 48 | 49 | update : Json.Encode.Value -> Reference -> Task Error () 50 | update = 51 | Native.Database.Reference.update 52 | 53 | 54 | updateMulti : List ( String, Json.Encode.Value ) -> Reference -> Task Error () 55 | updateMulti pathsWithValues ref = 56 | update (Json.Encode.object pathsWithValues) ref 57 | 58 | 59 | push : Reference -> Reference 60 | push = 61 | Native.Database.Reference.push 62 | 63 | 64 | remove : Reference -> Task x () 65 | remove = 66 | Native.Database.Reference.remove 67 | 68 | 69 | orderByChild : String -> Reference -> Query 70 | orderByChild = 71 | Native.Database.Reference.orderByChild 72 | 73 | 74 | orderByKey : Reference -> Query 75 | orderByKey = 76 | Native.Database.Reference.orderByKey 77 | 78 | 79 | orderByPriority : Reference -> Query 80 | orderByPriority = 81 | Native.Database.Reference.orderByPriority 82 | 83 | 84 | orderByValue : Reference -> Query 85 | orderByValue = 86 | Native.Database.Reference.orderByValue 87 | 88 | 89 | toString : Reference -> String 90 | toString = 91 | Native.Database.Reference.toString 92 | 93 | 94 | onDisconnect : Reference -> OnDisconnect 95 | onDisconnect = 96 | Native.Database.Reference.onDisconnect 97 | 98 | 99 | isEqual : Reference -> Reference -> Bool 100 | isEqual = 101 | Native.Database.Reference.isEqual 102 | 103 | 104 | once : String -> Reference -> Task x Snapshot 105 | once = 106 | Native.Database.Reference.once 107 | 108 | 109 | on : String -> Reference -> (Snapshot -> msg) -> Sub msg 110 | on event reference tagger = 111 | subscription (MySub event reference tagger) 112 | 113 | 114 | 115 | -- Effect manager 116 | 117 | 118 | type MySub msg 119 | = MySub String Reference (Snapshot -> msg) 120 | 121 | 122 | 123 | -- TODO: What/how does this work. 124 | 125 | 126 | subMap : (a -> b) -> MySub a -> MySub b 127 | subMap func subMsg = 128 | case subMsg of 129 | MySub event ref tagger -> 130 | MySub event ref (tagger >> func) 131 | 132 | 133 | 134 | -- Effect management/State 135 | 136 | 137 | type alias State msg = 138 | { subs : List (MySub msg) 139 | } 140 | 141 | 142 | init : Task x (State msg) 143 | init = 144 | Task.succeed 145 | { subs = [] 146 | } 147 | 148 | 149 | type SelfMsg msg 150 | = ManageSubscriptions { toAdd : List (MySub msg), toRemove : List (MySub msg) } 151 | | Update (Snapshot -> msg) Snapshot 152 | 153 | 154 | 155 | -- Do task 1, discard it's return value, then do task 2 156 | 157 | 158 | (&>) t1 t2 = 159 | Task.andThen (\_ -> t2) t1 160 | 161 | 162 | onEffects : 163 | Platform.Router msg (SelfMsg msg) 164 | -> List (MySub msg) 165 | -> State msg 166 | -> Task never (State msg) 167 | onEffects router newSubs oldState = 168 | let 169 | toAdd : List (MySub msg) 170 | toAdd = 171 | let 172 | notSubscribed (MySub newEvent newReference _) = 173 | oldState.subs 174 | |> List.filter (\(MySub event reference _) -> event == newEvent && (isEqual reference newReference)) 175 | |> List.isEmpty 176 | in 177 | newSubs 178 | |> List.filter notSubscribed 179 | 180 | toRemove : List (MySub msg) 181 | toRemove = 182 | let 183 | subscribed (MySub oldEvent oldReference tagger) = 184 | newSubs 185 | |> List.filter (\(MySub event reference _) -> event == oldEvent && (isEqual reference oldReference)) 186 | |> List.isEmpty 187 | in 188 | oldState.subs 189 | |> List.filter subscribed 190 | in 191 | Platform.sendToSelf 192 | router 193 | (ManageSubscriptions { toAdd = toAdd, toRemove = toRemove }) 194 | &> Task.succeed { oldState | subs = newSubs } 195 | 196 | 197 | onSelfMsg : Platform.Router msg (SelfMsg msg) -> SelfMsg msg -> State msg -> Task x (State msg) 198 | onSelfMsg router selfMsg oldState = 199 | case selfMsg of 200 | ManageSubscriptions { toAdd, toRemove } -> 201 | let 202 | addAll : Task x (State msg) -> Task x (State msg) 203 | addAll initialState = 204 | List.foldl 205 | addSubscription 206 | initialState 207 | toAdd 208 | 209 | addSubscription : MySub msg -> Task x (State msg) -> Task x (State msg) 210 | addSubscription mySub lastTask = 211 | let 212 | nativeTask : String -> Reference -> (Snapshot -> msg) -> Task x () 213 | nativeTask event reference tagger = 214 | Native.Database.Reference.on 215 | event 216 | reference 217 | (\snapshot -> Platform.sendToSelf router (Update tagger snapshot)) 218 | in 219 | case mySub of 220 | MySub event reference tagger -> 221 | (nativeTask event reference tagger) 222 | &> lastTask 223 | 224 | removeAll : Task x (State msg) -> Task x (State msg) 225 | removeAll initialState = 226 | List.foldl 227 | removeSubscription 228 | initialState 229 | toRemove 230 | 231 | removeSubscription : MySub msg -> Task x (State msg) -> Task x (State msg) 232 | removeSubscription mySub lastTask = 233 | case mySub of 234 | MySub event reference tagger -> 235 | let 236 | nativeTask : String -> Reference -> Task x () 237 | nativeTask event reference = 238 | Native.Database.Reference.off 239 | event 240 | reference 241 | in 242 | (nativeTask event reference) 243 | &> lastTask 244 | in 245 | (Task.succeed oldState) 246 | |> removeAll 247 | |> addAll 248 | 249 | Update tagger snapshot -> 250 | Platform.sendToApp router (tagger snapshot) 251 | &> Task.succeed oldState 252 | -------------------------------------------------------------------------------- /src/Firebase/Database/Snapshot.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Database.Snapshot exposing (..) 2 | 3 | import Json.Decode exposing (decodeValue, nullable, string) 4 | import Firebase.Database.Types exposing (Snapshot, Reference) 5 | import Native.Database.Snapshot 6 | 7 | 8 | key : Snapshot -> Maybe String 9 | key = 10 | Native.Database.Snapshot.key 11 | 12 | 13 | ref : Snapshot -> Reference 14 | ref = 15 | Native.Database.Snapshot.ref 16 | 17 | 18 | child : String -> Snapshot -> Snapshot 19 | child = 20 | Native.Database.Snapshot.child 21 | 22 | 23 | exists : Snapshot -> Bool 24 | exists = 25 | Native.Database.exists 26 | 27 | 28 | exportVal : Snapshot -> Json.Decode.Value 29 | exportVal = 30 | Native.Database.Snapshot.exportVal 31 | 32 | 33 | getPriority : Snapshot -> Json.Decode.Value 34 | getPriority = 35 | Native.Database.Snapshot.getPriority 36 | 37 | 38 | hasChild : String -> Snapshot -> Bool 39 | hasChild = 40 | Native.Database.Snapshot.hasChild 41 | 42 | 43 | hasChildren : Snapshot -> Bool 44 | hasChildren = 45 | Native.Database.Snapshot.hasChildren 46 | 47 | 48 | numChildren : Snapshot -> Int 49 | numChildren = 50 | Native.Database.Snapshot.numChildren 51 | 52 | 53 | value : Snapshot -> Json.Decode.Value 54 | value = 55 | Native.Database.Snapshot.value 56 | 57 | 58 | prevKey : Snapshot -> Maybe String 59 | prevKey = 60 | Native.Database.Snapshot.prevKey 61 | -------------------------------------------------------------------------------- /src/Firebase/Database/Types.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Database.Types exposing (..) 2 | 3 | 4 | type Database 5 | = Database 6 | 7 | 8 | type Reference 9 | = Reference 10 | 11 | 12 | type Query 13 | = Query 14 | 15 | 16 | type Snapshot 17 | = Snapshot 18 | 19 | 20 | type OnDisconnect 21 | = OnDisconnect 22 | -------------------------------------------------------------------------------- /src/Firebase/Errors.elm: -------------------------------------------------------------------------------- 1 | module Firebase.Errors exposing (Error) 2 | 3 | 4 | {-| Errors codes that firebase could return 5 | 6 | # Definitions 7 | @docs Error 8 | 9 | -} 10 | 11 | {-| Error contains the main error codes the average app will face 12 | -} 13 | type Error 14 | = AppDeleted 15 | | AppNotAuthorized 16 | | ArgumentError 17 | | InvalidApiKey 18 | | InvalidUserToken 19 | | NetworkRequestFailed 20 | | OperationNotAllowed 21 | | RequiresRecentLogin 22 | | TooManyRequests 23 | | UnauthorizedDomain 24 | | UserTokenExpired 25 | | WebStorageUnsupported 26 | -------------------------------------------------------------------------------- /src/Native/Authentication.js: -------------------------------------------------------------------------------- 1 | /*global firebase, _elm_lang$core$Native_Scheduler, F2, F3 */ 2 | 3 | var _pairshaped$elm_firebase$Native_Authentication = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Authentication"].concat(Array.prototype.slice.call(arguments)) 9 | // 10 | // console.log.apply(console, args) 11 | } 12 | 13 | 14 | var authToModel = function (auth) { 15 | var getAuth = function () { 16 | return auth 17 | } 18 | 19 | return { 20 | ctor: "Auth", 21 | auth: getAuth 22 | } 23 | } 24 | 25 | 26 | var userToModel = function (user) { 27 | debug(".userToModel", user) 28 | 29 | var getUser = function () { 30 | return user 31 | } 32 | 33 | return { 34 | ctor: "User", 35 | user: getUser 36 | } 37 | } 38 | 39 | 40 | // Authentication methods 41 | 42 | 43 | var init = function (appModel) { 44 | debug(".init", appModel) 45 | var app = appModel.app() 46 | 47 | return authToModel(firebase.auth(app)) 48 | } 49 | 50 | 51 | var currentUser = function (authModel) { 52 | debug(".currentUser", authModel) 53 | var auth = authModel.auth() 54 | 55 | return userToModel( 56 | auth.currentUser 57 | ? { ctor: "Just", _0: auth.currentUser } 58 | : { ctor: "Nothing }"} 59 | ) 60 | } 61 | 62 | 63 | var confirmPasswordReset = function (code, password, authModel) { 64 | debug(".confirmPasswordReset", code, password, authModel) 65 | var auth = authModel.auth() 66 | 67 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 68 | auth.confirmPasswordReset(code, password) 69 | .then(function () { 70 | callback( 71 | _elm_lang$core$Native_Scheduler.succeed( 72 | { ctor: "_Tuple0" } 73 | ) 74 | ) 75 | }) 76 | .catch(function (err) { 77 | callback( 78 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 79 | ) 80 | }) 81 | }) 82 | } 83 | 84 | 85 | var createUserWithEmailAndPassword = function (email, password, authModel) { 86 | debug(".createUserWithEmailAndPassword", email, password, authModel) 87 | var auth = authModel.auth() 88 | 89 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 90 | auth.confirmPasswordReset(email, password) 91 | .then(function (user) { 92 | callback( 93 | _elm_lang$core$Native_Scheduler.succeed( 94 | userToModel(user) 95 | ) 96 | ) 97 | }) 98 | .catch(function (err) { 99 | callback( 100 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 101 | ) 102 | }) 103 | }) 104 | } 105 | 106 | 107 | var fetchProvidersForEmail = function (email, authModel) { 108 | debug(".fetchProvidersForEmail", email, authModel) 109 | var auth = authModel.auth() 110 | 111 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 112 | auth.fetchProvidersForEmail(email) 113 | .then(function (providers) { 114 | callback( 115 | _elm_lang$core$Native_Scheduler.succeed(providers) 116 | ) 117 | }) 118 | }) 119 | } 120 | 121 | var sendPasswordResetEmail = function (email, authModel) { 122 | debug(".sendPasswordResetEmail", email, authModel) 123 | var auth = authModel.auth() 124 | 125 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 126 | auth.sendPasswordResetEmail(email) 127 | .then(function () { 128 | callback( 129 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 130 | ) 131 | }) 132 | }) 133 | } 134 | 135 | 136 | var _signInHandler = function (promise, callback) { 137 | promise 138 | .then(function (user) { 139 | callback( 140 | _elm_lang$core$Native_Scheduler.succeed(userToModel(user)) 141 | ) 142 | }) 143 | .catch(function (err) { 144 | callback( 145 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 146 | ) 147 | }) 148 | } 149 | 150 | 151 | var signInAnonymously = function (authModel) { 152 | debug(".signInAnonymously", authModel) 153 | var auth = authModel.auth() 154 | 155 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 156 | _signInHandler(auth.signInAnonymously(), callback) 157 | }) 158 | } 159 | 160 | 161 | var signInWithEmailAndPassword = function (email, password, authModel) { 162 | debug(".signInWithEmailAndPassword", email, password, authModel) 163 | var auth = authModel.auth() 164 | 165 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 166 | _signInHandler(auth.signInWithEmailAndPassword(email, password), callback) 167 | }) 168 | } 169 | 170 | 171 | var signOut = function (authModel) { 172 | debug(".signOut", authModel) 173 | var auth = authModel.auth() 174 | 175 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 176 | auth.signOut() 177 | .then(function () { 178 | callback(_elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" })) 179 | }) 180 | }) 181 | } 182 | 183 | 184 | var verifyPasswordResetCode = function (code, authModel) { 185 | debug(".verifyPasswordResetCode", code, authModel) 186 | var auth = authModel.auth() 187 | 188 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 189 | auth.verifyPasswordResetCode(code) 190 | .then(function (email) { 191 | callback( 192 | _elm_lang$core$Native_Scheduler.succeed(email) 193 | ) 194 | }) 195 | .catch(function (err) { 196 | callback( 197 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 198 | ) 199 | }) 200 | }) 201 | } 202 | 203 | 204 | // 205 | 206 | 207 | return { 208 | "init": init, 209 | "currentUser": currentUser, 210 | "confirmPasswordReset": F3(confirmPasswordReset), 211 | "createUserWithEmailAndPassword": F3(createUserWithEmailAndPassword), 212 | "fetchProvidersForEmail": F2(fetchProvidersForEmail), 213 | "sendPasswordResetEmail": F2(sendPasswordResetEmail), 214 | "signInAnonymously": signInAnonymously, 215 | "signInWithEmailAndPassword": F3(signInWithEmailAndPassword), 216 | "signOut": signOut, 217 | "verifyPasswordResetCode": F2(verifyPasswordResetCode) 218 | } 219 | }() 220 | -------------------------------------------------------------------------------- /src/Native/Authentication/User.js: -------------------------------------------------------------------------------- 1 | /*global _elm_lang$core$Native_Scheduler */ 2 | 3 | var _pairshaped$elm_firebase$Native_Authentication_User = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Authentication"].concat(Array.prototype.slice.call(arguments)); 9 | // 10 | // console.log.apply(console, args); 11 | } 12 | 13 | 14 | // Authentication methods 15 | 16 | var propertyMethods = [ 17 | "displayName", "email", "emailVerified", "isAnonymous", "photoURL", 18 | "providerId", "uid" 19 | ].reduce(function (methods, attr) { 20 | methods[attr] = function (userModel) { 21 | debug("." + attr, userModel) 22 | var user = userModel.user() 23 | 24 | return user[attr] 25 | } 26 | 27 | return methods 28 | }, {}) 29 | 30 | 31 | var reload = function (userModel) { 32 | debug(".reload", userModel) 33 | var user = userModel.user() 34 | 35 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 36 | user.reload() 37 | .then(function () { 38 | callback(_elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" })) 39 | }) 40 | }) 41 | } 42 | 43 | 44 | var toJSON = function (userModel) { 45 | debug(".reload", userModel) 46 | var user = userModel.user() 47 | 48 | return user.toJSON() 49 | } 50 | 51 | 52 | // 53 | 54 | 55 | return { 56 | "displayName": propertyMethods.displayName, 57 | "email": propertyMethods.email, 58 | "emailVerified": propertyMethods.emailVerified, 59 | "isAnonymous": propertyMethods.isAnonymous, 60 | "photoURL": propertyMethods.photoURL, 61 | "providerId": propertyMethods.providerId, 62 | "uid": propertyMethods.uid, 63 | "reload": reload, 64 | "toJSON": toJSON 65 | } 66 | }() 67 | -------------------------------------------------------------------------------- /src/Native/Database.js: -------------------------------------------------------------------------------- 1 | /*global firebase, _pairshaped$elm_firebase$Native_Shared, F2 */ 2 | 3 | var _pairshaped$elm_firebase$Native_Database = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Database"].concat(Array.prototype.slice.call(arguments)) 9 | // 10 | // console.log.apply(console, args) 11 | } 12 | 13 | 14 | var databaseToModel = function (database) { 15 | var getDatabase = function () { 16 | return database 17 | } 18 | 19 | return { 20 | ctor: "Database", 21 | database: getDatabase 22 | } 23 | } 24 | 25 | 26 | var maybeWithDefault = function (fallback, maybe) { 27 | return maybe.ctor == "Nothing" 28 | ? fallback 29 | : maybe._0 30 | } 31 | 32 | 33 | // Firebase.database methods 34 | 35 | 36 | var init = function (appModel) { 37 | debug("Firebase.Database.init", appModel, appModel.app()) 38 | var database = firebase.database(appModel.app()) 39 | 40 | return databaseToModel(database) 41 | } 42 | 43 | 44 | var ref = function (maybePath, dbModel) { 45 | debug("Firebase.Database.ref", maybePath, dbModel) 46 | var reference 47 | if (maybePath.ctor == "Just") { 48 | reference = dbModel.database().ref(maybeWithDefault(undefined, maybePath)) 49 | } else { 50 | reference = dbModel.database().ref() 51 | } 52 | 53 | return _pairshaped$elm_firebase$Native_Shared.referenceToModel(reference) 54 | } 55 | 56 | 57 | // 58 | 59 | 60 | return { 61 | "init": init, 62 | "ref": F2(ref) 63 | } 64 | }() 65 | -------------------------------------------------------------------------------- /src/Native/Database/OnDisconnect.js: -------------------------------------------------------------------------------- 1 | 2 | /*global _elm_lang$core$Native_Scheduler, _pairshaped$elm_firebase$Native_Shared, F2, F3 */ 3 | 4 | var _pairshaped$elm_firebase$Native_Database_OnDisconnect = function () { // eslint-disable-line no-unused-vars 5 | 6 | // Utilities 7 | 8 | var debug = function () { 9 | // var args = ["Native.Firebase.Database.OnDisconnect"].concat(Array.prototype.slice.call(arguments)) 10 | // 11 | // console.log.apply(console, args) 12 | } 13 | 14 | 15 | // OnDisconnect methods 16 | 17 | var cancel = function (model) { 18 | debug(".cancel") 19 | var onDisconnect = model.onDisconnect() 20 | 21 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 22 | onDisconnect 23 | .cancel() 24 | .then(function () { 25 | callback( 26 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 27 | ) 28 | }) 29 | .catch(function (err) { 30 | callback( 31 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 32 | ) 33 | }) 34 | }) 35 | } 36 | 37 | var remove = function (model) { 38 | debug(".remove") 39 | var onDisconnect = model.onDisconnect() 40 | 41 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 42 | onDisconnect 43 | .remove() 44 | .then(function () { 45 | callback( 46 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 47 | ) 48 | }) 49 | .catch(function (err) { 50 | callback( 51 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 52 | ) 53 | }) 54 | }) 55 | } 56 | 57 | var set = function (value, model) { 58 | debug(".set") 59 | var onDisconnect = model.onDisconnect() 60 | 61 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 62 | onDisconnect 63 | .set(value) 64 | .then(function () { 65 | callback( 66 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 67 | ) 68 | }) 69 | .catch(function (err) { 70 | callback( 71 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 72 | ) 73 | }) 74 | }) 75 | } 76 | 77 | var setWithPriority = function (value, priority, model) { 78 | debug(".setWithPriority") 79 | var onDisconnect = model.onDisconnect() 80 | 81 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 82 | onDisconnect 83 | .setWithPriority(value, priority) 84 | .then(function () { 85 | callback( 86 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 87 | ) 88 | }) 89 | .catch(function (err) { 90 | callback( 91 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 92 | ) 93 | }) 94 | }) 95 | } 96 | 97 | var update = function (value, model) { 98 | debug(".update") 99 | var onDisconnect = model.onDisconnect() 100 | 101 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 102 | onDisconnect 103 | .update(value) 104 | .then(function () { 105 | callback( 106 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 107 | ) 108 | }) 109 | .catch(function (err) { 110 | callback( 111 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 112 | ) 113 | }) 114 | }) 115 | } 116 | 117 | // 118 | 119 | return { 120 | "cancel": cancel, 121 | "remove": remove, 122 | "set": F2(set), 123 | "setWithPriority": F3(setWithPriority), 124 | "update": F2(update) 125 | } 126 | }() 127 | -------------------------------------------------------------------------------- /src/Native/Database/Query.js: -------------------------------------------------------------------------------- 1 | /*global _pairshaped$elm_firebase$Native_Shared, F2, F3 */ 2 | 3 | var _pairshaped$elm_firebase$Native_Database_Query = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Database.Query"].concat(Array.prototype.slice.call(arguments)) 9 | // 10 | // console.log.apply(console, args) 11 | } 12 | 13 | 14 | var maybeWithDefault = function (fallback, maybe) { 15 | return maybe.ctor == "Nothing" 16 | ? fallback 17 | : maybe._0 18 | } 19 | 20 | 21 | // Query methods 22 | 23 | 24 | var ref = function (queryModel) { 25 | debug(".ref", queryModel) 26 | var query = queryModel.query() 27 | 28 | return query.ref 29 | } 30 | 31 | 32 | var startAt = function (value, maybeKey, queryModel) { 33 | debug(".startAt", value, maybeKey, queryModel) 34 | var query = queryModel.query() 35 | 36 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 37 | query.startAt(value, maybeWithDefault(undefined, maybeKey)) 38 | ) 39 | } 40 | 41 | 42 | var endAt = function (value, maybeKey, queryModel) { 43 | debug(".endAt", value, maybeKey, queryModel) 44 | var query = queryModel.query() 45 | 46 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 47 | query.endAt(value, maybeWithDefault(undefined, maybeKey)) 48 | ) 49 | } 50 | 51 | 52 | var equalTo = function (value, maybeKey, queryModel) { 53 | debug(".equalTo", value, maybeKey, queryModel) 54 | var query = queryModel.query() 55 | 56 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 57 | query.equalTo(value, maybeWithDefault(undefined, maybeKey)) 58 | ) 59 | } 60 | 61 | 62 | var limitToFirst = function (limit, queryModel) { 63 | debug(".limitToFirst", limit, queryModel) 64 | var query = queryModel.query() 65 | 66 | return _pairshaped$elm_firebase$Native_Shared.queryToModel(query.limitToFirst(limit)) 67 | } 68 | 69 | 70 | var limitToLast = function (limit, queryModel) { 71 | debug(".limitToLast", limit, queryModel) 72 | var query = queryModel.query() 73 | 74 | return _pairshaped$elm_firebase$Native_Shared.queryToModel(query.limitToLast(limit)) 75 | } 76 | 77 | 78 | var once = function (eventType, queryModel) { 79 | debug(".queryOnce", eventType, queryModel) 80 | var query = queryModel.query() 81 | 82 | return _pairshaped$elm_firebase$Native_Shared.sourceOnceSnapshot(eventType, query) 83 | } 84 | 85 | 86 | var on = function (eventType, queryModel, tagger) { 87 | debug(".on", eventType, queryModel, tagger) 88 | var query = queryModel.query() 89 | 90 | return _pairshaped$elm_firebase$Native_Shared.sourceOnSnapshot(eventType, query, tagger) 91 | } 92 | 93 | 94 | var off = function (eventType, queryModel) { 95 | debug(".off", eventType, queryModel) 96 | var query = queryModel.query() 97 | 98 | return _pairshaped$elm_firebase$Native_Shared.sourceOffSnapshot(eventType, query) 99 | } 100 | 101 | var isEqual = function (queryModelA, queryModelB) { 102 | debug(".isEqual", queryModelA, queryModelB) 103 | 104 | return queryModelA.query().isEqual(queryModelB.query()) 105 | } 106 | 107 | 108 | // Helper 109 | 110 | 111 | return { 112 | "ref": ref, 113 | "startAt": F3(startAt), 114 | "endAt": F3(endAt), 115 | "equalTo": F3(equalTo), 116 | "limitToFirst": F2(limitToFirst), 117 | "limitToLast": F2(limitToLast), 118 | "once": F2(once), 119 | "on": F3(on), 120 | "off": F2(off), 121 | "isEqual": F2(isEqual) 122 | } 123 | }() 124 | -------------------------------------------------------------------------------- /src/Native/Database/Reference.js: -------------------------------------------------------------------------------- 1 | /*global _pairshaped$elm_firebase$Native_Shared, _elm_lang$core$Native_Scheduler, F2, F3 */ 2 | 3 | var _pairshaped$elm_firebase$Native_Database_Reference = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Database.Reference"].concat(Array.prototype.slice.call(arguments)) 9 | // 10 | // console.log.apply(console, args) 11 | } 12 | 13 | 14 | // Reference methods 15 | 16 | 17 | var key = function (refModel) { 18 | debug(".key", refModel) 19 | var reference = refModel.reference() 20 | 21 | return reference.key 22 | } 23 | 24 | var parent = function (refModel) { 25 | debug(".parent", refModel) 26 | var reference = refModel.reference() 27 | 28 | return reference.parent 29 | } 30 | 31 | var child = function (path, refModel) { 32 | debug(".child", path, refModel) 33 | var reference = refModel.reference().child(path) 34 | 35 | return _pairshaped$elm_firebase$Native_Shared.referenceToModel(reference) 36 | } 37 | 38 | 39 | var set = function (json, refModel) { 40 | debug(".set", json, refModel) 41 | 42 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 43 | refModel 44 | .reference() 45 | .set(json) 46 | .then(function () { 47 | callback( 48 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 49 | ) 50 | }) 51 | .catch(function (err) { 52 | callback( 53 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 54 | ) 55 | }) 56 | }) 57 | } 58 | 59 | 60 | var update = function (json, refModel) { 61 | debug(".update", json, refModel) 62 | 63 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 64 | refModel 65 | .reference() 66 | .update(json) 67 | .then(function () { 68 | callback( 69 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 70 | ) 71 | }) 72 | .catch(function (err) { 73 | callback( 74 | _elm_lang$core$Native_Scheduler.fail(_pairshaped$elm_firebase$Native_Shared.errorToModel(err)) 75 | ) 76 | }) 77 | }) 78 | } 79 | 80 | 81 | var push = function (refModel) { 82 | debug(".remove", refModel) 83 | var ref = refModel.reference() 84 | 85 | return _pairshaped$elm_firebase$Native_Shared.referenceToModel(ref.push()) 86 | } 87 | 88 | 89 | var remove = function (refModel) { 90 | debug(".remove", refModel) 91 | 92 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 93 | refModel.reference().remove(function () { 94 | callback( 95 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 96 | ) 97 | }) 98 | }) 99 | } 100 | 101 | 102 | var orderByChild = function (path, refModel) { 103 | debug(".orderByChild", path, refModel) 104 | var ref = refModel.reference() 105 | 106 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 107 | ref.orderByChild(path) 108 | ) 109 | } 110 | 111 | 112 | var orderByKey = function (refModel) { 113 | debug(".orderByKey", refModel) 114 | var ref = refModel.reference() 115 | 116 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 117 | ref.orderByKey() 118 | ) 119 | } 120 | 121 | 122 | var orderByPriority = function (refModel) { 123 | debug(".orderByPriority", refModel) 124 | var ref = refModel.reference() 125 | 126 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 127 | ref.orderByPriority() 128 | ) 129 | } 130 | 131 | 132 | var orderByValue = function (refModel) { 133 | debug(".orderByValue", refModel) 134 | var ref = refModel.reference() 135 | 136 | return _pairshaped$elm_firebase$Native_Shared.queryToModel( 137 | ref.orderByValue() 138 | ) 139 | } 140 | 141 | 142 | var toString = function (refModel) { 143 | debug(".toString", refModel) 144 | var ref = refModel.reference() 145 | 146 | return ref.toString() 147 | } 148 | 149 | 150 | var onDisconnect = function (refModel) { 151 | debug(".onDisconnect", refModel) 152 | var ref = refModel.reference() 153 | 154 | var getOnDisconnect = function () { 155 | return ref.onDisconnect() 156 | } 157 | 158 | // Reference is the only thing that uses .onDisconnect(), so 159 | // I'm not going to make a helper for it. 160 | return { ctor: "OnDisconnect", onDisconnect: getOnDisconnect } 161 | } 162 | 163 | 164 | var once = function (eventType, refModel) { 165 | debug(".once", eventType, refModel) 166 | var ref = refModel.reference() 167 | 168 | return _pairshaped$elm_firebase$Native_Shared.sourceOnceSnapshot(eventType, ref) 169 | } 170 | 171 | 172 | var on = function (eventType, refModel, tagger) { 173 | debug(".on", eventType, refModel, tagger) 174 | var ref = refModel.reference() 175 | 176 | return _pairshaped$elm_firebase$Native_Shared.sourceOnSnapshot(eventType, ref, tagger) 177 | } 178 | 179 | 180 | var off = function (eventType, refModel) { 181 | debug(".off", eventType, refModel) 182 | var ref = refModel.reference() 183 | 184 | return _pairshaped$elm_firebase$Native_Shared.sourceOffSnapshot(eventType, ref) 185 | } 186 | 187 | var isEqual = function (refModelA, refModelB) { 188 | debug(".isEqual", refModelA, refModelB) 189 | 190 | return refModelA.reference().isEqual(refModelB.reference()) 191 | } 192 | 193 | 194 | // Helpers 195 | 196 | 197 | return { 198 | "key": key, 199 | "parent": parent, 200 | "child": F2(child), 201 | "set": F2(set), 202 | "update": F2(update), 203 | "push": push, 204 | "remove": remove, 205 | "orderByChild": F2(orderByChild), 206 | "orderByKey": orderByKey, 207 | "orderByPriority": orderByPriority, 208 | "orderByValue": orderByValue, 209 | "toString" : toString, 210 | "onDisconnect": onDisconnect, 211 | "once": F2(once), 212 | "on": F3(on), 213 | "off": F2(off), 214 | "isEqual": F2(isEqual) 215 | } 216 | }() 217 | 218 | -------------------------------------------------------------------------------- /src/Native/Database/Snapshot.js: -------------------------------------------------------------------------------- 1 | /*global _pairshaped$elm_firebase$Native_Shared, F2 */ 2 | 3 | var _pairshaped$elm_firebase$Native_Database_Snapshot = function () { // eslint-disable-line no-unused-vars 4 | 5 | // Utilities 6 | 7 | var debug = function () { 8 | // var args = ["Native.Firebase.Snapshot"].concat(Array.prototype.slice.call(arguments)) 9 | // 10 | // console.log.apply(console, args) 11 | } 12 | 13 | 14 | // Snapshot methods 15 | 16 | 17 | var key = function (snapshotModel) { 18 | debug(".key", snapshotModel) 19 | var snapshot = snapshotModel.snapshot() 20 | 21 | return snapshot.key 22 | ? { ctor: "Just", _0: snapshot.key } 23 | : { ctor: "Nothing" } 24 | } 25 | 26 | var ref = function (snapshotModel) { 27 | debug(".ref", snapshotModel) 28 | var snapshot = snapshotModel.snapshot() 29 | 30 | return _pairshaped$elm_firebase$Native_Shared.referenceToModel(snapshot.ref) 31 | } 32 | 33 | var child = function (path, snapshotModel) { 34 | debug(".child", path, snapshotModel) 35 | var snapshot = snapshotModel.snapshot() 36 | 37 | return _pairshaped$elm_firebase$Native_Shared.snapshotToModel(snapshot.child(path)) 38 | } 39 | 40 | var exists = function (snapshotModel) { 41 | debug(".exists", snapshotModel) 42 | var snapshot = snapshotModel.snapshot() 43 | 44 | return snapshot.exists() 45 | ? { ctor: "True" } 46 | : { ctor: "False" } 47 | } 48 | 49 | var exportVal = function (snapshotModel) { 50 | debug(".exportVal", snapshotModel) 51 | var snapshot = snapshotModel.snapshot() 52 | 53 | return snapshot.exportVal() 54 | } 55 | 56 | var getPriority = function (snapshotModel) { 57 | debug(".getPriority", snapshotModel) 58 | var snapshot = snapshotModel.snapshot() 59 | 60 | return snapshot.getPriority() 61 | } 62 | 63 | 64 | var hasChild = function (path, snapshotModel) { 65 | debug(".hasChild", path, snapshotModel) 66 | var snapshot = snapshotModel.snapshot() 67 | 68 | return snapshot.hasChild(path) 69 | } 70 | 71 | 72 | var hasChildren = function (snapshotModel) { 73 | debug(".hasChildren", snapshotModel) 74 | var snapshot = snapshotModel.snapshot() 75 | 76 | return snapshot.hasChildren() 77 | } 78 | 79 | 80 | var numChildren = function (snapshotModel) { 81 | debug(".numChildren", snapshotModel) 82 | var snapshot = snapshotModel.snapshot() 83 | 84 | return snapshot.numChildren() 85 | } 86 | 87 | 88 | var value = function (snapshotModel) { 89 | debug(".value", snapshotModel) 90 | var snapshot = snapshotModel.snapshot() 91 | 92 | return snapshot.val() 93 | } 94 | 95 | var prevKey = function (snapshotModel) { 96 | debug(".prevKey", snapshotModel) 97 | 98 | return snapshotModel.prevKey 99 | } 100 | 101 | return { 102 | "key": key, 103 | "ref": ref, 104 | "child": F2(child), 105 | "exists": exists, 106 | "exportVal": exportVal, 107 | "getPriority": getPriority, 108 | "hasChild": F2(hasChild), 109 | "hasChildren": hasChildren, 110 | "numChildren": numChildren, 111 | "value": value, 112 | "prevKey": prevKey 113 | } 114 | }() 115 | 116 | -------------------------------------------------------------------------------- /src/Native/Firebase.js: -------------------------------------------------------------------------------- 1 | /*global firebase, _elm_lang$core$Native_List, _elm_lang$core$Native_Scheduler, F2 */ 2 | 3 | /* 4 | * This is to get elm-test to load up firebase immediately. There currently isn't a good 5 | * solution, since it may conflict with tools like webpack, but this resolves my immediate 6 | * problem, and I'm open to PRs/other solutions. 7 | */ 8 | if (typeof global == "object" && !global.firebase && typeof require == "function") { 9 | global.firebase = require("firebase/firebase-node") 10 | } 11 | 12 | 13 | var _pairshaped$elm_firebase$Native_Firebase = function () { // eslint-disable-line no-unused-vars 14 | var debug = function () { 15 | // var args = ["Native.Firebase.debug"].concat(Array.prototype.slice.call(arguments)) 16 | // 17 | // console.log.apply(console, arguments) 18 | } 19 | 20 | 21 | // Firebase methods 22 | 23 | 24 | var sdkVersion = firebase.SDK_VERSION 25 | 26 | 27 | var apps = function (dummy) { 28 | debug("Firebase.apps", dummy) 29 | return _elm_lang$core$Native_List.fromArray(firebase.apps) 30 | } 31 | 32 | var app = function (dummy) { 33 | debug("Firebase.app", dummy) 34 | 35 | try { 36 | var app = firebase.app() 37 | 38 | if (app) { 39 | return { 40 | ctor: "Just", 41 | _0: { 42 | ctor: "App", 43 | app: function () { return app } 44 | } 45 | } 46 | } 47 | } catch (e) { 48 | // No op 49 | // firebase.app() can throw an error if an app hasn't been initialized. 50 | } 51 | 52 | return { ctor: "Nothing" } 53 | } 54 | 55 | 56 | // Firebase.App methods 57 | 58 | 59 | var init = function (config) { 60 | debug("Firebase.init", config) 61 | var app = firebase.initializeApp(config) 62 | 63 | var getApp = function () { 64 | return app 65 | } 66 | 67 | return { 68 | ctor: "App", 69 | app: getApp 70 | } 71 | } 72 | 73 | var initWithName = function (config, name) { 74 | debug("Firebase.initWithName", config, name) 75 | var app = firebase.initializeApp(config, name) 76 | 77 | var getApp = function () { 78 | return app 79 | } 80 | 81 | return { 82 | ctor: "App", 83 | app: getApp 84 | } 85 | } 86 | 87 | 88 | var deinit = function (model) { 89 | debug("Firebase.deinit", model) 90 | var app = model.app() 91 | 92 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 93 | app.delete().then(function () { 94 | callback( 95 | _elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" }) 96 | ) 97 | }) 98 | }) 99 | } 100 | 101 | 102 | var name = function (model) { 103 | debug("Firebase.name", model) 104 | return model.app().name 105 | } 106 | 107 | 108 | var options = function (model) { 109 | debug("Firebase.options", model) 110 | return model.app().options 111 | } 112 | 113 | 114 | return { 115 | "sdkVersion": sdkVersion, 116 | "apps": apps, 117 | "app": app, 118 | "init": init, 119 | "initWithName": F2(initWithName), 120 | "deinit": deinit, 121 | "name": name, 122 | "options": options 123 | } 124 | }() 125 | -------------------------------------------------------------------------------- /src/Native/Shared.js: -------------------------------------------------------------------------------- 1 | /*global _elm_lang$core$Native_Scheduler */ 2 | 3 | /* This will be hoisted to the top of the elm function wrapper, but not be exposed to 4 | * the global scope. 5 | */ 6 | function _pairshaped$elm_firebase$Native_Shared$onSnapshot (tagger, snapshot, prevKey) { 7 | _elm_lang$core$Native_Scheduler.rawSpawn( 8 | tagger( 9 | _pairshaped$elm_firebase$Native_Shared.snapshotToModel(snapshot, prevKey) 10 | ) 11 | ) 12 | } 13 | 14 | var _pairshaped$elm_firebase$Native_Shared = function () { 15 | var databaseToModel = function (database) { 16 | var getDatabase = function () { 17 | return database 18 | } 19 | 20 | return { 21 | ctor: "Database", 22 | database: getDatabase 23 | } 24 | } 25 | 26 | 27 | var referenceToModel = function (reference) { 28 | var getReference = function () { 29 | return reference 30 | } 31 | 32 | return { 33 | ctor: "Reference", 34 | reference : getReference 35 | } 36 | } 37 | 38 | 39 | var snapshotToModel = function (snapshot, prevKey) { 40 | var getDataSnapshot = function () { 41 | return snapshot 42 | } 43 | 44 | return { 45 | ctor: "Snapshot", 46 | snapshot: getDataSnapshot, 47 | prevKey: prevKey 48 | ? { ctor: "Just", _0: prevKey } 49 | : { ctor: "Nothing" } 50 | } 51 | } 52 | 53 | 54 | var errorToModel = function (err) { 55 | return { 56 | ctor: "Error", 57 | _0: err.code, 58 | _1: err.message 59 | } 60 | } 61 | 62 | 63 | 64 | var queryToModel = function (query) { 65 | var getQuery = function () { 66 | return query 67 | } 68 | 69 | return { 70 | ctor: "Query", 71 | query: getQuery 72 | } 73 | } 74 | 75 | 76 | var sourceOnSnapshot = function (eventType, source, tagger) { 77 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 78 | source.on(eventType, _pairshaped$elm_firebase$Native_Shared$onSnapshot.bind(window, tagger)) 79 | 80 | callback(_elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" })) 81 | }) 82 | } 83 | 84 | 85 | var sourceOffSnapshot = function (eventType, source) { 86 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 87 | source.off(eventType, _pairshaped$elm_firebase$Native_Shared$onSnapshot) 88 | 89 | callback(_elm_lang$core$Native_Scheduler.succeed({ ctor: "_Tuple0" })) 90 | }) 91 | } 92 | 93 | 94 | var sourceOnceSnapshot = function (eventType, source) { 95 | return _elm_lang$core$Native_Scheduler.nativeBinding(function (callback) { 96 | source.once(eventType, function (snapshot) { 97 | callback( 98 | _elm_lang$core$Native_Scheduler.succeed( 99 | _pairshaped$elm_firebase$Native_Shared.snapshotToModel(snapshot) 100 | ) 101 | ) 102 | 103 | }, function (err) { 104 | callback( 105 | _elm_lang$core$Native_Scheduler.fail( 106 | { ctor: "Error", _0: err.code, _1: err.message } 107 | ) 108 | ) 109 | 110 | }) 111 | }) 112 | } 113 | 114 | // 115 | 116 | 117 | /* Note: no Fn(..) elm interop. These are meant to be used as helpers 118 | * to other parts of the native bindings and not from elm itself. 119 | */ 120 | return { 121 | "databaseToModel": databaseToModel, 122 | "referenceToModel": referenceToModel, 123 | "snapshotToModel": snapshotToModel, 124 | "errorToModel": errorToModel, 125 | "queryToModel": queryToModel, 126 | "sourceOnSnapshot": sourceOnSnapshot, 127 | "sourceOffSnapshot": sourceOffSnapshot, 128 | "sourceOnceSnapshot": sourceOnceSnapshot 129 | } 130 | }() 131 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | /elm-stuff/ 2 | -------------------------------------------------------------------------------- /tests/Main.elm: -------------------------------------------------------------------------------- 1 | port module Main exposing (..) 2 | 3 | import Tests 4 | import Test.Runner.Node exposing (run, TestProgram) 5 | import Json.Encode exposing (Value) 6 | 7 | 8 | main : TestProgram 9 | main = 10 | run emit Tests.all 11 | 12 | 13 | port emit : ( String, Value ) -> Cmd msg 14 | -------------------------------------------------------------------------------- /tests/Tests.elm: -------------------------------------------------------------------------------- 1 | module Tests exposing (..) 2 | 3 | import Test exposing (..) 4 | import Expect 5 | import Firebase 6 | 7 | 8 | all : Test 9 | all = 10 | describe "Dummy" 11 | [ describe "tests" 12 | [ test "pass" <| 13 | \() -> 14 | Expect.equal True True 15 | ] 16 | ] 17 | -------------------------------------------------------------------------------- /tests/elm-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.0.0", 3 | "summary": "elm-firebase unit tests", 4 | "repository": "https://github.com/pairshaped/elm-firebase.git", 5 | "license": "MIT", 6 | "source-directories": [ 7 | ".", 8 | "../src" 9 | ], 10 | "exposed-modules": [], 11 | "native-modules": true, 12 | "dependencies": { 13 | "elm-community/json-extra": "2.0.0 <= v < 3.0.0", 14 | "elm-lang/html": "2.0.0 <= v < 3.0.0", 15 | "mgold/elm-random-pcg": "4.0.2 <= v < 5.0.0", 16 | "elm-lang/core": "5.0.0 <= v < 6.0.0", 17 | "elm-community/elm-test": "3.0.0 <= v < 4.0.0", 18 | "rtfeldman/node-test-runner": "3.0.0 <= v < 4.0.0" 19 | }, 20 | "elm-version": "0.18.0 <= v < 0.19.0" 21 | } 22 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | abbrev@1: 6 | version "1.1.0" 7 | resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.0.tgz#d0554c2256636e2f56e7c2e5ad183f859428d81f" 8 | 9 | acorn-jsx@^3.0.0: 10 | version "3.0.1" 11 | resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" 12 | dependencies: 13 | acorn "^3.0.4" 14 | 15 | acorn@4.0.4: 16 | version "4.0.4" 17 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" 18 | 19 | acorn@^3.0.4: 20 | version "3.3.0" 21 | resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" 22 | 23 | ajv-keywords@^1.0.0: 24 | version "1.5.1" 25 | resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" 26 | 27 | ajv@^4.7.0: 28 | version "4.11.3" 29 | resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.3.tgz#ce30bdb90d1254f762c75af915fb3a63e7183d22" 30 | dependencies: 31 | co "^4.6.0" 32 | json-stable-stringify "^1.0.1" 33 | 34 | ansi-escapes@^1.1.0: 35 | version "1.4.0" 36 | resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" 37 | 38 | ansi-regex@^2.0.0: 39 | version "2.1.1" 40 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 41 | 42 | ansi-styles@^2.2.1: 43 | version "2.2.1" 44 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 45 | 46 | any-promise@1.3.0: 47 | version "1.3.0" 48 | resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" 49 | 50 | anymatch@^1.3.0: 51 | version "1.3.0" 52 | resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" 53 | dependencies: 54 | arrify "^1.0.0" 55 | micromatch "^2.1.5" 56 | 57 | aproba@^1.0.3: 58 | version "1.1.1" 59 | resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.1.1.tgz#95d3600f07710aa0e9298c726ad5ecf2eacbabab" 60 | 61 | are-we-there-yet@~1.1.2: 62 | version "1.1.2" 63 | resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" 64 | dependencies: 65 | delegates "^1.0.0" 66 | readable-stream "^2.0.0 || ^1.1.13" 67 | 68 | argparse@^1.0.7: 69 | version "1.0.9" 70 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" 71 | dependencies: 72 | sprintf-js "~1.0.2" 73 | 74 | arr-diff@^2.0.0: 75 | version "2.0.0" 76 | resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" 77 | dependencies: 78 | arr-flatten "^1.0.1" 79 | 80 | arr-flatten@^1.0.1: 81 | version "1.0.1" 82 | resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" 83 | 84 | array-union@^1.0.1: 85 | version "1.0.2" 86 | resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 87 | dependencies: 88 | array-uniq "^1.0.1" 89 | 90 | array-uniq@^1.0.1: 91 | version "1.0.3" 92 | resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 93 | 94 | array-unique@^0.2.1: 95 | version "0.2.1" 96 | resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" 97 | 98 | arrify@^1.0.0: 99 | version "1.0.1" 100 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 101 | 102 | asn1@~0.2.3: 103 | version "0.2.3" 104 | resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" 105 | 106 | assert-plus@^0.2.0: 107 | version "0.2.0" 108 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" 109 | 110 | assert-plus@^1.0.0: 111 | version "1.0.0" 112 | resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" 113 | 114 | async-each@^1.0.0: 115 | version "1.0.1" 116 | resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" 117 | 118 | asynckit@^0.4.0: 119 | version "0.4.0" 120 | resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" 121 | 122 | aws-sign2@~0.6.0: 123 | version "0.6.0" 124 | resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f" 125 | 126 | aws4@^1.2.1: 127 | version "1.6.0" 128 | resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" 129 | 130 | babel-code-frame@^6.16.0: 131 | version "6.22.0" 132 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" 133 | dependencies: 134 | chalk "^1.1.0" 135 | esutils "^2.0.2" 136 | js-tokens "^3.0.0" 137 | 138 | balanced-match@^0.4.1: 139 | version "0.4.2" 140 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" 141 | 142 | base64url@2.0.0, base64url@^2.0.0: 143 | version "2.0.0" 144 | resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" 145 | 146 | bcrypt-pbkdf@^1.0.0: 147 | version "1.0.1" 148 | resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" 149 | dependencies: 150 | tweetnacl "^0.14.3" 151 | 152 | binary-extensions@^1.0.0: 153 | version "1.8.0" 154 | resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.8.0.tgz#48ec8d16df4377eae5fa5884682480af4d95c774" 155 | 156 | block-stream@*: 157 | version "0.0.9" 158 | resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" 159 | dependencies: 160 | inherits "~2.0.0" 161 | 162 | boom@2.x.x: 163 | version "2.10.1" 164 | resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" 165 | dependencies: 166 | hoek "2.x.x" 167 | 168 | brace-expansion@^1.0.0: 169 | version "1.1.6" 170 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" 171 | dependencies: 172 | balanced-match "^0.4.1" 173 | concat-map "0.0.1" 174 | 175 | braces@^1.8.2: 176 | version "1.8.5" 177 | resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" 178 | dependencies: 179 | expand-range "^1.8.1" 180 | preserve "^0.2.0" 181 | repeat-element "^1.1.2" 182 | 183 | buffer-equal-constant-time@1.0.1: 184 | version "1.0.1" 185 | resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" 186 | 187 | buffer-shims@^1.0.0: 188 | version "1.0.0" 189 | resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" 190 | 191 | caller-path@^0.1.0: 192 | version "0.1.0" 193 | resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 194 | dependencies: 195 | callsites "^0.2.0" 196 | 197 | callsites@^0.2.0: 198 | version "0.2.0" 199 | resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 200 | 201 | caseless@~0.11.0: 202 | version "0.11.0" 203 | resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" 204 | 205 | chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: 206 | version "1.1.3" 207 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 208 | dependencies: 209 | ansi-styles "^2.2.1" 210 | escape-string-regexp "^1.0.2" 211 | has-ansi "^2.0.0" 212 | strip-ansi "^3.0.0" 213 | supports-color "^2.0.0" 214 | 215 | chokidar@1.6.0: 216 | version "1.6.0" 217 | resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.0.tgz#90c32ad4802901d7713de532dc284e96a63ad058" 218 | dependencies: 219 | anymatch "^1.3.0" 220 | async-each "^1.0.0" 221 | glob-parent "^2.0.0" 222 | inherits "^2.0.1" 223 | is-binary-path "^1.0.0" 224 | is-glob "^2.0.0" 225 | path-is-absolute "^1.0.0" 226 | readdirp "^2.0.0" 227 | optionalDependencies: 228 | fsevents "^1.0.0" 229 | 230 | circular-json@^0.3.1: 231 | version "0.3.1" 232 | resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" 233 | 234 | cli-cursor@^1.0.1: 235 | version "1.0.2" 236 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" 237 | dependencies: 238 | restore-cursor "^1.0.1" 239 | 240 | cli-table@^0.3.1: 241 | version "0.3.1" 242 | resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" 243 | dependencies: 244 | colors "1.0.3" 245 | 246 | cli-width@^2.0.0: 247 | version "2.1.0" 248 | resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" 249 | 250 | cli@0.11.3: 251 | version "0.11.3" 252 | resolved "https://registry.yarnpkg.com/cli/-/cli-0.11.3.tgz#7b0cd3de990e452925667c0dbaffdc9f7f2a9a15" 253 | dependencies: 254 | exit "0.1.2" 255 | glob "^7.0.5" 256 | 257 | co@^4.6.0: 258 | version "4.6.0" 259 | resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 260 | 261 | code-point-at@^1.0.0: 262 | version "1.1.0" 263 | resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" 264 | 265 | colors@1.0.3: 266 | version "1.0.3" 267 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" 268 | 269 | colors@^1.0.3: 270 | version "1.1.2" 271 | resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" 272 | 273 | combined-stream@^1.0.5, combined-stream@~1.0.5: 274 | version "1.0.5" 275 | resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" 276 | dependencies: 277 | delayed-stream "~1.0.0" 278 | 279 | commander@^2.9.0: 280 | version "2.9.0" 281 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" 282 | dependencies: 283 | graceful-readlink ">= 1.0.0" 284 | 285 | concat-map@0.0.1: 286 | version "0.0.1" 287 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 288 | 289 | concat-stream@^1.4.6: 290 | version "1.6.0" 291 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" 292 | dependencies: 293 | inherits "^2.0.3" 294 | readable-stream "^2.2.2" 295 | typedarray "^0.0.6" 296 | 297 | console-control-strings@^1.0.0, console-control-strings@~1.1.0: 298 | version "1.1.0" 299 | resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" 300 | 301 | core-util-is@~1.0.0: 302 | version "1.0.2" 303 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 304 | 305 | cross-spawn@4.0.0: 306 | version "4.0.0" 307 | resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.0.tgz#8254774ab4786b8c5b3cf4dfba66ce563932c252" 308 | dependencies: 309 | lru-cache "^4.0.1" 310 | which "^1.2.9" 311 | 312 | cryptiles@2.x.x: 313 | version "2.0.5" 314 | resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" 315 | dependencies: 316 | boom "2.x.x" 317 | 318 | d@^0.1.1, d@~0.1.1: 319 | version "0.1.1" 320 | resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" 321 | dependencies: 322 | es5-ext "~0.10.2" 323 | 324 | dashdash@^1.12.0: 325 | version "1.14.1" 326 | resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" 327 | dependencies: 328 | assert-plus "^1.0.0" 329 | 330 | debug@2.2.0, debug@^2.1.1, debug@~2.2.0: 331 | version "2.2.0" 332 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" 333 | dependencies: 334 | ms "0.7.1" 335 | 336 | deep-extend@~0.4.0: 337 | version "0.4.1" 338 | resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" 339 | 340 | deep-is@~0.1.3: 341 | version "0.1.3" 342 | resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 343 | 344 | del@^2.0.2: 345 | version "2.2.2" 346 | resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 347 | dependencies: 348 | globby "^5.0.0" 349 | is-path-cwd "^1.0.0" 350 | is-path-in-cwd "^1.0.0" 351 | object-assign "^4.0.1" 352 | pify "^2.0.0" 353 | pinkie-promise "^2.0.0" 354 | rimraf "^2.2.8" 355 | 356 | delayed-stream@~1.0.0: 357 | version "1.0.0" 358 | resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" 359 | 360 | delegates@^1.0.0: 361 | version "1.0.0" 362 | resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" 363 | 364 | doctrine@^1.2.2: 365 | version "1.5.0" 366 | resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 367 | dependencies: 368 | esutils "^2.0.2" 369 | isarray "^1.0.0" 370 | 371 | dom-storage@2.0.2: 372 | version "2.0.2" 373 | resolved "https://registry.yarnpkg.com/dom-storage/-/dom-storage-2.0.2.tgz#ed17cbf68abd10e0aef8182713e297c5e4b500b0" 374 | 375 | ecc-jsbn@~0.1.1: 376 | version "0.1.1" 377 | resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" 378 | dependencies: 379 | jsbn "~0.1.0" 380 | 381 | ecdsa-sig-formatter@1.0.9: 382 | version "1.0.9" 383 | resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" 384 | dependencies: 385 | base64url "^2.0.0" 386 | safe-buffer "^5.0.1" 387 | 388 | elm-test@^0.18.2: 389 | version "0.18.2" 390 | resolved "https://registry.yarnpkg.com/elm-test/-/elm-test-0.18.2.tgz#1e94bd292de42a4960c6fdbe64eacee30669040a" 391 | dependencies: 392 | chalk "1.1.3" 393 | chokidar "1.6.0" 394 | cross-spawn "4.0.0" 395 | find-up "^1.1.2" 396 | firstline "^1.2.0" 397 | fs-extra "0.30.0" 398 | lodash "4.13.1" 399 | minimist "^1.2.0" 400 | node-elm-compiler "4.1.0" 401 | temp "0.8.3" 402 | 403 | es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: 404 | version "0.10.12" 405 | resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" 406 | dependencies: 407 | es6-iterator "2" 408 | es6-symbol "~3.1" 409 | 410 | es6-iterator@2: 411 | version "2.0.0" 412 | resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" 413 | dependencies: 414 | d "^0.1.1" 415 | es5-ext "^0.10.7" 416 | es6-symbol "3" 417 | 418 | es6-map@^0.1.3: 419 | version "0.1.4" 420 | resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" 421 | dependencies: 422 | d "~0.1.1" 423 | es5-ext "~0.10.11" 424 | es6-iterator "2" 425 | es6-set "~0.1.3" 426 | es6-symbol "~3.1.0" 427 | event-emitter "~0.3.4" 428 | 429 | es6-set@~0.1.3: 430 | version "0.1.4" 431 | resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" 432 | dependencies: 433 | d "~0.1.1" 434 | es5-ext "~0.10.11" 435 | es6-iterator "2" 436 | es6-symbol "3" 437 | event-emitter "~0.3.4" 438 | 439 | es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: 440 | version "3.1.0" 441 | resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" 442 | dependencies: 443 | d "~0.1.1" 444 | es5-ext "~0.10.11" 445 | 446 | es6-weak-map@^2.0.1: 447 | version "2.0.1" 448 | resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" 449 | dependencies: 450 | d "^0.1.1" 451 | es5-ext "^0.10.8" 452 | es6-iterator "2" 453 | es6-symbol "3" 454 | 455 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 456 | version "1.0.5" 457 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 458 | 459 | escope@^3.6.0: 460 | version "3.6.0" 461 | resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" 462 | dependencies: 463 | es6-map "^0.1.3" 464 | es6-weak-map "^2.0.1" 465 | esrecurse "^4.1.0" 466 | estraverse "^4.1.1" 467 | 468 | eslint@^3.16.1: 469 | version "3.16.1" 470 | resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.16.1.tgz#9bc31fc7341692cf772e80607508f67d711c5609" 471 | dependencies: 472 | babel-code-frame "^6.16.0" 473 | chalk "^1.1.3" 474 | concat-stream "^1.4.6" 475 | debug "^2.1.1" 476 | doctrine "^1.2.2" 477 | escope "^3.6.0" 478 | espree "^3.4.0" 479 | estraverse "^4.2.0" 480 | esutils "^2.0.2" 481 | file-entry-cache "^2.0.0" 482 | glob "^7.0.3" 483 | globals "^9.14.0" 484 | ignore "^3.2.0" 485 | imurmurhash "^0.1.4" 486 | inquirer "^0.12.0" 487 | is-my-json-valid "^2.10.0" 488 | is-resolvable "^1.0.0" 489 | js-yaml "^3.5.1" 490 | json-stable-stringify "^1.0.0" 491 | levn "^0.3.0" 492 | lodash "^4.0.0" 493 | mkdirp "^0.5.0" 494 | natural-compare "^1.4.0" 495 | optionator "^0.8.2" 496 | path-is-inside "^1.0.1" 497 | pluralize "^1.2.1" 498 | progress "^1.1.8" 499 | require-uncached "^1.0.2" 500 | shelljs "^0.7.5" 501 | strip-bom "^3.0.0" 502 | strip-json-comments "~2.0.1" 503 | table "^3.7.8" 504 | text-table "~0.2.0" 505 | user-home "^2.0.0" 506 | 507 | espree@^3.4.0: 508 | version "3.4.0" 509 | resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" 510 | dependencies: 511 | acorn "4.0.4" 512 | acorn-jsx "^3.0.0" 513 | 514 | esprima@^1.2.2: 515 | version "1.2.5" 516 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-1.2.5.tgz#0993502feaf668138325756f30f9a51feeec11e9" 517 | 518 | esprima@^3.1.1: 519 | version "3.1.3" 520 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" 521 | 522 | esrecurse@^4.1.0: 523 | version "4.1.0" 524 | resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" 525 | dependencies: 526 | estraverse "~4.1.0" 527 | object-assign "^4.0.1" 528 | 529 | estraverse@^4.1.1, estraverse@^4.2.0: 530 | version "4.2.0" 531 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 532 | 533 | estraverse@~4.1.0: 534 | version "4.1.1" 535 | resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" 536 | 537 | esutils@^2.0.2: 538 | version "2.0.2" 539 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 540 | 541 | event-emitter@~0.3.4: 542 | version "0.3.4" 543 | resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" 544 | dependencies: 545 | d "~0.1.1" 546 | es5-ext "~0.10.7" 547 | 548 | exit-hook@^1.0.0: 549 | version "1.1.1" 550 | resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" 551 | 552 | exit@0.1.2: 553 | version "0.1.2" 554 | resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" 555 | 556 | expand-brackets@^0.1.4: 557 | version "0.1.5" 558 | resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" 559 | dependencies: 560 | is-posix-bracket "^0.1.0" 561 | 562 | expand-range@^1.8.1: 563 | version "1.8.2" 564 | resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" 565 | dependencies: 566 | fill-range "^2.1.0" 567 | 568 | extend@~3.0.0: 569 | version "3.0.0" 570 | resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" 571 | 572 | extglob@^0.3.1: 573 | version "0.3.2" 574 | resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" 575 | dependencies: 576 | is-extglob "^1.0.0" 577 | 578 | extsprintf@1.0.2: 579 | version "1.0.2" 580 | resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" 581 | 582 | fast-levenshtein@~2.0.4: 583 | version "2.0.6" 584 | resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 585 | 586 | faye-websocket@0.9.3: 587 | version "0.9.3" 588 | resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.9.3.tgz#482a505b0df0ae626b969866d3bd740cdb962e83" 589 | dependencies: 590 | websocket-driver ">=0.5.1" 591 | 592 | figures@^1.3.5: 593 | version "1.7.0" 594 | resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" 595 | dependencies: 596 | escape-string-regexp "^1.0.5" 597 | object-assign "^4.1.0" 598 | 599 | file-entry-cache@^2.0.0: 600 | version "2.0.0" 601 | resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 602 | dependencies: 603 | flat-cache "^1.2.1" 604 | object-assign "^4.0.1" 605 | 606 | filename-regex@^2.0.0: 607 | version "2.0.0" 608 | resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" 609 | 610 | fill-range@^2.1.0: 611 | version "2.2.3" 612 | resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" 613 | dependencies: 614 | is-number "^2.1.0" 615 | isobject "^2.0.0" 616 | randomatic "^1.1.3" 617 | repeat-element "^1.1.2" 618 | repeat-string "^1.5.2" 619 | 620 | find-up@^1.1.2: 621 | version "1.1.2" 622 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 623 | dependencies: 624 | path-exists "^2.0.0" 625 | pinkie-promise "^2.0.0" 626 | 627 | firebase-server@^0.9.1: 628 | version "0.9.1" 629 | resolved "https://registry.yarnpkg.com/firebase-server/-/firebase-server-0.9.1.tgz#f13e49438fbf034b5b7226f4a8c37d68b87e7faf" 630 | dependencies: 631 | any-promise "1.3.0" 632 | cli "0.11.3" 633 | debug "2.2.0" 634 | firebase "3.6.1" 635 | jwt-simple "0.3.1" 636 | lodash "3.10.1" 637 | targaryen "2.3.3" 638 | ws "1.1.1" 639 | 640 | firebase@3.6.1: 641 | version "3.6.1" 642 | resolved "https://registry.yarnpkg.com/firebase/-/firebase-3.6.1.tgz#bcd7fe28f9eb75c8ecbefba9b4763b0800995229" 643 | dependencies: 644 | dom-storage "2.0.2" 645 | faye-websocket "0.9.3" 646 | jsonwebtoken "5.7.0" 647 | rsvp "3.2.1" 648 | xmlhttprequest "1.8.0" 649 | 650 | firebase@^3.6.10: 651 | version "3.6.10" 652 | resolved "https://registry.yarnpkg.com/firebase/-/firebase-3.6.10.tgz#1efc0b31ab510eacab353eb11a84869196372ae5" 653 | dependencies: 654 | dom-storage "2.0.2" 655 | faye-websocket "0.9.3" 656 | jsonwebtoken "7.1.9" 657 | rsvp "3.2.1" 658 | xmlhttprequest "1.8.0" 659 | 660 | firstline@^1.2.0: 661 | version "1.2.1" 662 | resolved "https://registry.yarnpkg.com/firstline/-/firstline-1.2.1.tgz#b88673c42009f8821fac2926e99720acee924fae" 663 | 664 | flat-cache@^1.2.1: 665 | version "1.2.2" 666 | resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" 667 | dependencies: 668 | circular-json "^0.3.1" 669 | del "^2.0.2" 670 | graceful-fs "^4.1.2" 671 | write "^0.2.1" 672 | 673 | for-in@^1.0.1: 674 | version "1.0.1" 675 | resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.1.tgz#d6c3e3798ceaaa301047b109dedf1b1ae37a0efa" 676 | 677 | for-own@^0.1.4: 678 | version "0.1.5" 679 | resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" 680 | dependencies: 681 | for-in "^1.0.1" 682 | 683 | forever-agent@~0.6.1: 684 | version "0.6.1" 685 | resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" 686 | 687 | form-data@~2.1.1: 688 | version "2.1.2" 689 | resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" 690 | dependencies: 691 | asynckit "^0.4.0" 692 | combined-stream "^1.0.5" 693 | mime-types "^2.1.12" 694 | 695 | fs-extra@0.30.0: 696 | version "0.30.0" 697 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" 698 | dependencies: 699 | graceful-fs "^4.1.2" 700 | jsonfile "^2.1.0" 701 | klaw "^1.0.0" 702 | path-is-absolute "^1.0.0" 703 | rimraf "^2.2.8" 704 | 705 | fs.realpath@^1.0.0: 706 | version "1.0.0" 707 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 708 | 709 | fsevents@^1.0.0: 710 | version "1.1.1" 711 | resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.1.tgz#f19fd28f43eeaf761680e519a203c4d0b3d31aff" 712 | dependencies: 713 | nan "^2.3.0" 714 | node-pre-gyp "^0.6.29" 715 | 716 | fstream-ignore@~1.0.5: 717 | version "1.0.5" 718 | resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" 719 | dependencies: 720 | fstream "^1.0.0" 721 | inherits "2" 722 | minimatch "^3.0.0" 723 | 724 | fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: 725 | version "1.0.10" 726 | resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" 727 | dependencies: 728 | graceful-fs "^4.1.2" 729 | inherits "~2.0.0" 730 | mkdirp ">=0.5 0" 731 | rimraf "2" 732 | 733 | gauge@~2.7.1: 734 | version "2.7.3" 735 | resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" 736 | dependencies: 737 | aproba "^1.0.3" 738 | console-control-strings "^1.0.0" 739 | has-unicode "^2.0.0" 740 | object-assign "^4.1.0" 741 | signal-exit "^3.0.0" 742 | string-width "^1.0.1" 743 | strip-ansi "^3.0.1" 744 | wide-align "^1.1.0" 745 | 746 | generate-function@^2.0.0: 747 | version "2.0.0" 748 | resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" 749 | 750 | generate-object-property@^1.1.0: 751 | version "1.2.0" 752 | resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" 753 | dependencies: 754 | is-property "^1.0.0" 755 | 756 | getpass@^0.1.1: 757 | version "0.1.6" 758 | resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" 759 | dependencies: 760 | assert-plus "^1.0.0" 761 | 762 | glob-base@^0.3.0: 763 | version "0.3.0" 764 | resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" 765 | dependencies: 766 | glob-parent "^2.0.0" 767 | is-glob "^2.0.0" 768 | 769 | glob-parent@^2.0.0: 770 | version "2.0.0" 771 | resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" 772 | dependencies: 773 | is-glob "^2.0.0" 774 | 775 | glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: 776 | version "7.1.1" 777 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" 778 | dependencies: 779 | fs.realpath "^1.0.0" 780 | inflight "^1.0.4" 781 | inherits "2" 782 | minimatch "^3.0.2" 783 | once "^1.3.0" 784 | path-is-absolute "^1.0.0" 785 | 786 | globals@^9.14.0: 787 | version "9.16.0" 788 | resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" 789 | 790 | globby@^5.0.0: 791 | version "5.0.0" 792 | resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 793 | dependencies: 794 | array-union "^1.0.1" 795 | arrify "^1.0.0" 796 | glob "^7.0.3" 797 | object-assign "^4.0.1" 798 | pify "^2.0.0" 799 | pinkie-promise "^2.0.0" 800 | 801 | graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: 802 | version "4.1.11" 803 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 804 | 805 | "graceful-readlink@>= 1.0.0": 806 | version "1.0.1" 807 | resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" 808 | 809 | har-validator@~2.0.6: 810 | version "2.0.6" 811 | resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" 812 | dependencies: 813 | chalk "^1.1.1" 814 | commander "^2.9.0" 815 | is-my-json-valid "^2.12.4" 816 | pinkie-promise "^2.0.0" 817 | 818 | has-ansi@^2.0.0: 819 | version "2.0.0" 820 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 821 | dependencies: 822 | ansi-regex "^2.0.0" 823 | 824 | has-unicode@^2.0.0: 825 | version "2.0.1" 826 | resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" 827 | 828 | hawk@~3.1.3: 829 | version "3.1.3" 830 | resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" 831 | dependencies: 832 | boom "2.x.x" 833 | cryptiles "2.x.x" 834 | hoek "2.x.x" 835 | sntp "1.x.x" 836 | 837 | hoek@2.x.x: 838 | version "2.16.3" 839 | resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" 840 | 841 | http-signature@~1.1.0: 842 | version "1.1.1" 843 | resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" 844 | dependencies: 845 | assert-plus "^0.2.0" 846 | jsprim "^1.2.2" 847 | sshpk "^1.7.0" 848 | 849 | ignore@^3.2.0: 850 | version "3.2.4" 851 | resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.4.tgz#4055e03596729a8fabe45a43c100ad5ed815c4e8" 852 | 853 | imurmurhash@^0.1.4: 854 | version "0.1.4" 855 | resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 856 | 857 | inflight@^1.0.4: 858 | version "1.0.6" 859 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 860 | dependencies: 861 | once "^1.3.0" 862 | wrappy "1" 863 | 864 | inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1: 865 | version "2.0.3" 866 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 867 | 868 | ini@~1.3.0: 869 | version "1.3.4" 870 | resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" 871 | 872 | inquirer@^0.12.0: 873 | version "0.12.0" 874 | resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" 875 | dependencies: 876 | ansi-escapes "^1.1.0" 877 | ansi-regex "^2.0.0" 878 | chalk "^1.0.0" 879 | cli-cursor "^1.0.1" 880 | cli-width "^2.0.0" 881 | figures "^1.3.5" 882 | lodash "^4.3.0" 883 | readline2 "^1.0.1" 884 | run-async "^0.1.0" 885 | rx-lite "^3.1.2" 886 | string-width "^1.0.1" 887 | strip-ansi "^3.0.0" 888 | through "^2.3.6" 889 | 890 | interpret@^1.0.0: 891 | version "1.0.1" 892 | resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" 893 | 894 | is-binary-path@^1.0.0: 895 | version "1.0.1" 896 | resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" 897 | dependencies: 898 | binary-extensions "^1.0.0" 899 | 900 | is-buffer@^1.0.2: 901 | version "1.1.4" 902 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.4.tgz#cfc86ccd5dc5a52fa80489111c6920c457e2d98b" 903 | 904 | is-dotfile@^1.0.0: 905 | version "1.0.2" 906 | resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" 907 | 908 | is-equal-shallow@^0.1.3: 909 | version "0.1.3" 910 | resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" 911 | dependencies: 912 | is-primitive "^2.0.0" 913 | 914 | is-extendable@^0.1.1: 915 | version "0.1.1" 916 | resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" 917 | 918 | is-extglob@^1.0.0: 919 | version "1.0.0" 920 | resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" 921 | 922 | is-fullwidth-code-point@^1.0.0: 923 | version "1.0.0" 924 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" 925 | dependencies: 926 | number-is-nan "^1.0.0" 927 | 928 | is-fullwidth-code-point@^2.0.0: 929 | version "2.0.0" 930 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 931 | 932 | is-glob@^2.0.0, is-glob@^2.0.1: 933 | version "2.0.1" 934 | resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" 935 | dependencies: 936 | is-extglob "^1.0.0" 937 | 938 | is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: 939 | version "2.16.0" 940 | resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" 941 | dependencies: 942 | generate-function "^2.0.0" 943 | generate-object-property "^1.1.0" 944 | jsonpointer "^4.0.0" 945 | xtend "^4.0.0" 946 | 947 | is-number@^2.0.2, is-number@^2.1.0: 948 | version "2.1.0" 949 | resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" 950 | dependencies: 951 | kind-of "^3.0.2" 952 | 953 | is-path-cwd@^1.0.0: 954 | version "1.0.0" 955 | resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 956 | 957 | is-path-in-cwd@^1.0.0: 958 | version "1.0.0" 959 | resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 960 | dependencies: 961 | is-path-inside "^1.0.0" 962 | 963 | is-path-inside@^1.0.0: 964 | version "1.0.0" 965 | resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" 966 | dependencies: 967 | path-is-inside "^1.0.1" 968 | 969 | is-posix-bracket@^0.1.0: 970 | version "0.1.1" 971 | resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" 972 | 973 | is-primitive@^2.0.0: 974 | version "2.0.0" 975 | resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" 976 | 977 | is-property@^1.0.0: 978 | version "1.0.2" 979 | resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" 980 | 981 | is-resolvable@^1.0.0: 982 | version "1.0.0" 983 | resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" 984 | dependencies: 985 | tryit "^1.0.1" 986 | 987 | is-typedarray@~1.0.0: 988 | version "1.0.0" 989 | resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" 990 | 991 | isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: 992 | version "1.0.0" 993 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 994 | 995 | isemail@1.x.x: 996 | version "1.2.0" 997 | resolved "https://registry.yarnpkg.com/isemail/-/isemail-1.2.0.tgz#be03df8cc3e29de4d2c5df6501263f1fa4595e9a" 998 | 999 | isexe@^1.1.1: 1000 | version "1.1.2" 1001 | resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" 1002 | 1003 | isobject@^2.0.0: 1004 | version "2.1.0" 1005 | resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" 1006 | dependencies: 1007 | isarray "1.0.0" 1008 | 1009 | isstream@~0.1.2: 1010 | version "0.1.2" 1011 | resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" 1012 | 1013 | jodid25519@^1.0.0: 1014 | version "1.0.2" 1015 | resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" 1016 | dependencies: 1017 | jsbn "~0.1.0" 1018 | 1019 | joi@^6.10.1: 1020 | version "6.10.1" 1021 | resolved "https://registry.yarnpkg.com/joi/-/joi-6.10.1.tgz#4d50c318079122000fe5f16af1ff8e1917b77e06" 1022 | dependencies: 1023 | hoek "2.x.x" 1024 | isemail "1.x.x" 1025 | moment "2.x.x" 1026 | topo "1.x.x" 1027 | 1028 | js-tokens@^3.0.0: 1029 | version "3.0.1" 1030 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" 1031 | 1032 | js-yaml@^3.5.1: 1033 | version "3.8.1" 1034 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628" 1035 | dependencies: 1036 | argparse "^1.0.7" 1037 | esprima "^3.1.1" 1038 | 1039 | jsbn@~0.1.0: 1040 | version "0.1.1" 1041 | resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" 1042 | 1043 | json-schema@0.2.3: 1044 | version "0.2.3" 1045 | resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" 1046 | 1047 | json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: 1048 | version "1.0.1" 1049 | resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" 1050 | dependencies: 1051 | jsonify "~0.0.0" 1052 | 1053 | json-stringify-safe@~5.0.1: 1054 | version "5.0.1" 1055 | resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" 1056 | 1057 | jsonfile@^2.1.0: 1058 | version "2.4.0" 1059 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" 1060 | optionalDependencies: 1061 | graceful-fs "^4.1.6" 1062 | 1063 | jsonify@~0.0.0: 1064 | version "0.0.0" 1065 | resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" 1066 | 1067 | jsonpointer@^4.0.0: 1068 | version "4.0.1" 1069 | resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" 1070 | 1071 | jsonwebtoken@5.7.0: 1072 | version "5.7.0" 1073 | resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-5.7.0.tgz#1c90f9a86ce5b748f5f979c12b70402b4afcddb4" 1074 | dependencies: 1075 | jws "^3.0.0" 1076 | ms "^0.7.1" 1077 | xtend "^4.0.1" 1078 | 1079 | jsonwebtoken@7.1.9: 1080 | version "7.1.9" 1081 | resolved "https://registry.yarnpkg.com/jsonwebtoken/-/jsonwebtoken-7.1.9.tgz#847804e5258bec5a9499a8dc4a5e7a3bae08d58a" 1082 | dependencies: 1083 | joi "^6.10.1" 1084 | jws "^3.1.3" 1085 | lodash.once "^4.0.0" 1086 | ms "^0.7.1" 1087 | xtend "^4.0.1" 1088 | 1089 | jsprim@^1.2.2: 1090 | version "1.3.1" 1091 | resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.3.1.tgz#2a7256f70412a29ee3670aaca625994c4dcff252" 1092 | dependencies: 1093 | extsprintf "1.0.2" 1094 | json-schema "0.2.3" 1095 | verror "1.3.6" 1096 | 1097 | jwa@^1.1.4: 1098 | version "1.1.5" 1099 | resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.1.5.tgz#a0552ce0220742cd52e153774a32905c30e756e5" 1100 | dependencies: 1101 | base64url "2.0.0" 1102 | buffer-equal-constant-time "1.0.1" 1103 | ecdsa-sig-formatter "1.0.9" 1104 | safe-buffer "^5.0.1" 1105 | 1106 | jws@^3.0.0, jws@^3.1.3: 1107 | version "3.1.4" 1108 | resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" 1109 | dependencies: 1110 | base64url "^2.0.0" 1111 | jwa "^1.1.4" 1112 | safe-buffer "^5.0.1" 1113 | 1114 | jwt-simple@0.3.1: 1115 | version "0.3.1" 1116 | resolved "https://registry.yarnpkg.com/jwt-simple/-/jwt-simple-0.3.1.tgz#86e0b121d149534423dbd8044a727e3cf1eb939e" 1117 | 1118 | kind-of@^3.0.2: 1119 | version "3.1.0" 1120 | resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47" 1121 | dependencies: 1122 | is-buffer "^1.0.2" 1123 | 1124 | klaw@^1.0.0: 1125 | version "1.3.1" 1126 | resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" 1127 | optionalDependencies: 1128 | graceful-fs "^4.1.9" 1129 | 1130 | levn@^0.3.0, levn@~0.3.0: 1131 | version "0.3.0" 1132 | resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 1133 | dependencies: 1134 | prelude-ls "~1.1.2" 1135 | type-check "~0.3.2" 1136 | 1137 | lodash.mergewith@^4.6.0: 1138 | version "4.6.0" 1139 | resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.0.tgz#150cf0a16791f5903b8891eab154609274bdea55" 1140 | 1141 | lodash.once@^4.0.0: 1142 | version "4.1.1" 1143 | resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" 1144 | 1145 | lodash@3.10.1: 1146 | version "3.10.1" 1147 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" 1148 | 1149 | lodash@4.13.1: 1150 | version "4.13.1" 1151 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.13.1.tgz#83e4b10913f48496d4d16fec4a560af2ee744b68" 1152 | 1153 | lodash@4.14.2, lodash@^4.0.0, lodash@^4.3.0: 1154 | version "4.14.2" 1155 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.14.2.tgz#bbccce6373a400fbfd0a8c67ca42f6d1ef416432" 1156 | 1157 | lru-cache@^4.0.1: 1158 | version "4.0.2" 1159 | resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" 1160 | dependencies: 1161 | pseudomap "^1.0.1" 1162 | yallist "^2.0.0" 1163 | 1164 | micromatch@^2.1.5: 1165 | version "2.3.11" 1166 | resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" 1167 | dependencies: 1168 | arr-diff "^2.0.0" 1169 | array-unique "^0.2.1" 1170 | braces "^1.8.2" 1171 | expand-brackets "^0.1.4" 1172 | extglob "^0.3.1" 1173 | filename-regex "^2.0.0" 1174 | is-extglob "^1.0.0" 1175 | is-glob "^2.0.1" 1176 | kind-of "^3.0.2" 1177 | normalize-path "^2.0.1" 1178 | object.omit "^2.0.0" 1179 | parse-glob "^3.0.4" 1180 | regex-cache "^0.4.2" 1181 | 1182 | mime-db@~1.26.0: 1183 | version "1.26.0" 1184 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff" 1185 | 1186 | mime-types@^2.1.12, mime-types@~2.1.7: 1187 | version "2.1.14" 1188 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee" 1189 | dependencies: 1190 | mime-db "~1.26.0" 1191 | 1192 | minimatch@^3.0.0, minimatch@^3.0.2: 1193 | version "3.0.3" 1194 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" 1195 | dependencies: 1196 | brace-expansion "^1.0.0" 1197 | 1198 | minimist@0.0.8: 1199 | version "0.0.8" 1200 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 1201 | 1202 | minimist@^1.1.0, minimist@^1.2.0: 1203 | version "1.2.0" 1204 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 1205 | 1206 | "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1: 1207 | version "0.5.1" 1208 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 1209 | dependencies: 1210 | minimist "0.0.8" 1211 | 1212 | moment@2.x.x: 1213 | version "2.17.1" 1214 | resolved "https://registry.yarnpkg.com/moment/-/moment-2.17.1.tgz#fed9506063f36b10f066c8b59a144d7faebe1d82" 1215 | 1216 | ms@0.7.1, ms@^0.7.1: 1217 | version "0.7.1" 1218 | resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" 1219 | 1220 | mute-stream@0.0.5: 1221 | version "0.0.5" 1222 | resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" 1223 | 1224 | nan@^2.3.0: 1225 | version "2.5.1" 1226 | resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.1.tgz#d5b01691253326a97a2bbee9e61c55d8d60351e2" 1227 | 1228 | natural-compare@^1.4.0: 1229 | version "1.4.0" 1230 | resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 1231 | 1232 | node-elm-compiler@4.1.0: 1233 | version "4.1.0" 1234 | resolved "https://registry.yarnpkg.com/node-elm-compiler/-/node-elm-compiler-4.1.0.tgz#1b00244902f3f6e5cd5f6a3abadfb0f55b6c35dd" 1235 | dependencies: 1236 | cross-spawn "4.0.0" 1237 | lodash "4.14.2" 1238 | temp "^0.8.3" 1239 | 1240 | node-pre-gyp@^0.6.29: 1241 | version "0.6.33" 1242 | resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.33.tgz#640ac55198f6a925972e0c16c4ac26a034d5ecc9" 1243 | dependencies: 1244 | mkdirp "~0.5.1" 1245 | nopt "~3.0.6" 1246 | npmlog "^4.0.1" 1247 | rc "~1.1.6" 1248 | request "^2.79.0" 1249 | rimraf "~2.5.4" 1250 | semver "~5.3.0" 1251 | tar "~2.2.1" 1252 | tar-pack "~3.3.0" 1253 | 1254 | nopt@~3.0.6: 1255 | version "3.0.6" 1256 | resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" 1257 | dependencies: 1258 | abbrev "1" 1259 | 1260 | normalize-path@^2.0.1: 1261 | version "2.0.1" 1262 | resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.0.1.tgz#47886ac1662760d4261b7d979d241709d3ce3f7a" 1263 | 1264 | npmlog@^4.0.1: 1265 | version "4.0.2" 1266 | resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" 1267 | dependencies: 1268 | are-we-there-yet "~1.1.2" 1269 | console-control-strings "~1.1.0" 1270 | gauge "~2.7.1" 1271 | set-blocking "~2.0.0" 1272 | 1273 | number-is-nan@^1.0.0: 1274 | version "1.0.1" 1275 | resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" 1276 | 1277 | oauth-sign@~0.8.1: 1278 | version "0.8.2" 1279 | resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" 1280 | 1281 | object-assign@^4.0.1, object-assign@^4.1.0: 1282 | version "4.1.1" 1283 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 1284 | 1285 | object.omit@^2.0.0: 1286 | version "2.0.1" 1287 | resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" 1288 | dependencies: 1289 | for-own "^0.1.4" 1290 | is-extendable "^0.1.1" 1291 | 1292 | once@^1.3.0: 1293 | version "1.4.0" 1294 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 1295 | dependencies: 1296 | wrappy "1" 1297 | 1298 | once@~1.3.3: 1299 | version "1.3.3" 1300 | resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" 1301 | dependencies: 1302 | wrappy "1" 1303 | 1304 | onetime@^1.0.0: 1305 | version "1.1.0" 1306 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" 1307 | 1308 | optionator@^0.8.2: 1309 | version "0.8.2" 1310 | resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 1311 | dependencies: 1312 | deep-is "~0.1.3" 1313 | fast-levenshtein "~2.0.4" 1314 | levn "~0.3.0" 1315 | prelude-ls "~1.1.2" 1316 | type-check "~0.3.2" 1317 | wordwrap "~1.0.0" 1318 | 1319 | options@>=0.0.5: 1320 | version "0.0.6" 1321 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" 1322 | 1323 | os-homedir@^1.0.0: 1324 | version "1.0.2" 1325 | resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" 1326 | 1327 | os-tmpdir@^1.0.0: 1328 | version "1.0.2" 1329 | resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 1330 | 1331 | parse-glob@^3.0.4: 1332 | version "3.0.4" 1333 | resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" 1334 | dependencies: 1335 | glob-base "^0.3.0" 1336 | is-dotfile "^1.0.0" 1337 | is-extglob "^1.0.0" 1338 | is-glob "^2.0.0" 1339 | 1340 | path-exists@^2.0.0: 1341 | version "2.1.0" 1342 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 1343 | dependencies: 1344 | pinkie-promise "^2.0.0" 1345 | 1346 | path-is-absolute@^1.0.0: 1347 | version "1.0.1" 1348 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 1349 | 1350 | path-is-inside@^1.0.1: 1351 | version "1.0.2" 1352 | resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 1353 | 1354 | path-parse@^1.0.5: 1355 | version "1.0.5" 1356 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 1357 | 1358 | pify@^2.0.0: 1359 | version "2.3.0" 1360 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 1361 | 1362 | pinkie-promise@^2.0.0: 1363 | version "2.0.1" 1364 | resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 1365 | dependencies: 1366 | pinkie "^2.0.0" 1367 | 1368 | pinkie@^2.0.0: 1369 | version "2.0.4" 1370 | resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 1371 | 1372 | pluralize@^1.2.1: 1373 | version "1.2.1" 1374 | resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" 1375 | 1376 | prelude-ls@~1.1.2: 1377 | version "1.1.2" 1378 | resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 1379 | 1380 | preserve@^0.2.0: 1381 | version "0.2.0" 1382 | resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" 1383 | 1384 | process-nextick-args@~1.0.6: 1385 | version "1.0.7" 1386 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" 1387 | 1388 | progress@^1.1.8: 1389 | version "1.1.8" 1390 | resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" 1391 | 1392 | pseudomap@^1.0.1: 1393 | version "1.0.2" 1394 | resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 1395 | 1396 | punycode@^1.4.1: 1397 | version "1.4.1" 1398 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 1399 | 1400 | qs@~6.3.0: 1401 | version "6.3.1" 1402 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.1.tgz#918c0b3bcd36679772baf135b1acb4c1651ed79d" 1403 | 1404 | randomatic@^1.1.3: 1405 | version "1.1.6" 1406 | resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" 1407 | dependencies: 1408 | is-number "^2.0.2" 1409 | kind-of "^3.0.2" 1410 | 1411 | rc@~1.1.6: 1412 | version "1.1.7" 1413 | resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.7.tgz#c5ea564bb07aff9fd3a5b32e906c1d3a65940fea" 1414 | dependencies: 1415 | deep-extend "~0.4.0" 1416 | ini "~1.3.0" 1417 | minimist "^1.2.0" 1418 | strip-json-comments "~2.0.1" 1419 | 1420 | "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.2.2: 1421 | version "2.2.3" 1422 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.3.tgz#9cf49463985df016c8ae8813097a9293a9b33729" 1423 | dependencies: 1424 | buffer-shims "^1.0.0" 1425 | core-util-is "~1.0.0" 1426 | inherits "~2.0.1" 1427 | isarray "~1.0.0" 1428 | process-nextick-args "~1.0.6" 1429 | string_decoder "~0.10.x" 1430 | util-deprecate "~1.0.1" 1431 | 1432 | readable-stream@~2.1.4: 1433 | version "2.1.5" 1434 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" 1435 | dependencies: 1436 | buffer-shims "^1.0.0" 1437 | core-util-is "~1.0.0" 1438 | inherits "~2.0.1" 1439 | isarray "~1.0.0" 1440 | process-nextick-args "~1.0.6" 1441 | string_decoder "~0.10.x" 1442 | util-deprecate "~1.0.1" 1443 | 1444 | readdirp@^2.0.0: 1445 | version "2.1.0" 1446 | resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" 1447 | dependencies: 1448 | graceful-fs "^4.1.2" 1449 | minimatch "^3.0.2" 1450 | readable-stream "^2.0.2" 1451 | set-immediate-shim "^1.0.1" 1452 | 1453 | readline2@^1.0.1: 1454 | version "1.0.1" 1455 | resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" 1456 | dependencies: 1457 | code-point-at "^1.0.0" 1458 | is-fullwidth-code-point "^1.0.0" 1459 | mute-stream "0.0.5" 1460 | 1461 | rechoir@^0.6.2: 1462 | version "0.6.2" 1463 | resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" 1464 | dependencies: 1465 | resolve "^1.1.6" 1466 | 1467 | regex-cache@^0.4.2: 1468 | version "0.4.3" 1469 | resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" 1470 | dependencies: 1471 | is-equal-shallow "^0.1.3" 1472 | is-primitive "^2.0.0" 1473 | 1474 | repeat-element@^1.1.2: 1475 | version "1.1.2" 1476 | resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" 1477 | 1478 | repeat-string@^1.5.2: 1479 | version "1.6.1" 1480 | resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" 1481 | 1482 | replaceall@^0.1.3: 1483 | version "0.1.6" 1484 | resolved "https://registry.yarnpkg.com/replaceall/-/replaceall-0.1.6.tgz#81d81ac7aeb72d7f5c4942adf2697a3220688d8e" 1485 | 1486 | request@^2.79.0: 1487 | version "2.79.0" 1488 | resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" 1489 | dependencies: 1490 | aws-sign2 "~0.6.0" 1491 | aws4 "^1.2.1" 1492 | caseless "~0.11.0" 1493 | combined-stream "~1.0.5" 1494 | extend "~3.0.0" 1495 | forever-agent "~0.6.1" 1496 | form-data "~2.1.1" 1497 | har-validator "~2.0.6" 1498 | hawk "~3.1.3" 1499 | http-signature "~1.1.0" 1500 | is-typedarray "~1.0.0" 1501 | isstream "~0.1.2" 1502 | json-stringify-safe "~5.0.1" 1503 | mime-types "~2.1.7" 1504 | oauth-sign "~0.8.1" 1505 | qs "~6.3.0" 1506 | stringstream "~0.0.4" 1507 | tough-cookie "~2.3.0" 1508 | tunnel-agent "~0.4.1" 1509 | uuid "^3.0.0" 1510 | 1511 | require-uncached@^1.0.2: 1512 | version "1.0.3" 1513 | resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 1514 | dependencies: 1515 | caller-path "^0.1.0" 1516 | resolve-from "^1.0.0" 1517 | 1518 | resolve-from@^1.0.0: 1519 | version "1.0.1" 1520 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 1521 | 1522 | resolve@^1.1.6: 1523 | version "1.3.2" 1524 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" 1525 | dependencies: 1526 | path-parse "^1.0.5" 1527 | 1528 | restore-cursor@^1.0.1: 1529 | version "1.0.1" 1530 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" 1531 | dependencies: 1532 | exit-hook "^1.0.0" 1533 | onetime "^1.0.0" 1534 | 1535 | rimraf@2, rimraf@~2.5.1, rimraf@~2.5.4: 1536 | version "2.5.4" 1537 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" 1538 | dependencies: 1539 | glob "^7.0.5" 1540 | 1541 | rimraf@^2.2.8, rimraf@~2.2.6: 1542 | version "2.2.8" 1543 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" 1544 | 1545 | rsvp@3.2.1: 1546 | version "3.2.1" 1547 | resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.2.1.tgz#07cb4a5df25add9e826ebc67dcc9fd89db27d84a" 1548 | 1549 | run-async@^0.1.0: 1550 | version "0.1.0" 1551 | resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" 1552 | dependencies: 1553 | once "^1.3.0" 1554 | 1555 | rx-lite@^3.1.2: 1556 | version "3.1.2" 1557 | resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" 1558 | 1559 | safe-buffer@^5.0.1: 1560 | version "5.0.1" 1561 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" 1562 | 1563 | semver@~5.3.0: 1564 | version "5.3.0" 1565 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" 1566 | 1567 | set-blocking@~2.0.0: 1568 | version "2.0.0" 1569 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" 1570 | 1571 | set-immediate-shim@^1.0.1: 1572 | version "1.0.1" 1573 | resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" 1574 | 1575 | shelljs@^0.7.5: 1576 | version "0.7.6" 1577 | resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" 1578 | dependencies: 1579 | glob "^7.0.0" 1580 | interpret "^1.0.0" 1581 | rechoir "^0.6.2" 1582 | 1583 | signal-exit@^3.0.0: 1584 | version "3.0.2" 1585 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 1586 | 1587 | slice-ansi@0.0.4: 1588 | version "0.0.4" 1589 | resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" 1590 | 1591 | sntp@1.x.x: 1592 | version "1.0.9" 1593 | resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" 1594 | dependencies: 1595 | hoek "2.x.x" 1596 | 1597 | sprintf-js@~1.0.2: 1598 | version "1.0.3" 1599 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1600 | 1601 | sshpk@^1.7.0: 1602 | version "1.10.2" 1603 | resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.2.tgz#d5a804ce22695515638e798dbe23273de070a5fa" 1604 | dependencies: 1605 | asn1 "~0.2.3" 1606 | assert-plus "^1.0.0" 1607 | dashdash "^1.12.0" 1608 | getpass "^0.1.1" 1609 | optionalDependencies: 1610 | bcrypt-pbkdf "^1.0.0" 1611 | ecc-jsbn "~0.1.1" 1612 | jodid25519 "^1.0.0" 1613 | jsbn "~0.1.0" 1614 | tweetnacl "~0.14.0" 1615 | 1616 | string-width@^1.0.1: 1617 | version "1.0.2" 1618 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" 1619 | dependencies: 1620 | code-point-at "^1.0.0" 1621 | is-fullwidth-code-point "^1.0.0" 1622 | strip-ansi "^3.0.0" 1623 | 1624 | string-width@^2.0.0: 1625 | version "2.0.0" 1626 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" 1627 | dependencies: 1628 | is-fullwidth-code-point "^2.0.0" 1629 | strip-ansi "^3.0.0" 1630 | 1631 | string_decoder@~0.10.x: 1632 | version "0.10.31" 1633 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" 1634 | 1635 | stringstream@~0.0.4: 1636 | version "0.0.5" 1637 | resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" 1638 | 1639 | strip-ansi@^3.0.0, strip-ansi@^3.0.1: 1640 | version "3.0.1" 1641 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1642 | dependencies: 1643 | ansi-regex "^2.0.0" 1644 | 1645 | strip-bom@^3.0.0: 1646 | version "3.0.0" 1647 | resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1648 | 1649 | strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: 1650 | version "2.0.1" 1651 | resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1652 | 1653 | supports-color@^2.0.0: 1654 | version "2.0.0" 1655 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1656 | 1657 | table@^3.7.8: 1658 | version "3.8.3" 1659 | resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" 1660 | dependencies: 1661 | ajv "^4.7.0" 1662 | ajv-keywords "^1.0.0" 1663 | chalk "^1.1.1" 1664 | lodash "^4.0.0" 1665 | slice-ansi "0.0.4" 1666 | string-width "^2.0.0" 1667 | 1668 | tar-pack@~3.3.0: 1669 | version "3.3.0" 1670 | resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" 1671 | dependencies: 1672 | debug "~2.2.0" 1673 | fstream "~1.0.10" 1674 | fstream-ignore "~1.0.5" 1675 | once "~1.3.3" 1676 | readable-stream "~2.1.4" 1677 | rimraf "~2.5.1" 1678 | tar "~2.2.1" 1679 | uid-number "~0.0.6" 1680 | 1681 | tar@~2.2.1: 1682 | version "2.2.1" 1683 | resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" 1684 | dependencies: 1685 | block-stream "*" 1686 | fstream "^1.0.2" 1687 | inherits "2" 1688 | 1689 | targaryen@2.3.3: 1690 | version "2.3.3" 1691 | resolved "https://registry.yarnpkg.com/targaryen/-/targaryen-2.3.3.tgz#1014f2cc66f94c0f7a19233126b5f2168e25db2f" 1692 | dependencies: 1693 | cli-table "^0.3.1" 1694 | colors "^1.0.3" 1695 | esprima "^1.2.2" 1696 | lodash.mergewith "^4.6.0" 1697 | minimist "^1.1.0" 1698 | replaceall "^0.1.3" 1699 | strip-json-comments "^2.0.1" 1700 | 1701 | temp@0.8.3, temp@^0.8.3: 1702 | version "0.8.3" 1703 | resolved "https://registry.yarnpkg.com/temp/-/temp-0.8.3.tgz#e0c6bc4d26b903124410e4fed81103014dfc1f59" 1704 | dependencies: 1705 | os-tmpdir "^1.0.0" 1706 | rimraf "~2.2.6" 1707 | 1708 | text-table@~0.2.0: 1709 | version "0.2.0" 1710 | resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1711 | 1712 | through@^2.3.6: 1713 | version "2.3.8" 1714 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1715 | 1716 | topo@1.x.x: 1717 | version "1.1.0" 1718 | resolved "https://registry.yarnpkg.com/topo/-/topo-1.1.0.tgz#e9d751615d1bb87dc865db182fa1ca0a5ef536d5" 1719 | dependencies: 1720 | hoek "2.x.x" 1721 | 1722 | tough-cookie@~2.3.0: 1723 | version "2.3.2" 1724 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" 1725 | dependencies: 1726 | punycode "^1.4.1" 1727 | 1728 | tryit@^1.0.1: 1729 | version "1.0.3" 1730 | resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" 1731 | 1732 | tunnel-agent@~0.4.1: 1733 | version "0.4.3" 1734 | resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" 1735 | 1736 | tweetnacl@^0.14.3, tweetnacl@~0.14.0: 1737 | version "0.14.5" 1738 | resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" 1739 | 1740 | type-check@~0.3.2: 1741 | version "0.3.2" 1742 | resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1743 | dependencies: 1744 | prelude-ls "~1.1.2" 1745 | 1746 | typedarray@^0.0.6: 1747 | version "0.0.6" 1748 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 1749 | 1750 | uid-number@~0.0.6: 1751 | version "0.0.6" 1752 | resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" 1753 | 1754 | ultron@1.0.x: 1755 | version "1.0.2" 1756 | resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" 1757 | 1758 | user-home@^2.0.0: 1759 | version "2.0.0" 1760 | resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" 1761 | dependencies: 1762 | os-homedir "^1.0.0" 1763 | 1764 | util-deprecate@~1.0.1: 1765 | version "1.0.2" 1766 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1767 | 1768 | uuid@^3.0.0: 1769 | version "3.0.1" 1770 | resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" 1771 | 1772 | verror@1.3.6: 1773 | version "1.3.6" 1774 | resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" 1775 | dependencies: 1776 | extsprintf "1.0.2" 1777 | 1778 | websocket-driver@>=0.5.1: 1779 | version "0.6.5" 1780 | resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" 1781 | dependencies: 1782 | websocket-extensions ">=0.1.1" 1783 | 1784 | websocket-extensions@>=0.1.1: 1785 | version "0.1.1" 1786 | resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" 1787 | 1788 | which@^1.2.9: 1789 | version "1.2.12" 1790 | resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" 1791 | dependencies: 1792 | isexe "^1.1.1" 1793 | 1794 | wide-align@^1.1.0: 1795 | version "1.1.0" 1796 | resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" 1797 | dependencies: 1798 | string-width "^1.0.1" 1799 | 1800 | wordwrap@~1.0.0: 1801 | version "1.0.0" 1802 | resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1803 | 1804 | wrappy@1: 1805 | version "1.0.2" 1806 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1807 | 1808 | write@^0.2.1: 1809 | version "0.2.1" 1810 | resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 1811 | dependencies: 1812 | mkdirp "^0.5.1" 1813 | 1814 | ws@1.1.1: 1815 | version "1.1.1" 1816 | resolved "https://registry.yarnpkg.com/ws/-/ws-1.1.1.tgz#082ddb6c641e85d4bb451f03d52f06eabdb1f018" 1817 | dependencies: 1818 | options ">=0.0.5" 1819 | ultron "1.0.x" 1820 | 1821 | xmlhttprequest@1.8.0: 1822 | version "1.8.0" 1823 | resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" 1824 | 1825 | xtend@^4.0.0, xtend@^4.0.1: 1826 | version "4.0.1" 1827 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 1828 | 1829 | yallist@^2.0.0: 1830 | version "2.0.0" 1831 | resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.0.0.tgz#306c543835f09ee1a4cb23b7bce9ab341c91cdd4" 1832 | --------------------------------------------------------------------------------